This commit is contained in:
Paidax
2025-09-09 18:20:20 +08:00
parent d7358932dc
commit af1ff3cadf
18 changed files with 2191 additions and 1493 deletions
@@ -105,26 +105,26 @@ const INFO = {
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
transmitData: {},
row: {},
viewData: {},
doneTasks: []
}
},
methods: {
onOpen(transmitData) {
this.transmitData = transmitData
onOpen(row) {
this.row = row
this.info()
this.getDoneTasks()
},
info() {
this.$axios.post("/platform/member/apply/mine/findMemberApplyRecord", { id: this.transmitData.id }).then((res) => {
this.$axios.post("/platform/member/apply/mine/findMemberApplyRecord", { id: this.row.id }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { bizId: this.transmitData.id }).then((res) => {
this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
@@ -132,7 +132,7 @@ const INFO = {
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.transmitData.instanceProcessDefineId, this.transmitData.instanceId)
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
}
}
@@ -351,7 +351,6 @@ layout("/layouts/platform.html"){
} else {
user = this.$store.state.user
}
this.member = user.member
if (this.id) {
const res = await this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id })
@@ -0,0 +1,614 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-nav-bar title="帮扶申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="申请人信息" class="form-section">
<van-field label="填写人姓名" :rules="[{ required: true }]" v-model="formData.proxyUserName" readonly
required name="proxyUserName"></van-field>
<van-field label="填写人工号" :rules="[{ required: true }]" v-model="formData.proxyLoginName" readonly
required name="proxyLoginName"></van-field>
<van-field label="申请模式" name="mode" required :rules="[{ required: true }]">
<template #input>
<van-radio-group v-model="formData.mode" @change="modeChange" direction="horizontal">
<van-radio name="1" shape="square">申请本人</van-radio>
<van-radio v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
name="2" shape="square">替他人申请</van-radio>
</van-radio-group>
</template>
</van-field>
</van-cell-group>
<van-cell-group title="受助人信息" class="form-section">
<template v-if="formData.mode == 2">
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName"
required name="userName" placeholder="请输入受补助人姓名后点击查询">
<template #button>
<van-button :disabled="formData.id" @click="queryRecipients(formData.userName)"
size="small" type="primary">查询</van-button>
</template>
</van-field>
<van-action-sheet
:actions="subsidizedList"
:close-on-click-overlay="false"
@cancel="subsidizedList = []"
@select="onUserSelect"
cancel-text="重新输入姓名或工号查询"
v-model="userSheetShow">
</van-action-sheet>
</template>
<template v-else>
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName" readonly
required name="userName"></van-field>
</template>
<van-field
v-model="formData.sex"
label="性别"
required
is-link
placeholder="请选择性别"
readonly
:rules="[{ required: true }]"
@click="showSexPicker = true"
></van-field>
<van-popup v-model="showSexPicker" position="bottom">
<van-picker
show-toolbar
:columns="['男', '女']"
@confirm="onSexConfirm"
@cancel="showSexPicker=false"
></van-picker>
</van-popup>
<van-field
v-model="formData.birthday"
label="出生年月"
is-link
placeholder="请填写出生年月"
@click="showDatePicker = true"
required
:rules="[{ required: true }]"
></van-field>
<van-popup v-model="showDatePicker" position="bottom">
<van-datetime-picker
type="date"
:min-date="new Date(1900, 0, 1)"
:max-date="new Date()"
@confirm="onDateConfirm"
@cancel="showDatePicker=false"
></van-datetime-picker>
</van-popup>
<van-field
v-model="formData.unionName"
label="所在工会"
placeholder="请选择所在工会"
readonly
:rules="[{ required: true }]"
required
></van-field>
<van-field
v-model="formData.unitName"
label="所在单位"
placeholder="请选择所在单位"
readonly
:rules="[{ required: true }]"
required
></van-field>
<van-field
v-model="formData.officialCapacity"
label="职务职称"
placeholder="请填写职务职称"
maxlength="50"
clearable
required
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.mobile"
label="手机号码"
placeholder="请填写手机号码"
maxlength="11"
clearable
required
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.idCard"
label="身份证号"
placeholder="请填写身份证号"
maxlength="18"
clearable
required
:rules="[{ required: true }]"
></van-field>
<van-field
v-model="formData.monthlyIncome"
label="本人月收入"
type="number"
placeholder="请填写本人月收入"
:rules="[{ required: true }]"
required
></van-field>
</van-cell-group>
<van-cell-group title="困难类型及材料" class="form-section">
<van-field
v-model="formData.subsidyStandards"
label="困难类型"
placeholder="请选择款项"
is-link
@click="showSubsidyPicker = true"
required
:rules="[{ required: true, message: '请选择款项' }]"
></van-field>
<van-popup v-model="showSubsidyPicker" position="bottom">
<van-picker
show-toolbar
:columns="subsidyStandards"
@confirm="onSubsidyConfirm"
@cancel="showSubsidyPicker=false"
></van-picker>
</van-popup>
<van-field
v-model="formData.bankCardNum"
label="银行卡号"
maxlength="20"
clearable
placeholder="请填写华夏银行工资卡号"
:rules="[{ required: true }]"
required
></van-field>
<div style="margin-left: 10px">
<span style="color: #bc2a25">据学校要求,请您填写【<span style="color: red;font-weight: bolder">华夏银行工资卡号</span>】为收款账户</span>
</div>
<van-field
v-model="formData.reason"
label="申请原因"
type="textarea"
placeholder="请简述申请原因"
maxlength="500"
required
:rules="[{ required: true, message: '请简述申请原因' }]"
></van-field>
<van-field name="familyList" label="家庭成员经济收入" @click="showDialog = true" required is-link
label-width="60%"
clickable
class="family-list-field">
</van-field>
<van-list class="family-list-cell">
<van-cell
v-for="(member, index) in formData.familyList"
:key="index"
:title="member.name"
:label="'年龄: ' + member.age + ' 岁, 关系: ' + member.relation + ', 月收入: ' + member.monthlyIncome + ' 元'"
is-link
@click="editMember(index)"
>
<template #right-icon>
<van-icon name="delete" color="red" @click.stop="removeMember(index)"></van-icon>
</template>
</van-cell>
</van-list>
</van-cell-group>
<van-cell-group title="附件信息" class="form-section">
<van-field class="more-text" name="avatar" label="">
<template #input>
<h5-file-upload
slot="input"
:value.sync="formData.files"
:upload_number="10"
upload_mode="file"
upload_result_category="array"
upload_result_type="url"
complete_result
></h5-file-upload>
</template>
</van-field>
</van-cell-group>
<van-cell-group title="签字" class="form-section">
<van-field class="more-text" name="signature" label="">
<template #input>
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<div class="form-actions">
<van-button plain type="info" @click="onSave">保存</van-button>
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
<van-button type="primary" @click="onFinishTask" v-else>提交</van-button>
</div>
</van-form>
</div>
<van-dialog v-model="showDialog" class="family-dialog" title="添加家庭成员" show-cancel-button
:before-close="handleBeforeClose">
<van-cell-group>
<van-field
v-model="newMember.name"
label="姓名"
placeholder="请输入姓名"
required
></van-field>
<van-field
v-model="newMember.age"
label="年龄(岁)"
type="number"
placeholder="请输入年龄"
required
></van-field>
<van-field
v-model="newMember.relation"
label="关系"
placeholder="请输入关系"
required
></van-field>
<van-field
v-model="newMember.monthlyIncome"
label="月收入(元)"
type="number"
placeholder="请输入月收入"
required
></van-field>
</van-cell-group>
</van-dialog>
</div>
<script>
new Vue({
el: '#app',
store,
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
showSexPicker: false,
showDatePicker: false,
showSubsidyPicker: false,
formData: {
id: GetQueryString("bizId"),
mode: '1'
},
subsidyStandards: [
'患重大疾病(癌症)',
'本人家庭(仅指代本人及其配偶、子女共同组成的家庭)人均月收入低于1300元或本人配偶、子女患有重大疾病且自付医疗费用超过家庭年收入的80%',
'患精神类疾病',
'长期病休',
'其他特殊情况'
],
newMember: {
name: '',
age: '',
relation: '',
monthlyIncome: ''
},
showDialog: false,
isEditing: false,
editingIndex: null,
// 替他人申请相关
userSheetShow: false,
subsidizedList: []
}
},
methods: {
historyBack,
// 保存
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("保存成功")
window.location.href = '/platform/difficultHelp/mine'
}
})
})
},
// 提交
onSubmit() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const result = this.isValidIdCard(this.formData.idCard)
if (result.status === 0) {
this.$toast(result.msg)
}
const bankRes = this.validateCard(this.formData.bankCardNum)
if (bankRes.status === 0) {
this.$toast(bankRes.msg)
}
this.$axios.post('/platform/difficultHelp/apply/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
window.location.href = '/platform/h5/difficultHelp/mine'
}
})
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/difficultHelp/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
window.location.href = '/platform/difficultHelp/mine'
}
})
})
},
// 查询受助人
async queryRecipients(key) {
if (this.formData.mode !== '2') {
return
}
const res = await this.$axios.post('/platform/difficultHelp/apply/queryRecipients', { key })
if (res.code === 0) {
res.data.forEach((v) => {
v.name = v.username;
return v;
});
this.subsidizedList = res.data;
this.userSheetShow = true;
}
},
onUserSelect(val) {
const user = this.subsidizedList.find((item) => item.id === val.id)
if (user) {
this.$set(this.formData, "userId", user.id);
this.$set(this.formData, "userName", user.username);
this.$set(this.formData, "loginName", user.loginname);
this.$set(this.formData, "sex", user.sex);
this.$set(this.formData, "unitId", user.unitid);
this.$set(this.formData, "unitName", user.unitName);
this.$set(this.formData, "unionId", user.unionid);
this.$set(this.formData, "unionName", user.unionName);
this.$set(this.formData, "birthday", 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);
}
this.userSheetShow = false;
},
onSexConfirm(value) {
this.formData.sex = value;
this.showSexPicker = false;
},
onDateConfirm(value) {
this.formData.birthday = moment(value).format("YYYY-MM-DD");
this.showDatePicker = false;
},
onSubsidyConfirm(value) {
this.formData.subsidyStandards = value;
this.showSubsidyPicker = false;
},
handleBeforeClose(action, done) {
if (action === 'confirm') {
if (!this.newMember.name || !this.newMember.age || !this.newMember.relation || !this.newMember.monthlyIncome) {
this.$toast('请填写完整信息');
done(false);
} else {
done()
if (this.bizId) {
this.updateMember();
} else {
this.addMember();
}
done();
}
} else {
done()
}
},
addMember() {
this.formData.familyList.push({...this.newMember});
this.resetNewMember();
},
editMember(index) {
this.newMember = {...this.formData.familyList[index]};
this.editingIndex = index;
this.isEditing = true;
this.showDialog = true;
},
updateMember() {
this.formData.familyList.splice(this.editingIndex, 1, { ...this.newMember });
this.resetNewMember();
},
removeMember(index) {
this.formData.familyList.splice(index, 1);
},
resetNewMember() {
this.newMember = {name: '', age: '', relation: '', monthlyIncome: ''};
this.isEditing = false;
this.editingIndex = null;
},
findOne(id) {
this.$axios.post('/platform/difficultHelp/mine/findOne', { id }).then(res => {
if (res.code === 0) {
this.formData = res.data
}
})
},
// 申请模式
modeChange(val) {
const user = this.$store.state.user
if (val === "1") {
this.$set(this.formData, 'userId', user.id)
this.$set(this.formData, 'userName', user.username)
this.$set(this.formData, 'loginName', user.loginname)
this.$set(this.formData, 'proxyUserId', user.id)
this.$set(this.formData, 'proxyUserName', user.username)
this.$set(this.formData, 'proxyLoginName', user.loginname)
this.$set(this.formData, 'mode', "1")
this.$set(this.formData, 'sex', user.sex)
this.$set(this.formData, 'unitId', user.unit.id)
this.$set(this.formData, 'unitName', user.unit.name)
this.$set(this.formData, 'unionId', user.union.id)
this.$set(this.formData, 'unionName', user.union.name)
this.$set(this.formData, 'monthlyIncome', null)
this.$set(this.formData, 'birthday', 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.bizId) {
this.findOne(this.bizId)
} else {
this.modeChange("1")
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,104 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-sticky>
<van-nav-bar title="帮扶申请记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
:close-on-click-overlay="false"
>
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/difficultHelp/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
<table-column label="填报时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)">
<i class="fa fa-check-square-o"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="分工会审核"></van-nav-bar>
</van-sticky>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field label="审核意见" name="tf_opinion" v-model="formData.tf_opinion"
required :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
</van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意申请</van-button>
</div>
</div>
</info>
</van-popup>
</div>
<script>
new Vue({
el: '#app',
store,
data() {
return {
pageForm: {
pageNo: 1,
pageSize: 10,
searchKeyword: '',
unionId: '',
unitId: ''
},
unionList: [],
unitList: [],
infoShow: false
}
},
components: {
"info": INFO
},
methods: {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,39 @@
const INFO = {
template: /*language=HTML*/`
`,
data() {
return {
row: {},
viewData: {},
doneTasks: [],
}
},
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,185 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-sticky>
<van-nav-bar title="帮扶申请记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
:close-on-click-overlay="false"
>
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/difficultHelp/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
<table-column label="填报时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onDelete(row.id)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="申请信息"></van-nav-bar>
</van-sticky>
<info ref="infoRef"></info>
</van-popup>
</div>
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: '#app',
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
unionId: "",
unitId: ""
},
unionList: [],
unitList: [],
infoShow: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onView(row) {
this.infoShow = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(row)
})
},
onEdit(row) {
this.$pjaxReplace('/platform/h5/difficultHelp/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤销吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
})
},
onDelete(id) {
this.$dialog.confirm({
title: "提示",
message: "您确定要删除吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/platform/difficultHelp/mine/onDelete", { id }).then((res) => {
if (res.code === 0) {
this.doSearch()
this.$toast.success(res.msg)
} else {
this.$toast.fail(res.msg)
}
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
@@ -1,405 +0,0 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0;
border-color: #1867b0;
}
.van-button--small {
border-radius: 8px;
height: 26px;
}
.van-col {
line-height: 24px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 14px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
color: #1867b0;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
p {
margin: 0 !important;
}
.van-cell__title {
width: 30%;
}
.van-cell__right-icon {
margin-left: 0;
}
.van-sidebar-item {
padding: 8px 12px;
}
.footer {
background-color: white;
width: 100%;
height: 60px;
display: flex;
justify-content: space-evenly;
align-items: center;
left: 0;
}
.footer .van-button {
height: 34px;
border-radius: 6px;
width: 90% !important;
}
.join {
background-color: #0e78c5;
color: white;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.more_text {
display: inline-block !important;
}
.more_text .van-cell__value {
width: 100% !important;
}
.more_text .van-field__label {
width: 100% !important;
}
.van-card-header {
padding-bottom: 6px;
border-bottom: 1px solid #ebeef5;
box-sizing: border-box;
color: #0e78c5;
font-weight: bold;
}
.van-tabs {
height: calc(100vh - 46px);
overflow: auto;
}
.van-cell-group__title {
padding: 6px 0;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="会员入会分工会审核" left-text="返回" left-arrow @click-left="$pjaxReplace('/platform/h5/home')"></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
<div>
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{item.username + '(' + item.loginname + ')'}}</span>
</div>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="12">
<span style="color: grey">所属工会:</span>
{{item.unionName}}
</van-col>
<van-col span="12">
<span style="color: grey">工作单位:</span>
<span>{{item.unitName}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12">
<span style="color: grey">在职状态:</span>
{{item.userState}}
</van-col>
<van-col span="12">
<span style="color: grey">人事编制:</span>
<span>{{item.preparedBy}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12">
<span style="color: grey">人员类型:</span>
{{item.personType}}
</van-col>
<van-col span="12">
<span style="color: grey">申报类型:</span>
{{ '入会申请' }}
</van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: space-between; align-items: center">
<div>
<span style="color: grey">当前状态:</span>
<span>{{item.processInstanceNodeName}}</span>
</div>
<div>
<van-button size="small" @click="openView(item)" type="info" style="margin-right: 4px">查看</van-button>
<van-button
size="small"
type="primary"
v-if="item.processInstanceTaskStatus==='ACTIVE'"
@click="openApproval(item)"
style="margin-right: 4px"
>
审核
</van-button>
<van-button
size="small"
@click="openRevoke(item.processInstanceTaskId)"
type="danger"
style="margin-right: 4px"
v-if="item.processInstanceTaskStatus==='COMPLETE'
&& !item.nextTaskIsComplete"
>
撤回
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
</div>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="分工会审核"></van-nav-bar>
</van-sticky>
<member-change-info ref="memberChangeInfoRef"></member-change-info>
<div v-if="showApprovalForm">
<div class="process-title">{{formData.processInstanceNodeName}}</div>
<form @submit.prevent="">
<van-field label="审核意见" name="approvalOpinion" v-model="formData.approvalOpinion" required></van-field>
<van-field label="签字" name="signature" v-model="formData.approvalSignature" required class="direction-column-field">
<h5-signature v-model="formData.approvalSignature" slot="input"></h5-signature>
</van-field>
</form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click.submit="doApproval('BACK')">退回</van-button>
<van-button type="danger" block @click.submit="doApproval('REJECT')">建议撤销</van-button>
<van-button type="primary" block @click.submit="doApproval('PASS')">同意</van-button>
</div>
</div>
</van-popup>
</div>
<script>
<!--#include("../../common/mobileMemberChangeInfo.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
tableData: [],
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "未审核", value: false }
],
tableLoading: false,
tableFinished: false,
userId: "",
infoShow: false,
showApprovalForm: false
}
},
components: {
"member-change-info": MOBILE_MEMBER_CHANGE_INFO
},
methods: {
openApproval(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = true
this.formData = row.approvalParam
this.$refs.memberChangeInfoRef.activeName = "change"
this.$refs.memberChangeInfoRef.onOpen({ recordId: row.id, userId: row.userId })
})
},
doApproval(approvalType) {
this.formData.bpmTaskApprovalType = approvalType
formRules(this.rules, this.formData, (valid) => {
if (valid) {
this.$axios
.post("/platform/member/apply/branchUnionAudit/approval", {
approval: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.infoShow = false
this.$toast.success(res.msg)
this.doSearch()
}
})
}
})
},
openRevoke(taskId) {
this.$dialog
.confirm({
title: "撤回",
message: "您确定要撤回吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(() => {
this.$axios.post("/platform/member/apply/branchUnionAudit/revoke", { taskId }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
},
openView(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = false
this.$refs.memberChangeInfoRef.activeName = "basic"
this.$refs.memberChangeInfoRef.onOpen({ recordId: row.id, userId: row.userId })
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/apply/branchUnionAudit/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,234 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="入会分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div class="list-card" v-for="row in tableData" :key="row.id">
<div class="list-card-body">
<van-cell title="工号">{{row.loginName}}</van-cell>
<van-cell title="姓名">{{row.userName}}</van-cell>
<van-cell title="所属工会">{{row.unionName}}</van-cell>
<van-cell title="工作单位">{{row.unitName}}</van-cell>
<van-cell title="在职状态">{{row.userState}}</van-cell>
<van-cell title="人员类型">{{row.personType}}</van-cell>
<van-cell title="流程状态">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</van-cell>
</div>
<div class="list-card-footer">
<van-button type="info" size="small" @click="openView(row)">查看</van-button>
<van-button type="primary" v-if="row.taskState === 10" @click="openApproval(row)" size="small">审核</van-button>
<van-button type="danger" v-if="row.canRevoke" @click="openRevoke(row)" size="small">撤回</van-button>
</div>
</div>
</van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
</div>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="分工会审核"></van-nav-bar>
</van-sticky>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field label="审核意见" name="tf_opinion" v-model="formData.tf_opinion"
required :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
</van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意申请</van-button>
</div>
</div>
</info>
</van-popup>
</div>
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
tableData: [],
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "未审核", value: false }
],
tableLoading: false,
tableFinished: false,
// 审核相关
infoShow: false,
showApprovalForm: false,
formData: {
tf_opinion: ""
},
}
},
components: {
"info": INFO
},
methods: {
historyBack,
openView(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openApproval(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.info.onOpen(row)
})
},
handleTaskAction(val) {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.infoShow = false
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
openRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.pageData()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/apply/branchUnionAudit/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,152 @@
const INFO = {
template: /*language=HTML*/ `
<div>
<van-tabs v-model="activeName">
<van-tab title="申请信息" name="basicInfo">
<van-cell>
<div style="font-weight: bold;font-size: 16px;display: flex;align-items: center;justify-content: space-between">
<div>
<span>申请信息</span> <el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<div style="color: #1867b0;" @click="clickUpOrDown=!clickUpOrDown">
<span>{{clickUpOrDown ? '点击收起' : '点击展开'}}</span>
<van-icon :name="clickUpOrDown?'arrow-up':'arrow-down'"></van-icon>
</div>
</div>
</van-cell>
<template v-if="clickUpOrDown">
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<template v-if="viewData.loginname === $store.state.user.loginnmae">
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.unit }}</td>
<td class="table-cell">{{ item.remark }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<template #label>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span style="font-size: 14px" v-else>无数据</span>
</template>
</van-cell>
</template>
</template>
</van-tab>
<van-tab title="审核信息" name="audit" v-if="doneTasks && doneTasks.length > 0">
</van-tab>
</van-tabs>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
data() {
return {
row: {},
viewData: {},
doneTasks: [],
activeName: 'basicInfo',
clickUpOrDown: true,
}
},
methods: {
onOpen(row) {
this.row = row
this.info()
this.getDoneTasks()
},
info() {
this.$axios.post("/platform/member/apply/mine/findMemberApplyRecord", { 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)
}
},
style: /*language=CSS*/ `
.column-cell {
flex-direction: column;
}
.family-table {
width: 100%;
max-width: 100%;
border-collapse: collapse;
table-layout: auto;
text-align: center;
font-family: 'Arial', sans-serif;
margin: 20px 0;
}
.table-header {
background-color: gray;
color: white;
font-weight: bold;
text-transform: uppercase;
}
.table-row {
background-color: #f9f9f9;
transition: background-color 0.3s;
}
.table-row:hover {
background-color: #f1f1f1;
}
.table-cell {
padding: 10px 20px;
border: 1px solid #ddd;
text-align: center;
}
`
}
@@ -1,146 +1,20 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0;
border-color: #1867b0;
}
.van-button--small {
border-radius: 8px;
height: 26px;
}
.van-col {
line-height: 24px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 14px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
color: #1867b0;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
p {
margin: 0 !important;
}
.van-cell__title {
width: 30%;
}
.van-cell__right-icon {
margin-left: 0;
}
.van-sidebar-item {
padding: 8px 12px;
}
.footer {
background-color: white;
width: 100%;
height: 60px;
display: flex;
justify-content: space-evenly;
align-items: center;
left: 0;
}
.footer .van-button {
height: 34px;
border-radius: 6px;
width: 90% !important;
}
.join {
background-color: #0e78c5;
color: white;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.more_text {
display: inline-block !important;
}
.more_text .van-cell__value {
width: 100% !important;
}
.more_text .van-field__label {
width: 100% !important;
}
.van-card-header {
padding-bottom: 6px;
border-bottom: 1px solid #ebeef5;
box-sizing: border-box;
color: #0e78c5;
font-weight: bold;
}
.van-tabs {
height: calc(100vh - 46px);
overflow: auto;
}
.van-cell-group__title {
padding: 6px 0;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="我的入会申请" left-text="返回" left-arrow @click-left="$pjaxReplace('/platform/h5/home')"></van-nav-bar>
<van-sticky>
<van-nav-bar title="入会填报记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
@@ -150,106 +24,47 @@ layout("/layouts/platform_h5.html"){
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
<div>
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{item.username + '(' + item.loginname + ')'}}</span>
</div>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="12">
<span style="color: grey">所属工会:</span>
{{item.unionName}}
</van-col>
<van-col span="12">
<span style="color: grey">工作单位:</span>
<span>{{item.unitName}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12">
<span style="color: grey">在职状态:</span>
{{item.userState}}
</van-col>
<van-col span="12">
<span style="color: grey">人事编制:</span>
<span>{{item.preparedBy}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12">
<span style="color: grey">人员类型:</span>
{{item.personType}}
</van-col>
<van-col span="12">
<span style="color: grey">申报类型:</span>
{{ '入会申请' }}
</van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: space-between; align-items: center">
<div>
<span style="color: grey">当前状态:</span>
<span>{{item.processInstanceNodeName}}</span>
</div>
<div>
<van-button size="small" @click="openView(item)" type="info" style="margin-right: 4px">查看</van-button>
<van-button
size="small"
type="primary"
v-if="[10,40,70].includes(item.processInstanceNodeCode)"
@click="$pjaxReplace('/platform/h5/member/apply/submit?id=' + item.id)"
style="margin-right: 4px"
>
编辑
</van-button>
<van-button
size="small"
@click="openRevoke(item)"
type="danger"
style="margin-right: 4px"
v-if="[20].includes(item.processInstanceNodeCode) && !item.nextTaskIsComplete"
>
撤销
</van-button>
<van-button
size="small"
@click="doDelete(item)"
type="danger"
style="margin-right: 4px"
v-if="[10].includes(item.processInstanceNodeCode)"
>
删除
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
</div>
<table-list api="/platform/member/apply/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onDelete(row.id)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="我的申请信息"></van-nav-bar>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="申请信息"></van-nav-bar>
</van-sticky>
<member-change-info ref="memberChangeInfoRef"></member-change-info>
<info ref="infoRef"></info>
</van-popup>
</div>
<script>
<!--#include("../../common/mobileMemberChangeInfo.js"){}#-->
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
store,
@@ -259,139 +74,110 @@ layout("/layouts/platform_h5.html"){
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
unionId: "",
unitId: ""
},
tableData: [],
unionList: [],
unitList: [],
tableLoading: false,
tableFinished: false,
userId: "",
infoShow: false
}
},
components: {
"member-change-info": MOBILE_MEMBER_CHANGE_INFO
"info": INFO
},
methods: {
openRevoke(row) {
this.$dialog
.confirm({
title: "撤销",
message: "您确定要撤销吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(() => {
this.$axios.post("/platform/member/apply/mine/revokeApply", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
},
doDelete(row) {
this.$dialog
.confirm({
title: "删除",
message: "您确定要删除吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(() => {
this.$axios.post("/platform/member/apply/mine/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
},
openView(row) {
this.infoShow = true
this.$nextTick(() => {
this.$refs.memberChangeInfoRef.onOpen({ recordId: row.id, userId: row.userId })
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/apply/mine/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
historyBack,
onView(row) {
this.infoShow = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(row)
})
},
onEdit(row) {
this.$pjaxReplace('/platform/h5/member/apply/submit?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤销吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
})
},
onDelete(id) {
this.$dialog.confirm({
title: "提示",
message: "您确定要删除吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => {
if (res.code === 0) {
this.doSearch()
this.$toast.success(res.msg)
} else {
this.$toast.fail(res.msg)
}
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
initUnion() {
try {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
} catch (e) {}
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
flushUnits() {
try {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
} catch (e) {}
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
}
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
@@ -1,402 +0,0 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0;
border-color: #1867b0;
}
.van-button--small {
border-radius: 8px;
height: 26px;
}
.van-col {
line-height: 24px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 14px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
color: #1867b0;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
p {
margin: 0 !important;
}
.van-cell__title {
width: 30%;
}
.van-cell__right-icon {
margin-left: 0;
}
.van-sidebar-item {
padding: 8px 12px;
}
.footer {
background-color: white;
width: 100%;
height: 60px;
display: flex;
justify-content: space-evenly;
align-items: center;
left: 0;
}
.footer .van-button {
height: 34px;
border-radius: 6px;
width: 90% !important;
}
.join {
background-color: #0e78c5;
color: white;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.more_text {
display: inline-block !important;
}
.more_text .van-cell__value {
width: 100% !important;
}
.more_text .van-field__label {
width: 100% !important;
}
.van-card-header {
padding-bottom: 6px;
border-bottom: 1px solid #ebeef5;
box-sizing: border-box;
color: #0e78c5;
font-weight: bold;
}
.van-tabs {
height: calc(100vh - 46px);
overflow: auto;
}
.van-cell-group__title {
padding: 6px 0;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="会员入会分工会审核" left-text="返回" left-arrow @click-left="$pjaxReplace('/platform/h5/home')"></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
<div>
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{item.username + '(' + item.loginname + ')'}}</span>
</div>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="12">
<span style="color: grey">所属工会:</span>
{{item.unionName}}
</van-col>
<van-col span="12">
<span style="color: grey">工作单位:</span>
<span>{{item.unitName}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12">
<span style="color: grey">在职状态:</span>
{{item.userState}}
</van-col>
<van-col span="12">
<span style="color: grey">人事编制:</span>
<span>{{item.preparedBy}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12">
<span style="color: grey">人员类型:</span>
{{item.personType}}
</van-col>
<van-col span="12">
<span style="color: grey">申报类型:</span>
{{ '入会申请' }}
</van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: space-between; align-items: center">
<div>
<span style="color: grey">当前状态:</span>
<span>{{item.processInstanceNodeName}}</span>
</div>
<div>
<van-button size="small" @click="openView(item)" type="info" style="margin-right: 4px">查看</van-button>
<van-button
size="small"
type="primary"
v-if="item.processInstanceTaskStatus==='ACTIVE'"
@click="openApproval(item)"
style="margin-right: 4px"
>
审核
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
</div>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="分工会审核"></van-nav-bar>
</van-sticky>
<member-change-info ref="memberChangeInfoRef"></member-change-info>
<div v-if="showApprovalForm">
<div class="process-title">{{formData.processInstanceNodeName}}</div>
<form @submit.prevent="">
<van-field label="审核意见" name="approvalOpinion" v-model="formData.approvalOpinion" required></van-field>
<van-field label="签字" name="signature" v-model="formData.approvalSignature" required class="direction-column-field">
<h5-signature v-model="formData.approvalSignature" slot="input"></h5-signature>
</van-field>
</form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click.submit="doApproval('BACK')">退回重新填写</van-button>
<van-button type="danger" block @click.submit="doApproval('REJECT')">建议撤销</van-button>
<van-button type="primary" block @click.submit="doApproval('PASS')">同意</van-button>
</div>
</div>
</van-popup>
</div>
<script>
<!--#include("../../common/mobileMemberChangeInfo.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
tableData: [],
unionList: [],
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "未审核", value: false }
],
tableLoading: false,
tableFinished: false,
userId: "",
infoShow: false,
showApprovalForm: false
}
},
components: {
"member-change-info": MOBILE_MEMBER_CHANGE_INFO
},
methods: {
openApproval(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = true
this.formData = row.approvalParam
this.$refs.memberChangeInfoRef.activeName = "change"
this.$refs.memberChangeInfoRef.onOpen({ recordId: row.id, userId: row.userId })
})
},
doApproval(approvalType) {
this.formData.bpmTaskApprovalType = approvalType
formRules(this.rules, this.formData, (valid) => {
if (valid) {
this.$axios
.post("/platform/member/apply/schoolUnionAudit/approval", {
approval: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.infoShow = false
this.$toast.success(res.msg)
this.doSearch()
}
})
}
})
},
openRevoke(taskId) {
this.$dialog
.confirm({
title: "撤回",
message: "您确定要撤回吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(() => {
this.$axios.post("/platform/member/apply/schoolUnionAudit/revoke", { taskId }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
},
openView(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = false
this.$refs.memberChangeInfoRef.activeName = "basic"
this.$refs.memberChangeInfoRef.onOpen({ recordId: row.id, userId: row.userId })
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/apply/schoolUnionAudit/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,241 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="入会校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div class="list-card" v-for="row in tableData" :key="row.id">
<div class="list-card-body">
<van-cell title="工号">{{row.loginName}}</van-cell>
<van-cell title="姓名">{{row.userName}}</van-cell>
<van-cell title="所属工会">{{row.unionName}}</van-cell>
<van-cell title="工作单位">{{row.unitName}}</van-cell>
<van-cell title="在职状态">{{row.userState}}</van-cell>
<van-cell title="人员类型">{{row.personType}}</van-cell>
<van-cell title="流程状态">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</van-cell>
</div>
<div class="list-card-footer">
<van-button type="info" size="small" @click="openView(row)">查看</van-button>
<van-button type="primary" v-if="row.taskState === 10" @click="openApproval(row)" size="small">审核</van-button>
<van-button type="danger" v-if="row.canRevoke" @click="openRevoke(row)" size="small">撤回</van-button>
</div>
</div>
</van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
</div>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="校工会审核"></van-nav-bar>
</van-sticky>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field label="审核意见" name="tf_opinion" v-model="formData.tf_opinion"
required :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
</van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意申请</van-button>
</div>
</div>
</info>
</van-popup>
</div>
<script>
<!--#include("../common/mobileMemberChangeInfo.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
tableData: [],
unionList: [],
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "未审核", value: false }
],
tableLoading: false,
tableFinished: false,
// 审核相关
infoShow: false,
showApprovalForm: false,
formData: {
tf_opinion: ""
},
}
},
components: {
"info": INFO
},
methods: {
historyBack,
openView(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openApproval(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.info.onOpen(row)
})
},
handleTaskAction(val) {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.infoShow = false
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
openRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.pageData()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/apply/schoolUnionAudit/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -2,357 +2,429 @@
layout("/layouts/platform_h5.html"){
#-->
<style>
.up_down > .van-cell {
flex-flow: column;
}
.up_down > .van-cell > .van-field__label {
width: 100%;
}
.van-cell, .van-picker button, .submit .van-button--normal {
font-size: 16px;
}
.van-divider {
margin: 10px 0;
}
.direction-column-field .van-field__label{
width: 100%;
}
.up_down > .van-cell {
flex-flow: column;
}
.up_down > .van-cell > .van-field__label {
width: 100%;
}
.van-cell, .van-picker button, .submit .van-button--normal {
font-size: 16px;
}
.van-divider {
margin: 10px 0;
}
.direction-column-field {
display: flex;
flex-direction: column;
row-gap: 10px;
}
.direction-column-field {
max-width: 100%;
padding-right: 0;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="会员入会申请" left-text="返回" left-arrow @click-left="$pjaxReplace('/platform/h5/home')"></van-nav-bar>
</van-sticky>
<van-cell-group>
<form novalidate @submit.prevent="">
<van-field v-model="formData.username" label="姓名" readonly></van-field>
<van-field v-model="formData.sex" label="性别" readonly></van-field>
<van-field
v-model="formData.idCard"
name="idCard"
label="身份证号"
placeholder="请输入身份证件号"
clearable
maxlength="18"
></van-field>
<van-field
v-model="formData.nation"
name="nation"
label="民族"
readonly
placeholder="请点击选择民族"
@click="showNationPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showNationPicker">
<van-picker :columns="nationColumns" @cancel="showNationPicker = false" @confirm="onNationConfirm" show-toolbar></van-picker>
</van-popup>
<van-field
v-model="formData.political"
name="nation"
label="政治面貌"
readonly
placeholder="请选择政治面貌"
@click="showPoliticalPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showPoliticalPicker">
<van-picker :columns="politicalColumns" @cancel="showPoliticalPicker = false" @confirm="onPoliticalConfirm" show-toolbar></van-picker>
</van-popup>
<van-field
v-model="formData.education"
name="education"
label="学历"
readonly
placeholder="请选择学历"
@click="showEducationPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showEducationPicker">
<van-picker :columns="educationColumns" @cancel="showEducationPicker = false" @confirm="onEducationConfirm" show-toolbar></van-picker>
</van-popup>
<van-field v-model="formData.unitName" label="工作单位" readonly></van-field>
<van-field v-model="formData.unionName" label="所属工会" readonly></van-field>
<van-field
v-model="formData.governmentPosition"
name="governmentPosition"
label="职务"
placeholder="请输入职务"
clearable
maxlength="30"
></van-field>
<van-field
v-model="formData.userState"
name="userState"
label="在职状态"
readonly
placeholder="请选择在职状态"
@click="showUserStatusPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showUserStatusPicker">
<van-picker :columns="userStateColumns" @cancel="showUserStatusPicker = false" @confirm="onUserStateConfirm" show-toolbar></van-picker>
</van-popup>
<van-field
v-model="formData.preparedBy"
name="preparedBy"
label="人事编制"
readonly
placeholder="请选择人事编制"
@click="showPreparedByPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showPreparedByPicker">
<van-picker :columns="preparedByColumns" @cancel="showPreparedByPicker = false" @confirm="onPreparedByConfirm" show-toolbar></van-picker>
</van-popup>
<van-field
v-model="formData.personType"
name="personType"
label="人员类型"
readonly
placeholder="请选择人员类型"
@click="showPersonTypePicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showPersonTypePicker">
<van-picker :columns="personTypeColumns" @cancel="showPersonTypePicker = false" @confirm="onPersonTypeConfirm" show-toolbar></van-picker>
</van-popup>
<van-field
v-model="formData.mobile"
name="mobile"
label="联系电话"
placeholder="请输入联系电话"
clearable
type="tel"
maxlength="11"
></van-field>
<van-field
v-model="formData.email"
name="email"
label="电子邮箱"
placeholder="请输入电子邮箱"
clearable
maxlength="25"
></van-field>
<van-cell-group class="up_down">
<div class="van-cell">
<div style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div style="width: 100%">
<span>家庭主要成员及联系方式</span>
</div>
</div>
<van-button v-if="formData.families && formData.families.length>0 && formData.families.length<5" style="width: 40px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
<van-divider></van-divider>
<template v-if="formData.families && formData.families.length>0">
<div v-for="o,i in formData.families" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{toChinesNum(i+1)}}</span>
<van-button style="width: 40px"
icon="cross" type="danger" round size="mini"
@click="formData.families.splice(i,1)"
native-type="button"></van-button>
</div>
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field label="工作单位" v-model="o.unit" placeholder="请填写工作单位"
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
<van-field label="备注" v-model="o.remark" placeholder="请填写备注"
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
</div>
</template>
<template v-else>
<div style="padding: 50px;text-align: center">
<van-button style="width: 50px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
</template>
</div>
</van-cell-group>
<van-field
label="个人简况(简历、获奖情况、有何特长)"
name="personalData"
v-model="formData.personalData"
class="direction-column-field">
<template #input>
<text-editor v-model="formData.personalData"></text-editor>
</template>
</van-field>
</form>
<div v-if="!this.$store.state.user.member" style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button block v-if="formData.id" type="primary" @click.submit="$pjaxReplace('/platform/h5/member/apply/mine')">返 回</van-button>
<van-button block type="primary" @click.submit="doSave">保存申请</van-button>
<van-button block type="primary" @click.submit="doSubmit">提交申请</van-button>
</div>
</van-cell-group>
<van-nav-bar title="入会申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-form ref="formRef" class="form-container" :show-error-message="false">
<van-cell-group title="基础信息" class="form-section">
<van-field v-model="formData.loginname" label="工号" readonly></van-field>
<van-field v-model="formData.username" label="姓名" readonly></van-field>
<van-field v-model="formData.sex" label="性别" readonly></van-field>
<van-field
v-model="formData.nation"
name="nation"
label="民族"
readonly
placeholder="请点击选择民族"
@click="showNationPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showNationPicker">
<van-picker show-toolbar
:columns="nationColumns"
@cancel="showNationPicker = false"
@confirm="(v)=>{formData.nation = v;showNationPicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.birthday"
label="出生年月"
is-link
@click="showDatePicker = true"
:rules="[{ required: true, message: '请填写出生年月' }]"
></van-field>
<van-popup v-model="showDatePicker" position="bottom">
<van-datetime-picker
type="date"
:min-date="new Date(1900, 0, 1)"
:max-date="new Date()"
@confirm="onDateConfirm"
@cancel="showDatePicker=false"
></van-datetime-picker>
</van-popup>
<van-field
v-model="formData.political"
name="nation"
label="政治面貌"
readonly
placeholder="请选择政治面貌"
@click="showPoliticalPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showPoliticalPicker">
<van-picker show-toolbar
:columns="politicalColumns"
@cancel="showPoliticalPicker = false"
@confirm="(v)=>{formData.political = v;showPoliticalPicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.education"
name="education"
label="学历"
readonly
placeholder="请选择学历"
@click="showEducationPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showEducationPicker">
<van-picker show-toolbar
:columns="educationColumns"
@cancel="showEducationPicker = false"
@confirm="(v)=>{formData.education = v;showEducationPicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.academicDegree"
name="academicDegree"
label="学位"
readonly
placeholder="请选择学位"
@click="showAcademicDegreePicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showAcademicDegreePicker">
<van-picker show-toolbar
:columns="academicDegreeColumns"
@cancel="showAcademicDegreePicker = false"
@confirm="(v)=>{formData.academicDegree = v;showAcademicDegreePicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.position"
name="position"
label="党政职务"
placeholder="请输入党政职务"
clearable
maxlength="30"
></van-field>
<van-field v-model="formData.unitName" label="工作单位" readonly></van-field>
<van-field v-model="formData.unionName" label="所属工会" readonly></van-field>
<van-field label="所属校区" v-model="formData.campus" readonly clickable
@click="showCampusPicker = true" placeholder="请选择所属校区"
:rules="[{ required:true, message: '请选择所属校区' }]"></van-field>
<van-popup v-model="showCampusPicker" position="bottom">
<van-picker
show-toolbar
:columns="campusColumns"
@confirm="(v)=>{formData.campus = v;showCampusPicker = false}"
@cancel="showCampusPicker = false"
></van-picker>
</van-popup>
<van-field
v-model="formData.userState"
name="userState"
label="在职状态"
readonly
placeholder="请填写在职状态"
clickable
></van-field>
<van-field
v-model="formData.personType"
name="personType"
label="人员类型"
readonly
placeholder="请填写人员类型"
clickable
></van-field>
<van-field
v-model="formData.idCard"
disabled
name="idCard"
label="身份证号"
placeholder="请输入身份证件号"
clearable
maxlength="18"
></van-field>
<van-field
v-model="formData.mobile"
disabled
name="mobile"
label="联系电话"
placeholder="请输入联系电话"
clearable
type="tel"
maxlength="11"
></van-field>
<van-field
v-model="formData.email"
name="email"
label="电子邮箱"
placeholder="请输入电子邮箱"
clearable
maxlength="25"
></van-field>
</van-cell-group>
<van-cell-group title="家庭信息" class="form-section up_down">
<div class="van-cell">
<div style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div style="width: 100%">
<span>家庭主要成员及联系方式</span>
</div>
</div>
<van-button v-if="formData.families && formData.families.length>0 && formData.families.length<5" style="width: 40px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
<van-divider></van-divider>
<template v-if="formData.families && formData.families.length>0">
<div v-for="o,i in formData.families" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{toChinesNum(i+1)}}</span>
<van-button style="width: 40px"
icon="cross" type="danger" round size="mini"
@click="formData.families.splice(i,1)"
native-type="button"></van-button>
</div>
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field label="工作单位" v-model="o.unit" placeholder="请填写工作单位"
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
<van-field label="备注" v-model="o.remark" placeholder="请填写备注"
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
</div>
</template>
<template v-else>
<div style="padding: 50px;text-align: center">
<van-button style="width: 50px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
</template>
</div>
</van-cell-group>
<van-cell-group title="个人简况" class="form-section">
<text-editor v-model="formData.personalData"></text-editor>
</van-cell-group>
<van-cell-group title="入会意愿" class="form-section">
<van-checkbox style="font-size: 17px;padding: 12px" icon-size="24px"
v-model="formData.isVoluntary" shape="square">
<div style="text-indent: 2.1rem">
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费。
</span>
</div>
<div style="text-indent: 2.1rem">
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
</span>
</div>
</van-checkbox>
</van-cell-group>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button block type="primary" @click.submit="onSave">保存</van-button>
<van-button v-if="!taskId" block type="primary" @click.submit="onSubmit">提交</van-button>
<van-button v-else block type="primary" @click.submit="onFinishTask">提交1</van-button>
</div>
</van-form>
</div>
<script>
new Vue({
el: '#app',
store,
dicts:['USER_NATION', 'USER_POLITICAL', 'USER_EDUCATION','USER_ACADEMIC_DEGREE', 'USER_CAMPUS'],
data() {
return {
id: GetQueryString('id'),
isDisable: false,
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {
families: [],
},
// 民族
showNationPicker: false,
nationColumns: [],
// 政治面貌
showPoliticalPicker: false,
politicalColumns: [],
// 学历
showEducationPicker: false,
educationColumns: [],
// 在职状态
showUserStatusPicker: false,
userStateColumns: [],
// 人事编制
showPreparedByPicker: false,
preparedByColumns: [],
// 人员类型
showPersonTypePicker: false,
personTypeColumns: [],
// 学位
showAcademicDegreePicker: false,
// 校区
showCampusPicker: false,
// 生日
showDatePicker: false,
}
},
methods: {
doSave() {
this.$dialog
.confirm({
title: "保存",
message: "您确定要保存吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(() => {
if (this.formData.families) {
this.formData.families = JSON.stringify(this.formData.families)
}
this.$axios
.post('/platform/member/apply/submit/doSave', this.formData)
.then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/h5/member/apply/mine')
} else {
this.$toast.fail(res.msg)
}
})
})
},
doSubmit() {
this.$dialog
.confirm({
title: "提交",
message: "您确定要提交吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(() => {
if (this.formData.families) {
this.formData.families = JSON.stringify(this.formData.families)
}
this.$axios
.post('/platform/member/apply/submit/doSubmit', this.formData)
.then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/h5/member/apply/mine')
} else {
this.$toast.fail(res.msg)
}
})
})
},
onNationConfirm(o) {
this.$set(this.formData, "nation", o.value)
this.showNationPicker = false
},
onPoliticalConfirm(o) {
this.$set(this.formData, "political", o.value)
this.showPoliticalPicker = false
},
onEducationConfirm(o) {
this.$set(this.formData, "education", o.value)
this.showEducationPicker = false
},
onUserStateConfirm(o) {
this.$set(this.formData, "userState", o.value)
this.showUserStatusPicker = false
},
onPreparedByConfirm(o) {
this.$set(this.formData, "preparedBy", o.value)
this.showPreparedByPicker = false
},
onPersonTypeConfirm(o) {
this.$set(this.formData, "personType", o.value)
this.showPersonTypePicker = false
},
async initDictOptions() {
// 民族
const nationData = await this.$businessTool.getDictOptions('USER_NATION')
this.nationColumns = nationData.map(item => {
return { value: item.name, text: item.name }
})
// 政治面貌
const politicalData = await this.$businessTool.getDictOptions('USER_POLITICAL')
this.politicalColumns = politicalData.map(item => {
return { value: item.name, text: item.name }
})
// 学历
const educationData = await this.$businessTool.getDictOptions('USER_EDUCATION')
this.educationColumns = educationData.map(item => {
return { value: item.name, text: item.name }
})
// 在职状态
const userStatusData = await this.$businessTool.getDictOptions('USER_STATUS')
this.userStateColumns = userStatusData.map(item => {
return { value: item.name, text: item.name }
})
// 人事编制
const preparedByData = await this.$businessTool.getDictOptions('PREPARED_BY')
this.preparedByColumns = preparedByData.map(item => {
return { value: item.name, text: item.name }
})
// 人员类型
const personTypeData = await this.$businessTool.getDictOptions('PERSON_TYPE')
this.personTypeColumns = personTypeData.map(item => {
return { value: item.name, text: item.name }
})
},
initUserData() {
const url = this.id ? '/platform/member/apply/submit/findApplyById' : '/platform/member/apply/submit/findUserInfo'
this.$axios.post(url, { id: this.id })
.then(res => {
if (res.code === 0) {
this.formData = res.data
if (!this.id) {
this.formData.id = null
this.formData.userId = res.data.id
}
if (!this.formData.families) {
this.formData.families = []
}
}
})
},
historyBack,
onSave() {
this.$dialog.confirm({
title: "提示",
message: "确定要保存吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/h5/member/apply/mine')
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
onSubmit() {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post('/platform/member/apply/submit/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/h5/member/apply/mine')
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
onFinishTask() {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post('/platform/member/apply/submit/submitAgain', {
data: JSON.stringify(this.formData),
taskId: this.taskId,
}).then(res => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/h5/member/apply/mine')
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
onDateConfirm(value) {
this.formData.birthday = value;
this.showDatePicker = false;
},
async init() {
let user
const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo')
if (resp.code === 0) {
if (!resp.data) {
user = this.$store.state.user
} else {
user = resp.data
}
} else {
user = this.$store.state.user
}
if (this.id) {
const res = await this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id })
debugger
if (res.code === 0) {
this.formData = res.data
}
} else {
const {
id,
username,
loginname,
sex,
nation,
birthday,
political,
education,
academicDegree,
position,
unitId,
unitName,
unit,
unionId,
unionName,
union,
campus,
userState,
personType,
idCard,
mobile,
email,
families,
personalData
} = user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "unitName", unit ? unit.name : unitName)
this.$set(this.formData, "unitId", unit ? unit.id : unitId)
this.$set(this.formData, "unionName", union ? union.name : unionName)
this.$set(this.formData, "unionId", union ? union.id : unionId)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData)
}
},
toChinesNum(num){
let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
let unit = ["", "十", "百", "千", "万"];
@@ -373,9 +445,40 @@ layout("/layouts/platform_h5.html"){
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
}
},
computed: {
nationColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_NATION){
return this.dict.type.USER_NATION.map(v=>v.value)
}
return []
},
politicalColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_POLITICAL){
return this.dict.type.USER_POLITICAL.map(v=>v.value)
}
return []
},
educationColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_EDUCATION){
return this.dict.type.USER_EDUCATION.map(v=>v.value)
}
return []
},
academicDegreeColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_ACADEMIC_DEGREE){
return this.dict.type.USER_ACADEMIC_DEGREE.map(v=>v.value)
}
return []
},
campusColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_CAMPUS){
return this.dict.type.USER_CAMPUS.map(v=>v.value)
}
return []
}
},
created() {
this.initDictOptions()
this.initUserData()
this.init()
},
})
</script>