|
@@ -89,7 +89,7 @@ |
|
@@ -89,7 +89,7 @@ |
89
|
</Col>
|
89
|
</Col>
|
90
|
</Row>
|
90
|
</Row>
|
91
|
<Row class-name="filter-row">
|
91
|
<Row class-name="filter-row">
|
92
|
- <Button type="primary">筛选</Button>
|
92
|
+ <Button type="primary" @click="filterSearch">筛选</Button>
|
93
|
<Button>清空条件</Button>
|
93
|
<Button>清空条件</Button>
|
94
|
</Row>
|
94
|
</Row>
|
95
|
<div class="hr"></div>
|
95
|
<div class="hr"></div>
|
|
@@ -119,22 +119,32 @@ |
|
@@ -119,22 +119,32 @@ |
119
|
}
|
119
|
}
|
120
|
},
|
120
|
},
|
121
|
created() {
|
121
|
created() {
|
|
|
122
|
+ this.productList();
|
|
|
123
|
+ },
|
|
|
124
|
+ methods: {
|
|
|
125
|
+ filterSearch() {
|
122
|
const params = {
|
126
|
const params = {
|
123
|
- productStatusStr: 1,
|
|
|
124
|
- size: 20
|
127
|
+// productSkn: this.filters.sknCode.model,
|
|
|
128
|
+// factoryCode: this.filters.factoryCode.model,
|
|
|
129
|
+// productName: this.filters.productName.model,
|
|
|
130
|
+// skuFactoryCode: this.filters.skuFactoryCode.model,
|
|
|
131
|
+// maxSortId: this.filters.maxSortId.model,
|
|
|
132
|
+// maxSortId: this.filters.maxSortId.model,
|
|
|
133
|
+// middleSortId: this.filters.middleSortId.model,
|
|
|
134
|
+// smallSortId: this.filters.smallSortId.model,
|
|
|
135
|
+// auditStatus: this.filters.auditStatus.model,
|
|
|
136
|
+// stock: this.filters.stock.model
|
125
|
};
|
137
|
};
|
126
|
|
138
|
|
127
|
- service.productList(params).then(res => {
|
|
|
128
|
- let code = _.get(res, 'data.code');
|
|
|
129
|
-
|
|
|
130
|
- if(code === 200) {
|
|
|
131
|
- this.updateStore(res.data.data);
|
|
|
132
|
- }
|
|
|
133
|
- });
|
139
|
+ this.productList(params);
|
134
|
},
|
140
|
},
|
135
|
- methods: {
|
|
|
136
|
productList(params) {
|
141
|
productList(params) {
|
137
|
- service.productList(_.merge(params, {size: 20})).then(res => {
|
142
|
+ service.productList(
|
|
|
143
|
+ _.merge(params || {}, {
|
|
|
144
|
+ shelfStatus: 1,
|
|
|
145
|
+ size: 20
|
|
|
146
|
+ }))
|
|
|
147
|
+ .then(res => {
|
138
|
let code = _.get(res, 'data.code');
|
148
|
let code = _.get(res, 'data.code');
|
139
|
|
149
|
|
140
|
if(code === 200) {
|
150
|
if(code === 200) {
|
|
@@ -142,7 +152,6 @@ |
|
@@ -142,7 +152,6 @@ |
142
|
}
|
152
|
}
|
143
|
});
|
153
|
});
|
144
|
},
|
154
|
},
|
145
|
-
|
|
|
146
|
updateStore(data) {
|
155
|
updateStore(data) {
|
147
|
this.pageData.total = data.total;
|
156
|
this.pageData.total = data.total;
|
148
|
|
157
|
|
|
@@ -152,15 +161,12 @@ |
|
@@ -152,15 +161,12 @@ |
152
|
|
161
|
|
153
|
this.tableData = data.list;
|
162
|
this.tableData = data.list;
|
154
|
},
|
163
|
},
|
155
|
-
|
|
|
156
|
categoryChange(val) {
|
164
|
categoryChange(val) {
|
157
|
_.set(this.filters, 'category.model', val);
|
165
|
_.set(this.filters, 'category.model', val);
|
158
|
},
|
166
|
},
|
159
|
-
|
|
|
160
|
brandChange(val) {
|
167
|
brandChange(val) {
|
161
|
_.set(this.filters, 'brand.model', val);
|
168
|
_.set(this.filters, 'brand.model', val);
|
162
|
},
|
169
|
},
|
163
|
-
|
|
|
164
|
pageChange(page) {
|
170
|
pageChange(page) {
|
165
|
let params = {
|
171
|
let params = {
|
166
|
page,
|
172
|
page,
|
|
@@ -191,23 +197,27 @@ |
|
@@ -191,23 +197,27 @@ |
191
|
batchSetOffSale() {
|
197
|
batchSetOffSale() {
|
192
|
},
|
198
|
},
|
193
|
|
199
|
|
194
|
- changePrice(row) {
|
200
|
+ changePrice(row, index) {
|
|
|
201
|
+ console.log(index)
|
195
|
row.changePrice = true;
|
202
|
row.changePrice = true;
|
196
|
},
|
203
|
},
|
197
|
-
|
|
|
198
|
updatePrice(row) {
|
204
|
updatePrice(row) {
|
199
|
- row.changePrice = false;
|
205
|
+ const index = row.lineIndex;
|
|
|
206
|
+ const salesPrice = row.salesPrice;
|
|
|
207
|
+ const productSkn = row.productSkn;
|
|
|
208
|
+
|
200
|
const params = {
|
209
|
const params = {
|
201
|
- productSkn: row.productSkn,
|
|
|
202
|
- salesPrice: row.salesPrice
|
210
|
+ salesPrice,
|
|
|
211
|
+ productSkn
|
203
|
};
|
212
|
};
|
204
|
|
213
|
|
205
|
service.updateSalesPrice(params)
|
214
|
service.updateSalesPrice(params)
|
206
|
.then(res => {
|
215
|
.then(res => {
|
|
|
216
|
+ this.tableData[index].salesPrice = salesPrice;
|
|
|
217
|
+ row.changePrice = false;
|
207
|
this.$Message.success(res.data.message);
|
218
|
this.$Message.success(res.data.message);
|
208
|
})
|
219
|
})
|
209
|
},
|
220
|
},
|
210
|
-
|
|
|
211
|
editProduct(skn) {
|
221
|
editProduct(skn) {
|
212
|
this.$router.push({
|
222
|
this.$router.push({
|
213
|
name: 'product.create.step1',
|
223
|
name: 'product.create.step1',
|
|
@@ -215,6 +225,10 @@ |
|
@@ -215,6 +225,10 @@ |
215
|
skn
|
225
|
skn
|
216
|
}
|
226
|
}
|
217
|
});
|
227
|
});
|
|
|
228
|
+ },
|
|
|
229
|
+ priceChange(val) {
|
|
|
230
|
+ console.log(val)
|
|
|
231
|
+
|
218
|
}
|
232
|
}
|
219
|
},
|
233
|
},
|
220
|
components: {
|
234
|
components: {
|