@bit-sun/business-component 2.2.9 → 2.2.11

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 (178) 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 +656 -138
  10. package/dist/index.js +656 -137
  11. package/docs/index.md +21 -21
  12. package/lib/assets/drag.svg +17 -17
  13. package/lib/assets/exportFail.svg +37 -37
  14. package/lib/assets/exportProcessing.svg +28 -28
  15. package/lib/assets/exportSuccess.svg +34 -34
  16. package/lib/assets/label_icon_bottom.svg +25 -25
  17. package/lib/assets/upExport.svg +22 -22
  18. package/package.json +77 -77
  19. package/src/assets/32.svg +27 -27
  20. package/src/assets/addIcon.svg +17 -17
  21. package/src/assets/allfunc.svg +27 -27
  22. package/src/assets/arrowRight.svg +24 -24
  23. package/src/assets/btn-delete.svg +29 -29
  24. package/src/assets/btn-edit.svg +19 -19
  25. package/src/assets/btn-more.svg +17 -17
  26. package/src/assets/btn-submit.svg +19 -19
  27. package/src/assets/caidan.svg +11 -11
  28. package/src/assets/close.svg +26 -26
  29. package/src/assets/drag.svg +17 -17
  30. package/src/assets/exportFail.svg +37 -37
  31. package/src/assets/exportProcessing.svg +28 -28
  32. package/src/assets/exportSuccess.svg +34 -34
  33. package/src/assets/fixed-left-active.svg +11 -11
  34. package/src/assets/fixed-left.svg +15 -15
  35. package/src/assets/fixed-right-active.svg +11 -11
  36. package/src/assets/fixed-right.svg +15 -15
  37. package/src/assets/guanbi.svg +15 -15
  38. package/src/assets/icon-quanping.svg +15 -15
  39. package/src/assets/icon-shezhi.svg +17 -17
  40. package/src/assets/label_icon_bottom.svg +25 -25
  41. package/src/assets/list-no-img.svg +21 -21
  42. package/src/assets/morentouxiang-32.svg +23 -23
  43. package/src/assets/scanning.svg +24 -24
  44. package/src/assets/upExport.svg +22 -22
  45. package/src/components/Business/AddSelectBusiness/index.md +93 -63
  46. package/src/components/Business/AddSelectBusiness/index.tsx +601 -344
  47. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  48. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  49. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  50. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  59. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  60. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  61. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  62. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  63. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -156
  64. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  65. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  66. package/src/components/Business/BsLayouts/index.less +79 -79
  67. package/src/components/Business/BsLayouts/index.tsx +1479 -1479
  68. package/src/components/Business/BsLayouts/service.ts +10 -10
  69. package/src/components/Business/BsLayouts/utils.tsx +225 -230
  70. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -538
  71. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  72. package/src/components/Business/BsSulaQueryTable/index.tsx +520 -529
  73. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  74. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  75. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  76. package/src/components/Business/CommodityEntry/index.md +70 -70
  77. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  78. package/src/components/Business/CommonAlert/index.tsx +23 -23
  79. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  80. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  81. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  82. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  83. package/src/components/Business/DetailPageWrapper/index.tsx +313 -335
  84. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  85. package/src/components/Business/HomePageWrapper/index.less +33 -33
  86. package/src/components/Business/HomePageWrapper/index.md +45 -45
  87. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  88. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  89. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  90. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  91. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  92. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  93. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  94. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  95. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  96. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  97. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  98. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  99. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  100. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  101. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  102. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  103. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  104. package/src/components/Business/JsonQueryTable/index.less +16 -16
  105. package/src/components/Business/JsonQueryTable/index.md +328 -328
  106. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  107. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  108. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  109. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  110. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  111. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  112. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  113. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  114. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  115. package/src/components/Business/JsonQueryTable/static.ts +356 -356
  116. package/src/components/Business/SearchSelect/BusinessUtils.ts +1723 -1586
  117. package/src/components/Business/SearchSelect/common.ts +53 -53
  118. package/src/components/Business/SearchSelect/index.md +1310 -1254
  119. package/src/components/Business/SearchSelect/index.tsx +51 -51
  120. package/src/components/Business/SearchSelect/utils.ts +100 -100
  121. package/src/components/Business/StateFlow/index.less +130 -130
  122. package/src/components/Business/StateFlow/index.md +60 -60
  123. package/src/components/Business/StateFlow/index.tsx +29 -29
  124. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  125. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  126. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  127. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  128. package/src/components/Business/columnSettingTable/index.less +247 -247
  129. package/src/components/Business/columnSettingTable/index.md +357 -357
  130. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  131. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  132. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  133. package/src/components/Business/moreTreeTable/index.less +99 -99
  134. package/src/components/Business/moreTreeTable/index.md +508 -508
  135. package/src/components/Business/moreTreeTable/index.tsx +315 -315
  136. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  137. package/src/components/Functional/AddSelect/index.less +367 -367
  138. package/src/components/Functional/AddSelect/index.md +155 -155
  139. package/src/components/Functional/AddSelect/index.tsx +1165 -1072
  140. package/src/components/Functional/BillEntry/index.less +371 -371
  141. package/src/components/Functional/BillEntry/index.md +39 -39
  142. package/src/components/Functional/BillEntry/index.tsx +766 -766
  143. package/src/components/Functional/DataImport/index.less +63 -63
  144. package/src/components/Functional/DataImport/index.md +44 -44
  145. package/src/components/Functional/DataImport/index.tsx +695 -695
  146. package/src/components/Functional/DataValidation/index.less +63 -63
  147. package/src/components/Functional/DataValidation/index.md +39 -39
  148. package/src/components/Functional/DataValidation/index.tsx +687 -687
  149. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  150. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  151. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  152. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  153. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  154. package/src/components/Functional/SearchSelect/index.less +115 -115
  155. package/src/components/Functional/SearchSelect/index.md +141 -141
  156. package/src/components/Functional/SearchSelect/index.tsx +813 -813
  157. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  158. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  159. package/src/components/Functional/TreeSearchSelect/index.tsx +160 -160
  160. package/src/index.ts +34 -34
  161. package/src/plugin/TableColumnSetting/index.less +247 -247
  162. package/src/plugin/TableColumnSetting/index.md +50 -50
  163. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  164. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  165. package/src/styles/bsDefault.less +1912 -1906
  166. package/src/utils/CheckOneUser/index.md +39 -39
  167. package/src/utils/CheckOneUser/index.ts +51 -51
  168. package/src/utils/LocalstorageUtils.ts +58 -58
  169. package/src/utils/TableUtils.tsx +18 -18
  170. package/src/utils/checkUtils.ts +39 -39
  171. package/src/utils/enumConfig.ts +11 -11
  172. package/src/utils/getFormMode.js +12 -12
  173. package/src/utils/index.ts +2 -2
  174. package/src/utils/requestUtils.ts +36 -34
  175. package/src/utils/serialize.js +7 -7
  176. package/src/utils/utils.ts +183 -183
  177. package/tsconfig.json +29 -29
  178. package/typings.d.ts +4 -4
