xuqiang 4 ani în urmă
părinte
comite
d52062fcfc

+ 1 - 1
.env.development

@@ -1 +1 @@
-VUE_APP_BASE_URL=http://localhost:8080
+VUE_APP_BASE_URL=https://zhuoka.izouma.com

+ 61 - 7
src/components/AllorderInfo.vue

@@ -39,6 +39,10 @@
                 <div v-if="status == 'COMPETED'" @click="logistics" class="box-but3">查看物流</div>
                 <div v-if="status == 'CANCELED'" @click="deletes" class="box-but">删除订单</div>
                 <div v-if="status == 'CANCELED'" @click="again" class="box-but3">重新购买</div>
+                <div v-if="status == 'REFUND'" @click="cancelrefund" class="box-but">取消退款</div>
+                <div v-if="status == 'REFUND'" @click="sales" class="box-but3">联系买家</div>
+                <div v-if="status == 'REFUNDED'" @click="deletes" class="box-but">删除订单</div>
+                <div v-if="status == 'REFUNDED'" @click="applydetails" class="box-but3">退款详情</div>
             </div>
         </div>
         <van-popup :show="show" custom-style="background:transparent;border-radius: 12px 12px 0 0;" use-slot>
@@ -79,7 +83,8 @@ export default {
         return {
             show: false,
             stepsList: [],
-            logisTics: []
+            logisTics: [],
+            refundId: 0
         };
     },
     computed: {
@@ -111,6 +116,12 @@ export default {
             if (this.status === 'SEND') {
                 return '待收货';
             }
+            if (this.status === 'REFUND') {
+                return '申请退款中';
+            }
+            if (this.status === 'REFUNDED') {
+                return '退款成功';
+            }
             return '';
         }
     },
@@ -149,12 +160,17 @@ export default {
             this.$emit('refreash');
         },
         allorder() {
-            this.navigateTo('/pages/orderdetails?id=' + this.id);
+            if (this.status === 'REFUND' || this.status === 'REFUNDED') {
+                this.navigateTo('/pages/Applydetails?id=' + this.id);
+            } else {
+                this.navigateTo('/pages/orderdetails?id=' + this.id);
+            }
         },
         again() {
             this.navigateTo('/pages/details?id=' + this.caseId);
         },
         sales() {
+            console.log(this.all);
             wx.showToast({
                 title: '敬请开放',
                 icon: 'none'
@@ -249,6 +265,23 @@ export default {
                 }
             });
         },
+        rufundApply() {
+            if (this.status === 'REFUND' || this.status === 'REFUNDED') {
+                this.$http
+                    .get('/orderInfo/get/' + this.id)
+                    .then(res => {
+                        this.refundId = res.refundId;
+                        console.log(this.refundId);
+                        this.hideLoading();
+                    })
+                    .catch(e => {
+                        this.hideLoading();
+                        if (e.error) {
+                            this.toast(e.rror);
+                        }
+                    });
+            }
+        },
         deletes() {
             wx.showModal({
                 title: '提示',
@@ -268,12 +301,30 @@ export default {
                 }
             });
         },
-        Apply() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
+        cancelrefund() {
+            wx.showModal({
+                title: '提示',
+                content: '确定取消退款?',
+                success: res => {
+                    if (res.confirm) {
+                        this.$http.post('orderRefundApply/cancel', { id: this.refundId }).then(res => {
+                            wx.showToast({
+                                icon: 'none',
+                                title: '退款已取消'
+                            });
+                            setTimeout(() => {
+                                this.refreash();
+                            }, 1000);
+                        });
+                    }
+                }
             });
-            console.log(this.all);
+        },
+        Apply() {
+            this.navigateTo('/pages/Apply?id=' + this.id);
+        },
+        applydetails() {
+            this.navigateTo('/pages/Applydetails?id=' + this.id);
         },
         remind() {
             this.$http.post('orderInfo/remindMy', { orderInfoId: this.id, remark: '' }).then(res => {
@@ -283,6 +334,9 @@ export default {
                 });
             });
         }
+    },
+    created() {
+        this.rufundApply();
     }
 };
 </script>

+ 22 - 5
src/components/AllselloutInfo.vue

