@@ -657,6 +662,50 @@ 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.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)
+ ) {
+ console.log(11111111)
+ if (!this.form.supplierCustomerAmount || parseFloat(this.form.supplierCustomerAmount) == 0) {
+ this.$toast('拖车里程超出免拖范围,请填写收取客户金额');
+ return;
+ }
+ }
if (this.form.supplierOtherAmount > 0) {
if (this.form.supplierOtherAmountRemark == '') {
this.$toast('请填写其他费用说明');
@@ -704,7 +753,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 +766,7 @@ export default {
}
})
}, 2000)
- }
+ }*/
this.loading = false;
},
async confirmAudit() {
@@ -725,6 +774,49 @@ export default {
this.$toast('已进入后续流程,不允许操作');
return;
}
+ const isBlank = (v) => v === '' || v === null || v === undefined || parseFloat(v) <= 0
+ if (this.abState && isBlank(this.form.settleMileageAb)) {
+ this.$toast('请填写到事发地距离'); return;
+ }
+ if (this.bcState && isBlank(this.form.settleMileageBc)) {
+ this.$toast('请填写拖车里程'); return;
+ }
+ if (this.caState && isBlank(this.form.settleMileageCa)) {
+ this.$toast('请填写返程里程'); return;
+ }
+ if (this.bridgeAbState && !this.isUnsuccessfulSettle && isBlank(this.form.bridgeAmountAb)) {
+ this.$toast('请填写ab路桥费'); return;
+ }
+ if (this.bridgeBcState && !this.isUnsuccessfulSettle && isBlank(this.form.bridgeAmountBc)) {
+ this.$toast('请填写bc路桥费'); return;
+ }
+ if (this.bridgeCaState && !this.isUnsuccessfulSettle && isBlank(this.form.bridgeAmountCa)) {
+ this.$toast('请填写ca路桥费'); return;
+ }
+ if (this.waitAmountState && isBlank(this.form.waitAmount)) {
+ this.$toast('请填写等候费'); return;
+ }
+ if (this.tyreAmountState && !this.isUnsuccessfulSettle && isBlank(this.form.tyreNumber)) {
+ this.$toast('请填写小轮个数'); return;
+ }
+ if (this.dilemmaAmountState && this.basePriceDisabled && isBlank(this.form.dilemmaAmount)) {
+ this.$toast('请填写困境费'); return;
+ }
+ if (this.basementFeeState && this.isBasementSettle && !this.isUnsuccessfulSettle && isBlank(this.form.basementFee)) {
+ this.$toast('请填写地库费'); return;
+ }
+ if (!this.basePriceDisabled && !this.isBasementSettle && isBlank(this.form.basePrice)) {
+ this.$toast('请填写基本费用'); return;
+ }
+ if (
+ this.orderInfo.customerDistanceLimit &&
+ parseFloat(this.form.settleMileageBc) > parseFloat(this.orderInfo.customerDistanceLimit)
+ ) {
+ if (!this.form.customerAmount || parseFloat(this.form.customerAmount) == 0) {
+ this.$toast('拖车里程超出免拖范围,请填写收取客户金额');
+ return;
+ }
+ }
this.loading1 = true;
this.form.supplierExtraPrice = this.form.extraPrice || 0
this.form.supplierBasePrice = this.form.basePrice || 0
@@ -942,7 +1034,7 @@ img {
}
.baseInfo {
- @include wh(100%, 344px);
+ width: 100%;
}