|
|
|
@ -418,7 +418,8 @@ export default {
|
|
|
|
|
tableRules: rules.tableRules,
|
|
|
|
|
hasTableRules: false,
|
|
|
|
|
inAddSave: false,
|
|
|
|
|
hasHbList: false
|
|
|
|
|
hasHbList: false,
|
|
|
|
|
detailsLoadOver: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
@ -598,7 +599,14 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
|
|
|
|
|
const detailsChange = !!this.needSavePages[key].details
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
|
const hbListChange = !!this.needSavePages[key].hbList
|
|
|
|
|
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
// this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
@ -635,7 +643,14 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
|
|
|
|
|
const detailsChange = !!this.needSavePages[key].details
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
|
const hbListChange = !!this.needSavePages[key].hbList
|
|
|
|
|
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
// this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
@ -670,7 +685,14 @@ export default {
|
|
|
|
|
this.bookingDetails.mblno = ''
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
|
|
|
|
|
const detailsChange = !!this.needSavePages[key].details
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
|
const hbListChange = !!this.needSavePages[key].hbList
|
|
|
|
|
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
console.log(`详情历史改变数据:${detailsChange}, 分单历史改变数据: ${hbListChange}`)
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
@ -683,7 +705,13 @@ export default {
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
this.init()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
|
|
|
|
|
const detailsChange = !!this.needSavePages[key].details
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
|
|
|
|
|
|
|
|
|
|
const hbListChange = !!this.needSavePages[key].hbList
|
|
|
|
|
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
|
}
|
|
|
|
@ -704,6 +732,7 @@ export default {
|
|
|
|
|
this.getRightAll()
|
|
|
|
|
} else {
|
|
|
|
|
this.isAdd = true
|
|
|
|
|
this.detailsLoadOver = false
|
|
|
|
|
this.bookingDetails.carrierid = this.type
|
|
|
|
|
this.bookingDetails.carrier = this.type
|
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -713,6 +742,7 @@ export default {
|
|
|
|
|
if (Object.keys(this.$refs).includes('goodsTable')) {
|
|
|
|
|
this.$refs.goodsTable.init()
|
|
|
|
|
}
|
|
|
|
|
this.detailsLoadOver = true
|
|
|
|
|
}, 200)
|
|
|
|
|
}
|
|
|
|
|
this.getDjyTenantConfig()
|
|
|
|
@ -810,6 +840,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.inPageLoading = true
|
|
|
|
|
this.inChildLoading = true
|
|
|
|
|
this.detailsLoadOver = false
|
|
|
|
|
this.$message.loading({ content: '加载中...' })
|
|
|
|
|
BookingOrderGet({
|
|
|
|
|
id: this.id
|
|
|
|
@ -884,6 +915,7 @@ export default {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// console.log('== 5. 设置主单保存数据 - false ==')
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.detailsLoadOver = true
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
this.$message.success({ content: '加载完成' })
|
|
|
|
|
if (!this.hasHbList && this.bookingDetails.hbList.length > 0) {
|
|
|
|
@ -1295,16 +1327,18 @@ export default {
|
|
|
|
|
// if (this.inPageLoading) {
|
|
|
|
|
// return false
|
|
|
|
|
// }
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
const lastPages = this.needSavePages
|
|
|
|
|
const $data = this.needSavePages[this.id] || {}
|
|
|
|
|
const $data = this.needSavePages[key] || {}
|
|
|
|
|
if (!this.detailsLoadOver) {
|
|
|
|
|
data.hasChange = false
|
|
|
|
|
}
|
|
|
|
|
if (data.type === 'details') {
|
|
|
|
|
this.$set($data, 'details', data.hasChange)
|
|
|
|
|
} else if (data.type === 'hbList') {
|
|
|
|
|
this.$set($data, 'hbList', data.hasChange)
|
|
|
|
|
}
|
|
|
|
|
// const key = this.id
|
|
|
|
|
const key = this.$route.fullPath
|
|
|
|
|
// console.log('== 设置主单保存数据 ==', key, $data)
|
|
|
|
|
// console.log('== 设置主单保存数据 ==', this.detailsLoadOver, this.inPageLoading, this.inChildLoading)
|
|
|
|
|
this.$set(lastPages, key, $data)
|
|
|
|
|
this.setNeedSavePages(lastPages)
|
|
|
|
|
},
|
|
|
|
|