CRM_25-12-23#story#7473,服务商系统、调度APP新增服务商人员确认的功能
This commit is contained in:
BIN
src/assets/greTip.png
Normal file
BIN
src/assets/greTip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 868 B |
BIN
src/assets/yelTip.png
Normal file
BIN
src/assets/yelTip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 870 B |
@@ -94,6 +94,7 @@ export const myMixins = {
|
|||||||
isWebFunc(){
|
isWebFunc(){
|
||||||
let res=false
|
let res=false
|
||||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||||
|
console.log('isMobile',isMobile)
|
||||||
if (!isMobile) {// 是移动端不变
|
if (!isMobile) {// 是移动端不变
|
||||||
res=true
|
res=true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="headerWrap">
|
<div class="navBar">
|
||||||
|
<van-nav-bar
|
||||||
|
title="人员信息"
|
||||||
|
:left-arrow="Boolean(!isWebFunc())"
|
||||||
|
left-arrow-color="#FFFFFF"
|
||||||
|
:border="false"
|
||||||
|
:fixed="true"
|
||||||
|
:safe-area-inset-top="true"
|
||||||
|
@click-left="goBack"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="headerWrap">
|
||||||
<div v-if="isWebFunc()" style="opacity: 0;" class="back"></div>
|
<div v-if="isWebFunc()" style="opacity: 0;" class="back"></div>
|
||||||
<!-- <img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />-->
|
<!– <img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />–>
|
||||||
<span>人员信息</span>
|
<span>人员信息</span>
|
||||||
<div style="opacity: 0;" class="back"></div>
|
<div style="opacity: 0;" class="back"></div>
|
||||||
</div>
|
</div>-->
|
||||||
<div :class="{'tipWrap':true,'yelBg':type==3,'greBg':type==4}">
|
<div :class="{'tipWrap':true,'yelBg':type==3,'greBg':type==4}">
|
||||||
<img v-show="[1,2].includes(type)" src="@/assets/unpass.png" />
|
<img v-show="[1,2].includes(type)" src="@/assets/unpass.png" />
|
||||||
|
<img v-show="[3].includes(type)" src="@/assets/yelTip.png" />
|
||||||
|
<img v-show="[4].includes(type)" src="@/assets/greTip.png" />
|
||||||
<span v-if="type==1">请立即核对或修改以下信息:姓名/身份/电话/微信号/邮箱</span>
|
<span v-if="type==1">请立即核对或修改以下信息:姓名/身份/电话/微信号/邮箱</span>
|
||||||
<span v-else-if="type==2">“角色”无法修改,如需修改“角色”请联系区域经理。提交审批后请到【管理人员】模块进行查看。</span>
|
<span v-else-if="type==2">“角色”无法修改,如需修改“角色”请联系区域经理。提交审批后请到【管理人员】模块进行查看。</span>
|
||||||
<span v-else-if="type==3">当前信息正在确认中,如需调整请联系区域经理。</span>
|
<span v-else-if="type==3">当前信息正在确认中,如需调整请联系区域经理。</span>
|
||||||
@@ -33,13 +46,13 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="left" :class="{'opaCol':type!=2}"><span class="star">*</span><span>电话1:</span></div>
|
<div class="left" :class="{'opaCol':type!=2}"><span class="star">*</span><span>电话1:</span></div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.phone1" placeholder="请输入" />
|
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model.number="item.phone1" placeholder="请输入" @blur="blurHandle" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="left" :class="{'opaCol':type!=2}"><span class="star" style="opacity: 0">*</span><span>电话2:</span></div>
|
<div class="left" :class="{'opaCol':type!=2}"><span class="star" style="opacity: 0">*</span><span>电话2:</span></div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.phone2" placeholder="请输入" />
|
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model.number="item.phone2" @blur="blurHandle" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@@ -84,9 +97,6 @@ export default {
|
|||||||
id:'',
|
id:'',
|
||||||
type:'',//1确认信息 2修改 3审批中 4已确认
|
type:'',//1确认信息 2修改 3审批中 4已确认
|
||||||
personList:[],
|
personList:[],
|
||||||
/* personList:[{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:'',
|
supplierId:'',
|
||||||
@@ -100,13 +110,37 @@ export default {
|
|||||||
console.log('Dialog 已关闭 // 执行关闭后的逻辑');
|
console.log('Dialog 已关闭 // 执行关闭后的逻辑');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
console.log('isWebFunc()',this.isWebFunc())
|
||||||
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');
|
this.supplierId=1128 || this.$route.query.supplierId || urlParams.get('supplierId');
|
||||||
await this.getPersonList()
|
await this.getPersonList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
blurHandle(e){
|
||||||
|
let val= e.target.value || ''
|
||||||
|
let flag=this.validatePhone(val)
|
||||||
|
console.log('flag',flag)
|
||||||
|
if(!flag){
|
||||||
|
this.$toast('手机号格式不正确')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validatePhone(val) {
|
||||||
|
if(!val){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const purePhone = val.replace(/\s|-/g, '');
|
||||||
|
// 情况1:11位且1开头 → 合法
|
||||||
|
if (/^1[0-9]{10}$/.test(purePhone)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 情况2:12位且首位是0、第二位是1 → 去0后合法
|
||||||
|
if (/^01[0-9]{10}$/.test(purePhone)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 其他情况 → 不合法
|
||||||
|
return false
|
||||||
|
},
|
||||||
async getPersonList(){
|
async getPersonList(){
|
||||||
let result=await getConfirmStatus({supplierId:this.supplierId})
|
let result=await getConfirmStatus({supplierId:this.supplierId})
|
||||||
if(!result.data?.wechatConfirmStatus || result.data?.wechatConfirmStatus==1){
|
if(!result.data?.wechatConfirmStatus || result.data?.wechatConfirmStatus==1){
|
||||||
@@ -118,8 +152,8 @@ export default {
|
|||||||
if(result.data?.wechatConfirmStatus==3){
|
if(result.data?.wechatConfirmStatus==3){
|
||||||
this.type=4
|
this.type=4
|
||||||
}
|
}
|
||||||
|
this.type=2
|
||||||
let res=await getConfirmPerson({supplierId:this.supplierId})
|
let res=await getConfirmPerson({supplierId:this.supplierId})
|
||||||
console.log('result',result)
|
|
||||||
if(res.data && res.data.length>0){
|
if(res.data && res.data.length>0){
|
||||||
this.personList=res.data
|
this.personList=res.data
|
||||||
}else{
|
}else{
|
||||||
@@ -155,7 +189,14 @@ export default {
|
|||||||
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){
|
||||||
this.$toast('必填项不可为空')
|
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)
|
||||||
|
if(!flag){
|
||||||
|
this.$toast('手机号格式不正确')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async reviseHandle(){//修改
|
async reviseHandle(){//修改
|
||||||
@@ -197,13 +238,16 @@ export default {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@import "@/styles/common.scss";
|
||||||
@import '@/styles/mixin.scss';
|
@import '@/styles/mixin.scss';
|
||||||
.wrap {
|
.wrap {
|
||||||
@include wh(100%, 100%);
|
@include wh(100%, 100%);
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
}
|
}
|
||||||
|
.navBar{
|
||||||
|
margin-bottom: 46px;
|
||||||
|
}
|
||||||
.tipWrap{
|
.tipWrap{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -234,7 +278,7 @@ export default {
|
|||||||
color: #19AC43;
|
color: #19AC43;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.headerWrap{
|
/*.headerWrap{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px 16px;
|
padding: 15px 16px;
|
||||||
@@ -250,7 +294,7 @@ export default {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #203152;
|
color: #203152;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
.loadingWrap{
|
.loadingWrap{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 160px);
|
height: calc(100% - 160px);
|
||||||
|
|||||||
Reference in New Issue
Block a user