Parcourir la source

优化买卖订单问题

shenjj il y a 7 ans
Parent
commit
b3a19c2b7c

+ 3 - 0
components/mobile/MobileHeader.vue

@@ -208,6 +208,9 @@
         } else if (this.startWith(val, '/mobile/order/details')) {
           this.showSearchIcon = false
           title = '订单详情'
+        } else if (this.startWith(val, '/mobile/order/logistics')) {
+          this.showSearchIcon = false
+          title = '物流信息'
         } else if (this.startWith(val, '/mobile/order')) {
           this.showSearchIcon = false
           if (query.type === 'buyer') {

+ 11 - 2
pages/mobile/order/details.vue

@@ -429,12 +429,14 @@
           data[0].purchaseDetails = data[0].orderDetails
           data[0].purchaseRemark = data[0].orderRemark ? JSON.parse(data[0].orderRemark)[data[0].storeid] : ''
           data[0].sendType = data[0].rule.method
+          let invoiceAddress = data[0].invoiceAddress ? JSON.parse(data[0].invoiceAddress) : ''
           if (route.query.type === 'buyer') {
             sellsendGoodsTime = await axios.get(`/trade/tradebasicproperties/get/1054`)
           }
           return {
             orderList: data[0],
-            sellsendGoodsTime: parseInt(sellsendGoodsTime.data.info)
+            sellsendGoodsTime: parseInt(sellsendGoodsTime.data.info),
+            invoiceAddress: invoiceAddress
           }
         }
         let { data } = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)
@@ -565,7 +567,7 @@
                 this.showSend = true
               })
             }, err => {
-              this.onMind('转出货单失败' + err.data)
+              this.onMind('转出货单失败' + err.response.data)
             })
           }
         },
@@ -1559,6 +1561,13 @@
         color: #999;
         height: 0.5rem;
         line-height: 0.5rem;
+        .pull-right {
+          max-width: 4.5rem;
+          @include overFlowHidden();
+        }
+        .pull-left {
+          width: 2.2rem;
+        }
       }
     }
   }

+ 31 - 20
pages/mobile/order/index.vue

@@ -6,7 +6,7 @@
       <div :class="activeType === 'comfirmed' ? 'active' : ''" @click="ChangeList('comfirmed')"><span>待发货</span></div>
       <div :class="activeType === 'inbound' ? 'active' : ''" @click="ChangeList('inbound')"><span>待收货</span></div>
     </div>
-    <ul class="order-list-wrap"  id="order-wrapper">
+    <ul class="order-list-wrap"  id="order-wrapper" v-show="orderList.length > 0">
       <li class="clearfix" v-for="item in orderList">
         <div class="list-wrap-title clearfix">
           <div class="pull-left" v-if="vendorType !== 'buyer'" @click="toShopdetails(item)">
@@ -448,26 +448,37 @@
       },
       // 发货
       sendGoods(item) {
-        this.sendGoodstype = 'add'
-        if (item.inid) {
-          this._id = EncryptionFilter(item.inid)
-          this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-            this.sendGoodsInfo = res.data[0]
-            this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-            this.showSend = true
-          })
-        } else {
-          this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-            this._id = EncryptionFilter(res.data.inId)
-            this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-              this.sendGoodsInfo = res.data[0]
-              this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-              this.showSend = true
-            })
-          }, err => {
-            this.onMind('转出货单失败' + err.data)
-          })
+        if (!(this.user.data.pwdEnable && this.user.data.haveUserQuestion && this.user.data.emailValidCode === 2)) {
+          // 等级不够
+          this.onMind('您的账户安全等级较低,请先在pc端进行信息完善')
+          return
         }
+        this.$http.get(`/trade/bankInfo/vender/enterprise?status=104&type=sup`).then(res => {
+          if (res.data && res.data.length > 0) {
+            this.onMind('您还未填写收款账户信息 ,请进行完善')
+          } else {
+            this.sendGoodstype = 'add'
+            if (item.inid) {
+              this._id = EncryptionFilter(item.inid)
+              this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                this.sendGoodsInfo = res.data[0]
+                this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                this.showSend = true
+              })
+            } else {
+              this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
+                this._id = EncryptionFilter(res.data.inId)
+                this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                  this.sendGoodsInfo = res.data[0]
+                  this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                  this.showSend = true
+                })
+              }, err => {
+                this.onMind('转出货单失败' + err.response.data)
+              })
+            }
+          }
+        })
       },
       // 选择配送商
       choosePeisong() {

+ 1 - 5
pages/mobile/order/logistics.vue

@@ -1,10 +1,5 @@
 <template>
     <div class="order-wrapper">
-      <div class="com-mobile-header">
-        <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
-        <p>物流信息
-        </p>
-      </div>
       <div class="logistics_top clearfix">
         <div class="pull-left">
           <div class="name">订单编号:<span class="red">{{detailsInfo.orderid}}</span></div>
@@ -57,6 +52,7 @@
         let resultInfo
         if (route.query.type === 'buyer') {
           res = await axios.get(`/trade/order/${route.query.uuid}`)
+          res.data[0].sendType = JSON.parse(res.data[0].jsonRule).method
           resultInfo = res.data[0]
         } else {
           res = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)