@bit-sun/business-component 2.2.8 → 2.2.10

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 (179) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/components/Business/AddSelectBusiness/index.d.ts +1 -0
  9. package/dist/index.esm.js +586 -59
  10. package/dist/index.js +586 -58
  11. package/dist/utils/LocalstorageUtils.d.ts +6 -0
  12. package/docs/index.md +21 -21
  13. package/lib/assets/drag.svg +17 -17
  14. package/lib/assets/exportFail.svg +37 -37
  15. package/lib/assets/exportProcessing.svg +28 -28
  16. package/lib/assets/exportSuccess.svg +34 -34
  17. package/lib/assets/label_icon_bottom.svg +25 -25
  18. package/lib/assets/upExport.svg +22 -22
  19. package/package.json +77 -77
  20. package/src/assets/32.svg +27 -27
  21. package/src/assets/addIcon.svg +17 -17
  22. package/src/assets/allfunc.svg +27 -27
  23. package/src/assets/arrowRight.svg +24 -24
  24. package/src/assets/btn-delete.svg +29 -29
  25. package/src/assets/btn-edit.svg +19 -19
  26. package/src/assets/btn-more.svg +17 -17
  27. package/src/assets/btn-submit.svg +19 -19
  28. package/src/assets/caidan.svg +11 -11
  29. package/src/assets/close.svg +26 -26
  30. package/src/assets/drag.svg +17 -17
  31. package/src/assets/exportFail.svg +37 -37
  32. package/src/assets/exportProcessing.svg +28 -28
  33. package/src/assets/exportSuccess.svg +34 -34
  34. package/src/assets/fixed-left-active.svg +11 -11
  35. package/src/assets/fixed-left.svg +15 -15
  36. package/src/assets/fixed-right-active.svg +11 -11
  37. package/src/assets/fixed-right.svg +15 -15
  38. package/src/assets/guanbi.svg +15 -15
  39. package/src/assets/icon-quanping.svg +15 -15
  40. package/src/assets/icon-shezhi.svg +17 -17
  41. package/src/assets/label_icon_bottom.svg +25 -25
  42. package/src/assets/list-no-img.svg +21 -21
  43. package/src/assets/morentouxiang-32.svg +23 -23
  44. package/src/assets/scanning.svg +24 -24
  45. package/src/assets/upExport.svg +22 -22
  46. package/src/components/Business/AddSelectBusiness/index.md +93 -63
  47. package/src/components/Business/AddSelectBusiness/index.tsx +601 -344
  48. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  49. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  50. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  60. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  61. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  62. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  63. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  64. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -156
  65. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  66. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  67. package/src/components/Business/BsLayouts/index.less +79 -79
  68. package/src/components/Business/BsLayouts/index.tsx +1479 -1479
  69. package/src/components/Business/BsLayouts/service.ts +10 -10
  70. package/src/components/Business/BsLayouts/utils.tsx +230 -230
  71. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -538
  72. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  73. package/src/components/Business/BsSulaQueryTable/index.tsx +529 -529
  74. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  75. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  76. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  77. package/src/components/Business/CommodityEntry/index.md +70 -70
  78. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  79. package/src/components/Business/CommonAlert/index.tsx +23 -23
  80. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  81. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  82. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  83. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  84. package/src/components/Business/DetailPageWrapper/index.tsx +335 -335
  85. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  86. package/src/components/Business/HomePageWrapper/index.less +33 -33
  87. package/src/components/Business/HomePageWrapper/index.md +45 -45
  88. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  89. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  90. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  91. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  92. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  93. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  94. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  95. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  96. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  97. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  98. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  99. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  100. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  101. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  102. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  103. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  104. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  105. package/src/components/Business/JsonQueryTable/index.less +16 -16
  106. package/src/components/Business/JsonQueryTable/index.md +328 -328
  107. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  108. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  109. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  110. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  111. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  112. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  113. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  114. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  115. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  116. package/src/components/Business/JsonQueryTable/static.ts +356 -356
  117. package/src/components/Business/SearchSelect/BusinessUtils.ts +1723 -1586
  118. package/src/components/Business/SearchSelect/common.ts +53 -53
  119. package/src/components/Business/SearchSelect/index.md +1310 -1254
  120. package/src/components/Business/SearchSelect/index.tsx +51 -51
  121. package/src/components/Business/SearchSelect/utils.ts +100 -100
  122. package/src/components/Business/StateFlow/index.less +130 -130
  123. package/src/components/Business/StateFlow/index.md +60 -60
  124. package/src/components/Business/StateFlow/index.tsx +29 -29
  125. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  126. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  127. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  128. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  129. package/src/components/Business/columnSettingTable/index.less +247 -247
  130. package/src/components/Business/columnSettingTable/index.md +357 -357
  131. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  132. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  133. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  134. package/src/components/Business/moreTreeTable/index.less +99 -99
  135. package/src/components/Business/moreTreeTable/index.md +508 -508
  136. package/src/components/Business/moreTreeTable/index.tsx +315 -315
  137. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  138. package/src/components/Functional/AddSelect/index.less +367 -367
  139. package/src/components/Functional/AddSelect/index.md +155 -155
  140. package/src/components/Functional/AddSelect/index.tsx +1165 -1072
  141. package/src/components/Functional/BillEntry/index.less +371 -371
  142. package/src/components/Functional/BillEntry/index.md +39 -39
  143. package/src/components/Functional/BillEntry/index.tsx +766 -766
  144. package/src/components/Functional/DataImport/index.less +63 -63
  145. package/src/components/Functional/DataImport/index.md +44 -44
  146. package/src/components/Functional/DataImport/index.tsx +695 -695
  147. package/src/components/Functional/DataValidation/index.less +63 -63
  148. package/src/components/Functional/DataValidation/index.md +39 -39
  149. package/src/components/Functional/DataValidation/index.tsx +687 -687
  150. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  151. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  152. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  153. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  154. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  155. package/src/components/Functional/SearchSelect/index.less +115 -115
  156. package/src/components/Functional/SearchSelect/index.md +141 -141
  157. package/src/components/Functional/SearchSelect/index.tsx +813 -813
  158. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  159. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  160. package/src/components/Functional/TreeSearchSelect/index.tsx +160 -160
  161. package/src/index.ts +34 -34
  162. package/src/plugin/TableColumnSetting/index.less +247 -247
  163. package/src/plugin/TableColumnSetting/index.md +50 -50
  164. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  165. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  166. package/src/styles/bsDefault.less +1906 -1906
  167. package/src/utils/CheckOneUser/index.md +39 -39
  168. package/src/utils/CheckOneUser/index.ts +51 -51
  169. package/src/utils/LocalstorageUtils.ts +58 -33
  170. package/src/utils/TableUtils.tsx +18 -18
  171. package/src/utils/checkUtils.ts +39 -39
  172. package/src/utils/enumConfig.ts +11 -11
  173. package/src/utils/getFormMode.js +12 -12
  174. package/src/utils/index.ts +2 -2
  175. package/src/utils/requestUtils.ts +36 -33
  176. package/src/utils/serialize.js +7 -7
  177. package/src/utils/utils.ts +183 -183
  178. package/tsconfig.json +29 -29
  179. package/typings.d.ts +4 -4
