@bit-sun/business-component 1.2.4-alpha.1 → 1.2.4

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 (167) hide show
  1. package/.fatherrc.ts +0 -1
  2. package/.umirc.ts +16 -31
  3. package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +1 -1
  4. package/dist/components/Business/SearchSelect/common.d.ts +1 -5
  5. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  6. package/dist/components/Business/SearchSelect/utils.d.ts +1 -2
  7. package/dist/components/Functional/SearchSelect/index.d.ts +1 -2
  8. package/dist/index.d.ts +0 -15
  9. package/dist/index.esm.js +4456 -19407
  10. package/dist/index.js +4443 -19411
  11. package/package.json +5 -26
  12. package/src/components/Business/CommodityEntry/index.md +3 -4
  13. package/src/components/Business/CommodityEntry/index.tsx +2 -7
  14. package/src/components/Business/SearchSelect/BusinessUtils.ts +14 -107
  15. package/src/components/Business/SearchSelect/common.ts +1 -20
  16. package/src/components/Business/SearchSelect/index.md +30 -60
  17. package/src/components/Business/SearchSelect/index.tsx +12 -21
  18. package/src/components/Business/SearchSelect/utils.ts +4 -30
  19. package/src/components/Functional/DataImport/index.tsx +2 -1
  20. package/src/components/Functional/DataValidation/index.tsx +1 -1
  21. package/src/components/Functional/SearchSelect/index.tsx +121 -218
  22. package/src/index.ts +6 -15
  23. package/typings.d.ts +0 -3
  24. package/dist/components/Business/AddSelectBusiness/index.d.ts +0 -1
  25. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +0 -4
  26. package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +0 -4
  27. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +0 -4
  28. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +0 -17
  29. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +0 -30
  30. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +0 -3
  31. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +0 -2
  32. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +0 -4
  33. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +0 -4
  34. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +0 -2
  35. package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +0 -8
  36. package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +0 -8
  37. package/dist/components/Business/BsLayouts/index.d.ts +0 -18
  38. package/dist/components/Business/BsLayouts/service.d.ts +0 -1
  39. package/dist/components/Business/BsLayouts/utils.d.ts +0 -13
  40. package/dist/components/Business/BsSulaQueryTable/index.d.ts +0 -2
  41. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +0 -58
  42. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +0 -98
  43. package/dist/components/Business/CommonAlert/index.d.ts +0 -3
  44. package/dist/components/Business/CommonGuideWrapper/index.d.ts +0 -6
  45. package/dist/components/Business/DetailPageWrapper/index.d.ts +0 -9
  46. package/dist/components/Business/DetailPageWrapper/utils.d.ts +0 -8
  47. package/dist/components/Business/HomePageWrapper/index.d.ts +0 -3
  48. package/dist/components/Business/StateFlow/index.d.ts +0 -3
  49. package/dist/components/Business/TreeSearchSelect/index.d.ts +0 -3
  50. package/dist/components/Business/TreeSearchSelect/utils.d.ts +0 -2
  51. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +0 -54
  52. package/dist/components/Business/columnSettingTable/index.d.ts +0 -16
  53. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +0 -17
  54. package/dist/components/Business/columnSettingTable/utils.d.ts +0 -8
  55. package/dist/components/Functional/AddSelect/index.d.ts +0 -3
  56. package/dist/components/Functional/BillEntry/index.d.ts +0 -4
  57. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +0 -12
  58. package/dist/components/Functional/TreeSearchSelect/index.d.ts +0 -2
  59. package/dist/utils/enumConfig.d.ts +0 -10
  60. package/dist/utils/requestUtils.d.ts +0 -1
  61. package/dist/utils/utils.d.ts +0 -3
  62. package/lib/assets/arrow_top.png +0 -0
  63. package/lib/assets/drag.svg +0 -17
  64. package/lib/assets/exportFail.svg +0 -38
  65. package/lib/assets/exportProcessing.svg +0 -29
  66. package/lib/assets/exportSuccess.svg +0 -35
  67. package/lib/assets/exportlogo.png +0 -0
  68. package/lib/assets/label_icon_bottom.svg +0 -26
  69. package/lib/assets/upExport.svg +0 -23
  70. package/src/assets/32.svg +0 -28
  71. package/src/assets/addIcon.svg +0 -18
  72. package/src/assets/allfunc.svg +0 -28
  73. package/src/assets/arrowRight.svg +0 -25
  74. package/src/assets/arrow_top.png +0 -0
  75. package/src/assets/btn-delete.svg +0 -30
  76. package/src/assets/btn-edit.svg +0 -20
  77. package/src/assets/btn-more.svg +0 -18
  78. package/src/assets/btn-submit.svg +0 -20
  79. package/src/assets/caidan.svg +0 -12
  80. package/src/assets/close.svg +0 -26
  81. package/src/assets/closeicon.png +0 -0
  82. package/src/assets/drag.svg +0 -17
  83. package/src/assets/exportFail.svg +0 -38
  84. package/src/assets/exportProcessing.svg +0 -29
  85. package/src/assets/exportSuccess.svg +0 -35
  86. package/src/assets/exportlogo.png +0 -0
  87. package/src/assets/fixed-left-active.svg +0 -12
  88. package/src/assets/fixed-left.svg +0 -16
  89. package/src/assets/fixed-right-active.svg +0 -12
  90. package/src/assets/fixed-right.svg +0 -16
  91. package/src/assets/guanbi.svg +0 -16
  92. package/src/assets/icon-quanping.svg +0 -16
  93. package/src/assets/icon-shezhi.svg +0 -18
  94. package/src/assets/label_icon_bottom.svg +0 -26
  95. package/src/assets/list-no-img.svg +0 -22
  96. package/src/assets/morentouxiang-32.svg +0 -24
  97. package/src/assets/right.png +0 -0
  98. package/src/assets/scanning.svg +0 -25
  99. package/src/assets/upExport.svg +0 -23
  100. package/src/assets/xinglan-icon-out.png +0 -0
  101. package/src/components/Business/AddSelectBusiness/index.md +0 -41
  102. package/src/components/Business/AddSelectBusiness/index.tsx +0 -290
  103. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +0 -112
  104. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +0 -153
  105. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +0 -70
  106. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +0 -90
  107. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +0 -38
  108. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +0 -243
  109. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +0 -385
  110. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +0 -286
  111. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +0 -75
  112. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +0 -171
  113. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +0 -65
  114. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +0 -154
  115. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +0 -73
  116. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +0 -158
  117. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +0 -85
  118. package/src/components/Business/BsLayouts/Components/RightContent/home.less +0 -218
  119. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +0 -156
  120. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +0 -161
  121. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +0 -76
  122. package/src/components/Business/BsLayouts/index.less +0 -80
  123. package/src/components/Business/BsLayouts/index.tsx +0 -1465
  124. package/src/components/Business/BsLayouts/service.ts +0 -11
  125. package/src/components/Business/BsLayouts/utils.tsx +0 -211
  126. package/src/components/Business/BsSulaQueryTable/index.less +0 -220
  127. package/src/components/Business/BsSulaQueryTable/index.tsx +0 -505
  128. package/src/components/Business/BsSulaQueryTable/setting.tsx +0 -799
  129. package/src/components/Business/BsSulaQueryTable/utils.less +0 -65
  130. package/src/components/Business/BsSulaQueryTable/utils.tsx +0 -688
  131. package/src/components/Business/CommonAlert/index.less +0 -0
  132. package/src/components/Business/CommonAlert/index.tsx +0 -23
  133. package/src/components/Business/CommonGuideWrapper/index.less +0 -112
  134. package/src/components/Business/CommonGuideWrapper/index.md +0 -39
  135. package/src/components/Business/CommonGuideWrapper/index.tsx +0 -84
  136. package/src/components/Business/DetailPageWrapper/index.less +0 -80
  137. package/src/components/Business/DetailPageWrapper/index.tsx +0 -335
  138. package/src/components/Business/DetailPageWrapper/utils.tsx +0 -101
  139. package/src/components/Business/HomePageWrapper/index.less +0 -33
  140. package/src/components/Business/HomePageWrapper/index.md +0 -45
  141. package/src/components/Business/HomePageWrapper/index.tsx +0 -162
  142. package/src/components/Business/StateFlow/index.less +0 -131
  143. package/src/components/Business/StateFlow/index.md +0 -60
  144. package/src/components/Business/StateFlow/index.tsx +0 -30
  145. package/src/components/Business/TreeSearchSelect/index.md +0 -126
  146. package/src/components/Business/TreeSearchSelect/index.tsx +0 -34
  147. package/src/components/Business/TreeSearchSelect/utils.ts +0 -60
  148. package/src/components/Business/columnSettingTable/columnSetting.tsx +0 -764
  149. package/src/components/Business/columnSettingTable/index.less +0 -247
  150. package/src/components/Business/columnSettingTable/index.md +0 -358
  151. package/src/components/Business/columnSettingTable/index.tsx +0 -233
  152. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +0 -241
  153. package/src/components/Business/columnSettingTable/utils.tsx +0 -69
  154. package/src/components/Functional/AddSelect/index.less +0 -367
  155. package/src/components/Functional/AddSelect/index.md +0 -122
  156. package/src/components/Functional/AddSelect/index.tsx +0 -962
  157. package/src/components/Functional/BillEntry/index.less +0 -371
  158. package/src/components/Functional/BillEntry/index.md +0 -39
  159. package/src/components/Functional/BillEntry/index.tsx +0 -613
  160. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +0 -37
  161. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +0 -59
  162. package/src/components/Functional/TreeSearchSelect/index.md +0 -47
  163. package/src/components/Functional/TreeSearchSelect/index.tsx +0 -149
  164. package/src/styles/bsDefault.less +0 -1907
  165. package/src/utils/enumConfig.ts +0 -10
  166. package/src/utils/requestUtils.ts +0 -33
  167. package/src/utils/utils.ts +0 -52
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "1.2.4-alpha.1",
3
+ "version": "1.2.4",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -26,44 +26,23 @@
26
26
  "prettier --parser=typescript --write"
