|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
:animated="Object.keys($refs).includes('sedOrder') ? false : true"
|
|
|
|
|
@change="changeTab"
|
|
|
|
|
>
|
|
|
|
|
<a-tab-pane key="1" tab="主单信息">
|
|
|
|
|
<a-tab-pane key="1" tab="主单信息" :forceRender="true">
|
|
|
|
|
<a-row :gutter="24">
|
|
|
|
|
<a-col :span="18" class="left-box" style="padding-right:0;">
|
|
|
|
|
<template>
|
|
|
|
@ -124,7 +124,7 @@
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-tab-pane>
|
|
|
|
|
<a-tab-pane key="2" tab="分单信息" v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0">
|
|
|
|
|
<a-tab-pane key="2" tab="分单信息" :forceRender="true" v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0">
|
|
|
|
|
<sedOrder
|
|
|
|
|
ref="sedOrder"
|
|
|
|
|
:details="bookingDetails"
|
|
|
|
@ -417,7 +417,8 @@ export default {
|
|
|
|
|
hasEdiRules: false,
|
|
|
|
|
tableRules: rules.tableRules,
|
|
|
|
|
hasTableRules: false,
|
|
|
|
|
inAddSave: false
|
|
|
|
|
inAddSave: false,
|
|
|
|
|
hasHbList: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
@ -456,7 +457,6 @@ export default {
|
|
|
|
|
const secActive = this.$refs.sedOrder.$data.editIndex
|
|
|
|
|
hisData.secActive = secActive
|
|
|
|
|
}
|
|
|
|
|
console.log('== 切路由设置数据 1. ==', hisData)
|
|
|
|
|
this.$set(this.historyData, `copy-${this.id}`, hisData)
|
|
|
|
|
} else if (this.$route.query.addNum) {
|
|
|
|
|
const hisData = {
|
|
|
|
@ -474,7 +474,6 @@ export default {
|
|
|
|
|
const secActive = this.$refs.sedOrder.$data.editIndex
|
|
|
|
|
hisData.secActive = secActive
|
|
|
|
|
}
|
|
|
|
|
console.log('== 切路由设置数据 2. ==', hisData)
|
|
|
|
|
this.$set(this.historyData, `add-${this.$route.query.addNum}`, hisData)
|
|
|
|
|
} else {
|
|
|
|
|
const hisData = {
|
|
|
|
@ -492,7 +491,6 @@ export default {
|
|
|
|
|
const secActive = this.$refs.sedOrder.$data.editIndex
|
|
|
|
|
hisData.secActive = secActive
|
|
|
|
|
}
|
|
|
|
|
console.log('== 切路由设置数据 3. ==', hisData)
|
|
|
|
|
this.$set(this.historyData, this.id, hisData)
|
|
|
|
|
}
|
|
|
|
|
next()
|
|
|
|
@ -518,7 +516,6 @@ export default {
|
|
|
|
|
const secActive = this.$refs.sedOrder.$data.editIndex
|
|
|
|
|
hisData.secActive = secActive
|
|
|
|
|
}
|
|
|
|
|
console.log('== 离开路由设置数据 1. ==', hisData)
|
|
|
|
|
this.$set(this.historyData, `copy-${this.id}`, hisData)
|
|
|
|
|
} else if (this.$route.query.addNum) {
|
|
|
|
|
const hisData = {
|
|
|
|
@ -536,7 +533,6 @@ export default {
|
|
|
|
|
const secActive = this.$refs.sedOrder.$data.editIndex
|
|
|
|
|
hisData.secActive = secActive
|
|
|
|
|
}
|
|
|
|
|
console.log('== 离开路由设置数据 2. ==', hisData)
|
|
|
|
|
this.$set(this.historyData, `add-${this.$route.query.addNum}`, hisData)
|
|
|
|
|
} else {
|
|
|
|
|
const hisData = {
|
|
|
|
@ -554,7 +550,6 @@ export default {
|
|
|
|
|
const secActive = this.$refs.sedOrder.$data.editIndex
|
|
|
|
|
hisData.secActive = secActive
|
|
|
|
|
}
|
|
|
|
|
console.log('== 离开路由设置数据 3. ==', hisData)
|
|
|
|
|
this.$set(this.historyData, this.id, hisData)
|
|
|
|
|
}
|
|
|
|
|
if (this.hasbookingDetail) {
|
|
|
|
@ -587,20 +582,19 @@ export default {
|
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
|
this.inPageLoading = false
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
console.log('== 1. 获取切换数据 ==', this.bookingDetails.hbList.length)
|
|
|
|
|
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
|
|
|
|
|
this.Showtabs = true
|
|
|
|
|
if (this.tabActiveKey === '2') {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
}, 200)
|
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.Showtabs = false
|
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
|
this.$refs.sedOrder.init([])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// console.log('== 1. 设置主单保存数据 - false ==')
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
@ -622,20 +616,19 @@ export default {
|
|
|
|
|
this.bookingDetails.mblno = ''
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
console.log('== 2. 获取切换数据 ==', this.bookingDetails.hbList.length)
|
|
|
|
|
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
|
|
|
|
|
this.Showtabs = true
|
|
|
|
|
if (this.tabActiveKey === '2') {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
}, 200)
|
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.Showtabs = false
|
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
|
this.$refs.sedOrder.init([])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// console.log('== 2. 设置主单保存数据 - false ==')
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
@ -652,23 +645,22 @@ export default {
|
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
|
this.inPageLoading = false
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
console.log('== 3. 获取切换数据 ==', this.bookingDetails.hbList.length)
|
|
|
|
|
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
|
|
|
|
|
this.Showtabs = true
|
|
|
|
|
if (this.tabActiveKey === '2') {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
}, 200)
|
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.Showtabs = false
|
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
|
this.$refs.sedOrder.init([])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
|
this.bookingDetails.mblno = ''
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// console.log('== 3. 设置主单保存数据 - false ==')
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
@ -681,9 +673,7 @@ export default {
|
|
|
|
|
this.mainOrderActiveKey = '1-1'
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
this.init()
|
|
|
|
|
console.log('== 4. 新建 ==')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// console.log('== 4. 设置主单保存数据 - false ==')
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
}, 500)
|
|
|
|
@ -707,6 +697,9 @@ export default {
|
|
|
|
|
this.isAdd = true
|
|
|
|
|
this.bookingDetails.carrierid = this.type
|
|
|
|
|
this.bookingDetails.carrier = this.type
|
|
|
|
|
if (Object.keys(this.$refs).includes('sedOrder')) {
|
|
|
|
|
this.$refs.sedOrder.init([])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.getDjyTenantConfig()
|
|
|
|
|
},
|
|
|
|
@ -879,6 +872,12 @@ export default {
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
this.$message.success({ content: '加载完成' })
|
|
|
|
|
if (!this.hasHbList && this.bookingDetails.hbList.length > 0) {
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
this.hasHbList = true
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs.sedOrder.init([])
|
|
|
|
|
}
|
|
|
|
|
}, 1200)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
@ -1260,7 +1259,7 @@ export default {
|
|
|
|
|
this.tabActiveKey = '2'
|
|
|
|
|
this.Showtabs = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$refs.sedOrder.init(data.hbList)
|
|
|
|
|
this.$refs.sedOrder.init(this.bookingDetails.hbList)
|
|
|
|
|
}, 200)
|
|
|
|
|
},
|
|
|
|
|
// 修改
|
|
|
|
|