|
|
@@ -42,7 +42,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 申请原因 -->
|
|
|
- <view class="refund-item ss-flex ss-col-center ss-row-between" @tap="state.showModal = true">
|
|
|
+ <view class="refund-item ss-flex ss-col-center ss-row-between" @tap="handleShowModal">
|
|
|
<text class="item-title">申请原因</text>
|
|
|
<view class="ss-flex refund-cause ss-col-center">
|
|
|
<text class="ss-m-r-20" v-if="formData.applyReason">{{ formData.applyReason }}</text>
|
|
|
@@ -179,14 +179,19 @@
|
|
|
function onRefundChange(e) {
|
|
|
formData.way = e.detail.value;
|
|
|
// 清理理由
|
|
|
- state.reasonList =
|
|
|
- formData.way === '10'
|
|
|
- ? state.config.afterSaleRefundReasons || []
|
|
|
- : state.config.afterSaleReturnReasons || [];
|
|
|
+ state.reasonList = formData.way === '10' ? state.config.afterSaleRefundReasons || [] : state.config.afterSaleReturnReasons || [];
|
|
|
formData.applyReason = '';
|
|
|
state.currentValue = '';
|
|
|
}
|
|
|
|
|
|
+ function handleShowModal () {
|
|
|
+ if (!formData.way) {
|
|
|
+ sheep.$helper.toast('请先选择售后类型');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ state.showModal = true
|
|
|
+ }
|
|
|
+
|
|
|
// 选择申请原因
|
|
|
function onChange(e) {
|
|
|
state.currentValue = e.detail.value;
|
|
|
@@ -213,13 +218,11 @@
|
|
|
return;
|
|
|
}
|
|
|
state.order = data;
|
|
|
- state.item = data.items.find((item) => item.id === state.itemId) || {};
|
|
|
-
|
|
|
+ state.item = data.items.find((item) => parseInt(item.id) === state.itemId) || {};
|
|
|
// 设置选项
|
|
|
if (state.order.status === 10) {
|
|
|
state.wayList.splice(1, 1);
|
|
|
}
|
|
|
-
|
|
|
// 读取配置
|
|
|
state.config = (await TradeConfigApi.getTradeConfig()).data;
|
|
|
});
|