xuqiang пре 5 година
родитељ
комит
79fafea3e0

+ 12 - 3
src/components/AllorderInfo.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
     <div class="box-con">
     <div class="box-con">
         <div class="box-con2">
         <div class="box-con2">
-            <div class="box-tit">
+            <div class="box-tit" @click="navigateTo('/pages/store/homePage?id=' + storeId, false)">
                 <div>
                 <div>
                     <img :src="all.logo" alt="" />
                     <img :src="all.logo" alt="" />
                     <p>{{ all.storeName }}</p>
                     <p>{{ all.storeName }}</p>
@@ -23,10 +23,14 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="box-num">
+            <div class="box-num" v-if="status !== 'AutoRefund'">
                 <span>实际支付</span>
                 <span>实际支付</span>
                 <span class="num">¥{{ all.total }}</span>
                 <span class="num">¥{{ all.total }}</span>
             </div>
             </div>
+            <div class="box-num" v-if="status == 'AutoRefund'">
+                <span>退款成功</span>
+                <span class="num">¥{{ all.total }}</span>
+            </div>
             <div class="box-bor"></div>
             <div class="box-bor"></div>
             <div class="box-butm">
             <div class="box-butm">
                 <div v-if="status == 'CREATED'" @click="cancel" class="box-but">取消订单</div>
                 <div v-if="status == 'CREATED'" @click="cancel" class="box-but">取消订单</div>
@@ -43,6 +47,8 @@
                 <div v-if="status == 'REFUND'" @click="sales" class="box-but3">联系卖家</div>
                 <div v-if="status == 'REFUND'" @click="sales" class="box-but3">联系卖家</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 v-if="status == 'REFUNDED'" @click="applydetails" class="box-but3">退款详情</div>
+                <div v-if="status == 'AutoRefund'" @click="deletes" class="box-but">删除订单</div>
+                <div v-if="status == 'AutoRefund'" @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>
@@ -129,6 +135,9 @@ export default {
             if (this.status === 'REFUNDED') {
             if (this.status === 'REFUNDED') {
                 return '退款成功';
                 return '退款成功';
             }
             }
+            if (this.status === 'AutoRefund') {
+                return '拼箱失败/已退款';
+            }
             return '';
             return '';
         }
         }
     },
     },
