|
@@ -34,6 +34,7 @@
|
|
|
:fieldNames="fieldNames"
|
|
|
:options="categoryOptions"
|
|
|
placeholder="请选择商城类目"
|
|
|
+ @change="changeProductsCategory"
|
|
|
allowClear
|
|
|
v-model="category"/>
|
|
|
</a-form-item>
|
|
@@ -208,7 +209,8 @@ export default {
|
|
|
productTypeSn3: '', // 产品三级分类
|
|
|
hotFlag: undefined, // 是否是热销产品
|
|
|
status: undefined, // 状态
|
|
|
- categorySn: undefined// 商城类目
|
|
|
+ categorySn1: undefined, // 商城一级类目
|
|
|
+ categorySn2: undefined// 商城二级类目
|
|
|
},
|
|
|
productNum: null, // 列表数据总条数
|
|
|
categoryOptions: [], // 产品类目列表
|
|
@@ -221,8 +223,6 @@ export default {
|
|
|
this.spinning = true
|
|
|
if (this.itemCategorySn) {
|
|
|
this.queryParam.categorySn = this.itemCategorySn
|
|
|
- } else {
|
|
|
- this.queryParam.categorySn = this.category ? this.category.length > 1 ? this.category[1] : this.category[0] : undefined
|
|
|
}
|
|
|
return shopProductList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
@@ -357,7 +357,8 @@ export default {
|
|
|
this.queryParam.productTypeSn3 = ''
|
|
|
this.queryParam.hotFlag = undefined
|
|
|
this.queryParam.status = undefined
|
|
|
- this.queryParam.categorySn = undefined
|
|
|
+ this.queryParam.categorySn1 = undefined
|
|
|
+ this.queryParam.categorySn2 = undefined
|
|
|
this.productType = []
|
|
|
this.category = []
|
|
|
this.$refs.table.refresh(true)
|
|
@@ -382,6 +383,11 @@ export default {
|
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
},
|
|
|
+ // 商城类目
|
|
|
+ changeProductsCategory (val) {
|
|
|
+ this.queryParam.categorySn1 = val[0] ? val[0] : ''
|
|
|
+ this.queryParam.categorySn2 = val[1] ? val[1] : ''
|
|
|
+ },
|
|
|
// 删除
|
|
|
handleDel (row) {
|
|
|
const _this = this
|