@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.js CHANGED
@@ -55,6 +55,40 @@ var ENUM = {
55
55
  }
56
56
  };
57
57
 
58
+ // 存储表头
59
+ var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
60
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
61
+ var configArray = JSON.parse(config);
62
+ var currentSetting = configArray.filter(function (item) {
63
+ return item.code === tableCode;
64
+ });
65
+ if (currentSetting.length) {
66
+ currentSetting[0].detail = JSON.stringify(configvalue);
67
+ } else {
68
+ configArray.push({
69
+ "code": tableCode,
70
+ "detail": JSON.stringify(configvalue)
71
+ });
72
+ }
73
+ localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
74
+ };
75
+ // 取表头
76
+ var getConfigTableColumns = function getConfigTableColumns(tableCode) {
77
+ if (!tableCode) return [];
78
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
79
+ var configArray = JSON.parse(config);
80
+ var configSetting = configArray.filter(function (item) {
81
+ return item.code === tableCode;
82
+ });
83
+ if (configSetting.length) {
84
+ return JSON.parse(configSetting[0].detail || '[]');
85
+ }
86
+ return [];
87
+ };
88
+ var getCurrentTenantId = function getCurrentTenantId() {
89
+ return localStorage.getItem('current_tenant_id') || '';
90
+ };
91
+
58
92
  var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
