瀏覽代碼

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

panhui 5 年之前
父節點
當前提交
179a88fae8

+ 13 - 0
project.config.json

@@ -160,6 +160,7 @@
                     "id": -1,
                     "name": "确认订单",
                     "pathName": "/pages/confirmorder",
+                    "query": "caseId=2248&boxIds=2251%2C2257%2C2275%2C2281",
                     "scene": null
                 },
                 {
@@ -185,6 +186,18 @@
                     "name": "店铺首页",
                     "pathName": "/pages/store/homePage",
                     "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "申请退款",
+                    "pathName": "/pages/Apply",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "退款详情",
+                    "pathName": "/pages/Applydetails",
+                    "scene": null
                 }
             ]
         }

+ 1 - 1
src/components/AllorderInfo.vue

@@ -377,7 +377,7 @@ export default {
             }
         }
         .box-con-Cards {
-            margin: 16px 0 20px 20px;
+            margin: 16px 0 20px 0;
             display: flex;
             img {
                 width: 90px;

+ 47 - 22
src/components/CardCase.vue

@@ -26,19 +26,19 @@
 
                 <div class="content">
                     <div class="card" v-for="(card, index) in cardList" :key="index">
-                        <div class="card-title">卡包{{ getNumStr(index + 1) }}</div>
+                        <div class="card-title">第{{ index + 1 }}组</div>
                         <div class="card-list">
                             <div
                                 v-for="(item, itemIndex) in card"
                                 :key="item.id"
                                 class="card-item"
                                 :class="{
-                                    used: item.caseStatus !== 'WAIT' || item.userId,
+                                    used: item.caseStatus !== ('WAIT' || 'PROGRESS') || item.userId,
                                     active: nowChoose.includes(item.id)
                                 }"
-                                @click="choose(item.id, item.caseStatus !== 'WAIT' || item.userId)"
+                                @click="choose(item.id, item.caseStatus !== ('WAIT' || 'PROGRESS') || item.userId)"
                             >
-                                {{ getChart(itemIndex) }}
+                                {{ itemIndex + 1 }}
                             </div>
                         </div>
                     </div>
@@ -116,14 +116,11 @@ export default {
             if (used) {
                 return;
             }
-            console.log(id);
             let list = [...this.nowChoose];
             if (list.includes(id)) {
                 list.splice(list.indexOf(id), 1);
-            } else if (list.length < 6) {
-                list.push(id);
             } else {
-                this.toast('最多选择六张');
+                list.push(id);
             }
             this.nowChoose = list;
         },
@@ -132,15 +129,42 @@ export default {
                 this.toast('请选择卡牌');
                 return;
             }
-            this.$emit('update:chooseIds', this.nowChoose);
-            this.show = false;
-            if (this.buy) {
-                this.$emit('buy');
-            }
-        },
-        getChart(index) {
-            const list = ['A', 'B', 'C', 'D', 'E', 'F'];
-            return list[index];
+            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: '该卡箱需要两个卡包组选择数量一样'
+                        });
+                        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 => {
+                    wx.hideLoading();
+                    if (e.error) {
+                        wx.showToast({
+                            icon: 'none',
+                            title: e.error
+                        });
+                    }
+                });
         }
     }
 };
@@ -227,16 +251,13 @@ export default {
     color: #939599;
     line-height: 24px;
 }
