Ver Fonte

Merge branch 'dev' of http://git.izouma.com/panhui/card-wechat into dev

panhui há 4 anos atrás
pai
commit
a0b2c49a16

+ 1 - 1
.env.development

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

+ 10 - 11
src/components/AllselloutInfo.vue

@@ -23,10 +23,14 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="message">
+            <div class="message" v-if="status !== 'REFUND' && status !== 'REFUNDED' && status !== 'CANCELED'">
                 <p>买家留言:</p>
                 <p>买家留言:</p>
                 <span>{{ all.remark }}</span>
                 <span>{{ all.remark }}</span>
             </div>
             </div>
+            <div class="message" v-if="status == 'REFUND' || status == 'REFUNDED'">
+                <p>退款原因:</p>
+                <span>多拍/错拍/不想要</span>
+            </div>
             <div class="time">
             <div class="time">
                 <p>订单时间: {{ all.createTime }}</p>
                 <p>订单时间: {{ all.createTime }}</p>
                 <div class="box-num">
                 <div class="box-num">
@@ -39,17 +43,16 @@
                 <div v-if="status == 'CREATED'" @click="cancel" class="box-but">取消订单</div>
                 <div v-if="status == 'CREATED'" @click="cancel" class="box-but">取消订单</div>
                 <div v-if="status == 'CREATED'" @click="Buyers" class="box-but2">联系买家</div>
                 <div v-if="status == 'CREATED'" @click="Buyers" class="box-but2">联系买家</div>
                 <div v-if="status == 'PAYED'" @click="logistics" class="box-but">查看物流</div>
                 <div v-if="status == 'PAYED'" @click="logistics" class="box-but">查看物流</div>
-                <div v-if="status == 'PAYED'" @click="deliver" class="box-but3">立即发货</div>
+                <div v-if="status == 'PAYED'" @click="deliver" class="box-but2">立即发货</div>
                 <div v-if="status == 'SEND'" @click="logistics" class="box-but">查看物流</div>
                 <div v-if="status == 'SEND'" @click="logistics" class="box-but">查看物流</div>
                 <div v-if="status == 'SEND'" @click="Buyers" class="box-but3">联系买家</div>
                 <div v-if="status == 'SEND'" @click="Buyers" class="box-but3">联系买家</div>
                 <div v-if="status == 'COMPETED'" @click="Buyers" class="box-but">联系买家</div>
                 <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 == 'COMPETED'" @click="logistics" class="box-but3">查看物流</div>
                 <div v-if="status == 'CANCELED'" @click="deletes" class="box-but">删除订单</div>
                 <div v-if="status == 'CANCELED'" @click="deletes" class="box-but">删除订单</div>
                 <div v-if="status == 'CANCELED'" @click="Buyers" 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 == 'REFUND'" class="box-but">联系买家</div>
+                <div v-if="status == 'REFUND'" class="box-but2">同意退款</div>
                 <div v-if="status == 'REFUNDED'" @click="deletes" class="box-but">删除订单</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>
         </div>
         </div>
         <van-popup :show="show" custom-style="background:transparent;border-radius: 12px 12px 0 0;" use-slot>
         <van-popup :show="show" custom-style="background:transparent;border-radius: 12px 12px 0 0;" use-slot>