59
93
  function handleRequestAuthHeader(config) {
60
94
  var _config$url, _config$url2;
@@ -71,8 +105,11 @@ function handleRequestAuthHeader(config) {
71
105
  }
72
106
  // 处理请求头
73
107
  var handleRequestHeader = function handleRequestHeader(config) {
108
+ var _resposne$accountPers, _resposne$employeeRes;
74
109
  config.headers['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
75
- config.headers['x-tenant-id'] = (resposne === null || resposne === void 0 ? void 0 : resposne.tenantId) || '1';
110
+ 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;
111
+ 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;
112
+ config.headers['x-tenant-id'] = getCurrentTenantId() || 1;
76
113
  if (localStorage.getItem('x-user-auth-context')) {
77
114
  config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
78
115
  }
@@ -2946,37 +2983,6 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2946
2983
  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";
2947
2984
  styleInject(css_248z$4);
2948
2985
 
2949
- // 存储表头
2950
- var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
2951
- var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
2952
- var configArray = JSON.parse(config);
2953
- var currentSetting = configArray.filter(function (item) {
2954
- return item.code === tableCode;
2955
- });
2956
- if (currentSetting.length) {
2957
- currentSetting[0].detail = JSON.stringify(configvalue);
2958
- } else {
2959
- configArray.push({
2960
- "code": tableCode,
2961
- "detail": JSON.stringify(configvalue)
2962
- });
2963
- }
2964
- localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
2965
- };
2966
- // 取表头
2967
- var getConfigTableColumns = function getConfigTableColumns(tableCode) {
2968
- if (!tableCode) return [];
2969
- var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
2970
- var configArray = JSON.parse(config);
2971
- var configSetting = configArray.filter(function (item) {
2972
- return item.code === tableCode;
2973
- });
2974
- if (configSetting.length) {
2975
- return JSON.parse(configSetting[0].detail || '[]');
2976
- }
2977
- return [];
2978
- };
2979
-
2980
2986
  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";
2981
2987
 
2982
2988
  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";
@@ -9907,7 +9913,11 @@ var AddSelect = function AddSelect(props) {
9907
9913
  buttonProps = _props$buttonProps === void 0 ? {} : _props$buttonProps,
9908
9914
  beforeShowModal = props.beforeShowModal,
9909
9915
  _props$tableCodeList = props.tableCodeList,
9910
- tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList;
9916
+ tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList,
9917
+ _props$businessType = props.businessType,
9918
+ businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
9919
+ _props$isAllowRepeate = props.isAllowRepeatedSelect,
9920
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
9911
9921
  var _ref = requestConfig || {},
9912
9922
  url = _ref.url,
9913
9923
  otherParams = _ref.otherParams,
@@ -9924,6 +9934,7 @@ var AddSelect = function AddSelect(props) {
9924
9934
  var realButtonProps = _objectSpread2({
9925
9935
  type: "primary"
9926
9936
  }, buttonProps);
9937
+ var selectRowKey = isAllowRepeatedSelect ? 'uuid' : mappingValueField;
9927
9938
  var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
9928
9939
  var initVal = value || (selectMode ? [] : null);
9929
9940
  var pageSize = 100; // 下拉框默认分页 条数
@@ -10075,7 +10086,9 @@ var AddSelect = function AddSelect(props) {
10075
10086
  var _record$packingUnitLi, _record$packingUnitLi2;
10076
10087
  // let
10077
10088
  if (record.needFocus === true && currentIndex === 0) ;
10078
- var precisionObj = {};
10089
+ var precisionObj = businessType == 'skc' ? {
10090
+ precision: 0
10091
+ } : {};
10079
10092
  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;
10080
10093
  var isCountUnitAccuracyCheck = item.dataIndex == 'count' && unitAccuracy !== undefined;
10081
10094
  if (isCountUnitAccuracyCheck) {
@@ -10199,6 +10212,53 @@ var AddSelect = function AddSelect(props) {
10199
10212
  }
10200
10213
  });
10201
10214
  }
10215
+ var selectLength = modalTableProps.selectColumn.filter(function (item) {
10216
+ return item.isSelectItem;
10217
+ }).length;
10218
+ if (item.isSelectItem) {
10219
+ return _objectSpread2(_objectSpread2({}, item), {}, {
10220
+ render: function render(text, record, index) {
10221
+ var _item$dataSource;
10222
+ if ((_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
10223
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
10224
+ value: text || null,
10225
+ onChange: function onChange(value) {
10226
+ if (businessType == 'skc' && popvalue.some(function (i) {
10227
+ return i.code == record.code && i[item.dataIndex] == value;
10228
+ })) {
10229
+ antd.message.warning('相同skc配码不可设置相同哦');
10230
+ record[item.dataIndex] = null;
10231
+ var _newPopValue = popvalue.map(function (i, innerIndex) {
10232
+ if (innerIndex == index) {
10233
+ i[item.dataIndex] = record[item.dataIndex];
10234
+ }
10235
+ return i;
10236
+ });
10237
+ setPopValue(_newPopValue);
10238
+ return false;
10239
+ }
10240
+ record[item.dataIndex] = value;
10241
+ var newPopValue = popvalue.map(function (i, innerIndex) {
10242
+ if (innerIndex == index) {
10243
+ i[item.dataIndex] = record[item.dataIndex];
10244
+ }
10245
+ return i;
10246
+ });
10247
+ setPopValue(newPopValue);
10248
+ },
10249
+ style: {
10250
+ width: '160px'
10251
+ }
10252
+ }, item.dataSource.map(function (item) {
10253
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
10254
+ value: item.code
10255
+ }, item.name);
10256
+ }));
10257
+ }
10258
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
10259
+ }
10260
+ });
10261
+ }
10202
10262
  return item;