@@ -3,8 +3,8 @@
         <div class="box-con2">
             <div class="box-tit">
                 <div>
-                    <img style="width:20px;height:20px;border-radius:50%;" :src="all.image" alt="" />
-                    <p>就爱吃馒头</p>
+                    <img style="width:20px;height:20px;border-radius:50%;" :src="all.avatar" alt="" />
+                    <p>{{ all.userNickName }}</p>
                 </div>
                 <span>{{ name }}</span>
             </div>
@@ -45,7 +45,11 @@
                 <div v-if="status == 'COMPETED'" @click="Buyers" class="box-but">联系买家</div>
                 <div v-if="status == 'COMPETED'" @click="logistics" class="box-but3">查看物流</div>
                 <div v-if="status == 'CANCELED'" @click="deletes" class="box-but">删除订单</div>
-                <div v-if="status == 'CANCELED'" @click="again" class="box-but3">联系买家</div>
+                <div v-if="status == 'CANCELED'" @click="Buyers" class="box-but3">联系买家</div>
+                <div v-if="status == 'REFUND'" class="box-but">取消退款</div>
+                <div v-if="status == 'REFUND'" class="box-but3">联系买家</div>
+                <div v-if="status == 'REFUNDED'" @click="deletes" class="box-but">删除订单</div>
+                <div v-if="status == 'REFUNDED'" @click="applydetails" class="box-but3">退款详情</div>
             </div>
         </div>
         <van-popup :show="show" custom-style="background:transparent;border-radius: 12px 12px 0 0;" use-slot>
@@ -118,6 +122,12 @@ export default {
             if (this.status === 'SEND') {
                 return '买家待收货';
             }
+            if (this.status === 'REFUND') {
+                return '申请退款中';
+            }
+            if (this.status === 'REFUNDED') {
+                return '退款成功';
+            }
             return '';
         }
     },
@@ -156,7 +166,11 @@ export default {
             this.$emit('allsellout');
         },
         allorder() {
-            this.navigateTo('/pages/allselldetails?id=' + this.id);
+            if (this.status === 'REFUND' || this.status === 'REFUNDED') {
+                this.navigateTo('/pages/Applydetails?id=' + this.id);
+            } else {
+                this.navigateTo('/pages/orderdetails?id=' + this.id);
+            }
         },
         sales() {
             wx.showToast({
@@ -179,6 +193,7 @@ export default {
             });
         },
         Buyers() {
+            console.log(this.all);
             wx.showToast({
                 title: '敬请开放',
                 icon: 'none'
@@ -222,7 +237,9 @@ export default {
                 }
             });
         },
-
+        applydetails() {
+            this.navigateTo('/pages/Applydetails?id=' + this.id);
+        },
         deliver() {
             console.log(this.all);
             wx.showToast({

+ 4 - 0
src/mixins/allPage.js

@@ -34,6 +34,10 @@ export default {
                     value: 'COMPETED',
                     label: '已完成'
                 },
+                {
+                    value: ['dsa', '555', 'wq'],
+                    label: 'dsad'
+                },
                 {
                     value: 'ALL',
                     label: '全部'

BIN
src/native/imgs/icon_tuikuan_zhong@3x.png


+ 48 - 32
src/pages/Apply.vue

@@ -16,8 +16,7 @@
                 @click="show = true"
             >
             </van-field>
-            <van-field label="退款金额" :value="form.price" @input="form.price = $event.detail" placeholder="¥970">
-            </van-field>
+            <van-field label="退款金额" :value="form.total" @input="form.total = $event.detail"> </van-field>
             <van-field
                 label="补充说明"
                 :value="form.message"
@@ -47,7 +46,7 @@
             @select="select"
         >
         </van-action-sheet>
-        <van-dialog
+        <!-- <van-dialog
             use-slot
             :show="showdialog"
             show-cancel-button
@@ -67,7 +66,7 @@
                     <span>025-5644356</span>
                 </div>
             </div>
-        </van-dialog>
+        </van-dialog> -->
     </div>
 </template>
 <script>
@@ -78,38 +77,65 @@ export default {
             form: {
                 reason: '',
                 message: '',
-                price: ''
+                total: ''
             },
+            orderInfoId: 0,
+            refundId: 0,
             show: false,
-            max: 100,
-            showdialog: false,
+            // showdialog: false,
             actions: [
-                {
-                    name: '地址/电话等信息填写错误'
-                },
                 {
                     name: '多拍/错拍/不想要'
-                },
-                {
-                    name: '未按约定时间发货'
-                },
-                {
-                    name: '其他'
                 }
             ]
         };
     },
     computed: {
         canSubmit() {
-            if (this.form.reason && this.form.price) {
+            if (this.form.reason && this.form.total) {
                 return true;
             } else {
                 return false;
             }
         }
     },
-    created() {},
+    created() {
+        this.rufundApply();
+        this.rufundApply2();
+    },
     methods: {
+        rufundApply2() {
+            this.$http
+                .post('orderRefundApply/refundApply', { orderInfoId: this.$mp.query.id })
+                .then(res => {
+                    console.log(res);
+                    this.hideLoading();
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    if (e.error) {
+                        this.toast(e.rror);
+                    }
+                });
+        },
+        rufundApply() {
+            this.$http
+                .get('/orderInfo/get/' + this.$mp.query.id)
+                .then(res => {
+                    this.orderInfoId = res.id;
+                    this.refundId = res.refundId;
+                    this.form = {
+                        total: res.total
+                    };
+                    this.hideLoading();
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    if (e.error) {
+                        this.toast(e.rror);
+                    }
+                });
+        },
         select(action) {
             this.form.reason = action.detail.name;
             this.show = false;
@@ -122,27 +148,17 @@ export default {
                 });
                 return;
             }
-            if (!this.form.price) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '退货价格不能为空'
-                });
-                return;
-            }
-            console.log(this.form.reason);
-            console.log(this.form.price);
-            console.log(this.form.message);
             wx.showToast({
                 title: '提交成功'
             });
+            this.navigateTo('/pages/Applydetails?id=' + this.orderInfoId);
         },
         cancel() {
             this.show = false;
-        },
-        dialog() {
-            console.log(333);
-            this.showdialog = true;
         }
+        // dialog() {
+        //     this.showdialog = true;
+        // }
     }
 };
 </script>

