|
@@ -12,8 +12,8 @@
|
|
<div>
|
|
<div>
|
|
<a-checkbox :checked="checkAll" :disabled="disabledList.length>0" @change="onCheckAllChange">全选</a-checkbox>
|
|
<a-checkbox :checked="checkAll" :disabled="disabledList.length>0" @change="onCheckAllChange">全选</a-checkbox>
|
|
<span v-if="pageType==='1'">
|
|
<span v-if="pageType==='1'">
|
|
- <a-checkbox :checked="checkOwn" :disabled="disabledList.length>0" @change="onCheckOwnChange">自主品牌</a-checkbox>
|
|
|
|
- <a-checkbox :checked="checkAgent" :disabled="disabledList.length>0" @change="onCheckAgentChange">代理品牌</a-checkbox>
|
|
|
|
|
|
+ <a-checkbox :checked="checkOwn" @change="onCheckOwnChange">自主品牌</a-checkbox>
|
|
|
|
+ <a-checkbox :checked="checkAgent" @change="onCheckAgentChange">代理品牌</a-checkbox>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<a-divider />
|
|
<a-divider />
|
|
@@ -142,12 +142,38 @@ export default {
|
|
if (e.target.checked) {
|
|
if (e.target.checked) {
|
|
this.checkedList = []
|
|
this.checkedList = []
|
|
this.checkedRowList = []
|
|
this.checkedRowList = []
|
|
- this.brandList.map(item => {
|
|
|
|
|
|
+ this.brandList.forEach(item => {
|
|
if (item.brandType == 1) {
|
|
if (item.brandType == 1) {
|
|
_this.checkedList.push(item.brandSn)
|
|
_this.checkedList.push(item.brandSn)
|
|
_this.checkedRowList.push(item)
|
|
_this.checkedRowList.push(item)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ if (_this.disabledList && _this.disabledList.length > 0) {
|
|
|
|
+ _this.checkedRowList.forEach(con => {
|
|
|
|
+ const pos = _this.disabledList.findIndex(list => { con.brandSn == list })
|
|
|
|
+ if (pos != -1) {
|
|
|
|
+ _this.checkedList.splice(pos, 1)
|
|
|
|
+ _this.checkedRowList.splice(pos, 1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (_this.chooseData && _this.chooseData.length > 0) {
|
|
|
|
+ const arr = []
|
|
|
|
+ _this.chooseData.forEach(con => {
|
|
|
|
+ const pos = _this.disabledList.findIndex(list => { list == con.goodsSn })
|
|
|
|
+ _this.checkedList.push(_this.disabledList[pos])
|
|
|
|
+ arr.push(_this.disabledList[pos])
|
|
|
|
+ })
|
|
|
|
+ this.brandList.forEach(newCon => {
|
|
|
|
+ if (arr.length > 0) {
|
|
|
|
+ arr.forEach(newItem => {
|
|
|
|
+ if (newItem === newCon.brandSn) {
|
|
|
|
+ _this.checkedRowList.push(newCon)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
const noArr = this.getDifferData(this.checkedList, this.brandOwnList)
|
|
const noArr = this.getDifferData(this.checkedList, this.brandOwnList)
|
|
_this.checkedList = noArr
|
|
_this.checkedList = noArr
|
|
@@ -217,10 +243,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// this.$forceUpdate()
|
|
// this.$forceUpdate()
|
|
- },
|
|
|
|
- // 获取品牌长度
|
|
|
|
- getAllBrandLength () {
|
|
|
|
- return this.brandList.length
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|