package/dist/index.esm.js CHANGED
@@ -87,7 +87,10 @@ function handleRequestAuthHeader(config) {
87
87
  }
88
88
  // 处理请求头
89
89
  var handleRequestHeader = function handleRequestHeader(config) {
90
+ var _resposne$accountPers, _resposne$employeeRes;
90
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;
91
94
  config.headers['x-tenant-id'] = getCurrentTenantId() || 1;
92
95
  if (localStorage.getItem('x-user-auth-context')) {
93
96
  config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
@@ -1227,7 +1230,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
1227
1230
  };
1228
1231
  });
1229
1232
 
1230
- luckysheet = window.luckysheet;
1233
+ luckysheet = window.luckysheet || window.top.luckysheet;
1231
1234
  _this.state = {
1232
1235
  showErrorData: false,
1233
1236
  data: [],
@@ -1808,7 +1811,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
1808
1811
  });
1809
1812
  }
1810
1813
 
1811
- luckysheet$1 = window.luckysheet;
1814
+ luckysheet$1 = window.luckysheet || window.top.luckysheet;
1812
1815
  _this.state = {
1813
1816
  showErrorData: false,
1814
1817
  data: [],
@@ -9892,7 +9895,11 @@ var AddSelect = function AddSelect(props) {
9892
9895
  buttonProps = _props$buttonProps === void 0 ? {} : _props$buttonProps,
9893
9896
  beforeShowModal = props.beforeShowModal,
9894
9897
  _props$tableCodeList = props.tableCodeList,
9895
- tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList;
9898
+ tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList,
9899
+ _props$businessType = props.businessType,
9900
+ businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
9901
+ _props$isAllowRepeate = props.isAllowRepeatedSelect,
9902
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
9896
9903
  var _ref = requestConfig || {},
9897
9904
  url = _ref.url,
9898
9905
  otherParams = _ref.otherParams,
@@ -9909,6 +9916,7 @@ var AddSelect = function AddSelect(props) {
9909
9916
  var realButtonProps = _objectSpread2({
9910
9917
  type: "primary"
9911
9918
  }, buttonProps);
9919
+ var selectRowKey = isAllowRepeatedSelect ? 'uuid' : mappingValueField;
9912
9920
  var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
9913
9921
  var initVal = value || (selectMode ? [] : null);
9914
9922
  var pageSize = 100; // 下拉框默认分页 条数
@@ -10060,7 +10068,9 @@ var AddSelect = function AddSelect(props) {
10060
10068
  var _record$packingUnitLi, _record$packingUnitLi2;
10061
10069
  // let
10062
10070
  if (record.needFocus === true && currentIndex === 0) ;
10063
- var precisionObj = {};
10071
+ var precisionObj = businessType == 'skc' ? {
10072
+ precision: 0
10073
+ } : {};
10064
10074
  var unitAccuracy = (_record$packingUnitLi = record.packingUnitList) === null || _record$packingUnitLi === void 0 ? void 0 : (_record$packingUnitLi2 = _record$packingUnitLi[0]) === null || _record$packingUnitLi2 === void 0 ? void 0 : _record$packingUnitLi2.unitAccuracy;
10065
10075
  var isCountUnitAccuracyCheck = item.dataIndex == 'count' && unitAccuracy !== undefined;
10066
10076
  if (isCountUnitAccuracyCheck) {
@@ -10184,6 +10194,53 @@ var AddSelect = function AddSelect(props) {
10184
10194
  }
10185
10195
  });
10186
10196
  }
10197
+ var selectLength = modalTableProps.selectColumn.filter(function (item) {
10198
+ return item.isSelectItem;
10199
+ }).length;
10200
+ if (item.isSelectItem) {
10201
+ return _objectSpread2(_objectSpread2({}, item), {}, {
10202
+ render: function render(text, record, index) {
10203
+ var _item$dataSource;
10204
+ if ((_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
10205
+ return /*#__PURE__*/React.createElement(Select, {
10206
+ value: text || null,
10207
+ onChange: function onChange(value) {
10208
+ if (businessType == 'skc' && popvalue.some(function (i) {
10209
+ return i.code == record.code && i[item.dataIndex] == value;
10210
+ })) {
10211
+ message.warning('相同skc配码不可设置相同哦');
10212
+ record[item.dataIndex] = null;
10213
+ var _newPopValue = popvalue.map(function (i, innerIndex) {
10214
+ if (innerIndex == index) {
10215
+ i[item.dataIndex] = record[item.dataIndex];
10216
+ }
10217
+ return i;
10218
+ });
10219
+ setPopValue(_newPopValue);
10220
+ return false;
10221
+ }
10222
+ record[item.dataIndex] = value;
10223
+ var newPopValue = popvalue.map(function (i, innerIndex) {
10224
+ if (innerIndex == index) {
10225
+ i[item.dataIndex] = record[item.dataIndex];
10226
+ }
10227
+ return i;
10228
+ });
10229
+ setPopValue(newPopValue);
10230
+ },
10231
+ style: {
10232
+ width: '160px'
10233
+ }
10234
+ }, item.dataSource.map(function (item) {
10235
+ return /*#__PURE__*/React.createElement(Select.Option, {
10236
+ value: item.code
10237
+ }, item.name);
10238
+ }));
10239
+ }
10240
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
10241
+ }
10242
+ });
10243
+ }
10187
10244
  return item;
10188
10245
  })), [{
10189
10246
  title: '操作',
@@ -10390,18 +10447,42 @@ var AddSelect = function AddSelect(props) {
10390
10447
  };
10391
10448
 
10392
10449
  useEffect(function () {
10393
- Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10394
- pageSize: 5000,
10395
- currentPage: 1,
10396
- 'ctl-withAuth': true
10397
- }), loadSelectSource("/items/category/queryCategoryTree", {
10398
- pageSize: 5000,
10399
- currentPage: 1
10400
- })]).then(function (x) {
10401
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10402
- formatTreeDataSource(x, 1, 3, tableSearchForm);
10403
- });
10404
- }, []);
10450
+ if (businessType == 'sku') {
10451
+ Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10452
+ pageSize: 5000,
10453
+ currentPage: 1,
10454
+ 'ctl-withAuth': true
10455
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10456
+ pageSize: 5000,
10457
+ currentPage: 1
10458
+ })]).then(function (x) {
10459
+ formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10460
+ formatTreeDataSource(x, 1, 3, tableSearchForm);
10461
+ });
10462
+ }
10463
+ if (businessType == 'skc') {
10464
+ Promise.all([loadSelectSource("/items/item/propertyValue", {
10465
+ pageSize: 5000,
10466
+ currentPage: 1,
10467
+ 'qp-propertyId-eq': '1467042217951883265'
10468
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10469
+ pageSize: 5000,
10470
+ currentPage: 1
10471
+ }), loadSelectSource("/items/class/withProperty", {
10472
+ pageSize: 5000,
10473
+ currentPage: 1
10474
+ }), loadSelectSource("/items/brand/queryBrandList", {
10475
+ pageSize: 5000,
10476
+ currentPage: 1,
10477
+ 'ctl-withAuth': true
10478
+ })]).then(function (x) {
10479
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
10480
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
10481
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
10482
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
10483
+ });
10484
+ }
10485
+ }, [businessType]);
10405
10486
  useEffect(function () {
10406
10487
  if (value) {
10407
10488
  setPopValue(value);
@@ -10531,8 +10612,18 @@ var AddSelect = function AddSelect(props) {
10531
10612
  selectRows[selectedRowKeys.length]['needFocus'] = true;
10532
10613
  }
10533
10614
  }
10534
- setPopValue(selectRows);
10535
- setSelectedRowKeys(selectKeys);
10615
+ if (isAllowRepeatedSelect) {
10616
+ var list = popvalue.concat(selectRows).map(function (i) {
10617
+ return _objectSpread2(_objectSpread2({}, i), {}, {
10618
+ uuid: i.uuid || uuid()
10619
+ });
10620
+ });
10621
+ setPopValue(list);
10622
+ setSelectedRowKeys([]);
10623
+ } else {
10624
+ setPopValue(selectRows);
10625
+ setSelectedRowKeys(selectKeys);
10626
+ }
10536
10627
  // setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
10537
10628
  // setCheckedAll(filterRows.length === tablePagination?.total);
10538
10629
  };
@@ -10649,12 +10740,19 @@ var AddSelect = function AddSelect(props) {
10649
10740
  setSelectedRowKeys([]);
10650
10741
  };
10651
10742
  var deleteRecord = function deleteRecord(record) {
10652
- setPopValue(popvalue.filter(function (item) {
10653
- return item.skuCode !== record.skuCode;
10654
- }));
10655
- setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10656
- return item !== record.skuCode;
10657
- })));
10743
+ if (isAllowRepeatedSelect) {
10744
+ setPopValue(popvalue.filter(function (item) {
10745
+ return item.uuid !== record.uuid;
10746
+ }));
10747
+ setSelectedRowKeys([]);
10748
+ } else {
10749
+ setPopValue(popvalue.filter(function (item) {
10750
+ return item.skuCode !== record.skuCode;
10751
+ }));
10752
+ setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10753
+ return item !== record.skuCode;
10754
+ })));
10755
+ }
10658
10756
  };
