cr преди 4 години
родител
ревизия
a128242d60
променени са 5 файла, в които са добавени 93 реда и са изтрити 60 реда
  1. 1 1
      releaselog.md
  2. 20 22
      src/pages/index/difference.vue
  3. 1 1
      src/pages/index/index.vue
  4. 70 35
      src/pages/index/refund.vue
  5. 1 1
      src/pages/manage/index.vue

+ 1 - 1
releaselog.md

@@ -1,5 +1,5 @@
1
 
1
 
2
-# 0.3.2 (20.12.4 11:00)
2
+# 0.3.2 (20.12.4 11:00)  0.3.21
3
 ### 修改bug
3
 ### 修改bug
4
 
4
 
5
 # 0.3.1 (20.12.3 18:00)
5
 # 0.3.1 (20.12.3 18:00)

+ 20 - 22
src/pages/index/difference.vue

@@ -54,15 +54,21 @@
54
                                     item.refundAmount | minuteToRmb
54
                                     item.refundAmount | minuteToRmb
55
                                 }}
55
                                 }}
56
                             </div>
56
                             </div>
57
-                            <div class="">已退重量:{{item.actualPickingWeight || '0'}}g</div>
57
+                            <div class="">
58
+                                已退重量:{{ item.actualPickingWeight || "0" }}g
59
+                            </div>
58
                         </div>
60
                         </div>
59
                     </div>
61
                     </div>
60
                 </label>
62
                 </label>
61
             </checkbox-group>
63
             </checkbox-group>
62
         </div>
64
         </div>
63
         <div class="btn-box">
65
         <div class="btn-box">
64
-            <span class="btn"  v-if="!allInvalid" @click="disparity">退差价</span>
65
-            <span class="btn allInvalid" v-if="allInvalid">没有可退差价商品</span>
66
+            <span class="btn" v-if="!allInvalid" @click="disparity"
67
+                >退差价</span
68
+            >
69
+            <span class="btn allInvalid" v-if="allInvalid"
70
+                >没有可退差价商品</span
71
+            >
66
         </div>
72
         </div>
67
     </div>
73
     </div>
68
 </template>
74
 </template>
@@ -81,7 +87,7 @@ export default {
81
             curReason: "",
87
             curReason: "",
82
             curGoodItemIds: [],
88
             curGoodItemIds: [],
83
             submitLoading: false,
89
             submitLoading: false,
84
-            allInvalid:false,
90
+            allInvalid: false,
85
         };
91
         };
86
     },
92
     },
87
 
93
 
@@ -120,13 +126,13 @@ export default {
120
                     }
126
                     }
121
                 }
127
                 }
122
             }
128
             }
123
-            let num =0;
124
-            for(let item of d.orderItems){
125
-                if(item.invalid){
129
+            let num = 0;
130
+            for (let item of d.orderItems) {
131
+                if (item.invalid) {
126
                     num++;
132
                     num++;
127
                 }
133
                 }
128
             }
134
             }
129
-            if(num === d.orderItems.length){
135
+            if (num === d.orderItems.length) {
130
                 this.allInvalid = true;
136
                 this.allInvalid = true;
131
             }
137
             }
132
             d.orderItems.sort((a, b) => (a.invalid ? 1 : -1));
138
             d.orderItems.sort((a, b) => (a.invalid ? 1 : -1));
@@ -218,18 +224,6 @@ export default {
218
         user() {
224
         user() {
219
             return this.$store.state.user.user;
225
             return this.$store.state.user.user;
220
         },
226
         },
221
-        refundNum() {
222
-            let num = 0;
223
-            for (let id of this.curGoodItemIds) {
224
-                for (let item of this.orderData.orderItems) {
225
-                    if (item.id === id) {
226
-                        num += item.payAmount;
227
-                    }
228
-                }
229
-            }
230
-            num = num.toFixed(2);
231
-            return num;
232
-        },
233
     },
227
     },
234
 
228
 
235
     // 数据监听
229
     // 数据监听
@@ -279,7 +273,7 @@ export default {
279
         background-color: #f3f3f3;
273
         background-color: #f3f3f3;
280
         color: #666;
274
         color: #666;
281
     }