27
27
  ]
28
28
  },
29
- "peerDependencies": {
30
- "antd": "^4.17.2",
31
- "bssula": "^2.0.0",
32
- "umi-plugin-bssula": "1.0.13",
33
- "umi": "^3.5.20",
34
- "@ant-design/pro-layout": "^6.5.0",
35
- "react-dnd": "^16.0.1",
36
- "react-dnd-html5-backend": "^16.0.1"
37
- },
38
29
  "dependencies": {
39
- "@ant-design/icons": "^4.7.0",
40
- "@types/react-resizable": "^1.7.4",
41
- "@umijs/plugin-antd": "latest",
42
30
  "ahooks": "^3.1.2",
43
- "array-move": "^4.0.0",
31
+ "antd": "4.17.2",
44
32
  "axios": "^0.24.0",
45
33
  "classnames": "^2.3.1",
46
- "lodash": "^4.17.21",
34
+ "loadsh": "^0.0.4",
47
35
  "querystring": "^0.2.1",
48
36
  "react": "^16.12.0",
49
- "react-beautiful-dnd": "10.0.0",
50
- "react-resizable": "^3.0.4",
51
- "react-sortable-hoc": "^2.0.0",
52
- "warning": "^4.0.3"
37
+ "react-beautiful-dnd": "10.0.0"
53
38
  },