package/dist/index.esm.js CHANGED
@@ -37,6 +37,40 @@ var ENUM = {
37
37
  }
38
38
  };
39
39
 
40
+ // 存储表头
41
+ var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
42
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
43
+ var configArray = JSON.parse(config);
44
+ var currentSetting = configArray.filter(function (item) {
45
+ return item.code === tableCode;
46
+ });
47
+ if (currentSetting.length) {
48
+ currentSetting[0].detail = JSON.stringify(configvalue);
49
+ } else {
50
+ configArray.push({
51
+ "code": tableCode,
52
+ "detail": JSON.stringify(configvalue)
53
+ });
54
+ }
55
+ localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
56
+ };
57
+ // 取表头
58
+ var getConfigTableColumns = function getConfigTableColumns(tableCode) {
59
+ if (!tableCode) return [];
60
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
61
+ var configArray = JSON.parse(config);
62
+ var configSetting = configArray.filter(function (item) {
63
+ return item.code === tableCode;
64
+ });
65
+ if (configSetting.length) {
66
+ return JSON.parse(configSetting[0].detail || '[]');
67
+ }
68
+ return [];
69
+ };
70
+ var getCurrentTenantId = function getCurrentTenantId() {
71
+ return localStorage.getItem('current_tenant_id') || '';
72
+ };
73
+
40
74
  var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
