CRM_25-12-23#story#7473,服务商系统、调度APP新增服务商人员确认
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
<span v-else-if="type==4">当前信息已确认,如需调整请联系区域经理。</span>
|
||||
</div>
|
||||
<van-loading v-show="personList.length<=0" class="loadingWrap" type="spinner" color="#1989fa" />
|
||||
<div class="contentWrap" v-show="personList.length>0">
|
||||
<div class="contentWrap" v-show="personList.length>0"
|
||||
:style="{'height':[1,2].includes(type) ? 'calc(100% - 160px)' : 'calc(100% - 90px)'}">
|
||||
<div class="itemWrap" v-for="(item,index) in personList" :key="index">
|
||||
<div class="opaCol">人员{{(index+1)}}:</div>
|
||||
<div class="line"></div>
|
||||
@@ -70,7 +71,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnWrap">
|
||||
<div class="btnWrap" v-if="[1,2].includes(type)">
|
||||
<div v-show="type==2" class="audit common" @click="auditHandle">提交审批</div>
|
||||
<div v-show="type==1" class="revise common" @click="reviseHandle">立即修改</div>
|
||||
<div v-show="type==1" class="confirm common" @click="confirmHandle">确认信息无误</div>
|
||||
@@ -86,7 +87,7 @@
|
||||
<script>
|
||||
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {getConfirmPerson,getConfirmStatus,getQrCode,confirmAddWechat,confirm} from "@/api/authentication";
|
||||
import {getConfirmPerson,getConfirmStatus,getQrCode,confirmAddWechat,confirm,submitConfirm} from "@/api/authentication";
|
||||
import { Dialog } from 'vant';
|
||||
export default {
|
||||
name: "personList",
|
||||
@@ -107,10 +108,10 @@ export default {
|
||||
async mounted() {
|
||||
window.addEventListener('message', (event) => {
|
||||
if (event.data === 'dialogClosed') {
|
||||
console.log('Dialog 已关闭 // 执行关闭后的逻辑');
|
||||
// console.log('Dialog 已关闭 // 执行关闭后的逻辑');
|
||||
}
|
||||
});
|
||||
console.log('isWebFunc()',this.isWebFunc())
|
||||
// console.log('isWebFunc()',this.isWebFunc())
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.id=this.$route.query.id || urlParams.get('id');
|
||||
this.supplierId=1128 || this.$route.query.supplierId || urlParams.get('supplierId');
|
||||
@@ -120,14 +121,14 @@ export default {
|
||||
blurHandle(e){
|
||||
let val= e.target.value || ''
|
||||
let flag=this.validatePhone(val)
|
||||
console.log('flag',flag)
|
||||
// console.log('flag',flag)
|
||||
if(!flag){
|
||||
this.$toast('手机号格式不正确')
|
||||
}
|
||||
},
|
||||
validatePhone(val) {
|
||||
if(!val){
|
||||
return
|
||||
return true
|
||||
}
|
||||
const purePhone = val.replace(/\s|-/g, '');
|
||||
// 情况1:11位且1开头 → 合法
|
||||
@@ -143,16 +144,14 @@ export default {
|
||||
},
|
||||
async getPersonList(){
|
||||
let result=await getConfirmStatus({supplierId:this.supplierId})
|
||||
if(!result.data?.wechatConfirmStatus || result.data?.wechatConfirmStatus==1){
|
||||
this.type=1
|
||||
}
|
||||
if(result.data?.wechatConfirmStatus==2){
|
||||
this.type=3
|
||||
}
|
||||
if(result.data?.wechatConfirmStatus==3){
|
||||
}else if(result.data?.wechatConfirmStatus==3){
|
||||
this.type=4
|
||||
}else if(!result.data?.wechatConfirmStatus || result.data?.wechatConfirmStatus==1){
|
||||
this.type=1
|
||||
}
|
||||
this.type=2
|
||||
this.type=1
|
||||
let res=await getConfirmPerson({supplierId:this.supplierId})
|
||||
if(res.data && res.data.length>0){
|
||||
this.personList=res.data
|
||||
@@ -173,8 +172,8 @@ export default {
|
||||
this.personInfoId=''
|
||||
},
|
||||
async wechatRevise(item,index){
|
||||
console.log('index',index)
|
||||
console.log('item',item)
|
||||
// console.log('index',index)
|
||||
// console.log('item',item)
|
||||
this.personInfoId=item.id
|
||||
this.reviseIndex=index
|
||||
await this.getCode()
|
||||
@@ -193,11 +192,16 @@ export default {
|
||||
}
|
||||
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)
|
||||
if(!flag){
|
||||
this.$toast('手机号格式不正确')
|
||||
// console.log('phone1Flag',phone1Flag)
|
||||
// console.log('phone2Flag',phone2Flag)
|
||||
if(!phone1Flag || !phone2Flag){
|
||||
return
|
||||
}
|
||||
await submitConfirm({supplierId:this.supplierId,infos:this.personList})
|
||||
this.$toast('操作成功')
|
||||
setTimeout(()=>{
|
||||
this.goBack();
|
||||
},2000)
|
||||
},
|
||||
async reviseHandle(){//修改
|
||||
this.type=2
|
||||
@@ -209,7 +213,7 @@ export default {
|
||||
cancelButtonText:'返回',
|
||||
confirmButtonColor:'#354E93',
|
||||
}).then(async() => {
|
||||
console.log('确认无误')
|
||||
// console.log('确认无误')
|
||||
await confirm({supplierId:this.supplierId})
|
||||
setTimeout(() => {
|
||||
this.goBack()
|
||||
@@ -297,12 +301,13 @@ export default {
|
||||
}*/
|
||||
.loadingWrap{
|
||||
width: 100%;
|
||||
height: calc(100% - 160px);
|
||||
height: calc(100% - 90px);
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
}
|
||||
.contentWrap{
|
||||
height: calc(100% - 160px);
|
||||
//height: calc(100% - 160px);
|
||||
//height: calc(100% - 90px);//没有按钮时
|
||||
overflow-y: auto;
|
||||
.itemWrap{
|
||||
font-size: 14px;
|
||||
|
||||
Reference in New Issue
Block a user