@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.js CHANGED
@@ -105,7 +105,10 @@ function handleRequestAuthHeader(config) {
105
105
  }
106
106
  // 处理请求头
107
107
  var handleRequestHeader = function handleRequestHeader(config) {
108
+ var _resposne$accountPers, _resposne$employeeRes;
108
109
  config.headers['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
110
+ config.headers['x-account-id'] = (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
111
+ config.headers['x-employee-id'] = (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
109
112
  config.headers['x-tenant-id'] = getCurrentTenantId() || 1;
110
113
  if (localStorage.getItem('x-user-auth-context')) {
111
114
  config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
@@ -1245,7 +1248,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
1245
1248
  };
1246
1249
  });
1247
1250
 
1248
- luckysheet = window.luckysheet;
1251
+ luckysheet = window.luckysheet || window.top.luckysheet;
1249
1252
  _this.state = {
1250
1253
  showErrorData: false,
1251
1254
  data: [],
@@ -1826,7 +1829,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
1826
1829
  });
1827
1830
  }
1828
1831
 
1829
- luckysheet$1 = window.luckysheet;
1832
+ luckysheet$1 = window.luckysheet || window.top.luckysheet;
1830
1833
  _this.state = {
1831
1834
  showErrorData: false,
1832
1835
  data: [],
@@ -9910,7 +9913,11 @@ var AddSelect = function AddSelect(props) {
9910
9913
  buttonProps = _props$buttonProps === void 0 ? {} : _props$buttonProps,
9911
9914
  beforeShowModal = props.beforeShowModal,
9912
9915
  _props$tableCodeList = props.tableCodeList,
9913
- tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList;
9916
+ tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList,
9917
+ _props$businessType = props.businessType,
9918
+ businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
9919
+ _props$isAllowRepeate = props.isAllowRepeatedSelect,
9920
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
9914
9921
  var _ref = requestConfig || {},
9915
9922
  url = _ref.url,
9916
9923
  otherParams = _ref.otherParams,
@@ -9927,6 +9934,7 @@ var AddSelect = function AddSelect(props) {
9927
9934
  var realButtonProps = _objectSpread2({
9928
9935
  type: "primary"
9929
9936
  }, buttonProps);
9937
+ var selectRowKey = isAllowRepeatedSelect ? 'uuid' : mappingValueField;
9930
9938
  var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
9931
9939
  var initVal = value || (selectMode ? [] : null);
9932
9940
  var pageSize = 100; // 下拉框默认分页 条数
@@ -10078,7 +10086,9 @@ var AddSelect = function AddSelect(props) {
10078
10086
  var _record$packingUnitLi, _record$packingUnitLi2;
10079
10087
  // let
10080
10088
  if (record.needFocus === true && currentIndex === 0) ;
10081
- var precisionObj = {};
10089
+ var precisionObj = businessType == 'skc' ? {
10090
+ precision: 0
10091
+ } : {};
10082
10092
  var unitAccuracy = (_record$packingUnitLi = record.packingUnitList) === null || _record$packingUnitLi === void 0 ? void 0 : (_record$packingUnitLi2 = _record$packingUnitLi[0]) === null || _record$packingUnitLi2 === void 0 ? void 0 : _record$packingUnitLi2.unitAccuracy;
10083
10093
  var isCountUnitAccuracyCheck = item.dataIndex == 'count' && unitAccuracy !== undefined;
10084
10094
  if (isCountUnitAccuracyCheck) {
@@ -10202,6 +10212,53 @@ var AddSelect = function AddSelect(props) {
10202
10212
  }
10203
10213
  });
10204
10214
  }
10215
+ var selectLength = modalTableProps.selectColumn.filter(function (item) {
10216
+ return item.isSelectItem;
10217
+ }).length;
10218
+ if (item.isSelectItem) {
10219
+ return _objectSpread2(_objectSpread2({}, item), {}, {
10220
+ render: function render(text, record, index) {
10221
+ var _item$dataSource;
10222
+ if ((_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
10223
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
10224
+ value: text || null,
10225
+ onChange: function onChange(value) {
10226
+ if (businessType == 'skc' && popvalue.some(function (i) {
10227
+ return i.code == record.code && i[item.dataIndex] == value;
10228
+ })) {
10229
+ antd.message.warning('相同skc配码不可设置相同哦');
10230
+ record[item.dataIndex] = null;
10231
+ var _newPopValue = popvalue.map(function (i, innerIndex) {
10232
+ if (innerIndex == index) {
10233
+ i[item.dataIndex] = record[item.dataIndex];
10234
+ }
10235
+ return i;
10236
+ });
10237
+ setPopValue(_newPopValue);
10238
+ return false;
10239
+ }
10240
+ record[item.dataIndex] = value;
10241
+ var newPopValue = popvalue.map(function (i, innerIndex) {
10242
+ if (innerIndex == index) {
10243
+ i[item.dataIndex] = record[item.dataIndex];
10244
+ }
10245
+ return i;
10246
+ });
10247
+ setPopValue(newPopValue);
10248
+ },
10249
+ style: {
10250
+ width: '160px'
10251
+ }
10252
+ }, item.dataSource.map(function (item) {
10253
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
10254
+ value: item.code
10255
+ }, item.name);
10256
+ }));
10257
+ }
10258
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
10259
+ }
10260
+ });
10261
+ }
10205
10262
  return item;
