xuqiang 4 lat temu
rodzic
commit
e3dffff62f

+ 1 - 0
src/components/CardCase.vue

@@ -140,6 +140,7 @@ export default {
             this.nowChoose = list;
         },
         submit() {
+            // console.log(this.cardList);
             if (this.nowChoose.length === 0) {
                 this.toast('请选择卡牌');
                 return;

+ 0 - 1
src/components/SeriesSelect.vue

@@ -47,7 +47,6 @@ export default {
                         }
                     )
                     .then(res => {
-                        console.log(res);
                         this.columns = res.content;
                     });
             } else {

+ 0 - 4
src/pages/receiving.vue

@@ -13,7 +13,6 @@
                 :value="form.name"
                 @input="form.name = $event.detail"
                 placeholder="请填写您的姓名"
-                :border="false"
                 label="联系人"
             />
             <van-field
@@ -21,7 +20,6 @@
                 :value="form.phone"
                 @input="form.phone = $event.detail"
                 placeholder="请填写您的手机号码"
-                :border="false"
                 label="手机号"
             />
             <van-field
@@ -30,14 +28,12 @@
                 readonly
                 is-link
                 placeholder="请选择省市区"
-                :border="false"
                 label="地区"
             />
             <van-field
                 :value="form.detail"
                 @input="form.detail = $event.detail"
                 placeholder="请填写您的详细地址"
-                :border="false"
                 label="详细地址"
                 type="textarea"
             />

+ 58 - 90
src/pages/store/productEdit.vue

@@ -18,7 +18,7 @@
             </van-field>
             <van-field label="卡牌销售" :value="sale" @input="sale = $event.detail" placeholder="请输入金额">
             </van-field>
-            <van-field label="拼箱结束" :value="dates" placeholder="请输入结束日期"> </van-field>
+            <van-field label="拼箱结束" is-link :value="dates" placeholder="请输入结束日期"> </van-field>
             <van-field
                 label="拼箱人数"
                 :value="num"
@@ -38,8 +38,6 @@
             >
             </van-field>
         </van-cell-group>
-
-        <!-- <van-field label="卡牌细节图" :border="false"> </van-field> -->
         <div class="box-con">
             <div class="label">卡牌细节图</div>
             <div class="box">
@@ -69,24 +67,24 @@
                                 }"
                                 @click="choose(item.id, !canChoose(item))"
                             >
-                                {{ itemIndex + 1 }}
+                                {{ itemIndex }}
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
+            <div class="label">卡牌详情描述</div>
+            <van-field
+                class="message"
+                :border="false"
+                type="text"
+                placeholder="选填,备注对本次交易的说明"
+                @input="message = $event.detail"
+            />
         </div>
-
         <div class="btn-list">
-            <van-button :color="$colors.prim" :disabled="!canSubmit" block @click="submit2">确认上架</van-button>
+            <div @click="submit2">确认上架</div>
         </div>
-        <!-- <card-case
-            ref="cardCase"
-            :chooseIds.sync="chooseIds"
-            :detailsList="detailsList"
-            :cardCaseInfo="cardCaseInfo"
-            @buy="purchase"
-        ></card-case> -->
         <van-action-sheet
             :show="show"
             description="卡牌名称"
@@ -102,8 +100,7 @@
 </template>
 <script>
 export default {
-    name: 'apply',
-
+    name: 'addorder',
     data() {
         return {
             name: '',
@@ -114,9 +111,17 @@ export default {
             cardCaseInfo: {},
             chooseIds: [],
             nowChoose: [],
+            detailsList: [],
+            cardList: [{ A: 'A' }, { B: 'B' }, { C: 'C' }],
             actions: [
                 {
-                    name: '决斗者筑包-古代守护着'
+                    name: '决斗者筑包-古代守护着',
+                    children: [
+                        {
+                            name: 'AAAA'
+                        }
+                    ],
+                    subname: 'aaaa'
                 },
                 {
                     name: '精灵宝可梦(繁中)'
@@ -130,37 +135,23 @@ export default {
         };
     },
     computed: {
-        cardList() {
-            let boxMap = { ...this.detailsList };
-            return Object.keys(boxMap).map(item => {
-                return boxMap[item];
-            });
-        },
-        allCards() {
-            return [...this.cardList].flat();
-        }
+        // cardList() {
+        //     let boxMap = { ...this.detailsList };
+        //     return Object.keys(boxMap).map(item => {
+        //         return boxMap[item];
+        //     });
+        // },
+        // allCards() {
+        //     return [...this.cardList].flat();
+        // }
     },
-    // computed: {
-    //     canSubmit() {
-    //         if (this.name && this.price) {
-    //             return true;
-    //         } else {
-    //             return false;
-    //         }
-    //     }
-    // },
-    created() {},
     methods: {
         canChoose(info) {
             let status = ['WAIT', 'PROGRESS'];
-            return status.includes(info.caseStatus) && !info.userId;
-        },
-        init(type) {
-            this.nowChoose = [...this.chooseIds];
-            this.show = true;
-            this.buy = type === 'buy';
+            return status.includes(info.caseStatus) && !this.sold;
         },
         choose(id, used = false) {
+            console.log('=====');
             if (used) {
                 return;
             }
@@ -172,53 +163,13 @@ export default {
             }
             this.nowChoose = list;
         },
-        submit() {
-            if (this.nowChoose.length === 0) {
-                this.toast('请选择卡牌');
-                return;
-            }
-            let caseId = this.cardCaseInfo.cardCaseId;
-            let boxIds = this.nowChoose.join(',');
-            this.$http
-                .get('/orderInfo/checkBox', {
-                    caseId,
-                    boxIds
-                })
-                .then(res => {
-                    let checkResult = false;
-                    checkResult = res;
-                    if (!checkResult) {
-                        wx.showToast({
-                            icon: 'none',
-                            title: '该卡箱需要两个卡包组选择数量一样',
-                            duration: 4000
-                        });
-                        return Promise.reject('提示');
-                    } else {
-                        return Promise.resolve();
-                    }
-                })
-                .then(res => {
-                    this.$emit('update:chooseIds', this.nowChoose);
-                    this.show = false;
-                    if (this.buy) {
-                        this.$emit('buy');
-                    }
-                })
-                .catch(e => {
-                    if (e.error) {
-                        wx.showToast({
-                            icon: 'none',
-                            title: e.error
-                        });
-                    }
-                });
-        },
+        submit() {},
         select(action) {
             this.name = action.detail.name;
             this.show = false;
         },
         submit2() {
+            console.log(this.cardList);
             if (!this.name) {
                 wx.showToast({
                     icon: 'none',
@@ -233,9 +184,9 @@ export default {
                 });
                 return;
             }
-            console.log(this.name);
-            console.log(this.price);
-            console.log(this.message);
+            // console.log(this.name);
+            // console.log(this.price);
+            // console.log(this.message);
             wx.showToast({
                 title: '提交成功'
             });
@@ -270,19 +221,20 @@ export default {
     }
 }
 .addorder {
+    padding-bottom: 90px;
     .box-con {
-        // margin: 23px 0 0 20px;
+        margin: 23px 0 0 20px;
         .label {
             font-size: 14px;
             font-weight: bold;
             color: #000000;
+            margin-left: -3px;
             line-height: 24px;
-            margin-left: 20px;
         }
         .box {
             max-height: 70vh;
             min-height: 50vh;
-            padding: 0 20px 0;
+            padding-right: 20px;
             .flex-col();
             padding-bottom: 6px;
         }
@@ -391,6 +343,22 @@ export default {
     line-height: 40px;
 }
 .btn-list {
-    margin: 40px;
+    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>