Commit f938835f by cen

fix: 折扣

1 parent 8a7d1821
...@@ -161,7 +161,7 @@ const pathEnum = { ...@@ -161,7 +161,7 @@ const pathEnum = {
pad: '/rop-dj-pad/', pad: '/rop-dj-pad/',
clue: '/rop-scrm-clue/', clue: '/rop-scrm-clue/',
evaluation: '/gsc-vcp-pad-facade', evaluation: '/gsc-vcp-pad-facade',
staffMiniprogram: '/rop-dj-staff-miniprogram/', staffMiniprogram: '/rop-dj-staff-miniprogram/'
} }
const CONFIG_ENV_MAP = { const CONFIG_ENV_MAP = {
1: 'develop', 1: 'develop',
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
// 计算最终价格 // 计算最终价格
computedPrice() { computedPrice() {
const basePrice = parseFloat(this.basePrice || 0) const basePrice = parseFloat(this.basePrice || 0)
if (!basePrice) return '-' if (!basePrice) return '¥0.00'
// 打折策略 // 打折策略
if (this.strategyType === 'discount') { if (this.strategyType === 'discount') {
...@@ -291,9 +291,9 @@ export default { ...@@ -291,9 +291,9 @@ export default {
let v = this.localState[key] let v = this.localState[key]
if (key === 'discountAmount' || key === 'deductAmount') { if (key === 'discountAmount' || key === 'deductAmount') {
// 折扣金额/抵扣金额:限制 0.01 到商品原价(直接截断,不四舍五入) // 折扣金额/抵扣金额:限制 0 到商品原价(直接截断,不四舍五入)
if (!v || (typeof v === 'string' && v.trim() === '')) { if (!v || (typeof v === 'string' && v.trim() === '')) {
v = '0.01' v = '0'
} }
// 限制只能输入数字和小数点 // 限制只能输入数字和小数点
v = String(v).replace(/[^\d.]/g, '') v = String(v).replace(/[^\d.]/g, '')
...@@ -393,7 +393,7 @@ export default { ...@@ -393,7 +393,7 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: toRpx(24) toRpx(24) 0 toRpx(24); padding: toRpx(24) toRpx(24) 0 toRpx(24);
border-top: toRpx(3) dashed #E4E7EB; border-top: toRpx(3) dashed #e4e7eb;
box-sizing: border-box; box-sizing: border-box;
} }
......
...@@ -235,6 +235,7 @@ export default { ...@@ -235,6 +235,7 @@ export default {
}) })
const carBrandList = uni.$storage.get('carBrandList') const carBrandList = uni.$storage.get('carBrandList')
const carChildsBrandIds = carBrandList.map(i => i.id) const carChildsBrandIds = carBrandList.map(i => i.id)
const { sceneType } = uni.$storage.get('userInfo')
let params = { let params = {
merchantId: shopMerchantId, merchantId: shopMerchantId,
pageNum, pageNum,
...@@ -242,6 +243,7 @@ export default { ...@@ -242,6 +243,7 @@ export default {
carModel: carModel || '', carModel: carModel || '',
orderStatus: 3, orderStatus: 3,
merchantOrder, merchantOrder,
sceneType: sceneType,
historyOrderGoodsTypes: this.historyOrderGoodsTypes historyOrderGoodsTypes: this.historyOrderGoodsTypes
} }
if (!params.merchantOrder) { if (!params.merchantOrder) {
......
...@@ -21,30 +21,34 @@ ...@@ -21,30 +21,34 @@
<view class="flex errorBox" v-if="orderCardDetail.oldOrderCode"> <view class="flex errorBox" v-if="orderCardDetail.oldOrderCode">
<view class="order-list align-center flex-1"> <view class="order-list align-center flex-1">
<text>原错误订单编号</text> <text>原错误订单编号</text>
<text class="priceName">{{ orderCardDetail.oldOrderCode }}</text> <text class="priceName">{{ orderCardDetail.oldOrderCode }}</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.oldOrderFinalPrice }}</text> <text class="priceName">¥{{ orderCardDetail.oldOrderFinalPrice }}</text>
</view> </view>
</view> </view>
<view class="order-card-bottom-box"> <view class="order-card-bottom-box">
<view class="info-box"> <view class="info-box">
<view class="order-list align-center"> <view class="order-list align-center">
<view class="order flex align-center"> <view class="order flex align-center">
<view class="order-label">订单类型 </view> <view class="order-label">订单类型</view>
<view class="order-value flex">{{ orderTypeText[orderCardDetail.orderType] }} <view class="order-value flex">
<view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == true"><view class="sprite-icon icon-errortips"></view>异常</view> {{ orderTypeText[orderCardDetail.orderType] }}
</view> <view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == true">
<view class="sprite-icon icon-errortips"></view>
异常
</view>
</view> </view>
</view>
</view> </view>
<view class="order-list align-center"> <view class="order-list align-center">
<view class="order flex align-center"> <view class="order flex align-center">
<view class="order-label">审批状态 </view> <view class="order-label">审批状态</view>
<view class="order-value flex">{{ goodsOrderApplyStatus[orderCardDetail.approveStatus] }}</view> <view class="order-value flex">{{ goodsOrderApplyStatus[orderCardDetail.approveStatus] || '-' }}</view>
</view> </view>
</view> </view>
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryId ? pointsMultiObj : orderObj" :key="sindex"> <view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryId ? pointsMultiObj : orderObj" :key="sindex" v-if="(item.key !== 'remark' || orderCardDetail.orderStatus === '-1') && (item.key !== 'payTime' || orderCardDetail.orderStatus === '3' || orderCardDetail.orderStatus === '5')">
<view v-if="item.key == 'remark' || item.key == 'payTime' || item.key == 'createdTime'"> <view v-if="item.key == 'remark' || item.key == 'payTime' || item.key == 'createdTime'">
<view class="order flex align-center" v-if="item.key == 'remark' && orderCardDetail.orderStatus == '-1'"> <view class="order flex align-center" v-if="item.key == 'remark' && orderCardDetail.orderStatus == '-1'">
<view class="order-label">{{ item.label }}</view> <view class="order-label">{{ item.label }}</view>
...@@ -58,7 +62,6 @@ ...@@ -58,7 +62,6 @@
<view>{{ orderCardDetail[item.key] || '' }}</view> <view>{{ orderCardDetail[item.key] || '' }}</view>
</view> </view>
</view> </view>
<!-- &&( item.orderStatus == '3'||item.orderStatus =='5') -->
<view class="order flex align-center" v-if="item.key == 'createdTime'"> <view class="order flex align-center" v-if="item.key == 'createdTime'">
<view class="order-label">{{ item.label }}</view> <view class="order-label">{{ item.label }}</view>
<view class="order-value"> <view class="order-value">
...@@ -103,7 +106,7 @@ ...@@ -103,7 +106,7 @@
</view> </view>
<view class="refund-box" v-if="orderCardDetail.refundAmount"> <view class="refund-box" v-if="orderCardDetail.refundAmount">
部分退款 部分退款
<text class="unit">¥</text> <text class="refund-box-unit">¥</text>
{{ orderCardDetail.refundAmount }} {{ orderCardDetail.refundAmount }}
</view> </view>
<!-- 已录单未签名 --> <!-- 已录单未签名 -->
...@@ -1342,8 +1345,22 @@ export default { ...@@ -1342,8 +1345,22 @@ 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);
}
.refund-box {
margin-left: toRpx(16);
background: #fff2e0;
padding: toRpx(4) toRpx(8);
color: #f7a431;
font-size: toRpx(24);
font-weight: 500;
font-family: 'numberBold';
border-radius: toRpx(4);
}
.refund-box .refund-box-unit {
font-size: toRpx(24);
} }
</style> </style>
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
// 计算最终价格 // 计算最终价格
computedPrice() { computedPrice() {
const basePrice = parseFloat(this.basePrice || 0) const basePrice = parseFloat(this.basePrice || 0)
if (!basePrice) return '-' if (!basePrice) return '¥0.00'
// 打折策略 // 打折策略
if (this.strategyType === 'discount') { if (this.strategyType === 'discount') {
...@@ -291,9 +291,9 @@ export default { ...@@ -291,9 +291,9 @@ export default {
let v = this.localState[key] let v = this.localState[key]
if (key === 'discountAmount' || key === 'deductAmount') { if (key === 'discountAmount' || key === 'deductAmount') {
// 折扣金额/抵扣金额:限制 0.01 到商品原价(直接截断,不四舍五入) // 折扣金额/抵扣金额:限制 0 到商品原价(直接截断,不四舍五入)
if (!v || (typeof v === 'string' && v.trim() === '')) { if (!v || (typeof v === 'string' && v.trim() === '')) {
v = '0.01' v = '0'
} }
// 限制只能输入数字和小数点 // 限制只能输入数字和小数点
v = String(v).replace(/[^\d.]/g, '') v = String(v).replace(/[^\d.]/g, '')
...@@ -313,9 +313,9 @@ export default { ...@@ -313,9 +313,9 @@ export default {
const basePrice = parseFloat(this.basePrice || 0) const basePrice = parseFloat(this.basePrice || 0)
let amount = parseFloat(v) let amount = parseFloat(v)
// 限制最小值为 0.01 // 限制最小值为 0
if (isNaN(amount) || amount < 0.01) { if (isNaN(amount) || amount < 0) {
v = '0.01' v = '0'
} }
// 限制最大值为基础价格 // 限制最大值为基础价格
else if (basePrice > 0 && amount > basePrice) { else if (basePrice > 0 && amount > basePrice) {
...@@ -393,7 +393,7 @@ export default { ...@@ -393,7 +393,7 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: toRpx(24) toRpx(24) 0 toRpx(24); padding: toRpx(24) toRpx(24) 0 toRpx(24);
border-top: toRpx(3) dashed #E4E7EB; border-top: toRpx(3) dashed #e4e7eb;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -490,7 +490,7 @@ export default { ...@@ -490,7 +490,7 @@ export default {
} }
.amount-input-inner { .amount-input-inner {
width: toRpx(140); width: toRpx(250);
padding-left: toRpx(8); padding-left: toRpx(8);
text-align: right; text-align: right;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!