first commit

This commit is contained in:
2026-01-08 14:58:16 +08:00
commit 556e5d64aa
9575 changed files with 1621095 additions and 0 deletions
@@ -0,0 +1,652 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-nav-bar title="帮扶申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="申请人信息" class="form-section">
<van-field label="填写人姓名" :rules="[{ required: true }]" v-model="formData.proxyUserName" readonly
required name="proxyUserName"></van-field>
<van-field label="填写人工号" :rules="[{ required: true }]" v-model="formData.proxyLoginName" readonly
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 name="1" shape="square">本人申请</van-radio>
<van-radio
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
name="2" shape="square">替他人申请
</van-radio>
</van-radio-group>
</template>
</van-field>
</van-cell-group>
<van-cell-group title="受助人信息" class="form-section">
<template v-if="formData.mode == 2">
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName"
required name="userName" placeholder="请输入受补助人姓名后点击查询">
<template #button>
<van-button :disabled="formData.id" @click="queryRecipients(formData.userName)"
size="small" type="primary">查询
</van-button>
</template>
</van-field>
<van-action-sheet
:actions="subsidizedList"
:close-on-click-overlay="false"
@cancel="userCancel"
@select="onUserSelect"
cancel-text="重新输入姓名或工号查询"
v-model="userSheetShow">
</van-action-sheet>
</template>
<template v-else>
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName" readonly
required name="userName"></van-field>
</template>
<van-field
v-model="formData.sex"
label="性别"
required
is-link
placeholder="请选择性别"
readonly
name="sex"
:rules="[{ required: true }]"
@click="showSexPicker = true"
></van-field>
<van-popup v-model="showSexPicker" position="bottom">
<van-picker
show-toolbar
:columns="['男性', '女性']"
@confirm="onSexConfirm"
@cancel="showSexPicker=false"
></van-picker>
</van-popup>
<van-field
v-model="formData.birthday"
label="出生年月"
is-link
placeholder="请填写出生年月"
@click="showBirthday"
required
readonly
name="birthday"
:rules="[{ required: true }]"
></van-field>
<van-popup v-model="showDatePicker" position="bottom">
<van-datetime-picker
type="date"
:min-date="new Date(1900, 0, 1)"
:max-date="maxDate"
@confirm="onDateConfirm"
@cancel="showDatePicker=false"
></van-datetime-picker>
</van-popup>
<van-field
v-model="formData.unionName"
label="所在工会"
placeholder="请选择所在工会"
readonly
name="unionName"
:rules="[{ required: true }]"
required
></van-field>
<van-field
v-model="formData.unitName"
label="所在单位"
placeholder="请选择所在单位"
readonly
name="unitName"
:rules="[{ required: true }]"
required
></van-field>
<van-field
v-model="formData.officialCapacity"
label="职务职称"
placeholder="请填写职务职称"
maxlength="50"
clearable
required
name="officialCapacity"
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.mobile"
label="手机号码"
placeholder="请填写手机号码"
maxlength="11"
clearable
required
name="mobile"
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.idCard"
label="身份证号"
placeholder="请填写身份证号"
maxlength="18"
clearable
required
name="idCard"
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.homeAddress"
label="家庭住址"
type="textarea"
placeholder="请填写家庭住址"
maxlength="50"
required
name="homeAddress"
:rules="[{ required: true }]"
></van-field>
</van-cell-group>
<van-cell-group title="困难类型及材料" class="form-section">
<van-field
v-model="formData.subsidyStandards"
label="困难类型"
placeholder="请选择款项"
is-link
@click="showSubsidyPicker = true"
required
name="subsidyStandards"
:rules="[{ required: true, message: '请选择款项' }]"
></van-field>
<van-popup v-model="showSubsidyPicker" position="bottom">
<van-picker
show-toolbar
:columns="subsidyStandards"
@confirm="onSubsidyConfirm"
@cancel="showSubsidyPicker=false"
></van-picker>
</van-popup>
<van-field
v-model="formData.bankCardNum"
label="收款账户"
maxlength="20"
clearable
name="bankCardNum"
placeholder="请填写收款账户"
:rules="[{ required: true }]"
required
></van-field>
<van-field
v-model="formData.bankUserName"
label="户名"
type="number"
placeholder="请填写户名"
:rules="[{ required: true }]"
required
name="bankUserName"
></van-field>
<van-field
v-model="formData.bankOfDeposit"
label="开户行"
type="number"
placeholder="请填写开户行"
:rules="[{ required: true }]"
required
name="bankOfDeposit"
></van-field>
<van-field
v-model="formData.reason"
label="申请原因"
type="textarea"
placeholder="请简述申请原因"
maxlength="500"
required
name="reason"
:rules="[{ required: true }]"
></van-field>
</van-cell-group>
<van-cell-group title="附件信息" class="form-section">
<van-field class="more-text" name="files" label="">
<template #input>
<h5-file-upload
slot="input"
:value.sync="formData.files"
:upload_number="10"
upload_mode="file"
upload_result_category="array"
upload_result_type="url"
complete_result
></h5-file-upload>
</template>
</van-field>
</van-cell-group>
<van-cell-group title="签字" class="form-section">
<van-field class="more-text" name="sign" label="">
<template #input>
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<div class="form-actions">
<van-button native-type="button" plain type="info" @click="onSave">保存</van-button>
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
<van-button type="primary" @click="onFinishTask" v-else>提交</van-button>
</div>
</van-form>
</div>
<van-dialog v-model="showDialog" class="family-dialog" title="添加家庭成员" show-cancel-button
:before-close="handleBeforeClose">
<van-cell-group>
<van-field
v-model="newMember.name"
label="姓名"
placeholder="请输入姓名"
required
></van-field>
<van-field
v-model="newMember.age"
label="年龄(岁)"
type="number"
placeholder="请输入年龄"
required
></van-field>
<van-field
v-model="newMember.relation"
label="关系"
placeholder="请输入关系"
required
></van-field>
<van-field
v-model="newMember.monthlyIncome"
label="月收入(元)"
type="number"
placeholder="请输入月收入"
required
></van-field>
</van-cell-group>
</van-dialog>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
store,
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
showSexPicker: false,
showDatePicker: false,
showSubsidyPicker: false,
formData: {
id: GetQueryString("bizId"),
mode: "1"
},
subsidyStandards: [
"患重大疾病",
"低收入家庭",
"因突发变故致困",
"长期病休",
"其他情况"
],
newMember: {
name: "",
age: "",
relation: "",
monthlyIncome: ""
},
showDialog: false,
isEditing: false,
editingIndex: null,
// 替他人申请相关
userSheetShow: false,
subsidizedList: [],
maxDate: new Date(),
}
},
methods: {
historyBack,
showBirthday() {
if (this.formData.birthday) {
this.$set(this.formData, "currentDate", new Date(this.formData.birthday))
}
this.showDatePicker = true
},
userCancel() {
if (!this.formData.userId) {
this.$set(this.formData, "userName", null)
}
this.subsidizedList = []
},
// 保存
onSave() {
this.$dialog.confirm({
title: "提示",
message: "您确定要保存吗?"
}).then(() => {
this.$axios.post("/platform/difficultHelp/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
if (res.code === 0) {
this.$toast("保存成功")
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
}
})
})
},
// 提交
onSubmit() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const result = this.isValidIdCard(this.formData.idCard)
if (result.status === 0) {
this.$toast(result.msg)
return
}
const bankRes = this.validateCard(this.formData.bankCardNum)
if (bankRes.status === 0) {
this.$toast(bankRes.msg)
return
}
this.$axios.post("/platform/difficultHelp/apply/submit", {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$toast("提交成功")
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
}
})
})
})
},
onFinishTask() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const result = this.isValidIdCard(this.formData.idCard)
if (result.status === 0) {
this.$toast(result.msg)
return
}
const bankRes = this.validateCard(this.formData.bankCardNum)
if (bankRes.status === 0) {
this.$toast(bankRes.msg)
return
}
this.$axios.post("/platform/difficultHelp/apply/submitAgain", {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$toast("提交成功")
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
}
})
})
})
},
// 查询受助人
async queryRecipients(key) {
if (this.formData.mode !== "2") {
return
}
const res = await this.$axios.post("/platform/difficultHelp/apply/queryRecipients", { key })
if (res.code === 0) {
res.data.forEach((v) => {
v.name = v.username
return v
})
this.subsidizedList = res.data
this.userSheetShow = true
}
},
onUserSelect(val) {
const user = this.subsidizedList.find((item) => item.id === val.id)
if (user) {
this.$set(this.formData, "userId", user.id)
this.$set(this.formData, "userName", user.username)
this.$set(this.formData, "loginName", user.loginname)
this.$set(this.formData, "sex", user.sex)
this.$set(this.formData, "unitId", user.unitid)
this.$set(this.formData, "unitName", user.unitName)
this.$set(this.formData, "unionId", user.unionid)
this.$set(this.formData, "unionName", user.unionName)
this.$set(this.formData, "birthday", this.$moment(user.birthday).format("YYYY-MM-DD"))
this.$set(this.formData, "mobile", user.mobile)
} else {
this.$set(this.formData, "userId", null)
this.$set(this.formData, "userName", null)
this.$set(this.formData, "loginName", null)
this.$set(this.formData, "sex", null)
this.$set(this.formData, "unitId", null)
this.$set(this.formData, "unitName", null)
this.$set(this.formData, "unionId", null)
this.$set(this.formData, "unionName", null)
this.$set(this.formData, "birthday", null)
this.$set(this.formData, "mobile", null)
}
this.userSheetShow = false
},
onSexConfirm(value) {
this.formData.sex = value
this.showSexPicker = false
},
onDateConfirm(value) {
this.formData.birthday = moment(value).format("YYYY-MM-DD")
this.showDatePicker = false
},
onSubsidyConfirm(value) {
this.formData.subsidyStandards = value
this.showSubsidyPicker = false
},
handleBeforeClose(action, done) {
if (action === "confirm") {
if (!this.newMember.name || !this.newMember.age || !this.newMember.relation || !this.newMember.monthlyIncome) {
this.$toast("请填写完整信息")
done(false)
} else {
done()
if (this.bizId) {
this.updateMember()
} else {
this.addMember()
}
done()
}
} else {
done()
}
},
addMember() {
this.formData.familyList.push({ ...this.newMember })
this.resetNewMember()
},
editMember(index) {
this.newMember = { ...this.formData.familyList[index] }
this.editingIndex = index
this.isEditing = true
this.showDialog = true
},
updateMember() {
this.formData.familyList.splice(this.editingIndex, 1, { ...this.newMember })
this.resetNewMember()
},
removeMember(index) {
this.formData.familyList.splice(index, 1)
},
resetNewMember() {
this.newMember = { name: "", age: "", relation: "", monthlyIncome: "" }
this.isEditing = false
this.editingIndex = null
},
findOne(id) {
this.$axios.post("/platform/difficultHelp/mine/findOne", { id }).then(res => {
if (res.code === 0) {
this.formData = res.data
}
})
},
// 申请模式
modeChange(val) {
const user = this.$store.state.user
if (val === "1") {
this.$set(this.formData, "userId", user.id)
this.$set(this.formData, "userName", user.username)
this.$set(this.formData, "loginName", user.loginname)
this.$set(this.formData, "proxyUserId", user.id)
this.$set(this.formData, "proxyUserName", user.username)
this.$set(this.formData, "proxyLoginName", user.loginname)
this.$set(this.formData, "mode", "1")
this.$set(this.formData, "sex", user.sex)
this.$set(this.formData, "unitId", user.unit.id)
this.$set(this.formData, "unitName", user.unit.name)
this.$set(this.formData, "unionId", user.union.id)
this.$set(this.formData, "unionName", user.union.name)
this.$set(this.formData, "monthlyIncome", null)
this.$set(this.formData, "birthday", this.$moment(user.birthday).format("YYYY-MM-DD"))
this.$set(this.formData, "mobile", user.mobile)
this.$set(this.formData, "homeAddress", user.homeAddress)
this.$set(this.formData, "subsidyStandards", null)
this.$set(this.formData, "reason", null)
this.$set(this.formData, "remarks", null)
this.$set(this.formData, "familyList", [])
this.$set(this.formData, "files", [])
this.queryRecipients(user.loginname)
} else {
this.formData = {}
this.$set(this.formData, "proxyUserId", user.id)
this.$set(this.formData, "proxyUserName", user.username)
this.$set(this.formData, "proxyLoginName", user.loginname)
this.$set(this.formData, "mode", "2")
this.$set(this.formData, "familyList", [])
this.$set(this.formData, "files", [])
}
},
/**
* 检验身份证号
* @param idCard
* @returns {{status: number, msg: string}}
*/
isValidIdCard(idCard) {
// 校验18位身份证号
const format18 = /^(((([1][1-5])|([2][1-3])|([3][1-7])|([4][1-6])|([5][0-4])|([6][1-5])|([7][1])|([8][1-2]))\d{4})|(([9](([1][1-5])|([2][1-3])|([3][1-7])|([4][1-6])|([5][0-4])|([6][1-5])|([7][1])|([8][1-2])))\d{3}))(([1][9]\d{2})|([2]\d{3}))(([0][1-9])|([1][0-2]))(([0][1-9])|([1-2][0-9])|([3][0-1]))\d{3}[0-9xX]$/
// 校验15位身份证号
const format15 = /^\d{15}$/
// 校验外国人永久居留身份证号
const format15Foreign = /^[a-zA-Z]{3}[0-9]{4}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{2}$/
// 校验格式
if (!(format18.test(idCard) || format15.test(idCard) || format15Foreign.test(idCard))) {
return { status: 0, msg: "身份证号码格式不正确" }
}
// 校验出生日期
let year, month, day
if (idCard.length === 18) {
year = idCard.substr(6, 4)
month = idCard.substr(10, 2)
day = idCard.substr(12, 2)
} else if (idCard.length === 15) {
year = "19" + idCard.substr(6, 2)
month = idCard.substr(8, 2)
day = idCard.substr(10, 2)
} else {
return { status: 0, msg: "身份证号码格式不正确" }
}
const date = new Date(year, month - 1, day)
if (date.getFullYear() !== parseInt(year, 10) || date.getMonth() + 1 !== parseInt(month, 10) || date.getDate() !== parseInt(day, 10)) {
return { status: 0, msg: "身份证出生日期不正确" }
}
// 校验18位身份证号的校验码
if (idCard.length === 18) {
const coefficients = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
const checkCodeMap = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"]
let sum = 0
for (let i = 0; i < 17; i++) {
sum += parseInt(idCard.charAt(i), 10) * coefficients[i]
}
const checkCode = checkCodeMap[sum % 11]
if (checkCode.toUpperCase() !== idCard.charAt(17).toUpperCase()) {
return { status: 0, msg: "身份证校验码不正确" }
}
}
return { status: 1, msg: "校验通过" }
},
/**
* 校验银行卡号
* @param bankCardNum
* @returns {{status: number, msg: string}}
*/
validateCard(bankCardNum) {
// 移除所有空格
bankCardNum = bankCardNum.replace(/\s+/g, "")
// 检查格式
const cardRegex = /^\d{13,19}$/
if (!cardRegex.test(bankCardNum)) {
return { status: 0, msg: "卡号格式不正确,请输入13到19位数字。" }
}
// 检查Luhn算法
if (!/^\d+$/.test(bankCardNum)) {
return { status: 0, msg: "无效的卡号,请检查后再试。" }
}
let sum = 0
let shouldDouble = false
for (let i = bankCardNum.length - 1; i >= 0; i--) {
let digit = parseInt(bankCardNum.charAt(i))
if (shouldDouble) {
digit *= 2
if (digit > 9) {
digit -= 9
}
}
sum += digit
shouldDouble = !shouldDouble
}
if ((sum % 10) !== 0) {
return { status: 0, msg: "无效的卡号,请检查后再试。" }
}
return { status: 200, msg: "卡号有效。" }
}
},
async created() {
if (this.bizId) {
this.findOne(this.bizId)
} else {
this.modeChange("1")
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,224 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-sticky>
<van-nav-bar title="帮扶分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
:close-on-click-overlay="false"
>
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.audit = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/difficultHelp/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
<table-column label="填报时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-check"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
new Vue({
el: '#app',
store,
data() {
return {
pageForm: {
pageNo: 1,
pageSize: 10,
searchKeyword: '',
unionId: '',
unitId: '',
approvalText: "0",
audit: false
},
unionList: [],
unitList: [],
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
// 撤回
onRevoke(row) {
debugger
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
this.unitList.unshift({ text: "全部单位", value: null })
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,153 @@
const INFO = {
template: /*language=HTML*/ `
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="填写人姓名">{{viewData.proxyUserName}}</van-cell>
<van-cell title="填写人工号">{{viewData.proxyLoginName}}</van-cell>
<van-cell title="申请模式">{{viewData.mode == 1 ? '本人申请' : '替他人申请'}}</van-cell>
<van-cell title="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</van-cell>
<van-cell title="性别">{{viewData.sex}}</van-cell>
<van-cell title="出生年月">{{viewData.birthday}}</van-cell>
<van-cell title="所属工会">{{viewData.unionName}}</van-cell>
<van-cell title="所属单位">{{viewData.unitName}}</van-cell>
<van-cell title="职务职称">{{viewData.officialCapacity}}</van-cell>
<van-cell title="手机号码">{{viewData.mobile}}</van-cell>
<van-cell title="身份证号">{{viewData.idCard}}</van-cell>
<van-cell title="家庭住址">{{viewData.homeAddress}}</van-cell>
<van-cell title="收款账户">{{viewData.bankCardNum}}</van-cell>
<van-cell title="户名">{{viewData.bankUserName}}</van-cell>
<van-cell title="开户行">{{viewData.bankOfDeposit}}</van-cell>
<van-cell title="困难类型">{{viewData.subsidyStandards}}</van-cell>
<van-cell title="申请原因">{{viewData.reason}}</van-cell>
<van-cell class="direction-column-cell" title="附件">
<file-preview :files="viewData.files" complete_result></file-preview>
</van-cell>
<van-cell title="签字">
<van-image v-if="viewData.sign" :src="viewData.sign"
class="signature-image"></van-image>
<span v-else>暂无</span>
</van-cell>
</van-cell-group>
<!-- <van-cell-group title="家庭成员经济收入" v-if="viewData.familyList && viewData.familyList.length > 0">
<table class="table-class">
<thead>
<tr>
<th>序号</th>
<th>姓名</th>
<th>年龄</th>
<th>关系</th>
<th>月收入(元)</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in viewData.familyList" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.name }}</td>
<td>{{ item.age }}</td>
<td>{{ item.relation }}</td>
<td>{{ item.monthlyIncome }}</td>
</tr>
</tbody>
</table>
</van-cell-group>-->
<template v-for="task in doneTasks">
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
</van-cell>
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
</van-cell-group>
<van-cell-group :title="task.displayName" v-else>
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
</van-cell>
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="task.ext.caseFilingResult"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
<div v-html="task.taskFormData.tf_opinion"></div>
</van-cell>
</van-cell-group>
</template>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible: false,
row: {},
viewData: {},
doneTasks: [],
}
},
methods: {
// 打开
onOpen(row) {
this.row = row
this.visible = true
this.info()
this.getDoneTasks()
},
// 关闭
onClose(){
this.visible = false
},
// 获取申请信息
info() {
this.$axios.post("/platform/difficultHelp/mine/findOne", { 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
}
})
},
},
style: /*language=CSS*/ `
/deep/ .table-class{
width: 100%;
border-radius: 5px;
overflow: hidden;
line-height: 1.5rem;
font-size: 13px;
table-layout: fixed;
border-collapse: collapse;
}
/deep/ .table-class th {
background-color: #f2f2f2;
border: 1px solid #dddddd;
}
/deep/ .table-class tr {
text-align: center;
border-bottom: 1px solid #dddddd;
}
/deep/ .table-class td {
border: 1px solid #dddddd;
}
`
}
@@ -0,0 +1,175 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-sticky>
<van-nav-bar title="帮扶申请记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
:close-on-click-overlay="false"
>
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/difficultHelp/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
<table-column label="填报时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onDelete(row.id)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<info ref="infoRef"></info>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
new Vue({
el: '#app',
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
unionId: "",
unitId: ""
},
unionList: [],
unitList: [],
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onView(row) {
this.$refs.infoRef.onOpen(row)
},
onEdit(row) {
this.$pjaxReplace('/platform/difficultHelp/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤销吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
})
},
onDelete(id) {
this.$dialog.confirm({
title: "提示",
message: "您确定要删除吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/platform/difficultHelp/mine/onDelete", { id }).then((res) => {
if (res.code === 0) {
this.doSearch()
this.$toast.success(res.msg)
} else {
this.$toast.fail(res.msg)
}
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,225 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-sticky>
<van-nav-bar title="帮扶校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
:close-on-click-overlay="false"
>
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.audit = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/difficultHelp/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
<table-column label="填报时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-check"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
new Vue({
el: '#app',
store,
data() {
return {
pageForm: {
pageNo: 1,
pageSize: 10,
searchKeyword: '',
unionId: '',
unitId: '',
approvalText: "0",
audit: false
},
unionList: [],
unitList: [],
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->