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
@@ -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