Commit 9710854874f80246a0955afd74f103bfa0e5980d
1 parent
39ce2372
Exists in
master
and in
1 other branch
fix: 下单时,优化数字小数点回退问题
Showing
3 changed files
with
23 additions
and
13 deletions
Show diff stats
pages/order/add.vue
| @@ -468,9 +468,9 @@ export default { | @@ -468,9 +468,9 @@ export default { | ||
| 468 | // this.form.prepaidAmount = res.result.prepaidAmount || prepaidAmount; | 468 | // this.form.prepaidAmount = res.result.prepaidAmount || prepaidAmount; |
| 469 | // this.form.oilAmount = res.result.oilAmount || oilAmount; | 469 | // this.form.oilAmount = res.result.oilAmount || oilAmount; |
| 470 | if (this.autoComputedArrival) { | 470 | if (this.autoComputedArrival) { |
| 471 | - this.form.deliveryAmount = res.result.deliveryAmount || deliveryAmount; | 471 | + this.form.deliveryAmount = res.result.deliveryAmount || '0'; |
| 472 | } else { | 472 | } else { |
| 473 | - this.form.balancePaymentAmount = res.result.balancePaymentAmount || balancePaymentAmount; | 473 | + this.form.balancePaymentAmount = res.result.balancePaymentAmount || '0'; |
| 474 | } | 474 | } |
| 475 | this.form.oilPayRebateRate = res.result.oilPayRebateRate || ''; | 475 | this.form.oilPayRebateRate = res.result.oilPayRebateRate || ''; |
| 476 | this.form.driverSecurityServiceAmount = res.result.driverSecurityServiceAmount || ''; | 476 | this.form.driverSecurityServiceAmount = res.result.driverSecurityServiceAmount || ''; |
pages/order/change-fee.vue
| @@ -206,6 +206,7 @@ export default { | @@ -206,6 +206,7 @@ export default { | ||
| 206 | prepaidAmount: prePay.amount, | 206 | prepaidAmount: prePay.amount, |
| 207 | deliveryAmount: arrivalPay.amount, | 207 | deliveryAmount: arrivalPay.amount, |
| 208 | balancePaymentAmount: finalPay.amount || 0, | 208 | balancePaymentAmount: finalPay.amount || 0, |
| 209 | + securityServiceAmount: this.item.securityServiceAmount || '', | ||
| 209 | }; | 210 | }; |
| 210 | }, | 211 | }, |
| 211 | computedService() { | 212 | computedService() { |
| @@ -227,11 +228,14 @@ export default { | @@ -227,11 +228,14 @@ export default { | ||
| 227 | }; | 228 | }; |
| 228 | uni.$u.api.freightOrder.getServiceAmount(params).then(res => { | 229 | uni.$u.api.freightOrder.getServiceAmount(params).then(res => { |
| 229 | if (res.success) { | 230 | if (res.success) { |
| 230 | - this.form.paidAmount = res.result.paidAmount || paidAmount; | ||
| 231 | - this.form.prepaidAmount = res.result.prepaidAmount || prepaidAmount; | ||
| 232 | - this.form.oilAmount = res.result.oilAmount || oilAmount; | ||
| 233 | - this.form.deliveryAmount = res.result.deliveryAmount || '0'; | ||
| 234 | - this.form.balancePaymentAmount = res.result.balancePaymentAmount || '0'; | 231 | + // this.form.paidAmount = res.result.paidAmount || paidAmount; |
| 232 | + // this.form.prepaidAmount = res.result.prepaidAmount || prepaidAmount; | ||
| 233 | + // this.form.oilAmount = res.result.oilAmount || oilAmount; | ||
| 234 | + if (this.autoComputedArrival) { | ||
| 235 | + this.form.deliveryAmount = res.result.deliveryAmount || '0'; | ||
| 236 | + } else { | ||
| 237 | + this.form.balancePaymentAmount = res.result.balancePaymentAmount || '0'; | ||
| 238 | + } | ||
| 235 | this.form.driverSecurityServiceAmount = res.result.driverSecurityServiceAmount || '0'; | 239 | this.form.driverSecurityServiceAmount = res.result.driverSecurityServiceAmount || '0'; |
| 236 | this.form.securityServiceAmount = res.result.securityServiceAmount || '0'; | 240 | this.form.securityServiceAmount = res.result.securityServiceAmount || '0'; |
| 237 | this.form.serviceAmount = res.result.serviceAmount || '0'; | 241 | this.form.serviceAmount = res.result.serviceAmount || '0'; |
| @@ -240,10 +244,10 @@ export default { | @@ -240,10 +244,10 @@ export default { | ||
| 240 | }, | 244 | }, |
| 241 | submit() { | 245 | submit() { |
| 242 | let params = [ | 246 | let params = [ |
| 243 | - { ...this.oilAmount, afterAmount: this.form.oilAmount }, | ||
| 244 | - { ...this.prePay, afterAmount: this.form.prepaidAmount }, | ||
| 245 | - { ...this.arrivalPay, afterAmount: this.form.deliveryAmount }, | ||
| 246 | - { ...this.final, afterAmount: this.form.balancePaymentAmount }, | 247 | + { ...this.oilAmount, afterAmount: this.form.oilAmount === '' ? '0' : this.form.oilAmount }, |
| 248 | + { ...this.prePay, afterAmount: this.form.prepaidAmount === '' ? '0' : this.form.prepaidAmount }, | ||
| 249 | + { ...this.arrivalPay, afterAmount: this.form.deliveryAmount === '' ? '0' : this.form.deliveryAmount }, | ||
| 250 | + { ...this.final, afterAmount: this.form.balancePaymentAmount === '' ? '0' : this.form.balancePaymentAmount }, | ||
| 247 | ]; | 251 | ]; |
| 248 | uni.$u.api.freightOrder.adjustAmount({ feeList: params, code: this.item.code, paidAmount: this.form.paidAmount, freightAdjustRemark: this.form.freightAdjustRemark }).then(res => { | 252 | uni.$u.api.freightOrder.adjustAmount({ feeList: params, code: this.item.code, paidAmount: this.form.paidAmount, freightAdjustRemark: this.form.freightAdjustRemark }).then(res => { |
| 249 | if (res.success) { | 253 | if (res.success) { |
pages/order/detail.vue
| @@ -222,7 +222,7 @@ | @@ -222,7 +222,7 @@ | ||
| 222 | </view> | 222 | </view> |
| 223 | <view class="card__item_content"> | 223 | <view class="card__item_content"> |
| 224 | ¥{{ it.amount || 0 }} | 224 | ¥{{ it.amount || 0 }} |
| 225 | - <span v-if="item.driverSecurityServiceAmount"> | 225 | + <span class="fee-service" v-if="item.driverSecurityServiceAmount"> |
| 226 | <span v-if="autoComputedArrival && it.type === 'OUT_INVITE_ARRIVAL'" class="color-red">已扣安全服务费{{ item.driverSecurityServiceAmount }}</span> | 226 | <span v-if="autoComputedArrival && it.type === 'OUT_INVITE_ARRIVAL'" class="color-red">已扣安全服务费{{ item.driverSecurityServiceAmount }}</span> |
| 227 | <span v-if="!autoComputedArrival && it.type === 'OUT_INVITE_FINAL'" class="color-red">已扣安全服务费{{ item.driverSecurityServiceAmount }}</span> | 227 | <span v-if="!autoComputedArrival && it.type === 'OUT_INVITE_FINAL'" class="color-red">已扣安全服务费{{ item.driverSecurityServiceAmount }}</span> |
| 228 | </span> | 228 | </span> |
| @@ -329,7 +329,7 @@ export default { | @@ -329,7 +329,7 @@ export default { | ||
| 329 | }, | 329 | }, |
| 330 | autoComputedArrival() { | 330 | autoComputedArrival() { |
| 331 | // 自动计算货到 | 331 | // 自动计算货到 |
| 332 | - return 'OUT_INVITE_ARRIVAL' === this.currentFreight ? this.currentFreight.autoComputeFeeType : false; | 332 | + return 'OUT_INVITE_ARRIVAL' === this.currentFreight?.autoComputeFeeType; |
| 333 | }, | 333 | }, |
| 334 | }, | 334 | }, |
| 335 | onLoad(options) { | 335 | onLoad(options) { |
| @@ -500,6 +500,7 @@ export default { | @@ -500,6 +500,7 @@ export default { | ||
| 500 | color: #999999; | 500 | color: #999999; |
| 501 | align-content: baseline; | 501 | align-content: baseline; |
| 502 | &--warning { | 502 | &--warning { |
| 503 | + height: 28rpx; | ||
| 503 | color: #f52723; | 504 | color: #f52723; |
| 504 | font-size: 20rpx; | 505 | font-size: 20rpx; |
| 505 | margin-left: 20upx; | 506 | margin-left: 20upx; |
| @@ -509,6 +510,7 @@ export default { | @@ -509,6 +510,7 @@ export default { | ||
| 509 | border: 2rpx solid #f52723; | 510 | border: 2rpx solid #f52723; |
| 510 | } | 511 | } |
| 511 | &--paying { | 512 | &--paying { |
| 513 | + height: 28rpx; | ||
| 512 | color: #ff9339; | 514 | color: #ff9339; |
| 513 | font-size: 20rpx; | 515 | font-size: 20rpx; |
| 514 | margin-left: 20upx; | 516 | margin-left: 20upx; |
| @@ -518,6 +520,7 @@ export default { | @@ -518,6 +520,7 @@ export default { | ||
| 518 | border: 2rpx solid #ff9339; | 520 | border: 2rpx solid #ff9339; |
| 519 | } | 521 | } |
| 520 | &--success { | 522 | &--success { |
| 523 | + height: 28rpx; | ||
| 521 | color: #00b87a; | 524 | color: #00b87a; |
| 522 | font-size: 20rpx; | 525 | font-size: 20rpx; |
| 523 | margin-left: 20upx; | 526 | margin-left: 20upx; |
| @@ -558,6 +561,9 @@ export default { | @@ -558,6 +561,9 @@ export default { | ||
| 558 | text + text { | 561 | text + text { |
| 559 | margin-left: 10rpx; | 562 | margin-left: 10rpx; |
| 560 | } | 563 | } |
| 564 | + .fee-service { | ||
| 565 | + font-size: 26rpx; | ||
| 566 | + } | ||
| 561 | } | 567 | } |
| 562 | } | 568 | } |
| 563 | .card__item + .card__item { | 569 | .card__item + .card__item { |