CRM_25-12-23#story#7473,服务商系统、调度APP新增服务商人员确认的功能
This commit is contained in:
@@ -69,4 +69,52 @@ export function driverRealName( data) {
|
||||
method:'POST',
|
||||
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'
|
||||
})
|
||||
}
|
||||
@@ -45,8 +45,8 @@
|
||||
<div class="item">
|
||||
<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(index)">修改</span>
|
||||
<van-field :input-align="type==2 ? 'right' : 'left'" v-model="item.wechatId" />
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -64,8 +64,8 @@
|
||||
</div>
|
||||
<van-dialog v-model="dialogShow" title="请先添加企微,成功添加后将更新微信号。" show-cancel-button
|
||||
confirmButtonText="确认已添加" confirmButtonColor="#354E93" className="customDialog"
|
||||
@confirm="wechatConfirm">
|
||||
<img src="https://img01.yzcdn.cn/vant/apple-3.jpg" style="width: 90%"/>
|
||||
@confirm="wechatConfirm" @cancel="cancelHandle">
|
||||
<img v-if="wechatInfo?.qrCode" :src="wechatInfo.qrCode" style="width: 83%"/>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -73,7 +73,7 @@
|
||||
<script>
|
||||
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
// import {carInfoDetail,saveRecord} from "@/api/secondHandCar";
|
||||
import {getConfirmPerson,getConfirmStatus,getQrCode,confirmAddWechat,confirm} from "@/api/authentication";
|
||||
import { Dialog } from 'vant';
|
||||
export default {
|
||||
name: "personList",
|
||||
@@ -82,12 +82,16 @@ export default {
|
||||
return{
|
||||
noClick:true,
|
||||
id:'',
|
||||
type:1,//1确认信息 2修改 3审批中 4已确认
|
||||
personList:[{name:'',roleName:'法人',phone1:'',phone2:'',wechatId:'',email:'',},
|
||||
type:'',//1确认信息 2修改 3审批中 4已确认
|
||||
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:'',}],*/
|
||||
dialogShow:false,
|
||||
reviseIndex:-1
|
||||
reviseIndex:-1,
|
||||
supplierId:'',
|
||||
wechatInfo:'',
|
||||
personInfoId:'',
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@@ -98,18 +102,55 @@ export default {
|
||||
});
|
||||
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');
|
||||
await this.getPersonList()
|
||||
},
|
||||
methods:{
|
||||
async wechatConfirm(){//微信选择确认时间
|
||||
this.personList[this.reviseIndex].wechatId='Nov_1122'
|
||||
this.dialogShow=false
|
||||
this.reviseIndex=-1
|
||||
|
||||
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){
|
||||
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('item',item)
|
||||
this.personInfoId=item.id
|
||||
this.reviseIndex=index
|
||||
await this.getCode()
|
||||
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(){//提交审批
|
||||
let flag=this.personList.every(item => item.name && item.phone1 && item.wechatId)
|
||||
if(!flag){
|
||||
@@ -127,7 +168,11 @@ export default {
|
||||
cancelButtonText:'返回',
|
||||
confirmButtonColor:'#354E93',
|
||||
}).then(async() => {
|
||||
console.log('去修改界面')
|
||||
console.log('确认无误')
|
||||
await confirm({supplierId:this.supplierId})
|
||||
setTimeout(() => {
|
||||
this.goBack()
|
||||
}, 1500)
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user