人员确认添加二次弹框
This commit is contained in:
@@ -97,6 +97,7 @@ export default {
|
||||
supplierId:'',
|
||||
wechatInfo:'',
|
||||
personInfoId:'',
|
||||
personInfo:'',
|
||||
isMaster:false,
|
||||
}
|
||||
},
|
||||
@@ -150,7 +151,7 @@ export default {
|
||||
this.type=1
|
||||
}
|
||||
this.isMaster=result.data.isMaster
|
||||
// this.type=1
|
||||
// this.type=2
|
||||
let res=await getConfirmPerson({supplierId:this.supplierId})
|
||||
if(res.data && res.data.length>0){
|
||||
this.personList=res.data
|
||||
@@ -159,10 +160,26 @@ export default {
|
||||
}
|
||||
},
|
||||
async wechatConfirm(){//确认已添加微信按钮
|
||||
let res=await confirmAddWechat({supplierId:this.supplierId,supplierPersonInfoId:this.personInfoId})
|
||||
this.personList[this.reviseIndex].wechatId=res.data?.externalUserId
|
||||
this.personList[this.reviseIndex].wechatName=res.data?.name
|
||||
await this.cancelHandle()
|
||||
Dialog.confirm({
|
||||
message:'请确认相关人员是否已添加该二维码。',
|
||||
confirmButtonText:'确认',
|
||||
cancelButtonText:'取消',
|
||||
confirmButtonColor:'#354E93',
|
||||
}).then(async() => {
|
||||
let res=await confirmAddWechat({supplierId:this.supplierId,supplierPersonInfoId:this.personInfoId})
|
||||
console.log('res',this.personInfo,res.data?.name,this.personInfo.wechatName)
|
||||
if(res.data?.name == this.personInfo.wechatName){
|
||||
this.$set(this.personList[this.reviseIndex],'isChange',false)
|
||||
}else {
|
||||
this.$set(this.personList[this.reviseIndex],'isChange',true)
|
||||
}
|
||||
this.personList[this.reviseIndex].wechatId=res.data?.externalUserId
|
||||
this.personList[this.reviseIndex].wechatName=res.data?.name
|
||||
await this.cancelHandle()
|
||||
}).catch(async () => {
|
||||
await this.cancelHandle()
|
||||
|
||||
});
|
||||
},
|
||||
cancelHandle(){
|
||||
this.dialogShow=false
|
||||
@@ -171,10 +188,11 @@ export default {
|
||||
this.personInfoId=''
|
||||
},
|
||||
async wechatRevise(item,index){
|
||||
// console.log('index',index)
|
||||
console.log('item,index',item,index)
|
||||
// console.log('item',item)
|
||||
this.personInfoId=item.id
|
||||
this.reviseIndex=index
|
||||
this.personInfo=item
|
||||
await this.getCode()
|
||||
this.dialogShow=true
|
||||
},
|
||||
@@ -189,6 +207,13 @@ export default {
|
||||
this.$toast('必填项不可为空')
|
||||
return
|
||||
}
|
||||
console.log('----',this.personList)
|
||||
let flagRevise=this.personList.some(item => 'isChange' in item && !item.isChange)
|
||||
console.log('存在未修改',flagRevise)
|
||||
if(flagRevise){
|
||||
this.$toast('您仍未修改微信号,请先修改再提交审批。')
|
||||
return
|
||||
}
|
||||
let phone1Flag= this.personList.every(item => this.validatePhone(item.phone1))
|
||||
let phone2Flag= this.personList.every(item => (item.phone2 && this.validatePhone(item.phone2) || !item.phone2))
|
||||
console.log('phone1Flag',phone1Flag)
|
||||
@@ -246,6 +271,10 @@ export default {
|
||||
.van-dialog__content{
|
||||
text-align: center !important;
|
||||
}
|
||||
.van-dialog__header {
|
||||
box-sizing: border-box;
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user