10206
10263
  })), [{
10207
10264
  title: '操作',
@@ -10408,18 +10465,42 @@ var AddSelect = function AddSelect(props) {
10408
10465
  };
10409
10466
 
10410
10467
  React.useEffect(function () {
10411
- Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10412
- pageSize: 5000,
10413
- currentPage: 1,
10414
- 'ctl-withAuth': true
10415
- }), loadSelectSource("/items/category/queryCategoryTree", {
10416
- pageSize: 5000,
10417
- currentPage: 1
10418
- })]).then(function (x) {
10419
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10420
- formatTreeDataSource(x, 1, 3, tableSearchForm);
10421
- });
10422
- }, []);
10468
+ if (businessType == 'sku') {
10469
+ Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10470
+ pageSize: 5000,
10471
+ currentPage: 1,
10472
+ 'ctl-withAuth': true
10473
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10474
+ pageSize: 5000,
10475
+ currentPage: 1
10476
+ })]).then(function (x) {
10477
+ formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10478
+ formatTreeDataSource(x, 1, 3, tableSearchForm);
10479
+ });
10480
+ }
10481
+ if (businessType == 'skc') {
10482
+ Promise.all([loadSelectSource("/items/item/propertyValue", {
10483
+ pageSize: 5000,
10484
+ currentPage: 1,
10485
+ 'qp-propertyId-eq': '1467042217951883265'
10486
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10487
+ pageSize: 5000,
10488
+ currentPage: 1
10489
+ }), loadSelectSource("/items/class/withProperty", {
10490
+ pageSize: 5000,
10491
+ currentPage: 1
10492
+ }), loadSelectSource("/items/brand/queryBrandList", {
10493
+ pageSize: 5000,
10494
+ currentPage: 1,
10495
+ 'ctl-withAuth': true
10496
+ })]).then(function (x) {
10497
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
10498
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
10499
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
10500
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
10501
+ });
10502
+ }
10503
+ }, [businessType]);
10423
10504
  React.useEffect(function () {
10424
10505
  if (value) {
10425
10506
  setPopValue(value);
@@ -10549,8 +10630,18 @@ var AddSelect = function AddSelect(props) {
10549
10630
  selectRows[selectedRowKeys.length]['needFocus'] = true;
10550
10631
  }
10551
10632
  }
10552
- setPopValue(selectRows);
10553
- setSelectedRowKeys(selectKeys);
10633
+ if (isAllowRepeatedSelect) {
10634
+ var list = popvalue.concat(selectRows).map(function (i) {
10635
+ return _objectSpread2(_objectSpread2({}, i), {}, {
10636
+ uuid: i.uuid || uuid()
10637
+ });
10638
+ });
10639
+ setPopValue(list);
10640
+ setSelectedRowKeys([]);
10641
+ } else {
10642
+ setPopValue(selectRows);
10643
+ setSelectedRowKeys(selectKeys);
10644
+ }
10554
10645
  // setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
10555
10646
  // setCheckedAll(filterRows.length === tablePagination?.total);
10556
10647
  };
@@ -10667,12 +10758,19 @@ var AddSelect = function AddSelect(props) {
10667
10758
  setSelectedRowKeys([]);
10668
10759
  };
10669
10760
  var deleteRecord = function deleteRecord(record) {
10670
- setPopValue(popvalue.filter(function (item) {
10671
- return item.skuCode !== record.skuCode;
10672
- }));
10673
- setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10674
- return item !== record.skuCode;
10675
- })));
10761
+ if (isAllowRepeatedSelect) {
10762
+ setPopValue(popvalue.filter(function (item) {
10763
+ return item.uuid !== record.uuid;
10764
+ }));
10765
+ setSelectedRowKeys([]);
10766
+ } else {
10767
+ setPopValue(popvalue.filter(function (item) {
10768
+ return item.skuCode !== record.skuCode;
10769
+ }));
10770
+ setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10771
+ return item !== record.skuCode;
10772
+ })));
10773
+ }
10676
10774
  };
10677
10775
  var inputIndex = 0;
