feat(commission): 支持计奖商品参与设置、独立分成与多规格规则,完善团队中心与微信快捷登录
这个提交包含在:
@@ -8,7 +8,7 @@
|
||||
:num="state.goodsItem.goods_num"></s-goods-item>
|
||||
</view>
|
||||
|
||||
<uni-forms ref="form" v-model="formData" :rules="rules" label-position="top">
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules" label-position="top">
|
||||
<!-- 售后类型 -->
|
||||
<view class="refund-item">
|
||||
<view class="item-title ss-m-b-20">售后类型</view>
|
||||
@@ -135,7 +135,7 @@ const state = reactive({
|
||||
},
|
||||
],
|
||||
});
|
||||
const formData = reactive({
|
||||
let formData = reactive({
|
||||
type: '',
|
||||
reason: '',
|
||||
mobile: '',
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
>
|
||||
<view class="item-title">兑换券</view>
|
||||
<view class="ss-flex ss-col-center" @tap="openVoucher">
|
||||
<text class="item-value text-red" v-if="state.orderPayload.voucher_fee > 0"
|
||||
<text class="item-value text-red" v-if="Number(state.orderInfo.voucher_fee || state.orderPayload.voucher_fee) > 0"
|
||||
>-¥{{ state.orderInfo.voucher_fee || state.orderPayload.voucher_fee }}</text
|
||||
>
|
||||
<text
|
||||
@@ -197,7 +197,7 @@
|
||||
<view class="footer-box border-top ss-flex ss-row-between ss-p-x-20 ss-col-center">
|
||||
<view class="total-box-footer ss-flex ss-col-center">
|
||||
<view class="total-num ss-font-30 text-red"> ¥{{ state.orderInfo.pay_fee }} </view>
|
||||
<view v-if="state.orderPayload.order_type === 'score'" class="ss-flex">
|
||||
<view v-if="state.orderPayload.order_type === 'score' && Number(state.orderInfo.score_amount) > 0" class="ss-flex">
|
||||
<view class="total-num ss-font-30 text-red ss-m-l-4">+</view>
|
||||
<image
|
||||
:src="sheep.$url.static('/assets/addons/shopro/uniapp/goods/score1.svg')"
|
||||
@@ -313,10 +313,22 @@
|
||||
}
|
||||
|
||||
if (exchangeNow.value) {
|
||||
const hasScore = Number(state.orderInfo.score_amount) > 0;
|
||||
const voucherFee = Number(state.orderInfo.voucher_fee || state.orderPayload.voucher_fee || 0);
|
||||
let confirmContent = '确定立即兑换此商品?';
|
||||
if (hasScore && voucherFee > 0) {
|
||||
confirmContent = `确定使用 ${voucherFee} 元兑换券与 ${state.orderInfo.score_amount} 积分立即兑换?`;
|
||||
} else if (voucherFee > 0) {
|
||||
confirmContent = `确定使用 ${voucherFee} 元兑换券立即兑换(现金实付 0 元)?`;
|
||||
} else if (hasScore) {
|
||||
confirmContent = `确定使用 ${state.orderInfo.score_amount} 积分立即兑换?`;
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定使用积分立即兑换?',
|
||||
title: '兑换确认',
|
||||
content: confirmContent,
|
||||
cancelText: '再想想',
|
||||
confirmText: '确定兑换',
|
||||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
submitOrder();
|
||||
@@ -359,6 +371,10 @@
|
||||
state.orderInfo.goods_list.forEach((item) => {
|
||||
state.totalNumber += item.goods_num;
|
||||
});
|
||||
// 积分/兑换商城订单:若后端自动计算了兑换券抵扣,同步至 orderPayload
|
||||
if (state.orderPayload.order_type === 'score' && state.orderPayload.voucher_fee === undefined && data.voucher_fee !== undefined) {
|
||||
state.orderPayload.voucher_fee = data.voucher_fee;
|
||||
}
|
||||
}
|
||||
|
||||
// 获取可用优惠券
|
||||
|
||||
在新工单中引用
屏蔽一个用户