CRM_25-12-23#story#7473,服务商系统、调度APP新增服务商人员确认

This commit is contained in:
2025-12-18 14:15:04 +08:00
parent 0fc9be28d1
commit 89cf401882
2 changed files with 12 additions and 11 deletions

View File

@@ -89,7 +89,7 @@ export function getQrCode(key){
//获取服务商的确认状态
export function getConfirmStatus(key){
return request({
url: '/supplierAppV2/dispatchApp/wechat/getSuppler',
url: '/supplierAppV2/dispatchApp/wechat/getSupplier',
method:'GET',
params: key
})

View File

@@ -60,7 +60,7 @@
<div class="left" :class="{'opaCol':type!=2}"><span class="star">*</span><span>微信号</span></div>
<div class="right wechatRight">
<span class="reviseBtn" v-show="type==2" @click="wechatRevise(item,index)">修改</span>
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.wechatId" />
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.wechatName" />
</div>
</div>
<div class="item">
@@ -127,10 +127,11 @@ export default {
}
},
validatePhone(val) {
console.log('val',val)
if(!val){
return true
}
const purePhone = val.replace(/\s|-/g, '');
const purePhone = val
// 情况111位且1开头 → 合法
if (/^1[0-9]{10}$/.test(purePhone)) {
return true
@@ -151,7 +152,7 @@ export default {
}else if(!result.data?.wechatConfirmStatus || result.data?.wechatConfirmStatus==1){
this.type=1
}
this.type=1
// this.type=1
let res=await getConfirmPerson({supplierId:this.supplierId})
if(res.data && res.data.length>0){
this.personList=res.data
@@ -161,8 +162,8 @@ export default {
},
async wechatConfirm(){//确认已添加微信按钮
let res=await confirmAddWechat({supplierId:this.supplierId,supplierPersonInfoId:this.personInfoId})
console.log('----',res)
this.personList[this.reviseIndex].wechatId='Nov_1122'
this.personList[this.reviseIndex].wechatId=res.data?.externalUserId
this.personList[this.reviseIndex].wechatName=res.data?.name
await this.cancelHandle()
},
cancelHandle(){
@@ -185,15 +186,15 @@ export default {
this.wechatInfo=res.data || ''
},
async auditHandle(){//提交审批
let flag=this.personList.every(item => item.name && item.phone1 && item.wechatId)
let flag=this.personList.every(item => item.name && item.phone1 && item.wechatId && item.wechatName)
if(!flag){
this.$toast('必填项不可为空')
// return
return
}
let phone1Flag= this.personList.every(item => this.validatePhone(item.phone1))
let phone2Flag= this.personList.every(item => item.phone2 && this.validatePhone(item.phone2))
// console.log('phone1Flag',phone1Flag)
// console.log('phone2Flag',phone2Flag)
let phone2Flag= this.personList.every(item => (item.phone2 && this.validatePhone(item.phone2) || !item.phone2))
console.log('phone1Flag',phone1Flag)
console.log('phone2Flag',phone2Flag)
if(!phone1Flag || !phone2Flag){
return
}