-.card-list {
-    margin: 5px;
-}
 .card {
     background-color: @bg;
     padding: 12px 16px;
     border-radius: 8px;
     .card-list {
         .flex();
-
+        flex-wrap: wrap;
         .card-item {
             width: 42px;
             height: 42px;
@@ -247,7 +268,7 @@ export default {
             text-align: center;
             color: #000000;
             line-height: 42px;
-
+            margin-top: 10px;
             &.used {
                 background-color: #939599;
                 color: #ffffff;
@@ -261,6 +282,10 @@ export default {
             &:active {
                 opacity: 0.8;
             }
+
+            &:nth-child(6n + 1) {
+                margin-left: 0 !important;
+            }
         }
 
         .card-item + .card-item {

+ 1 - 0
src/components/ProductInfo.vue

@@ -112,6 +112,7 @@ export default {
     align-self: stretch;
     .flex-col();
     position: relative;
+    overflow: hidden;
     .text1 {
         font-size: 16px;
         font-weight: bold;

+ 2 - 0
src/main.js

@@ -50,6 +50,8 @@ export default {
             'pages/minePublish',
             'pages/mineFollow',
             'pages/changeText',
+            'pages/Apply',
+            'pages/Applydetails',
             'pages/chooseAddress',
             'pages/store/apply',
             'pages/store/review',

二進制
src/native/imgs/icon_tuikuan_chenggong@3x.png


+ 201 - 0
src/pages/Apply.vue

@@ -0,0 +1,201 @@
+<config>
+{
+    "navigationBarTitleText": "申请退款",
+    "navigationBarBackgroundColor": "#ffffff",
+}
+</config>
+<template>
+    <div class="apply">
+        <van-cell-group :border="false">
+            <van-field
+                label="退款原因"
+                :value="reason"
+                placeholder="请选择退款原因"
+                custom-style="padding-top:23px;height:88px;"
+                is-link
+                readonly
+                @click="show = true"
+            >
+            </van-field>
+            <van-field
+                label="退款金额"
+                :value="price"
+                @input="price = $event.detail"
+                custom-style="height:75px;"
+                placeholder="¥970"
+            >
+            </van-field>
+            <van-field
+                label="补充说明"
+                :value="message"
+                @input="message = $event.detail"
+                custom-style="height:70px;"
+                rows="1"
+                autosize
+                placeholder="选填"
+            />
+            <div class="field">
+                <p>退款说明</p>
+                <span>申请成功后,退款将在72小时内按照原支付渠道返回,请注意查收</span>
+            </div>
+        </van-cell-group>
+
+        <div class="btn-list">
+            <van-button :color="$colors.prim" :disabled="!canSubmit" block @click="submit">提交</van-button>
+        </div>
+
+        <van-action-sheet
+            :show="show"
+            description="退款原因"
+            cancel-text="取消"
+            @overlay="overlay = false"
+            @click="cancel"
+            :actions="actions"
+            @select="select"
+        >
+        </van-action-sheet>
+        <van-dialog
+            use-slot
+            :show="showdialog"
+            show-cancel-button
+            custom-style="width:260px;height:270px;"
+            :message-Align="center"
+            confirm-button-open-type="getUserInfo"
+        >
+            <div class="box">
+                <img
+                    style="width:60px;height:60px;margin-left:47px;"
+                    src="../static/imgs/popup_icon_fail_colour@3x.png"
+                    alt=""
+                />
+                <div class="box-size">商品已开箱,暂无法取消 &nbsp;&nbsp;&nbsp;申请退款请联系客服</div>
+                <div class="box-butm">
+                    <p>客服电话:</p>
+                    <span>025-5644356</span>
+                </div>
+            </div>
+        </van-dialog>
+    </div>
+</template>
+<script>
+export default {
+    name: 'apply',
+    data() {
+        return {
+            reason: '',
+            message: '',
+            price: '',
+            show: false,
+            max: 100,
+            showdialog: false,
+            actions: [
+                {
+                    name: '地址/电话等信息填写错误'
+                },
+                {
+                    name: '多拍/错拍/不想要'
+                },
+                {
+                    name: '未按约定时间发货'
+                },
+                {
+                    name: '其他'
+                }
+            ]
+        };
+    },
+    computed: {
+        canSubmit() {
+            if (this.reason && this.price) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    },
+    created() {},
+    methods: {
+        select(action) {
+            this.reason = action.detail.name;
+            this.show = false;
+        },
+        submit() {
+            if (!this.reason) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '退货原因不能为空'
+                });
+                return;
+            }
+            if (!this.price) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '退货价格不能为空'
+                });
+                return;
+            }
+            console.log(this.reason);
+            console.log(this.price);
+            console.log(this.message);
+            wx.showToast({
+                title: '提交成功'
+            });
+        },
+        cancel() {
+            this.show = false;
+        },
+        dialog() {
+            console.log(333);
+            this.showdialog = true;
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.field {
+    .flex();
+    padding: 17px 17px;
+    background: #f5f7fa;
+    height: 36px;
+    p {
+        width: 146px;
+        font-size: 14px;
+        font-weight: 500;
+        color: #646566;
+        line-height: 24px;
+    }
+    span {
+        font-size: 13px;
+        font-weight: 400;
+        color: #939599;
+        line-height: 18px;
+    }
+}
+.box {
+    margin: 30px 53px;
+    .box-size {
+        width: 154px;
+        font-size: 14px;
+        font-weight: bold;
+        color: #000000;
+        line-height: 20px;
+        margin: 20px 0 15px 0;
+    }
+    .box-butm {
+        .flex();
+        p {
+            font-size: 13px;
+        }
+        span {
+            font-size: 13px;
+            color: red;
+        }
+    }
+}
+.van-cell {
+    line-height: 40px;
+}
+.btn-list {
+    margin: 40px;
+}
+</style>

+ 50 - 0
src/pages/Applydetails.vue

@@ -0,0 +1,50 @@
+<config>
+{
+    "navigationBarTitleText": "退款详情",
+    "navigationBarBackgroundColor": "#ffffff",
+}
+</config>
+<template>
+    <div class="apply">
+        <div class="top">
+            <img src="../native/imgs/icon_tuikuan_chenggong@3x.png" alt="" />
+            <p>退款成功</p>
+            <span
+                >申请成功,退款将在72小时内按照原支付
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;渠道返回,请注意查收</span
+            >
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {}
+};
+</script>
+<style lang="less" scoped>
+.apply {
+    margin: 0 20px;
+    .top {
+        margin: 30px 40px 16px 40px;
+        img {
+            width: 60px;
+            height: 60px;
+            margin-left: 98px;
+        }
+        p {
+            font-size: 16px;
+            font-weight: bold;
+            color: #000000;
+            line-height: 24px;
+            margin: 20px 0 16px 98px;
+        }
+        span {
+            width: 255px;
+            font-size: 14px;
+            font-weight: 400;
+            color: #939599;
+            line-height: 24px;
+        }
+    }
+}
+</style>

+ 0 - 1
src/pages/allorder.vue

@@ -119,6 +119,5 @@ export default {
         background: #ff6c00;
         border-radius: 12px;
     }
-    // .bottom(@bottom:0.5px);
 }
 </style>

+ 10 - 16
src/pages/confirmorder.vue

@@ -150,16 +150,17 @@ export default {
                 });
         },
         getFn() {
+            console.log(this.$mp.query.boxIds);
             this.showLoading();
             let caseId = this.$mp.query.caseId;
-            let boxIds = this.$mp.query.boxIds;
+            let boxIds = this.$mp.query.boxIds.replace(/%2C/g, ',');
+            console.log(boxIds);
             this.$http
                 .get('/orderInfo/showPreview', {
                     caseId,
                     boxIds
                 })
                 .then(res => {
-                    console.log(res);
                     wx.hideLoading();
                     this.total = res.total;
                     this.Boxes = res.selectedBoxes;
@@ -232,8 +233,7 @@ export default {
     }
     .box-address {
         .box-lr {
-            display: flex;
-            align-items: center;
+            .flex();
             justify-content: space-between;
             margin: 0 23px;
             height: 120px;
@@ -292,8 +292,7 @@ export default {
         background: #ffffff;
     }
     .box-tit {
-        display: flex;
-        align-items: center;
+        .flex();
         margin: 20px 0 0 20px;
         img {
             width: 17px;
@@ -333,12 +332,11 @@ export default {
                 }
             }
             .box-con-today {
-                display: flex;
+                .flex();
                 height: 30px;
                 background: #f5f7fa;
                 border-radius: 6px;
                 width: 142px;
-                align-items: center;
                 p {
                     height: 24px;
                     font-size: 14px;
@@ -348,8 +346,7 @@ export default {
                 }
             }
             .box-con-money {
-                display: flex;
-                align-items: center;
+                .flex();
                 justify-content: space-between;
                 margin-top: 28px;
                 .box-con-num {
@@ -380,8 +377,7 @@ export default {
     .box-buttom {
         margin: 35px 20px;
         .box-buttom-con {
-            display: flex;
-            align-items: center;
+            .flex();
             justify-content: space-between;
             p {
                 height: 20px;
@@ -418,17 +414,15 @@ export default {
     }
     .box-total {
         .bottom();
-        display: flex;
+        .flex();
         height: 60px;
-        align-items: center;
         justify-content: space-between;
         background: #ffffff;
         width: 100%;
         position: fixed;
         bottom: 0;
         .box-con-num {
-            display: flex;
-            align-items: center;
+            .flex();
             margin-left: 16px;
             span {
                 height: 22px;

+ 4 - 11
src/pages/details.vue

@@ -165,7 +165,6 @@ export default {
         width: 210px;
         height: 48px;
         background: #ff6c00;
-        // border-radius: 12px;
         font-size: 16px;
         font-weight: 400;
         color: #ffffff;
@@ -190,8 +189,7 @@ export default {
         height: 26px;
         background: #ff6c00;
         border-radius: 4px;
-        display: flex;
-        align-items: center;
+        .flex();
         line-height: 26px;
         img {
             width: 14px;
@@ -216,6 +214,7 @@ export default {
             margin-top: 12px;
         }
         p {
+            font-family: 'OSP';
             height: 22px;
             font-size: 30px;
             font-weight: normal;
@@ -291,9 +290,8 @@ export default {
         border: 1px solid #f5f7fa;
         .box-con2-shop {
             padding: 12px 12px;
-            display: flex;
+            .flex();
             justify-content: space-between;
-            align-items: center;
             .box-con2-tit {
                 display: flex;
                 img {
@@ -354,7 +352,6 @@ export default {
     }
     .box-footer {
         right: 0;
-        // height: 82px;
         background: #ffffff;
         position: fixed;
         bottom: 0;
@@ -385,11 +382,8 @@ export default {
         }
         .box-footer-con {
             display: flex;
-            // margin-top: 22px;
-            padding: 6px 0;
             .box-footer-left {
-                display: flex;
-                text-align: center;
+                .flex();
                 img {
                     width: 24px;
                     height: 24px;
@@ -405,7 +399,6 @@ export default {
                 .box-follow {
                     margin-left: 30px;
                 }
-
                 .contact {
                     position: relative;
                     button {

+ 4 - 22
src/pages/orderdetails.vue

@@ -9,7 +9,9 @@
     <div class="container">
         <div class="box-top">
             <p>{{ this.status.label }}</p>
-            <h3>{{ this.status.name }}!</h3>
+            <h3>{{ this.status.name }}</h3>
+            <!-- <h3 v-if="this.status.orderStatus !== 'CREATED'">{{ this.status.name }}</h3>
+            <h3 v-if="this.status.orderStatus == 'CREATED'">请尽快支付,{{ rocallTime }} 后未支付将自动取消订单</h3> -->
         </div>
         <div class="box-adderss">
             <div
@@ -240,7 +242,6 @@ export default {
             this.$http
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .then(res => {
-                    console.log(res);
                     wx.hideLoading();
                     this.caseId = res.caseId;
                     this.status = res;
@@ -358,24 +359,6 @@ export default {
                 title: '敬请开放',
                 icon: 'none'
             });
-            // wx.showModal({
-            //     title: '提示',
-            //     content: '敬请开放',
-            //     success: res => {
-            //         if (res.confirm) {
-            // this.$http.post('orderInfo/refund', { orderInfoId: this.id, remark: '' }).then(res => {
-            //     wx.hideLoading();
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '退款成功'
-            //     });
-            //     setTimeout(() => {
-            //     this.getFn();
-            // }, 1000);
-            // });
-            //         }
-            //     }
-            // });
         },
         pay() {
             wx.showLoading({
@@ -750,8 +733,7 @@ export default {
         }
     }
     .box-footer-nav {
-        // .bottom();
-        padding-bottom: 50px;
+        padding-bottom: 40px;
         position: fixed;
         bottom: 0;
         width: 100%;

+ 9 - 15
src/pages/receiving.vue

@@ -54,7 +54,7 @@
             </div>
 
             <div class="box-but-con">
-                <div class="container-but" @click="addRess">确认</div>
+                <van-button :color="$colors.prim" :disabled="!canSubmit" block @click="addRess">确认</van-button>
                 <div class="container-cancel" @click="refWx">获取微信地址</div>
             </div>
         </div>
@@ -87,6 +87,13 @@ export default {
     computed: {
         showCity() {
             return this.form.province + this.form.city + this.form.district;
+        },
+        canSubmit() {
+            if (this.form.name && this.form.phone && this.form.city && this.form.detail) {
+                return true;
+            } else {
+                return false;
+            }
         }
     },
     methods: {
@@ -146,7 +153,6 @@ export default {
         refWx() {
             wx.chooseAddress({
                 success: res => {
-                    console.log(res);
                     this.form = {
                         enabled: false,
                         name: res.userName,
@@ -201,20 +207,8 @@ export default {
         }
         .box-but-con {
             margin: 0 43px;
-            .container-but {
-                margin-top: 30px;
-                width: 290px;
-                height: 48px;
-                background: #ff6c00;
-                border-radius: 12px;
-                font-size: 16px;
-                font-weight: 400;
-                color: #ffffff;
-                text-align: center;
-                line-height: 48px;
-                margin-bottom: 20px;
-            }
             .container-cancel {
+                margin-top: 20px;
                 width: 290px;
                 height: 48px;
                 border-radius: 12px;

二進制
src/static/imgs/popup_icon_fail_colour@3x.png