first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -0,0 +1,269 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--
工会会计审核
-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1020].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="校工会会计核批" :panes="[2,3]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 1,
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(location.href + "/doReview", this.formData)
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
})
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,346 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-divider--horizontal {
margin-top: 50px;
margin-bottom: 40px;
}
</style>
<div id="app" v-cloak style="padding: 20px 40px">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="color: #409EFF;font-size: 18px">填写申请信息</span>
</div>
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px">
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="user_name" label="申请人姓名">
<el-input disabled v-model="formData.user_name" type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="apply_time" label="申请时间">
<el-input disabled v-model="formData.apply_time" type="text"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="activity_name" label="活动名称">
<el-autocomplete style="width: 100%"
v-model="formData.activity_name"
:fetch-suggestions="querySearchAsync"
placeholder="请输入内容"
@select="handleSelect"
@input="activityChange"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_type" label="活动类型">
<el-select v-model="formData.activity_type" placeholder="请选择活动类型" style="width: 100%">
<!--#if(@shiro.hasRole('H04') || @shiro.hasRole('sysadmin')){#-->
<el-option label="基层工会活动" value="1"></el-option>
<!--#}#-->
<!--#if(@shiro.hasRole('A06') || @shiro.hasRole('sysadmin')){#-->
<el-option label="校工会活动" value="2"></el-option>
<!--#}#-->
<!--#if(@shiro.hasRole('H02') || @shiro.hasRole('sysadmin')){#-->
<el-option label="协会(社团)活动" value="3"></el-option>
<!--#}#-->
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="venue" label="活动人数">
<el-input v-model="formData.activity_number" placeholder="请输入活动人数" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="venue" label="活动地点">
<el-input v-model="formData.venue" placeholder="请输入活动地点" type="text"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="activity_money" label="报销金额">
<el-input disabled v-model="formData.activity_money" placeholder="输入物品单价自动计算"
type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_card_number" label="报销卡号">
<el-input v-model="formData.activity_card_number" type="number"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="activity_time" label="活动时间">
<el-date-picker style="width: 100%"
v-model="formData.activity_time"
type="date" value-format="yyyy-MM-dd"
placeholder="活动时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">购置物品及价格</span>
</el-divider>
<el-form-item label-width="0">
<el-button style="float: right;margin-bottom: 10px" icon="el-icon-plus" size="mini"
@click="formData.goods.push({name:'',price:''})">
添加
</el-button>
<el-table :data="formData.goods" border size="mini" style="width: 100%">
<el-table-column sortable type="index" width="100" label="序号"
align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="物品名称" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
type="text"></el-input>
</template>
</el-table-column>
<el-table-column prop="price" label="物品价格" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="物品价格" v-model="row.price"
type="number" @input="blur"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" header-align="center"
width="80px"
fixed="right">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" circle
:disabled="formData.goods.length==0"
@click="delNotesItem(scope)"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">活动内容</span>
</el-divider>
<el-form-item prop="activity_content" class="is-required" label-width="auto">
<div id="acEditor"></div>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">&emsp;&emsp;</span>
</el-divider>
<el-form-item prop="files" label-width="auto">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">&emsp;&emsp;</span>
</el-divider>
<el-form-item prop="sign" label-width="auto">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="primary" @click="doAdd()">确 定</el-button>
</div>
</el-card>
</div>
<script>
let E = window.wangEditor
let acEditor = null
const vue = new Vue({
el: '#app',
data() {
let validAc = (rule, value, callback) => {
if (!this.formData.activity_content || !dd3s.html2txt(this.formData.activity_content)) {
callback(new Error('请填写活动内容'));
} else {
callback();
}
};
return {
delNotesList: [],
tabLoading: false,
tableData: [],
formData: {},
formSign: {},
pageForm: {
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
activity_name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_content: [{validator: validAc, trigger: ['blur', 'change']}],
},
activity: []
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
blur() {
let num = 0
this.formData.goods.forEach(v => {
num += parseFloat(v.price)
})
this.$set(this.formData, "activity_money", num)
},
delNotesItem(scope) {
this.delNotesList.push(scope.row.id)
this.formData.goods.splice(scope.$index, 1)
},
activityChange(val) {
const activity = this.activity.find(v => v.v_name == val)
this.$set(this.formData, 'activity_id', activity ? activity.id : null)
},
handleSelect(item) {
if (item.id) {
this.$set(this.formData, 'activity_time', item.be_time)
this.$set(this.formData, 'activity_number', item.number)
this.$set(this.formData, 'venue', item.address)
this.$set(this.formData, 'activity_id', item.id)
} else {
this.$set(this.formData, 'activity_id', null)
}
},
async querySearchAsync(queryString, cb) {
const {code, data} = await $.get("/platform/jf/activity_bx/reimbursement/getActivity", {query: queryString})
if (code == 0) {
const arr = data.map(v => {
v.v_name = v.name + moment(v.be_time).format(" YYYY-MM-DD")
return {value: v.v_name, ...v}
})
this.activity = data
cb(arr)
} else {
cb([])
}
},
exportWwj(id) {
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
},
async doAdd() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(location.href + "/doAdd", {
activityBx: JSON.stringify(this.formData),
sign: this.formData.sign
})
closeLoadingFunc(loading, resp, async () => {
this.pageData()
}, (data, msg) => {
this.$message.error(msg);
})
// 添加成功 跳转到申请记录页面
window.location.href = '/platform/jf/activity_bx/reimbursement'
}
})
},
doEdit() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(location.href + "/doEdit", {
activityBx: JSON.stringify(this.formData),
sign: this.formData.sign,
delNotesList: JSON.stringify(this.delNotesList)
})
closeLoadingFunc(loading, resp, async () => {
this.pageData()
this.$refs.guava.index()
}, (data, msg) => {
this.$message.error(msg);
})
}
})
},
init() {
this.delNotesList = []
this.formData = {
goods: [],
files: [],
activity_money: null,
user_name: '${@shiro.getPrincipalProperty("username")}',
apply_time: moment().format('YYYY-MM-DD'),
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
}
this.$nextTick(() => {
$("#acEditor").html("")
acEditor = new E("#acEditor")
acEditor.config.onchange = (html) => {
this.formData.activity_content = html
}
acEditor.create()
})
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
...pageSomeThing
},
async created() {
this.init()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,274 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--
协会负责人
-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1000].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="协会负责人审核" :panes="[2]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 1,
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(location.href + "/doReview", this.formData)
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
})
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,268 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--
工会出纳审核
-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1050].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="校工会出纳报销" :panes="[2,3,4,5,6]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 1,
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(location.href + "/doReview", this.formData)
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
})
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,266 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--
校工会副主席审核
-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1030].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="校工会副主席审核" :panes="[2,3,4]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 1,
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(location.href + "/doReview", this.formData)
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
})
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,270 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉菜单操作-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1010].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="基层工会核批" :panes="[2]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 1,
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(location.href + "/doReview", this.formData)
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
})
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,617 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-divider--horizontal {
margin-top: 80px;
margin-bottom: 40px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template name="el-zoom-in-center">
<!--第一行多功能查询-->
<!-- <el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy" style="width: 150px"
placeholder="选择年">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="$emit('search')">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 120px;">
<el-option label="姓名" value="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
&lt;!&ndash; <el-option label="活动类型" value="activity_type"></el-option>&ndash;&gt;
<el-option label="活动名称" value="activity_name"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
&lt;!&ndash;活动类型查询&ndash;&gt;
&lt;!&ndash; <div class="btn-group tool-button mt5">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="$emit('search')">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="活动类型查询"
style="width: 120px;">
<el-option label="分工会活动" value="1"></el-option>
<el-option label="校工会活动" value="2"></el-option>
<el-option label="协会(社团)活动" value="3"></el-option>
</el-select>
</el-input>
</div>&ndash;&gt;
<div class="btn-group tool-button mt5">
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
&lt;!&ndash; <el-button icon="el-icon-edit" @click="openAdd">申请活动报销</el-button>&ndash;&gt;
</div>
</el-row>-->
<search :page_form.sync="pageForm" @search="doSearch">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<!--申请记录展示-->
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" show-overflow-tooltip sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="审核人" prop="shrname" header-align="center"
align="center">
<template slot-scope="{row:{shrname}}">
{{shrname?shrname:'暂无'}}
</template>
</el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1010].includes(row.state_id)"
:command="{type:'edit',data:row}">
编辑
</el-dropdown-item>
<el-dropdown-item v-if="[1010,1000].includes(row.state_id)"
:command="{type:'delete',data:row}">
删除
</el-dropdown-item>
<!-- <el-dropdown-item v-if="[1060].includes(row.state_id)"
:command="{type:'exportWwj',data:row}">
导出
</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #edit>
<el-form label-width="100px">
<el-form-item label="填写申请信息&emsp;" label-width="135px" class="view-header" label-position="top">
</el-form-item>
</el-form>
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px">
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="user_name" label="申请人姓名">
<el-input disabled v-model="formData.user_name" type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="apply_time" label="申请时间">
<el-input disabled v-model="formData.apply_time" type="text"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="activity_name" label="活动名称">
<el-autocomplete style="width: 100%"
v-model="formData.activity_name"
:fetch-suggestions="querySearchAsync"
placeholder="请输入内容"
@select="handleSelect"
@input="activityChange"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_type" label="活动类型">
<el-select v-model="formData.activity_type" placeholder="请选择活动类型" style="width: 100%">
<!--#if(@shiro.hasRole('H04') || @shiro.hasRole('sysadmin')){#-->
<el-option label="基层工会活动" value="1"></el-option>
<!--#}#-->
<!--#if(@shiro.hasRole('A06') || @shiro.hasRole('sysadmin')){#-->
<el-option label="校工会活动" value="2"></el-option>
<!--#}#-->
<!--#if(@shiro.hasRole('H02') || @shiro.hasRole('sysadmin')){#-->
<el-option label="协会活动" value="3"></el-option>
<!--#}#-->
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="venue" label="活动人数">
<el-input v-model="formData.activity_number" placeholder="请输入活动人数" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="venue" label="活动地点">
<el-input v-model="formData.venue" placeholder="请输入活动地点" type="text"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="activity_money" label="报销金额">
<el-input disabled v-model="formData.activity_money" placeholder="输入物品单价自动计算"
type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_card_number" label="报销卡号">
<el-input v-model="formData.activity_card_number" type="number"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="activity_time" label="活动时间">
<el-date-picker style="width: 100%"
v-model="formData.activity_time"
type="date" value-format="yyyy-MM-dd"
placeholder="活动时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">购置物品及价格</span>
</el-divider>
<el-form-item label-width="0">
<el-button style="float: right;margin-bottom: 10px" icon="el-icon-plus" size="mini"
@click="formData.goods.push({name:'',price:''})">
添加
</el-button>
<el-table :data="formData.goods" border size="mini" style="width: 100%">
<el-table-column sortable type="index" width="100" label="序号"
align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="物品名称" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
type="text"></el-input>
</template>
</el-table-column>
<el-table-column prop="price" label="物品价格" align="center"
header-align="center">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="物品价格" v-model="row.price"
type="number" @input="blur"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" header-align="center"
width="80px"
fixed="right">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" circle
:disabled="formData.goods.length==0"
@click="delNotesItem(scope)"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">活动内容</span>
</el-divider>
<el-form-item prop="activity_content" class="is-required" label-width="auto">
<div id="acEditor"></div>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">&emsp;&emsp;</span>
</el-divider>
<el-form-item prop="sign" label-width="auto">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">&emsp;&emsp;</span>
</el-divider>
<el-form-item prop="files" label-width="auto">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="primary" @click="formData.id?doEdit():doAdd()">确 定</el-button>
</div>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
let E = window.wangEditor
let acEditor = null
const vue = new Vue({
el: '#app',
data() {
let validAc = (rule, value, callback) => {
if (!this.formData.activity_content || !dd3s.html2txt(this.formData.activity_content)) {
callback(new Error('请填写活动内容'));
} else {
callback();
}
};
return {
unions: [],
units: [],
delNotesList: [],
tabLoading: false,
tableData: [],
formData: {},
formSign: {},
pageForm: {
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + "",
activity_name: "activity_name",
},
formRules: {
activity_name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_content: [{validator: validAc, trigger: ['blur', 'change']}],
},
activity: []
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'edit') {
this.openEdit(data)
} else if (type == 'delete') {
this.doDelete(data)
} else if (type == 'exportWwj') {
this.exportWwj(data.id)
}
},
blur() {
let num = 0
this.formData.goods.forEach(v => {
num += parseFloat(v.price)
})
this.$set(this.formData, "activity_money", num)
},
delNotesItem(scope) {
this.delNotesList.push(scope.row.id)
this.formData.goods.splice(scope.$index, 1)
},
activityChange(val) {
const activity = this.activity.find(v => v.v_name == val)
this.$set(this.formData, 'activity_id', activity ? activity.id : null)
},
handleSelect(item) {
if (item.id) {
this.$set(this.formData, 'activity_time', item.be_time)
this.$set(this.formData, 'activity_number', item.number)
this.$set(this.formData, 'venue', item.address)
this.$set(this.formData, 'activity_id', item.id)
} else {
this.$set(this.formData, 'activity_id', null)
}
},
async querySearchAsync(queryString, cb) {
const {code, data} = await $.get(loc() + "/getActivity", {query: queryString})
if (code == 0) {
const arr = data.map(v => {
v.v_name = v.name + moment(v.be_time).format(" YYYY-MM-DD")
return {value: v.v_name, ...v}
})
this.activity = data
cb(arr)
} else {
cb([])
}
},
exportWwj(id) {
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
},
async doAdd() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(location.href + "/doAdd", {
activityBx: JSON.stringify(this.formData),
sign: this.formData.sign
})
closeLoadingFunc(loading, resp, async () => {
this.pageData()
this.$refs.guava.index()
}, (data, msg) => {
this.$message.error(msg);
})
}
})
},
doEdit() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(location.href + "/doEdit", {
activityBx: JSON.stringify(this.formData),
sign: this.formData.sign,
delNotesList: JSON.stringify(this.delNotesList)
})
closeLoadingFunc(loading, resp, async () => {
this.pageData()
this.$refs.guava.index()
}, (data, msg) => {
this.$message.error(msg);
})
}
})
},
openAdd() {
this.delNotesList = []
this.formData = {
goods: [],
files: [],
activity_money: null,
user_name: '${@shiro.getPrincipalProperty("username")}',
apply_time: moment().format('YYYY-MM-DD'),
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
}
this.$nextTick(() => {
$("#acEditor").html("")
acEditor = new E("#acEditor")
acEditor.config.onchange = (html) => {
this.formData.activity_content = html
}
acEditor.create()
})
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async openEdit(row) {
const {id} = row
this.formData = {}
const resp = await $.get(location.href + "/findOne", {id})
requestLaterFun(resp, (v) => {
v.activity_type = v.activity_type.toString()
this.formData = v
this.formData.files = JSON.parse(v.files)
this.$nextTick(() => {
$("#acEditor").html("")
acEditor = new E("#acEditor")
acEditor.config.onchange = (html) => {
this.formData.activity_content = html
}
acEditor.create()
acEditor.txt.html(v.activity_content)
})
this.$refs.guava.edit()
})
},
doDelete(row) {
const {id} = row
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
this.$set(row, "delLoading", true)
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doDelete", {id: id});
this.pageData()
}
}
});
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
if (getLocationVariable("action") == 'add') {
this.openAdd()
}
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,239 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template name="el-zoom-in-center">
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy" style="width: 150px"
placeholder="选择年">
</el-date-picker>
</div>
<!--分工会查询-->
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="$emit('search')">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 120px;">
<el-option label="姓名" value="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
<el-option label="活动名称" value="activity_name"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button mt5">
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button icon="el-icon-download" @click="download">导出名单</i>
</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="userOnline" align="center" header-align="center" label="操作"-->
<!-- width="250px">-->
<!-- <template scope="{row}">-->
<!-- <el-button size="mini" @click="openView(row)">-->
<!-- 查看-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1060].includes(row.state_id)"
:command="{type:'exportWwj',data:row}">
导出
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unionOptions: [],
tabLoading: false,
tableData: [],
formData: {},
pageForm: {
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_content: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
unions: [],
units: [],
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
},
methods: {
dropdownCommand(command) {
//下拉菜单操作
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'exportWwj') {
this.exportWwj(data.id)
}
},
exportWwj(id) {
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
},
download() {
if (!(this.pageForm.year && this.pageForm.year.length)) {
this.$message.error("请选择日期");
return
}
location.href = location.href + '/download?year=' + this.pageForm.year
},
/* getunion() {
$.get(base + "/platform/jf/activity_bx/reimbursementview/getunion", (data) => {
if (data.code == 0) {
this.unionOptions = data.data
}
}, "json");
},*/
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.unionOptions = await getUnions();
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,270 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--
校工会主席审核
-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
<template #column>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</search>
<el-row class="el-table-container">
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="120px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
align="center"></el-table-column>
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="所属单位" prop="bxr_unitname" header-align="center" sortable
align="center"></el-table-column>
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
align="center">
<template scope="scope">
<el-link type="primary" @click="openView(scope.row)">
{{scope.row.activity_name}}
</el-link>
</template>
</el-table-column>
<el-table-column label="活动类型" prop="activity_type" header-align="center" align="center" sortable>
<template scope="{row}">
<span v-if="row.activity_type==1">基层工会活动</span>
<span v-if="row.activity_type==2">校工会活动</span>
<span v-if="row.activity_type==3">协会(社团)活动</span>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
align="center"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<!--下拉操作按钮-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item v-if="[1040].includes(row.state_id)"
:command="{type:'primary',data:row}">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</template>
<template #edit>
<activity-bx-info ref="act_info2" :handle="true" label="校工会主席审核" :panes="[2,3,4,5]">
<template #handle>
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
style="padding: 20px 0"
label-width="120px">
<el-form-item label="审核信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="time" label="审核时间">
<el-input v-model="formData.time" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="idea" label="审核意见">
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<el-form-item prop="sign" label="签&emsp;&emsp;字">
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
</el-button>
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
</el-button>
</div>
</template>
</activity-bx-info>
</template>
<template #view>
<activity-bx-info ref="act_info"></activity-bx-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {
unions: [],
units: [],
tabLoading: false,
tableData: [],
formData: {},
subDis: false,
subLoading1: false,
subLoading2: false,
pageForm: {
isAudit: 1,
...getPageForm(),
searchName: "username",
year: new Date().getFullYear() + ""
},
formRules: {
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
},
}
},
components: {
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
},
methods: {
//下拉菜单操作
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'primary') {
this.openReview(data)
}
},
async doReview(flag) {
this.$refs["form"].validate(async (valid) => {
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(location.href + "/doReview", this.formData)
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
})
}
})
},
async openReview(row) {
const {id} = row
this.$set(row, "reviewLoading", true)
this.formData = {
id,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
sign: '',
}
this.$set(row, "reviewLoading", false)
this.$refs.act_info2.getActInfo(id)
this.$refs.guava.edit()
},
openView(row) {
const {id} = row
this.$refs.act_info.getActInfo(id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
...pageSomeThing
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,836 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--经费报销预约审核-->
<style>
.picClass .el-dialog {
background-color: transparent;
}
.picClass .el-dialog__headerbtn {
font-size: 70px;
font-weight: bold;
}
.picClass .el-dialog__body {
padding: 0;
}
.picClass .el-dialog__header {
padding: 0;
}
.picClass .el-dialog__headerbtn .el-dialog__close {
color: white;
}
.el-form-item__label {
font-weight: bold;
}
#diwzstyle .el-form-item__content {
width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.el-upload__tip {
margin-top: 0px;
color: #c33714;
}
input[type=file] {
display: none;
}
.note {
width: 100%;
height: 250px;
}
.look .el-dialog__body {
padding: 5px 15px;
}
.file-down-span:hover {
opacity: 0.9;
}
.el-icon-circle-close {
color: white;
}
.el-icon-download {
color: white;
}
.file-down-span {
background: black;
opacity: 0.5;
z-index: 1000;
width: 100px;
text-align: center;
/*position: absolute;*/
position: relative;
bottom: -100px;
cursor: pointer;
}
.myBtn{
float: right;
margin-top: 20px;
}
</style>
<link href="${base!}/assets/platform/plugins/umeditor/themes/default/css/umeditor.min.css" type="text/css"
rel="stylesheet">
<script src="${base!}/assets/platform/plugins/umeditor/umeditor.config.js"></script>
<script src="${base!}/assets/platform/plugins/umeditor/umeditor.js"></script>
<div id="app" v-cloak>
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-input placeholder="请输入内容" clearable="true" v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询" style="width: 120px;">
<el-option label="职工号" value="bu.loginname"></el-option>
<el-option label="报销人" value="bu.username"></el-option>
<el-option label="报销事项" value="rei_matter"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button mt5">
<el-date-picker
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="pageForm.startTime"
type="date"
placeholder="报销日期选择">
</el-date-picker>
<el-date-picker
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="pageForm.endTime"
type="date"
placeholder="报销日期选择">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-button slot="append" icon="el-icon-search" type="primary" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button size="medium" @click="find(1)">待审核</el-button>
<el-button size="medium" @click="find(2)">已审核</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" size="small">
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="职工号" prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人单位"
prop="unit"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人电话"
prop="booking_person_phone"></el-table-column>
<el-table-column align="center" header-align="center" label="报销事项" :show-overflow-tooltip="true"
prop="rei_matter" min-width="60px;"></el-table-column>
<el-table-column align="center" header-align="center" label="报销金额" prop="rei_money"></el-table-column>
<el-table-column align="center" header-align="center" label="报销时间" prop="booking_time"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column align="center" header-align="center" label="活动类型" prop="activity_type"></el-table-column>
<el-table-column sortable align="center" header-align="center" label="报销状态" prop="audit_status">
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.audit_status == 1">待主席审核</el-tag>
<el-tag type="danger" v-if="scope.row.audit_status == 2">待财务审核</el-tag>
<el-tag type="success" v-if="scope.row.audit_status == 3">报销成功</el-tag>
<el-tag type="info" v-if="scope.row.audit_status == 4">主席审核不通过</el-tag>
<el-tag type="info" v-if="scope.row.audit_status == 5">财务审核不通过</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="200px">
<template slot-scope="scope">
<el-button size="mini" @click="viewInfo(scope.row)" plain>查看</el-button>
<el-button
v-if="(scope.row.audit_status ==2 && identity==2)||(scope.row.audit_status ==2 && identity==3)"
type="primary" size="mini" @click="shyyInfo(scope.row)" plain>财务审核
</el-button>
<el-button
v-if="(scope.row.audit_status ==1 && identity==1)||(scope.row.audit_status ==1 && identity==3)"
type="primary" size="mini" @click="shyyInfo(scope.row)" plain>主席审核
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pageForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
<!--查看提案详情-->
<el-dialog title="经费报销详情"
:visible.sync="findViewDialog"
custom-class="ViewDialogClass"
:close-on-click-modal="false"
width="60%">
<el-tabs tab-position="top" v-model="activeNames">
<el-tab-pane label="报销基本信息" name="1">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人</td>
<td class="content">{{user.username}}</td>
<td class="title">报销人电话</td>
<td class="content">{{viewFromData.booking_person_phone}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人单位</td>
<td class="content">{{viewFromData.unit}}</td>
<td class="title">报销时间</td>
<td class="content">{{viewFromData.booking_time}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销金额</td>
<td class="content">{{viewFromData.rei_money}}</td>
<td class="title">报销卡号</td>
<td class="content">{{viewFromData.rei_card_number}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销事项</td>
<td class="content" colspan="3">{{viewFromData.rei_matter}}</td>
</tr>
<tr>
<td class="title" colspan="4">报销详细说明</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="content" colspan="4" v-if="(typeof(viewFromData.rei_explain)==='undefined')">
暂无报销详细说明
</td>
<td class="tpc" colspan="4" v-if="!(typeof(viewFromData.rei_explain)==='undefined')">
<div v-html="viewFromData.rei_explain"></div>
</td>
</tr>
<template>
<tr>
<td class="title" colspan="4">附件</td>
</tr>
<tr>
<td class="content" colspan="4" style="text-align: left">
<div style="text-align: left;">
<div v-for="item in yyfj"
style="display: inline-block;width: 100px;margin-right:10px">
<div class="file-down-span"
@click="dd3s.download(item.filepath,item.filename)">
<i class="el-icon-download"></i>
</div>
<el-image fit="cover" v-if="dd3s.isPic(item.filepath)"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
:src="'${AppFileDomain!}'+item.filepath"
@click="dd3s.showpic(item.filepath)">
</el-image>
<el-image v-else
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
src="***">
<div slot="error" class="image-slot"
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical">{{item.filename}}</span>
</div>
</el-image>
</div>
</div>
</td>
</tr>
</template>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="主席审核情况" name="2">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.chname}}<br>
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.chairman_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.chairman_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无主席审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="财务办审核情况" name="3">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.finame}}
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.finance_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.finance_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无财务审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!--查看提案详情 审核-->
<el-dialog title="经费报销审核"
:visible.sync="shViewDialog"
custom-class="ViewDialogClass"
:close-on-click-modal="false"
width="60%">
<el-tabs tab-position="top" v-model="activeNames">
<el-tab-pane label="报销基本信息" name="1">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人</td>
<td class="content">{{user.username}}</td>
<td class="title">报销人电话</td>
<td class="content">{{viewFromData.booking_person_phone}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人单位</td>
<td class="content">{{viewFromData.unit}}</td>
<td class="title">报销时间</td>
<td class="content">{{viewFromData.booking_time}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销金额</td>
<td class="content">{{viewFromData.rei_money}}</td>
<td class="title">报销卡号</td>
<td class="content">{{viewFromData.rei_card_number}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销事项</td>
<td class="content" colspan="3">{{viewFromData.rei_matter}}</td>
</tr>
<tr>
<td class="title" colspan="4">报销详细说明</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="content" colspan="4" v-if="(typeof(viewFromData.rei_explain)==='undefined')">
暂无报销详细说明
</td>
<td class="tpc" colspan="4" v-if="!(typeof(viewFromData.rei_explain)==='undefined')">
<div v-html="viewFromData.rei_explain"></div>
</td>
</tr>
<template>
<tr>
<td class="title" colspan="4">附件</td>
</tr>
<tr>
<td class="content" colspan="4" style="text-align: left">
<div style="text-align: left;">
<div v-for="item in yyfj"
style="display: inline-block;width: 100px;margin-right:10px">
<div class="file-down-span"
@click="dd3s.download(item.filepath,item.filename)">
<i class="el-icon-download"></i>
</div>
<el-image fit="cover" v-if="dd3s.isPic(item.filepath)"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
:src="'${AppFileDomain!}'+item.filepath"
@click="dd3s.showpic(item.filepath)">
</el-image>
<el-image v-else
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
src="***">
<div slot="error" class="image-slot"
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical">{{item.filename}}</span>
</div>
</el-image>
</div>
</div>
</td>
</tr>
</template>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="财务办审核" name="2" v-if="identity==2">
<el-card>
<div>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="content" colspan="3">审核意见</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="title">
{{user.username}}<br>
</td>
<td class="content" colspan="3">
<el-input
style="width: 100%;"
:autosize="{ minRows: 5, maxRows: 5}"
v-model="editFormData.finance_opinion"
resize="none"
type="textarea"
placeholder="请输入财务办审核意见"
>
</el-input>
</td>
</tr>
</table>
</div>
<span class="dialog-footer myBtn">
<el-button type="danger" @click="submitSh(2,viewFromData.id)">不通过</el-button>
<el-button type="success" @click="submitSh(1,viewFromData.id)">通过</el-button>
</span>
</el-card>
</el-tab-pane>
<el-tab-pane label="财务办审核情况" name="3" v-if="identity==1">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.finame}}
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.finance_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.finance_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无财务审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="主席审核情况" name="4" v-if="identity==2">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.chname}}<br>
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.chairman_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.chairman_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无主席审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="主席审核" name="5" v-if="identity==1||identity==3">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{user.username}}<br>
</td>
<td class="content" colspan="3">
<el-input
style="width: 100%;"
:autosize="{ minRows: 5, maxRows: 5}"
v-model="editFormData.chairman_opinion"
resize="none"
type="textarea"
placeholder="请输入主席审核意见"
>
</el-input>
</td>
</tr>
</table>
</el-card>
<span class="dialog-footer myBtn">
<el-button type="danger" @click="submitSh(2,viewFromData.id)">不通过</el-button>
<el-button type="success" @click="submitSh(1,viewFromData.id)">通过</el-button>
</span>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!--查看文件模态框-->
<el-dialog title="预览附件"
:visible.sync="ViewFileDialog"
custom-class="ViewDialogClass"
width="50%" top="5%">
<div>
<a id="viewerPlaceHolder" style="width: 100%;height: 650px;display: block;"></a>
</div>
</el-dialog>
<!--图片模态框-->
<el-dialog :visible.sync="showPicDialog" width="35%" fullscreen="true" class="picClass" top="3%">
<img :src="showPic"
style="max-width: 800px;min-width: 400px;max-height:750px;min-height: 400px;display: block;margin: 3% auto"/>
</el-dialog>
</div>
<script>
new Vue({
el: "#app",
data: function () {
return {
cdkd: "240px",
flag: "",
id: "",
fileList: [],
user: [],
identity: "",
fileListLength: "", //记录upload里的文件数量 如果等于空 就不调用upload的submit方法 哈哈哈
shViewDialog: false, //审核预约模态框
editDialog: false,
findViewDialog: false,//查看详细模态框
editFormData: {
id: "",
finance_opinion: "",
chairman_opinion: "",
},
<!--table-->
tableData: [], //表格数据
pageForm: {
pageNumber: "1",
pageSize: "10",
totalCount: "",
searchKeyword: "",
searchName: "",
startTime: "",
endTime: "",
saerchsfsh: ""
},
ViewDialog: false,
ViewFileDialog: false,
activeNames: "1",
ViewData: {},
Fjurl: "",
viewFromData: [],
yyfj: [],
audit_status: "",
<!--修改提案-->
FileListLengthAAA: 0, //已上传的文件数量 默认 000000000
FileListAAAUid: [], //已上传文件的uid 记录一下 提交的时候做判断
DelFileUid: "", //待删除的文件id
FileListBBBuid: [], //当前upload控件里的文件uid
FileListByZxy: 0, //用户添加的文件个数
showPicDialog: false,
showPic: "",
picType: "bmp,jpg,jpeg,png,gif",
}
},
methods: {
//加载个人预约数据
pageData () {
let self = this;
sublime.showLoadingbar($(".main-content"));
$.post(base + "/platform/jf/jfbx/bxsh/data", self.pageForm, function (data) {
if (data.code == 0) {
self.tableData = data.data.bxShList.list;
self.pageForm.totalCount = data.data.bxShList.totalCount;
self.user = data.data.user;
self.identity = data.data.identity;
} else {
self.$message({
message: data.msg,
type: "error"
});
}
}, "json");
sublime.closeLoadingbar($(".main-content"));
},
doSearch () {
this.pageForm.pageNumber = 1;
this.pageForm.saerchsfsh = "";
this.pageData();
},
find (sfsh) {
let self = this;
self.pageForm.pageNumber = 1;
self.pageForm.saerchsfsh = sfsh;
self.pageData();
},
pageSizeChange (val) {
this.pageForm.pageSize = val;
this.pageData();
},
pageNumberChange (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
/**
* 查看信息
* @param scope
*/
viewInfo: function (scope) {
let self = this;
self.viewFromData = scope;
self.yyfj = [];
//附件信息
$.post(base + "/platform/jf/jfbx/bxyy/viewFjInfoById", {booking_id: scope.id}, function (data) {
if (data.code == 0) {
self.yyfj = data.data;
} else {
self.$message.error("附件信息获取失败!");
}
}, "json");
this.activeNames = "1"
this.findViewDialog = true;
},
/**
* 审核信息
* @param scope
*/
shyyInfo (scope) {
let self = this;
self.viewFromData = scope;
this.audit_status = scope.audit_status
self.yyfj = [];
$.post(base + "/platform/jf/jfbx/bxyy/viewFjInfoById", {booking_id: scope.id}, function (data) {
if (data.code == 0) {
self.yyfj = data.data;
} else {
self.$message.error("附件信息获取失败!");
}
}, "json");
if (self.identity == 1||self.identity == 3) {
this.activeNames = "5";
} else if (self.identity == 2) {
this.activeNames = "2";
}
this.shViewDialog = true;
},
//提交审核
submitSh: function (zt, id) {
//主席审核
if (this.identity == 1) {
this.zxSh(zt, id)
}
//财务审核
if (this.identity == 2) {
this.cwSh(zt, id)
}
//超管审核
if (this.identity == 3) {
if (this.audit_status == 1) {
this.zxSh(zt, id)
} else if (this.audit_status == 2) {
this.cwSh(zt, id)
}
}
},
cwSh(zt, id) {
let audit_status = 0;
//不通过
if (zt == 2) {
if (!this.editFormData.finance_opinion) {
this.$message({
message: "审核意见不能为空!",
type: 'error'
});
return
}
audit_status = 5;
//通过
} else if (zt == 1) {
if (!this.editFormData.finance_opinion) {
this.editFormData.finance_opinion = "审核通过"
}
audit_status = 3;
}
$.post(base + "/platform/jf/jfbx/bxsh/bxSh", {
audit_status: audit_status,
opinion: this.editFormData.finance_opinion,
id: id,
identity: 2
}, (data) => {
if (data.code == 0) {
this.$message({
message: data.msg,
type: 'success'
});
this.pageData();
this.shViewDialog = false;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
});
},
zxSh(zt, id) {
let audit_status = 0;
if (zt == 2) { //不通过
if (!this.editFormData.chairman_opinion) {
this.$message({
message: "审核意见不能为空!",
type: 'error'
});
return
}
audit_status = 4;
} else if (zt == 1) { //通过
if (!this.editFormData.chairman_opinion) {
this.editFormData.chairman_opinion = "审核通过"
}
audit_status = 2;
}
$.post(base + "/platform/jf/jfbx/bxsh/bxSh", {
audit_status: audit_status,
opinion: this.editFormData.chairman_opinion,
id: id,
identity: 1
}, (data) => {
if (data.code == 0) {
this.$message({
message: data.msg,
type: 'success'
});
this.pageData();
this.shViewDialog = false;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
});
},
//预览附件(包括图片)
viewFileShow: function (scope) {
let hzm = scope.filepath.substring(scope.filepath.lastIndexOf(".") + 1).toLowerCase()
if (hzm === 'jpg' || hzm === 'png') {
dd3s.showpic(scope.filepath)
} else {
dd3s.preview(scope.filepath, scope.id)
}
},
download: function (scope) {
let self = this;
if (scope.filepath != null) {
dd3s.download(scope.filepath, scope.filename)
} else {
self.$message({
message: "暂时没有可下载的文件!",
type: 'warning'
});
}
},
},
created: function () {
$(".gallery-loader").fadeOut();
this.pageData();
},
});
</script>
<!--#
}
#-->
@@ -0,0 +1,475 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--经费报销预约审核-->
<style>
.picClass .el-dialog {
background-color: transparent;
}
.picClass .el-dialog__headerbtn {
font-size: 70px;
font-weight: bold;
}
.picClass .el-dialog__body {
padding: 0;
}
.picClass .el-dialog__header {
padding: 0;
}
.picClass .el-dialog__headerbtn .el-dialog__close {
color: white;
}
.el-form-item__label {
font-weight: bold;
}
#diwzstyle .el-form-item__content {
width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.el-upload__tip {
margin-top: 0px;
color: #c33714;
}
input[type=file] {
display: none;
}
.note {
width: 100%;
height: 250px;
}
.look .el-dialog__body {
padding: 5px 15px;
}
.file-down-span:hover {
opacity: 0.9;
}
.el-icon-circle-close {
color: white;
}
.el-icon-download {
color: white;
}
.file-down-span {
background: black;
opacity: 0.5;
z-index: 1000;
width: 100px;
text-align: center;
/*position: absolute;*/
position: relative;
bottom: -100px;
cursor: pointer;
}
</style>
<link href="${base!}/assets/platform/plugins/umeditor/themes/default/css/umeditor.min.css" type="text/css"
rel="stylesheet">
<script src="${base!}/assets/platform/plugins/umeditor/umeditor.config.js"></script>
<script src="${base!}/assets/platform/plugins/umeditor/umeditor.js"></script>
<div id="app" v-cloak>
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-input placeholder="请输入内容" clearable="true" v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询" style="width: 120px;">
<el-option label="职工号" value="bu.loginname"></el-option>
<el-option label="报销人" value="bu.username"></el-option>
<el-option label="报销事项" value="rei_matter"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button mt5">
<el-date-picker
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="pageForm.startTime"
type="date"
placeholder="报销日期选择">
</el-date-picker>
<el-date-picker
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="pageForm.endTime"
type="date"
placeholder="报销日期选择">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-button slot="append" icon="el-icon-search" type="primary" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button size="medium" icon="el-icon-download" @click="exportyy" >导出报销名单</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" size="small">
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="职工号" prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人单位"
prop="unit"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人电话"
prop="booking_person_phone"></el-table-column>
<el-table-column align="center" header-align="center" label="报销事项" :show-overflow-tooltip="true"
prop="rei_matter" min-width="60px;"></el-table-column>
<el-table-column align="center" header-align="center" label="报销金额" prop="rei_money"></el-table-column>
<el-table-column align="center" header-align="center" label="报销时间" prop="booking_time"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column align="center" header-align="center" label="活动类型" prop="activity_type"></el-table-column>
<el-table-column sortable align="center" header-align="center" label="报销状态" prop="audit_status">
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.audit_status == 1">待主席审核</el-tag>
<el-tag type="danger" v-if="scope.row.audit_status == 2">待财务审核</el-tag>
<el-tag type="success" v-if="scope.row.audit_status == 3">报销成功</el-tag>
<el-tag type="info" v-if="scope.row.audit_status == 4">主席审核不通过</el-tag>
<el-tag type="info" v-if="scope.row.audit_status == 5">财务审核不通过</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="200px">
<template slot-scope="scope">
<el-button size="mini" @click="viewInfo(scope.row)" plain>查看</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pageForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
<!--查看提案详情-->
<el-dialog title="经费报销详情" :visible.sync="findViewDialog" custom-class="ViewDialogClass"
:close-on-click-modal="false" width="60%">
<el-tabs tab-position="top" v-model="activeNames">
<el-tab-pane label="报销基本信息" name="1">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人</td>
<td class="content">{{user.username}}</td>
<td class="title">报销人电话</td>
<td class="content">{{viewFromData.booking_person_phone}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人单位</td>
<td class="content">{{viewFromData.unit}}</td>
<td class="title">报销时间</td>
<td class="content">{{viewFromData.booking_time}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销金额</td>
<td class="content">{{viewFromData.rei_money}}</td>
<td class="title">报销卡号</td>
<td class="content">{{viewFromData.rei_card_number}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销事项</td>
<td class="content" colspan="3">{{viewFromData.rei_matter}}</td>
</tr>
<tr>
<td class="title" colspan="4">报销详细说明</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="content" colspan="4" v-if="(typeof(viewFromData.rei_explain)==='undefined')">
暂无报销详细说明
</td>
<td class="tpc" colspan="4" v-if="!(typeof(viewFromData.rei_explain)==='undefined')">
<div v-html="viewFromData.rei_explain"></div>
</td>
</tr>
<template>
<tr>
<td class="title" colspan="4">附件</td>
</tr>
<tr>
<td class="content" colspan="4" style="text-align: left">
<div style="text-align: left;">
<div v-for="item in yyfj"
style="display: inline-block;width: 100px;margin-right:10px">
<div class="file-down-span"
@click="dd3s.download(item.filepath,item.filename)">
<i class="el-icon-download"></i>
</div>
<el-image fit="cover" v-if="dd3s.isPic(item.filepath)"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
:src="'${AppFileDomain!}'+item.filepath"
@click="dd3s.showpic(item.filepath)">
</el-image>
<el-image v-else
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
src="***">
<div slot="error" class="image-slot"
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical">{{item.filename}}</span>
</div>
</el-image>
</div>
</div>
</td>
</tr>
</template>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="主席审核情况" name="2">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.chname}}<br>
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.chairman_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.chairman_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无主席审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="财务办审核情况" name="3">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.finame}}
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.finance_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.finance_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无财务审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!--查看文件模态框-->
<el-dialog title="预览附件"
:visible.sync="ViewFileDialog"
custom-class="ViewDialogClass"
width="50%" top="5%">
<div>
<a id="viewerPlaceHolder" style="width: 100%;height: 650px;display: block;"></a>
</div>
</el-dialog>
<!--图片模态框-->
<el-dialog :visible.sync="showPicDialog" width="35%" fullscreen="true" class="picClass" top="3%">
<img :src="showPic"
style="max-width: 800px;min-width: 400px;max-height:750px;min-height: 400px;display: block;margin: 3% auto"/>
</el-dialog>
</div>
<script>
new Vue({
el: "#app",
data: function () {
return {
cdkd: "240px",
//id: "",
fileList: [],
user: [],
shViewDialog: false, //审核预约模态框
findViewDialog: false,//查看详细模态框
<!--table-->
tableData: [], //表格数据
pageForm: {
pageNumber: "1",
pageSize: "10",
totalCount: "",
searchKeyword: "",
searchName: "",
startTime: "",
endTime: "",
},
ViewDialog: false,
ViewFileDialog: false,
activeNames: "1",
Fjurl: "",
viewFromData: [],
yyfj: [],
showPicDialog: false,
showPic: "",
}
},
methods: {
//加载个人预约数据
pageData () {
let self = this;
$.post(base + "/platform/jf/jfbx/bxyl/data", self.pageForm, function (data) {
if (data.code == 0) {
self.tableData = data.data.bxylList.list;
self.pageForm.totalCount = data.data.bxylList.totalCount;
self.user = data.data.user;
} else {
self.$message({
message: data.msg,
type: "error"
});
}
}, "json");
},
doSearch () {
this.pageForm.pageNumber = 1;
this.pageForm.saerchsfsh = "";
this.pageData();
},
find (sfsh) {
let self = this;
self.pageForm.pageNumber = 1;
self.pageForm.saerchsfsh = sfsh;
self.pageData();
},
pageSizeChange (val) {
this.pageForm.pageSize = val;
this.pageData();
},
pageNumberChange (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
/**
* 查看信息
* @param scope
*/
viewInfo (scope) {
let self = this;
self.viewFromData = scope;
self.yyfj = [];
//附件信息
$.post(base + "/platform/jf/jfbx/bxyy/viewFjInfoById", {booking_id: scope.id}, function (data) {
if (data.code == 0) {
self.yyfj = data.data;
} else {
self.$message.error("附件信息获取失败!");
}
}, "json");
this.activeNames = "1";
this.findViewDialog = true;
},
//预览附件(包括图片)
viewFileShow (scope) {
let hzm = scope.filepath.substring(scope.filepath.lastIndexOf(".") + 1).toLowerCase()
if (hzm === 'jpg' || hzm === 'png') {
dd3s.showpic(scope.filepath)
} else {
dd3s.preview(scope.filepath, scope.id)
}
},
download (scope) {
let self = this;
if (scope.filepath != null) {
dd3s.download(scope.filepath, scope.filename)
} else {
self.$message({
message: "暂时没有可下载的文件!",
type: 'warning'
});
}
},
exportyy () {
let self = this;
let loading = this.$loading({
lock: true,
text: '稍等片刻,努力导出中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(function () {
loading.close();
window.location.href=base + "/platform/jf/jfbx/bxyl/export?searchKeyword=" + self.pageForm.searchKeyword
+ "&searchName=" + self.pageForm.searchName
+ "&startTime=" + self.pageForm.startTime
+ "&endTime=" + self.pageForm.endTime
;
},1200);
}
},
created () {
$(".gallery-loader").fadeOut();
this.pageData();
},
});
</script>
<!--#
}
#-->
@@ -0,0 +1,780 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--经费报销预约-->
<style>
.picClass .el-dialog {
background-color: transparent;
}
.picClass .el-dialog__headerbtn {
font-size: 70px;
font-weight: bold;
}
.picClass .el-dialog__body {
padding: 0;
}
.picClass .el-dialog__header {
padding: 0;
}
.picClass .el-dialog__headerbtn .el-dialog__close {
color: white;
}
.file-down-span:hover {
opacity: 0.9;
}
.el-icon-circle-close {
color: white;
}
.el-icon-download {
color: white;
}
.file-down-span {
background: black;
opacity: 0.5;
z-index: 1000;
width: 100px;
text-align: center;
/*position: absolute;*/
position: relative;
bottom: -100px;
cursor: pointer;
}
#diwzstyle .el-form-item__content {
width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.el-upload__tip {
margin-top: 0px;
color: #c33714;
}
input[type=file] {
display: none;
}
.note {
width: 100%;
height: 250px;
}
.look .el-dialog__body {
padding: 5px 15px;
}
</style>
<link href="${base!}/assets/platform/plugins/umeditor/themes/default/css/umeditor.min.css" type="text/css"
rel="stylesheet">
<script src="${base!}/assets/platform/plugins/umeditor/umeditor.config.js"></script>
<script src="${base!}/assets/platform/plugins/umeditor/umeditor.js"></script>
<div id="app" v-cloak>
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-input placeholder="请输入内容" clearable="true" v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询" style="width: 120px;">
<el-option label="报销人" value="bu.userName"></el-option>
<el-option label="报销事项" value="rei_matter"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button mt5">
<el-button slot="append" icon="el-icon-search" type="primary" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button size="medium" @click="openAdd"><i class="ti-plus"></i>发起报销申请</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" size="small">
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="报销人" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人单位"
prop="unit"></el-table-column>
<el-table-column align="center" header-align="center" label="报销人电话"
prop="booking_person_phone"></el-table-column>
<el-table-column align="center" header-align="center" label="报销事项" :show-overflow-tooltip="true"
prop="rei_matter" min-width="60px;"></el-table-column>
<el-table-column align="center" header-align="center" label="报销金额" prop="rei_money"></el-table-column>
<el-table-column align="center" header-align="center" label="报销时间" prop="booking_time"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column align="center" header-align="center" label="活动类型" prop="activity_type"></el-table-column>
<el-table-column sortable align="center" header-align="center" label="报销状态" prop="audit_status">
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.audit_status == 1">待主席审核</el-tag>
<el-tag type="danger" v-if="scope.row.audit_status == 2">待财务审核</el-tag>
<el-tag type="success" v-if="scope.row.audit_status == 3">报销成功</el-tag>
<el-tag type="info" v-if="scope.row.audit_status == 4">主席审核不通过</el-tag>
<el-tag type="info" v-if="scope.row.audit_status == 5">财务审核不通过</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" :width="cdkd">
<template slot-scope="scope">
<el-button size="mini" @click="viewInfo(scope.row)" plain>查看</el-button>
<el-button v-if="scope.row.audit_status ==1" type="primary" size="mini"
@click="edityybx(scope.row)" plain>编辑
</el-button>
<el-button v-if="scope.row.audit_status ==1" type="danger" size="mini"
@click="doDelForm(scope.row)" plain>删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pageForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
<!--新增预约-->
<el-dialog id="addtian" title="活动经费报销" :visible.sync="addDialog" top="1%" width="45%"
:close-on-click-modal="false">
<el-form label-width="120px" :model="addFormData" ref="addForm" :rules="addFormRules" size="small">
<el-form-item label="报销人" prop="username">
<el-input style="width: 60%" v-model="user.username" readonly="true"></el-input>
</el-form-item>
<el-form-item label="报销人电话" prop="booking_person_phone">
<el-input style="width: 60%" v-model="addFormData.booking_person_phone"></el-input>
</el-form-item>
<el-form-item label="报销金额" prop="rei_money">
<el-input-number style="width: 60%" type="number" v-model="addFormData.rei_money" :precision="2"
:step="0.1"
:min="0" :max="10000000"></el-input-number>
(元)
</el-form-item>
<el-form-item label="活动类型" prop="activity_type">
<el-select style="width: 90%" v-model="addFormData.activity_type">
<el-option label="校工会活动" value="校工会活动"></el-option>
<el-option label="基层工会活动(费用由基层工会承担)" value="基层工会活动"></el-option>
<el-option label="协会活动" value="协会活动"></el-option>
<el-option label="其它" value="其它"></el-option>
</el-select>
</el-form-item>
<el-form-item label="报销事项" prop="rei_matter">
<el-input style="width: 90%" v-model="addFormData.rei_matter"
placeholder="请输入报销事项,例:登山协会活动器材费用报销"></el-input>
</el-form-item>
<el-form-item prop="rei_explain" label="报销说明">
<el-input style="width: 90%" type="textarea" placeholder="请填写报销详细说明" v-model="addFormData.rei_explain"
maxlength="500" show-word-limit rows="6">
</el-input>
</el-form-item>
<el-form-item label="报销卡号" prop="rei_card_number">
<el-input style="width: 90%" v-model="addFormData.rei_card_number"></el-input>
</el-form-item>
<el-form-item label="附件上传">
<el-upload
name="file"
ref="upload"
:auto-upload="false"
class="upload-demo"
:on-success="handleSuccess"
:on-error="handleError"
accept=".jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx"
:on-change="handleChange"
:on-remove="handleRemove"
:data="uploadForm"
limit="5"
:file-list="fileList">
<el-button size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png/doc/docx/xls/xlsx文件,文件数量不超过5个</div>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addDialog = false">取 消</el-button>
<el-button type="primary" @click="doAddForm">确 定</el-button>
</span>
</el-dialog>
<!--编辑预约-->
<el-dialog id="edityybx" title="编辑报销申请" :visible.sync="editDialog" top="1%"
width="45%" :close-on-click-modal="false">
<el-form label-width="120px" :model="editFormData" ref="editForm" :rules="editFormRules" size="small">
<el-form-item label="报销人" prop="username">
<el-input style="width: 60%" v-model="user.username" readonly="true"></el-input>
</el-form-item>
<el-form-item label="报销人电话" prop="booking_person_phone">
<el-input style="width: 60%" v-model="editFormData.booking_person_phone"></el-input>
</el-form-item>
<el-form-item label="报销金额" prop="rei_money">
<el-input-number style="width: 60%" v-model="editFormData.rei_money" :precision="2" :step="0.1"
:min="0" :max="10000000"></el-input-number>
(元)
</el-form-item>
<el-form-item label="活动类型" prop="activity_type">
<el-select style="width: 90%" v-model="editFormData.activity_type">
<el-option label="校工会活动" value="校工会活动"></el-option>
<el-option label="基层工会活动(费用由基层工会承担)" value="基层工会活动"></el-option>
<el-option label="协会活动" value="协会活动"></el-option>
<el-option label="其它" value="其它"></el-option>
</el-select>
</el-form-item>
<el-form-item label="报销事项" prop="rei_matter">
<el-input style="width: 90%" v-model="editFormData.rei_matter"
placeholder="请输入报销事项,例:登山协会活动器材费用报销"></el-input>
</el-form-item>
<el-form-item prop="rei_explain" label="报销说明">
<el-input
style="width: 90%"
type="textarea"
placeholder="请填写报销详细说明"
v-model="editFormData.rei_explain"
maxlength="500"
show-word-limit
rows="6"
>
</el-input>
</el-form-item>
<el-form-item label="报销卡号" prop="rei_card_number">
<el-input style="width: 90%" v-model="editFormData.rei_card_number"></el-input>
</el-form-item>
<el-form-item label="附件上传">
<el-upload
name="file"
ref="upload"
:auto-upload="false"
class="upload-demo"
accept=".jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx"
:on-change="handleChange"
:on-remove="handleRemove"
:data="uploadForm"
:file-list="fileList">
<el-button size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png/doc/docx/xls/xlsx文件,文件数量不超过5个</div>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialog = false">取 消</el-button>
<el-button type="primary" @click="doEditForm">确 定</el-button>
</span>
</el-dialog>
<!--查看提案详情-->
<el-dialog title="经费报销详情"
:visible.sync="findViewDialog"
custom-class="ViewDialogClass"
:close-on-click-modal="false" width="60%">
<el-tabs tab-position="top" v-model="activeNames">
<el-tab-pane label="报销基本信息" name="1">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人</td>
<td class="content">{{user.username}}</td>
<td class="title">报销人电话</td>
<td class="content">{{viewFromData.booking_person_phone}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销人单位</td>
<td class="content">{{viewFromData.unit}}</td>
<td class="title">报销时间</td>
<td class="content">{{viewFromData.booking_time}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销金额</td>
<td class="content">{{viewFromData.rei_money}}</td>
<td class="title">报销卡号</td>
<td class="content">{{viewFromData.rei_card_number}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">报销事项</td>
<td class="content" colspan="3">{{viewFromData.rei_matter}}</td>
</tr>
<tr>
<td class="title" colspan="4">报销详细说明</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="content" colspan="4" v-if="(typeof(viewFromData.rei_explain)==='undefined')">
暂无报销详细说明
</td>
<td class="tpc" colspan="4" v-if="!(typeof(viewFromData.rei_explain)==='undefined')">
<div v-html="viewFromData.rei_explain"></div>
</td>
</tr>
<template>
<tr>
<td class="title" colspan="4">附件</td>
</tr>
<tr>
<td class="content" colspan="4" style="text-align: left">
<div style="text-align: left;">
<div v-for="item in yyfj"
style="display: inline-block;width: 100px;margin-right:10px">
<div class="file-down-span"
@click="dd3s.download(item.filepath,item.filename)">
<i class="el-icon-download"></i>
</div>
<el-image fit="cover" v-if="dd3s.isPic(item.filepath)"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
:src="'${AppFileDomain!}'+item.filepath"
@click="dd3s.showpic(item.filepath)">
</el-image>
<el-image v-else
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
src="***">
<div slot="error" class="image-slot"
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical">{{item.filename}}</span>
</div>
</el-image>
</div>
</div>
</td>
</tr>
</template>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="主席审核情况" name="2">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.chname}}<br>
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.chairman_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.chairman_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.chairman_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无主席审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
<el-tab-pane label="财务办审核情况" name="3">
<el-card>
<table style="width: 100%" class="tabInfo">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="title">审核人</td>
<td class="title" colspan="3">审核意见</td>
</tr>
<tr v-if="viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 120px">
<td class="content">
{{viewFromData.finame}}
</td>
<td class="content" colspan="3">
<div class="textarea" style="text-align: left">
{{viewFromData.finance_opinion}}
</div>
<div style="text-align: right;width: 100%;">
<span>审核时间:{{viewFromData.finance_time}}</span>
</div>
</td>
</tr>
<tr v-if="!viewFromData.finance_id"
style="border: 1px solid rgb(220,220,220);height: 30px">
<td class="content" colspan="4">暂无财务审核数据</td>
</tr>
</table>
</el-card>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!--查看文件模态框-->
<el-dialog title="预览附件"
:visible.sync="ViewFileDialog"
custom-class="ViewDialogClass"
width="50%" top="5%">
<div>
<a id="viewerPlaceHolder" style="width: 100%;height: 650px;display: block;"></a>
</div>
</el-dialog>
<!--图片模态框-->
<el-dialog :visible.sync="showPicDialog" width="35%" fullscreen="true" class="picClass" top="3%">
<img :src="showPic"
style="max-width: 800px;min-width: 400px;max-height:750px;min-height: 400px;display: block;margin: 3% auto"/>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: "#app",
data: function () {
return {
cdkd: "240px",
flag: "",
id: "",
fileList: [],
user: [],
fileListLength: "", //记录upload里的文件数量 如果等于空 就不调用upload的submit方法 哈哈哈
addDialog: false, //新建预约模态框
editDialog: false,
findViewDialog: false,//查看详细模态框
addFormData: {},
editFormData: {},
//修改表单验证
editFormRules: {
rei_matter: [{required: true, message: "必填", trigger: ['blur', 'change']}],
rei_money: [{required: true, message: "必填", trigger: ['blur', 'change']}],
rei_explain: [{required: true, message: "必填", trigger: ['blur', 'change']}],
},
addFormRules: {
rei_money:[{required:true,message:'必填',trigger:['blur','change']}],
activity_type:[{required:true,message:'必填',trigger:['blur','change']}],
rei_matter:[{required:true,message:'必填',trigger:['blur','change']}],
rei_explain:[{required:true,message:'必填',trigger:['blur','change']}],
rei_card_number:[{required:true,message:'必填',trigger:['blur','change']}],
},
uploadForm: {
id: "" //先提交form表单后台返回此记录的ID 得到ID在上传图片
},
<!--table-->
tableData: [], //表格数据
pageForm: {
pageNumber: "1",
pageSize: "10",
searchKeyword: "",
searchName: "",
totalCount: "",
},
<!--查看详细信息-->
ViewDialog: false,
ViewFileDialog: false,
activeNames: "1",
ViewData: {},
Fjurl: "",
viewFromData: [],
yyfj: [],
<!--修改提案-->
FileListLengthAAA: 0, //已上传的文件数量 默认 000000000cnm
FileListAAAUid: [], //已上传文件的uid 记录一下 提交的时候做判断
DelFileUid: "", //待删除的文件id
FileListBBBuid: [], //当前upload控件里的文件uid
FileListByZxy: 0, //用户添加的文件个数
showPicDialog: false,
showPic: "",
picType: "bmp,jpg,jpeg,png,gif",
delFiles: [],
}
},
methods: {
//加载个人预约数据
pageData () {
$.post(base + "/platform/jf/jfbx/bxyy/data", this.pageForm).then(res => {
if (res.code == 0) {
this.pageForm.totalCount = res.data.list.totalCount
this.tableData = res.data.list.list;
this.user = res.data.user;
}
})
},
doSearch () {
this.pageForm.pageNumber = 1;
this.pageData();
},
pageSizeChange (val) {
this.pageForm.pageSize = val;
this.pageData();
},
pageNumberChange (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
openAdd () {
let self = this;
this.fileList = [];
this.addFormData = {
booking_person_phone: self.user.mobile
};
self.addDialog = true;
},
doAddForm () {
let self = this;
self.$refs["addForm"].validate(function (valid) {
if (valid) {
var formdata = new FormData();
for (let key in self.addFormData) {
formdata.append(key, self.addFormData[key] ? self.addFormData[key] : '');
}
self.fileList.forEach(function (val) {
formdata.append("files", val.raw, val.raw.name);
});
const loading = self.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.ajax({
url: "/platform/jf/jfbx/bxyy/add",
type: "post",
data: formdata,
processData: false,
contentType: false,
success: (data) => {
loading.close()
if (data.code === 0) {
self.addDialog = false;
self.$message.success("已提交报销申请!");
self.pageData();
} else {
self.$message.error("提交报销申请失败!");
}
},
error: data => {
loading.close()
self.$message.error("提交报销申请失败!");
}
});
}
});
},
doEditForm () {
let self = this;
self.$refs["editForm"].validate(function (valid) {
if (valid) {
var formdata = new FormData();
for (let key in self.editFormData) {
formdata.append(key, self.editFormData[key] ? self.editFormData[key] : '');
}
self.fileList.forEach(function (val) {
if (val.status === 'ready') {
formdata.append("files", val.raw, val.raw.name);
}
});
formdata.append("delFiles", self.delFiles)
const loading = self.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.ajax({
url: "/platform/jf/jfbx/bxyy/editYyBx",
type: "post",
data: formdata,
processData: false,
contentType: false,
success: (data) => {
loading.close()
if (data.code === 0) {
self.editDialog = false;
self.$message.success("修改报销申请成功!");
self.pageData();
} else {
self.$message.error("修改报销申请失败!");
}
},
error: data => {
loading.close()
self.$message.error("修改报销申请失败!");
}
});
}
});
},
doDelForm (scope) {
let self = this;
self.$confirm('此操作将删除【' + scope.rei_matter + '】的报销信息', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: function (a, b) {
if ("confirm" == a) {//确认后再执行
$.post(base + "/platform/jf/jfbx/bxyy/delYyBx", {id: scope.id}, function (data) {
if (data.code == 0) {
self.$message({
message: data.msg,
type: 'success'
});
self.doSearch();
} else {
self.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
}
}
});
},
edityybx (scope) {
let self = this
self.fileList = []
self.delFiles = []
this.editFormData = scope
$.post(base + "/platform/jf/jfbx/bxyy/ViewFjList", {booking_id: scope.id}, function (data) {
if (data.code == 0) {
if (data.data != null) {
//files
data.data.forEach(v => {
self.fileList.push({id: v.id, name: v.filename, url: v.filepath, status: 'success'})
})
}
self.editDialog = true;
} else {
self.$message.error(data.msg);
}
}, "json");
},
viewInfo (scope) {
let self = this;
self.viewFromData = scope;
self.yyfj = [];
//附件信息
$.post(base + "/platform/jf/jfbx/bxyy/viewFjInfoById", {booking_id: scope.id}, function (data) {
if (data.code == 0) {
self.yyfj = data.data;
} else {
self.$message.error("附件信息获取失败!");
}
}, "json");
this.activeNames = "1";
this.findViewDialog = true;
},
//预览附件(包括图片)
viewFileShow (scope) {
let hzm = scope.filepath.substring(scope.filepath.lastIndexOf(".") + 1).toLowerCase()
if (hzm === 'jpg' || hzm === 'png') {
dd3s.showpic(scope.filepath)
} else {
dd3s.preview(scope.filepath, scope.id)
}
},
download (scope) {
let self = this;
if (scope.filepath != null) {
dd3s.download(scope.filepath, scope.filename)
} else {
self.$message({
message: "暂时没有可下载的文件!",
type: 'warning'
});
}
},
handleSuccess (response, file, fileList) {
this.$refs.upload.clearFiles();
this.addDialog = false;
this.pageData();
this.$message({
message: response.msg,
type: "success"
});
},
handleError (err, file, fileList) {
this.$message({
message: err.msg,
type: "error"
});
},
handleChange (file, filelist) {
let self = this;
let testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
let a = testmsg === 'jpg';
let b = testmsg === 'png';
let c = testmsg === 'doc';
let d = testmsg === 'docx';
let e = testmsg === 'xls';
let f = testmsg === 'xlsx';
if (!a && !b && !c && !d && !e && !f) {
this.$message.error('您选择的文件格式不正确!请重新选择!');
}
self.fileList = filelist;
this.fileListLength = filelist.length;
this.FileListBBBuid.push("" + file.uid + "");
},
handleRemove (file, filelist) {
let self = this;
self.fileList = filelist;
if (file.status == "success") {
self.delFiles.push(file.id)
}
},
},
created () {
$(".gallery-loader").fadeOut();
this.pageData();
},
});
</script>
<!--#
}
#-->
@@ -0,0 +1,547 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>
<div id="app" v-cloak>
<el-row class="transition-row">
<transition name="el-zoom-in-center">
<div v-show="!showYsTz" class="transition-item">
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-date-picker
@change="doSearch"
style="width: 100%"
v-model="pageForm.year"
type="year"
value-format="yyyy"
format="yyyy年"
placeholder="选择年度">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button slot="append" icon="el-icon-download" @click="exportExcel">
导出
</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" v-loading="tab_loading">
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="年度" show-overflow-tooltip header-align="center" align="center">
<template slot-scope="scope">
<span>{{scope.row.year}}</span>
</template>
</el-table-column>
<el-table-column label="协会名称" prop="name" show-overflow-tooltip header-align="center"
align="center">
<template slot-scope="scope">
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column label="分配总额度" sortable="custom" prop="total_quota" show-overflow-tooltip
header-align="center"
align="center"
align="center">
<template slot-scope="scope">
<span v-if="!scope.row.total_quota">暂未分配</span>
<span v-else><i>{{scope.row.total_quota}}</i></span>
</template>
</el-table-column>
<el-table-column label="已使用额度" sortable="custom" prop="used_quota" show-overflow-tooltip
align="center"
header-align="center" align="center">
<template slot-scope="scope">
<span v-if="!scope.row.used_quota">暂未使用</span>
<span v-else><i>{{scope.row.used_quota}}</i></span>
</template>
</el-table-column>
<el-table-column label="剩余额度" sortable="custom" prop="used_quota" show-overflow-tooltip
align="center"
header-align="center" align="center">
<template slot-scope="scope">
<span v-if="!scope.row.used_quota">{{scope.row.total_quota}}元</span>
<span v-else><i>{{scope.row.total_quota-parseIntNum(scope.row.used_quota)}}</i></span>
</template>
</el-table-column>
<el-table-column label="操作" header-align="center" width="180px" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="use(scope.row)" type="primary" plain>使用详情</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
layout="total, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
</div>
</transition>
<transition name="el-zoom-in-center">
<div v-show="showYsTz" class="transition-item">
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5 mr10">
<el-button icon="el-icon-back" type="text" @click="pre">返回</el-button>
</div>
<div class="btn-group tool-button mt5">
<el-date-picker
@change="doUseSearch"
style="width: 100%"
v-model="usePageForm.year"
type="year"
value-format="yyyy"
format="yyyy年"
placeholder="选择年度">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="doUseSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button slot="append" @click="openView">
<i class="ti-plus"></i>新增使用记录
</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="useTableData" @sort-change="pageOrder" v-loading="tab_loading">
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope"><span>{{scope.$index+(usePageForm.pageNumber - 1) * usePageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="年度" prop="year" header-align="center" align="center">
<template scope="scope"><span>{{clubInfo.year}} </span></template>
</el-table-column>
<el-table-column label="活动名称" prop="project" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属社团" prop="name" header-align="center" align="center">
<template scope="scope"><span>{{clubInfo.name}} </span></template>
</el-table-column>
<el-table-column label="活动时间" prop="activitie_time" header-align="center"
align="center"></el-table-column>
<el-table-column label="活动人数" prop="activitie_number" header-align="center"
align="center"></el-table-column>
<el-table-column label="活动费用" prop="adjust_money" header-align="center"
align="center"></el-table-column>
<el-table-column label="调整人" prop="username" header-align="center"
align="center"></el-table-column>
<el-table-column label="事由" prop="adjust_reason" header-align="center" show-overflow-tooltip
align="center"></el-table-column>
<!-- <el-table-column label="操作" header-align="center" width="180px" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button size="mini" type="primary" @click="openEdit(scope.row)">编辑</el-button>-->
<!-- <el-button size="mini" type="danger" @click="delUse(scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
:command="{type:'edit',data:row}">
编辑
</el-dropdown-item>
<el-dropdown-item
:command="{type:'delete',data:row}">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@current-change="usePageNumberChange"
:current-page="usePageForm.pageNumber"
layout="total, prev, pager, next, jumper"
:total="usePageForm.totalCount">
</el-pagination>
</el-row>
</div>
</transition>
</el-row>
<!-- 弹出层 -->
<el-dialog :visible.sync="DialogVisible" :title="title">
<el-form :model="useFormData" :rules="rules" label-width="80px" ref="JfForm">
<el-row>
<el-col span="12">
<el-form-item prop="project" label="活动名称">
<el-input type="text" maxlength="200" v-model.trim="useFormData.project"></el-input>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item prop="activitie_time">
<div class="block">
<span class="demonstration">活动时间&nbsp;&nbsp;</span>
<el-date-picker
v-model="useFormData.activitie_time"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</div>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="adjust_money" label="活动费用">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="useFormData.adjust_money"></el-input>
</el-form-item>
<el-form-item prop="activity_number" label="活动人数">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="useFormData.activitie_number"></el-input>
</el-form-item>
<el-form-item prop="adjust_reason" label="事由">
<el-input maxlength="500" type="textarea" v-model.trim="useFormData.adjust_reason"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="DialogVisible = false">取 消</el-button>
<el-button type="primary" @click="addUse">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="editDialogVisible" title="编辑">
<el-form :model="editFormData" :rules="rules" label-width="80px" ref="form">
<el-row>
<el-col span="12">
<el-form-item prop="project" label="活动名称">
<el-input type="text" maxlength="200" v-model.trim="editFormData.project"></el-input>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item prop="activitie_time">
<div class="block">
<span class="demonstration">活动时间&nbsp;&nbsp;</span>
<el-date-picker
v-model="editFormData.activitie_time"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</div>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="adjust_money" label="活动费用">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="editFormData.adjust_money"></el-input>
</el-form-item>
<el-form-item prop="activitie_number" label="活动人数">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="editFormData.activitie_number"></el-input>
</el-form-item>
<el-form-item prop="adjust_reason" label="事由">
<el-input maxlength="500" type="textarea" v-model.trim="editFormData.adjust_reason" rows="4"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="editDo">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
const rules = {
adjust_money: [{required: true, message: '请输入金额', trigger: ['change', 'blur']}],
adjust_reason: [{required: true, message: '请输入调整事由', trigger: ['change', 'blur']}],
project: [{required: true, message: '请输入活动', trigger: ['change', 'blur']}],
}
const vue = new Vue({
el: "#app",
data: function () {
return {
showYsTz: false,
tab_loading: false,
pageForm: {
pageNumber: 1,
pageSize: 10,
pageOrderName: '',
pageOrderBy: '',
totalCount: 0,
year: moment().format("YYYY")
},
usePageForm: {
adjust_id: '',
pageNumber: 1,
pageSize: 10,
pageOrderName: '',
pageOrderBy: '',
totalCount: 0,
year: moment().format("YYYY")
},
tableData: [],
useTableData: [],
formData: {
id: '',
lbfcost: '',
totalquota: '',
unid: '',
unionactivitycost: '',
unionid: '',
unionname: '',
usedquota: '',
year: '',
},
useFormData: {
adjust_id: '',
adjust_money: '',
adjust_reason: '',
},
DialogVisible: false,
title: "新增使用记录",
parseIntNum(val) {
return !val ? 0 : parseInt(val)
},
rules: rules,
editFormData: {},
editDialogVisible: false,
clubInfo: {}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'edit') {
this.openEdit(data)
} else if (type == 'delete') {
this.delUse(data)
} else if (type == 'exportWwj') {
this.exportWwj(data.id)
}
},
openEdit(row) {
this.editFormData = {...row}
this.editDialogVisible = true
},
editDo() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
this.editFormData.isClub = true
const resp = await $.post("/platform/jf/tz/doEdit", this.editFormData)
closeLoadingFunc(loading, resp, async () => {
this.editDialogVisible = false
this.use({id: this.formData.id})
}, (data, msg) => {
this.$message.error(msg);
})
}
});
},
use(scope) {
console.log(scope)
let that = this
this.formData.id = scope.id
this.usePageForm.adjust_id = scope.id
this.clubInfo.year = scope.year
this.clubInfo.name = scope.name
that.showYsTz = true
$.post(base + "/platform/jf/tz/data", this.usePageForm, function (res) {
if (res.code === 0) {
that.useTableData = res.data.list
that.usePageForm.totalCount = res.data.totalCount
}
});
},
pre() {
this.showYsTz = false
this.pageData()
},
openView(u) {
this.DialogVisible = true
this.useFormData = {}
},
addUse() {
let that = this
$.post(base + "/platform/jf/tz/addUse", {
adjust_id: this.formData.id,
adjust_money: this.useFormData.adjust_money,
adjust_reason: this.useFormData.adjust_reason,
project: this.useFormData.project,
isClub: true,
activitie_time: this.useFormData.activitie_time,
activitie_number: this.useFormData.activitie_number,
by_union: this.useFormData.by_union,
}, function (res) {
if (res.code === 0) {
that.use({id: that.formData.id, year: that.clubInfo.year, name: that.clubInfo.name})
that.$message({
message: res.msg,
type: 'success'
});
} else {
that.$message({
message: res.msg,
type: 'error'
});
}
that.DialogVisible = false
});
},
doUseSearch() {
this.usePageForm.pageNumber = 1;
this.use({id: this.formData.id});
},
delUse(scope) {
let that = this
that.$confirm('此操作将删除 ' + scope.adjust_reason, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: function (a, b) {
if ("confirm" == a) {
$.post(base + "/platform/jf/tz/delUse", {id: scope.id, isClub: true}, function (res) {
if (res.code === 0) {
that.$message({
message: '删除成功',
type: 'success'
});
that.use({id: that.formData.id})
}
});
}
}
})
},
pageData: function () {
let that = this
this.tab_loading = true
$.post(base + "/platform/jf/club/tz/data", this.pageForm, function (res) {
if (res.code === 0) {
console.log(res)
that.tableData = res.data.list;
that.pageForm.totalCount = res.data.totalCount;
}
that.tab_loading = false
});
},
doEdit() {
this.$refs["JfForm"].validate(result => {
if (result) {
$.post(base + "/platform/jf/club/tz/modifyJf", {
id: this.formData.id,
usedQuota: this.formData.usedquota,
reason: this.formData.reason,
}).then(res => {
if (res.code == 0) {
vue.$message.success(res.msg);
this.pageData()
this.DialogVisible = false
}
})
}
})
},
doSearch: function () {
this.pageForm.pageNumber = 1;
this.pageData();
},
exportExcel: function () {
window.location.href = base + "/platform/jf/club/tz/exportExcel?year=" + this.pageForm.year;
},
pageNumberChange: function (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
usePageNumberChange: function (val) {
this.usePageForm.pageNumber = val;
this.use({id: this.formData.id})
},
pageOrder(column) {//按字段排序
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
},
async created() {
this.unionOptions = await getUnions();
this.pageData();
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,440 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>
<div id="app" v-cloak>
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-date-picker
@change="doSearch"
style="width: 100%"
v-model="pageForm.year"
type="year"
value-format="yyyy"
format="yyyy年"
placeholder="选择年度">
</el-date-picker>
</div>
<!--按院级工会-->
<div class="btn-group tool-button mt5">
<el-select v-model="pageForm.club_id" filterable placeholder="按协会名称" clearable>
<el-option
v-for="item in unionOptions"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="doSearch"></el-button>
</div>
<!--文件上传按钮-->
<div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button type="primary" icon="el-icon-edit" @click="openExport" plain>导入数据</el-button>
</div>
<div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button type="success" @click="issue" v-if="!this.flag">年度分配</el-button>
<el-button type="danger" @click="reset" v-else>分配重置</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" v-loading="tab_loading">
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="年度" show-overflow-tooltip header-align="center" align="center">
<template slot-scope="scope">
<span>{{scope.row.year}}</span>
</template>
</el-table-column>
<el-table-column label="协会名称" prop="name" show-overflow-tooltip header-align="center"
align="center"></el-table-column>
<el-table-column label="协会人数" align="center" sortable header-align="center" show-overflow-tooltip
prop="history_member"></el-table-column>
<!-- <el-table-column label="人均额度" show-overflow-tooltip header-align="center" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.total_quota>0?+' 元':'暂未分配总额度'}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="标准" show-overflow-tooltip header-align="center" align="center">
<template slot-scope="scope">
<span>{{scope.row.history_club_avg!=null?scope.row.history_club_avg+' 元':'暂未分配平均额度'}}</span>
</template>
</el-table-column>
<el-table-column label="总额度" sortable="custom" prop="total_quota" show-overflow-tooltip align="center"
header-align="center"
align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.edit" maxlength="8" min="0" type="number" style="width: 70%" size="small"
onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model="scope.row.total_quota2" placeholder="填写总额度">
<template slot="append"></template>
</el-input>
<div v-else>
<span v-if="!scope.row.total_quota">暂未分配</span>
<span v-else><i>{{scope.row.total_quota}}</i></span>
</div>
</template>
</el-table-column>
<el-table-column label="操作" header-align="center" width="180px" align="center">
<template slot-scope="scope">
<div v-if="scope.row.edit">
<el-button type="success" icon="el-icon-check" size="mini" @click="doChangeYs(scope.row)"
circle></el-button>
<el-button type="danger" icon="el-icon-close" size="mini" @click="$set(scope.row,'edit',false)"
circle></el-button>
</div>
<el-button v-else size="mini"
@click="$set(scope.row,'edit',true);$set(scope.row,'total_quota2',scope.row.totalquota);"
type="primary" plain>
{{!scope.row.club_id?'分配':'编辑'}}
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
layout="total, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
<!--上传数据文件弹出框-->
<el-dialog
title="导入数据"
:visible.sync="exportVisible" :close-on-click-modal="false"
width="60%">
<el-steps :active="exportActive" finish-status="success" simple>
<el-step title="下载模板"></el-step>
<el-step title="上传文件"></el-step>
<el-step title="导入结果"></el-step>
</el-steps>
<div v-if="exportActive==0"
style="padding: 20px ;display: flex;justify-content: center;align-content: center;align-items: center;;width: 100%">
<div class="el-upload-dragger" @click="downloadTemplate">
<i class="el-icon-download"></i>
<div class="el-upload__text">点击下载模板</div>
</div>
</div>
<div v-if="exportActive==1"
style="padding: 20px ;display: flex;justify-content: center;align-content: center;align-items: center;;width: 100%">
<el-upload
class="upload-demo"
drag
:on-change="tempFileChange"
:file-list="tempFileList" :auto-upload="false" accept=".xls,.xlsx"
:limit="1">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</div>
<div v-if="exportActive==2"
style="padding: 20px ;display: flex;justify-content: center;align-content: center;align-items: center;;width: 100%">
<div class="el-upload-dragger">
<i class="el-icon-success"></i>
<div class="el-upload__text">共检出 <span class="text-info">{{exportData.count}}</span> 条数据,入库成功 <span
class="text-success">{{exportData.success_count}}</span> 条。
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="exportVisible = false">取 消</el-button>
<el-button v-if="exportActive>0" @click="exportActive -= 1">上一步</el-button>
<el-button type="primary" v-if="exportActive==0" @click="exportActive = 1">我已下载</el-button>
<el-button type="primary" v-if="exportActive==1" @click="doExport">导入</el-button>
<el-button type="primary" v-if="exportActive==2"
@click="exportVisible = false;window.location.reload();">完成</el-button>
</span>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: "#app",
data: function () {
return {
textView: "本年下发",
flag: false,
unionOptions: [],
tab_loading: false,
pageForm: {
pageNumber: 1,
pageSize: 10,
pageOrderName: '',
pageOrderBy: '',
totalCount: 0,
year: moment().format("YYYY"),
club_id: ''
},
tableData: [],
//数据文件导入
tempFileList: [],
exportActive: 0,
exportVisible: false,
}
},
methods: {
doExport() {
if (!this.tempFileList.length) {
this.$notify({
title: '警告',
message: '请先选择文件',
type: 'warning'
});
return
}
let formData = new FormData();
const f = this.tempFileList[0]
formData.append("file", f.raw, f.raw.name);
// formData.append("park_id", parkId);
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.ajax({
url: "/platform/jf/club/dataInput/doExport",
type: "post",
data: formData,
processData: false,
contentType: false,
success: (data) => {
loading.close()
if (data.code === 0) {
this.$message({
message: data.msg,
type: 'success'
});
this.exportData = {...data.data}
this.exportActive = 2
window.vue.pageData()
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
},
error: data => {
loading.close()
this.$message({
message: data.msg,
type: 'error'
});
}
});
},
tempFileChange(file, fileList) {
this.tempFileList = fileList
},
// 模板下载
downloadTemplate() {
location.href = '/platform/jf/club/dataInput/downLoadTemp'
},
//数据文件弹出框
openExport() {
this.tempFileList = []
this.exportActive = 0
this.exportVisible = true
},
// 查询当前最大的一年
async lastYear() {
const resp = await $.get("/platform/jf/st/fp/lastYear")
if (resp.data.year != new Date().getFullYear()) {
this.pageForm.year = resp.data.year;
}
},
// 重置下发
async reset() {
// 确认弹出框
this.$confirm('您确定要重置年度费用吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: '正在重置...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = $.get("/platform/jf/st/fp/reset")
// 重新加载页面
window.location.reload();
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
// 判断是否已经下发并改变下发按钮的状态
async isSet() {
const resp = await $.get("/platform/jf/st/fp/isSet")
if (resp.data > 0) {
this.textView = "今年已下发"
this.flag = true
}
},
// 下发
async issue() {
this.$confirm('生成年度费用前,请确认协会已在会员管理系统中调整。', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const loading = this.$loading({
lock: true,
text: '正在下发...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.get("/platform/jf/st/fp/issue")
requestLaterMsgFun(vue, resp, async () => {
// 成功
this.$notify.success({title: '下发成功'});
this.flag = false;
// 重新加载页面
window.location.reload();
}, () => {
// 失败
this.$notify.success({title: '下发失败'});
// 重新加载页面
/* window.location.reload();*/
}, () => {
// 最终
this.pageData()
loading.close()
})
}).catch(() => {
});
// const resp = await $.get("/platform/jf/st/fp/issue")
// requestLaterMsgFun(vue, resp, async () => {
// // 成功
// this.$notify({
// title: '成功',
// message: '下发成功',
// type: 'success'
//
// });
// this.flag=false;
// this.pageData();
// }, () => {
// // 失败
// this.$notify.error({
// title: '错误',
// message: '下发失败'
// });
// },() => {
// // 最终
//
// })
},
doChangeYs(row) {
let self = this;
$.post(base + "/platform/jf/st/fp/changeYs", {
club_id: row.cid,
year: self.pageForm.year,
total_quota: row.total_quota2,
}, function (data) {
if (data.code === 0) {
vue.$message.success("分配成功!");
row.edit = false
self.pageData()
} else {
vue.$message.error(data.msg);
}
});
},
doSearch: function () {
this.pageForm.pageNumber = 1;
this.pageData();
},
pageNumberChange: function (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
pageOrder(column) {//按字段排序
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
// 封装了分页查询等
...pageSomeThing
},
async created() {
this.lastYear();
this.unionOptions = await getClubs();
this.pageData();
await this.isSet();
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,216 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.text {
font-size: 14px;
}
.item {
margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
.box-card {
width: 580px;
}
</style>
<div id="costs" style="min-height: 100%;display: flex;justify-content: center;margin-top: 50px">
<el-card class="box-card" style="height: 50vh;position: relative">
<div slot="header" class="clearfix">
<span>设置年度人均的费用额度</span>
</div>
<div style="padding-bottom: 50px;">
<el-row>
<el-input :placeholder="this.unionInput" v-model="formData.avglocalUnion"
:disabled="unionDisabled"
style="width:400px" clearable>
<template slot="prepend">院级工会</template>
</el-input>
<!-- <el-button type="danger" @click="resetUnionIssues">重置本年下发</el-button>-->
</el-row>
<el-row style="margin-top: 10px">
<el-input :placeholder="this.clubInput" v-model="formData.avgAssociation"
:disabled="clubDisabled"
style="width:400px" clearable>
<template slot="prepend">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</template>
</el-input>
<!-- <el-button type="danger" @click="resetClubIssues">重置本年下发</el-button>-->
</el-row>
<el-button style="position: absolute;right: 20px;bottom: 20px; padding: 3px 0; width: 80px;height: 50px"
type="primary" v-loading="loading" @click="set">&nbsp;&nbsp;&nbsp;
</el-button>
</div>
</el-card>
</div>
<script>
const vue = new Vue({
el: "#costs",
data() {
return {
loading:"",
unionDisabled: false,
unionInput: "",
clubDisabled: false,
clubInput: "",
union: 2,
club: 3,
formData: {},
formRules: {
avglocalUnion: [{required: true, message: '请选择是否启用', trigger: ['blur', 'change']}],
avgAssociation: [{required: true, message: '请选择是否启用', trigger: ['blur', 'change']}],
}
}
},
methods: {
// 回显
async echo() {
const {data:{union_avg,club_avg}} = await $.get("/platform/jf/costsSet/costsSet/echo")
this.$set(this.formData,'avglocalUnion',union_avg)
this.unionInput = union_avg;
this.$set(this.formData,'avgAssociation',club_avg)
this.clubInput = union_avg;
},
// //重置工会年度下发
// async resetUnionIssues() {
// const resp = await $.get("/platform/jf/costsSet/costsSet/resetUnionIssues")
// requestLaterFun(resp, () => {
// this.$notify.success({title: '成功', message: resp.msg});
// window.location.href = '/platform/jf/costsSet/costsSet'
// }, () => {
// this.$notify.error({title: '失败', message: resp.msg});
// })
//
// },
//
//
// // 重置社团年度下发
// async resetClubIssues() {
// const resp = await $.get("/platform/jf/costsSet/costsSet/resetClubIssues")
// },
//
//
// //是否下发了
// async isSet() {
// const resp = await $.get("/platform/jf/costsSet/costsSet/isSet")
// // 工会已下发
// if (resp.data[0] == 200) {
// this.union = 0; // 修改状态用于判断是否发送请求
// this.unionInput = "本年度已下发,不可以设置人均额度" + this.unionAvg + "元" // 修改提示框内容
// this.unionDisabled = true // 输入框禁用
// }
// // 社团已下发
// if (resp.data[1] == 201) {
// this.club = 1;
// this.clubInput = "本年度已下发,不可以设置人均额度" + this.clubAvg + "元"
// this.clubDisabled = true
// }
// },
//
// 设置是否
async set() {
this.loading=true;
const resp = await $.post("/platform/jf/costsSet/costsSet/set", {
avglocalUnion: this.formData.avglocalUnion,
avgAssociation: this.formData.avgAssociation
})
console.log(resp)
if (resp.code == 0) {
this.loading=false;
this.$notify({
title: '成功',
message: '操作成功',
type: 'success'
});
} else {
this.$notify.error({
title: '错误',
message: '操作失败'
});
}
//await this.localUnion();
// await this.association();
// // await this.isSet();
// if (this.formData.avglocalUnion == null) {
// this.$notify({
// title: '警告',
// message: '人均的费用额度不能为空',
// type: 'warning'
// });
// return
// } else if (this.union != 0) {
// await this.localUnion();
// }
// if (this.club != 1) {
// if (this.formData.avgAssociation == null) {
// this.$notify({
// title: '警告',
// message: '人均的费用额度不能为空',
// type: 'warning'
// });
// return
// }
// await this.association();
// }
},
async localUnion() {
const resp = await $.post("/platform/jf/costsSet/costsSet/localUnion", {avglocalUnion: this.formData.avglocalUnion})
requestLaterMsgFun(vue, resp, async () => {
}, () => {
this.$notify.error({
title: '设置失败',
message: '设置所有基层工会会员年度人均费用额度失败'
});
}, () => {
})
},
async association() {
const resp = await $.post("/platform/jf/costsSet/costsSet/association", {avgAssociation: this.formData.avgAssociation})
requestLaterMsgFun(vue, resp, async () => {
}, () => {
this.$notify.error({
title: '设置失败',
message: '设置协会会员年度人均费用额度失败'
});
}, () => {
})
},
},
created() {
this.echo();
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,446 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>
<div id="app" v-cloak>
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-date-picker
@change="doSearch"
style="width: 100%"
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="选择年度">
</el-date-picker>
</div>
<!--按院级工会-->
<div class="btn-group tool-button mt5">
<el-select v-model="pageForm.union_id" filterable placeholder="按院级工会" clearable>
<el-option
v-for="item in unionOptions"
:key="item.id"
:label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="doSearch"></el-button>
</div>
<!--文件上传弹出框-->
<div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button type="primary" icon="el-icon-edit" @click="openExport" plain>导入数据</el-button>
</div>
<div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button type="success" @click="issue" v-if="!this.flag">年度分配</el-button>
<el-button type="danger" @click="reset" v-else>分配重置</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" v-loading="tab_loading">
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="年度" show-overflow-tooltip header-align="center" align="center">
<template slot-scope="scope">
<span>{{scope.row.year}}</span>
</template>
</el-table-column>
<el-table-column label="院级工会名称" prop="unionname" show-overflow-tooltip header-align="center" align="center">
</el-table-column>
<el-table-column label="会员人数" prop="history_member" show-overflow-tooltip header-align="center"
align="center">
</el-table-column>
<el-table-column label="标准" show-overflow-tooltip header-align="center" align="center">
<template slot-scope="scope">
<!-- <span>{{scope.row.totalquota>0?(scope.row.totalquota/scope.row.hyzs).toFixed(2)+' 元':'暂未分配总额度'}}</span>-->
<span>{{scope.row.history_union_avg!=null?scope.row.history_union_avg+' 元':'暂未分配平均额度'}}</span>
</template>
</el-table-column>
<el-table-column label="总额度" sortable="custom" prop="totalquota" show-overflow-tooltip align="center"
header-align="center"
align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.edit" maxlength="8" min="0" type="number" style="width: 70%" size="small"
onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model="scope.row.totalquota2" placeholder="填写总额度">
<template slot="append"></template>
</el-input>
<div v-else>
<span v-if="!scope.row.totalquota">暂未分配</span>
<span v-else><i>{{scope.row.totalquota}}</i></span>
</div>
</template>
</el-table-column>
<el-table-column label="操作" header-align="center" width="180px" align="center">
<template slot-scope="scope">
<div v-if="scope.row.edit">
<el-button type="success" icon="el-icon-check" size="mini" @click="doChangeYs(scope.row)"
circle></el-button>
<el-button type="danger" icon="el-icon-close" size="mini" @click="$set(scope.row,'edit',false)"
circle></el-button>
</div>
<el-button v-else size="mini"
@click="$set(scope.row,'edit',true);$set(scope.row,'totalquota2',scope.row.totalquota);"
type="primary" plain>
{{!scope.row.unid?'分配':'编辑'}}
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
layout="total, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
<!--上传数据文件弹出框-->
<el-dialog
title="导入数据"
:visible.sync="exportVisible" :close-on-click-modal="false"
width="60%">
<el-steps :active="exportActive" finish-status="success" simple>
<el-step title="下载模板"></el-step>
<el-step title="上传文件"></el-step>
<el-step title="导入结果"></el-step>
</el-steps>
<div v-if="exportActive==0"
style="padding: 20px ;display: flex;justify-content: center;align-content: center;align-items: center;;width: 100%">
<div class="el-upload-dragger" @click="downloadTemplate">
<i class="el-icon-download"></i>
<div class="el-upload__text">点击下载模板</div>
</div>
</div>
<div v-if="exportActive==1"
style="padding: 20px ;display: flex;justify-content: center;align-content: center;align-items: center;;width: 100%">
<el-upload
class="upload-demo"
drag
:on-change="tempFileChange"
:file-list="tempFileList" :auto-upload="false" accept=".xls,.xlsx"
:limit="1">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</div>
<div v-if="exportActive==2"
style="padding: 20px ;display: flex;justify-content: center;align-content: center;align-items: center;;width: 100%">
<div class="el-upload-dragger">
<i class="el-icon-success"></i>
<div class="el-upload__text">共检出 <span class="text-info">{{exportData.count}}</span> 条数据,入库成功 <span
class="text-success">{{exportData.success_count}}</span> 条。
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="exportVisible = false">取 消</el-button>
<el-button v-if="exportActive>0" @click="exportActive -= 1">上一步</el-button>
<el-button type="primary" v-if="exportActive==0" @click="exportActive = 1">我已下载</el-button>
<el-button type="primary" v-if="exportActive==1" @click="doExport">导入</el-button>
<el-button type="primary" v-if="exportActive==2" @click="exportVisible = false; window.location.reload();">完成</el-button>
</span>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: "#app",
data: function () {
return {
flag: false,
unionOptions: [],
tab_loading: false,
pageForm: {
pageNumber: 1,
pageSize: 10,
pageOrderName: '',
pageOrderBy: '',
totalCount: 0,
year: new Date().getFullYear() + ""
},
tableData: [],
//数据文件导入
tempFileList: [],
exportActive: 0,
exportVisible: false,
}
},
methods: {
doExport() {
if (!this.tempFileList.length) {
this.$notify({
title: '警告',
message: '请先选择文件',
type: 'warning'
});
return
}
let formData = new FormData();
const f = this.tempFileList[0]
formData.append("file", f.raw, f.raw.name);
// formData.append("park_id", parkId);
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.ajax({
url: "/platform/jf/yjgh/dataInput/doExport",
type: "post",
data: formData,
processData: false,
contentType: false,
success: (data) => {
loading.close()
if (data.code === 0) {
this.$message({
message: data.msg,
type: 'success'
});
this.exportData = {...data.data}
this.exportActive = 2
window.vue.pageData()
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
},
error: data => {
loading.close()
this.$message({
message: data.msg,
type: 'error'
});
}
});
},
tempFileChange(file, fileList) {
this.tempFileList = fileList
},
// 模板下载
downloadTemplate() {
location.href = '/platform/jf/yjgh/dataInput/downLoadTemp'
},
//数据文件弹出框
openExport() {
this.tempFileList = []
this.exportActive = 0
this.exportVisible = true
},
// 查询今年是否已经设置了人均额度
async isSetUnionAvg() {
const resp = await $.get("/platform/jf/yjgh/ghys/isSetUnionAvg")
if (resp.data == 0) {
this.$confirm('暂未设置人均额度无法下发,是否立即前往人均额度设置页面?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 重定向到设置页面
window.location.href = "/platform/jf/costsSet/costsSet";
}).catch(() => {
});
}
},
// 查询当前最大的一年
async lastYear() {
const resp = await $.get("/platform/jf/yjgh/ghys/lastYear")
if (resp.data.year != new Date().getFullYear() + "") {
this.pageForm.year = resp.data.year;
}
},
// 重置下发
async reset() {
// 确认弹出框
this.$confirm('您确定要重置年度费用吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: '正在重置...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = $.get("/platform/jf/yjgh/ghys/reset")
// 重新加载页面
window.location.reload();
loading.close()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
// 判断是否已经下发并改变下发按钮的状态
async isSet() {
const resp = await $.get("/platform/jf/yjgh/ghys/isSet")
if (resp.data > 0) {
this.textView = "已下发"
this.flag = true
}
},
// 下发
async issue() {
this.$confirm('生成年度费用前,请确认院级工会是否已在会员管理系统中调整会员数量。', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
const loading = this.$loading({
lock: true,
text: '正在下发...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
// 查询是否设置了人均值
const resp = await $.get("/platform/jf/yjgh/ghys/isSetUnionAvg")
if (resp.data == 0) {
this.$confirm('暂未设置人均额度无法下发,是否立即前往人均额度设置页面?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 重定向到设置页面
window.location.href = "/platform/jf/costsSet/costsSet";
}).catch(() => {
});
} else {
if ("confirm" == a) {
const resp = await $.get("/platform/jf/yjgh/ghys/issue")
requestLaterFun(resp, () => {
this.$notify.success({title: '下发成功'});
// 重新加载页面
/* window.location.reload();*/
this.pageData()
}, () => {
this.$notify.error({title: '失败'});
}, () => {
loading.close()
})
}
}
}
});
},
doChangeYs(row) {
let self = this;
// self.avg= parseDouble(row.totalquota2)>0?parseDouble(row.totalquota2)/(row.hyzs):"暂未分配总额度"
$.post(base + "/platform/jf/yjgh/ghys/changeYs", {
unionId: row.unid,
year: self.pageForm.year,
totalQuota: row.totalquota2,
}, function (data) {
if (data.code === 0) {
vue.$message.success("分配成功!");
row.edit = false
self.pageData()
} else {
vue.$message.error(data.msg);
}
});
},
// 封装了分页查询等
...pageSomeThing
},
async created() {
// 弹框 生成年度费用前,请确认基层工会已在会员管理系统中调整会员数量
// alert("生成年度费用前,请确认基层工会已在会员管理系统中调整会员数量")
/* await this.lastYear();*/
await this.isSet();
this.unionOptions = await getUnions();
this.pageData();
},
});
</script>
<!--#
}
#-->
@@ -0,0 +1,592 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>
<div id="app" v-cloak>
<el-row class="transition-row">
<transition name="el-zoom-in-center">
<div v-show="!showYsTz" class="transition-item">
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-date-picker
@change="doSearch"
style="width: 100%"
v-model="pageForm.year"
type="year"
value-format="yyyy"
format="yyyy年"
placeholder="选择年度">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button slot="append" icon="el-icon-download" @click="exportExcel">
导出
</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" v-loading="tab_loading">
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="年度" header-align="center" align="center">
<template scope="scope"><span>{{scope.row.year}}</span>
</template>
</el-table-column>
<el-table-column label="院级工会名称" prop="unionname" show-overflow-tooltip header-align="center"
align="center">
<template slot-scope="scope">
{{scope.row.unionname}}
</template>
</el-table-column>
<el-table-column label="分配总额度" sortable="custom" prop="totalquota" show-overflow-tooltip
header-align="center"
align="center"
align="center">
<template slot-scope="scope">
<span v-if="!scope.row.totalquota">暂未分配</span>
<span v-else><i>{{scope.row.totalquota}}</i></span>
</template>
</el-table-column>
<el-table-column label="已使用额度" sortable="custom" prop="usedquota" show-overflow-tooltip
align="center"
header-align="center" align="center">
<template slot-scope="scope">
<span v-if="!scope.row.usedquota">暂未使用</span>
<span v-else><i>{{scope.row.usedquota}}</i></span>
</template>
</el-table-column>
<el-table-column label="剩余额度" sortable="custom" prop="usedquota" show-overflow-tooltip
align="center"
header-align="center" align="center">
<template slot-scope="scope">
<span v-if="!scope.row.usedquota">{{scope.row.totalquota}}元</span>
<span v-else><i>{{scope.row.totalquota-parseIntNum(scope.row.usedquota)}}</i></span>
</template>
</el-table-column>
<el-table-column label="操作" header-align="center" width="180px" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="use(scope.row)" plain type="primary">使用详情</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
layout="total, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
</div>
</transition>
<transition name="el-zoom-in-center">
<div v-show="showYsTz" class="transition-item">
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5 mr10">
<el-button icon="el-icon-back" type="text" @click="pre" style="font-size: 18px">返回</el-button>
</div>
<div class="btn-group tool-button mt5">
<el-date-picker
@change="doUseSearch"
style="width: 100%"
v-model="usePageForm.year"
type="year"
value-format="yyyy"
format="yyyy年"
placeholder="选择年度">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="doUseSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button slot="append" @click="openView">
<i class="ti-plus"></i>新增使用记录
</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="useTableData" @sort-change="pageOrder" v-loading="tab_loading">
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope"><span>{{scope.$index+(usePageForm.pageNumber - 1) * usePageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column label="年度" prop="year" header-align="center"
align="center">
<template scope="scope"><span>{{unionInfo.year}} </span></template>
</el-table-column>
<el-table-column label="活动名称" prop="project" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="name" header-align="center" align="center">
<template scope="scope"><span>{{unionInfo.name}} </span></template>
</el-table-column>
<el-table-column label="录入时间" prop="adjust_time" header-align="center"
align="center"></el-table-column>
<!-- <el-table-column label="活动人数" prop="activitie_number" header-align="center"
align="center"></el-table-column>-->
<el-table-column label="活动费用" prop="adjust_money" header-align="center"
align="center"></el-table-column>
<el-table-column label="调整人" prop="username" header-align="center"
align="center"></el-table-column>
<el-table-column label="事由" prop="adjust_reason" header-align="center" show-overflow-tooltip
align="center"></el-table-column>
<!-- <el-table-column label="操作" header-align="center" width="180px" align="center">
&lt;!&ndash; <template slot-scope="scope">&ndash;&gt;
&lt;!&ndash; <el-button size="mini" type="primary" @click="openEdit(scope.row)">编辑</el-button>&ndash;&gt;
&lt;!&ndash; <el-button size="mini" type="danger" @click="delUse(scope.row)">删除</el-button>&ndash;&gt;
&lt;!&ndash; </template>&ndash;&gt;
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="[1010].includes(row.state_id)"
:command="{type:'edit',data:row}">
编辑
</el-dropdown-item>
<el-dropdown-item v-if="[1010,1000].includes(row.state_id)"
:command="{type:'delete',data:row}">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
-->
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
:command="{type:'edit',data:row}">
编辑
</el-dropdown-item>
<el-dropdown-item
:command="{type:'delete',data:row}">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@current-change="usePageNumberChange"
:current-page="usePageForm.pageNumber"
layout="total, prev, pager, next, jumper"
:total="usePageForm.totalCount">
</el-pagination>
</el-row>
</div>
</transition>
</el-row>
<!-- 弹出层 -->
<el-dialog :visible.sync="DialogVisible" :title="title">
<el-form :model="useFormData" :rules="rules" label-width="80px" ref="JfForm">
<el-row>
<el-col span="12">
<el-form-item prop="project" label="活动名称">
<el-input type="text" maxlength="200" v-model.trim="useFormData.project"></el-input>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item prop="activitie_time">
<div class="block">
<span class="demonstration">活动时间&nbsp;&nbsp;</span>
<el-date-picker
v-model="useFormData.activitie_time"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</div>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="adjust_money" label="活动费用">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="useFormData.adjust_money"></el-input>
</el-form-item>
<el-form-item prop="activitie_number" label="活动人数">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="useFormData.activitie_number"></el-input>
</el-form-item>
<!-- <el-form-item prop="by_union" label="所属工会">-->
<!--&lt;!&ndash; <el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"&ndash;&gt;-->
<!--&lt;!&ndash; v-model.trim="useFormData.by_union">&ndash;&gt;-->
<!--&lt;!&ndash; </el-input>&ndash;&gt;-->
<!-- <div class="btn-group tool-button mt5">-->
<!-- <el-select v-model="useFormData.union_id" filterable placeholder="请选择基层工会" clearable>-->
<!-- <el-option-->
<!-- v-for="item in unionOptions"-->
<!-- :key="item.id"-->
<!-- :label="item.unionname"-->
<!-- :value="item.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </el-form-item>-->
<el-form-item prop="adjust_reason" label="事由">
<el-input maxlength="500" type="textarea" v-model.trim="useFormData.adjust_reason" rows="4"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="DialogVisible = false">取 消</el-button>
<el-button type="primary" @click="addUse">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="editDialogVisible" title="编辑">
<el-form :model="editFormData" :rules="rules" label-width="80px" ref="form">
<el-row>
<el-col span="12">
<el-form-item prop="project" label="活动名称">
<el-input type="text" maxlength="200" v-model.trim="editFormData.project"></el-input>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item prop="activitie_time">
<div class="block">
<span class="demonstration">活动时间&nbsp;&nbsp;</span>
<el-date-picker
v-model="editFormData.activitie_time"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</div>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="adjust_money" label="活动费用">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="editFormData.adjust_money"></el-input>
</el-form-item>
<el-form-item prop="activitie_number" label="活动人数">
<el-input onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
v-model.trim="editFormData.activitie_number"></el-input>
</el-form-item>
<el-form-item prop="adjust_reason" label="事由">
<el-input maxlength="500" type="textarea" v-model.trim="editFormData.adjust_reason" rows="4"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="editDo">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
const rules = {
adjust_money: [{required: true, message: '请输入活动费用', trigger: ['change', 'blur']}],
adjust_reason: [{required: true, message: '请输入调整事由', trigger: ['change', 'blur']}],
project: [{required: true, message: '请输入活动名称', trigger: ['change', 'blur']}],
activity_time: [{required: true, message: '请输入活动时间', trigger: ['change', 'blur']}],
activity_number: [{required: true, message: '请输入活动人数', trigger: ['change', 'blur']}],
// by_union: [{required: true, message: '请输入所属工会', trigger: ['change', 'blur']}],
}
const vue = new Vue({
el: "#app",
data: function () {
return {
unionOptions: [],
showYsTz: false,
tab_loading: false,
pageForm: {
pageNumber: 1,
pageSize: 10,
pageOrderName: '',
pageOrderBy: '',
totalCount: 0,
year: moment().format("YYYY")
},
usePageForm: {
adjust_id: '',
pageNumber: 1,
pageSize: 10,
pageOrderName: '',
pageOrderBy: '',
totalCount: 0,
year: moment().format("YYYY")
},
tableData: [],
useTableData: [],
formData: {
id: '',
lbfcost: '',
totalquota: '',
unid: '',
unionactivitycost: '',
unionid: '',
unionname: '',
usedquota: '',
year: '',
},
useFormData: {
adjust_id: '',
adjust_money: '',
adjust_reason: '',
activity_time: '',
activity_number: '',
by_union: '',
},
DialogVisible: false,
title: "新增使用记录",
parseIntNum(val) {
return !val ? 0 : parseInt(val)
},
rules: rules,
editFormData: {},
editDialogVisible: false,
unionInfo: {}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'edit') {
this.openEdit(data)
} else if (type == 'delete') {
this.delUse(data)
} else if (type == 'exportWwj') {
this.exportWwj(data.id)
}
},
openEdit(row) {
this.editFormData = {...row}
this.editDialogVisible = true
},
editDo() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
this.editFormData.isClub = false
const resp = await $.post("/platform/jf/tz/doEdit", this.editFormData)
closeLoadingFunc(loading, resp, async () => {
this.editDialogVisible = false
this.use({id: this.formData.id})
}, (data, msg) => {
this.$message.error(msg);
})
}
});
},
use(scope) {
console.log(scope)
let that = this
this.formData.id = scope.id
this.usePageForm.adjust_id = scope.id
that.showYsTz = true
this.unionInfo.year = scope.year
console.log(this.unionInfo.year)
this.unionInfo.name = scope.unionname
$.post(base + "/platform/jf/tz/data", this.usePageForm, function (res) {
if (res.code === 0) {
console.log(res)
that.useTableData = res.data.list
that.usePageForm.totalCount = res.data.totalCount
}
});
},
pre() {
this.showYsTz = false
this.pageData()
},
openView(u) {
this.DialogVisible = true
this.useFormData = {}
},
addUse() {
let that = this
$.post(base + "/platform/jf/tz/addUse", {
adjust_id: this.formData.id,
adjust_money: this.useFormData.adjust_money,
adjust_reason: this.useFormData.adjust_reason,
project: this.useFormData.project,
activitie_time: this.useFormData.activitie_time,
activitie_number: this.useFormData.activitie_number,
by_union: this.useFormData.by_union,
}, function (res) {
if (res.code === 0) {
that.use({id: that.formData.id, year: that.unionInfo.year, unionname: that.unionInfo.name})
that.$message({
message: res.msg,
type: 'success'
});
// window.location.reload();
} else {
that.$message({
message: res.msg,
type: 'error'
});
}
that.DialogVisible = false
});
},
doUseSearch() {
this.usePageForm.pageNumber = 1;
this.use({id: this.formData.id});
},
delUse(scope) {
let that = this
that.$confirm('此操作将删除 ' + scope.adjust_reason, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: function (a, b) {
if ("confirm" == a) {
$.post(base + "/platform/jf/tz/delUse", {id: scope.id, isClub: false}, function (res) {
if (res.code === 0) {
that.$message({
message: '删除成功',
type: 'success'
});
that.use({id: that.formData.id})
}
});
}
}
})
},
pageData: function () {
let that = this
this.tab_loading = true
$.post(base + "/platform/jf/yjgh/jfsy/data", this.pageForm, function (res) {
if (res.code === 0) {
that.tableData = res.data.list;
that.pageForm.totalCount = res.data.totalCount;
}
that.tab_loading = false
});
},
doEdit() {
this.$refs["JfForm"].validate(result => {
if (result) {
$.post(base + "/platform/jf/yjgh/jfsy/modifyJf", {
id: this.formData.id,
usedQuota: this.formData.usedquota,
reason: this.formData.reason,
}).then(res => {
if (res.code == 0) {
vue.$message.success(res.msg);
this.pageData()
this.DialogVisible = false
}
})
}
})
},
doSearch: function () {
this.pageForm.pageNumber = 1;
this.pageData();
},
exportExcel: function () {
window.location.href = base + "/platform/jf/yjgh/jfsy/exportExcel?year=" + this.pageForm.year;
},
pageNumberChange: function (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
usePageNumberChange: function (val) {
this.usePageForm.pageNumber = val;
this.use({id: this.formData.id})
},
pageOrder(column) {//按字段排序
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
},
async created() {
$(".gallery-loader").fadeOut();
this.pageData();
this.unionOptions = await getUnions();
},
});
</script>
<!--#
}
#-->