41
75
  function handleRequestAuthHeader(config) {
42
76
  var _config$url, _config$url2;
@@ -53,8 +87,11 @@ function handleRequestAuthHeader(config) {
53
87
  }
54
88
  // 处理请求头
55
89
  var handleRequestHeader = function handleRequestHeader(config) {
90
+ var _resposne$accountPers, _resposne$employeeRes;
56
91
  config.headers['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
57
- config.headers['x-tenant-id'] = (resposne === null || resposne === void 0 ? void 0 : resposne.tenantId) || '1';
92
+ config.headers['x-account-id'] = (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
93
+ config.headers['x-employee-id'] = (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
94
+ config.headers['x-tenant-id'] = getCurrentTenantId() || 1;
58
95
  if (localStorage.getItem('x-user-auth-context')) {
59
96
  config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
60
97
  }
@@ -2928,37 +2965,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
2928
2965
  var css_248z$4 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_quick_header {\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.add_select_quick_header_title {\n display: flex;\n justify-content: space-between;\n}\n.add_select_quick_header > span {\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 20px;\n}\n.add_select_quick_header > span > span {\n color: #ff0000;\n}\n.add_select_quick_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input,\n.add_select_wrapper_select .ant-input {\n height: auto;\n height: 22px;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select-selection-search-input {\n height: auto;\n height: 22px !important;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select .ant-select-arrow {\n top: 13px;\n}\n.add_select_wrapper_select .ant-select-selector {\n position: relative;\n top: 1px;\n height: 23px !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-select-selector .ant-select-selection-item,\n.add_select_wrapper_select .ant-select-selector ant-select-selection-search {\n height: 23px !important;\n line-height: 23px !important;\n font-size: 12px;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper_select_quick {\n margin: 0;\n}\n.react-resizable {\n position: relative;\n background-clip: padding-box;\n}\n.react-resizable-handle {\n position: absolute;\n width: 10px;\n height: 100%;\n bottom: 0;\n right: -5px;\n cursor: col-resize;\n z-index: 1;\n}\n";
2929
2966
  styleInject(css_248z$4);
2930
2967
 
2931
- // 存储表头
2932
- var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
2933
- var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
2934
- var configArray = JSON.parse(config);
2935
- var currentSetting = configArray.filter(function (item) {
2936
- return item.code === tableCode;
2937
- });
2938
- if (currentSetting.length) {
2939
- currentSetting[0].detail = JSON.stringify(configvalue);
2940
- } else {
2941
- configArray.push({
2942
- "code": tableCode,
2943
- "detail": JSON.stringify(configvalue)
2944
- });
2945
- }
2946
- localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
2947
- };
2948
- // 取表头
2949
- var getConfigTableColumns = function getConfigTableColumns(tableCode) {
2950
- if (!tableCode) return [];
2951
- var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
2952
- var configArray = JSON.parse(config);
2953
- var configSetting = configArray.filter(function (item) {
2954
- return item.code === tableCode;
2955
- });
2956
- if (configSetting.length) {
2957
- return JSON.parse(configSetting[0].detail || '[]');
2958
- }
2959
- return [];
2960
- };
2961
-
2962
2968
  var shezhi = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2234px%22%20height%3D%2234px%22%20viewBox%3D%220%200%2034%2034%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3E%E7%9F%A9%E5%BD%A2%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22%E5%88%97%E8%A1%A8%E5%8A%9F%E8%83%BD%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22%E6%98%9F%E6%BE%9C-%E6%90%9C%E7%B4%A2-%E6%90%9C%E7%B4%A2%E5%8A%9F%E8%83%BD%22%20transform%3D%22translate%28-1865.000000%2C%20-297.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22%E6%90%9C%E7%B4%A2%E7%BB%84%E4%BB%B6-%E6%A0%B7%E5%BC%8F%E4%B8%80%22%20transform%3D%22translate%28230.000000%2C%20284.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22%E7%A1%AE%E5%AE%9A%E5%A4%87%E4%BB%BD-2%22%20transform%3D%22translate%281636.000000%2C%2014.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.55801813%2C-4.10857923e-16%20L27.4419819%2C1.84149388e-16%20C29.0269041%2C-1.06996098e-16%2029.6016352%2C0.165023309%2030.181059%2C0.474902584%20C30.7604829%2C0.78478186%2031.2152181%2C1.2395171%2031.5250974%2C1.81894097%20C31.8349767%2C2.39836484%2032%2C2.97309593%2032%2C4.55801813%20L32%2C27.4419819%20C32%2C29.0269041%2031.8349767%2C29.6016352%2031.5250974%2C30.181059%20C31.2152181%2C30.7604829%2030.7604829%2C31.2152181%2030.181059%2C31.5250974%20C29.6016352%2C31.8349767%2029.0269041%2C32%2027.4419819%2C32%20L4.55801813%2C32%20C2.97309593%2C32%202.39836484%2C31.8349767%201.81894097%2C31.5250974%20C1.2395171%2C31.2152181%200.78478186%2C30.7604829%200.474902584%2C30.181059%20C0.165023309%2C29.6016352%202.03054919e-16%2C29.0269041%20-3.49474794e-16%2C27.4419819%20L1.22766259e-16%2C4.55801813%20C-7.13307317e-17%2C2.97309593%200.165023309%2C2.39836484%200.474902584%2C1.81894097%20C0.78478186%2C1.2395171%201.2395171%2C0.78478186%201.81894097%2C0.474902584%20C2.39836484%2C0.165023309%202.97309593%2C2.38720285e-16%204.55801813%2C-4.10857923e-16%20Z%22%20id%3D%22%E7%9F%A9%E5%BD%A2%22%20stroke%3D%22%23D9D9D9%22%20stroke-width%3D%220.888888889%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22scanning%22%20transform%3D%22translate%288.000000%2C%208.000000%29%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22%E7%BC%96%E7%BB%84%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.7386444%2C0%20L9.31914658%2C0.00400859106%20C10.1203579%2C0.00538861113%2010.7694605%2C0.676782175%2010.7705276%2C1.50523181%20L10.7714968%2C1.94016563%20C11.2713795%2C2.15465212%2011.7449087%2C2.42965745%2012.1821713%2C2.75942463%20L12.5276921%2C2.55398355%20C13.2221154%2C2.14077391%2014.108963%2C2.38638205%2014.5106808%2C3.10316266%20L15.8040818%2C5.41212013%20C16.1892138%2C6.09972811%2015.990279%2C6.97849852%2015.3500104%2C7.41792671%20L15.2710204%2C7.46803431%20L14.9240458%2C7.67497861%20C14.9836517%2C8.24420078%2014.9763827%2C8.82244228%2014.8983619%2C9.39717628%20L15.1435702%2C9.54399151%20C15.8102761%2C9.94190072%2016.0614337%2C10.8082131%2015.716369%2C11.5197335%20L15.6761471%2C11.5974003%20L14.4646437%2C13.7670587%20C14.079817%2C14.4564299%2013.2419875%2C14.7161258%2012.5538606%2C14.3593303%20L12.4782628%2C14.3172399%20L12.1434032%2C14.1168096%20C11.7223166%2C14.4300773%2011.2678576%2C14.692352%2010.7889425%2C14.8984879%20L10.7889425%2C15.4947682%20C10.7899403%2C16.2891527%2010.1930007%2C16.9472128%209.42624347%2C16.9969935%20L9.33368462%2C17%20L6.75318244%2C16.9959914%20C5.95216%2C16.9946121%205.30313532%2C16.3235232%205.30180138%2C15.4952693%20L5.30034758%2C14.7762254%20C4.90043094%2C14.5820591%204.5195493%2C14.3484795%204.16298822%2C14.0787278%20L3.54463691%2C14.4465175%20C2.85008695%2C14.8596428%201.96320036%2C14.6137998%201.56164819%2C13.8968373%20L0.268247179%2C11.5883809%20C-0.117195104%2C10.9006602%200.0817705641%2C10.0215335%200.722318635%2C9.58207327%20L0.80130867%2C9.53196569%20L1.43032121%2C9.15766204%20C1.38186108%2C8.68163998%201.37943806%2C8.20010611%201.42595979%2C7.71957437%20L0.727649258%2C7.30217819%20C0.0607645902%2C6.90443662%20-0.19061709%2C6.03808438%200.154365869%2C5.32643616%20L0.195072383%2C5.2487694%20L1.40657575%2C3.07911102%20C1.7914024%2C2.38973985%202.62923197%2C2.13004387%203.31735886%2C2.48683938%20L3.39247208%2C2.52892975%20L4.00113138%2C2.89220974%20C4.39780188%2C2.57239271%204.82771303%2C2.29929047%205.28290193%2C2.0779615%20L5.28290193%2C1.50573288%20C5.28164777%2C0.711155235%205.87865691%2C0.0527989874%206.64560094%2C0.00300645504%20L6.73815978%2C0%20L6.7386444%2C0%20Z%20M6.73670598%2C1.50322752%20L6.73815978%2C3.03150881%20L5.90270707%2C3.43788133%20C5.54507128%2C3.61175466%205.20730414%2C3.8262151%204.89619006%2C4.0772541%20L4.12373551%2C4.70059245%20L2.70239975%2C3.85176997%20L2.66605465%2C3.83072478%20L1.45455128%2C6.00038316%20L2.96650749%2C6.90282076%20L2.87249482%2C7.86939606%20C2.83614972%2C8.24470187%202.83760352%2C8.6235152%202.87588705%2C8.99882099%20L2.97571491%2C9.97191026%20L1.52675689%2C10.8347629%20L2.81967328%2C13.1432193%20L4.2584547%2C12.2878828%20L5.02170182%2C12.8656232%20C5.3027003%2C13.0784515%205.60293338%2C13.2627017%205.9182143%2C13.4158045%20L6.75269782%2C13.8211749%20L6.75560543%2C15.4927639%20L9.33562302%2C15.4967725%20L9.33416922%2C13.8958352%20L10.2306817%2C13.5100068%20C10.6067559%2C13.348282%2010.9636539%2C13.1424989%2011.2943817%2C12.8966899%20L12.0571442%2C12.3299732%20L13.2056494%2C13.0154449%20L14.4161836%2C10.8452855%20L13.3229229%2C10.1918826%20L13.4586113%2C9.18922982%20C13.5191865%2C8.74076695%2013.5259709%2C8.28679224%2013.4789646%2C7.83632505%20L13.3771983%2C6.86273469%20L14.5460567%2C6.16523712%20L13.2526557%2C3.85678072%20L12.0896125%2C4.54976861%20L11.3258808%2C3.97403247%20C10.9812567%2C3.71415335%2010.6081041%2C3.4973506%2010.2142053%2C3.32814572%20L9.31963118%2C2.94432162%20L9.31672357%2C1.50723611%20L6.73670598%2C1.50322752%20L6.73670598%2C1.50322752%20Z%20M9.63026065%2C5.81849263%20C11.020555%2C6.64989539%2011.4971522%2C8.48836517%2010.6954144%2C9.92731453%20C10.31057%2C10.6180868%209.67584239%2C11.1222493%208.93115445%2C11.3286616%20C8.18646651%2C11.5350739%207.39296008%2C11.4267887%206.72556016%2C11.0276771%20C5.33544167%2C10.1961028%204.85907177%2C8.35767345%205.66089098%2C6.91885517%20C6.04573388%2C6.22821897%206.68037324%2C5.72415423%207.42494422%2C5.51774917%20C8.16951519%2C5.3113441%208.9629043%2C5.41954018%209.63026065%2C5.81849263%20L9.63026065%2C5.81849263%20Z%20M6.91988529%2C7.6694668%20C6.5185962%2C8.38978735%206.75708884%2C9.31005529%207.45294678%2C9.72638311%20C7.78629255%2C9.92588707%208.18270902%2C9.98005276%208.55473096%2C9.87692908%20C8.92675291%2C9.7738054%209.24380592%2C9.5218675%209.4359355%2C9.17670291%20C9.82059563%2C8.48612828%209.61887592%2C7.60527314%208.97556421%2C7.16638665%20L8.90287401%2C7.11978659%20L8.82776082%2C7.07819729%20C8.14078385%2C6.72100469%207.30360294%2C6.98045534%206.91988529%2C7.6694668%20L6.91988529%2C7.6694668%20Z%22%20id%3D%22%E5%BD%A2%E7%8A%B6%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
2963
2969
 
2964
2970
  var close = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2024%2024%22%20class%3D%22design-iconfont%22%3E%20%20%3Cdefs%3E%20%20%20%20%3Cpath%20id%3D%22vpuagl2aub%22%20d%3D%22M0%200H24V24H0z%22%2F%3E%20%20%20%20%3Cpath%20d%3D%22M5.1277704%2C-2.07168062e-16%20L12.8722296%2C2.07168062e-16%20C14.6552671%2C-1.2037061e-16%2015.3018396%2C0.185651222%2015.9536914%2C0.534265408%20C16.6055433%2C0.882879593%2017.1171204%2C1.39445674%2017.4657346%2C2.04630859%20C17.8143488%2C2.69816044%2018%2C3.34473292%2018%2C5.1277704%20L18%2C12.8722296%20C18%2C14.6552671%2017.8143488%2C15.3018396%2017.4657346%2C15.9536914%20C17.1171204%2C16.6055433%2016.6055433%2C17.1171204%2015.9536914%2C17.4657346%20C15.3018396%2C17.8143488%2014.6552671%2C18%2012.8722296%2C18%20L5.1277704%2C18%20C3.34473292%2C18%202.69816044%2C17.8143488%202.04630859%2C17.4657346%20C1.39445674%2C17.1171204%200.882879593%2C16.6055433%200.534265408%2C15.9536914%20C0.185651222%2C15.3018396%208.02470732e-17%2C14.6552671%20-1.38112041e-16%2C12.8722296%20L1.38112041e-16%2C5.1277704%20C-8.02470732e-17%2C3.34473292%200.185651222%2C2.69816044%200.534265408%2C2.04630859%20C0.882879593%2C1.39445674%201.39445674%2C0.882879593%202.04630859%2C0.534265408%20C2.69816044%2C0.185651222%203.34473292%2C1.2037061e-16%205.1277704%2C-2.07168062e-16%20Z%22%20id%3D%229tkq7bared%22%2F%3E%20%20%20%20%3Cpath%20id%3D%22a485p4r8he%22%20d%3D%22M0%200H14V14H0z%22%2F%3E%20%20%20%20%3ClinearGradient%20x1%3D%22100%25%22%20y1%3D%2250%25%22%20x2%3D%220%25%22%20y2%3D%2250%25%22%20id%3D%22fsb3v12sda%22%3E%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%2310295B%22%20offset%3D%220%25%22%2F%3E%20%20%20%20%20%20%3Cstop%20stop-color%3D%22%230F2A61%22%20offset%3D%22100%25%22%2F%3E%20%20%20%20%3C%2FlinearGradient%3E%20%20%3C%2Fdefs%3E%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cmask%20id%3D%22hvyjhat2pc%22%20fill%3D%22%23fff%22%3E%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23vpuagl2aub%22%2F%3E%20%20%20%20%3C%2Fmask%3E%20%20%20%20%3Cg%20mask%3D%22url%28%23hvyjhat2pc%29%22%3E%20%20%20%20%20%20%3Cg%20transform%3D%22translate%285%205%29%22%3E%20%20%20%20%20%20%20%20%3Cmask%20id%3D%22ifetffbq2f%22%20fill%3D%22%23fff%22%3E%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23a485p4r8he%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fmask%3E%20%20%20%20%20%20%20%20%3Cg%20mask%3D%22url%28%23ifetffbq2f%29%22%3E%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.799503052%201.50303676e-15L0%200.796118532%204.44765885%205.26408461%200%209.7320507%200.799503052%2010.5281692%205.24340131%206.06358768%209.68729958%2010.5281692%2010.4868026%209.7320507%206.03951985%205.26446067%2010.4868026%200.796118532%209.68729958%200%205.24340131%204.46420549%200.799503052%200.000376053891z%22%20transform%3D%22translate%281.752867%201.756628%29%22%20fill%3D%22%23999%22%20fill-rule%3D%22nonzero%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
@@ -9889,7 +9895,11 @@ var AddSelect = function AddSelect(props) {
9889
9895
  buttonProps = _props$buttonProps === void 0 ? {} : _props$buttonProps,
9890
9896
  beforeShowModal = props.beforeShowModal,
9891
9897
  _props$tableCodeList = props.tableCodeList,
9892
- tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList;
9898
+ tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList,
9899
+ _props$businessType = props.businessType,
9900
+ businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
9901
+ _props$isAllowRepeate = props.isAllowRepeatedSelect,
9902
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
9893
9903
  var _ref = requestConfig || {},
9894
9904
  url = _ref.url,
9895
9905
  otherParams = _ref.otherParams,
@@ -9906,6 +9916,7 @@ var AddSelect = function AddSelect(props) {
9906
9916
  var realButtonProps = _objectSpread2({
9907
9917
  type: "primary"
9908
9918
  }, buttonProps);
9919
+ var selectRowKey = isAllowRepeatedSelect ? 'uuid' : mappingValueField;
9909
9920
  var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
9910
9921
  var initVal = value || (selectMode ? [] : null);
9911
9922
  var pageSize = 100; // 下拉框默认分页 条数
@@ -10057,7 +10068,9 @@ var AddSelect = function AddSelect(props) {
10057
10068
  var _record$packingUnitLi, _record$packingUnitLi2;
10058
10069
  // let
10059
10070
  if (record.needFocus === true && currentIndex === 0) ;
10060
- var precisionObj = {};
10071
+ var precisionObj = businessType == 'skc' ? {
10072
+ precision: 0
10073
+ } : {};
10061
10074
  var unitAccuracy = (_record$packingUnitLi = record.packingUnitList) === null || _record$packingUnitLi === void 0 ? void 0 : (_record$packingUnitLi2 = _record$packingUnitLi[0]) === null || _record$packingUnitLi2 === void 0 ? void 0 : _record$packingUnitLi2.unitAccuracy;
10062
10075
  var isCountUnitAccuracyCheck = item.dataIndex == 'count' && unitAccuracy !== undefined;
10063
10076
  if (isCountUnitAccuracyCheck) {
@@ -10181,6 +10194,53 @@ var AddSelect = function AddSelect(props) {
10181
10194
  }
10182
10195
  });
10183
10196
  }
10197
+ var selectLength = modalTableProps.selectColumn.filter(function (item) {
10198
+ return item.isSelectItem;
10199
+ }).length;
10200
+ if (item.isSelectItem) {
10201
+ return _objectSpread2(_objectSpread2({}, item), {}, {
10202
+ render: function render(text, record, index) {
10203
+ var _item$dataSource;
10204
+ if ((_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
10205
+ return /*#__PURE__*/React.createElement(Select, {
10206
+ value: text || null,
10207
+ onChange: function onChange(value) {
10208
+ if (businessType == 'skc' && popvalue.some(function (i) {
10209
+ return i.code == record.code && i[item.dataIndex] == value;
10210
+ })) {
10211
+ message.warning('相同skc配码不可设置相同哦');
10212
+ record[item.dataIndex] = null;
10213
+ var _newPopValue = popvalue.map(function (i, innerIndex) {
10214
+ if (innerIndex == index) {
10215
+ i[item.dataIndex] = record[item.dataIndex];
10216
+ }
10217
+ return i;
10218
+ });
10219
+ setPopValue(_newPopValue);
10220
+ return false;
10221
+ }
10222
+ record[item.dataIndex] = value;
10223
+ var newPopValue = popvalue.map(function (i, innerIndex) {
10224
+ if (innerIndex == index) {
10225
+ i[item.dataIndex] = record[item.dataIndex];
10226
+ }
10227
+ return i;
10228
+ });
10229
+ setPopValue(newPopValue);
10230
+ },
10231
+ style: {
10232
+ width: '160px'
10233
+ }
10234
+ }, item.dataSource.map(function (item) {
10235
+ return /*#__PURE__*/React.createElement(Select.Option, {
10236
+ value: item.code
10237
+ }, item.name);
10238
+ }));
10239
+ }
10240
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
10241
+ }
10242
+ });
10243
+ }
10184
10244
  return item;
10185
10245
  })), [{
10186
10246
  title: '操作',
@@ -10387,18 +10447,42 @@ var AddSelect = function AddSelect(props) {
10387
10447
  };
10388
10448
 
10389
10449
  useEffect(function () {
10390
- Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10391
- pageSize: 5000,
10392
- currentPage: 1,
10393
- 'ctl-withAuth': true
10394
- }), loadSelectSource("/items/category/queryCategoryTree", {
10395
- pageSize: 5000,
10396
- currentPage: 1
10397
- })]).then(function (x) {
10398
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10399
- formatTreeDataSource(x, 1, 3, tableSearchForm);
10400
- });
10401
- }, []);
10450
+ if (businessType == 'sku') {
10451
+ Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10452
+ pageSize: 5000,
10453
+ currentPage: 1,
10454
+ 'ctl-withAuth': true
10455
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10456
+ pageSize: 5000,
10457
+ currentPage: 1
10458
+ })]).then(function (x) {
10459
+ formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10460
+ formatTreeDataSource(x, 1, 3, tableSearchForm);
10461
+ });
10462
+ }
10463
+ if (businessType == 'skc') {
10464
+ Promise.all([loadSelectSource("/items/item/propertyValue", {
10465
+ pageSize: 5000,
10466
+ currentPage: 1,
10467
+ 'qp-propertyId-eq': '1467042217951883265'
10468
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10469
+ pageSize: 5000,
10470
+ currentPage: 1
10471
+ }), loadSelectSource("/items/class/withProperty", {
10472
+ pageSize: 5000,
10473
+ currentPage: 1
10474
+ }), loadSelectSource("/items/brand/queryBrandList", {
10475
+ pageSize: 5000,
10476
+ currentPage: 1,
10477
+ 'ctl-withAuth': true
10478
+ })]).then(function (x) {
10479
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
10480
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
10481
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
10482
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
10483
+ });
10484
+ }
10485
+ }, [businessType]);
10402
10486
  useEffect(function () {
10403
10487
  if (value) {
10404
10488
  setPopValue(value);
@@ -10528,8 +10612,18 @@ var AddSelect = function AddSelect(props) {
10528
10612
  selectRows[selectedRowKeys.length]['needFocus'] = true;
10529
10613
  }
10530
10614
  }
10531
- setPopValue(selectRows);
10532
- setSelectedRowKeys(selectKeys);
10615
+ if (isAllowRepeatedSelect) {
10616
+ var list = popvalue.concat(selectRows).map(function (i) {
10617
+ return _objectSpread2(_objectSpread2({}, i), {}, {
10618
+ uuid: i.uuid || uuid()
10619
+ });
10620
+ });
10621
+ setPopValue(list);
10622
+ setSelectedRowKeys([]);
10623
+ } else {
10624
+ setPopValue(selectRows);
10625
+ setSelectedRowKeys(selectKeys);
10626
+ }
10533
10627
  // setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
10534
10628
  // setCheckedAll(filterRows.length === tablePagination?.total);
10535
10629
  };
@@ -10646,12 +10740,19 @@ var AddSelect = function AddSelect(props) {
10646
10740
  setSelectedRowKeys([]);
10647
10741
  };
10648
10742
  var deleteRecord = function deleteRecord(record) {
10649
- setPopValue(popvalue.filter(function (item) {
10650
- return item.skuCode !== record.skuCode;
10651
- }));
10652
- setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10653
- return item !== record.skuCode;
10654
- })));
10743
+ if (isAllowRepeatedSelect) {
10744
+ setPopValue(popvalue.filter(function (item) {
10745
+ return item.uuid !== record.uuid;
10746
+ }));
10747
+ setSelectedRowKeys([]);
10748
+ } else {
10749
+ setPopValue(popvalue.filter(function (item) {
10750
+ return item.skuCode !== record.skuCode;
10751
+ }));
10752
+ setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10753
+ return item !== record.skuCode;
10754
+ })));
10755
+ }
10655
10756
  };
