修改分单

dev
lilu 2 years ago
parent 0bbbc832f1
commit 0d1eaa30c6

@ -111,6 +111,14 @@ export default {
sedOrderList (nval, oval) {
if (nval.length > 0) {
console.log(nval)
if (!nval[this.editIndex].bookingEDIExt) {
nval[this.editIndex].bookingEDIExt = {
weiTuoFang: '',
ediAttn: '',
ediAttnTel: '',
ediAttnMail: ''
}
}
this.editDetails = nval[this.editIndex]
} else {
this.editDetails = null
@ -128,7 +136,16 @@ export default {
},
created() {
if (this.sedOrderList.length > 0) {
this.editDetails = JSON.parse(JSON.stringify(this.sedOrderList[0]))
const data = JSON.parse(JSON.stringify(this.sedOrderList[0]))
if (!data.bookingEDIExt) {
data.bookingEDIExt = {
weiTuoFang: '',
ediAttn: '',
ediAttnTel: '',
ediAttnMail: ''
}
}
this.editDetails = data
}
},
methods: {
@ -242,12 +259,28 @@ export default {
const data = JSON.parse(JSON.stringify(this.details))
data.isNoSave = true
data.hblno = ''
if (!data.bookingEDIExt) {
data.bookingEDIExt = {
weiTuoFang: '',
ediAttn: '',
ediAttnTel: '',
ediAttnMail: ''
}
}
this.editDetails = data
this.editIndex = this.sedOrderList.length
this.sedOrderList.push(data)
},
changeDetailFun (data) {
const { detail, type } = data
if (!detail.bookingEDIExt) {
detail.bookingEDIExt = {
weiTuoFang: '',
ediAttn: '',
ediAttnTel: '',
ediAttnMail: ''
}
}
this.editDetails = detail
this.sedOrderList[this.editIndex] = detail
this.editDetails.isNoSave = true
@ -320,13 +353,30 @@ export default {
// this.$message.error(`${this.editDetails.hblno}`)
// }
this.editIndex = index
this.editDetails = this.sedOrderList[index]
const data = this.sedOrderList[index]
if (!data.bookingEDIExt) {
data.bookingEDIExt = {
weiTuoFang: '',
ediAttn: '',
ediAttnTel: '',
ediAttnMail: ''
}
}
this.editDetails = data
},
copyFun () {
const _data = JSON.parse(JSON.stringify(this.editDetails))
_data.isNoSave = true
_data.hblno = ''
if (!_data.bookingEDIExt) {
_data.bookingEDIExt = {
weiTuoFang: '',
ediAttn: '',
ediAttnTel: '',
ediAttnMail: ''
}
}
this.editDetails = _data
this.editIndex = this.sedOrderList.length
this.sedOrderList.push(_data)

Loading…
Cancel
Save