+ 94 - 39
src/pages/Applydetails.vue

@@ -7,44 +7,59 @@
 <template>
     <div class="apply">
         <div class="top">
-            <img src="../native/imgs/icon_tuikuan_chenggong@3x.png" alt="" />
-            <p>退款成功</p>
-            <span
+            <img
+                v-if="ApplydetailList.orderStatus === 'REFUNDED'"
+                src="../native/imgs/icon_tuikuan_chenggong@3x.png"
+                alt=""
+            />
+            <img
+                v-if="ApplydetailList.orderStatus === 'REFUND'"
+                src="../native/imgs/icon_tuikuan_zhong@3x.png"
+                alt=""
+            />
+            <p>{{ label }}</p>
+            <span v-if="ApplydetailList.orderStatus === 'REFUNDED'"
                 >申请成功,退款将在72小时内按照原支付
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;渠道返回,请注意查收</span
             >
+            <span v-if="ApplydetailList.orderStatus === 'REFUND'">
+                退款审核中,请耐心等待,退款将在72小 &nbsp;&nbsp;时内按照原支付渠道返回,请注意查收</span
+            >
         </div>
         <div class="bor"></div>
         <div class="con">
             <div class="price">
                 <p>退款总金额</p>
-                <span>¥970</span>
+                <span>¥{{ ApplydetailList.total }}</span>
             </div>
+            <div class="border"></div>
             <div class="box-tit">
                 <div>
-                    <img src="/native/tabbar/icon_kapai_shangjia_da@3x.png" alt="" />
-                    <p>光之城卡牌</p>
+                    <img :src="store.logo" alt="" />
+                    <p>{{ store.storeName }}</p>
                 </div>
                 <div class="box-tit-seller">联系卖家</div>
             </div>