@@ -167,7 +176,7 @@ export default {
             this.$emit('refreash');
             this.$emit('refreash');
         },
         },
         allorder() {
         allorder() {
-            if (this.status === 'REFUND' || this.status === 'REFUNDED') {
+            if (this.status === 'REFUND' || this.status === 'REFUNDED' || this.status === 'AutoRefund') {
                 this.navigateTo('/pages/Applydetails?id=' + this.id);
                 this.navigateTo('/pages/Applydetails?id=' + this.id);
             } else {
             } else {
                 this.navigateTo('/pages/orderdetails?id=' + this.id);
                 this.navigateTo('/pages/orderdetails?id=' + this.id);

+ 13 - 1
src/components/AllselloutInfo.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
     <div class="box-con">
     <div class="box-con">
         <div class="box-con2">
         <div class="box-con2">
-            <div class="box-tit">
+            <div class="box-tit" @click="Buyers">
                 <div>
                 <div>
                     <img style="width:20px;height:20px;border-radius:50%;" :src="all.avatar" alt="" />
                     <img style="width:20px;height:20px;border-radius:50%;" :src="all.avatar" alt="" />
                     <p>{{ all.userNickName }}</p>
                     <p>{{ all.userNickName }}</p>
@@ -31,12 +31,20 @@
                 <p>退款原因:</p>
                 <p>退款原因:</p>
                 <span>多拍/错拍/不想要</span>
                 <span>多拍/错拍/不想要</span>
             </div>
             </div>
+            <!-- <div class="message" v-if="status == 'bbb'">
+                <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">
                     <span>实付款</span>
                     <span>实付款</span>
                     <span class="num">¥{{ all.total }}</span>
                     <span class="num">¥{{ all.total }}</span>
                 </div>
                 </div>
+                <!-- <div class="box-num" v-if="status == 'bbb'">
+                    <span>退款成功</span>
+                    <span class="num">¥{{ all.total }}</span>
+                </div> -->
             </div>
             </div>
             <div class="box-bor"></div>
             <div class="box-bor"></div>
             <div class="box-butm">
             <div class="box-butm">
@@ -53,6 +61,7 @@
                 <div v-if="status == 'REFUND'" @click="Buyers" class="box-but">联系买家</div>
                 <div v-if="status == 'REFUND'" @click="Buyers" class="box-but">联系买家</div>
                 <div v-if="status == 'REFUND'" @click="deliver" class="box-but2">同意退款</div>
                 <div v-if="status == 'REFUND'" @click="deliver" 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 == 'bbb'" @click="deletes" class="box-but">删除订单</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>
@@ -135,6 +144,9 @@ export default {
             if (this.status === 'REFUNDED') {
             if (this.status === 'REFUNDED') {
                 return '退款成功';
                 return '退款成功';
             }
             }
+            // if (this.status === 'bbb') {
+            //     return '系统自动退款';
+            // }
             return '';
             return '';
         }
         }
     },
     },

+ 11 - 3
src/pages/Applydetails.vue

@@ -22,6 +22,10 @@
                 >申请成功,退款将在72小时内按照原支付
                 >申请成功,退款将在72小时内按照原支付
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;渠道返回,请注意查收</span
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;渠道返回,请注意查收</span
             >
             >
+            <span v-if="ApplydetailList.orderStatus === 'AutoRefund'"
+                >拼箱失败,退款将在72小时内按照原支付
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;渠道返回,请注意查收</span
+            >
             <span v-if="ApplydetailList.orderStatus === 'REFUND'">
             <span v-if="ApplydetailList.orderStatus === 'REFUND'">
                 退款审核中,请耐心等待,退款将在72小 &nbsp;&nbsp;时内按照原支付渠道返回,请注意查收</span
                 退款审核中,请耐心等待,退款将在72小 &nbsp;&nbsp;时内按照原支付渠道返回,请注意查收</span
             >
             >
@@ -33,12 +37,12 @@
                 <span>¥{{ ApplydetailList.total }}</span>
                 <span>¥{{ ApplydetailList.total }}</span>
             </div>
             </div>
             <div class="border"></div>
             <div class="border"></div>
-            <div class="box-tit">
+            <div class="box-tit" @click="navigateTo('/pages/store/homePage?id=' + store.id, false)">
                 <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="sales">联系卖家</div>
+                <div class="box-tit-seller" @click.stop="sales">联系卖家</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">
@@ -64,6 +68,7 @@
                 <div class="box-buttom-con">
                 <div class="box-buttom-con">
                     <p>退款原因</p>
                     <p>退款原因</p>
                     <span>多拍/错拍/不想要</span>
                     <span>多拍/错拍/不想要</span>
+                    <span v-if="ApplydetailList.orderStatus === 'AutoRefund'">拼箱失败未成团</span>
                 </div>
                 </div>
             </div>
             </div>
             <div class="box-buttom">
             <div class="box-buttom">
@@ -114,7 +119,10 @@ export default {
                     if (this.ApplydetailList.orderStatus === 'REFUND') {
                     if (this.ApplydetailList.orderStatus === 'REFUND') {
                         this.label = '退款审核中';
                         this.label = '退款审核中';
                     }
                     }
-                    if (this.ApplydetailList.orderStatus === 'REFUNDED') {
+                    if (
+                        this.ApplydetailList.orderStatus === 'REFUNDED' ||
+                        this.ApplydetailList.orderStatus === 'AutoRefund'
+                    ) {
                         this.label = '退款成功';
                         this.label = '退款成功';
                     }
                     }
                 })
                 })

+ 1 - 6
src/pages/allorder.vue

@@ -25,7 +25,7 @@
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_womaidaode%403x.png"
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_womaidaode%403x.png"
             description="暂无相关订单哦~"
             description="暂无相关订单哦~"
         >
         >
-            <van-button round type="danger" class="bottom-button" @click="Look">
+            <van-button round type="danger" class="bottom-button" @click="navigateTo('/pages/Home')">
                 去逛逛
                 去逛逛
             </van-button>
             </van-button>
         </van-empty>
         </van-empty>
@@ -50,11 +50,6 @@ export default {
             this.active = item;
             this.active = item;
             this.allFn();
             this.allFn();
         },
         },
