人员
This commit is contained in:
@@ -0,0 +1,312 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.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: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 7px !important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="分工会入会接收" left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></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="24"><span style="color: grey">工作单位:</span>{{item.unitName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span><span>{{item.unionName}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">分配工会:</span><span>{{item.allocationUnionName}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">在职状态:</span>{{item.userState}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">人员类型:</span><span>{{item.personType}}</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.stateName}}</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.applyStateId === 50"
|
||||
@click="openApproval(item)"
|
||||
style="margin-right: 4px">审核
|
||||
</van-button>
|
||||
<van-button size="small" type="danger"
|
||||
v-if="[70].includes(item.applyStateId)"
|
||||
@click="openRevoke(item.id)"
|
||||
style="margin-right: 4px">撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></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
|
||||
title="申请详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<member-apply-audit-info ref="memberApplyAuditInfoRef"></member-apply-audit-info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{ '分工会接收' }}</div>
|
||||
<van-form>
|
||||
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
|
||||
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" required></van-field>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="default" block @click="infoShow=false">取消</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval(0)">拒绝接收</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval(1)">同意接收</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/memberApplyAuditInfo.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
user: {},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
audit: false
|
||||
},
|
||||
auditList: [
|
||||
{text: "已审核", value: true},
|
||||
{text: "未审核", value: false},
|
||||
],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
id: '',
|
||||
infoShow: false,
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-apply-audit-info': MEMBER_APPLY_AUDIT_INFO
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openApproval(item) {
|
||||
this.id = item.id
|
||||
this.formData.username = this.user.username
|
||||
this.formData.auditTime = moment().format('YYYY-MM-DD')
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openRevoke(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定要撤回该申请吗?'
|
||||
}).then(() => {
|
||||
$.post('/platform/member/apply/branchUnion/audit/doRevoke', { id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async doApproval(approvalType) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见')
|
||||
return
|
||||
}
|
||||
let msg = '确定要通过此条申请吗?'
|
||||
if (approvalType === 0) {
|
||||
msg = '拒绝后不可撤回,确定要拒绝此条申请吗?'
|
||||
} else if (approvalType === 2) {
|
||||
msg = '确定要退回此条申请吗?'
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: msg
|
||||
}).then(async () => {
|
||||
this.formData.auditType = approvalType
|
||||
const resp = await $.post('/platform/member/apply/branchUnion/audit/approval', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.infoShow = false
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/member/apply/branchUnion/audit/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)
|
||||
}
|
||||
})
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
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)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
this.user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
if (this.$auth.hasRoleOr("sysadmin, SchoolUnionMemberAdmin")) {
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.flushUnits(this.user.union.id)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,155 @@
|
||||
const MEMBER_APPLY_AUDIT_INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-tabs v-model="activeName">
|
||||
<van-tab title="申请信息" name="basicInfo">
|
||||
<van-cell-group>
|
||||
<van-cell>
|
||||
<div style="color: #1867b0;font-weight: bold;font-size: 16px;display: flex;align-items: center;justify-content: space-between">
|
||||
<div>
|
||||
<span>申请信息</span>
|
||||
</div>
|
||||
<div @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>
|
||||
|
||||
<van-cell title="会员状态">{{ viewData.member ? '会员' : '非会员' }}</van-cell>
|
||||
<van-cell title="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</van-cell>
|
||||
|
||||
<van-cell title="家庭成员" class="column-cell">
|
||||
<table class="family-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">序号</th>
|
||||
<th class="table-header">与本人关系</th>
|
||||
<th class="table-header">姓名</th>
|
||||
<th class="table-header">单位</th>
|
||||
<th class="table-header">备注</th>
|
||||
</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="个人简历">
|
||||
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
|
||||
<span v-else>无数据</span>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="校工会审核信息" name="school" v-if="viewData.schoolAudit">
|
||||
<van-cell-group>
|
||||
<van-cell title="审核人员">{{ viewData.schoolAudit.username }}</van-cell>
|
||||
<van-cell title="审核时间">{{ viewData.schoolAudit.auditTime }}</van-cell>
|
||||
<van-cell title="分配工会">{{ viewData.allocationUnionName }}</van-cell>
|
||||
<van-cell title="审核意见">{{ viewData.schoolAudit.auditOpinion }}</van-cell>
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="分工会接收信息" name="branch" v-if="viewData.branchAudit">
|
||||
<van-cell-group>
|
||||
<van-cell title="审核人员">{{ viewData.branchAudit.username }}</van-cell>
|
||||
<van-cell title="审核时间">{{ viewData.branchAudit.auditTime }}</van-cell>
|
||||
<van-cell title="审核意见">{{ viewData.branchAudit.auditOpinion }}</van-cell>
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
`,
|
||||
data(){
|
||||
return{
|
||||
activeName: 'basicInfo',
|
||||
viewData: {
|
||||
schoolAudit: {},
|
||||
branchAudit: {}
|
||||
},
|
||||
|
||||
clickUpOrDown: true
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async onOpen(id){
|
||||
const resp = await $.post('/platform/member/apply/mine/findMemberApplyRecord', {id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.$emit('union-name', this.viewData.userUnionName)
|
||||
if (this.viewData.families) {
|
||||
this.viewData.families = JSON.parse(this.viewData.families)
|
||||
} else {
|
||||
this.viewData.families = []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
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: #1867b0;
|
||||
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;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.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: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的入会申请" left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></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 v-if="$auth.hasRoleOr('sysadmin, SchoolUnionMemberAdmin, BranchUnionMemberAdmin')" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unionList" @change="doSearch();flushUnits(pageForm.unionId)" 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>
|
||||
|
||||
<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="24"><span style="color: grey">工作单位:</span>{{item.unitName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span><span>{{item.unionName}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">在职状态:</span>{{item.userState}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">人员类型:</span><span>{{item.personType}}</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.stateName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<van-button size="small" @click="pjaxReplace('/platform/member/apply/submit/h5?id=' + item.id)"
|
||||
v-if="[10,30,60].includes(item.applyStateId) && item.userId == user.id"
|
||||
type="info" style="margin-right: 4px">编辑</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></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
|
||||
title="申请详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<member-apply-audit-info ref="memberApplyAuditInfoRef"></member-apply-audit-info>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/memberApplyAuditInfo.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
user: {},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
isAudit: false
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
infoShow: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-apply-audit-info': MEMBER_APPLY_AUDIT_INFO
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.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)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initUnion(unionId) {
|
||||
this.unionList = await getUnionList(unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
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)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
this.user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
if (this.$auth.hasRoleOr("sysadmin, SchoolUnionMemberAdmin")) {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.initUnion(this.user.union.id)
|
||||
await this.flushUnits(this.user.union.id)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,15 +0,0 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,359 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.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: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 7px !important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="校工会审核" left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></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="doSearch();flushUnits(pageForm.unionId)" 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="24"><span style="color: grey">工作单位:</span>{{item.unitName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span><span>{{item.unionName}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">分配工会:</span><span>{{item.allocationUnionName}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">在职状态:</span>{{item.userState}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">人员类型:</span><span>{{item.personType}}</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.stateName}}</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="[20, 70].includes(item.applyStateId)"
|
||||
@click="openApproval(item)"
|
||||
style="margin-right: 4px">审核
|
||||
</van-button>
|
||||
<van-button size="small" type="danger"
|
||||
v-if="[30, 50].includes(item.applyStateId)"
|
||||
@click="openRevoke(item.id)"
|
||||
style="margin-right: 4px">撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></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
|
||||
title="申请详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<member-apply-audit-info ref="memberApplyAuditInfoRef" @union-name="getApplyUserUnion"></member-apply-audit-info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{ '校工会审核' }}</div>
|
||||
<van-form>
|
||||
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
|
||||
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" required></van-field>
|
||||
<van-field label="当前工会" readonly name="unionName" v-model="unionName" required></van-field>
|
||||
<van-field label="分配工会" v-model="formData.unionName" readonly clickable required
|
||||
@click="unionPicker = true" placeholder="请选择分配工会"
|
||||
:rules="[{ required:true, message: '请选择分配工会' }]"></van-field>
|
||||
<van-popup v-model="unionPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="unions"
|
||||
@confirm="doSetAllocationUnion"
|
||||
@cancel="unionPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="default" block @click="infoShow=false">取消</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval(0)">拒绝申请</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval(1)">同意申请</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/memberApplyAuditInfo.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
user: {},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
audit: false
|
||||
},
|
||||
auditList: [
|
||||
{text: "已审核", value: true},
|
||||
{text: "未审核", value: false},
|
||||
],
|
||||
unions: [],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
unionPicker: false,
|
||||
|
||||
id: '',
|
||||
unionName: '',
|
||||
infoShow: false,
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-apply-audit-info': MEMBER_APPLY_AUDIT_INFO
|
||||
},
|
||||
methods: {
|
||||
doSetAllocationUnion(val){
|
||||
this.formData.unionId = val.id
|
||||
this.formData.unionName = val.unionname
|
||||
this.unionPicker = false
|
||||
},
|
||||
getApplyUserUnion(unionName){
|
||||
this.unionName = unionName
|
||||
},
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openApproval(item) {
|
||||
this.id = item.id
|
||||
this.formData.username = this.user.username
|
||||
this.formData.auditTime = moment().format('YYYY-MM-DD')
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openRevoke(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定要撤回该申请吗?'
|
||||
}).then(() => {
|
||||
$.post('/platform/member/apply/schoolUnion/audit/doRevoke', { id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async doApproval(approvalType) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见')
|
||||
return
|
||||
}
|
||||
if (!this.formData.unionId) {
|
||||
this.$toast.fail('请选择分配工会')
|
||||
return
|
||||
}
|
||||
|
||||
let msg = '确定要通过此条申请吗?'
|
||||
if (approvalType === 0) {
|
||||
msg = '拒绝后不可撤回,确定要拒绝此条申请吗?'
|
||||
} else if (approvalType === 2) {
|
||||
msg = '确定要退回此条申请吗?'
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: msg
|
||||
}).then(async () => {
|
||||
this.formData.auditType = approvalType
|
||||
const resp = await $.post('/platform/member/apply/schoolUnion/audit/approval', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
unionId: this.formData.unionId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.infoShow = false
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/member/apply/schoolUnion/audit/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)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initUnion(unionId) {
|
||||
this.unionList = await getUnionList(unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
|
||||
this.unions = this.unionList.concat()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
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)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
this.user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
if (this.$auth.hasRoleOr("sysadmin, SchoolUnionMemberAdmin")) {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.initUnion(this.user.union.id)
|
||||
await this.flushUnits(this.user.union.id)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,406 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.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 {
|
||||
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-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-cell-group>
|
||||
<van-form ref="form" @submit="doSubmit" validate-trigger="onSubmit"
|
||||
class="mt5"
|
||||
scroll-to-error
|
||||
input-align="right"
|
||||
:show-error-message="false">
|
||||
<van-field label="工号" :value="formData.loginname" readonly></van-field>
|
||||
<van-field label="姓名" :value="formData.username" readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" readonly
|
||||
@click="sexPicker = true"
|
||||
placeholder="请选择性别"
|
||||
clickable></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男','女']"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
@cancel="sexPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field label="民族" v-model="formData.nation" readonly clickable
|
||||
@click="nationPicker = true" placeholder="请选择民族"
|
||||
:rules="[{ required:true, message: '请选择民族' }]"></van-field>
|
||||
<van-popup v-model="nationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="nationColumns"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
@cancel="nationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.birthday"
|
||||
label="出生年月"
|
||||
is-link
|
||||
@click="datePicker = true"
|
||||
:rules="[{ required: true, message: '请填写出生年月' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="datePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="new Date(1900, 0, 1)"
|
||||
:max-date="new Date()"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="datePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-field label="政治面貌" v-model="formData.political" readonly clickable
|
||||
@click="politicalPicker = true" placeholder="请选择政治面貌"
|
||||
:rules="[{ required:true, message: '请选择政治面貌' }]"></van-field>
|
||||
<van-popup v-model="politicalPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="politicalColumns"
|
||||
@confirm="(v)=>{formData.political = v;politicalPicker = false}"
|
||||
@cancel="politicalPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field label="学历" v-model="formData.education" readonly clickable
|
||||
@click="educationPicker = true" placeholder="请选择学历"
|
||||
:rules="[{ required:true, message: '请选择学历' }]"></van-field>
|
||||
<van-popup v-model="educationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="educationColumns"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
@cancel="educationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field label="学位" v-model="formData.academicDegree" readonly clickable
|
||||
@click="academicDegreePicker = true" placeholder="请选择学位"
|
||||
:rules="[{ required:true, message: '请选择学位' }]"></van-field>
|
||||
<van-popup v-model="academicDegreePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="academicDegreeColumns"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
@cancel="academicDegreePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field label="党政职务" v-model="formData.position"
|
||||
placeholder="请填写党政职务"
|
||||
:rules="[{ required:true, message: '请填写党政职务' }]"></van-field>
|
||||
|
||||
|
||||
<van-field label="工作单位" :value="formData.unitName" readonly></van-field>
|
||||
<van-field label="所属工会" :value="formData.unionName" readonly></van-field>
|
||||
<van-field label="所属校区" v-model="formData.campus" readonly clickable
|
||||
@click="campusPicker = true" placeholder="请选择所属校区"
|
||||
:rules="[{ required:true, message: '请选择所属校区' }]"></van-field>
|
||||
<van-popup v-model="campusPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="campusColumns"
|
||||
@confirm="(v)=>{formData.campus = v;campusPicker = false}"
|
||||
@cancel="campusPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field label="在职状态" :value="formData.userState" readonly></van-field>
|
||||
<van-field label="人员类型" :value="formData.personType" readonly></van-field>
|
||||
|
||||
<van-field label="身份证号码" v-model="formData.idCard" placeholder="请输入身份证号码"
|
||||
:rules="[{ pattern :/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '身份证号码格式错误' }]"></van-field>
|
||||
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请输入联系电话"
|
||||
:rules="[{ pattern :/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, message: '联系电话格式错误' }]"></van-field>
|
||||
<van-field label="电子邮箱" v-model="formData.email" placeholder="请输入电子邮箱"
|
||||
:rules="[{ pattern :/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, message: '邮箱格式错误' }]"></van-field>
|
||||
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div style="width: 100%">
|
||||
<span style="margin-left: -15px">家庭主要成员及联系方式</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="vita"
|
||||
v-model="formData.vita"
|
||||
class="direction-column-field">
|
||||
<template #input>
|
||||
<text-editor style="z-index: 1" v-model="formData.vita"></text-editor>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div v-if="!user.member" style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block v-if="formData.id" type="default" @click.submit="pjaxReplace('/platform/member/apply/mine/h5')">返 回</van-button>
|
||||
<van-button block type="info" @click="doSave">保存申请</van-button>
|
||||
<van-button block type="info" @click="doSubmit">提交申请</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
dicts:['USER_NATION', 'USER_POLITICAL', 'USER_EDUCATION','USER_ACADEMIC_DEGREE', 'USER_CAMPUS'],
|
||||
data() {
|
||||
return{
|
||||
id: GetQueryString('id'),
|
||||
formData: {
|
||||
families: [],
|
||||
},
|
||||
user: {},
|
||||
sexPicker: false,
|
||||
nationPicker: false,
|
||||
datePicker: false,
|
||||
politicalPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
campusPicker: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSave(){
|
||||
this.$dialog.confirm({
|
||||
title: "保存",
|
||||
message: "保存后可在我的申请里面再次编辑,您确定要保存吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(async () => {
|
||||
const formData = this.formData
|
||||
if (this.formData.families) {
|
||||
formData.families = JSON.stringify(this.formData.families)
|
||||
}
|
||||
const resp = await $.post('/platform/member/apply/submit/doSave', formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('操作成功')
|
||||
this.user.member = true
|
||||
pjaxReplace('/platform/member/apply/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSubmit(){
|
||||
this.$dialog.confirm({
|
||||
title: "保存",
|
||||
message: "提交后将进入审核流程,无法再进行编辑,您确定要提交申请吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(async () => {
|
||||
const formData = this.formData
|
||||
if (this.formData.families) {
|
||||
formData.families = JSON.stringify(this.formData.families)
|
||||
}
|
||||
const resp = await $.post('/platform/member/apply/submit/doSubmit', formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('操作成功')
|
||||
this.user.member = true
|
||||
pjaxReplace('/platform/member/apply/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
onDateConfirm(value) {
|
||||
this.formData.birthday = value;
|
||||
this.showDatePicker = false;
|
||||
},
|
||||
async validateApply() {
|
||||
if (this.id) {
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platform/member/apply/submit/validateApply')
|
||||
if (resp.code === 0 && resp.data > 0) {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您有其他入会流程正在进行中,请勿重复申请,如需查看详情,可前往我的申请界面,是否前往?',
|
||||
})
|
||||
.then(() => {
|
||||
this.user.member = true
|
||||
pjaxReplace('/platform/member/apply/mine/h5')
|
||||
})
|
||||
.catch(() => {
|
||||
this.user.member = true
|
||||
})
|
||||
}
|
||||
},
|
||||
init(){
|
||||
this.user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
if (this.user.member) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您已是会员,请勿重复入会',
|
||||
})
|
||||
}
|
||||
if (this.id) {
|
||||
$.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const {
|
||||
id,
|
||||
username,
|
||||
loginname,
|
||||
sex,
|
||||
nation,
|
||||
birthday,
|
||||
political,
|
||||
education,
|
||||
academicDegree,
|
||||
position,
|
||||
unit,
|
||||
union,
|
||||
campus,
|
||||
userState,
|
||||
personType,
|
||||
idCard,
|
||||
mobile,
|
||||
email,
|
||||
families,
|
||||
vita
|
||||
} = this.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 : null)
|
||||
this.$set(this.formData, "unitId", unit ? unit.id : null)
|
||||
this.$set(this.formData, "unionName", union ? union.unionname : null)
|
||||
this.$set(this.formData, "unionId", union ? union.id : null)
|
||||
|
||||
this.$set(this.formData, "mobile", mobile)
|
||||
this.$set(this.formData, "email", email)
|
||||
this.$set(this.formData, "families", families ? families : [])
|
||||
this.$set(this.formData, "vita", vita)
|
||||
}
|
||||
},
|
||||
},
|
||||
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 []
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
this.init()
|
||||
await this.validateApply()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,81 @@
|
||||
const MEMBER_INFO_H5 = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-cell-group>
|
||||
<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>
|
||||
|
||||
<van-cell title="会员状态">{{ viewData.member ? '会员' : '非会员' }}</van-cell>
|
||||
<van-cell title="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</van-cell>
|
||||
|
||||
<van-cell title="家庭成员收入" class="column-cell">
|
||||
<table class="family-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">序号</th>
|
||||
<th class="table-header">与本人关系</th>
|
||||
<th class="table-header">姓名</th>
|
||||
<th class="table-header">单位</th>
|
||||
<th class="table-header">备注</th>
|
||||
</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.name }}</td>
|
||||
<td class="table-cell">{{ item.age }}</td>
|
||||
<td class="table-cell">{{ item.relation }}</td>
|
||||
<td class="table-cell">{{ item.monthlyIncome }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell>
|
||||
<van-cell title="个人简历">
|
||||
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
|
||||
<span v-else>无数据</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
`,
|
||||
data(){
|
||||
return{
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(userId){
|
||||
$.post('/platform/member/common/fetchMemberUserById', {userId})
|
||||
.then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -53,8 +53,17 @@
|
||||
<!--字典混入-->
|
||||
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
<!--富文本编辑器-->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wangeditor/wangEditor.css">
|
||||
<script src="${base!}/assets/platform/plugins/wangeditor/wangEditor.js"></script>
|
||||
|
||||
<!-- 鉴权 -->
|
||||
<script src="${base!}/assets/platform/js/util/commonUtil.js"></script>
|
||||
<script>
|
||||
Vue.component('mobile-sign', httpVueLoader('/components/sign/mobileSign.vue'))
|
||||
Vue.component("text-editor", httpVueLoader("/components/plugins/TextEditor.vue?v=" + new Date().getTime()))
|
||||
|
||||
Vue.prototype.$auth = commonUtil.authService()
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user