szh_zidingyibiaoti
张同海 2 years ago
commit 4d01375707

@ -182,7 +182,7 @@ export default {
}, },
watch: { watch: {
$route: function(newVal) { $route: function(newVal) {
console.log(newVal, newVal.query.noOpenTab, this.fullPathList) // console.log(newVal, newVal.query.noOpenTab, this.fullPathList)
if (!newVal.query.noOpenTab) { if (!newVal.query.noOpenTab) {
this.activeKey = newVal.fullPath this.activeKey = newVal.fullPath
if (this.fullPathList.indexOf(newVal.fullPath) < 0) { if (this.fullPathList.indexOf(newVal.fullPath) < 0) {

@ -586,6 +586,7 @@ export default {
} }
}, 200) }, 200)
setTimeout(() => { setTimeout(() => {
// console.log('== 1. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false }) this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false this.inChildLoading = false
}, 500) }, 500)
@ -619,6 +620,7 @@ export default {
} }
}, 200) }, 200)
setTimeout(() => { setTimeout(() => {
// console.log('== 2. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false }) this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false this.inChildLoading = false
}, 500) }, 500)
@ -650,6 +652,7 @@ export default {
this.bookingDetails.mblno = '' this.bookingDetails.mblno = ''
} }
setTimeout(() => { setTimeout(() => {
// console.log('== 3. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false }) this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false this.inChildLoading = false
}, 500) }, 500)
@ -663,6 +666,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
this.init() this.init()
setTimeout(() => { setTimeout(() => {
// console.log('== 4. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false }) this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false this.inChildLoading = false
}, 500) }, 500)
@ -854,10 +858,11 @@ export default {
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt } 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, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } })
setTimeout(() => { setTimeout(() => {
// console.log('== 5. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false }) this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false this.inChildLoading = false
this.$message.success({ content: '加载完成' }) this.$message.success({ content: '加载完成' })
}, 500) }, 1200)
this.$forceUpdate() this.$forceUpdate()
}, },
@ -884,6 +889,7 @@ export default {
changeDetailFun(data) { changeDetailFun(data) {
const { detail, type } = data const { detail, type } = data
if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) { if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) {
// console.log('== 6. - true ==')
this.checkSaveFun({ type: 'details', hasChange: true }) this.checkSaveFun({ type: 'details', hasChange: true })
} }
this.bookingDetails = detail this.bookingDetails = detail
@ -1249,8 +1255,10 @@ export default {
if (arr.includes(true)) { if (arr.includes(true)) {
this.$set(this.bookingDetails, 'hbList', data) this.$set(this.bookingDetails, 'hbList', data)
this.checkSaveFun({ type: 'hbList', hasChange: true }) this.checkSaveFun({ type: 'hbList', hasChange: true })
// console.log('== ==')
} else { } else {
this.checkSaveFun({ type: 'hbList', hasChange: false }) this.checkSaveFun({ type: 'hbList', hasChange: false })
// console.log('== ==')
} }
}, },
checkSaveFun(data) { checkSaveFun(data) {
@ -1266,6 +1274,7 @@ export default {
} }
// const key = this.id // const key = this.id
const key = this.$route.fullPath const key = this.$route.fullPath
// console.log('== ==', key, $data)
this.$set(lastPages, key, $data) this.$set(lastPages, key, $data)
this.setNeedSavePages(lastPages) this.setNeedSavePages(lastPages)
}, },
@ -1380,10 +1389,10 @@ export default {
} }
}, },
sedOrderRemoveFun(sedData) { sedOrderRemoveFun(sedData) {
console.log('== 父组件收到子单删除数据 ==', sedData, this.bookingDetails.hbList) // console.log('== ==', sedData, this.bookingDetails.hbList)
this.$set(this.bookingDetails, 'hbList', sedData) this.$set(this.bookingDetails, 'hbList', sedData)
if (sedData.length === 0) { if (sedData.length === 0) {
console.log('== 子单删除完毕 ==') // console.log('== ==')
this.Showtabs = false this.Showtabs = false
this.tabActiveKey = '1' this.tabActiveKey = '1'
} }

@ -333,7 +333,7 @@ export default {
}, },
computed: { computed: {
locaService() { locaService() {
if (!this.details) { if (!this.details || Object.keys(this.details).length === 0) {
return [] return []
} }
return this.details.item.map((item, index) => { return this.details.item.map((item, index) => {

Loading…
Cancel
Save