@bit-sun/business-component 2.1.1-alpha.21 → 2.1.1-alpha.22
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.
- package/.fatherrc.ts +1 -1
- package/.umirc.ts +6 -6
- package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +2 -0
- package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +2 -0
- package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +6 -0
- package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +2 -0
- package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +2 -0
- package/dist/components/Business/JsonQueryTable/function.d.ts +37 -0
- package/dist/components/Business/JsonQueryTable/index.d.ts +3 -0
- package/dist/components/Business/JsonQueryTable/static.d.ts +39 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +23981 -16708
- package/dist/index.js +24288 -17010
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +10 -4
- package/src/components/Business/AddSelectBusiness/index.tsx +105 -83
- package/src/components/Business/BsSulaQueryTable/index.tsx +5 -0
- package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -0
- package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -0
- package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -0
- package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -0
- package/src/components/Business/JsonQueryTable/configButton/index.js +20 -0
- package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -0
- package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -0
- package/src/components/Business/JsonQueryTable/configTree/index.js +82 -0
- package/src/components/Business/JsonQueryTable/configTree/index.less +44 -0
- package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -0
- package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -0
- package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -0
- package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -0
- package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -0
- package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -0
- package/src/components/Business/JsonQueryTable/function.ts +62 -0
- package/src/components/Business/JsonQueryTable/index.less +19 -0
- package/src/components/Business/JsonQueryTable/index.md +328 -0
- package/src/components/Business/JsonQueryTable/index.tsx +320 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -0
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -0
- package/src/components/Business/JsonQueryTable/static.ts +356 -0
- package/src/components/Business/SearchSelect/BusinessUtils.ts +109 -1
- package/src/components/Business/SearchSelect/index.md +117 -0
- package/src/components/Business/SearchSelect/utils.ts +2 -2
- package/src/components/Functional/AddSelect/index.md +32 -0
- package/src/components/Functional/BillEntry/index.tsx +0 -1
- package/src/index.ts +3 -1
- package/src/utils/getFormMode.js +12 -0
- package/src/utils/serialize.js +7 -0
- package/src/utils/utils.ts +42 -2
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
const normalSingleSelectProps = {
|
|
2
|
+
placeholder: '请选择',
|
|
3
|
+
allowClear: true,
|
|
4
|
+
sourceName: 'defaultValue',
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const normalMultipleSelectProps = {
|
|
8
|
+
placeholder: '请选择',
|
|
9
|
+
allowClear: true,
|
|
10
|
+
sourceName: 'defaultValue',
|
|
11
|
+
selectProps: {
|
|
12
|
+
mode: 'multiple',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
// inputType显示类型 10输入框 20单选 30多选 40公式 ||||| valueType字段类型
|
|
16
|
+
export const inputTypes:any = {
|
|
17
|
+
20: {
|
|
18
|
+
10: {
|
|
19
|
+
type: 'select',
|
|
20
|
+
props: {
|
|
21
|
+
...normalSingleSelectProps,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
20: {
|
|
25
|
+
type: 'select',
|
|
26
|
+
props: {
|
|
27
|
+
...normalSingleSelectProps,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
30: {
|
|
31
|
+
type: 'select',
|
|
32
|
+
props: {
|
|
33
|
+
...normalSingleSelectProps,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
110: {
|
|
37
|
+
type: 'bs-physicalWarehouseSearchSelect',
|
|
38
|
+
props: {
|
|
39
|
+
...normalSingleSelectProps,
|
|
40
|
+
requestConfig: {
|
|
41
|
+
mappingValueField: 'physicalWarehouseCode',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
120: {
|
|
46
|
+
type: 'bs-realWarehouseSearchSelect',
|
|
47
|
+
props: {
|
|
48
|
+
...normalSingleSelectProps,
|
|
49
|
+
requestConfig: {
|
|
50
|
+
mappingValueField: 'realWarehouseCode',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
130: {
|
|
55
|
+
type: 'bs-virtualWarehouseSearchSelect',
|
|
56
|
+
props: {
|
|
57
|
+
...normalSingleSelectProps,
|
|
58
|
+
requestConfig: {
|
|
59
|
+
mappingValueField: 'virtualWarehouseCode',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
140: {
|
|
64
|
+
type: 'bs-channelWarehouseSearchSelect',
|
|
65
|
+
props: {
|
|
66
|
+
...normalSingleSelectProps,
|
|
67
|
+
requestConfig: {
|
|
68
|
+
mappingValueField: 'channelWarehouseCode',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
150: {
|
|
73
|
+
type: 'bs-spuCommoditySearchSelect',
|
|
74
|
+
props: {
|
|
75
|
+
...normalSingleSelectProps,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
160: {
|
|
79
|
+
type: 'bs-skuCommoditySearchSelect',
|
|
80
|
+
props: {
|
|
81
|
+
...normalSingleSelectProps,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
210: {
|
|
86
|
+
// 行政组织
|
|
87
|
+
type: 'bs-departmentOrgSelect',
|
|
88
|
+
props: {
|
|
89
|
+
treeCheckable: false,
|
|
90
|
+
...normalSingleSelectProps,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
220: {
|
|
94
|
+
// 采购组织
|
|
95
|
+
type: 'bs-purchaseOrgSelect',
|
|
96
|
+
props: {
|
|
97
|
+
treeCheckable: false,
|
|
98
|
+
...normalSingleSelectProps,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
230: {
|
|
102
|
+
// 销售组织
|
|
103
|
+
type: 'bs-salesOrgSelect',
|
|
104
|
+
props: {
|
|
105
|
+
treeCheckable: false,
|
|
106
|
+
...normalSingleSelectProps,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
240: {
|
|
110
|
+
type: 'bs-supplierSearchSelect',
|
|
111
|
+
props: {
|
|
112
|
+
...normalSingleSelectProps,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
250: {
|
|
116
|
+
type: 'bs-customerSearchSelect',
|
|
117
|
+
props: {
|
|
118
|
+
...normalSingleSelectProps,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
260: {
|
|
122
|
+
type: 'bs-shopFileSearchSelect',
|
|
123
|
+
props: {
|
|
124
|
+
...normalSingleSelectProps,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
270: {
|
|
128
|
+
type: 'bs-employeeSearchSelect',
|
|
129
|
+
props: {
|
|
130
|
+
...normalSingleSelectProps,
|
|
131
|
+
requestConfig: { mappingValueField: 'employeeNumber' },
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
280: {
|
|
135
|
+
// 库存组织
|
|
136
|
+
type: 'bs-stockOrgSelect',
|
|
137
|
+
props: {
|
|
138
|
+
treeCheckable: false,
|
|
139
|
+
...normalSingleSelectProps,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
310: {
|
|
143
|
+
type: 'bs-deliveryModeSearchSelect',
|
|
144
|
+
props: {
|
|
145
|
+
...normalSingleSelectProps,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
30: {
|
|
150
|
+
10: {
|
|
151
|
+
type: 'select',
|
|
152
|
+
props: {
|
|
153
|
+
mode: 'multiple',
|
|
154
|
+
...normalMultipleSelectProps,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
20: {
|
|
158
|
+
type: 'select',
|
|
159
|
+
props: {
|
|
160
|
+
mode: 'multiple',
|
|
161
|
+
...normalMultipleSelectProps,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
30: {
|
|
165
|
+
type: 'select',
|
|
166
|
+
props: {
|
|
167
|
+
mode: 'multiple',
|
|
168
|
+
...normalSingleSelectProps,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
110: {
|
|
172
|
+
type: 'bs-physicalWarehouseSearchSelect',
|
|
173
|
+
props: {
|
|
174
|
+
...normalMultipleSelectProps,
|
|
175
|
+
requestConfig: {
|
|
176
|
+
mappingValueField: 'physicalWarehouseCode',
|
|
177
|
+
filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,in',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
120: {
|
|
182
|
+
type: 'bs-realWarehouseSearchSelect',
|
|
183
|
+
props: {
|
|
184
|
+
...normalMultipleSelectProps,
|
|
185
|
+
requestConfig: {
|
|
186
|
+
mappingValueField: 'realWarehouseCode',
|
|
187
|
+
filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,in',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
130: {
|
|
192
|
+
type: 'bs-virtualWarehouseSearchSelect',
|
|
193
|
+
props: {
|
|
194
|
+
...normalMultipleSelectProps,
|
|
195
|
+
requestConfig: {
|
|
196
|
+
mappingValueField: 'virtualWarehouseCode',
|
|
197
|
+
filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,in',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
140: {
|
|
202
|
+
type: 'bs-channelWarehouseSearchSelect',
|
|
203
|
+
props: {
|
|
204
|
+
...normalMultipleSelectProps,
|
|
205
|
+
requestConfig: {
|
|
206
|
+
mappingValueField: 'channelWarehouseCode',
|
|
207
|
+
filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,in',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
150: {
|
|
212
|
+
type: 'bs-spuCommoditySearchSelect',
|
|
213
|
+
props: {
|
|
214
|
+
...normalMultipleSelectProps,
|
|
215
|
+
requestConfig: {
|
|
216
|
+
filter: 'qp-itemCode,name-orGroup,in',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
160: {
|
|
221
|
+
type: 'bs-skuCommoditySearchSelect',
|
|
222
|
+
props: {
|
|
223
|
+
...normalMultipleSelectProps,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
|
|
227
|
+
210: {
|
|
228
|
+
// 行政组织
|
|
229
|
+
type: 'bs-departmentOrgSelect',
|
|
230
|
+
props: {
|
|
231
|
+
treeCheckable: true,
|
|
232
|
+
...normalMultipleSelectProps,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
220: {
|
|
236
|
+
// 采购组织
|
|
237
|
+
type: 'bs-purchaseOrgSelect',
|
|
238
|
+
props: {
|
|
239
|
+
treeCheckable: true,
|
|
240
|
+
...normalMultipleSelectProps,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
230: {
|
|
244
|
+
// 销售组织
|
|
245
|
+
type: 'bs-salesOrgSelect',
|
|
246
|
+
props: {
|
|
247
|
+
treeCheckable: true,
|
|
248
|
+
...normalMultipleSelectProps,
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
240: {
|
|
252
|
+
type: 'bs-supplierSearchSelect',
|
|
253
|
+
props: {
|
|
254
|
+
...normalMultipleSelectProps,
|
|
255
|
+
requestConfig: {
|
|
256
|
+
filter: 'qp-name,code-orGroup,in',
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
250: {
|
|
261
|
+
type: 'bs-customerSearchSelect',
|
|
262
|
+
props: {
|
|
263
|
+
...normalMultipleSelectProps,
|
|
264
|
+
requestConfig: { filter: 'qp-name,code-orGroup,in' },
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
260: {
|
|
268
|
+
type: 'bs-shopFileSearchSelect',
|
|
269
|
+
props: {
|
|
270
|
+
...normalMultipleSelectProps,
|
|
271
|
+
requestConfig: { filter: 'qp-name,code-orGroup,in' },
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
270: {
|
|
275
|
+
type: 'bs-employeeSearchSelect',
|
|
276
|
+
props: {
|
|
277
|
+
...normalMultipleSelectProps,
|
|
278
|
+
requestConfig: { mappingValueField: 'employeeNumber' },
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
280: {
|
|
282
|
+
// 库存组织
|
|
283
|
+
type: 'bs-stockOrgSelect',
|
|
284
|
+
props: {
|
|
285
|
+
treeCheckable: true,
|
|
286
|
+
...normalMultipleSelectProps,
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
310: {
|
|
290
|
+
type: 'bs-deliveryModeSearchSelect',
|
|
291
|
+
props: {
|
|
292
|
+
...normalMultipleSelectProps,
|
|
293
|
+
requestConfig: {
|
|
294
|
+
filter: 'qp-name,code-orGroup,in',
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export const PARAMS_VALUE_TYPE_ENUM = {
|
|
302
|
+
FIXED_VALUE: 'fixed',
|
|
303
|
+
EXPRESSION: 'expression',
|
|
304
|
+
CONFIGURATION_VALUES: 'config'
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export const paramsValueType = Object.freeze({
|
|
308
|
+
fixed: '固定值',
|
|
309
|
+
expression: '表达式',
|
|
310
|
+
config: '配置值',
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
export const choiceType = Object.freeze({
|
|
314
|
+
10: '自定义',
|
|
315
|
+
20: '数据字典',
|
|
316
|
+
30: '动态数据字典',
|
|
317
|
+
110: '仓库选择器(物理仓)',
|
|
318
|
+
120: '仓库选择器(逻辑仓)',
|
|
319
|
+
130: '仓库选择器(虚拟仓)',
|
|
320
|
+
140: '仓库选择器(渠道仓)',
|
|
321
|
+
150: '商品SPU选择器',
|
|
322
|
+
160: '商品SKU选择器',
|
|
323
|
+
190: '省市区',
|
|
324
|
+
|
|
325
|
+
210: '行政组织选择器',
|
|
326
|
+
220: '采购组织选择器',
|
|
327
|
+
230: '销售组织选择器',
|
|
328
|
+
240: '供应商选择器',
|
|
329
|
+
250: '客户选择器',
|
|
330
|
+
260: '店铺选择器',
|
|
331
|
+
270: '员工选择器',
|
|
332
|
+
280: '库存组织选择器',
|
|
333
|
+
|
|
334
|
+
310: '配送方式选择器',
|
|
335
|
+
330: '变量'
|
|
336
|
+
});
|
|
337
|
+
export const inputType:any ={
|
|
338
|
+
10: '输入',
|
|
339
|
+
20: '单选',
|
|
340
|
+
30: '多选',
|
|
341
|
+
40: '公式',
|
|
342
|
+
};
|
|
343
|
+
export const valueType:any = {
|
|
344
|
+
10: '文本',
|
|
345
|
+
20: '短整数',
|
|
346
|
+
21: '长整数',
|
|
347
|
+
22: '小数',
|
|
348
|
+
30: '日期',
|
|
349
|
+
31: '时间',
|
|
350
|
+
32: '日期时间',
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
export const moduleType = [
|
|
354
|
+
{ text: '计划模型', value: 1 },
|
|
355
|
+
{ text: '元数据对象', value: 2 },
|
|
356
|
+
]
|
|
@@ -626,7 +626,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
626
626
|
needModalTable = false
|
|
627
627
|
}
|
|
628
628
|
|
|
629
|
-
//
|
|
629
|
+
// 仓库选择器(物理、逻辑仓、运营仓)
|
|
630
630
|
if(type === 'physicalWarehouse') {
|
|
631
631
|
requestConfig = {
|
|
632
632
|
url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
|
|
@@ -734,6 +734,63 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
734
734
|
...modalTableBusProps,
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
+
if(type === 'ownerWarehouse') {
|
|
738
|
+
requestConfig = {
|
|
739
|
+
url: `${prefixUrl.selectPrefix}/ownerWarehouse`,
|
|
740
|
+
filter: 'qp-name,operationWarehouseCode-orGroup,like', // 过滤参数
|
|
741
|
+
mappingTextField: 'name',
|
|
742
|
+
mappingTextShowKeyField: 'operationWarehouseCode',
|
|
743
|
+
mappingValueField: 'operationWarehouseCode',
|
|
744
|
+
otherParams: {
|
|
745
|
+
'qp-status-eq': 1,
|
|
746
|
+
sorter: 'desc-id'
|
|
747
|
+
}, // 默认参数
|
|
748
|
+
sourceName: 'qp-operationWarehouseCode-in',
|
|
749
|
+
...requestConfigProp,
|
|
750
|
+
}
|
|
751
|
+
tableSearchForm = [
|
|
752
|
+
{ name: 'qp-name-like', label: '运营仓名称' },
|
|
753
|
+
{ name: 'qp-operationWarehouseCode-like', label: '运营仓编码' },
|
|
754
|
+
{ name: 'qp-groupCode-in', type: 'select', label: '运营组', field: {
|
|
755
|
+
type: 'select',
|
|
756
|
+
props: {
|
|
757
|
+
mode: 'multiple',
|
|
758
|
+
notFoundContent: '暂无数据',
|
|
759
|
+
allowClear: true,
|
|
760
|
+
showSearch: true,
|
|
761
|
+
showArrow: true,
|
|
762
|
+
maxTagCount: 1,
|
|
763
|
+
optionFilterProp: 'children',
|
|
764
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
765
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
766
|
+
},
|
|
767
|
+
} },
|
|
768
|
+
]
|
|
769
|
+
Promise.all([
|
|
770
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/groupInfo/listNoPage`, { 'qp-status-eq': 1 }),
|
|
771
|
+
]).then((x: any)=>{
|
|
772
|
+
formatSource(x,0, 2, tableSearchForm,['groupCode','groupName']);
|
|
773
|
+
})
|
|
774
|
+
modalTableProps = {
|
|
775
|
+
modalTableTitle: '选择运营仓',
|
|
776
|
+
tableSearchForm,
|
|
777
|
+
tableColumns: [
|
|
778
|
+
{
|
|
779
|
+
title: '运营仓编码',
|
|
780
|
+
dataIndex: 'operationWarehouseCode',
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
title: '运营仓名称',
|
|
784
|
+
dataIndex: 'name',
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
title: '运营组',
|
|
788
|
+
dataIndex: 'groupName',
|
|
789
|
+
},
|
|
790
|
+
],
|
|
791
|
+
...modalTableBusProps,
|
|
792
|
+
}
|
|
793
|
+
}
|
|
737
794
|
|
|
738
795
|
// 仓库选择器(虚拟、渠道仓)(无弹窗)
|
|
739
796
|
if(type === 'virtualWarehouse') {
|
|
@@ -1474,5 +1531,56 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1474
1531
|
}
|
|
1475
1532
|
}
|
|
1476
1533
|
|
|
1534
|
+
// 规则场景选择器
|
|
1535
|
+
if(type === 'ruleTemplate') {
|
|
1536
|
+
requestConfig = {
|
|
1537
|
+
url: `${prefixUrl.selectPrefix}/ruleTemplate`,
|
|
1538
|
+
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
1539
|
+
mappingTextField: 'name',
|
|
1540
|
+
mappingTextShowKeyField: 'code',
|
|
1541
|
+
mappingValueField: 'code',
|
|
1542
|
+
otherParams: {
|
|
1543
|
+
sorter: 'desc-id'
|
|
1544
|
+
}, // 默认参数
|
|
1545
|
+
sourceName: 'ruleTemplateCode',
|
|
1546
|
+
...requestConfigProp
|
|
1547
|
+
}
|
|
1548
|
+
tableSearchForm = [
|
|
1549
|
+
{ name: 'qp-name-like', label: '规则场景名称' },
|
|
1550
|
+
{ name: 'qp-code-like', label: '规则场景编码' },
|
|
1551
|
+
]
|
|
1552
|
+
modalTableProps = {
|
|
1553
|
+
modalTableTitle: '选择规则场景',
|
|
1554
|
+
tableSearchForm,
|
|
1555
|
+
tableColumns: [
|
|
1556
|
+
{
|
|
1557
|
+
title: '规则场景编码',
|
|
1558
|
+
dataIndex: 'code',
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
title: '规则场景名称',
|
|
1562
|
+
dataIndex: 'name',
|
|
1563
|
+
render: (text: any) => handleTextOverflow(text),
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
title: '条件对象',
|
|
1567
|
+
dataIndex: 'objectName',
|
|
1568
|
+
render: (text: any) => handleTextOverflow(text),
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
dataIndex: 'extName',
|
|
1572
|
+
title: '条件扩展',
|
|
1573
|
+
render: (text: any) => handleTextOverflow(text),
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
dataIndex: 'actionName',
|
|
1577
|
+
title: '执行动作',
|
|
1578
|
+
render: (text: any) => handleTextOverflow(text),
|
|
1579
|
+
},
|
|
1580
|
+
],
|
|
1581
|
+
...modalTableBusProps
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1477
1585
|
return { modalTableProps, requestConfig, needModalTable };
|
|
1478
1586
|
}
|
|
@@ -464,6 +464,63 @@ export default () => {
|
|
|
464
464
|
};
|
|
465
465
|
```
|
|
466
466
|
|
|
467
|
+
## 仓库选择器(运营仓) Select-Warehouse-005
|
|
468
|
+
|
|
469
|
+
```tsx
|
|
470
|
+
import React, { useState } from 'react';
|
|
471
|
+
import { Tabs } from 'antd';
|
|
472
|
+
import {BusinessSearchSelect} from '../../../index.ts';
|
|
473
|
+
|
|
474
|
+
const { TabPane } = Tabs;
|
|
475
|
+
|
|
476
|
+
export default () => {
|
|
477
|
+
const selectProps = {
|
|
478
|
+
// mode: 'multiple',
|
|
479
|
+
// maxTagCount: 1,
|
|
480
|
+
// disabled: true
|
|
481
|
+
}
|
|
482
|
+
const selectPropsMultiple = {
|
|
483
|
+
mode: 'multiple',
|
|
484
|
+
maxTagCount: 1,
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
const [ tabKey, setTabKey ] = useState('single')
|
|
488
|
+
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
489
|
+
|
|
490
|
+
const props = {
|
|
491
|
+
value,
|
|
492
|
+
onChange: (value: any) => {
|
|
493
|
+
console.log(value)
|
|
494
|
+
setValue(value)
|
|
495
|
+
},
|
|
496
|
+
selectProps,
|
|
497
|
+
selectBusinessType: 'ownerWarehouse',
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
const onTabChange = (key) => {
|
|
501
|
+
setTabKey(key)
|
|
502
|
+
setValue(key === 'single' ? null: [])
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
return (
|
|
506
|
+
<div>
|
|
507
|
+
<Tabs onChange={onTabChange} activeKey={tabKey}>
|
|
508
|
+
<TabPane tab='单选' key='single'>
|
|
509
|
+
{tabKey === 'single' && (
|
|
510
|
+
<BusinessSearchSelect {...props} />
|
|
511
|
+
)}
|
|
512
|
+
</TabPane>
|
|
513
|
+
<TabPane tab='多选' key='multiple'>
|
|
514
|
+
{tabKey === 'multiple' && (
|
|
515
|
+
<BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
|
|
516
|
+
)}
|
|
517
|
+
</TabPane>
|
|
518
|
+
</Tabs>
|
|
519
|
+
</div>
|
|
520
|
+
);
|
|
521
|
+
};
|
|
522
|
+
```
|
|
523
|
+
|
|
467
524
|
## 仓库选择器(虚拟仓) Select-Warehouse-003
|
|
468
525
|
|
|
469
526
|
```tsx
|
|
@@ -1135,3 +1192,63 @@ export default () => {
|
|
|
1135
1192
|
```
|
|
1136
1193
|
|
|
1137
1194
|
More skills for writing demo: https://d.umijs.org/guide/demo-principle
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
## 规则场景选择器 Select-GZCJ-001
|
|
1198
|
+
|
|
1199
|
+
```tsx
|
|
1200
|
+
import React, { useState } from 'react';
|
|
1201
|
+
import { Tabs } from 'antd';
|
|
1202
|
+
import {BusinessSearchSelect} from '../../../index.ts';
|
|
1203
|
+
|
|
1204
|
+
const { TabPane } = Tabs;
|
|
1205
|
+
|
|
1206
|
+
export default () => {
|
|
1207
|
+
const selectProps = {
|
|
1208
|
+
// mode: 'multiple',
|
|
1209
|
+
// maxTagCount: 1,
|
|
1210
|
+
// disabled: true
|
|
1211
|
+
}
|
|
1212
|
+
const selectPropsMultiple = {
|
|
1213
|
+
mode: 'multiple',
|
|
1214
|
+
maxTagCount: 1,
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
const [ tabKey, setTabKey ] = useState('single')
|
|
1218
|
+
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
1219
|
+
|
|
1220
|
+
const props = {
|
|
1221
|
+
value,
|
|
1222
|
+
onChange: (value: any) => {
|
|
1223
|
+
console.log(value)
|
|
1224
|
+
setValue(value)
|
|
1225
|
+
},
|
|
1226
|
+
selectProps,
|
|
1227
|
+
selectBusinessType: 'ruleTemplate',
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
const onTabChange = (key) => {
|
|
1231
|
+
setTabKey(key)
|
|
1232
|
+
setValue(key === 'single' ? null: [])
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
return (
|
|
1236
|
+
<div>
|
|
1237
|
+
<Tabs onChange={onTabChange} activeKey={tabKey}>
|
|
1238
|
+
<TabPane tab='单选' key='single'>
|
|
1239
|
+
{tabKey === 'single' && (
|
|
1240
|
+
<BusinessSearchSelect {...props} />
|
|
1241
|
+
)}
|
|
1242
|
+
</TabPane>
|
|
1243
|
+
<TabPane tab='多选' key='multiple'>
|
|
1244
|
+
{tabKey === 'multiple' && (
|
|
1245
|
+
<BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
|
|
1246
|
+
)}
|
|
1247
|
+
</TabPane>
|
|
1248
|
+
</Tabs>
|
|
1249
|
+
</div>
|
|
1250
|
+
);
|
|
1251
|
+
};
|
|
1252
|
+
```
|
|
1253
|
+
|
|
1254
|
+
More skills for writing demo: https://d.umijs.org/guide/demo-principle
|
|
@@ -81,13 +81,13 @@ const handleDefaultPrefixUrl = (type: string) => {
|
|
|
81
81
|
case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity':
|
|
82
82
|
result = '/items';
|
|
83
83
|
break;
|
|
84
|
-
case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse':
|
|
84
|
+
case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse': case 'ownerWarehouse':
|
|
85
85
|
result = '/stock';
|
|
86
86
|
break;
|
|
87
87
|
case 'inventoryOrg2': case 'purchaseOrg': case 'salesOrg': case 'employee2':
|
|
88
88
|
result = '/user';
|
|
89
89
|
break;
|
|
90
|
-
case 'deliveryMode':
|
|
90
|
+
case 'deliveryMode': case 'ruleTemplate':
|
|
91
91
|
result = '/basic';
|
|
92
92
|
break;
|
|
93
93
|
default:
|
|
@@ -53,6 +53,38 @@ export default () => {
|
|
|
53
53
|
tableSearchForm: [
|
|
54
54
|
{ name: 'qp-name-like', label: 'SKU名称' }, // field: { type: 'input', props: { placeholder: '8888'}}
|
|
55
55
|
{ name: 'qp-code-like', label: 'SKU编码' },
|
|
56
|
+
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
57
|
+
type: 'select',
|
|
58
|
+
props: {
|
|
59
|
+
mode: 'multiple',
|
|
60
|
+
notFoundContent: '暂无数据',
|
|
61
|
+
allowClear: true,
|
|
62
|
+
showSearch: true,
|
|
63
|
+
showArrow: true,
|
|
64
|
+
maxTagCount: 1,
|
|
65
|
+
optionFilterProp: 'children',
|
|
66
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
67
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
68
|
+
},
|
|
69
|
+
} },
|
|
70
|
+
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
71
|
+
type: 'treeSelect',
|
|
72
|
+
props: {
|
|
73
|
+
treeData: [],
|
|
74
|
+
treeCheckable: true,
|
|
75
|
+
showSearch: true,
|
|
76
|
+
allowClear: true,
|
|
77
|
+
showArrow: true,
|
|
78
|
+
treeNodeFilterProp: 'title',
|
|
79
|
+
treeDefaultExpandAll: true,
|
|
80
|
+
maxTagCount: 1,
|
|
81
|
+
placeholder: '请选择',
|
|
82
|
+
style: {
|
|
83
|
+
width: '100%',
|
|
84
|
+
},
|
|
85
|
+
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
86
|
+
},
|
|
87
|
+
} }
|
|
56
88
|
],
|
|
57
89
|
tableColumns: [
|
|
58
90
|
{
|
package/src/index.ts
CHANGED
|
@@ -29,4 +29,6 @@ export { default as DetailPageWrapper } from './components/Business/DetailPageWr
|
|
|
29
29
|
export { default as HomePageWrapper } from './components/Business/HomePageWrapper';
|
|
30
30
|
export { default as BsSulaQueryTable } from './components/Business/BsSulaQueryTable';
|
|
31
31
|
export { default as BsLayout } from './components/Business/BsLayouts';
|
|
32
|
-
export { default as MoreTreeTable } from './components/Business/moreTreeTable'
|
|
32
|
+
export { default as MoreTreeTable } from './components/Business/moreTreeTable';;
|
|
33
|
+
export { default as JsonQueryTable } from './components/Business/JsonQueryTable';
|
|
34
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const getFormMode = props => {
|
|
2
|
+
let mode = 'create';
|
|
3
|
+
const { path } = props.match;
|
|
4
|
+
if (path.includes('edit')) {
|
|
5
|
+
mode = 'edit';
|
|
6
|
+
} else if (path.includes('view') || path.includes('detail')) {
|
|
7
|
+
mode = 'view';
|
|
8
|
+
}
|
|
9
|
+
return mode;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default getFormMode;
|