-        Look() {
-            wx.switchTab({
-                url: '/pages/Home'
-            });
-        },
         allFn() {
         allFn() {
             this.allList = [];
             this.allList = [];
             this.showLoading();
             this.showLoading();

+ 9 - 3
src/pages/allselldetails.vue

@@ -53,12 +53,16 @@
             </div>
             </div>
         </div>
         </div>
         <div class="box-bg"></div>
         <div class="box-bg"></div>
-        <div class="box-tit" v-if="status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'">
+        <div
+            class="box-tit"
+            @click="navigateTo('/pages/store/homePage?id=' + store.id, false)"
+            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">共{{ status.cardBoxList.length }}件商品</div> -->
+            <div class="box-tit-seller">共{{ cardBoxListLength }}件商品</div>
         </div>
         </div>
         <div class="box-tit2" v-if="status.orderStatus == 'REFUND' || status.orderStatus == 'REFUNDED'">
         <div class="box-tit2" v-if="status.orderStatus == 'REFUND' || status.orderStatus == 'REFUNDED'">
             <div>
             <div>
@@ -256,7 +260,8 @@ export default {
             minters: 0,
             minters: 0,
             seconds: 0,
             seconds: 0,
             allTime: 5 * 60 - 1,
             allTime: 5 * 60 - 1,
-            closeTime: ''
+            closeTime: '',
+            cardBoxListLength: 0
         };
         };
     },
     },
     methods: {
     methods: {
@@ -321,6 +326,7 @@ export default {
                 .then(res => {
                 .then(res => {
                     this.hideLoading();
                     this.hideLoading();
                     this.status = res;
                     this.status = res;
+                    this.cardBoxListLength = this.status.cardBoxList.length;
                     this.user = res.user;
                     this.user = res.user;
                     this.addressList = res.address;
                     this.addressList = res.address;
                     this.total = res.total;
                     this.total = res.total;

+ 1 - 6
src/pages/allsellout.vue

@@ -25,7 +25,7 @@
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_womaidaode%403x.png"
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_womaidaode%403x.png"
             description="暂无相关订单哦~"
             description="暂无相关订单哦~"
         >
         >
-            <van-button round type="danger" class="bottom-button" @click="Look">
+            <van-button round type="danger" class="bottom-button" @click="navigateTo('/pages/store/homePage')">
                 去逛逛
                 去逛逛
             </van-button>
             </van-button>
         </van-empty>
         </van-empty>
@@ -50,11 +50,6 @@ export default {
             this.active = item;
             this.active = item;
             this.allsellout();
             this.allsellout();
         },
         },
-        Look() {
-            wx.switchTab({
-                url: '/pages/Home'
-            });
-        },
         allsellout() {
         allsellout() {
             this.allList = [];
             this.allList = [];
             this.showLoading();
             this.showLoading();

+ 3 - 2
src/pages/confirmorder.vue

@@ -30,7 +30,7 @@
             </div>
             </div>
         </div>
         </div>
         <img src="../static/imgs/img_dizhitiao@3x.png" alt="" />
         <img src="../static/imgs/img_dizhitiao@3x.png" alt="" />
-        <div class="box-tit">
+        <div class="box-tit" @click="navigateTo('/pages/store/homePage?id=' + store.id, false)">
             <img :src="store.logo" alt="" />
             <img :src="store.logo" alt="" />
             <p>{{ store.storeName }}</p>
             <p>{{ store.storeName }}</p>
         </div>
         </div>
@@ -140,6 +140,7 @@ export default {
                     userAddressId: this.userAddressId
                     userAddressId: this.userAddressId
                 })
                 })
                 .then(res => {
                 .then(res => {
+                    console.log(res);
                     this.hideLoading();
                     this.hideLoading();
                     this.id = res.id;
                     this.id = res.id;
                     this.navigateTo('/pages/orderdetails?id=' + this.id);
                     this.navigateTo('/pages/orderdetails?id=' + this.id);
@@ -163,7 +164,7 @@ export default {
                 })
                 })
                 .then(res => {
                 .then(res => {
                     this.hideLoading();
                     this.hideLoading();
-                    // console.log(res);
+                    console.log(res);
                     this.total = res.total;
                     this.total = res.total;
                     this.store = res.store;
                     this.store = res.store;
                     this.Boxes = res.selectedBoxes;
                     this.Boxes = res.selectedBoxes;

+ 1 - 1
src/pages/minePublish.vue

@@ -50,7 +50,7 @@
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_wukabao.png"
             image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_wukabao.png"
             description="暂无卡包信息哦~"
             description="暂无卡包信息哦~"
         >
         >
-            <van-button type="primary" block @click="navigateTo('/pages/store/productEdit')">去发布</van-button>
+            <van-button type="primary" block @click="navigateTo('/pages/store/homePage')">去发布</van-button>
         </van-empty>
         </van-empty>
     </div>
     </div>
 </template>
 </template>

+ 2 - 2
src/pages/orderdetails.vue

@@ -46,12 +46,12 @@
             </div>
             </div>
         </div>
         </div>
         <div class="box-bg"></div>
         <div class="box-bg"></div>
-        <div class="box-tit" @click="navigateTo('/pages/store/homePage?id=' + store.id)">
+        <div class="box-tit" @click="navigateTo('/pages/store/homePage?id=' + store.id, false)">
             <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="sales">联系卖家</div>
+            <div class="box-tit-seller" @click.stop="sales">联系卖家</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">

+ 1 - 6
src/pages/store/productEdit.vue

@@ -45,7 +45,7 @@
                 label="邮费"
                 label="邮费"
                 :value="form.postage"
                 :value="form.postage"
                 @input="form.postage = $event.detail"
                 @input="form.postage = $event.detail"
-                placeholder="默认邮费10元"
+                placeholder="请输入邮费"
             >
             >
             </van-field>
             </van-field>
         </van-cell-group>
         </van-cell-group>
@@ -494,11 +494,6 @@ export default {
                     setTimeout(() => {
                     setTimeout(() => {
                         this.navigateBack();
                         this.navigateBack();
                     }, 1000);
                     }, 1000);
-                    // if (this.showId) {
-                    //     this.navigateTo('/pages/store/homePage');
-                    // } else {
-                    //     this.navigateTo('/pages/minePublish?orderInfoId=' + this.id);
-                    // }
                 })
                 })
                 .catch(e => {
                 .catch(e => {
                     this.hideLoading();
                     this.hideLoading();

+ 2 - 20
src/pages/wallet.vue

@@ -82,6 +82,7 @@ export default {
     methods: {
     methods: {
         loginMethods() {
         loginMethods() {
             this.$http.get('/memberInfo/findByUser').then(res => {
             this.$http.get('/memberInfo/findByUser').then(res => {
+                // console.log(res);
                 this.moneyInfo = res;
                 this.moneyInfo = res;
             });
             });
         },
         },
@@ -91,26 +92,7 @@ export default {
             });
             });
         },
         },
         Withdrawal() {
         Withdrawal() {
-            this.showLoading();
-            let userId = this.$store.state.userInfo.id;
-            this.$http
-                .post('/memberInfo/newWithDraw', { userId, money: this.moneyInfo.money })
-                .then(res => {
-                    this.hideLoading();
-                    // console.log(res);
-                    wx.showToast({
-                        icon: 'none',
-                        title: '提现审核中,72小时内通过',
-                        duration: 4000
-                    });
-                })
-                .catch(e => {
-                    this.hideLoading();
-                    wx.showToast({
-                        icon: 'none',
-                        title: e.error
-                    });
-                });
+            this.navigateTo('/pages/walletdetails');
         },
         },
         record(e) {
         record(e) {
             this.time = e.detail;
             this.time = e.detail;

+ 85 - 3
src/pages/walletdetails.vue

@@ -8,11 +8,93 @@
 }
 }
 </config>
 </config>
 <template>
 <template>
-    <div></div>
+    <div>
+        <div>{{ moneyInfo.money || 320 }}</div>
+        <div class="box">
+            <span>¥</span>
+            <van-cell-group>
+                <van-field
+                    type="digit"
+                    :value="form.boxPrice"
+                    @input="form.boxPrice = $event.detail"
+                    placeholder="请输入金额"
+                >
+                </van-field>
+            </van-cell-group>
+            <van-button type="primary" size="small" @click="allMoney">全部</van-button>
+        </div>
+        <van-button type="primary" size="small" :disabled="notWithdrawal" @click="Withdrawal(notWithdrawal)"
+            >申请退款</van-button
+        >
+    </div>
 </template>
 </template>
 <script>
 <script>
 export default {
 export default {
-    data() {}
+    data() {
+        return {
+            form: {
+                boxPrice: ''
+            },
+            moneyInfo: {}
+        };
+    },
+    computed: {
+        notWithdrawal() {
+            let flag = false;
+            this.form.boxPrice > this.moneyInfo.money ? (flag = true) : (flag = false);
+            return flag;
+        }
+    },
+    methods: {
+        loginMethods() {
+            this.$http.get('/memberInfo/findByUser').then(res => {
+                this.moneyInfo = res;
+            });
+        },
+        allMoney() {
+            this.$http.get('/memberInfo/findByUser').then(res => {
+                this.form = {
+                    boxPrice: res.money
+                };
+            });
+        },
+        Withdrawal(notWithdrawal) {
+            if (notWithdrawal) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '提现金额超出'
+                });
+                return;
+            }
+            this.showLoading();
+            let userId = this.$store.state.userInfo.id;
+            console.log(this.form.boxPrice);
+            this.$http
+                .post('/memberInfo/newWithDraw', { userId, money: this.form.boxPrice })
+                .then(res => {
+                    this.hideLoading();
+                    // console.log(res);
+                    // wx.showToast({
+                    //     icon: 'none',
+                    //     title: '提现审核中,72小时内通过',
+                    //     duration: 4000
+                    // });
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    wx.showToast({
+                        icon: 'none',
+                        title: e.error
+                    });
+                });
+        }
+    }
 };
 };
 </script>
 </script>
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.box {
+    .flex();
+    span {
+    }
+}
+</style>