8 Commits

5 changed files with 418 additions and 34 deletions

View File

@@ -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'
})
}

View File

@@ -39,5 +39,13 @@ const authenticationRouter = [
title: '银行卡信息认证',
}
},
{
path: '/personList',
name: 'personList',
component: () => import('@/views/mine/personList.vue'),
meta:{
title: '人员信息',
}
},
]
export default authenticationRouter

View File

@@ -198,30 +198,22 @@
</div>
<div class="isJoin">
<van-radio-group v-model="vehicleStatus" :class="{ 'disabled-tree': vehicleInfoDisabled }" :disabled="vehicleInfoDisabled" @change="isVehicleChange" class="joinWrap">
<van-radio :name="1" style="margin-right: 14px">
1
<van-radio :name="1" style="margin-right: 26px">
启用
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio :name="2" style="margin-right: 14px">
1
<van-radio :name="2">
停用
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio :name="12" disabled>
-服务商停用
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
</van-radio-group>
</div>
</div>
@@ -269,7 +261,6 @@
:deletable="!disabledShow"
max-count="1"
:preview-size="54"
@click-preview="clickPreview"
/>
</div>
<div class="lineBot"></div>
@@ -344,7 +335,7 @@
</div>
</div>-->
</div>
<two-common-btn class="btn" @cancelClick="h5GoBack" @submitClick="submitBtn" />
<two-common-btn class="btn" @cancelClick="h5GoBack" @submitClick="submitAuditHandle" />
<van-calendar v-model="showDatePicker" :min-date="minDate"
:max-date="maxDate" type="range" @confirm="onConfirm" />
@@ -741,12 +732,6 @@ export default {
this.vehicleFrontPhoto = res.data;
await this.ocrCarFrontHandler()
},
clickPreview(){
console.log(' this.insurancePicturePhoto', this.insurancePicturePhoto)
if(this.insurancePicturePhoto && this.insurancePicturePhoto.indexOf('.pdf') !== -1){
window.open(this.insurancePicturePhoto.replace("http://", "https://"))
}
},
async insurancePictureFilesHandler(file) {
const formData = new FormData();
formData.append("file" , file.file);
@@ -984,9 +969,6 @@ export default {
if(key=='serviceIds'){
this.approvalForm.serviceChange[key]=this.$refs.tree.getCheckedKeys(true)
}
if(key=='vehicleType'){
this.approvalForm.serviceChange[key]=this.selectedOption?.join(',') || ''
}
});
}else {
this.vehicleInfoChange=false
@@ -1019,8 +1001,7 @@ export default {
}
}
if((this.vehicleInfoChange || this.insuranceChange) && this.id){
// this.approvalDialogShow=true
this.submitApprovalHandle()
this.approvalDialogShow=true
console.log('11111',this.approvalForm.serviceChange)
console.log('2222',this.approvalForm.insuranceChange)
}else {
@@ -1046,10 +1027,10 @@ export default {
this.$toast('车辆状态不能为空')
return
}
/* if(!this.approvalForm.serviceRemark){
if(!this.approvalForm.serviceRemark){
this.$toast('车辆和服务备注不能为空')
return
}*/
}
}
if(this.insuranceChange){
if(this.hasLiabilityInsurance === null || this.hasLiabilityInsurance === undefined || this.hasLiabilityInsurance === '') { // 有职业责任险,就需要有保单照片
@@ -1072,10 +1053,10 @@ export default {
this.$toast('保单有效期不能为空')
return
}
/* if(!this.approvalForm.insuranceRemark){
if(!this.approvalForm.insuranceRemark){
this.$toast('保单备注不能为空')
return
}*/
}
}
try {
this.loading = true;
@@ -1196,8 +1177,6 @@ export default {
timeObj = this.formatDateTimeRange(this.dateVal)
}
this.serviceIds = this.$refs.tree.getCheckedKeys(true)
console.log('1122',this.vehicleStatus)
// return
await saveVehicle({
vehicleId:this.id ? this.id : '',
plateNumber:this.carNum ? this.carNum :'',
@@ -1217,8 +1196,6 @@ export default {
liabilityInsuranceStartTime: this.hasLiabilityInsurance == 1 ? (timeObj?.startTime || '' ) : '',
liabilityInsuranceEndTime: this.hasLiabilityInsurance == 1 ? (timeObj?.endTime || '') : '',
virtualVehicle: this.virtualVehicle,
canSubmitApproval:true,
vehicleStatus:this.vehicleStatus
})
if(this.id){
this.$toast('修改成功')

View File

@@ -79,7 +79,7 @@
<div class="carItem" v-for="(item,index) in vehicleList" :key="index" @click.stop="updateVehicle(item)">
<div class="carCode">
<div class="codeLeft">{{item.plateNumber}} / {{item.vehicleTypeString}}
<span class="ml10" @click.stop="updateStatus(item)" :class="{'insuranceSuccess': item.vehicleStatus == 1, 'insuranceDanger': item.vehicleStatus == 2 ,'insuranceGray': !item.vehicleStatus }">{{ item.vehicleStatus == 1 ? '启用' :( item.vehicleStatus == 2 ? '停用' : ( item.vehicleStatus == 12 ? '否-服务商停用' : '无状态')) }} </span>
<span class="ml10" @click.stop="updateStatus(item)" :class="{'insuranceSuccess': item.vehicleStatus == 1, 'insuranceDanger': item.vehicleStatus == 2 ,'insuranceGray': !item.vehicleStatus }">{{ item.vehicleStatus == 1 ? '启用' :( item.vehicleStatus == 2 ? '停用' : '无状态') }} </span>
</div>
</div>

View File

@@ -0,0 +1,351 @@
<template>
<div class="wrap" >
<div class="headerWrap">
<div v-if="isWebFunc()" style="opacity: 0;" class="back"></div>
<!-- <img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />-->
<span>人员信息</span>
<div style="opacity: 0;" class="back"></div>
</div>
<div :class="{'tipWrap':true,'yelBg':type==3,'greBg':type==4}">
<img v-show="[1,2].includes(type)" src="@/assets/unpass.png" />
<span v-if="type==1">请立即核对或修改以下信息姓名/身份/电话/微信号/邮箱</span>
<span v-else-if="type==2">角色无法修改如需修改角色请联系区域经理提交审批后请到管理人员模块进行查看</span>
<span v-else-if="type==3">当前信息正在确认中如需调整请联系区域经理</span>
<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="itemWrap" v-for="(item,index) in personList" :key="index">
<div class="opaCol">人员{{(index+1)}}:</div>
<div class="line"></div>
<div class="item">
<div class="left" :class="{'opaCol':type!=2}"><span class="star">*</span><span>姓名</span></div>
<div class="right">
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.name" placeholder="请输入" />
</div>
</div>
<div class="item">
<div class="left opaCol"><span class="star" style="opacity: 0">*</span><span>角色</span></div>
<div class="right" :class="{'opaCol':type==2}">
<van-field :input-align="type==2 ? 'right' : 'left'" readonly v-model="item.roleName" placeholder="请输入" />
</div>
</div>
<div class="item">
<div class="left" :class="{'opaCol':type!=2}"><span class="star">*</span><span>电话1</span></div>
<div class="right">
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.phone1" placeholder="请输入" />
</div>
</div>
<div class="item">
<div class="left" :class="{'opaCol':type!=2}"><span class="star" style="opacity: 0">*</span><span>电话2</span></div>
<div class="right">
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.phone2" placeholder="请输入" />
</div>
</div>
<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(item,index)">修改</span>
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.wechatId" />
</div>
</div>
<div class="item">
<div class="left" :class="{'opaCol':type!=2}"><span class="star" style="opacity: 0">*</span><span>邮箱</span></div>
<div class="right">
<van-field :input-align="type==2 ? 'right' : 'left'" :readonly="type!=2" v-model="item.email" placeholder="请输入" />
</div>
</div>
</div>
</div>
<div class="btnWrap">
<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>
</div>
<van-dialog v-model="dialogShow" title="请先添加企微,成功添加后将更新微信号。" show-cancel-button
confirmButtonText="确认已添加" confirmButtonColor="#354E93" className="customDialog"
@confirm="wechatConfirm" @cancel="cancelHandle">
<img v-if="wechatInfo?.qrCode" :src="wechatInfo.qrCode" style="width: 83%"/>
</van-dialog>
</div>
</template>
<script>
import {myMixins} from "@/utils/myMixins"
import {getConfirmPerson,getConfirmStatus,getQrCode,confirmAddWechat,confirm} from "@/api/authentication";
import { Dialog } from 'vant';
export default {
name: "personList",
mixins:[myMixins],
data(){
return{
noClick:true,
id:'',
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:'',}],*/
dialogShow:false,
reviseIndex:-1,
supplierId:'',
wechatInfo:'',
personInfoId:'',
}
},
async mounted() {
window.addEventListener('message', (event) => {
if (event.data === 'dialogClosed') {
console.log('Dialog 已关闭 // 执行关闭后的逻辑');
}
});
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 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=[]
}
},
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){
this.$toast('必填项不可为空')
return
}
},
async reviseHandle(){//修改
this.type=2
},
async confirmHandle(){//确认信息无误
Dialog.confirm({
message:'请务必仔细确认信息是否无误。',
confirmButtonText:'确认无误',
cancelButtonText:'返回',
confirmButtonColor:'#354E93',
}).then(async() => {
console.log('确认无误')
await confirm({supplierId:this.supplierId})
setTimeout(() => {
this.goBack()
}, 1500)
}).catch(() => {
});
},
handle(){
Dialog.alert({
message:'message',
confirmButtonText:this.isWebFunc() ? '确定' : '拨打电话',
showCancelButton:true,
}).then(async() => {
}).catch(() => {
});
},
}
}
</script>
<style lang="scss">
.customDialog {
.van-dialog__content{
text-align: center !important;
}
}
</style>
<style scoped lang="scss">
@import '@/styles/mixin.scss';
.wrap {
@include wh(100%, 100%);
position: relative;
background-color: #F6F6F6;
}
.tipWrap{
width: 100%;
box-sizing: border-box;
padding: 8px 8px 8px 18px;
margin-bottom: 10px;
display: flex;
background-color: #FFF6F2;
img{
width: 14px;
height: 14px;
//vertical-align: middle;
margin-right: 5px;
margin-top: 2px;
}
span{
color: #FC3C06;
}
}
.yelBg{
background-color: #FFFFED ;
span{
color: #F36708;
}
}
.greBg{
background-color: #E8FFF3;
span{
color: #19AC43;
}
}
.headerWrap{
width: 100%;
box-sizing: border-box;
padding: 15px 16px;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
.back{
@include wh(15px,15px);
}
span{
font-weight: bold;
font-size: 16px;
color: #203152;
}
}
.loadingWrap{
width: 100%;
height: calc(100% - 160px);
text-align: center;
line-height: 200px;
}
.contentWrap{
height: calc(100% - 160px);
overflow-y: auto;
.itemWrap{
font-size: 14px;
width: 100%;
margin-bottom: 10px;
background-color: #FFFFFF;
box-sizing: border-box;
padding:10px 15px 10px 20px;
.line{
width: 100%;
text-align: center;
border-bottom: 2px solid;
opacity: 0.16;
margin-top: 10px;
border-image: linear-gradient(270deg, rgba(217, 217, 217, 0.6), rgba(178, 178, 178, 1), rgba(178, 178, 178, 1), rgba(217, 217, 217, 0.6)) 1 1;
}
.item{
//line-height: 36px;
display: flex;
align-items: center;
.left{
width: 66px;
}
.right{
flex: 1;
}
.wechatRight{
display: flex;
align-items: center;
justify-content: space-between;
.reviseBtn{
display: inline-block;
width: 60px;
text-align: center;
border-radius: 4px;
background-color: #354D93;
color: #FFFFFF;
box-sizing: border-box;
padding: 2px 0;
}
}
}
.opaCol{
color: #323643;
opacity: .65;
}
.star{
font-weight: bold;
font-size: 13px;
color: #FF0808;
}
}
}
.btnWrap{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
box-sizing: border-box;
padding: 10px 19px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #F6F6F6;
.common{
background: #354D93;
height: 48px;
line-height: 48px;
text-align: center;
border-radius: 5px;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
cursor: pointer;
}
.audit{
width: 100%;
}
.revise{
width: 30%;
background-color: #FFFFFF;
color: #354D93;
box-sizing: border-box;
border: 1px solid #354D93;
}
.confirm{
width: 67%;
}
}
</style>