Commit 575f943a authored by 潘永坪's avatar 潘永坪

外国人身份证开发

parent a55fb317
......@@ -205,6 +205,7 @@
:key="index2"
>
{{ item2.name }}
<text v-if="item2.contactVos.length==0" style="font-size: 20rpx;color: #ff0000;">请补充证件</text>
<view v-if="item2.ifChoose" class="date-icon">
<u-icon name="checkmark" color="#ffffff"></u-icon>
</view>
......@@ -215,7 +216,7 @@
<u-icon name="arrow-right" color="#3688FF"></u-icon>
</view>
</view>
<view class="visitorBtn" v-else @click="showEdit()">
<view class="visitorBtn" v-else @click="showEdit('',index)">
<u-icon name="plus-circle" color="#3688FF" size="52"></u-icon>
<text style="margin-left:16rpx;">新增</text>
</view>
......@@ -234,7 +235,7 @@
{{ item2.credentialNumber ? item2.credentialNumber.substr(0, 3) + '****' + item2.credentialNumber.substr(14, 4) : '' }}
</view>
<view @click="showEdit(item2)">
<view @click="showEdit(item2,index)">
<u-icon name="edit-pen-fill" color="#3688ff" size="48"></u-icon>
</view>
</view>
......@@ -295,12 +296,13 @@
:defaultAreaCode="defaultAreaCode"
></chooseArea>
<times ref="times" :chooseTimeList="chooseTimeList" @timeConfig="timeConfig" :timeActive="timeActive"></times>
<editContacts ref="editContacts" :editContactData="editContactData" ></editContacts>
<editContacts ref="editContacts" :editContactData="editContactData" :credential='chooseCredential'></editContacts>
<contactList
@contactListConfig='contactListConfig'
ref="contactList"
:contactTotal="productList[moreContactIndex].contactTotal"
:contactNum="productList[moreContactIndex].contactNum"
:moreContactIndex='moreContactIndex'
></contactList>
<orderCoupon :couponData="couponData" ref="orderCoupon" @couponChoose="couponChoose" :chooseCouponObj="chooseCouponObj"></orderCoupon>
<!--一个站点时获取排队信息弹窗-->
......@@ -392,6 +394,7 @@ export default {
couponIndex:'',//点击的券的下标
couponData:[], //选择产品的所有劵数据
chooseCouponObj: '', //选择产品选中的券
chooseCredential:'',//选中的产品的需要的证件类型
}
},
onLoad(option) {
......@@ -779,10 +782,11 @@ export default {
this.$forceUpdate()
},
//---展示编辑联系人
showEdit(data) {
showEdit(data,index) {
let obj=data||''
this.$refs.editContacts.showPop = true
this.editContactData = obj
this.chooseCredential=this.productList[index].credential
},
//---展示新增联系人,并获取联系人列表
showContacts(index) {
......@@ -815,6 +819,12 @@ export default {
//直接传入item,item2时 会报错,故选择传入下标
let item=this.productList[index]
let item2=this.productList[index].contactTotal[index2]
if(!item2.contactVos||item2.contactVos.length==0){
//证件信息不全时,补充证件信息
this.$refs.editContacts.showPop=true
this.editContactData = item2
return
}
item2.ifChoose=!item2.ifChoose
if (item2.ifChoose) {
if (item.chooseContact.length == item.contactNum) {
......@@ -870,6 +880,31 @@ export default {
}
})
}
//用于联系人证件信息对应该产品是否填写判断
if(item.credential){
//credential对应是该产品联系人可以填写的联系人证件列表
item.credentialList=item.credential.split(',')
if(item.credentialList.length>0){
item.contactTotal.forEach(item2=>{
//contactVos为该产品联系人实际填写的联系人证件信息
item2.contactVos.forEach((item3,index)=>{
if(!item.credentialList.find(item4=>item4==item3.credentialType)){
delete item2.contactVos[index]
}
})
item2.contactVos=item2.contactVos.filter((val=>{
return val
}))
//由于数据结构变化,重新组装数据
if(item2.contactVos.length>0){
item2.id=item2.contactVos[0].id
item2.credentialNumber=item2.contactVos[0].credentialNumber
item2.credentialType=item2.contactVos[0].credentialType
}
})
}
}
//数据不出现问题
this.$forceUpdate()
})
......@@ -902,6 +937,30 @@ export default {
}
}
item.chooseContact = item.contactTotal.slice(0, item.contactNum)
//用于联系人证件信息对应该产品是否填写判断
if(item.credential){
//credential对应是该产品联系人可以填写的联系人证件列表
item.credentialList=item.credential.split(',')
if(item.credentialList.length>0){
item.contactTotal.forEach(item2=>{
//contactVos为该产品联系人实际填写的联系人证件信息
item2.contactVos.forEach((item3,index)=>{
if(!item.credentialList.find(item4=>item4==item3.credentialType)){
delete item2.contactVos[index]
}
})
item2.contactVos=item2.contactVos.filter((val=>{
return val
}))
//由于数据结构变化,重新组装数据
if(item2.contactVos.length>0){
item2.id=item2.contactVos[0].id
item2.credentialNumber=item2.contactVos[0].credentialNumber
item2.credentialType=item2.contactVos[0].credentialType
}
})
}
}
//数据不出现问题
this.$forceUpdate()
})
......
......@@ -19,7 +19,8 @@
<view class="bottom">
<checkbox-group @change="chooseContactChange">
<view class="bottom-list" v-for="(item,index) of listTotal" :key="item.id">
<!-- key只能为index,防止id可能有重复 -->
<view class="bottom-list" v-for="(item,index) of listTotal" :key="index">
<label>
<checkbox class="blue" :value="JSON.stringify(item)" :checked="item.ifChoose" color="#3688ff" :disabled="item.contactVos.length==0" />
<view class="bottom-content">
......@@ -64,7 +65,7 @@
<script>
export default {
props: ['contactTotal', 'contactNum'],
props: ['contactTotal', 'contactNum','moreContactIndex'],
watch: {
contactTotal: {
handler(newValue, oldValue) {
......@@ -89,7 +90,7 @@ export default {
//---展示编辑弹窗,并传值给编辑弹窗
goEdit(data){
let obj=data||''
this.$parent.showEdit(obj)
this.$parent.showEdit(obj,this.moreContactIndex)
},
//---确定选中的联系人
config() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment