@bit-sun/business-component 2.2.13 → 2.2.15

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 (181) 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/components/Business/BsLayouts/utils.d.ts +0 -4
  10. package/dist/index.esm.js +329 -44
  11. package/dist/index.js +329 -43
  12. package/dist/utils/LocalstorageUtils.d.ts +9 -1
  13. package/dist/utils/index.d.ts +1 -0
  14. package/docs/index.md +21 -21
  15. package/lib/assets/drag.svg +17 -17
  16. package/lib/assets/exportFail.svg +37 -37
  17. package/lib/assets/exportProcessing.svg +28 -28
  18. package/lib/assets/exportSuccess.svg +34 -34
  19. package/lib/assets/label_icon_bottom.svg +25 -25
  20. package/lib/assets/upExport.svg +22 -22
  21. package/package.json +77 -77
  22. package/src/assets/32.svg +27 -27
  23. package/src/assets/addIcon.svg +17 -17
  24. package/src/assets/allfunc.svg +27 -27
  25. package/src/assets/arrowRight.svg +24 -24
  26. package/src/assets/btn-delete.svg +29 -29
  27. package/src/assets/btn-edit.svg +19 -19
  28. package/src/assets/btn-more.svg +17 -17
  29. package/src/assets/btn-submit.svg +19 -19
  30. package/src/assets/caidan.svg +11 -11
  31. package/src/assets/close.svg +26 -26
  32. package/src/assets/drag.svg +17 -17
  33. package/src/assets/exportFail.svg +37 -37
  34. package/src/assets/exportProcessing.svg +28 -28
  35. package/src/assets/exportSuccess.svg +34 -34
  36. package/src/assets/fixed-left-active.svg +11 -11
  37. package/src/assets/fixed-left.svg +15 -15
  38. package/src/assets/fixed-right-active.svg +11 -11
  39. package/src/assets/fixed-right.svg +15 -15
  40. package/src/assets/guanbi.svg +15 -15
  41. package/src/assets/icon-quanping.svg +15 -15
  42. package/src/assets/icon-shezhi.svg +17 -17
  43. package/src/assets/label_icon_bottom.svg +25 -25
  44. package/src/assets/list-no-img.svg +21 -21
  45. package/src/assets/morentouxiang-32.svg +23 -23
  46. package/src/assets/scanning.svg +24 -24
  47. package/src/assets/upExport.svg +22 -22
  48. package/src/components/Business/AddSelectBusiness/index.md +129 -93
  49. package/src/components/Business/AddSelectBusiness/index.tsx +835 -601
  50. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  51. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  52. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  60. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  61. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  62. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  63. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  64. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  65. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  66. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -156
  67. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  68. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  69. package/src/components/Business/BsLayouts/index.less +79 -79
  70. package/src/components/Business/BsLayouts/index.tsx +1479 -1479
  71. package/src/components/Business/BsLayouts/service.ts +10 -10
  72. package/src/components/Business/BsLayouts/utils.tsx +203 -226
  73. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -538
  74. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  75. package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
  76. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  77. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  78. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  79. package/src/components/Business/CommodityEntry/index.md +70 -70
  80. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  81. package/src/components/Business/CommonAlert/index.tsx +23 -23
  82. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  83. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  84. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  85. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  86. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  87. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  88. package/src/components/Business/HomePageWrapper/index.less +33 -33
  89. package/src/components/Business/HomePageWrapper/index.md +45 -45
  90. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  91. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  92. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  93. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  94. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  95. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  96. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  97. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  98. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  99. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  100. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  101. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  102. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  103. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  104. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  105. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  106. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  107. package/src/components/Business/JsonQueryTable/index.less +16 -16
  108. package/src/components/Business/JsonQueryTable/index.md +328 -328
  109. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  110. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  111. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  112. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  113. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  114. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  115. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  116. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  117. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  118. package/src/components/Business/JsonQueryTable/static.ts +356 -356
  119. package/src/components/Business/SearchSelect/BusinessUtils.ts +1723 -1723
  120. package/src/components/Business/SearchSelect/common.ts +53 -53
  121. package/src/components/Business/SearchSelect/index.md +1310 -1310
  122. package/src/components/Business/SearchSelect/index.tsx +51 -51
  123. package/src/components/Business/SearchSelect/utils.ts +100 -100
  124. package/src/components/Business/StateFlow/index.less +130 -130
  125. package/src/components/Business/StateFlow/index.md +60 -60
  126. package/src/components/Business/StateFlow/index.tsx +29 -29
  127. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  128. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  129. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  130. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  131. package/src/components/Business/columnSettingTable/index.less +247 -247
  132. package/src/components/Business/columnSettingTable/index.md +357 -357
  133. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  134. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  135. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  136. package/src/components/Business/moreTreeTable/index.less +99 -99
  137. package/src/components/Business/moreTreeTable/index.md +508 -508
  138. package/src/components/Business/moreTreeTable/index.tsx +315 -315
  139. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  140. package/src/components/Functional/AddSelect/index.less +367 -367
  141. package/src/components/Functional/AddSelect/index.md +155 -155
  142. package/src/components/Functional/AddSelect/index.tsx +1199 -1165
  143. package/src/components/Functional/BillEntry/index.less +371 -371
  144. package/src/components/Functional/BillEntry/index.md +39 -39
  145. package/src/components/Functional/BillEntry/index.tsx +766 -766
  146. package/src/components/Functional/DataImport/index.less +63 -63
  147. package/src/components/Functional/DataImport/index.md +44 -44
  148. package/src/components/Functional/DataImport/index.tsx +695 -695
  149. package/src/components/Functional/DataValidation/index.less +63 -63
  150. package/src/components/Functional/DataValidation/index.md +39 -39
  151. package/src/components/Functional/DataValidation/index.tsx +687 -687
  152. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  153. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  154. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  155. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  156. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  157. package/src/components/Functional/SearchSelect/index.less +115 -115
  158. package/src/components/Functional/SearchSelect/index.md +141 -141
  159. package/src/components/Functional/SearchSelect/index.tsx +813 -813
  160. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  161. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  162. package/src/components/Functional/TreeSearchSelect/index.tsx +160 -160
  163. package/src/index.ts +34 -34
  164. package/src/plugin/TableColumnSetting/index.less +247 -247
  165. package/src/plugin/TableColumnSetting/index.md +50 -50
  166. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  167. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  168. package/src/styles/bsDefault.less +1912 -1912
  169. package/src/utils/CheckOneUser/index.md +39 -39
  170. package/src/utils/CheckOneUser/index.ts +51 -51
  171. package/src/utils/LocalstorageUtils.ts +90 -58
  172. package/src/utils/TableUtils.tsx +18 -18
  173. package/src/utils/checkUtils.ts +39 -39
  174. package/src/utils/enumConfig.ts +11 -11
  175. package/src/utils/getFormMode.js +12 -12
  176. package/src/utils/index.ts +3 -2
  177. package/src/utils/requestUtils.ts +34 -36
  178. package/src/utils/serialize.js +7 -7
  179. package/src/utils/utils.ts +183 -183
  180. package/tsconfig.json +29 -29
  181. package/typings.d.ts +4 -4
package/dist/index.esm.js CHANGED
@@ -37,6 +37,7 @@ var ENUM = {
37
37
  }
38
38
  };
39
39
 
40
+ var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
40
41
  // 存储表头
41
42
  var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
42
43
  var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
@@ -68,10 +69,42 @@ var getConfigTableColumns = function getConfigTableColumns(tableCode) {
68
69
  return [];
69
70
  };
70
71
  var getCurrentTenantId = function getCurrentTenantId() {
71
- return localStorage.getItem('current_tenant_id') || '';
72
+ return localStorage.getItem('current_tenant_id') || 1;
72
73
  };
74
+ function getEmployeeId() {
75
+ var _resposne$employeeRes;
76
+ return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
77
+ }
78
+ function getEmployeeCode() {
79
+ var _resposne$employeeRes2;
80
+ return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
81
+ }
82
+ function getSessionId() {
83
+ return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
84
+ }
85
+ function getAccountId() {
86
+ var _resposne$accountPers;
87
+ return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
88
+ }
89
+ function getUserId() {
90
+ var _resposne$accountPers2;
91
+ return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
92
+ }
93
+ function getAccountID() {
94
+ var _resposne$accountPers3;
95
+ return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
96
+ }
97
+ function getUserName() {
98
+ var _resposne$accountPers4;
99
+ return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
100
+ }
101
+ function handleUserPhone() {
102
+ var _resposne$person;
103
+ var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
104
+ var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
105
+ return enStr;
106
+ }
73
107
 
74
- var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
75
108
  function handleRequestAuthHeader(config) {
76
109
  var _config$url, _config$url2;
77
110
  // https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
@@ -87,11 +120,10 @@ function handleRequestAuthHeader(config) {
87
120
  }
88
121
  // 处理请求头
89
122
  var handleRequestHeader = function handleRequestHeader(config) {
90
- var _resposne$accountPers, _resposne$employeeRes;
91
- config.headers['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
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;
123
+ config.headers['sso-sessionid'] = getSessionId();
124
+ config.headers['x-account-id'] = getAccountId();
125
+ config.headers['x-employee-id'] = getEmployeeId();
126
+ config.headers['x-tenant-id'] = getCurrentTenantId();
95
127
  if (localStorage.getItem('x-user-auth-context')) {
96
128
  config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
97
129
  }
@@ -9872,6 +9904,11 @@ var formatTreeDataSource = function formatTreeDataSource(reData, position, chang
9872
9904
  }) || [];
9873
9905
  changeSearchForm[changePosition].field.props.treeData = formatData;
9874
9906
  };
9907
+ var initTableCode = {
9908
+ 'sku': ['skuSelect-tableOptionsToChoosePartCode', 'skuSelect-tableSelectedItemPartCode'],
9909
+ 'skc': ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
9910
+ 'spu': [['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']]
9911
+ };
9875
9912
  var Option$1 = Select.Option;
9876
9913
  var AddSelect = function AddSelect(props) {
9877
9914
  var value = props.value,
@@ -10050,8 +10087,8 @@ var AddSelect = function AddSelect(props) {
10050
10087
  _useState46 = _slicedToArray(_useState45, 2),
10051
10088
  showToChooseColumns = _useState46[0],
10052
10089
  setShowToChooseColumns = _useState46[1];
10053
- var codeToChoose = tableCodeList[0] || 'skuSelect-tableOptionsToChoosePartCode';
10054
- var codeSelected = tableCodeList[1] || 'skuSelect-tableSelectedItemPartCode';
10090
+ var codeToChoose = tableCodeList[0] || initTableCode[businessType][0];
10091
+ var codeSelected = tableCodeList[1] || initTableCode[businessType][1];
10055
10092
  useEffect(function () {
10056
10093
  setTableColumns(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableColumns);
10057
10094
  }, [modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableColumns]);
@@ -10482,6 +10519,28 @@ var AddSelect = function AddSelect(props) {
10482
10519
  formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
10483
10520
  });
10484
10521
  }
10522
+ if (businessType == 'spu') {
10523
+ Promise.all([loadSelectSource("/user/orgViewNode/listNoPage", {
10524
+ 'qp-employeeId-eq': getEmployeeId(),
10525
+ 'qp-orgViewCode-eq': 'business-organizational-view',
10526
+ 'ctl-withDefaultOrg': true
10527
+ }), loadSelectSource("/items/brand/queryBrandList", {
10528
+ pageSize: 5000,
10529
+ currentPage: 1,
10530
+ 'ctl-withAuth': true
10531
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10532
+ pageSize: 5000,
10533
+ currentPage: 1
10534
+ }), loadSelectSource("/items/class/withProperty", {
10535
+ pageSize: 5000,
10536
+ currentPage: 1
10537
+ })]).then(function (x) {
10538
+ formatSource(x, 0, 2, tableSearchForm, ['targetId', 'name']);
10539
+ formatSource(x, 1, 3, tableSearchForm, ['id', 'name']);
10540
+ formatTreeDataSource(x, 2, 4, tableSearchForm);
10541
+ formatSource(x, 3, 5, tableSearchForm, ['id', 'name']);
10542
+ });
10543
+ }
10485
10544
  }, [businessType]);
10486
10545
  useEffect(function () {
10487
10546
  if (value) {
@@ -13469,7 +13528,6 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
13469
13528
  }, modalTableBusProps);
13470
13529
  }
13471
13530
  if (type === 'shopFile2') {
13472
- var _JSON$parse, _JSON$parse$employeeR;
13473
13531
  requestConfig = _objectSpread2({
13474
13532
  url: "".concat(prefixUrl.selectPrefix, "/store/page"),
13475
13533
  filter: 'qp-name,code-orGroup,like',
@@ -13512,7 +13570,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
13512
13570
  }
13513
13571
  }];
13514
13572
  Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
13515
- 'qp-employeeCode-eq': (_JSON$parse = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$employeeR = _JSON$parse.employeeResVo) === null || _JSON$parse$employeeR === void 0 ? void 0 : _JSON$parse$employeeR.employeeNumber,
13573
+ 'qp-employeeCode-eq': getEmployeeCode(),
13516
13574
  'qp-realOrg-eq': true,
13517
13575
  'qp-status-eq': 10
13518
13576
  })]).then(function (x) {
@@ -14010,6 +14068,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14010
14068
  _useState2 = _slicedToArray(_useState, 2),
14011
14069
  value = _useState2[0],
14012
14070
  setValue = _useState2[1];
14071
+ //注⚠️:自定义过表头的请记得传tableCodeList参数
14013
14072
  var initialSelectColumn = [{
14014
14073
  title: 'SKU编码',
14015
14074
  width: 150,
@@ -14335,7 +14394,8 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
14335
14394
  propertyList = _useState6[0],
14336
14395
  setPropertyList = _useState6[1];
14337
14396
  useEffect(function () {
14338
- axios.get("/items/itemPropertyValueGroup/listNoPage").then(function (result) {
14397
+ // type: 1 尺码组; 2 配码组
14398
+ axios.get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2").then(function (result) {
14339
14399
  var _result, _result2;
14340
14400
  result = result.data;
14341
14401
  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') {
@@ -14346,6 +14406,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
14346
14406
  setPropertyList(data);
14347
14407
  }).catch(function (err) {});
14348
14408
  }, []);
14409
+ //注⚠️:自定义过表头的请记得传tableCodeList参数
14349
14410
  var initialSelectColumn = [{
14350
14411
  title: 'SKC编码',
14351
14412
  width: 150,
@@ -14596,6 +14657,250 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
14596
14657
  modalTableProps: modalTableProps
14597
14658
  })));
14598
14659
  };
14660
+ var AddSpuSelect = function AddSpuSelect(parProps) {
14661
+ var selectProps = {
14662
+ mode: 'multiple'
14663
+ };
14664
+ var _useState7 = useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
14665
+ _useState8 = _slicedToArray(_useState7, 2),
14666
+ value = _useState8[0],
14667
+ setValue = _useState8[1];
14668
+ //注⚠️:自定义过表头的请记得传tableCodeList参数
14669
+ var initialSelectColumn = [{
14670
+ title: '商品编码',
14671
+ width: 150,
14672
+ dataIndex: 'itemCode'
14673
+ }, {
14674
+ title: '商品名称',
14675
+ width: 200,
14676
+ ellipsis: {
14677
+ showTitle: false
14678
+ },
14679
+ render: function render(text) {
14680
+ return /*#__PURE__*/React.createElement(Tooltip, {
14681
+ placement: "topLeft",
14682
+ title: text
14683
+ }, text);
14684
+ },
14685
+ dataIndex: 'name'
14686
+ }, {
14687
+ title: '数量',
14688
+ width: 100,
14689
+ isInputItem: true,
14690
+ dataIndex: 'count'
14691
+ }, {
14692
+ title: '所属组织',
14693
+ dataIndex: 'ownOrgSignName'
14694
+ }, {
14695
+ title: '品牌',
14696
+ dataIndex: 'brandName'
14697
+ }, {
14698
+ title: '类目',
14699
+ dataIndex: 'categoryText'
14700
+ }, {
14701
+ title: '品类',
14702
+ dataIndex: 'className'
14703
+ }];
14704
+ var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
14705
+ var props = {
14706
+ buttonText: parProps.buttonText || '新增',
14707
+ buttonProps: parProps.buttonProps || {},
14708
+ tableCodeList: parProps.tableCodeList || [],
14709
+ value: value,
14710
+ // labelInValue: true, // 非必填 默认为false
14711
+ requestConfig: _objectSpread2({
14712
+ url: "/items/item",
14713
+ filter: 'qp-itemCode,name-orGroup,like',
14714
+ otherParams: {
14715
+ 'qp-approveStatus-eq': 1,
14716
+ sorter: 'desc-id'
14717
+ },
14718
+ mappingTextField: 'name',
14719
+ mappingValueField: 'itemCode'
14720
+ }, parProps.requestConfig),
14721
+ selectProps: selectProps,
14722
+ onChange: function onChange(value) {
14723
+ console.log(value);
14724
+ setValue(value);
14725
+ },
14726
+ beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
14727
+ onSaveCallback: parProps.onSaveCallback,
14728
+ businessType: 'spu'
14729
+ // onSaveCallback: (rows) => {
14730
+ // console.log('save call', rows);
14731
+ // // return Promise.resolve(true);
14732
+ // // return Promise.reject('FAILE')
14733
+ // }
14734
+ };
14735
+
14736
+ var modalTableProps = {
14737
+ modalTableTitle: '选择商品',
14738
+ tableSearchForm: [{
14739
+ name: 'qp-itemCode-like',
14740
+ label: '商品编码'
14741
+ }, {
14742
+ name: 'qp-name-like',
14743
+ label: '商品名称'
14744
+ }, {
14745
+ name: 'qp-ownOrgSign-in',
14746
+ type: 'select',
14747
+ label: '所属组织',
14748
+ field: {
14749
+ type: 'select',
14750
+ props: {
14751
+ mode: 'multiple',
14752
+ notFoundContent: '暂无数据',
14753
+ allowClear: true,
14754
+ showSearch: true,
14755
+ showArrow: true,
14756
+ maxTagCount: 1,
14757
+ optionFilterProp: 'children',
14758
+ filterOption: function filterOption(input, option) {
14759
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14760
+ }
14761
+ }
14762
+ }
14763
+ }, {
14764
+ name: 'qp-brandId-in',
14765
+ type: 'select',
14766
+ label: '品牌',
14767
+ field: {
14768
+ type: 'select',
14769
+ props: {
14770
+ mode: 'multiple',
14771
+ notFoundContent: '暂无数据',
14772
+ allowClear: true,
14773
+ showSearch: true,
14774
+ showArrow: true,
14775
+ maxTagCount: 1,
14776
+ optionFilterProp: 'children',
14777
+ filterOption: function filterOption(input, option) {
14778
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14779
+ }
14780
+ }
14781
+ }
14782
+ }, {
14783
+ name: 'qp-categoryId-in',
14784
+ type: 'treeSelect',
14785
+ label: '类目',
14786
+ field: {
14787
+ type: 'treeSelect',
14788
+ props: {
14789
+ treeData: [],
14790
+ treeCheckable: true,
14791
+ showSearch: true,
14792
+ allowClear: true,
14793
+ showArrow: true,
14794
+ treeNodeFilterProp: 'title',
14795
+ treeDefaultExpandAll: true,
14796
+ maxTagCount: 1,
14797
+ placeholder: '请选择',
14798
+ style: {
14799
+ width: '100%'
14800
+ },
14801
+ dropdownStyle: {
14802
+ maxHeight: 400,
14803
+ maxWidth: 100,
14804
+ overflow: 'auto'
14805
+ }
14806
+ }
14807
+ }
14808
+ }, {
14809
+ name: 'qp-classId-in',
14810
+ type: 'select',
14811
+ label: '品类',
14812
+ field: {
14813
+ type: 'select',
14814
+ props: {
14815
+ mode: 'multiple',
14816
+ notFoundContent: '暂无数据',
14817
+ allowClear: true,
14818
+ showSearch: true,
14819
+ showArrow: true,
14820
+ maxTagCount: 1,
14821
+ optionFilterProp: 'children',
14822
+ filterOption: function filterOption(input, option) {
14823
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14824
+ }
14825
+ }
14826
+ }
14827
+ }],
14828
+ tableColumns: [{
14829
+ title: '商品编码',
14830
+ width: 150,
14831
+ dataIndex: 'itemCode'
14832
+ }, {
14833
+ title: '商品名称',
14834
+ width: 200,
14835
+ ellipsis: {
14836
+ showTitle: false
14837
+ },
14838
+ render: function render(text) {
14839
+ return /*#__PURE__*/React.createElement(Tooltip, {
14840
+ placement: "topLeft",
14841
+ title: text
14842
+ }, text);
14843
+ },
14844
+ dataIndex: 'name'
14845
+ }, {
14846
+ title: '所属组织',
14847
+ width: 100,
14848
+ ellipsis: {
14849
+ showTitle: false
14850
+ },
14851
+ render: function render(text) {
14852
+ return /*#__PURE__*/React.createElement(Tooltip, {
14853
+ placement: "topLeft",
14854
+ title: text
14855
+ }, text);
14856
+ },
14857
+ dataIndex: 'ownOrgSignName'
14858
+ }, {
14859
+ title: '品牌',
14860
+ width: 100,
14861
+ ellipsis: {
14862
+ showTitle: false
14863
+ },
14864
+ render: function render(text) {
14865
+ return /*#__PURE__*/React.createElement(Tooltip, {
14866
+ placement: "topLeft",
14867
+ title: text
14868
+ }, text);
14869
+ },
14870
+ dataIndex: 'brandName'
14871
+ }, {
14872
+ title: '类目',
14873
+ width: 100,
14874
+ ellipsis: {
14875
+ showTitle: false
14876
+ },
14877
+ render: function render(text) {
14878
+ return /*#__PURE__*/React.createElement(Tooltip, {
14879
+ placement: "topLeft",
14880
+ title: text
14881
+ }, text);
14882
+ },
14883
+ dataIndex: 'categoryName'
14884
+ }, {
14885
+ title: '品类',
14886
+ width: 100,
14887
+ ellipsis: {
14888
+ showTitle: false
14889
+ },
14890
+ render: function render(text) {
14891
+ return /*#__PURE__*/React.createElement(Tooltip, {
14892
+ placement: "topLeft",
14893
+ title: text
14894
+ }, text);
14895
+ },
14896
+ dataIndex: 'className'
14897
+ }],
14898
+ selectColumn: mTpSelectColumn
14899
+ };
14900
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14901
+ modalTableProps: modalTableProps
14902
+ })));
14903
+ };
14599
14904
 
