|
|
@@ -16,11 +16,12 @@
|
|
|
<view class="contentDetail" v-if="tab == 1">
|
|
|
<view class="tip">请选择取消订单的原因(必选):</view>
|
|
|
<u-radio-group v-model="selectReason" @change="groupChange">
|
|
|
- <view>
|
|
|
+ <view style="width: 100%;">
|
|
|
<!-- //1 未收到,申请退款 list; 2.已收到货,申请退款 list2 3.已收货-换货申请 list3-->
|
|
|
- <view class="item" v-for="item in filteredList">
|
|
|
+ <view class="item" v-for="(item,index) in filteredList">
|
|
|
<view v-if="item.title" class="title">{{ item.title }}:</view>
|
|
|
- <view class="obj" v-for="obj in item.data" style="width: 100%;" @change="groupChange(obj.value)">
|
|
|
+ <view class="obj" v-if="obj.show" v-for="obj in item.data" style="width: 100%;"
|
|
|
+ @click="groupChange(obj.value)">
|
|
|
<view class="radioBox">
|
|
|
<u-radio activeColor="#03C1B8 " :name=obj.value></u-radio>{{ obj.text }}
|
|
|
</view>
|
|
|
@@ -141,12 +142,12 @@ export default {
|
|
|
{
|
|
|
title: '',
|
|
|
data: [
|
|
|
- { value: '1', text: '商品质量问题' },
|
|
|
- { value: '2', text: '商品与页面描述不符' },
|
|
|
- { value: '3', text: '商品/包装破损' },
|
|
|
- { value: '4', text: '发错货' },
|
|
|
- { value: '5', text: '少件/未收到货' },
|
|
|
- { value: '6', text: '商品大小不合适' },
|
|
|
+ { value: '1', text: '商品质量问题', show: true },
|
|
|
+ { value: '2', text: '商品与页面描述不符', show: true },
|
|
|
+ { value: '3', text: '商品/包装破损', show: true },
|
|
|
+ { value: '4', text: '发错货', show: true },
|
|
|
+ { value: '5', text: '少件/未收到货' , show: true},
|
|
|
+ { value: '6', text: '商品大小不合适' , show: true},
|
|
|
]
|
|
|
},
|
|
|
],
|
|
|
@@ -156,13 +157,24 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
filteredList() {
|
|
|
- if (this.receiptStatus == 'notReceived') {
|
|
|
+
|
|
|
+ // 未收货 → 退款原因 list1
|
|
|
+ if (this.receiptStatus === 'notReceived') {
|
|
|
return this.list1
|
|
|
- } else if (this.receiptStatus == "received" && this.afterSalesType == "refund") {
|
|
|
+ }
|
|
|
+
|
|
|
+ // 已收货 + 退款 → list2
|
|
|
+ if (this.receiptStatus === 'received' && this.afterSalesType === 'refund') {
|
|
|
return this.list2
|
|
|
- } else if (this.receiptStatus == "received" && this.afterSalesType == "exchange") {
|
|
|
- return this.list3;
|
|
|
}
|
|
|
+
|
|
|
+ // 已收货 + 换货 → list3
|
|
|
+ if (this.receiptStatus === 'received' && this.afterSalesType === 'exchange') {
|
|
|
+ return this.list3
|
|
|
+ }
|
|
|
+
|
|
|
+ // 兜底:防止空白
|
|
|
+ return []
|
|
|
}
|
|
|
},
|
|
|
onLoad(data) {
|
|
|
@@ -175,8 +187,7 @@ export default {
|
|
|
if (data.orderStatus) this.orderStatus = data.orderStatus
|
|
|
if (data.receiptStatus) this.receiptStatus = data.receiptStatus
|
|
|
if (data.afterSalesType) this.afterSalesType = data.afterSalesType
|
|
|
-
|
|
|
- if (data.servicePromise) this.$set(this,'servicePromise', data.servicePromise)
|
|
|
+ if (data.servicePromise) this.servicePromise = data.servicePromise
|
|
|
if (data.questionOrDiscribeValue && data.questionOrDiscribeValue !== "null") {
|
|
|
this.questionOrDiscribeValue = data.questionOrDiscribeValue
|
|
|
}
|
|
|
@@ -212,13 +223,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onShow(data) {
|
|
|
- let flag = this.servicePromise.some(f => {
|
|
|
- return f.indexOf('7天无理由退') !== -1
|
|
|
- })
|
|
|
+ let flag = this.servicePromise.indexOf('7天无理由退') !== -1
|
|
|
if (!flag) {
|
|
|
this.list2.map(m => {
|
|
|
m.data.forEach(e => {
|
|
|
- if (e.text.indexOf('7天无理由退') == -1) {
|
|
|
+ e.show = true
|
|
|
+ if (e.text.indexOf('7天无理由退') !== -1) {
|
|
|
e.show = false
|
|
|
}
|
|
|
|
|
|
@@ -226,7 +236,8 @@ export default {
|
|
|
})
|
|
|
this.list1.map(m => {
|
|
|
m.data.forEach(e => {
|
|
|
- if (e.text.indexOf('7天无理由退') == -1) {
|
|
|
+ e.show = true
|
|
|
+ if (e.text.indexOf('7天无理由退') !== -1) {
|
|
|
e.show = false
|
|
|
}
|
|
|
|