10659
10757
  var inputIndex = 0;
10660
10758
  useEffect(function () {
@@ -10726,6 +10824,7 @@ var AddSelect = function AddSelect(props) {
10726
10824
  handleColumns(showSelectedCol, [], function (res) {
10727
10825
  return setShowColumnsCallback(res);
10728
10826
  });
10827
+ var selectLength = isAllowRepeatedSelect ? (popvalue === null || popvalue === void 0 ? void 0 : popvalue.length) || 0 : (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0;
10729
10828
  return /*#__PURE__*/React.createElement("div", {
10730
10829
  className: 'add_select'
10731
10830
  }, /*#__PURE__*/React.createElement("div", {
@@ -10811,7 +10910,7 @@ var AddSelect = function AddSelect(props) {
10811
10910
  style: themeColor
10812
10911
  }, (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total) || 0), "\xA0\u9879", selectMode ? /*#__PURE__*/React.createElement("span", null, "\uFF0C \u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React.createElement("span", {
10813
10912
  style: themeColor
10814
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879") : ''), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10913
+ }, selectLength), "\xA0\u9879") : ''), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10815
10914
  style: {
10816
10915
  marginRight: 8
10817
10916
  }
@@ -10854,7 +10953,7 @@ var AddSelect = function AddSelect(props) {
10854
10953
  }
10855
10954
  }, /*#__PURE__*/React.createElement("span", null, "\u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React.createElement("span", {
10856
10955
  style: themeColor
10857
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879")), /*#__PURE__*/React.createElement("div", {
10956
+ }, selectLength), "\xA0\u9879")), /*#__PURE__*/React.createElement("div", {
10858
10957
  style: {
10859
10958
  display: 'flex'
10860
10959
  }
@@ -10888,7 +10987,7 @@ var AddSelect = function AddSelect(props) {
10888
10987
  dataSource: popvalue,
10889
10988
  pagination: false,
10890
10989
  // onChange={handleTableChange}
10891
- rowKey: mappingValueField,
10990
+ rowKey: selectRowKey,
10892
10991
  rowClassName: 'row-class',
10893
10992
  scroll: {
10894
10993
  y: 500
@@ -11938,6 +12037,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
11938
12037
  case 'skuCommodity':
11939
12038
  case 'skuPropertyValue':
11940
12039
  case 'spuCommodity':
12040
+ case 'skcCommodity':
11941
12041
  result = '/items';
11942
12042
  break;
11943
12043
  case 'physicalWarehouse':
@@ -12637,6 +12737,155 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
12637
12737
  }]
12638
12738
  }, modalTableBusProps);
12639
12739
  }
