增加内容
This commit is contained in:
parent
f7642e3a0a
commit
e74f4910fa
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="person_itm">
|
<view class="person_itm">
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('姓名','谢家星')">
|
||||||
<text class="person_itm_sign_tit">姓名</text>
|
<text class="person_itm_sign_tit">姓名</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>谢家星</text>
|
<text>谢家星</text>
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('性别','男')">
|
||||||
<text class="person_itm_sign_tit">性别</text>
|
<text class="person_itm_sign_tit">性别</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>男</text>
|
<text>男</text>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('出生日期','1997/02/01')">
|
||||||
<text class="person_itm_sign_tit">出生日期</text>
|
<text class="person_itm_sign_tit">出生日期</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>1997/02/01</text>
|
<text>1997/02/01</text>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('身份证号码','41852199825252651')">
|
||||||
<text class="person_itm_sign_tit">身份证号码</text>
|
<text class="person_itm_sign_tit">身份证号码</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>41852199825252651</text>
|
<text>41852199825252651</text>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
|
|
||||||
<view class="person_itm">
|
<view class="person_itm">
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('民族','汉族')">
|
||||||
<text class="person_itm_sign_tit">民族</text>
|
<text class="person_itm_sign_tit">民族</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>汉族</text>
|
<text>汉族</text>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('籍贯','宁波')">
|
||||||
<text class="person_itm_sign_tit">籍贯</text>
|
<text class="person_itm_sign_tit">籍贯</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>宁波</text>
|
<text>宁波</text>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('政治面貌','党员')">
|
||||||
<text class="person_itm_sign_tit">政治面貌</text>
|
<text class="person_itm_sign_tit">政治面貌</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>党员</text>
|
<text>党员</text>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
|
|
||||||
<view class="person_itm">
|
<view class="person_itm">
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('联系电话','13888888888')">
|
||||||
<text class="person_itm_sign_tit">联系电话</text>
|
<text class="person_itm_sign_tit">联系电话</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>13888888888</text>
|
<text>13888888888</text>
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('头像','头像地址')">
|
||||||
<text class="person_itm_sign_tit">头像</text>
|
<text class="person_itm_sign_tit">头像</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<image style="width: 80rpx; height: 80rpx;" src="../../static/RewardWork/avator.png" mode="">
|
<image style="width: 80rpx; height: 80rpx;" src="../../static/RewardWork/avator.png" mode="">
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm">
|
<view class="person_itm">
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('所属协会','协会名称')">
|
||||||
<text class="person_itm_sign_tit">所属协会</text>
|
<text class="person_itm_sign_tit">所属协会</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>协会名称</text>
|
<text>协会名称</text>
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('入会时间','2022/02/01')">
|
||||||
<text class="person_itm_sign_tit">入会时间</text>
|
<text class="person_itm_sign_tit">入会时间</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>2022/02/01</text>
|
<text>2022/02/01</text>
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 文艺人才-个人中心 -->
|
<!-- 文艺人才-个人中心 -->
|
||||||
<view class="person_itm">
|
<view class="person_itm">
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('人才类型','书法家')">
|
||||||
<text class="person_itm_sign_tit">人才类型</text>
|
<text class="person_itm_sign_tit">人才类型</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>书法家</text>
|
<text>书法家</text>
|
||||||
|
@ -143,11 +143,11 @@
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<!-- <text>2022/02/01</text> -->
|
<!-- <text>2022/02/01</text> -->
|
||||||
<!-- <u-icon name="arrow-right"></u-icon> -->
|
<!-- <u-icon name="arrow-right"></u-icon> -->
|
||||||
<u-switch v-model="isJioned" activeColor="#99241B" size=20></u-switch>
|
<u-switch disabled v-model="isJioned" activeColor="#99241B" size=20></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('入会时间','2022/02/01')">
|
||||||
<text class="person_itm_sign_tit">入会时间</text>
|
<text class="person_itm_sign_tit">入会时间</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>2022/02/01</text>
|
<text>2022/02/01</text>
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 服务商个人中心 -->
|
<!-- 服务商个人中心 -->
|
||||||
<view class="person_itm">
|
<view class="person_itm">
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('服务名称','服务名称')">
|
||||||
<text class="person_itm_sign_tit">服务名称</text>
|
<text class="person_itm_sign_tit">服务名称</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>服务名称</text>
|
<text>服务名称</text>
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('地址','宁波象山县')" >
|
||||||
<text class="person_itm_sign_tit">地址</text>
|
<text class="person_itm_sign_tit">地址</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>地址</text>
|
<text>地址</text>
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
|
|
||||||
|
|
||||||
<view class="person_itm">
|
<view class="person_itm">
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('负责人姓名','王一')">
|
||||||
<text class="person_itm_sign_tit">负责人姓名</text>
|
<text class="person_itm_sign_tit">负责人姓名</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>王一</text>
|
<text>王一</text>
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign"@click="goChangeInfo('服务时间','2022/02/01')">
|
||||||
<text class="person_itm_sign_tit">服务时间</text>
|
<text class="person_itm_sign_tit">服务时间</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>2022/02/01</text>
|
<text>2022/02/01</text>
|
||||||
|
@ -208,7 +208,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="person_itm_sign">
|
<view class="person_itm_sign" @click="goChangeInfo('电话','13888888888')">
|
||||||
<text class="person_itm_sign_tit">电话</text>
|
<text class="person_itm_sign_tit">电话</text>
|
||||||
<view class="person_itm_sign_right">
|
<view class="person_itm_sign_right">
|
||||||
<text>13888888888</text>
|
<text>13888888888</text>
|
||||||
|
@ -226,6 +226,15 @@
|
||||||
return {
|
return {
|
||||||
isJioned: true
|
isJioned: true
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
goChangeInfo(k,v){
|
||||||
|
console.log(k,v);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/PersonalCenter/ReEditSingleInfo?key=${k}&value=${v}`
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,22 +1,69 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
|
||||||
<u--form :model="model1" ref="form1" labelPosition="top" labelWidth='auto'
|
<u--form :model="model1" ref="form1">
|
||||||
:labelStyle='{fontWeight:800}'>
|
|
||||||
<u-form-item prop="userInfo.name" ref="item1" class="data_itm">
|
|
||||||
|
|
||||||
<u--input class="p32" placeholder="请填写姓名" clearable v-model="model1.userInfo.name" border="none">
|
<u-form-item prop="userInfo.EdValue" ref="item1" class="data_itm" v-if="model1.userInfo.Edkey=='姓名'||model1.userInfo.Edkey=='负责人姓名'||model1.userInfo.Edkey=='服务名称'||model1.userInfo.Edkey=='地址'||model1.userInfo.Edkey=='协会名称'">
|
||||||
|
<u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none"
|
||||||
|
@blur="CheckValue" @clear="clearFun">
|
||||||
</u--input>
|
</u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<view class="sex" style="background-color: #FFFFFF;" v-if="model1.userInfo.Edkey=='性别'">
|
||||||
|
<u-radio-group v-model="model1.userInfo.Edvalue" iconPlacement="right"
|
||||||
|
:customStyle="{margin: '16px',backgroundColor: '#FFFFFF'}" placement="column" :borderBottom="true">
|
||||||
|
<u-radio activeColor="red" name="男" label="男"></u-radio>
|
||||||
|
<u-radio activeColor="red" name="女" label="女"></u-radio>
|
||||||
|
</u-radio-group>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="date" @click="DatePicker" v-if="model1.userInfo.Edkey=='出生日期'||model1.userInfo.Edkey=='入会时间'||model1.userInfo.Edkey=='服务时间'">
|
||||||
|
<u--input class="p32" readonly v-model="model1.userInfo.Edvalue" border="none">
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<!-- 政治面貌 民族 籍贯 选择 input-->
|
||||||
|
<view class="select" @click="zhengzhiShow=true "
|
||||||
|
v-if="model1.userInfo.Edkey=='政治面貌'||model1.userInfo.Edkey=='民族'||model1.userInfo.Edkey=='籍贯'||model1.userInfo.Edkey=='人才类型'">
|
||||||
|
<u--input class="p32" readonly v-model="model1.userInfo.Edvalue" border="none">
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<!-- 政治面貌 民族 籍贯 选择 input ed-->
|
||||||
|
<!-- 身份证号码 -->
|
||||||
|
<view class="creat_id" v-if="model1.userInfo.Edkey=='身份证号码'">
|
||||||
|
<u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none"
|
||||||
|
@blur="CheckId" >
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<!-- 身份证号码 ed -->
|
||||||
|
<!--phone number -->
|
||||||
|
<view class="phoneNumber" v-if="model1.userInfo.Edkey=='联系电话'||model1.userInfo.Edkey=='电话'">
|
||||||
|
<u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none"
|
||||||
|
@blur="CheckNumber" >
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<!--phone number ed-->
|
||||||
|
|
||||||
|
|
||||||
|
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @confirm="confimZheng" immediateChange
|
||||||
|
closeOnClickOverlay @close="zhengzhiClose" @cancel="zhengzhiClose"
|
||||||
|
:columns="model1.userInfo.Edkey=='政治面貌'? zhengzhiShow : model1.userInfo.Edkey =='民族' ? Zucolumns : model1.userInfo.Edkey=='籍贯' ? Jicolumns : model1.userInfo.Edkey=='人才类型'? peopleSkillColums:[]">
|
||||||
|
</u-picker>
|
||||||
|
|
||||||
|
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday"
|
||||||
|
:value="model1.userInfo.Edvalue" mode="date" closeOnClickOverlay @confirm="birthdayConfirm"
|
||||||
|
@cancel="birthdayClose" @close="birthdayClose"></u-datetime-picker>
|
||||||
<!-- #D5D4D6 -->
|
<!-- #D5D4D6 -->
|
||||||
<u-button class="custom-style"
|
<u-button class="custom-style" :disabled='isSubmit'
|
||||||
style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx; width: calc(100% - 96rpx);"
|
style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx; width: calc(100% - 96rpx);"
|
||||||
type="default" @click="submit">保存</u-button>
|
type="default" @click="submit()">保存</u-button>
|
||||||
<!-- <view class="operation">
|
|
||||||
<button type="default" class="next" @click="submit">保存</button>
|
|
||||||
</view> -->
|
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -24,162 +71,162 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showBirthday: false,
|
||||||
|
isSubmit: true,
|
||||||
|
tempValue: '',
|
||||||
|
zhengzhiShow: false,
|
||||||
model1: {
|
model1: {
|
||||||
userInfo: {
|
userInfo: {
|
||||||
name: '',
|
Edkey: '',
|
||||||
sex: '',
|
Edvalue: '',
|
||||||
birthday: "",
|
}
|
||||||
idCOde: '',
|
|
||||||
zuValue: '',
|
|
||||||
zhengzhiValue: '',
|
|
||||||
phoneNum: '',
|
|
||||||
meeting: '',
|
|
||||||
meetingTime: '',
|
|
||||||
ServerName: '',
|
|
||||||
Address: '',
|
|
||||||
serverInstrutor: '', //服务介绍
|
|
||||||
serveTime: '',
|
|
||||||
DutyPeopleName: '', //负责人名称
|
|
||||||
ServephoneNum: '', //服务商电话
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
Zhengcolumns: [
|
||||||
|
["群众", "党员", '共青团员'],
|
||||||
|
],
|
||||||
|
Zucolumns: [
|
||||||
|
["汉族", "朝鲜族"],
|
||||||
|
],
|
||||||
|
|
||||||
|
Jicolumns: [
|
||||||
|
["河南", "浙江", '上海', '宁波'],
|
||||||
|
], peopleSkillColums: [
|
||||||
|
["书法家", "画家", "雕塑家"]
|
||||||
|
],
|
||||||
// 校验规则
|
// 校验规则
|
||||||
rules: {
|
rules: {
|
||||||
'userInfo.serverInstrutor': [{
|
'userInfo.Edvalue': [{
|
||||||
type: 'string',
|
|
||||||
required: true,
|
required: true,
|
||||||
message: '请填写服务内容介绍',
|
message: '不能为空',
|
||||||
trigger: ['blur', 'change']
|
|
||||||
}],
|
|
||||||
'userInfo.Address': [{
|
|
||||||
type: 'string',
|
|
||||||
required: true,
|
|
||||||
message: '请填写地址',
|
|
||||||
trigger: ['blur', 'change']
|
|
||||||
}],
|
|
||||||
'userInfo.name': [{
|
|
||||||
type: 'string',
|
|
||||||
required: true,
|
|
||||||
message: '请填写姓名',
|
|
||||||
trigger: ['blur', 'change']
|
trigger: ['blur', 'change']
|
||||||
}, {
|
}, {
|
||||||
// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
|
// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
|
// 调用uView自带的js验证规则,详见:
|
||||||
return uni.$u.test.chinese(value);
|
return uni.$u.test.isEmpty(value);
|
||||||
},
|
},
|
||||||
message: "姓名必须为中文",
|
message: "不能为空",
|
||||||
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
|
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
|
||||||
trigger: ["change", "blur"],
|
trigger: ["change", "blur"],
|
||||||
}],
|
}],
|
||||||
'userInfo.meeting': [{
|
|
||||||
type: 'string',
|
|
||||||
required: true,
|
|
||||||
message: '请填写协会名',
|
|
||||||
trigger: ['blur', 'change']
|
|
||||||
}],
|
|
||||||
'userInfo.sex': {
|
|
||||||
type: 'string',
|
|
||||||
max: 1,
|
|
||||||
required: true,
|
|
||||||
message: '请选择男或女',
|
|
||||||
trigger: ['blur', 'change']
|
|
||||||
},
|
|
||||||
'userInfo.idCOde': [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入身份证号号',
|
|
||||||
trigger: ['change', 'blur'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 自定义验证函数,见上说明
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
return uni.$u.test.idCard(value);
|
|
||||||
},
|
|
||||||
message: '身份证号码格式不正确',
|
|
||||||
|
|
||||||
trigger: ['change', 'blur'],
|
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"userInfo.phoneNum": [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入联系电话',
|
|
||||||
trigger: ['change', 'blur'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
return uni.$u.test.mobile(value);
|
|
||||||
},
|
|
||||||
message: '手机号码不正确',
|
|
||||||
trigger: ['change', 'blur'],
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"userInfo.ServephoneNum": [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入联系电话',
|
|
||||||
trigger: ['change', 'blur'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
return uni.$u.test.mobile(value);
|
|
||||||
},
|
|
||||||
message: '手机号码不正确',
|
|
||||||
trigger: ['change', 'blur'],
|
|
||||||
}
|
|
||||||
],
|
|
||||||
'userInfo.ServerName': [{
|
|
||||||
type: 'string',
|
|
||||||
required: true,
|
|
||||||
message: '请填写姓名',
|
|
||||||
trigger: ['blur', 'change']
|
|
||||||
}, {
|
|
||||||
// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
|
|
||||||
return uni.$u.test.chinese(value);
|
|
||||||
},
|
|
||||||
message: "姓名必须为中文",
|
|
||||||
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
|
|
||||||
trigger: ["change", "blur"],
|
|
||||||
}],
|
|
||||||
'userInfo.DutyPeopleName': [{
|
|
||||||
type: 'string',
|
|
||||||
required: true,
|
|
||||||
message: '请填写姓名',
|
|
||||||
trigger: ['blur', 'change']
|
|
||||||
}, {
|
|
||||||
// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
|
|
||||||
return uni.$u.test.chinese(value);
|
|
||||||
},
|
|
||||||
message: "姓名必须为中文",
|
|
||||||
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
|
|
||||||
trigger: ["change", "blur"],
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
// 校验规则ed
|
// 校验规则ed
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
submit() {
|
|
||||||
this.$refs.form1.validate().then(res => {
|
|
||||||
uni.$u.toast('Thanks your helping')
|
|
||||||
}).catch(errors => {
|
|
||||||
uni.$u.toast('您的资料还未补充完整')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(opt) {
|
onLoad(opt) {
|
||||||
console.log(opt);
|
console.log(opt);
|
||||||
|
this.model1.userInfo.Edkey = opt.key
|
||||||
|
this.model1.userInfo.Edvalue = opt.value
|
||||||
|
this.tempValue = opt.value
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: opt.key
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onReady() {
|
onReady() {
|
||||||
|
|
||||||
this.$refs.form1.setRules(this.rules);
|
this.$refs.form1.setRules(this.rules);
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
CheckId() {
|
||||||
|
var value = this.model1.userInfo.Edvalue
|
||||||
|
const reg =
|
||||||
|
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
||||||
|
if (reg.test(value) === false && value) {
|
||||||
|
this.isSubmit=true
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: '请输入正确格式的身份证号码',
|
||||||
|
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.isSubmit = false
|
||||||
|
console.log('身份证号码格式正确')
|
||||||
|
}
|
||||||
|
},CheckNumber(){
|
||||||
|
var tele = this.model1.userInfo.Edvalue
|
||||||
|
let reg = /^[1][3,4,5,7,8,9][0-9]{9}$/ //正则表达式定义手机号正确格式
|
||||||
|
if (!tele) { //判断如果手机号(this.tele)为空,提示用户输入手机号
|
||||||
|
this.isSubmit=true
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入手机号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!reg.test(tele)) { //判断手机号格式时候正确
|
||||||
|
this.isSubmit=true
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入正确的手机号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.isSubmit=false
|
||||||
|
},
|
||||||
|
zhengzhiClose() {
|
||||||
|
this.zhengzhiShow = false
|
||||||
|
},
|
||||||
|
confimZheng(e) {
|
||||||
|
this.zhengzhiShow = false
|
||||||
|
this.model1.userInfo.Edvalue = e.value[0]
|
||||||
|
},
|
||||||
|
DatePicker() {
|
||||||
|
this.showBirthday = true
|
||||||
|
|
||||||
|
},
|
||||||
|
birthdayClose() {
|
||||||
|
this.showBirthday = false
|
||||||
|
|
||||||
|
},
|
||||||
|
birthdayConfirm(e) {
|
||||||
|
this.showBirthday = false
|
||||||
|
|
||||||
|
this.model1.userInfo.Edvalue = uni.$u.timeFormat(e.value, 'yyyy/mm/dd')
|
||||||
|
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
|
||||||
|
|
||||||
|
/* this.$refs.form1.validate().then(res => {
|
||||||
|
uni.$u.toast('Thanks your helping')
|
||||||
|
}).catch(errors => {
|
||||||
|
uni.$u.toast('您的资料还未补充完整')
|
||||||
|
}) */
|
||||||
|
|
||||||
|
/* uni.navigateBack({
|
||||||
|
delta:1
|
||||||
|
}) */
|
||||||
|
},
|
||||||
|
CheckValue() {
|
||||||
|
// console.log("event",event);
|
||||||
|
// console.log("dddd",this.model1.userInfo.Edkey);
|
||||||
|
if (this.model1.userInfo.Edkey) {
|
||||||
|
|
||||||
|
// uni.$u.toast('不能为空')
|
||||||
|
// console.log(this.tempValue);
|
||||||
|
|
||||||
|
// this.model1.userInfo.Edvalue=this.tempValue
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearFun() {
|
||||||
|
console.log("清空");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'model1.userInfo.Edvalue': function(n, o) {
|
||||||
|
console.log("n", n);
|
||||||
|
if (!n) {
|
||||||
|
// console.log(this);
|
||||||
|
uni.$u.toast('不能为空')
|
||||||
|
// this.model1.userInfo.Edvalue = this.tempValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -188,6 +235,14 @@
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sexBox {
|
||||||
|
.sexItm {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.p32 {
|
.p32 {
|
||||||
padding: 32rpx !important;
|
padding: 32rpx !important;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
console.log("ddddddddddddd",this.$u.config.v);
|
// console.log("ddddddddddddd",this.$u.config.v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
<u-form-item prop="userInfo.sex" ref="item1" @click="showSex=true" class="data_itm">
|
<u-form-item prop="userInfo.sex" ref="item1" @click="showSex=true" class="data_itm">
|
||||||
<text class="label_t">性别</text>
|
<text class="label_t">性别</text>
|
||||||
<u--input class="p32" placeholder="请填选择性别" v-model="model1.userInfo.sex" readonly inputAlign="right"
|
<u--input class="p32" placeholder="请填选择性别" v-model="model1.userInfo.sex" readonly
|
||||||
border="none">
|
inputAlign="right" border="none">
|
||||||
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
||||||
</u--input>
|
</u--input>
|
||||||
|
|
||||||
|
@ -316,16 +316,16 @@
|
||||||
<!-- 服务日期选择器ed -->
|
<!-- 服务日期选择器ed -->
|
||||||
<!-- 民族选择器 -->
|
<!-- 民族选择器 -->
|
||||||
<u-picker :show="zuShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZu" immediateChange
|
<u-picker :show="zuShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZu" immediateChange
|
||||||
:columns="Zucolumns"></u-picker>
|
@cancel="closeZu" @close="closeZu" :columns="Zucolumns" closeOnClickOverlay></u-picker>
|
||||||
<!-- 民族选择器 ed-->
|
<!-- 民族选择器 ed-->
|
||||||
<!-- 政治面貌选择器 -->
|
<!-- 政治面貌选择器 -->
|
||||||
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZheng" immediateChange
|
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZheng" immediateChange
|
||||||
:columns="Zhengcolumns"></u-picker>
|
closeOnClickOverlay @cancel="closezhengzhi" @close="closezhengzhi" :columns="Zhengcolumns"></u-picker>
|
||||||
<!-- 政治面貌选择器 ed-->
|
<!-- 政治面貌选择器 ed-->
|
||||||
|
|
||||||
<!-- 籍贯面貌选择器 -->
|
<!-- 籍贯面貌选择器 -->
|
||||||
<u-picker :show="jigaunShow" confirmColor="#99241B" @change="selctJi" @confirm="confimJi" immediateChange
|
<u-picker :show="jigaunShow" confirmColor="#99241B" @change="selctJi" @confirm="confimJi" immediateChange
|
||||||
:columns="Jicolumns"></u-picker>
|
closeOnClickOverlay @cancel="closeji" @close="closeji" :columns="Jicolumns"></u-picker>
|
||||||
<!-- 籍贯面貌选择器 ed-->
|
<!-- 籍贯面貌选择器 ed-->
|
||||||
<!-- 人才类型选择器 -->
|
<!-- 人才类型选择器 -->
|
||||||
<u-picker :show="renCaiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimRenCai" immediateChange
|
<u-picker :show="renCaiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimRenCai" immediateChange
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
],
|
],
|
||||||
|
|
||||||
Jicolumns: [
|
Jicolumns: [
|
||||||
["河南", "浙江", '上海'],
|
["河南", "浙江", '上海', '宁波'],
|
||||||
],
|
],
|
||||||
|
|
||||||
fileList3: [],
|
fileList3: [],
|
||||||
|
@ -522,7 +522,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
console.log(option.id);
|
// console.log(option.id);
|
||||||
this.pageTypeId = option.id
|
this.pageTypeId = option.id
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -601,10 +601,16 @@
|
||||||
this.zuValue = e.value[0]
|
this.zuValue = e.value[0]
|
||||||
// console.log(e.value[0]);
|
// console.log(e.value[0]);
|
||||||
},
|
},
|
||||||
|
closeZu() {
|
||||||
|
this.zuShow = false
|
||||||
|
},
|
||||||
confimZheng(e) {
|
confimZheng(e) {
|
||||||
this.zhengzhiShow = false
|
this.zhengzhiShow = false
|
||||||
this.zhengzhiValue = e.value[0]
|
this.zhengzhiValue = e.value[0]
|
||||||
},
|
},
|
||||||
|
closezhengzhi() {
|
||||||
|
this.zhengzhiShow = false
|
||||||
|
},
|
||||||
confimRenCai(e) {
|
confimRenCai(e) {
|
||||||
this.renCaiShow = false
|
this.renCaiShow = false
|
||||||
this.renCaiValue = e.value[0]
|
this.renCaiValue = e.value[0]
|
||||||
|
@ -612,7 +618,7 @@
|
||||||
confimJi(e) {
|
confimJi(e) {
|
||||||
this.jigaunShow = false
|
this.jigaunShow = false
|
||||||
this.jiguan = e.value[0]
|
this.jiguan = e.value[0]
|
||||||
},
|
},closeji(){ this.jigaunShow = false},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
deletePic(event) {
|
deletePic(event) {
|
||||||
this[`fileList${event.name}`].splice(event.index, 1)
|
this[`fileList${event.name}`].splice(event.index, 1)
|
||||||
|
|
Loading…
Reference in New Issue