@bit-sun/business-component 2.3.22 → 2.3.23-beta02

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 (114) hide show
  1. package/dist/common/ENUM.d.ts +40 -0
  2. package/dist/components/Business/AddSelectBusiness/index.d.ts +4 -0
  3. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +5 -0
  4. package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +4 -0
  5. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +4 -0
  6. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +17 -0
  7. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +30 -0
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +4 -0
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +3 -0
  10. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +4 -0
  11. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +5 -0
  12. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +3 -0
  13. package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +8 -0
  14. package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +8 -0
  15. package/dist/components/Business/BsLayouts/index.d.ts +18 -0
  16. package/dist/components/Business/BsLayouts/service.d.ts +1 -0
  17. package/dist/components/Business/BsLayouts/utils.d.ts +10 -0
  18. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +60 -0
  19. package/dist/components/Business/BsSulaQueryTable/index.d.ts +3 -0
  20. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +60 -0
  21. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +99 -0
  22. package/dist/components/Business/CommodityEntry/index.d.ts +3 -0
  23. package/dist/components/Business/CommonAlert/index.d.ts +4 -0
  24. package/dist/components/Business/CommonGuideWrapper/index.d.ts +6 -0
  25. package/dist/components/Business/DetailPageWrapper/index.d.ts +10 -0
  26. package/dist/components/Business/DetailPageWrapper/utils.d.ts +8 -0
  27. package/dist/components/Business/HomePageWrapper/index.d.ts +4 -0
  28. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +3 -0
  29. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +3 -0
  30. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +7 -0
  31. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +3 -0
  32. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +3 -0
  33. package/dist/components/Business/JsonQueryTable/function.d.ts +37 -0
  34. package/dist/components/Business/JsonQueryTable/index.d.ts +4 -0
  35. package/dist/components/Business/JsonQueryTable/static.d.ts +44 -0
  36. package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +5 -0
  37. package/dist/components/Business/SearchSelect/common.d.ts +25 -0
  38. package/dist/components/Business/SearchSelect/index.d.ts +3 -0
  39. package/dist/components/Business/SearchSelect/utils.d.ts +5 -0
  40. package/dist/components/Business/StateFlow/index.d.ts +4 -0
  41. package/dist/components/Business/TreeSearchSelect/index.d.ts +3 -0
  42. package/dist/components/Business/TreeSearchSelect/utils.d.ts +4 -0
  43. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +54 -0
  44. package/dist/components/Business/columnSettingTable/index.d.ts +16 -0
  45. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +17 -0
  46. package/dist/components/Business/columnSettingTable/utils.d.ts +9 -0
  47. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +3 -0
  48. package/dist/components/Business/moreTreeTable/hooks/useSticky.d.ts +8 -0
  49. package/dist/components/Business/moreTreeTable/index.d.ts +4 -0
  50. package/dist/components/Business/moreTreeTable/utils.d.ts +9 -0
  51. package/dist/components/Functional/AddSelect/helps.d.ts +14 -0
  52. package/dist/components/Functional/AddSelect/index.d.ts +4 -0
  53. package/dist/components/Functional/BillEntry/index.d.ts +4 -0
  54. package/dist/components/Functional/BsAntdSula/BsCascader/index.d.ts +18 -0
  55. package/dist/components/Functional/BsAntdSula/index.d.ts +1 -0
  56. package/dist/components/Functional/DataImport/index.d.ts +144 -0
  57. package/dist/components/Functional/DataValidation/index.d.ts +144 -0
  58. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +13 -0
  59. package/dist/components/Functional/QueryMutipleInput/index.d.ts +6 -0
  60. package/dist/components/Functional/SearchSelect/index.d.ts +4 -0
  61. package/dist/components/Functional/SearchSelect/utils.d.ts +1 -0
  62. package/dist/components/Functional/TreeSearchSelect/index.d.ts +3 -0
  63. package/dist/components/Solution/RuleComponent/Formula.d.ts +9 -0
  64. package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +12 -0
  65. package/dist/components/Solution/RuleComponent/services.d.ts +1 -0
  66. package/dist/index.d.ts +28 -0
  67. package/dist/index.esm.js +31367 -0
  68. package/dist/index.js +31415 -0
  69. package/dist/plugin/TableColumnSetting/index.d.ts +64 -0
  70. package/dist/plugin/TableColumnSetting/utils.d.ts +1 -0
  71. package/dist/utils/CheckOneUser/index.d.ts +2 -0
  72. package/dist/utils/CustomLoginInfo.d.ts +11 -0
  73. package/dist/utils/LocalstorageUtils.d.ts +17 -0
  74. package/dist/utils/TableUtils.d.ts +11 -0
  75. package/dist/utils/checkUtils.d.ts +3 -0
  76. package/dist/utils/enumConfig.d.ts +12 -0
  77. package/dist/utils/index.d.ts +4 -0
  78. package/dist/utils/requestUtils.d.ts +29 -0
  79. package/dist/utils/utils.d.ts +17 -0
  80. package/dist 2/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +4 -0
  81. package/dist 2/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +4 -0
  82. package/dist 2/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +3 -0
  83. package/package.json +3 -2
  84. package/src/components/Business/AddSelectBusiness/index.tsx +3 -2
  85. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +9 -7
  86. package/src/components/Business/BsSulaQueryTable/index.tsx +11 -8
  87. package/src/components/Business/BsSulaQueryTable/setting.tsx +7 -5
  88. package/src/components/Business/JsonQueryTable/components/Formula.tsx +3 -2
  89. package/src/components/Business/JsonQueryTable/index.tsx +8 -6
  90. package/src/components/Business/JsonQueryTable/static.ts +60 -0
  91. package/src/components/Business/SearchSelect/BusinessUtils.ts +74 -0
  92. package/src/components/Business/SearchSelect/index.md +58 -0
  93. package/src/components/Business/SearchSelect/utils.ts +3 -2
  94. package/src/components/Business/TreeSearchSelect/index.md +29 -0
  95. package/src/components/Business/TreeSearchSelect/utils.ts +29 -0
  96. package/src/components/Business/columnSettingTable/columnSetting.tsx +5 -4
  97. package/src/components/Business/columnSettingTable/index.tsx +3 -2
  98. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +3 -2
  99. package/src/components/Functional/AddSelect/helps.ts +2 -1
  100. package/src/components/Functional/AddSelect/index.tsx +3 -2
  101. package/src/components/Functional/BillEntry/index.tsx +3 -2
  102. package/src/components/Functional/DataImport/index.tsx +2 -1
  103. package/src/components/Functional/DataValidation/index.tsx +2 -1
  104. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +2 -1
  105. package/src/components/Functional/SearchSelect/index.tsx +18 -12
  106. package/src/components/Functional/TreeSearchSelect/index.tsx +7 -5
  107. package/src/components/Solution/RuleComponent/InnerSelect.tsx +62 -0
  108. package/src/components/Solution/RuleComponent/index.js +59 -18
  109. package/src/components/Solution/RuleComponent/ruleFiled.js +202 -28
  110. package/src/components/Solution/RuleComponent/util.js +4 -0
  111. package/src/plugin/TableColumnSetting/index.tsx +4 -3
  112. package/src/utils/CustomLoginInfo.ts +55 -0
  113. package/src/utils/requestUtils.ts +139 -7
  114. package/src/utils/utils.ts +0 -21
