Browse Source

售后调试

cr 4 years ago
parent
commit
af87c84022

+ 2 - 2
.env

@@ -7,13 +7,13 @@ NODE_ENV = 'production'
7
 VUE_APP_ENV = develop
7
 VUE_APP_ENV = develop
8
 
8
 
9
 # 接口请求基地址
9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
10
+VUE_APP_API_BASE_URL = http://localhost:8076
11
 
11
 
12
 # 接口请求基地址
12
 # 接口请求基地址
13
 VUE_APP_WEBSOCKET_BASE_URL = 
13
 VUE_APP_WEBSOCKET_BASE_URL = 
14
 
14
 
15
 # 图片基地址
15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
16
+VUE_APP_IMAGE_BASE_URL = http://localhost:8076
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
18
 
18
 
19
 # 微信小程序appId
19
 # 微信小程序appId

+ 2 - 2
.env.develop

@@ -7,13 +7,13 @@ NODE_ENV = 'production'
7
 VUE_APP_ENV = production
7
 VUE_APP_ENV = production
8
 
8
 
9
 # 接口请求基地址
9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
10
+VUE_APP_API_BASE_URL = http://localhost:8076
11
 
11
 
12
 # 接口请求基地址
12
 # 接口请求基地址
13
 VUE_APP_WEBSOCKET_BASE_URL = 
13
 VUE_APP_WEBSOCKET_BASE_URL = 
14
 
14
 
15
 # 图片基地址
15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
16
+VUE_APP_IMAGE_BASE_URL = http://localhost:8076
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
18
 
18
 
19
 # 微信小程序appId
19
 # 微信小程序appId

+ 2 - 2
.env.production

@@ -7,13 +7,13 @@ NODE_ENV = 'production'
7
 VUE_APP_ENV = production
7
 VUE_APP_ENV = production
8
 
8
 
9
 # 接口请求基地址
9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
10
+VUE_APP_API_BASE_URL = http://localhost:8076
11
 
11
 
12
 # 接口请求基地址
12
 # 接口请求基地址
13
 VUE_APP_WEBSOCKET_BASE_URL = 
13
 VUE_APP_WEBSOCKET_BASE_URL = 
14
 
14
 
15
 # 图片基地址
15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
16
+VUE_APP_IMAGE_BASE_URL = http://localhost:8076
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
18
 
18
 
19
 # 微信小程序appId
19
 # 微信小程序appId

+ 7 - 1
a.txt

@@ -1 +1,7 @@
1
-VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
1
+VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
2
+
3
+
4
+三方门店ID:5424_2705880
5
+门店名称:t_pK0XCn0TDQ
6
+商家端登录账号:M35PJ_2705880
7
+商家端登录密码:lqHtOkG3b3

+ 3 - 2
src/common/store/common.js

@@ -9,8 +9,9 @@ const module = {
9
         curShop:{},
9
         curShop:{},
10
         tabIndex:0,
10
         tabIndex:0,
11
         editClassify:null,  // manage/classify-form 编辑时保存的临时数据
11
         editClassify:null,  // manage/classify-form 编辑时保存的临时数据
12
-        specData: null,   // manage/spec-edit 编辑时零时保存
13
-        skuItem: null,   // manage/spec-item-form 编辑时零时保存
12
+        specData: null,   // manage/spec-edit 编辑时临时保存
13
+        skuItem: null,   // manage/spec-item-form 编辑时临时保存
14
+        curOrder: null,   // index/refund 售后临时保存
14
     },
15
     },
15
 
16
 
16
     // 同步方法
17
     // 同步方法

+ 6 - 0
src/pages.json

@@ -46,6 +46,12 @@
46
                 "enablePullDownRefresh": true
46
                 "enablePullDownRefresh": true
47
             }
47
             }
48
         },
48
         },