54
39
  "devDependencies": {
55
- "@ant-design/pro-layout": "^7.1.3",
56
- "antd": "^4.17.2",
57
- "@types/lodash": "^4.14.185",
58
40
  "@umijs/test": "^3.0.5",
59
- "bssula": "^2.1.29",
60
41
  "dumi": "^1.0.14",
61
42
  "father-build": "^1.17.2",
62
43
  "gh-pages": "^3.0.0",
63
44
  "lint-staged": "^10.0.7",
64
- "prettier": "^2.2.1",
65
- "react-dnd": "^16.0.1",
66
- "react-dnd-html5-backend": "^16.0.1"
45
+ "prettier": "^2.2.1"
67
46
  },
68
47
  "publishConfig": {
69
48
  "access": "public"
@@ -21,11 +21,11 @@ export default () => {
21
21
  const [choosedSku, setChoosedSku] = useState([]);
22
22
 
23
23
  const callbackHideModal = () => {
24
- console.log('关闭弹窗处理函数回调,可以处理刷新表格等操作(非必传)')
24
+ alert('关闭弹窗处理函数回调,可以处理刷新表格等操作(非必传)')
25
25
  }
26
26
 
27
27
  const callbackHandleOk = (resultData, callback) => {
28
- console.log('确定操作,可获取到成功录入的商品,做一系列操作')
28
+ alert('确定操作,可获取到成功录入的商品,做一系列操作')
29
29
  console.log(resultData)
30
30
  // 一般拿到导入数据是做请求接口操作
31
31
  // import {request} from "bssula";
@@ -53,8 +53,7 @@ export default () => {
53
53
 
54
54
  const props = {
55
55
  callbackHideModal,
56
- callbackHandleOk,
57
- isCheckStockNum: false // 默认为true,校验库存数量,false,则不校验库存
56
+ callbackHandleOk
58
57
  }
59
58
 
60
59
  return (
@@ -9,13 +9,10 @@ const CommodityEntry = (props: any) => {
9
9
  const {
10
10
  buttonName=' + 录入商品',
11
11
  modalTitle = '录入商品',
12
- buttonProps = {},
13
12
  callbackHideModal,
14
13
  callbackHandleOk,
15
14
  columns=["skuCode", "quantity", "price"],
16
- validDataUrl="/items/sku/import/check",
17
- isBrandAuth = true, // 默认做品牌过滤
18
- isCheckStockNum = true
15
+ validDataUrl="/bop/api/recordDetailImport/check"
19
16
  } = props;
20
17
 
21
18
  const [modalProps, setModalProps]: any = useState({
@@ -61,15 +58,13 @@ const CommodityEntry = (props: any) => {
61
58
 
62
59
  return (
63
60
  <div>
64
- <Button onClick={handleShowModal} {...buttonProps}>{buttonName}</Button>
61
+ <Button onClick={handleShowModal}>{buttonName}</Button>
65
62
  {modalProps.visible && (
66
63
  <Modal {...modalProps} onOk={handleOk} onCancel={handleCancel} destroyOnClose={true} zIndex={15}>
67
64
  <DataValidation
68
65
  onRef={(ref) => { dataValidationRef = ref }}
69
66
  columns={columns}
70
67
  validDataUrl={validDataUrl}
71
- isBrandAuth={isBrandAuth}
72
- isCheckStockNum={isCheckStockNum}
73
68
  />
74
69
  </Modal>
75
70
  ) || ''}
@@ -1,8 +1,7 @@
1
1
  // 此文件用于 处理业务组件 所用到的公共方法
2
2
  // @ts-nocheck
3
- import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type } from './common';
3
+ import { shopFileType, arrivalPaySupportList, sharingType } from './common';
4
4
  import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
5
- import ENUM from '@/utils/enumConfig';
6
5
 
7
6
  const hasDictSharingType = getDictionarySource('UC000013')?.length;
8
7
  const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
@@ -28,7 +27,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
28
27
  * */
29
28
  const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
30
29
  const data = reData && reData[position]?.data;
31
- const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
30
+ const list = Array.isArray(data) ? data :(data?.items || data?.list || []);
32
31
  const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
33
32
  changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
34
33
  }
@@ -64,7 +63,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
64
63
  tableColumns: [],
65
64
  ...modalTableBusProps,
66
65
  }
67
- let needModalTable = modalTableBusProps?.needModalTable !== undefined ? modalTableBusProps?.needModalTable : true;
66
+ let needModalTable = true;
68
67
 
69
68
  // 供应商选择器
70
69
  if(type === 'supplier') {
@@ -243,10 +242,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
243
242
  mappingValueField: 'skuCode',
244
243
  mappingTextShowTextField: ['name', 'propertyNameAndValue'],
245
244
  otherParams: {
246
- 'qp-combination-eq': false,
247
245
  'qp-approveStatus-eq': 1,
248
- 'qp-status-eq': 1,
249
- // 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
246
+ 'qp-type-eq': 10, // 查唯一国际条码
250
247
  sorter: 'desc-id'
251
248
  }, // 默认参数
252
249
  sourceName: 'skuCode',
@@ -254,12 +251,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
254
251
  }
255
252
  tableSearchForm = requestConfig.url.includes('v2') ? [
256
253
  requestConfig.url.includes('v2') ? { name: 'qp-skuName-like', label: 'SKU名称' } : { name: 'qp-name-like', label: 'SKU名称' },
257
- { name: 'qp-skuCode-in', label: 'SKU编码', field: {
258
- type: 'multipleQueryInput',
259
- props: {
260
- ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
261
- },
262
- }},
254
+ { name: 'qp-skuCode-like', label: 'SKU编码' },
263
255
  requestConfig.url.includes('v2') ? { name: 'qp-code-like', label: '国际条码' } : { name: 'qp-barCode-like', label: '国际条码'},
264
256
  { name: 'qp-itemName-like', label: '所属SPU名称' },
265
257
  { name: 'qp-itemCode-like', label: '所属SPU编码' },
@@ -324,12 +316,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
324
316
  } },
325
317
  ] : [
326
318
  { name: 'qp-name-like', label: 'SKU名称' },
327
- { name: 'qp-skuCode-in', label: 'SKU编码', field: {
328
- type: 'multipleQueryInput',
329
- props: {
330
- ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
331
- },
332
- }},
319
+ { name: 'qp-skuCode-like', label: 'SKU编码' },
333
320
  { name: 'qp-barCode-like', label: '国际条码'},
334
321
  { name: 'qp-itemName-like', label: '所属SPU名称' },
335
322
  { name: 'qp-itemCode-like', label: '所属SPU编码' },
@@ -384,7 +371,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
384
371
  loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
385
372
  pageSize: 5000,
386
373
  currentPage: 1,
387
- 'ctl-withAuth': true
388
374
  }),
389
375
  loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
390
376
  pageSize: 5000,
@@ -553,7 +539,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
553
539
  loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
554
540
  pageSize: 5000,
555
541
  currentPage: 1,
556
- 'ctl-withAuth': true
557
542
  }),
558
543
  loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
559
544
  pageSize: 5000,
@@ -765,7 +750,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
765
750
  mappingTextField: 'name',
766
751
  mappingValueField: 'code',
767
752
  otherParams: {
768
- 'qp-status-eq': 10,
769
753
  sorter: 'desc-id'
770
754
  }, // 默认参数
771
755
  sourceName: 'customCode',
@@ -1085,71 +1069,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1085
1069
  ...modalTableBusProps
1086
1070
  }
1087
1071
  }
