|
|
@ -865,21 +865,20 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
|
|
|
|
const arr = localStorage.getItem('booking_form_copy') ? JSON.parse(localStorage.getItem('booking_form_copy')) : []
|
|
|
|
const copyData = {
|
|
|
|
const copyData = {
|
|
|
|
customername: $data.bookingDetails.customername,
|
|
|
|
bookingEDIExt: {}
|
|
|
|
portloadid: $data.bookingDetails.portloadid,
|
|
|
|
}
|
|
|
|
carrierid: $data.bookingDetails.carrierid,
|
|
|
|
arr.forEach(item => {
|
|
|
|
carrier: $data.bookingDetails.carrier,
|
|
|
|
if (item.includes('bookingEDIExt')) {
|
|
|
|
portload: $data.bookingDetails.portload,
|
|
|
|
const str = item.replace('bookingEDIExt.', '')
|
|
|
|
issueplace: $data.bookingDetails.issueplace,
|
|
|
|
copyData.bookingEDIExt[str] = $data.bookingDetails.bookingEDIExt[str]
|
|
|
|
prepardat: $data.bookingDetails.prepardat,
|
|
|
|
} else {
|
|
|
|
route: $data.bookingDetails.route,
|
|
|
|
copyData[item] = $data.bookingDetails[item]
|
|
|
|
shippingMethod: $data.bookingDetails.shippingMethod,
|
|
|
|
}
|
|
|
|
shipper: $data.bookingDetails.shipper,
|
|
|
|
})
|
|
|
|
consignee: $data.bookingDetails.consignee,
|
|
|
|
if (arr.includes('ctnall')) {
|
|
|
|
notifyparty: $data.bookingDetails.notifyparty,
|
|
|
|
copyData.ctnInputs = $data.bookingDetails.ctnInputs
|
|
|
|
goodsStatus: $data.bookingDetails.goodsStatus,
|
|
|
|
|
|
|
|
sale: $data.bookingDetails.sale
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
|
|
|
|
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
|
|
|
@ -1329,18 +1328,20 @@ export default {
|
|
|
|
let newData = res.data
|
|
|
|
let newData = res.data
|
|
|
|
if (this.$route.query.isCopy && !overSet) {
|
|
|
|
if (this.$route.query.isCopy && !overSet) {
|
|
|
|
delete res.data.id
|
|
|
|
delete res.data.id
|
|
|
|
|
|
|
|
const arr = localStorage.getItem('booking_form_copy') ? JSON.parse(localStorage.getItem('booking_form_copy')) : []
|
|
|
|
const copyData = {
|
|
|
|
const copyData = {
|
|
|
|
customername: res.data.customername,
|
|
|
|
bookingEDIExt: {}
|
|
|
|
portloadid: res.data.portloadid,
|
|
|
|
}
|
|
|
|
portload: res.data.portload,
|
|
|
|
arr.forEach(item => {
|
|
|
|
issueplace: res.data.issueplace,
|
|
|
|
if (item.includes('bookingEDIExt')) {
|
|
|
|
prepardat: res.data.prepardat,
|
|
|
|
const str = item.replace('bookingEDIExt.', '')
|
|
|
|
route: res.data.route,
|
|
|
|
copyData.bookingEDIExt[str] = res.data.bookingEDIExt[str]
|
|
|
|
shippingMethod: res.data.shippingMethod,
|
|
|
|
} else {
|
|
|
|
shipper: res.data.shipper,
|
|
|
|
copyData[item] = res.data[item]
|
|
|
|
consignee: res.data.consignee,
|
|
|
|
}
|
|
|
|
notifyparty: res.data.notifyparty,
|
|
|
|
})
|
|
|
|
sale: res.data.sale
|
|
|
|
if (arr.includes('ctnall')) {
|
|
|
|
|
|
|
|
copyData.ctnInputs = res.data.ctnInputs
|
|
|
|
}
|
|
|
|
}
|
|
|
|
newData = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
newData = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
|
|
|
|
}
|
|
|
|
}
|
|
|
|