49
+        {
50
+            "path": "pages/index/refund",
51
+            "style": {
52
+                "navigationBarTitleText": "部分退款"
53
+            }
54
+        },
49
         {
55
         {
50
             "path": "pages/manage/index",
56
             "path": "pages/manage/index",
51
             "style": {
57
             "style": {

+ 174 - 9
src/pages/index/index.vue

@@ -36,6 +36,55 @@
36
                                 v-for="(order, oindex) of orderList"
36
                                 v-for="(order, oindex) of orderList"
37
                                 :key="oindex"
37
                                 :key="oindex"
38
                             >
38
                             >
39
+                                <div class="apply">
40
+                                    <div class="head">
41
+                                        <div class="tit">退款</div>
42
+                                    </div>
43
+                                    <section class="info-item">
44
+                                        <div class="coll">
45
+                                            <div class="coll-l coll-tit">
46
+                                                顾客申请部分退款
47
+                                            </div>
48
+                                            <div class="date coll-r">
49
+                                                11-24 10:43
50
+                                            </div>
51
+                                        </div>
52
+                                        <div class="coll">
53
+                                            <div class="coll-l">
54
+                                                金额:<span class="money-red">¥0.5</span>
55
+                                            </div>
56
+                                            <div class="date coll-r"></div>
57
+                                        </div>
58
+                                        <div class="coll">
59
+                                            <div class="coll-l">
60
+                                                商品:xxxx商品
61
+                                            </div>
62
+                                            <div class="good-r coll-r">
63
+                                                <span class="num">x1</span>
64
+                                                <span class="money">¥0.5</span>
65
+                                            </div>
66
+                                        </div>
67
+                                        <div class="coll">
68
+                                            <div class="coll-l">
69
+                                                商品:xxxx商品
70
+                                            </div>
71
+                                            <div class="good-r coll-r">
72
+                                                <span class="num">x1</span>
73
+                                                <span class="money">¥0.5</span>
74
+                                            </div>
75
+                                        </div>
76
+                                        <div class="coll">
77
+                                            <div class="coll-l">
78
+                                                理由:计划有变,不想要了计划有变,不想要了计划有变,不想要了计划有变,不想要了计划有变,不想要了计划有变,不想要了
79
+                                            </div>
80
+                                            <div class="coll-r"></div>
81
+                                        </div>
82
+                                    </section>
83
+                                    <div class="btns">
84
+                                        <span class="btn" @click="applyNo(order)">拒绝</span>
85
+                                        <span class="btn ok" @click="applyOk(order)">同意</span>
86
+                                    </div>
87
+                                </div>
39
                                 <div class="order__main">
88
                                 <div class="order__main">
40
                                     <div class="order__top">
89
                                     <div class="order__top">
41
                                         <div class="des">
90
                                         <div class="des">
@@ -143,32 +192,45 @@
143
                                 >
192
                                 >
144
                                     备注:{{ order.orderInfo.description }}
193
                                     备注:{{ order.orderInfo.description }}
145
                                 </div>
194
                                 </div>
146
-
147
-                                <div class="view-detail">
195
+                                <div class="tools">
196
+                                    <div class="oper">
197
+                                        <span class="oper-btn">取消订单</span>
198
+                                        <span
199
+                                            class="oper-btn"
200
+                                            @click="refund(order)"
201
+                                            >部分退款</span
202
+                                        >
203
+                                    </div>
148
                                     <div
204
                                     <div
149
                                         class="view-btn"
205
                                         class="view-btn"
150
                                         @click="orderClick(order)"
206
                                         @click="orderClick(order)"
151
                                     >
207
                                     >
152
                                         查看订单商品
208
                                         查看订单商品
153
                                     </div>
209
                                     </div>
210
+                                </div>
211
+                                <div class="view-detail">
154
                                     <ul class="goods" v-if="order.viewDetail">
212
                                     <ul class="goods" v-if="order.viewDetail">
155
                                         <li
213
                                         <li
156
                                             v-for="good of order.orderItems"
214
                                             v-for="good of order.orderItems"
157
-                                            :key="good.id"
215
+                                            :key="good.orderItem.id"
158
                                             class="goods__item"
216
                                             class="goods__item"
159
                                         >
217
                                         >
160
                                             <div class="goods__content">
218
                                             <div class="goods__content">
161
                                                 <div class="goods__left">
219
                                                 <div class="goods__left">
162
                                                     <my-image
220
                                                     <my-image
163
                                                         class="goods__img"
221
                                                         class="goods__img"
164
-                                                        :src="good.productImage"
222
+                                                        :src="
223
+                                                            good.orderItem
224
+                                                                .productImage
225
+                                                        "
165
                                                     ></my-image>
226
                                                     ></my-image>
166
                                                     <div class="goods__info">
227
                                                     <div class="goods__info">
167
                                                         <div
228
                                                         <div
168
                                                             class="goods__title"
229
                                                             class="goods__title"
169
                                                         >
230
                                                         >
170
                                                             {{
231
                                                             {{
171
-                                                                good.productName ||
232
+                                                                good.orderItem
233
+                                                                    .productName ||
172
                                                                 ""
234
                                                                 ""
173
                                                             }}
235
                                                             }}
174
                                                         </div>
236
                                                         </div>
@@ -176,7 +238,8 @@
176
                                                             class="goods__spec"
238
                                                             class="goods__spec"
177
                                                         >
239
                                                         >
178
                                                             {{
240
                                                             {{
179
-                                                                good.skuName ||
241
+                                                                good.orderItem
242
+                                                                    .skuName ||
180
                                                                 ""
243
                                                                 ""
181
                                                             }}
244
                                                             }}
182
                                                         </div>
245
                                                         </div>
@@ -185,14 +248,15 @@
185
                                                 <div class="goods__right">
248
                                                 <div class="goods__right">
186
                                                     <div class="goods__price">
249
                                                     <div class="goods__price">
187
                                                         ¥{{
250
                                                         ¥{{
188
-                                                            good.price
251
+                                                            good.orderItem.price
189
                                                                 | minuteToRmb
252
                                                                 | minuteToRmb
190
                                                         }}
253
                                                         }}
191
                                                     </div>
254
                                                     </div>
192
                                                     <div class="goods__num">
255
                                                     <div class="goods__num">
193
                                                         {{
256
                                                         {{
194
                                                             "X" +
257
                                                             "X" +
195
-                                                            (good.count || "0")
258
+                                                            (good.orderItem
259
+                                                                .count || "0")
196
                                                         }}
260
                                                         }}
197
                                                     </div>
261
                                                     </div>
198
                                                 </div>
262
                                                 </div>
@@ -599,6 +663,29 @@ export default {
599
             });
663
             });
600
         },