1088
- if(type === 'shopFile2') {
1089
- requestConfig = {
1090
- url: `${prefixUrl.selectPrefix}/store/page`,
1091
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1092
- mappingTextField: 'name',
1093
- mappingValueField: 'code',
1094
- otherParams: {
1095
- sorter: 'desc-id'
1096
- }, // 默认参数
1097
- sourceName: 'code',
1098
- ...requestConfigProp,
1099
- }
1100
- tableSearchForm = [
1101
- { name: 'qp-name-like', label: '商店名称' },
1102
- { name: 'qp-code-like', label: '商店编码' },
1103
- { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1104
- { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1105
- type: 'select',
1106
- props: {
1107
- mode: 'multiple',
1108
- notFoundContent: '暂无数据',
1109
- allowClear: true,
1110
- showSearch: true,
1111
- showArrow: true,
1112
- maxTagCount: 1,
1113
- optionFilterProp: 'children',
1114
- filterOption: (input: string, option: { props: { children: string } }) =>
1115
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1116
- },
1117
- } },
1118
- ]
1119
- Promise.all([
1120
- loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1121
- 'qp-employeeCode-eq': JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')?.employeeResVo?.employeeNumber,
1122
- 'qp-realOrg-eq': true,
1123
- 'qp-status-eq': 10
1124
- }),
1125
- ]).then((x: any)=>{
1126
- formatSource(x,0, 3, tableSearchForm);
1127
- })
1128
- modalTableProps = {
1129
- modalTableTitle: '选择商店',
1130
- tableSearchForm,
1131
- tableColumns: [
1132
- {
1133
- title: '商店编码',
1134
- dataIndex: 'code',
1135
- },
1136
- {
1137
- title: '商店名称',
1138
- dataIndex: 'name',
1139
- },
1140
- {
1141
- title: '商店类型',
1142
- dataIndex: 'type',
1143
- render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1144
- },
1145
- {
1146
- title: '所属销售组织',
1147
- dataIndex: 'orgName',
1148
- },
1149
- ],
1150
- ...modalTableBusProps
1151
- }
1152
- }
1153
1072
 
