Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2025-09-03 09:51:56 +08:00
96 changed files with 10116 additions and 6213 deletions
@@ -0,0 +1,184 @@
<template>
<div class="activityBudget">
<vi-title title="申报信息"></vi-title>
<el-descriptions :column="3" border class="table_fixed">
<el-descriptions-item label="申报人">
{{ viewData.userName }}
</el-descriptions-item>
<el-descriptions-item label="工号">
{{ viewData.loginName }}
</el-descriptions-item>
<el-descriptions-item label="联系方式">
{{ viewData.mobile }}
</el-descriptions-item>
<el-descriptions-item label="预算类型">
<dict-tag :options="budgetTypeOption"
:value="viewData.budgetTypeCode"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="申报(承办)单位">
{{ viewData.helpUnitName }}
</el-descriptions-item>
<el-descriptions-item label="活动项目">
{{ viewData.activityMatter }}
</el-descriptions-item>
<el-descriptions-item label="活动时间">
{{ viewData.activityDate }}
</el-descriptions-item>
<el-descriptions-item label="申报预算金额(元)">
{{ viewData.declareTotalBudgetMoney }}
</el-descriptions-item>
<el-descriptions-item label="最终预算金额(元)">
{{ viewData.totalBudgetMoney }}
</el-descriptions-item>
<el-descriptions-item label="申报时间">
{{ viewData.applyDate }}
</el-descriptions-item>
<el-descriptions-item span="2"></el-descriptions-item>
<el-descriptions-item label="活动内容(如训练、装备等)" :span="3">
<div v-html="viewData.activityContent"></div>
</el-descriptions-item>
<el-descriptions-item label="项目明细" span="3"
v-if="viewData.budgetDetails&&viewData.budgetDetails.length>0">
<el-table :data="viewData.budgetDetails"
:summary-method="getSummaries"
border
show-summary
size="mini"
style="width: 100%">
<el-table-column label="序号" sortable type="index"
width="100"></el-table-column>
<el-table-column label="类别" prop="detailName"></el-table-column>
<el-table-column label="预算金额(元)" prop="budgetMoney"></el-table-column>
</el-table>
</el-descriptions-item>
</el-descriptions>
<div v-if="viewData.auditState>1&&viewData.schoolAuditId" class="mt20">
<vi-title title="校工会审核信息"></vi-title>
<el-descriptions :column="3" border class="table_fixed">
<el-descriptions-item label="审核人">
{{ viewData.schoolAudit.username }}
</el-descriptions-item>
<el-descriptions-item label="工号">
{{ viewData.schoolAudit.loginname }}
</el-descriptions-item>
<el-descriptions-item label="审核时间">
{{ viewData.schoolAudit.auditTime }}
</el-descriptions-item>
<el-descriptions-item label="审核意见">
{{ viewData.schoolAudit.auditOpinion }}
</el-descriptions-item>
</el-descriptions>
</div>
<div v-if="viewData.allocationEditAuditList&&viewData.allocationEditAuditList.length>0" class="mt20">
<vi-title title="管理员编辑信息"></vi-title>
<div v-for="(item,index) in viewData.allocationEditAuditList" :key="index">
<el-descriptions :column="3" border class="table_fixed">
<el-descriptions-item label="审核人">
{{ item.username }}
</el-descriptions-item>
<el-descriptions-item label="工号">
{{ item.loginname }}
</el-descriptions-item>
<el-descriptions-item label="审核时间">
{{ item.auditTime }}
</el-descriptions-item>
<el-descriptions-item label="编辑前金额">
{{ item.ext.money }}
</el-descriptions-item>
<el-descriptions-item span="2"></el-descriptions-item>
<el-descriptions-item label="审核意见" span="3">
{{ item.auditOpinion }}
</el-descriptions-item>
<el-descriptions-item label="审核附件" span="3">
<file-upload :files.sync="item.ext.files" view></file-upload>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<div v-if="handle">
<slot name="handle"></slot>
</div>
</div>
</template>
<script>
module.exports = {
props: {
handle: {
type: Boolean,
default: false,
},
label: {
type: String,
default: '审核'
},
panes: {
type: Array,
default: []
},
},
data() {
return {
activeName: "1",
viewData: {},
budgetTypeOption: [],
loading: true,
}
},
methods: {
hasPane(name) {
if (!this.handle) {
return true
}
return this.panes.includes(name)
},
async getInfo(id) {
this.loading = true
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
const {data, code, msg} = await $.get("/platform/activity/budget/applyList/findOne", {id})
this.loading = false
if (data) {
this.activeName = this.handle ? "999" : "1"
this.viewData = data
} else {
this.viewData = {}
this.$message({
message: "获取信息失败",
type: 'error'
});
}
},
getSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (index === 2 || index === 3) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0).toFixed(2);
sums[index] += ' 元';
} else {
sums[index] = '';
}
});
return sums;
}
}
}
</script>
@@ -1,29 +1,8 @@
/**
*Desc:
*Create by: jug
*Create time:2023/7/28/9:55
*/
<template>
<div>
<template v-for="(item, index) in options">
<template v-if="values.includes(item.value)">
<span
v-if="item.raw.listClass == 'default' || item.raw.listClass == ''"
:key="item.value"
:index="index"
:class="item.raw.cssClass"
>{{ item.label }}</span
>
<van-tag
v-else
:disable-transitions="true"
:key="item.value"
:index="index"
:type="item.raw.listClass == 'primary' ? '' : item.raw.listClass"
:class="item.raw.cssClass"
>
{{ item.label }}
</van-tag>
<template v-if="values.includes(item[option_value])">
<span :key="item.value">{{ item[option_label] }}</span>
</template>
</template>
</div>
@@ -35,19 +14,27 @@ module.exports = {
props: {
options: {
type: Array,
default: null,
default: null
},
value: [Number, String, Array],
option_value: {
type: String,
default: "code"
},
option_label: {
type: String,
default: "name"
},
value: [Number, String, Array]
},
computed: {
values() {
if (this.value !== null && typeof this.value !== 'undefined') {
return Array.isArray(this.value) ? this.value : [String(this.value)];
if (this.value !== null && typeof this.value !== "undefined") {
return Array.isArray(this.value) ? this.value : [String(this.value)]
} else {
return [];
return []
}
},
},
}
}
}
</script>
@@ -55,4 +42,4 @@ module.exports = {
.el-tag + .el-tag {
margin-left: 10px;
}
</style>
</style>
@@ -3,7 +3,8 @@
<div>
<el-tabs tab-position="top" v-model="activeName" v-loading="loading" class="ml25">
<el-tab-pane label="申请信息" name="1">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25"
label-width="140px">
<el-row gutter="60">
<el-col :span="12">
@@ -17,47 +18,73 @@
{{ viewData.mobile }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销类别">
{{ viewData.reimbursementItemSort === 'fy' ? '费用报销' : '支付凭证' }}
<el-form-item label="活动类型">
<dict-tag :options="budgetTypeOption"
:value="viewData.jf_source"></dict-tag>
</el-form-item>
</el-col>
<!--
<el-col :span="12">
<el-form-item label="报销类别">
{{ viewData.reimbursementItemSort === 'fy' ? '费用报销' : '支付凭证' }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销项目">
{{ viewData.reimbursementItemName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="支付方式">
{{ viewData.paymentMethodName }}
</el-form-item>
</el-col>
-->
<!--
<el-col :span="12">
<el-form-item label="户名">
{{ viewData.bankUserName }}
</el-form-item>
</el-col>
-->
<el-col :span="12">
<el-form-item label="报销项目">
{{ viewData.reimbursementItemName }}
<el-form-item label="申报单位">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(viewData.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(viewData.jf_source)&&['4270', '4330', '4450'].includes(viewData.unitId)">{{viewData.unitName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(viewData.jf_source)&&!['4270', '4330', '4450'].includes(viewData.unitId)">{{viewData.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(viewData.jf_source)">{{viewData.clubName}}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="12" v-if="viewData.jf_source==='ACTIVITY_BUDGET_TYPE_TWO'">
<el-form-item label="所属工会">
{{ viewData.newUnionName }}
</el-form-item>
</el-col>-->
<!--
<el-col :span="12">
<el-form-item label="银行账号">
{{ viewData.bankCardNumber }}
</el-form-item>
</el-col>-->
<el-col :span="12">
<el-form-item label="支付方式">
{{ viewData.paymentMethodName }}
</el-form-item>
</el-col>
<!--
<el-col :span="12">
<el-form-item label="开户行">
{{ viewData.bankOfDeposit }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="户名">
{{ viewData.bankUserName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行账号">
{{ viewData.bankCardNumber }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行">
{{ viewData.bankOfDeposit }}
</el-form-item>
</el-col>
-->
</el-row>
<el-row gutter="60" v-if="viewData.reimbursementItemId==='fyww'||viewData.reimbursementItemId==='zfww'">
<el-row gutter="60"
v-if="viewData.reimbursementItemId==='fyww'||viewData.reimbursementItemId==='zfww'">
<el-col :span="12">
<el-form-item label="慰问对象">
{{ viewData.be_username }}({{ viewData.be_loginname }})
@@ -185,11 +212,11 @@
</el-form-item>
</el-col>
<el-col v-if="viewData.reimbursementItemId=='fyhd'" :span="12">
<el-form-item label="活动类型">
{{ viewData.activity_type === '1' ? '分工会活动' : viewData.activity_type === '2' ? '校工会活动' : '协会活动' }}
</el-form-item>
</el-col>
<!-- <el-col v-if="viewData.reimbursementItemId=='fyhd'" :span="12">
<el-form-item label="活动类型">
{{ viewData.activity_type === '1' ? '分工会活动' : viewData.activity_type === '2' ? '校工会活动' : '协会(社团)活动' }}
</el-form-item>
</el-col>-->
<el-col :span="12" v-if="viewData.activity_number">
@@ -199,11 +226,11 @@
</el-col>
<el-col :span="12">
<el-form-item label="活动地点">
{{ viewData.venue }}
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="活动地点">
{{ viewData.venue }}
</el-form-item>
</el-col>-->
<el-col :span="12">
<el-form-item label="报销金额">
@@ -217,17 +244,17 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发票张数">
{{ viewData.files_num }}
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="发票张数">
{{ viewData.files_num }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发票号码">
{{ viewData.billNumber }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发票号码">
{{ viewData.billNumber }}
</el-form-item>
</el-col>-->
</el-row>
@@ -239,11 +266,11 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注">
{{ viewData.remark }}
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="备注">
{{ viewData.remark }}
</el-form-item>
</el-col>-->
<el-col :span="24">
@@ -253,30 +280,191 @@
<span v-else>暂无</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字">
<el-image style="width: 200px;height:auto"
:src="'/signature/getSignData?path=' +viewData.signUrl"></el-image>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="审核信息" name="2" v-if="viewData.accountingAuditId">
<el-tab-pane label="协会审核信息" name="2" v-if="viewData.clubAuditId">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25">
<el-col :span="12">
<el-form-item label="审核人">
{{ viewData.accounting.username }}({{ viewData.accounting.loginname }})
{{ viewData.clubAudit.username }}({{ viewData.clubAudit.loginname }})
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.accounting.auditTime }}
{{ viewData.clubAudit.auditTime }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="审核意见">
{{ viewData.accounting.auditOpinion ? viewData.accounting.auditOpinion : '暂无' }}
{{ viewData.clubAudit.auditOpinion ? viewData.clubAudit.auditOpinion : '暂无' }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字">
<el-image style="width: 200px;height:auto"
:src="'/signature/getSignData?path=' +viewData.clubAudit.auditSign"></el-image>
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane label="分工会主席审核信息" name="3" v-if="viewData.unionAuditId">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25">
<el-col :span="12">
<el-form-item label="审核人">
{{ viewData.unionAudit.username }}({{ viewData.unionAudit.loginname }})
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.unionAudit.auditTime }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
{{ viewData.unionAudit.auditOpinion ? viewData.unionAudit.auditOpinion : '暂无' }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字">
<el-image style="width: 200px;height:auto"
:src="'/signature/getSignData?path=' +viewData.unionAudit.auditSign"></el-image>
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane label="工会办公室主管审核信息" name="4" v-if="viewData.unionManageAuditId">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25">
<el-col :span="12">
<el-form-item label="审核人">
{{ viewData.unionManageAudit.username }}({{ viewData.unionManageAudit.loginname }})
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.unionManageAudit.auditTime }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
{{ viewData.unionManageAudit.auditOpinion ? viewData.unionManageAudit.auditOpinion : '暂无' }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字">
<el-image style="width: 200px;height:auto"
:src="'/signature/getSignData?path=' +viewData.unionManageAudit.auditSign"></el-image>
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane label="工会副主席审核信息" name="5" v-if="viewData.viceChairmanAuditId">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25">
<el-col :span="12">
<el-form-item label="审核人">
{{ viewData.viceChairmanAudit.username }}({{ viewData.viceChairmanAudit.loginname }})
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.viceChairmanAudit.auditTime }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
{{ viewData.viceChairmanAudit.auditOpinion ? viewData.viceChairmanAudit.auditOpinion : '暂无' }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字">
<el-image style="width: 200px;height:auto"
:src="'/signature/getSignData?path=' +viewData.viceChairmanAudit.auditSign"></el-image>
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane label="工会主席信息" name="6" v-if="viewData.standingViceChairmanAuditId">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25">
<el-col :span="12">
<el-form-item label="审核人">
{{ viewData.standingViceChairmanAudit.username }}({{ viewData.standingViceChairmanAudit.loginname }})
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.standingViceChairmanAudit.auditTime }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
{{ viewData.standingViceChairmanAudit.auditOpinion ? viewData.standingViceChairmanAudit.auditOpinion : '暂无' }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字">
<el-image style="width: 200px;height:auto"
:src="'/signature/getSignData?path=' +viewData.standingViceChairmanAudit.auditSign"></el-image>
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane label="会计审核信息" name="7" v-if="viewData.financeAuditId">
<el-form label-suffix="" label-position="left" style="padding: 20px 0" class="ml25">
<el-col :span="12">
<el-form-item label="审核人">
{{ viewData.financeAudit.username }}({{ viewData.financeAudit.loginname }})
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
{{ viewData.financeAudit.auditTime }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="明细类">
<dict-tag :options="detailsTypeOption"
:value="viewData.detailsTypeId"></dict-tag>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="上账明细">
{{viewData.accountViewName}}
</el-form-item>
</el-col>-->
<!-- <el-col :span="12">
<el-form-item label="会计核对扣款分类">
<dict-tag :options="budgetTypeOption"
:value="viewData.new_jf_source"></dict-tag>
</el-form-item>
</el-col>-->
<!--
<el-col :span="12" v-if="viewData.newClubId">
<el-form-item label="会计核对扣款协会">
{{ viewData.nweClubName }}
</el-form-item>
</el-col>-->
<el-col :span="24">
<el-form-item label="审核意见">
{{ viewData.financeAudit.auditOpinion ? viewData.financeAudit.auditOpinion : '暂无' }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字">
<el-image style="width: 200px;height:auto"
:src="'/signature/getSignData?path=' +viewData.financeAudit.auditSign"></el-image>
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane v-if="handle" :label="label" name="999">
@@ -304,6 +492,8 @@ module.exports = {
},
data() {
return {
budgetTypeOption: [],
detailsTypeOption: [],
activeName: "1",
viewData: {},
loading: true,
@@ -321,14 +511,14 @@ module.exports = {
},
async getInfo(id) {
this.loading = true
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
this.detailsTypeOption = await getDictByCode("ACTIVITY_BUDGET_DETAILS_TYPE");
const {data, code, msg} = await $.get("/activity/reimbursement/list/findOne", {id})
this.loading = false
if (data) {
this.activeName = this.handle ? "999" : "1"
condolence.toFormData(data)
this.viewData = data
console.log(this.viewData)
} else {
this.viewData = {}
this.$message({
@@ -0,0 +1,300 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.budgetAudit .el-form-item__content {
margin-left: 0px !important;
}
</style>
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动项目:</div>
<div class="search-item-option">
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
clearable></el-input>
</div>
</div>
<div class="search-item"
v-if="!pageForm.budgetTypeCode||pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_THREE'">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item"
v-if="!pageForm.budgetTypeCode||pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_TWO'">
<div class="search-item-label">分工会:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionId" filterable
clearable
placeholder="请选择工会" style="width: 100%;">
<el-option v-for="item in unionList" :label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch();getApplyMoney()">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #label_end>
<div style="margin-left: 10px;">
<el-tag style="font-size: 15px;">
申报预算金额:{{declareTotalBudgetMoney}}元,审核预算金额:{{totalBudgetMoney}}元
</el-tag>
</div>
</template>
<template #func>
<el-radio-group @change="budgetTypeCodeChange" size="small"
v-model="pageForm.budgetTypeCode">
<el-radio-button :label="item.code" v-for="item in budgetTypeOption">
{{item.name}}
</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
ref="table"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='budgetTypeCode'">
<dict-tag :options="budgetTypeOption"
:value="row.budgetTypeCode"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop==='auditState'">
<span v-if="row.auditState===0">未提交</span>
<span v-if="row.auditState===1">待校工会审核</span>
<span v-if="row.auditState===2">校工会拒绝</span>
<span v-if="row.auditState===3">校工会退回</span>
<span v-if="row.auditState===4">已通过</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="200">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary">
编辑
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<info ref="viewInfo"></info>
</template>
<template #edit>
<info handle label="管理员编辑" ref="editInfo">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title title="管理员编辑信息"></vi-title>
<el-descriptions :column="3" border class="table_fixed budgetAudit">
<el-descriptions-item label="审核人">
{{formData.username}}
</el-descriptions-item>
<el-descriptions-item label="工号">
{{formData.loginname}}
</el-descriptions-item>
<el-descriptions-item label="审核时间">
{{formData.auditTime}}
</el-descriptions-item>
<el-descriptions-item label="审核金额">
<el-form-item label="" prop="totalBudgetMoney">
<el-input-number :min="0" :precision="2"
placeholder="请输入预算金额"
style="width: 100%"
v-model="formData.totalBudgetMoney"></el-input-number>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :span="2"></el-descriptions-item>
<el-descriptions-item label="审核意见" span="3">
<el-form-item label="" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="审核附件" span="3">
<el-form-item label="" prop="auditOpinion">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<el-row class="mt20" justify="end" type="flex">
<el-button :loading="formLoading" @click="doSubmit" type="primary">提交
</el-button>
</el-row>
</el-form>
</template>
</info>
</template>
</guava>
</div>
<script>
<!--#include("./common/apply.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
declareTotalBudgetMoney: 0,
totalBudgetMoney: 0,
budgetTypeOption: [],
clubOption: [],
unionList: [],
pageForm: {
year: new Date().getFullYear() + "",
budgetTypeCode: "",
unionId: "",
clubId: "",
},
tableColumns: [
{prop: 'year', label: '年度', width: '80'},
{prop: 'userName', label: '申报人姓名', fixed: "left"},
{prop: 'loginName', label: '申报人工号', fixed: "left"},
{prop: 'budgetTypeCode', label: '申报类型'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'activityMatter', label: '活动项目', width: '300'},
{prop: 'totalBudgetMoney', label: '审核预算金额'},
{prop: 'applyDate', label: '申报时间'},
],
formRules: {
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
declareTotalBudgetMoney: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
}
},
components: {
'info': httpVueLoader('/components/activityBudget/info.vue?v=' + Date.now()),
},
methods: {
doSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.formLoading = true
this.formData.files = JSON.stringify(this.formData.files)
const resp = await $.post(loc() + "/doSubmit", this.formData)
if (resp.code === 0) {
this.$message({
type: 'success',
message: '提交成功!'
})
this.doSearch()
this.$refs.guava.index()
}
this.formLoading = false
})
}
})
},
openEdit(row) {
this.formData = {
id: row.id,
totalBudgetMoney: row.declareTotalBudgetMoney,
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.editInfo.getInfo(row.id)
},
budgetTypeCodeChange() {
this.$set(this.pageForm, "unionId", '')
this.$set(this.pageForm, "clubId", '')
this.doSearch()
this.getApplyMoney()
},
openView(row) {
this.$refs.guava.view()
this.$refs.viewInfo.getInfo(row.id)
},
getApplyMoney() {
$.get(loc() + "/getApplyMoney", this.pageForm).then(resp => {
if (resp.code === 0) {
this.declareTotalBudgetMoney = resp.data.declareTotalBudgetMoney
this.totalBudgetMoney = resp.data.totalBudgetMoney
} else {
this.$message.error(resp.message)
}
})
}
},
async created() {
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
this.clubOption = await getClubsByRole()
this.unionList = await getUnionList(null)
this.getApplyMoney()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,40 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div class="platform" id="app" v-cloak>
<budget-apply ref="budgetApply" @go_back="go_back"></budget-apply>
</div>
<script>
<!--#include("./common/apply.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {}
},
components: {
'budget-apply': BUDGET_APPLY
},
methods: {
go_back(){
sublime.jumpPagePjax("/platform/activity/budget/applyList")
}
},
async created() {
setTimeout(()=>{
this.$refs.budgetApply.info("", "applyList")
},500)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,287 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动项目:</div>
<div class="search-item-option">
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
clearable></el-input>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch();getApplyMoney()" icon="el-icon-search" type="primary">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #label_end>
<div style="margin-left: 10px;">
<el-tag style="font-size: 15px;">
申报预算金额:{{declareTotalBudgetMoney}}元,审核预算金额:{{totalBudgetMoney}}元
</el-tag>
</div>
</template>
<template #func>
<!-- <el-button type="primary" icon="el-icon-check" @click="batchSubmit"
size="small" :disabled="auditIds&&auditIds.length===0">
批量提交
</el-button>-->
<el-button type="danger" icon="el-icon-check" @click="batchDelete"
size="small" :disabled="auditIds&&auditIds.length===0">
批量删除
</el-button>
<el-button @click="doExport" size="small" class="ml10"
type="primary"
icon="el-icon-download">导出
</el-button>
</template>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
ref="table"
@selection-change="handleSelectionChange"
v-loading="tableLoading">
<el-table-column
reserve-selection
:selectable="(row)=>{return row.auditState==0||row.auditState==1}"
type="selection"
fixed
width="60">
</el-table-column>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="50"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:width="column.width"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='budgetTypeCode'">
<dict-tag :options="budgetTypeOption"
:value="row.budgetTypeCode"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop==='auditState'">
<span v-if="row.auditState===0">未提交</span>
<span v-if="row.auditState===1">待校工会审核</span>
<span v-if="row.auditState===2">校工会拒绝</span>
<span v-if="row.auditState===3">校工会退回</span>
<span v-if="row.auditState===4">已通过</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary"
:disabled="![0,1,3].includes(row.auditState)">
编辑
</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger"
:disabled="![0,1].includes(row.auditState)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<info ref="viewInfo"></info>
</template>
<template #edit>
<budget-apply ref="budgetApply" @go_back="go_back"></budget-apply>
</template>
</guava>
</div>
<script>
<!--#include("./common/apply.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
declareTotalBudgetMoney: 0,
totalBudgetMoney: 0,
pageForm: {year: new Date().getFullYear() + ""},
budgetTypeOption: [],
tableColumns: [
{prop: 'year', label: '年度', width: '80'},
{prop: 'userName', label: '申报人姓名'},
{prop: 'loginName', label: '申报人工号'},
{prop: 'mobile', label: '联系方式', width: '120'},
{prop: 'budgetTypeCode', label: '申报类型'},
// {prop: 'helpUnitName', label: '申报单位'},
{prop: 'activityMatter', label: '活动项目', width: '300'},
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
{prop: 'totalBudgetMoney', label: '审核预算金额'},
{prop: 'applyDate', label: '申报时间'},
{prop: 'auditState', label: '审核状态'},
],
auditIds: [],
}
},
components: {
'info': httpVueLoader('/components/activityBudget/info.vue?v=' + Date.now()),
'budget-apply': BUDGET_APPLY
},
methods: {
doExport() {
const {year} = this.pageForm
window.open("/platform/activity/budget/applyList/doExport?year=" + year)
},
batchDelete() {
if (this.auditIds.length === 0) {
this.$message({
type: 'warning',
message: '请选择要删除的数据!'
});
return
}
this.$confirm('确定要批量提交选择的数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post("/platform/activity/budget/applyList/batchDelete", {
ids: this.auditIds
}).then(res => {
if (res.code === 0) {
this.$message({
type: 'success',
message: '提交成功!'
});
this.doSearch();
this.getApplyMoney()
this.$refs.table.clearSelection();
}
})
})
},
batchSubmit() {
if (this.auditIds.length === 0) {
this.$message({
type: 'warning',
message: '请选择要提交的数据!'
});
return
}
this.$confirm('确定要批量提交选择的数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post("/platform/activity/budget/applyList/batchSubmit", {
ids: this.auditIds
}).then(res => {
if (res.code === 0) {
this.$message({
type: 'success',
message: '提交成功!'
});
this.doSearch();
this.getApplyMoney()
this.$refs.table.clearSelection();
} else {
this.$alert(res.msg, '提示', {
confirmButtonText: '确定',
type: 'warning'
})
}
})
})
},
handleSelectionChange(val) {
this.auditIds = val.map(item => item.id)
},
openView(row) {
this.$refs.guava.view()
this.$refs.viewInfo.getInfo(row.id)
},
go_back() {
this.$refs.guava.index()
this.pageData()
},
openEdit(row) {
this.$refs.guava.edit()
setTimeout(() => {
this.$refs.budgetApply.info(row.id, "applyList")
}, 500)
},
doDelete(id) {
this.$confirm('确定删除该条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post(loc() + "/doDelete", {id}).then(res => {
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
});
this.doSearch();
}
})
}).catch(() => {
})
},
getApplyMoney() {
$.get(loc() + "/getApplyMoney", this.pageForm).then(resp => {
if (resp.code === 0) {
this.declareTotalBudgetMoney = resp.data.declareTotalBudgetMoney
this.totalBudgetMoney = resp.data.totalBudgetMoney
} else {
this.$message.error(resp.message)
}
})
}
},
async created() {
this.getApplyMoney()
this.pageData()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,263 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动项目:</div>
<div class="search-item-option">
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
clearable></el-input>
</div>
</div>
<div class="search-item"
v-if="!pageForm.budgetTypeCode||pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_THREE'">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item"
v-if="!pageForm.budgetTypeCode||pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_TWO'">
<div class="search-item-label">分工会:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionId" filterable
clearable
placeholder="请选择工会" style="width: 100%;">
<el-option v-for="item in unionList" :label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch();getApplyMoney()">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #label_end>
<div style="margin-left: 10px;">
<el-tag style="font-size: 15px;">
申报预算金额:{{declareTotalBudgetMoney}}元,审核预算金额:{{totalBudgetMoney}}元
</el-tag>
</div>
</template>
<template #func>
<el-radio-group @change="budgetTypeCodeChange" size="small"
v-model="pageForm.budgetTypeCode">
<el-radio-button :label="item.code" v-for="item in budgetTypeOption">
{{item.name}}
</el-radio-button>
</el-radio-group>
<el-button @click="doExport" size="small" class="ml10"
type="primary"
icon="el-icon-download">导出
</el-button>
</template>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
ref="table"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='budgetTypeCode'">
<dict-tag :options="budgetTypeOption"
:value="row.budgetTypeCode"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop==='auditState'">
<span v-if="row.auditState===0">未提交</span>
<span v-if="row.auditState===1">待校工会审核</span>
<span v-if="row.auditState===2">校工会拒绝</span>
<span v-if="row.auditState===3">校工会退回</span>
<span v-if="row.auditState===4">已通过</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="300">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary"
:disabled="!['9810051','superadmin'].includes('${@shiro.getPrincipalProperty('loginname')}')">
编辑
</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger"
:disabled="!['9810051','superadmin'].includes('${@shiro.getPrincipalProperty('loginname')}')">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<info ref="viewInfo"></info>
</template>
<template #edit>
<budget-apply ref="budgetApply" @go_back="go_back"></budget-apply>
</template>
</guava>
</div>
<script>
<!--#include("./common/apply.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
declareTotalBudgetMoney: 0,
totalBudgetMoney: 0,
budgetTypeOption: [],
clubOption: [],
unionList: [],
pageForm: {
year: new Date().getFullYear() + "",
budgetTypeCode: "",
unionId: "",
clubId: "",
},
tableColumns: [
{prop: 'year', label: '年度', width: '80'},
{prop: 'userName', label: '申报人姓名', fixed: "left"},
{prop: 'loginName', label: '申报人工号', fixed: "left"},
{prop: 'mobile', label: '联系方式', width: '120'},
{prop: 'budgetTypeCode', label: '申报类型'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'activityMatter', label: '活动项目', width: '300'},
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
{prop: 'totalBudgetMoney', label: '审核预算金额'},
{prop: 'applyDate', label: '申报时间'},
{prop: 'auditState', label: '审核状态'},
],
}
},
components: {
'info': httpVueLoader('/components/activityBudget/info.vue?v=' + Date.now()),
'budget-apply': BUDGET_APPLY
},
methods: {
go_back() {
this.$refs.guava.index()
this.pageData()
},
openEdit(row) {
this.$refs.guava.edit()
setTimeout(() => {
this.$refs.budgetApply.info(row.id, "applyStatistics")
}, 500)
},
doDelete(id) {
this.$confirm('确定删除该条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post(loc() + "/doDelete", {id}).then(res => {
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
});
this.doSearch();
this.getApplyMoney()
}
})
}).catch(() => {
})
},
doExport() {
const {year, budgetTypeCode, unionId, clubId} = this.pageForm
window.open("/platform/activity/budget/applyStatistics/doExport?year=" + year
+ "&budgetTypeCode=" + budgetTypeCode
+ "&unionId=" + unionId
+ "&clubId=" + clubId
)
},
budgetTypeCodeChange() {
this.$set(this.pageForm, "unionId", '')
this.$set(this.pageForm, "clubId", '')
this.doSearch()
this.getApplyMoney()
},
openView(row) {
this.$refs.guava.view()
this.$refs.viewInfo.getInfo(row.id)
},
getApplyMoney() {
$.get(loc() + "/getApplyMoney", this.pageForm).then(resp => {
if (resp.code === 0) {
this.declareTotalBudgetMoney = resp.data.declareTotalBudgetMoney
this.totalBudgetMoney = resp.data.totalBudgetMoney
} else {
this.$message.error(resp.message)
}
})
}
},
async created() {
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
this.clubOption = await getClubsByRole()
this.unionList = await getUnionList(null)
this.getApplyMoney()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,467 @@
const BUDGET_APPLY = {
template: /*language=HTML*/ `
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="card-title">
<span class="title-left">填写申报信息</span>
</span>
<!-- <span class="title-right" @click="openDialogVisible">
批量导入
<span slot="suffix">
<i class="el-icon-upload"></i>
</span>
</span>-->
</div>
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="160px"
ref="form">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="申报人姓名" prop="userName">
<el-input disabled type="text"
v-model="formData.userName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报时间" prop="applyDate">
<el-input disabled type="text"
v-model="formData.applyDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式" prop="mobile">
<el-input type="text" v-model="formData.mobile"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="预算类型" prop="budgetTypeCode">
<el-select @change="budgetTypeCodeChange"
placeholder="请选择预算类型"
style="width: 100%;"
v-model="formData.budgetTypeCode">
<el-option
:key="item.code"
:label="item.name"
:value="item.code"
v-for="item in budgetTypeOption">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报(承办)单位" prop="helpUnitName"
v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(formData.budgetTypeCode)">
<el-input placeholder="请输入申报(承办)单位" readonly
type="text" v-model="formData.helpUnitName"></el-input>
</el-form-item>
<el-form-item label="申报(承办)单位" prop="unionId"
v-if="formData.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_TWO'">
<el-select v-model="formData.unionId" filterable @change="unionChange"
clearable
:disabled="!['superadmin'].includes('${@shiro.getPrincipalProperty('loginname')}')"
placeholder="请选择工会" style="width: 100%;">
<el-option v-for="item in unionList" :label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="申报(承办)单位" prop="clubId"
v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(formData.budgetTypeCode)">
<el-select @change="clubChange"
placeholder="请选择申报(承办)单位"
style="width: 100%;" v-model="formData.clubId">
<el-option
:key="item.id"
:label="item.clubName"
:value="item.id"
v-for="item in clubOption">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
prop="activityMatter" label="活动项目"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input maxlength="50" placeholder="请输入活动项目"
v-model="formData.activityMatter"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
prop="activityDate" label="活动时间">
<el-input maxlength="50" placeholder="请输入活动时间"
v-model="formData.activityDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
prop="declareTotalBudgetMoney" label="预算金额(元)"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number :min="0" :precision="2"
:disabled="formData.budgetDetails&&formData.budgetDetails.length>0"
placeholder="请输入预算金额"
style="width: 100%"
v-model="formData.declareTotalBudgetMoney"></el-input-number>
</el-form-item>
</el-col>
<template
v-if="['superadmin'].includes('${@shiro.getPrincipalProperty('loginname')}')">
<el-col :span="6">
<el-form-item
prop="isRepeatReimbursement" label="是否可以重复报销"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.isRepeatReimbursement">
<el-radio-button :label="true">可以</el-radio-button>
<el-radio-button :label="false">不可以</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
prop="isSchoolBudget" label="是否属于校工会预算"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.isSchoolBudget">
<el-radio-button :label="true">属于</el-radio-button>
<el-radio-button :label="false">不属于</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</template>
<el-col :span="12">
<el-form-item
prop="schoolBudgetId" label="校工会预算"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
v-if="formData.isSchoolBudget">
<el-select v-model="formData.schoolBudgetId" filterable
default-first-option
placeholder="请选择校工会预算" style="width: 100%">
<el-option :label="item.activityMatter"
:value="item.id"
v-for="item in activityList"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item
prop="activityContent" label="活动内容(如训练、装备等)">
<text-editor v-model="formData.activityContent"></text-editor>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="项目明细" prop="budgetDetails">
<el-table :data="formData.budgetDetails"
border
max-height="500"
size="mini"
style="width: 100%">
<el-table-column label="序号" sortable type="index"
width="100">
<template scope="{row,$index}">
{{row.detailsOrder=$index+1}}
</template>
</el-table-column>
<el-table-column label="类别" prop="detailName">
<template scope="{row,$index}">
<el-form-item
:prop="'budgetDetails.'+$index+'.detailName'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<el-input maxlength="50"
placeholder="请输入类别"
v-model="row.detailName"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="预算金额(元)" prop="budgetMoney">
<template scope="{row,$index}">
<el-form-item
:prop="'budgetDetails.'+$index+'.budgetMoney'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
label-width="0">
<el-input-number :min="0" :precision="2"
placeholder="请输入预算金额"
style="width: 100%"
@change="budgetMoneyChange"
v-model="row.budgetMoney"></el-input-number>
</el-form-item>
</template>
</el-table-column>
<el-table-column align="center" header-align="center"
label="操作"
width="150px">
<template slot="header" slot-scope="scope">
<el-button @click="formData.budgetDetails.push({})"
icon="el-icon-plus"
size="mini"
type="primary">添加
</el-button>
</template>
<template slot-scope="scope">
<el-button
@click="deleteDetail(scope.$index,scope.row)"
icon="el-icon-delete"
size="mini"
type="danger"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row justify="end" type="flex">
<el-button :loading="formLoading" @click="doSubmit(false)" type="primary"
v-if="editType==='applyList'">保 存
</el-button>
<el-button :loading="formLoading" @click="doSubmit(true)" type="primary">提 交
</el-button>
</el-row>
</el-card>
</template>
</guava>
<el-dialog title="申报数据导入" :visible.sync="dialogVisible" width="50%"
:close-on-click-modal="false">
<vi-title2 title="如果是协会活动,上传的表格文件请一定要选择申报单位。"></vi-title2>
<file-import ref="viewImport" temp_url="/platform/activity/budget/applyList/downloadImport"
post_url="/platform/activity/budget/applyList/doImport"
:is_show_radio="false" @flush="flush"></file-import>
</el-dialog>
`,
mixins: [initTableMixins],
components: {
'file-import': httpVueLoader('/components/plugins/FileImport.vue')
},
data() {
return {
activityList: [],
budgetTypeOption: [],
unionList: [],
clubOption: [],
formRules: {
budgetTypeCode: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
fundsUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
helpUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
unionId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
formData: {
budgetDetails: []
},
dialogVisible: false,
editType: "applyList"
}
},
methods: {
flush() {
this.dialogVisible = false;
},
openDialogVisible() {
this.dialogVisible = true;
console.log(this.$refs.viewImport)
setTimeout(()=>{
this.$refs.viewImport.importData = {
fileList: [],
isFlag: false
}
this.$refs.viewImport.errorInfoData = {
totalCount: 0,
successCount: 0,
errorCount: 0,
errorList: 0,
}
},300)
},
deleteDetail(index, row) {
this.formData.budgetDetails.splice(index, 1)
this.$set(this.formData, "declareTotalBudgetMoney", this.formData.declareTotalBudgetMoney - row.budgetMoney)
},
budgetMoneyChange() {
const totalBudget = this.formData.budgetDetails
.filter(value => value.budgetMoney > 0)
.map(v => v.budgetMoney)
.reduce((sum, current) => sum + current, 0);
this.$set(this.formData, "declareTotalBudgetMoney", totalBudget)
},
doSubmit(flag) {
if (['ACTIVITY_BUDGET_TYPE_TWO'].includes(this.formData.budgetTypeCode) && !this.formData.activityMatter) {
this.$message({
type: 'error',
message: "请输入活动项目!"
})
return
}
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.formLoading = true
const formData = clone(this.formData)
const resp = await $.post("/platform/activity/budget/apply/doSubmit", {
activityBudget: JSON.stringify(formData),
flag: flag
})
if (resp.code === 0) {
this.$message({
type: 'success',
message: '提交成功'
})
this.formLoading = false
this.$emit('go_back')
} else {
this.$message({
type: 'error',
message: resp.msg
})
this.formLoading = false
}
}
)
}
});
},
clubChange(val) {
const club = this.clubOption.find(c => c.id === val)
this.formData.helpUnitName = club.clubName
},
unionChange(id) {
if (id) {
const union = this.unionList.find(c => c.id === id)
this.$set(this.formData, "helpUnitName", union.unionname)
} else {
this.$set(this.formData, "helpUnitName", '')
}
},
budgetTypeCodeChange(val) {
if (val === "ACTIVITY_BUDGET_TYPE_ONE") {
this.$set(this.formData, "helpUnitName", "校工会")
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
this.$set(this.formData, "helpUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
this.$set(this.formData, "unionId", '${@shiro.getPrincipalProperty("union").getId()}')
} else if (["ACTIVITY_BUDGET_TYPE_THREE", "ACTIVITY_BUDGET_TYPE_FOUR"].includes(val)) {
this.$set(this.formData, "helpUnitName", '')
this.$set(this.formData, "clubId", '')
} else {
this.$set(this.formData, "helpUnitName", "校工会")
}
if (val) {
const budgetType = this.budgetTypeOption.find(b => b.code === val)
this.$set(this.formData, "budgetTypeId", budgetType.code)
}
},
async getActivityBudgetType() {
const data = await getDictByCode("ACTIVITY_BUDGET_TYPE");
let budgetTypeOption = []
if ("${@shiro.hasRole('sysadmin')}" === 'true') {
this.budgetTypeOption = data
} else {
if ("${@shiro.hasRole('A06')||@shiro.hasRole('xghjf')}" === 'true') {
data.map(v => {
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if ("${@shiro.hasRole('gh14')||@shiro.hasRole('gh01')}" === 'true') {
data.map(v => {
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if ("${@shiro.hasRole('club01')||@shiro.hasRole('club05')}" === 'true') {
data.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE", "ACTIVITY_BUDGET_TYPE_FOUR"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
this.budgetTypeOption = budgetTypeOption
}
},
info(id, editType) {
this.editType = editType
if (id) {
this.openEdit(id)
} else {
this.formData = {
isSchoolBudget: false,
isRepeatReimbursement: true,
budgetDetails: [],
applyDate: moment().format('YYYY-MM-DD'),
userName: '${@shiro.getPrincipalProperty("username")}',
mobile: '${@shiro.getPrincipalProperty("mobile")}',
}
}
},
async findOne(id) {
const resp = await $.get('/platform/activity/budget/applyList/findOne', {id})
if (resp.code === 0) {
if (resp.data.budgets) {
resp.data.budgets = JSON.parse(resp.data.budgets)
}
return resp.data
}
},
async openEdit(id) {
const data = await this.findOne(id)
this.formData = data
},
async getClubsByUser() {
const {data} = await $.get("/platform/activity/budget/apply/getClubsByUser", {})
return data
},
async getSchoolBudget() {
const {data} = await $.get("/platform/activity/budget/apply/getSchoolBudget", {})
this.activityList = data
},
},
async created() {
this.clubOption = await this.getClubsByUser()
await this.getActivityBudgetType()
await this.getSchoolBudget()
this.unionList = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
},
style: /*language=CSS*/ `
.card-title {
margin-bottom: 20px;
letter-spacing: 2px;
display: flex;
justify-content: space-between;
height: 30px;
line-height: 30px;
}
.card-title .title-left {
font-size: 25px;
}
.card-title .title-right {
text-align: right;
font-size: 15px;
color: #0e78c5;
cursor: pointer;
}
.card-title .title-right:hover {
text-decoration: underline;
}
`
}
@@ -0,0 +1,217 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
:clearable="false"
@change="doSearch"
placeholder="选择年"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item"
v-if="pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_THREE'">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select @change="doSearch"
clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item"
v-if="pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_TWO'">
<div class="search-item-label">分工会:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionId" @change="doSearch" filterable
clearable
placeholder="请选择工会" style="width: 100%;">
<el-option v-for="item in unionList" :label="item.unionName"
:value="item.unionId">
</el-option>
</el-select>
</div>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<vi-title2 title="类型列表">
<template #func>
<el-radio-group @change="budgetTypeCodeChange" size="small"
v-model="pageForm.budgetTypeCode">
<el-radio-button :label="item.code" v-for="item in budgetTypeOption">
{{item.name}}
</el-radio-button>
</el-radio-group>
<el-button @click="doExport" size="small" class="ml10"
type="primary"
icon="el-icon-download">导出汇总表
</el-button>
</template>
</vi-title2>
<el-table :data="tableData" :summary-method="getSummaries" @sort-change="pageOrder"
row-key="id"
show-summary
style="width: 100%"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='year'">
{{moment(row.applyDate).format("YYYY")}}
</template>
</el-table-column>
</el-table>
</el-card>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
budgetTypeOption: [],
clubOption: [],
unionList: [],
pageForm: {
year: new Date().getFullYear() + "",
budgetTypeCode: "ACTIVITY_BUDGET_TYPE_ONE",
unionId: "",
clubId: "",
},
tableColumns: [
{prop: 'year', label: '年度'},
{prop: 'activityMatter', label: '活动项目'},
{prop: 'totalBudgetMoney', label: '预算金额'},
],
}
},
methods: {
doExport() {
const {year, budgetTypeCode, unionId, clubId} = this.pageForm
window.open("/platform/activity/budget/queryStatistics/doExport?year=" + year
+ "&budgetTypeCode=" + budgetTypeCode
+ "&unionId=" + unionId
+ "&clubId=" + clubId
)
},
budgetTypeCodeChange(val) {
this.$set(this.pageForm, "unionId", '')
this.$set(this.pageForm, "clubId", '')
this.tableData = []
if (["ACTIVITY_BUDGET_TYPE_ONE", "ACTIVITY_BUDGET_TYPE_FOUR"].includes(val)) {
this.tableColumns = [
{prop: 'year', label: '年度'},
{prop: 'activityMatter', label: '活动项目'},
{prop: 'totalBudgetMoney', label: '预算金额'},
]
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
this.tableColumns = [
{prop: 'year', label: '年度'},
{prop: 'unionName', label: '分工会'},
{prop: 'totalBudgetMoney', label: '预算金额'},
]
} else if (val === "ACTIVITY_BUDGET_TYPE_THREE") {
this.tableColumns = [
{prop: 'year', label: '年度'},
{prop: 'clubName', label: '协会名称'},
{prop: 'totalBudgetMoney', label: '预算金额'},
]
}
this.doSearch()
},
getSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (index === 3) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0).toFixed(2);
sums[index] += ' 元';
} else {
sums[index] = '';
}
});
return sums;
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
$.post(loc() + "/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code === 0) {
if (this.pageForm.budgetTypeCode === 'ACTIVITY_BUDGET_TYPE_TWO') {
data.data.map(v => {
if (!v.unionName) {
v.unionName = v.unitName
}
})
this.unionList = data.data
}
this.tableData = data.data;
} else {
this.$message.error(data.msg);
}
});
},
},
async created() {
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
this.clubOption = await getClubsByRole()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,388 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.budgetAudit .el-form-item__content {
margin-left: 0px !important;
}
</style>
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
@change="doSearch"
placeholder="选择年"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">申报人:</div>
<div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号/姓名"
clearable></el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动项目:</div>
<div class="search-item-option">
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
clearable></el-input>
</div>
</div>
<div class="search-item"
v-if="!pageForm.budgetTypeCode||pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_THREE'">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item"
v-if="!pageForm.budgetTypeCode||pageForm.budgetTypeCode==='ACTIVITY_BUDGET_TYPE_TWO'">
<div class="search-item-label">分工会:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionId" filterable
clearable
placeholder="请选择工会" style="width: 100%;">
<el-option v-for="item in unionList" :label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch()">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-radio-group @change="budgetTypeCodeChange" size="small"
v-model="pageForm.budgetTypeCode">
<el-radio-button :label="item.code" v-for="item in budgetTypeOption">
{{item.name}}
</el-radio-button>
</el-radio-group>
<el-radio-group @change="doSearch" size="small" class="ml5"
v-model="pageForm.auditState">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="1">已审核</el-radio-button>
<el-radio-button :label="2">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
ref="table"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='budgetTypeCode'">
<dict-tag :options="budgetTypeOption"
:value="row.budgetTypeCode"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop==='auditState'">
<span v-if="row.auditState===0">未提交</span>
<span v-if="row.auditState===1">待校工会审核</span>
<span v-if="row.auditState===2">校工会拒绝</span>
<span v-if="row.auditState===3">校工会退回</span>
<span v-if="row.auditState===4">已通过</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button :disabled="row.auditState!==1" @click="openAudit(row)"
size="mini"
type="primary">
审核
</el-button>
<el-button :disabled="row.auditState<=1" @click="doRevoke(row)"
size="mini" :loading="row.loading"
type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<info ref="viewInfo"></info>
</template>
<template #edit>
<info handle label="校工会审核" ref="editInfo">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title title="校工会审核信息"></vi-title>
<el-descriptions :column="3" border class="table_fixed budgetAudit">
<el-descriptions-item label="审核人">
{{formData.username}}
</el-descriptions-item>
<el-descriptions-item label="工号">
{{formData.loginname}}
</el-descriptions-item>
<el-descriptions-item label="审核时间">
{{formData.auditTime}}
</el-descriptions-item>
<el-descriptions-item label="审核金额">
<el-form-item label="" prop="totalBudgetMoney">
<el-input-number :min="0" :precision="2"
placeholder="请输入预算金额"
style="width: 100%"
v-model="formData.totalBudgetMoney"></el-input-number>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :span="2"></el-descriptions-item>
<el-descriptions-item label="审核意见" span="3">
<el-form-item label="" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<el-row class="mt20" justify="end" type="flex">
<!-- <el-button :loading="formLoading" @click="doSubmit(2)" type="danger">拒绝-->
<!-- </el-button>-->
<el-button :loading="formLoading" @click="doSubmit(3)" type="danger">
退回修改
</el-button>
<el-button :loading="formLoading" @click="doSubmit(4)" type="primary">通过
</el-button>
</el-row>
</el-form>
</template>
</info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
budgetTypeOption: [],
clubOption: [],
unionList : [],
pageForm: {
year: moment().format("YYYY"), auditState: 2,
budgetTypeCode: "",
activityMatter: "",
unionId: "",
clubId: "",
},
tableColumns: [
{prop: 'year', label: '年度'},
{prop: 'userName', label: '申报人姓名'},
{prop: 'loginName', label: '申报人工号'},
{prop: 'mobile', label: '联系方式'},
{prop: 'budgetTypeCode', label: '申报类型'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'activityMatter', label: '活动项目'},
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
{prop: 'applyDate', label: '申报时间'},
{prop: 'auditState', label: '审核状态'},
],
formRules: {
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
declareTotalBudgetMoney: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
}
},
components: {
'info': httpVueLoader('/components/activityBudget/info.vue?v=' + Date.now()),
},
methods: {
budgetTypeCodeChange() {
this.$set(this.pageForm, "unionId", '')
this.$set(this.pageForm, "clubId", '')
this.doSearch()
},
openSubmit() {
this.formData = {
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.public()
},
doRevoke(row) {
this.$confirm('确认要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
row.loading = true
const resp = await $.post(loc() + "/doRevoke", {id: row.id})
if (resp.code === 0) {
this.$message({
type: 'success',
message: '撤回成功!'
})
this.doSearch()
}
row.loading = false
})
},
getSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (index === 2 || index === 3) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0).toFixed(2);
sums[index] += ' 元';
} else {
sums[index] = '';
}
});
return sums;
},
doSubmit(auditState) {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.formLoading = true
this.formData.auditState = auditState
const resp = await $.post(loc() + "/doSubmit", this.formData)
if (resp.code === 0) {
this.$message({
type: 'success',
message: '提交成功!'
})
this.doSearch()
this.$refs.guava.index()
}
this.formLoading = false
})
}
})
},
doAllSubmit(auditState) {
this.$refs.form2.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.formLoading = true
this.formData.auditState = auditState
const resp = await $.post(loc() + "/doSubmit", this.formData)
if (resp.code === 0) {
this.$message({
type: 'success',
message: '提交成功!'
})
this.doSearch()
this.$refs.guava.index()
this.$refs.table.clearSelection();
}
this.formLoading = false
})
}
})
},
openView(row) {
this.$refs.guava.view()
this.$refs.viewInfo.getInfo(row.id)
},
async findOne(id) {
const {
data,
code,
msg
} = await $.get("/platform/activity/budget/applyList/findOne", {id})
return data
},
async openAudit(row) {
this.formData = {
id: row.id,
totalBudgetMoney: row.declareTotalBudgetMoney,
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.editInfo.getInfo(row.id)
}
},
async created() {
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
this.clubOption = await getClubsByRole()
this.unionList = await getUnionList(null)
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,179 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
:clearable="false"
@change="doSearch"
placeholder="选择年"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="类型列表">
<template #func>
<el-button @click="openAdd" icon="el-icon-s-tools"
size="small" type="primary">
新增类型
</el-button>
</template>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="150px">
<template scope="{row}">
<el-button @click="openEdit(row)" size="mini" type="primary">
编辑
</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</template>
</guava>
<el-dialog
:close-on-click-modal="false"
:title="title"
:visible.sync="dialogVisible"
width="30%">
<el-form :model="formData" :rules="formRules" label-width="100px" ref="form">
<el-form-item label="类型名称:" prop="budgetTypeName">
<el-input maxlength="15" placeholder="请输入类型名称"
v-model="formData.budgetTypeName"></el-input>
</el-form-item>
<el-form-item label="类型编号:" prop="location">
<el-input maxlength="15" placeholder="请输入类型编号"
v-model="formData.location"></el-input>
</el-form-item>
<el-form-item label="预算金额:" prop="budgetTypeMoney">
<el-input-number min="0" placeholder="请输入预算金额" style="width: 100%"
v-model="formData.budgetTypeMoney"></el-input-number>
</el-form-item>
</el-form-item>
<el-form-item label="备注:" prop="note">
<el-input :rows="3" maxlength="150"
placeholder="请输入备注" type="textarea" v-model="formData.note"></el-input>
</el-form-item>
</el-form>
<span class="dialog-footer" slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button @click="doSubmit" type="primary">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm: {year: new Date().getFullYear() + ""},
tableColumns: [
{prop: 'year', label: '年度'},
{prop: 'location', label: '编号'},
{prop: 'budgetTypeName', label: '类型'},
{prop: 'budgetTypeMoney', label: '金额'},
],
dialogVisible: false,
title: "新增类型",
formRules: {
budgetTypeName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
budgetTypeMoney: [{required: true, message: '必填', trigger: ['blur', 'change']}],
location: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
}
},
methods: {
openEdit(row) {
this.title = "编辑类型"
const formData = clone(row)
this.formData = formData
this.dialogVisible = true
},
openAdd() {
this.title = "新增类型"
this.formData = {}
this.dialogVisible = true
},
doSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
$.post(loc() + (this.formData.id ? "/doEdit" : "/doAdd"), this.formData).then(res => {
if (res.code === 0) {
this.$message({
type: 'success',
message: '保存成功!'
});
this.dialogVisible = false
this.doSearch()
}
})
}
})
},
doDelete(id) {
this.$confirm('确定删除该条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post(loc() + "/doDelete", {id}).then(res => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.doSearch();
})
}).catch(() => {
})
},
},
async created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -27,28 +27,17 @@ layout("/layouts/platform.html"){
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 clubOptions"
:key="item.stid"
:label="item.name"
:value="item.stid">
</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="pull-right offscreen-right mt5">
<el-button slot="append" icon="el-icon-download" type="primary" @click="exportExcel">
<!-- <div class="pull-right offscreen-right mt5">
<el-button slot="append" icon="el-icon-download" @click="exportExcel">
导出
</el-button>
</div>
</div>-->
</el-card>
<el-card shadow="never" class="mt10">
@@ -59,8 +48,8 @@ layout("/layouts/platform.html"){
<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">
<el-table-column label="年度" show-overflow-tooltip
header-align="center" align="center">
<template slot-scope="scope">
<span>{{scope.row.year}}</span>
</template>
@@ -88,18 +77,18 @@ layout("/layouts/platform.html"){
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>
<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="used_quota"
<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.used_quota">暂未使用</span>
<span v-else><i>{{scope.row.used_quota}}</i></span>
<span v-if="!scope.row.usedQuota">暂未使用</span>
<span v-else><i>{{scope.row.usedQuota}}</i></span>
</template>
</el-table-column>
@@ -108,16 +97,16 @@ layout("/layouts/platform.html"){
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>
<span v-if="!scope.row.usedQuota">{{scope.row.totalQuota}}元</span>
<span v-else><i>{{scope.row.totalQuota-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)" type="primary"
>使用详情
<el-button size="mini" @click="use(scope.row)" type="primary">
使用详情
</el-button>
</template>
</el-table-column>
@@ -159,11 +148,11 @@ layout("/layouts/platform.html"){
<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" type="primary">
<!--<div class="pull-right offscreen-right mt5">
<el-button slot="append" @click="openView">
<i class="ti-plus"></i>新增使用记录
</el-button>
</div>
</div>-->
</el-card>
<el-card shadow="never" class="mt10">
@@ -183,7 +172,7 @@ layout("/layouts/platform.html"){
<el-table-column label="活动名称" prop="project" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属协会" prop="name" header-align="center"
<el-table-column label="所属社团" prop="name" header-align="center"
align="center">
<template scope="scope"><span>{{clubInfo.name}} </span></template>
</el-table-column>
@@ -194,7 +183,8 @@ layout("/layouts/platform.html"){
<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"
<el-table-column label="活动费用" prop="adjust_money"
header-align="center"
align="center"></el-table-column>
<el-table-column label="调整人" prop="username" header-align="center"
@@ -212,7 +202,7 @@ layout("/layouts/platform.html"){
<!-- </el-table-column>-->
<el-table-column align="center" header-align="center" label="操作"
<!-- <el-table-column align="center" header-align="center" label="操作"
fixed="right"
width="120px">
<template slot-scope="{row}">
@@ -234,7 +224,7 @@ layout("/layouts/platform.html"){
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table-column>-->
</el-table>
@@ -360,7 +350,7 @@ layout("/layouts/platform.html"){
el: "#app",
data: function () {
return {
clubOptions: [],
showYsTz: false,
tab_loading: false,
pageForm: {
@@ -407,8 +397,7 @@ layout("/layouts/platform.html"){
editFormData: {},
editDialogVisible: false,
clubInfo: {},
clickUserInfo: {},
clubInfo: {}
}
},
methods: {
@@ -441,24 +430,25 @@ layout("/layouts/platform.html"){
this.editFormData.isClub = true
const resp = await $.post("/platform/jf/tz/doEdit", this.editFormData)
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
closeLoadingFunc(loading, resp, async () => {
this.editDialogVisible = false
this.use({id: this.formData.id, year: this.clickUserInfo.year, name: this.clickUserInfo.name})
} else {
this.$message.warning(resp.msg)
}
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.clickUserInfo = scope
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) {
@@ -541,6 +531,7 @@ layout("/layouts/platform.html"){
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;
}
@@ -591,7 +582,7 @@ layout("/layouts/platform.html"){
},
async created() {
this.clubOptions = await getClubsByRole();
this.unionOptions = await getUnions();
this.pageData();
}
});
@@ -17,25 +17,21 @@ layout("/layouts/platform.html"){
<el-date-picker
@change="doSearch"
style="width: 100%"
:clearable="false"
v-model="pageForm.year"
type="year"
value-format="yyyy"
format="yyyy"
format="yyyy"
placeholder="选择年度">
</el-date-picker>
</div>
<!--按院级工会-->
<div class="btn-group tool-button mt5">
<el-select v-model="pageForm.club_id" filterable
@change="doSearch"
placeholder="按协会名称" clearable>
<el-select v-model="pageForm.club_id" filterable placeholder="按协会名称" clearable>
<el-option
v-for="item in unionOptions"
:key="item.stid"
:key="item.id"
:label="item.name"
:value="item.stid">
:value="item.id">
</el-option>
</el-select>
</div>
@@ -45,21 +41,19 @@ layout("/layouts/platform.html"){
</div>
<!--文件上传按钮-->
<!-- <div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button type="primary" icon="el-icon-edit" @click="exportVisible = true">导入数据
</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">导入数据
<el-button type="primary" @click="issue" v-if="!this.flag">年度分配</el-button>
<el-button type="danger" @click="reset" v-else>
分配重置
</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>
<div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button v-if="clubList.length" type="primary" icon="el-icon-plus" @click="openAdd">添加数据</el-button>
</div>
</el-card>
<el-card shadow="never" class="mt10">
@@ -81,40 +75,18 @@ layout("/layouts/platform.html"){
<el-table-column label="协会编码" prop="code" sortable 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="填写总额度">
<el-table-column label="总额度" sortable="custom" prop="totalQuota"
show-overflow-tooltip>
<template slot-scope="{row}">
<el-input-number v-if="row.edit" max="100000" min="0"
style="width: 70%"
size="small"
v-model="row.totalQuota2" placeholder="填写总额度">
<template slot="append"></template>
</el-input>
</el-input-number>
<div v-else>
<span v-if="!scope.row.total_quota">暂未分配</span>
<span v-else><i>{{scope.row.total_quota}}</i></span>
<span v-if="!row.totalQuota">暂未分配</span>
<span v-else><i>{{row.totalQuota}}</i></span>
</div>
</template>
</el-table-column>
@@ -130,21 +102,14 @@ layout("/layouts/platform.html"){
circle></el-button>
</div>
<el-button v-else size="mini"
@click="$set(scope.row,'edit',true);$set(scope.row,'total_quota2',scope.row.total_quota);"
@click="$set(scope.row,'edit',true);$set(scope.row,'totalQuota2',scope.row.totalQuota);"
type="primary">
{{!scope.row.club_id?'分配':'编辑'}}
编辑
</el-button>
</template>
</el-table-column>
</el-table>
<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>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
@@ -154,100 +119,19 @@ layout("/layouts/platform.html"){
title="导入数据"
:visible.sync="exportVisible" :close-on-click-modal="false"
width="60%">
<file-import ref="viewImport" temp_url="/platform/jf/club/dataInput/downLoadTemp"
post_url="/platform/jf/club/dataInput/doImport"
:is_show_radio="false" @flush="doSearch"></file-import>
<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>
<template>
<el-dialog title="添加协会预算分配信息" :visible.sync="addDialogVisible" :close-on-click-modal="false" width="40%">
<el-form :model="formData" ref="addForm" :rules="rules" label-width="100px">
<el-form-item label="协会名称" prop="club_id">
<el-select v-model="formData.club_id" filterable
style="width: 90%;"
placeholder="请选择协会名称" clearable>
<el-option
v-for="item in clubList"
:key="item.stid"
:label="item.name"
:value="item.stid">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="标准" prop="history_club_avg">
<el-input-number maxlength="100" placeholder="请填写标准" style="width: 90%;"
type="text" v-model="formData.history_club_avg"></el-input-number>
</el-form-item>
<el-form-item label="总额度" prop="total_quota">
<el-input-number maxlength="100" placeholder="请填写总额度" style="width: 90%;"
type="text" v-model="formData.total_quota"></el-input-number>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doAdd">确 定</el-button>
</span>
</el-dialog>
</template>
</div>
<script>
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data: function () {
data() {
return {
textView: "本年下发",
flag: false,
@@ -264,200 +148,78 @@ layout("/layouts/platform.html"){
},
tableData: [],
//数据文件导入
tempFileList: [],
exportActive: 0,
exportVisible: false,
formData: {},
addDialogVisible: false,
rules: {
club_id: [{required: true, message: "请选择协会信息", trigger: ['blur', 'change']}],
history_club_avg: [{required: true, message: "请填写标准", trigger: ['blur', 'change']}],
total_quota: [{required: true, message: "请填写总额度", trigger: ['blur', 'change']}],
},
clubList:[],
}
},
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() {
console.log(this.nowData)
location.href = '/platform/jf/club/dataInput/downLoadTemp'
},
//数据文件弹出框
openExport() {
this.tempFileList = []
this.exportActive = 0
this.exportVisible = true
},
// 重置下发
async reset() {
// 确认弹出框
this.$confirm('您确定要重置年度费用吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.get("/platform/jf/st/fp/reset")
const resp = await $.post("/platform/jf/st/fp/reset")
if (resp.code === 0) {
this.flag = false;
this.$message.success("操作成功")
} else {
this.$message.warning("操作失败")
this.$message.success(resp.msg);
await this.isSet();
this.pageData()
}
this.doSearch()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
})
},
// 判断是否已经下发并改变下发按钮的状态
async isSet() {
const resp = await $.get("/platform/jf/st/fp/isSet")
// console.log(resp.data)
if (resp.data > 0) {
this.textView = "今年已下发"
this.flag = true
if (resp.code === 0) {
this.flag = (resp.data > 0)
}
},
// 下发
async issue() {
this.$confirm('生成年度费用前,请确认协会已在会员管理系统中调整。', '提示', {
this.$confirm('生成年度费用前,请确认已经申报完成。', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.get("/platform/jf/st/fp/issue")
const resp = await $.post("/platform/jf/st/fp/issue")
if (resp.code === 0) {
this.flag = true;
this.$message.success("操作成功")
this.$message.success(resp.msg);
await this.isSet();
this.pageData()
} else {
this.$message.warning("操作失败")
}
this.doSearch()
}).catch(() => {
});
},
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);
}
});
},
openAdd() {
this.formData = {}
this.addDialogVisible = true
},
async doAdd() {
console.log(this.formData)
const resp = await $.post('/platform/jf/st/fp/doAdd',this.formData)
if (resp.code === 0){
this.formData={}
this.addDialogVisible = false;
this.$notify.success(resp.msg)
this.pageData();
await this.showOrAddClub();
}else {
this.addDialogVisible = false;
this.$notify.warning(resp.msg)
}
},
async showOrAddClub() {
const clubList = await getClubsByRole();
clubList.forEach(v => {
if (this.tableData.find(o => v.name === o.name)){
this.unionOptions.push(v);
}else{
this.clubList.push(v);
this.$message.error(resp.msg);
}
})
}
},
doChangeYs(row) {
if (row.totalquota2 < 0) {
this.$message.warning("请检查总额度!");
return
}
$.post("/platform/jf/st/fp/changeYs", {
clubId: row.cid,
year: this.pageForm.year,
totalQuota: row.totalQuota2,
}).then(res => {
if (res.code === 0) {
this.$message.success("分配成功!");
row.edit = false
this.pageData()
} else {
this.$message.error(data.msg);
}
})
},
},
async created() {
this.unionOptions = await getClubs();
this.pageData();
await this.isSet();
await this.showOrAddClub();
}
});
</script>
@@ -1,179 +0,0 @@
<!--#
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: 700px;
}
</style>
<div id="app" v-cloak>
<guava>
<el-card shadow="never" style="width: 40%;margin: 0 auto">
<h3 slot="header" style="color: rgb(24, 103, 176); ">设置年度费用额度</h3>
<div style="padding-bottom: 50px;">
<vi-title class="mt10" title="校工会预算设置"></vi-title>
<el-row :gutter="20">
<el-col :span="24">
<el-input :disabled="schoolDisabled" :placeholder="this.schoolInput"
clearable placeholder="校工会"
style="width:400px" v-model="formData.schoolMoney">
<template slot="prepend">校工会</template>
</el-input>
</el-col>
</el-row>
<vi-title class="mt20" title="分工会预算设置"></vi-title>
<el-row :gutter="20">
<el-col :span="24">
<el-input :disabled="unionDisabled" :placeholder="this.unionInput"
clearable placeholder="分工会"
style="width:400px" v-model="formData.union_avg">
<template slot="prepend">分工会</template>
</el-input>
</el-col>
</el-row>
<vi-title class="mt20" title="协会/协会预算设置"></vi-title>
<el-row :gutter="20">
<el-col :span="24">
<el-input :disabled="clubDisabled" placeholder="基础人数"
clearable
style="width:400px" v-model="formData.clubExceedNum">
<template slot="prepend">基础人数</template>
</el-input>
</el-col>
<el-col :span="24" class="mt10">
<el-input :disabled="clubDisabled" placeholder="每人费用"
clearable
style="width:400px" v-model="formData.club_avg">
<template slot="prepend">每人费用</template>
</el-input>
</el-col>
<el-col :span="24" class="mt10">
<el-input clearable style="width:400px" v-model="formData.clubLeastMoney"
placeholder="基础额度">
<template slot="prepend">基础额度
</template>
</el-input>
</el-col>
<el-col :span="24" class="mt10">
<el-input clearable style="width:400px" v-model="formData.clubAtMostMoney"
placeholder="最高限额">
<template slot="prepend">最高限额
</template>
</el-input>
</el-col>
</el-row>
<el-row class="mt20" type="flex" justify="end">
<el-button @click="set" type="primary" v-loading="loading">确认</el-button>
</el-row>
</div>
</el-card>
</guava>
</div>
<script>
const vue = new Vue({
el: "#app",
data() {
return {
loading: "",
schoolDisabled: false,
unionDisabled: false,
schoolInput: "",
unionInput: "",
clubDisabled: false,
clubInput: "",
union: 2,
club: 3,
formData: {},
formRules: {
schoolMoney: [{
required: true,
message: '请选择是否启用',
trigger: ['blur', 'change']
}],
avglocalUnion: [{
required: true,
message: '请选择是否启用',
trigger: ['blur', 'change']
}],
avgAssociation: [{
required: true,
message: '请选择是否启用',
trigger: ['blur', 'change']
}],
}
}
},
methods: {
// 回显
async echo() {
const {data} = await $.get("/platform/jf/costsSet/costsSet/echo")
if (data) {
this.formData = data
}
},
// 设置是否
async set() {
const confirm = await this.$confirm('设置年度费用将清空前一次设置的预算是否继续!!!!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
this.loading = true;
const resp = await $.post("/platform/jf/costsSet/costsSet/set", this.formData)
if (resp.code == 0) {
this.loading = false;
this.$notify({
title: '成功',
message: '操作成功',
type: 'success'
});
} else {
this.$notify.error({
title: '错误',
message: '操作失败'
});
}
}
},
},
created() {
this.echo();
}
});
</script>
<!--#
}
#-->
@@ -14,9 +14,16 @@ layout("/layouts/platform.html"){
v-model="pageForm.year"
type="year"
value-format="yyyy"
format="yyyy年"
placeholder="选择年度">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button type="primary" @click="issue" v-if="!flag">年度分配</el-button>
<el-button type="danger" @click="reset" v-else>
分配重置
</el-button>
</div>
</el-card>
<el-card shadow="never" class="mt20">
@@ -55,7 +62,8 @@ layout("/layouts/platform.html"){
</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right">
<el-table-column align="center" header-align="center" label="操作"
fixed="right">
<template scope="{row}">
<div v-if="row.edit">
<el-button type="success" icon="el-icon-check" size="mini"
@@ -92,24 +100,65 @@ layout("/layouts/platform.html"){
pageForm: {
year: moment().format("YYYY")
},
flag: false,
}
},
methods: {
// 重置下发
async reset() {
this.$confirm('您确定要重置年度费用吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post("/platform/jf/schoolBudget/list/reset")
if (resp.code === 0) {
this.$message.success(resp.msg);
await this.isSet();
this.pageData()
}
})
},
// 下发
async issue() {
this.$confirm('生成年度费用前,请确认已经申报完成。', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post("/platform/jf/schoolBudget/list/issue")
if (resp.code === 0) {
this.$message.success(resp.msg);
await this.isSet();
this.pageData()
} else {
this.$message.error(resp.msg);
}
})
},
async doChangeYs(row) {
const data = await $.post(loc() + "/doChangeYs", {
totalQuota2: row.totalQuota2,
totalQuota: row.totalQuota2,
id: row.id
})
if (data.code == 0) {
if (data.code === 0) {
row.edit = false
this.doSearch()
this.$message.success("编辑成功");
} else {
this.$message.error(data.msg);
}
}
},
// 判断是否已经下发并改变下发按钮的状态
async isSet() {
const resp = await $.get("/platform/jf/schoolBudget/list/isSet")
if (resp.code === 0) {
this.flag = (resp.data > 0)
}
},
},
async created() {
await this.isSet();
this.pageData()
}
})
@@ -118,4 +167,4 @@ layout("/layouts/platform.html"){
<!--#
}
#-->
#-->
@@ -9,7 +9,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<div class="btn-group tool-button mt5">
<el-date-picker
@change="doSearch"
@change="doSearch();findInitData()"
style="width: 100%"
v-model="pageForm.year"
type="year"
@@ -22,12 +22,24 @@ layout("/layouts/platform.html"){
<el-input placeholder="请输入内容" v-model="pageForm.activity_name">
<template slot="prepend">活动名称</template>
<el-button slot="append" icon="el-icon-search"
@click="doSearch"></el-button>
@click="doSearch();findInitData()"></el-button>
</el-input>
</div>
</el-card>
<el-card shadow="never" class="mt20">
<vi-title2 title="明细列表">
<template #label_end>
<div style="margin-left: 10px;">
<el-tag style="font-size: 15px;">
{{pageForm.year}}年总经费 {{initData.totalQuota}} 元 ,已使用 {{initData.usedQuota}}
剩余:{{initData.totalQuota-initData.usedQuota}}元
<template v-if="initData.totalMoney>0">当前项目已使用:{{initData.totalMoney}}</template>
</el-tag>
</div>
</template>
</vi-title2>
<el-table :data="tableData" style="width: 100%" row-key="id"
@sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
@@ -46,8 +58,9 @@ layout("/layouts/platform.html"){
:width="column.width"
min-width="50"
>
<template v-if="column.prop=='holdUnit'" scope="{row}">
校工会
<template v-if="column.prop=='unitName'" scope="{row}">
<span v-if="row.jf_source==='ACTIVITY_BUDGET_TYPE_TWO'">{{row.unionName}}</span>
<span v-if="row.jf_source==='ACTIVITY_BUDGET_TYPE_ONE'">校工会</span>
</template>
</el-table-column>
</el-table>
@@ -64,17 +77,32 @@ layout("/layouts/platform.html"){
return {
tableColumns: [
{prop: 'year', label: '年度'},
{prop: 'activity_name', label: '项目'},
{prop: 'activity_name', label: '活动名称'},
{prop: 'venue', label: '活动地点'},
{prop: 'holdUnit', label: '举办单位'},
{prop: 'unitName', label: '报销单位'},
{prop: 'activity_time', label: '活动时间'},
{prop: 'money', label: '费用'},
],
pageForm: {
year: moment().format("YYYY")
},
initData: {},
}
}, async created() {
},
methods: {
findInitData() {
$.get("/platform/jf/schoolBudget/use/list/findInitData", {
year: this.pageForm.year,
activity_name: this.pageForm.activity_name
}, (res) => {
if (res.code === 0) {
this.initData = res.data
}
})
},
},
async created() {
this.findInitData()
this.pageData()
}
})
@@ -83,4 +111,4 @@ layout("/layouts/platform.html"){
<!--#
}
#-->
#-->
@@ -1,7 +1,17 @@
<!--#
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>
<guava>
<el-card shadow="never">
<div class="btn-group tool-button mt5">
@@ -18,12 +28,13 @@ layout("/layouts/platform.html"){
<!--按院级工会-->
<div class="btn-group tool-button mt5">
<el-select v-model="pageForm.union_id" filterable placeholder="按院级工会" clearable>
<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">
:key="item.unionId"
:label="item.unionName"
:value="item.unionId">
</el-option>
</el-select>
</div>
@@ -34,14 +45,16 @@ layout("/layouts/platform.html"){
<!--文件上传弹出框-->
<div class="btn-group tool-button mt5" style="float: right;padding-right: 5px">
<el-button type="primary" icon="el-icon-edit" @click="openExport">导入数据
</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="primary" @click="issue" v-if="!this.flag" v-loading="tab_loading">年度分配</el-button>
<el-button type="primary" @click="reset" v-else>分配重置</el-button>
<el-button type="primary" @click="issue" v-if="!this.flag">年度分配</el-button>
<el-button type="danger" @click="reset" v-else>
分配重置
</el-button>
</div>
</el-card>
@@ -54,52 +67,32 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="年度" show-overflow-tooltip header-align="center"
align="center">
<el-table-column label="年度" show-overflow-tooltip>
<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 label="院级工会名称" prop="unionName" show-overflow-tooltip>
</el-table-column>
<el-table-column label="院级工会编码" prop="unioncode" sortable 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>
<el-table-column label="院级工会编码" prop="unioncode" sortable
show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{row.unioncode?row.unioncode:row.unitCode}}</span>
</template>
</el-table-column>
<el-table-column label="总额度" sortable="custom" prop="totalquota"
show-overflow-tooltip align="center"
header-align="center"
align="center">
<el-table-column label="预算总额度" sortable="custom" prop="totalQuota"
show-overflow-tooltip>
<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>
<el-input-number v-if="scope.row.edit" maxlength="8" min="0"
style="width: 70%"
v-model="scope.row.totalquota2"
placeholder="填写预算总额度">
</el-input-number>
<div v-else>
<span v-if="!scope.row.totalquota">暂未分配</span>
<span v-else><i>{{scope.row.totalquota}}</i></span>
{{scope.row.totalQuota}}
</div>
</template>
</el-table-column>
@@ -115,9 +108,9 @@ layout("/layouts/platform.html"){
circle></el-button>
</div>
<el-button v-else size="mini"
@click="$set(scope.row,'edit',true);$set(scope.row,'totalquota2',scope.row.totalquota);"
@click="$set(scope.row,'edit',true);$set(scope.row,'totalquota2',scope.row.totalQuota);"
type="primary">
{{!scope.row.unid?'分配':'编辑'}}
编辑
</el-button>
</template>
</el-table-column>
@@ -131,61 +124,9 @@ layout("/layouts/platform.html"){
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"
style="display: flex;justify-content: center;align-items: center"
@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>
<file-import ref="viewImport" temp_url="/platform/jf/yjgh/dataInput/downLoadTemp"
post_url="/platform/jf/yjgh/dataInput/doImport"
:is_show_radio="false" @flush="doSearch"></file-import>
</el-dialog>
</div>
@@ -194,7 +135,7 @@ layout("/layouts/platform.html"){
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data: function () {
data() {
return {
flag: false,
unionOptions: [],
@@ -209,215 +150,86 @@ layout("/layouts/platform.html"){
},
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
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(async () => {
const resp = await $.get("/platform/jf/yjgh/ghys/reset")
const resp = await $.post("/platform/jf/yjgh/ghys/reset")
if (resp.code === 0) {
this.flag = false;
this.$message.success("操作成功")
} else {
this.$message.warning("操作失败")
this.$message.success(resp.msg);
await this.isSet()
this.pageData()
}
this.doSearch()
}).catch(() => {
});
})
},
// 判断是否已经下发并改变下发按钮的状态
async isSet() {
const resp = await $.get("/platform/jf/yjgh/ghys/isSet")
if (resp.data > 0) {
this.textView = "已下发"
this.flag = true
if (resp.code === 0) {
this.flag = (resp.data > 0)
}
},
// 下发
async issue() {
this.$confirm('生成年度费用前,请确认基层工会是否已在会员管理系统中调整会员数量。', '提示', {
this.$confirm('生成年度费用前,请确认已经申报完成。', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
this.tab_loading = true
// 查询是否设置了人均值
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")
if (resp.code === 0) {
this.flag = true;
this.$message.success("操作成功")
} else {
this.$message.warning("操作失败")
}
this.doSearch()
}
}
this.tab_loading = false
type: 'warning'
}).then(async () => {
const resp = await $.post("/platform/jf/yjgh/ghys/issue")
if (resp.code === 0) {
this.$message.success(resp.msg);
await this.isSet();
this.pageData()
} else {
this.$message.error(resp.msg);
}
});
})
},
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,
if (row.totalquota2 < 0) {
this.$message.warning("请检查总额度!");
return
}
$.post("/platform/jf/yjgh/ghys/changeYs", {
unionId: row.unionId,
year: this.pageForm.year,
totalQuota: row.totalquota2,
}, function (data) {
// console.log(row)
if (data.code === 0) {
vue.$message.success("分配成功!");
}).then(res => {
if (res.code === 0) {
this.$message.success("分配成功!");
row.edit = false
self.pageData()
this.pageData()
} else {
vue.$message.error(data.msg);
this.$message.error(data.msg);
}
});
})
},
getJfUnion() {
$.post("/platform/jf/yjgh/jfsy/getJfUnion", {year: this.pageForm.year}).then(res => {
if (res.code === 0) {
this.unionOptions = res.data;
}
})
},
},
async created() {
// 弹框 生成年度费用前,请确认基层工会已在会员管理系统中调整会员数量
// alert("生成年度费用前,请确认基层工会已在会员管理系统中调整会员数量")
/* await this.lastYear();*/
await this.isSet();
this.unionOptions = await getUnions();
this.getJfUnion();
this.pageData();
},
@@ -24,26 +24,29 @@ layout("/layouts/platform.html"){
type="year"
value-format="yyyy"
format="yyyy年"
:clearable="false"
placeholder="选择年度">
</el-date-picker>
</div>
<!--# if(@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')){ #-->
<div class="btn-group tool-button mt5">
<el-select v-model="pageForm.unionId" filterable placeholder="按院级工会"
clearable>
<el-select v-model="pageForm.unionId" filterable
placeholder="按院级工会" clearable>
<el-option
v-for="item in unionOptions"
:key="item.id"
:label="item.unionname"
:value="item.id">
:key="item.unionId"
:label="item.unionName"
:value="item.unionId">
</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="pull-right offscreen-right mt5">
<el-button slot="append" icon="el-icon-download" type="primary" @click="exportExcel">
<el-button slot="append" icon="el-icon-download" @click="exportExcel" type="primary">
导出
</el-button>
</div>
@@ -63,11 +66,10 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="院级工会名称" prop="unionname" show-overflow-tooltip
header-align="center"
align="center">
<el-table-column label="院级工会名称" prop="unionname"
show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.unionname}}
{{scope.row.unionName}}
</template>
</el-table-column>
@@ -75,43 +77,38 @@ layout("/layouts/platform.html"){
show-overflow-tooltip
header-align="center"
align="center">
</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 slot-scope="{row}">
<span>{{row.unioncode?row.unioncode:row.unitCode}}</span>
</template>
</el-table-column>
<el-table-column label="已使用额度" sortable="custom" prop="usedquota"
show-overflow-tooltip
align="center"
header-align="center" align="center">
<el-table-column label="分配总额度" sortable="custom" prop="totalQuota"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="!scope.row.usedquota">暂未使用</span>
<span v-else><i>{{scope.row.usedquota}}</i></span>
{{scope.row.totalQuota}}元
</template>
</el-table-column>
<el-table-column label="剩余额度" sortable="custom" prop="usedquota"
show-overflow-tooltip
align="center"
header-align="center" align="center">
<el-table-column label="已使用额度" sortable="custom" prop="usedQuota"
show-overflow-tooltip>
<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>
<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="totalQuota"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="!scope.row.totalQuota">{{scope.row.totalQuota}}元</span>
<span v-else><i>{{(scope.row.totalQuota-scope.row.usedQuota).toFixed(2)}}</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)"
<el-button size="mini" @click="use(scope.row)" plain
type="primary">使用详情
</el-button>
</template>
@@ -156,11 +153,11 @@ layout("/layouts/platform.html"){
<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" type="primary">
<!-- <div class="pull-right offscreen-right mt5">
<el-button slot="append" @click="openView">
<i class="ti-plus"></i>新增使用记录
</el-button>
</div>
</div>-->
</el-card>
<el-card shadow="never" class="mt10">
@@ -175,13 +172,13 @@ layout("/layouts/platform.html"){
align="center">
<template scope="scope"><span>{{unionInfo.year}} </span></template>
</el-table-column>
<el-table-column label="项目" prop="project" header-align="center"
<el-table-column label="活动名称" prop="project" header-align="center"
align="center"></el-table-column>
<el-table-column label="所属工会" prop="name" header-align="center"
<!--<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>-->
<el-table-column label="活动时间" prop="activitie_time"
header-align="center"
@@ -189,10 +186,11 @@ layout("/layouts/platform.html"){
<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"
<el-table-column label="活动费用" prop="adjust_money"
header-align="center"
align="center"></el-table-column>
<el-table-column label="调整人" prop="username" header-align="center"
<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
@@ -337,7 +335,6 @@ layout("/layouts/platform.html"){
<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="活动名称">
@@ -448,8 +445,7 @@ layout("/layouts/platform.html"){
editFormData: {},
editDialogVisible: false,
unionInfo: {},
clickUserInfo: {},
unionInfo: {}
}
},
methods: {
@@ -473,16 +469,22 @@ layout("/layouts/platform.html"){
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)
if (resp.code === 0) {
this.$message.success(resp.msg)
closeLoadingFunc(loading, resp, async () => {
this.editDialogVisible = false
this.use({id: this.formData.id, year: this.clickUserInfo.year, unionname: this.clickUserInfo.unionname})
} else {
this.$message.warning(resp.msg)
}
this.use({id: this.formData.id})
}, (data, msg) => {
this.$message.error(msg);
})
}
});
},
@@ -491,9 +493,10 @@ layout("/layouts/platform.html"){
this.formData.id = scope.id
this.usePageForm.adjust_id = scope.id
that.showYsTz = true
this.clickUserInfo = scope
this.unionInfo.year = scope.year
this.unionInfo.name = scope.unionname
this.unionInfo.year = scope.year ? scope.year : this.unionInfo.year
this.unionInfo.name = scope.unionname ? scope.unionname : this.unionInfo.name
$.post(base + "/platform/jf/tz/data", this.usePageForm, function (res) {
if (res.code === 0) {
that.useTableData = res.data.list
@@ -622,11 +625,18 @@ layout("/layouts/platform.html"){
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
getJfUnion() {
$.post("/platform/jf/yjgh/jfsy/getJfUnion", {year: this.pageForm.year}).then(res => {
if (res.code === 0) {
this.unionOptions = res.data;
}
})
},
},
async created() {
$(".gallery-loader").fadeOut();
this.pageData();
this.unionOptions = await getUnions();
this.getJfUnion();
},
@@ -1,413 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-input-number input {
text-align: left !important;
}
.el-input-number__decrease, .el-input-number__increase {
display: none;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">&emsp13;&emsp13;人:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="rei.userName"></el-option>
<el-option label="工号" value="rei.loginName"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">报销项目:</div>
<div class="search-item-option">
<el-select clearable style="width: 100%" v-model="pageForm.reiItemId">
<el-option value="ww" label="慰问"></el-option>
<el-option value="fyhd" label="活动"></el-option>
<el-option value="fyjj" label="建家"></el-option>
<el-option value="fyrc" label="日常"></el-option>
<el-option value="zflw" label="劳务"></el-option>
<el-option value="zfzj" label="专家"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<div class="pull-right offscreen-right mt5">
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.isAudit">
<el-radio-button :label="null">全部</el-radio-button>
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</div>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop==='unitName'">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitName}}
</template>
<template scope="{row}" v-else-if="column.prop==='unionname'">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
<template scope="{row}" v-else-if="column.prop=='reimbursementItemSort'">
{{row.reimbursementItemSort==='fy'?'费用报销':'支付报销'}}
</template>
<template scope="{row}" v-else-if="column.prop=='description'">
<span>{{row.activity_name!=null?'活动名称:'+row.activity_name:'被慰问人:'+row.be_username}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" 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 :command="{type:'doRecall',data:row}"
:disabled="row.State<=3043">
撤回
</el-dropdown-item>
<el-dropdown-item :command="{type:'Review',data:row}"
:disabled="row.State!=3043">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<reimbursement-new ref="rei_info2" handle label="审核">
<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="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="auditOpinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="danger" @click="doReview(1)">
</el-button>
<el-button type="warning" @click="doReview(2)">退回
</el-button>
<el-button type="success" @click="doReview(3)">
</el-button>
</div>
</template>
</reimbursement-new>
</template>
<template #view>
<!--<activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>-->
<reimbursement-new ref="rei_info"></reimbursement-new>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
ReimbursementIsSign: false,
reimbursementItemId: "",
unions: [],
units: [],
tabLoading: false,
userOptions: [],
formData: {},
tableData: [],
typeOptions: [],
pageForm: {
searchName: "rei.userName",
isAudit: false,
year: new Date().getFullYear() + ""
},
formRules: {
/* auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],*/
},
tableColumns: [
{prop: 'loginName', label: '经办人工号'},
{prop: 'userName', label: '经办人'},
{prop: 'unionName', label: '所在工会'},
{prop: 'unitName', label: '所在单位', sortable: true},
{prop: 'mobile', label: '联系方式'},
{prop: 'reimbursementItemSort', label: '报销类别', sortable: true},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态'},
{prop: 'description', label: '备注'},
],
subDis: false,
subLoading1: false,
subLoading2: false,
subLoading3: false,
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'info': httpVueLoader('/components/condolence/Info.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'reimbursement-new': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=4.0.0'),
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'doRecall') {
this.doRecall(data)
} else if (type == 'Review') {
this.openReview(data)
}
},
async doRecall(row) {
const confirm = await this.$confirm('您确定要撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
if ("confirm" === confirm) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + "/doRecall", {
id: row.id
});
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
} else {
this.$message.warning(resp.msg)
}
loading.close()
}
},
async doReview(flag) {
const confirm = await this.$confirm('您确定要审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
if ("confirm" === confirm) {//确认后再执行
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + "/doSubmit", {
id: this.formData.id,
flag: flag,
auditOpinion: this.formData.auditOpinion
});
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
this.$refs.guava.index()
} else {
this.$message.warning(resp.msg)
}
loading.close()
}
},
openReview(row) {
this.formData = {
id: row.id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD')
}
this.$refs.rei_info2.getInfo(row.id)
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
openView(row) {
this.$refs.rei_info.getInfo(row.id)
this.$refs.guava.view()
},
async getTypeOptions() {
const {code, data} = await $.get("/platform/condolence/type/getAll")
if (code == 0) {
this.typeOptions = data
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
},
async pageData() {
let form = clone(this.pageForm)
if (form.isAudit === null) {
delete form.isAudit
}
const resp = await $.post(loc() + "/pageData", form)
if (resp.code === 0) {
this.tableData = resp.data.list;
this.pageForm.totalCount = resp.data.totalCount;
} else {
this.$message.error(resp.msg);
}
},
},
async created() {
this.getTypeOptions()
if ("${@shiro.hasAnyRoles('sysadmin','A06','xghkj')}" === 'true') {
this.unions = await getUnionList(null)
} else {
this.unions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
this.pageForm.unionId = this.unions[0].id
}
this.flushUnits()
this.pageData();
const aa = await getDictState("ReimbursementIsSign")
this.ReimbursementIsSign = aa.disabled
}
})
</script>
<!--#
}
#-->
@@ -21,50 +21,6 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item">
<div class="search-item-label">工会名称:</div>
<div class="search-item-option">
<el-select @change="flushUnits" @clear="flushUnits" clearable filterable
placeholder="请选择工会" style="width: 100%"
v-model="pageForm.unionId">
<el-option
:key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in unionList">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">单位名称:</div>
<div class="search-item-option">
<el-select @change="doSearch" clearable="true" filterable="true"
placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in unitList"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">报销项目:</div>
<div class="search-item-option">
<el-select @change="doSearch" clearable
style="width: 100%" v-model="pageForm.reiItemId">
<el-option value="ww" label="慰问"></el-option>
<el-option value="fyhd" label="活动"></el-option>
<el-option value="fyjj" label="建家"></el-option>
<el-option value="fyrc" label="日常"></el-option>
<el-option value="zflw" label="劳务"></el-option>
<el-option value="zfzj" label="专家"></el-option>
</el-select>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
<div class="search-item-label">&ensp;&ensp;人:</div>
@@ -85,21 +41,16 @@ layout("/layouts/platform.html"){
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-button :disabled="selectRows.length!==1" @click="printPdf" size="mini"
type="primary">打印
</el-button>
<!--<el-button :disabled="selectRows.length!==1" @click="printPdf" size="mini" type="primary">打印
</el-button>-->
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize"
@selection-change="(val)=>{this.selectRows = val}"
@sort-change="pageOrder"
class="vi-table" row-key="id" style="width: 100%;margin-bottom: 20px"
v-loading="tableLoading">
<el-table-column align="center" header-align="center"
type="selection"></el-table-column>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index"
width="80px"></el-table-column>
@@ -122,56 +73,46 @@ layout("/layouts/platform.html"){
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='reimbursementItemSort'">
{{row.reimbursementItemSort==='fy'?'费用报销':'支付报销'}}
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='description'">
<span>{{row.activity_name!=null?'活动名称:'+row.activity_name:'被慰问人:'+row.be_username}}</span>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop==='unitname'">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitName}}
</template>
<template scope="{row}" v-else-if="column.prop==='unionname'">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionName}}
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)&&['4270', '4330', '4450'].includes(row.unitId)">{{row.unitName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)&&!['4270', '4330', '4450'].includes(row.unitId)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="150px">
prop="userOnline" width="300px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item :disabled="row.stateId!=3040"
:command="{type:'submit',data:row}">
提交
</el-dropdown-item>-->
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item
:command="{type:'edit',data:row}"
:disabled="row.State>3043">
修改
</el-dropdown-item>
<el-dropdown-item
:disabled="row.State>3043"
:command="{type:'delete',data:row}">
删除
</el-dropdown-item>
<el-dropdown-item
:disabled="row.State<3100"
:command="{type:'export',data:row}">
导出报销表
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button size="mini" type="primary" @click="openView(row.id)">
查看
</el-button>
<el-button size="mini" type="primary" @click="openEdit(row.id)"
v-if="[3030,3046,3048,3050,3056,3066,3076,3086,3096].includes(row.State)">
编辑
</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger"
:disabled="![3030].includes(row.State)"
v-if="${!@shiro.hasRole('sysadmin')}">
删除
</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger"
v-if="${@shiro.hasRole('sysadmin')}">
删除
</el-button>
<!-- <el-button size="mini" type="primary" @click="doExport(row.id)"
:disabled="row.State!=3100">
导出报销表
</el-button>-->
</template>
</el-table-column>
@@ -183,8 +124,6 @@ layout("/layouts/platform.html"){
<template #view>
<reimbursement-new ref="rei_info"></reimbursement-new>
<!--<activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>-->
</template>
@@ -212,11 +151,11 @@ layout("/layouts/platform.html"){
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'reimbursementItemSort', label: '报销类别', sortable: true},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'description', label: '备注'},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
formRules: {
@@ -226,45 +165,38 @@ layout("/layouts/platform.html"){
trigger: ['blur', 'change']
}],
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_money: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
activity_card_number: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
activity_time: [{required: false, message: '必填', trigger: ['blur', 'change']}],
}
activity_time: [{
required: false,
message: '必填',
trigger: ['blur', 'change']
}],
},
budgetTypeOption: [],
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'info': httpVueLoader('/components/condolence/Info.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'reimbursement-new': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=4.0.0'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
'reimbursement-new': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=' + new Date().getTime()),
},
methods: {
printPdf() {
window.open("/platform/reimbursement/Summary/reiExport?id=" + this.selectRows[0].id + "&Print=true")
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'submit') {
this.doSubmit(data)
} else if (type == 'edit') {
this.openEdit(data)
} else if (type == 'delete') {
this.doDelete(data)
} else if (type == 'export') {
this.export(data)
}
},
export(data) {
window.open("/platform/reimbursement/Summary/reiExport?id=" + data.id + "&Print=false")
doExport(id) {
window.open("/platform/reimbursement/Summary/reiExport?id=" + id + "&Print=true")
},
doSubmit(row) {
const {reimbursementId} = row
@@ -278,70 +210,46 @@ layout("/layouts/platform.html"){
this.$set(row, "delLoading", true)
const resp = await $.post(loc() + "/doSubmit", {id: reimbursementId});
if (resp.code === 0) {
this.pageData()
this.$message.success(resp.msg)
}else{
this.notifyError(resp.msg)
}
this.$set(row, "delLoading", false)
requestLaterMsgFun(vue, resp, async () => {
this.pageData()
}, () => {
}, () => {
this.$set(row, "delLoading", false)
})
}
}
});
},
doDelete(row) {
const {id} = row
doDelete(id) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
this.$set(row, "delLoading", true)
this.submitLoading = true
const resp = await $.post(loc() + "/doDelete", {id: id});
this.submitLoading = false
if (resp.code === 0) {
this.pageData()
this.$message.success(resp.msg)
}else{
this.notifyError(resp.msg)
}
this.$set(row, "delLoading", false)
}
}
});
},
openView(row) {
/* const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
if (reimbursementItemId != 4) {
this.$refs.act_info.getActInfo(reimbursementId)
} else {
this.$refs.info.getInfo(reimbursementId)
}*/
this.$refs.rei_info.getInfo(row.id)
openView(id) {
this.$refs.guava.view()
this.$refs.rei_info.getInfo(id)
},
openEdit(row) {
window.location.href = "/platform/reimbursement/applyNew?id=" + row.id
/* const {bxId, reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
this.formData = {}
this.$set(row, "editLoading", true)
if (reimbursementItemId != 4) {
this.actOpenEdit(row, bxId)
} else {
this.conOpenEdit(row, reimbursementId)
}
this.$refs.guava.edit()*/
openEdit(id) {
sublime.jumpPagePjax("/platform/reimbursement/applyNew?id=" + id)
},
async conOpenEdit(row, id) {
const resp = await $.get("/platform/fw/condolence/info/findOne", {id})
if (resp.code === 0) {
const v = resp.data
requestLaterFun(resp, async (v) => {
condolence.toFormData(v)
v.bankUserName = row.bankUserName
v.bankCardNumber = row.bankCardNumber
@@ -352,7 +260,7 @@ layout("/layouts/platform.html"){
this.formData.sign = v.manager_sign
await this.userChange(v.be_user)
}
})
},
async getUserData(userId) {
const {data} = await $.get("/platform/fw/condolence/apply/getUserData", {userId})
@@ -366,14 +274,13 @@ layout("/layouts/platform.html"){
},
async actOpenEdit(row, id) {
const resp = await $.get(loc() + "/findOne", {id})
if (resp.code === 0) {
const v = resp.data
requestLaterFun(resp, async (v) => {
v.bankUserName = row.bankUserName
v.bankCardNumber = row.bankCardNumber
v.bankOfDeposit = row.bankOfDeposit
this.formData = v
this.formData.files = JSON.parse(v.files)
}
})
},
doEdit() {
this.$refs["form"].validate(async (valid) => {
@@ -421,12 +328,6 @@ layout("/layouts/platform.html"){
this.$set(this.formData, "way", data.way)
}
},
async getTypeOptions() {
const {code, data} = await $.get("/platform/condolence/type/getAll")
if (code == 0) {
this.typeOptions = data
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
@@ -438,10 +339,8 @@ layout("/layouts/platform.html"){
},
},
async created() {
this.unionList = await getUnionList("${@shiro.getPrincipalProperty('union').getId()}")
this.getTypeOptions()
this.flushUnits()
this.pageData()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
}
@@ -1,346 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava padding="0% 5%" ref="guava">
<template>
<el-card shadow="never">
<search>
<search-item label="年&emsp;&emsp;度:">
<el-date-picker
placeholder="选择年"
style="width: 150px"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="所属工会:">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位:">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</search-item>
<template v-if="searchMore">
<search-item label="报销项目">
<el-select clearable style="width: 100%" v-model="pageForm.reiItemId">
<el-option :value="4" label="慰问"></el-option>
<el-option :value="1" label="文体活动"></el-option>
<el-option :value="2" label="日常活动"></el-option>
<el-option :value="3" label="其它活动"></el-option>
</el-select>
</search-item>
</template>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
<more v-model="searchMore"></more>
</div>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<div class="pull-right offscreen-right mt5">
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.isAudit">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</div>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" 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 :command="{type:'Review',data:row}"
:disabled="row.State!=3090">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info handle label="常务副主席审核" ref="act_info2" v-show="reimbursementItemId!=4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="auditSign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.auditSign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</activity-bx-info>
<info handle label="常务副主席审核" ref="info2" v-show="reimbursementItemId==4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="sign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.sign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
ReimbursementIsSign: false,
reimbursementItemId: "",
unions: [],
units: [],
tabLoading: false,
userOptions: [],
formData: {},
tableData: [],
typeOptions: [],
pageForm: {
isAudit: false,
year: new Date().getFullYear() + ""
},
formRules: {
/*auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],*/
},
tableColumns: [
{prop: 'userName', label: '经办人'},
{prop: 'unionname', label: '所在工会'},
{prop: 'unitName', label: '所在单位', sortable: true},
{prop: 'mobile', label: '联系方式'},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态'},
],
subDis: false,
subLoading1: false,
subLoading2: false,
subLoading3: false,
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'info': httpVueLoader('/components/condolence/Info.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 == 'Review') {
this.openReview(data)
}
},
openView(row) {
const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
if (reimbursementItemId != 4) {
this.$refs.act_info.getActInfo(reimbursementId)
} else {
this.$refs.info.getInfo(reimbursementId)
}
this.$refs.guava.view()
},
openReview(row) {
const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
this.formData = {
id: reimbursementId,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
reimbursementItemId: reimbursementItemId,
}
this.subLoading1 = false
this.subLoading2 = false
this.subLoading3 = false
if (reimbursementItemId != 4) {
this.$refs.act_info2.getActInfo(reimbursementId)
} else {
this.$refs.info2.getInfo(reimbursementId)
}
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doReview(flag) {
this.$refs["form"].validate(async (valid) => {
const conMoney = this.$refs.info2.viewData.money
const actMoney = this.$refs.act_info2.viewData.activity_money
this.formData.money = this.formData.reimbursementItemId != 4 ? actMoney : conMoney
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(loc() + "/doReview", this.formData)
if (resp.code === 0) {
this.pageData()
this.$refs.guava.index()
this.$message.success(resp.msg)
}else{
this.notifyError(resp.msg)
}
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
}
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
},
},
async created() {
this.pageData();
this.unions = await getUnionList()
this.flushUnits()
const aa = await getDictState("ReimbursementIsSign")
this.ReimbursementIsSign = aa.disabled
}
})
</script>
<!--#
}
#-->
@@ -14,7 +14,8 @@ layout("/layouts/platform.html"){
<div class="search-item-option">
<el-date-picker type="daterange" style="width: 100%" range-separator="——"
v-model="pageForm.reimbursementDate"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期"
value-format="yyyy-MM-dd" format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker>
</div>
</div>
@@ -40,7 +41,8 @@ layout("/layouts/platform.html"){
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
@@ -51,36 +53,43 @@ layout("/layouts/platform.html"){
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">报销项目</div>
<div class="search-item-label">所属协会</div>
<div class="search-item-option">
<el-select clearable style="width: 100%" v-model="pageForm.reiItemId">
<el-option value="ww" label="慰问"></el-option>
<el-option value="fyhd" label="活动"></el-option>
<el-option value="fyjj" label="建家"></el-option>
<el-option value="fyrc" label="日常"></el-option>
<el-option value="zflw" label="劳务"></el-option>
<el-option value="zfzj" label="专家"></el-option>
<el-select v-model="pageForm.clubId"
clearable
style="width: 100%"
placeholder="请选择所属协会">
<el-option
v-for="item in clubList"
:key="item.stid"
:label="item.name"
:value="item.stid">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">经费来源</div>
<div class="search-item-label">活动类型</div>
<div class="search-item-option">
<el-select clearable style="width: 100%" v-model="pageForm.jf_source">
<el-option value="1" label="校工会"></el-option>
<el-option value="2" label="分工会"></el-option>
<el-option value="3" label="协会"></el-option>
<el-select clearable placeholder="活动类型"
style="width: 100%;"
v-model="pageForm.jf_source">
<el-option :label="item.name" :value="item.code"
v-for="item in budgetTypeOption"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
</el-button>
</div>
</div>
</el-card>
@@ -94,9 +103,13 @@ layout("/layouts/platform.html"){
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
show-summary
:summary-method="getSummaries"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
@@ -113,11 +126,17 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='reimbursementItemSort'">
{{row.reimbursementItemSort==='fy'?'费用报销':'支付报销'}}
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='description'">
<span>{{row.activity_name!=null?'活动名称:'+row.activity_name:'被慰问人:'+row.be_username}}</span>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='money'">
<span>{{row.money}}元</span>
@@ -125,23 +144,13 @@ layout("/layouts/platform.html"){
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="200">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" 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
:command="{type:'export',data:row}">
打印
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="primary" size="mini" @click="openView(row.id)">查看
</el-button>
<!-- <el-button type="primary" size="mini" @click="doExport(row.id)">打印
</el-button>-->
</template>
</el-table-column>
</el-table>
@@ -150,8 +159,6 @@ layout("/layouts/platform.html"){
</el-card>
<template #view>
<!-- <activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>-->
<reimbursement-new ref="rei_info"></reimbursement-new>
</template>
@@ -164,86 +171,93 @@ layout("/layouts/platform.html"){
mixins: [initTableMixins],
data() {
return {
reimbursementItemId: "",
unions: [],
units: [],
tabLoading: false,
userOptions: [],
formData: {},
tableData: [],
typeOptions: [],
clubList: [],
pageForm: {
reimbursementDate: [],
searchName: "rei.userName",
searchKeyword: '',
jf_source: '',
unionId: '',
unitId: '',
reiItemId: '',
isAudit: false,
},
formRules: {
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
clubId: '',
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'reimbursementItemSort', label: '报销类别', sortable: true},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'description', label: '备注'},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
subDis: false,
subLoading1: false,
subLoading2: false,
subLoading3: false,
budgetTypeOption:[]
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'info': httpVueLoader('/components/condolence/Info.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'reimbursement-new': httpVueLoader('/components/reimbursement/reimbursementNew.vue'),
},
methods: {
getSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
} else if ([1].includes(index)) {
sums[index] = '';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
let num = sums[index].toFixed(2)
num += '元';
sums[index] = num
} else {
sums[index] = '';
}
});
return sums;
},
doExportUserExcel() {
const {searchKeyword, searchName, unionId, unitId, reiItemId, reimbursementDate} = this.pageForm
window.open(loc() + "/doExportUserExcel?searchKeyword=" + searchKeyword + "&searchName=" + searchName + "&unionId=" + unionId + "&unitId" + unitId + "&reiItemId=" + reiItemId + "&reimbursementDate=" + JSON.stringify(reimbursementDate))
const {
searchKeyword,
searchName,
unionId,
unitId,
clubId,
reimbursementDate,
jf_source
} = this.pageForm
window.open(loc() + "/doExportUserExcel?searchKeyword=" + searchKeyword +
"&searchName=" + searchName +
"&jf_source=" + jf_source +
"&unionId=" + unionId +
"&unitId" + unitId +
"&clubId=" + clubId +
"&reimbursementDate=" + JSON.stringify(reimbursementDate))
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'export') {
this.export(data)
}
doExport(id) {
window.open("/platform/reimbursement/Summary/reiExport?id=" + id + "&Print=true")
},
export(data) {
const {reimbursementItemId, id} = data
if (reimbursementItemId != 4) {
window.open("/platform/reimbursement/Summary/reiExport?id=" + id + "&Print=true")
} else {
window.open("/platform/reimbursement/Summary/reiExport?id=" + id + "&Print=true")
}
},
openView(row) {
/* const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
if (reimbursementItemId != 4) {
this.$refs.act_info.getActInfo(reimbursementId)
} else {
this.$refs.info.getInfo(reimbursementId)
}*/
this.$refs.rei_info.getInfo(row.id)
openView(id) {
this.$refs.guava.view()
this.$refs.rei_info.getInfo(id)
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
@@ -269,13 +283,10 @@ layout("/layouts/platform.html"){
},
async created() {
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')||@shiro.hasRole('xghkj')}" === 'true') {
this.unions = await getUnionList()
} else {
this.unions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
this.pageForm.unionId = this.unions[0].id
}
this.flushUnits()
this.unions = await getUnionList()
this.clubList = await getClubsByRole()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
}
})
</script>
@@ -1,346 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava padding="0% 5%" ref="guava">
<template>
<el-card shadow="never">
<search>
<search-item label="年&emsp;&emsp;度:">
<el-date-picker
placeholder="选择年"
style="width: 150px"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="所属工会:">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位:">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</search-item>
<template v-if="searchMore">
<search-item label="报销项目">
<el-select clearable style="width: 100%" v-model="pageForm.reiItemId">
<el-option :value="4" label="慰问"></el-option>
<el-option :value="1" label="文体活动"></el-option>
<el-option :value="2" label="日常活动"></el-option>
<el-option :value="3" label="其它活动"></el-option>
</el-select>
</search-item>
</template>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
<more v-model="searchMore"></more>
</div>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<div class="pull-right offscreen-right mt5">
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.isAudit">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</div>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" 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 :command="{type:'Review',data:row}"
:disabled="row.State!=3080">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info handle label="分管副主席审核" ref="act_info2" v-show="reimbursementItemId!=4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="签&emsp;&emsp;字" prop="auditSign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.auditSign" prefix="condolence"></sign>
</el-form-item>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</activity-bx-info>
<info handle label="分管副主席审核" ref="info2" v-show="reimbursementItemId==4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="sign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.sign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
ReimbursementIsSign: false,
reimbursementItemId: "",
unions: [],
units: [],
tabLoading: false,
userOptions: [],
formData: {},
tableData: [],
typeOptions: [],
pageForm: {
isAudit: false,
year: new Date().getFullYear() + ""
},
formRules: {
/* auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],*/
},
tableColumns: [
{prop: 'userName', label: '经办人'},
{prop: 'unionname', label: '所在工会'},
{prop: 'unitName', label: '所在单位', sortable: true},
{prop: 'mobile', label: '联系方式'},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态'},
],
subDis: false,
subLoading1: false,
subLoading2: false,
subLoading3: false,
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'info': httpVueLoader('/components/condolence/Info.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 == 'Review') {
this.openReview(data)
}
},
openView(row) {
const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
if (reimbursementItemId != 4) {
this.$refs.act_info.getActInfo(reimbursementId)
} else {
this.$refs.info.getInfo(reimbursementId)
}
this.$refs.guava.view()
},
openReview(row) {
const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
this.formData = {
id: reimbursementId,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
reimbursementItemId: reimbursementItemId,
}
this.subLoading1 = false
this.subLoading2 = false
this.subLoading3 = false
if (reimbursementItemId != 4) {
this.$refs.act_info2.getActInfo(reimbursementId)
} else {
this.$refs.info2.getInfo(reimbursementId)
}
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doReview(flag) {
this.$refs["form"].validate(async (valid) => {
const conMoney = this.$refs.info2.viewData.money
const actMoney = this.$refs.act_info2.viewData.activity_money
this.formData.money = this.formData.reimbursementItemId != 4 ? actMoney : conMoney
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(loc() + "/doReview", this.formData)
if (resp.code === 0) {
this.pageData()
this.$refs.guava.index()
this.$message.success(resp.msg)
}else{
this.notifyError(resp.msg)
}
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
}
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
},
},
async created() {
this.pageData();
this.unions = await getUnionList()
this.flushUnits()
const aa = await getDictState("ReimbursementIsSign")
this.ReimbursementIsSign = aa.disabled
}
})
</script>
<!--#
}
#-->
@@ -22,7 +22,15 @@ layout("/layouts/platform.html"){
<el-form :model="formData" label-position="right" label-suffix=""
label-width="130px" :rules="rules" ref="addForm">
<el-row gutter="60">
<el-col :span="24">
<el-form-item label="活动类型" prop="jf_source">
<el-radio-group v-model="formData.jf_source" @change="jfSourceChange">
<el-radio border :label="i.code" v-for="i in budgetTypeOption">
{{i.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="经办人" prop="userName">
<el-input readonly type="text" v-model="formData.userName"></el-input>
@@ -35,52 +43,6 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销类别" prop="reimbursementItemSort">
<el-radio-group v-model="formData.reimbursementItemSort"
@change="reimbursementItemSortChange">
<el-radio label="fy" border>费用报销</el-radio>
<el-radio label="zf" border>支付凭证</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销项目" prop="reimbursementItemId">
<el-radio-group v-model="formData.reimbursementItemId"
@change="reimbursementItemChange">
<el-radio :label="item.key" border
v-for="item in reimbursementItem.filter(v=>v.type==formData.reimbursementItemSort)">
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="支付方式" prop="paymentMethodId">
<el-radio-group v-model="formData.paymentMethodId"
@change="paymentMethodChange">
<el-radio :label="item.key" border v-for="item in paymentMethod">
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销经费来源" prop="jf_source">
<el-radio-group v-model="formData.jf_source" @change="jfSourceChange">
<el-radio border :label="i.key" v-for="i in jfSourceList">
{{i.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式" prop="mobile">
<el-input type="text" v-model="formData.mobile"
@@ -88,9 +50,11 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.jf_source === '3'">
<el-col :span="12"
v-if="['ACTIVITY_BUDGET_TYPE_FOUR','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.jf_source)">
<el-form-item label="所属协会" prop="clubId">
<el-select v-model="formData.clubId" @change="clubChange"
<el-select v-model="formData.clubId" @change="getBudgetMoneyOrActivity"
style="width: 100%"
placeholder="请选择所属协会">
<el-option
@@ -104,255 +68,33 @@ layout("/layouts/platform.html"){
</el-col>
<el-col :span="12">
<el-form-item label="经费余额" prop="balance">
<el-input type="text" v-model="balance" readonly></el-input>
<el-form-item label="经费余额" prop="budgetMoney">
<el-input type="text" v-model="budgetMoney" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="户名" prop="bankUserName">
<!--<el-input type="text" placeholder="请输入户名" style="width: 99%"
v-model="formData.bankUserName"></el-input>-->
<el-autocomplete style="width: 100%"
v-model="formData.bankUserName"
:fetch-suggestions="querySearchAsync"
placeholder="请输入户名"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行账号" prop="bankCardNumber">
<el-input type="text" placeholder="请输入银行账号"
v-model="formData.bankCardNumber"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行" prop="bankOfDeposit">
<el-input type="text" placeholder="请输入开户行"
v-model="formData.bankOfDeposit"></el-input>
</el-form-item>
</el-col>
<template
v-if="formData.reimbursementItemId==='fyww'||formData.reimbursementItemId==='zfww'">
<template>
<el-col :span="12">
<el-form-item label="慰问对象" prop="be_user">
<el-select
v-model="formData.be_user"
:remote-method="userRemoteMethod"
clearable
filterable
placeholder="请输入姓名或工号查找"
remote
reserve-keyword
style="width: 100%"
@change="userChange">
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.username+''+item.loginname+''"
:value="item.id">
</el-option>
<el-form-item label="项目名称" prop="activity_name"
v-if="['ACTIVITY_BUDGET_TYPE_FOUR','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.jf_source)">
<el-input v-model="formData.activity_name" placeholder="请输入项目名称"
></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="activityId" v-else>
<el-select v-model="formData.activityId" filterable
@change="activityNameChange"
default-first-option
placeholder="请选择项目名称" style="width: 100%">
<el-option :label="item.activityMatter"
:value="item.id"
v-for="item in activityList"></el-option>
</el-select>
</el-form-item>
</el-col>
<!--<el-col :span="12">
<el-form-item label="性&emsp;&emsp;别" prop="sex">
<el-input v-model="formData.sex" readonly maxlength="30" placeholder="输入慰问对象查询"
type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="生&emsp;&emsp;日" prop="birthday">
<el-input v-model="formData.birthday" readonly maxlength="30" placeholder="输入慰问对象查询"
type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="formData.idCard" maxlength="30" placeholder="输入慰问对象查询"
type="text"></el-input>
</el-form-item>
</el-col>-->
<el-col :span="12">
<el-form-item label="联系方式" prop="conMobile">
<el-input v-model="formData.conMobile" maxlength="30"
placeholder="请输入慰问对象联系方式"
type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="慰问类型" prop="type">
<el-select v-model="formData.type" style="width: 100%"
@change="typeChange"
placeholder="请选择慰问类型">
<el-option v-for="item in typeOptions2"
:label="item.name+' ('+item.code+')'"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<template v-if="formData.typeCode === 'D'">
<el-col :span="12">
<el-form-item label="住院病由">
<el-input v-model="formData.hospital_by"
placeholder="请填写住院病由"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="住院时间">
<el-date-picker
v-model="formData.hospital_time"
end-placeholder="结束日期"
range-separator="-"
start-placeholder="开始日期"
style="width: 100%"
type="daterange"
value-format="yyyy-MM-dd" placeholder="请选择住院时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入住医院" prop="the_hospital">
<el-input v-model="formData.the_hospital"
placeholder="请填写入住医院"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="当年次数">
<el-input v-model="formData.hospital_yearNum"
placeholder="填写当年次数"></el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="12">
<el-form-item label="慰问金额" prop="money">
<el-input-number v-model="formData.money" :controls="false"
:max="1000000000" :min="0"
controls-position="right"
placeholder="请填写慰问金额"
precision="2"
style="width: 100%"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="慰问时间" prop="occur_time">
<el-date-picker
v-model="formData.occur_time"
clearable
placeholder="慰问时间"
style="width: 100%"
type="date"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<template v-if="formData.typeCode==='E'">
<el-col :span="12">
<el-form-item label="去逝时间" prop="dead_time">
<el-date-picker
v-model="formData.dead_time"
clearable
placeholder="去逝时间"
style="width: 100%"
type="date"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="与被慰问人关系" prop="dead_gx">
<el-select v-model="formData.dead_gx" style="width: 100%"
placeholder="请选择与被慰问人关系">
<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-col>
</template>
<template v-if="formData.typeCode==='A'">
<el-col :span="12">
<el-form-item label="结婚时间" prop="marry_time">
<el-date-picker
v-model="formData.marry_time"
clearable
placeholder="结婚时间"
style="width: 100%"
type="date"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</template>
<template v-if="formData.typeCode==='B'">
<el-col :span="12">
<el-form-item label="生育时间" prop="birth_time">
<el-date-picker
v-model="formData.birth_time"
clearable
placeholder="生育时间"
style="width: 100%"
type="date"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</template>
</template>
<template v-else>
<el-col :span="12">
<el-form-item label="活动名称" prop="activity_name">
<el-input type="text" v-model="formData.activity_name"
placeholder="请输入活动名称"></el-input>
</el-form-item>
</el-col>
<el-col v-if="formData.reimbursementItemId=='fyhd'" :span="12">
<el-form-item label="活动类型" prop="activity_type">
<el-select v-model="formData.activity_type" placeholder="请选择活动类型"
style="width: 100%">
<el-option label="分工会活动" value="1"></el-option>
<el-option label="校工会活动" value="2"></el-option>
<el-option label="协会活动" value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动人数" prop="activity_number"
v-if="formData.reimbursementItemId=='fyhd'">
<el-input v-model="formData.activity_number" placeholder="请输入活动人数"
type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动地点" prop="venue">
<el-input v-model="formData.venue" placeholder="请输入活动地点"
type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销金额" prop="money">
<el-input v-model="formData.money" placeholder="输入报销金额"
<el-form-item label="金额" prop="money">
<el-input v-model="formData.money" :placeholder="moneyPlaceholder"
type="number"></el-input>
</el-form-item>
</el-col>
@@ -369,29 +111,6 @@ layout("/layouts/platform.html"){
</template>
<el-col :span="12" v-if="formData.reimbursementItemSort === 'fy'">
<el-form-item label="发票张数" prop="files_num">
<el-input-number v-model="formData.files_num" :controls="false"
:max="1000000000" :min="0" controls-position="right"
placeholder="请填写发票张数"
style="width: 100%"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.reimbursementItemSort === 'fy'">
<el-form-item id="billNumber" label="发票号码" prop="billNumber">
<el-input v-model="formData.billNumber"
placeholder="请填写发票号码,如有多个请用逗号分隔"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item label="参加随行人员" prop="personnel">
<el-input v-model="formData.personnel" :autosize="{ minRows: 4, maxRows: 8}" maxlength="500"
placeholder="请填写参加随行人员" type="textarea"></el-input>
</el-form-item>
</el-col>-->
<el-col :span="24">
<el-form-item label="支付内容" prop="cause">
@@ -403,28 +122,21 @@ layout("/layouts/platform.html"){
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark"
:autosize="{ minRows: 4, maxRows: 8}" maxlength="500"
placeholder="需要填写: 发票编号、开具方、金额" type="textarea"></el-input>
<el-form-item label="附件" prop="files">
<file-upload card :max="50" :files.sync="formData.files">
<template #el-upload__tip>
<div class="el-upload__tip" slot="tip"
style="color: red;display: contents;font-size: 13px">
附件需上传本人签名的发票照片或者PDF
</div>
</template>
</file-upload>
</el-form-item>
</el-col>
<el-col v-if="!ReimbursementIsSign" :span="24">
<el-form-item label="签&emsp;&emsp;字" prop="sign">
<sign :qz.sync="formData.sign" prefix="condolence"></sign>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item v-if="['zfzj', 'zflw'].includes(formData.reimbursementItemId)"
label="附件"
prop="files">
<file-upload card :max="50" :files.sync="formData.files"></file-upload>
</el-form-item>
<el-form-item v-else label="附件" prop="files">
<file-upload card :max="50" :files.sync="formData.files"></file-upload>
<el-form-item label="签&emsp;&emsp;字" prop="signUrl">
<sign :qz.sync="formData.signUrl" prefix="reimbursement"
:is_value_base64="false"></sign>
</el-form-item>
</el-col>
</el-row>
@@ -432,7 +144,11 @@ layout("/layouts/platform.html"){
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="primary" :disabled="roleDisabled" @click="doAdd()">确 定</el-button>
<el-button plain type="primary" :disabled="roleDisabled" @click="doAdd(false)">
</el-button>
<el-button type="primary" :disabled="roleDisabled" @click="doAdd(true)">提 交
</el-button>
</div>
@@ -450,7 +166,8 @@ layout("/layouts/platform.html"){
let self = this
let checkFiles = function (rule, value, callback) {
if (self.formData.reimbursementItemId === 'fyww' || self.formData.reimbursementItemId === 'zfww'
|| self.formData.reimbursementItemId === 'zfzj' || self.formData.reimbursementItemId === 'zflw') {
|| self.formData.reimbursementItemId === 'zfzj' || self.formData.reimbursementItemId === 'zflw'
|| self.formData.reimbursementItemId === 'zfjl') {
callback()
} else {
if (self.formData.files === undefined || self.formData.files === null) {
@@ -461,8 +178,7 @@ layout("/layouts/platform.html"){
};
return {
clubList: [],
balance: 0,
ReimbursementIsSign: false,
budgetMoney: 0,
jfSourceList: [],
typeOptions: [],
typeOptions2: [],
@@ -475,6 +191,7 @@ layout("/layouts/platform.html"){
{key: "zfww", name: '慰问', type: "zf"},
{key: "zfzj", name: '专家', type: "zf"},
{key: "zflw", name: '劳务', type: "zf"},
{key: "zfjl", name: '奖励', type: "zf"},
],
paymentMethod: [
{key: "dgzf", name: '对公支付'},
@@ -482,7 +199,7 @@ layout("/layouts/platform.html"){
],
rules: {
jf_source: [{required: true, message: '必填', trigger: ['change', 'blur']}],
be_user: [{required: true, message: '必填', trigger: ['change', 'blur']}],
//be_user: [{required: true, message: '必填', trigger: ['change', 'blur']}],
reimbursementItemSort: [{
required: true,
message: '请选择报销类别',
@@ -498,39 +215,130 @@ layout("/layouts/platform.html"){
message: '请输入支付方式',
trigger: ['change', 'blur']
}],
mobile: [{required: true, message: '请输入联系方式', trigger: ['change', 'blur']}],
conMobile: [{
required: true,
message: '请输入慰问人联系方式',
mobile: [{
required: false,
message: '请输入联系方式',
trigger: ['change', 'blur']
}],
type: [{required: true, message: '请选择慰问类型', trigger: ['change']}],
occur_time: [{required: true, message: '请输入慰问时间', trigger: ['change', 'blur']}],
money: [{required: true, message: '请输入慰问金额', trigger: ['change', 'blur']}],
conMobile: [{
required: true,
message: '请输入联系方式',
trigger: ['change', 'blur']
}],
//type: [{required: true, message: '请选择慰问类型', trigger: ['change']}],
occur_time: [{
required: true,
message: '请输入时间',
trigger: ['change', 'blur']
}],
money: [{required: true, message: '请输入金额', trigger: ['change', 'blur']}],
activityId: [{required: true, message: '请选择项目名称', trigger: ['change', 'blur']}],
personnel: [{
required: true,
message: '请填写参加随行人员',
trigger: ['change', 'blur']
}],
cause: [{required: true, message: '请填写支付内容', trigger: ['change', 'blur']}],
cause: [{
required: true,
message: '请填写支付内容',
trigger: ['change', 'blur']
}],
//remark: [{required: true, message: '必填', trigger: ['change', 'blur']}],
files_num: [{required: true, message: '必填', trigger: ['change', 'blur']}],
bankUserName: [{required: true, message: '必填', trigger: ['change', 'blur']}],
bankCardNumber: [{required: true, message: '必填', trigger: ['change', 'blur']}],
bankCardNumber: [{
required: true,
message: '必填',
trigger: ['change', 'blur']
}],
bankOfDeposit: [{required: true, message: '必填', trigger: ['change', 'blur']}],
activity_name: [{required: true, message: '必填', trigger: ['change', 'blur']}],
clubId: [{required: true, message: '必填', trigger: ['change', 'blur']}],
unionId: [{required: true, message: '必填', trigger: ['change', 'blur']}],
billNumber: [{
required: true,
message: '请填写发票号码,如有多个请用逗号分隔',
trigger: ['change', 'blur']
}],
files: [{required: true, validator: checkFiles, trigger: ['blur', 'change']}],
signUrl: [{required: true, message: '必填', trigger: ['change', 'blur']}],
activity_time: [{required: true, message: '必填', trigger: ['change', 'blur']}],
activity_number: [{
required: true,
message: '必填',
trigger: ['change', 'blur']
}],
},
roleDisabled: false,
activityList: [],
budgetTypeOption: [],
moneyPlaceholder: "请输入金额",
totalBudgetMoney: 0
}
},
methods: {
async getBxMoneyByActivityId(activityId, jf_source) {
const resp = await $.post("/platform/reimbursement/applyNew/getBxMoneyByActivityId", {
activityId,
jf_source
})
if (resp.code === 0) {
return resp.data
} else {
return 0
}
},
async activityNameChange(val) {
if (val) {
if (["ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_ONE"].includes(this.formData.jf_source)) {
const data = this.activityList.find(a => a.id === val)
if (this.formData.jf_source === "ACTIVITY_BUDGET_TYPE_TWO") {
if (data.isSchoolBudget) {
this.moneyPlaceholder = "预算金额" + data.totalBudgetMoney + "元"
} else {
if (data.isRepeatReimbursement) {
const money = await this.getBxMoneyByActivityId(val, this.formData.jf_source)
if (money > 0) {
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
} else {
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,不能超过20%"
}
} else {
}
}
} else {
if (data.isRepeatReimbursement) {
const money = await this.getBxMoneyByActivityId(val, this.formData.jf_source)
if (money > 0) {
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
} else {
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,不能超过20%"
}
} else {
const money = await this.getBxMoneyByActivityId(val, this.formData.jf_source)
if (money > 0) {
this.moneyPlaceholder = "预算金额:" + (data.totalBudgetMoney - money) + "元"
} else {
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,不能超过20%"
}
}
}
this.totalBudgetMoney = data.totalBudgetMoney
this.$set(this.formData, 'activity_name', data.activityMatter)
} else {
this.moneyPlaceholder = "预算金额" + this.budgetMoney + "元"
this.totalBudgetMoney = this.budgetMoney
this.$set(this.formData, 'activity_name', val)
}
} else {
this.moneyPlaceholder = "请输入金额"
this.totalBudgetMoney = 0
this.$set(this.formData, 'activity_name', null)
}
},
async querySearchAsync(queryString, cb) {
const resp = await $.get(loc() + "/getLastData", {
queryString: queryString
@@ -545,67 +353,77 @@ layout("/layouts/platform.html"){
this.$set(this.formData, 'bankOfDeposit', item.bankOfDeposit)
},
async jfSourceChange(val) {
//判断权限
const resp = await $.get(loc() + '/validRole', {val: val})
this.roleDisabled = resp.code !== 0
if (resp.code !== 0) {
this.$alert(resp.msg, '提示', {
confirmButtonText: '确定',
type: 'warning'
});
//this.formData.jf_source = ''
return
}
if (!val) {
this.balance = 0
this.budgetMoney = 0
return
}
if (val == "1") {
const {data} = await $.get(loc() + "/getSchoolBudget")
this.balance = data
} else if (val == "2") {
await this.getBalance()
} else {
//this.balance = 0
await this.clubChange(this.formData.clubId)
this.$set(this.formData, "activityId", null)
await this.getBudgetMoneyOrActivity()
if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
this.$set(this.formData, "unionId", "${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
async clubChange(val) {
const {data} = await $.get(loc() + "/getClubBudget", {
clubId: val
async getBudgetMoneyOrActivity() {
const {data} = await $.get(loc() + "/getBudgetMoneyOrActivity", {
clubId: this.formData.clubId,
unionId: this.formData.unionId,
id: this.formData.id,
jf_source: this.formData.jf_source
})
this.balance = data
this.budgetMoney = data.budgetMoney
this.activityList = data.activityList
},
doAdd() {
this.$refs["addForm"].validate(async (valid) => {
if (valid) {
if (this.balance < this.formData.money) {
this.$message.warning("余额不足,请联系校工会")
return
}
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const data = this.formData
data.starting_time = data.hospital_time ? data.hospital_time[0] : ''
data.end_time = data.hospital_time ? data.hospital_time[1] : ''
const resp = await $.post(loc() + (this.formData.id ? "/doEdit" : "/doAdd"), {
data: JSON.stringify(data),
sign: this.formData.sign
})
if (resp.code === 0) {
this.$message.success(resp.msg)
window.location.href = '/activity/reimbursement/list'
} else {
this.$message.warning(resp.msg)
loading.close()
}
}
async addValidate() {
const {activityId, jf_source, money, clubId} = this.formData
const resp = await $.post("/platform/reimbursement/applyNew/bxAddValidate", {
activityId,
jf_source,
money,
clubId
})
return resp
},
async doAdd(flag) {
let valid = false
if (flag) {
valid = await this.$refs["addForm"].validate()
if (!valid) {
return
}
)
}
const validateResp = await this.addValidate()
if (validateResp.code !== 0) {
this.$alert(validateResp.msg, '温馨提示', {
confirmButtonText: '确定',
callback: action => {
}
});
return
}
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const data = this.formData
data.starting_time = data.hospital_time ? data.hospital_time[0] : ''
data.end_time = data.hospital_time ? data.hospital_time[1] : ''
const resp = await $.post(loc() + (this.formData.id ? "/doEdit" : "/doAdd"), {
data: JSON.stringify(data),
sign: this.formData.sign,
flag: flag
})
loading.close()
if (resp.code === 0) {
this.notifySuccess(resp.msg)
window.location.href="/activity/reimbursement/list"
} else {
this.notifyWarning(resp.msg)
}
},
reimbursementItemSortChange(val) {
this.$set(this.formData, "type", null)
@@ -632,25 +450,20 @@ layout("/layouts/platform.html"){
} else {
this.rules.files[0].required = true
}
if (this.$refs["addForm"])
this.$refs["addForm"].clearValidate();
},
async initData() {
this.$set(this.formData, "reimbursementItemSort", "fy")
this.$set(this.formData, "userName", "${@shiro.getPrincipalProperty('username')}")
this.$set(this.formData, "loginName", "${@shiro.getPrincipalProperty('loginname')}")
this.$set(this.formData, "unitName", "${@shiro.getPrincipalProperty('unit').getName()}")
this.$set(this.formData, "unionName", "${@shiro.getPrincipalProperty('union').getUnionname()}")
this.$set(this.formData, "mobile", "${@shiro.getPrincipalProperty('mobile')}")
this.$set(this.formData, "reimbursementItemId", "fyhd")
await this.getTypeOptions()
this.reimbursementItemSortChange(this.formData.reimbursementItemSort)
this.reimbursementItemChange(this.formData.reimbursementItemId)
},
async getBalance() {
const {data} = await $.get(loc() + "/getBalance")
this.balance = data
this.$set(this.formData, "goods", [])
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
},
async userRemoteMethod(query) {
if (query) {
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
@@ -685,42 +498,55 @@ layout("/layouts/platform.html"){
this.$set(this.formData, 'job_title', userData.jobtitle)
},
async findData(id) {
const refs = await $.get(loc() + "/findOne", {id})
if(refs.data.be_user) {
if (refs.data.be_user) {
const userData = await this.getUserData(refs.data.be_user);
this.userOptions.push(userData)
}
// await this.userChange()
await this.jfSourceChange(refs.data.jf_source)
this.formData = refs.data
await this.getBudgetMoneyOrActivity()
this.activityNameChange(this.formData.activityId ? this.formData.activityId : this.formData.activity_name)
},
async getClubsByUser() {
const {data} = await $.get("/platform/reimbursement/applyNew/getClubsByUser", {})
return data
}
},
async created() {
this.initData()
await this.initData()
this.clubList = await this.getClubsByUser()
let budgetTypeOption = []
if ("${@shiro.hasRole('sysadmin')}" === 'true') {
this.jfSourceList.push({key: "1", name: "校工会"})
this.jfSourceList.push({key: "2", name: "分工会"})
this.jfSourceList.push({key: "3", name: "协会/协会"})
} else {
if ("${@shiro.hasRole('A06')}" === 'true') {
this.jfSourceList.push({key: "1", name: "校工会"})
if ("${@shiro.hasRole('A06')||@shiro.hasRole('xghjf')}" === 'true') {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if ("${@shiro.hasAnyRoles('H04', 'gh01')}" === 'true') {
this.jfSourceList.push({key: "2", name: "分工会"})
if ("${@shiro.hasRole('H01')}" === 'true') {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if ("${@shiro.hasRole('club01')}" === 'true') {
this.jfSourceList.push({key: "3", name: "协会/协会"})
if (this.clubList.length>0) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE", "ACTIVITY_BUDGET_TYPE_FOUR"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
this.budgetTypeOption = budgetTypeOption
}
const id = getQueryVariable("id")
if (id) await this.findData(id)
this.clubList = await getClubsByUser()
await this.jfSourceChange(this.formData.jf_source)
const aa = await getDictState("ReimbursementIsSign")
this.ReimbursementIsSign = aa.disabled
}
})
</script>
@@ -0,0 +1,264 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
@change="doSearch"
placeholder="选择年"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-radio-group @change="doSearch" size="small" v-model="pageForm.isAudit">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize"
@sort-change="pageOrder"
class="vi-table" row-key="id" style="width: 100%;margin-bottom: 20px"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="300px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">
查看
</el-button>
<el-button size="mini" type="primary" @click="openAudit(row.id)"
:disabled="row.State!=3046">
审核
</el-button>
<el-button size="mini" type="danger" @click="doRevoke(row.id)"
v-if="[3047,3048,3050].includes(row.State)">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<info ref="info"></info>
</template>
<template #edit>
<info handle label="协会会长审核" ref="info2">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title2 title="审核信息"></vi-title2>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="auditSign">
<sign :qz.sync="formData.auditSign" prefix="clubAudit"
:is_value_base64="false"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :loading="submitLoading"
@click="doAudit(1)" type="danger">
</el-button>
<el-button :loading="submitLoading" @click="doAudit(2)"
type="info">退回修改
</el-button>
<el-button :loading="submitLoading" @click="doAudit(3)"
type="primary">通 过
</el-button>
</div>
</template>
</info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unionList: [],
unitList: [],
pageForm: {
isAudit: 3,
year: new Date().getFullYear() + ''
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
budgetTypeOption: [],
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['change', 'blur']}],
auditOpinion: [{required: true, message: '必填', trigger: ['change', 'blur']}],
}
}
},
components: {
'info': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=' + new Date().getTime()),
},
methods: {
openView(id) {
this.$refs.guava.view()
this.$refs.info.getInfo(id)
},
openAudit(id) {
this.formData = {
id: id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.info2.getInfo(id)
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doRevoke(id) {
this.$confirm('确定要撤回审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const res = await $.post('/platform/reimbursement/clubAudit/doRevoke', {id})
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
} else {
this.$message.error(res.msg)
}
})
},
doAudit(flag) {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确定要提交审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
this.formData.flag = flag
const res = await $.post('/platform/reimbursement/clubAudit/doAudit', this.formData)
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
this.$refs.guava.index()
} else {
this.$message.error(res.msg)
}
})
}
})
},
},
async created() {
this.pageData()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
}
})
</script>
<!--#
}
#-->
@@ -1,383 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
input[type="file"] {
display: none
}
.el-input-number input {
text-align: left !important;
}
.el-input-number__decrease, .el-input-number__increase {
display: none;
}
</style>
<div class="platform" id="app" v-cloak>
<guava padding="0% 5%" ref="guava">
<template>
<el-card shadow="never">
<search>
<search-item label="年&emsp;&emsp;度:">
<el-date-picker
placeholder="选择年"
style="width: 150px"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="所属工会:">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位:">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</search-item>
<template v-if="searchMore">
<search-item label="报销项目">
<el-select clearable style="width: 100%" v-model="pageForm.reiItemId">
<el-option :value="4" label="慰问"></el-option>
<el-option :value="1" label="文体活动"></el-option>
<el-option :value="2" label="日常活动"></el-option>
<el-option :value="3" label="其它活动"></el-option>
</el-select>
</search-item>
</template>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
<more v-model="searchMore"></more>
</div>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<div class="pull-right offscreen-right mt5">
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.isAudit">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</div>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop==='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop==='unitName'">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitName}}
</template>
<template scope="{row}" v-else-if="column.prop==='unionname'">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
<template scope="{row}" v-else-if="column.prop=='description'">
<span>{{row.activity_name!=null?'活动名称:'+row.activity_name:'被慰问人:'+row.be_username}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" 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 :command="{type:'Review',data:row}"
:disabled="row.State!=3050">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info handle label="分工会审核" ref="act_info2" v-show="reimbursementItemId!=4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="auditSign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.auditSign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</activity-bx-info>
<info handle label="分工会审核" ref="info2" v-show="reimbursementItemId==4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="sign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.sign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
ReimbursementIsSign: false,
reimbursementItemId: "",
unions: [],
units: [],
tabLoading: false,
userOptions: [],
formData: {},
tableData: [],
typeOptions: [],
pageForm: {
isAudit: false,
year: new Date().getFullYear() + ""
},
formRules: {
/* auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],*/
},
tableColumns: [
{prop: 'userName', label: '经办人'},
{prop: 'unionname', label: '所在工会'},
{prop: 'unitName', label: '所在单位', sortable: true},
{prop: 'mobile', label: '联系方式'},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态'},
{prop: 'description', label: '备注'},
],
subDis: false,
subLoading1: false,
subLoading2: false,
subLoading3: false,
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'info': httpVueLoader('/components/condolence/Info.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 == 'Review') {
this.openReview(data)
}
},
doReview(flag) {
this.$refs["form"].validate(async (valid) => {
const conMoney = this.$refs.info2.viewData.money
const actMoney = this.$refs.act_info2.viewData.activity_money
this.formData.money = this.formData.reimbursementItemId != 4 ? actMoney : conMoney
if (valid) {
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(loc() + "/doReview", this.formData)
if (resp.code === 0) {
this.pageData()
this.$refs.guava.index()
this.$message.success(resp.msg)
}else{
this.notifyError(resp.msg)
}
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
}
})
},
openReview(row) {
const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
this.formData = {
id: reimbursementId,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
reimbursementItemId: reimbursementItemId,
}
this.subLoading1 = false
this.subLoading2 = false
this.subLoading3 = false
if (reimbursementItemId != 4) {
this.$refs.act_info2.getActInfo(reimbursementId)
} else {
this.$refs.info2.getInfo(reimbursementId)
}
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
openView(row) {
const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
if (reimbursementItemId != 4) {
this.$refs.act_info.getActInfo(reimbursementId)
} else {
this.$refs.info.getInfo(reimbursementId)
}
this.$refs.guava.view()
},
async getTypeOptions() {
const {code, data} = await $.get("/platform/condolence/type/getAll")
if (code == 0) {
this.typeOptions = data
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
},
},
async created() {
this.pageData();
this.getTypeOptions()
if ("${@shiro.hasRole('sysadmin')}" === 'true') {
this.unions = await getUnionList(null)
} else {
this.unions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
this.pageForm.unionId = this.unions[0].id
}
this.flushUnits()
const aa = await getDictState("ReimbursementIsSign")
this.ReimbursementIsSign = aa.disabled
}
})
</script>
<!--#
}
#-->
@@ -1,358 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava padding="0% 5%" ref="guava">
<template>
<el-card shadow="never">
<search>
<search-item label="年&emsp;&emsp;度:">
<el-date-picker
placeholder="选择年"
style="width: 150px"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="所属工会:">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位:">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</search-item>
<template v-if="searchMore">
<search-item label="报销项目">
<el-select clearable style="width: 100%" v-model="pageForm.reiItemId">
<el-option :value="4" label="慰问"></el-option>
<el-option :value="1" label="文体活动"></el-option>
<el-option :value="2" label="日常活动"></el-option>
<el-option :value="3" label="其它活动"></el-option>
</el-select>
</search-item>
</template>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
<more v-model="searchMore"></more>
</div>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<div class="pull-right offscreen-right mt5">
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.isAudit">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</div>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" 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 :command="{type:'Review',data:row}"
:disabled="row.State!=3070">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-bx-info handle label="财务审核" ref="act_info2" v-show="reimbursementItemId!=4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销金额" prop="activity_money">
<el-input v-model="formData.activity_money"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="auditSign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.auditSign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</activity-bx-info>
<info handle label="财务审核" ref="info2" v-show="reimbursementItemId==4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.time"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报销金额" prop="money">
<el-input v-model="formData.money"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="sign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.sign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
ReimbursementIsSign: false,
reimbursementItemId: "",
unions: [],
units: [],
tabLoading: false,
userOptions: [],
formData: {},
tableData: [],
typeOptions: [],
pageForm: {
isAudit: false,
year: new Date().getFullYear() + ""
},
formRules: {
/* auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],*/
},
tableColumns: [
{prop: 'userName', label: '经办人'},
{prop: 'unionname', label: '所在工会'},
{prop: 'unitName', label: '所在单位', sortable: true},
{prop: 'mobile', label: '联系方式'},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态'},
],
subDis: false,
subLoading1: false,
subLoading2: false,
subLoading3: false,
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'info': httpVueLoader('/components/condolence/Info.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 == 'Review') {
this.openReview(data)
}
},
openView(row) {
const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
if (reimbursementItemId != 4) {
this.$refs.act_info.getActInfo(reimbursementId)
} else {
this.$refs.info.getInfo(reimbursementId)
}
this.$refs.guava.view()
},
openReview(row) {
const {reimbursementId, reimbursementItemId, activity_money, money} = row
this.reimbursementItemId = reimbursementItemId
this.formData = {
id: reimbursementId,
username: "${@shiro.getPrincipalProperty('username')}",
time: moment().format('YYYY-MM-DD'),
reimbursementItemId: reimbursementItemId,
activity_money: activity_money,
money: money
}
this.subLoading1 = false
this.subLoading2 = false
this.subLoading3 = false
if (reimbursementItemId != 4) {
this.$refs.act_info2.getActInfo(reimbursementId)
} else {
this.$refs.info2.getInfo(reimbursementId)
}
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doReview(flag) {
this.$refs["form"].validate(async (valid) => {
this.formData.money = this.formData.reimbursementItemId != 4 ? this.formData.activity_money : this.formData.money
if (valid) {
console.log(1)
this.formData.flag = flag
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(loc() + "/doReview", this.formData)
if (resp.code === 0) {
this.pageData()
this.$refs.guava.index()
this.$message.success(resp.msg)
}else{
this.notifyError(resp.msg)
}
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
}
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
},
},
async created() {
this.pageData();
this.unions = await getUnionList()
this.flushUnits()
const aa = await getDictState("ReimbursementIsSign")
this.ReimbursementIsSign = aa.disabled
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,505 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">经办人:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend"
style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="rei.userName"></el-option>
<el-option label="工号" value="rei.loginName"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动类型:</div>
<div class="search-item-option">
<el-select clearable placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.jf_source">
<el-option :label="item.name" :value="item.code"
v-for="item in budgetTypeOption"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">明细类:</div>
<div class="search-item-option">
<el-select clearable placeholder="请选择明细类"
style="width: 100%;"
v-model="pageForm.detailsTypeId">
<el-option :label="item.name" :value="item.code"
v-for="item in detailsTypeOption"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-radio-group @change="doSearch" size="small"
v-model="pageForm.isAudit">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='detailsTypeId'">
<dict-tag :options="detailsTypeOption"
:value="row.detailsTypeId"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center"
label="操作" width="300px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">
查看
</el-button>
<el-button size="mini" type="primary" @click="openAudit(row)"
:disabled="row.State!=3090">
审核
</el-button>
<el-button size="mini" type="danger" @click="doRevoke(row.id)"
v-if="[3095,3096,3100].includes(row.State)">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<info handle label="校工会会计审核" ref="info2">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title2 title="审核信息"></vi-title2>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核状态" prop="flag">
<el-radio-group v-model="formData.flag">
<el-radio border label="1">拒绝</el-radio>
<el-radio border label="2">退回修改</el-radio>
<el-radio border label="3">通过</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<template v-if="formData.flag==='3'">
<el-col :span="12">
<el-form-item label="明细类" prop="detailsTypeId">
<el-row >
<el-col :span="20">
<el-select v-model="formData.detailsTypeId"
style="width: 100%"
placeholder="请选择明细类">
<el-option
v-for="item in detailsTypeOption"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-button class="ml5" type="primary"
@click="dialogVisible = true">设置类型
</el-button>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-form-item label="上账明细" prop="accountViewId">
<el-select v-model="formData.accountViewId"
style="width: 100%"
placeholder="请选择明细类">
<el-option
v-for="item in accountViewOption"
:key="item.id"
:label="item.notes"
:value="item.id">
</el-option>
</el-select>
</el-form-item>-->
</el-col>
</template>
<el-col :span="24">
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字" prop="auditSign">
<sign :qz.sync="formData.auditSign" prefix="finance"
:is_value_base64="false"></sign>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :loading="submitLoading" @click="doAudit"
type="primary">提 交
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<info ref="info"></info>
</template>
</guava>
<el-dialog
title="编辑明细类"
:visible.sync="dialogVisible"
width="50%">
<el-table
:data="detailsTypeList"
border
row-key="id"
style="width: 100%">
<el-table-column
type="index"
width="50" label="序号">
</el-table-column>
<el-table-column
prop="code"
label="编码">
<template slot-scope="{row}">
<el-input v-model="row.code" placeholder="请输入编码" disabled></el-input>
</template>
</el-table-column>
<el-table-column
prop="name"
label="名称" width="200">
<template slot-scope="{row}">
<el-input v-model="row.name" placeholder="请输入名称"
style="width: 100%"></el-input>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="{row}">
<el-button type="primary" size="mini"
@click="detailsTypeList.push({code:'ACTIVITY_BUDGET_DETAILS_TYPE_'+(detailsTypeList.length+1),name:''})">
添加
</el-button>
</template>
<template slot-scope="{row,$index}">
<el-button
size="mini"
type="danger"
@click="doDeleteDetailsType($index,row)">删除
</el-button>
</template>
</el-table-column>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doSubmitDetailsType">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
clubOption: [],
unions: [],
units: [],
pageForm: {
searchName: "rei.userName",
isAudit: 3,
year: new Date().getFullYear() + ""
},
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
jf_source: [{required: true, message: '必填', trigger: ['blur', 'change']}],
flag: [{required: true, message: '必填', trigger: ['blur', 'change']}],
accountViewId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
detailsTypeId: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
{prop: 'detailsTypeId', label: '明细类'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
budgetTypeOption: [],
detailsTypeOption: [],
detailsTypeList: [],
dialogVisible: false,
accountViewOption:[]
}
},
components: {
'info': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=' + new Date().getTime()),
},
methods: {
doDeleteDetailsType(index, row) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.detailsTypeList.splice(index, 1)
if (row.id) {
const res = await $.post('/platform/reimbursement/financeAudit/doDeleteDetailsType', {id: row.id})
if (res.code === 0) {
this.$message.success('操作成功')
this.detailsTypeOption = await getDictByCode("ACTIVITY_BUDGET_DETAILS_TYPE");
} else {
this.$message.error(res.msg)
}
}
})
},
async doSubmitDetailsType() {
const res = await $.post(loc() + "/doSubmitDetailsType", {detailsTypeList: JSON.stringify(this.detailsTypeList)})
if (res.code === 0) {
this.$message({
type: 'success',
message: '保存成功!'
});
this.detailsTypeOption = await getDictByCode("ACTIVITY_BUDGET_DETAILS_TYPE");
this.detailsTypeList = clone(this.detailsTypeOption)
this.dialogVisible = false
} else {
this.$message({
type: 'error',
message: res.msg
});
}
},
openView(id) {
this.$refs.guava.view()
this.$refs.info.getInfo(id)
},
openAudit(row) {
this.formData = {
id: row.id,
jf_source: row.jf_source,
flag: "3",
clubId: row.clubId,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.info2.getInfo(row.id)
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doRevoke(id) {
this.$confirm('确定要撤回审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const res = await $.post('/platform/reimbursement/financeAudit/doRevoke', {id})
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
} else {
this.$message.error(res.msg)
}
})
},
doAudit(flag) {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确定要提交审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const res = await $.post('/platform/reimbursement/financeAudit/doAudit', this.formData)
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
this.$refs.guava.index()
} else {
this.$message.error(res.msg)
}
})
}
})
},
getAccountViewOption() {
$.get(loc()+"/getAccountViewOption").then(resp => {
if (resp.code === 0) {
this.accountViewOption = resp.data
}
})
},
},
async created() {
this.pageData();
this.getAccountViewOption();
this.unions = await getUnionList()
this.unions.unshift({"id": "4330", "unionname": "大学外语部"})
this.unions.unshift({"id": "4070", "unionname": "外国语学院"})
this.unions.unshift({"id": "4270", "unionname": "软件学院"})
this.unions.unshift({"id": "4450", "unionname": "国际关系学院"})
this.clubOption = await getClubsByRole()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
this.detailsTypeOption = await getDictByCode("ACTIVITY_BUDGET_DETAILS_TYPE");
this.detailsTypeList = clone(this.detailsTypeOption)
}
})
</script>
<!--#
}
#-->
@@ -23,8 +23,7 @@ layout("/layouts/platform.html"){
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</search-item>
@@ -32,8 +31,7 @@ layout("/layouts/platform.html"){
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</search-item>
@@ -50,8 +48,7 @@ layout("/layouts/platform.html"){
</template>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
</el-button>
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
<more v-model="searchMore"></more>
</div>
@@ -64,8 +61,7 @@ layout("/layouts/platform.html"){
<table-tool :app="this" label="报销列表">
<template #func>
<div class="pull-right offscreen-right mt5">
<el-radio-group @change="doSearch" size="medium"
v-model="pageForm.isAudit">
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.isAudit">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
@@ -74,11 +70,9 @@ layout("/layouts/platform.html"){
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
type="index"
width="80px"></el-table-column>
@@ -97,8 +91,7 @@ layout("/layouts/platform.html"){
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center"
label="操作" width="150px">
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" size="mini">
@@ -127,8 +120,7 @@ layout("/layouts/platform.html"){
<template #edit>
<activity-bx-info handle label="书记审核" ref="act_info2" v-show="reimbursementItemId!=4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
@@ -149,25 +141,21 @@ layout("/layouts/platform.html"){
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
type="textarea"
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="auditSign"
v-if="!ReimbursementIsSign">
<el-form-item label="签&emsp;&emsp;字" prop="auditSign" v-if="!ReimbursementIsSign">
<sign :qz.sync="formData.auditSign" prefix="condolence"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1"
@click="doReview(false)" type="danger">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
type="success">
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
@@ -176,8 +164,7 @@ layout("/layouts/platform.html"){
<info handle label="书记审核" ref="info2" v-show="reimbursementItemId==4">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
ref="form"
style="padding: 20px 0">
<el-form-item class="view-header" label="审核信息&emsp;" label-width="135px">
@@ -198,8 +185,7 @@ layout("/layouts/platform.html"){
</el-row>
<el-form-item label="审核意见" prop="opinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
type="textarea"
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
v-model="formData.opinion"></el-input>
</el-form-item>
@@ -210,12 +196,10 @@ layout("/layouts/platform.html"){
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" :loading="subLoading1"
@click="doReview(false)" type="danger">
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)" type="danger">
</el-button>
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
type="success">
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)" type="success">
</el-button>
</div>
@@ -273,7 +257,7 @@ layout("/layouts/platform.html"){
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.1'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
'info': httpVueLoader('/components/condolence/Info.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
},
@@ -329,16 +313,15 @@ layout("/layouts/platform.html"){
this.subDis = true
flag ? this.subLoading2 = true : this.subLoading1 = true
const resp = await $.post(loc() + "/doReview", this.formData)
if (resp.code === 0) {
requestLaterMsgFun(vue, resp, null, null, (v) => {
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
this.pageData()
this.$refs.guava.index()
this.$message.success(resp.msg)
} else {
this.notifyError(resp.msg)
}
this.subDis = false
this.subLoading1 = false
this.subLoading2 = false
})
}
})
},
@@ -365,4 +348,4 @@ layout("/layouts/platform.html"){
<!--#
}
#-->
#-->
@@ -0,0 +1,364 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">经办人:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend"
style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="rei.userName"></el-option>
<el-option label="工号" value="rei.loginName"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select clearable
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动类型:</div>
<div class="search-item-option">
<el-select clearable placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.jf_source">
<el-option :label="item.name" :value="item.code"
v-for="item in budgetTypeOption"></el-option>
</el-select>
</div>
</div>
<!-- <div class="search-item">
<div class="search-item-label">明细类:</div>
<div class="search-item-option">
<el-select clearable placeholder="请选择明细类"
style="width: 100%;"
v-model="pageForm.detailsTypeId">
<el-option :label="item.name" :value="item.code"
v-for="item in detailsTypeOption"></el-option>
</el-select>
</div>
</div>-->
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-radio-group @change="doSearch" size="small"
v-model="pageForm.isAudit">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='detailsTypeId'">
<dict-tag :options="detailsTypeOption"
:value="row.detailsTypeId"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center"
label="操作" width="300px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">
查看
</el-button>
<el-button size="mini" type="primary" @click="openAudit(row)"
:disabled="row.State!=3080">
审核
</el-button>
<el-button size="mini" type="danger" @click="doRevoke(row.id)"
v-if="[3085,3086,3090].includes(row.State)&&row.money>50000">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<info handle label="工会主席审核" ref="info2">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title2 title="审核信息"></vi-title2>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字" prop="auditSign">
<sign :qz.sync="formData.auditSign" prefix="StandingViceChairman"
:is_value_base64="false"></sign>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :loading="submitLoading"
@click="doAudit(1)" type="danger">
</el-button>
<el-button :loading="submitLoading" @click="doAudit(2)"
type="info">退回修改
</el-button>
<el-button :loading="submitLoading" @click="doAudit(3)"
type="primary">通 过
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<info ref="info"></info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
clubOption: [],
unions: [],
units: [],
pageForm: {
searchName: "rei.userName",
isAudit: 3,
year: new Date().getFullYear() + ""
},
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
jf_source: [{required: true, message: '必填', trigger: ['blur', 'change']}],
flag: [{required: true, message: '必填', trigger: ['blur', 'change']}],
accountViewId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
detailsTypeId: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
// {prop: 'detailsTypeId', label: '明细类'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
budgetTypeOption: [],
detailsTypeOption: [],
detailsTypeList: [],
dialogVisible: false,
accountViewOption:[]
}
},
components: {
'info': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=' + new Date().getTime()),
},
methods: {
openView(id) {
this.$refs.guava.view()
this.$refs.info.getInfo(id)
},
openAudit(row) {
this.formData = {
id: row.id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.info2.getInfo(row.id)
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doRevoke(id) {
this.$confirm('确定要撤回审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const res = await $.post('/platform/reimbursement/standingViceChairmanAudit/doRevoke', {id})
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
} else {
this.$message.error(res.msg)
}
})
},
doAudit(flag) {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确定要提交审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
this.formData.flag = flag
const res = await $.post('/platform/reimbursement/standingViceChairmanAudit/doAudit', this.formData)
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
this.$refs.guava.index()
} else {
this.$message.error(res.msg)
}
})
}
})
},
},
async created() {
this.pageData();
this.unions = await getUnionList()
this.unions.unshift({"id": "4330", "unionname": "大学外语部"})
this.unions.unshift({"id": "4070", "unionname": "外国语学院"})
this.unions.unshift({"id": "4270", "unionname": "软件学院"})
this.unions.unshift({"id": "4450", "unionname": "国际关系学院"})
this.clubOption = await getClubsByRole()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
this.detailsTypeOption = await getDictByCode("ACTIVITY_BUDGET_DETAILS_TYPE");
this.detailsTypeList = clone(this.detailsTypeOption)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,264 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
@change="doSearch"
placeholder="选择年"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-radio-group @change="doSearch" size="small" v-model="pageForm.isAudit">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize"
@sort-change="pageOrder"
class="vi-table" row-key="id" style="width: 100%;margin-bottom: 20px"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="300px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">
查看
</el-button>
<el-button size="mini" type="primary" @click="openAudit(row.id)"
:disabled="row.State!=3050">
审核
</el-button>
<el-button size="mini" type="danger" @click="doRevoke(row.id)"
v-if="[3055,3056,3060].includes(row.State)">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<info ref="info"></info>
</template>
<template #edit>
<info handle label="分工会主席审核" ref="info2">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title2 title="审核信息"></vi-title2>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="auditSign">
<sign :qz.sync="formData.auditSign" prefix="clubAudit"
:is_value_base64="false"></sign>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :loading="submitLoading"
@click="doAudit(1)" type="danger">
</el-button>
<el-button :loading="submitLoading" @click="doAudit(2)"
type="info">退回修改
</el-button>
<el-button :loading="submitLoading" @click="doAudit(3)"
type="primary">通 过
</el-button>
</div>
</template>
</info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unionList: [],
unitList: [],
pageForm: {
isAudit: 3,
year: new Date().getFullYear() + ''
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
budgetTypeOption: [],
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['change', 'blur']}],
auditOpinion: [{required: true, message: '必填', trigger: ['change', 'blur']}],
}
}
},
components: {
'info': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=' + new Date().getTime()),
},
methods: {
openView(id) {
this.$refs.guava.view()
this.$refs.info.getInfo(id)
},
openAudit(id) {
this.formData = {
id: id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.info2.getInfo(id)
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doRevoke(id) {
this.$confirm('确定要撤回审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const res = await $.post('/platform/reimbursement/unionAudit/doRevoke', {id})
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
} else {
this.$message.error(res.msg)
}
})
},
doAudit(flag) {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确定要提交审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
this.formData.flag = flag
const res = await $.post('/platform/reimbursement/unionAudit/doAudit', this.formData)
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
this.$refs.guava.index()
} else {
this.$message.error(res.msg)
}
})
}
})
},
},
async created() {
this.pageData()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,347 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">经办人:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend"
style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="rei.userName"></el-option>
<el-option label="工号" value="rei.loginName"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动类型:</div>
<div class="search-item-option">
<el-select clearable placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.jf_source">
<el-option :label="item.name" :value="item.code"
v-for="item in budgetTypeOption"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-radio-group @change="doSearch" size="small"
v-model="pageForm.isAudit">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center"
label="操作" width="300px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">
查看
</el-button>
<el-button size="mini" type="primary" @click="openAudit(row)"
:disabled="row.State!=3060">
审核
</el-button>
<el-button size="mini" type="danger" @click="doRevoke(row.id)"
v-if="[3065,3066,3070].includes(row.State)">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<info handle label="工会办公室主管审核" ref="info2">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title2 title="审核信息"></vi-title2>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字" prop="auditSign">
<sign :qz.sync="formData.auditSign" prefix="finance"
:is_value_base64="false"></sign>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :loading="submitLoading"
@click="doAudit(1)" type="danger">
</el-button>
<el-button :loading="submitLoading" @click="doAudit(2)"
type="info">退回修改
</el-button>
<el-button :loading="submitLoading" @click="doAudit(3)"
type="primary">通 过
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<info ref="info"></info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
clubList: [],
unions: [],
units: [],
pageForm: {
searchName: "rei.userName",
isAudit: 3,
year: new Date().getFullYear() + ""
},
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
budgetTypeOption: [],
clubOption: [],
}
},
components: {
'info': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=' + new Date().getTime()),
},
methods: {
openView(id) {
this.$refs.guava.view()
this.$refs.info.getInfo(id)
},
openAudit(row) {
this.formData = {
id: row.id,
jf_source: row.jf_source,
flag: "3",
clubId: row.clubId,
unionId: row.unionId,
auditOpinion:"同意",
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.info2.getInfo(row.id)
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doRevoke(id) {
this.$confirm('确定要撤回审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const res = await $.post('/platform/reimbursement/unionManageAudit/doRevoke', {id})
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
} else {
this.$message.error(res.msg)
}
})
},
doAudit(flag) {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确定要提交审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
this.formData.flag = flag
const res = await $.post('/platform/reimbursement/unionManageAudit/doAudit', this.formData)
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
this.$refs.guava.index()
} else {
this.$message.error(res.msg)
}
})
}
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
},
getClubsByRole() {
$.get("/platform/reimbursement/unionManageAudit/getClubsByRole").then(resp => {
if (resp.code === 0) {
this.clubList = resp.data
}
})
},
},
async created() {
this.pageData();
this.getClubsByRole();
this.unions = await getUnionList()
this.clubOption = await getClubsByRole()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,352 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div class="platform" id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年"
style="width: 100%"
type="year" v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">经办人:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend"
style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="rei.userName"></el-option>
<el-option label="工号" value="rei.loginName"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">协会:</div>
<div class="search-item-option">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;" v-model="pageForm.clubId">
<el-option
:key="item.stid"
:label="item.name"
:value="item.stid"
v-for="item in clubOption">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动类型:</div>
<div class="search-item-option">
<el-select clearable placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.jf_source">
<el-option :label="item.name" :value="item.code"
v-for="item in budgetTypeOption"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="报销列表">
<template #func>
<el-radio-group @change="doSearch" size="small"
v-model="pageForm.isAudit">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
style="width: 100%"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='jf_source'">
<dict-tag :options="budgetTypeOption"
:value="row.jf_source"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activity_name'">
<span>{{row.activity_name}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='helpUnitName'">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.jf_source)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)&&['4270', '4330', '4450'].includes(row.unitId)">{{row.unitName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.jf_source)&&!['4270', '4330', '4450'].includes(row.unitId)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.jf_source)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center"
label="操作" width="300px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">
查看
</el-button>
<el-button size="mini" type="primary" @click="openAudit(row)"
:disabled="row.State!=3070">
审核
</el-button>
<el-button size="mini" type="danger" @click="doRevoke(row.id)"
v-if="[3075,3076,3080].includes(row.State)&&row.money>50000">
撤回
</el-button>
<el-button size="mini" type="danger" @click="doRevoke(row.id)"
v-if="[3075,3076,3090].includes(row.State)&&row.money<50000">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<info handle label="工会副主席审核" ref="info2">
<template #handle>
<el-form :model="formData" :rules="formRules" label-position="right"
label-width="120px"
ref="form"
style="padding: 20px 0">
<vi-title2 title="审核信息"></vi-title2>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人员" prop="username">
<el-input disabled
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间" prop="time">
<el-input disabled v-model="formData.auditTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见" prop="auditOpinion">
<el-input maxlength="500" placeholder="请填写您的审核意见"
rows="4"
type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签字" prop="auditSign">
<sign :qz.sync="formData.auditSign" prefix="finance"
:is_value_base64="false"></sign>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :loading="submitLoading"
@click="doAudit(1)" type="danger">
</el-button>
<el-button :loading="submitLoading" @click="doAudit(2)"
type="info">退回修改
</el-button>
<el-button :loading="submitLoading" @click="doAudit(3)"
type="primary">通 过
</el-button>
</div>
</template>
</info>
</template>
<template #view>
<info ref="info"></info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
clubList: [],
unions: [],
units: [],
pageForm: {
searchName: "rei.userName",
isAudit: 3,
year: new Date().getFullYear() + ""
},
formRules: {
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'jf_source', label: '活动类型', sortable: true},
{prop: 'activity_name', label: '活动项目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'money', label: '金额'},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'stateId', label: '申请状态', sortable: true}
],
budgetTypeOption: [],
clubOption: [],
}
},
components: {
'info': httpVueLoader('/components/reimbursement/reimbursementNew.vue?v=' + new Date().getTime()),
},
methods: {
openView(id) {
this.$refs.guava.view()
this.$refs.info.getInfo(id)
},
openAudit(row) {
this.formData = {
id: row.id,
jf_source: row.jf_source,
flag: "3",
clubId: row.clubId,
unionId: row.unionId,
auditOpinion:"同意",
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
this.$refs.guava.edit()
this.$refs.info2.getInfo(row.id)
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doRevoke(id) {
this.$confirm('确定要撤回审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const res = await $.post('/platform/reimbursement/viceChairmanAudit/doRevoke', {id})
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
} else {
this.$message.error(res.msg)
}
})
},
doAudit(flag) {
this.$refs.form.validate((valid) => {
if (valid) {
this.$confirm('确定要提交审核吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
this.formData.flag = flag
const res = await $.post('/platform/reimbursement/viceChairmanAudit/doAudit', this.formData)
this.submitLoading = false
if (res.code === 0) {
this.$message.success('操作成功')
this.pageData()
this.$refs.guava.index()
} else {
this.$message.error(res.msg)
}
})
}
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
},
getClubsByRole() {
$.get("/platform/reimbursement/viceChairmanAudit/getClubsByRole").then(resp => {
if (resp.code === 0) {
this.clubList = resp.data
}
})
},
},
async created() {
this.pageData();
this.getClubsByRole();
this.unions = await getUnionList()
this.clubOption = await getClubsByRole()
this.budgetTypeOption = await getDictByCode("ACTIVITY_BUDGET_TYPE");
}
})
</script>
<!--#
}
#-->