10678
10776
  React.useEffect(function () {
@@ -10744,6 +10842,7 @@ var AddSelect = function AddSelect(props) {
10744
10842
  handleColumns(showSelectedCol, [], function (res) {
10745
10843
  return setShowColumnsCallback(res);
10746
10844
  });
10845
+ var selectLength = isAllowRepeatedSelect ? (popvalue === null || popvalue === void 0 ? void 0 : popvalue.length) || 0 : (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0;
10747
10846
  return /*#__PURE__*/React__default['default'].createElement("div", {
10748
10847
  className: 'add_select'
10749
10848
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -10829,7 +10928,7 @@ var AddSelect = function AddSelect(props) {
10829
10928
  style: themeColor
10830
10929
  }, (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total) || 0), "\xA0\u9879", selectMode ? /*#__PURE__*/React__default['default'].createElement("span", null, "\uFF0C \u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React__default['default'].createElement("span", {
10831
10930
  style: themeColor
10832
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879") : ''), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("span", {
10931
+ }, selectLength), "\xA0\u9879") : ''), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("span", {
10833
10932
  style: {
10834
10933
  marginRight: 8
10835
10934
  }
@@ -10872,7 +10971,7 @@ var AddSelect = function AddSelect(props) {
10872
10971
  }
10873
10972
  }, /*#__PURE__*/React__default['default'].createElement("span", null, "\u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React__default['default'].createElement("span", {
10874
10973
  style: themeColor
10875
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879")), /*#__PURE__*/React__default['default'].createElement("div", {
10974
+ }, selectLength), "\xA0\u9879")), /*#__PURE__*/React__default['default'].createElement("div", {
10876
10975
  style: {
10877
10976
  display: 'flex'
10878
10977
  }
@@ -10906,7 +11005,7 @@ var AddSelect = function AddSelect(props) {
10906
11005
  dataSource: popvalue,
10907
11006
  pagination: false,
10908
11007
  // onChange={handleTableChange}
10909
- rowKey: mappingValueField,
11008
+ rowKey: selectRowKey,
10910
11009
  rowClassName: 'row-class',
10911
11010
  scroll: {
10912
11011
  y: 500
@@ -11956,6 +12055,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
11956
12055
  case 'skuCommodity':
11957
12056
  case 'skuPropertyValue':
11958
12057
  case 'spuCommodity':
12058
+ case 'skcCommodity':
11959
12059
  result = '/items';
11960
12060
  break;
11961
12061
  case 'physicalWarehouse':
@@ -12655,6 +12755,155 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
12655
12755
  }]
12656
12756
  }, modalTableBusProps);
12657
12757
  }
12758
+ // 商品选择器skc
12759
+ if (type === 'skcCommodity') {
12760
+ requestConfig = _objectSpread2({
12761
+ url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
12762
+ filter: 'qp-code,name-orGroup,like',
12763
+ mappingTextField: 'name',
12764
+ mappingValueField: 'code',
12765
+ sourceName: 'qp-skcCode-eq'
12766
+ }, requestConfigProp);
12767
+ tableSearchForm = [{
12768
+ name: 'qp-code-like',
12769
+ label: 'SKC编码'
12770
+ }, {
12771
+ name: 'qp-skcName-like',
12772
+ label: 'SKC名称'
12773
+ }, {
12774
+ name: 'qp-itemName-like',
12775
+ label: '商品名称'
12776
+ }, {
12777
+ name: 'qp-colorName-in',
12778
+ type: 'select',
12779
+ label: '颜色',
12780
+ field: {
12781
+ type: 'select',
12782
+ props: {
12783
+ mode: 'multiple',
12784
+ notFoundContent: '暂无数据',
12785
+ allowClear: true,
12786
+ showSearch: true,
12787
+ showArrow: true,
12788
+ maxTagCount: 1,
12789
+ optionFilterProp: 'children',
12790
+ filterOption: function filterOption(input, option) {
12791
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12792
+ }
12793
+ }
12794
+ }
12795
+ }, {
12796
+ name: 'qp-categoryId-in',
12797
+ type: 'treeSelect',
12798
+ label: '类目',
12799
+ field: {
12800
+ type: 'treeSelect',
12801
+ props: {
12802
+ treeData: [],
12803
+ treeCheckable: true,
12804
+ showSearch: true,
12805
+ allowClear: true,
12806
+ showArrow: true,
12807
+ treeNodeFilterProp: 'title',
12808
+ treeDefaultExpandAll: true,
12809
+ maxTagCount: 1,
12810
+ placeholder: '请选择',
12811
+ style: {
12812
+ width: '100%'
12813
+ },
12814
+ dropdownStyle: {
12815
+ maxHeight: 400,
12816
+ maxWidth: 100,
12817
+ overflow: 'auto'
12818
+ }
12819
+ }
12820
+ }
12821
+ }, {
12822
+ name: 'qp-classId-in',
12823
+ type: 'select',
12824
+ label: '品类',
12825
+ field: {
12826
+ type: 'select',
12827
+ props: {
12828
+ mode: 'multiple',
12829
+ notFoundContent: '暂无数据',
12830
+ allowClear: true,
12831
+ showSearch: true,
12832
+ showArrow: true,
12833
+ maxTagCount: 1,
12834
+ optionFilterProp: 'children',
12835
+ filterOption: function filterOption(input, option) {
12836
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12837
+ }
12838
+ }
12839
+ }
12840
+ }, {
12841
+ name: 'qp-brandId-in',
12842
+ type: 'select',
12843
+ label: '品牌',
12844
+ field: {
12845
+ type: 'select',
12846
+ props: {
12847
+ mode: 'multiple',
12848
+ notFoundContent: '暂无数据',
12849
+ allowClear: true,
12850
+ showSearch: true,
12851
+ showArrow: true,
12852
+ maxTagCount: 1,
12853
+ optionFilterProp: 'children',
12854
+ filterOption: function filterOption(input, option) {
12855
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12856
+ }
12857
+ }
12858
+ }
12859
+ }];
12860
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/item/propertyValue"), {
12861
+ pageSize: 5000,
12862
+ currentPage: 1,
12863
+ 'qp-propertyId-eq': '1467042217951883265'
12864
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
12865
+ pageSize: 5000,
12866
+ currentPage: 1
12867
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
12868
+ pageSize: 5000,
12869
+ currentPage: 1
12870
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
12871
+ pageSize: 5000,
12872
+ currentPage: 1,
12873
+ 'ctl-withAuth': true
12874
+ })]).then(function (x) {
12875
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
12876
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
12877
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
12878
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
12879
+ });
12880
+ modalTableProps = _objectSpread2({
12881
+ modalTableTitle: '选择SKC',
12882
+ tableSearchForm: tableSearchForm,
12883
+ tableColumns: [{
12884
+ title: 'SKC编码',
12885
+ dataIndex: 'code'
12886
+ }, {
12887
+ title: 'SKC名称',
12888
+ dataIndex: 'name'
12889
+ }, {
12890
+ title: '商品名称',
12891
+ dataIndex: 'itemName'
12892
+ }, {
12893
+ title: '颜色',
12894
+ dataIndex: 'colorName'
12895
+ }, {
12896
+ title: '类目',
12897
+ dataIndex: 'categoryText'
12898
+ }, {
12899
+ title: '品类',
12900
+ dataIndex: 'className'
12901
+ }, {
12902
+ title: '品牌',
12903
+ dataIndex: 'brandName'
12904
+ }]
12905
+ }, modalTableBusProps);
12906
+ }
12658
12907
  // 商品规格选择器(无弹窗)
