@bit-sun/business-component 2.4.22 → 2.4.24

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.
Files changed (159) hide show
  1. package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +3 -0
  2. package/dist/components/Business/BsLayouts/Components/ChooseStore/services.d.ts +1 -0
  3. package/dist/components/Business/BsLayouts/Components/RightContent/i18n.d.ts +9 -0
  4. package/dist/components/Business/BsLayouts/service.d.ts +1 -1
  5. package/dist/components/Business/BsSulaQueryTable/index.d.ts +1 -0
  6. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +1 -1
  7. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +1 -0
  8. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +1 -0
  9. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +1 -1
  10. package/dist/components/Functional/QueryMutipleInput/index.d.ts +2 -1
  11. package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +2 -0
  12. package/dist/components/Solution/RuleComponent/services.d.ts +1 -1
  13. package/dist/index.esm.js +1777 -1251
  14. package/dist/index.js +1760 -1232
  15. package/dist/utils/TableUtils.d.ts +93 -2
  16. package/dist/utils/businessUtils.d.ts +27 -0
  17. package/dist/utils/constant.d.ts +37 -0
  18. package/dist/utils/index.d.ts +6 -4
  19. package/dist/utils/request.d.ts +2 -0
  20. package/dist/utils/utils.d.ts +13 -0
  21. package/package.json +7 -4
  22. package/src/assets/32.svg +27 -27
  23. package/src/assets/addIcon.svg +17 -17
  24. package/src/assets/allfunc.svg +27 -27
  25. package/src/assets/arrowRight.svg +24 -24
  26. package/src/assets/arrow_top.svg +18 -0
  27. package/src/assets/btn-delete.svg +29 -29
  28. package/src/assets/btn-edit.svg +19 -19
  29. package/src/assets/btn-more.svg +17 -17
  30. package/src/assets/btn-submit.svg +19 -19
  31. package/src/assets/close.svg +26 -26
  32. package/src/assets/drag.svg +17 -17
  33. package/src/assets/fixed-left.svg +15 -15
  34. package/src/assets/fixed-right.svg +15 -15
  35. package/src/assets/guanbi.svg +15 -15
  36. package/src/assets/icon-quanping.svg +15 -15
  37. package/src/assets/icon-shezhi.svg +17 -17
  38. package/src/assets/label_icon_bottom.svg +25 -25
  39. package/src/assets/list-no-img.svg +21 -21
  40. package/src/assets/morentouxiang-32.svg +23 -23
  41. package/src/assets/scanning.svg +24 -24
  42. package/src/assets/upExport.svg +22 -22
  43. package/src/common/ENUM.ts +41 -41
  44. package/src/components/Business/AddSelectBusiness/index.tsx +40 -21
  45. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  46. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  47. package/src/components/Business/BsLayouts/Components/ChooseStore/index.less +0 -0
  48. package/src/components/Business/BsLayouts/Components/ChooseStore/index.tsx +193 -0
  49. package/src/components/Business/BsLayouts/Components/ChooseStore/services.ts +10 -0
  50. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  57. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +163 -157
  58. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  59. package/src/components/Business/BsLayouts/Components/RightContent/i18n.ts +9 -0
  60. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +19 -2
  61. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  62. package/src/components/Business/BsLayouts/index.less +79 -79
  63. package/src/components/Business/BsLayouts/index.tsx +1494 -1484
  64. package/src/components/Business/BsLayouts/service.ts +2 -2
  65. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  66. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +9 -9
  67. package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +5 -0
  68. package/src/components/Business/BsSulaQueryTable/index.less +221 -221
  69. package/src/components/Business/BsSulaQueryTable/index.tsx +346 -175
  70. package/src/components/Business/BsSulaQueryTable/setting.tsx +125 -87
  71. package/src/components/Business/BsSulaQueryTable/utils.tsx +57 -34
  72. package/src/components/Business/CommodityEntry/index.md +70 -70
  73. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  74. package/src/components/Business/CommonGuideWrapper/index.less +121 -112
  75. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  76. package/src/components/Business/CommonGuideWrapper/index.tsx +94 -84
  77. package/src/components/Business/DetailPageWrapper/index.less +9 -1
  78. package/src/components/Business/DetailPageWrapper/index.tsx +121 -110
  79. package/src/components/Business/HomePageWrapper/index.md +45 -45
  80. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  81. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  82. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  83. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  84. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  85. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  86. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  87. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  88. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  89. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  90. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  91. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  92. package/src/components/Business/JsonQueryTable/index.less +16 -16
  93. package/src/components/Business/JsonQueryTable/index.md +328 -328
  94. package/src/components/Business/JsonQueryTable/index.tsx +535 -537
  95. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  96. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  97. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  98. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  99. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  100. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  101. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  102. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  103. package/src/components/Business/SearchSelect/utils.ts +3 -3
  104. package/src/components/Business/StateFlow/index.md +60 -60
  105. package/src/components/Business/StateFlow/index.tsx +29 -29
  106. package/src/components/Business/columnSettingTable/columnSetting.tsx +10 -8
  107. package/src/components/Business/columnSettingTable/index.less +247 -247
  108. package/src/components/Business/columnSettingTable/index.md +357 -357
  109. package/src/components/Business/columnSettingTable/utils.tsx +71 -71
  110. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +87 -87
  111. package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
  112. package/src/components/Business/moreTreeTable/index.less +99 -99
  113. package/src/components/Business/moreTreeTable/index.tsx +387 -387
  114. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  115. package/src/components/Functional/AddSelect/helps.ts +4 -3
  116. package/src/components/Functional/AddSelect/index.less +367 -367
  117. package/src/components/Functional/AddSelect/index.tsx +79 -33
  118. package/src/components/Functional/BillEntry/index.less +371 -371
  119. package/src/components/Functional/BillEntry/index.tsx +3 -3
  120. package/src/components/Functional/BsAntdSula/index.ts +2 -2
  121. package/src/components/Functional/DataImport/index.less +63 -63
  122. package/src/components/Functional/DataImport/index.tsx +3 -3
  123. package/src/components/Functional/DataValidation/index.less +63 -63
  124. package/src/components/Functional/DataValidation/index.tsx +3 -3
  125. package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -5
  126. package/src/components/Functional/EllipsisTooltip/index.js +36 -36
  127. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +10 -5
  128. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  129. package/src/components/Functional/QueryMutipleInput/index.tsx +2 -1
  130. package/src/components/Functional/SearchSelect/index.less +6 -0
  131. package/src/components/Functional/SearchSelect/index.tsx +152 -45
  132. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  133. package/src/components/Functional/TreeSearchSelect/index.tsx +24 -22
  134. package/src/components/Solution/RuleComponent/Formula.tsx +335 -335
  135. package/src/components/Solution/RuleComponent/RenderCompItem.tsx +637 -0
  136. package/src/components/Solution/RuleComponent/index.d.ts +29 -29
  137. package/src/components/Solution/RuleComponent/index.js +7 -652
  138. package/src/components/Solution/RuleComponent/index.less +230 -230
  139. package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -99
  140. package/src/components/Solution/RuleComponent/services.ts +13 -13
  141. package/src/plugin/TableColumnSetting/index.less +247 -247
  142. package/src/plugin/TableColumnSetting/index.md +50 -50
  143. package/src/plugin/TableColumnSetting/index.tsx +2 -2
  144. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  145. package/src/utils/CheckOneUser/index.md +39 -39
  146. package/src/utils/CheckOneUser/index.ts +51 -51
  147. package/src/utils/LocalstorageUtils.ts +95 -95
  148. package/src/utils/TableUtils.less +52 -0
  149. package/src/utils/TableUtils.tsx +691 -18
  150. package/src/utils/businessUtils.ts +441 -0
  151. package/src/utils/checkUtils.ts +39 -39
  152. package/src/utils/constant.ts +39 -0
  153. package/src/utils/enumConfig.ts +11 -11
  154. package/src/utils/getFormMode.js +12 -12
  155. package/src/utils/index.ts +6 -4
  156. package/src/utils/request.ts +53 -0
  157. package/src/utils/requestUtils.ts +29 -2
  158. package/src/utils/serialize.js +7 -7
  159. package/src/utils/utils.ts +64 -21