10656
10757
  var inputIndex = 0;
10657
10758
  useEffect(function () {
@@ -10723,6 +10824,7 @@ var AddSelect = function AddSelect(props) {
10723
10824
  handleColumns(showSelectedCol, [], function (res) {
10724
10825
  return setShowColumnsCallback(res);
10725
10826
  });
10827
+ var selectLength = isAllowRepeatedSelect ? (popvalue === null || popvalue === void 0 ? void 0 : popvalue.length) || 0 : (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0;
10726
10828
  return /*#__PURE__*/React.createElement("div", {
10727
10829
  className: 'add_select'
10728
10830
  }, /*#__PURE__*/React.createElement("div", {
@@ -10808,7 +10910,7 @@ var AddSelect = function AddSelect(props) {
10808
10910
  style: themeColor
10809
10911
  }, (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total) || 0), "\xA0\u9879", selectMode ? /*#__PURE__*/React.createElement("span", null, "\uFF0C \u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React.createElement("span", {
10810
10912
  style: themeColor
10811
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879") : ''), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10913
+ }, selectLength), "\xA0\u9879") : ''), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10812
10914
  style: {
10813
10915
  marginRight: 8
10814
10916
  }
@@ -10851,7 +10953,7 @@ var AddSelect = function AddSelect(props) {
10851
10953
  }
10852
10954
  }, /*#__PURE__*/React.createElement("span", null, "\u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React.createElement("span", {
10853
10955
  style: themeColor
10854
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879")), /*#__PURE__*/React.createElement("div", {
10956
+ }, selectLength), "\xA0\u9879")), /*#__PURE__*/React.createElement("div", {
10855
10957
  style: {
10856
10958
  display: 'flex'
10857
10959
  }
@@ -10885,7 +10987,7 @@ var AddSelect = function AddSelect(props) {
10885
10987
  dataSource: popvalue,
10886
10988
  pagination: false,
10887
10989
  // onChange={handleTableChange}
10888
- rowKey: mappingValueField,
10990
+ rowKey: selectRowKey,
10889
10991
  rowClassName: 'row-class',
10890
10992
  scroll: {
10891
10993
  y: 500
@@ -11935,6 +12037,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
11935
12037
  case 'skuCommodity':
11936
12038
  case 'skuPropertyValue':
11937
12039
  case 'spuCommodity':
12040
+ case 'skcCommodity':
11938
12041
  result = '/items';
11939
12042
  break;
11940
12043
  case 'physicalWarehouse':
@@ -12634,6 +12737,155 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
12634
12737
  }]
12635
12738
  }, modalTableBusProps);