12659
12908
  if (type === 'skuPropertyValue') {
12660
12909
  requestConfig = _objectSpread2({
@@ -13884,7 +14133,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
13884
14133
  setValue(value);
13885
14134
  },
13886
14135
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
13887
- onSaveCallback: parProps.onSaveCallback
14136
+ onSaveCallback: parProps.onSaveCallback,
14137
+ businessType: 'sku'
13888
14138
  // onSaveCallback: (rows) => {
13889
14139
  // console.log('save call', rows);
13890
14140
  // // return Promise.resolve(true);
@@ -14090,6 +14340,280 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14090
14340
  modalTableProps: modalTableProps
14091
14341
  })));
14092
14342
  };
14343
+ var AddSkcSelect = function AddSkcSelect(parProps) {
14344
+ var selectProps = {
14345
+ mode: 'multiple'
14346
+ };
14347
+ var _useState3 = React.useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
14348
+ _useState4 = _slicedToArray(_useState3, 2),
14349
+ value = _useState4[0],
14350
+ setValue = _useState4[1];
14351
+ var _useState5 = React.useState([]),
14352
+ _useState6 = _slicedToArray(_useState5, 2),
14353
+ propertyList = _useState6[0],
14354
+ setPropertyList = _useState6[1];
14355
+ React.useEffect(function () {
14356
+ axios__default['default'].get("/items/itemPropertyValueGroup/listNoPage").then(function (result) {
14357
+ var _result, _result2;
14358
+ result = result.data;
14359
+ if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
14360
+ antd.message.error(result.msg);
14361
+ return;
14362
+ }
14363
+ var data = result.data || [];
14364
+ setPropertyList(data);
14365
+ }).catch(function (err) {});
14366
+ }, []);
14367
+ var initialSelectColumn = [{
14368
+ title: 'SKC编码',
14369
+ width: 150,
14370
+ dataIndex: 'code'
14371
+ }, {
14372
+ title: 'SKC名称',
14373
+ width: 200,
14374
+ ellipsis: {
14375
+ showTitle: false
14376
+ },
14377
+ render: function render(text) {
14378
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14379
+ placement: "topLeft",
14380
+ title: text
14381
+ }, text);
14382
+ },
14383
+ dataIndex: 'name'
14384
+ }, {
14385
+ title: '颜色',
14386
+ width: 200,
14387
+ ellipsis: {
14388
+ showTitle: false
14389
+ },
14390
+ render: function render(text) {
14391
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14392
+ placement: "topLeft",
14393
+ title: text
14394
+ }, text);
14395
+ },
14396
+ dataIndex: 'colorName'
14397
+ }, {
14398
+ title: '配码',
14399
+ dataIndex: 'selectPropertyGroupCode',
14400
+ width: 160,
14401
+ isSelectItem: true,
14402
+ dataSource: propertyList
14403
+ }, {
14404
+ title: '数量',
14405
+ width: 100,
14406
+ isInputItem: true,
14407
+ dataIndex: 'count'
14408
+ }];
14409
+ var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
14410
+ var props = {
14411
+ buttonText: parProps.buttonText || '新增',
14412
+ buttonProps: parProps.buttonProps || {},
14413
+ tableCodeList: parProps.tableCodeList || ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
14414
+ value: value,
14415
+ // labelInValue: true, // 非必填 默认为false
14416
+ requestConfig: _objectSpread2({
14417
+ url: "/items/skc/skcSelect",
14418
+ filter: 'qp-name-like',
14419
+ otherParams: {},
14420
+ mappingTextField: 'name',
14421
+ mappingValueField: 'code'
14422
+ }, parProps.requestConfig),
14423
+ selectProps: selectProps,
14424
+ onChange: function onChange(value) {
14425
+ console.log(value);
14426
+ setValue(value);
14427
+ },
14428
+ beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
14429
+ onSaveCallback: parProps.onSaveCallback,
14430
+ businessType: 'skc',
14431
+ isAllowRepeatedSelect: true
14432
+ };
14433
+ var modalTableProps = {
14434
+ modalTableTitle: '选择商品',
14435
+ tableSearchForm: [{
14436
+ name: 'qp-code-like',
14437
+ label: 'SKC编码'
14438
+ }, {
14439
+ name: 'qp-skcName-like',
14440
+ label: 'SKC名称'
14441
+ }, {
14442
+ name: 'qp-itemName-like',
14443
+ label: '商品名称'
14444
+ }, {
14445
+ name: 'qp-colorName-in',
14446
+ type: 'select',
14447
+ label: '颜色',
14448
+ field: {
14449
+ type: 'select',
14450
+ props: {
14451
+ mode: 'multiple',
14452
+ notFoundContent: '暂无数据',
14453
+ allowClear: true,
14454
+ showSearch: true,
14455
+ showArrow: true,
14456
+ maxTagCount: 1,
14457
+ optionFilterProp: 'children',
14458
+ filterOption: function filterOption(input, option) {
14459
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14460
+ }
14461
+ }
14462
+ }
14463
+ }, {
14464
+ name: 'qp-categoryId-in',
14465
+ type: 'treeSelect',
14466
+ label: '类目',
14467
+ field: {
14468
+ type: 'treeSelect',
14469
+ props: {
14470
+ treeData: [],
14471
+ treeCheckable: true,
14472
+ showSearch: true,
14473
+ allowClear: true,
14474
+ showArrow: true,
14475
+ treeNodeFilterProp: 'title',
14476
+ treeDefaultExpandAll: true,
14477
+ maxTagCount: 1,
14478
+ placeholder: '请选择',
14479
+ style: {
14480
+ width: '100%'
14481
+ },
14482
+ dropdownStyle: {
14483
+ maxHeight: 400,
14484
+ maxWidth: 100,
14485
+ overflow: 'auto'
14486
+ }
14487
+ }
14488
+ }
14489
+ }, {
14490
+ name: 'qp-classId-in',
14491
+ type: 'select',
14492
+ label: '品类',
14493
+ field: {
14494
+ type: 'select',
14495
+ props: {
14496
+ mode: 'multiple',
14497
+ notFoundContent: '暂无数据',
14498
+ allowClear: true,
14499
+ showSearch: true,
14500
+ showArrow: true,
14501
+ maxTagCount: 1,
14502
+ optionFilterProp: 'children',
14503
+ filterOption: function filterOption(input, option) {
14504
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14505
+ }
14506
+ }
14507
+ }
14508
+ }, {
14509
+ name: 'qp-brandId-in',
14510
+ type: 'select',
14511
+ label: '品牌',
14512
+ field: {
14513
+ type: 'select',
14514
+ props: {
14515
+ mode: 'multiple',
14516
+ notFoundContent: '暂无数据',
14517
+ allowClear: true,
14518
+ showSearch: true,
14519
+ showArrow: true,
14520
+ maxTagCount: 1,
14521
+ optionFilterProp: 'children',
14522
+ filterOption: function filterOption(input, option) {
14523
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14524
+ }
14525
+ }
14526
+ }
14527
+ }],
14528
+ tableColumns: [{
14529
+ title: 'SKC编码',
14530
+ width: 150,
14531
+ dataIndex: 'code'
14532
+ }, {
14533
+ title: 'SKC名称',
14534
+ width: 200,
14535
+ ellipsis: {
14536
+ showTitle: false
14537
+ },
14538
+ render: function render(text) {
14539
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14540
+ placement: "topLeft",
14541
+ title: text
14542
+ }, text);
14543
+ },
14544
+ dataIndex: 'name'
14545
+ }, {
14546
+ title: '商品名称',
14547
+ width: 100,
14548
+ ellipsis: {
14549
+ showTitle: false
14550
+ },
14551
+ dataIndex: 'itemName',
14552
+ render: function render(text) {
14553
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14554
+ placement: "topLeft",
14555
+ title: text
14556
+ }, text);
14557
+ }
14558
+ }, {
14559
+ title: '颜色',
14560
+ width: 100,
14561
+ ellipsis: {
14562
+ showTitle: false
14563
+ },
14564
+ render: function render(text) {
14565
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14566
+ placement: "topLeft",
14567
+ title: text
14568
+ }, text);
14569
+ },
14570
+ dataIndex: 'colorName'
14571
+ }, {
14572
+ title: '类目',
14573
+ width: 100,
14574
+ ellipsis: {
14575
+ showTitle: false
14576
+ },
14577
+ render: function render(text) {
14578
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14579
+ placement: "topLeft",
14580
+ title: text
14581
+ }, text);
14582
+ },
14583
+ dataIndex: 'categoryName'
14584
+ }, {
14585
+ title: '品类',
14586
+ width: 100,
14587
+ ellipsis: {
14588
+ showTitle: false
14589
+ },
14590
+ render: function render(text) {
14591
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14592
+ placement: "topLeft",
14593
+ title: text
14594
+ }, text);
14595
+ },
14596
+ dataIndex: 'className'
14597
+ }, {
14598
+ title: '品牌',
14599
+ width: 100,
14600
+ ellipsis: {
14601
+ showTitle: false
14602
+ },
14603
+ render: function render(text) {
14604
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14605
+ placement: "topLeft",
14606
+ title: text
14607
+ }, text);
14608
+ },
14609
+ dataIndex: 'brandName'
14610
+ }],
14611
+ selectColumn: mTpSelectColumn
14612
+ };
14613
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14614
+ modalTableProps: modalTableProps
14615
+ })));
14616
+ };
14093
14617
 