10203
10263
  })), [{
10204
10264
  title: '操作',
@@ -10405,18 +10465,42 @@ var AddSelect = function AddSelect(props) {
10405
10465
  };
10406
10466
 
10407
10467
  React.useEffect(function () {
10408
- Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10409
- pageSize: 5000,
10410
- currentPage: 1,
10411
- 'ctl-withAuth': true
10412
- }), loadSelectSource("/items/category/queryCategoryTree", {
10413
- pageSize: 5000,
10414
- currentPage: 1
10415
- })]).then(function (x) {
10416
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10417
- formatTreeDataSource(x, 1, 3, tableSearchForm);
10418
- });
10419
- }, []);
10468
+ if (businessType == 'sku') {
10469
+ Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10470
+ pageSize: 5000,
10471
+ currentPage: 1,
10472
+ 'ctl-withAuth': true
10473
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10474
+ pageSize: 5000,
10475
+ currentPage: 1
10476
+ })]).then(function (x) {
10477
+ formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10478
+ formatTreeDataSource(x, 1, 3, tableSearchForm);
10479
+ });
10480
+ }
10481
+ if (businessType == 'skc') {
10482
+ Promise.all([loadSelectSource("/items/item/propertyValue", {
10483
+ pageSize: 5000,
10484
+ currentPage: 1,
10485
+ 'qp-propertyId-eq': '1467042217951883265'
10486
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10487
+ pageSize: 5000,
10488
+ currentPage: 1
10489
+ }), loadSelectSource("/items/class/withProperty", {
10490
+ pageSize: 5000,
10491
+ currentPage: 1
10492
+ }), loadSelectSource("/items/brand/queryBrandList", {
10493
+ pageSize: 5000,
10494
+ currentPage: 1,
10495
+ 'ctl-withAuth': true
10496
+ })]).then(function (x) {
10497
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
10498
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
10499
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
10500
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
10501
+ });
10502
+ }
10503
+ }, [businessType]);
10420
10504
  React.useEffect(function () {
10421
10505
  if (value) {
10422
10506
  setPopValue(value);
@@ -10546,8 +10630,18 @@ var AddSelect = function AddSelect(props) {
10546
10630
  selectRows[selectedRowKeys.length]['needFocus'] = true;
10547
10631
  }
10548
10632
  }
10549
- setPopValue(selectRows);
10550
- setSelectedRowKeys(selectKeys);
10633
+ if (isAllowRepeatedSelect) {
10634
+ var list = popvalue.concat(selectRows).map(function (i) {
10635
+ return _objectSpread2(_objectSpread2({}, i), {}, {
10636
+ uuid: i.uuid || uuid()
10637
+ });
10638
+ });
10639
+ setPopValue(list);
10640
+ setSelectedRowKeys([]);
10641
+ } else {
10642
+ setPopValue(selectRows);
10643
+ setSelectedRowKeys(selectKeys);
10644
+ }
10551
10645
  // setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
10552
10646
  // setCheckedAll(filterRows.length === tablePagination?.total);
10553
10647
  };
@@ -10664,12 +10758,19 @@ var AddSelect = function AddSelect(props) {
10664
10758
  setSelectedRowKeys([]);
10665
10759
  };
10666
10760
  var deleteRecord = function deleteRecord(record) {
10667
- setPopValue(popvalue.filter(function (item) {
10668
- return item.skuCode !== record.skuCode;
10669
- }));
10670
- setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10671
- return item !== record.skuCode;
10672
- })));
10761
+ if (isAllowRepeatedSelect) {
10762
+ setPopValue(popvalue.filter(function (item) {
10763
+ return item.uuid !== record.uuid;
10764
+ }));
10765
+ setSelectedRowKeys([]);
10766
+ } else {
10767
+ setPopValue(popvalue.filter(function (item) {
10768
+ return item.skuCode !== record.skuCode;
10769
+ }));
10770
+ setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10771
+ return item !== record.skuCode;
10772
+ })));
10773
+ }
10673
10774
  };
10674
10775
  var inputIndex = 0;