-            <div class="box-con">
-                <div class="box-con-Cards">
-                    <img src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/info_top_bg.png" alt="" />
-                    <div class="box-con-right">
-                        <p class="box-con-tit">1105皇权破晓</p>
-                        <div class="box-con-today">
-                            <p>卡盒选号:卡包02—A</p>
-                        </div>
-                        <div class="box-con-money">
-                            <div class="box-con-num">
-                                <p>¥320</p>
+            <div v-for="(item, index) in Boxes" :key="index.id">
+                <div class="box-con">
+                    <div class="box-con-Cards">
+                        <img :src="cardCaseInfo.images[0]" alt="" />
+                        <div class="box-con-right">
+                            <p class="box-con-tit">{{ cardCaseInfo.name }}</p>
+                            <div class="box-con-today">
+                                <p>卡盒选号: {{ item.groupCode + item.boxCode }}</p>
+                            </div>
+                            <div class="box-con-money">
+                                <div class="box-con-num">
+                                    <p>¥{{ item.boxPrice }}</p>
+                                </div>
+                                <p>×1</p>
                             </div>
-                            <p>×1</p>
                         </div>
                     </div>
                 </div>
             </div>
-            <div class="border"></div>
+            <div class="border2"></div>
             <div class="box-buttom">
                 <div class="box-buttom-con">
                     <p>退款原因</p>
@@ -54,7 +69,7 @@
             <div class="box-buttom">
                 <div class="box-buttom-con">
                     <p>申请时间</p>
-                    <span>2021-05-20 07:52:36</span>
+                    <span>{{ ApplydetailList.createdAt }}</span>
                 </div>
             </div>
             <div class="box-buttom">
@@ -62,7 +77,7 @@
                     <p>订单编号</p>
                     <div class="box-footer-cr">
                         <span @click="orderCopy">复制</span>
-                        <p class="box-footer-p">2019052035464</p>
+                        <p class="box-footer-p">{{ ApplydetailList.transactionId }}</p>
                     </div>
                 </div>
             </div>
@@ -72,23 +87,58 @@
 <script>
 export default {
     data() {
-        return {};
+        return {
+            ApplydetailList: [],
+            cardBoxList: [],
+            orderBoxDTOS: [],
+            store: {},
+            cardCaseInfo: {},
+            Boxes: []
+        };
+    },
+    created() {
+        this.Applydetail();
     },
     methods: {
-        // orderCopy() {
-        //     wx.setClipboardData({
-        //         data: this.status.transactionId + '',
-        //         success(res) {
-        //             wx.getClipboardData({
-        //                 success(res) {
-        //                     wx.showToast({
-        //                         title: '订单单号复制成功'
-        //                     });
-        //                 }
-        //             });
-        //         }
-        //     });
-        // }
+        Applydetail() {
+            this.showLoading();
+            this.$http
+                .get('/orderInfo/get/' + this.$mp.query.id)
+                .then(res => {
+                    this.hideLoading();
+                    this.cardCaseInfo = res.cardCase.collection;
+                    this.ApplydetailList = res;
+                    this.store = res.store;
+                    this.cardBoxList = res.cardBoxList;
+                    this.Boxes = res.cardBoxList;
+                    if (this.ApplydetailList.orderStatus === 'REFUND') {
+                        this.label = '退款审核中';
+                    }
+                    if (this.ApplydetailList.orderStatus === 'REFUNDED') {
+                        this.label = '退款成功';
+                    }
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    if (e.error) {
+                        this.toast(e.rror);
+                    }
+                });
+        },
+        orderCopy() {
+            wx.setClipboardData({
+                data: this.ApplydetailList.transactionId + '',
+                success(res) {
+                    wx.getClipboardData({
+                        success(res) {
+                            wx.showToast({
+                                title: '订单编号复制成功'
+                            });
+                        }
+                    });
+                }
+            });
+        }
     }
 };
 </script>
