|
@@ -27,7 +27,7 @@
|
|
|
<el-cascader
|
|
|
clearable
|
|
|
:props="categoryProp()"
|
|
|
- v-model="listQuery.productCategoryIds "
|
|
|
+ v-model="listQuery.productCategoryIds1 "
|
|
|
:options="productCateOptions">
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
@@ -90,6 +90,12 @@
|
|
|
<!-- <p>货号:{{scope.row.productSn}}</p> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="所属类别" width="120" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <p v-if="scope.row.categoryName">所属类别:{{scope.row.categoryName}}</p>
|
|
|
+ <!-- <p>货号:{{scope.row.productSn}}</p> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="标签" width="140" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<p>上架:
|
|
@@ -97,7 +103,7 @@
|
|
|
@change="handlePublishStatusChange(scope.$index, scope.row)"
|
|
|
:active-value="true"
|
|
|
:inactive-value="false"
|
|
|
- v-model="scope.row.publishStatus">
|
|
|
+ v-model="scope.row.ifShow">
|
|
|
</el-switch>
|
|
|
</p>
|
|
|
</template>
|
|
@@ -178,6 +184,7 @@
|
|
|
ifShow: null,
|
|
|
sourceFrom: null,
|
|
|
productCategoryIds : null,
|
|
|
+ productCategoryIds1 : null,
|
|
|
bestSellingBrand : null
|
|
|
};
|
|
|
|
|
@@ -288,6 +295,12 @@
|
|
|
//检索
|
|
|
handleSearchList() {
|
|
|
this.listQuery.current = 1;
|
|
|
+ this.listQuery.productCategoryIds = []
|
|
|
+ if(this.listQuery.productCategoryIds1 && this.listQuery.productCategoryIds1.length>0){
|
|
|
+ this.listQuery.productCategoryIds1.forEach(item => {
|
|
|
+ this.listQuery.productCategoryIds.push(item[item.length-1])
|
|
|
+ });
|
|
|
+ }
|
|
|
this.getList();
|
|
|
},
|
|
|
//添加产品
|
|
@@ -364,7 +377,7 @@
|
|
|
handlePublishStatusChange(index, row) {
|
|
|
let ids = [];
|
|
|
ids.push(row.id);
|
|
|
- this.updatePublishStatus(row.publishStatus, ids);
|
|
|
+ this.updatePublishStatus(!row.ifShow, ids);
|
|
|
},
|
|
|
//修改产品状态
|
|
|
updatePublishStatus(publishStatus, ids) {
|