From 89cf401882c269b28e707f58e0c840617d575d67 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Thu, 18 Dec 2025 14:15:04 +0800 Subject: [PATCH] =?UTF-8?q?CRM=5F25-12-23#story#7473,=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=95=86=E7=B3=BB=E7=BB=9F=E3=80=81=E8=B0=83=E5=BA=A6APP?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=8D=E5=8A=A1=E5=95=86=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/authentication.js | 2 +- src/views/mine/personList.vue | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/api/authentication.js b/src/api/authentication.js index c84e1544..311d5766 100644 --- a/src/api/authentication.js +++ b/src/api/authentication.js @@ -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 }) diff --git a/src/views/mine/personList.vue b/src/views/mine/personList.vue index 41e03f57..f00f9504 100644 --- a/src/views/mine/personList.vue +++ b/src/views/mine/personList.vue @@ -60,7 +60,7 @@
*微信号:
修改 - +
@@ -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 // 情况1:11位且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 }