工会报销
This commit is contained in:
@@ -83,6 +83,9 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item prop="code" label="字典代码">
|
||||
<el-input maxlength="100" placeholder="字典代码" v-model="formData.code" auto-complete="off" tabindex="5" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" label="字典备注">
|
||||
<el-input maxlength="100" placeholder="字典备注" v-model="formData.remark" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-switch v-model="formData.disabled" active-color="#ff4949" inactive-color="#13ce66"></el-switch>
|
||||
</el-form-item>
|
||||
@@ -100,6 +103,9 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item prop="code" label="字典代码">
|
||||
<el-input maxlength="100" placeholder="字典代码" v-model="formData.code" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" label="字典备注">
|
||||
<el-input maxlength="100" placeholder="字典备注" v-model="formData.remark" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-switch v-model="formData.disabled" active-color="#ff4949" inactive-color="#13ce66"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
@@ -0,0 +1,517 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="工会报销" define_key="GHBX"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="经办人">{{formData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{formData.loginName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="报销类别">
|
||||
<el-form-item label="报销类别" prop="reimburseType">
|
||||
<el-radio-group v-model="formData.reimburseType" size="medium">
|
||||
<el-radio :label="item.code" border v-for="item in dict.type.UNION_REIMBURSE_TYPE">
|
||||
{{item.name}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付方式">
|
||||
<el-form-item label="支付方式" prop="paymentWay">
|
||||
<el-radio-group v-model="formData.paymentWay" size="medium">
|
||||
<el-radio :label="item.code" border v-for="item in dict.type.UNION_REIMBURSE_PAYMENT_WAY">
|
||||
{{item.name}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="报销项目" span="2">
|
||||
<el-form-item label="报销项目" prop="reimburseProject">
|
||||
<el-radio-group v-model="formData.reimburseProject" size="medium">
|
||||
<el-radio :label="item.code" border v-for="item in reimburseProjects">
|
||||
{{item.name}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="报销经费来源" span="2">
|
||||
<el-form-item label="报销经费来源" prop="reimburseFundSource">
|
||||
<el-radio-group v-model="formData.reimburseFundSource" size="medium" @change="reimburseFundSourceChange">
|
||||
<el-radio :label="item.code" border v-for="item in dict.type.UNION_REIMBURSE_FUND_SOURCE">
|
||||
{{item.name}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-form-item prop="mobile" label="联系方式">
|
||||
<el-input v-model="formData.mobile" show-word-limit
|
||||
placeholder="请输入联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="所属社团" v-if="formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">
|
||||
<el-form-item label="所属社团" prop="clubId">
|
||||
<el-select v-model="formData.clubId" style="width: 100%"
|
||||
placeholder="请选择所属社团" filterable clearable>
|
||||
<el-option v-for="item in clubOptions" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="经费余额">{{formData.fundBalance}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="户名">
|
||||
<el-form-item prop="bankUserName" label="户名">
|
||||
<el-input v-model="formData.bankUserName" show-word-limit
|
||||
placeholder="请输入户名"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="银行账号">
|
||||
<el-form-item prop="bankCardNumber" label="银行账号">
|
||||
<el-input v-model="formData.bankCardNumber" show-word-limit
|
||||
placeholder="请输入银行账号"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开户行">
|
||||
<el-form-item prop="bankOfDeposit" label="开户行">
|
||||
<el-input v-model="formData.bankOfDeposit" show-word-limit
|
||||
placeholder="请输入开户行"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="慰问对象" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item label="慰问对象" prop="condolenceId">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="formData.condolenceId"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入姓名或工号查询"
|
||||
:remote-method="createRemoteMethod(userOptions)"
|
||||
@change="userChange">
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系方式" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item prop="condolenceMobile" label="联系方式">
|
||||
<el-input v-model="formData.condolenceMobile" show-word-limit
|
||||
placeholder="请输入联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问类型" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item label="慰问类型" prop="type">
|
||||
<el-select v-model="formData.condolenceType" @change="typeChange" style="width: 100%"
|
||||
placeholder="请选择慰问类型">
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:disabled="item.isDisabled"
|
||||
:label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问金额" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||
{{formData.money}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问时间" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item label="慰问时间" prop="condolenceTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="formData.condolenceTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择慰问时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动名称" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item label="活动名称" prop="activityName">
|
||||
<el-input type="text" v-model="formData.activityName" placeholder="请输入活动名称"
|
||||
maxlength="60"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动类型" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">
|
||||
<el-form-item label="活动类型" prop="activityType">
|
||||
<el-select v-model="formData.activityType" 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-descriptions-item>
|
||||
<el-descriptions-item label="活动人数" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">
|
||||
<el-form-item label="活动人数" prop="activityNumber">
|
||||
<el-input v-model="formData.activityNumber" placeholder="请输入活动人数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动地点" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item label="活动地点" prop="activityPlace">
|
||||
<el-input v-model="formData.activityPlace" placeholder="请输入活动地点" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报销金额" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item label="报销金额" prop="money">
|
||||
<el-input v-model="formData.money" placeholder="输入报销金额"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动时间" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<el-form-item label="活动时间" prop="activityTime">
|
||||
<el-date-picker v-model="formData.activityTime"
|
||||
placeholder="活动时间"
|
||||
style="width: 100%" type="date"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="发票张数" v-if="formData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">
|
||||
<el-form-item label="发票张数" prop="invoiceNumber">
|
||||
<el-input-number v-model="formData.invoiceNumber"
|
||||
:max="1000" :min="0" controls-position="right"
|
||||
placeholder="请填写发票张数"
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发票号码" v-if="formData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">
|
||||
<el-form-item id="invoice" label="发票号码" prop="invoice">
|
||||
<el-input v-model="formData.invoice"
|
||||
placeholder="请填写发票号码,如有多个请用逗号分隔"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="支付内容" :span="2">
|
||||
<el-form-item prop="remark" label="支付内容">
|
||||
<el-input maxlength="500" v-model="formData.paymentNotes" placeholder="请填写支付内容"
|
||||
type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" >
|
||||
<template slot="label">
|
||||
附件
|
||||
</template>
|
||||
<el-form-item prop="files" label="附件">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE", "UNION_REIMBURSE_PAYMENT_WAY", "UNION_REIMBURSE_FUND_SOURCE"],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
reimburseType: "",
|
||||
},
|
||||
formRules: {
|
||||
reimburseType: [{required: true, message: '请选择报销类别', trigger: ["change", "blur"]}],
|
||||
paymentWay: [{required: true, message: '请选择支付方式', trigger: ["change", "blur"]}],
|
||||
reimburseProject: [{required: true, message: '请选择报销项目', trigger: ["change", "blur"]}],
|
||||
reimburseFundSource: [{required: true, message: '请选择经费来源', trigger: ["change", "blur"]}],
|
||||
mobile: [{required: true, message: '请填写联系方式', trigger: ["change", "blur"]}],
|
||||
bankUserName: [{required: true, message: '请填写户名', trigger: ["change", "blur"]}],
|
||||
bankCardNumber: [{required: true, message: '请填写银行账号', trigger: ["change", "blur"]}],
|
||||
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ["change", "blur"]}],
|
||||
condolencePeopleMobile: [{required: true, message: '请填写联系方式', trigger: ["change", "blur"]}],
|
||||
condolenceTime: [{required: true, message: '请选择慰问时间', trigger: ["change", "blur"]}],
|
||||
invoiceNumber: [{required: true, message: '请填写发票张数', trigger: ["change", "blur"]}],
|
||||
invoice: [{required: true, message: '请填写发票号码', trigger: ["change", "blur"]}],
|
||||
paymentNotes: [{required: true, message: '请填写支付内容', trigger: ["change", "blur"]}],
|
||||
},
|
||||
chooseType: {},
|
||||
userOptions: [],
|
||||
typeOptions: [],
|
||||
reimburseProjectList: [],
|
||||
reimburseProjects: [],
|
||||
clubOptions: []
|
||||
}
|
||||
},
|
||||
// 监听报销类别发生变化,报销项目联动改变
|
||||
watch: {
|
||||
"formData.reimburseType"(newVal) {
|
||||
if (newVal === 'UNION_REIMBURSE_TYPE_1') {
|
||||
this.reimburseProjects = this.reimburseProjectList.filter((o) => {
|
||||
return ['1', 'UNION_REIMBURSE_TYPE_1'].includes(o.remark)
|
||||
})
|
||||
} else {
|
||||
this.reimburseProjects = this.reimburseProjectList.filter((o) => {
|
||||
return ['1', 'UNION_REIMBURSE_TYPE_2'].includes(o.remark)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 添加对社团选择的监听
|
||||
"formData.clubId"(newVal) {
|
||||
// 当经费来源是社团且选择了具体社团时,重新查询余额
|
||||
if (this.formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3' && newVal) {
|
||||
// 选择了具体社团,获取社团名称并保存
|
||||
const selectedClub = this.clubOptions.find(club => club.id === newVal);
|
||||
if (selectedClub) {
|
||||
this.$set(this.formData, 'clubName', selectedClub.clubName);
|
||||
}
|
||||
this.reimburseFundSourceChange();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createRemoteMethod(options) {
|
||||
return (keyword) => {
|
||||
this.selectQueryUser(keyword, options)
|
||||
}
|
||||
},
|
||||
//查询慰问对象
|
||||
selectQueryUser(keyword, options) {
|
||||
options.length = 0
|
||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
options.push(...res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
userChange(val) {
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName,mobile } = user
|
||||
this.$set(this.formData, "condolenceName", userName)
|
||||
this.$set(this.formData, "condolenceMobile", mobile)
|
||||
}
|
||||
},
|
||||
//
|
||||
typeChange(id) {
|
||||
this.chooseType = this.typeOptions.find(o => o.id === id)
|
||||
if (this.chooseType) {
|
||||
this.$set(this.formData, "money", this.chooseType.money)
|
||||
this.$set(this.formData, "way", this.chooseType.way)
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
// 余额校验
|
||||
if (this.formData.money && this.formData.fundBalance) {
|
||||
const balance = parseFloat(this.formData.fundBalance);
|
||||
const money = parseFloat(this.formData.money);
|
||||
if (balance < money) {
|
||||
this.$message.warning("经费余额不足");
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/unionReimburse/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/unionReimburse/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
onSubmit() {
|
||||
// 余额校验
|
||||
if (this.formData.money && this.formData.fundBalance) {
|
||||
const balance = parseFloat(this.formData.fundBalance);
|
||||
const money = parseFloat(this.formData.money);
|
||||
if (balance < money) {
|
||||
this.$message.warning("经费余额不足");
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/unionReimburse/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/unionReimburse/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 再次提交
|
||||
onFinishTask() {
|
||||
// 余额校验
|
||||
if (this.formData.money && this.formData.fundBalance) {
|
||||
const balance = parseFloat(this.formData.fundBalance);
|
||||
const money = parseFloat(this.formData.money);
|
||||
if (balance < money) {
|
||||
this.$message.warning("经费余额不足");
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/unionReimburse/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/unionReimburse/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 初始化
|
||||
async init() {
|
||||
this.reimburseProjectList = await this.$businessTool.getDictOptions("UNION_REIMBURSE_PROJECT")
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/unionReimburse/apply/info", {id: this.bizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.selectQueryUser(this.formData.loginName, this.userOptions)
|
||||
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
|
||||
this.formData = {
|
||||
userName: username,
|
||||
loginName: loginname,
|
||||
unitId: unit?.id,
|
||||
unitName: unit?.name,
|
||||
unionId: union?.id,
|
||||
unionName: union?.name,
|
||||
reimburseType: "UNION_REIMBURSE_TYPE_1",
|
||||
mobile: mobile
|
||||
}
|
||||
}
|
||||
},
|
||||
//慰问类型查询
|
||||
queryCondolenceType() {
|
||||
this.$axios.post("/platform/unionReimburse/apply/queryCondolenceType")
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
//经费来源查询
|
||||
reimburseFundSourceChange() {
|
||||
// 检查是否有选择经费来源
|
||||
if (!this.formData.reimburseFundSource) {
|
||||
this.$set(this.formData, 'fundBalance', '');
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果是社团经费来源,但没有选择具体社团,则不查询
|
||||
if (this.formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3' && !this.formData.clubId) {
|
||||
this.$set(this.formData, 'fundBalance', '');
|
||||
return;
|
||||
}
|
||||
|
||||
// 定义API映射关系
|
||||
const apiMap = {
|
||||
'UNION_REIMBURSE_FUND_SOURCE_1': {
|
||||
url: "/platform/unionReimburse/apply/getSchoolBudget",
|
||||
},
|
||||
'UNION_REIMBURSE_FUND_SOURCE_2': {
|
||||
url: "/platform/unionReimburse/apply/getUnionBalance",
|
||||
},
|
||||
'UNION_REIMBURSE_FUND_SOURCE_3': {
|
||||
url: "/platform/unionReimburse/apply/getClubBudget",
|
||||
}
|
||||
};
|
||||
|
||||
const fundSource = this.formData.reimburseFundSource;
|
||||
const apiInfo = apiMap[fundSource];
|
||||
|
||||
// 如果没有匹配的API,清空经费余额并返回
|
||||
if (!apiInfo) {
|
||||
this.$set(this.formData, 'fundBalance', '');
|
||||
return;
|
||||
}
|
||||
|
||||
// 构造请求参数
|
||||
const params = {
|
||||
reimburseFundSource: fundSource
|
||||
};
|
||||
|
||||
// 如果是社团经费,需要传递社团ID
|
||||
if (fundSource === 'UNION_REIMBURSE_FUND_SOURCE_3' && this.formData.clubId) {
|
||||
params.clubId = this.formData.clubId;
|
||||
}
|
||||
|
||||
// 显示加载状态
|
||||
this.$set(this.formData, 'fundBalance', '查询中...');
|
||||
|
||||
// 发送请求
|
||||
this.$axios.post(apiInfo.url, params)
|
||||
.then(response => {
|
||||
if (response.code === 0) {
|
||||
// 显示经费余额(只显示数字,不显示"元")
|
||||
this.$set(this.formData, 'fundBalance', response.data || '0.00');
|
||||
} else {
|
||||
this.$set(this.formData, 'fundBalance', '查询失败');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("经费余额查询失败:", error);
|
||||
this.$set(this.formData, 'fundBalance', '查询失败');
|
||||
this.$message.error("经费余额查询失败");
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.queryCondolenceType()
|
||||
this.init()
|
||||
//社团查询
|
||||
this.$businessTool.listClub().then((res) => (this.clubOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="报销项目">
|
||||
<el-select v-model="pageForm.reimburseProject" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择报销项目" clearable>
|
||||
<el-option v-for="item in dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="item.code"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="经办人">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="pageForm.userName"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入经办人姓名或工号查询"
|
||||
:remote-method="createRemoteMethod(userOptions)"
|
||||
@change="userChange">
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="loginName" label="经办人工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="reimburseType" label="报销类别">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="row.reimburseType">
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reimburseProject" label="报销项目">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="row.reimburseProject">
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="money" label="金额"></el-table-column>
|
||||
<el-table-column prop="createTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
<union-reimburse-info ref="unionReimburseInfoRef">
|
||||
</union-reimburse-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"union-reimburse-info": unionReimburseInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
//查询经办人
|
||||
createRemoteMethod(options) {
|
||||
return (keyword) => {
|
||||
this.selectQueryUser(keyword, options)
|
||||
}
|
||||
},
|
||||
selectQueryUser(keyword, options) {
|
||||
options.length = 0
|
||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
options.push(...res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
userChange(val) {
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName } = user
|
||||
this.$set(this.pageForm, "userName", userName)
|
||||
}
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/unionReimburse/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onExport() {
|
||||
this.$downLoad(loc() + '/onExport', this.pageForm)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,140 @@
|
||||
const unionReimburseInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="经办人">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{viewData.unionName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="报销类别">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="viewData.reimburseType">
|
||||
</dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付方式">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
|
||||
:value="viewData.paymentWay">
|
||||
</dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报销项目">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="viewData.reimburseProject">
|
||||
</dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报销经费来源">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
|
||||
:value="viewData.reimburseFundSource">
|
||||
</dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式" >{{viewData.mobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属社团" v-if="viewData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">{{viewData.clubName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="经费余额" >{{viewData.fundBalance}}</el-descriptions-item>
|
||||
<el-descriptions-item label="户名" >{{viewData.bankUserName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="银行账号" >{{viewData.bankCardNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="开户行" >{{viewData.bankOfDeposit}}</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问对象" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.condolenceName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.condolenceMobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.typeName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.money}}</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问时间" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.condolenceTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{viewData.activityType}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{viewData.activityNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityPlace}}</el-descriptions-item>
|
||||
<el-descriptions-item label="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.money}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="发票张数" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{viewData.invoiceNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="发票号码" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{viewData.invoice}}</el-descriptions-item>
|
||||
<el-descriptions-item label="支付内容" :span="2">{{viewData.paymentNotes}}</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" :span="2">
|
||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
|
||||
<span v-else>暂无附件</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE", "UNION_REIMBURSE_PAYMENT_WAY", "UNION_REIMBURSE_FUND_SOURCE","UNION_REIMBURSE_PROJECT","PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/unionReimburse/apply/info', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="报销项目">
|
||||
<el-select v-model="pageForm.reimburseProject" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择报销项目" clearable>
|
||||
<el-option v-for="item in dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="item.code"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="经办人">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="pageForm.userName"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入经办人姓名或工号查询"
|
||||
:remote-method="createRemoteMethod(userOptions)"
|
||||
@change="userChange">
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="loginName" label="经办人工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="reimburseType" label="报销类别">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="row.reimburseType">
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reimburseProject" label="报销项目">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="row.reimburseProject">
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="money" label="金额"></el-table-column>
|
||||
<el-table-column prop="createTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<union-reimburse-info ref="unionReimburseInfoRef"></union-reimburse-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"union-reimburse-info": unionReimburseInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
//查询经办人
|
||||
createRemoteMethod(options) {
|
||||
return (keyword) => {
|
||||
this.selectQueryUser(keyword, options)
|
||||
}
|
||||
},
|
||||
selectQueryUser(keyword, options) {
|
||||
options.length = 0
|
||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
options.push(...res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
userChange(val) {
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName } = user
|
||||
this.$set(this.pageForm, "userName", userName)
|
||||
}
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/unionReimburse/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/unionReimburse/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,255 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="报销项目">
|
||||
<el-select v-model="pageForm.reimburseProject" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择报销项目" clearable>
|
||||
<el-option v-for="item in dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="item.code"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="经办人">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="pageForm.userName"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入经办人姓名或工号查询"
|
||||
:remote-method="createRemoteMethod(userOptions)"
|
||||
@change="userChange">
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="loginName" label="经办人工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="reimburseType" label="报销类别">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="row.reimburseType">
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reimburseProject" label="报销项目">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="row.reimburseProject">
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="money" label="金额"></el-table-column>
|
||||
<el-table-column prop="createTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
<union-reimburse-info ref="unionReimburseInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</union-reimburse-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"union-reimburse-info": unionReimburseInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
//查询经办人
|
||||
createRemoteMethod(options) {
|
||||
return (keyword) => {
|
||||
this.selectQueryUser(keyword, options)
|
||||
}
|
||||
},
|
||||
selectQueryUser(keyword, options) {
|
||||
options.length = 0
|
||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
options.push(...res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
userChange(val) {
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName } = user
|
||||
this.$set(this.pageForm, "userName", userName)
|
||||
}
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user