@bit-sun/business-component 1.1.34 → 1.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -177,14 +177,14 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
177
177
  sourceName: 'skuCode',
178
178
  ...requestConfigProp,
179
179
  }
180
- tableSearchForm = [
181
- { name: 'qp-skuName-like', label: 'SKU名称' },
180
+ tableSearchForm = requestConfig.url.includes('v2') ? [
181
+ requestConfig.url.includes('v2') ? { name: 'qp-skuName-like', label: 'SKU名称' } : { name: 'qp-name-like', label: 'SKU名称' },
182
182
  { name: 'qp-skuCode-like', label: 'SKU编码' },
183
- { name: 'qp-code-like', label: '国际条码' },
183
+ requestConfig.url.includes('v2') ? { name: 'qp-code-like', label: '国际条码' } : { name: 'qp-barCode-like', label: '国际条码'},
184
184
  { name: 'qp-itemName-like', label: '所属SPU名称' },
185
185
  { name: 'qp-itemCode-like', label: '所属SPU编码' },
186
- { name: 'qp-externalCode-like', label: '外部编码' },
187
- { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
186
+ requestConfig.url.includes('v2') ?{ name: 'qp-externalCode-like', label: '外部编码' } : null,
187
+ requestConfig.url.includes('v2') ? { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
188
188
  type: 'businessSearchSelect',
189
189
  props: {
190
190
  selectBusinessType: 'skuPropertyValue',
@@ -194,7 +194,59 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
194
194
  }
195
195
  },
196
196
  }
197
- },
197
+ } : null,
198
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
199
+ type: 'select',
200
+ props: {
201
+ mode: 'multiple',
202
+ notFoundContent: '暂无数据',
203
+ allowClear: true,
204
+ showSearch: true,
205
+ showArrow: true,
206
+ maxTagCount: 1,
207
+ optionFilterProp: 'children',
208
+ filterOption: (input: string, option: { props: { children: string } }) =>
209
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
210
+ },
211
+ } },
212
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
213
+ type: 'treeSelect',
214
+ props: {
215
+ treeData: [],
216
+ treeCheckable: true,
217
+ showSearch: true,
218
+ allowClear: true,
219
+ showArrow: true,
220
+ treeNodeFilterProp: 'title',
221
+ treeDefaultExpandAll: true,
222
+ maxTagCount: 1,
223
+ placeholder: '请选择',
224
+ style: {
225
+ width: '100%',
226
+ },
227
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
228
+ },
229
+ } },
230
+ { name: 'qp-classId-in', type: 'select', label: '品类', field: {
231
+ type: 'select',
232
+ props: {
233
+ mode: 'multiple',
234
+ notFoundContent: '暂无数据',
235
+ allowClear: true,
236
+ showSearch: true,
237
+ showArrow: true,
238
+ maxTagCount: 1,
239
+ optionFilterProp: 'children',
240
+ filterOption: (input: string, option: { props: { children: string } }) =>
241
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
242
+ },
243
+ } },
244
+ ] : [
245
+ { name: 'qp-name-like', label: 'SKU名称' },
246
+ { name: 'qp-skuCode-like', label: 'SKU编码' },
247
+ { name: 'qp-barCode-like', label: '国际条码'},
248
+ { name: 'qp-itemName-like', label: '所属SPU名称' },
249
+ { name: 'qp-itemCode-like', label: '所属SPU编码' },
198
250
  { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
199
251
  type: 'select',
200
252
  props: {
@@ -256,14 +308,14 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
256
308
  currentPage: 1,
257
309
  }),
258
310
  ]).then((x: any)=>{
259
- formatSource(x,0, 7, tableSearchForm,['id','name']);
260
- formatTreeDataSource(x,1, 8, tableSearchForm);
261
- formatSource(x,2, 9, tableSearchForm,['id','name']);
311
+ requestConfig.url.includes('v2') ? formatSource(x,0, 7, tableSearchForm,['id','name']) : formatSource(x,0, 5, tableSearchForm,['id','name'])
312
+ requestConfig.url.includes('v2') ? formatTreeDataSource(x,1, 8, tableSearchForm) : formatTreeDataSource(x,1, 6, tableSearchForm)
313
+ requestConfig.url.includes('v2') ? formatSource(x,2, 9, tableSearchForm,['id','name']) : formatSource(x,2, 7, tableSearchForm,['id','name'])
262
314
  })
263
315
  modalTableProps = {
264
316
  modalTableTitle: '选择SKU',
265
317
  tableSearchForm,
266
- tableColumns: [
318
+ tableColumns: requestConfig.url.includes('v2') ? [
267
319
  {
268
320
  title: 'SKU编码',
269
321
  dataIndex: 'skuCode',
@@ -284,13 +336,50 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
284
336
  title: '所属SPU编码',
285
337
  dataIndex: 'itemCode',
286
338
  },
287
- {
339
+ requestConfig.url.includes('v2') ? {
288
340
  title: '外部编码',
289
341
  dataIndex: 'externalCode',
342
+ } : false,
343
+ {
344
+ title: '规格',
345
+ dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec',
346
+ },
347
+ {
348
+ title: '类目',
349
+ dataIndex: 'categoryName',
350
+ },
351
+ {
352
+ title: '品类',
353
+ dataIndex: 'className',
354
+ },
355
+ {
356
+ title: '品牌',
357
+ dataIndex: 'brandName',
358
+ },
359
+ ] : [
360
+ {
361
+ title: 'SKU编码',
362
+ dataIndex: 'skuCode',
363
+ },
364
+ {
365
+ title: 'SKU名称',
366
+ dataIndex: 'name',
367
+ },
368
+ {
369
+ title: '国际条码',
370
+ dataIndex: 'barCode',
371
+ },
372
+ {
373
+ title: '所属SPU名称',
374
+ dataIndex: 'itemName',
375
+ },
376
+ {
377
+ title: '所属SPU编码',
378
+ dataIndex: 'itemCode',
290
379
  },
291
380
  {
292
381
  title: '规格',
293
- dataIndex: 'propertyNameAndValue',
382
+ dataIndex: 'skuSpec',
294
383
  },
295
384
  {
296
385
  title: '类目',