12636
12739
  }
12740
+ // 商品选择器skc
12741
+ if (type === 'skcCommodity') {
12742
+ requestConfig = _objectSpread2({
12743
+ url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
12744
+ filter: 'qp-code,name-orGroup,like',
12745
+ mappingTextField: 'name',
12746
+ mappingValueField: 'code',
12747
+ sourceName: 'qp-skcCode-eq'
12748
+ }, requestConfigProp);
12749
+ tableSearchForm = [{
12750
+ name: 'qp-code-like',
12751
+ label: 'SKC编码'
12752
+ }, {
12753
+ name: 'qp-skcName-like',
12754
+ label: 'SKC名称'
12755
+ }, {
12756
+ name: 'qp-itemName-like',
12757
+ label: '商品名称'
12758
+ }, {
12759
+ name: 'qp-colorName-in',
12760
+ type: 'select',
12761
+ label: '颜色',
12762
+ field: {
12763
+ type: 'select',
12764
+ props: {
12765
+ mode: 'multiple',
12766
+ notFoundContent: '暂无数据',
12767
+ allowClear: true,
12768
+ showSearch: true,
12769
+ showArrow: true,
12770
+ maxTagCount: 1,
12771
+ optionFilterProp: 'children',
12772
+ filterOption: function filterOption(input, option) {
12773
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12774
+ }
12775
+ }
12776
+ }
12777
+ }, {
12778
+ name: 'qp-categoryId-in',
12779
+ type: 'treeSelect',
12780
+ label: '类目',
12781
+ field: {
12782
+ type: 'treeSelect',
12783
+ props: {
12784
+ treeData: [],
12785
+ treeCheckable: true,
12786
+ showSearch: true,
12787
+ allowClear: true,
12788
+ showArrow: true,
12789
+ treeNodeFilterProp: 'title',
12790
+ treeDefaultExpandAll: true,
12791
+ maxTagCount: 1,
12792
+ placeholder: '请选择',
12793
+ style: {
12794
+ width: '100%'
12795
+ },
12796
+ dropdownStyle: {
12797
+ maxHeight: 400,
12798
+ maxWidth: 100,
12799
+ overflow: 'auto'
12800
+ }
12801
+ }
12802
+ }
12803
+ }, {
12804
+ name: 'qp-classId-in',
12805
+ type: 'select',
12806
+ label: '品类',
12807
+ field: {
12808
+ type: 'select',
12809
+ props: {
12810
+ mode: 'multiple',
12811
+ notFoundContent: '暂无数据',
12812
+ allowClear: true,
12813
+ showSearch: true,
12814
+ showArrow: true,
12815
+ maxTagCount: 1,
12816
+ optionFilterProp: 'children',
12817
+ filterOption: function filterOption(input, option) {
12818
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12819
+ }
12820
+ }
12821
+ }
12822
+ }, {
12823
+ name: 'qp-brandId-in',
12824
+ type: 'select',
12825
+ label: '品牌',
12826
+ field: {
12827
+ type: 'select',
12828
+ props: {
12829
+ mode: 'multiple',
12830
+ notFoundContent: '暂无数据',
12831
+ allowClear: true,
12832
+ showSearch: true,
12833
+ showArrow: true,
12834
+ maxTagCount: 1,
12835
+ optionFilterProp: 'children',
12836
+ filterOption: function filterOption(input, option) {
12837
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12838
+ }
12839
+ }
12840
+ }
12841
+ }];
12842
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/item/propertyValue"), {
12843
+ pageSize: 5000,
12844
+ currentPage: 1,
12845
+ 'qp-propertyId-eq': '1467042217951883265'
12846
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
12847
+ pageSize: 5000,
12848
+ currentPage: 1
12849
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
12850
+ pageSize: 5000,
12851
+ currentPage: 1
12852
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
12853
+ pageSize: 5000,
12854
+ currentPage: 1,
12855
+ 'ctl-withAuth': true
12856
+ })]).then(function (x) {
12857
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
12858
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
12859
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
12860
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
12861
+ });
12862
+ modalTableProps = _objectSpread2({
12863
+ modalTableTitle: '选择SKC',
12864
+ tableSearchForm: tableSearchForm,
12865
+ tableColumns: [{
12866
+ title: 'SKC编码',
12867
+ dataIndex: 'code'
12868
+ }, {
12869
+ title: 'SKC名称',
12870
+ dataIndex: 'name'
12871
+ }, {
12872
+ title: '商品名称',
12873
+ dataIndex: 'itemName'
12874
+ }, {
12875
+ title: '颜色',
12876
+ dataIndex: 'colorName'
12877
+ }, {
12878
+ title: '类目',
12879
+ dataIndex: 'categoryText'
12880
+ }, {
12881
+ title: '品类',
12882
+ dataIndex: 'className'
12883
+ }, {
12884
+ title: '品牌',
12885
+ dataIndex: 'brandName'
12886
+ }]
12887
+ }, modalTableBusProps);
12888
+ }
12637
12889
  // 商品规格选择器(无弹窗)
