|
|
|
@ -574,7 +574,8 @@ export default {
|
|
|
|
|
...mapActions(['setNeedSavePages', 'setBookingList', 'setBookingGridOptions']),
|
|
|
|
|
getRouterHis() {
|
|
|
|
|
this.inChildLoading = true
|
|
|
|
|
const newId = this.$route.query.id
|
|
|
|
|
const newId = this.$route.query.id ? this.$route.query.id.toString() : ''
|
|
|
|
|
// debugger
|
|
|
|
|
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
|
|
|
|
|
this.id = this.$route.query.id
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
|
|
|
|
@ -658,7 +659,7 @@ export default {
|
|
|
|
|
}, 500)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else if (Object.keys(this.historyData).includes(newId)) {
|
|
|
|
|
this.id = this.$route.query.id
|
|
|
|
|
this.id = !this.$route.query.isCopy ? this.$route.query.id : 0
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
|
|
|
|
|
this.bookingDetails = $data.bookingDetails
|
|
|
|
|
this.excuteRules = $data.excuteRules
|
|
|
|
@ -686,6 +687,7 @@ export default {
|
|
|
|
|
}, 200)
|
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
|
this.bookingDetails.mblno = ''
|
|
|
|
|
this.bookingDetails.id = 0
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
@ -967,7 +969,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
if (res.data.hbList.length > 0) {
|
|
|
|
|
res.data.hbList.map((item, index) => {
|
|
|
|
|
item.bookingEDIExt.shipperEdiCode = item.bookingEDIExt.shipperEdiCode ? item.bookingEDIExt.shipperEdiCode : 'CN218868'
|
|
|
|
|
// item.bookingEDIExt.shipperEdiCode = item.bookingEDIExt.shipperEdiCode ? item.bookingEDIExt.shipperEdiCode : 'CN218868'
|
|
|
|
|
const newBookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...item.bookingEDIExt }
|
|
|
|
|
item = { ...JSON.parse(JSON.stringify(initDetail)), ...item, ...{ bookingEDIExt: newBookingEDIExt } }
|
|
|
|
|
if (item.ctnInputs.length > 0) {
|
|
|
|
@ -983,7 +985,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
res.data.feeself = !!res.data.feeself
|
|
|
|
|
res.data.bookingEDIExt.shipperEdiCode = res.data.bookingEDIExt.shipperEdiCode ? res.data.bookingEDIExt.shipperEdiCode : 'CN218868'
|
|
|
|
|
// res.data.bookingEDIExt.shipperEdiCode = res.data.bookingEDIExt.shipperEdiCode ? res.data.bookingEDIExt.shipperEdiCode : 'CN218868'
|
|
|
|
|
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt }
|
|
|
|
|
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } })
|
|
|
|
|
this.inPageLoading = false
|
|
|
|
@ -1128,18 +1130,23 @@ export default {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.destroy()
|
|
|
|
|
that.$message.success('保存成功')
|
|
|
|
|
if (that.isAdd) {
|
|
|
|
|
if (that.isAdd || this.isCopy) {
|
|
|
|
|
this.isCopy = false
|
|
|
|
|
this.isAdd = false
|
|
|
|
|
this.inAddSave = true
|
|
|
|
|
this.id = res.data.id
|
|
|
|
|
this.setDeatilsFun(res)
|
|
|
|
|
const newBookingList = JSON.parse(JSON.stringify(this.bookingList))
|
|
|
|
|
const newBookingGridOptions = JSON.parse(JSON.stringify(this.bookingGridOptions))
|
|
|
|
|
newBookingGridOptions.data = [...[res.data], ...newBookingGridOptions.data]
|
|
|
|
|
this.$set(newBookingList, res.data.id, res.data)
|
|
|
|
|
this.setBookingList(newBookingList)
|
|
|
|
|
this.setBookingGridOptions(newBookingGridOptions)
|
|
|
|
|
console.log('== 新增内容 - query ==', {
|
|
|
|
|
id: res.data.id,
|
|
|
|
|
type: res.data.carrierid,
|
|
|
|
|
noOpenTab: true,
|
|
|
|
|
mblno: res.data.mblno
|
|
|
|
|
})
|
|
|
|
|
that.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
@ -1149,6 +1156,7 @@ export default {
|
|
|
|
|
mblno: res.data.mblno
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.setDeatilsFun(res)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inAddSave = false
|
|
|
|
|
}, 2000)
|
|
|
|
|