Compare commits
3 Commits
1f7ce0da6d
...
prod-26-04
| Author | SHA1 | Date | |
|---|---|---|---|
| ea5881f844 | |||
| e366cea0a5 | |||
| e34dc1be05 |
@@ -507,6 +507,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async compute() {
|
async compute() {
|
||||||
|
alert(11111)
|
||||||
if(this.orderInfo.contractSettleTypeString == '车主现收'){
|
if(this.orderInfo.contractSettleTypeString == '车主现收'){
|
||||||
this.form.supplierBasePrice = 0
|
this.form.supplierBasePrice = 0
|
||||||
this.form.supplierExtraPrice = 0
|
this.form.supplierExtraPrice = 0
|
||||||
@@ -662,7 +663,7 @@ export default {
|
|||||||
this.goback()
|
this.goback()
|
||||||
},
|
},
|
||||||
async save() {
|
async save() {
|
||||||
const isBlank = (v) => v === '' || v === null || v === undefined || parseFloat(v) <= 0
|
const isBlank = (v) => v === '' || v === null || v === undefined || parseFloat(v) < 0
|
||||||
if (this.abState && isBlank(this.form.supplierSettleMileageAb)) {
|
if (this.abState && isBlank(this.form.supplierSettleMileageAb)) {
|
||||||
this.$toast('请填写到事发地距离'); return;
|
this.$toast('请填写到事发地距离'); return;
|
||||||
}
|
}
|
||||||
@@ -684,7 +685,7 @@ export default {
|
|||||||
if (this.waitAmountState && isBlank(this.form.supplierWaitAmount)) {
|
if (this.waitAmountState && isBlank(this.form.supplierWaitAmount)) {
|
||||||
this.$toast('请填写等候费'); return;
|
this.$toast('请填写等候费'); return;
|
||||||
}
|
}
|
||||||
if (this.tyreAmountState && !this.isUnsuccessfulSettle && isBlank(this.form.tyreNumber)) {
|
if (!this.auditFormShow && this.tyreAmountState && !this.isUnsuccessfulSettle && isBlank(this.form.tyreNumber)) {
|
||||||
this.$toast('请填写小轮个数'); return;
|
this.$toast('请填写小轮个数'); return;
|
||||||
}
|
}
|
||||||
if (this.dilemmaAmountState && this.basePriceDisabled && isBlank(this.form.supplierDilemmaAmount)) {
|
if (this.dilemmaAmountState && this.basePriceDisabled && isBlank(this.form.supplierDilemmaAmount)) {
|
||||||
@@ -700,7 +701,6 @@ export default {
|
|||||||
this.orderInfo.customerDistanceLimit &&
|
this.orderInfo.customerDistanceLimit &&
|
||||||
parseFloat(this.form.supplierSettleMileageBc) > parseFloat(this.orderInfo.customerDistanceLimit)
|
parseFloat(this.form.supplierSettleMileageBc) > parseFloat(this.orderInfo.customerDistanceLimit)
|
||||||
) {
|
) {
|
||||||
console.log(11111111)
|
|
||||||
if (!this.form.supplierCustomerAmount || parseFloat(this.form.supplierCustomerAmount) == 0) {
|
if (!this.form.supplierCustomerAmount || parseFloat(this.form.supplierCustomerAmount) == 0) {
|
||||||
this.$toast('拖车里程超出免拖范围,请填写收取客户金额');
|
this.$toast('拖车里程超出免拖范围,请填写收取客户金额');
|
||||||
return;
|
return;
|
||||||
@@ -743,6 +743,7 @@ export default {
|
|||||||
await this.compute();
|
await this.compute();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
let obj = this.form;
|
let obj = this.form;
|
||||||
|
console.log('obj',obj)
|
||||||
Object.keys(obj).forEach((key) => {
|
Object.keys(obj).forEach((key) => {
|
||||||
formData.append(key, obj[key]);
|
formData.append(key, obj[key]);
|
||||||
});
|
});
|
||||||
@@ -753,7 +754,7 @@ export default {
|
|||||||
formData.append('state', 0);
|
formData.append('state', 0);
|
||||||
formData.append('postfix', this.postfix);
|
formData.append('postfix', this.postfix);
|
||||||
formData.append('supplierBridgeAmount', parseInt(this.form.supplierBridgeAmountAb || 0) + parseInt(this.form.supplierBridgeAmountBc || 0) + parseInt(this.form.supplierBridgeAmountCa || 0));
|
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) {
|
if (res.code === 200) {
|
||||||
this.$toast('操作成功')
|
this.$toast('操作成功')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -774,47 +775,43 @@ export default {
|
|||||||
this.$toast('已进入后续流程,不允许操作');
|
this.$toast('已进入后续流程,不允许操作');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const isBlank = (v) => v === '' || v === null || v === undefined || parseFloat(v) <= 0
|
const isBlank = (v) => v === '' || v === null || v === undefined || parseFloat(v) < 0
|
||||||
if (this.abState && isBlank(this.form.settleMileageAb)) {
|
if (this.abState && isBlank(this.form.supplierSettleMileageAb)) {
|
||||||
this.$toast('请填写到事发地距离'); return;
|
this.$toast('请填写到事发地距离'); return;
|
||||||
}
|
}
|
||||||
if (this.bcState && isBlank(this.form.settleMileageBc)) {
|
if (this.bcState && isBlank(this.form.supplierSettleMileageBc)) {
|
||||||
this.$toast('请填写拖车里程'); return;
|
this.$toast('请填写拖车里程'); return;
|
||||||
}
|
}
|
||||||
if (this.caState && isBlank(this.form.settleMileageCa)) {
|
if (this.caState && isBlank(this.form.supplierSettleMileageCa)) {
|
||||||
this.$toast('请填写返程里程'); return;
|
this.$toast('请填写返程里程'); return;
|
||||||
}
|
}
|
||||||
if (this.bridgeAbState && !this.isUnsuccessfulSettle && isBlank(this.form.bridgeAmountAb)) {
|
if (this.bridgeAbState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountAb)) {
|
||||||
this.$toast('请填写ab路桥费'); return;
|
this.$toast('请填写ab路桥费'); return;
|
||||||
}
|
}
|
||||||
if (this.bridgeBcState && !this.isUnsuccessfulSettle && isBlank(this.form.bridgeAmountBc)) {
|
if (this.bridgeBcState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountBc)) {
|
||||||
this.$toast('请填写bc路桥费'); return;
|
this.$toast('请填写bc路桥费'); return;
|
||||||
}
|
}
|
||||||
if (this.bridgeCaState && !this.isUnsuccessfulSettle && isBlank(this.form.bridgeAmountCa)) {
|
if (this.bridgeCaState && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBridgeAmountCa)) {
|
||||||
this.$toast('请填写ca路桥费'); return;
|
this.$toast('请填写ca路桥费'); return;
|
||||||
}
|
}
|
||||||
if (this.waitAmountState && isBlank(this.form.waitAmount)) {
|
if (this.waitAmountState && isBlank(this.form.supplierWaitAmount)) {
|
||||||
this.$toast('请填写等候费'); return;
|
this.$toast('请填写等候费'); return;
|
||||||
}
|
}
|
||||||
if (this.tyreAmountState && !this.isUnsuccessfulSettle && isBlank(this.form.tyreNumber)) {
|
if (this.dilemmaAmountState && this.basePriceDisabled && isBlank(this.form.supplierDilemmaAmount)) {
|
||||||
this.$toast('请填写小轮个数'); return;
|
|
||||||
}
|
|
||||||
if (this.dilemmaAmountState && this.basePriceDisabled && isBlank(this.form.dilemmaAmount)) {
|
|
||||||
this.$toast('请填写困境费'); return;
|
this.$toast('请填写困境费'); return;
|
||||||
}
|
}
|
||||||
if (this.basementFeeState && this.isBasementSettle && !this.isUnsuccessfulSettle && isBlank(this.form.basementFee)) {
|
if (this.basementFeeState && this.isBasementSettle && !this.isUnsuccessfulSettle && isBlank(this.form.supplierBasementFee)) {
|
||||||
this.$toast('请填写地库费'); return;
|
this.$toast('请填写地库费'); return;
|
||||||
}
|
}
|
||||||
if (!this.basePriceDisabled && !this.isBasementSettle && isBlank(this.form.basePrice)) {
|
if (!this.basePriceDisabled && !this.isBasementSettle && isBlank(this.form.supplierBasePrice)) {
|
||||||
this.$toast('请填写基本费用'); return;
|
this.$toast('请填写基本费用'); return;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.orderInfo.customerDistanceLimit &&
|
this.orderInfo.customerDistanceLimit &&
|
||||||
parseFloat(this.form.settleMileageBc) > parseFloat(this.orderInfo.customerDistanceLimit)
|
parseFloat(this.form.supplierSettleMileageBc) > parseFloat(this.orderInfo.customerDistanceLimit)
|
||||||
) {
|
) {
|
||||||
if (!this.form.customerAmount || parseFloat(this.form.customerAmount) == 0) {
|
if (!this.form.supplierCustomerAmount || parseFloat(this.form.supplierCustomerAmount) == 0) {
|
||||||
this.$toast('拖车里程超出免拖范围,请填写收取客户金额');
|
this.$toast('拖车里程超出免拖范围,请填写收取客户金额'); return;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading1 = true;
|
this.loading1 = true;
|
||||||
@@ -852,7 +849,7 @@ export default {
|
|||||||
formData.append('state', 0);
|
formData.append('state', 0);
|
||||||
formData.append('postfix', this.postfix);
|
formData.append('postfix', this.postfix);
|
||||||
formData.append('supplierBridgeAmount', parseInt(this.form.supplierBridgeAmountAb || 0) + parseInt(this.form.supplierBridgeAmountBc || 0) + parseInt(this.form.supplierBridgeAmountCa || 0));
|
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) {
|
if (res.code === 200) {
|
||||||
this.$toast('操作成功')
|
this.$toast('操作成功')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -865,7 +862,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}*/
|
||||||
this.loading1 = false;
|
this.loading1 = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user