10675
10776
  React.useEffect(function () {
@@ -10741,6 +10842,7 @@ var AddSelect = function AddSelect(props) {
10741
10842
  handleColumns(showSelectedCol, [], function (res) {
10742
10843
  return setShowColumnsCallback(res);
10743
10844
  });
10845
+ var selectLength = isAllowRepeatedSelect ? (popvalue === null || popvalue === void 0 ? void 0 : popvalue.length) || 0 : (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0;
10744
10846
  return /*#__PURE__*/React__default['default'].createElement("div", {
10745
10847
  className: 'add_select'
10746
10848
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -10826,7 +10928,7 @@ var AddSelect = function AddSelect(props) {
10826
10928
  style: themeColor
10827
10929
  }, (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total) || 0), "\xA0\u9879", selectMode ? /*#__PURE__*/React__default['default'].createElement("span", null, "\uFF0C \u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React__default['default'].createElement("span", {
10828
10930
  style: themeColor
10829
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879") : ''), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("span", {
10931
+ }, selectLength), "\xA0\u9879") : ''), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("span", {
10830
10932
  style: {
10831
10933
  marginRight: 8
10832
10934
  }
@@ -10869,7 +10971,7 @@ var AddSelect = function AddSelect(props) {
10869
10971
  }
10870
10972
  }, /*#__PURE__*/React__default['default'].createElement("span", null, "\u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React__default['default'].createElement("span", {
10871
10973
  style: themeColor
10872
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879")), /*#__PURE__*/React__default['default'].createElement("div", {
10974
+ }, selectLength), "\xA0\u9879")), /*#__PURE__*/React__default['default'].createElement("div", {
10873
10975
  style: {
10874
10976
  display: 'flex'
10875
10977
  }
@@ -10903,7 +11005,7 @@ var AddSelect = function AddSelect(props) {
10903
11005
  dataSource: popvalue,
10904
11006
  pagination: false,
10905
11007
  // onChange={handleTableChange}
10906
- rowKey: mappingValueField,
11008
+ rowKey: selectRowKey,
10907
11009
  rowClassName: 'row-class',
10908
11010
  scroll: {
10909
11011
  y: 500
@@ -11953,6 +12055,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
11953
12055
  case 'skuCommodity':
11954
12056
  case 'skuPropertyValue':
11955
12057
  case 'spuCommodity':
12058
+ case 'skcCommodity':
11956
12059
  result = '/items';
11957
12060
  break;
11958
12061
  case 'physicalWarehouse':
@@ -12652,6 +12755,155 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
12652
12755
  }]
12653
12756
  }, modalTableBusProps);
12654
12757
  }
12758
+ // 商品选择器skc
12759
+ if (type === 'skcCommodity') {
12760
+ requestConfig = _objectSpread2({
12761
+ url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
12762
+ filter: 'qp-code,name-orGroup,like',
12763
+ mappingTextField: 'name',
12764
+ mappingValueField: 'code',
12765
+ sourceName: 'qp-skcCode-eq'
12766
+ }, requestConfigProp);
12767
+ tableSearchForm = [{
12768
+ name: 'qp-code-like',
12769
+ label: 'SKC编码'
12770
+ }, {
12771
+ name: 'qp-skcName-like',
12772
+ label: 'SKC名称'
12773
+ }, {
12774
+ name: 'qp-itemName-like',
12775
+ label: '商品名称'
12776
+ }, {
12777
+ name: 'qp-colorName-in',
12778
+ type: 'select',
12779
+ label: '颜色',
12780
+ field: {
12781
+ type: 'select',
12782
+ props: {
12783
+ mode: 'multiple',
12784
+ notFoundContent: '暂无数据',
12785
+ allowClear: true,
12786
+ showSearch: true,
12787
+ showArrow: true,
12788
+ maxTagCount: 1,
12789
+ optionFilterProp: 'children',
12790
+ filterOption: function filterOption(input, option) {
12791
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12792
+ }
12793
+ }
12794
+ }
12795
+ }, {
12796
+ name: 'qp-categoryId-in',
12797
+ type: 'treeSelect',
12798
+ label: '类目',
12799
+ field: {
12800
+ type: 'treeSelect',
12801
+ props: {
12802
+ treeData: [],
12803
+ treeCheckable: true,
12804
+ showSearch: true,
12805
+ allowClear: true,
12806
+ showArrow: true,
12807
+ treeNodeFilterProp: 'title',
12808
+ treeDefaultExpandAll: true,
12809
+ maxTagCount: 1,
12810
+ placeholder: '请选择',
12811
+ style: {
12812
+ width: '100%'
12813
+ },
12814
+ dropdownStyle: {
12815
+ maxHeight: 400,
12816
+ maxWidth: 100,
12817
+ overflow: 'auto'
12818
+ }
12819
+ }
12820
+ }
12821
+ }, {
12822
+ name: 'qp-classId-in',
12823
+ type: 'select',
12824
+ label: '品类',
12825
+ field: {
12826
+ type: 'select',
12827
+ props: {
12828
+ mode: 'multiple',
12829
+ notFoundContent: '暂无数据',
12830
+ allowClear: true,
12831
+ showSearch: true,
12832
+ showArrow: true,
12833
+ maxTagCount: 1,
12834
+ optionFilterProp: 'children',
12835
+ filterOption: function filterOption(input, option) {
12836
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12837
+ }
12838
+ }
12839
+ }
12840
+ }, {
12841
+ name: 'qp-brandId-in',
12842
+ type: 'select',
12843
+ label: '品牌',
12844
+ field: {
12845
+ type: 'select',
12846
+ props: {
12847
+ mode: 'multiple',
12848
+ notFoundContent: '暂无数据',
12849
+ allowClear: true,
12850
+ showSearch: true,
12851
+ showArrow: true,
12852
+ maxTagCount: 1,
12853
+ optionFilterProp: 'children',
12854
+ filterOption: function filterOption(input, option) {
12855
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12856
+ }
12857
+ }
12858
+ }
12859
+ }];
12860
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/item/propertyValue"), {
12861
+ pageSize: 5000,
12862
+ currentPage: 1,
12863
+ 'qp-propertyId-eq': '1467042217951883265'
12864
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
12865
+ pageSize: 5000,
12866
+ currentPage: 1
12867
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
12868
+ pageSize: 5000,
12869
+ currentPage: 1
12870
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
12871
+ pageSize: 5000,
12872
+ currentPage: 1,
12873
+ 'ctl-withAuth': true
12874
+ })]).then(function (x) {
12875
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
12876
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
12877
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
12878
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
12879
+ });
12880
+ modalTableProps = _objectSpread2({
12881
+ modalTableTitle: '选择SKC',
12882
+ tableSearchForm: tableSearchForm,
12883
+ tableColumns: [{
12884
+ title: 'SKC编码',
12885
+ dataIndex: 'code'
12886
+ }, {
12887
+ title: 'SKC名称',
12888
+ dataIndex: 'name'
12889
+ }, {
12890
+ title: '商品名称',
12891
+ dataIndex: 'itemName'
12892
+ }, {
12893
+ title: '颜色',
12894
+ dataIndex: 'colorName'
12895
+ }, {
12896
+ title: '类目',
12897
+ dataIndex: 'categoryText'
12898
+ }, {
12899
+ title: '品类',
12900
+ dataIndex: 'className'
12901
+ }, {
12902
+ title: '品牌',
12903
+ dataIndex: 'brandName'
12904
+ }]
12905
+ }, modalTableBusProps);
12906
+ }
12655
12907
  // 商品规格选择器(无弹窗)
