Commit d193333f by cen

fix: 修正订单规格

1 parent f938835f
...@@ -39,23 +39,26 @@ ...@@ -39,23 +39,26 @@
</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>
</view> </view>
<view class="order-list align-center flex-1"> <view class="order-list align-center flex-1">
<text>原错误订单总价</text> <text>原错误订单总价</text>
<text class="priceName">¥{{ orderCardDetail.associatedOrderCodeFinalPrice }}</text> <text class="priceName">¥{{ orderCardDetail.associatedOrderCodeFinalPrice }}</text>
</view>
</view> </view>
</view>
<!-- 支付方式 --> <!-- 支付方式 -->
<view class="order-payType flex"> <view class="order-payType flex">
<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() {
...@@ -483,9 +489,9 @@ export default { ...@@ -483,9 +489,9 @@ export default {
} }
.errorTips { .errorTips {
color: #eb4e4e; color: #eb4e4e;
font-size: toRpx(24); font-size: toRpx(24);
font-weight: 400; font-weight: 400;
margin-left: toRpx(16); margin-left: toRpx(16);
} }
.priceName { .priceName {
color: #5a5e66; color: #5a5e66;
......
...@@ -313,14 +313,18 @@ export default { ...@@ -313,14 +313,18 @@ export default {
const basePrice = parseFloat(this.basePrice || 0) const basePrice = parseFloat(this.basePrice || 0)
let amount = parseFloat(v) let amount = parseFloat(v)
// 限制最小值为 0.01 if (basePrice === 0) {
if (isNaN(amount) || amount < 0.01) { v = '0'
v = '0.01' } else {
} // 限制最小值为 0.01
// 限制最大值为基础价格 if (isNaN(amount) || amount < 0.01) {
else if (basePrice > 0 && amount > basePrice) { v = '0.01'
// 如果超过基础价格,限制为基础价格 }
v = basePrice.toFixed(2) // 限制最大值为基础价格
else if (amount > basePrice) {
// 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2)
}
} }
this.$set(this.localState, key, v) this.$set(this.localState, key, v)
......
...@@ -313,14 +313,18 @@ export default { ...@@ -313,14 +313,18 @@ 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
else if (basePrice > 0 && amount > basePrice) { if (isNaN(amount) || amount < 0.01) {
// 如果超过基础价格,限制为基础价格 v = '0.01'
v = basePrice.toFixed(2) }
// 限制最大值为基础价格
else if (amount > basePrice) {
// 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2)
}
} }
this.$set(this.localState, key, v) this.$set(this.localState, key, v)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!