@@ -0,0 +1,637 @@
1
+ // @ts-nocheck
2
+ import { BsCascader } from '@/components/Functional/BsAntdSula';
3
+ import { BusinessSearchSelect, BusinessTreeSearchSelect } from '@/index';
4
+ import { getDictionarySource, uuid } from '../../../utils/utils';
5
+ import { useRequest } from 'ahooks';
6
+ import { Input, InputNumber, DatePicker, Switch, Select } from 'antd';
7
+ import React, { useEffect, useState } from 'react'
8
+ import { request } from 'bssula';
9
+ import Formula from './Formula';
10
+ const { RangePicker } = DatePicker;
11
+ export default function RenderCompItem(props:any){
12
+ const { regularDataList,ites, showValue, handleEdit,disabled } = props;
13
+ let fieldListGroup = regularDataList.map((item:any) => {
14
+ const Item = {
15
+ id: item.id,
16
+ code: item.code,
17
+ name: item.name,
18
+ value: item.code,
19
+ };
20
+ if (item.propertyList) {
21
+ // @ts-ignore
22
+ Item.propertyList = item.propertyList.map((field:any) => ({
23
+ id: field.id,
24
+ code: field.code,
25
+ name: field.name,
26
+ value: `${item.code}.${field.code}`,
27
+ valueText: `${item.name}.${field.name}`,
28
+ }));
29
+ }
30
+ return Item;
31
+ });
32
+ console.log(ites?.dictionaryCode&&!getDictionarySource(ites.dictionaryCode))
33
+ const [dictData, setDictData] = useState(getDictionarySource(ites.dictionaryCode) || [])
34
+ const getDictData=async()=>{
35
+ const data= await request({url:`/basic/bscDictItem/allItemList?qp-code-eq=${ites.dictionaryCode}`})
36
+ setDictData(data?.map?.(item=>({text:item.dictItemName,value:item.dictItemCode})))
37
+ }
38
+
39
+ useEffect(() => {
40
+ if (ites?.dictionaryCode && !getDictionarySource(ites.dictionaryCode)) {
41
+ getDictData()
42
+ }
43
+ }, []);
44
+ if (!ites) return;
45
+ const styleCommon = {
46
+ width: '200px',
47
+ ...(ites?.rightText ? { marginLeft: 10 } : {}),
48
+ };
49
+ const style2 = {
50
+ width: '100px',
51
+ };
52
+ return (
53
+ <>
54
+ {/* 输入/字符串 */}
55
+ {(ites?.inputType === 10 && ites?.valueType === 21 && (
56
+ <Input
57
+ disabled={disabled}
58
+ allowClear={true}
59
+ onClear={() => handleEdit(ites.code, undefined)}
60
+ defaultValue={showValue(ites.code, 'input')}
61
+ style={styleCommon}
62
+ onBlur={(e) => {
63
+ handleEdit(
64
+ ites.code,
65
+ String(e.target.value).trim() == ''
66
+ ? undefined
67
+ : e.target.value,
68
+ );
69
+ }}
70
+ />
71
+ )) ||
72
+ null}
73
+ {/* 输入 / 长整数23/小数22 */}
74
+ {(ites?.inputType === 10 &&
75
+ (ites?.valueType === 23 || ites?.valueType === 22) && (
76
+ <InputNumber
77
+ disabled={disabled}
78
+ max={Number.MAX_SAFE_INTEGER}
79
+ min={ites?.valueType === 23 ? 0 : Number.MIN_SAFE_INTEGER}
80
+ precision={ites?.valueType === 23 ? 0 : 2}
81
+ defaultValue={ites.defaultValue}
82
+ style={style2}
83
+ value={showValue(ites.code)}
84
+ onChange={(value) => {
85
+ handleEdit(ites.code, value);
86
+ }}
87
+ />
88
+ )) ||
89
+ null}
90
+ {/* 输入/日期 */}
91
+ {(ites?.inputType === 10 && ites?.valueType === 41 && (
92
+ <DatePicker
93
+ disabled={disabled}
94
+ defaultValue={ites.defaultValue}
95
+ style={style2}
96
+ value={showValue(ites.code)}
97
+ onChange={(value) => {
98
+ handleEdit(ites.code, value);
99
+ }}
100
+ />
101
+ )) ||
102
+ null}
103
+ {/* 输入/时间 */}
104
+ {(ites?.inputType === 10 && ites?.valueType === 40 && (
105
+ <RangePicker
106
+ showTime
107
+ disabled={disabled}
108
+ defaultValue={ites.defaultValue}
109
+ style={style2}
110
+ value={showValue(ites.code)}
111
+ onChange={(value) => {
112
+ handleEdit(ites.code, value);
113
+ }}
114
+ />
115
+ )) ||
116
+ null}
117
+ {/* 输入/布尔值 */}
118
+ {(ites?.inputType === 10 && ites?.valueType === 24 && (
119
+ <Switch
120
+ disabled={disabled}
121
+ defaultChecked={!!ites.defaultValue}
122
+ style={style2}
123
+ checked={showValue(ites.code)}
124
+ onChange={(value) => {
125
+ handleEdit(ites.code, value);
126
+ }}
127
+ />
128
+ )) ||
129
+ null}
130
+ {/* 单选/多选 自定义 */}
131
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
132
+ ites?.choiceType === 10 && (
133
+ <Select
134
+ disabled={disabled}
135
+ allowClear
136
+ showArrow
137
+ {...(ites?.inputType === 30
138
+ ? {
139
+ mode: 'multiple',
140
+ }
141
+ : {})}
142
+ defaultValue={ites.defaultValue}
143
+ style={styleCommon}
144
+ value={showValue(ites.code) as string}
145
+ onChange={(value) => {
146
+ handleEdit(ites.code, value);
147
+ }}
148
+ >
149
+ {Object.keys(ites.enumeration).map((it) => (
150
+ <Select.Option key={it} value={it}>
151
+ {ites.enumeration[it]}
152
+ </Select.Option>
153
+ ))}
154
+ </Select>
155
+ )) ||
156
+ null}
157
+ {/* 单选/多选 数据字典 */}
158
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
159
+ ites?.choiceType === 20 && (
160
+ <Select
161
+ disabled={disabled}
162
+ {...(ites?.inputType === 30
163
+ ? {
164
+ mode: 'multiple',
165
+ }
166
+ : {})}
167
+ defaultValue={ites.defaultValue}
168
+ style={styleCommon}
169
+ value={showValue(ites.code)?.split(',')}
170
+ onChange={(value) => {
171
+ handleEdit(ites.code, value);
172
+ }}
173
+ showSearch
174
+ optionFilterProp="children"
175
+ filterOption={(
176
+ input: string,
177
+ option: { props: { children: string } },
178
+ ) =>
179
+ option.props.children
180
+ .toLowerCase()
181
+ .indexOf(input.toLowerCase()) >= 0
182
+ }
183
+ >
184
+ {(dictData as any[])?.map((it) => (
185
+ <Select.Option key={it.value} value={it.value}>
186
+ {it.text}
187
+ </Select.Option>
188
+ ))}
189
+ </Select>
190
+ )) ||
191
+ null}
192
+ {/* 单选/多选 仓库选择器(物理仓) */}
193
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
194
+ ites?.choiceType === 110 && (
195
+ <BusinessSearchSelect
196
+ selectBusinessType="physicalWarehouse"
197
+ selectProps={{
198
+ style: styleCommon,
199
+ placeholder: '请选择物理仓',
200
+ ...(ites?.inputType === 30
201
+ ? {
202
+ mode: 'multiple',
203
+ maxTagCount: 1,
204
+ }
205
+ : {}),
206
+ }}
207
+ disabled={disabled}
208
+ labelInValue={true}
209
+ value={showValue(ites.code)}
210
+ requestConfig={{
211
+ mappingValueField: 'physicalWarehouseCode',
212
+ filterInit: 'qp-physicalWarehouseCode-in',
213
+ }}
214
+ onChange={(value: any) => {
215
+ handleEdit(ites.code, value);
216
+ }}
217
+ getPopupContainer={() => document.body}
218
+ />
219
+ )) ||
220
+ null}
221
+ {/* 单选/多选 仓库选择器(逻辑仓) */}
222
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
223
+ ites?.choiceType === 120 && (
224
+ <BusinessSearchSelect
225
+ selectBusinessType="realWarehouse"
226
+ selectProps={{
227
+ style: styleCommon,
228
+ placeholder: '请选择逻辑仓',
229
+ ...(ites?.inputType === 30
230
+ ? {
231
+ mode: 'multiple',
232
+ maxTagCount: 1,
233
+ }
234
+ : {}),
235
+ }}
236
+ disabled={disabled}
237
+ labelInValue={true}
238
+ value={showValue(ites.code)}
239
+ requestConfig={{
240
+ mappingValueField: 'realWarehouseCode',
241
+ filterInit: 'qp-realWarehouseCode-in',
242
+ }}
243
+ onChange={(value) => {
244
+ handleEdit(ites.code, value);
245
+ }}
246
+ getPopupContainer={() => document.body}
247
+ />
248
+ )) ||
249
+ null}
250
+ {/* 单选/多选 仓库选择器(虚拟仓) */}
251
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
252
+ ites?.choiceType === 130 && (
253
+ <BusinessSearchSelect
254
+ selectBusinessType="virtualWarehouse"
255
+ selectProps={{
256
+ style: styleCommon,
257
+ placeholder: '请选择虚拟仓',
258
+ ...(ites?.inputType === 30
259
+ ? {
260
+ mode: 'multiple',
261
+ maxTagCount: 1,
262
+ }
263
+ : {}),
264
+ }}
265
+ disabled={disabled}
266
+ labelInValue={true}
267
+ value={showValue(ites.code)}
268
+ requestConfig={{
269
+ mappingValueField: 'virtualWarehouseCode',
270
+ filterInit: 'qp-virtualWarehouseCode-in',
271
+ }}
272
+ onChange={(value) => {
273
+ handleEdit(ites.code, value);
274
+ }}
275
+ getPopupContainer={() => document.body}
276
+ />
277
+ )) ||
278
+ null}
279
+ {/* 单选/多选 仓库选择器(渠道仓) */}
280
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
281
+ ites?.choiceType === 140 && (
282
+ <BusinessSearchSelect
283
+ selectBusinessType="channelWarehouse"
284
+ selectProps={{
285
+ style: styleCommon,
286
+ placeholder: '请选择渠道仓',
287
+ ...(ites?.inputType === 30
288
+ ? {
289
+ mode: 'multiple',
290
+ maxTagCount: 1,
291
+ }
292
+ : {}),
293
+ }}
294
+ disabled={disabled}
295
+ labelInValue={true}
296
+ value={showValue(ites.code)}
297
+ requestConfig={{
298
+ mappingValueField: 'channelWarehouseCode',
299
+ filterInit: 'qp-channelWarehouseCode-in',
300
+ }}
301
+ onChange={(value: any) => {
302
+ handleEdit(ites.code, value);
303
+ }}
304
+ getPopupContainer={() => document.body}
305
+ />
306
+ )) ||
307
+ null}
308
+ {/* 单选/多选 商品SPU选择器 */}
309
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
310
+ ites?.choiceType === 150 && (
311
+ <BusinessSearchSelect
312
+ selectBusinessType="spuCommodity"
313
+ selectProps={{
314
+ style: styleCommon,
315
+ placeholder: '请选择SPU',
316
+ ...(ites?.inputType === 30
317
+ ? {
318
+ mode: 'multiple',
319
+ maxTagCount: 1,
320
+ }
321
+ : {}),
322
+ }}
323
+ disabled={disabled}
324
+ labelInValue={true}
325
+ value={showValue(ites.code)}
326
+ requestConfig={{
327
+ filterInit: 'qp-itemCode-in',
328
+ }}
329
+ onChange={(value) => {
330
+ handleEdit(ites.code, value);
331
+ }}
332
+ getPopupContainer={() => document.body}
333
+ />
334
+ )) ||
335
+ null}
336
+ {/* 单选/多选 商品SKU选择器 */}
337
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
338
+ ites?.choiceType === 160 && (
339
+ <BusinessSearchSelect
340
+ selectBusinessType="skuCommodity"
341
+ selectProps={{
342
+ style: styleCommon,
343
+ placeholder: '请选择商品',
344
+ ...(ites?.inputType === 30
345
+ ? {
346
+ mode: 'multiple',
347
+ maxTagCount: 1,
348
+ }
349
+ : {}),
350
+ }}
351
+ disabled={disabled}
352
+ labelInValue={true}
353
+ value={showValue(ites.code)}
354
+ requestConfig={{
355
+ filterInit: 'qp-skuCode-in',
356
+ }}
357
+ onChange={(value: any) => {
358
+ handleEdit(ites.code, value);
359
+ }}
360
+ getPopupContainer={() => document.body}
361
+ />
362
+ )) ||
363
+ null}
364
+ {/* 单选/多选 省市区 */}
365
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
366
+ ites?.choiceType === 190 && (
367
+ <BsCascader
368
+ disabled={disabled}
369
+ isAll={true}
370
+ needNameAndCode={true}
371
+ notChangeOnSelect={true}
372
+ initRequestSource={async () => {
373
+ return await request({
374
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
375
+ method: 'get',
376
+ converter: ({ data }: any) => {
377
+ // FIXME http://192.168.13.78/mep-fed-group/web/libs/business-component/-/merge_requests/45#note_115629
378
+ const handleData =
379
+ data && data[0]
380
+ ? data?.map((item: any) => {
381
+ return {
382
+ text: item.name,
383
+ value: item.id,
384
+ level: item.level,
385
+ id: item.id,
386
+ };
387
+ })
388
+ : [];
389
+ return handleData;
390
+ },
391
+ });
392
+ }}
393
+ value={showValue(ites.code)}
394
+ onChange={(value) => {
395
+ handleEdit(ites.code, value);
396
+ }}
397
+ getPopupContainer={() => document.body}
398
+ />
399
+ )) ||
400
+ null}
401
+ {/* 单选/多选 行政组织选择器 */}
402
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
403
+ ites?.choiceType === 210 && (
404
+ <BusinessTreeSearchSelect
405
+ disabled={disabled}
406
+ treeCheckable={ites?.inputType === 30}
407
+ businessType="department"
408
+ labelInValue={true}
409
+ value={showValue(ites.code)}
410
+ style={styleCommon}
411
+ onChange={(value) => {
412
+ handleEdit(ites.code, value);
413
+ }}
414
+ getPopupContainer={() => document.body}
415
+ />
416
+ )) ||
417
+ null}
418
+ {/* 单选/多选 采购组织选择器 */}
419
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
420
+ ites?.choiceType === 220 && (
421
+ <BusinessTreeSearchSelect
422
+ disabled={disabled}
423
+ treeCheckable={ites?.inputType === 30}
424
+ businessType="purchase-organization"
425
+ labelInValue={true}
426
+ value={showValue(ites.code)}
427
+ style={styleCommon}
428
+ onChange={(value) => {
429
+ handleEdit(ites.code, value);
430
+ }}
431
+ getPopupContainer={() => document.body}
432
+ />
433
+ )) ||
434
+ null}
435
+ {/* 单选/多选 销售组织选择器 */}
436
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
437
+ ites?.choiceType === 230 && (
438
+ <BusinessTreeSearchSelect
439
+ disabled={disabled}
440
+ treeCheckable={ites?.inputType === 30}
441
+ businessType="sales-organization"
442
+ labelInValue={true}
443
+ value={showValue(ites.code)}
444
+ style={styleCommon}
445
+ onChange={(value) => {
446
+ handleEdit(ites.code, value);
447
+ }}
448
+ getPopupContainer={() => document.body}
449
+ />
450
+ )) ||
451
+ null}
452
+ {/* 单选/多选 供应商选择器 */}
453
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
454
+ ites?.choiceType === 240 && (
455
+ <BusinessSearchSelect
456
+ selectBusinessType="supplier2"
457
+ selectProps={{
458
+ style: styleCommon,
459
+ placeholder: '请选择供应商',
460
+ ...(ites?.inputType === 30
461
+ ? {
462
+ mode: 'multiple',
463
+ maxTagCount: 1,
464
+ }
465
+ : {}),
466
+ }}
467
+ disabled={disabled}
468
+ labelInValue={true}
469
+ value={showValue(ites.code)}
470
+ requestConfig={{
471
+ filterInit: 'qp-code-in',
472
+ }}
473
+ onChange={(value) => {
474
+ handleEdit(ites.code, value);
475
+ }}
476
+ getPopupContainer={() => document.body}
477
+ />
478
+ )) ||
479
+ null}
480
+ {/* 单选/多选 客户选择器 */}
481
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
482
+ ites?.choiceType === 250 && (
483
+ <BusinessSearchSelect
484
+ selectBusinessType="customer2"
485
+ selectProps={{
486
+ style: styleCommon,
487
+ placeholder: '请选择客户',
488
+ ...(ites?.inputType === 30
489
+ ? {
490
+ mode: 'multiple',
491
+ maxTagCount: 1,
492
+ }
493
+ : {}),
494
+ }}
495
+ disabled={disabled}
496
+ labelInValue={true}
497
+ value={showValue(ites.code)}
498
+ requestConfig={{
499
+ filterInit: 'qp-code-in',
500
+ }}
501
+ onChange={(value) => {
502
+ handleEdit(ites.code, value);
503
+ }}
504
+ getPopupContainer={() => document.body}
505
+ />
506
+ )) ||
507
+ null}
508
+ {/* 单选/多选 店铺选择器 */}
509
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
510
+ ites?.choiceType === 260 && (
511
+ <BusinessSearchSelect
512
+ selectBusinessType="shopFile2"
513
+ selectProps={{
514
+ style: styleCommon,
515
+ placeholder: '请选择店铺',
516
+ ...(ites?.inputType === 30
517
+ ? {
518
+ mode: 'multiple',
519
+ maxTagCount: 1,
520
+ }
521
+ : {}),
522
+ }}
523
+ disabled={disabled}
524
+ labelInValue={true}
525
+ value={showValue(ites.code)}
526
+ requestConfig={{
527
+ filterInit: 'qp-code-in',
528
+ }}
529
+ onChange={(value) => {
530
+ handleEdit(ites.code, value);
531
+ }}
532
+ getPopupContainer={() => document.body}
533
+ />
534
+ )) ||
535
+ null}
536
+ {/* 单选/多选 员工选择器 */}
537
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
538
+ ites?.choiceType === 270 && (
539
+ <BusinessSearchSelect
540
+ selectBusinessType="employee2"
541
+ selectProps={{
542
+ style: styleCommon,
543
+ placeholder: '请选择员工',
544
+ ...(ites?.inputType === 30
545
+ ? {
546
+ mode: 'multiple',
547
+ maxTagCount: 1,
548
+ }
549
+ : {}),
550
+ }}
551
+ disabled={disabled}
552
+ labelInValue={true}
553
+ value={showValue(ites.code)}
554
+ requestConfig={{
555
+ filterInit: 'qp-id-in',
556
+ }}
557
+ onChange={(value) => {
558
+ handleEdit(ites.code, value);
559
+ }}
560
+ getPopupContainer={() => document.body}
561
+ />
562
+ )) ||
563
+ null}
564
+ {/* 单选/多选 库存组织选择器 */}
565
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
566
+ ites?.choiceType === 280 && (
567
+ <BusinessTreeSearchSelect
568
+ disabled={disabled}
569
+ treeCheckable={ites?.inputType === 30}
570
+ businessType="stock-organization"
571
+ labelInValue={true}
572
+ value={showValue(ites.code)}
573
+ style={styleCommon}
574
+ onChange={(value) => {
575
+ handleEdit(ites.code, value);
576
+ }}
577
+ getPopupContainer={() => document.body}
578
+ />
579
+ )) ||
580
+ null}
581
+ {/* 单选/多选 配送方式选择器 */}
582
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
583
+ ites?.choiceType === 310 && (
584
+ <BusinessSearchSelect
585
+ selectBusinessType="deliveryMode"
586
+ selectProps={{
587
+ style: styleCommon,
588
+ placeholder: '请选择配送方式',
589
+ ...(ites?.inputType === 30
590
+ ? {
591
+ mode: 'multiple',
592
+ maxTagCount: 1,
593
+ }
594
+ : {}),
595
+ }}
596
+ disabled={disabled}
597
+ labelInValue={true}
598
+ value={showValue(ites.code)}
599
+ requestConfig={{
600
+ filterInit: 'qp-code-in',
601
+ }}
602
+ onChange={(value) => {
603
+ handleEdit(ites.code, value);
604
+ }}
605
+ getPopupContainer={() => document.body}
606
+ />
607
+ )) ||
608
+ null}
609
+ {/* 表达式 */}
610
+ {ites?.inputType === 40 && (
611
+ <div style={{ display: 'flex' }}>
612
+ <Formula
613
+ disabled={disabled}
614
+ key={showValue(ites.code)}
615
+ // FIXME http://192.168.13.78/mep-fed-group/web/libs/business-component/-/merge_requests/45#note_115667
616
+ setValue={(val, formulaName) => {
617
+ console.log(val, 'val');
618
+ const value = val.map((item) => {
619
+ return item.value.replace(
620
+ /[a-zA-Z_]+\.\w+/g,
621
+ (i) => '{' + i + '}',
622
+ );
623
+ });
624
+ handleEdit(ites.code, value.join(''));
625
+ handleEdit({
626
+ inputType: 40,
627
+ formulaName,
628
+ });
629
+ }}
630
+ record={{ expression: showValue(ites.code) }}
631
+ sourceData={fieldListGroup}
632
+ />
633
+ </div>
634
+ )}
635
+ </>
636
+ );
637
+ };
@@ -1,29 +1,29 @@
1
- export class RuleComponent {
2
- /** regularDataList必填,规则模板配置的条件对象---可选对象树数据源 */
3
- regularDataList: any;
4
- /** operationList必填,可选操作符数据源 */
5
- operationList: any;
6
- /** ruleClassData必填,规则组件配置数据 */
7
- ruleClassData: any;
8
- /** callBack必填,数据交互 */
9
- callBack: any;
10
- /** systemVariableList选填,规则模板配置的变量--插入参数数据源 */
11
- systemVariableList?:any;
12
- /** initialThresholdQuery非必填,处理条件对象操作符后面框的数据源参数 */
13
- initialThresholdQuery?: any;
14
-
15
- /** ruleGroupInfo选填,当前规则实例所属规则模板-关联的规则组信息 */
16
- ruleGroupInfo?: any
17
- /** ruleTypeData选填,动作数据源 */
18
- ruleTypeData?: any;
19
- /** ruleTypeData选填,返回值数据源 */
20
- ruleReturnConfig?: any;
21
- /** handleOperatingAction非必填,onlyAction为true时 父子组件之间数据交互 */
22
- handleOperatingAction?: any;
23
-
24
- disabled?: boolean;
25
- canDelete?: boolean;
26
- onlyOneRule?: boolean;
27
- onlyCondition?: boolean;
28
- onlyAction?: boolean;
29
- }
1
+ export class RuleComponent {
2
+ /** regularDataList必填,规则模板配置的条件对象---可选对象树数据源 */
3
+ regularDataList: any;
4
+ /** operationList必填,可选操作符数据源 */
5
+ operationList: any;
6
+ /** ruleClassData必填,规则组件配置数据 */
7
+ ruleClassData: any;
8
+ /** callBack必填,数据交互 */
9
+ callBack: any;
10
+ /** systemVariableList选填,规则模板配置的变量--插入参数数据源 */
11
+ systemVariableList?:any;
12
+ /** initialThresholdQuery非必填,处理条件对象操作符后面框的数据源参数 */
13
+ initialThresholdQuery?: any;
14
+
15
+ /** ruleGroupInfo选填,当前规则实例所属规则模板-关联的规则组信息 */
16
+ ruleGroupInfo?: any
17
+ /** ruleTypeData选填,动作数据源 */
18
+ ruleTypeData?: any;
19
+ /** ruleTypeData选填,返回值数据源 */
20
+ ruleReturnConfig?: any;
21
+ /** handleOperatingAction非必填,onlyAction为true时 父子组件之间数据交互 */
22
+ handleOperatingAction?: any;
23
+
24
+ disabled?: boolean;
25
+ canDelete?: boolean;
26
+ onlyOneRule?: boolean;
27
+ onlyCondition?: boolean;
28
+ onlyAction?: boolean;
29
+ }