|
@@ -20,7 +20,7 @@
|
|
|
<text v-if="formData.idtype ==2">护照号</text>
|
|
|
<icon @click="idCardChange" class="change-icon">切换</icon>
|
|
|
</view>
|
|
|
- <uni-easyinput v-model="formData.idcard" placeholder="请输入身份证号或护照号" maxlength="18" />
|
|
|
+ <uni-easyinput @blur="idCardBlur" v-model="formData.idcard" placeholder="请输入身份证号或护照号" maxlength="18" />
|
|
|
</view>
|
|
|
|
|
|
<view class="form-label-select">
|
|
@@ -69,7 +69,7 @@
|
|
|
<view class="form-label-radio form-top-margin flex-start-row">
|
|
|
<view class="phone-form-label"><text class="form-label-require">*</text>学历</view>
|
|
|
<dataChecked :list="xueliList" :selectedIds='formData.xueli.id' mode="single" :showAdd="false"
|
|
|
- @change="selectChangeXueliList"/>
|
|
|
+ @change="selectChangeXueliList" />
|
|
|
</view>
|
|
|
<view class="form-label-radio flex-start-row">
|
|
|
<view class="phone-form-label"><text class="form-label-require"></text>婚姻 </view>
|
|
@@ -78,13 +78,13 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
- <view class="form-label-input">
|
|
|
+ <view class="form-label-input">
|
|
|
<view class="phone-form-label"><text class="form-label-require"></text>通讯地址</view>
|
|
|
<view @click="openMap" class="input-text-row">
|
|
|
- <view >{{formData.juzhuDizhi}}</view>
|
|
|
+ <view>{{formData.juzhuDizhi}}</view>
|
|
|
<icon></icon>
|
|
|
</view>
|
|
|
- <!-- <picker :range="shuxiangList" mode='selector' :value="formData.shuxiangIndex" range-key="name"
|
|
|
+ <!-- <picker :range="shuxiangList" mode='selector' :value="formData.shuxiangIndex" range-key="name"
|
|
|
@change="shuxiangChange" @cancel="shuxiangCancel" class="select-picker-box">
|
|
|
<view class="form-radio-select">
|
|
|
<view>{{ formData.juzhuDizhi }}</view>
|
|
@@ -132,8 +132,8 @@
|
|
|
<button type="default" v-if="status =='add'" @click="goNext" class="phone-green-btn">下一步</button>
|
|
|
<button type="default" v-if="status =='edit'" @click="editSave" class="phone-green-btn">保存</button>
|
|
|
</view>
|
|
|
- <uni-popup ref="popupMap" background-color="#fff" :is-mask-click="false" :mask-click="false" >
|
|
|
- <customMap style="100vh" @xuanzeAdress="xuanzeAdress" @close="mapClose"></customMap>
|
|
|
+ <uni-popup ref="popupMap" background-color="#fff" :is-mask-click="false" :mask-click="false">
|
|
|
+ <customMap style="100vh" @xuanzeAdress="xuanzeAdress" @close="mapClose"></customMap>
|
|
|
</uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -149,7 +149,8 @@
|
|
|
getJiazhengShuxiang,
|
|
|
getJiazhengXingzuo,
|
|
|
getJiazhengJiguan,
|
|
|
- jiazhengIdcard
|
|
|
+ jiazhengIdcard,
|
|
|
+ jiazhengCheck
|
|
|
} from "@/api/jiazheng.js";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -225,17 +226,58 @@
|
|
|
this.initRequests()
|
|
|
},
|
|
|
methods: {
|
|
|
- xuanzeAdress(data){
|
|
|
- console.log('data',data);
|
|
|
+ xuanzeAdress(data) {
|
|
|
+ console.log('data', data);
|
|
|
this.formData.juzhuDizhi = data
|
|
|
this.mapClose()
|
|
|
},
|
|
|
- openMap(){
|
|
|
+ openMap() {
|
|
|
this.$refs.popupMap.open('bottom')
|
|
|
},
|
|
|
- mapClose(){
|
|
|
+ mapClose() {
|
|
|
this.$refs.popupMap.close()
|
|
|
},
|
|
|
+ idCardBlur() {
|
|
|
+ let req = {
|
|
|
+ idcard: this.formData.idcard,
|
|
|
+ };
|
|
|
+ jiazhengCheck(req).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ console.log(res);
|
|
|
+ if (res.data.userId != 0) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.formData.userName = res.data.userName
|
|
|
+ this.formData.realName = res.data.realName
|
|
|
+ this.formData.idcard = res.data.idcard
|
|
|
+ this.formData.idtype = res.data.idtype
|
|
|
+ this.formData.jiguanObj.jiguanShengId = res.data.jiguanShengId
|
|
|
+ this.formData.jiguanShengName = res.data.jiguanShengName
|
|
|
+ this.formData.jiguanObj.jiguanShiId = res.data.jiguanShiId
|
|
|
+ this.formData.jiguanShiName = res.data.jiguanShiName
|
|
|
+ this.formData.juzhuDizhi = res.data.juzhuDizhi
|
|
|
+ this.formData.birthday = res.data.birthday
|
|
|
+ this.formData.minzu = this.dataForId(this.minzuList, res.data.minzu) || ''
|
|
|
+ this.formData.gender = res.data.gender
|
|
|
+ this.formData.xueli = this.dataForId(this.xueliList, res.data.xueli) || ''
|
|
|
+ this.formData.hunyin = this.dataForId(this.hunyinList, res.data.hunyin) || ''
|
|
|
+ this.formData.hujiDizhi = res.data.hujiDizhi
|
|
|
+ this.formData.juzhuDizhi = res.data.juzhuDizhi
|
|
|
+ this.formData.xingzuo = this.dataForId(this.xingzuoList, res.data.xingzuo) ||''
|
|
|
+ this.formData.shuxiang = this.dataForId(this.shuxiangList, res.data.xingzuo) ||''
|
|
|
+ this.formData.xingzuoFlag = res.data.xingzuoFlag
|
|
|
+ this.$emit('idCardBlur', res.data);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
async initRequests() {
|
|
|
try {
|
|
|
await Promise.all([
|
|
@@ -345,18 +387,18 @@
|
|
|
// 确认选择时获取完整数据
|
|
|
onPickerConfirm() {
|
|
|
const [provinceIndex, cityIndex] = this.multiIndex;
|
|
|
-
|
|
|
+
|
|
|
const selectedProvince = this.multiArray[0][provinceIndex];
|
|
|
const selectedCity = this.multiArray[1][cityIndex];
|
|
|
console.log("选中的省份完整数据:", selectedProvince);
|
|
|
- console.log("选中的城市完整数据:", selectedCity);
|
|
|
- this.formData.jiguanShengId = selectedProvince?selectedProvince.value:''
|
|
|
- this.formData.jiguanShiId = selectedCity?selectedCity.value:''
|
|
|
- this.formData.jiguanShiName =selectedCity?selectedCity.label:''
|
|
|
- this.formData.jiguanShengName = selectedProvince?selectedProvince.label:''
|
|
|
- this.formData.jiguanObj.jiguanShengId = selectedProvince?selectedProvince.value:''
|
|
|
- this.formData.jiguanObj.jiguanShiId = selectedCity?selectedCity.value:''
|
|
|
-
|
|
|
+ console.log("选中的城市完整数据:", selectedCity);
|
|
|
+ this.formData.jiguanShengId = selectedProvince ? selectedProvince.value : ''
|
|
|
+ this.formData.jiguanShiId = selectedCity ? selectedCity.value : ''
|
|
|
+ this.formData.jiguanShiName = selectedCity ? selectedCity.label : ''
|
|
|
+ this.formData.jiguanShengName = selectedProvince ? selectedProvince.label : ''
|
|
|
+ this.formData.jiguanObj.jiguanShengId = selectedProvince ? selectedProvince.value : ''
|
|
|
+ this.formData.jiguanObj.jiguanShiId = selectedCity ? selectedCity.value : ''
|
|
|
+
|
|
|
},
|
|
|
setSelectedCity(cityId) {
|
|
|
for (let i = 0; i < this.allData.length; i++) {
|