275
     }
282
-    .allInvalid{
276
+    .allInvalid {
283
         background-color: #e9e9e9;
277
         background-color: #e9e9e9;
284
         color: #666;
278
         color: #666;
285
     }
279
     }
@@ -294,6 +288,10 @@ export default {
294
         border-bottom: 1px solid #f1f1f1;
288
         border-bottom: 1px solid #f1f1f1;
295
         &.invalid {
289
         &.invalid {
296
             background-color: #efefef;
290
             background-color: #efefef;
291
+
292
+            .difference {
293
+                background-color: #e9e9e9;
294
+            }
297
         }
295
         }
298
     }
296
     }
299
     .check {
297
     .check {
@@ -389,7 +387,7 @@ export default {
389
     display: flex;
387
     display: flex;
390
     justify-content: space-between;
388
     justify-content: space-between;
391
     align-items: center;
389
     align-items: center;
392
-    background-color: #e9e9e9;
390
+    background-color: #efefef;
393
     color: #666;
391
     color: #666;
394
     padding: px(20) px(10);
392
     padding: px(20) px(10);
395
     font-size: px(38);
393
     font-size: px(38);

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

@@ -369,7 +369,7 @@
369
                                     </ul>
369
                                     </ul>
370
                                 </div>
370
                                 </div>
371
 
371
 
372
-                                <div class="order__btns" v-if="tab !== 5">
372
+                                <div class="order__btns" v-if="tab !== 6 && tab !== 5">
373
                                     <div
373
                                     <div
374
                                         class="btn tel"
374
                                         class="btn tel"
375
                                         @click="makePhone(order)"
375
                                         @click="makePhone(order)"

+ 70 - 35
src/pages/index/refund.vue

@@ -17,28 +17,45 @@
17
                             :value="item.id"
17
                             :value="item.id"
18
                         />
18
                         />
19
                     </div>
19
                     </div>
20
-                    <div class="info">
21
-                        <my-image
22
-                            :src="item.productImage"
23
-                            class="img"
24
-                        ></my-image>
25
-                        <div class="data">
26
-                            <div class="tit">
27
-                                {{ item.productName }}
20
+                    <div class="main">
21
+                        <div class="info">
22
+                            <my-image
23
+                                :src="item.productImage"
24
+                                class="img"
25
+                            ></my-image>
26
+                            <div class="data">
27
+                                <div class="tit">
28
+                                    {{ item.productName }}
29
+                                </div>
30
+                                <div>
31
+                                    <span class="num"
32
+                                        >数量:x {{ item.count }}</span
33
+                                    >
34
+                                    <span class="num" v-if="item.skuName"
35
+                                        >规格: {{ item.skuName }}</span
36
+                                    >
37
+                                </div>
38
+                                <div class="des">
39
+                                    支付金额:
40
+                                    <span class="price"
41
+                                        >¥{{
42
+                                            item.payAmount | minuteToRmb
43
+                                        }}</span
44
+                                    >
45
+                                </div>
28
                             </div>
46
                             </div>
29
-                            <div>
30
-                                <span class="num"
31
-                                    >数量:x {{ item.count }}</span
32
-                                >
33
-                                <span class="num" v-if="item.skuName"
34
-                                    >规格: {{ item.skuName }}</span
35
-                                >
47
+                        </div>
48
+                        <div
49
+                            class="difference"
50
+                            v-if="item.refundAmount && item.actualPickingWeight"
51
+                        >
52
+                            <div class="name">
53
+                                已退差价:¥{{
54
+                                    item.refundAmount | minuteToRmb
55
+                                }}
36
                             </div>
56
                             </div>
37
-                            <div class="des">
38
-                                支付金额:
39
-                                <span class="price"
40
-                                    >¥{{ item.payAmount | minuteToRmb }}</span
41
-                                >
57
+                            <div class="">
58
+                                已退重量:{{ item.actualPickingWeight || "0" }}g
42
                             </div>
59
                             </div>
43
                         </div>
60
                         </div>
44
                     </div>
61
                     </div>
@@ -178,8 +195,7 @@ export default {
178
                                 if (res.success) {
195
                                 if (res.success) {
179
                                     this.fn.showToast("提交成功");
196
                                     this.fn.showToast("提交成功");
180
                                     this.router.back();
197
                                     this.router.back();
181
-                                }else{
182
-                                    
198
+                                } else {
183
                                     this.fn.showToast(
199
                                     this.fn.showToast(
184
                                         "提交失败:" + res.message
200
                                         "提交失败:" + res.message
185
                                     );
201
                                     );
@@ -190,7 +206,7 @@ export default {
190
         },
206
         },
191
 
207
 
192
         // 退差价
208
         // 退差价
193
-        disparity(){
209
+        disparity() {
194
             if (this.submitLoading) {
210
             if (this.submitLoading) {
195
                 return;
211
                 return;
196
             }
212
             }
@@ -198,9 +214,9 @@ export default {
198
                 return this.fn.showToast("请选择退货项");
214
                 return this.fn.showToast("请选择退货项");
199
             }
215
             }
200
             let arr = [];
216
             let arr = [];
201
-            for(id of this.curGoodItemIds){
202
-                for(let item of this.orderData.orderItems){
203
-                    if(item.id === id){
217
+            for (id of this.curGoodItemIds) {
218
+                for (let item of this.orderData.orderItems) {
219
+                    if (item.id === id) {
204
                         arr.push(item);
220
                         arr.push(item);
205
                     }
221
                     }
206
                 }
222
                 }
@@ -209,20 +225,20 @@ export default {
209
                 disparityData: arr,
225
                 disparityData: arr,
210
             });
226
             });
211
             let id = this.orderData.orderInfo.id;
227
             let id = this.orderData.orderInfo.id;
212
-            console.log(this.orderData,id);
228
+            console.log(this.orderData, id);
213
             this.router.replace({
229
             this.router.replace({
214
-                path:'/pages/index/disparity',
215
-                query:{
216
-                    orderId:id
217
-                }
218
-            })
230
+                path: "/pages/index/disparity",
231
+                query: {
232
+                    orderId: id,
233
+                },
234
+            });
219
         },
235
         },
220
 
236
 
221
         // 取消订单
237
         // 取消订单
222
         cancelOrder(flag) {
238
         cancelOrder(flag) {
223
-            let str = '确认取消该订单,并全部退款';
224
-            if(flag === true){
225
-                str = '你已选中所有商品,确认后将取消订单全部退款';
239
+            let str = "确认取消该订单,并全部退款";
240
+            if (flag === true) {
241
+                str = "你已选中所有商品,确认后将取消订单全部退款";
226
             }
242
             }
227
             let val = this.orderData;
243
             let val = this.orderData;
228
             this.fn
244
             this.fn
@@ -277,6 +293,9 @@ export default {
277
                 for (let item of this.orderData.orderItems) {
293
                 for (let item of this.orderData.orderItems) {
278
                     if (item.id === id) {
294
                     if (item.id === id) {
279
                         num += item.payAmount;
295
                         num += item.payAmount;
296
+                        if(item.refundAmount){
297
+                            num-=item.refundAmount;
298
+                        }
280
                     }
299
                     }
281
                 }
300
                 }
282
             }
301
             }
@@ -353,6 +372,10 @@ export default {
353
     .checkbox {
372
     .checkbox {
354
         transform: scale(0.8);
373
         transform: scale(0.8);
355
     }
374
     }
375
+    
376
+    .main {
377
+        width: 100%;
378
+    }
356
     .info {
379
     .info {
357
         width: 100%;
380
         width: 100%;
358
         display: flex;
381
         display: flex;
@@ -431,4 +454,16 @@ export default {
431
         font-size: px(44);
454
         font-size: px(44);
432
     }
455
     }
433
 }
456
 }
457
+.difference {
458
+    display: flex;
459
+    justify-content: space-between;
460
+    align-items: center;
461
+    background-color: #e9e9e9;
462
+    color: #666;
463
+    padding: px(20) px(10);
464
+    font-size: px(38);
465
+    .link {
466
+        text-decoration: underline;
467
+    }
468
+}
434
 </style>
469
 </style>

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

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