14600
14905
  var CommodityEntry = function CommodityEntry(props) {
14601
14906
  var dataValidationRef = useRef();
@@ -18514,24 +18819,6 @@ var setMenuTreeData = function setMenuTreeData(routesData) {
18514
18819
  if (_ret === "continue") continue;
18515
18820
  }
18516
18821
  };
18517
- function handleUserID() {
18518
- var _JSON$parse, _JSON$parse$accountPe;
18519
- return (_JSON$parse = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$accountPe = _JSON$parse.accountPersonDetail) === null || _JSON$parse$accountPe === void 0 ? void 0 : _JSON$parse$accountPe.username;
18520
- }
18521
- function handleAccountID() {
18522
- var _JSON$parse2, _JSON$parse2$accountP;
18523
- return (_JSON$parse2 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : (_JSON$parse2$accountP = _JSON$parse2.accountPersonDetail) === null || _JSON$parse2$accountP === void 0 ? void 0 : _JSON$parse2$accountP.id;
18524
- }
18525
- function handleUserName() {
18526
- var _JSON$parse3, _JSON$parse3$accountP;
18527
- return (_JSON$parse3 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse3 === void 0 ? void 0 : (_JSON$parse3$accountP = _JSON$parse3.accountPersonDetail) === null || _JSON$parse3$accountP === void 0 ? void 0 : _JSON$parse3$accountP.employeeName;
18528
- }
18529
- function handleUserPhone() {
18530
- var _JSON$parse4, _JSON$parse4$accountP, _JSON$parse4$accountP2;
18531
- var str = ((_JSON$parse4 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')) === null || _JSON$parse4 === void 0 ? void 0 : (_JSON$parse4$accountP = _JSON$parse4.accountPersonDetail) === null || _JSON$parse4$accountP === void 0 ? void 0 : (_JSON$parse4$accountP2 = _JSON$parse4$accountP.person) === null || _JSON$parse4$accountP2 === void 0 ? void 0 : _JSON$parse4$accountP2.phone) || '';
18532
- var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
18533
- return enStr;
18534
- }
18535
18822
  var setLoginOutPath = function setLoginOutPath() {
18536
18823
  if (window.__POWERED_BY_WUJIE__) {
18537
18824
  var _window$$wujie;
@@ -18918,7 +19205,7 @@ var LoginModal = (function (props) {
18918
19205
  onClick: function onClick() {
18919
19206
  form.validateFields().then(function (res) {
18920
19207
  axios({
18921
- url: "/bop/api/account/changePassWord/".concat(handleAccountID()),
19208
+ url: "/bop/api/account/changePassWord/".concat(getAccountID()),
18922
19209
  method: 'patch',
18923
19210
  params: res
18924
19211
  }).then(function (res) {
@@ -18938,7 +19225,7 @@ var LoginModal = (function (props) {
18938
19225
  span: 20
18939
19226
  },
18940
19227
  initialValues: {
18941
- username: handleUserID()
19228
+ username: getUserId()
18942
19229
  }
18943
19230
  }, /*#__PURE__*/React.createElement(Form.Item, {
18944
19231
  label: "\u8D26\u53F7",
@@ -19020,21 +19307,20 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
19020
19307
  };
19021
19308
  var loginOut = /*#__PURE__*/function () {
19022
19309
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
19023
- var resposne, sessionId;
19310
+ var sessionId;
19024
19311
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19025
19312
  while (1) {
19026
19313
  switch (_context.prev = _context.next) {
19027
19314
  case 0:
19028
19315
  _context.next = 2;
19029
- return JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
19316
+ return getSessionId();
19030
19317
  case 2:
19031
- resposne = _context.sent;
19032
- sessionId = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
19033
- _context.next = 6;
19318
+ sessionId = _context.sent;
19319
+ _context.next = 5;
19034
19320
  return outLogin({
19035
19321
  sessionId: sessionId
19036
19322
  });
19037
- case 6:
19323
+ case 5:
19038
19324
  // @ts-ignore
19039
19325
  if (BUILD_TYPE) {
19040
19326
  message.success('退出登录成功');
@@ -19044,7 +19330,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
19044
19330
  } else {
19045
19331
  setLoginOutPath();
19046
19332
  }
19047
- case 7:
19333
+ case 6:
19048
19334
  case "end":
19049
19335
  return _context.stop();
19050
19336
  }
@@ -19069,7 +19355,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
19069
19355
  src: Morentouxiang32
19070
19356
  })), /*#__PURE__*/React.createElement("div", {
19071
19357
  className: 'userDownTopC'
19072
- }, handleUserName()), /*#__PURE__*/React.createElement("div", {
19358
+ }, getUserName()), /*#__PURE__*/React.createElement("div", {
19073
19359
  className: 'userDownTopB'
19074
19360
  }, handleUserPhone())), /*#__PURE__*/React.createElement("div", {
19075
19361
  className: 'userDownB'
@@ -19104,7 +19390,7 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
19104
19390
  className: 'rcom_c'
19105
19391
  }, /*#__PURE__*/React.createElement("div", {
19106
19392
  className: 'rcom_ct'
19107
- }, handleUserName()), /*#__PURE__*/React.createElement("div", {
19393
+ }, getUserName()), /*#__PURE__*/React.createElement("div", {
19108
19394
  className: 'rcom_cb'
19109
19395
  }, handleUserPhone())), /*#__PURE__*/React.createElement("div", {
19110
19396
  className: 'rcom_r'
@@ -30325,8 +30611,7 @@ function hanleCallbackValue(codeProps, value, customerFields) {
30325
30611
  return newCodeProps;
30326
30612
  }
30327
30613
  function isAdmin() {
30328
- var _JSON$parse, _JSON$parse$accountPe;
30329
- var username = (_JSON$parse = JSON.parse(localStorage.getItem('userInfo') || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$accountPe = _JSON$parse.accountPersonDetail) === null || _JSON$parse$accountPe === void 0 ? void 0 : _JSON$parse$accountPe.username;
30614
+ var username = getUserId();
30330
30615
  return username === 'admin' || username === 'uiuiui';
30331
30616
  }
30332
30617
  var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
@@ -30455,4 +30740,4 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
30455
30740
  }, "setting"));
30456
30741
  });
30457
30742
 
30458
- 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 };
30743
+ export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, 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 };