feat: 困难帮扶 整改

This commit is contained in:
2026-10-09 17:14:31 +08:00
parent 53bfc7f1cf
commit 7d76ae4e36
44 changed files with 95752 additions and 284 deletions
@@ -0,0 +1 @@
ALTER TABLE difficult_help_info ADD COLUMN applyMoney VARCHAR(200) NULL COMMENT '申请金额';
@@ -0,0 +1,116 @@
# 新增角色
INSERT INTO sys_role (id, name, code, aliasName, disabled, unitid, moduleId, note, sort, createdBy, createdAt,
updatedBy, updatedAt, delFlag)
VALUES ('494ac71eb8b44d0e99e19b7fde6bd469', '校工会办公室主任', 'SCHOOL_OFFICE_DIRECTOR', null, false, null,
'07d940ba34bd47399cda140894f5d86b', null, null, '17a7f8ad3ee947b4a26175049a9c253d', 1791510778436,
'17a7f8ad3ee947b4a26175049a9c253d', 1791510778437, false);
# 修改审核菜单名称
UPDATE sys_menu t
SET t.name = '校工会办公室主任审批'
WHERE t.id = 'df2fb530141c4245826ac9974ec90c9a';
UPDATE sys_menu t
SET t.name = '校工会主席审批'
WHERE t.id = 'a473302b80ce404e93bc820f858a14da';
UPDATE sys_menu t
SET t.name = '分管校领导审批'
WHERE t.id = '3e0bb63c5f0044bd837ad24633e92560';
UPDATE sys_menu t
SET t.name = '校工会办公室主任审批'
WHERE t.id = '23d30124199b486d8af79aba62440b15';
UPDATE sys_menu t
SET t.name = '校工会主席审批'
WHERE t.id = 'd736e4d7e8644cf38f248e7ad87ed6ad';
UPDATE sys_menu t
SET t.name = '分管校领导审批'
WHERE t.id = '35a9239d754c47b9afccce173cb72d64';
# 清除之前的菜单角色权限
# 校工会办公室主任审批
delete
from sys_role_menu
where menuId = 'df2fb530141c4245826ac9974ec90c9a';
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', 'df2fb530141c4245826ac9974ec90c9a');
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('494ac71eb8b44d0e99e19b7fde6bd469', 'df2fb530141c4245826ac9974ec90c9a');
delete
from sys_role_menu
where menuId = '23d30124199b486d8af79aba62440b15';
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', '23d30124199b486d8af79aba62440b15');
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('494ac71eb8b44d0e99e19b7fde6bd469', '23d30124199b486d8af79aba62440b15');
# 校工会主席审批
delete
from sys_role_menu
where menuId = 'a473302b80ce404e93bc820f858a14da';
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', 'a473302b80ce404e93bc820f858a14da');
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('6aece46b946e4fb9ac4cb15c0cd8c3e6', 'a473302b80ce404e93bc820f858a14da');
delete
from sys_role_menu
where menuId = 'd736e4d7e8644cf38f248e7ad87ed6ad';
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', 'd736e4d7e8644cf38f248e7ad87ed6ad');
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('6aece46b946e4fb9ac4cb15c0cd8c3e6', 'd736e4d7e8644cf38f248e7ad87ed6ad');
# 分管校领导审批
delete
from sys_role_menu
where menuId = '3e0bb63c5f0044bd837ad24633e92560';
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', '3e0bb63c5f0044bd837ad24633e92560');
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('b3854469e6f44901b22bb791cb538431', '3e0bb63c5f0044bd837ad24633e92560');
delete
from sys_role_menu
where menuId = '35a9239d754c47b9afccce173cb72d64';
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', '35a9239d754c47b9afccce173cb72d64');
INSERT INTO sys_role_menu (roleId, menuId)
VALUES ('b3854469e6f44901b22bb791cb538431', '35a9239d754c47b9afccce173cb72d64');
# 更新权限
UPDATE zhgh_cqgmy.sys_menu
SET permission = 'difficultHelp.firstApproval'
WHERE permission = 'difficultHelp.branchUnionApproval';
UPDATE zhgh_cqgmy.sys_menu
SET permission = 'difficultHelp.secondApproval'
WHERE permission = 'difficultHelp.unionLeaderApproval';
UPDATE zhgh_cqgmy.sys_menu
SET permission = 'difficultHelp.thirdApproval'
WHERE permission = 'difficultHelp.schoolUnionApproval';
UPDATE zhgh_cqgmy.sys_menu
SET permission = 'h5.difficultHelp.firstApproval'
WHERE permission = 'h5.difficultHelp.branchUnionApproval';
UPDATE zhgh_cqgmy.sys_menu
SET permission = 'h5.difficultHelp.secondApproval'
WHERE permission = 'h5.difficultHelp.unionLeaderApproval';
UPDATE zhgh_cqgmy.sys_menu
SET permission = 'h5.difficultHelp.thirdApproval'
WHERE permission = 'h5.difficultHelp.schoolUnionApproval';
# 新增字典项
INSERT INTO sys_dict (id, parentId, path, name, code, disabled, location, hasChildren, createdBy, createdAt, updatedBy,
updatedAt, delFlag, remark)
VALUES ('4d3e3472ae324552b16f0aaf07c37004', '501e0a4edca748ddb739ffb679170d50', '00020017', '校工会办公室主任',
'SCHOOL_OFFICE_DIRECTOR', false, 9614, false, '17a7f8ad3ee947b4a26175049a9c253d', 1791517263500,
'17a7f8ad3ee947b4a26175049a9c253d', 1791517263500, false, null);
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -17,7 +17,7 @@
@change="modeChange"
:disabled="formData.id" style="width: 100%">
<el-option label="本人申请" value="1"></el-option>
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
<el-option v-if="$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')"
label="替他人申请" value="2"></el-option>
</el-select>
</el-form-item>
@@ -127,7 +127,12 @@
</el-descriptions-item>
<el-descriptions-item label="申请原因" :span="3">
<el-descriptions-item label="申请金额(元)">
<el-form-item prop="applyMoney" :rules="[{required:true,type:'number',min:0.01,message:'请填写大于零的申请金额',trigger:['change','blur']}]">
<el-input-number v-model="formData.applyMoney" :precision="2" :min="0.01" placeholder="请输入申请金额"></el-input-number>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="申请原因" :span="3">
<el-form-item prop="reason">
<el-input maxlength="500" :autosize="{ minRows: 5, maxRows: 10}"
placeholder="请简述申请原因"
@@ -230,6 +235,7 @@
businessId: GetQueryString("businessId"),
instanceId: GetQueryString("instanceId"),
formData: {
applyMoney: undefined,
id: GetQueryString("businessId"),
mode: '1'
},
@@ -263,6 +269,9 @@
methods: {
// 查询受助人
queryRecipients(key) {
if (String(this.formData.mode) !== "2" || !this.$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')) {
return
}
this.$axios.get("/platform/difficultHelp/apply/queryRecipients", {
key
}).then(res => {
@@ -15,7 +15,7 @@ layout("/layouts/platform.html"){
<el-form-item prop="mode">
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
<el-option label="本人申请" value="1"></el-option>
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
<el-option v-if="$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')"
label="替他人申请" value="2"></el-option>
</el-select>
</el-form-item>
@@ -151,7 +151,12 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="生活致困原因" :span="3">
<el-descriptions-item label="申请金额(元)">
<el-form-item prop="applyMoney" :rules="[{required:true,type:'number',min:0.01,message:'请填写大于零的申请金额',trigger:['change','blur']}]">
<el-input-number v-model="formData.applyMoney" :precision="2" :min="0.01" placeholder="请输入申请金额"></el-input-number>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="生活致困原因" :span="3">
<el-form-item prop="reason">
<el-input maxlength="500" :autosize="{ minRows: 5, maxRows: 10}"
placeholder="请简述生活致困原因"
@@ -315,6 +320,7 @@ layout("/layouts/platform.html"){
time: '',
blockMessage: '',
formData: {
applyMoney: undefined,
id: GetQueryString("bizId"),
mode: '1',
applyCount: '1',
@@ -429,6 +435,9 @@ layout("/layouts/platform.html"){
// 查询受助人
queryRecipients(key) {
if (String(this.formData.mode) !== "2" || !this.$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')) {
return
}
this.$axios.post("/platform/difficultHelp/apply/queryRecipients", {
key
}).then(res => {
@@ -605,7 +614,7 @@ layout("/layouts/platform.html"){
this.$axios.post('/platform/difficultHelp/apply/getIsCanPlay').then(res => {
if (res.code === 0) {
// 新增申请进入页面时,优先校验当前登录人本年度是否已经申请过,已申请则直接拦截新增。
if (!this.bizId && res.data.hasCurrentYearApply) {
if (!this.bizId && res.data.hasCurrentYearApply && !this.$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')) {
this.isShow = false
this.$set(this, 'blockMessage', '抱歉,您本年度已申请困难帮扶,不能重复申请。')
} else {
@@ -1,8 +1,23 @@
<div id="difficult_help_branch_union_approval_form">
<el-form :model="formData" ref="formRef" label-width="0" label-suffix=":" class="flow-task-form">
<el-form :model="formData" ref="formRef" label-width="100px" label-suffix=":">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'请选择级别',trigger:['change','blur']}]">
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="帮扶金额" prop="money" :rules="[{required:true,message:'请填写帮扶金额',trigger:['change','blur']}]">
<el-input-number v-model="formData.money" style="width: 100%" :precision="2" :min="0" placeholder="请输入帮扶金额"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<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-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
@@ -14,14 +29,23 @@
return {
businessId: GetQueryString("businessId"),
formData: {
tf_opinion: ""
level: "",
money: undefined,
tf_sign: "", tf_opinion: ""
},
}
},
methods: {
handleTaskAction(val) {
async handleTaskAction(val) {
try {
const valid = await this.$refs.formRef.validate()
if (!valid) return
} catch (error) {
return
}
console.log(val)
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...val,
...this.formData
@@ -82,18 +82,56 @@ layout("/layouts/platform.html"){
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog title="设置帮扶审批信息" :visible.sync="batchVisible" width="760px">
<el-form :model="batchForm" ref="batchFormRef" label-width="130px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'请选择级别',trigger:['change','blur']}]">
<dict-select v-model="batchForm.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="帮扶金额(元)" prop="money" :rules="[{required:true,message:'请填写帮扶金额',trigger:['change','blur']}]">
<el-input-number v-model="batchForm.money" style="width: 100%" :precision="2" :min="0" placeholder="请输入帮扶金额"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
<user-opinion-textarea v-model="batchForm.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="batchForm.tf_sign" :key="batchForm.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<span slot="footer"><el-button @click="batchVisible = false">取消</el-button><el-button type="primary" @click="submitBatch">确定</el-button></span>
</el-dialog>
<template #edit>
<info ref="infoRef">
<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 :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'请选择级别',trigger:['change','blur']}]">
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="帮扶金额" prop="money" :rules="[{required:true,message:'请填写帮扶金额',trigger:['change','blur']}]">
<el-input-number v-model="formData.money" style="width: 100%" :precision="2" :min="0" placeholder="请输入帮扶金额"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<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-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
@@ -132,13 +170,15 @@ layout("/layouts/platform.html"){
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
{ prop: "applyTime", label: "申请时间", sortable: true },
{ prop: "applyCount", label: "申请次数", sortable: true },
{ prop: "taskName", label: "当前节点" },
{ prop: "curTaskName", label: "当前节点" },
{ prop: "instanceState", label: "流程状态" }
],
unions: [],
units: [],
formData: {},
batchVisible: false,
batchForm: {level: "", money: undefined, tf_sign: "", tf_opinion: ""},
showApprovalForm: false,
selectData: []
}
@@ -168,12 +208,23 @@ layout("/layouts/platform.html"){
return;
}
this.batchForm = {level: "", money: undefined, tf_sign: "", tf_opinion: ""}
this.batchVisible = true
},
async submitBatch() {
try {
const valid = await this.$refs.batchFormRef.validate()
if (!valid) return
} catch (error) {
return
}
const message = '确定要一键审核这 ' + this.selectData.length + ' 条记录吗?';
this.$confirm(message, '批量审核确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.batchVisible = false;
this.batchApprove(this.selectData);
}).catch(() => {
@@ -221,10 +272,10 @@ layout("/layouts/platform.html"){
approveSingleItem(item) {
return new Promise((resolve, reject) => {
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
processTaskId: item.taskId,
tf_opinion: '审核通过',
...this.batchForm,
submitType: 1
})
}).then((res) => {
@@ -243,19 +294,29 @@ layout("/layouts/platform.html"){
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
taskName: row.curTaskName,
level: "",
money: undefined,
tf_sign: "", tf_opinion: ""
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
async handleTaskAction(val) {
try {
const valid = await this.$refs.formRef.validate()
if (!valid) return
} catch (error) {
return
}
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
@@ -6,6 +6,7 @@ const INFO = {
</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
<el-descriptions-item label="申请金额(元)">{{ viewData.applyMoney }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
<!--\t\t<el-descriptions-item label="申请模式">{{ viewData.mode == 1 ? '本人申请' : '替他人申请' }}</el-descriptions-item>-->
@@ -87,12 +88,15 @@ const INFO = {
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<template v-if="task.displayName == '校工会审核'">
<el-descriptions-item label="审批级别">{{ viewData.level }}</el-descriptions-item>
<el-descriptions-item label="审批金额">{{ '¥' + viewData.money }}</el-descriptions-item>
<template v-if="task.taskFormData.level != null">
<el-descriptions-item label="审批级别">{{ task.taskFormData.level }}</el-descriptions-item>
<el-descriptions-item label="帮扶金额(元)">{{ task.taskFormData.money }}</el-descriptions-item>
</template>
<el-descriptions-item label="审批签字" :span="3" v-if="task.taskFormData && task.taskFormData.sign">
<el-image :src="task.taskFormData.sign" style="height: 80px" fit="contain"></el-image>
</el-descriptions-item>
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion }}
</el-descriptions-item>
@@ -64,16 +64,22 @@ layout("/layouts/platform.html"){
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<el-table-column label="操作" fixed="right" width="300px" class-name="difficult-help-mine-actions">
<template slot-scope="{row}">
<el-button @click="openView(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 v-if="row.createdBy === $store.state.user.id && (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 v-if="row.createdBy === $store.state.user.id && row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
<el-button @click="doExportApply(row)" size="mini" type="primary">打印</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
<el-dropdown v-if="row.createdBy === $store.state.user.id && row.instanceState == 20" trigger="click" @command="format => doExportApply(row, format)">
<el-button size="mini" type="primary">导出</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="pdf">导出 PDF</el-dropdown-item>
<el-dropdown-item command="word">导出 Word</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button v-if="row.createdBy === $store.state.user.id && (row.taskKey === 'startTask' || !row.instanceId)" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -87,6 +93,18 @@ layout("/layouts/platform.html"){
</div>
<style nonce="${cspNonce!}">
#app .difficult-help-mine-actions .cell {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}
#app .difficult-help-mine-actions .cell > .el-button {
margin-left: 0;
}
</style>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
@@ -107,6 +125,7 @@ layout("/layouts/platform.html"){
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "mobile", label: "联系方式", sortable: true },
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
{ prop: "applyMoney", label: "申请金额", sortable: true, width: "135"},
{ prop: "money", label: "实际帮扶金额", sortable: true, width: "135"},
{ prop: "applyTime", label: "申请时间", sortable: true },
{ prop: "applyCount", label: "申请次数", sortable: true },
@@ -168,8 +187,8 @@ layout("/layouts/platform.html"){
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
}
},
doExportApply(row) {
this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=true')
doExportApply(row, format) {
this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=' + (format === 'pdf'))
}
},
async created() {
@@ -1,11 +1,11 @@
<div id="difficult_help_school_union_approval_form">
<el-form :model="formData" ref="formRef" label-width="0" label-suffix=":" class="flow-task-form">
<el-form-item label="审核金额" prop="tf_money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="请输入金额" v-model="formData.tf_money"></el-input-number>
</el-form-item>
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-form :model="formData" ref="formRef" label-width="100px" label-suffix=":">
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
@@ -17,15 +17,20 @@
return {
businessId: GetQueryString("businessId"),
formData: {
tf_money: 0,
tf_opinion: "",
tf_sign: "", tf_opinion: "",
},
}
},
methods: {
handleTaskAction(val) {
async handleTaskAction(val) {
try {
const valid = await this.$refs.formRef.validate()
if (!valid) return
} catch (error) {
return
}
console.log(val)
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...val,
...this.formData
@@ -83,11 +83,11 @@ layout("/layouts/platform.html"){
<el-dialog title="设置审核信息" :visible.sync="dialogVisible" width="30%" center>
<el-form :model="formData" ref="formData" label-width="100px">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="审核金额" prop="money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="请输入金额" v-model="formData.money" style="width: 100%" :precision="2" :min="0"></el-input-number>
<el-form-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -103,25 +103,13 @@ layout("/layouts/platform.html"){
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<search-item>
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</search-item>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核金额" prop="money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="请输入金额" v-model="formData.money" style="width: 100%" :precision="2"
:min="0" ></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
:rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
@@ -166,14 +154,10 @@ layout("/layouts/platform.html"){
units: [],
formData: {
level: '',
money: 0,
tf_opinion: "",
tf_sign: "", tf_opinion: "",
},
showApprovalForm: false,
auditForm: {
level: '',
money: 0
},
dialogVisible: false
}
@@ -254,39 +238,17 @@ layout("/layouts/platform.html"){
}
},
approveSingleItem(item) {
return new Promise((resolve, reject) => {
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
data: JSON.stringify({
...this.formData,
id: item.id
})
}).then((saveRes) => {
if (saveRes.code !== 0) {
throw new Error(saveRes.msg || '保存失败');
}
return this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
processTaskId: item.taskId,
tf_opinion: '审核通过',
submitType: 1,
})
});
}).then((taskRes) => {
if (taskRes.code === 0) {
resolve(taskRes);
} else {
throw new Error(taskRes.msg || '审批失败');
}
}).catch((error) => {
reject(error);
});
});
async approveSingleItem(item) {
const res = await this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({processTaskId: item.taskId, tf_opinion: this.formData.tf_opinion, tf_sign: this.formData.tf_sign, submitType: 1})
})
if (res.code !== 0) throw new Error(res.msg || '审批失败')
},
openAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
tf_sign: "",
processTaskId: row.taskId,
taskName: row.curTaskName,
id: row.id
@@ -295,35 +257,24 @@ layout("/layouts/platform.html"){
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
data: JSON.stringify({
...this.formData,
})
}).then((saveRes) => {
if (saveRes.code === 0) {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((taskRes) => {
if (taskRes.code === 0) {
this.$message.success('操作成功');
this.$refs.guava.index();
this.doSearch();
}
});
}
});
}).catch(() => {
});
async handleTaskAction(val) {
try {
const valid = await this.$refs.formRef.validate()
if (!valid) return
} catch (error) {
return
}
this.$confirm("您确定要提交吗?", "提示", {type: "warning"}).then(() => {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({...this.formData, submitType: val})
}).then(res => {
if (res.code === 0) {
this.$message.success('操作成功')
this.$refs.guava.index()
this.doSearch()
}
})
}).catch(() => {})
},
onRevoke(row) {
@@ -1,8 +1,23 @@
<div id="difficult_help_branch_union_approval_form">
<el-form :model="formData" ref="formRef" label-width="0" label-suffix=":" class="flow-task-form">
<el-form :model="formData" ref="formRef" label-width="100px" label-suffix=":">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'请选择级别',trigger:['change','blur']}]">
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="帮扶金额" prop="money" :rules="[{required:true,message:'请填写帮扶金额',trigger:['change','blur']}]">
<el-input-number v-model="formData.money" style="width: 100%" :precision="2" :min="0" placeholder="请输入帮扶金额"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<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-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
@@ -14,14 +29,23 @@
return {
businessId: GetQueryString("businessId"),
formData: {
tf_opinion: ""
level: "",
money: undefined,
tf_sign: "", tf_opinion: ""
},
}
},
methods: {
handleTaskAction(val) {
async handleTaskAction(val) {
try {
const valid = await this.$refs.formRef.validate()
if (!valid) return
} catch (error) {
return
}
console.log(val)
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...val,
...this.formData
@@ -81,18 +81,56 @@ layout("/layouts/platform.html"){
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog title="设置帮扶审批信息" :visible.sync="batchVisible" width="760px">
<el-form :model="batchForm" ref="batchFormRef" label-width="130px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'请选择级别',trigger:['change','blur']}]">
<dict-select v-model="batchForm.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="帮扶金额(元)" prop="money" :rules="[{required:true,message:'请填写帮扶金额',trigger:['change','blur']}]">
<el-input-number v-model="batchForm.money" style="width: 100%" :precision="2" :min="0" placeholder="请输入帮扶金额"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
<user-opinion-textarea v-model="batchForm.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="batchForm.tf_sign" :key="batchForm.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<span slot="footer"><el-button @click="batchVisible = false">取消</el-button><el-button type="primary" @click="submitBatch">确定</el-button></span>
</el-dialog>
<template #edit>
<info ref="infoRef">
<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 :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'请选择级别',trigger:['change','blur']}]">
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="帮扶金额" prop="money" :rules="[{required:true,message:'请填写帮扶金额',trigger:['change','blur']}]">
<el-input-number v-model="formData.money" style="width: 100%" :precision="2" :min="0" placeholder="请输入帮扶金额"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<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-item label="签字" prop="tf_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
@@ -138,6 +176,8 @@ layout("/layouts/platform.html"){
units: [],
formData: {},
batchVisible: false,
batchForm: {level: "", money: undefined, tf_sign: "", tf_opinion: ""},
showApprovalForm: false,
selectData: [],
}
@@ -161,12 +201,23 @@ layout("/layouts/platform.html"){
this.$message.warning('请勾选待审核数据!');
return;
}
this.batchForm = {level: "", money: undefined, tf_sign: "", tf_opinion: ""}
this.batchVisible = true
},
async submitBatch() {
try {
const valid = await this.$refs.batchFormRef.validate()
if (!valid) return
} catch (error) {
return
}
const message = '确定要一键审核这 ' + this.selectData.length + ' 条记录吗?';
this.$confirm(message, '批量审核确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.batchVisible = false;
this.batchApprove(this.selectData);
}).catch(() => {
@@ -214,10 +265,10 @@ layout("/layouts/platform.html"){
approveSingleItem(item) {
return new Promise((resolve, reject) => {
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
processTaskId: item.taskId,
tf_opinion: '审核通过',
...this.batchForm,
submitType: 1
})
}).then((res) => {
@@ -236,19 +287,29 @@ layout("/layouts/platform.html"){
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
taskName: row.curTaskName,
level: "",
money: undefined,
tf_sign: "", tf_opinion: ""
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
async handleTaskAction(val) {
try {
const valid = await this.$refs.formRef.validate()
if (!valid) return
} catch (error) {
return
}
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
@@ -5,7 +5,8 @@
<el-descriptions-item label="申请模式">{{ viewData.mode == 1 ? '本人申请' : '替他人申请' }}</el-descriptions-item>
<el-descriptions-item label="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="申请金额(元)">{{ viewData.applyMoney }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="出生年月">{{ viewData.birthday }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
@@ -94,6 +94,22 @@ layout("/layouts/platform_h5.html"){
color: #f06464;
}
.difficult-help-apply-form .difficult-help-apply-mode {
flex-wrap: nowrap;
gap: 8px;
}
.difficult-help-apply-form .difficult-help-apply-mode .van-radio {
flex-shrink: 0;
margin-right: 0;
}
.difficult-help-apply-form .difficult-help-apply-mode .van-radio__label {
margin-left: 4px;
font-size: 12px;
white-space: nowrap;
}
.difficult-help-apply-actions {
position: fixed;
z-index: 100;
@@ -308,10 +324,10 @@ layout("/layouts/platform_h5.html"){
required name="proxyLoginName"></van-field>
<van-field label="申请模式" name="mode" required :rules="[{ required: true }]">
<template #input>
<van-radio-group v-model="formData.mode" @change="modeChange" direction="horizontal">
<van-radio-group class="difficult-help-apply-mode" :value="formData.mode" @input="formData.mode !== $event && modeChange($event)" direction="horizontal" icon-size="14px">
<van-radio name="1" shape="square">本人申请</van-radio>
<van-radio
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
v-if="$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')"
name="2" shape="square">替他人申请
</van-radio>
</van-radio-group>
@@ -496,6 +512,9 @@ layout("/layouts/platform_h5.html"){
name="bankOfDeposit"
></van-field>
<van-field v-model="formData.applyMoney" name="applyMoney" label="申请金额(元)" type="number"
placeholder="请输入申请金额" required
:rules="[{required:true,message:'请填写申请金额'},{validator: value => Number(value) > 0, message:'申请金额必须大于零'}]"></van-field>
<van-field
v-model="formData.reason"
label="生活致困原因"
@@ -685,6 +704,7 @@ layout("/layouts/platform_h5.html"){
recipientHasSearched: false,
historyLayerPageKey: "difficult-help-apply",
formData: {
applyMoney: undefined,
id: GetQueryString("bizId"),
mode: "1",
familyList: [],
@@ -114,6 +114,33 @@ layout("/layouts/platform_h5.html"){
审批意见<span class="difficult-help-audit-card__required">*</span>
</h2>
<van-form ref="formRef">
<section class="difficult-help-info-card">
<h2 class="difficult-help-info-card__title">审核信息</h2>
<div class="difficult-help-audit-form">
<van-field
v-model="formData.level"
class="difficult-help-audit-select"
name="level"
label="级别"
placeholder="请选择级别"
readonly
is-link
required
@click="openLevelPicker"
:rules="[{ required: true, message: '请选择级别' }]"
></van-field>
<van-field
v-model="formData.money"
class="difficult-help-audit-money"
name="money"
label="帮扶金额(元)"
placeholder="请输入帮扶金额(元)"
type="number"
required
:rules="[{ required: true, message: '请输入帮扶金额(元)' }]"
></van-field>
</div>
</section>
<van-field
v-model="formData.tf_opinion"
class="difficult-help-audit-textarea"
@@ -125,7 +152,13 @@ layout("/layouts/platform_h5.html"){
maxlength="100"
show-word-limit
></van-field>
</van-form>
<section class="difficult-help-info-card">
<h2 class="difficult-help-info-card__title">审批签字</h2>
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
</van-field>
</section>
</van-form>
</section>
<div class="difficult-help-popup-actions">
<van-button class="difficult-help-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(6)">退回</van-button>
@@ -134,6 +167,14 @@ layout("/layouts/platform_h5.html"){
</div>
</div>
</info>
<van-popup :value="showLevelPicker" position="bottom" :close-on-click-overlay="false">
<van-picker
show-toolbar
:columns="levelColumns"
@confirm="onLevelConfirm"
@cancel="closeLevelPicker">
</van-picker>
</van-popup>
<van-dialog
:value="confirmVisible"
title="提示"
@@ -173,6 +214,8 @@ layout("/layouts/platform_h5.html"){
skeletonLoading: true,
formData: {},
levelColumns: [],
showLevelPicker: false,
showApprovalForm: false,
formLoading: false,
confirmVisible: false,
@@ -229,12 +272,43 @@ layout("/layouts/platform_h5.html"){
this.$set(this, "formData", {
processTaskId: row.taskId,
taskName: row.curTaskName,
tf_opinion: ""
level: "",
money: undefined,
tf_sign: "", tf_opinion: ""
})
this.$refs.infoRef.onOpen(row, row.curTaskName || "帮扶审核")
},
// val 为流程提交类型:1 同意、2 拒绝、6 退回;校验通过后打开历史栈确认框。
// 加载困难级别字典并转换为 Vant Picker 所需的 text/value 结构。
initLevelDict() {
return this.$axios.post("/open/common/dictOptions", {code: "DIFFICULT_LEVEL"}, {h5SkeletonLoading: true}).then((res) => {
const levelData = res && res.code === 0 ? res.data : []
this.$set(this, "levelColumns", (levelData || []).map((item) => ({
text: item.name,
value: item.code
})))
})
},
// 级别选择器作为详情上层弹框,打开时同步增加浏览器历史。
openLevelPicker() {
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-level-picker")) return
this.$set(this, "showLevelPicker", true)
},
closeLevelPicker(afterClose = null) {
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("difficult-help-level-picker", afterClose)) return
this.$set(this, "showLevelPicker", false)
if (typeof afterClose === "function") afterClose()
},
onLevelConfirm(option) {
this.closeLevelPicker(() => {
this.$set(this.formData, "level", option.value)
})
},
// val 为流程提交类型:1 同意、2 拒绝、6 退回;校验通过后打开历史栈确认框。
handleTaskAction(val) {
this.$refs.formRef.validate()
.then(() => {
@@ -260,7 +334,7 @@ layout("/layouts/platform_h5.html"){
// 提交流程任务参数,接口成功后清理详情弹框历史并刷新列表。
submitTaskAction() {
this.$set(this, "formLoading", true)
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: this.pendingSubmitType
@@ -345,10 +419,12 @@ layout("/layouts/platform_h5.html"){
},
},
created() {
this.initLevelDict()
this.initUnion().then(() => this.flushUnits())
if (!window.h5HistoryLayerManager) return
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
this.$set(this, "confirmVisible", stack.includes("difficult-help-action-confirm"))
this.$set(this, "showLevelPicker", stack.includes("difficult-help-level-picker"))
}))
},
beforeDestroy() {
@@ -25,6 +25,7 @@ const INFO = {
<van-cell-group :title="fullScreen ? '' : '基本信息'" :border="!fullScreen">
<van-cell title="填写人姓名">{{ viewData.proxyUserName || '--' }}</van-cell>
<van-cell title="填写人工号">{{ viewData.proxyLoginName || '--' }}</van-cell>
<van-cell title="申请金额(元)">{{ viewData.applyMoney }}</van-cell>
<van-cell title="性别">{{ viewData.sex || '--' }}</van-cell>
<van-cell title="受助人">
{{ viewData.userName || '--' }}{{ viewData.loginName ? '(' + viewData.loginName + ')' : '' }}
@@ -188,11 +189,14 @@ const INFO = {
{{ task.taskFormData && task.taskFormData.userName || '--' }}{{ task.taskFormData && task.taskFormData.loginName ? '(' + task.taskFormData.loginName + ')' : '' }}
</van-cell>
<van-cell title="办理时间">{{ task.finishTime || '--' }}</van-cell>
<van-cell v-if="task.displayName === '校工会审核'" title="审批级别">
{{ viewData.level || '--' }}
<van-cell v-if="task.taskFormData && task.taskFormData.sign" title="审批签字">
<img :src="task.taskFormData.sign" style="max-width: 100%; height: 80px; object-fit: contain">
</van-cell>
<van-cell v-if="task.displayName === '校工会审核'" title="审批金额">
{{ viewData.money ? '¥' + viewData.money : '--' }}
<van-cell v-if="task.taskFormData && task.taskFormData.level != null" title="审批级别">
{{ task.taskFormData.level }}
</van-cell>
<van-cell v-if="task.taskFormData && task.taskFormData.money != null" title="帮扶金额(元)">
{{ task.taskFormData.money }}
</van-cell>
<van-cell title="办理结果">
<dict-tag
@@ -388,16 +388,16 @@ layout("/layouts/platform_h5.html"){
<van-icon name="eye-o"></van-icon>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
<div class="action-btn" v-if="row.createdBy === $store.state.user.id && (row.taskKey === 'startTask' || !row.instanceId)"
@click="onEdit(row)">
<van-icon name="edit"></van-icon>
<span>编辑</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<div class="action-btn delete" v-if="row.createdBy === $store.state.user.id && row.canRevoke" @click="onRevoke(row)">
<van-icon name="revoke"></van-icon>
<span>撤回</span>
</div>
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
<div class="action-btn delete" v-if="row.createdBy === $store.state.user.id && (row.taskKey === 'startTask' || !row.instanceId)"
@click="onDelete(row.id)">
<van-icon name="delete-o"></van-icon>
<span>删除</span>
@@ -110,33 +110,7 @@ layout("/layouts/platform_h5.html"){
<info ref="infoRef" page-key="difficult-help-school-union-detail" full-screen>
<div v-if="showApprovalForm">
<van-form ref="formRef">
<section class="difficult-help-info-card">
<h2 class="difficult-help-info-card__title">审核信息</h2>
<div class="difficult-help-audit-form">
<van-field
v-model="formData.level"
class="difficult-help-audit-select"
name="level"
label="级别"
placeholder="请选择级别"
readonly
is-link
required
@click="openLevelPicker"
:rules="[{ required: true, message: '请选择级别' }]"
></van-field>
<van-field
v-model="formData.money"
class="difficult-help-audit-money"
name="money"
label="审核金额"
placeholder="请输入审核金额"
type="number"
required
:rules="[{ required: true, message: '请输入审核金额' }]"
></van-field>
</div>
</section>
<section class="difficult-help-info-card">
<h2 class="difficult-help-info-card__title">
审批意见<span class="difficult-help-audit-card__required">*</span>
@@ -153,6 +127,12 @@ layout("/layouts/platform_h5.html"){
show-word-limit
></van-field>
</section>
<section class="difficult-help-info-card">
<h2 class="difficult-help-info-card__title">审批签字</h2>
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
</van-field>
</section>
</van-form>
<div class="difficult-help-popup-actions">
<van-button class="difficult-help-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(6)">退回</van-button>
@@ -161,14 +141,7 @@ layout("/layouts/platform_h5.html"){
</div>
</div>
</info>
<van-popup :value="showLevelPicker" position="bottom" :close-on-click-overlay="false">
<van-picker
show-toolbar
:columns="levelColumns"
@confirm="onLevelConfirm"
@cancel="closeLevelPicker">
</van-picker>
</van-popup>
<van-dialog
:value="confirmVisible"
title="提示"
@@ -210,8 +183,6 @@ layout("/layouts/platform_h5.html"){
formData: {},
showApprovalForm: false,
formLoading: false,
showLevelPicker: false,
levelColumns: [],
confirmVisible: false,
confirmActionType: "task",
pendingSubmitType: null,
@@ -265,43 +236,12 @@ layout("/layouts/platform_h5.html"){
this.$set(this, "formData", {
processTaskId: row.taskId,
taskName: row.curTaskName,
money: 0,
id: row.id,
level: "",
tf_opinion: ""
tf_sign: "", tf_opinion: ""
})
this.$refs.infoRef.onOpen(row, row.curTaskName || "帮扶审核")
},
// 加载困难级别字典并转换为 Vant Picker 所需的 text/value 结构。
initLevelDict() {
return this.$axios.post("/open/common/dictOptions", {code: "DIFFICULT_LEVEL"}, {h5SkeletonLoading: true}).then((res) => {
const levelData = res && res.code === 0 ? res.data : []
this.$set(this, "levelColumns", (levelData || []).map((item) => ({
text: item.name,
value: item.code
})))
})
},
// 级别选择器作为详情上层弹框,打开时同步增加浏览器历史。
openLevelPicker() {
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-level-picker")) return
this.$set(this, "showLevelPicker", true)
},
closeLevelPicker(afterClose = null) {
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("difficult-help-level-picker", afterClose)) return
this.$set(this, "showLevelPicker", false)
if (typeof afterClose === "function") afterClose()
},
onLevelConfirm(option) {
this.closeLevelPicker(() => {
this.$set(this.formData, "level", option.value)
})
},
// val 为流程提交类型:1 同意、2 拒绝、6 退回;校验通过后打开历史栈确认框。
handleTaskAction(val) {
this.$refs.formRef.validate()
@@ -325,21 +265,14 @@ layout("/layouts/platform_h5.html"){
})
},
// 先保存级别和金额,再提交 processTaskId、审批意见及流程提交类型。
submitTaskAction() {
this.$set(this, "formLoading", true)
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
data: JSON.stringify({...this.formData})
})
.then((saveRes) => {
if (!saveRes || saveRes.code !== 0) return null
return this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: this.pendingSubmitType
})
})
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: this.pendingSubmitType
})
})
.then((res) => {
if (res && res.code === 0) {
const afterClose = () => {
@@ -420,11 +353,9 @@ layout("/layouts/platform_h5.html"){
},
created() {
this.initUnion().then(() => this.flushUnits())
this.initLevelDict()
if (!window.h5HistoryLayerManager) return
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
this.$set(this, "confirmVisible", stack.includes("difficult-help-action-confirm"))
this.$set(this, "showLevelPicker", stack.includes("difficult-help-level-picker"))
}))
},
beforeDestroy() {
@@ -129,11 +129,11 @@ layout("/layouts/platform_h5.html"){
v-model="formData.money"
class="difficult-help-audit-money"
name="money"
label="审核金额"
placeholder="请输入审核金额"
label="帮扶金额(元)"
placeholder="请输入帮扶金额(元)"
type="number"
required
:rules="[{ required: true, message: '请输入审核金额' }]"
:rules="[{ required: true, message: '请输入帮扶金额(元)' }]"
></van-field>
</div>
</section>
@@ -153,6 +153,12 @@ layout("/layouts/platform_h5.html"){
show-word-limit
></van-field>
</section>
<section class="difficult-help-info-card">
<h2 class="difficult-help-info-card__title">审批签字</h2>
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
</van-field>
</section>
</van-form>
<div class="difficult-help-popup-actions">
<van-button class="difficult-help-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(6)">退回</van-button>
@@ -267,8 +273,8 @@ layout("/layouts/platform_h5.html"){
processTaskId: row.taskId,
taskName: row.curTaskName,
level: "",
money: 0,
tf_opinion: ""
money: undefined,
tf_sign: "", tf_opinion: ""
})
this.$refs.infoRef.onOpen(row, row.curTaskName || "帮扶审核")
},
@@ -328,7 +334,7 @@ layout("/layouts/platform_h5.html"){
// 提交级别、金额、审批意见和流程提交类型,接口返回统一响应对象。
submitTaskAction() {
this.$set(this, "formLoading", true)
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/difficultHelp/approval/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: this.pendingSubmitType