12740
+ // 商品选择器skc
12741
+ if (type === 'skcCommodity') {
12742
+ requestConfig = _objectSpread2({
12743
+ url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
12744
+ filter: 'qp-code,name-orGroup,like',
12745
+ mappingTextField: 'name',
12746
+ mappingValueField: 'code',
12747
+ sourceName: 'qp-skcCode-eq'
12748
+ }, requestConfigProp);
12749
+ tableSearchForm = [{
12750
+ name: 'qp-code-like',
12751
+ label: 'SKC编码'
12752
+ }, {
12753
+ name: 'qp-skcName-like',
12754
+ label: 'SKC名称'
12755
+ }, {
12756
+ name: 'qp-itemName-like',
12757
+ label: '商品名称'
12758
+ }, {
12759
+ name: 'qp-colorName-in',
12760
+ type: 'select',
12761
+ label: '颜色',
12762
+ field: {
12763
+ type: 'select',
12764
+ props: {
12765
+ mode: 'multiple',
12766
+ notFoundContent: '暂无数据',
12767
+ allowClear: true,
12768
+ showSearch: true,
12769
+ showArrow: true,
12770
+ maxTagCount: 1,
12771
+ optionFilterProp: 'children',
12772
+ filterOption: function filterOption(input, option) {
12773
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12774
+ }
12775
+ }
12776
+ }
12777
+ }, {
12778
+ name: 'qp-categoryId-in',
12779
+ type: 'treeSelect',
12780
+ label: '类目',
12781
+ field: {
12782
+ type: 'treeSelect',
12783
+ props: {
12784
+ treeData: [],
12785
+ treeCheckable: true,
12786
+ showSearch: true,
12787
+ allowClear: true,
12788
+ showArrow: true,
12789
+ treeNodeFilterProp: 'title',
12790
+ treeDefaultExpandAll: true,
12791
+ maxTagCount: 1,
12792
+ placeholder: '请选择',
12793
+ style: {
12794
+ width: '100%'
12795
+ },
12796
+ dropdownStyle: {
12797
+ maxHeight: 400,
12798
+ maxWidth: 100,
12799
+ overflow: 'auto'
12800
+ }
12801
+ }
12802
+ }
12803
+ }, {
12804
+ name: 'qp-classId-in',
12805
+ type: 'select',
12806
+ label: '品类',
12807
+ field: {
12808
+ type: 'select',
12809
+ props: {
12810
+ mode: 'multiple',
12811
+ notFoundContent: '暂无数据',
12812
+ allowClear: true,
12813
+ showSearch: true,
12814
+ showArrow: true,
12815
+ maxTagCount: 1,
12816
+ optionFilterProp: 'children',
12817
+ filterOption: function filterOption(input, option) {
12818
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12819
+ }
12820
+ }
12821
+ }
12822
+ }, {
12823
+ name: 'qp-brandId-in',
12824
+ type: 'select',
12825
+ label: '品牌',
12826
+ field: {
12827
+ type: 'select',
12828
+ props: {
12829
+ mode: 'multiple',
12830
+ notFoundContent: '暂无数据',
12831
+ allowClear: true,
12832
+ showSearch: true,
12833
+ showArrow: true,
12834
+ maxTagCount: 1,
12835
+ optionFilterProp: 'children',
12836
+ filterOption: function filterOption(input, option) {
12837
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12838
+ }
12839
+ }
12840
+ }
12841
+ }];
12842
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/item/propertyValue"), {
12843
+ pageSize: 5000,
12844
+ currentPage: 1,
12845
+ 'qp-propertyId-eq': '1467042217951883265'
12846
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
12847
+ pageSize: 5000,
12848
+ currentPage: 1
12849
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
12850
+ pageSize: 5000,
12851
+ currentPage: 1
12852
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
12853
+ pageSize: 5000,
12854
+ currentPage: 1,
12855
+ 'ctl-withAuth': true
12856
+ })]).then(function (x) {
12857
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
12858
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
12859
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
12860
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
12861
+ });
12862
+ modalTableProps = _objectSpread2({
12863
+ modalTableTitle: '选择SKC',
12864
+ tableSearchForm: tableSearchForm,
12865
+ tableColumns: [{
12866
+ title: 'SKC编码',
12867
+ dataIndex: 'code'
12868
+ }, {
12869
+ title: 'SKC名称',
12870
+ dataIndex: 'name'
12871
+ }, {
12872
+ title: '商品名称',
12873
+ dataIndex: 'itemName'
12874
+ }, {
12875
+ title: '颜色',
12876
+ dataIndex: 'colorName'
12877
+ }, {
12878
+ title: '类目',
12879
+ dataIndex: 'categoryText'
12880
+ }, {
12881
+ title: '品类',
12882
+ dataIndex: 'className'
12883
+ }, {
12884
+ title: '品牌',
12885
+ dataIndex: 'brandName'
12886
+ }]
12887
+ }, modalTableBusProps);
12888
+ }
12640
12889
  // 商品规格选择器(无弹窗)
12641
12890
  if (type === 'skuPropertyValue') {
12642
12891
  requestConfig = _objectSpread2({
@@ -13866,7 +14115,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
13866
14115
  setValue(value);
13867
14116
  },
13868
14117
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
13869
- onSaveCallback: parProps.onSaveCallback
14118
+ onSaveCallback: parProps.onSaveCallback,
14119
+ businessType: 'sku'
13870
14120
  // onSaveCallback: (rows) => {
13871
14121
  // console.log('save call', rows);
13872
14122
  // // return Promise.resolve(true);
@@ -14072,6 +14322,280 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14072
14322
  modalTableProps: modalTableProps
14073
14323
  })));
14074
14324
  };
