Browse Source

退差价

cr 4 years ago
parent
commit
5964220a9f
6 changed files with 63 additions and 26 deletions
  1. 1 1
      a.txt
  2. 3 0
      releaselog.md
  3. 17 3
      src/pages/index/difference.vue
  4. 4 4
      src/pages/index/disparity.vue
  5. 37 17
      src/pages/index/index.vue
  6. 1 1
      src/pages/manage/index.vue

+ 1 - 1
a.txt

@@ -1,5 +1,5 @@
1 1
 VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
2
-
2
+http://localhost:8076
3 3
 
4 4
 三方门店ID:5424_2705880
5 5
 门店名称:t_pK0XCn0TDQ

+ 3 - 0
releaselog.md

@@ -1,4 +1,7 @@
1 1
 
2
+# 0.3.2 (20.12.4 11:00)
3
+### 修改bug
4
+
2 5
 # 0.3.1 (20.12.3 18:00)
3 6
 ### 退差价
4 7
 

+ 17 - 3
src/pages/index/difference.vue

@@ -54,14 +54,15 @@
54 54
                                     item.refundAmount | minuteToRmb
55 55
                                 }}
56 56
                             </div>
57
-                            <div class="">已退重量:{{item.actualPickingWeight || '0'}}</div>
57
+                            <div class="">已退重量:{{item.actualPickingWeight || '0'}}g</div>
58 58
                         </div>
59 59
                     </div>
60 60
                 </label>
61 61
             </checkbox-group>
62 62
         </div>
63 63
         <div class="btn-box">
64
-            <span class="btn" @click="disparity">退差价</span>
64
+            <span class="btn"  v-if="!allInvalid" @click="disparity">退差价</span>
65
+            <span class="btn allInvalid" v-if="allInvalid">没有可退差价商品</span>
65 66
         </div>
66 67
     </div>
67 68
 </template>
@@ -80,6 +81,7 @@ export default {
80 81
             curReason: "",
81 82
             curGoodItemIds: [],
82 83
             submitLoading: false,
84
+            allInvalid:false,
83 85
         };
84 86
     },
85 87
 
@@ -118,6 +120,15 @@ export default {
118 120
                     }
119 121
                 }
120 122
             }
123
+            let num =0;
124
+            for(let item of d.orderItems){
125
+                if(item.invalid){
126
+                    num++;
127
+                }
128
+            }
129
+            if(num === d.orderItems.length){
130
+                this.allInvalid = true;
131
+            }
121 132
             d.orderItems.sort((a, b) => (a.invalid ? 1 : -1));
122 133
             return d;
123 134
         },
@@ -146,7 +157,6 @@ export default {
146 157
                 disparityData: arr,
147 158
             });
148 159
             let id = this.orderData.orderInfo.id;
