Browse Source

申请退款

xuqiang-97 5 năm trước cách đây
mục cha
commit
627d8b9146

+ 6 - 0
project.config.json

@@ -185,6 +185,12 @@
                     "name": "店铺首页",
                     "pathName": "/pages/store/homePage",
                     "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "申请退款",
+                    "pathName": "/pages/Apply",
+                    "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;

+ 2 - 2
src/components/CardCase.vue

@@ -26,7 +26,7 @@
 
                 <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">第{{ getNumStr(index + 1) }}组</div>
                         <div class="card-list">
                             <div
                                 v-for="(item, itemIndex) in card"
@@ -139,7 +139,7 @@ export default {
             }
         },
         getChart(index) {
-            const list = ['A', 'B', 'C', 'D', 'E', 'F'];
+            const list = ['1', '2', '3', '4', '5', '6'];
             return list[index];
         }
     }

+ 1 - 0
src/main.js

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

+ 203 - 0
src/pages/Apply.vue

@@ -0,0 +1,203 @@
+<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
+                class="textarea"
+                label="补充说明"
+                :value="message"
+                @input="message = $event.detail"
+                custom-style="height:70px;"
+                rows="1"
+                autosize
+                type="textarea"
+                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>

+ 0 - 1
src/pages/allorder.vue

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

+ 0 - 1
src/pages/confirmorder.vue

@@ -159,7 +159,6 @@ export default {
                     boxIds
                 })
                 .then(res => {
-                    console.log(res);
                     wx.hideLoading();
                     this.total = res.total;
                     this.Boxes = res.selectedBoxes;

+ 1 - 1
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;
@@ -216,6 +215,7 @@ export default {
             margin-top: 12px;
         }
         p {
+            font-family: 'OSP';
             height: 22px;
             font-size: 30px;
             font-weight: normal;

+ 3 - 21
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,7 +733,6 @@ export default {
         }
     }
     .box-footer-nav {
-        // .bottom();
         padding-bottom: 50px;
         position: fixed;
         bottom: 0;

+ 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;

BIN
src/static/imgs/popup_icon_fail_colour@3x.png