14325
+ var AddSkcSelect = function AddSkcSelect(parProps) {
14326
+ var selectProps = {
14327
+ mode: 'multiple'
14328
+ };
14329
+ var _useState3 = useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
14330
+ _useState4 = _slicedToArray(_useState3, 2),
14331
+ value = _useState4[0],
14332
+ setValue = _useState4[1];
14333
+ var _useState5 = useState([]),
14334
+ _useState6 = _slicedToArray(_useState5, 2),
14335
+ propertyList = _useState6[0],
14336
+ setPropertyList = _useState6[1];
14337
+ useEffect(function () {
14338
+ axios.get("/items/itemPropertyValueGroup/listNoPage").then(function (result) {
14339
+ var _result, _result2;
14340
+ result = result.data;
14341
+ if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
14342
+ message.error(result.msg);
14343
+ return;
14344
+ }
14345
+ var data = result.data || [];
14346
+ setPropertyList(data);
14347
+ }).catch(function (err) {});
14348
+ }, []);
14349
+ var initialSelectColumn = [{
14350
+ title: 'SKC编码',
14351
+ width: 150,
14352
+ dataIndex: 'code'
14353
+ }, {
14354
+ title: 'SKC名称',
14355
+ width: 200,
14356
+ ellipsis: {
14357
+ showTitle: false
14358
+ },
14359
+ render: function render(text) {
14360
+ return /*#__PURE__*/React.createElement(Tooltip, {
14361
+ placement: "topLeft",
14362
+ title: text
14363
+ }, text);
14364
+ },
14365
+ dataIndex: 'name'
14366
+ }, {
14367
+ title: '颜色',
14368
+ width: 200,
14369
+ ellipsis: {
14370
+ showTitle: false
14371
+ },
14372
+ render: function render(text) {
14373
+ return /*#__PURE__*/React.createElement(Tooltip, {
14374
+ placement: "topLeft",
14375
+ title: text
14376
+ }, text);
14377
+ },
14378
+ dataIndex: 'colorName'
14379
+ }, {
14380
+ title: '配码',
14381
+ dataIndex: 'selectPropertyGroupCode',
14382
+ width: 160,
14383
+ isSelectItem: true,
14384
+ dataSource: propertyList
14385
+ }, {
14386
+ title: '数量',
14387
+ width: 100,
14388
+ isInputItem: true,
14389
+ dataIndex: 'count'
14390
+ }];
14391
+ var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
14392
+ var props = {
14393
+ buttonText: parProps.buttonText || '新增',
14394
+ buttonProps: parProps.buttonProps || {},
14395
+ tableCodeList: parProps.tableCodeList || ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
14396
+ value: value,
14397
+ // labelInValue: true, // 非必填 默认为false
14398
+ requestConfig: _objectSpread2({
14399
+ url: "/items/skc/skcSelect",
14400
+ filter: 'qp-name-like',
14401
+ otherParams: {},
14402
+ mappingTextField: 'name',
14403
+ mappingValueField: 'code'
14404
+ }, parProps.requestConfig),
14405
+ selectProps: selectProps,
14406
+ onChange: function onChange(value) {
14407
+ console.log(value);
14408
+ setValue(value);
14409
+ },
14410
+ beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
14411
+ onSaveCallback: parProps.onSaveCallback,
14412
+ businessType: 'skc',
14413
+ isAllowRepeatedSelect: true
14414
+ };
14415
+ var modalTableProps = {
14416
+ modalTableTitle: '选择商品',
14417
+ tableSearchForm: [{
14418
+ name: 'qp-code-like',
14419
+ label: 'SKC编码'
14420
+ }, {
14421
+ name: 'qp-skcName-like',
14422
+ label: 'SKC名称'
14423
+ }, {
14424
+ name: 'qp-itemName-like',
14425
+ label: '商品名称'
14426
+ }, {
14427
+ name: 'qp-colorName-in',
14428
+ type: 'select',
14429
+ label: '颜色',
14430
+ field: {
14431
+ type: 'select',
14432
+ props: {
14433
+ mode: 'multiple',
14434
+ notFoundContent: '暂无数据',
14435
+ allowClear: true,
14436
+ showSearch: true,
14437
+ showArrow: true,
14438
+ maxTagCount: 1,
14439
+ optionFilterProp: 'children',
14440
+ filterOption: function filterOption(input, option) {
14441
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14442
+ }
14443
+ }
14444
+ }
14445
+ }, {
14446
+ name: 'qp-categoryId-in',
14447
+ type: 'treeSelect',
14448
+ label: '类目',
14449
+ field: {
14450
+ type: 'treeSelect',
14451
+ props: {
14452
+ treeData: [],
14453
+ treeCheckable: true,
14454
+ showSearch: true,
14455
+ allowClear: true,
14456
+ showArrow: true,
14457
+ treeNodeFilterProp: 'title',
14458
+ treeDefaultExpandAll: true,
14459
+ maxTagCount: 1,
14460
+ placeholder: '请选择',
14461
+ style: {
14462
+ width: '100%'
14463
+ },
14464
+ dropdownStyle: {
14465
+ maxHeight: 400,
14466
+ maxWidth: 100,
14467
+ overflow: 'auto'
14468
+ }
14469
+ }
14470
+ }
14471
+ }, {
14472
+ name: 'qp-classId-in',
14473
+ type: 'select',
14474
+ label: '品类',
14475
+ field: {
14476
+ type: 'select',
14477
+ props: {
14478
+ mode: 'multiple',
14479
+ notFoundContent: '暂无数据',
14480
+ allowClear: true,
14481
+ showSearch: true,
14482
+ showArrow: true,
14483
+ maxTagCount: 1,
14484
+ optionFilterProp: 'children',
14485
+ filterOption: function filterOption(input, option) {
14486
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14487
+ }
14488
+ }
14489
+ }
14490
+ }, {
14491
+ name: 'qp-brandId-in',
14492
+ type: 'select',
14493
+ label: '品牌',
14494
+ field: {
14495
+ type: 'select',
14496
+ props: {
14497
+ mode: 'multiple',
14498
+ notFoundContent: '暂无数据',
14499
+ allowClear: true,
14500
+ showSearch: true,
14501
+ showArrow: true,
14502
+ maxTagCount: 1,
14503
+ optionFilterProp: 'children',
14504
+ filterOption: function filterOption(input, option) {
14505
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14506
+ }
14507
+ }
14508
+ }
14509
+ }],
14510
+ tableColumns: [{
14511
+ title: 'SKC编码',
14512
+ width: 150,
14513
+ dataIndex: 'code'
14514
+ }, {
14515
+ title: 'SKC名称',
14516
+ width: 200,
14517
+ ellipsis: {
14518
+ showTitle: false
14519
+ },
14520
+ render: function render(text) {
14521
+ return /*#__PURE__*/React.createElement(Tooltip, {
14522
+ placement: "topLeft",
14523
+ title: text
14524
+ }, text);
14525
+ },
14526
+ dataIndex: 'name'
14527
+ }, {
14528
+ title: '商品名称',
14529
+ width: 100,
14530
+ ellipsis: {
14531
+ showTitle: false
14532
+ },
14533
+ dataIndex: 'itemName',
14534
+ render: function render(text) {
14535
+ return /*#__PURE__*/React.createElement(Tooltip, {
14536
+ placement: "topLeft",
14537
+ title: text
14538
+ }, text);
14539
+ }
14540
+ }, {
14541
+ title: '颜色',
14542
+ width: 100,
14543
+ ellipsis: {
14544
+ showTitle: false
14545
+ },
14546
+ render: function render(text) {
14547
+ return /*#__PURE__*/React.createElement(Tooltip, {
14548
+ placement: "topLeft",
14549
+ title: text
14550
+ }, text);
14551
+ },
14552
+ dataIndex: 'colorName'
14553
+ }, {
14554
+ title: '类目',
14555
+ width: 100,
14556
+ ellipsis: {
14557
+ showTitle: false
14558
+ },
14559
+ render: function render(text) {
14560
+ return /*#__PURE__*/React.createElement(Tooltip, {
14561
+ placement: "topLeft",
14562
+ title: text
14563
+ }, text);
14564
+ },
14565
+ dataIndex: 'categoryName'
14566
+ }, {
14567
+ title: '品类',
14568
+ width: 100,
14569
+ ellipsis: {
14570
+ showTitle: false
14571
+ },
14572
+ render: function render(text) {
14573
+ return /*#__PURE__*/React.createElement(Tooltip, {
14574
+ placement: "topLeft",
14575
+ title: text
14576
+ }, text);
14577
+ },
14578
+ dataIndex: 'className'
14579
+ }, {
14580
+ title: '品牌',
14581
+ width: 100,
14582
+ ellipsis: {
14583
+ showTitle: false
14584
+ },
14585
+ render: function render(text) {
14586
+ return /*#__PURE__*/React.createElement(Tooltip, {
14587
+ placement: "topLeft",
14588
+ title: text
14589
+ }, text);
14590
+ },
14591
+ dataIndex: 'brandName'
14592
+ }],
14593
+ selectColumn: mTpSelectColumn
14594
+ };
14595
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14596
+ modalTableProps: modalTableProps
14597
+ })));
14598
+ };
14075
14599
 
