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

This commit is contained in:
2025-12-17 11:37:59 +08:00
parent 1f2af86b96
commit 23984e78ec
2 changed files with 108 additions and 15 deletions

View File

@@ -70,3 +70,51 @@ export function driverRealName( data) {
contentType: 'application/json' contentType: 'application/json'
}) })
} }
//获取需要确认的人员信息列表
export function getConfirmPerson(key){
return request({
url: '/supplierAppV2/dispatchApp/wechat/getNeedConfirmPersonInfo',
method:'GET',
params: key
})
}
//微信相关 获取联系我 二维码
export function getQrCode(key){
return request({
url: '/supplierAppV2/dispatchApp/wechat/getQrCode',
method:'GET',
params: key
})
}
//获取服务商的确认状态
export function getConfirmStatus(key){
return request({
url: '/supplierAppV2/dispatchApp/wechat/getSuppler',
method:'GET',
params: key
})
}
//确认已添加微信按钮
export function confirmAddWechat(key){
return request({
url: '/supplierAppV2/dispatchApp/wechat/confirmAddWechat',
method:'GET',
params: key
})
}
//确认无误
export function confirm(key){
return request({
url: '/supplierAppV2/dispatchApp/wechat/confirm',
method:'GET',
params: key
})
}
//提交审批
export function submitConfirm( data) {
return request('/supplierAppV2/dispatchApp/wechat/submitConfirm', {
data: data,
method:'POST',
contentType: 'application/json'
})
}

View File

@@ -45,8 +45,8 @@
<div class="item"> <div class="item">
<div class="left" :class="{'opaCol':type!=2}"><span class="star">*</span><span>微信号</span></div> <div class="left" :class="{'opaCol':type!=2}"><span class="star">*</span><span>微信号</span></div>
<div class="right wechatRight"> <div class="right wechatRight">
<span class="reviseBtn" v-show="type==2" @click="wechatRevise(index)">修改</span> <span class="reviseBtn" v-show="type==2" @click="wechatRevise(item,index)">修改</span>
<van-field :input-align="type==2 ? 'right' : 'left'" v-model="item.wechatId" /> <van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.wechatId" />
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@@ -64,8 +64,8 @@
</div> </div>
<van-dialog v-model="dialogShow" title="请先添加企微,成功添加后将更新微信号。" show-cancel-button <van-dialog v-model="dialogShow" title="请先添加企微,成功添加后将更新微信号。" show-cancel-button
confirmButtonText="确认已添加" confirmButtonColor="#354E93" className="customDialog" confirmButtonText="确认已添加" confirmButtonColor="#354E93" className="customDialog"
@confirm="wechatConfirm"> @confirm="wechatConfirm" @cancel="cancelHandle">
<img src="https://img01.yzcdn.cn/vant/apple-3.jpg" style="width: 90%"/> <img v-if="wechatInfo?.qrCode" :src="wechatInfo.qrCode" style="width: 83%"/>
</van-dialog> </van-dialog>
</div> </div>
</template> </template>
@@ -73,7 +73,7 @@
<script> <script>
import {myMixins} from "@/utils/myMixins" import {myMixins} from "@/utils/myMixins"
// import {carInfoDetail,saveRecord} from "@/api/secondHandCar"; import {getConfirmPerson,getConfirmStatus,getQrCode,confirmAddWechat,confirm} from "@/api/authentication";
import { Dialog } from 'vant'; import { Dialog } from 'vant';
export default { export default {
name: "personList", name: "personList",
@@ -82,12 +82,16 @@ export default {
return{ return{
noClick:true, noClick:true,
id:'', id:'',
type:1,//1确认信息 2修改 3审批中 4已确认 type:'',//1确认信息 2修改 3审批中 4已确认
personList:[{name:'',roleName:'法人',phone1:'',phone2:'',wechatId:'',email:'',}, personList:[],
/* personList:[{name:'',roleName:'法人',phone1:'',phone2:'',wechatId:'',email:'',},
{name:'',roleName:'时空老板',phone1:'',phone2:'',wechatId:'',email:'',}, {name:'',roleName:'时空老板',phone1:'',phone2:'',wechatId:'',email:'',},
{name:'',roleName:'时空老板',phone1:'',phone2:'',wechatId:'',email:'',}], {name:'',roleName:'时空老板',phone1:'',phone2:'',wechatId:'',email:'',}],*/
dialogShow:false, dialogShow:false,
reviseIndex:-1 reviseIndex:-1,
supplierId:'',
wechatInfo:'',
personInfoId:'',
} }
}, },
async mounted() { async mounted() {
@@ -98,18 +102,55 @@ export default {
}); });
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
this.id=this.$route.query.id || urlParams.get('id'); this.id=this.$route.query.id || urlParams.get('id');
this.supplierId=1128 || this.$route.query.supplierId || urlParams.get('supplierId');
await this.getPersonList()
}, },
methods:{ methods:{
async wechatConfirm(){//微信选择确认时间
this.personList[this.reviseIndex].wechatId='Nov_1122' async getPersonList(){
this.dialogShow=false let result=await getConfirmStatus({supplierId:this.supplierId})
this.reviseIndex=-1 if(!result.data?.wechatConfirmStatus || result.data?.wechatConfirmStatus==1){
this.type=1
}
if(result.data?.wechatConfirmStatus==2){
this.type=3
}
if(result.data?.wechatConfirmStatus==3){
this.type=4
}
let res=await getConfirmPerson({supplierId:this.supplierId})
console.log('result',result)
if(res.data && res.data.length>0){
this.personList=res.data
}else{
this.personList=[]
}
}, },
wechatRevise(index){ async wechatConfirm(){//确认已添加微信按钮
let res=await confirmAddWechat({supplierId:this.supplierId,supplierPersonInfoId:this.personInfoId})
console.log('----',res)
this.personList[this.reviseIndex].wechatId='Nov_1122'
await this.cancelHandle()
},
cancelHandle(){
this.dialogShow=false
this.wechatInfo=''
this.reviseIndex=-1
this.personInfoId=''
},
async wechatRevise(item,index){
console.log('index',index) console.log('index',index)
console.log('item',item)
this.personInfoId=item.id
this.reviseIndex=index this.reviseIndex=index
await this.getCode()
this.dialogShow=true this.dialogShow=true
}, },
async getCode(){//获取二维码
let res = await getQrCode({supplierId:this.supplierId,supplierPersonInfoId:this.personInfoId})
// console.log('res--getCode',res)
this.wechatInfo=res.data || ''
},
async auditHandle(){//提交审批 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)
if(!flag){ if(!flag){
@@ -127,7 +168,11 @@ export default {
cancelButtonText:'返回', cancelButtonText:'返回',
confirmButtonColor:'#354E93', confirmButtonColor:'#354E93',
}).then(async() => { }).then(async() => {
console.log('去修改界面') console.log('确认无误')
await confirm({supplierId:this.supplierId})
setTimeout(() => {
this.goBack()
}, 1500)
}).catch(() => { }).catch(() => {
}); });
}, },