MS-IOHQJGHXZHQD\Administrator il y a 5 mois
Parent
commit
1abaac2a22

+ 1 - 1
src/points/order/orderDetails.vue

@@ -156,7 +156,7 @@ export default {
         return
       }
       uni.navigateTo({
-        url: `/points/productDetails/applyRefund?afterSalesType=${this.afterSalesType}&receiptStatus=${this.receiptStatus}&orderNo=${this.orderInfo.orderNo}&orderId=${this.orderInfo.id}&orderStatus=${this.orderInfo.orderStatus}`
+        url: `/points/productDetails/applyRefund?afterSalesType=${this.afterSalesType}&receiptStatus=${this.receiptStatus}&orderNo=${this.orderInfo.orderNo}&orderId=${this.orderInfo.id}&orderStatus=${this.orderInfo.orderStatus}&servicePromise=${this.productInfo.servicePromise}`
       });
       this.afterSalesShow = false
     },

+ 31 - 20
src/points/productDetails/applyRefund.vue

@@ -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
                     }
 

+ 2 - 2
src/points/productDetails/index.vue

@@ -348,7 +348,7 @@ export default {
       params.name = this.params.name;
       params.productMainImage = this.params.productMainImage;
       params.skuId = this.selectedObj.skuId; //选中的SKU ID
-      params.specNameValueLis = this.selectedObj.specNameValueList; // SKU列表(规格组合明细)
+      params.specNameValueList = this.selectedObj.specNameValueList; // SKU列表(规格组合明细)
       params.quantity = 1; //购买数量
       params.payType = this.params.paymentType == 1 ? 3 : Number(this.selectPayMeth);//支付方式:1微信支付 2账户余额
       params.freightAmount = this.params.freight; //运费
@@ -435,7 +435,7 @@ export default {
     },
     //账号余额支付
     async nowYuyue(params) {
-      if (parseInt(this.dBalance) < parseInt(this.selectedObj.priceMoney)) {
+      if (parseFloat(this.dBalance) < parseFloat(this.selectedObj.priceMoney)) {
         this.redeemNowBtnDisable = false
         uni.showModal({
           title: '账户余额不足',