|
@@ -326,15 +326,17 @@ export default {
|
|
|
var flag = false
|
|
|
var c_typeArr = []
|
|
|
this.dataSource.forEach(item => {
|
|
|
- if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
|
|
|
- item.productBrandList.forEach((con) => {
|
|
|
- row.productBrandList.forEach(newCon => {
|
|
|
- if (newCon.productBrandSn == con.productBrandSn) {
|
|
|
- flag = true
|
|
|
- c_typeArr = c_typeArr.concat(item.productTypeList)
|
|
|
- }
|
|
|
+ if (item.dataSourceOrigin === '0') {
|
|
|
+ if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
|
|
|
+ item.productBrandList.forEach((con) => {
|
|
|
+ row.productBrandList.forEach(newCon => {
|
|
|
+ if (newCon.productBrandSn == con.productBrandSn) {
|
|
|
+ flag = true
|
|
|
+ c_typeArr = c_typeArr.concat(item.productTypeList)
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
const disTypeList = []
|
|
@@ -422,17 +424,18 @@ export default {
|
|
|
// 同行中分类是否与所选分类相同 已选分类
|
|
|
var flag = false
|
|
|
var c_brandArr = []
|
|
|
- console.log('111111111111:', this.dataSource)
|
|
|
this.dataSource.forEach(item => {
|
|
|
- if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
|
|
|
- item.productTypeArr.forEach((con) => {
|
|
|
- row.productTypeArr.forEach(newCon => {
|
|
|
- if (newCon.id == con.id) {
|
|
|
- flag = true
|
|
|
- c_brandArr = c_brandArr.concat(item.productBrandList)
|
|
|
- }
|
|
|
+ if (item.dataSourceOrigin === '0') {
|
|
|
+ if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
|
|
|
+ item.productTypeArr.forEach((con) => {
|
|
|
+ row.productTypeArr.forEach(newCon => {
|
|
|
+ if (newCon.id == con.id) {
|
|
|
+ flag = true
|
|
|
+ c_brandArr = c_brandArr.concat(item.productBrandList)
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
const reBrandArr = c_brandArr.map(list => {
|
|
@@ -477,21 +480,23 @@ export default {
|
|
|
const _this = this
|
|
|
const snArr = []
|
|
|
_this.dataSource.forEach(item => {
|
|
|
- if (item.productTypeList && item.productTypeList.length > 0) {
|
|
|
- if (!item.productBrandList || (item.productBrandList && item.productBrandList.length == 0)) {
|
|
|
- item.productTypeList.forEach(con => {
|
|
|
- for (const i in con) {
|
|
|
- const newObj = {
|
|
|
- goodsSn: con[i]
|
|
|
- }
|
|
|
- if (i === 'productTypeSn1') {
|
|
|
- newObj.disabled = true
|
|
|
- } else {
|
|
|
- newObj.disableCheckbox = true
|
|
|
+ if (item.dataSourceOrigin === '0') {
|
|
|
+ if (item.productTypeList && item.productTypeList.length > 0) {
|
|
|
+ if (!item.productBrandList || (item.productBrandList && item.productBrandList.length == 0)) {
|
|
|
+ item.productTypeList.forEach(con => {
|
|
|
+ for (const i in con) {
|
|
|
+ const newObj = {
|
|
|
+ goodsSn: con[i]
|
|
|
+ }
|
|
|
+ if (i === 'productTypeSn1') {
|
|
|
+ newObj.disabled = true
|
|
|
+ } else {
|
|
|
+ newObj.disableCheckbox = true
|
|
|
+ }
|
|
|
+ snArr.push(newObj)
|
|
|
}
|
|
|
- snArr.push(newObj)
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -502,11 +507,13 @@ export default {
|
|
|
const _this = this
|
|
|
var snArr = []
|
|
|
_this.dataSource.forEach(item => {
|
|
|
- if (item.productBrandList && item.productBrandList.length > 0) {
|
|
|
- if (!item.productTypeArr || (item.productTypeArr && item.productTypeArr.length == 0)) {
|
|
|
- item.productBrandList.forEach(con => {
|
|
|
- snArr.push(con.productBrandSn)
|
|
|
- })
|
|
|
+ if (item.dataSourceOrigin === '0') {
|
|
|
+ if (item.productBrandList && item.productBrandList.length > 0) {
|
|
|
+ if (!item.productTypeArr || (item.productTypeArr && item.productTypeArr.length == 0)) {
|
|
|
+ item.productBrandList.forEach(con => {
|
|
|
+ snArr.push(con.productBrandSn)
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -544,20 +551,22 @@ export default {
|
|
|
const _this = this
|
|
|
const snArr = []
|
|
|
_this.dataSource.forEach(item => {
|
|
|
- if (item.productTypeList && item.productTypeList.length > 0) {
|
|
|
- item.productTypeList.forEach(con => {
|
|
|
- for (const i in con) {
|
|
|
- const newObj = {
|
|
|
- goodsSn: con[i]
|
|
|
- }
|
|
|
- if (i === 'productTypeSn1') {
|
|
|
- newObj.disabled = true
|
|
|
- } else {
|
|
|
- newObj.disableCheckbox = true
|
|
|
+ if (item.dataSourceOrigin === '0') {
|
|
|
+ if (item.productTypeList && item.productTypeList.length > 0) {
|
|
|
+ item.productTypeList.forEach(con => {
|
|
|
+ for (const i in con) {
|
|
|
+ const newObj = {
|
|
|
+ goodsSn: con[i]
|
|
|
+ }
|
|
|
+ if (i === 'productTypeSn1') {
|
|
|
+ newObj.disabled = true
|
|
|
+ } else {
|
|
|
+ newObj.disableCheckbox = true
|
|
|
+ }
|
|
|
+ snArr.push(newObj)
|
|
|
}
|
|
|
- snArr.push(newObj)
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
return snArr
|