@@ -0,0 +1,62 @@
1
+ import { getDictionarySource } from '@/utils/utils';
2
+ import { Select } from 'antd';
3
+ import React, { useEffect, useState } from 'react';
4
+ import { request as SulaRequest } from 'bssula';
5
+ interface Iprops {
6
+ disabled: boolean;
7
+ inputType: number;
8
+ defaultValue: any;
9
+ styleCommon: any;
10
+ value: any;
11
+ onChange: any;
12
+ dictionaryCode?: string;
13
+ }
14
+ export default (props: Iprops) => {
15
+ const {
16
+ disabled,
17
+ inputType,
18
+ defaultValue,
19
+ styleCommon,
20
+ value,
21
+ onChange,
22
+ dictionaryCode,
23
+ } = props;
24
+ const [dataSource, setDataSource] = useState(getDictionarySource(dictionaryCode ?? '') || [])
25
+
26
+ useEffect(()=> {
27
+ if(!!dictionaryCode && !getDictionarySource(dictionaryCode)) {
28
+ SulaRequest({
29
+ url: `/basic/bscDictItem/allItemList?qp-code-eq=${dictionaryCode}`,
30
+ method: 'get',
31
+ converter: ({ data }: { data: { id: string; dictItemCode: string; dictItemName: string }[] }) => {
32
+ const dataList = data?.map?.((item) => ({
33
+ label: item.dictItemName,
34
+ value: item.dictItemCode,
35
+ })) || []
36
+ setDataSource(dataList)
37
+ return dataList;
38
+ },
39
+ });
40
+ }
41
+
42
+ },[dictionaryCode])
43
+
44
+ return (
45
+ <Select
46
+ disabled={disabled}
47
+ {...(inputType === 30
48
+ ? {
49
+ mode: 'multiple',
50
+ }
51
+ : {})}
52
+ defaultValue={defaultValue}
53
+ style={styleCommon}
54
+ value={(value as string)?.split(',')}
55
+ onChange={(changeValue: any) => {
56
+ onChange(changeValue);
57
+ // handleEdit(ites.code, value);
58
+ }}
59
+ options={dataSource}
60
+ />
61
+ );
62
+ };
@@ -31,6 +31,8 @@ import {
31
31
  getSpecialPropertyCode,
32
32
  getPropertyCode,
33
33
  isObj,
34
+ dateFormat,
35
+ fullDateFormat
34
36
  } from './util';
