szh_zidingyibiaoti
张同海 2 years ago
commit 7e34b985dd

@ -88,8 +88,8 @@
@changeDetail="changeDetailFun" @changeDetail="changeDetailFun"
@changeTotal="changeTotalFun" @changeTotal="changeTotalFun"
@changeCtnInfo="changeCtnInfoFun" @changeCtnInfo="changeCtnInfoFun"
v-if="!inPageLoading"
></goodsTable> ></goodsTable>
<!-- v-if="!inPageLoading" -->
</div> </div>
</div> </div>
<div id="tab-content2" class="tab-content" v-show="mainOrderActiveKey === '2-2'"> <div id="tab-content2" class="tab-content" v-show="mainOrderActiveKey === '2-2'">
@ -614,6 +614,7 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange }) this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
console.log('== details 发生变化 - 路由变化1 ==')
this.inChildLoading = false this.inChildLoading = false
}, 500) }, 500)
this.$forceUpdate() this.$forceUpdate()
@ -659,6 +660,7 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange }) this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
console.log('== details 发生变化 - 路由变化2 ==')
this.inChildLoading = false this.inChildLoading = false
}, 500) }, 500)
this.$forceUpdate() this.$forceUpdate()
@ -721,7 +723,8 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange }) this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
console.log(`详情历史改变数据:${detailsChange} 分单历史改变数据: ${hbListChange}`) console.log('== details 发生变化 - 路由变化3 ==')
// console.log(`${detailsChange} : ${hbListChange}`)
this.inChildLoading = false this.inChildLoading = false
}, 500) }, 500)
this.$forceUpdate() this.$forceUpdate()
@ -744,6 +747,7 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange }) this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false this.inChildLoading = false
console.log('== details 发生变化 - 路由变化4 ==')
}, 500) }, 500)
} }
this.$refs.basicInfo.$refs.basicFrom.clearValidate() this.$refs.basicInfo.$refs.basicFrom.clearValidate()
@ -1064,10 +1068,14 @@ 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, ...newData, ...{ bookingEDIExt: $BookingEDIExt } }) this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...newData, ...{ bookingEDIExt: $BookingEDIExt } })
this.inPageLoading = false
this.getDefaultVal() this.getDefaultVal()
this.inPageLoading = false
setTimeout(() => { setTimeout(() => {
this.checkSaveFun({ type: 'details', hasChange: false }) //
setTimeout(() => {
this.checkSaveFun({ type: 'details', hasChange: false })
console.log('== details 发生变化 - 加载完成 ==')
}, 1200)
this.detailsLoadOver = true this.detailsLoadOver = true
this.inChildLoading = false this.inChildLoading = false
this.$message.success({ content: '加载完成' }) this.$message.success({ content: '加载完成' })
@ -1111,6 +1119,7 @@ export default {
const { detail, type } = data const { detail, type } = data
if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) { if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) {
this.checkSaveFun({ type: 'details', hasChange: true }) this.checkSaveFun({ type: 'details', hasChange: true })
console.log('== details 发生变化 - changeDetailFun ==', data)
} }
this.bookingDetails = detail this.bookingDetails = detail
}, },
@ -1481,6 +1490,7 @@ export default {
}, 200) }, 200)
}, },
changeHBFun(data) { changeHBFun(data) {
console.log('== details 发生变化 - changeHBFun ==')
const arr = [] const arr = []
data.map((item, index) => { data.map((item, index) => {
arr.push(item.isNoSave) arr.push(item.isNoSave)
@ -1493,6 +1503,7 @@ export default {
} }
}, },
checkSaveFun(data) { checkSaveFun(data) {
console.log('== details 发生变化 - 保存 ==', data, this.inGoodsSave, this.detailsLoadOver)
if (this.inGoodsSave) { if (this.inGoodsSave) {
return false return false
} }
@ -1509,6 +1520,7 @@ export default {
} }
this.$set(lastPages, key, $data) this.$set(lastPages, key, $data)
this.setNeedSavePages(lastPages) this.setNeedSavePages(lastPages)
console.log('保存信息设置完成', this.needSavePages)
}, },
inGoodsSaveFun(data) { inGoodsSaveFun(data) {
this.inGoodsSave = data this.inGoodsSave = data

@ -291,30 +291,47 @@ export default {
}) })
}, },
completeChange (value) { completeChange (value) {
const val = value ? value.split('-')[1] : ''
let res = val || value || ''
console.log('== 模糊搜索中 ==', value, val, res)
this.$emit('change', { this.$emit('change', {
form: this.labelData, form: this.labelData,
value: value || '' value: val || value || ''
}) })
console.log(value, this.value)
this.$emit('getCompleteList', { this.$emit('getCompleteList', {
form: this.labelData, form: this.labelData,
value: value || '' value: value.includes('-') ? val || '' : value || ''
}) })
}, },
completeChangeFirst (value) { completeChangeFirst (value) {
console.log('点击:', value)
if (this.value) { return false } if (this.value) { return false }
// console.log(this.type, this.bookingInitData)
// console.log(this.type, this.bookingInitData) let label, arr;
// const label = this.labelData.label.toLowerCase() if (['CUSTOMERNAME', 'FORWARDER', 'SALE', 'CUSTSERVICE', 'OP', 'DOC', 'ROUTE', 'PAYABLEAT', 'ISSUEPLACE', 'PREPARDAT', 'SERVICE', 'TRUCKER', 'SHIPAGENCY', 'CUSTOMSER'].includes(this.labelData.label)) {
// const arr = this.bookingInitData[`${label}InitList`] label = this.labelData.label.toLowerCase()
// if (arr.length > 0) { arr = this.bookingInitData[`${label}InitList`]
// this.dataSourceList = arr } else if (['PORTDISCHARGE', 'PORTLOAD', 'PLACERECEIPT', 'DESTINATION', 'PLACEDELIVERY'].includes(this.labelData.label)) {
// } else { label = this.labelData.label.toLowerCase() + 'id'
arr = this.bookingInitData[`${label}InitList`]
} else if (['PLACERECEIPT', 'DESTINATION', 'PLACEDELIVERY'].includes(this.labelData.label)) {
label = this.labelData.label.toLowerCase() + 'name'
arr = this.bookingInitData[`${label}InitList`]
} else if (this.labelData.label === 'AGENTID') {
label = 'agentname'
arr = this.bookingInitData[`${label}InitList`]
} else {
label = ''
arr = []
}
if (arr.length > 0) {
this.dataSourceList = arr
} else {
this.$emit('getCompleteList', { this.$emit('getCompleteList', {
form: this.labelData, form: this.labelData,
value: value || '' value: value || ''
}) })
// } }
}, },
inputChange (data) { inputChange (data) {
this.changeInput(data) this.changeInput(data)

Loading…
Cancel
Save