diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue
index a95800d..564cce8 100644
--- a/src/views/main/BookingLedger/detail/index.vue
+++ b/src/views/main/BookingLedger/detail/index.vue
@@ -88,8 +88,8 @@
@changeDetail="changeDetailFun"
@changeTotal="changeTotalFun"
@changeCtnInfo="changeCtnInfoFun"
- v-if="!inPageLoading"
>
+
@@ -614,6 +614,7 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
+ console.log('== details 发生变化 - 路由变化1 ==')
this.inChildLoading = false
}, 500)
this.$forceUpdate()
@@ -659,6 +660,7 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
+ console.log('== details 发生变化 - 路由变化2 ==')
this.inChildLoading = false
}, 500)
this.$forceUpdate()
@@ -721,7 +723,8 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
- console.log(`详情历史改变数据:${detailsChange}, 分单历史改变数据: ${hbListChange}`)
+ console.log('== details 发生变化 - 路由变化3 ==')
+ // console.log(`详情历史改变数据:${detailsChange}, 分单历史改变数据: ${hbListChange}`)
this.inChildLoading = false
}, 500)
this.$forceUpdate()
@@ -744,6 +747,7 @@ export default {
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
+ console.log('== details 发生变化 - 路由变化4 ==')
}, 500)
}
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
@@ -1064,10 +1068,14 @@ export default {
}
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt }
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...newData, ...{ bookingEDIExt: $BookingEDIExt } })
- this.inPageLoading = false
this.getDefaultVal()
+ this.inPageLoading = false
setTimeout(() => {
- this.checkSaveFun({ type: 'details', hasChange: false })
+ // 问题在这里呦
+ setTimeout(() => {
+ this.checkSaveFun({ type: 'details', hasChange: false })
+ console.log('== details 发生变化 - 加载完成 ==')
+ }, 1200)
this.detailsLoadOver = true
this.inChildLoading = false
this.$message.success({ content: '加载完成' })
@@ -1111,6 +1119,7 @@ export default {
const { detail, type } = data
if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) {
this.checkSaveFun({ type: 'details', hasChange: true })
+ console.log('== details 发生变化 - changeDetailFun ==', data)
}
this.bookingDetails = detail
},
@@ -1481,6 +1490,7 @@ export default {
}, 200)
},
changeHBFun(data) {
+ console.log('== details 发生变化 - changeHBFun ==')
const arr = []
data.map((item, index) => {
arr.push(item.isNoSave)
@@ -1493,6 +1503,7 @@ export default {
}
},
checkSaveFun(data) {
+ console.log('== details 发生变化 - 保存 ==', data, this.inGoodsSave, this.detailsLoadOver)
if (this.inGoodsSave) {
return false
}
@@ -1509,6 +1520,7 @@ export default {
}
this.$set(lastPages, key, $data)
this.setNeedSavePages(lastPages)
+ console.log('保存信息设置完成', this.needSavePages)
},
inGoodsSaveFun(data) {
this.inGoodsSave = data
diff --git a/src/views/main/BookingLedger/list/modules/formLabel.vue b/src/views/main/BookingLedger/list/modules/formLabel.vue
index 2b0cfd3..ae4f55a 100644
--- a/src/views/main/BookingLedger/list/modules/formLabel.vue
+++ b/src/views/main/BookingLedger/list/modules/formLabel.vue
@@ -291,30 +291,47 @@ export default {
})
},
completeChange (value) {
+ const val = value ? value.split('-')[1] : ''
+ let res = val || value || ''
+ console.log('== 模糊搜索中 ==', value, val, res)
this.$emit('change', {
form: this.labelData,
- value: value || ''
+ value: val || value || ''
})
- console.log(value, this.value)
this.$emit('getCompleteList', {
form: this.labelData,
- value: value || ''
+ value: value.includes('-') ? val || '' : value || ''
})
},
completeChangeFirst (value) {
+ console.log('点击:', value)
if (this.value) { return false }
- // 这里未完成,先改用户问题
- // console.log(this.type, this.bookingInitData)
- // const label = this.labelData.label.toLowerCase()
- // const arr = this.bookingInitData[`${label}InitList`]
- // if (arr.length > 0) {
- // this.dataSourceList = arr
- // } else {
+ console.log(this.type, this.bookingInitData)
+ let label, arr;
+ if (['CUSTOMERNAME', 'FORWARDER', 'SALE', 'CUSTSERVICE', 'OP', 'DOC', 'ROUTE', 'PAYABLEAT', 'ISSUEPLACE', 'PREPARDAT', 'SERVICE', 'TRUCKER', 'SHIPAGENCY', 'CUSTOMSER'].includes(this.labelData.label)) {
+ label = this.labelData.label.toLowerCase()
+ arr = this.bookingInitData[`${label}InitList`]
+ } else if (['PORTDISCHARGE', 'PORTLOAD', 'PLACERECEIPT', 'DESTINATION', 'PLACEDELIVERY'].includes(this.labelData.label)) {
+ 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', {
form: this.labelData,
value: value || ''
})
- // }
+ }
},
inputChange (data) {
this.changeInput(data)