@@ -106,7 +156,8 @@ export default {
             font-weight: bold;
             color: #000000;
             line-height: 24px;
-            margin: 20px 0 16px 98px;
+            text-align: center;
+            margin: 20px 0 16px 0px;
         }
         span {
             width: 255px;
@@ -151,7 +202,7 @@ export default {
                     font-size: 14px;
                     font-weight: bold;
                     color: #000000;
-                    margin-left: 2px;
+                    margin-left: 9px;
                 }
             }
             .box-tit-seller {
@@ -172,7 +223,7 @@ export default {
                     border-radius: 6px;
                 }
                 .box-con-right {
-                    width: 237px;
+                    width: 78%;
                     margin-left: 8px;
                     .box-con-tit {
                         font-size: 16px;
@@ -218,6 +269,10 @@ export default {
             }
         }
         .border {
+            height: 1px;
+            background: #f5f7fa;
+        }
+        .border2 {
             margin: 20px 0 14px 0;
             height: 1px;
             background: #f5f7fa;

+ 20 - 20
src/pages/allselldetails.vue

@@ -49,7 +49,7 @@
         <div class="box-bg"></div>
         <div class="box-tit">
             <div>
-                <img src="/native/tabbar/icon_kapai_shangjia_da@3x.png" alt="" />
+                <img :src="store.logo" alt="" />
                 <p>{{ store.storeName }}</p>
             </div>
             <div class="box-tit-seller" @click="seller">共{{ status.length }}件商品</div>
@@ -86,7 +86,7 @@
                 <p class="box-buttom-p">¥10</p>
             </div>
         </div>
-        <div v-if="status.orderStatus !== 'CREATED'" class="box-buttom">
+        <div class="box-buttom">
             <div class="box-buttom-con">
                 <p>实际支付</p>
                 <p class="box-buttom-p3">¥{{ total }}</p>
@@ -114,27 +114,27 @@
                 <p>创建时间</p>
                 <p class="box-footer-p">{{ status.createdAt }}</p>
             </div>
-            <div v-if="status.orderStatus !== 'CREATED'" class="box-footer">
-                <div class="box-footer-con">
-                    <p>付款时间</p>
-                    <p class="box-footer-p">{{ status.paidTime }}</p>
-                </div>
+        </div>
+        <div v-if="status.orderStatus !== 'CREATED' && status.orderStatus !== 'CANCELED'" class="box-footer">
+            <div class="box-footer-con">
+                <p>付款时间</p>
+                <p class="box-footer-p">{{ status.paidTime }}</p>
             </div>
-            <div v-if="status.orderStatus !== 'CREATED'" class="box-footer">
-                <div class="box-footer-con">
-                    <p>成交时间</p>
-                    <p class="box-footer-p">{{ status.paidTime }}</p>
-                </div>
+        </div>
+        <div class="box-footer">
+            <div class="box-footer-con">
+                <p>成交时间</p>
+                <p class="box-footer-p">{{ status.paidTime }}</p>
             </div>
         </div>
         <div class="box-footer-nav">
             <div class="box-btn">
                 <!-- 已完成 -->
-                <div v-if="status.orderStatus === 'COMPETED'" class="box-btn-left" @click="deletes">
+                <div v-if="status.orderStatus === 'COMPETED'" class="box-btn-left2" @click="Buyers">
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
                     <span>联系买家</span>
                 </div>
-                <div v-if="status.orderStatus === 'COMPETED'" class="box-btn-right" @click="sales">
+                <div v-if="status.orderStatus === 'COMPETED'" class="box-btn-right" @click="logistics">
                     <img src="/native/imgs/btn_01@4x.png" alt="" />
                     <span class="box-btn-sp">查看物流</span>
                 </div>
@@ -143,7 +143,7 @@
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
                     <span>查看物流</span>
                 </div>
-                <div v-if="status.orderStatus === 'SEND'" class="box-btn-right" @click="comfrim">
+                <div v-if="status.orderStatus === 'SEND'" class="box-btn-right" @click="Buyers">
                     <img src="/native/imgs/btn_01@3x.png" alt="" />
                     <span>联系买家</span>
                 </div>
@@ -161,7 +161,7 @@
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
                     <span>取消订单</span>
                 </div>
-                <div v-if="status.orderStatus === 'CREATED'" class="box-btn-right" @click="pay">
+                <div v-if="status.orderStatus === 'CREATED'" class="box-btn-right" @click="Buyers">
                     <img src="/native/imgs/btn_01@3x.png" alt="" />
                     <span>联系买家</span>
                 </div>
@@ -170,9 +170,9 @@
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
                     <span>删除订单</span>
                 </div>
-                <div v-if="status.orderStatus === 'CANCELED'" class="box-btn-right" @click="again">
-                    <img src="/native/imgs/btn_01@3x.png" alt="" />
-                    <span>重新购买</span>
+                <div v-if="status.orderStatus === 'CANCELED'" class="box-btn-right" @click="Buyers">
+                    <img src="/native/imgs/btn_01@4x.png" alt="" />
+                    <span class="box-btn-sp">联系买家</span>
                 </div>
             </div>
         </div>
@@ -542,7 +542,7 @@ export default {
                 font-weight: bold;
                 color: #000000;
                 line-height: 22px;
-                margin-left: 2px;
+                margin-left: 9px;
             }
         }
         .box-tit-seller {

+ 2 - 4
src/pages/orderdetails.vue

@@ -302,6 +302,7 @@ export default {
             this.$http
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .then(res => {
+                    console.log(res);
                     this.hideLoading();
                     this.caseId = res.caseId;
                     this.status = res;
@@ -427,10 +428,7 @@ export default {
             });
         },
         Apply() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
-            });
+            this.navigateTo('/pages/Apply?id=' + this.orderInfoId);
         },
         pay() {
             wx.showLoading({

+ 39 - 11
src/pages/store/administration.vue

@@ -48,8 +48,8 @@
         </van-cell-group>
         <div class="box-con">
             <div class="label">卡牌细节图</div>
-            <img v-if="imgBox.lenght == 0" :src="imgBox.image" alt="" />
-            <van-uploader :file-list="fileList" :after-read="afterRead" />
+            <!-- <img v-if="imgBox.lenght == 0" :src="imgBox.image" alt="" /> -->
+            <van-uploader :file-list="images" :after-read="afterRead" />
             <div></div>
             <div class="box">
                 <div class="top">
@@ -72,12 +72,12 @@
                                 :key="itemIndex"
                                 class="card-item"
                                 :class="{
-                                    used: canChoose(item.caseStatus),
+                                    used: canChoose(item),
                                     active: nowChooseId.includes(item.cardBoxId)
                                 }"
-                                @click="choose(item.cardBoxId, canChoose(item.caseStatus))"
+                                @click="choose(item.cardBoxId, canChoose(item))"
                             >
-                                {{ itemIndex }}
+                                {{ itemIndex + 1 }}
                             </div>
                         </div>
                     </div>
@@ -132,15 +132,17 @@ export default {
                 startTime: '',
                 description: ''
             },
+            name: '',
             show: false,
             newShow: false,
-            nowChoose: [],
-            name: '',
             closeFlag: false,
+            nowChoose: [],
             detailsList: [],
+            images: [],
+            imagesList: [],
+            imageUrls: [],
             nowChooseId: [],
             list: [],
-            imgBox: [],
             cardList: [],
             actions: [],
             minDate: new Date(new Date().getFullYear() - 1, 10, 1).getTime(),
@@ -223,9 +225,35 @@ export default {
         cancel() {
             this.show = false;
         },
+        afterRead(file) {
+            this.showLoading();
+            this.$http
+                .uploadFile(file.path)
+                .then(res => {
+                    if (this.images.length > 2) {
+                        this.toast('最多上传三张图片');
+                        return;
+                    }
+                    // console.log(res);
+                    this.hideLoading();
+                    this.imagesList.push({ ...file, url: res });
+                    this.images = [...this.imagesList];
+                    this.imageUrls.push(res);
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    wx.showToast({
+                        icon: 'none',
+                        title: e.error
+                    });
+                });
+        },
+        deleteImg() {
+            this.form.images = [];
+            console.log(this.form.images);
+        },
         canChoose(info) {
-            let status = ['WAIT', 'PROGRESS'];
-            return status.includes(info) && !info.sold;
+            return info.sold;
         },
         choose(id, used = false) {
             if (used) {
@@ -276,7 +304,7 @@ export default {
             this.$http.get('/cardCase/getCardCase', { id: 2767 }).then(res => {
                 console.log(res);
                 this.cardList = res.groupDTOS;
-                this.imgBox = res;
+                // this.imgBox = res;
                 this.form = {
                     boxPrice: res.boxPrice,
                     startTime: res.startTime,

+ 42 - 22
src/pages/store/productEdit.vue

@@ -48,12 +48,11 @@
         </van-cell-group>
         <div class="box-con">
             <div class="label">卡牌细节图</div>
-            <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg" />
-            <!-- <div v-for="(item, index) in form.images" :key="index">
-                <van-uploader :file-list="item[0]" :after-read="afterRead" />
-            </div> -->
+            <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg(images)" />
             <div class="box-top">
-                <div class="top"><span>选择卡包</span></div>
+                <div class="top">
+                    <span>选择卡包</span>
+                </div>
                 <van-sticky :offset-top="0">
                     <div class="time-box">
                         <van-dropdown-menu>
@@ -127,29 +126,30 @@ export default {
     data() {
         return {
             form: {
-                boxesCount: '',
+                collectionId: 0,
+                seriesId: 0,
+                code: 1,
                 postage: 10,
+                boxesCount: '',
                 boxPrice: '',
-                code: 1,
                 startTime: '',
                 description: '',
-                collectionId: 0,
-                seriesId: 0,
                 packagesCount: null,
                 caseStatus: 'PROGRESS',
                 groupDTOS: []
             },
-            show: false,
             name: '',
+            show: false,
+            switchs: false,
+            closeFlag: false,
+            newShow: false,
             images: [],
             imagesList: [],
             imageUrls: [],
-            newShow: false,
             nowChooseId: [],
             sotrId: [],
             list: [],
-            switchs: false,
-            closeFlag: false,
+            actions: [],
             time: 0,
             typeOptions: [
                 { id: 0, name: '组队模板(24组6包)', group: 24, groupCount: 6, special: false },
@@ -157,7 +157,6 @@ export default {
                 { id: 2, name: '组队模板(单组24包)', group: 1, groupCount: 24, special: false },
                 { id: 3, name: '组队模板(单组20包)', group: 1, groupCount: 20, special: false }
             ],
-            actions: [],
             minDate: new Date(new Date().getFullYear() - 1, 10, 1).getTime(),
             maxDate: new Date(new Date().getFullYear() + 2, 10, 1).getTime(),
             currentDate: new Date().getTime()
@@ -304,7 +303,7 @@ export default {
                     console.log(res);
                     this.hideLoading();
                     this.form.groupDTOS = res;
-                    console.log(this.form.groupDTOS);
+                    // console.log(this.form.groupDTOS);
                 })
                 .catch(e => {
                     this.hideLoading();
@@ -323,7 +322,6 @@ export default {
                         this.toast('最多上传三张图片');
                         return;
                     }
-                    console.log(res);
                     this.hideLoading();
                     this.imagesList.push({ ...file, url: res });
                     this.images = [...this.imagesList];
@@ -337,34 +335,56 @@ export default {
                     });
                 });
         },
-        deleteImg() {
-            this.form.images = [];
-            console.log(this.form.images);
+        deleteImg(info) {
+            // console.log(info);
+            // this.images.splice(this.imagesList, 1);
         },
         submit() {
             if (!this.name) {
                 wx.showToast({
                     icon: 'none',
-                    title: '卡牌名称不能为空'
+                    title: '请选择卡牌名称'
                 });
                 return;
             }
             if (!this.form.boxPrice) {
                 wx.showToast({
                     icon: 'none',
-                    title: '价格不能为空'
+                    title: '请填写价格'
                 });
                 return;
             }
             if (!this.form.startTime) {
                 wx.showToast({
                     icon: 'none',
-                    title: '结束时间不能为空'
+                    title: '请选择结束时间'
+                });
+                return;
+            }
+            if (!this.form.boxesCount) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请选拼箱人数'
+                });
+                return;
+            }
+            if (this.images.length == 0) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请添加图片'
+                });
+                return;
+            }
+            if (this.form.groupDTOS.length == 0) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请选择卡包种类'
                 });
                 return;
             }
             let cardCaseInputDTO = { ...this.form };
             let images = this.imageUrls.join(',');
+            // console.log(images);
             cardCaseInputDTO.images = images;
             this.showLoading();
             this.$http