diff --git a/pages/order/add.vue b/pages/order/add.vue index d1edc97..23403d1 100644 --- a/pages/order/add.vue +++ b/pages/order/add.vue @@ -468,9 +468,9 @@ export default { // this.form.prepaidAmount = res.result.prepaidAmount || prepaidAmount; // this.form.oilAmount = res.result.oilAmount || oilAmount; if (this.autoComputedArrival) { - this.form.deliveryAmount = res.result.deliveryAmount || deliveryAmount; + this.form.deliveryAmount = res.result.deliveryAmount || '0'; } else { - this.form.balancePaymentAmount = res.result.balancePaymentAmount || balancePaymentAmount; + this.form.balancePaymentAmount = res.result.balancePaymentAmount || '0'; } this.form.oilPayRebateRate = res.result.oilPayRebateRate || ''; this.form.driverSecurityServiceAmount = res.result.driverSecurityServiceAmount || ''; diff --git a/pages/order/change-fee.vue b/pages/order/change-fee.vue index 5c07348..4f70393 100644 --- a/pages/order/change-fee.vue +++ b/pages/order/change-fee.vue @@ -206,6 +206,7 @@ export default { prepaidAmount: prePay.amount, deliveryAmount: arrivalPay.amount, balancePaymentAmount: finalPay.amount || 0, + securityServiceAmount: this.item.securityServiceAmount || '', }; }, computedService() { @@ -227,11 +228,14 @@ export default { }; uni.$u.api.freightOrder.getServiceAmount(params).then(res => { if (res.success) { - this.form.paidAmount = res.result.paidAmount || paidAmount; - this.form.prepaidAmount = res.result.prepaidAmount || prepaidAmount; - this.form.oilAmount = res.result.oilAmount || oilAmount; - this.form.deliveryAmount = res.result.deliveryAmount || '0'; - this.form.balancePaymentAmount = res.result.balancePaymentAmount || '0'; + // this.form.paidAmount = res.result.paidAmount || paidAmount; + // this.form.prepaidAmount = res.result.prepaidAmount || prepaidAmount; + // this.form.oilAmount = res.result.oilAmount || oilAmount; + if (this.autoComputedArrival) { + this.form.deliveryAmount = res.result.deliveryAmount || '0'; + } else { + this.form.balancePaymentAmount = res.result.balancePaymentAmount || '0'; + } this.form.driverSecurityServiceAmount = res.result.driverSecurityServiceAmount || '0'; this.form.securityServiceAmount = res.result.securityServiceAmount || '0'; this.form.serviceAmount = res.result.serviceAmount || '0'; @@ -240,10 +244,10 @@ export default { }, submit() { let params = [ - { ...this.oilAmount, afterAmount: this.form.oilAmount }, - { ...this.prePay, afterAmount: this.form.prepaidAmount }, - { ...this.arrivalPay, afterAmount: this.form.deliveryAmount }, - { ...this.final, afterAmount: this.form.balancePaymentAmount }, + { ...this.oilAmount, afterAmount: this.form.oilAmount === '' ? '0' : this.form.oilAmount }, + { ...this.prePay, afterAmount: this.form.prepaidAmount === '' ? '0' : this.form.prepaidAmount }, + { ...this.arrivalPay, afterAmount: this.form.deliveryAmount === '' ? '0' : this.form.deliveryAmount }, + { ...this.final, afterAmount: this.form.balancePaymentAmount === '' ? '0' : this.form.balancePaymentAmount }, ]; uni.$u.api.freightOrder.adjustAmount({ feeList: params, code: this.item.code, paidAmount: this.form.paidAmount, freightAdjustRemark: this.form.freightAdjustRemark }).then(res => { if (res.success) { diff --git a/pages/order/detail.vue b/pages/order/detail.vue index abdf414..1175ea1 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -222,7 +222,7 @@ ¥{{ it.amount || 0 }} - + 已扣安全服务费{{ item.driverSecurityServiceAmount }} 已扣安全服务费{{ item.driverSecurityServiceAmount }} @@ -329,7 +329,7 @@ export default { }, autoComputedArrival() { // 自动计算货到 - return 'OUT_INVITE_ARRIVAL' === this.currentFreight ? this.currentFreight.autoComputeFeeType : false; + return 'OUT_INVITE_ARRIVAL' === this.currentFreight?.autoComputeFeeType; }, }, onLoad(options) { @@ -500,6 +500,7 @@ export default { color: #999999; align-content: baseline; &--warning { + height: 28rpx; color: #f52723; font-size: 20rpx; margin-left: 20upx; @@ -509,6 +510,7 @@ export default { border: 2rpx solid #f52723; } &--paying { + height: 28rpx; color: #ff9339; font-size: 20rpx; margin-left: 20upx; @@ -518,6 +520,7 @@ export default { border: 2rpx solid #ff9339; } &--success { + height: 28rpx; color: #00b87a; font-size: 20rpx; margin-left: 20upx; @@ -558,6 +561,9 @@ export default { text + text { margin-left: 10rpx; } + .fee-service { + font-size: 26rpx; + } } } .card__item + .card__item { -- libgit2 0.21.0