|
|
@@ -20,12 +20,12 @@
|
|
|
<div style="font-size: 14px">
|
|
|
<span>产品匹配:</span>
|
|
|
<span v-if="store && store.length > 0">
|
|
|
- <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('umall')">
|
|
|
+ <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('umall')" :checked="!this.params.filter.ignoreUMall">
|
|
|
<span v-if="UmallExist"> 库存寄售 </span>
|
|
|
- <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('store')">
|
|
|
+ <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('store')" :checked="!this.params.filter.ignoreStore">
|
|
|
<span v-if="storeExist"> 店铺自营</span>
|
|
|
</span>
|
|
|
- <span v-if="!storeList.content || storeList.content.length == 0">暂无可匹配的信息 </span>
|
|
|
+ <span v-if="!store || store.length == 0">暂无可匹配的信息 </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -185,13 +185,10 @@
|
|
|
},
|
|
|
methods: {
|
|
|
addStore (storeIn) {
|
|
|
- if (this.storeIds.indexOf(storeIn.uuid) !== -1) {
|
|
|
- this.storeIds.splice(this.storeIds.indexOf(storeIn.uuid), 1)
|
|
|
+ if (typeof storeIn.isSelected === 'undefined') {
|
|
|
storeIn.isSelected = false
|
|
|
- } else {
|
|
|
- this.storeIds.push(storeIn.uuid)
|
|
|
- storeIn.isSelected = true
|
|
|
}
|
|
|
+ storeIn.isSelected = !storeIn.isSelected
|
|
|
// 点击请求处理
|
|
|
let index = this.params.filter.storeIds.indexOf(storeIn.uuid)
|
|
|
if (index === -1) {
|
|
|
@@ -201,8 +198,6 @@
|
|
|
this.params.filter.storeIds += ',' + storeIn.uuid
|
|
|
}
|
|
|
} else {
|
|
|
- // console.log(this.params.filter.storeIds.replace(storeIn.uuid, ''))
|
|
|
- console.log(this.params.filter.storeIds.charAt(index + storeIn.uuid.length))
|
|
|
if (this.params.filter.storeIds.charAt(index + storeIn.uuid.length) === '') {
|
|
|
if (this.params.filter.storeIds.charAt(index - 1) === ',') {
|
|
|
this.params.filter.storeIds = this.params.filter.storeIds.replace(',' + storeIn.uuid, '')
|
|
|
@@ -213,9 +208,6 @@
|
|
|
}
|
|
|
}
|
|
|
this.$store.dispatch('loadComponentInformation', this.params)
|
|
|
- .then(response => {
|
|
|
- this.$store.commit('componentInformation/GET_INFORMATION_SUCCESS', response.data)
|
|
|
- })
|
|
|
},
|
|
|
filterType (type) {
|
|
|
if (type === 'umall') {
|
|
|
@@ -224,9 +216,6 @@
|
|
|
this.params.filter.ignoreStore = !this.params.filter.ignoreStore
|
|
|
}
|
|
|
this.$store.dispatch('loadComponentInformation', this.params)
|
|
|
- .then(response => {
|
|
|
- this.$store.commit('componentInformation/GET_INFORMATION_SUCCESS', response.data)
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
}
|