xuqiang 4 سال پیش
والد
کامیت
c34d179569
6فایلهای تغییر یافته به همراه155 افزوده شده و 67 حذف شده
  1. 1 0
      src/components/AllorderInfo.vue
  2. 66 9
      src/components/AllselloutInfo.vue
  3. 63 49
      src/pages/allselldetails.vue
  4. 11 0
      src/pages/mine.vue
  5. 1 1
      src/pages/minePublish.vue
  6. 13 8
      src/pages/walletdetails.vue

+ 1 - 0
src/components/AllorderInfo.vue

@@ -460,6 +460,7 @@ export default {
                 img {
                     width: 17px;
                     height: 17px;
+                    border-radius: 50%;
                 }
                 p {
                     height: 22px;

+ 66 - 9
src/components/AllselloutInfo.vue

@@ -25,7 +25,7 @@
             </div>
             <div class="message" v-if="status !== 'REFUND' && status !== 'REFUNDED' && status !== 'CANCELED'">
                 <p>买家留言:</p>
-                <span>{{ all.remark }}</span>
+                <span>{{ all.remark || '无' }}</span>
             </div>
             <div class="message" v-if="status == 'REFUND' || status == 'REFUNDED'">
                 <p>退款原因:</p>
@@ -86,6 +86,16 @@
                 alt=""
             />
         </van-popup>
+        <van-action-sheet
+            :show="newShow"
+            description="选着物流类型"
+            cancel-text="取消"
+            :actions="actions"
+            @close="onClose"
+            @select="select"
+            @cancel="cancels"
+        >
+        </van-action-sheet>
     </div>
 </template>
 <script>
@@ -101,8 +111,16 @@ export default {
     data() {
         return {
             show: false,
+            newShow: false,
             stepsList: [],
             logisTics: [],
+            logisticsOptions: [
+                { id: 0, label: '顺丰', value: 'SFEXPRESS' },
+                { id: 1, label: '申通', value: 'STO' },
+                { id: 2, label: '韵达', value: 'YUNDA' },
+                { id: 3, label: '京东', value: 'JD' },
+                { id: 4, label: '中通', value: 'ZTO' }
+            ],
             userId: '',
             tradeId: ''
         };
@@ -126,6 +144,15 @@ export default {
         userNickName() {
             return this.all.userNickName || '';
         },
+        actions() {
+            let list = [...this.logisticsOptions];
+            return list.map(item => {
+                return {
+                    name: item.label,
+                    value: item.value
+                };
+            });
+        },
         name() {
             if (this.all.status === 'CREATED') {
                 return '买家待支付';
@@ -269,15 +296,45 @@ export default {
                 }
             });
         },
+        select(e) {
+            this.time = e.detail;
+            this.value = this.time.value;
+            console.log(this.value);
+            this.showLoading();
+            this.$http
+                .post('orderInfo/send', {
+                    logisticNo: 'JDVA06560511791',
+                    type: this.value,
+                    orderInfoId: this.id,
+                    remark: ''
+                })
+                .then(res => {
+                    this.hideLoading();
+                    wx.showToast({
+                        icon: 'none',
+                        title: '发货成功'
+                    });
+                    setTimeout(() => {
+                        this.allsellout();
+                    }, 1000);
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    wx.showToast({
+                        icon: 'none',
+                        title: '没有此订单',
+                        duration: 2000
+                    });
+                });
+        },
+        onClose() {
+            this.newShow = false;
+        },
+        cancels() {
+            this.newShow = false;
+        },
         deliver() {
-            console.log(this.all);
-            // wx.showToast({
-            //     title: '敬请开放',
-            //     icon: 'none'
-            // });
-            this.$http.post('orderInfo/send', { logisticNo: 'SF1102671764014', type: '', remark: '' }).then(res => {
-                console.log(res);
-            });
+            this.newShow = true;
         }
     }
 };

+ 63 - 49
src/pages/allselldetails.vue

@@ -49,7 +49,7 @@
             <div class="box-border"></div>
             <div class="message" v-if="status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'">
                 <p>买家留言:</p>
-                <span>{{ status.remark }}</span>
+                <span>{{ status.remark || '无' }}</span>
             </div>
         </div>
         <div class="box-bg"></div>
@@ -166,7 +166,7 @@
                     <span class="box-btn-sp">查看物流</span>
                 </div>
                 <!-- 已发货 -->
-                <div v-if="status.orderStatus === 'SEND'" class="box-btn-left" @click="logistics">
+                <div v-if="status.orderStatus === 'SEND'" class="box-btn-left2" @click="logistics">
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
                     <span>查看物流</span>
                 </div>
@@ -206,10 +206,6 @@
                     <img src="/native/imgs/btn_04@3x.png" alt="" />
                     <span>删除订单</span>
                 </div>
-                <div v-if="status.orderStatus === 'CANCELED'" class="box-btn-left2" @click="deliver">
-                    <img src="/native/imgs/btn_04@3x.png" alt="" />
-                    <span>立即发货</span>
-                </div>
                 <div v-if="status.orderStatus === 'CANCELED'" class="box-btn-right" @click="Buyers">
                     <img src="/native/imgs/btn_01@4x.png" alt="" />
                     <span class="box-btn-sp">联系买家</span>
@@ -238,23 +234,17 @@
                 alt=""
             />
         </van-popup>
-        <van-dialog
-            use-slot
-            :show="showdialog"
-            show-cancel-button
-            custom-style="width:260px;height:270px;"
-            :message-Align="center"
-            confirm-button-open-type="getUserInfo"
+
+        <van-action-sheet
+            :show="newShow"
+            description="选着物流类型"
+            cancel-text="取消"
+            :actions="actions"
+            @close="onClose"
+            @select="select"
+            @cancel="cancels"
         >
-            <van-sticky :offset-top="0">
-                <div class="time-box">
-                    <van-dropdown-menu>
-                        <van-dropdown-item @change="change" :value="time" :options="option1" />
-                    </van-dropdown-menu>
-                </div>
-            </van-sticky>
-            <!-- <div class="box"></div> -->
-        </van-dialog>
+        </van-action-sheet>
     </div>
 </template>
 
@@ -264,12 +254,12 @@ export default {
     data() {
         return {
             show: false,
-            showdialog: false,
+            newShow: false,
             Boxes: [],
             cardCaseInfo: {},
             total: '',
             tradeId: '',
-            time: 0,
+            value: '',
             addressList: [],
             name: '',
             orderInfoId: '',
@@ -279,11 +269,11 @@ export default {
             stepsList: [],
             stepsShow: [],
             logisticsOptions: [
-                { label: '顺丰', value: 'SFEXPRESS' },
-                { label: '申通', value: 'STO' },
-                { label: '韵达', value: 'YUNDA' },
-                { label: '京东', value: 'JD' },
-                { label: '中通', value: 'ZTO' }
+                { id: 0, label: '顺丰', value: 'SFEXPRESS' },
+                { id: 1, label: '申通', value: 'STO' },
+                { id: 2, label: '韵达', value: 'YUNDA' },
+                { id: 3, label: '京东', value: 'JD' },
+                { id: 4, label: '中通', value: 'ZTO' }
             ],
             store: {},
             postage: {},
@@ -296,11 +286,11 @@ export default {
         };
     },
     computed: {
-        option1() {
-            let list = [...this.typeOptions];
+        actions() {
+            let list = [...this.logisticsOptions];
             return list.map(item => {
                 return {
-                    text: item.label,
+                    name: item.label,
                     value: item.value
                 };
             });
@@ -367,6 +357,7 @@ export default {
                 .get('/orderInfo/get/' + this.$mp.query.id)
                 .then(res => {
                     this.hideLoading();
+                    console.log(res);
                     this.status = res;
                     this.cardBoxListLength = this.status.cardBoxList.length;
                     this.user = res.user;
@@ -434,7 +425,7 @@ export default {
             // }, 1000);
         },
         Buyers() {
-            this.navigateTo('/pages/chat?toUserId=' + this.store.userId + '&toName=' + this.user.nickname);
+            this.navigateTo('/pages/chat?toUserId=' + this.status.userId + '&toName=' + this.user.nickname);
         },
         logistics() {
             this.showLoading();
@@ -508,15 +499,46 @@ export default {
                 }
             });
         },
+        select(e) {
+            this.time = e.detail;
+            this.value = this.time.value;
+            // console.log(this.value);
+            this.showLoading();
+            this.$http
+                .post('orderInfo/send', {
+                    logisticNo: 'SF1102671764014',
+                    type: this.value,
+                    orderInfoId: this.orderInfoId,
+                    remark: ''
+                })
+                .then(res => {
+                    this.hideLoading();
+                    wx.showToast({
+                        icon: 'none',
+                        title: '发货成功'
+                    });
+                    setTimeout(() => {
+                        this.getFn();
+                    }, 1000);
+                    // console.log(res);
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    wx.showToast({
+                        icon: 'none',
+                        title: '没有此订单',
+                        duration: 2000
+                    });
+                });
+        },
+        onClose() {
+            this.newShow = false;
+        },
+        cancels() {
+            this.newShow = false;
+        },
         deliver() {
-            this.showdialog = true;
-            // let value = this.logisticsOptions.map(item => {
-            //     return item.value;
-            // });
-            console.log(this.typeList);
-            // this.$http.post('orderInfo/send', { logisticNo: 'SF1102671764014', type: value, remark: '' }).then(res => {
-            //     console.log(res);
-            // });
+            this.newShow = true;
         },
         deletes() {
             wx.showModal({
@@ -579,14 +601,6 @@ export default {
     /deep/ .van-step__circle-container {
         height: 0;
     }
-    /deep/ .van-dropdown-item {
-        .van-cell {
-            .van-cell__title {
-                width: 200px;
-                max-width: 200px;
-            }
-        }
-    }
     /deep/ .van-steps {
         height: 307px;
         width: 334px;

+ 11 - 0
src/pages/mine.vue

@@ -56,6 +56,9 @@
             <van-grid-item text="我发布的" @click="navigateTo('/pages/minePublish')">
                 <img class="gird-icon" src="/native/svgs/info_icon_fabu.svg" slot="icon" alt="" />
             </van-grid-item>
+            <!-- <van-grid-item text="我发布的" @click="publish">
+                <img class="gird-icon" src="/native/svgs/info_icon_fabu.svg" slot="icon" alt="" />
+            </van-grid-item> -->
             <van-grid-item text="我卖出的" @click="navigateTo('/pages/allsellout')">
                 <img class="gird-icon" src="/native/svgs/info_icon_maichu.svg" slot="icon" alt="" />
             </van-grid-item>
@@ -148,6 +151,7 @@ export default {
                     query: { userId: this.$store.state.userInfo.id, del: false }
                 })
                 .then(res => {
+                    console.log(res);
                     if (res.empty) {
                         return Promise.reject();
                     } else {
@@ -177,6 +181,13 @@ export default {
                     });
                 }
             });
+        },
+        publish() {
+            // if () {
+            //     this.navigateTo('/pages/store/apply');
+            // } else {
+            //     this.navigateTo('/pages/minePublish');
+            // }
         }
     },
     onShow() {

+ 1 - 1
src/pages/minePublish.vue

@@ -155,7 +155,7 @@ export default {
                 this.list.forEach(item => {
                     item.endTime = dayjs(item.endTime, 'YYYY-MM-DD HH:mm:ss').diff(dayjs());
                 });
-                if (res.caseInfo.length == 0) {
+                if (this.list.length == 0) {
                     this.empty = true;
                 }
                 this.hideLoading();

+ 13 - 8
src/pages/walletdetails.vue

@@ -81,20 +81,25 @@ export default {
                 });
                 return;
             }
-            // if (!this.form.boxPrice) {
-            //     wx.showToast({
-            //         icon: 'none',
-            //         title: '请输入金额'
-            //     });
-            //     return;
-            // }
+            if (!this.form.boxPrice) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '请输入金额'
+                });
+                return;
+            }
             this.showLoading();
             let userId = this.$store.state.userInfo.id;
             this.$http
                 .post('/memberInfo/newWithDraw', { userId, money: this.form.boxPrice })
                 .then(res => {
                     this.hideLoading();
-                    this.navigateTo('/pages/walletreview');
+                    wx.showToast({
+                        icon: 'none',
+                        title: '申请审核中,72小时内成功',
+                        duration: 2000
+                    });
+                    // this.navigateTo('/pages/walletreview');
                 })
                 .catch(e => {
                     this.hideLoading();