From 65c33e54f533f3d19f400a9884fd2e43a0281f1a Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Mon, 19 Aug 2024 17:24:41 +0800 Subject: [PATCH] =?UTF-8?q?task#14504,=E8=AE=B0=E8=B4=A6=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workOrder/accounting.vue | 58 +++++++++++++++++------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/src/views/workOrder/accounting.vue b/src/views/workOrder/accounting.vue index 1ca5f152..edf4ebed 100644 --- a/src/views/workOrder/accounting.vue +++ b/src/views/workOrder/accounting.vue @@ -380,6 +380,7 @@ export default { carClothingToolAmount: '', replaceBatteryAmount: '', supplierSettleRatio:{}, + contractSettleTypeString:'', }, noClick: true, loading: false, @@ -408,7 +409,7 @@ export default { }, //保险实拖案件,剔除人保和太平事故 isCPICDrag() { - return this.settleType == '实拖' && !['PICC10101', 'PICCSHANGQI', 'PICC101099', 'SAIPCC2021', ''].includes(this.appCode) + return this.settleType == '实拖' && this.orderInfo?.contractType == 1 && !['PICC10101', 'PICCSHANGQI', 'PICC101099', 'SAIPCC2021', ''].includes(this.appCode) && !(this.appCode.indexOf("TAIPING") != -1 && this.orderInfo?.malfunctionReason == 2) }, isBasement() { return this.serviceType == '困境救援' || this.serviceType == '困境-吊车' || this.serviceType == '困境救援-事故' || this.serviceType == '困境救援-故障' @@ -485,31 +486,37 @@ export default { }) }, async compute() { - if (this.form.supplierOtherAmount > 0) { - if (this.form.supplierOtherAmountRemark == '') { - this.$alert('请填写其他费用说明'); - return; - } - } - if (!this.basePriceDisabled && !this.isBasementSettle) { - //困境的案件,或者一口价案件,基本费用可以输入 - let dilemmaBasePrice = parseFloat(this.form.supplierBasePrice) || 0 - this.form.supplierBasePrice = dilemmaBasePrice + if(this.orderInfo.contractSettleTypeString == '车主现收'){ + this.form.supplierBasePrice = 0 this.form.supplierExtraPrice = 0 - this.form.supplierSettleAmount = dilemmaBasePrice - (parseFloat(this.form.supplierCustomerAmount) || 0) - } else { - let data = await accountRecordCompute({ - ...this.form, - settleType: this.orderInfo.settleType?.code - }); - this.form.supplierBasePrice = data.data.basePrice - this.form.supplierExtraPrice = data.data.extraPrice - this.form.supplierSettleAmount = data.data.totalPrice + this.form.supplierSettleAmount = 0 + }else { + if (this.form.supplierOtherAmount > 0) { + if (this.form.supplierOtherAmountRemark == '') { + this.$alert('请填写其他费用说明'); + return; + } + } + if (!this.basePriceDisabled && !this.isBasementSettle) { + //困境的案件,或者一口价案件,基本费用可以输入 + let dilemmaBasePrice = parseFloat(this.form.supplierBasePrice) || 0 + this.form.supplierBasePrice = dilemmaBasePrice + this.form.supplierExtraPrice = 0 + this.form.supplierSettleAmount = dilemmaBasePrice - (parseFloat(this.form.supplierCustomerAmount) || 0) + } else { + let data = await accountRecordCompute({ + ...this.form, + settleType: this.orderInfo.settleType?.code + }); + this.form.supplierBasePrice = data.data.basePrice + this.form.supplierExtraPrice = data.data.extraPrice + this.form.supplierSettleAmount = data.data.totalPrice + } + // } + /*if(this.form.cutInsuranceAmount == 1 && this.form.policyState === 0){ + this.form.supplierSettleAmount = parseFloat(parseFloat(this.form.supplierSettleAmount) - parseFloat(this.form.policyAmount || 0)).toFixed(2) + }*/ } - // } - /*if(this.form.cutInsuranceAmount == 1 && this.form.policyState === 0){ - this.form.supplierSettleAmount = parseFloat(parseFloat(this.form.supplierSettleAmount) - parseFloat(this.form.policyAmount || 0)).toFixed(2) - }*/ if (this.form.policyAmount && this.form.policyAmount > 0) { this.form.supplierSettleAmount = parseFloat(parseFloat(this.form.supplierSettleAmount) - parseFloat(this.form.policyAmount || 0)).toFixed(2) } @@ -552,10 +559,11 @@ export default { if (res.code === 200) { this.orderInfo = res.data console.log("this.orderInfo", this.orderInfo) + this.accountStatus = this.orderInfo.accountStatus?.code + this.serviceType = this.orderInfo.serviceName this.taskFlowId = this.orderInfo.taskFlowId this.settleType = this.orderInfo.settleType?.label - this.accountStatus = this.orderInfo.accountStatus?.code this.appCode = this.orderInfo.appCode this.fixedPrice = this.orderInfo.fixedPrice this.fixedPriceType = this.orderInfo.fixedPriceType