149
-            console.log(this.orderData, id);
150 160
             this.router.push({
151 161
                 path: "/pages/index/disparity",
152 162
                 query: {
@@ -269,6 +279,10 @@ export default {
269 279
         background-color: #f3f3f3;
270 280
         color: #666;
271 281
     }
282
+    .allInvalid{
283
+        background-color: #e9e9e9;
284
+        color: #666;
285
+    }
272 286
 }
273 287
 .item-list {
274 288
     padding: px(20) px(40);

+ 4 - 4
src/pages/index/disparity.vue

@@ -138,10 +138,10 @@ export default {
138 138
         submit() {
139 139
             for (let item of this.orderItems) {
140 140
                 if (!item.refund_price) {
141
-                    return this.fn.showToast(`请输入所有退款价格`);
141
+                    return this.fn.showToast(`请输入所有退款金额`);
142 142
                 }
143 143
                 if (!item.reality_weight) {
144
-                    return this.fn.showToast(`请输入所有退款重量`);
144
+                    return this.fn.showToast(`请输入所有实拣重量`);
145 145
                 }
146 146
                 console.log(item.refund_price, item.payAmount);
147 147
                 let refundAmount = parseInt(Number(item.refund_price) * 100);
@@ -181,8 +181,8 @@ export default {
181 181
                                 this.submitLoading = false;
182 182
                                 if (res.success) {
183 183
                                     this.fn.showToast("提交成功");
184
-                                    this.router.back(2);
185
-                                }else{
184
+                                    this.router.go(2);
185
+                                } else {
186 186
                                     this.fn.showToast(
187 187
                                         "提交失败:" + res.message
188 188
                                     );

+ 37 - 17
src/pages/index/index.vue

@@ -99,7 +99,10 @@
99 99
                                                 </div>
100 100
                                                 <div class="date coll-r"></div>
101 101
                                             </div>
102
-                                            <div class="coll">
102
+                                            <div
103
+                                                class="coll"
104
+                                                v-if="afterSale.productInfo"
105
+                                            >
103 106
                                                 <div class="coll-l">
104 107
                                                     商品:{{
105 108
                                                         afterSale.productInfo
@@ -130,7 +133,10 @@
130 133
                                             </div>
131 134
                                             <div
132 135
                                                 class="btns"
133
-                                                v-if="afterSale.status === 1 || afterSale.status === 5"
136
+                                                v-if="
137
+                                                    afterSale.status === 1 ||
138
+                                                    afterSale.status === 5
139
+                                                "
134 140
                                             >
135 141
                                                 <span
136 142
                                                     class="btn"
@@ -275,10 +281,7 @@
275 281
                                 </div>
276 282
                                 <div class="tools">
277 283
                                     <!-- afterSaleStatus 根据售后信息里RefundType字段判断手动加的值 -->
278
-                                    <div
279
-                                        class="oper"
280
-                                        
281
-                                    >
284
+                                    <div class="oper">
282 285
                                         <!-- 只要有一条售后就不能申请取消订单 -->
283 286
                                         <!-- <span
284 287
                                             class="oper-btn"
@@ -286,17 +289,27 @@
286 289
                                             v-if="!order.noShowCancelOrder"
287 290
                                             >取消订单</span
288 291
                                         > -->
289
-                                        <span
290
-                                            class="oper-btn"
291
-                                            v-if="order.afterSaleStatus !== 'all'"
292
-                                            @click="refund(order)"
293
-                                            >退款</span
294
-                                        >
295
-                                        <span
296
-                                            class="oper-btn"
297
-                                            @click="refundDifference(order)"
298
-                                            >退差价</span
292
+                                        <black
293
+                                            v-if="
294
+                                                order.orderInfo.status !== 12 &&
295
+                                                order.orderInfo.status !== 11
296
+                                            "
299 297
                                         >
298
+                                            <span
299
+                                                class="oper-btn"
300
+                                                v-if="
301
+                                                    order.afterSaleStatus !==
302
+                                                    'all'
303
+                                                "
304
+                                                @click="refund(order)"
305
+                                                >退款</span
306
+                                            >
307
+                                            <span
308
+                                                class="oper-btn"
309
+                                                @click="refundDifference(order)"
310
+                                                >退差价</span
311
+                                            >
312
+                                        </black>
300 313
                                     </div>
301 314
                                     <div
302 315
                                         class="view-btn"
@@ -471,6 +484,13 @@ export default {
471 484
                     page: 1,
472 485
                     list: [],
473 486
                 },
487
+                {
488
+                    title: "售后",
489
+                    status: "99",
490
+                    num: 0,
491
+                    page: 1,
492
+                    list: [],
493
+                },
474 494
                 {
475 495
                     title: "已完成",
476 496
                     status: "9",
@@ -848,7 +868,7 @@ export default {
848 868
         },
849 869
 
850 870
         // 退差价
851
-        refundDifference(val){
871
+        refundDifference(val) {
852 872
             this.$store.commit("common/update", {
853 873
                 curOrder: val,
854 874
             });

+ 1 - 1
src/pages/manage/index.vue

@@ -55,7 +55,7 @@
55 55
 
56 56
         <button class="btn" @click="layout">退出登录</button>
57 57
 
58
-        <div class="ver">0.3.1</div>
58
+        <div class="ver">0.3.2</div>
59 59
     </div>
60 60
 </template>
61 61