Przeglądaj źródła

退款&&预留信息

xuqiang 4 lat temu
rodzic
commit
0cec96de08

+ 14 - 0
project.private.config.json

@@ -61,6 +61,20 @@
                     "query": "",
                     "scene": null
                 },
+                {
+                    "id": -1,
+                    "name": "退款详情",
+                    "pathName": "/pages/applydetails",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "预留信息",
+                    "pathName": "/pages/changeReserve",
+                    "query": "",
+                    "scene": null
+                },
                 {
                     "id": -1,
                     "name": "确认订单",

+ 5 - 1
src/components/areaSelect.vue

@@ -56,4 +56,8 @@ export default {
 };
 </script>
 
-<style></style>
+<style lang="less" scoped>
+/deep/ .van-popup {
+    margin-bottom: 0px;
+}
+</style>

+ 6 - 3
src/main.js

@@ -46,11 +46,14 @@ export default {
             'pages/orderdetails',
             'pages/collection',
             'pages/evaluate',
-            'pages/apply'
+            'pages/apply',
+            'pages/applydetails',
+            'pages/changeReserve'
         ],
         tabBar: {
-            color: '#333',
-            selectedColor: '#007d37',
+            color: '#4D4138',
+            selectedColor: '#159EFF',
+            borderStyle: 'white',
             list: [
                 {
                     pagePath: 'pages/Home',

+ 1 - 1
src/pages/allorder.vue

@@ -91,7 +91,7 @@ export default {
 .container {
     background: @bg;
     padding-top: 35px;
-    min-height: 562px;
+    min-height: 582px;
     .box-tab {
         background: #ffffff;
         .flex();

+ 23 - 14
src/pages/apply.vue

@@ -16,7 +16,13 @@
                 @click="show = true"
             >
             </van-field>
-            <van-field label="退款金额" error="true" :value="form.total" @input="form.total = $event.detail">
+            <van-field
+                type="digit"
+                label="退款金额"
+                error="true"
+                :value="form.total"
+                @input="form.total = $event.detail"
+            >
             </van-field>
             <van-field
                 label="补充说明"
@@ -128,19 +134,19 @@ export default {
             this.form.reason = action.detail.name;
             this.show = false;
         },
-        // submit() {
-        //     if (!this.form.reason) {
-        //         wx.showToast({
-        //             icon: 'none',
-        //             title: '退货原因不能为空'
-        //         });
-        //         return;
-        //     }
-        //     wx.showToast({
-        //         title: '提交成功'
-        //     });
-        //     this.navigateTo('/pages/Applydetails?id=' + this.orderInfoId);
-        // },
+        submit() {
+            if (!this.form.reason) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '退货原因不能为空'
+                });
+                return;
+            }
+            wx.showToast({
+                title: '提交成功'
+            });
+            this.navigateTo('/pages/applydetails');
+        },
         cancel() {
             this.show = false;
         }
@@ -148,6 +154,9 @@ export default {
 };
 </script>
 <style lang="less" scoped>
+/deep/ .van-popup {
+    margin-bottom: 0px;
+}
 /deep/ .van-button {
     background: @prim !important;
     border-color: @prim !important;

+ 316 - 0
src/pages/applydetails.vue

@@ -0,0 +1,316 @@
+<config>
+{
+    "navigationBarTitleText": "退款详情",
+    "navigationBarBackgroundColor": "#ffffff",
+}
+</config>
+<template>
+    <div class="apply">
+        <div class="top">
+            <img
+                src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-17-13-59-28rUgbNkZY.png"
+                alt=""
+            />
+            <p>退款审核中</p>
+            <span> 退款审核中,请耐心等待,退款将在72小 &nbsp;&nbsp;时内按照原支付渠道返回,请注意查收</span>
+        </div>
+        <div class="border2"></div>
+        <div class="price">
+            <p>退款总金额</p>
+            <span>¥111</span>
+        </div>
+        <div class="border2"></div>
+        <div class="conBox">
+            <div class="store">
+                <div class="title">
+                    <img
+                        src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-03-15-53-18gjxoMYNY.png"
+                        alt=""
+                    />
+                    <div class="tit">益禾堂(一食堂)</div>
+                </div>
+                <div class="store1">联系卖家</div>
+            </div>
+            <div class="border"></div>
+            <div v-for="(item, index) in takeout" :key="index">
+                <div class="content">
+                    <div class="ImgBox">
+                        <img :src="item.image" alt="" />
+                        <div>
+                            <div class="name">{{ item.name }}</div>
+                            <div class="name1">共{{ item.num }}件</div>
+                        </div>
+                    </div>
+                    <div class="money">¥{{ item.price }}</div>
+                </div>
+            </div>
+            <div class="order">
+                <div class="text1">打包费</div>
+                <div class="text2">¥{{ list.packPrice }}</div>
+            </div>
+            <div class="order order2">
+                <div class="text1">配送费</div>
+                <div class="text2">¥{{ list.distributionPrice }}</div>
+            </div>
+            <div class="text">
+                <div class="text1">合计:</div>
+                <div class="text2">¥{{ list.total }}</div>
+            </div>
+            <div class="border2"></div>
+            <div class="box">
+                <div class="box-con">
+                    <p>订单编号</p>
+                    <div class="text1">
+                        <span @click="orderCopy">复制</span>
+                        <div class="text2">{{ list.transactionId }}</div>
+                    </div>
+                </div>
+            </div>
+            <div class="box">
+                <div class="box-con">
+                    <p>下单时间</p>
+                    <div class="text1">
+                        <div class="text2">{{ list.createdAt }}</div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            minters: 0,
+            seconds: 0,
+            allTime: 5 * 60 - 1,
+            closeTime: '',
+            takeout: [],
+            list: {
+                transactionId: '2019052035464',
+                createdAt: '2021-09-03 14:18:26',
+                remark: '加急',
+                packPrice: '2',
+                distributionPrice: '2',
+                total: '37',
+                lists: [
+                    {
+                        price: '11',
+                        name: '寿司',
+                        id: 2,
+                        num: '1',
+                        image:
+                            'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
+                    },
+                    {
+                        price: '22',
+                        name: '寿司,八宝粥',
+                        id: 5,
+                        num: '2',
+                        image:
+                            'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
+                    }
+                ]
+            }
+        };
+    },
+    methods: {
+        orderCopy() {
+            wx.setClipboardData({
+                data: this.list.transactionId + '',
+                success(res) {
+                    wx.getClipboardData({
+                        success(res) {
+                            wx.showToast({
+                                title: '复制成功'
+                            });
+                        }
+                    });
+                }
+            });
+        }
+    },
+    created() {
+        this.takeout = this.list.lists;
+    }
+};
+</script>
+<style lang="less" scoped>
+.apply {
+    .top {
+        margin: 30px 60px 50px;
+        img {
+            width: 60px;
+            height: 60px;
+            margin-left: 98px;
+        }
+        p {
+            font-size: 16px;
+            font-weight: bold;
+            color: #000000;
+            line-height: 24px;
+            text-align: center;
+            margin: 20px 0 16px 0px;
+        }
+        span {
+            width: 255px;
+            font-size: 14px;
+            font-weight: 400;
+            color: #939599;
+            line-height: 24px;
+        }
+    }
+    .price {
+        .flex();
+        padding: 0 16px;
+        line-height: 70px;
+        color: #ff7f1f;
+        justify-content: space-between;
+        p {
+            font-size: 14px;
+            font-weight: bold;
+        }
+        span {
+            font-size: 16px;
+            font-weight: bold;
+        }
+    }
+    .border2 {
+        height: 5px;
+        background: #f5f7fa;
+        width: 100%;
+    }
+    .conBox {
+        margin-top: 20px;
+        .store {
+            .flex();
+            justify-content: space-between;
+            padding: 0 16px;
+            .title {
+                .flex();
+                img {
+                    width: 18px;
+                    height: 18px;
+                }
+                .tit {
+                    .span();
+                    font-weight: 400;
+                    padding-left: 6px;
+                }
+            }
+            .store1 {
+                font-size: 14px;
+                font-weight: 400;
+                color: #000000;
+                line-height: 24px;
+            }
+        }
+        .border {
+            padding: 0 16px;
+            border-bottom: 1px solid @bg;
+            margin: 10px 16px 16px;
+        }
+        .content {
+            display: flex;
+            justify-content: space-between;
+            padding: 0 16px;
+            margin-bottom: 16px;
+            .ImgBox {
+                display: flex;
+                img {
+                    width: 80px;
+                    height: 80px;
+                    border-radius: 8px;
+                    margin-right: 18px;
+                }
+                .name {
+                    .span();
+                    color: #1c1c1c;
+                }
+                .name1 {
+                    font-size: 14px;
+                    font-weight: 400;
+                    color: #c8c9cc;
+                    line-height: 24px;
+                }
+            }
+            .money {
+                font-size: 16px;
+                font-weight: bold;
+                color: #1c1c1c;
+                line-height: 26px;
+            }
+        }
+        .order {
+            margin-bottom: 4px;
+            .flex();
+            justify-content: space-between;
+            padding: 0 16px;
+            .text1 {
+                .text13();
+            }
+            .text2 {
+                .span();
+                color: #1c1c1c;
+            }
+            &.order2 {
+                margin-bottom: 14px;
+            }
+        }
+        .text {
+            .flex();
+            padding-right: 16px;
+            place-content: flex-end;
+            font-weight: bold;
+            .text1 {
+                font-size: 14px;
+                color: #c8c9cc;
+                line-height: 24px;
+            }
+            .text2 {
+                font-size: 16px;
+                color: #ff7f1f;
+                line-height: 26px;
+            }
+        }
+        .border2 {
+            height: 5px;
+            margin: 20px 0 15px;
+            background: @bg;
+        }
+        .box {
+            margin-bottom: 16px;
+            padding: 0 16px;
+            .box-con {
+                .flex();
+                justify-content: space-between;
+                .text1 {
+                    display: flex;
+                    span {
+                        width: 38px;
+                        height: 18px;
+                        border-radius: 2px;
+                        border: 1px solid #c8c9cc;
+                        font-size: 12px;
+                        font-weight: 400;
+                        color: #c8c9cc;
+                        line-height: 18px;
+                        text-align: center;
+                        margin-right: 3px;
+                    }
+                }
+                p {
+                    .text13();
+                }
+                .text2 {
+                    height: 22px;
+                    font-size: 13px;
+                    font-weight: 400;
+                    color: #000000;
+                    line-height: 22px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 108 - 0
src/pages/changeReserve.vue

@@ -0,0 +1,108 @@
+<config>
+{
+    "navigationBarTitleText": "预留信息",
+}
+</config>
+<template>
+    <div>
+        <!-- <van-field
+            type="text"
+            clearable
+            placeholder="请输入..."
+            :value="message"
+            focus
+            @input="message = $event.detail"
+            @comfirm="message = $event.detail"
+        /> -->
+        <van-cell-group>
+            <van-field
+                :value="form.name"
+                @input="form.name = $event.detail"
+                placeholder="请填写您的姓名"
+                label="联系人"
+            />
+            <van-field
+                type="number"
+                :value="form.phone"
+                @input="form.phone = $event.detail"
+                placeholder="请填写您的手机号码"
+                label="手机号"
+            />
+        </van-cell-group>
+        <div class="submit">
+            <van-button type="primary" block @click="submit"> 保存</van-button>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            name: '',
+            phone: '',
+            key: 'nickname'
+        };
+    },
+    onShow() {
+        let eventChannel = this.$mp.page.getOpenerEventChannel();
+        if (eventChannel && eventChannel.on) {
+            eventChannel.on('message', data => {
+                this.message = data;
+            });
+            eventChannel.on('title', data => {
+                wx.setNavigationBarTitle({
+                    title: data.title
+                });
+                this.key = data.key;
+            });
+        }
+    },
+    methods: {
+        submit() {
+            let pages = getCurrentPages();
+            let prevPage = pages[pages.length - 2];
+
+            wx.navigateBack({
+                success: res => {
+                    prevPage.rootVM.updateInfo({
+                        [this.key]: this.message
+                    });
+                }
+            });
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+/deep/ .van-button {
+    --button-primary-background-color: @prim;
+    --button-primary-border-color: @prim;
+}
+/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;
+    }
+}
+.submit {
+    margin: 81px 43px 100px;
+}
+</style>

+ 2 - 4
src/pages/confirmorder.vue

@@ -7,7 +7,6 @@
 <template>
     <div class="container">
         <nav-title>提交订单</nav-title>
-        <!-- <van-sticky> -->
         <div class="top">
             <img
                 class="mytest"
@@ -61,7 +60,7 @@
                 <div class="time" @click="show = true">
                     <div class="text" v-if="active == '到店自取'">
                         <div class="text3">预留信息</div>
-                        <div class="textCon" @click.stop="navigateTo('/pages/chooseAddress')">
+                        <div class="textCon" @click.stop="navigateTo('/pages/changeReserve')">
                             <div class="text2">奶盖 18789898888</div>
                             <img
                                 style="width:12px;height:24px"
@@ -87,7 +86,6 @@
                 </div>
             </div>
         </div>
-        <!-- </van-sticky> -->
         <div class="content">
             <div class="store">
                 <div class="title">
@@ -307,7 +305,7 @@ export default {
                     ]
                 }
             ],
-            active: '到店自取',
+            active: '外卖配送',
             tabs: ['外卖配送', '到店自取'],
             takeout: [],
             list: {

+ 0 - 1
src/pages/merchantorders.vue

@@ -62,7 +62,6 @@
         <div class="content" v-if="active == '点餐'">
             <van-tree-select
                 :items="items"
-                :main-item-class="red"
                 :main-active-index="mainActiveIndex"
                 :active-id="activeId"
                 @onClickNav="onClickNav"

+ 2 - 6
src/pages/schoolsearch.vue

@@ -11,7 +11,7 @@
                 clearable
                 placeholder="请输入你的校园"
             />
-            <div class="text" @click="search">取消</div>
+            <div class="text" @click="navigateBack">取消</div>
         </div>
         <div class="content">
             <div class="text">热门城市</div>
@@ -33,16 +33,12 @@
 export default {
     data() {
         return {
-            active: '南京',
+            active: '',
             searchVal: '',
             tabs: ['南京', '上海', '广东', '杭州']
         };
     },
     methods: {
-        search() {
-            // this.searchVal = '';
-            console.log(this.searchVal);
-        },
         tab(e) {
             this.active = e;
         },

+ 3 - 8
src/pages/shopsearch.vue

@@ -11,7 +11,7 @@
                 clearable
                 placeholder="请输入"
             />
-            <div class="text" @click="search">取消</div>
+            <div class="text" @click="navigateBack">取消</div>
         </div>
         <div class="content">
             <div class="text">最近搜索</div>
@@ -47,19 +47,14 @@
 export default {
     data() {
         return {
-            active: '早餐',
-            active2: '排骨',
+            active: '',
+            active2: '',
             searchVal: '',
             tabs: ['早餐', '炸鸡', '面条'],
             tabs2: ['排骨', '石锅拌饭', '炸豆腐', '烤鱼']
         };
     },
     methods: {
-        search() {
-            // this.searchVal = '';
-            // console.log(this.searchVal);
-            this.searchData(this.searchVal);
-        },
         tab(e) {
             this.active = e;
         },