|
@@ -511,25 +511,27 @@
|
|
|
// 选择发货地址
|
|
// 选择发货地址
|
|
|
if (res.data[0]) {
|
|
if (res.data[0]) {
|
|
|
this.sendGoodstype = 'add'
|
|
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
|
|
|
|
|
+ // if (item.inid) {
|
|
|
|
|
+ // this._id = EncryptionFilter(item.inid)
|
|
|
|
|
+ let _id = EncryptionFilter(item.purchaseid)
|
|
|
|
|
+ this.$http.get(`/trade/purchase/purchaseId/${_id}`).then(res => {
|
|
|
|
|
+ this.sendGoodsInfo = res.data.data
|
|
|
|
|
+ this.sendGoodsInfo.area = JSON.parse(res.data.data.jsonAddress)
|
|
|
this.showSend = true
|
|
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.$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 {
|
|
} else {
|
|
|
this.onMind('您还未填写设置发货地址 ,请进行完善')
|
|
this.onMind('您还未填写设置发货地址 ,请进行完善')
|
|
|
}
|
|
}
|
|
@@ -578,7 +580,18 @@
|
|
|
} else if (!patt.test(this.sendGoodsInfo.kuaidinumber)) {
|
|
} else if (!patt.test(this.sendGoodsInfo.kuaidinumber)) {
|
|
|
this.onMind('请输入正确的物流单号')
|
|
this.onMind('请输入正确的物流单号')
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ let _obj = []
|
|
|
let sendInfo = this.getLogisticsInfo()
|
|
let sendInfo = this.getLogisticsInfo()
|
|
|
|
|
+ for (let i = 0; i < this.sendGoodsInfo.purchaseDetails.length; i++) {
|
|
|
|
|
+ if (Math.abs(this.sendGoodsInfo.purchaseDetails[i].number) > 0) {
|
|
|
|
|
+ let _id = this.sendGoodsInfo.purchaseDetails[i].id
|
|
|
|
|
+ _obj.push({
|
|
|
|
|
+ id: _id,
|
|
|
|
|
+ qty: this.sendGoodsInfo.purchaseDetails[i].number - this.sendGoodsInfo.purchaseDetails[i].shipQty
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ sendInfo.map = _obj
|
|
|
this.$http.post(`/trade/inFpu/save?id=${this.sendGoodsInfo.id}`, sendInfo).then(res => {
|
|
this.$http.post(`/trade/inFpu/save?id=${this.sendGoodsInfo.id}`, sendInfo).then(res => {
|
|
|
if (res.data.success) {
|
|
if (res.data.success) {
|
|
|
this.onMind('发货成功')
|
|
this.onMind('发货成功')
|
|
@@ -793,7 +806,7 @@
|
|
|
getLogisticsInfo(_type) {
|
|
getLogisticsInfo(_type) {
|
|
|
let sendInfo = {}
|
|
let sendInfo = {}
|
|
|
sendInfo.sendType = this.sendGoodsInfo.sendType
|
|
sendInfo.sendType = this.sendGoodsInfo.sendType
|
|
|
- sendInfo.jsonSdAddress = this.sendGoodsInfo.jsonSpAddress
|
|
|
|
|
|
|
+ sendInfo.jsonSdAddress = this.sendGoodsInfo.jsonSpAddress || this.sendGoodsInfo.jsonAddress
|
|
|
sendInfo.logisticsInfo = {}
|
|
sendInfo.logisticsInfo = {}
|
|
|
if (this.peisongShowName) {
|
|
if (this.peisongShowName) {
|
|
|
sendInfo.logisticsInfo.companyName = this.peisongShowName
|
|
sendInfo.logisticsInfo.companyName = this.peisongShowName
|
|
@@ -819,7 +832,7 @@
|
|
|
},
|
|
},
|
|
|
// 买家确认收货
|
|
// 买家确认收货
|
|
|
buyerGetGoods(item) {
|
|
buyerGetGoods(item) {
|
|
|
- this.$http.put(`/trade/order/simpleinfo/ones/${item.id}?_status=ensureaccept`).then(res => {
|
|
|
|
|
|
|
+ this.$http.put(`/trade/order/signReceive?id=${item.id}&_status=ensureaccept`).then(res => {
|
|
|
this.onMind('确认收货成功')
|
|
this.onMind('确认收货成功')
|
|
|
this.ChangeList(this.activeType)
|
|
this.ChangeList(this.activeType)
|
|
|
})
|
|
})
|