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