first commit
This commit is contained in:
@@ -0,0 +1,541 @@
|
||||
<div id="difficult_help_apply">
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="填写人姓名">
|
||||
<el-form-item prop="proxyUserName">
|
||||
<el-input readonly v-model="formData.proxyUserName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">
|
||||
<el-form-item prop="proxyLoginName">
|
||||
<el-input readonly v-model="formData.proxyLoginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请模式">
|
||||
<el-form-item prop="mode">
|
||||
<el-select v-model="formData.mode" placeholder="申请模式"
|
||||
@change="modeChange"
|
||||
:disabled="formData.id" style="width: 100%">
|
||||
<el-option label="本人申请" value="1"></el-option>
|
||||
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
label="替他人申请" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="受补助人">
|
||||
<template v-if="formData.mode == 2">
|
||||
<el-select :remote-method="queryRecipients"
|
||||
@change="userChange" clearable filterable
|
||||
placeholder="输入工号或者姓名查找" remote
|
||||
style="width: 100%" v-model="formData.userId">
|
||||
<el-option :key="o.id"
|
||||
:label="o.username+'('+o.loginname+')'"
|
||||
:value="o.id"
|
||||
v-for="o in subsidizedList"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input readonly maxlength="100" type="text"
|
||||
v-model="formData.userName"></el-input>
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="sex">
|
||||
<el-select v-model="formData.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option v-for="item in ['男','女']" :key="item" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">
|
||||
<el-form-item prop="birthday">
|
||||
<el-date-picker
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="formData.birthday"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择出生年月">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="所属单位">
|
||||
<el-form-item prop="unitName">
|
||||
<el-input maxlength="50" clearable placeholder="所在单位"
|
||||
readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">
|
||||
<el-form-item prop="unionName">
|
||||
<el-input maxlength="50" clearable placeholder="所属工会"
|
||||
readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="职务职称">
|
||||
<el-form-item prop="officialCapacity">
|
||||
<el-input maxlength="20" clearable placeholder="请填写职务职称"
|
||||
v-model="formData.officialCapacity"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="手机号码">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input maxlength="11" clearable placeholder="请填写手机号码"
|
||||
v-model="formData.mobile" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号" :span="2">
|
||||
<el-form-item prop="idCard">
|
||||
<el-input maxlength="20" clearable placeholder="请填写身份证号"
|
||||
v-model="formData.idCard" maxlength="18"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="本人月收入">
|
||||
<el-form-item prop="monthlyIncome">
|
||||
<el-input-number clearable
|
||||
style="width: 100%"
|
||||
v-model="formData.monthlyIncome"
|
||||
:min="0"
|
||||
:max="9999999"
|
||||
placeholder="请填写本人月收入">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="收款账户" :span="2">
|
||||
<el-form-item prop="bankCardNum">
|
||||
<el-input maxlength="20" clearable placeholder="请填写华夏银行工资卡号"
|
||||
v-model="formData.bankCardNum"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="困难类型" :span="3">
|
||||
<el-form-item prop="subsidyStandards">
|
||||
<el-select v-model="formData.subsidyStandards" style="width: 100%">
|
||||
<el-option v-for="(item,index) in subsidyStandards" :key="index" :label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="申请原因" :span="3">
|
||||
<el-form-item prop="reason">
|
||||
<el-input maxlength="500" :autosize="{ minRows: 5, maxRows: 10}"
|
||||
placeholder="请简述申请原因"
|
||||
clearable
|
||||
show-word-limit
|
||||
v-model="formData.reason"
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="家庭成员经济收入" :span="3">
|
||||
<el-form-item prop="familyList">
|
||||
<el-table :data="formData.familyList" border max-height="500" size="mini" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="name" label="姓名">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" placeholder="请输入姓名" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="relation" label="年龄(岁)">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.age'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.age" placeholder="请输入年龄" :min="1"
|
||||
:max="100" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="relation" label="关系">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.relation'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.relation" placeholder="请输入关系" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="monthlyIncome" label="月收入(元)">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.monthlyIncome'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.monthlyIncome" placeholder="请输入月收入"
|
||||
:min="1" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button @click="formData.familyList.push({})" icon="el-icon-plus" type="primary"
|
||||
size="mini">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.familyList.length==1"
|
||||
@click="formData.familyList.splice(scope.$index,1)"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<el-form-item prop="files">
|
||||
<file-upload :value.sync="formData.files"
|
||||
upload_mode="drag"
|
||||
:upload_number="10" upload_result_category="array"
|
||||
complete_result></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: '#difficult_help_apply',
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
instanceId: GetQueryString("instanceId"),
|
||||
formData: {
|
||||
id: GetQueryString("businessId"),
|
||||
mode: '1'
|
||||
},
|
||||
subsidyStandards: [
|
||||
'患重大疾病(癌症)',
|
||||
'本人家庭(仅指代本人及其配偶、子女共同组成的家庭)人均月收入低于1300元或本人配偶、子女患有重大疾病且自付医疗费用超过家庭年收入的80%',
|
||||
'患精神类疾病',
|
||||
'长期病休',
|
||||
'其他特殊情况'
|
||||
],
|
||||
formRules: {
|
||||
proxyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
proxyLoginName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sex: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
unitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
unionName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
monthlyIncome: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
idCard: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
bankCardNum: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
officialCapacity: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
subsidyStandards: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
reason: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}]
|
||||
},
|
||||
|
||||
// 替他人申请相关
|
||||
subsidizedList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询受助人
|
||||
queryRecipients(key) {
|
||||
this.$axios.get("/platform/difficultHelp/apply/queryRecipients", {
|
||||
key
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.subsidizedList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
const result = this.isValidIdCard(this.formData.idCard)
|
||||
if (result.status === 0) {
|
||||
this.$message.warning(result.msg)
|
||||
return
|
||||
}
|
||||
const bankRes = this.validateCard(this.formData.bankCardNum)
|
||||
if (bankRes.status === 0) {
|
||||
this.$message.warning(bankRes.msg)
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.instanceId) {
|
||||
this.handleApply(val)
|
||||
} else {
|
||||
this.handleReApply(val)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 提交申请
|
||||
handleApply(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", { type: "warning" })
|
||||
.then(() => {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post("/flow/common/startInstanceAndExecute", {
|
||||
...val,
|
||||
bizData: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 重新提交申请
|
||||
handleReApply(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", { type: "warning" })
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: val.taskId,
|
||||
processInstanceId: val.instanceId,
|
||||
submitType: val.submitType,
|
||||
f_data: JSON.stringify(this.formData)
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete"
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 保存
|
||||
handleSaveDraft(val) {
|
||||
this.$confirm("您确定要保存吗?", "提示", { type: "warning" })
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.post("/flow/common/startInstance", {
|
||||
...val,
|
||||
bizData: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "task-complete"
|
||||
},
|
||||
"*"
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消
|
||||
handleCancel() {
|
||||
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post('/platform/difficultHelp/mine/findOne', { id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
async userChange() {
|
||||
const user = this.subsidizedList.find(item => item.id === this.formData.userId)
|
||||
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', user.birthday)
|
||||
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)
|
||||
}
|
||||
},
|
||||
// 申请模式
|
||||
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', user.birthday)
|
||||
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.businessId) {
|
||||
this.findOne(this.businessId)
|
||||
} else {
|
||||
this.modeChange("1")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,635 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<el-card shadow="never" v-if="isShow">
|
||||
<snaker-start slot="header" label="困难帮扶申请" define_key="KNBF"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="填写人姓名">
|
||||
<el-form-item prop="proxyUserName">
|
||||
<el-input readonly v-model="formData.proxyUserName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请模式">
|
||||
<el-form-item prop="mode">
|
||||
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
|
||||
<el-option label="本人申请" value="1"></el-option>
|
||||
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
label="替他人申请" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">
|
||||
<el-form-item prop="proxyLoginName">
|
||||
<el-input readonly v-model="formData.proxyLoginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="受补助人">
|
||||
<el-form-item prop="userName">
|
||||
<template v-if="formData.mode == 2">
|
||||
<el-select :remote-method="queryRecipients"
|
||||
@change="userChange" clearable filterable
|
||||
placeholder="输入工号或者姓名查找" remote
|
||||
style="width: 100%" v-model="formData.userId">
|
||||
<el-option :key="o.id"
|
||||
:label="o.username+'('+o.loginname+')'"
|
||||
:value="o.id"
|
||||
v-for="o in subsidizedList"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input readonly maxlength="100" type="text"
|
||||
v-model="formData.userName"></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="受补助人工号">
|
||||
<el-form-item prop="loginName">
|
||||
<el-input readonly v-model="formData.loginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号" :span="2">
|
||||
<el-form-item prop="idCard">
|
||||
<el-input maxlength="20" clearable placeholder="请填写身份证号"
|
||||
v-model="formData.idCard" maxlength="18"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="sex">
|
||||
<el-select v-model="formData.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option v-for="item in ['男','女']" :key="item" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="职务">
|
||||
<el-form-item prop="position">
|
||||
<el-input maxlength="20" clearable placeholder="请填写职务"
|
||||
v-model="formData.position"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="职称">
|
||||
<el-form-item prop="officialCapacity">
|
||||
<el-input maxlength="20" clearable placeholder="请填写职称"
|
||||
v-model="formData.officialCapacity"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单位">
|
||||
<el-form-item prop="unitName">
|
||||
<el-input maxlength="50" clearable placeholder="请填写所在单位"
|
||||
readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号码">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input maxlength="11" clearable placeholder="请填写手机号码"
|
||||
v-model="formData.mobile" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭年总收入(万元)">
|
||||
<el-form-item prop="homeIncome">
|
||||
<el-input-number
|
||||
v-model="formData.homeIncome"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
placeholder="请填写总收入(万元)">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭人数">
|
||||
<el-form-item prop="homeNumber">
|
||||
<el-input-number
|
||||
v-model="formData.homeNumber"
|
||||
:min="1"
|
||||
:step="1"
|
||||
style="width: 100%"
|
||||
placeholder="请填写家庭人数">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" >
|
||||
<el-form-item prop="homeAddress">
|
||||
<el-input clearable
|
||||
style="width: 100%"
|
||||
v-model="formData.homeAddress"
|
||||
placeholder="请填写家庭住址">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开户行" >
|
||||
<el-form-item prop="bankOfDeposit">
|
||||
<el-input maxlength="30" clearable placeholder="请填写开户行"
|
||||
v-model="formData.bankOfDeposit"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="申请次数" >-->
|
||||
<!-- <el-form-item prop="applyCount">-->
|
||||
<!-- <el-input maxlength="20" clearable placeholder="请填写"-->
|
||||
<!-- v-model="formData.applyCount"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="银行卡号" >
|
||||
<el-form-item prop="bankCardNum">
|
||||
<el-input maxlength="20" clearable placeholder="请填写银行卡号"
|
||||
v-model="formData.bankCardNum"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="补助类型" >
|
||||
<el-form-item prop="subsidy">
|
||||
<search-item>
|
||||
<dict-select v-model="formData.subsidy" code="DIFFICULT_SUBSIDY_TYPE" style="width: 100%" placeholder="请选择补助类型"></dict-select>
|
||||
</search-item>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="困难类型" >
|
||||
<el-form-item prop="subsidyStandards">
|
||||
<search-item>
|
||||
<dict-select v-model="formData.subsidyStandards" code="DIFFICULT_TYPE" style="width: 100%" placeholder="请选择困难类型"></dict-select>
|
||||
</search-item>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="生活致困原因" :span="3">
|
||||
<el-form-item prop="reason">
|
||||
<el-input maxlength="500" :autosize="{ minRows: 5, maxRows: 10}"
|
||||
placeholder="请简述生活致困原因"
|
||||
clearable
|
||||
show-word-limit
|
||||
v-model="formData.reason"
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="户名" >-->
|
||||
<!-- <el-form-item prop="bankUserName">-->
|
||||
<!-- <el-input maxlength="20" clearable placeholder="请填写户名"-->
|
||||
<!-- v-model="formData.bankUserName"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="出生年月">-->
|
||||
<!-- <el-form-item prop="birthday">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- v-model="formData.birthday"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- placeholder="选择出生年月">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="所属工会">-->
|
||||
<!-- <el-form-item prop="unionName">-->
|
||||
<!-- <el-input maxlength="50" clearable placeholder="所属工会"-->
|
||||
<!-- readonly v-model="formData.unionName"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="家庭主要成员(在一起生活的直系亲属)经济收入情况" :span="3">
|
||||
<el-form-item prop="familyList">
|
||||
<el-table :data="formData.familyList" border max-height="500" size="mini" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="relation" label="与本人关系">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.relation'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.relation" placeholder="请填写与本人关系" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" placeholder="请填写姓名" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="age" label="年龄(岁)">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.age'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.age" placeholder="年龄" :min="1"
|
||||
:max="100" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="homeUnit" label="工作单位">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.homeUnit'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.homeUnit" placeholder="请填写工作单位" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="yearIncome" label="年收入(元)">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.yearIncome'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.yearIncome" placeholder="年收入"
|
||||
:min="0" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" label="备注">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.remarks'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.remarks" placeholder="请填写备注" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button @click="formData.familyList.push({})" icon="el-icon-plus" type="primary"
|
||||
size="mini">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="formData.familyList.splice(scope.$index,1)"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<el-form-item prop="files">
|
||||
<file-upload :value.sync="formData.files"
|
||||
upload_mode="drag"
|
||||
:upload_number="10" upload_result_category="array"
|
||||
complete_result></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
<el-form-item class="mt10">
|
||||
<div style="color: red;">
|
||||
{{ '本人承诺:本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div v-else>
|
||||
<el-card class="box-card" style="height: 92vh" shadow="never">
|
||||
<el-result icon="warning" title="温馨提醒" subTitle="">
|
||||
<template slot="extra">
|
||||
<span v-if="blockMessage">{{blockMessage}}</span>
|
||||
<span v-else>抱歉,当前时间不能申请,可申请时间为{{time}}。</span>
|
||||
</template>
|
||||
</el-result>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
isShow: false,
|
||||
time: '',
|
||||
blockMessage: '',
|
||||
formData: {
|
||||
id: GetQueryString("bizId"),
|
||||
mode: '1',
|
||||
applyCount: '1',
|
||||
},
|
||||
formRules: {
|
||||
proxyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
proxyLoginName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sex: [{required: true, message: '请填写性别', trigger: ['blur', 'change']}],
|
||||
userName: [{required: true, message: '请填写受补助人', trigger: ['blur', 'change']}],
|
||||
unitName: [{required: true, message: '请填写所属单位', trigger: ['blur', 'change']}],
|
||||
unionName: [{required: true, message: '请填写所属工会', trigger: ['blur', 'change']}],
|
||||
homeAddress: [{required: true, message: '请填写家庭住址', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '请填写手机号码', trigger: ['blur', 'change']}],
|
||||
idCard: [{required: true, message: '请填写身份证号', trigger: ['blur', 'change']}],
|
||||
bankCardNum: [{required: true, message: '请填写收款账户卡号', trigger: ['blur', 'change']}],
|
||||
bankUserName: [{required: true, message: '请填写户名', trigger: ['blur', 'change']}],
|
||||
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ['blur', 'change']}],
|
||||
position: [{required: true, message: '请填写职务', trigger: ['blur', 'change']}],
|
||||
officialCapacity: [{required: true, message: '请填写职称', trigger: ['blur', 'change']}],
|
||||
subsidyStandards: [{required: true, message: '请选择困难类型', trigger: ['blur', 'change']}],
|
||||
reason: [{required: true, message: '请填写申请原因', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '请签字', trigger: ['blur', 'change']}]
|
||||
},
|
||||
|
||||
// 替他人申请相关
|
||||
subsidizedList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/difficultHelp/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
commonUtil.pjaxPush('/platform/difficultHelp/mine')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
this.$refs.formRef.validate().then((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const result = this.isValidIdCard(this.formData.idCard)
|
||||
if (result.status === 0) {
|
||||
this.$message.warning(result.msg)
|
||||
return
|
||||
}
|
||||
const bankRes = this.validateCard(this.formData.bankCardNum)
|
||||
if (bankRes.status === 0) {
|
||||
this.$message.warning(bankRes.msg)
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/difficultHelp/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/difficultHelp/mine')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async onFinishTask() {
|
||||
this.$refs.formRef.validate().then((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
|
||||
const result = this.isValidIdCard(this.formData.idCard)
|
||||
if (result.status === 0) {
|
||||
this.$message.warning(result.msg)
|
||||
return
|
||||
}
|
||||
const bankRes = this.validateCard(this.formData.bankCardNum)
|
||||
if (bankRes.status === 0) {
|
||||
this.$message.warning(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.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/difficultHelp/mine')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询受助人
|
||||
queryRecipients(key) {
|
||||
this.$axios.post("/platform/difficultHelp/apply/queryRecipients", {
|
||||
key
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.subsidizedList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post('/platform/difficultHelp/mine/findOne', { id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.queryRecipients(res.data.loginName)
|
||||
}
|
||||
})
|
||||
},
|
||||
async userChange() {
|
||||
const user = this.subsidizedList.find(item => item.id === this.formData.userId)
|
||||
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', user.birthday)
|
||||
this.$set(this.formData, 'mobile', user.mobile)
|
||||
this.$set(this.formData, 'idCard', user.idCard)
|
||||
|
||||
} 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)
|
||||
}
|
||||
},
|
||||
// 申请模式
|
||||
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: "卡号有效。" };
|
||||
},
|
||||
async getIsCanPlay() {
|
||||
this.$axios.post('/platform/difficultHelp/apply/getIsCanPlay').then(res => {
|
||||
if (res.code === 0) {
|
||||
// 新增申请进入页面时,优先校验当前登录人本年度是否已经申请过,已申请则直接拦截新增。
|
||||
if (!this.bizId && res.data.hasCurrentYearApply) {
|
||||
this.isShow = false
|
||||
this.$set(this, 'blockMessage', '抱歉,您本年度已申请困难帮扶,不能重复申请。')
|
||||
} else {
|
||||
this.isShow = res.data.result
|
||||
this.$set(this, 'blockMessage', '')
|
||||
}
|
||||
this.$set(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.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
this.modeChange("1")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<div id="difficult_help_branch_union_approval_form">
|
||||
<el-form :model="formData" ref="formRef" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#difficult_help_branch_union_approval_form",
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...val,
|
||||
...this.formData
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete",
|
||||
payload: val
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(val) {
|
||||
console.log(val)
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
+312
@@ -0,0 +1,312 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="受助人">
|
||||
<el-input placeholder="请输入受助人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select clearable filterable placeholder="请选择所属单位"
|
||||
style="width: 100%;" v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审批列表">
|
||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
@selection-change="handleSelectionChange"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column type="selection" width="45"></el-table-column>
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
audit: "false"
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
selectData: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
},
|
||||
computed: {
|
||||
hasUnapprovedItems() {
|
||||
return this.tableData.some(item => item.taskState === 10);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
allAudit() {
|
||||
if (this.pageForm.audit !== "false" || !this.tableData || this.tableData.length === 0) {
|
||||
this.$message.warning('没有待审核的数据!');
|
||||
return;
|
||||
}
|
||||
if (this.selectData.length === 0) {
|
||||
this.$message.warning('请勾选待审核数据!');
|
||||
return;
|
||||
}
|
||||
|
||||
const message = '确定要一键审核这 ' + this.selectData.length + ' 条记录吗?';
|
||||
this.$confirm(message, '批量审核确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.batchApprove(this.selectData);
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
async batchApprove(items) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在批量审核...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
try {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
try {
|
||||
await this.approveSingleItem(item);
|
||||
successCount++;
|
||||
} catch (error) {
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
loading.close();
|
||||
if (failCount > 0) {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
|
||||
this.doSearch();
|
||||
} catch (error) {
|
||||
loading.close();
|
||||
this.$message.error('批量审核过程中发生错误');
|
||||
}
|
||||
},
|
||||
|
||||
approveSingleItem(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: item.taskId,
|
||||
tf_opinion: '审核通过',
|
||||
submitType: 1
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
resolve(res);
|
||||
} else {
|
||||
reject(res);
|
||||
}
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
handleSelectionChange: function (val) {
|
||||
this.selectData = val
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,145 @@
|
||||
const INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
||||
<!--\t\t<el-descriptions-item label="申请模式">{{ viewData.mode == 1 ? '本人申请' : '替他人申请' }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="所属单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭年总收入(万元)">{{ viewData.homeIncome }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭人数">{{ viewData.homeNumber }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="职务">{{ viewData.position }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职称">{{ viewData.officialCapacity }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="受补助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开户行">{{ viewData.bankOfDeposit }}</el-descriptions-item>
|
||||
<el-descriptions-item label="银行卡号">{{ viewData.bankCardNum }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请次数" >{{ 1 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" :span="2">{{ viewData.homeAddress }}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="家庭主要成员(在一起生活的直系亲属)经济收入情况" :span="3">
|
||||
<el-table :data="viewData.familyList" border style="width: 92%">
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column prop="relation" label="关系"></el-table-column>
|
||||
<el-table-column label="姓名" prop="name"></el-table-column>
|
||||
<el-table-column prop="age" label="年龄"></el-table-column>
|
||||
<el-table-column prop="homeUnit" label="工作或学习单位"></el-table-column>
|
||||
<el-table-column prop="yearIncome" label="年均收入"></el-table-column>
|
||||
<el-table-column prop="remarks" label="备注"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="本人承诺" :span="3">
|
||||
<div style="text-align: left; padding-left: 10px">
|
||||
本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!
|
||||
</div>
|
||||
<div style="text-align: right; padding-right: 80px; margin-top: 10px;">
|
||||
<span>承诺人:{{ viewData.userName }}</span>
|
||||
<span style="margin-left: 30px;">{{ $moment(viewData.applyTime).format('YYYY-MM-DD') }}</span>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="生活致困原因" :span="3">{{ viewData.reason }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files"
|
||||
complete_result></file-preview>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-image v-if="viewData.sign"
|
||||
:src="viewData.sign"
|
||||
class="signature-image"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="task-panel mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="task.displayName == '校工会审核'">
|
||||
<el-descriptions-item label="审批级别">{{ viewData.level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审批金额">{{ '¥' + viewData.money }}</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.info()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 获取申请信息
|
||||
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
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="受助人">
|
||||
<el-input placeholder="请输入受助人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select clearable filterable placeholder="请选择所属单位"
|
||||
style="width: 100%;" v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申请记录">
|
||||
<el-button size="small" type="primary" @click="onApply">帮扶申请</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button @click="doExportApply(row)" size="mini" type="primary">打印</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true, width: "125" },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "money", label: "实际帮扶金额", sortable: true, width: "135"},
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
onApply(){
|
||||
commonUtil.pjaxPush('/platform/difficultHelp/apply')
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/difficultHelp/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/difficultHelp/mine/onDelete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
doExportApply(row) {
|
||||
this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=true')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,217 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="受助人">
|
||||
<el-input placeholder="请输入受助人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select clearable filterable placeholder="请选择所属单位"
|
||||
style="width: 100%;" v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="数据列表">
|
||||
<el-button type="primary" size="small" @click="importMoney">导入实际金额</el-button>
|
||||
<el-button @click="exportYearPayRecord" size="small" icon="el-icon-download" type="primary">导出补助金额</el-button>
|
||||
<el-button @click="exportAllApply" size="small" type="primary">导出申请表(压缩包)</el-button>
|
||||
<el-button @click="exportSummaryXlsx" size="small" type="primary">导出汇总表(excel)</el-button>
|
||||
<el-button @click="exportSummaryDocx" size="small" type="primary">导出汇总表(word)</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='taskName'">
|
||||
<span>{{ row.instanceState == '20' ? '结束' : row.taskName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="doExportApply(row)" size="mini" type="primary">导出</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog title="人员导入" :visible.sync="importDialog" width="50%" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<file-import
|
||||
ref="viewImport"
|
||||
temp_url="/platform/difficultHelp/reading/downloadTemplate"
|
||||
post_url="/platform/difficultHelp/reading/importMoney"
|
||||
@flush="successImport"
|
||||
></file-import>
|
||||
</el-dialog>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "money", label: "实际金额", sortable: true },
|
||||
// { prop: "taskName", label: "当前节点" },
|
||||
// { prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
importDialog: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
importMoney() {
|
||||
this.importDialog = true
|
||||
},
|
||||
successImport() {
|
||||
this.importDialog = false
|
||||
this.pageData()
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/difficultHelp/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/difficultHelp/mine/onDelete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
exportYearPayRecord(){
|
||||
this.$downLoad('/platform/difficultHelp/reading/exportYearPayRecord', this.pageForm)
|
||||
},
|
||||
exportAllApply() {
|
||||
this.$downLoad('/platform/difficultHelp/reading/doExportAllApply', this.pageForm)
|
||||
},
|
||||
exportSummaryXlsx() {
|
||||
const params = {...this.pageForm, flag: "xlsx"};
|
||||
this.$downLoad('/platform/difficultHelp/reading/exportSummary', params)
|
||||
},
|
||||
exportSummaryDocx() {
|
||||
const params = {...this.pageForm, flag: "docx"};
|
||||
this.$downLoad('/platform/difficultHelp/reading/exportSummary', params)
|
||||
},
|
||||
doExportApply(row) {
|
||||
this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=false')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
<div id="difficult_help_school_union_approval_form">
|
||||
<el-form :model="formData" ref="formRef" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-form-item label="审核金额" prop="tf_money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="请输入金额" v-model="formData.tf_money"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#difficult_help_school_union_approval_form",
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
formData: {
|
||||
tf_money: 0,
|
||||
tf_opinion: "",
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...val,
|
||||
...this.formData
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete",
|
||||
payload: val
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(val) {
|
||||
console.log(val)
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
+365
@@ -0,0 +1,365 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="受助人">
|
||||
<el-input placeholder="请输入受助人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select clearable filterable placeholder="请选择所属单位"
|
||||
style="width: 100%;" v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审批列表">
|
||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :reserve-selection="true" type="selection" width="55"></el-table-column>
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<el-dialog title="设置审核信息" :visible.sync="dialogVisible" width="30%" center>
|
||||
<el-form :model="formData" ref="formData" label-width="100px">
|
||||
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核金额" prop="money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="请输入金额" v-model="formData.money" style="width: 100%" :precision="2" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAudit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<search-item>
|
||||
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
|
||||
</search-item>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核金额" prop="money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="请输入金额" v-model="formData.money" style="width: 100%" :precision="2"
|
||||
:min="0" ></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
audit: "false"
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
formData: {
|
||||
level: '',
|
||||
money: 0,
|
||||
tf_opinion: "",
|
||||
},
|
||||
showApprovalForm: false,
|
||||
auditForm: {
|
||||
level: '',
|
||||
money: 0
|
||||
},
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
},
|
||||
methods: {
|
||||
openView(row){
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
allAudit() {
|
||||
const selectedRows = this.$refs.table.selection;
|
||||
if (selectedRows.length === 0) {
|
||||
this.$message.warning('请至少选择一条记录进行审核!');
|
||||
return;
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
submitAudit() {
|
||||
this.$refs.formData.validate((valid) => {
|
||||
if (valid) {
|
||||
const selectedRows = this.$refs.table.selection;
|
||||
const message = '确定要审核这 ' + selectedRows.length + ' 条记录吗?';
|
||||
this.$confirm(message, '批量审核确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.batchApprove(selectedRows);
|
||||
this.dialogVisible = false;
|
||||
}).catch(() => {
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请填写完整的审核信息!');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
async batchApprove(items) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在批量审核...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
try {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
try {
|
||||
await this.approveSingleItem(item);
|
||||
successCount++;
|
||||
} catch (error) {
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
loading.close();
|
||||
if (failCount > 0) {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
this.doSearch();
|
||||
} catch (error) {
|
||||
loading.close();
|
||||
this.$message.error('批量审核过程中发生错误');
|
||||
}
|
||||
},
|
||||
|
||||
approveSingleItem(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
id: item.id
|
||||
})
|
||||
}).then((saveRes) => {
|
||||
if (saveRes.code !== 0) {
|
||||
throw new Error(saveRes.msg || '保存失败');
|
||||
}
|
||||
return this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: item.taskId,
|
||||
tf_opinion: '审核通过',
|
||||
submitType: 1,
|
||||
})
|
||||
});
|
||||
}).then((taskRes) => {
|
||||
if (taskRes.code === 0) {
|
||||
resolve(taskRes);
|
||||
} else {
|
||||
throw new Error(taskRes.msg || '审批失败');
|
||||
}
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
id: row.id
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
})
|
||||
}).then((saveRes) => {
|
||||
if (saveRes.code === 0) {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((taskRes) => {
|
||||
if (taskRes.code === 0) {
|
||||
this.$message.success('操作成功');
|
||||
this.$refs.guava.index();
|
||||
this.doSearch();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<div id="difficult_help_branch_union_approval_form">
|
||||
<el-form :model="formData" ref="formRef" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#difficult_help_branch_union_approval_form",
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...val,
|
||||
...this.formData
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete",
|
||||
payload: val
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(val) {
|
||||
console.log(val)
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
+305
@@ -0,0 +1,305 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="受助人">
|
||||
<el-input placeholder="请输入受助人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select clearable filterable placeholder="请选择所属单位"
|
||||
style="width: 100%;" v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审批列表">
|
||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" @selection-change="handleSelectionChange"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column type="selection" width="45"></el-table-column>
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
audit: "false"
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
selectData: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
allAudit() {
|
||||
if (this.pageForm.audit !== "false" || !this.tableData || this.tableData.length === 0) {
|
||||
this.$message.warning('没有待审核的数据!');
|
||||
return;
|
||||
}
|
||||
if (this.selectData.length === 0) {
|
||||
this.$message.warning('请勾选待审核数据!');
|
||||
return;
|
||||
}
|
||||
const message = '确定要一键审核这 ' + this.selectData.length + ' 条记录吗?';
|
||||
this.$confirm(message, '批量审核确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.batchApprove(this.selectData);
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
async batchApprove(items) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在批量审核...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
try {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
try {
|
||||
await this.approveSingleItem(item);
|
||||
successCount++;
|
||||
} catch (error) {
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
loading.close();
|
||||
if (failCount > 0) {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
|
||||
this.doSearch();
|
||||
} catch (error) {
|
||||
loading.close();
|
||||
this.$message.error('批量审核过程中发生错误');
|
||||
}
|
||||
},
|
||||
|
||||
approveSingleItem(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: item.taskId,
|
||||
tf_opinion: '审核通过',
|
||||
submitType: 1
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
resolve(res);
|
||||
} else {
|
||||
reject(res);
|
||||
}
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
handleSelectionChange: function (val) {
|
||||
this.selectData = val
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,131 @@
|
||||
<div id="difficult_help_view">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请模式">{{ viewData.mode == 1 ? '本人申请' : '替他人申请' }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{ viewData.birthday }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职务职称">{{ viewData.officialCapacity }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="手机号码">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号" :span="2">{{ viewData.idCard }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="月收入">{{ viewData.monthlyIncome }}</el-descriptions-item>
|
||||
<el-descriptions-item label="收款账户" :span="2">{{ viewData.bankCardNum }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="困难类型" :span="3">{{ viewData.subsidyStandards }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请原因" :span="3">{{ viewData.reason }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭成员经济收入" :span="3">
|
||||
<el-table :data="viewData.familyList" border style="width: 92%">
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="姓名" prop="name"></el-table-column>
|
||||
<el-table-column prop="relation" label="年龄(岁)"></el-table-column>
|
||||
<el-table-column prop="relation" label="关系"></el-table-column>
|
||||
<el-table-column prop="monthlyIncome" label="月收入(元)"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-image v-if="viewData.sign"
|
||||
:src="viewData.sign"
|
||||
class="signature-image"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="task-panel mt10">
|
||||
<div class="task-panel-header">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="task.taskFormData.tf_money">
|
||||
<el-descriptions-item label="审批金额">{{ task.tf_money }}</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{ task.taskFormData.opinion }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#difficult_help_view",
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
instanceId: GetQueryString("instanceId"),
|
||||
viewData: {},
|
||||
doneTasks: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
this.$axios.post("/platform/difficultHelp/mine/findOne", { id: this.businessId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", { instanceId: this.instanceId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.info()
|
||||
this.getDoneTasks()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.task-panel {
|
||||
background: white;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.task-panel-header {
|
||||
background: rgb(250, 250, 250);
|
||||
border: 1px solid rgb(228, 231, 237);
|
||||
border-bottom: none;
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
width: 15%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user