...
|
...
|
@@ -89,7 +89,7 @@ |
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row class-name="filter-row">
|
|
|
<Button type="primary">筛选</Button>
|
|
|
<Button type="primary" @click="filterSearch">筛选</Button>
|
|
|
<Button>清空条件</Button>
|
|
|
</Row>
|
|
|
<div class="hr"></div>
|
...
|
...
|
@@ -119,22 +119,32 @@ |
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.productList();
|
|
|
},
|
|
|
methods: {
|
|
|
filterSearch() {
|
|
|
const params = {
|
|
|
productStatusStr: 1,
|
|
|
size: 20
|
|
|
// productSkn: this.filters.sknCode.model,
|
|
|
// factoryCode: this.filters.factoryCode.model,
|
|
|
// productName: this.filters.productName.model,
|
|
|
// skuFactoryCode: this.filters.skuFactoryCode.model,
|
|
|
// maxSortId: this.filters.maxSortId.model,
|
|
|
// maxSortId: this.filters.maxSortId.model,
|
|
|
// middleSortId: this.filters.middleSortId.model,
|
|
|
// smallSortId: this.filters.smallSortId.model,
|
|
|
// auditStatus: this.filters.auditStatus.model,
|
|
|
// stock: this.filters.stock.model
|
|
|
};
|
|
|
|
|
|
service.productList(params).then(res => {
|
|
|
let code = _.get(res, 'data.code');
|
|
|
|
|
|
if(code === 200) {
|
|
|
this.updateStore(res.data.data);
|
|
|
}
|
|
|
});
|
|
|
this.productList(params);
|
|
|
},
|
|
|
methods: {
|
|
|
productList(params) {
|
|
|
service.productList(_.merge(params, {size: 20})).then(res => {
|
|
|
service.productList(
|
|
|
_.merge(params || {}, {
|
|
|
shelfStatus: 1,
|
|
|
size: 20
|
|
|
}))
|
|
|
.then(res => {
|
|
|
let code = _.get(res, 'data.code');
|
|
|
|
|
|
if(code === 200) {
|
...
|
...
|
@@ -142,7 +152,6 @@ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
updateStore(data) {
|
|
|
this.pageData.total = data.total;
|
|
|
|
...
|
...
|
@@ -152,15 +161,12 @@ |
|
|
|
|
|
this.tableData = data.list;
|
|
|
},
|
|
|
|
|
|
categoryChange(val) {
|
|
|
_.set(this.filters, 'category.model', val);
|
|
|
},
|
|
|
|
|
|
brandChange(val) {
|
|
|
_.set(this.filters, 'brand.model', val);
|
|
|
},
|
|
|
|
|
|
pageChange(page) {
|
|
|
let params = {
|
|
|
page,
|
...
|
...
|
@@ -191,23 +197,27 @@ |
|
|
batchSetOffSale() {
|
|
|
},
|
|
|
|
|
|
changePrice(row) {
|
|
|
changePrice(row, index) {
|
|
|
console.log(index)
|
|
|
row.changePrice = true;
|
|
|
},
|
|
|
|
|
|
updatePrice(row) {
|
|
|
row.changePrice = false;
|
|
|
const index = row.lineIndex;
|
|
|
const salesPrice = row.salesPrice;
|
|
|
const productSkn = row.productSkn;
|
|
|
|
|
|
const params = {
|
|
|
productSkn: row.productSkn,
|
|
|
salesPrice: row.salesPrice
|
|
|
salesPrice,
|
|
|
productSkn
|
|
|
};
|
|
|
|
|
|
service.updateSalesPrice(params)
|
|
|
.then(res => {
|
|
|
this.tableData[index].salesPrice = salesPrice;
|
|
|
row.changePrice = false;
|
|
|
this.$Message.success(res.data.message);
|
|
|
})
|
|
|
},
|
|
|
|
|
|
editProduct(skn) {
|
|
|
this.$router.push({
|
|
|
name: 'product.create.step1',
|
...
|
...
|
@@ -215,6 +225,10 @@ |
|
|
skn
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
priceChange(val) {
|
|
|
console.log(val)
|
|
|
|
|
|
}
|
|
|
},
|
|
|
components: {
|
...
|
...
|
|