@@ -123,7 +126,7 @@ export default {
                 return '买家待收货';
                 return '买家待收货';
             }
             }
             if (this.status === 'REFUND') {
             if (this.status === 'REFUND') {
-                return '申请退款';
+                return '买家申请退款';
             }
             }
             if (this.status === 'REFUNDED') {
             if (this.status === 'REFUNDED') {
                 return '退款成功';
                 return '退款成功';
@@ -166,11 +169,7 @@ export default {
             this.$emit('allsellout');
             this.$emit('allsellout');
         },
         },
         allorder() {
         allorder() {
-            if (this.status === 'REFUND' || this.status === 'REFUNDED') {
-                this.navigateTo('/pages/Applydetails?id=' + this.id);
-            } else {
-                this.navigateTo('/pages/orderdetails?id=' + this.id);
-            }
+            this.navigateTo('/pages/allselldetails?id=' + this.id);
         },
         },
         sales() {
         sales() {
             wx.showToast({
             wx.showToast({

+ 0 - 1
src/main.js

@@ -59,7 +59,6 @@ export default {
             'pages/store/review',
             'pages/store/review',
             'pages/store/homePage',
             'pages/store/homePage',
             'pages/store/productEdit',
             'pages/store/productEdit',
-            'pages/store/administration',
             'pages/store/setting'
             'pages/store/setting'
         ],
         ],
         tabBar: {
         tabBar: {

+ 2 - 10
src/mixins/allPage.js

@@ -22,21 +22,13 @@ export default {
                     value: 'TAKEN',
                     value: 'TAKEN',
                     label: '已收货'
                     label: '已收货'
                 },
                 },
-                {
-                    value: 'REFUND',
-                    label: '申请退款'
-                },
-                {
-                    value: 'REFUNDED',
-                    label: '已退款'
-                },
                 {
                 {
                     value: 'COMPETED',
                     value: 'COMPETED',
                     label: '已完成'
                     label: '已完成'
                 },
                 },
                 {
                 {
-                    value: ['dsa', '555', 'wq'],
-                    label: 'dsad'
+                    value: 'REFUND',
+                    label: '售后中'
                 },
                 },
                 {
                 {
                     value: 'ALL',
                     value: 'ALL',

+ 2 - 2
src/pages/allorder.vue

@@ -40,7 +40,7 @@ export default {
     data() {
     data() {
         return {
         return {
             active: '全部',
             active: '全部',
-            tabs: ['全部', '待支付', '待发货', '待收货', '已完成'],
+            tabs: ['全部', '待支付', '待发货', '待收货', '已完成', '售后中'],
             empty: false,
             empty: false,
             allList: []
             allList: []
         };
         };
@@ -106,7 +106,7 @@ export default {
             font-weight: bold;
             font-weight: bold;
             color: #000;
             color: #000;
             line-height: 24px;
             line-height: 24px;
-            padding: 18px 30px 18px 0;
+            padding: 18px 21px 18px 0;
 
 
             &.active {
             &.active {
                 color: #ff6c00;
                 color: #ff6c00;

+ 63 - 30
src/pages/allselldetails.vue

@@ -16,6 +16,8 @@
                 v-if="
                 v-if="
                     status.orderStatus !== 'CREATED' &&
                     status.orderStatus !== 'CREATED' &&
                         status.orderStatus !== 'PAYED' &&
                         status.orderStatus !== 'PAYED' &&
+                        status.orderStatus !== 'REFUND' &&
+                        status.orderStatus !== 'REFUNDED' &&
                         status.orderStatus !== 'CANCELED'
                         status.orderStatus !== 'CANCELED'
                 "
                 "
             >
             >
@@ -41,18 +43,26 @@
                 </div>
                 </div>
             </div>
             </div>
             <div class="box-border"></div>
             <div class="box-border"></div>
-            <div class="message">
+            <div class="message" v-if="status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'">
                 <p>买家留言:</p>
                 <p>买家留言:</p>
                 <span>{{ status.remark }}</span>
                 <span>{{ status.remark }}</span>
             </div>
             </div>
         </div>
         </div>
         <div class="box-bg"></div>
         <div class="box-bg"></div>
-        <div class="box-tit">
+        <div class="box-tit" v-if="status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'">
             <div>
             <div>
                 <img :src="store.logo" alt="" />
                 <img :src="store.logo" alt="" />
                 <p>{{ store.storeName }}</p>
                 <p>{{ store.storeName }}</p>
             </div>
             </div>
-            <div class="box-tit-seller" @click="seller">共{{ status.length }}件商品</div>
+            <div class="box-tit-seller">共{{ status.length }}件商品</div>
+        </div>
+        <div class="box-tit2" v-if="status.orderStatus == 'REFUND' || status.orderStatus == 'REFUNDED'">
+            <div>
+                <p>
+                    退款商品
+                </p>
+            </div>
+            <div class="box-tit-seller">共{{ status.length }}件商品</div>
         </div>
         </div>
         <div v-for="(item, index) in Boxes" :key="index.id">
         <div v-for="(item, index) in Boxes" :key="index.id">
             <div class="box-con">
             <div class="box-con">
@@ -92,7 +102,18 @@
                 <p class="box-buttom-p3">¥{{ total }}</p>
                 <p class="box-buttom-p3">¥{{ total }}</p>
             </div>
             </div>
         </div>
         </div>
-        <div v-if="status.orderStatus !== 'CREATED'" class="box-buttom">
+        <div class="box-buttom" v-if="status.orderStatus == 'REFUND' || status.orderStatus == 'REFUNDED'">
+            <div class="box-buttom-con">
+                <p>退款金额</p>
+                <p class="box-buttom-p3">¥{{ total }}</p>
+            </div>
+        </div>
+        <div
+            v-if="
+                status.orderStatus !== 'CREATED' && status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'
+            "
+            class="box-buttom"
+        >
             <div class="box-buttom-con">
             <div class="box-buttom-con">
                 <p>支付方式</p>
                 <p>支付方式</p>
                 <p class="box-buttom-p">微信支付</p>
                 <p class="box-buttom-p">微信支付</p>
@@ -100,7 +121,7 @@
         </div>
         </div>
         <div class="box-border-but"></div>
         <div class="box-border-but"></div>
         <!-- 下单时间 -->
         <!-- 下单时间 -->
-        <div class="box-footer">
+        <div class="box-footer" v-if="status.orderStatus !== 'CANCELED'">
             <div class="box-footer-con">
             <div class="box-footer-con">
                 <p>订单编号</p>
                 <p>订单编号</p>
                 <div class="box-footer-cr">
                 <div class="box-footer-cr">
@@ -121,7 +142,7 @@
                 <p class="box-footer-p">{{ status.paidTime }}</p>
                 <p class="box-footer-p">{{ status.paidTime }}</p>
             </div>
             </div>
         </div>
         </div>
-        <div class="box-footer">
+        <div class="box-footer" v-if="status.orderStatus !== 'CANCELED'">
             <div class="box-footer-con">
             <div class="box-footer-con">
                 <p>成交时间</p>
                 <p>成交时间</p>
                 <p class="box-footer-p">{{ status.paidTime }}</p>
                 <p class="box-footer-p">{{ status.paidTime }}</p>
@@ -147,6 +168,15 @@
                     <img src="/native/imgs/btn_01@3x.png" alt="" />
                     <img src="/native/imgs/btn_01@3x.png" alt="" />
                     <span>联系买家</span>
                     <span>联系买家</span>
                 </div>
                 </div>
+                <!-- 售后中 -->
+                <div v-if="status.orderStatus === 'REFUND'" class="box-btn-left2" @click="Buyers">
+                    <img src="/native/imgs/btn_04@3x.png" alt="" />
+                    <span>联系买家</span>
+                </div>
+                <div v-if="status.orderStatus === 'REFUND'" class="box-btn-right">
+                    <img src="/native/imgs/btn_01@3x.png" alt="" />
+                    <span>同意退款</span>
+                </div>
                 <!-- 待发货 -->
                 <!-- 待发货 -->
                 <div v-if="status.orderStatus === 'PAYED'" class="box-btn-left2" @click="cancel">
                 <div v-if="status.orderStatus === 'PAYED'" class="box-btn-left2" @click="cancel">
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
@@ -231,6 +261,7 @@ export default {
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .then(res => {
                 .then(res => {
                     this.hideLoading();
                     this.hideLoading();
+                    console.log(res);
                     this.status = res;
                     this.status = res;
                     this.addressList = res.address;
                     this.addressList = res.address;
                     this.total = res.total;
                     this.total = res.total;
@@ -246,6 +277,14 @@ export default {
                         this.status.label = '交易关闭';
                         this.status.label = '交易关闭';
                         this.status.name = '很遗憾,订单已取消';
                         this.status.name = '很遗憾,订单已取消';
                     }
                     }
+                    if (this.status.orderStatus === 'REFUND') {
+                        this.status.label = '买家申请退款';
+                        this.status.name = '请尽快处理';
+                    }
+                    if (this.status.orderStatus === 'REFUNDED') {
+                        this.status.label = '退款成功';
+                        this.status.name = '退款成功,72小时内退还';
+                    }
                     if (this.status.orderStatus === 'PAYED') {
                     if (this.status.orderStatus === 'PAYED') {
                         this.status.label = '待发货';
                         this.status.label = '待发货';
                         this.status.name = '订单支付成功,处理发货';
                         this.status.name = '订单支付成功,处理发货';
@@ -286,12 +325,6 @@ export default {
             //     }
             //     }
             // }, 1000);
             // }, 1000);
         },
         },
-        deliver() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
-            });
-        },
         Buyers() {
         Buyers() {
             wx.showToast({
             wx.showToast({
                 title: '敬请开放',
                 title: '敬请开放',
@@ -325,24 +358,6 @@ export default {
                     });
                     });
                 });
                 });
         },
         },
-        sales() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
-            });
-        },
-        seller() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
-            });
-        },
-        Apply() {
-            wx.showToast({
-                title: '敬请开放',
-                icon: 'none'
-            });
-        },
         cancel() {
         cancel() {
             wx.showModal({
             wx.showModal({
                 title: '提示',
                 title: '提示',
@@ -553,6 +568,24 @@ export default {
             line-height: 22px;
             line-height: 22px;
         }
         }
     }
     }
+    .box-tit2 {
+        .flex();
+        justify-content: space-between;
+        margin: 20px 20px 0 20px;
+        p {
+            height: 22px;
+            font-size: 14px;
+            font-weight: bold;
+            color: #000000;
+            line-height: 22px;
+        }
+        .box-tit-seller {
+            height: 22px;
+            font-size: 14px;
+            font-weight: 400;
+            line-height: 22px;
+        }
+    }
     .box-con {
     .box-con {
         height: 90px;
         height: 90px;
         background: #ffffff;
         background: #ffffff;

+ 2 - 2
src/pages/allsellout.vue

@@ -40,7 +40,7 @@ export default {
     data() {
     data() {
         return {
         return {
             active: '全部',
             active: '全部',
-            tabs: ['全部', '待支付', '待发货', '待收货', '已完成'],
+            tabs: ['全部', '待支付', '待发货', '待收货', '已完成', '售后中'],
             empty: false,
             empty: false,
             allList: []
             allList: []
         };
         };
@@ -106,7 +106,7 @@ export default {
             font-weight: bold;
             font-weight: bold;
             color: #000;
             color: #000;
             line-height: 24px;
             line-height: 24px;
-            padding: 18px 30px 18px 0;
+            padding: 18px 21px 18px 0;
 
 
             &.active {
             &.active {
                 color: #ff6c00;
                 color: #ff6c00;

+ 0 - 513
src/pages/store/administration.vue

@@ -1,513 +0,0 @@
-<config>
-{
-    "navigationBarTitleText": "管理商品",
-    "navigationBarBackgroundColor": "#ffffff",
-}
-</config>
-<template>
-    <div class="addorder">
-        <van-cell-group :border="false">
-            <van-field
-                label="卡牌名称"
-                :value="name"
-                placeholder="请输入卡牌名称"
-                is-link
-                readonly
-                @click="show = true"
-            >
-            </van-field>
-            <van-field
-                label="卡牌售价"
-                :value="form.boxPrice"
-                @input="form.boxPrice = $event.detail"
-                placeholder="请输入金额"
-            >
-            </van-field>
-            <van-field
-                label="拼箱结束"
-                is-link
-                :value="form.startTime"
-                placeholder="请输入结束日期"
-                @click="newShow = true"
-            >
-            </van-field>
-            <van-field
-                label="拼箱人数"
-                :value="form.boxesCount"
-                @input="form.boxesCount = $event.detail"
-                placeholder="请输入参加人数"
-            >
-            </van-field>
-            <van-field
-                label="邮费"
-                :value="form.postage"
-                @input="form.postage = $event.detail"
-                placeholder="默认邮费10元"
-            >
-            </van-field>
-        </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="images" :after-read="afterRead" />
-            <div></div>
-            <div class="box">
-                <div class="top">
-                    <span>选择卡包</span>
-                    <div class="right">
-                        <div class="tool-item">
-                            出售中
-                        </div>
-                        <div class="tool-item used">
-                            下架
-                        </div>
-                    </div>
-                </div>
-                <div class="content">
-                    <div class="card" v-for="(card, index) in cardList" :key="index">
-                        <div class="card-title">第{{ index + 1 }}组</div>
-                        <div class="card-list">
-                            <div
-                                v-for="(item, itemIndex) in card.dynamicTags"
-                                :key="itemIndex"
-                                class="card-item"
-                                :class="{
-                                    used: canChoose(item),
-                                    active: nowChooseId.includes(item.cardBoxId)
-                                }"
-                                @click="choose(item.cardBoxId, canChoose(item))"
-                            >
-                                {{ itemIndex + 1 }}
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="label">卡牌详情描述</div>
-            <van-field
-                :value="form.description"
-                @input="description = $event.detail"
-                :border="false"
-                rows="1"
-                autosize
-                type="textarea"
-                placeholder="卡牌详情描述"
-            />
-        </div>
-        <div class="btn-list">
-            <div @click="submit">确认上架</div>
-        </div>
-        <van-action-sheet
-            :show="show"
-            description="卡牌名称"
-            cancel-text="取消"
-            :actions="actions"
-            @click-overlay="cancel"
-            @select="select"
-            @cancel="cancel"
-        >
-        </van-action-sheet>
-
-        <van-popup :show="newShow" position="bottom" @close="onClose">
-            <van-datetime-picker
-                type="datetime"
-                :value="currentDate"
-                @confirm="onConfirm"
-                @cancel="onCancel"
-                :min-date="minDate"
-                :max-date="maxDate"
-            />
-        </van-popup>
-    </div>
-</template>
-<script>
-export default {
-    name: 'addorder',
-    data() {
-        return {
-            form: {
-                boxesCount: '',
-                postage: '',
-                boxPrice: '',
-                startTime: '',
-                description: ''
-            },
-            name: '',
-            show: false,
-            newShow: false,
-            closeFlag: false,
-            nowChoose: [],
-            detailsList: [],
-            images: [],
-            imagesList: [],
-            imageUrls: [],
-            nowChooseId: [],
-            list: [],
-            cardList: [],
-            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()
-        };
-    },
-    computed: {},
-    watch: {
-        show: {
-            handler: function(newVal) {
-                if (newVal) {
-                    this.cardInit();
-                    this.closeFlag = false;
-                }
-            }
-        }
-    },
-    onLoad() {
-        this.cartBox();
-    },
-    methods: {
-        cardInit() {
-            this.showLoading();
-            this.$http
-                .post(
-                    '/series/all',
-                    { query: { del: false }, page: 0, size: 1000 },
-                    {
-                        header: {
-                            'Content-Type': 'application/json'
-                        }
-                    }
-                )
-                .then(res => {
-                    this.hideLoading();
-                    this.actions = res.content;
-                })
-                .catch(e => {
-                    this.hideLoading();
-                    wx.showToast({
-                        icon: 'none',
-                        title: e.error
-                    });
-                });
-        },
-        timeFormat(date, fmt) {
-            var o = {
-                'M+': date.getMonth() + 1, //月份
-                'd+': date.getDate(), //日
-                'h+': date.getHours(), //小时
-                'm+': date.getMinutes(), //分
-                's+': date.getSeconds() //秒
-            };
-            if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
-            for (var k in o)
-                if (new RegExp('(' + k + ')').test(fmt))
-                    fmt = fmt.replace(
-                        RegExp.$1,
-                        RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
-                    );
-            return fmt;
-        },
-        // 时间确认按钮
-        onConfirm(event) {
-            this.currentDate = event.detail;
-            var timeValue = this.timeFormat(new Date(event.detail), 'yyyy-MM-dd hh:mm');
-            this.form.startTime = timeValue + ':00';
-            this.newShow = false;
-        },
-        // 时间取消按钮
-        onCancel() {
-            this.newShow = false;
-        },
-        // 遮罩层显示与隐藏
-        onClose() {
-            this.newShow = false;
-        },
-        // 卡牌名称取消按钮
-        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) {
-            return info.sold;
-        },
-        choose(id, used = false) {
-            if (used) {
-                return;
-            }
-            if (this.list.includes(id)) {
-                this.list.splice(this.list.indexOf(id), 1);
-            } else {
-                this.list.push(id);
-            }
-            this.nowChooseId = [...this.list].join(',');
-            console.log(this.nowChooseId);
-        },
-        select(e) {
-            if (this.closeFlag) {
-                this.name = e.detail.name;
-                this.show = false;
-                return;
-            }
-            let data = {
-                seriesId: e.detail.id
-            };
-            this.showLoading();
-            this.$http
-                .post(
-                    'collection/all',
-                    { query: data, page: 0, size: 1000 },
-                    {
-                        header: {
-                            'Content-Type': 'application/json'
-                        }
-                    }
-                )
-                .then(res => {
-                    this.hideLoading();
-                    this.actions = res.content;
-                    this.closeFlag = true;
-                })
-                .catch(e => {
-                    this.hideLoading();
-                    wx.showToast({
-                        icon: 'none',
-                        title: e.error
-                    });
-                });
-        },
-        cartBox() {
-            this.$http.get('/cardCase/getCardCase', { id: 2767 }).then(res => {
-                console.log(res);
-                this.cardList = res.groupDTOS;
-                // this.imgBox = res;
-                this.form = {
-                    boxPrice: res.boxPrice,
-                    startTime: res.startTime,
-                    description: res.description,
-                    boxesCount: res.boxesCount || 0,
-                    postage: res.postage || 10
-                };
-            });
-        },
-        submit() {
-            if (!this.name) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '卡牌名称不能为空'
-                });
-                return;
-            }
-            if (!this.form.boxPrice) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '价格不能为空'
-                });
-                return;
-            }
-            if (!this.form.startTime) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '结束时间不能为空'
-                });
-                return;
-            }
-            wx.showToast({
-                title: '商品上架成功'
-            });
-        }
-    }
-};
-</script>
-<style lang="less" scoped>
-/deep/ .van-uploader {
-    margin-top: 20px;
-}
-/deep/ .van-cell {
-    --cell-vertical-padding: 23px;
-    --cell-horizontal-padding: 20px;
-    --field-label-color: #000000;
-    --cell-text-color: #000;
-    .van-field__label,
-    .van-cell__title {
-        font-weight: bold;
-        width: 70px;
-        max-width: 70px !important;
-        min-width: 70px !important;
-        flex-shrink: 0;
-        margin-right: 10px !important;
-    }
-    .van-cell__value {
-        text-align: left;
-    }
-
-    &::after {
-        left: 100px !important;
-    }
-}
-.addorder {
-    padding-bottom: 90px;
-    .box-con {
-        margin: 23px 0 0 20px;
-        .label {
-            font-size: 14px;
-            font-weight: bold;
-            color: #000000;
-            margin-left: -3px;
-            line-height: 24px;
-        }
-        .box {
-            max-height: 70vh;
-            min-height: 50vh;
-            padding-right: 20px;
-            .flex-col();
-            padding-bottom: 6px;
-        }
-
-        .content {
-            flex-grow: 1;
-            overflow: auto;
-            padding: 0 0 12px;
-        }
-
-        .top {
-            .flex();
-            justify-content: space-between;
-            padding: 20px 0;
-            flex-shrink: 0;
-
-            span {
-                font-size: 14px;
-                font-weight: bold;
-                color: #000000;
-                line-height: 24px;
-            }
-
-            .right {
-                .flex();
-                .tool-item {
-                    font-size: 14px;
-                    color: #000000;
-                    line-height: 24px;
-                    .flex();
-                    margin-left: 30px;
-
-                    &::before {
-                        content: '';
-                        flex-shrink: 0;
-                        width: 16px;
-                        height: 16px;
-                        background: #ffffff;
-                        border-radius: 4px;
-                        border: 1px solid #f5f7fa;
-                        margin-right: 4px;
-                    }
-
-                    &.used {
-                        &::before {
-                            background-color: #939599;
-                        }
-                    }
-                }
-            }
-        }
-        .card + .card {
-            margin-top: 12px;
-        }
-
-        .card-title {
-            font-size: 14px;
-            color: #939599;
-            line-height: 24px;
-        }
-        .card {
-            background-color: @bg;
-            padding: 12px 16px;
-            border-radius: 8px;
-            .card-list {
-                .flex();
-                flex-wrap: wrap;
-                .card-item {
-                    width: 42px;
-                    height: 42px;
-                    background: #ffffff;
-                    border-radius: 8px;
-                    font-size: 16px;
-                    font-weight: bold;
-                    text-align: center;
-                    color: #000000;
-                    line-height: 42px;
-                    margin-top: 10px;
-                    &.used {
-                        background-color: #939599;
-                        color: #ffffff;
-                    }
-
-                    &.active {
-                        background-color: @prim;
-                        color: #ffffff;
-                    }
-
-                    &:active {
-                        opacity: 0.8;
-                    }
-
-                    &:nth-child(6n + 1) {
-                        margin-left: 0 !important;
-                    }
-                }
-
-                .card-item + .card-item {
-                    margin-left: 10px;
-                }
-            }
-        }
-    }
-}
-.van-cell {
-    line-height: 40px;
-}
-.btn-list {
-    position: fixed;
-    width: 100%;
-    bottom: 0;
-    background: #ffffff;
-    padding-left: 43px;
-    .bottom();
-    div {
-        width: 290px;
-        height: 48px;
-        background: #ff6c00;
-        border-radius: 12px;
-        line-height: 48px;
-        text-align: center;
-        font-size: 16px;
-        font-weight: 400;
-        color: #ffffff;
-    }
-}
-</style>

+ 95 - 3
src/pages/store/productEdit.vue

@@ -49,6 +49,7 @@
         <div class="box-con">
         <div class="box-con">
             <div class="label">卡牌细节图</div>
             <div class="label">卡牌细节图</div>
             <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg(images)" />
             <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg(images)" />
+            <!-- <div v-if="showId == this.$mp.query.id"> -->
             <div class="box-top">
             <div class="box-top">
                 <div class="top">
                 <div class="top">
                     <span>选择卡包</span>
                     <span>选择卡包</span>
@@ -83,6 +84,38 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
+            <!-- </div> -->
+            <!-- <div class="box" v-if="showId == this.$mp.query.id">
+                <div class="top2">
+                    <span>选择卡包</span>
+                    <div class="right">
+                        <div class="tool-item">
+                            出售中
+                        </div>
+                        <div class="tool-item used">
+                            下架
+                        </div>
+                    </div>
+                </div>
+                <div class="content">
+                    <div class="card" v-for="(card, index) in cardList" :key="index">
+                        <div class="card-title">第{{ index + 1 }}组</div>
+                        <div class="card-list">
+                            <div
+                                v-for="(item, itemIndex) in card.dynamicTags"
+                                :key="itemIndex"
+                                class="card-item"
+                                :class="{
+                                    used: canChoose(item),
+                                    active: nowChooseId.includes(item.cardBoxId)
+                                }"
+                            >
+                                {{ itemIndex + 1 }}
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div> -->
             <div class="label">卡牌详情描述</div>
             <div class="label">卡牌详情描述</div>
             <van-field
             <van-field
                 :value="form.description"
                 :value="form.description"
@@ -143,6 +176,7 @@ export default {
             switchs: false,
             switchs: false,
             closeFlag: false,
             closeFlag: false,
             newShow: false,
             newShow: false,
+            showId: false,
             images: [],
             images: [],
             imagesList: [],
             imagesList: [],
             imageUrls: [],
             imageUrls: [],
@@ -183,6 +217,9 @@ export default {
             }
             }
         }
         }
     },
     },
+    // onLoad() {
+    //     this.cartBox();
+    // },
     methods: {
     methods: {
         cardInit() {
         cardInit() {
             this.showLoading();
             this.showLoading();
@@ -249,6 +286,23 @@ export default {
         cancel() {
         cancel() {
             this.show = false;
             this.show = false;
         },
         },
+        canChoose(info) {
+            return info.sold;
+        },
+        // cartBox() {
+        //     this.$http.get('/cardCase/getCardCase', { id: 2767 }).then(res => {
+        //         console.log(res);
+        //         this.cardList = res.groupDTOS;
+        //         this.showId = res.id;
+        //         this.form = {
+        //             boxPrice: res.boxPrice,
+        //             startTime: res.startTime,
+        //             description: res.description,
+        //             boxesCount: res.boxesCount || 0,
+        //             postage: res.postage || 10
+        //         };
+        //     });
+        // },
         select(e) {
         select(e) {
             if (this.closeFlag) {
             if (this.closeFlag) {
                 this.name = e.detail.name;
                 this.name = e.detail.name;
@@ -303,7 +357,7 @@ export default {
                     console.log(res);
                     console.log(res);
                     this.hideLoading();
                     this.hideLoading();
                     this.form.groupDTOS = res;
                     this.form.groupDTOS = res;
-                    // console.log(this.form.groupDTOS);
+                    console.log(this.form.groupDTOS);
                 })
                 })
                 .catch(e => {
                 .catch(e => {
                     this.hideLoading();
                     this.hideLoading();
@@ -384,7 +438,6 @@ export default {
             }
             }
             let cardCaseInputDTO = { ...this.form };
             let cardCaseInputDTO = { ...this.form };
             let images = this.imageUrls.join(',');
             let images = this.imageUrls.join(',');
-            // console.log(images);
             cardCaseInputDTO.images = images;
             cardCaseInputDTO.images = images;
             this.showLoading();
             this.showLoading();
             this.$http
             this.$http
@@ -395,7 +448,6 @@ export default {
                 })
                 })
                 .then(res => {
                 .then(res => {
                     this.hideLoading();
                     this.hideLoading();
-                    console.log(res);
                     wx.showToast({
                     wx.showToast({
                         title: '商品上架成功'
                         title: '商品上架成功'
                     });
                     });
@@ -514,6 +566,46 @@ export default {
                 }
                 }
             }
             }
         }
         }
+        .top2 {
+            .flex();
+            justify-content: space-between;
+            padding: 10px 0;
+            flex-shrink: 0;
+            span {
+                font-size: 14px;
+                font-weight: bold;
+                color: #000000;
+                line-height: 24px;
+            }
+
+            .right {
+                .flex();
+                .tool-item {
+                    font-size: 14px;
+                    color: #000000;
+                    line-height: 24px;
+                    .flex();
+                    margin-left: 30px;
+
+                    &::before {
+                        content: '';
+                        flex-shrink: 0;
+                        width: 16px;
+                        height: 16px;
+                        background: #ffffff;
+                        border-radius: 4px;
+                        border: 1px solid #f5f7fa;
+                        margin-right: 4px;
+                    }
+
+                    &.used {
+                        &::before {
+                            background-color: #939599;
+                        }
+                    }
+                }
+            }
+        }
         .card + .card {
         .card + .card {
             margin-top: 12px;
             margin-top: 12px;
         }
         }