35
37
  import { getDictionarySource, uuid } from '../../../utils/utils';
36
38
  import {
@@ -42,6 +44,7 @@ import {
42
44
  import { request } from 'bssula';
43
45
  import Formula from './Formula';
44
46
  import RenderSpecificAction from './renderSpecificAction';
47
+ import InnerSelect from './InnerSelect';
45
48
 
46
49
  const { RangePicker } = DatePicker;
47
50
 
@@ -655,7 +658,7 @@ class RuleObjectComponent extends Component {
655
658
  this.handleLogicalTypeChange(itemDetail, 'or');
656
659
  }}
657
660
  >
658
- OR
661
+ 或者
659
662
  </p>
660
663
  <p
661
664
  className={'choose_logical_type'}
@@ -663,7 +666,7 @@ class RuleObjectComponent extends Component {
663
666
  this.handleLogicalTypeChange(itemDetail, 'and');
664
667
  }}
665
668
  >
666
- AND
669
+ 并且
667
670
  </p>
668
671
  </div>
669
672
  }
@@ -674,7 +677,7 @@ class RuleObjectComponent extends Component {
674
677
  type="link"
675
678
  className={'logical_item_btn'}
676
679
  >
677
- {itemDetail?.operationCode == 'or' ? 'OR' : 'AND'}
680
+ {itemDetail?.operationCode == 'or' ? '或者' : '并且'}
678
681
  <DownOutlined style={{ marginLeft: '6px' }} />
679
682
  </Button>
680
683
  </Popover>
@@ -1046,8 +1049,10 @@ class RuleObjectComponent extends Component {
1046
1049
  )) ||
1047
1050
  null}
1048
1051
  {/* 输入/日期 */}