12638
12890
  if (type === 'skuPropertyValue') {
12639
12891
  requestConfig = _objectSpread2({
@@ -13863,7 +14115,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
13863
14115
  setValue(value);
13864
14116
  },
13865
14117
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
13866
- onSaveCallback: parProps.onSaveCallback
14118
+ onSaveCallback: parProps.onSaveCallback,
14119
+ businessType: 'sku'
13867
14120
  // onSaveCallback: (rows) => {
13868
14121
  // console.log('save call', rows);
13869
14122
  // // return Promise.resolve(true);
@@ -14069,6 +14322,280 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14069
14322
  modalTableProps: modalTableProps
14070
14323
  })));
14071
14324
  };
14325
+ var AddSkcSelect = function AddSkcSelect(parProps) {
14326
+ var selectProps = {
14327
+ mode: 'multiple'
14328
+ };
14329
+ var _useState3 = useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
14330
+ _useState4 = _slicedToArray(_useState3, 2),
14331
+ value = _useState4[0],
14332
+ setValue = _useState4[1];
14333
+ var _useState5 = useState([]),
14334
+ _useState6 = _slicedToArray(_useState5, 2),
14335
+ propertyList = _useState6[0],
14336
+ setPropertyList = _useState6[1];
14337
+ useEffect(function () {
14338
+ axios.get("/items/itemPropertyValueGroup/listNoPage").then(function (result) {
14339
+ var _result, _result2;
14340
+ result = result.data;
14341
+ if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
14342
+ message.error(result.msg);
14343
+ return;
14344
+ }
14345
+ var data = result.data || [];
14346
+ setPropertyList(data);
14347
+ }).catch(function (err) {});
14348
+ }, []);
14349
+ var initialSelectColumn = [{
14350
+ title: 'SKC编码',
14351
+ width: 150,
14352
+ dataIndex: 'code'
14353
+ }, {
14354
+ title: 'SKC名称',
14355
+ width: 200,
14356
+ ellipsis: {
14357
+ showTitle: false
14358
+ },
14359
+ render: function render(text) {
14360
+ return /*#__PURE__*/React.createElement(Tooltip, {
14361
+ placement: "topLeft",
14362
+ title: text
14363
+ }, text);
14364
+ },
14365
+ dataIndex: 'name'
14366
+ }, {
14367
+ title: '颜色',
14368
+ width: 200,
14369
+ ellipsis: {
14370
+ showTitle: false
14371
+ },
14372
+ render: function render(text) {
14373
+ return /*#__PURE__*/React.createElement(Tooltip, {
14374
+ placement: "topLeft",
14375
+ title: text
14376
+ }, text);
14377
+ },
14378
+ dataIndex: 'colorName'
14379
+ }, {
14380
+ title: '配码',
14381
+ dataIndex: 'selectPropertyGroupCode',
14382
+ width: 160,
14383
+ isSelectItem: true,
14384
+ dataSource: propertyList
14385
+ }, {
14386
+ title: '数量',
14387
+ width: 100,
14388
+ isInputItem: true,
14389
+ dataIndex: 'count'
14390
+ }];
14391
+ var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
14392
+ var props = {
14393
+ buttonText: parProps.buttonText || '新增',
14394
+ buttonProps: parProps.buttonProps || {},
14395
+ tableCodeList: parProps.tableCodeList || ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
14396
+ value: value,
14397
+ // labelInValue: true, // 非必填 默认为false
14398
+ requestConfig: _objectSpread2({
14399
+ url: "/items/skc/skcSelect",
14400
+ filter: 'qp-name-like',
14401
+ otherParams: {},
14402
+ mappingTextField: 'name',
14403
+ mappingValueField: 'code'
14404
+ }, parProps.requestConfig),
14405
+ selectProps: selectProps,
14406
+ onChange: function onChange(value) {
14407
+ console.log(value);
14408
+ setValue(value);
14409
+ },
14410
+ beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
14411
+ onSaveCallback: parProps.onSaveCallback,
14412
+ businessType: 'skc',
14413
+ isAllowRepeatedSelect: true
14414
+ };
14415
+ var modalTableProps = {
14416
+ modalTableTitle: '选择商品',
14417
+ tableSearchForm: [{
14418
+ name: 'qp-code-like',
14419
+ label: 'SKC编码'
14420
+ }, {
14421
+ name: 'qp-skcName-like',
14422
+ label: 'SKC名称'
14423
+ }, {
14424
+ name: 'qp-itemName-like',
14425
+ label: '商品名称'
14426
+ }, {
14427
+ name: 'qp-colorName-in',
14428
+ type: 'select',
14429
+ label: '颜色',
14430
+ field: {
14431
+ type: 'select',
14432
+ props: {
14433
+ mode: 'multiple',
14434
+ notFoundContent: '暂无数据',
14435
+ allowClear: true,
14436
+ showSearch: true,
14437
+ showArrow: true,
14438
+ maxTagCount: 1,
14439
+ optionFilterProp: 'children',
14440
+ filterOption: function filterOption(input, option) {
14441
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14442
+ }
14443
+ }
14444
+ }
14445
+ }, {
14446
+ name: 'qp-categoryId-in',
14447
+ type: 'treeSelect',
14448
+ label: '类目',
14449
+ field: {
14450
+ type: 'treeSelect',
14451
+ props: {
14452
+ treeData: [],
14453
+ treeCheckable: true,
14454
+ showSearch: true,
14455
+ allowClear: true,
14456
+ showArrow: true,
14457
+ treeNodeFilterProp: 'title',
14458
+ treeDefaultExpandAll: true,
14459
+ maxTagCount: 1,
14460
+ placeholder: '请选择',
14461
+ style: {
14462
+ width: '100%'
14463
+ },
14464
+ dropdownStyle: {
14465
+ maxHeight: 400,
14466
+ maxWidth: 100,
14467
+ overflow: 'auto'
14468
+ }
14469
+ }
14470
+ }
14471
+ }, {
14472
+ name: 'qp-classId-in',
14473
+ type: 'select',
14474
+ label: '品类',
14475
+ field: {
14476
+ type: 'select',
14477
+ props: {
14478
+ mode: 'multiple',
14479
+ notFoundContent: '暂无数据',
14480
+ allowClear: true,
14481
+ showSearch: true,
14482
+ showArrow: true,
14483
+ maxTagCount: 1,
14484
+ optionFilterProp: 'children',
14485
+ filterOption: function filterOption(input, option) {
14486
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14487
+ }
14488
+ }
14489
+ }
14490
+ }, {
14491
+ name: 'qp-brandId-in',
14492
+ type: 'select',
14493
+ label: '品牌',
14494
+ field: {
14495
+ type: 'select',
14496
+ props: {
14497
+ mode: 'multiple',
14498
+ notFoundContent: '暂无数据',
14499
+ allowClear: true,
14500
+ showSearch: true,
14501
+ showArrow: true,
14502
+ maxTagCount: 1,
14503
+ optionFilterProp: 'children',
14504
+ filterOption: function filterOption(input, option) {
14505
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14506
+ }
14507
+ }
14508
+ }
14509
+ }],
14510
+ tableColumns: [{
14511
+ title: 'SKC编码',
14512
+ width: 150,
14513
+ dataIndex: 'code'
14514
+ }, {
14515
+ title: 'SKC名称',
14516
+ width: 200,
14517
+ ellipsis: {
14518
+ showTitle: false
14519
+ },
14520
+ render: function render(text) {
14521
+ return /*#__PURE__*/React.createElement(Tooltip, {
14522
+ placement: "topLeft",
14523
+ title: text
14524
+ }, text);
14525
+ },
14526
+ dataIndex: 'name'
14527
+ }, {
14528
+ title: '商品名称',
14529
+ width: 100,
14530
+ ellipsis: {
14531
+ showTitle: false
14532
+ },
14533
+ dataIndex: 'itemName',
14534
+ render: function render(text) {
14535
+ return /*#__PURE__*/React.createElement(Tooltip, {
14536
+ placement: "topLeft",
14537
+ title: text
14538
+ }, text);
14539
+ }
14540
+ }, {
14541
+ title: '颜色',
14542
+ width: 100,
14543
+ ellipsis: {
14544
+ showTitle: false
14545
+ },
14546
+ render: function render(text) {
14547
+ return /*#__PURE__*/React.createElement(Tooltip, {
14548
+ placement: "topLeft",
14549
+ title: text
14550
+ }, text);
14551
+ },
14552
+ dataIndex: 'colorName'
14553
+ }, {
14554
+ title: '类目',
14555
+ width: 100,
14556
+ ellipsis: {
14557
+ showTitle: false
14558
+ },
14559
+ render: function render(text) {
14560
+ return /*#__PURE__*/React.createElement(Tooltip, {
14561
+ placement: "topLeft",
14562
+ title: text
14563
+ }, text);
14564
+ },
14565
+ dataIndex: 'categoryName'
14566
+ }, {
14567
+ title: '品类',
14568
+ width: 100,
14569
+ ellipsis: {
14570
+ showTitle: false
14571
+ },
14572
+ render: function render(text) {
14573
+ return /*#__PURE__*/React.createElement(Tooltip, {
14574
+ placement: "topLeft",
14575
+ title: text
14576
+ }, text);
14577
+ },
14578
+ dataIndex: 'className'
14579
+ }, {
14580
+ title: '品牌',
14581
+ width: 100,
14582
+ ellipsis: {
14583
+ showTitle: false
14584
+ },
14585
+ render: function render(text) {
14586
+ return /*#__PURE__*/React.createElement(Tooltip, {
14587
+ placement: "topLeft",
14588
+ title: text
14589
+ }, text);
14590
+ },
14591
+ dataIndex: 'brandName'
14592
+ }],
14593
+ selectColumn: mTpSelectColumn
14594
+ };
14595
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14596
+ modalTableProps: modalTableProps
14597
+ })));
14598
+ };
14072
14599
 
14073
14600
  var CommodityEntry = function CommodityEntry(props) {
14074
14601
  var dataValidationRef = useRef();
@@ -29926,4 +30453,4 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
29926
30453
  }, "setting"));
29927
30454
  });
29928
30455
 
29929
- export { AddSelect, AddSkuSelect, BillEntry, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };
30456
+ export { AddSelect, AddSkcSelect, AddSkuSelect, BillEntry, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };