Compare commits
6 Commits
4b94c614ad
...
prod-26-04
| Author | SHA1 | Date | |
|---|---|---|---|
| ea5881f844 | |||
| e366cea0a5 | |||
| e34dc1be05 | |||
| 424ef98798 | |||
| 37aeba20da | |||
| a9382c11a4 |
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="error_bar" v-if="errorMsg">{{ errorMsg }}</div>
|
||||
<div class="top_banner">
|
||||
<img src="@/assets/supplier/topBg.png" alt="">
|
||||
</div>
|
||||
@@ -134,6 +135,7 @@
|
||||
data() {
|
||||
return {
|
||||
clickFlag: true,
|
||||
errorMsg: '',
|
||||
phoneVerify: [{ required: true, message: '请输入联系电话' }, { validator: value => { return /^1[3456789]\d{9}$/.test(value) }, message: '联系电话格式不正确' }],
|
||||
emailVerify: [{ required: true, message: '请输入邮箱' }, { validator: value => { return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value) }, message: '邮箱格式不正确' }],
|
||||
id:'', //车辆Id
|
||||
@@ -231,7 +233,11 @@
|
||||
this.idBackPhoto = _data?.idCardBackUrl;
|
||||
this.companyPhoto = _data?.businessLicense;
|
||||
this.licensePhoto = _data?.accountUrl;
|
||||
this.wechatId = _data?.wechatId
|
||||
this.wechatId = _data?.wechatId;
|
||||
this.form.person = _data.legalName;
|
||||
if( _data.failReason ) {
|
||||
this.showError(_data.failReason)
|
||||
}
|
||||
if(this.idFrontPhoto) {
|
||||
this.idFrontPhotoList = [{ url : this.idFrontPhoto }];
|
||||
}
|
||||
@@ -252,44 +258,54 @@
|
||||
// this.form.serviceAreaCode = _data?.serviceAreaCode.split(',').map(item => Number(item));
|
||||
}
|
||||
},
|
||||
showError(msg) {
|
||||
this.errorMsg = msg;
|
||||
},
|
||||
async applyAdd() {
|
||||
this.errorMsg = '';
|
||||
if( !this.idFrontPhoto ) {
|
||||
this.$toast('法人身份证人像页未上传')
|
||||
this.showError('法人身份证人像页未上传')
|
||||
return
|
||||
}
|
||||
if( !this.idBackPhoto ) {
|
||||
this.$toast('法人身份证国徽页未上传')
|
||||
this.showError('法人身份证国徽页未上传')
|
||||
return
|
||||
}
|
||||
if( !this.companyPhoto ) {
|
||||
this.$toast('营业执照未上传')
|
||||
this.showError('营业执照未上传')
|
||||
return
|
||||
}
|
||||
if(this.form.person != this.form.legalName){
|
||||
this.$toast('身份证法人姓名和营业执照法人不一致')
|
||||
this.showError('身份证法人姓名和营业执照法人不一致')
|
||||
return
|
||||
}
|
||||
if( !this.licensePhoto ) {
|
||||
this.$toast('开户许可证未上传')
|
||||
this.showError('开户许可证未上传')
|
||||
return
|
||||
}
|
||||
if( !(this.$refs.tree.getCheckedKeys().length > 0) ) {
|
||||
this.showError('服务能力不能为空')
|
||||
return
|
||||
}
|
||||
if( !(this.form.serviceAreaCode.length > 0) ) {
|
||||
this.$toast('服务区域不能为空')
|
||||
this.showError('服务区域不能为空')
|
||||
return
|
||||
}
|
||||
if( !this.qrCode && !this.id) {
|
||||
await this.QrCodeHandler();
|
||||
this.showError('请先添加下方企微再申请')
|
||||
return
|
||||
}
|
||||
// this.wechatId='wmOTNXBwAABrvKkE_Fh8ZN8Xm2S9v2wQ'
|
||||
if(!this.wechatId) {
|
||||
await this.QrCodeResult();
|
||||
if( !this.wechatId ) {
|
||||
this.$toast('请先添加企微再申请')
|
||||
this.showError('请先添加企微再申请')
|
||||
return
|
||||
}
|
||||
}
|
||||
if( this.$refs.tree.getCheckedKeys().length > 0 ) {
|
||||
await this.saveHandler()
|
||||
} else {
|
||||
this.$toast('服务能力不能为空')
|
||||
return
|
||||
}
|
||||
},
|
||||
async QrCodeResult() { //获取添加企微结果
|
||||
@@ -330,6 +346,8 @@
|
||||
this.clickFlag = true
|
||||
}, 1000)
|
||||
});
|
||||
} catch (e) {
|
||||
this.showError(e)
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
this.clickFlag = true
|
||||
@@ -428,7 +446,7 @@
|
||||
this.form.accountInfoDTO.companyType=res?.data?.type
|
||||
// 营业执照法人名称
|
||||
this.form.person = res?.data?.person
|
||||
await this.QrCodeHandler();
|
||||
// await this.QrCodeHandler();
|
||||
},
|
||||
async licensePhotoHandler(file){// 开户许可证
|
||||
const formData = new FormData();
|
||||
@@ -442,8 +460,8 @@
|
||||
ocrType: 15,
|
||||
imageUrl: this.licensePhoto,
|
||||
})
|
||||
this.form.accountInfoDTO.accountNumber=res?.data?.accountNumber
|
||||
this.form.accountInfoDTO.accountName = res?.data?.accountBank
|
||||
this.form.accountInfoDTO.accountNumber=res?.data?.accountNumber || ''
|
||||
this.form.accountInfoDTO.accountName = res?.data?.accountBank || ''
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
@@ -463,6 +481,17 @@
|
||||
padding-bottom: 100px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.error_bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
background-color: #e53935;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
padding: 10px 16px;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.top_banner {
|
||||
width: 100%;
|
||||
img {
|
||||
|
||||
@@ -54,6 +54,11 @@
|
||||
<span
|
||||
class="content">{{ orderInfo.carClothingToolAmount }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">免拖:</span>
|
||||
<span
|
||||
class="content">{{ orderInfo.customerDistanceLimit }} {{orderInfo.hedgingMileage && orderInfo.hedgingMileage > 0 ? '(超限对冲,只结免拖)' : ''}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">换电瓶费用:</span>
|
||||
<span
|
||||
@@ -72,35 +77,35 @@
|
||||
<div class="inpInfo">
|
||||
<div class="titleContent">
|
||||
<div class="flex-between" v-show="abState">
|
||||
<div> 到事发地距离:</div>
|
||||
<div><span style="color: red;">*</span> 到事发地距离:</div>
|
||||
<div class="halfOpcity"><input @input="validateIntegerInput" class="ipt" type="number" v-model="form.supplierSettleMileageAb"/>公里</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="bcState">
|
||||
<div> 拖车里程:</div>
|
||||
<div><span style="color: red;">*</span> 拖车里程:</div>
|
||||
<div class="halfOpcity"><input class="ipt" type="number" v-model="form.supplierSettleMileageBc"/>公里</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="caState">
|
||||
<div>返程里程:</div>
|
||||
<div><span style="color: red;">*</span>返程里程:</div>
|
||||
<div class="halfOpcity"><input class="ipt" type="number" v-model="form.supplierSettleMileageCa"/>公里</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="bridgeAbState">
|
||||
<div>ab路桥费:</div>
|
||||
<div><span v-show="!isUnsuccessfulSettle" style="color: red;">*</span>ab路桥费:</div>
|
||||
<div class="halfOpcity"><input class="ipt" @input="validateIntegerInput" :disabled="isUnsuccessfulSettle" type="number" v-model="form.supplierBridgeAmountAb"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="bridgeBcState">
|
||||
<div>bc路桥费:</div>
|
||||
<div><span v-show="!isUnsuccessfulSettle" style="color: red;">*</span>bc路桥费:</div>
|
||||
<div class="halfOpcity"><input class="ipt" @input="validateIntegerInput" :disabled="isUnsuccessfulSettle" type="number" v-model="form.supplierBridgeAmountBc"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="bridgeCaState">
|
||||
<div>ca路桥费:</div>
|
||||
<div><span v-show="!isUnsuccessfulSettle" style="color: red;">*</span>ca路桥费:</div>
|
||||
<div class="halfOpcity"><input class="ipt" @input="validateIntegerInput" :disabled="isUnsuccessfulSettle" type="number" v-model="form.supplierBridgeAmountCa"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="waitAmountState">
|
||||
<div>等候费:</div>
|
||||
<div><span style="color: red;">*</span>等候费:</div>
|
||||
<div class="halfOpcity inputContent"><input class="ipt" @input="validateIntegerInput" type="number" v-model="form.supplierWaitAmount"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="tyreAmountState">
|
||||
<div>小轮个数:</div>
|
||||
<div><span v-show="!isUnsuccessfulSettle" style="color: red;">*</span>小轮个数:</div>
|
||||
<div class="halfOpcity inputContent"><input class="ipt" @input="validateIntegerInput" :disabled="isUnsuccessfulSettle" type="number" v-model="form.tyreNumber"/>个</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="tyreAmountState">
|
||||
@@ -108,11 +113,11 @@
|
||||
<div class="halfOpcity inputContent"><input @input="validateIntegerInput" disabled type="number" v-model="form.supplierTyreAmount"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="dilemmaAmountState && basePriceDisabled">
|
||||
<div>困境费:</div>
|
||||
<div><span style="color: red;">*</span>困境费:</div>
|
||||
<div class="halfOpcity inputContent"><input class="ipt" @input="validateIntegerInput" type="number" v-model="form.supplierDilemmaAmount"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between" v-show="basementFeeState">
|
||||
<div>地库费:</div>
|
||||
<div><span v-show="isBasementSettle && !isUnsuccessfulSettle" style="color: red;">*</span>地库费:</div>
|
||||
<div class="halfOpcity inputContent"><input @input="validateIntegerInput" class="ipt" type="number" v-model="form.supplierBasementFee" :disabled="!isBasementSettle || isUnsuccessfulSettle" />元</div>
|
||||
</div>
|
||||
<div class="flex-between">
|
||||
@@ -120,7 +125,7 @@
|
||||
<div class="halfOpcity inputContent"><input type="number" class="ipt" v-model="form.supplierCustomerAmount"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between bgDisable" :class=" { 'flex-between': true, 'bgDisable' : basePriceDisabled } ">
|
||||
<div>基本费用:</div>
|
||||
<div><span v-show="!basePriceDisabled && !isBasementSettle" style="color: red;">*</span>基本费用:</div>
|
||||
<div class="halfOpcity inputContent "><input class="disable" type="number" :readonly="basePriceDisabled || isBasementSettle"
|
||||
v-model="form.supplierBasePrice"/><span>元</span></div>
|
||||
</div>
|
||||
@@ -502,6 +507,7 @@ export default {
|
||||
})
|
||||
},
|
||||
async compute() {
|
||||
alert(11111)
|
||||
if(this.orderInfo.contractSettleTypeString == '车主现收'){
|
||||
this.form.supplierBasePrice = 0
|
||||
this.form.supplierExtraPrice = 0
|
||||
@@ -657,6 +663,49 @@ export default {
|
||||
this.goback()
|
||||
},
|
||||
async save() {
|
||||
const isBlank = (v) => v === '' || v === null || v === undefined || parseFloat(v) < 0
|
||||
if (this.abState && isBlank(this.form.supplierSettleMileageAb)) {
|
||||
this.$toast('请填写到事发地距离'); return;
|
||||
}
|
||||
if (this.bcState && isBlank(this.form.supplierSettleMileageBc)) {
|
||||
this.$toast('请填写拖车里程'); return;
|
||||
}
|
||||
if (this.caState && isBlank(this.form.supplierSettleMileageCa)) {
|
||||
this.$toast('请填写返程里程'); return;
|
||||
}
|
||||
if (this.bridgeAbState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountAb)) {
|
||||
this.$toast('请填写ab路桥费'); return;
|
||||
}
|
||||
if (this.bridgeBcState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountBc)) {
|
||||
this.$toast('请填写bc路桥费'); return;
|
||||
}
|
||||
if (this.bridgeCaState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountCa)) {
|
||||
this.$toast('请填写ca路桥费'); return;
|
||||
}
|
||||
if (this.waitAmountState && isBlank(this.form.supplierWaitAmount)) {
|
||||
this.$toast('请填写等候费'); return;
|
||||
}
|
||||
if (!this.auditFormShow && this.tyreAmountState && !this.isUnsuccessfulSettle && isBlank(this.form.tyreNumber)) {
|
||||
this.$toast('请填写小轮个数'); return;
|
||||
}
|
||||
if (this.dilemmaAmountState && this.basePriceDisabled && isBlank(this.form.supplierDilemmaAmount)) {
|
||||
this.$toast('请填写困境费'); return;
|
||||
}
|
||||
if (this.basementFeeState && this.isBasementSettle && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBasementFee)) {
|
||||
this.$toast('请填写地库费'); return;
|
||||
}
|
||||
if (!this.basePriceDisabled && !this.isBasementSettle && isBlank(this.form.supplierBasePrice)) {
|
||||
this.$toast('请填写基本费用'); return;
|
||||
}
|
||||
if (
|
||||
this.orderInfo.customerDistanceLimit &&
|
||||
parseFloat(this.form.supplierSettleMileageBc) > parseFloat(this.orderInfo.customerDistanceLimit)
|
||||
) {
|
||||
if (!this.form.supplierCustomerAmount || parseFloat(this.form.supplierCustomerAmount) == 0) {
|
||||
this.$toast('拖车里程超出免拖范围,请填写收取客户金额');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.form.supplierOtherAmount > 0) {
|
||||
if (this.form.supplierOtherAmountRemark == '') {
|
||||
this.$toast('请填写其他费用说明');
|
||||
@@ -694,6 +743,7 @@ export default {
|
||||
await this.compute();
|
||||
const formData = new FormData();
|
||||
let obj = this.form;
|
||||
console.log('obj',obj)
|
||||
Object.keys(obj).forEach((key) => {
|
||||
formData.append(key, obj[key]);
|
||||
});
|
||||
@@ -704,7 +754,7 @@ export default {
|
||||
formData.append('state', 0);
|
||||
formData.append('postfix', this.postfix);
|
||||
formData.append('supplierBridgeAmount', parseInt(this.form.supplierBridgeAmountAb || 0) + parseInt(this.form.supplierBridgeAmountBc || 0) + parseInt(this.form.supplierBridgeAmountCa || 0));
|
||||
let res = await updateAccountRecordInfo(formData);
|
||||
/*let res = await updateAccountRecordInfo(formData);
|
||||
if (res.code === 200) {
|
||||
this.$toast('操作成功')
|
||||
setTimeout(() => {
|
||||
@@ -717,7 +767,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
}*/
|
||||
this.loading = false;
|
||||
},
|
||||
async confirmAudit() {
|
||||
@@ -725,6 +775,45 @@ export default {
|
||||
this.$toast('已进入后续流程,不允许操作');
|
||||
return;
|
||||
}
|
||||
const isBlank = (v) => v === '' || v === null || v === undefined || parseFloat(v) < 0
|
||||
if (this.abState && isBlank(this.form.supplierSettleMileageAb)) {
|
||||
this.$toast('请填写到事发地距离'); return;
|
||||
}
|
||||
if (this.bcState && isBlank(this.form.supplierSettleMileageBc)) {
|
||||
this.$toast('请填写拖车里程'); return;
|
||||
}
|
||||
if (this.caState && isBlank(this.form.supplierSettleMileageCa)) {
|
||||
this.$toast('请填写返程里程'); return;
|
||||
}
|
||||
if (this.bridgeAbState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountAb)) {
|
||||
this.$toast('请填写ab路桥费'); return;
|
||||
}
|
||||
if (this.bridgeBcState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountBc)) {
|
||||
this.$toast('请填写bc路桥费'); return;
|
||||
}
|
||||
if (this.bridgeCaState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountCa)) {
|
||||
this.$toast('请填写ca路桥费'); return;
|
||||
}
|
||||
if (this.waitAmountState && isBlank(this.form.supplierWaitAmount)) {
|
||||
this.$toast('请填写等候费'); return;
|
||||
}
|
||||
if (this.dilemmaAmountState && this.basePriceDisabled && isBlank(this.form.supplierDilemmaAmount)) {
|
||||
this.$toast('请填写困境费'); return;
|
||||
}
|
||||
if (this.basementFeeState && this.isBasementSettle && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBasementFee)) {
|
||||
this.$toast('请填写地库费'); return;
|
||||
}
|
||||
if (!this.basePriceDisabled && !this.isBasementSettle && isBlank(this.form.supplierBasePrice)) {
|
||||
this.$toast('请填写基本费用'); return;
|
||||
}
|
||||
if (
|
||||
this.orderInfo.customerDistanceLimit &&
|
||||
parseFloat(this.form.supplierSettleMileageBc) > parseFloat(this.orderInfo.customerDistanceLimit)
|
||||
) {
|
||||
if (!this.form.supplierCustomerAmount || parseFloat(this.form.supplierCustomerAmount) == 0) {
|
||||
this.$toast('拖车里程超出免拖范围,请填写收取客户金额'); return;
|
||||
}
|
||||
}
|
||||
this.loading1 = true;
|
||||
this.form.supplierExtraPrice = this.form.extraPrice || 0
|
||||
this.form.supplierBasePrice = this.form.basePrice || 0
|
||||
@@ -760,7 +849,7 @@ export default {
|
||||
formData.append('state', 0);
|
||||
formData.append('postfix', this.postfix);
|
||||
formData.append('supplierBridgeAmount', parseInt(this.form.supplierBridgeAmountAb || 0) + parseInt(this.form.supplierBridgeAmountBc || 0) + parseInt(this.form.supplierBridgeAmountCa || 0));
|
||||
let res = await updateAccountRecordInfo(formData);
|
||||
/*let res = await updateAccountRecordInfo(formData);
|
||||
if (res.code === 200) {
|
||||
this.$toast('操作成功')
|
||||
setTimeout(() => {
|
||||
@@ -773,7 +862,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
}*/
|
||||
this.loading1 = false;
|
||||
},
|
||||
|
||||
@@ -942,7 +1031,7 @@ img {
|
||||
}
|
||||
|
||||
.baseInfo {
|
||||
@include wh(100%, 344px);
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user