664
         },
601
 
665
 
666
+        // 部分退款
667
+        refund(val) {
668
+            this.$store.commit("common/update", {
669
+                curOrder: val,
670
+            });
671
+            this.router.push({
672
+                path: "/pages/index/refund",
673
+                query: {
674
+                    id: val.orderInfo.id,
675
+                },
676
+            });
677
+        },
678
+
679
+        // 拒绝退款
680
+        applyNo(val){
681
+
682
+        },
683
+
684
+        // 同意退款
685
+        applyOk(val){
686
+
687
+        },
688
+
602
         goShopSelect() {
689
         goShopSelect() {
603
             this.router.push("/pages/index/select");
690
             this.router.push("/pages/index/select");
604
         },
691
         },
@@ -987,8 +1074,24 @@ page {
987
 }
1074
 }
988
 .view-detail {
1075
 .view-detail {
989
     padding: px(20) px(40) px(50);
1076
     padding: px(20) px(40) px(50);
1077
+}
1078
+.tools {
1079
+    display: flex;
1080
+    justify-content: space-between;
1081
+    align-items: center;
1082
+    padding: px(0) px(40);
1083
+    .oper-btn {
1084
+        display: inline-block;
1085
+        text-align: center;
1086
+        line-height: px(66);
1087
+        padding: 0 px(20);
1088
+        font-size: px(38);
1089
+        height: px(66);
1090
+        border-radius: px(33);
1091
+        border: 1px solid #f1f1f1;
1092
+        margin-right: px(20);
1093
+    }
990
     .view-btn {
1094
     .view-btn {
991
-        display: block;
992
         text-align: right;
1095
         text-align: right;
993
         font-size: px(38);
1096
         font-size: px(38);
994
         color: #3582fb;
1097
         color: #3582fb;
@@ -1101,4 +1204,66 @@ page {
1101
     font-weight: 500;
1204
     font-weight: 500;
1102
     color: #333;
1205
     color: #333;
1103
 }
1206
 }
1207
+.apply {
1208
+    padding: px(40);
1209
+    border-bottom: 1px dashed #f1f1f1;
1210
+    background-color: #f6f6f6;
1211
+    .head {
1212
+        display: flex;
1213
+        justify-content: space-between;
1214
+        align-items: center;
1215
+        padding-bottom: px(10);
1216
+        .tit {
1217
+            font-size: px(50);
1218
+        }
1219
+    }
1220
+    .info-item {
1221
+        border-bottom: 1px solid #e9e9e9;
1222
+        padding: px(15) 0;
1223
+        .coll {
1224
+            display: flex;
1225
+            justify-content: space-between;
1226
+            align-items: center;
1227
+            color: #666;
1228
+            font-size: px(40);
1229
+            padding: px(0) px(30);
1230
+            margin-top: px(20);
1231
+        }
1232
+        .coll-tit{
1233
+            color: #333;
1234
+            font-size: px(44);
1235
+        }
1236
+        .good-r{
1237
+            .money{
1238
+                display: inline-flex;
1239
+                width: px(200);
1240
+                justify-content: flex-end;
1241
+            }
1242
+        }
1243
+    }
1244
+    .btns{
1245
+        display: flex;
1246
+        justify-content: space-between;
1247
+        align-items: center;
1248
+        margin-top: px(30);
1249
+        .btn{
1250
+            width: 45%;
1251
+            height: px(100);
1252
+            border:1px solid #cacaca;
1253
+            border-radius: px(50);
1254
+            font-size: px(44);
1255
+            text-align: center;
1256
+            line-height: px(100);
1257
+            background-color: #fff;
1258
+        }
1259
+        .ok{
1260
+            background-color: #ff4b26;
1261
+            border-color: #ff4b26;
1262
+            color: #fff;
1263
+        }
1264
+    }
1265
+}
1266
+.money-red{
1267
+    color: #ff475f;
1268
+}
1104
 </style>
1269
 </style>

+ 267 - 0
src/pages/index/refund.vue

@@ -0,0 +1,267 @@
1
+<template>
2
+    <div class="page" :class="{ 'page--iphoneX': iphoneX }">
3
+        <div class="tips">温馨提示:请优先联系用户协商处理</div>
4
+        <div class="black-tit">请选择退款商品</div>
5
+        <div v-if="orderData">
6
+            <checkbox-group class="item-list" @change="itemChange">
7
+                <label
8
+                    class="item"
9
+                    v-for="(item, index) of orderData.orderItems"
10
+                    :key="index"
11
+                >
12
+                    <div class="check">
13
+                        <checkbox class="checkbox" :value="item.orderItem.id" />
14
+                    </div>
15
+                    <div class="info">
16
+                        <my-image
17
+                            :src="item.orderItem.productImage"
18
+                            class="img"
19
+                        ></my-image>
20
+                        <div class="data">
21
+                            <div class="tit">
22
+                                {{ item.orderItem.productName }}
23
+                            </div>
24
+                            <div class="des">
25
+                                <span class="price"
26
+                                    >¥{{
27
+                                        item.orderItem.price | minuteToRmb
28
+                                    }}</span
29
+                                >
30
+                                <span class="num"
31
+                                    >x {{ item.orderItem.count }}</span
32
+                                >
33
+                            </div>
34
+                        </div>
35
+                    </div>
36
+                </label>
37
+            </checkbox-group>
38
+        </div>
39
+        <div class="refund-info">
40
+            <div class="head">
41
+                <div class="tit">退款金额</div>
42
+                <div class="money">¥0</div>
43
+            </div>
44
+            <!-- <div class="des">
45
+                备注:
46
+            </div> -->
47
+        </div>
48
+        <div class="black-tit">请选择退款原因</div>
49
+        <radio-group @change="radioChange" class="info-list">
50
+            <label class="item" v-for="item of radioList" :key="item.key">
51
+                <div class="radio">
52
+                    <radio class="radio-inp" :value="item.value" />
53
+                </div>
54
+                <div class="info">{{ item.key }}</div>
55
+            </label>
56
+        </radio-group>
57
+        <div class="btn-box">
58
+            <span class="btn" @click="submit">确定</span>
59
+        </div>
60
+    </div>
61
+</template>
62
+
63
+<script>
64
+import MyImage from "../../components/image/index";
65
+
66
+export default {
67
+    name: "",
68
+    components: { MyImage },
69
+
70
+    // 数据
71
+    data() {
72
+        return {
73
+            orderData: null,
74
+            radioList: [
75
+                { key: "商品已售完", value: "商品已售完" },
76
+                { key: "店铺太忙", value: "店铺太忙" },
77
+                { key: "其他", value: "其他" },
78
+            ],
79
+            curReason: "",
80
+            curGoodItemIds: [],
81
+        };
82
+    },
83
+
84
+    onLoad() {
85
+        let curOrder = this.$store.state.common.curOrder;
86
+        this.orderData = curOrder;
87
+        console.log(curOrder);
88
+        this.$store.commit("common/update", {
89
+            curOrder: null,
90
+        });
91
+        if (!curOrder) {
92
+            this.router.back();
93
+        }
94
+    },
95
+    async onShow() {},
96
+    // 函数
97
+    methods: {
98
+        radioChange(e) {
99
+            this.curReason = e.detail.value;
100
+        },
101
+        itemChange(e) {
102
+            this.curGoodItemIds = e.detail.value;
103
+        },
104
+
105
+        submit() {
106
+            if (this.curGoodItemIds.length === 0) {
107
+                return this.fn.showToast("请选择退货项");
108
+            }
109
+            if (this.curGoodItemIds.length === this.orderData.orderItems.length) {
110
+                return this.fn.showToast("全部退款请选择取消订单");
111
+            }
112
+            if (!this.curReason) {
113
+                return this.fn.showToast("请选择退货原因");
114
+            }
115
+            let sendData = {
116
+                orderItemIds:this.curGoodItemIds,
117
+                reason:this.curReason,
118
+                remark:this.curReason,
119
+            }
120
+            this.api.post('/order/PartialRefundApply',sendData).then(res=>{
121
+
122
+            })
123
+        },
124
+    },
125
+
126
+    // 数据计算
127
+    computed: {
128
+        user() {
129
+            return this.$store.state.user.user;
130
+        },
131
+    },
132
+
133
+    // 数据监听
134
+    watch: {},
135
+};
136
+</script>
137
+
138
+<style lang="scss" scoped>
139
+.page {
140
+    padding-bottom: px(180);
141
+}
142
+.tips {
143
+    background-color: #fef9f3;
144
+    font-size: px(40);
145
+    padding: 0 px(40);
146
+    height: px(100);
147
+    line-height: px(100);
148
+    color: #ec883d;
149
+}
150
+.black-tit {
151
+    padding: px(50) px(40) px(30);
152
+    background-color: #f1f0f5;
153
+    font-size: px(42);
154
+}
155
+.btn-box {
156
+    position: fixed;
157
+    bottom: 0;
158
+    left: 0;
159
+    right: 0;
160
+    z-index: 100;
161
+    background-color: #fff;
162
+    padding: px(40);
163
+    .btn {
164
+        display: block;
165
+        width: 100%;
166
+        height: px(110);
167
+        border-radius: px(10);
168
+        color: #fff;
169
+        text-align: center;
170
+        line-height: px(110);
171
+        background-color: rgb(0, 188, 38);
172
+    }
173
+}
174
+.item-list {
175
+    padding: px(20) px(40);
176
+    .item {
177
+        display: flex;
178
+        justify-content: space-between;
179
+        align-items: center;
180
+        padding: px(40) 0;
181
+        border-bottom: 1px solid #f1f1f1;
182
+    }
183
+    .check {
184
+        width: px(100);
185
+        flex-shrink: 0;
186
+        margin-right: px(20);
187
+    }
188
+    .checkbox {
189
+        transform: scale(0.8);
190
+    }
191
+    .info {
192
+        width: 100%;
193
+        display: flex;
194
+        justify-content: space-between;
195
+        align-items: stretch;
196
+    }
197
+    .img {
198
+        width: px(180);
199
+        height: px(180);
200
+        flex-shrink: 0;
201
+        margin-right: px(20);
202
+        /deep/ img {
203
+            width: px(180);
204
+            height: px(180);
205
+            background: #f1f1f1;
206
+        }
207
+    }
208
+    .data {
209
+        width: 100%;
210
+    }
211
+    .tit {
212
+        font-size: px(44);
213
+        @include omits(2);
214
+    }
215
+    .des {
216
+        margin-top: px(20);
217
+    }
218
+    .price {
219
+        font-size: px(40);
220
+        color: #ff475f;
221
+    }
222
+    .num {
223
+        font-size: px(36);
224
+        color: #666;
225
+        margin-left: px(30);
226
+    }
227
+}
228
+.refund-info {
229
+    padding: px(50) px(40) px(30);
230
+    .head {
231
+        display: flex;
232
+        justify-content: space-between;
233
+        align-items: center;
234
+    }
235
+    .tit {
236
+        font-size: px(44);
237
+        font-weight: 700;
238
+        color: #666;
239
+    }
240
+    .money {
241
+        font-size: px(48);
242
+        color: #ff475f;
243
+        font-weight: 700;
244
+    }
245
+}
246
+.info-list {
247
+    background-color: #fff;
248
+    .item {
249
+        padding: px(30) px(40);
250
+        border-bottom: 1px solid #f1f1f1;
251
+        display: flex;
252
+        justify-content: space-between;
253
+        align-items: center;
254
+    }
255
+    .radio {
256
+        width: px(100);
257
+        flex-shrink: 0;
258
+        .radio-inp {
259
+            transform: scale(0.8);
260
+        }
261
+    }
262
+    .info {
263
+        width: 100%;
264
+        font-size: px(44);
265
+    }
266
+}
267
+</style>

+ 6 - 1
src/pages/manage/add-good-form.vue

@@ -565,6 +565,7 @@ export default {
565
             curSpecIndex: 0, // 当前编辑specData
565
             curSpecIndex: 0, // 当前编辑specData
566
             skuTableData: [], // sku表格数据  详情见initSkuTable
566
             skuTableData: [], // sku表格数据  详情见initSkuTable
567
             skuAttrs: {}, // sku后台保存用
567
             skuAttrs: {}, // sku后台保存用
568
+            submitLoading:false,
568
         };
569
         };
569
     },
570
     },
