diff --git a/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue b/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue
index eb932ffa..3da8d962 100644
--- a/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue
+++ b/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue
@@ -6,7 +6,7 @@
- 订单调价。 正数,加价;负数,减价
+ 订单调价。 正数,加价;负数,减价
@@ -38,10 +38,13 @@ const formData = ref({
})
watch(
() => formData.value.adjustPrice,
- (data: number) => {
- const num = formData.value.payPrice!.replace('元', '')
- // @ts-ignore
- formData.value.newPayPrice = (num * 1 + data).toFixed(2) + '元'
+ (adjustPrice: number | string) => {
+ const numMatch = formData.value.payPrice.match(/\d+(\.\d+)?/)
+ if (numMatch) {
+ const payPriceNum = parseFloat(numMatch[0])
+ adjustPrice = typeof adjustPrice === 'string' ? parseFloat(adjustPrice) : adjustPrice
+ formData.value.newPayPrice = (payPriceNum + adjustPrice).toFixed(2) + '元'
+ }
}
)