Commit d193333f by cen

fix: 修正订单规格

1 parent f938835f
......@@ -39,23 +39,26 @@
</view>
</view>
</view>
<view class="flex errorBox" v-if="orderCardDetail.status == 11&&orderCardDetail.associatedOrderCode">
<view class="order-list align-center flex-1">
<text>原错误订单编号</text>
<text class="priceName">{{ orderCardDetail.associatedOrderCode }}</text>
</view>
<view class="order-list align-center flex-1">
<text>原错误订单总价</text>
<text class="priceName">¥{{ orderCardDetail.associatedOrderCodeFinalPrice }}</text>
<view class="flex errorBox" v-if="orderCardDetail.status == 11 && orderCardDetail.associatedOrderCode">
<view class="order-list align-center flex-1">
<text>原错误订单编号</text>
<text class="priceName">{{ orderCardDetail.associatedOrderCode }}</text>
</view>
<view class="order-list align-center flex-1">
<text>原错误订单总价</text>
<text class="priceName">¥{{ orderCardDetail.associatedOrderCodeFinalPrice }}</text>
</view>
</view>
</view>
<!-- 支付方式 -->
<view class="order-payType flex">
<view class="payType flex align-center">
<view class="payType-label">订单类型</view>
<view class="payType-value flex align-center">
{{ payType[orderCardDetail['selectPayType']] }}
<view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == 'Y'"><view class="sprite-icon icon-errortips"></view>异常</view>
{{ orderType[orderCardDetail['orderType']] }}
<view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == 'Y'">
<view class="sprite-icon icon-errortips"></view>
异常
</view>
</view>
</view>
......@@ -181,6 +184,9 @@ export default {
},
goodsOrderApplyStatus() {
return order_mixins.data.goodsOrderApplyStatus || {}
},
orderType() {
return order_mixins.data.orderType || {}
}
},
data() {
......@@ -483,9 +489,9 @@ export default {
}
.errorTips {
color: #eb4e4e;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(16);
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(16);
}
.priceName {
color: #5a5e66;
......
......@@ -313,14 +313,18 @@ export default {
const basePrice = parseFloat(this.basePrice || 0)
let amount = parseFloat(v)
// 限制最小值为 0.01
if (isNaN(amount) || amount < 0.01) {
v = '0.01'
}
// 限制最大值为基础价格
else if (basePrice > 0 && amount > basePrice) {
// 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2)
if (basePrice === 0) {
v = '0'
} else {
// 限制最小值为 0.01
if (isNaN(amount) || amount < 0.01) {
v = '0.01'
}
// 限制最大值为基础价格
else if (amount > basePrice) {
// 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2)
}
}
this.$set(this.localState, key, v)
......
......@@ -313,14 +313,18 @@ export default {
const basePrice = parseFloat(this.basePrice || 0)
let amount = parseFloat(v)
// 限制最小值为 0
if (isNaN(amount) || amount < 0) {
if (basePrice === 0) {
v = '0'
}
// 限制最大值为基础价格
else if (basePrice > 0 && amount > basePrice) {
// 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2)
} else {
// 限制最小值为 0.01
if (isNaN(amount) || amount < 0.01) {
v = '0.01'
}
// 限制最大值为基础价格
else if (amount > basePrice) {
// 如果超过基础价格,限制为基础价格
v = basePrice.toFixed(2)
}
}
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!