14076
14600
  var CommodityEntry = function CommodityEntry(props) {
14077
14601
  var dataValidationRef = useRef();
@@ -15991,43 +16515,25 @@ var DetailWrapper = /*#__PURE__*/React.memo(function (_ref) {
15991
16515
  var pageTitle = useMemo(function () {
15992
16516
  return getPageTitle(pathname);
15993
16517
  }, [pathname, title]);
15994
- // const breadcrumbArr = `${basePath}${pathname}`
15995
- // .split('/')
15996
- // .slice(1)
15997
- // .map((_item, index, arr) =>
15998
- // matchParamsPath(
15999
- // `/${arr.slice(0, index + 1).join('/')}`,
16000
- // breadcrumbNameMap,
16001
- // ),
16002
- // )
16003
- // .filter((item) => item);
16004
16518
  useEffect(function () {}, []);
16005
16519
  var ShowFullScreen = function ShowFullScreen() {
16006
- if (window.top != window) {
16007
- window.parent.postMessage({
16008
- type: 'screenChange',
16009
- id: itemPath
16010
- }, '*');
16011
- setIsFnllScreen(!isFullScreen);
16012
- } else {
16013
- var _isFullScreen = document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen;
16014
- var contentEle = document.querySelector("body");
16015
- // addTabsNavStyle(isFullScreen);
16016
- if (contentEle && !_isFullScreen) {
16017
- var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
16018
- if (fullScreenEle) {
16019
- fullScreenEle.call(contentEle);
16020
- setIsFnllScreen(true);
16021
- return;
16022
- }
16520
+ var isFullScreen = window.top.document.fullScreen || window.top.document.webkitIsFullScreen || window.top.document.mozFullScreen;
16521
+ var contentEle = window.top.document.querySelector("body");
16522
+ // addTabsNavStyle(isFullScreen);
16523
+ if (contentEle && !isFullScreen) {
16524
+ var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
16525
+ if (fullScreenEle) {
16526
+ fullScreenEle.call(contentEle);
16527
+ setIsFnllScreen(true);
16528
+ return;
16023
16529
  }
16024
- if (document && _isFullScreen) {
16025
- var exitFullScreen = document.exitFullscreen || document.mozCancelFullScreen || document.webkitCancelFullScreen || document.msExitFullscreen;
16026
- if (exitFullScreen) {
16027
- exitFullScreen.call(document);
16028
- setIsFnllScreen(false);
16029
- return;
16030
- }
16530
+ }
16531
+ if (window.top.document && isFullScreen) {
16532
+ var exitFullScreen = window.top.document.exitFullscreen || window.top.document.mozCancelFullScreen || window.top.document.webkitCancelFullScreen || window.top.document.msExitFullscreen;
16533
+ if (exitFullScreen) {
16534
+ exitFullScreen.call(window.top.document);
16535
+ setIsFnllScreen(false);
16536
+ return;
16031
16537
  }
16032
16538
  }
16033
16539
  };
@@ -17500,12 +18006,14 @@ var BsSulaQueryTable = (function (props) {
17500
18006
  var bsTableCode = tableCode || window.location.hash; //设置列字段的唯一标识
17501
18007
  // 获取table高度
17502
18008
  var getTableHeight = function getTableHeight() {
17503
- var _document$querySelect, _document$querySelect2, _document$querySelect3;
17504
- var cancelHeight = window.top == window ? 303 : 223;
17505
- var isFullScreen = document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen;
17506
- var h = document.body.clientHeight - (((_document$querySelect = document.querySelector('.table-bssula-summary')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.clientHeight) || 0) - (((_document$querySelect2 = document.querySelector('.ant-form ant-form-horizontal')) === null || _document$querySelect2 === void 0 ? void 0 : _document$querySelect2.clientHeight) || 0) - (isFullScreen ? 0 : ((_document$querySelect3 = document.querySelector('.ant-pro-page-container-warp')) === null || _document$querySelect3 === void 0 ? void 0 : _document$querySelect3.clientHeight) || 0) - cancelHeight + 'px';
17507
- setHeight(h);
17508
- setValue(_objectSpread2({}, value));
18009
+ setTimeout(function () {
18010
+ var _document$querySelect, _document$querySelect2, _document$querySelect3, _document$querySelect4;
18011
+ var cancelHeight = window.top == window ? 303 : 223;
18012
+ var isFullScreen = window.top.document.fullScreen || window.top.document.webkitIsFullScreen || window.top.document.mozFullScreen;
18013
+ var h = document.body.clientHeight - (((_document$querySelect = document.querySelector(".ant-tabs-tabpane-active .table-bssula-summary")) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.clientHeight) || 0) - (((_document$querySelect2 = document.querySelector(".ant-tabs-tabpane-active .list_top_tab .ant-tabs-nav")) === null || _document$querySelect2 === void 0 ? void 0 : _document$querySelect2.clientHeight) || 0) - (((_document$querySelect3 = document.querySelector(".ant-tabs-tabpane-active .ant-form ant-form-horizontal")) === null || _document$querySelect3 === void 0 ? void 0 : _document$querySelect3.clientHeight) || 0) - (isFullScreen ? 0 : ((_document$querySelect4 = document.querySelector(".ant-tabs-tabpane-active .ant-pro-page-container-warp")) === null || _document$querySelect4 === void 0 ? void 0 : _document$querySelect4.clientHeight) || 0) - cancelHeight + 'px';
18014
+ setHeight(h);
18015
+ setValue(_objectSpread2({}, value));
18016
+ }, 0);
17509
18017
  };
17510
18018
  //监测是否按下esc键
17511
18019
  function checkFull() {
@@ -17717,34 +18225,25 @@ var BsSulaQueryTable = (function (props) {
17717
18225
  return tableProps;
17718
18226
  };
17719
18227
  var ShowFullScreen = function ShowFullScreen() {
17720
- var itemPath = props.itemPath;
17721
- if (window.top != window) {
17722
- window.parent.postMessage({
17723
- type: 'screenChange',
17724
- id: itemPath
17725
- }, '*');
17726
- setIsFnllScreen(!isFullScreen);
17727
- } else {
17728
- var _isFullScreen = document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen;
17729
- var contentEle = document.querySelector("body");
17730
- // addTabsNavStyle(isFullScreen);
17731
- if (contentEle && !_isFullScreen) {
17732
- var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
17733
- if (fullScreenEle) {
17734
- fullScreenEle.call(contentEle);
17735
- setIsFnllScreen(true);
17736
- // getTableHeight(true);
17737
- return;
17738
- }
18228
+ var isFullScreen = window.top.document.fullScreen || window.top.document.webkitIsFullScreen || window.top.document.mozFullScreen;
18229
+ var contentEle = window.top.document.querySelector("body");
18230
+ // addTabsNavStyle(isFullScreen);
18231
+ if (contentEle && !isFullScreen) {
18232
+ var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
18233
+ if (fullScreenEle) {
18234
+ fullScreenEle.call(contentEle);
18235
+ setIsFnllScreen(true);
18236
+ // getTableHeight(true);
18237
+ return;
17739
18238
  }
17740
- if (document && _isFullScreen) {
17741
- var exitFullScreen = document.exitFullscreen || document.mozCancelFullScreen || document.webkitCancelFullScreen || document.msExitFullscreen;
17742
- if (exitFullScreen) {
17743
- exitFullScreen.call(document);
17744
- setIsFnllScreen(false);
17745
- // getTableHeight();
17746
- return;
17747
- }
18239
+ }
18240
+ if (window.top.document && isFullScreen) {
18241
+ var exitFullScreen = window.top.document.exitFullscreen || window.top.document.mozCancelFullScreen || window.top.document.webkitCancelFullScreen || window.top.document.msExitFullscreen;
18242
+ if (exitFullScreen) {
18243
+ exitFullScreen.call(window.top.document);
18244
+ setIsFnllScreen(false);
18245
+ // getTableHeight();
18246
+ return;
17748
18247
  }
17749
18248
  }
17750
18249
  };
@@ -18030,14 +18529,13 @@ function handleUserPhone() {
18030
18529
  return enStr;
18031
18530
  }
18032
18531
  var setLoginOutPath = function setLoginOutPath() {
18033
- if (window.top == window) {
18532
+ if (window.__POWERED_BY_WUJIE__) {
18533
+ var _window$$wujie;
18534
+ (_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.props.goToLogin();
18535
+ } else {
18034
18536
  history.push({
18035
18537
  pathname: '/user/login'
18036
18538
  });
18037
- } else {
18038
- window.parent.postMessage({
18039
- type: 'go2Login'
18040
- }, '*');
18041
18539
  }
18042
18540
  };
18043
18541
  var getBreadcrumbNameMap = function getBreadcrumbNameMap(menuData) {
@@ -20569,7 +21067,8 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20569
21067
  _createClass(BasicLayout, [{
20570
21068
  key: "componentDidMount",
20571
21069
  value: function componentDidMount() {
20572
- var _this2 = this,
21070
+ var _window$$wujie,
21071
+ _this2 = this,
20573
21072
  _localStorage$getItem;
20574
21073
  var _this$props = this.props,
20575
21074
  history = _this$props.history,
@@ -20578,27 +21077,42 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20578
21077
  pathToRegexp = _this$props.pathToRegexp;
20579
21078
  var istParent = 0;
20580
21079
  var self = this;
20581
- window.top != window && window.addEventListener('message', function (e) {
20582
- istParent = 1;
20583
- if (localStorage.getItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK)) {
20584
- localStorage.removeItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK);
20585
- } else {
20586
- localStorage.setItem('isTabChange', true);
20587
- }
20588
- if (typeof e.data === 'string') {
20589
- var newKey = encodeUrlQuery(e.data.replace(/^\/\w+\//, '/'));
20590
- history.push(newKey);
20591
- } else {
20592
- var info = e.data;
21080
+ // window.top != window &&
21081
+ // window.addEventListener('message', function (e) {
21082
+ // istParent = 1;
21083
+ // if (localStorage.getItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK)) {
21084
+ // localStorage.removeItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK);
21085
+ // } else {
21086
+ // localStorage.setItem('isTabChange', true);
21087
+ // }
21088
+ // if (typeof e.data === 'string') {
21089
+ // let newKey = encodeUrlQuery(e.data.replace(/^\/\w+\//, '/'));
21090
+ // history.push(newKey);
21091
+ // } else {
21092
+ // const info = e.data;
21093
+ // if (info.type === 'remove') {
21094
+ // self.tabActions['remove'](info.key.replace(/^\/\w+\//, '/'));
21095
+ // }
21096
+ // }
21097
+ // });
21098
+ (_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.bus.$on("main-route-change", function (appname, info) {
21099
+ console.log('$on main route change ----------------------------', appname, info);
21100
+ if (appname === itemPath) {
21101
+ istParent = 1;
21102
+ if (info.type === 'main') {
21103
+ var newPath = encodeUrlQuery(info.path);
21104
+ history.push(newPath);
21105
+ }
20593
21106
  if (info.type === 'remove') {
20594
- self.tabActions['remove'](info.key.replace(/^\/\w+\//, '/'));
21107
+ self.tabActions['remove'](info.path);
20595
21108
  }
20596
21109
  }
20597
21110
  });
20598
21111
  UN_LISTTEN_DRP = history.listen(function (route) {
20599
- if (window.__POWERED_BY_QIANKUN__) {
20600
- if (window.location.href.indexOf("/".concat(itemPath)) === -1) return;
20601
- }
21112
+ // if ((window as any).__POWERED_BY_QIANKUN__) {
21113
+ // if (window.location.href.indexOf(`/${itemPath}`) === -1) return;
21114
+ // }
21115
+ if (route.pathname.startsWith("/".concat(itemPath, "/"))) return;
20602
21116
  var _this2$state = _this2.state,
20603
21117
  listenRouterState = _this2$state.listenRouterState,
20604
21118
  listenRouterKey = _this2$state.listenRouterKey,
@@ -20617,8 +21131,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20617
21131
  currentKey = decodeURIComponent(route.pathname + _this2.parseQueryString(route.search));
20618
21132
  }
20619
21133
  if (!istParent) {
21134
+ var _window$$wujie2;
20620
21135
  if (route.pathname === '/') return;
20621
- window.parent.postMessage("/parent/".concat(itemPath).concat(currentKey), '*');
21136
+ (_window$$wujie2 = window.$wujie) === null || _window$$wujie2 === void 0 ? void 0 : _window$$wujie2.bus.$emit('sub-route-change', itemPath, currentKey);
21137
+ // window.parent.postMessage(`/parent/${itemPath}${currentKey}`, '*');
20622
21138
  }
20623
21139
  // 防止出错
20624
21140
  if (listenRouterKey.length !== listenRouterState.length) {
@@ -20660,28 +21176,24 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20660
21176
  lastTwoRouterArray.shift();
20661
21177
  if (!localStorage.getItem('isTabChange') && !localStorage.getItem('isMenuClick')) {
20662
21178
  if (lastTwoRouterArray[0] && typeof lastTwoRouterArray[0] === 'string') {
21179
+ var _route$state;
20663
21180
  var needRemoveKeyArray = hideMenuArray.filter(function (itemRoute) {
20664
21181
  return pathToRegexp(itemRoute.path || '').test(lastTwoRouterArray[0]);
20665
21182
  });
20666
21183
  // lastTwoRouterArray[0] != lastTwoRouterArray[1] 该判断条件用于判断是否是tab删除操作,如果是tab页删除操作,删除的是不是最后一个打开的tab页,执行history.push会导致错误的将最后打开的那个tab页也删除掉
20667
- if (needRemoveKeyArray.length && lastTwoRouterArray[0] != lastTwoRouterArray[1]) {
20668
- if ((!(lastTwoRouterArray[0].indexOf('/order/mainOrder/supplement') >= 0) || !pathToRegexp('/order/mainOrder/:parmode/separateOrder/:id').test(lastTwoRouterArray[1])) && (!pathToRegexp('/order/mainOrder/:parmode/separateOrder/:id').test(lastTwoRouterArray[0]) || !(lastTwoRouterArray[1].indexOf('order/mainOrder/separateOrder/') >= 0))) {
20669
- var _route$state;
20670
- if (!((_route$state = route.state) === null || _route$state === void 0 ? void 0 : _route$state.thisHideInMenuDoNotClose)) {
20671
- newListenRouterState = newListenRouterState.filter(function (item) {
20672
- var _ref3 = item.key ? item.key.split('?') : [],
20673
- _ref4 = _slicedToArray(_ref3, 1),
20674
- pathname = _ref4[0];
20675
- return pathname && pathname !== lastTwoRouterArray[0];
20676
- });
20677
- newListenRouterKey = newListenRouterKey.filter(function (item) {
20678
- var _ref5 = item ? item.split('?') : [],
20679
- _ref6 = _slicedToArray(_ref5, 1),
20680
- pathname = _ref6[0];
20681
- return pathname && pathname !== lastTwoRouterArray[0];
20682
- });
20683
- }
20684
- }
21184
+ if (needRemoveKeyArray.length && lastTwoRouterArray[0] != lastTwoRouterArray[1] && !((_route$state = route.state) === null || _route$state === void 0 ? void 0 : _route$state.thisHideInMenuDoNotClose)) {
21185
+ newListenRouterState = newListenRouterState.filter(function (item) {
21186
+ var _ref3 = item.key ? item.key.split('?') : [],
21187
+ _ref4 = _slicedToArray(_ref3, 1),
21188
+ pathname = _ref4[0];
21189
+ return pathname && pathname !== lastTwoRouterArray[0];
21190
+ });
21191
+ newListenRouterKey = newListenRouterKey.filter(function (item) {
21192
+ var _ref5 = item ? item.split('?') : [],
21193
+ _ref6 = _slicedToArray(_ref5, 1),
21194
+ pathname = _ref6[0];
21195
+ return pathname && pathname !== lastTwoRouterArray[0];
21196
+ });
20685
21197
  }
20686
21198
  }
20687
21199
  // refs?.tableRef?.current?.refreshTable();
@@ -21145,7 +21657,12 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
21145
21657
  }
21146
21658
  _createClass(WrapperComponent, [{
21147
21659
  key: "shouldComponentUpdate",
21148
- value: function shouldComponentUpdate() {
21660
+ value: function shouldComponentUpdate(nextProps) {
21661
+ var _nextProps$item, _nextProps$item$key;
21662
+ if (window.__POWERED_BY_WUJIE__ && (nextProps === null || nextProps === void 0 ? void 0 : (_nextProps$item = nextProps.item) === null || _nextProps$item === void 0 ? void 0 : (_nextProps$item$key = _nextProps$item.key) === null || _nextProps$item$key === void 0 ? void 0 : _nextProps$item$key.indexOf('edit-template-template')) > -1) {
21663
+ // 适配wujie环境主应用下渲染打印编辑器
21664
+ return true;
21665
+ }
21149
21666
  return false;
21150
21667
  }
21151
21668
  }, {
@@ -21158,6 +21675,7 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
21158
21675
  getDictionaryTextByValue = _this$props4.getDictionaryTextByValue,
21159
21676
  timeFormat = _this$props4.timeFormat,
21160
21677
  transparentProps = _this$props4.transparentProps;
21678
+ console.log('child wrapper conpent', this.props);
21161
21679
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(item.content, _objectSpread2(_objectSpread2(_objectSpread2({
21162
21680
  getDictionarySource: getDictionarySource,
21163
21681
  getDictionaryTextByValue: getDictionaryTextByValue,
@@ -29929,4 +30447,4 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
29929
30447
  }, "setting"));
29930
30448
  });
29931
30449
 
29932
- export { AddSelect, AddSkuSelect, BillEntry, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };
30450
+ 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 };