|
@@ -58,7 +58,7 @@ |
|
@@ -58,7 +58,7 @@ |
58
|
<label class="field-label">{{filters.verifyStatus.label}}:</label>
|
58
|
<label class="field-label">{{filters.verifyStatus.label}}:</label>
|
59
|
</Col>
|
59
|
</Col>
|
60
|
<Col :span="filters.verifyStatus.fieldSpan">
|
60
|
<Col :span="filters.verifyStatus.fieldSpan">
|
61
|
- <Select v-model="filters.verifyStatus.model">
|
61
|
+ <Select v-model="filters.verifyStatus.model" clearable>
|
62
|
<Option v-for="option in filters.verifyStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
|
62
|
<Option v-for="option in filters.verifyStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
|
63
|
</Select>
|
63
|
</Select>
|
64
|
</Col>
|
64
|
</Col>
|
|
@@ -70,12 +70,24 @@ |
|
@@ -70,12 +70,24 @@ |
70
|
<label class="field-label">{{filters.stockStatus.label}}:</label>
|
70
|
<label class="field-label">{{filters.stockStatus.label}}:</label>
|
71
|
</Col>
|
71
|
</Col>
|
72
|
<Col :span="filters.stockStatus.fieldSpan">
|
72
|
<Col :span="filters.stockStatus.fieldSpan">
|
73
|
- <Select v-model="filters.stockStatus.model">
|
73
|
+ <Select v-model="filters.stockStatus.model" clearable>
|
74
|
<Option v-for="option in filters.stockStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
|
74
|
<Option v-for="option in filters.stockStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
|
75
|
</Select>
|
75
|
</Select>
|
76
|
</Col>
|
76
|
</Col>
|
77
|
</Row>
|
77
|
</Row>
|
78
|
</Col>
|
78
|
</Col>
|
|
|
79
|
+ <Col span="6">
|
|
|
80
|
+ <Row>
|
|
|
81
|
+ <Col :span="filters.publishStatus.labelSpan">
|
|
|
82
|
+ <label class="field-label">{{filters.publishStatus.label}}:</label>
|
|
|
83
|
+ </Col>
|
|
|
84
|
+ <Col :span="filters.publishStatus.fieldSpan">
|
|
|
85
|
+ <Select v-model="filters.publishStatus.model" clearable>
|
|
|
86
|
+ <Option v-for="option in filters.publishStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
|
|
|
87
|
+ </Select>
|
|
|
88
|
+ </Col>
|
|
|
89
|
+ </Row>
|
|
|
90
|
+ </Col>
|
79
|
</Row>
|
91
|
</Row>
|
80
|
<div class="filter-row">
|
92
|
<div class="filter-row">
|
81
|
<Category :field-sort="filters.sort" @on-change="sortChange"></Category>
|
93
|
<Category :field-sort="filters.sort" @on-change="sortChange"></Category>
|
|
@@ -86,7 +98,7 @@ |
|
@@ -86,7 +98,7 @@ |
86
|
</Row>
|
98
|
</Row>
|
87
|
<div class="hr"></div>
|
99
|
<div class="hr"></div>
|
88
|
<div class="batch-row">
|
100
|
<div class="batch-row">
|
89
|
- <Button type="success" @click="batchSetOffSale">上架</Button>
|
101
|
+ <Button type="success" @click="batchSetOnSale">上架</Button>
|
90
|
</div>
|
102
|
</div>
|
91
|
<Table border :columns="tableCols" :data="tableData" @on-selection-change="selectChange"></Table>
|
103
|
<Table border :columns="tableCols" :data="tableData" @on-selection-change="selectChange"></Table>
|
92
|
<div class="list-page">
|
104
|
<div class="list-page">
|
|
@@ -120,27 +132,33 @@ |
|
@@ -120,27 +132,33 @@ |
120
|
this.initialFilters = JSON.stringify(filterFields);
|
132
|
this.initialFilters = JSON.stringify(filterFields);
|
121
|
},
|
133
|
},
|
122
|
methods: {
|
134
|
methods: {
|
123
|
- filterSearch() {
|
|
|
124
|
- const params = {
|
|
|
125
|
- productSkn: this.filters.sknCode.model,
|
|
|
126
|
- factoryCode: this.filters.prodCode.model,
|
|
|
127
|
- productName: this.filters.prodName.model,
|
|
|
128
|
- skuFactoryCode: this.filters.prodBarCode.model,
|
|
|
129
|
- maxSortId: this.filters.sort.first.model,
|
|
|
130
|
- middleSortId: this.filters.sort.second.model,
|
|
|
131
|
- smallSortId: this.filters.sort.third.model,
|
|
|
132
|
- brandId: this.filters.brand.model,
|
|
|
133
|
- auditStatus: this.filters.verifyStatus.model,
|
|
|
134
|
- stock: this.filters.stockStatus.model != -1 ? this.filters.stockStatus.model : null
|
135
|
+ filterParams() {
|
|
|
136
|
+ const fts = this.filters;
|
|
|
137
|
+ const data = {
|
|
|
138
|
+ productSkn: fts.sknCode.model,
|
|
|
139
|
+ factoryCode: fts.prodCode.model,
|
|
|
140
|
+ skuFactoryCode: fts.prodBarCode.model,
|
|
|
141
|
+ maxSortId: fts.sort.first.model,
|
|
|
142
|
+ middleSortId: fts.sort.second.model,
|
|
|
143
|
+ smallSortId: fts.sort.third.model,
|
|
|
144
|
+ isPublished: fts.publishStatus.model,
|
|
|
145
|
+ brandId: fts.brand.model != -1 ? fts.brand.model : null,
|
|
|
146
|
+ auditStatus: fts.verifyStatus.model != -1 ? fts.verifyStatus.model : null,
|
|
|
147
|
+ stock: fts.stockStatus.model != -1 ? this.filters.stockStatus.model : null
|
135
|
};
|
148
|
};
|
136
|
|
149
|
|
|
|
150
|
+ return data;
|
|
|
151
|
+ },
|
|
|
152
|
+ filterSearch() {
|
|
|
153
|
+ const params = this.filterParams();
|
|
|
154
|
+
|
137
|
this.useFilterSign = true;
|
155
|
this.useFilterSign = true;
|
138
|
this.productList(params);
|
156
|
this.productList(params);
|
139
|
},
|
157
|
},
|
140
|
clearFilter() {
|
158
|
clearFilter() {
|
|
|
159
|
+ this.filters = JSON.parse(this.initialFilters);
|
141
|
this.productList();
|
160
|
this.productList();
|
142
|
this.useFilterSign = false;
|
161
|
this.useFilterSign = false;
|
143
|
- this.filters = JSON.parse(this.initialFilters);
|
|
|
144
|
},
|
162
|
},
|
145
|
productList(params) {
|
163
|
productList(params) {
|
146
|
service.productList(
|
164
|
service.productList(
|
|
@@ -166,25 +184,31 @@ |
|
@@ -166,25 +184,31 @@ |
166
|
this.pageData.current = 1;
|
184
|
this.pageData.current = 1;
|
167
|
},
|
185
|
},
|
168
|
sortChange(sort) {
|
186
|
sortChange(sort) {
|
169
|
- this.filters.sort.first.model = sort.first || null;
|
|
|
170
|
- this.filters.sort.second.model = sort.second || null;
|
|
|
171
|
- this.filters.sort.third.model = sort.third || null;
|
187
|
+ this.filters.sort.first.model = sort.first;
|
|
|
188
|
+ this.filters.sort.second.model = sort.second;
|
|
|
189
|
+ this.filters.sort.third.model = sort.third;
|
172
|
},
|
190
|
},
|
173
|
brandChange(val) {
|
191
|
brandChange(val) {
|
174
|
_.set(this.filters, 'brand.model', val);
|
192
|
_.set(this.filters, 'brand.model', val);
|
175
|
},
|
193
|
},
|
176
|
pageChange(page) {
|
194
|
pageChange(page) {
|
177
|
- let params = {
|
195
|
+ let params = {};
|
|
|
196
|
+
|
|
|
197
|
+ if(this.useFilterSign) {
|
|
|
198
|
+ params = this.filterParams();
|
|
|
199
|
+ }
|
|
|
200
|
+
|
|
|
201
|
+ _.merge(params, {
|
178
|
page,
|
202
|
page,
|
179
|
size: 20,
|
203
|
size: 20,
|
180
|
productStatusStr: 1
|
204
|
productStatusStr: 1
|
181
|
- };
|
205
|
+ });
|
182
|
|
206
|
|
183
|
this.productList(params);
|
207
|
this.productList(params);
|
184
|
},
|
208
|
},
|
185
|
- setOffSale(skns) {
|
209
|
+ setOnSale(skns) {
|
186
|
const params = {
|
210
|
const params = {
|
187
|
- targetStatus: 0
|
211
|
+ targetStatus: 1
|
188
|
};
|
212
|
};
|
189
|
|
213
|
|
190
|
if(_.isArray(skns)) {
|
214
|
if(_.isArray(skns)) {
|
|
@@ -193,13 +217,13 @@ |
|
@@ -193,13 +217,13 @@ |
193
|
params['productSkns'] = `[${skns}]`
|
217
|
params['productSkns'] = `[${skns}]`
|
194
|
}
|
218
|
}
|
195
|
|
219
|
|
196
|
- service.setOffSale(params)
|
220
|
+ service.setOnSale(params)
|
197
|
.then(res => {
|
221
|
.then(res => {
|
198
|
this.$Message.success(res.data.message);
|
222
|
this.$Message.success(res.data.message);
|
199
|
});
|
223
|
});
|
200
|
},
|
224
|
},
|
201
|
|
225
|
|
202
|
- batchSetOffSale() {
|
226
|
+ batchSetOnSale() {
|
203
|
if(!this.batchOffSale.length) {
|
227
|
if(!this.batchOffSale.length) {
|
204
|
return this.$Message.error('请选择要上架的商品');
|
228
|
return this.$Message.error('请选择要上架的商品');
|
205
|
}
|
229
|
}
|
|
@@ -210,7 +234,7 @@ |
|
@@ -210,7 +234,7 @@ |
210
|
skns.push(item.productSkn);
|
234
|
skns.push(item.productSkn);
|
211
|
});
|
235
|
});
|
212
|
|
236
|
|
213
|
- this.setOffSale(skns);
|
237
|
+ this.setOnSale(skns);
|
214
|
},
|
238
|
},
|
215
|
changePrice(row) {
|
239
|
changePrice(row) {
|
216
|
row.changePrice = true;
|
240
|
row.changePrice = true;
|
|
@@ -252,7 +276,7 @@ |
|
@@ -252,7 +276,7 @@ |
252
|
}
|
276
|
}
|
253
|
</script>
|
277
|
</script>
|
254
|
|
278
|
|
255
|
-<style lang="scss" scoped>
|
279
|
+<style lang="scss">
|
256
|
.filter-row {
|
280
|
.filter-row {
|
257
|
margin-bottom: 20px;
|
281
|
margin-bottom: 20px;
|
258
|
|
282
|
|
|
@@ -274,4 +298,12 @@ |
|
@@ -274,4 +298,12 @@ |
274
|
float: right;
|
298
|
float: right;
|
275
|
margin-top: 20px;
|
299
|
margin-top: 20px;
|
276
|
}
|
300
|
}
|
|
|
301
|
+
|
|
|
302
|
+ .prd-img {
|
|
|
303
|
+ max-height: 200px;
|
|
|
304
|
+ }
|
|
|
305
|
+
|
|
|
306
|
+ .action-btn-row {
|
|
|
307
|
+ margin-top: 10px;
|
|
|
308
|
+ }
|
277
|
</style> |
309
|
</style> |