570
     onLoad() {
571
     onLoad() {
@@ -905,6 +906,9 @@ export default {
905
 
906
 
906
         // 保存
907
         // 保存
907
         save(type) {
908
         save(type) {
909
+            if(this.submitLoading){
910
+                return;
911
+            }
908
             let requiredFile1 = [
912
             let requiredFile1 = [
909
                 {
913
                 {
910
                     key: "storeId",
914
                     key: "storeId",
@@ -1060,8 +1064,9 @@ export default {
1060
                     Number(sendData.baseInfo.tagPrice) * 100
1064
                     Number(sendData.baseInfo.tagPrice) * 100
1061
                 );
1065
                 );
1062
             }
1066
             }
1063
-
1067
+            this.submitLoading = true;
1064
             this.api.post("/product/SaveEdit", sendData).then((res) => {
1068
             this.api.post("/product/SaveEdit", sendData).then((res) => {
1069
+                this.submitLoading = false;
1065
                 if (res.success) {
1070
                 if (res.success) {
1066
                     if (type === "next") {
1071
                     if (type === "next") {
1067
                         this.fn.showToast("保存成功");
1072
                         this.fn.showToast("保存成功");

+ 6 - 0
src/pages/manage/edit-good-form.vue

@@ -565,6 +565,7 @@ export default {
565
             curSpecIndex: 0, // 当前编辑specData
565
             curSpecIndex: 0, // 当前编辑specData
566
             skuTableData: [], // sku表格数据  详情见initSkuTable
566
             skuTableData: [], // sku表格数据  详情见initSkuTable
567
             skuAttrs: {}, // sku后台保存用
567
             skuAttrs: {}, // sku后台保存用
568
+            submitLoading:false,
568
         };
569
         };
569
     },
570
     },
570
     onLoad(opts) {
571
     onLoad(opts) {
@@ -1028,6 +1029,9 @@ export default {
1028
 
1029
 
1029
         // 保存
1030
         // 保存
1030
         save(type) {
1031
         save(type) {
1032
+            if(this.submitLoading){
1033
+                return;
1034
+            }
1031
             let requiredFile1 = [
1035
             let requiredFile1 = [
1032
                 {
1036
                 {
1033
                     key: "storeId",
1037
                     key: "storeId",
@@ -1181,7 +1185,9 @@ export default {
1181
                     Number(sendData.baseInfo.tagPrice) * 100
1185
                     Number(sendData.baseInfo.tagPrice) * 100
1182
                 );
1186
                 );
1183
             }
1187
             }
1188
+            this.submitLoading = true;
1184
             this.api.post("/product/SaveEdit", sendData).then((res) => {
1189
             this.api.post("/product/SaveEdit", sendData).then((res) => {
1190
+                this.submitLoading = false;
1185
                 if (res.success) {
1191
                 if (res.success) {
1186
                     if (type === "next") {
1192
                     if (type === "next") {
1187
                     } else {
1193
                     } else {