|
|
|
@ -419,14 +419,13 @@ export default {
|
|
|
|
|
tableRules: rules.tableRules,
|
|
|
|
|
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) {
|
|
|
|
|
},
|
|
|
|
|
handler(nval, oval) {},
|
|
|
|
|
deep: true
|
|
|
|
|
},
|
|
|
|
|
editDetails: {
|
|
|
|
@ -470,7 +469,7 @@ export default {
|
|
|
|
|
if (Object.keys(data).length > 0) {
|
|
|
|
|
this.sedOrderList = JSON.parse(JSON.stringify(data))
|
|
|
|
|
} else {
|
|
|
|
|
this.sedOrderList = []
|
|
|
|
|
this.sedOrderList = []
|
|
|
|
|
}
|
|
|
|
|
// else if (this.parSedOrderList.length > 0) {
|
|
|
|
|
// this.sedOrderList = JSON.parse(JSON.stringify(this.parSedOrderList))
|
|
|
|
@ -581,7 +580,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
changeDetailFun(data) {
|
|
|
|
|
// console.log('== 分单改变2 load ==', this.inSave, this.inSecLoad)
|
|
|
|
|
if (this.inSave || this.inSecLoad || this.sedOrderList.length === 0) { return false }
|
|
|
|
|
if (this.inSave || this.inSecLoad || this.sedOrderList.length === 0) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
const { detail, type } = data
|
|
|
|
|
if (!detail.bookingEDIExt) {
|
|
|
|
|
detail.bookingEDIExt = bookingEDIExt
|
|
|
|
@ -758,32 +759,33 @@ export default {
|
|
|
|
|
changeParentTabs(type) {
|
|
|
|
|
this.mainOrderActiveKey = type
|
|
|
|
|
},
|
|
|
|
|
removeSedOrderFun (data, index) {
|
|
|
|
|
removeSedOrderFun(data, index) {
|
|
|
|
|
this.deleteBookingOrder(data.id, index)
|
|
|
|
|
},
|
|
|
|
|
removeFun () {
|
|
|
|
|
removeFun() {
|
|
|
|
|
this.deleteBookingOrder(this.editDetails.id, this.editIndex)
|
|
|
|
|
},
|
|
|
|
|
deleteBookingOrder (id, index) {
|
|
|
|
|
deleteBookingOrder(id, index) {
|
|
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
|
|
if (id == 0) {
|
|
|
|
|
this.removeSucc(id, index)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
this.inSecLoad = true
|
|
|
|
|
DeleteBookingOrder([id].toString()).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
this.removeSucc(id, index)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
DeleteBookingOrder([id].toString())
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
this.removeSucc(id, index)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
removeSucc (id, index) {
|
|
|
|
|
removeSucc(id, index) {
|
|
|
|
|
const removeIndex = index
|
|
|
|
|
this.sedOrderList.splice(removeIndex, 1)
|
|
|
|
|
this.$emit('sedOrderRemove', this.sedOrderList)
|
|
|
|
@ -804,7 +806,7 @@ export default {
|
|
|
|
|
}, 200)
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
cancelRemove () {
|
|
|
|
|
cancelRemove() {
|
|
|
|
|
console.log('== 取消删除 ==')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|