|
|
|
@ -582,7 +582,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
@ -637,14 +637,32 @@ export default {
|
|
|
|
|
} else if (Object.keys(this.historyData).includes(newId)) {
|
|
|
|
|
this.id = !this.$route.query.isCopy ? this.$route.query.id : 0
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
|
|
|
|
|
this.bookingDetails = $data.bookingDetails
|
|
|
|
|
console.log('== 复制内容 ==', $data.bookingDetails.hbList)
|
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
|
this.excuteRules = $data.excuteRules
|
|
|
|
|
this.excuteRulesType = $data.excuteRulesType
|
|
|
|
|
this.isAdd = $data.isAdd
|
|
|
|
|
this.tabActiveKey = $data.tabActiveKey
|
|
|
|
|
this.mainOrderActiveKey = $data.mainOrderActiveKey
|
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
|
this.inPageLoading = false
|
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
|
const copyData = {
|
|
|
|
|
customername: $data.bookingDetails.customername,
|
|
|
|
|
portloadid: $data.bookingDetails.portloadid,
|
|
|
|
|
portload: $data.bookingDetails.portload,
|
|
|
|
|
issueplace: $data.bookingDetails.issueplace,
|
|
|
|
|
prepardat: $data.bookingDetails.prepardat,
|
|
|
|
|
route: $data.bookingDetails.route,
|
|
|
|
|
shippingMethod: $data.bookingDetails.shippingMethod,
|
|
|
|
|
shipper: $data.bookingDetails.shipper,
|
|
|
|
|
consignee: $data.bookingDetails.consignee,
|
|
|
|
|
notifyparty: $data.bookingDetails.notifyparty
|
|
|
|
|
}
|
|
|
|
|
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
|
} else {
|
|
|
|
|
this.bookingDetails = $data.bookingDetails
|
|
|
|
|
}
|
|
|
|
|
console.log('== 复制内容 ==', this.bookingDetails.hbList)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
|
|
|
|
|
this.Showtabs = true
|
|
|
|
@ -661,10 +679,10 @@ export default {
|
|
|
|
|
this.$refs.goodsTable.init()
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
|
this.bookingDetails.mblno = ''
|
|
|
|
|
this.bookingDetails.id = 0
|
|
|
|
|
}
|
|
|
|
|
// if (this.isCopy && !$data.isCopy) {
|
|
|
|
|
// this.bookingDetails.mblno = ''
|
|
|
|
|
// this.bookingDetails.id = 0
|
|
|
|
|
// }
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
|
|
|
|
@ -907,14 +925,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setDeatilsFun(res, overSet = false) {
|
|
|
|
|
if (this.$route.query.isCopy && !overSet) {
|
|
|
|
|
res.data.mblno = ''
|
|
|
|
|
delete res.data.id
|
|
|
|
|
this.isAdd = true
|
|
|
|
|
res.data.ctnInputs.map((item, index) => {
|
|
|
|
|
delete item.id
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!res.data.bookingEDIExt) {
|
|
|
|
|
res.data.bookingEDIExt = bookingEDIExt
|
|
|
|
|
}
|
|
|
|
@ -951,8 +961,30 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
res.data.feeself = !!res.data.feeself
|
|
|
|
|
let newData = res.data
|
|
|
|
|
if (this.$route.query.isCopy && !overSet) {
|
|
|
|
|
delete res.data.id
|
|
|
|
|
// res.data.mblno = ''
|
|
|
|
|
// this.isAdd = true
|
|
|
|
|
// res.data.ctnInputs.map((item, index) => {
|
|
|
|
|
// delete item.id
|
|
|
|
|
// })
|
|
|
|
|
const copyData = {
|
|
|
|
|
customername: res.data.customername,
|
|
|
|
|
portloadid: res.data.portloadid,
|
|
|
|
|
portload: res.data.portload,
|
|
|
|
|
issueplace: res.data.issueplace,
|
|
|
|
|
prepardat: res.data.prepardat,
|
|
|
|
|
route: res.data.route,
|
|
|
|
|
shippingMethod: res.data.shippingMethod,
|
|
|
|
|
shipper: res.data.shipper,
|
|
|
|
|
consignee: res.data.consignee,
|
|
|
|
|
notifyparty: res.data.notifyparty
|
|
|
|
|
}
|
|
|
|
|
newData = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
|
}
|
|
|
|
|
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt }
|
|
|
|
|
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } })
|
|
|
|
|
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...newData, ...{ bookingEDIExt: $BookingEDIExt } })
|
|
|
|
|
this.inPageLoading = false
|
|
|
|
|
this.getDefaultVal()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|