|
|
@@ -746,6 +746,7 @@ export default {
|
|
|
* @date : 2023-05-12 10:22
|
|
|
*/
|
|
|
mergeLogoColour() {
|
|
|
+ let flag = false
|
|
|
let list = this.descartes(this.defLogoList.filter(f => this.erpLogo.indexOf(f.logoId) > -1),
|
|
|
this.defColourList.filter(f => this.erpColour.indexOf(f.colourId) > -1))
|
|
|
if (this.formData.erpList[this.formData.erpList.length - 1] &&
|
|
|
@@ -753,15 +754,24 @@ export default {
|
|
|
!this.formData.erpList[this.formData.erpList.length - 1].colourId &&
|
|
|
!this.formData.erpList[this.formData.erpList.length - 1].erpSkuId
|
|
|
) {
|
|
|
- this.formData.erpList.splice(this.formData.erpList.length - 1, 1)
|
|
|
+ flag = true
|
|
|
+ // this.formData.erpList.splice(this.formData.erpList.length - 1, 1)
|
|
|
}
|
|
|
for (let it of list) {
|
|
|
it = Object.assign(it[0], it[1])
|
|
|
if (!this.formData.erpList.some(s => (s.logoId + '-' + s.colourId) == (it.logoId + '-' + it.colourId))) {
|
|
|
- this.formData.erpList.push({
|
|
|
+ let obj = {
|
|
|
logoId: it.logoId,
|
|
|
colourId: it.colourId
|
|
|
- })
|
|
|
+ }
|
|
|
+ if (flag) {
|
|
|
+ this.$set(this.formData.erpList, this.formData.erpList.length - 1, Object.assign(obj, this.formData.erpList[this.formData.erpList.length - 1]))
|
|
|
+ // this.formData.erpList[this.formData.erpList.length - 1] = Object.assign(obj, this.formData.erpList[this.formData.erpList.length - 1])
|
|
|
+ flag = false
|
|
|
+ } else {
|
|
|
+ this.formData.erpList.push(obj)
|
|
|
+ }
|
|
|
+ console.log(this.formData.erpList)
|
|
|
}
|
|
|
}
|
|
|
},
|