|
|
|
@ -370,12 +370,15 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
hasTableRules: false,
|
|
|
|
|
inSave: false,
|
|
|
|
|
sedOrderList: JSON.parse(JSON.stringify(this.parSedOrderList)) || []
|
|
|
|
|
sedOrderList: JSON.parse(JSON.stringify(this.parSedOrderList)) || [],
|
|
|
|
|
// inLoading: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
parSedOrderList: {
|
|
|
|
|
handler(nval, oval) {
|
|
|
|
|
// this.inLoading = true
|
|
|
|
|
this.inSecLoad = true
|
|
|
|
|
const _data = JSON.parse(JSON.stringify(nval))
|
|
|
|
|
if (_data.length > 0) {
|
|
|
|
|
if (!_data[this.editIndex].bookingEDIExt) {
|
|
|
|
@ -387,12 +390,14 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.editDetails = _data[this.editIndex]
|
|
|
|
|
this.inSecLoad = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inSecLoad = false
|
|
|
|
|
}, 200)
|
|
|
|
|
}, 1500)
|
|
|
|
|
} else {
|
|
|
|
|
this.editDetails = null
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inSecLoad = false
|
|
|
|
|
}, 1500)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
deep: true
|
|
|
|
@ -426,7 +431,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
editDetails: {
|
|
|
|
|
handler(nval, oval) {
|
|
|
|
|
if (!this.inSave) {
|
|
|
|
|
if (!this.inSave && !this.inSecLoad) {
|
|
|
|
|
this.$emit('changeHB', this.sedOrderList)
|
|
|
|
|
}
|
|
|
|
|
// if (nval !== oval) {
|
|
|
|
@ -441,6 +446,7 @@ export default {
|
|
|
|
|
immediate: true,
|
|
|
|
|
handler(nD, oD) {
|
|
|
|
|
this.id = this.$route.query.id
|
|
|
|
|
this.init()
|
|
|
|
|
if (this.$refs.basicInfo) {
|
|
|
|
|
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
|
|
|
|
|
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
|
|
|
|
@ -455,30 +461,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
if (this.parSedOrderList.length > 0) {
|
|
|
|
|
this.sedOrderList = JSON.parse(JSON.stringify(this.parSedOrderList))
|
|
|
|
|
this.sedOrderList.map((item, index) => {
|
|
|
|
|
item.isNoSave = false
|
|
|
|
|
// console.log('初始获取列表,保存状态', index, item.isNoSave)
|
|
|
|
|
})
|
|
|
|
|
const data = JSON.parse(JSON.stringify(this.sedOrderList[0]))
|
|
|
|
|
if (!data.bookingEDIExt) {
|
|
|
|
|
data.bookingEDIExt = {
|
|
|
|
|
weiTuoFang: '',
|
|
|
|
|
ediAttn: '',
|
|
|
|
|
ediAttnTel: '',
|
|
|
|
|
ediAttnMail: ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.editDetails = data
|
|
|
|
|
// console.log('当前编辑中分单保存信息:', this.editDetails.isNoSave)
|
|
|
|
|
this.inSecLoad = true
|
|
|
|
|
// console.log('分单加载中', this.inSecLoad)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inSecLoad = false
|
|
|
|
|
// console.log('分单加载完成', this.inSecLoad)
|
|
|
|
|
}, 200)
|
|
|
|
|
}
|
|
|
|
|
this.init()
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.checkFromInit()
|
|
|
|
@ -487,6 +470,32 @@ export default {
|
|
|
|
|
// }, 1500)
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
init() {
|
|
|
|
|
if (this.parSedOrderList.length > 0) {
|
|
|
|
|
this.sedOrderList = JSON.parse(JSON.stringify(this.parSedOrderList))
|
|
|
|
|
this.sedOrderList.map((item, index) => {
|
|
|
|
|
item.isNoSave = false
|
|
|
|
|
// console.log('初始获取列表,保存状态', index, item.isNoSave)
|
|
|
|
|
})
|
|
|
|
|
const data = JSON.parse(JSON.stringify(this.sedOrderList[0]))
|
|
|
|
|
if (!data.bookingEDIExt) {
|
|
|
|
|
data.bookingEDIExt = {
|
|
|
|
|
weiTuoFang: '',
|
|
|
|
|
ediAttn: '',
|
|
|
|
|
ediAttnTel: '',
|
|
|
|
|
ediAttnMail: ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.editDetails = data
|
|
|
|
|
// console.log('当前编辑中分单保存信息:', this.editDetails.isNoSave)
|
|
|
|
|
this.inSecLoad = true
|
|
|
|
|
// console.log('分单加载中', this.inSecLoad)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inSecLoad = false
|
|
|
|
|
// console.log('分单加载完成', this.inSecLoad)
|
|
|
|
|
}, 200)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
checkFromInit() {
|
|
|
|
|
Object.keys(this.basicRules).map((item, index) => {
|
|
|
|
|
if (this.checkFrom.includes(item)) {
|
|
|
|
@ -612,10 +621,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
FnBookingOrderGet() {
|
|
|
|
|
BookingOrderGet({
|
|
|
|
|
id: this.id
|
|
|
|
|
id: this.editDetails.id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.sedOrderList = { ...res.data.hbList }
|
|
|
|
|
this.editDetails = { ...res.data.hbList[this.editIndex] }
|
|
|
|
|
this.sedOrderList.splice(this.editIndex, 1, res.data)
|
|
|
|
|
// console.log(this.sedOrderList)
|
|
|
|
|
this.editDetails = res.data
|
|
|
|
|
this.$emit('changeHB', this.sedOrderList)
|
|
|
|
|
console.log('== 测试点1,调用更新 ==', this.editDetails)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -704,6 +716,7 @@ export default {
|
|
|
|
|
this.$set(this.sedOrderList[this.editIndex], 'isNoSave', false)
|
|
|
|
|
this.$set(this.editDetails, 'isNoSave', false)
|
|
|
|
|
this.$emit('changeHB', this.sedOrderList)
|
|
|
|
|
console.log('== 测试点3,调用更新 ==', this.sedOrderList)
|
|
|
|
|
// console.log(`2. == 保存, 当前id ==${res.data} , 是否已保存:${this.sedOrderList[this.editIndex].isNoSave}`)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inSave = false
|
|
|
|
|