14094
14618
  var CommodityEntry = function CommodityEntry(props) {
14095
14619
  var dataValidationRef = React.useRef();
@@ -16009,43 +16533,25 @@ var DetailWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
16009
16533
  var pageTitle = React.useMemo(function () {
16010
16534
  return getPageTitle(pathname);
16011
16535
  }, [pathname, title]);
16012
- // const breadcrumbArr = `${basePath}${pathname}`
16013
- // .split('/')
16014
- // .slice(1)
16015
- // .map((_item, index, arr) =>
16016
- // matchParamsPath(
16017
- // `/${arr.slice(0, index + 1).join('/')}`,
16018
- // breadcrumbNameMap,
16019
- // ),
16020
- // )
16021
- // .filter((item) => item);
16022
16536
  React.useEffect(function () {}, []);
16023
16537
  var ShowFullScreen = function ShowFullScreen() {
16024
- if (window.top != window) {
16025
- window.parent.postMessage({
16026
- type: 'screenChange',
16027
- id: itemPath
16028
- }, '*');
16029
- setIsFnllScreen(!isFullScreen);
16030
- } else {
16031
- var _isFullScreen = document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen;
16032
- var contentEle = document.querySelector("body");
16033
- // addTabsNavStyle(isFullScreen);
16034
- if (contentEle && !_isFullScreen) {
16035
- var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
16036
- if (fullScreenEle) {
16037
- fullScreenEle.call(contentEle);
16038
- setIsFnllScreen(true);
16039
- return;
16040
- }
16538
+ var isFullScreen = window.top.document.fullScreen || window.top.document.webkitIsFullScreen || window.top.document.mozFullScreen;
16539
+ var contentEle = window.top.document.querySelector("body");
16540
+ // addTabsNavStyle(isFullScreen);
16541
+ if (contentEle && !isFullScreen) {
16542
+ var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
16543
+ if (fullScreenEle) {
16544
+ fullScreenEle.call(contentEle);
16545
+ setIsFnllScreen(true);
16546
+ return;
16041
16547
  }
16042
- if (document && _isFullScreen) {
16043
- var exitFullScreen = document.exitFullscreen || document.mozCancelFullScreen || document.webkitCancelFullScreen || document.msExitFullscreen;
16044
- if (exitFullScreen) {
16045
- exitFullScreen.call(document);
16046
- setIsFnllScreen(false);
16047
- return;
16048
- }
16548
+ }
16549
+ if (window.top.document && isFullScreen) {
16550
+ var exitFullScreen = window.top.document.exitFullscreen || window.top.document.mozCancelFullScreen || window.top.document.webkitCancelFullScreen || window.top.document.msExitFullscreen;
16551
+ if (exitFullScreen) {
16552
+ exitFullScreen.call(window.top.document);
16553
+ setIsFnllScreen(false);
16554
+ return;
16049
16555
  }
16050
16556
  }
16051
16557
  };
@@ -17518,12 +18024,14 @@ var BsSulaQueryTable = (function (props) {
17518
18024
  var bsTableCode = tableCode || window.location.hash; //设置列字段的唯一标识
17519
18025
  // 获取table高度
17520
18026
  var getTableHeight = function getTableHeight() {
17521
- var _document$querySelect, _document$querySelect2, _document$querySelect3;
17522
- var cancelHeight = window.top == window ? 303 : 223;
17523
- var isFullScreen = document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen;
17524
- 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';
17525
- setHeight(h);
17526
- setValue(_objectSpread2({}, value));
18027
+ setTimeout(function () {
18028
+ var _document$querySelect, _document$querySelect2, _document$querySelect3, _document$querySelect4;
18029
+ var cancelHeight = window.top == window ? 303 : 223;
18030
+ var isFullScreen = window.top.document.fullScreen || window.top.document.webkitIsFullScreen || window.top.document.mozFullScreen;
18031
+ 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';
18032
+ setHeight(h);
18033
+ setValue(_objectSpread2({}, value));
18034
+ }, 0);
17527
18035
  };
17528
18036
  //监测是否按下esc键
17529
18037
  function checkFull() {
@@ -17735,34 +18243,25 @@ var BsSulaQueryTable = (function (props) {
17735
18243
  return tableProps;
17736
18244
  };
17737
18245
  var ShowFullScreen = function ShowFullScreen() {
17738
- var itemPath = props.itemPath;
17739
- if (window.top != window) {
17740
- window.parent.postMessage({
17741
- type: 'screenChange',
17742
- id: itemPath
17743
- }, '*');
17744
- setIsFnllScreen(!isFullScreen);
17745
- } else {
17746
- var _isFullScreen = document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen;
17747
- var contentEle = document.querySelector("body");
17748
- // addTabsNavStyle(isFullScreen);
17749
- if (contentEle && !_isFullScreen) {
17750
- var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
17751
- if (fullScreenEle) {
17752
- fullScreenEle.call(contentEle);
17753
- setIsFnllScreen(true);
17754
- // getTableHeight(true);
17755
- return;
17756
- }
18246
+ var isFullScreen = window.top.document.fullScreen || window.top.document.webkitIsFullScreen || window.top.document.mozFullScreen;
18247
+ var contentEle = window.top.document.querySelector("body");
18248
+ // addTabsNavStyle(isFullScreen);
18249
+ if (contentEle && !isFullScreen) {
18250
+ var fullScreenEle = contentEle.requestFullscreen || contentEle.mozRequestFullScreen || contentEle.webkitRequestFullScreen || contentEle.msRequestFullscreen;
18251
+ if (fullScreenEle) {
18252
+ fullScreenEle.call(contentEle);
18253
+ setIsFnllScreen(true);
18254
+ // getTableHeight(true);
18255
+ return;
17757
18256
  }
17758
- if (document && _isFullScreen) {
17759
- var exitFullScreen = document.exitFullscreen || document.mozCancelFullScreen || document.webkitCancelFullScreen || document.msExitFullscreen;
17760
- if (exitFullScreen) {
17761
- exitFullScreen.call(document);
17762
- setIsFnllScreen(false);
17763
- // getTableHeight();
17764
- return;
17765
- }
18257
+ }
18258
+ if (window.top.document && isFullScreen) {
18259
+ var exitFullScreen = window.top.document.exitFullscreen || window.top.document.mozCancelFullScreen || window.top.document.webkitCancelFullScreen || window.top.document.msExitFullscreen;
18260
+ if (exitFullScreen) {
18261
+ exitFullScreen.call(window.top.document);
18262
+ setIsFnllScreen(false);
18263
+ // getTableHeight();
18264
+ return;
17766
18265
  }
17767
18266
  }
17768
18267
  };
@@ -18048,14 +18547,13 @@ function handleUserPhone() {
18048
18547
  return enStr;
18049
18548
  }
18050
18549
  var setLoginOutPath = function setLoginOutPath() {
18051
- if (window.top == window) {
18550
+ if (window.__POWERED_BY_WUJIE__) {
18551
+ var _window$$wujie;
18552
+ (_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.props.goToLogin();
18553
+ } else {
18052
18554
  umi.history.push({
18053
18555
  pathname: '/user/login'
18054
18556
  });
18055
- } else {
18056
- window.parent.postMessage({
18057
- type: 'go2Login'
18058
- }, '*');
18059
18557
  }
18060
18558
  };
18061
18559
  var getBreadcrumbNameMap = function getBreadcrumbNameMap(menuData) {
@@ -20587,7 +21085,8 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20587
21085
  _createClass(BasicLayout, [{
20588
21086
  key: "componentDidMount",
20589
21087
  value: function componentDidMount() {
20590
- var _this2 = this,
21088
+ var _window$$wujie,
21089
+ _this2 = this,
20591
21090
  _localStorage$getItem;
20592
21091
  var _this$props = this.props,
20593
21092
  history = _this$props.history,
@@ -20596,27 +21095,42 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20596
21095
  pathToRegexp = _this$props.pathToRegexp;
20597
21096
  var istParent = 0;
20598
21097
  var self = this;
20599
- window.top != window && window.addEventListener('message', function (e) {
20600
- istParent = 1;
20601
- if (localStorage.getItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK)) {
20602
- localStorage.removeItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK);
20603
- } else {
20604
- localStorage.setItem('isTabChange', true);
20605
- }
20606
- if (typeof e.data === 'string') {
20607
- var newKey = encodeUrlQuery(e.data.replace(/^\/\w+\//, '/'));
20608
- history.push(newKey);
20609
- } else {
20610
- var info = e.data;
21098
+ // window.top != window &&
21099
+ // window.addEventListener('message', function (e) {
21100
+ // istParent = 1;
21101
+ // if (localStorage.getItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK)) {
21102
+ // localStorage.removeItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK);
21103
+ // } else {
21104
+ // localStorage.setItem('isTabChange', true);
21105
+ // }
21106
+ // if (typeof e.data === 'string') {
21107
+ // let newKey = encodeUrlQuery(e.data.replace(/^\/\w+\//, '/'));
21108
+ // history.push(newKey);
21109
+ // } else {
21110
+ // const info = e.data;
21111
+ // if (info.type === 'remove') {
21112
+ // self.tabActions['remove'](info.key.replace(/^\/\w+\//, '/'));
21113
+ // }
21114
+ // }
21115
+ // });
21116
+ (_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.bus.$on("main-route-change", function (appname, info) {
21117
+ console.log('$on main route change ----------------------------', appname, info);
21118
+ if (appname === itemPath) {
21119
+ istParent = 1;
21120
+ if (info.type === 'main') {
21121
+ var newPath = encodeUrlQuery(info.path);
21122
+ history.push(newPath);
21123
+ }
20611
21124
  if (info.type === 'remove') {
20612
- self.tabActions['remove'](info.key.replace(/^\/\w+\//, '/'));
21125
+ self.tabActions['remove'](info.path);
20613
21126
  }
20614
21127
  }
20615
21128
  });
20616
21129
  UN_LISTTEN_DRP = history.listen(function (route) {
20617
- if (window.__POWERED_BY_QIANKUN__) {
20618
- if (window.location.href.indexOf("/".concat(itemPath)) === -1) return;
20619
- }
21130
+ // if ((window as any).__POWERED_BY_QIANKUN__) {
21131
+ // if (window.location.href.indexOf(`/${itemPath}`) === -1) return;
21132
+ // }
21133
+ if (route.pathname.startsWith("/".concat(itemPath, "/"))) return;
20620
21134
  var _this2$state = _this2.state,
20621
21135
  listenRouterState = _this2$state.listenRouterState,
20622
21136
  listenRouterKey = _this2$state.listenRouterKey,
@@ -20635,8 +21149,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20635
21149
  currentKey = decodeURIComponent(route.pathname + _this2.parseQueryString(route.search));
20636
21150
  }
20637
21151
  if (!istParent) {
21152
+ var _window$$wujie2;
20638
21153
  if (route.pathname === '/') return;
20639
- window.parent.postMessage("/parent/".concat(itemPath).concat(currentKey), '*');
21154
+ (_window$$wujie2 = window.$wujie) === null || _window$$wujie2 === void 0 ? void 0 : _window$$wujie2.bus.$emit('sub-route-change', itemPath, currentKey);
21155
+ // window.parent.postMessage(`/parent/${itemPath}${currentKey}`, '*');
20640
21156
  }
20641
21157
  // 防止出错
20642
21158
  if (listenRouterKey.length !== listenRouterState.length) {
@@ -20678,28 +21194,24 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20678
21194
  lastTwoRouterArray.shift();
20679
21195
  if (!localStorage.getItem('isTabChange') && !localStorage.getItem('isMenuClick')) {
20680
21196
  if (lastTwoRouterArray[0] && typeof lastTwoRouterArray[0] === 'string') {
21197
+ var _route$state;
20681
21198
  var needRemoveKeyArray = hideMenuArray.filter(function (itemRoute) {
20682
21199
  return pathToRegexp(itemRoute.path || '').test(lastTwoRouterArray[0]);
20683
21200
  });
20684
21201
  // lastTwoRouterArray[0] != lastTwoRouterArray[1] 该判断条件用于判断是否是tab删除操作,如果是tab页删除操作,删除的是不是最后一个打开的tab页,执行history.push会导致错误的将最后打开的那个tab页也删除掉
20685
- if (needRemoveKeyArray.length && lastTwoRouterArray[0] != lastTwoRouterArray[1]) {
20686
- 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))) {
20687
- var _route$state;
20688
- if (!((_route$state = route.state) === null || _route$state === void 0 ? void 0 : _route$state.thisHideInMenuDoNotClose)) {
20689
- newListenRouterState = newListenRouterState.filter(function (item) {
20690
- var _ref3 = item.key ? item.key.split('?') : [],
20691
- _ref4 = _slicedToArray(_ref3, 1),
20692
- pathname = _ref4[0];
20693
- return pathname && pathname !== lastTwoRouterArray[0];
20694
- });
20695
- newListenRouterKey = newListenRouterKey.filter(function (item) {
20696
- var _ref5 = item ? item.split('?') : [],
20697
- _ref6 = _slicedToArray(_ref5, 1),
20698
- pathname = _ref6[0];
20699
- return pathname && pathname !== lastTwoRouterArray[0];
20700
- });
20701
- }
20702
- }
21202
+ if (needRemoveKeyArray.length && lastTwoRouterArray[0] != lastTwoRouterArray[1] && !((_route$state = route.state) === null || _route$state === void 0 ? void 0 : _route$state.thisHideInMenuDoNotClose)) {
21203
+ newListenRouterState = newListenRouterState.filter(function (item) {
21204
+ var _ref3 = item.key ? item.key.split('?') : [],
21205
+ _ref4 = _slicedToArray(_ref3, 1),
21206
+ pathname = _ref4[0];
21207
+ return pathname && pathname !== lastTwoRouterArray[0];
21208
+ });
21209
+ newListenRouterKey = newListenRouterKey.filter(function (item) {
21210
+ var _ref5 = item ? item.split('?') : [],
21211
+ _ref6 = _slicedToArray(_ref5, 1),
21212
+ pathname = _ref6[0];
21213
+ return pathname && pathname !== lastTwoRouterArray[0];
21214
+ });
20703
21215
  }
20704
21216
  }
20705
21217
  // refs?.tableRef?.current?.refreshTable();
@@ -21163,7 +21675,12 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
21163
21675
  }
21164
21676
  _createClass(WrapperComponent, [{
21165
21677
  key: "shouldComponentUpdate",
21166
- value: function shouldComponentUpdate() {
21678
+ value: function shouldComponentUpdate(nextProps) {
21679
+ var _nextProps$item, _nextProps$item$key;
21680
+ 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) {
21681
+ // 适配wujie环境主应用下渲染打印编辑器
21682
+ return true;
21683
+ }
21167
21684
  return false;
21168
21685
  }
21169
21686
  }, {
@@ -21176,6 +21693,7 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
21176
21693
  getDictionaryTextByValue = _this$props4.getDictionaryTextByValue,
21177
21694
  timeFormat = _this$props4.timeFormat,
21178
21695
  transparentProps = _this$props4.transparentProps;
21696
+ console.log('child wrapper conpent', this.props);
21179
21697
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(item.content, _objectSpread2(_objectSpread2(_objectSpread2({
21180
21698
  getDictionarySource: getDictionarySource,
21181
21699
  getDictionaryTextByValue: getDictionaryTextByValue,
@@ -29948,6 +30466,7 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
29948
30466
  });
29949
30467
 
29950
30468
  exports.AddSelect = AddSelect;
30469
+ exports.AddSkcSelect = AddSkcSelect;
29951
30470
  exports.AddSkuSelect = AddSkuSelect;
29952
30471
  exports.BillEntry = BillEntry;
29953
30472
  exports.BsLayout = index$5;