1154
1073
  // 核算主体选择器(无弹窗)
1155
1074
  if(type === 'accountingSubject') {
@@ -1183,7 +1102,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1183
1102
  }
1184
1103
  needModalTable = false
1185
1104
  }
1186
-
1187
1105
  // 法人公司选择器(无弹窗)
1188
1106
  if(type === 'corporationCompany') {
1189
1107
  requestConfig = {
@@ -1211,7 +1129,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1211
1129
  mappingValueField: 'employeeNumber',
1212
1130
  otherParams: {
1213
1131
  'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1214
- 'qp-employmentType-eq': 20,
1215
1132
  sorter: 'desc-id'
1216
1133
  }, // 默认参数
1217
1134
  sourceName: 'employeeNumber',
@@ -1278,22 +1195,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1278
1195
  // 版本2
1279
1196
  requestConfig = {
1280
1197
  url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1281
- filter: 'qp-username,name-orGroup,like', // 过滤参数
1198
+ filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1282
1199
  mappingTextField: 'name',
1283
- mappingTextShowKeyField: 'username',
1200
+ mappingTextShowKeyField: 'employeeNumber',
1284
1201
  mappingValueField: 'id',
1285
1202
  otherParams: {
1286
1203
  'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1287
- 'qp-employmentType-eq': 20,
1288
1204
  sorter: 'desc-id'
1289
1205
  }, // 默认参数
1290
1206
  sourceName: 'employeeNumber',
1291
1207
  ...requestConfigProp,
1292
1208
  }
1293
1209
  tableSearchForm = [
1294
- { name: 'qp-username-like', label: '账户名称' },
1295
- { name: 'qp-name-like', label: '显示名称' },
1296
- // { name: 'qp-employeeNumber-like', label: '员工编码' },
1210
+ { name: 'qp-name-like', label: '员工名称' },
1211
+ { name: 'qp-employeeNumber-like', label: '员工编码' },
1297
1212
  { name: 'qp-directOrgCode-in', type: 'select', label: '所属组织机构', field: {
1298
1213
  type: 'select',
1299
1214
  props: {
@@ -1317,25 +1232,17 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1317
1232
  formatSource(x,0, 2, tableSearchForm);
1318
1233
  })
1319
1234
  modalTableProps = {
1320
- modalTableTitle: '添加员工',
1235
+ modalTableTitle: '选择员工',
1321
1236
  tableSearchForm,
1322
1237
  tableColumns: [
1323
1238
  {
1324
- title: '账户名称',
1325
- dataIndex: 'username',
1239
+ title: '员工编码',
1240
+ dataIndex: 'employeeNumber',
1326
1241
  },
1327
1242
  {
1328
- title: '显示名称',
1243
+ title: '员工名称',
1329
1244
  dataIndex: 'name',
1330
1245
  },
1331
- // {
1332
- // title: '员工编码',
1333
- // dataIndex: 'employeeNumber',
1334
- // },
1335
- // {
1336
- // title: '员工名称',
1337
- // dataIndex: 'name',
1338
- // },
1339
1246
  {
1340
1247
  title: '所属组织机构',
1341
1248
  dataIndex: 'directOrgName',
@@ -9,25 +9,6 @@ const shopFileType = [
9
9
  }
10
10
  ]
11
11
 
12
- const shopFile2Type = [
13
- {
14
- text: "第三方线上",
15
- value: 'online',
16
- },
17
- {
18
- text: "线下",
19
- value: 'offline',
20
- },
21
- {
22
- text: "自营B2B",
23
- value: 'B2B',
24
- },
25
- {
26
- text: "自营B2C",
27
- value: 'B2C',
28
- }
29
- ]
30
-
31
12
  const arrivalPaySupportList = [
32
13
  {
33
14
  text: "支持",
@@ -50,4 +31,4 @@ const sharingType = [
50
31
  }
51
32
  ]
52
33
 
53
- export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type }
34
+ export { shopFileType, arrivalPaySupportList, sharingType }
@@ -47,19 +47,17 @@ export default () => {
47
47
  // mappingTextField: 'name',
48
48
  // mappingValueField: 'code',
49
49
  // }, // 非必传,业务字段已根据业务默认默认
50
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' }, // 非必传,下拉框和tableForm下拉框接口前缀,默认为bop的接口
50
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' }, // 非必传,下拉框和tableForm下拉框接口前缀,默认为bop的接口
51
51
  selectProps, // 非必传
52
52
  onChange: (value: any) => {
53
53
  console.log(value)
54
54
  setValue(value)
55
55
  },
56
56
  selectBusinessType: 'supplier',
57
- disabled: true,
58
57
  };
59
58
 
60
59
  const props2 = {
61
- ...props,
62
- // prefixUrl: { selectPrefix: '/channel-manage/', formSelectFix: '/channel-manage/' },
60
+ prefixUrl: { selectPrefix: '/channel/api', formSelectFix: '/channel/api' },
63
61
  selectBusinessType: 'supplier2',
64
62
  }
65
63
 
@@ -135,7 +133,7 @@ export default () => {
135
133
  // }, // 默认参数
136
134
  // sourceName: 'skuCode',
137
135
  // },
138
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
136
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
139
137
  selectProps,
140
138
  selectBusinessType: 'skuCommodity',
141
139
  };
@@ -292,7 +290,7 @@ export default () => {
292
290
  console.log(value)
293
291
  setValue(value)
294
292
  },
295
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
293
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
296
294
  selectProps,
297
295
  selectBusinessType: 'spuCommodity',
298
296
  };
@@ -325,7 +323,7 @@ export default () => {
325
323
  ## 仓库选择器(物理仓) Select-Warehouse-001
326
324
 
327
325
  ```tsx
328
- import React, { useState, useEffect } from 'react';
326
+ import React, { useState } from 'react';
329
327
  import { Tabs } from 'antd';
330
328
  import {BusinessSearchSelect} from '../../../index.ts';
331
329
 
@@ -345,30 +343,21 @@ export default () => {
345
343
  const [ tabKey, setTabKey ] = useState('single')
346
344
  const [value, setValue] = useState(selectProps?.mode ? [] : null);
347
345
 
348
- useEffect(() => {
349
- if(tabKey === 'multiple') {
350
- setValue(['1540295745870573570', '1540173160826613762'])
351
- }
352
- },[tabKey])
353
-
354
346
  const props = {
355
347
  value,
356
348
  onChange: (value: any) => {
357
349
  console.log(value)
358
350
  setValue(value)
359
351
  },
360
- requestConfig: {
361
- // mappingValueField: 'physicalWarehouseCode',
362
- // sourceName: 'physicalWarehouseCode',
363
- filterInit: 'qp-id-in'
364
- },
352
+ // requestConfig: {
353
+ // mappingValueField: 'physicalWarehouseCode',
354
+ // sourceName: 'physicalWarehouseCode',
355
+ // },
365
356
  // modalTableProps: {
366
357
  // modalTableTitle: '选择物理仓-更改title测试',
367
- // needModalTable: false
368
358
  // },
369
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
359
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
370
360
  selectProps,
371
- // labelInValue: true,
372
361
  selectBusinessType: 'physicalWarehouse',
373
362
  };
374
363
 
@@ -435,7 +424,7 @@ export default () => {
435
424
  // }, // 默认参数
436
425
  // sourceName: 'warehouseIds',
437
426
  // },
438
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
427
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
439
428
  selectProps,
440
429
  selectBusinessType: 'realWarehouse',
441
430
  };
@@ -503,7 +492,7 @@ export default () => {
503
492
  // }, // 默认参数
504
493
  // sourceName: 'warehouseIds',
505
494
  // },
506
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
495
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
507
496
  selectProps,
508
497
  selectBusinessType: 'virtualWarehouse',
509
498
  };
@@ -571,7 +560,7 @@ export default () => {
571
560
  // }, // 默认参数
572
561
  // sourceName: 'warehouseIds',
573
562
  // },
574
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
563
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
575
564
  selectProps,
576
565
  selectBusinessType: 'channelWarehouse',
577
566
  };
@@ -640,14 +629,13 @@ export default () => {
640
629
  // }, // 默认参数
641
630
  // sourceName: 'customerCode',
642
631
  // },
643
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
632
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
644
633
  selectProps,
645
634
  selectBusinessType: 'customer',
646
635
  };
647
636
 
648
637
  const props2 = {
649
- ...props,
650
- // prefixUrl: { selectPrefix: '/channel-manage/', formSelectFix: '/channel-manage/' },
638
+ prefixUrl: { selectPrefix: '/channel/api', formSelectFix: '/channel/api' },
651
639
  selectBusinessType: 'customer2',
652
640
  }
653
641
 
@@ -725,17 +713,11 @@ export default () => {
725
713
  // }, // 默认参数
726
714
  // sourceName: 'code',
727
715
  // },
728
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
716
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
729
717
  selectProps,
730
718
  selectBusinessType: 'shopFile',
731
719
  };
732
720
 
733
- const props2 = {
734
- ...props,
735
- // prefixUrl: { selectPrefix: '/channel-manage/', formSelectFix: '/channel-manage/' },
736
- selectBusinessType: 'shopFile2',
737
- }
738
-
739
721
  const onTabChange = (key) => {
740
722
  setTabKey(key)
741
723
  setValue(key === 'single' ? null: [])
@@ -746,22 +728,12 @@ export default () => {
746
728
  <Tabs onChange={onTabChange} activeKey={tabKey}>
747
729
  <TabPane tab='单选' key='single'>
748
730
  {tabKey === 'single' && (
749
- <>
750
- <span>版本1:支持英伦项目...</span>
751
- <BusinessSearchSelect {...props} />
752
- <span>版本2:支持麦克英孚项目...</span>
753
- <BusinessSearchSelect {...props2} />
754
- </>
731
+ <BusinessSearchSelect {...props} />
755
732
  )}
756
733
  </TabPane>
757
734
  <TabPane tab='多选' key='multiple'>
758
735
  {tabKey === 'multiple' && (
759
- <>
760
- <span>版本1:支持英伦项目...</span>
761
- <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
762
- <span>版本2:支持麦克英孚项目...</span>
763
- <BusinessSearchSelect {...props2} selectProps={selectPropsMultiple} />
764
- </>
736
+ <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
765
737
  )}
766
738
  </TabPane>
767
739
  </Tabs>
@@ -810,7 +782,7 @@ export default () => {
810
782
  // }, // 默认参数
811
783
  // sourceName: 'accountingCode',
812
784
  // },
813
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
785
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
814
786
  selectProps,
815
787
  selectBusinessType: 'accountingSubject',
816
788
  };
@@ -879,30 +851,28 @@ export default () => {
879
851
  // }, // 默认参数
880
852
  // sourceName: 'inventoryOrgCode',
881
853
  // },
882
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
854
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
883
855
  selectProps,
884
856
  selectBusinessType: 'inventoryOrg',
885
857
  };
886
858
 
887
- const props2 = {
888
- ...props,
889
- selectBusinessType: 'inventoryOrg2',
890
- }
891
-
892
859
  const onTabChange = (key) => {
893
860
  setTabKey(key)
894
861
  setValue(key === 'single' ? null: [])
895
862
  }
896
863
 
897
864
  return (
898
-
899
865
  <div>
900
866
  <Tabs onChange={onTabChange} activeKey={tabKey}>
901
867
  <TabPane tab='单选' key='single'>
902
- {tabKey === 'single' && <BusinessSearchSelect {...props} />}
868
+ {tabKey === 'single' && (
869
+ <BusinessSearchSelect {...props} />
870
+ )}
903
871
  </TabPane>
904
872
  <TabPane tab='多选' key='multiple'>
905
- {tabKey === 'multiple' && <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />}
873
+ {tabKey === 'multiple' && (
874
+ <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
875
+ )}
906
876
  </TabPane>
907
877
  </Tabs>
908
878
  </div>
@@ -951,7 +921,7 @@ export default () => {
951
921
  // }, // 默认参数
952
922
  // sourceName: 'companyCode',
953
923
  // },
954
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
924
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
955
925
  selectProps,
956
926
  selectBusinessType: 'corporationCompany',
957
927
  };
@@ -1020,14 +990,14 @@ export default () => {
1020
990
  // }, // 默认参数
1021
991
  // sourceName: 'code',
1022
992
  // },
1023
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
993
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
1024
994
  selectProps,
1025
995
  selectBusinessType: 'employee',
1026
996
  };
1027
997
 
1028
998
  const props2 = {
1029
999
  ...props,
1030
- // prefixUrl: { selectPrefix: '/user/api', formSelectFix: '/user/api' },
1000
+ prefixUrl: { selectPrefix: '/user/api', formSelectFix: '/user/api' },
1031
1001
  selectBusinessType: 'employee2',
1032
1002
  }
1033
1003
 
@@ -1105,7 +1075,7 @@ export default () => {
1105
1075
  // }, // 默认参数
1106
1076
  // sourceName: 'deliveryModeCode',
1107
1077
  // },
1108
- // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
1078
+ prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
1109
1079
  selectProps,
1110
1080
  selectBusinessType: 'deliveryMode',
1111
1081
  };