Commit d193333f by cen

fix: 修正订单规格

1 parent f938835f
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="flex errorBox" v-if="orderCardDetail.status == 11&&orderCardDetail.associatedOrderCode"> <view class="flex errorBox" v-if="orderCardDetail.status == 11 && orderCardDetail.associatedOrderCode">
<view class="order-list align-center flex-1"> <view class="order-list align-center flex-1">
<text>原错误订单编号</text> <text>原错误订单编号</text>
<text class="priceName">{{ orderCardDetail.associatedOrderCode }}</text> <text class="priceName">{{ orderCardDetail.associatedOrderCode }}</text>
...@@ -54,8 +54,11 @@ ...@@ -54,8 +54,11 @@
<view class="payType flex align-center"> <view class="payType flex align-center">
<view class="payType-label">订单类型</view> <view class="payType-label">订单类型</view>
<view class="payType-value flex align-center"> <view class="payType-value flex align-center">
{{ payType[orderCardDetail['selectPayType']] }} {{ orderType[orderCardDetail['orderType']] }}
<view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == 'Y'"><view class="sprite-icon icon-errortips"></view>异常</view> <view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == 'Y'">
<view class="sprite-icon icon-errortips"></view>
异常
</view>
</view> </view>
</view> </view>
...@@ -181,6 +184,9 @@ export default { ...@@ -181,6 +184,9 @@ export default {
}, },
goodsOrderApplyStatus() { goodsOrderApplyStatus() {
return order_mixins.data.goodsOrderApplyStatus || {} return order_mixins.data.goodsOrderApplyStatus || {}
},
orderType() {
return order_mixins.data.orderType || {}
} }
}, },
data() { data() {
......
...@@ -313,15 +313,19 @@ export default { ...@@ -313,15 +313,19 @@ export default {
const basePrice = parseFloat(this.basePrice || 0) const basePrice = parseFloat(this.basePrice || 0)
let amount = parseFloat(v) let amount = parseFloat(v)
if (basePrice === 0) {
v = '0'
} else {
// 限制最小值为 0.01 // 限制最小值为 0.01
if (isNaN(amount) || amount < 0.01) { if (isNaN(amount) || amount < 0.01) {
v = '0.01' v = '0.01'
} }
// 限制最大值为基础价格 // 限制最大值为基础价格
else if (basePrice > 0 && amount > basePrice) { else if (amount > basePrice) {
// 如果超过基础价格,限制为基础价格 // 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2) v = basePrice.toFixed(2)
} }
}
this.$set(this.localState, key, v) this.$set(this.localState, key, v)
} else if (key === 'discountRatio') { } else if (key === 'discountRatio') {
......
...@@ -313,15 +313,19 @@ export default { ...@@ -313,15 +313,19 @@ export default {
const basePrice = parseFloat(this.basePrice || 0) const basePrice = parseFloat(this.basePrice || 0)
let amount = parseFloat(v) let amount = parseFloat(v)
// 限制最小值为 0 if (basePrice === 0) {
if (isNaN(amount) || amount < 0) {
v = '0' v = '0'
} else {
// 限制最小值为 0.01
if (isNaN(amount) || amount < 0.01) {
v = '0.01'
} }
// 限制最大值为基础价格 // 限制最大值为基础价格
else if (basePrice > 0 && amount > basePrice) { else if (amount > basePrice) {
// 如果超过基础价格,限制为基础价格 // 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2) v = basePrice.toFixed(2)
} }
}
this.$set(this.localState, key, v) this.$set(this.localState, key, v)
} else if (key === 'discountRatio') { } else if (key === 'discountRatio') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!