Эх сурвалжийг харах

修改卖家发货没有发货地址问题

shenjj 7 жил өмнө
parent
commit
1068150bea

+ 29 - 22
pages/mobile/order/index.vue

@@ -454,29 +454,36 @@
           return
         }
         this.$http.get(`/trade/bankInfo/vender/enterprise?status=104&type=sup`).then(res => {
-          if (res.data && res.data.length > 0) {
-            this.onMind('您还未填写收款账户信息 ,请进行完善')
+          if (res.data && res.data[0]) {
+            this.$http.get(`/trade/address/enterprise?ship=false`).then(res => {
+              // 选择发货地址
+              if (res.data[0]) {
+                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)
+                  })
+                }
+              } else {
+                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)
-              })
-            }
+            this.onMind('您还未填写收款账户信息 ,请进行完善')
           }
         })
       },