first commit

This commit is contained in:
2026-08-26 14:25:17 +08:00
commit 06debfd1fc
10595 changed files with 1836924 additions and 0 deletions
@@ -0,0 +1,783 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<div v-if="!isShow">
<van-empty image="error" :description="'抱歉,当前时间不能申请,可申请时间为' + time + '。'"></van-empty>
</div>
<div v-else>
<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="申请次数" v-model="formData.applyCount" readonly
required name="applyCount"></van-field>
<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.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.position"
label="职务"
placeholder="请填写职务"
maxlength="20"
clearable
required
name="position"
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.officialCapacity"
label="职称"
placeholder="请填写职称"
maxlength="20"
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-field
v-model="formData.homeIncome"
label="家庭年总收入(万元)"
type="number"
placeholder="请填写家庭年总收入"
clearable
required
name="homeIncome"
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.homeNumber"
label="家庭人数"
type="number"
placeholder="请填写家庭人数"
clearable
required
name="homeNumber"
:rules="[{ required: true }]"
></van-field>
</van-cell-group>
<van-cell-group title="困难类型及材料" class="form-section">
<van-field
v-model="formData.subsidyName"
label="补助类型"
placeholder="请选择补助类型"
is-link
@click="showSubsidyPicker = true"
required
name="subsidyName"
:rules="[{ required: true, message: '请选择补助类型' }]"
></van-field>
<van-popup v-model="showSubsidyPicker" position="bottom">
<van-picker
show-toolbar
:columns="subsidyTypeColumns"
@confirm="onSubsidyTypeConfirm"
@cancel="showSubsidyPicker=false">
</van-picker>
</van-popup>
<van-field
v-model="formData.subsidyStandardsName"
label="困难类型"
placeholder="请选择困难类型"
is-link
@click="showSubsidyStandardPicker = true"
required
name="subsidyStandardsName"
:rules="[{ required: true, message: '请选择困难类型' }]"
></van-field>
<van-popup v-model="showSubsidyStandardPicker" position="bottom">
<van-picker
show-toolbar
:columns="subsidyStandardColumns"
@confirm="onSubsidyStandardConfirm"
@cancel="showSubsidyStandardPicker=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.bankOfDeposit"
label="开户行"
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 up_down">
<div class="van-cell">
<div style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div style="width: 100%">
<span>家庭主要成员及联系方式</span>
</div>
</div>
<van-button v-if="formData.familyList && formData.familyList.length>0 && formData.familyList.length<5"
style="width: 40px"
icon="plus" type="primary" round size="mini"
@click="formData.familyList.push({})"
native-type="button"></van-button>
</div>
<template v-if="formData.familyList && formData.familyList.length>0">
<div v-for="member,index in formData.familyList" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{toChinesNum(index+1)}}</span>
<van-button style="width: 40px"
icon="cross" type="danger" round size="mini"
@click="formData.familyList.splice(index,1)"
native-type="button"></van-button>
</div>
<van-field label="关系" v-model="member.relation" placeholder="请填写与本人关系"
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
<van-field label="姓名" v-model="member.name" placeholder="请填写姓名"
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field label="年龄" v-model="member.age" placeholder="请填写年龄"
:rules="[{ required:true, message: '请填写年龄' }]" type="number"></van-field>
<van-field label="工作单位" v-model="member.homeUnit" placeholder="请填写工作单位"
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
<van-field label="年收入(元)" v-model="member.yearIncome" placeholder="请填写年收入"
:rules="[{ required:true, message: '请填写年收入' }]" type="number"></van-field>
<van-field label="备注" v-model="member.remarks" placeholder="请填写备注"
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
</div>
</template>
<template v-else>
<div style="padding: 50px;text-align: center">
<van-button style="width: 50px"
icon="plus" type="primary" round size="mini"
@click="formData.familyList.push({})"
native-type="button"></van-button>
</div>
</template>
</div>
</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>
<div style="color: red; padding: 10px;">
本人承诺:本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!
</div>
</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>
</div>
</div>
<style>
.mt5 {
margin-top: 5px;
}
.up_down > .van-cell {
flex-flow: column;
}
.up_down > .van-cell > .van-field__label {
width: 100%;
}
</style>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
store,
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
showSexPicker: false,
showDatePicker: false,
showSubsidyPicker: false,
showSubsidyStandardPicker: false,
formData: {
id: GetQueryString("bizId"),
mode: "1",
familyList: [],
applyCount:'1'
},
subsidyTypeColumns: [],
subsidyStandardColumns: [],
subsidyValue: "",
subsidyStandardsValue: "",
userSheetShow: false,
subsidizedList: [],
maxDate: new Date(),
isShow: true,
time: ''
}
},
computed: {
canImportFamilyInfo() {
return false;
}
},
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 = []
},
async initDictOptions() {
const subsidyTypeData = await this.$businessTool.getDictOptions("DIFFICULT_SUBSIDY_TYPE");
this.subsidyTypeColumns = subsidyTypeData.map(item => {
return { value: item.code, text: item.name };
});
const subsidyStandardData = await this.$businessTool.getDictOptions("DIFFICULT_TYPE");
this.subsidyStandardColumns = subsidyStandardData.map(item => {
return { value: item.code, text: item.name };
});
},
prepareSubmitData() {
const submitData = JSON.parse(JSON.stringify(this.formData));
if (this.formData.subsidyName) {
const matchedSubsidy = this.subsidyTypeColumns.find(item => item.text === this.formData.subsidyName);
submitData.subsidy = matchedSubsidy ? matchedSubsidy.value : this.subsidyValue;
} else {
submitData.subsidy = this.subsidyValue;
}
if (this.formData.subsidyStandardsName) {
const matchedStandard = this.subsidyStandardColumns.find(item => item.text === this.formData.subsidyStandardsName);
submitData.subsidyStandards = matchedStandard ? matchedStandard.value : this.subsidyStandardsValue;
} else {
submitData.subsidyStandards = this.subsidyStandardsValue;
}
return submitData;
},
onSave() {
this.$dialog.confirm({
title: "提示",
message: "您确定要保存吗?"
}).then(() => {
const submitData = this.prepareSubmitData();
this.$axios.post("/platform/difficultHelp/apply/save", { data: JSON.stringify(submitData) }).then(res => {
if (res.code === 0) {
this.$toast("保存成功")
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
}
})
})
},
onSubmit() {
this.$refs.formRef.validate().then(() => {
if (!this.formData.sign){
this.$toast.fail("请填写签字")
return
}
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
}
const submitData = this.prepareSubmitData();
this.$axios.post("/platform/difficultHelp/apply/submit", {
data: JSON.stringify(submitData)
}).then(res => {
if (res.code === 0) {
this.$toast("提交成功")
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
}
})
})
})
},
onFinishTask() {
this.$refs.formRef.validate().then(() => {
if (!this.formData.sign){
this.$toast.fail("请填写签字")
return
}
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
}
const submitData = this.prepareSubmitData();
this.$axios.post("/platform/difficultHelp/apply/submitAgain", {
data: JSON.stringify(submitData),
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, "position", user.position || "")
this.$set(this.formData, "officialCapacity", user.officialCapacity || "")
this.$set(this.formData, "mobile", user.mobile)
this.$set(this.formData, "idCard", user.idCard)
this.$set(this.formData, "homeAddress", user.homeAddress)
} 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, "position", "")
this.$set(this.formData, "officialCapacity", "")
this.$set(this.formData, "mobile", null)
this.$set(this.formData, "idCard", null)
this.$set(this.formData, "homeAddress", 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
},
onSubsidyTypeConfirm(option) {
this.$set(this.formData, "subsidyName", option.text);
this.subsidyValue = option.value;
this.showSubsidyPicker = false;
},
onSubsidyStandardConfirm(option) {
this.$set(this.formData, "subsidyStandardsName", option.text);
this.subsidyStandardsValue = option.value;
this.showSubsidyStandardPicker = false;
},
findOne(id) {
this.$axios.post("/platform/difficultHelp/mine/findOne", { id }).then(res => {
if (res.code === 0) {
this.formData = res.data
if (!this.formData.familyList) {
this.formData.familyList = []
}
if (this.formData.subsidy) {
const matchedSubsidy = this.subsidyTypeColumns.find(item => item.value === this.formData.subsidy);
if (matchedSubsidy) {
this.$set(this.formData, "subsidyName", matchedSubsidy.text);
this.subsidyValue = this.formData.subsidy;
}
}
if (this.formData.subsidyStandards) {
const matchedStandard = this.subsidyStandardColumns.find(item => item.value === this.formData.subsidyStandards);
if (matchedStandard) {
this.$set(this.formData, "subsidyStandardsName", matchedStandard.text);
this.subsidyStandardsValue = this.formData.subsidyStandards;
}
}
this.queryRecipients(res.data.loginName)
}
})
},
// 申请模式
modeChange(val) {
const savedApplyCount = this.formData.applyCount;
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, 'yearIncome', null)
this.$set(this.formData, 'birthday', user.birthday)
this.$set(this.formData, 'idCard', user.idCard)
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.$set(this.formData, 'applyCount', savedApplyCount )
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', [])
this.$set(this.formData, 'applyCount',savedApplyCount )
}
},
/**
* 检验身份证号
* @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: "卡号有效。" }
},
toChinesNum(num) {
let changeNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"]
let unit = ["", "十", "百", "千", "万"]
num = parseInt(num)
let getWan = (temp) => {
let strArr = temp.toString().split("").reverse()
let newNum = ""
for (let i = 0; i < strArr.length; i++) {
newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum
}
return newNum
}
let overWan = Math.floor(num / 10000)
let noWan = num % 10000
if (noWan.toString().length < 4) {
noWan = "0" + noWan
}
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num)
},
async getIsCanPlay() {
const res = await this.$axios.post("/platform/difficultHelp/apply/getIsCanPlay");
if (res.code === 0) {
this.isShow = res.data.result;
this.time = res.data.time;
if (res.data.applyCount !== null && res.data.applyCount !== undefined && res.data.applyCount !== 0) {
this.$set(this.formData, 'applyCount', res.data.applyCount)
}
}
}
},
async created() {
await this.getIsCanPlay();
if (this.isShow) {
await this.initDictOptions();
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="primary" block @click="handleTaskAction(1)">同意</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="danger" block @click="handleTaskAction(6)">退回</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,201 @@
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.sex }}</van-cell>
<van-cell title="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</van-cell>
<van-cell title="所在单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所在工会">{{ viewData.unionName }}</van-cell>
<van-cell title="职务">{{ viewData.position }}</van-cell>
<van-cell title="职称">{{ viewData.officialCapacity }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="家庭年总收入(万元)">{{ viewData.homeIncome }}</van-cell>
<van-cell title="家庭人数">{{ viewData.homeNumber }}</van-cell>
<van-cell title="家庭住址">{{ viewData.homeAddress }}</van-cell>
<van-cell title="补助类型">
<dict-tag :options="dict.type.DIFFICULT_SUBSIDY_TYPE" :value="viewData.subsidy"></dict-tag>
</van-cell>
<van-cell title="困难类型">
<dict-tag :options="dict.type.DIFFICULT_TYPE" :value="viewData.subsidyStandards"></dict-tag>
</van-cell>
<van-cell title="申请次数">{{ viewData.applyCount || 1 }}</van-cell>
<van-cell title="开户行">{{ viewData.bankOfDeposit }}</van-cell>
<van-cell title="银行卡号">{{ viewData.bankCardNum }}</van-cell>
<van-cell title="生活致困原因" class="text-cell">
<template #label>
<div style="word-wrap: break-word; white-space: pre-line;">
{{viewData.reason}}
</div>
</template>
</van-cell>
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">年龄</th>
<th class="table-header">工作单位</th>
<th class="table-header">年收入(元)</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.familyList" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.age }}</td>
<td class="table-cell">{{ item.homeUnit }}</td>
<td class="table-cell">{{ item.yearIncome }}</td>
<td class="table-cell">{{ item.remarks }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="本人承诺">
<div style="text-align: left; padding: 5px 0; font-size: 14px;">
本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!
</div>
<div style="text-align: right; font-size: 12px; color: #999; margin-top: 5px;">
<span>承诺人:{{ viewData.userName }}</span>
<br/>
<span>{{ $moment(viewData.applyTime).format("YYYY-MM-DD") }}</span>
</div>
</van-cell>
<van-cell title="签字" v-if="viewData.sign">
<img :src="viewData.sign" style="max-width: 100px; max-height: 50px;" />
</van-cell>
<van-cell title="附件" v-if="viewData.files && viewData.files.length > 0">
<div v-for="(file, index) in viewData.files" :key="index" style="margin-bottom: 5px;">
<a :href="file.url" target="_blank">{{ file.name }}</a>
</div>
</van-cell>
<van-cell title="附件" v-else>
<span>暂无</span>
</van-cell>
</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="审批级别" v-if="task.displayName == '校工会审核'">
{{ viewData.level }}
</van-cell>
<van-cell title="审批金额" v-if="task.displayName == '校工会审核'">
{{ '¥' + viewData.money }}
</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode && task.taskFormData.opinion" class="direction-column-cell">
<div style="white-space: pre-line;">{{ task.taskFormData.opinion }}</div>
</van-cell>
</van-cell-group>
</template>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE", "DIFFICULT_SUBSIDY_TYPE", "DIFFICULT_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*/ `
.column-cell {
flex-direction: column;
}
.family-table {
width: 100%;
max-width: 100%;
border-collapse: collapse;
table-layout: auto;
text-align: center;
font-family: 'Arial', sans-serif;
margin: 20px 0;
}
.table-header {
background-color: gray;
color: white;
font-weight: bold;
text-transform: uppercase;
}
.table-row {
background-color: #f9f9f9;
transition: background-color 0.3s;
}
.table-row:hover {
background-color: #f1f1f1;
}
.table-cell {
padding: 10px 5px;
border: 1px solid #ddd;
text-align: center;
font-size: 12px;
}
.text-cell {
word-break: break-all;
}
`
}
@@ -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,279 @@
<!--#
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.level"
name="level"
label="级别"
placeholder="请选择级别"
is-link
@click="showLevelPicker = true"
:rules="[{ required: true, message: '请选择级别' }]"
required
></van-field>
<van-popup v-model="showLevelPicker" position="bottom">
<van-picker
show-toolbar
:columns="levelColumns"
@confirm="onLevelConfirm"
@cancel="showLevelPicker=false">
</van-picker>
</van-popup>
<van-field
v-model="formData.money"
name="money"
label="审核金额"
placeholder="请输入审核金额"
type="number"
:rules="[{ required: true, message: '请输入审核金额' }]"
required
></van-field>
<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="primary" block @click="handleTaskAction(1)">同意</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="danger" block @click="handleTaskAction(6)">退回</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,
showLevelPicker: false,
levelColumns: []
}
},
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,
money: 0,
id: row.id,
tf_opinion: ""
}
},
async initLevelDict() {
const levelData = await this.$businessTool.getDictOptions("DIFFICULT_LEVEL");
this.levelColumns = levelData.map(item => {
return { text: item.name, value: item.code };
});
},
onLevelConfirm(option) {
this.formData.level = option.value;
this.showLevelPicker = false;
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).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((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()
await this.initLevelDict()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,235 @@
<!--#
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/unionLeaderApproval/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">
<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-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>
<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="primary" block @click="handleTaskAction(1)">同意</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="danger" block @click="handleTaskAction(6)">退回</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>
<!--#
}
#-->