MS-IOHQJGHXZHQD\Administrator 4 сар өмнө
parent
commit
6fc7865546

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

@@ -69,7 +69,7 @@ export default {
     },
     viewDetail(order) {
       //payStatus": 0 未支付, 1已支付
-      if (order.payStatus==0) { //跳转到待支付页面
+      if (order.payStatus==0) { //未支付----跳转到待支付页面
         uni.navigateTo({
           url: `/points/productDetails/pendingPayment?orderNo=${order.orderNo}`
         });

+ 4 - 4
src/points/productDetails/applyExchange.vue

@@ -157,14 +157,12 @@ export default {
                 uni.$u.toast('请选择申请原因\n或\n请上传描述/凭证')  
                 return
             }
-            //receivedStatus 1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
-            //tab 1 退款 2 换货
+            
             afterSaleOrder({ //换货
                 orderId:this.orderId,
                 orderNo:this.orderNo,
-                receiptStatus:2,//1:未收货 2:已收货
                 applyReason:this.selectReasonValue,
-                afterSaleType:2,//1:退货 2:换
+                afterSaleType:2,//1:退货 2:换  3:未收到
                 applyDesc:this.questionOrDiscribeValue,
                 applyImages:this.fileList.map(m=>m.url).join(','),
             }).then(res=>{
@@ -179,6 +177,8 @@ export default {
         },
         //选择申请原因
         selectApplyReasonFun(tab) {
+            //receivedStatus 1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
+            //tab 1 退款 2 换货
             uni.navigateTo({
                 url: `/points/productDetails/applyRefund?receivedStatus=3&tab=${tab}&selectReasonValue=${encodeURIComponent(this.selectReasonValue)}&questionOrDiscribeValue=${encodeURIComponent(this.questionOrDiscribeValue)}&fileList=${JSON.stringify(this.fileList)}&orderNo=${this.orderNo}&orderId=${this.orderId}`
             })

+ 46 - 44
src/points/productDetails/applyRefund.vue

@@ -82,14 +82,14 @@
 </template>
 
 <script>
-import { afterSaleOrder} from '@/api/pointOrder'
+import { afterSaleOrder } from '@/api/pointOrder'
 import Upload from '@/components/upload/index.vue';
 export default {
     components: { Upload },
     data() {
         return {
-            orderNo:null,
-            orderId:null,
+            orderNo: null,
+            orderId: null,
             fileList: [],
             tab: null,//1 退款/换货申请第一步  2 已收货-换货申请第二步
             headPhotoImg: [],
@@ -99,7 +99,7 @@ export default {
             receivedStatus: null,//1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
             isTop: 0,
             list: [],
-            servicePromise:[
+            servicePromise: [
                 "假一赔三",
                 "7天无理由退换",
                 "破损包退换"
@@ -109,17 +109,17 @@ export default {
                 {
                     title: '平台原因',
                     data: [
-                        { value: '1', text: '商家无货联系我取消订单',show:true},
-                        { value: '2', text: '商家无法按承诺时效送达' ,show:true},
-                        { value: '3', text: '商家其他原因联系我取消订单' ,show:true},
+                        { value: '1', text: '商家无货联系我取消订单', show: true },
+                        { value: '2', text: '商家无法按承诺时效送达', show: true },
+                        { value: '3', text: '商家其他原因联系我取消订单', show: true },
                     ]
                 }, {
                     title: '个人原因',
                     data: [
-                        { value: '4', text: '不想要' ,show:true},
-                        { value: '5', text: '商品错选 / 多选' ,show:true},
-                        { value: '6', text: '地址信息填写错误' ,show:true},
-                        { value: '7', text: '7天无理由退货' ,show:true},
+                        { value: '4', text: '不想要', show: true },
+                        { value: '5', text: '商品错选 / 多选', show: true },
+                        { value: '6', text: '地址信息填写错误', show: true },
+                        { value: '7', text: '7天无理由退货', show: true },
                     ]
                 }
             ],
@@ -128,13 +128,13 @@ export default {
                 {
                     title: '',
                     data: [
-                        { 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},
-                        { value: '7', text: '7天无理由退货' ,show:true},
+                        { 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 },
+                        { value: '7', text: '7天无理由退货', show: true },
                     ]
                 }
             ],
@@ -168,8 +168,8 @@ export default {
         if (data) {
             this.receivedStatus = data.receivedStatus
             this.tab = data.tab ? data.tab : null
-            if(data.orderId)this.orderId=data.orderId
-            if(data.orderNo)this.orderNo=data.orderNo
+            if (data.orderId) this.orderId = data.orderId
+            if (data.orderNo) this.orderNo = data.orderNo
             if (data.questionOrDiscribeValue && data.questionOrDiscribeValue !== "null") {
                 this.questionOrDiscribeValue = data.questionOrDiscribeValue
             }
@@ -194,24 +194,24 @@ export default {
 
     },
     onShow(data) {
-        let flag=this.servicePromise.some(f=>{
-            return f.indexOf('7天无理由退')!==-1
+        let flag = this.servicePromise.some(f => {
+            return f.indexOf('7天无理由退') !== -1
         })
-        if(!flag){
-            this.list2.map(m=>{
-                m.data.forEach(e=>{
-                    if(e.text.indexOf('7天无理由退')==-1){
-                       e.show=false
+        if (!flag) {
+            this.list2.map(m => {
+                m.data.forEach(e => {
+                    if (e.text.indexOf('7天无理由退') == -1) {
+                        e.show = false
                     }
-                    
+
                 })
             })
-            this.list1.map(m=>{
-                m.data.forEach(e=>{
-                    if(e.text.indexOf('7天无理由退')==-1){
-                       e.show=false
+            this.list1.map(m => {
+                m.data.forEach(e => {
+                    if (e.text.indexOf('7天无理由退') == -1) {
+                        e.show = false
                     }
-                    
+
                 })
             })
         }
@@ -237,12 +237,15 @@ export default {
         //点击单选按钮
         groupChange(val) {
             this.selectReason = val
-            this.filteredList[0].data.forEach(item => {
-                if (item.value == val) {
-                    this.selectReasonValue = item.text
-                }
+            this.filteredList.map(m => {
+                m.data.forEach(item => {
+                    if (item.value == val) {
+                        this.selectReasonValue = item.text
+                    }
+
+                });
+            })
 
-            });
         },
         //提交
         goSubmit() {
@@ -250,14 +253,13 @@ export default {
             //receivedStatus 1 未收到,申请退款;2.已收到货,申请退款 3.已收货-换货申请
             //tab 1 退款 2 换货
             afterSaleOrder({ // 未收到-申请退款,已收到货-申请退款
-                orderId:this.orderId,
-                orderNo:this.orderNo,
-                receiptStatus:this.receivedStatus,//1:未收货 2:已收货
-                applyReason:this.selectReasonValue,
-                afterSaleType:this.tab,//1:退货 2:换货
+                orderId: this.orderId,
+                orderNo: this.orderNo,
+                applyReason: this.selectReasonValue,
+                afterSaleType: this.receivedStatus == 1 ? 3 : this.receivedStatus == 2 ? 1 : null,//1:退货 2:换  3:未收到货
                 //applyDesc:'',
                 //applyImages:'',
-            }).then(res=>{
+            }).then(res => {
 
             })
 

+ 2 - 2
src/points/productDetails/components/selectProduct.vue

@@ -14,9 +14,9 @@
         <view class="productPrice">
             <view style="display:flex;justify-content: space-between;">
                 <view style="display:flex;">
-                    <view>
+                    <view style="display: flex;align-items: center;">
                         <image v-if="selectedObj" style="width: 120rpx;height: 120rpx;"
-                            :src="$globalData.publicUrl + selectedObj.image" mode="">
+                            :src="$globalData.publicUrl + selectedObj.image" mode="heightFix">
                         </image>
                         <image v-else style="width: 120rpx;height: 120rpx;"
                             :src="$globalData.publicUrl + params.productMainImage" mode="">

+ 12 - 10
src/points/productDetails/pendingPayment.vue

@@ -7,12 +7,12 @@
                 </view>
             </u-navbar>
 
-            <view class="contentBox">
+            <view class="contentBox" v-if="orderInfo">
                 <view class="remainingTime">
                     {{ orderStatus }}
                     <text v-if="orderInfo.orderStatus == 0 && countdownText != '00:00'">{{ countdownText }}</text>
                 </view>
-                <view class="content" v-if="orderInfo">
+                <view class="content">
                     <view class="addressBox">
                         <image style="width: 40rpx;height: 40rpx;" src="@/static/points/addressIcon.png" mode="">
                         </image>
@@ -34,16 +34,16 @@
                         <view style="display:flex;">
                             <view>
                                 <image style="width: 120rpx;height: 120rpx;"
-                                    :src="$globalData.publicUrl + orderInfo.skuImage" mode="">
+                                    :src="$globalData.publicUrl + productInfo.skuImage" mode="">
                                 </image>
                             </view>
                             <view
                                 style="margin-left: 24rpx;display: flex;flex-direction: column;justify-content: space-between;">
-                                <view class="productName">{{ orderInfo.productName }} </view>
-                                <view class="spec">已选:{{ skuSpecFun(orderInfo.skuSpec) }} </view>
-                                <view class="price">{{ orderInfo.paymentType == 1 ? orderInfo.pointsUsed + '积分' :
-                                    orderInfo.paymentType == 2 ? '¥' + orderInfo.payAmount + '元' :
-                                        orderInfo.paymentType == 3 ? '¥' + orderInfo.payAmount + '元' + '+' +
+                                <view class="productName">{{ productInfo.productName }} </view>
+                                <view class="spec">已选:{{ skuSpecFun(productInfo.skuSpec) }} </view>
+                                <view class="price">{{ productInfo.paymentType == 1 ? orderInfo.pointsUsed + '积分' :
+                                    productInfo.paymentType == 2 ? '¥' + orderInfo.payAmount + '元' :
+                                        productInfo.paymentType == 3 ? '¥' + orderInfo.payAmount + '元' + '+' +
                                             orderInfo.pointsUsed + '积分' : null }}</view>
 
                             </view>
@@ -200,7 +200,8 @@ export default {
             dBalance: 0.00,
             timer: null, // 定时器
             orderNo: '',
-            orderInfo: null
+            orderInfo: null,
+            productInfo: null,
         }
     },
     onLoad(data) {
@@ -231,7 +232,8 @@ export default {
                 orderNo: this.orderNo,
                 openId: uni.getStorageSync('wx_copenid')
             })
-            this.orderInfo = res.data.data
+            this.orderInfo = res.data.data.orderInfo
+            this.productInfo = res.data.data.productInfo
             if (this.orderInfo.remainSeconds > 0 && this.orderInfo.orderStatus == 0) {
                 this.orderCountdownFun(this.orderInfo.remainSeconds)
                 this.orderStatus = '剩余时间'