|
|
|
@ -237,7 +237,7 @@ export default {
|
|
|
|
|
isCopy: this.$route.query.isCopy || false,
|
|
|
|
|
inPageLoading: false,
|
|
|
|
|
// bookingDetails: {},
|
|
|
|
|
bookingDetails: initDetail,
|
|
|
|
|
bookingDetails: JSON.parse(JSON.stringify(initDetail)),
|
|
|
|
|
tabBarStyle: {
|
|
|
|
|
background: '#fff',
|
|
|
|
|
padding: '0 20px'
|
|
|
|
@ -314,6 +314,18 @@ export default {
|
|
|
|
|
id: this.id
|
|
|
|
|
}
|
|
|
|
|
this.$set(this.historyData, `copy-${this.id}`, hisData)
|
|
|
|
|
} else if (this.$route.query.addNum) {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: this.bookingDetails,
|
|
|
|
|
excuteRules: this.excuteRules,
|
|
|
|
|
excuteRulesType: this.excuteRulesType,
|
|
|
|
|
isAdd: this.isAdd,
|
|
|
|
|
tabActiveKey: this.tabActiveKey,
|
|
|
|
|
type: this.type,
|
|
|
|
|
isCopy: this.isCopy
|
|
|
|
|
// id: this.id
|
|
|
|
|
}
|
|
|
|
|
this.$set(this.historyData, `add-${this.$route.query.addNum}`, hisData)
|
|
|
|
|
} else {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: this.bookingDetails,
|
|
|
|
@ -359,6 +371,18 @@ export default {
|
|
|
|
|
id: this.id
|
|
|
|
|
}
|
|
|
|
|
this.$set(this.historyData, `copy-${this.id}`, hisData)
|
|
|
|
|
} else if (this.$route.query.addNum) {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: this.bookingDetails,
|
|
|
|
|
excuteRules: this.excuteRules,
|
|
|
|
|
excuteRulesType: this.excuteRulesType,
|
|
|
|
|
isAdd: this.isAdd,
|
|
|
|
|
tabActiveKey: this.tabActiveKey,
|
|
|
|
|
type: this.type,
|
|
|
|
|
isCopy: this.isCopy
|
|
|
|
|
// id: this.id
|
|
|
|
|
}
|
|
|
|
|
this.$set(this.historyData, `add-${this.$route.query.addNum}`, hisData)
|
|
|
|
|
} else {
|
|
|
|
|
const hisData = {
|
|
|
|
|
bookingDetails: this.bookingDetails,
|
|
|
|
@ -410,6 +434,27 @@ export default {
|
|
|
|
|
}, 1500)
|
|
|
|
|
// console.log('== 复制参数 ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else if (Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) && this.$route.query.addNum) {
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[`add-${this.$route.query.addNum}`]))
|
|
|
|
|
this.bookingDetails = $data.bookingDetails
|
|
|
|
|
this.excuteRules = $data.excuteRules
|
|
|
|
|
this.excuteRulesType = $data.excuteRulesType
|
|
|
|
|
this.isAdd = $data.isAdd
|
|
|
|
|
this.tabActiveKey = $data.tabActiveKey
|
|
|
|
|
this.isCopy = this.$route.query.isCopy
|
|
|
|
|
this.inPageLoading = false
|
|
|
|
|
// console.log('== 复制参数 ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
|
|
|
|
|
if (this.isCopy && !$data.isCopy) {
|
|
|
|
|
// console.log('== 新增复制, 这里置空了提单号 ==')
|
|
|
|
|
this.bookingDetails.mblno = ''
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inChildLoading = false
|
|
|
|
|
if (!Object.keys(this.needSavePages).includes(this.$route.fullPath)) {
|
|
|
|
|
this.checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
}
|
|
|
|
|
}, 1500)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else if (Object.keys(this.historyData).includes(newId)) {
|
|
|
|
|
this.id = this.$route.query.id
|
|
|
|
|
const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
|
|
|
|
@ -442,7 +487,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
init() {
|
|
|
|
|
this.bookingDetails = initDetail
|
|
|
|
|
this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
|
|
|
|
|
this.excuteRules = []
|
|
|
|
|
this.excuteRulesType = ''
|
|
|
|
|
this.Showtabs = false
|
|
|
|
@ -615,6 +660,7 @@ export default {
|
|
|
|
|
this.isAdd = false
|
|
|
|
|
this.id = res.data
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
name: 'BookingDetail',
|
|
|
|
|
query: {
|
|
|
|
|