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