12656
12908
  if (type === 'skuPropertyValue') {
12657
12909
  requestConfig = _objectSpread2({
@@ -13881,7 +14133,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
13881
14133
  setValue(value);
13882
14134
  },
13883
14135
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
13884
- onSaveCallback: parProps.onSaveCallback
14136
+ onSaveCallback: parProps.onSaveCallback,
14137
+ businessType: 'sku'
13885
14138
  // onSaveCallback: (rows) => {
13886
14139
  // console.log('save call', rows);
13887
14140
  // // return Promise.resolve(true);
@@ -14087,6 +14340,280 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14087
14340
  modalTableProps: modalTableProps
14088
14341
  })));
14089
14342
  };
14343
+ var AddSkcSelect = function AddSkcSelect(parProps) {
14344
+ var selectProps = {
14345
+ mode: 'multiple'
14346
+ };
14347
+ var _useState3 = React.useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
14348
+ _useState4 = _slicedToArray(_useState3, 2),
14349
+ value = _useState4[0],
14350
+ setValue = _useState4[1];
14351
+ var _useState5 = React.useState([]),
14352
+ _useState6 = _slicedToArray(_useState5, 2),
14353
+ propertyList = _useState6[0],
14354
+ setPropertyList = _useState6[1];
14355
+ React.useEffect(function () {
14356
+ axios__default['default'].get("/items/itemPropertyValueGroup/listNoPage").then(function (result) {
14357
+ var _result, _result2;
14358
+ result = result.data;
14359
+ 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') {
14360
+ antd.message.error(result.msg);
14361
+ return;
14362
+ }
14363
+ var data = result.data || [];
14364
+ setPropertyList(data);
14365
+ }).catch(function (err) {});
14366
+ }, []);
14367
+ var initialSelectColumn = [{
14368
+ title: 'SKC编码',
14369
+ width: 150,
14370
+ dataIndex: 'code'
14371
+ }, {
14372
+ title: 'SKC名称',
14373
+ width: 200,
14374
+ ellipsis: {
14375
+ showTitle: false
14376
+ },
14377
+ render: function render(text) {
14378
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14379
+ placement: "topLeft",
14380
+ title: text
14381
+ }, text);
14382
+ },
14383
+ dataIndex: 'name'
14384
+ }, {
14385
+ title: '颜色',
14386
+ width: 200,
14387
+ ellipsis: {
14388
+ showTitle: false
14389
+ },
14390
+ render: function render(text) {
14391
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14392
+ placement: "topLeft",
14393
+ title: text
14394
+ }, text);
14395
+ },
14396
+ dataIndex: 'colorName'
14397
+ }, {
14398
+ title: '配码',
14399
+ dataIndex: 'selectPropertyGroupCode',
14400
+ width: 160,
14401
+ isSelectItem: true,
14402
+ dataSource: propertyList
14403
+ }, {
14404
+ title: '数量',
14405
+ width: 100,
14406
+ isInputItem: true,
14407
+ dataIndex: 'count'
14408
+ }];
14409
+ var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
14410
+ var props = {
14411
+ buttonText: parProps.buttonText || '新增',
14412
+ buttonProps: parProps.buttonProps || {},
14413
+ tableCodeList: parProps.tableCodeList || ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
14414
+ value: value,
14415
+ // labelInValue: true, // 非必填 默认为false
14416
+ requestConfig: _objectSpread2({
14417
+ url: "/items/skc/skcSelect",
14418
+ filter: 'qp-name-like',
14419
+ otherParams: {},
14420
+ mappingTextField: 'name',
14421
+ mappingValueField: 'code'
14422
+ }, parProps.requestConfig),
14423
+ selectProps: selectProps,
14424
+ onChange: function onChange(value) {
14425
+ console.log(value);
14426
+ setValue(value);
14427
+ },
14428
+ beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
14429
+ onSaveCallback: parProps.onSaveCallback,
14430
+ businessType: 'skc',
14431
+ isAllowRepeatedSelect: true
14432
+ };
14433
+ var modalTableProps = {
14434
+ modalTableTitle: '选择商品',
14435
+ tableSearchForm: [{
14436
+ name: 'qp-code-like',
14437
+ label: 'SKC编码'
14438
+ }, {
14439
+ name: 'qp-skcName-like',
14440
+ label: 'SKC名称'
14441
+ }, {
14442
+ name: 'qp-itemName-like',
14443
+ label: '商品名称'
14444
+ }, {
14445
+ name: 'qp-colorName-in',
14446
+ type: 'select',
14447
+ label: '颜色',
14448
+ field: {
14449
+ type: 'select',
14450
+ props: {
14451
+ mode: 'multiple',
14452
+ notFoundContent: '暂无数据',
14453
+ allowClear: true,
14454
+ showSearch: true,
14455
+ showArrow: true,
14456
+ maxTagCount: 1,
14457
+ optionFilterProp: 'children',
14458
+ filterOption: function filterOption(input, option) {
14459
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14460
+ }
14461
+ }
14462
+ }
14463
+ }, {
14464
+ name: 'qp-categoryId-in',
14465
+ type: 'treeSelect',
14466
+ label: '类目',
14467
+ field: {
14468
+ type: 'treeSelect',
14469
+ props: {
14470
+ treeData: [],
14471
+ treeCheckable: true,
14472
+ showSearch: true,
14473
+ allowClear: true,
14474
+ showArrow: true,
14475
+ treeNodeFilterProp: 'title',
14476
+ treeDefaultExpandAll: true,
14477
+ maxTagCount: 1,
14478
+ placeholder: '请选择',
14479
+ style: {
14480
+ width: '100%'
14481
+ },
14482
+ dropdownStyle: {
14483
+ maxHeight: 400,
14484
+ maxWidth: 100,
14485
+ overflow: 'auto'
14486
+ }
14487
+ }
14488
+ }
14489
+ }, {
14490
+ name: 'qp-classId-in',
14491
+ type: 'select',
14492
+ label: '品类',
14493
+ field: {
14494
+ type: 'select',
14495
+ props: {
14496
+ mode: 'multiple',
14497
+ notFoundContent: '暂无数据',
14498
+ allowClear: true,
14499
+ showSearch: true,
14500
+ showArrow: true,
14501
+ maxTagCount: 1,
14502
+ optionFilterProp: 'children',
14503
+ filterOption: function filterOption(input, option) {
14504
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14505
+ }
14506
+ }
14507
+ }
14508
+ }, {
14509
+ name: 'qp-brandId-in',
14510
+ type: 'select',
14511
+ label: '品牌',
14512
+ field: {
14513
+ type: 'select',
14514
+ props: {
14515
+ mode: 'multiple',
14516
+ notFoundContent: '暂无数据',
14517
+ allowClear: true,
14518
+ showSearch: true,
14519
+ showArrow: true,
14520
+ maxTagCount: 1,
14521
+ optionFilterProp: 'children',
14522
+ filterOption: function filterOption(input, option) {
14523
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14524
+ }
14525
+ }
14526
+ }
14527
+ }],
14528
+ tableColumns: [{
14529
+ title: 'SKC编码',
14530
+ width: 150,
14531
+ dataIndex: 'code'
14532
+ }, {
14533
+ title: 'SKC名称',
14534
+ width: 200,
14535
+ ellipsis: {
14536
+ showTitle: false
14537
+ },
14538
+ render: function render(text) {
14539
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14540
+ placement: "topLeft",
14541
+ title: text
14542
+ }, text);
14543
+ },
14544
+ dataIndex: 'name'
14545
+ }, {
14546
+ title: '商品名称',
14547
+ width: 100,
14548
+ ellipsis: {
14549
+ showTitle: false
14550
+ },
14551
+ dataIndex: 'itemName',
14552
+ render: function render(text) {
14553
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14554
+ placement: "topLeft",
14555
+ title: text
14556
+ }, text);
14557
+ }
14558
+ }, {
14559
+ title: '颜色',
14560
+ width: 100,
14561
+ ellipsis: {
14562
+ showTitle: false
14563
+ },
14564
+ render: function render(text) {
14565
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14566
+ placement: "topLeft",
14567
+ title: text
14568
+ }, text);
14569
+ },
14570
+ dataIndex: 'colorName'
14571
+ }, {
14572
+ title: '类目',
14573
+ width: 100,
14574
+ ellipsis: {
14575
+ showTitle: false
14576
+ },
14577
+ render: function render(text) {
14578
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14579
+ placement: "topLeft",
14580
+ title: text
14581
+ }, text);
14582
+ },
14583
+ dataIndex: 'categoryName'
14584
+ }, {
14585
+ title: '品类',
14586
+ width: 100,
14587
+ ellipsis: {
14588
+ showTitle: false
14589
+ },
14590
+ render: function render(text) {
14591
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14592
+ placement: "topLeft",
14593
+ title: text
14594
+ }, text);
14595
+ },
14596
+ dataIndex: 'className'
14597
+ }, {
14598
+ title: '品牌',
14599
+ width: 100,
14600
+ ellipsis: {
14601
+ showTitle: false
14602
+ },
14603
+ render: function render(text) {
14604
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14605
+ placement: "topLeft",
14606
+ title: text
14607
+ }, text);
14608
+ },
14609
+ dataIndex: 'brandName'
14610
+ }],
14611
+ selectColumn: mTpSelectColumn
14612
+ };
14613
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14614
+ modalTableProps: modalTableProps
14615
+ })));
14616
+ };
14090
14617
 
14091
14618
  var CommodityEntry = function CommodityEntry(props) {
14092
14619
  var dataValidationRef = React.useRef();
@@ -29945,6 +30472,7 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
29945
30472
  });
29946
30473
 
29947
30474
  exports.AddSelect = AddSelect;
30475
+ exports.AddSkcSelect = AddSkcSelect;
29948
30476
  exports.AddSkuSelect = AddSkuSelect;
29949
30477
  exports.BillEntry = BillEntry;
29950
30478
  exports.BsLayout = index$5;