1049
- {(ites?.inputType === 10 && ites?.valueType === 41 && (
1052
+ {(ites?.inputType === 10 && (ites?.valueType === 41 || ites?.valueType === 32) && (
1050
1053
  <DatePicker
1054
+ showTime={dataTypeCode == 32}
1055
+ format={dataTypeCode == 41 ? dateFormat : fullDateFormat}
1051
1056
  disabled={disabled}
1052
1057
  defaultValue={ites.defaultValue}
1053
1058
  style={style2}
@@ -1115,26 +1120,17 @@ class RuleObjectComponent extends Component {
1115
1120
  {/* 单选/多选 数据字典 */}
1116
1121
  {((ites?.inputType === 20 || ites?.inputType === 30) &&
1117
1122
  ites?.choiceType === 20 && (
1118
- <Select
1123
+ <InnerSelect
1119
1124
  disabled={disabled}
1120
- {...(ites?.inputType === 30
1121
- ? {
1122
- mode: 'multiple',
1123
- }
1124
- : {})}
1125
+ inputType={ites?.inputType}
1125
1126
  defaultValue={ites.defaultValue}
1126
- style={styleCommon}
1127
+ styleCommon={styleCommon}
1127
1128
  value={showValue(ites.code)}
1128
1129
  onChange={(value) => {
1129
1130
  handleEdit(ites.code, value);
1130
1131
  }}
1131
- >
1132
- {getDictionarySource(ites?.dictionaryCode).map((it) => (
1133
- <Select.Option key={it.value} value={it.value}>
1134
- {it.text}
1135
- </Select.Option>
1136
- ))}
1137
- </Select>
1132
+ dictionaryCode={ites.dictionaryCode}
1133
+ />
1138
1134
  )) ||
1139
1135
  null}
1140
1136
  {/* 单选/多选 仓库选择器(物理仓) */}
@@ -1525,6 +1521,23 @@ class RuleObjectComponent extends Component {
1525
1521
  />
1526
1522
  )) ||
1527
1523
  null}
1524
+ {/* 单选/多选 结算组织选择器 */}
1525
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
1526
+ ites?.choiceType === 290 && (
1527
+ <BusinessTreeSearchSelect
1528
+ disabled={disabled}
1529
+ treeCheckable={ites?.inputType === 30}
1530
+ businessType="settle-organization"
1531
+ labelInValue={true}
1532
+ value={showValue(ites.code)}
1533
+ style={styleCommon}
1534
+ onChange={(value) => {
1535
+ handleEdit(ites.code, value);
1536
+ }}
1537
+ getPopupContainer={() => document.body}
1538
+ />
1539
+ )) ||
1540
+ null}
1528
1541
  {/* 单选/多选 配送方式选择器 */}
1529
1542
  {((ites?.inputType === 20 || ites?.inputType === 30) &&
1530
1543
  ites?.choiceType === 310 && (
@@ -1553,6 +1566,34 @@ class RuleObjectComponent extends Component {
1553
1566
  />
1554
1567
  )) ||
1555
1568
  null}
1569
+ {/* 单选/多选 角色选择器 */}
1570
+ {((ites?.inputType === 20 || ites?.inputType === 30) &&
1571
+ ites?.choiceType === 360 && (
1572
+ <BusinessSearchSelect
1573
+ selectBusinessType="role"
1574
+ selectProps={{
1575
+ style: styleCommon,
1576
+ placeholder: '请选择角色',
1577
+ ...(ites?.inputType === 30
1578
+ ? {
1579
+ mode: 'multiple',
1580
+ maxTagCount: 1,
1581
+ }
1582
+ : {}),
1583
+ }}
1584
+ disabled={disabled}
1585
+ labelInValue={true}
1586
+ value={showValue(ites.code)}
1587
+ requestConfig={{
1588
+ filterInit: 'qp-code-in',
1589
+ }}
1590
+ onChange={(value) => {
1591
+ handleEdit(ites.code, value);
1592
+ }}
1593
+ getPopupContainer={() => document.body}
1594
+ />
1595
+ )) ||
1596
+ null}
1556
1597
  {/* 表达式 */}
1557
1598
  {ites?.inputType === 40 && (
1558
1599
  <div style={{ display: 'flex' }}>
@@ -3,8 +3,9 @@ import { Select, Input, InputNumber, DatePicker, TimePicker } from 'antd';
3
3
  import styles from './index.less';
4
4
  import { getRegularThresholdRange } from './services';
5
5
  import moment from 'moment';
6
- import { handleError, judgeIsEmpty } from '../../../utils/utils';
7
- import { queryIdentityInfo, findChangedThresholdQuery, setParams } from './util';
6
+ import { judgeIsEmpty } from '../../../utils/utils';
7
+ import { handleError } from '../../../utils/requestUtils';
8
+ import { queryIdentityInfo, findChangedThresholdQuery, setParams, dateFormat, fullDateFormat } from './util';
8
9
  import { request as SulaRequest } from 'bssula';
9
10
  import { stringify } from 'querystring';
10
11
  import {
@@ -212,28 +213,26 @@ export default class RuleField extends Component {
212
213
  url: extraRequestUrl,
213
214
  method: 'get',
214
215
  converter: (res) => {
215
- if (handleError(res)) {
216
- let handleData = res?.data || [];
217
- if (queryIdentifyType === 'dictCodeIdentify') {
218
- handleData = handleData?.length
219
- ? handleData.map((i) => ({
220
- code: i.dictItemCode,
221
- name: i.dictItemName,
222
- }))
223
- : [];
224
- }
225
- if (queryIdentifyType === 'dynamicDictCodeIdentify') {
226
- handleData = handleData?.length
227
- ? handleData.map((i) => ({
228
- code: i.code.toString(),
229
- name: i.name,
230
- }))
231
- : [];
232
- }
233
- this.setState({
234
- thresholdList: handleData,
235
- });
216
+ let handleData = res?.data || [];
217
+ if (queryIdentifyType === 'dictCodeIdentify') {
218
+ handleData = handleData?.length
219
+ ? handleData.map((i) => ({
220
+ code: i.dictItemCode,
221
+ name: i.dictItemName,
222
+ }))
223
+ : [];
224
+ }
225
+ if (queryIdentifyType === 'dynamicDictCodeIdentify') {
226
+ handleData = handleData?.length
227
+ ? handleData.map((i) => ({
228
+ code: i.code.toString(),
229
+ name: i.name,
230
+ }))
231
+ : [];
236
232
  }
233
+ this.setState({
234
+ thresholdList: handleData,
235
+ });
237
236
  return handleData;
238
237
  },
239
238
  });
@@ -274,8 +273,6 @@ export default class RuleField extends Component {
274
273
  customerWidth,
275
274
  } = this.props;
276
275
  const { thresholdList } = this.state;
277
- const dateFormat = 'YYYY-MM-DD';
278
- const fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
279
276
  const styleCommon = {
280
277
  width: customerWidth || '150px',
281
278
  };
@@ -1840,6 +1837,76 @@ export default class RuleField extends Component {
1840
1837
  );
1841
1838
  }
1842
1839
  }
1840
+ // 结算组织选择器
1841
+ if (dataChoiceBusinessType == 290) {
1842
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1843
+ return (
1844
+ <>
1845
+ <BusinessTreeSearchSelect
1846
+ disabled={disabled}
1847
+ treeCheckable={dataInputBusinessType === 12}
1848
+ businessType="settle-organization"
1849
+ labelInValue={true}
1850
+ value={values[0]}
1851
+ style={styleCommon}
1852
+ onChange={(value) => {
1853
+ if (dataInputBusinessType === 12) {
1854
+ values[0] = value.map((i) => i.key);
1855
+ valueNames[0] = value.map((i) => i.label || '');
1856
+ } else {
1857
+ values[0] = [value.key];
1858
+ valueNames[0] = [value.label || ''];
1859
+ }
1860
+ callback(values, valueNames);
1861
+ }}
1862
+ getPopupContainer={() => document.body}
1863
+ />
1864
+ <span>~</span>
1865
+ <BusinessTreeSearchSelect
1866
+ disabled={disabled}
1867
+ treeCheckable={dataInputBusinessType === 12}
1868
+ businessType="settle-organization"
1869
+ labelInValue={true}
1870
+ value={values[0]}
1871
+ style={styleCommon}
1872
+ onChange={(value) => {
1873
+ if (dataInputBusinessType === 12) {
1874
+ values[1] = value.map((i) => i.key);
1875
+ valueNames[1] = value.map((i) => i.label || '');
1876
+ } else {
1877
+ values[1] = [value.key];
1878
+ valueNames[1] = [value.label || ''];
1879
+ }
1880
+ callback(values, valueNames);
1881
+ }}
1882
+ getPopupContainer={() => document.body}
1883
+ />
1884
+ </>
1885
+ );
1886
+ } else {
1887
+ return (
1888
+ <BusinessTreeSearchSelect
1889
+ disabled={disabled}
1890
+ treeCheckable={dataInputBusinessType === 12}
1891
+ businessType="settle-organization"
1892
+ labelInValue={true}
1893
+ value={values[0]}
1894
+ style={styleCommon}
1895
+ onChange={(value) => {
1896
+ if (dataInputBusinessType === 12) {
1897
+ values = value.map((i) => i.key)||[];
1898
+ valueNames = value.map((i) => i.label || '')||[];
1899
+ } else {
1900
+ values = value?.key?[value.key]:[];
1901
+ valueNames = value?.label?[value.label]:[];
1902
+ }
1903
+ callback(values, valueNames);
1904
+ }}
1905
+ getPopupContainer={() => document.body}
1906
+ />
1907
+ );
1908
+ }
1909
+ }
1843
1910
  // 配送方式选择器
1844
1911
  if (dataChoiceBusinessType == 310) {
1845
1912
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
@@ -1946,6 +2013,112 @@ export default class RuleField extends Component {
1946
2013
  );
1947
2014
  }
1948
2015
  }
2016
+ // 角色选择器
2017
+ if (dataChoiceBusinessType == 360) {
2018
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
2019
+ return (
2020
+ <>
2021
+ <BusinessSearchSelect
2022
+ selectBusinessType="role"
2023
+ selectProps={{
2024
+ style: styleCommon,
2025
+ placeholder: '请选择角色',
2026
+ ...(dataInputBusinessType === 12
2027
+ ? {
2028
+ mode: 'multiple',
2029
+ maxTagCount: 1,
2030
+ }
2031
+ : {}),
2032
+ }}
2033
+ disabled={disabled}
2034
+ labelInValue={true}
2035
+ value={values[0]}
2036
+ requestConfig={{
2037
+ filterInit: 'qp-code-in',
2038
+ }}
2039
+ onChange={(value) => {
2040
+ if (dataInputBusinessType === 12) {
2041
+ values[0] = value.map((i) => i.key);
2042
+ valueNames[0] = value.map((i) => i.label || '');
2043
+ } else {
2044
+ values[0] = [value.key];
2045
+ valueNames[0] = [value.label || ''];
2046
+ }
2047
+ callback(values, valueNames);
2048
+ }}
2049
+ getPopupContainer={() => document.body}
2050
+ />
2051
+ <span>~</span>
2052
+ <BusinessSearchSelect
2053
+ selectBusinessType="role"
2054
+ selectProps={{
2055
+ style: styleCommon,
2056
+ placeholder: '请选择角色',
2057
+ ...(dataInputBusinessType === 12
2058
+ ? {
2059
+ mode: 'multiple',
2060
+ maxTagCount: 1,
2061
+ }
2062
+ : {}),
2063
+ }}
2064
+ disabled={disabled}
2065
+ labelInValue={true}
2066
+ value={values[1]}
2067
+ requestConfig={{
2068
+ filterInit: 'qp-code-in',
2069
+ }}
2070
+ onChange={(value) => {
2071
+ if (dataInputBusinessType === 12) {
2072
+ values[1] = value.map((i) => i.key);
2073
+ valueNames[1] = value.map((i) => i.label || '');
2074
+ } else {
2075
+ values[1] = [value.key];
2076
+ valueNames[1] = [value.label || ''];
2077
+ }
2078
+ callback(values, valueNames);
2079
+ }}
2080
+ getPopupContainer={() => document.body}
2081
+ />
2082
+ </>
2083
+ );
2084
+ } else {
2085
+ const currentValue = dataInputBusinessType === 12 ?
2086
+ values?.map((s,vIndex)=> ({key: s, label: valueNames[vIndex]}))||[]
2087
+ : values[0]&&{key:values[0],label:valueNames[0]}||{}
2088
+ return (
2089
+ <BusinessSearchSelect
2090
+ selectBusinessType="role"
2091
+ selectProps={{
2092
+ style: styleCommon,
2093
+ placeholder: '请选择角色',
2094
+ ...(dataInputBusinessType === 12
2095
+ ? {
2096
+ mode: 'multiple',
2097
+ maxTagCount: 1,
2098
+ }
2099
+ : {}),
2100
+ }}
2101
+ disabled={disabled}
2102
+ labelInValue={true}
2103
+ value={currentValue}
2104
+ requestConfig={{
2105
+ filterInit: 'qp-code-in',
2106
+ }}
2107
+ onChange={(value) => {
2108
+ if (dataInputBusinessType === 12) {
2109
+ values = value.map((i) => i.key)||[];
2110
+ valueNames = value.map((i) => i.label || '')||[];
2111
+ } else {
2112
+ values = value?.key?[value.key]:[];
2113
+ valueNames = value?.label?[value.label]:[];
2114
+ }
2115
+ callback(values, valueNames);
2116
+ }}
2117
+ getPopupContainer={() => document.body}
2118
+ />
2119
+ );
2120
+ }
2121
+ }
1949
2122
  } else {
1950
2123
  if (
1951
2124
  dataTypeCode == 22 ||
@@ -1994,12 +2167,12 @@ export default class RuleField extends Component {
1994
2167
  />
1995
2168
  );
1996
2169
  }
1997
- } else if (dataTypeCode == 41) {
1998
- // 日期41
2170
+ } else if (dataTypeCode == 41 || dataTypeCode == 32) {
2171
+ // 日期41 日期时间32
1999
2172
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
2000
2173
  return (
2001
2174
  <RangePicker
2002
- // showTime
2175
+ showTime={dataTypeCode == 32}
2003
2176
  disabled={disabled}
2004
2177
  style={{ width: customerWidth || '300px' }}
2005
2178
  format={dataTypeCode == 41 ? dateFormat : fullDateFormat}
@@ -2035,6 +2208,7 @@ export default class RuleField extends Component {
2035
2208
  return (
2036
2209
  <>
2037
2210
  <DatePicker
2211
+ showTime={dataTypeCode == 32}
2038
2212
  format={dataTypeCode == 41 ? dateFormat : fullDateFormat}
2039
2213
  disabled={disabled}
2040
2214
  style={{ width: customerWidth || '300px' }}
@@ -137,3 +137,7 @@ export const isObj = (object) => {
137
137
  Object.prototype.toString.call(object).toLowerCase() == '[object object]'
138
138
  );
139
139
  };
140
+
141
+
142
+ export const dateFormat = 'YYYY-MM-DD';
143
+ export const fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
@@ -19,6 +19,7 @@ import fixedLeftActive from '../../assets/fixed-left-active.svg';
19
19
  import fixedRight from '../../assets/fixed-right.svg';
20
20
  import fixedRightActive from '../../assets/fixed-right-active.svg';
21
21
  import './index.less';
22
+ import { handleRequestUrl, judgeIsRequestSuccess } from '@/utils/requestUtils';
22
23
 
23
24
  interface TableColumnSettingProps {
24
25
  /** tableCode必填,做用户存储关键key,*/
@@ -54,7 +55,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
54
55
  };
55
56
 
56
57
  patchUserColumnConfig = (config: any) => {
57
- const { tableCode }: any = this.props;
58
+ const { tableCode, appRequestConfig }: any = this.props;
58
59
  if (!tableCode) return;
59
60
  let configvalue = config.map((item:any) => ({
60
61
  key: item.key,
@@ -65,14 +66,14 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
65
66
  }))
66
67
 
67
68
  axios({
68
- url: '/user/appConfig/saveUserOrder',
69
+ url: handleRequestUrl('/user','/appConfig/saveUserOrder',appRequestConfig),
69
70
  method:'POST',
70
71
  data: {
71
72
  "code": tableCode,
72
73
  "detail": JSON.stringify(configvalue)
73
74
  },
74
75
  }).then((res:any) => {
75
- if (res?.data?.status === '0') {
76
+ if (judgeIsRequestSuccess(res?.data)) {
76
77
  setConfigTableColumns(configvalue, tableCode)
77
78
  } else {
78
79
  message.error('保存表头列自定义失败,请稍后尝试');
@@ -0,0 +1,55 @@
1
+ import ENUM from '@/utils/enumConfig';
2
+ import cookie from 'js-cookie'
3
+
4
+ const resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
5
+ //--------赢家项目登录信息---------
6
+ export function getEekaSessionId() {
7
+ return resposne?.sessionId || '';
8
+ }
9
+ export function getEekaAccountId() {
10
+ return resposne?.personDetailResDto?.accountId || -1;
11
+ }
12
+ export function getEekaEmployeeId() {
13
+ return resposne?.personDetailResDto?.employeeId || 2;
14
+ }
15
+ export function getEekaTenantId() {
16
+ return resposne?.personDetailResDto?.tenantId || 1;
17
+ }
18
+ export function getEekaToken() {
19
+ return resposne?.token;
20
+ }
21
+ //--------赢家项目登录信息---------
22
+
23
+
24
+ //--------国药项目登录信息---------
25
+ export function getLoginHeaderInfo(headerkey: string,storage='cookie') {
26
+ if (storage) {
27
+ if ('localStorage' === storage) {
28
+ return localStorage.getItem(headerkey)
29
+ } else if ('sessionStorage' === storage) {
30
+ return sessionStorage.getItem(headerkey)
31
+ } else if ('cookie' === storage) {
32
+ return cookie.get(headerkey)
33
+ } else {
34
+ return localStorage.getItem(headerkey)
35
+ }
36
+ } else {
37
+ return localStorage.getItem(headerkey)
38
+ }
39
+ }
40
+ export function getGuoyaoshukeCompanyId() {
41
+ return getLoginHeaderInfo('gksk-company-id');
42
+ }
43
+ export function getGuoyaoshukeTenantCode() {
44
+ return getLoginHeaderInfo('gksk-tenant-code');
45
+ }
46
+ export function getGuoyaoshukeTenantId() {
47
+ return getLoginHeaderInfo('gksk-tenant-id') || 1;
48
+ }
49
+ export function getGuoyaoshukeToken() {
50
+ return getLoginHeaderInfo('gksk-access-token');
51
+ }
52
+ export function getGuoyaoshukeUscCode() {
53
+ return getLoginHeaderInfo('gksk-usc-code');
54
+ }
55
+ //--------国药项目登录信息---------