|
@@ -30,51 +30,55 @@
|
|
|
|
|
|
<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit"></image>
|
|
<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit"></image>
|
|
</view>
|
|
</view>
|
|
- <view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex width100">
|
|
|
|
- <view style='width:100px;font-size:14px;'>姓名</view>
|
|
|
|
- <view class="flex">
|
|
|
|
- <u--input @input='nameinput' placeholder="输入姓名" inputAlign='left' border="none"
|
|
|
|
|
|
+ <view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex flex-space-between width100">
|
|
|
|
+ <view class="left-text" style='font-size:14px;'>姓名</view>
|
|
|
|
+ <view style='padding-right:10px;' class="flex">
|
|
|
|
+ <u--input @input='nameinput' placeholder="输入姓名" inputAlign='right' border="none"
|
|
v-model="dataDetails.name">
|
|
v-model="dataDetails.name">
|
|
</u--input>
|
|
</u--input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="flex row" style='padding:10px 0 5px;border-bottom:1px solid #eee;'>
|
|
|
|
- <view style='width:100px;font-size:14px;'>性别</view>
|
|
|
|
- <u-radio-group v-model="dataDetails.sex" placement="row">
|
|
|
|
- <u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
|
|
|
|
- :label="item.name" :name="item.name" @change="radioChange">
|
|
|
|
- </u-radio>
|
|
|
|
- </u-radio-group>
|
|
|
|
|
|
+ <view class="flex row flex-space-between" style='padding:10px 0 5px;border-bottom:1px solid #eee;'>
|
|
|
|
+ <view class="left-text" style='font-size:14px;'>性别</view>
|
|
|
|
+ <view>
|
|
|
|
+ <u-radio-group v-model="dataDetails.sex" placement="row">
|
|
|
|
+ <u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
|
|
|
|
+ :label="item.name" :name="item.name" @change="radioChange">
|
|
|
|
+ </u-radio>
|
|
|
|
+ </u-radio-group>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="flex row row-ch" style='padding:10px 0 5px;'>
|
|
|
|
- <view style='width:100px;font-size:14px;'>称呼</view>
|
|
|
|
- <view style="width: 60rpx;">
|
|
|
|
- <u--input placeholder="输入姓氏" class="ch-style" inputAlign='left' border="none"
|
|
|
|
- v-model="dataDetails.call">
|
|
|
|
- </u--input>
|
|
|
|
|
|
+ <view class="flex row row-ch flex-space-between" style='padding:10px 0 5px;'>
|
|
|
|
+ <view class="left-text" style='font-size:14px;'>称呼</view>
|
|
|
|
+ <view style='padding-right:10px;' class='flex'>
|
|
|
|
+ <view style="width: 60rpx;">
|
|
|
|
+ <u--input placeholder="输入姓氏" class="ch-style" inputAlign='right' border="none"
|
|
|
|
+ v-model="dataDetails.call">
|
|
|
|
+ </u--input>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flex align-center" v-if="dataDetails.sex=='男'">先生</view>
|
|
|
|
+ <view class="flex align-center" v-else>女士</view>
|
|
</view>
|
|
</view>
|
|
- <view class="flex align-center" v-if="dataDetails.sex=='男'">先生</view>
|
|
|
|
- <view class="flex align-center" v-else>女士</view>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view style='padding:10px 0 5px;border-bottom:1px solid #eee;' class="flex width100">
|
|
|
|
- <view style='width:100px;font-size:14px;'>联系电话</view>
|
|
|
|
- <view class="flex">
|
|
|
|
- <u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='left' border="none"
|
|
|
|
|
|
+ <view style='padding:10px 0 5px;border-bottom:1px solid #eee;' class="flex width100 flex-space-between">
|
|
|
|
+ <view class="left-text" style='font-size:14px;'>联系电话</view>
|
|
|
|
+ <view style='padding-right:10px;' class="flex">
|
|
|
|
+ <u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='right' border="none"
|
|
v-model="dataDetails.phone">
|
|
v-model="dataDetails.phone">
|
|
</u--input>
|
|
</u--input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="flex row">
|
|
|
|
|
|
+ <view style='padding-right:10px;' class="flex row">
|
|
<view class="left-text">身份证号</view>
|
|
<view class="left-text">身份证号</view>
|
|
- <u--input :disabled='dataDetails.id' placeholder="请输入身份证号" inputAlign='left' border="none"
|
|
|
|
|
|
+ <u--input :disabled='dataDetails.id' placeholder="请输入身份证号" inputAlign='right' border="none"
|
|
v-model="dataDetails.cardNumber">
|
|
v-model="dataDetails.cardNumber">
|
|
</u--input>
|
|
</u--input>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="flex row noborder">
|
|
|
|
|
|
+ <view style='padding-right:10px;' class="flex flex-space-between row noborder">
|
|
<view class="left-text">身份证截止日期</view>
|
|
<view class="left-text">身份证截止日期</view>
|
|
- <view style='font-size:16px;width:50%;' class='flex flex-space-between' @click="selectValidityPeriod">
|
|
|
|
|
|
+ <view style='font-size:16px;align-items: center;' class='flex' @click="selectValidityPeriod">
|
|
<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
|
|
<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
|
|
{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期'}}
|
|
{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期'}}
|
|
</view>
|
|
</view>
|
|
@@ -145,6 +149,7 @@
|
|
dataDetails: {
|
|
dataDetails: {
|
|
name: '',
|
|
name: '',
|
|
phone: '',
|
|
phone: '',
|
|
|
|
+ sex:'男',
|
|
commonId: '',
|
|
commonId: '',
|
|
cardNumber: '',
|
|
cardNumber: '',
|
|
cardAddressUrl: '',
|
|
cardAddressUrl: '',
|
|
@@ -164,7 +169,10 @@
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.get_camera_permission()
|
|
this.get_camera_permission()
|
|
var _this = this;
|
|
var _this = this;
|
|
- this.dataDetails = options
|
|
|
|
|
|
+ console.log(options)
|
|
|
|
+ if(JSON.stringify(options) != "{}"){
|
|
|
|
+ this.dataDetails = options
|
|
|
|
+ }
|
|
this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
|
|
this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
|
|
this.dataDetails.phone = this.userInfo.phone
|
|
this.dataDetails.phone = this.userInfo.phone
|
|
this.dataDetails.commonId = this.userInfo.id
|
|
this.dataDetails.commonId = this.userInfo.id
|
|
@@ -196,7 +204,10 @@
|
|
// 性别切换
|
|
// 性别切换
|
|
radioChange(n) {
|
|
radioChange(n) {
|
|
console.log('radioChange', n);
|
|
console.log('radioChange', n);
|
|
|
|
+
|
|
this.dataDetails.sex = n
|
|
this.dataDetails.sex = n
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ console.log(this.dataDetails.sex)
|
|
},
|
|
},
|
|
consent() {
|
|
consent() {
|
|
this.checked = !this.checked
|
|
this.checked = !this.checked
|
|
@@ -274,6 +285,25 @@
|
|
if (e.value[0] == '长期') {
|
|
if (e.value[0] == '长期') {
|
|
this.dataDetails.cardValidityDate = e.value[0]
|
|
this.dataDetails.cardValidityDate = e.value[0]
|
|
} else {
|
|
} else {
|
|
|
|
+ if(e.value[0]==''){
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: "年份不能为空!",
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }else if(e.value[1]==''){
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: "月份不能为空!",
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }else if(e.value[2]==''){
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: "日期不能为空!",
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
this.dataDetails.cardValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
|
|
this.dataDetails.cardValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
|
|
}
|
|
}
|
|
|
|
|
|
@@ -301,6 +331,13 @@
|
|
})
|
|
})
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
+ if (this.dataDetails.call.length==0) {
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: "称呼不能为空!",
|
|
|
|
+ })
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
if (this.dataDetails.call.length > 4) {
|
|
if (this.dataDetails.call.length > 4) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -308,6 +345,7 @@
|
|
})
|
|
})
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
+
|
|
if (uni.$u.test.isEmpty(this.dataDetails.cardNumber)) {
|
|
if (uni.$u.test.isEmpty(this.dataDetails.cardNumber)) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -392,10 +430,17 @@
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.data.recPersonNo) {
|
|
if (res.data.recPersonNo) {
|
|
that.dataDetails.cardNumber = res.data.recPersonNo
|
|
that.dataDetails.cardNumber = res.data.recPersonNo
|
|
|
|
+ if(that.dataDetails.cardNumber[16]%2==0){
|
|
|
|
+ that.dataDetails.sex='女'
|
|
|
|
+ }else{
|
|
|
|
+ that.dataDetails.sex='男'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (res.data.recPerson) {
|
|
if (res.data.recPerson) {
|
|
that.dataDetails.name = res.data.recPerson
|
|
that.dataDetails.name = res.data.recPerson
|
|
|
|
+ that.dataDetails.call=that.dataDetails.name[0]
|
|
}
|
|
}
|
|
|
|
+
|
|
that.$forceUpdate()
|
|
that.$forceUpdate()
|
|
})
|
|
})
|
|
.catch(res => {
|
|
.catch(res => {
|