commit
This commit is contained in:
@@ -19,6 +19,7 @@ layout("/mobile/platform.html"){
|
||||
@click="sexPicker = true"
|
||||
placeholder="请选择性别"
|
||||
clickable
|
||||
:rules="[{ required:true, message: '请选择性别' }]"
|
||||
left-icon="ellipsis"></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
@@ -55,89 +56,66 @@ layout("/mobile/platform.html"){
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="学位" v-model="formData.academicDegree" readonly clickable
|
||||
left-icon="comment-o"
|
||||
@click="academicDegreePicker = true" placeholder="请选择学位"
|
||||
:rules="[{ required:true, message: '请选择学位' }]"></van-field>
|
||||
<van-popup v-model="academicDegreePicker" position="bottom">
|
||||
<van-field label="政治面貌" v-model="formData.political" readonly clickable
|
||||
left-icon="label-o"
|
||||
@click="politicalPicker = true" placeholder="请选择政治面貌"
|
||||
:rules="[{ required:true, message: '请选择政治面貌' }]"></van-field>
|
||||
<van-popup v-model="politicalPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="academicDegreeColumns"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
@cancel="academicDegreePicker = false"
|
||||
:columns="politicalColumns"
|
||||
@confirm="(v)=>{formData.political = v;politicalPicker = false}"
|
||||
@cancel="politicalPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="婚否" v-model="formData.marriage" readonly clickable
|
||||
left-icon="flower-o"
|
||||
@click="marriagePicker = true" placeholder="请选择婚否"
|
||||
:rules="[{ required:true, message: '请选择婚否' }]"></van-field>
|
||||
<van-popup v-model="marriagePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="marriageColumns"
|
||||
@confirm="(v)=>{formData.marriage = v;marriagePicker = false}"
|
||||
@cancel="marriagePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" v-model="formData.political" placeholder="请填写政治面貌"
|
||||
left-icon="label-o"
|
||||
:rules="[{ required:true, message: '请填写政治面貌' }]"></van-field>
|
||||
<van-field label="身份证" v-model="formData.idcard" placeholder="请填写身份证号码"
|
||||
left-icon="idcard"
|
||||
:rules="[{ required:true, message: '请填写身份证号码' }]"></van-field>
|
||||
:rules="[{ required:true, message: '请填写身份证号码' },{pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证号码格式错误'}]"></van-field>
|
||||
|
||||
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请填写联系电话"
|
||||
left-icon="phone-o"
|
||||
:rules="[{ required:true, message: '请填写联系电话' }]"></van-field>
|
||||
</van-cell-group>
|
||||
:rules="[{ required:true, message: '请填写联系电话' },{pattern: /^1[3456789]\d{9}$/, message: '联系电话格式错误'}]"></van-field>
|
||||
|
||||
<van-field label="所属单位" v-model="formData.unitname" readonly clickable
|
||||
left-icon="flower-o"
|
||||
@click="unitPicker = true" placeholder="请选择所属单位"
|
||||
:rules="[{ required:true, message: '请选择所属单位' }]"></van-field>
|
||||
<van-popup v-model="unitPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
value-key="name"
|
||||
:columns="unitColumns"
|
||||
@confirm="(v)=>{formData.unitname = v.name;formData.unitid = v.id;unitPicker = false}"
|
||||
@cancel="unitPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="户口所在地" v-model="formData.registeredResidence" placeholder="请填写户口所在地"
|
||||
left-icon="wap-home-o"
|
||||
:rules="[{ required:true, message: '请填写户口所在地' }]"></van-field>
|
||||
<van-field label="现居住地" v-model="formData.homeAddress" placeholder="请填写现居住地"
|
||||
left-icon="home-o"
|
||||
:rules="[{ required:true, message: '请填写现居住地' }]"></van-field>
|
||||
<van-field label="工作单位" value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
left-icon="cluster-o"
|
||||
readonly></van-field>
|
||||
<van-field label="职务" v-model="formData.position" placeholder="请填写职务"
|
||||
<!-- <van-field label="工作单位" value="${@shiro.getPrincipalProperty('unit').getName()}"-->
|
||||
<!-- left-icon="cluster-o"-->
|
||||
<!-- readonly></van-field>-->
|
||||
<van-field label="岗位" placeholder="请填写岗位" v-model="formData.jobTitle"
|
||||
left-icon="debit-pay"
|
||||
:rules="[{ required:true, message: '请填写职务' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button v-if="family && family.length>0 && family.length<3" style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div v-for="o,i in family" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="family.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.mobile" type="tel" 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="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
:rules="[{ required:true, message: '请填写岗位' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
@@ -147,14 +125,14 @@ layout("/mobile/platform.html"){
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
<span>工作经历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
v-model="formData.vita"
|
||||
:rules="[{ required:true, message: '请填写个人工作简历' }]"
|
||||
:rules="[{ required:true, message: '请填写工作经历' }]"
|
||||
style="padding: 0"
|
||||
input-align="left"
|
||||
autosize
|
||||
@@ -162,7 +140,7 @@ layout("/mobile/platform.html"){
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
placeholder="请输入工作经历"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
@@ -176,7 +154,7 @@ layout("/mobile/platform.html"){
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
<span>有何特长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -197,9 +175,84 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10" inset>
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign :my_sign.sync="formData.sign" ref="signature"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭成员</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button v-if="formData.family && formData.family.length>0 && formData.family.length<3"
|
||||
style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="formData.family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="formData.family && formData.family.length>0">
|
||||
<div v-for="o,i in formData.family" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="formData.family.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 name="isCondolence" label="是否慰问">
|
||||
<template #input>
|
||||
<van-radio-group v-model="o.isCondolence" direction="horizontal">
|
||||
<van-radio name="是">是</van-radio>
|
||||
<van-radio name="否">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="慰问时间" v-model="o.condolenceTime"
|
||||
placeholder="请选择慰问时间" @click="doShowCondolenceCalendar(i)"></van-field>
|
||||
<van-calendar v-model="condolenceShow" :min-date="new Date('1999-01-01')" :show-confirm="false"
|
||||
@confirm="condolenceConfirm"></van-calendar>
|
||||
<van-field label="备注" v-model="o.remark" type="tel" placeholder="请填写备注"></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.family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
<van-button
|
||||
:disabled="!(unionInfo.apply||unionInfo.reApply)"
|
||||
native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
<span v-if="unionInfo.apply||unionInfo.reApply">{{unionInfo.reApply?'重新申请':'申请加入'}}</span>
|
||||
<span v-else-if="unionInfo.record">{{unionInfo.record.stateName}}</span>
|
||||
<span v-else>您已是会员</span>
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
@@ -212,16 +265,14 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unionInfo: {},
|
||||
sexPicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
educationColumns: [
|
||||
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
],
|
||||
educationColumns: [],
|
||||
academicDegreeColumns: [
|
||||
'学士', '硕士', '博士'
|
||||
],
|
||||
@@ -231,30 +282,83 @@ layout("/mobile/platform.html"){
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null
|
||||
memberStatus: null,
|
||||
politicalPicker: false,
|
||||
politicalColumns: [],
|
||||
marriagePicker: false,
|
||||
marriageColumns: [],
|
||||
unitPicker: false,
|
||||
unitColumns: [],
|
||||
condolenceShow: false,
|
||||
familyIndex: null,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
doShowCondolenceCalendar(index){
|
||||
console.log(index)
|
||||
this.condolenceShow = true
|
||||
this.familyIndex = index
|
||||
},
|
||||
condolenceConfirm(val){
|
||||
if (val) {
|
||||
this.formData.family[this.familyIndex].condolenceTime = moment(val).format('YYYY-MM-DD')
|
||||
this.condolenceShow = false
|
||||
this.familyIndex = null
|
||||
}
|
||||
console.log(val)
|
||||
},
|
||||
async doSubmit() {
|
||||
this.$refs.signature.submitSign()
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签字')
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()
|
||||
const formData = clone(this.formData)
|
||||
formData.family = JSON.stringify(this.family)
|
||||
formData.family = JSON.stringify(this.formData.family)
|
||||
const loading = this.$toast.loading({
|
||||
message: '数据提交中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
const data = await $.get("/platform/member/apply/submit/doApply", {memberStates: 1})
|
||||
const data = await $.post("/platform/member/apply/submit/doApply", {
|
||||
memberStates: 1,
|
||||
sign: formData.sign,
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
loading.close()
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
async getUnionInfo() {
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
if (resp.code === 0) {
|
||||
this.unionInfo = resp.data
|
||||
this.formData = resp.data
|
||||
this.$set(this.formData, "family", resp.data.family ? JSON.parse(resp.data.family) : [])
|
||||
this.formData = resp.data
|
||||
} else {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" === '未知') {
|
||||
this.$set(this.formData, "sex", '')
|
||||
} else {
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
}
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "marriage", "${@shiro.getPrincipalProperty('marriage')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
|
||||
@@ -266,25 +370,21 @@ layout("/mobile/platform.html"){
|
||||
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
|
||||
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
|
||||
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
|
||||
// const {data} = await $.get("/mobile/member/getAllNation");
|
||||
/* this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
}) */
|
||||
this.$set(this.formData, "jobTitle", "${@shiro.getPrincipalProperty('jobTitle')}")
|
||||
this.$set(this.formData, "unitname", "${@shiro.getPrincipalProperty('unit').getName()}")
|
||||
this.$set(this.formData, "unitid", "${@shiro.getPrincipalProperty('unit').getId()}")
|
||||
this.nationColumns = nation
|
||||
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
if (resp.data.member === 1) {
|
||||
this.memberStatus = this.memberStatusColumn.MEMBER
|
||||
} else {
|
||||
if (resp.data.record != null) {
|
||||
this.memberStatus = this.memberStatusColumn.APPLYING
|
||||
} else {
|
||||
this.memberStatus = this.memberStatusColumn.NOTMEBMER
|
||||
}
|
||||
}
|
||||
const education = await getDictByCode('Education')
|
||||
this.educationColumns = education.map(o => o.code)
|
||||
const political = await getDictByCode('political')
|
||||
this.politicalColumns = political.map(o => o.code)
|
||||
const marriage = await getDictByCode('maritalStatus')
|
||||
this.marriageColumns = marriage.map(o => o.code)
|
||||
|
||||
this.unitColumns = await getUnionUnits()
|
||||
|
||||
await this.getUnionInfo()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -298,10 +398,6 @@ layout("/mobile/platform.html"){
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
@@ -309,4 +405,4 @@ layout("/mobile/platform.html"){
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
Reference in New Issue
Block a user