@bit-sun/business-component 4.0.13-alpha.9 → 4.2.0-aiwei-alpha.1

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 (150) hide show
  1. package/.umirc.ts +21 -10
  2. package/dist/components/Business/AddSelectBusiness/index.d.ts +3 -4
  3. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -2
  4. package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +1 -2
  5. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  6. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
  7. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +1 -2
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +1 -2
  10. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  11. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +1 -2
  12. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +1 -2
  13. package/dist/components/Business/BsLayouts/index.d.ts +1 -1
  14. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
  15. package/dist/components/Business/BsSulaQueryTable/index.d.ts +1 -2
  16. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +11 -8
  17. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +14 -15
  18. package/dist/components/Business/CommodityEntry/index.d.ts +1 -2
  19. package/dist/components/Business/CommonAlert/index.d.ts +1 -2
  20. package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
  21. package/dist/components/Business/DetailPageWrapper/index.d.ts +11 -6
  22. package/dist/components/Business/HomePageWrapper/index.d.ts +1 -2
  23. package/dist/components/Business/ItemPropertySelector/index.d.ts +2 -0
  24. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +1 -2
  25. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +1 -2
  26. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +1 -2
  27. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +1 -2
  28. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +1 -2
  29. package/dist/components/Business/ModalUtils/index.d.ts +8 -0
  30. package/dist/components/Business/PropertyModal/index.d.ts +1 -2
  31. package/dist/components/Business/PropertyModal/propertyGroup.d.ts +1 -1
  32. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  33. package/dist/components/Business/SearchSelect/utils.d.ts +4 -2
  34. package/dist/components/Business/StateFlow/index.d.ts +1 -2
  35. package/dist/components/Business/SystemLog/index.d.ts +78 -0
  36. package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
  37. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +9 -8
  38. package/dist/components/Business/columnSettingTable/components/TableSumComponent.d.ts +1 -2
  39. package/dist/components/Business/columnSettingTable/index.d.ts +21 -4
  40. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +22 -5
  41. package/dist/components/Business/columnSettingTable/utils.d.ts +1 -2
  42. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  43. package/dist/components/Common/ParagraphCopier/index.d.ts +1 -1
  44. package/dist/components/Common/Section/index.d.ts +1 -1
  45. package/dist/components/Functional/AddSelect/index.d.ts +1 -2
  46. package/dist/components/Functional/AuthButton/index.d.ts +1 -2
  47. package/dist/components/Functional/DataImport/index.d.ts +3 -3
  48. package/dist/components/Functional/DataValidation/index.d.ts +15 -5
  49. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +1 -2
  50. package/dist/components/Functional/QueryMutipleInput/index.d.ts +3 -3
  51. package/dist/components/Functional/QueryMutipleSelect/index.d.ts +1 -2
  52. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  53. package/dist/components/Functional/SearchSelect/utils.d.ts +4 -4
  54. package/dist/components/Functional/TreeSearchSelect/index.d.ts +1 -2
  55. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +1 -1
  56. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +1 -2
  57. package/dist/components/Solution/RuleComponent/Formula.d.ts +1 -2
  58. package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +1 -2
  59. package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +1 -2
  60. package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +1 -2
  61. package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
  62. package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
  63. package/dist/index.d.ts +2 -0
  64. package/dist/index.esm.js +4238 -2124
  65. package/dist/index.js +4247 -2122
  66. package/dist/plugin/TableColumnSetting/index.d.ts +6 -5
  67. package/dist/utils/RequestCacheManager.d.ts +82 -0
  68. package/dist/utils/TableUtils.d.ts +18 -19
  69. package/dist/utils/cachedRequest.d.ts +76 -0
  70. package/dist/utils/index.d.ts +1 -0
  71. package/dist/utils/utils.d.ts +41 -0
  72. package/package.json +16 -14
  73. package/src/assets/btn-cancel.svg +3 -0
  74. package/src/assets/btn-copy.svg +3 -0
  75. package/src/assets/btn-delete.svg +2 -29
  76. package/src/assets/btn-edit.svg +2 -19
  77. package/src/assets/btn-hangUp.svg +3 -0
  78. package/src/assets/btn-print.svg +3 -0
  79. package/src/assets/btn-refresh.svg +3 -0
  80. package/src/assets/btn-unhook.svg +3 -0
  81. package/src/components/Business/AddSelectBusiness/index.md +8 -2
  82. package/src/components/Business/AddSelectBusiness/index.tsx +4 -1
  83. package/src/components/Business/BsLayouts/Components/ChooseStore/services.ts +1 -1
  84. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +1 -1
  85. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +1 -1
  86. package/src/components/Business/BsLayouts/Components/RightContent/home.less +1 -1
  87. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +2 -2
  88. package/src/components/Business/BsLayouts/service.ts +1 -1
  89. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +6 -5
  90. package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +0 -4
  91. package/src/components/Business/BsSulaQueryTable/index.less +5 -3
  92. package/src/components/Business/BsSulaQueryTable/index.md +45 -32
  93. package/src/components/Business/BsSulaQueryTable/index.tsx +154 -76
  94. package/src/components/Business/BsSulaQueryTable/setting.tsx +47 -11
  95. package/src/components/Business/BsSulaQueryTable/utils.less +1 -1
  96. package/src/components/Business/BsSulaQueryTable/utils.tsx +15 -12
  97. package/src/components/Business/CommodityEntry/index.md +1 -1
  98. package/src/components/Business/CommodityEntry/index.tsx +11 -9
  99. package/src/components/Business/DetailPageWrapper/index.less +1 -1
  100. package/src/components/Business/DetailPageWrapper/index.tsx +24 -5
  101. package/src/components/Business/DetailPageWrapper/utils.tsx +7 -2
  102. package/src/components/Business/HomePageWrapper/index.less +1 -1
  103. package/src/components/Business/ItemPropertySelector/index.tsx +88 -0
  104. package/src/components/Business/JsonQueryTable/function.ts +1 -1
  105. package/src/components/Business/JsonQueryTable/index.tsx +1 -1
  106. package/src/components/Business/ModalUtils/index.tsx +45 -0
  107. package/src/components/Business/PropertyModal/index.tsx +1 -1
  108. package/src/components/Business/SearchSelect/BusinessUtils.tsx +625 -76
  109. package/src/components/Business/SearchSelect/index.md +4 -4
  110. package/src/components/Business/SearchSelect/utils.ts +27 -5
  111. package/src/components/Business/SystemLog/index.md +37 -0
  112. package/src/components/Business/SystemLog/index.tsx +87 -0
  113. package/src/components/Business/columnSettingTable/columnSetting.tsx +28 -12
  114. package/src/components/Business/columnSettingTable/index.less +5 -3
  115. package/src/components/Business/columnSettingTable/index.md +200 -136
  116. package/src/components/Business/columnSettingTable/index.tsx +168 -39
  117. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +188 -56
  118. package/src/components/Functional/AddSelect/helps.ts +1 -1
  119. package/src/components/Functional/AddSelect/index.tsx +132 -13
  120. package/src/components/Functional/BillEntry/index.less +3 -0
  121. package/src/components/Functional/BillEntry/index.tsx +1 -1
  122. package/src/components/Functional/DataImport/index.tsx +1 -1
  123. package/src/components/Functional/DataValidation/index.md +1 -0
  124. package/src/components/Functional/DataValidation/index.tsx +161 -27
  125. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +1 -1
  126. package/src/components/Functional/QueryMutipleInput/index.tsx +12 -3
  127. package/src/components/Functional/QueryMutipleSelect/index.tsx +3 -2
  128. package/src/components/Functional/SearchSelect/index.less +4 -0
  129. package/src/components/Functional/SearchSelect/index.tsx +68 -24
  130. package/src/components/Functional/SearchSelect/utils.tsx +17 -11
  131. package/src/components/Functional/TreeSearchSelect/index.tsx +3 -2
  132. package/src/components/Solution/RuleComponent/InnerSelect.tsx +1 -0
  133. package/src/components/Solution/RuleComponent/RenderCompItem.tsx +11 -2
  134. package/src/components/Solution/RuleComponent/index.js +75 -4
  135. package/src/components/Solution/RuleComponent/ruleFiled.js +26 -2
  136. package/src/components/Solution/RuleComponent/services.ts +1 -1
  137. package/src/components/Solution/RuleSetter/service.js +1 -1
  138. package/src/index.ts +3 -0
  139. package/src/plugin/TableColumnSetting/index.less +5 -3
  140. package/src/plugin/TableColumnSetting/index.tsx +80 -13
  141. package/src/styles/bsDefault.less +9 -3
  142. package/src/utils/RequestCacheManager.ts +213 -0
  143. package/src/utils/RequestCache_Examples.md +137 -0
  144. package/src/utils/RequestCache_README.md +170 -0
  145. package/src/utils/TableUtils.less +1 -1
  146. package/src/utils/cachedRequest.ts +288 -0
  147. package/src/utils/index.ts +1 -0
  148. package/src/utils/request.ts +8 -4
  149. package/src/utils/requestUtils.ts +1 -1
  150. package/src/utils/utils.ts +52 -16
@@ -17,12 +17,13 @@ export const handleSourceName = (sName: any) => {
17
17
  }
18
18
 
19
19
  // ------------------------------------------处理样式相关--开始----------------------------------------
20
- export const getFormRowInfo = (list: any) => {
21
- const totalRows = Math.ceil(list.length / columnsPerRow); // 计算总行数
22
- const lastRowColumns = (list.length+1) % columnsPerRow; // 计算最后一行的实际列数
23
- const emptySlots = lastRowColumns === 0 ? 0 : columnsPerRow - lastRowColumns; // 计算最后一行的空位数
20
+ export const getFormRowInfo = (list: any, tableSearchColSpan: number) => {
21
+ const lastColumnsPerRow = tableSearchColSpan == 6 ? columnsPerRow : 3;
22
+ const totalRows = Math.ceil(list.length / lastColumnsPerRow); // 计算总行数
23
+ const lastRowColumns = (list.length+1) % lastColumnsPerRow; // 计算最后一行的实际列数
24
+ const emptySlots = lastRowColumns === 0 ? 0 : lastColumnsPerRow - lastRowColumns; // 计算最后一行的空位数
24
25
  const emptyArray = new Array(emptySlots).fill(null); // 生成长度为 emptySlots 的数组
25
- return { totalRows, emptyArray }
26
+ return { totalRows, emptyArray, ColSpan: tableSearchColSpan ?? ColSpan}
26
27
  }
27
28
 
28
29
  export const defaultVisibleFieldsCount = 7;
@@ -60,11 +61,11 @@ export const getRealStr = (oldSelect: any,newSelect: any, record: any) => {
60
61
  return oldSelect?.length ? oldSelect.some((o: any) => o.value == record?.value) ? oldSelect.filter((s: any) => s.value != record?.value) : [...oldSelect,...newSelect] : newSelect;
61
62
  }
62
63
  export const getCurrentSRKs = (selectMode: any,labelInValue:boolean,value: any) => {
63
- return selectMode ? (labelInValue ? value?.map((s: any)=> (s?.value||s)) : value) : (labelInValue ? value?.value&&[value?.value]||[] : value&&[value]||[])
64
+ return selectMode ? (labelInValue ? value?.map((s: any)=> (s?.value||s)) : (value||[])) : (labelInValue ? value?.value&&[value?.value]||[] : value&&[value]||[])
64
65
  }
65
66
  export const getRenderSource = (currentSRKs: any, items: any) => {
66
67
  // 判空处理
67
- if(!currentSRKs?.length) return items||[];
68
+ if(!currentSRKs || !currentSRKs?.length) return items||[];
68
69
 
69
70
  // 创建映射对象 用于记录原始选中顺序
70
71
  const orderMap = new Map<number, number>();
@@ -157,12 +158,14 @@ export const handleParams = (params: any) => {
157
158
  delete params[key];
158
159
  } else if (element && key.indexOf('*multiInput') >= 0) {
159
160
  let name = '',
160
- value = element['value'];
161
+ value = (element?.['value']||element)?.trim?.();
162
+ const searchKey = element?.['name']||key?.split('*multiInput')?.[0]
161
163
  if (value.indexOf(',') >= 0) {
162
- name = `qp-${element['name']}-in`;
164
+ name = `qp-${searchKey}-in`;
163
165
  } else {
164
- name = `qp-${element['name']}-like`;
166
+ name = `qp-${searchKey}-like`;
165
167
  }
168
+ value = value?.trim?.();
166
169
  params[name] = value;
167
170
  delete params[key];
168
171
  }
@@ -400,7 +403,10 @@ export const maxTagPlaceholder = (selectedValues: any, { selectProps, onChange,
400
403
  // 弹窗数据表头处理
401
404
  export const handleTableColumns = (tableColumns: any) => {
402
405
  // 按照默认设置排序 > 没有排序字段的展示所有列表头 > 没有表头列不展示
403
- const showTableColumns = tableColumns?.filter((s: any) => typeof s.defaultSort == 'number')||tableColumns||[];
406
+ let showTableColumns = tableColumns?.filter((s: any) => typeof s.defaultSort == 'number') || tableColumns || [];
407
+
408
+ showTableColumns = showTableColumns?.length ? showTableColumns : tableColumns;
409
+
404
410
  return showTableColumns?.sort((a: any,b: any)=> a.defaultSort-b.defaultSort)||[]
405
411
  };
406
412
 
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { TreeSelect, Tooltip, Tag } from 'antd';
3
- import request from '@/utils/request';
3
+ import request from '@/utils/cachedRequest';
4
4
  import { stringify } from 'querystring';
5
5
  import _ from "lodash"
6
6
  import { judgeIsRequestSuccess } from '@/utils/requestUtils';
@@ -53,6 +53,7 @@ const TreeSearchSelect = (props: any) => {
53
53
  : treeDataItem[resKeyValue[1]],
54
54
  key: treeDataItem[resKeyValue[0]],
55
55
  value: treeDataItem[resKeyValue[0]],
56
+ label: `${treeDataItem[resKeyValue[0]]}${treeDataItem[resKeyValue[1]]}`,
56
57
  parentId: treeDataItem.parent,
57
58
  data: { ...treeDataItem },
58
59
  isLeaf: !haveChildren,
@@ -207,7 +208,7 @@ const TreeSearchSelect = (props: any) => {
207
208
  labelInValue={labelInValue}
208
209
  showArrow={showArrow}
209
210
  showCheckedStrategy={showCheckedStrategy}
210
- treeNodeFilterProp={'title'}
211
+ filterTreeNode={(inputValue, treeNode) => treeNode.props.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1}
211
212
  treeDefaultExpandAll
212
213
  multiple={multiple} // 支持多选(当设置 treeCheckable 时自动变为 true)
213
214
  maxTagPlaceholder={maxTagPlaceholder}
@@ -57,6 +57,7 @@ export default (props: Iprops) => {
57
57
  // handleEdit(ites.code, value);
58
58
  }}
59
59
  options={dataSource}
60
+ filterOption ={(input: any, option: any) => option?.label?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0}
60
61
  />
61
62
  );
62
63
  };
@@ -155,6 +155,7 @@ export default function RenderCompItem(props:any){
155
155
  onChange={(value) => {
156
156
  handleEdit(ites.code, value);
157
157
  }}
158
+ filterOption ={(input: any, option: any) => option?.text?.toLowerCase()?.indexOf(input?.toLowerCase()) >= 0}
158
159
  >
159
160
  {Object.keys(ites.enumeration).map((it) => (
160
161
  <Select.Option key={it} value={it}>
@@ -170,7 +171,7 @@ export default function RenderCompItem(props:any){
170
171
  <InnerSelect
171
172
  disabled={disabled}
172
173
  inputType={ites?.inputType}
173
- defaultValue={ites.defaultValue}
174
+ defaultValue={ites?.defaultValue}
174
175
  styleCommon={styleCommon}
175
176
  value={showValue(ites.code)}
176
177
  onChange={(value) => {
@@ -588,7 +589,7 @@ export default function RenderCompItem(props:any){
588
589
  null}
589
590
  {/* 单选/多选 配送方式选择器 */}
590
591
  {((ites?.inputType === 20 || ites?.inputType === 30) &&
591
- ites?.choiceType === 310 && (
592
+ (ites?.choiceType === 310 || ites?.choiceType === 311)&& (
592
593
  <BusinessSearchSelect
593
594
  selectBusinessType="deliveryMode"
594
595
  selectProps={{
@@ -605,6 +606,14 @@ export default function RenderCompItem(props:any){
605
606
  labelInValue={true}
606
607
  value={showValue(ites.code)}
607
608
  requestConfig={{
609
+ ...(ites?.choiceType === 311
610
+ ? {
611
+ otherParams: {
612
+ // 配送方式只选择标准配送方式
613
+ 'qp-recordChannnelCode-eq': 80,
614
+ },
615
+ }
616
+ : {}),
608
617
  filterInit: 'qp-code-in',
609
618
  }}
610
619
  onChange={(value) => {
@@ -688,6 +688,7 @@ class RuleObjectComponent extends Component {
688
688
  initialThresholdQuery = {},
689
689
  disabled,
690
690
  systemVariableList,
691
+ needShowInsertSQL,
691
692
  } = this.props;
692
693
  let thresholdQuery = {
693
694
  ...initialThresholdQuery,
@@ -747,6 +748,7 @@ class RuleObjectComponent extends Component {
747
748
  <div
748
749
  className={'rule_line_content'}
749
750
  style={{ display: 'flex', marginBottom: '0px', padding: '10px 0px' }}
751
+ key={itemDetail.elementId}
750
752
  >
751
753
  <div
752
754
  className={'logical_operate_content'}
@@ -825,6 +827,9 @@ class RuleObjectComponent extends Component {
825
827
  itemDetail.metaObjectCode =
826
828
  nodeInfo.triggerNode.props.metaObjectCode;
827
829
  itemDetail.isInsertParam = false;
830
+ if(needShowInsertSQL) {
831
+ itemDetail.isInsertSQL = false;
832
+ }
828
833
  this.setState(
829
834
  {
830
835
  ruleClassData,
@@ -862,7 +867,7 @@ class RuleObjectComponent extends Component {
862
867
  ),
863
868
  )}
864
869
  </Select>
865
- {!itemDetail?.isInsertParam ? (
870
+ {(needShowInsertSQL ? (!itemDetail?.isInsertParam&&!itemDetail?.isInsertSQL): !itemDetail?.isInsertParam) ? (
866
871
  <RuleField
867
872
  customerWidth={this.props.customerWidth}
868
873
  selectOperation={itemDetail?.operationCode || ''}
@@ -926,6 +931,30 @@ class RuleObjectComponent extends Component {
926
931
  ))
927
932
  : null}
928
933
  </Select>
934
+ <Input
935
+ disabled={disabled}
936
+ value={itemDetail?.params?.[0]||''}
937
+ style={{
938
+ width: '150px',
939
+ marginLeft: '10px',
940
+ display: needShowInsertSQL && itemDetail?.isInsertSQL ? '' : 'none',
941
+ }}
942
+ onChange={(e) => {
943
+ const value = e.target.value;
944
+ const { ruleClassData } = this.state;
945
+ itemDetail.params = [value || ''];
946
+ itemDetail.paramNames = [''];
947
+ this.setState(
948
+ {
949
+ ruleClassData,
950
+ },
951
+ () => {
952
+ callBack(ruleClassData);
953
+ },
954
+ );
955
+ }}
956
+ >
957
+ </Input>
929
958
  <PlusCircleOutlined
930
959
  className={'icon_btn_style'}
931
960
  onClick={() => {
@@ -985,6 +1014,36 @@ class RuleObjectComponent extends Component {
985
1014
  >
986
1015
  {itemDetail?.isInsertParam ? '取消插入参数' : '插入参数'}
987
1016
  </Button>
1017
+ <Button
1018
+ type="link"
1019
+ disabled={
1020
+ disabled ||
1021
+ (itemDetail.operationCode === '' || !itemDetail.operationCode
1022
+ ? true
1023
+ : false)
1024
+ }
1025
+ style={needShowInsertSQL?{}:{ display: 'none'}}
1026
+ onClick={() => {
1027
+ const { ruleClassData } = this.state;
1028
+ itemDetail.isInsertSQL = !itemDetail.isInsertSQL;
1029
+ if (itemDetail.isInsertSQL) {
1030
+ itemDetail.type = 30;
1031
+ itemDetail.paramNames = [];
1032
+ itemDetail.params = [];
1033
+ }
1034
+
1035
+ this.setState(
1036
+ {
1037
+ ruleClassData,
1038
+ },
1039
+ () => {
1040
+ callBack(ruleClassData);
1041
+ },
1042
+ );
1043
+ }}
1044
+ >
1045
+ {itemDetail?.isInsertSQL ? '取消插入SQL' : '插入SQL'}
1046
+ </Button>
988
1047
  </div>
989
1048
  )}
990
1049
  <div
@@ -1082,7 +1141,12 @@ class RuleObjectComponent extends Component {
1082
1141
  let value = val;
1083
1142
  if (isObj(code)) {
1084
1143
  Object.keys(code).forEach((ite) => {
1085
- this.handleEditExtraInfoResponse(ite, code[ite], parentDetail,classDataIndex);
1144
+ this.handleEditExtraInfoResponse(
1145
+ ite,
1146
+ code[ite],
1147
+ parentDetail,
1148
+ classDataIndex,
1149
+ );
1086
1150
  });
1087
1151
  return;
1088
1152
  }
@@ -1090,9 +1154,16 @@ class RuleObjectComponent extends Component {
1090
1154
  value = val.map((m) => m.value || m).join(',');
1091
1155
  }
1092
1156
  if (isObj(val)) {
1093
- value = val.value || val.PCDCode?.join('/');
1157
+ value = val?.value || val.PCDCode?.join('/') || val;
1094
1158
  }
1095
- this.handleEditExtraInfoResponse('value', value, parentDetail,classDataIndex,code);
1159
+
1160
+ this.handleEditExtraInfoResponse(
1161
+ 'value',
1162
+ value,
1163
+ parentDetail,
1164
+ classDataIndex,
1165
+ code,
1166
+ );
1096
1167
  };
1097
1168
 
1098
1169
  return (
@@ -286,7 +286,7 @@ export default class RuleField extends Component {
286
286
  } = this.props;
287
287
  const { thresholdList } = this.state;
288
288
  const styleCommon = {
289
- width: customerWidth || '150px',
289
+ width: customerWidth || '180px',
290
290
  };
291
291
  if (!selectOperation) return <Input disabled style={styleCommon}></Input>;
292
292
  const SET_TYPE = ['in', 'nin', 'cn', 'ncn','5']; //集合类型 (数字为 兼容用户管理子应用使用规则组件)
@@ -1932,7 +1932,7 @@ export default class RuleField extends Component {
1932
1932
  }
1933
1933
  }
1934
1934
  // 配送方式选择器
1935
- if (dataChoiceBusinessType == 310) {
1935
+ if (dataChoiceBusinessType == 310 || dataChoiceBusinessType == 311) {
1936
1936
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1937
1937
  return (
1938
1938
  <>
@@ -1952,6 +1952,14 @@ export default class RuleField extends Component {
1952
1952
  labelInValue={true}
1953
1953
  value={values[0]}
1954
1954
  requestConfig={{
1955
+ ...(dataChoiceBusinessType === 311
1956
+ ? {
1957
+ otherParams: {
1958
+ // 配送方式只选择标准配送方式
1959
+ 'qp-recordChannnelCode-eq': 80,
1960
+ },
1961
+ }
1962
+ : {}),
1955
1963
  filterInit: 'qp-code-in',
1956
1964
  }}
1957
1965
  onChange={(value) => {
@@ -1983,6 +1991,14 @@ export default class RuleField extends Component {
1983
1991
  labelInValue={true}
1984
1992
  value={values[1]}
1985
1993
  requestConfig={{
1994
+ ...(dataChoiceBusinessType === 311
1995
+ ? {
1996
+ otherParams: {
1997
+ // 配送方式只选择标准配送方式
1998
+ 'qp-recordChannnelCode-eq': 80,
1999
+ },
2000
+ }
2001
+ : {}),
1986
2002
  filterInit: 'qp-code-in',
1987
2003
  }}
1988
2004
  onChange={(value) => {
@@ -2020,6 +2036,14 @@ export default class RuleField extends Component {
2020
2036
  labelInValue={true}
2021
2037
  value={currentValue}
2022
2038
  requestConfig={{
2039
+ ...(dataChoiceBusinessType === 311
2040
+ ? {
2041
+ otherParams: {
2042
+ // 配送方式只选择标准配送方式
2043
+ 'qp-recordChannnelCode-eq': 80,
2044
+ },
2045
+ }
2046
+ : {}),
2023
2047
  filterInit: 'qp-code-in',
2024
2048
  }}
2025
2049
  onChange={(value) => {
@@ -1,4 +1,4 @@
1
- import request from '@/utils/request';
1
+ import request from '@/utils/cachedRequest';
2
2
 
3
3
  // 查询规则对象属性thresholdList
4
4
  export async function getRegularThresholdRange(params: any) {
@@ -1,5 +1,5 @@
1
1
  import { stringify } from 'qs';
2
- import request from '@/utils/request';
2
+ import request from '@/utils/cachedRequest';
3
3
 
4
4
  // 仓库新增
5
5
  export async function addOneOnlineStoreRoom(params) {
package/src/index.ts CHANGED
@@ -37,6 +37,7 @@ export { default as TableColumnSetting} from './plugin/TableColumnSetting';
37
37
  export { default as AuthButton } from './components/Functional/AuthButton';
38
38
  export { default as CustomSelector } from './components/Solution/RuleComponent/CustomPlugin/CustomSelector';
39
39
  export { default as PropertySelector} from './components/Business/PropertyModal';
40
+ export { default as ModalUtils } from './components/Business/ModalUtils';
40
41
 
41
42
  export { default as EllipsisTooltip} from './components/Functional/EllipsisTooltip';
42
43
  export * from './components/Functional/BsAntdSula/index';
@@ -47,3 +48,5 @@ export { default as RuleSetter} from './components/Solution/RuleSetter';
47
48
  export { default as ExtendedCollapse } from './components/Common/ExtendedCollapse';
48
49
  export { default as Section } from './components/Common/Section';
49
50
  export { default as ParagraphCopier } from './components/Common/ParagraphCopier';
51
+
52
+ export { default as SystemLog } from './components/Business/SystemLog';
@@ -151,16 +151,18 @@
151
151
  }
152
152
  }
153
153
 
154
- .ant-table-wrapper::-webkit-scrollbar {
154
+ .ant-table-tbody::-webkit-scrollbar {
155
155
  display: none;
156
156
  }
157
157
 
158
158
  .ant-table-wrapper {
159
159
  margin-top: 10px;
160
- height: 364px;
161
- overflow: scroll;
162
160
  padding-bottom: 50px;
163
161
 
162
+ tbody tr:first-child {
163
+ display: none;
164
+ }
165
+
164
166
  tr {
165
167
  height: 30px;
166
168
  td {
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
2
  import React from 'react';
3
3
  import { Table, message, Checkbox, Modal, Input, Button, Tooltip } from 'antd';
4
- import request from '@/utils/request';
4
+ import request from '@/utils/cachedRequest';
5
5
  // import { request } from 'umi';
6
6
  import {
7
7
  SortableContainer,
@@ -411,7 +411,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
411
411
  DraggableContainer = (props: any) => (
412
412
  <SortableBody
413
413
  useDragHandle
414
- disableAutoscroll
414
+ lockAxis='y'
415
415
  helperClass="row-dragging"
416
416
  onSortEnd={this.onSortEnd}
417
417
  {...props}
@@ -422,9 +422,9 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
422
422
  const { sortDataSource } = this.state;
423
423
  // function findIndex base on Table rowKey props and should always be a right array index
424
424
  const index = sortDataSource.findIndex(
425
- (x:any) => x.key === restProps['data-row-key'],
425
+ (x:any) => (x.key||x.dataIndex) == restProps['data-row-key'],
426
426
  );
427
- return <SortableItem index={index} {...restProps} />;
427
+ return <SortableItem key={restProps['data-row-key']} index={index} {...restProps} />;
428
428
  };
429
429
 
430
430
  onChange = (e: any, title: any) => {
@@ -495,6 +495,56 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
495
495
  this.setInitValue(datasource);
496
496
  };
497
497
 
498
+ handleResetSetting = () => {
499
+ const { setShowColumns, datasource = [], setInitialTableInfo, appRequestConfig }: any = this.props;
500
+ let that = this;
501
+ let { bsTableCode } = this.state;
502
+
503
+ return new Promise((resolve: any, reject: any) => {
504
+ request({
505
+ url: handleRequestUrl('/user','/appConfig/saveUserOrder', appRequestConfig),
506
+ method: 'POST',
507
+ data: {
508
+ code: that.state.bsTableCode,
509
+ detail: '',
510
+ },
511
+ }).then((res:any) => {
512
+ if (judgeIsRequestSuccess(res?.data)) {
513
+ let config =
514
+ localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
515
+ let configArray = JSON.parse(config);
516
+ let currentSetting = configArray.filter(
517
+ (item) => item.code === bsTableCode,
518
+ );
519
+ if (currentSetting.length) {
520
+ currentSetting[0].detail = JSON.stringify([]);
521
+ } else {
522
+ configArray.push({
523
+ code: bsTableCode,
524
+ detail: JSON.stringify([]),
525
+ });
526
+ }
527
+
528
+ localStorage.setItem(
529
+ ENUM.BROWSER_CACHE.COLUMN_CONDITION,
530
+ JSON.stringify(configArray),
531
+ );
532
+
533
+ message.success('重置表头列成功!');
534
+
535
+ setInitialTableInfo(true);
536
+ this.setState({
537
+ visible: false,
538
+ });
539
+ } else {
540
+ message.error('重置表头列自定义失败,请稍后尝试');
541
+ reject('');
542
+ }
543
+ });
544
+ })
545
+ };
546
+
547
+
498
548
  onSearch = (e: any) => {
499
549
  this.setState({
500
550
  searchDataSource: e.target.value,
@@ -532,15 +582,31 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
532
582
  onOk={this.handleOk}
533
583
  onCancel={this.handleCancel}
534
584
  footer={[
535
- <Button key="back" onClick={this.handleReset}>
536
- 恢复默认
537
- </Button>,
538
- <Button key="submit" onClick={this.handleOk}>
539
- 取消
540
- </Button>,
541
- <Button key="submit" type="primary" onClick={this.handleOk}>
542
- 确认
543
- </Button>,
585
+ <div>
586
+ <Button
587
+ key="back"
588
+ onClick={this.handleReset}
589
+ style={{ marginRight: 0 }}
590
+ >
591
+ 恢复默认
592
+ </Button>
593
+ <Button key="back" onClick={this.handleResetSetting}>
594
+ 重置设置
595
+ </Button>
596
+ <span style={{fontSize: '12px', color: '8A8F8D'}}>(列表字段变更会影响列设置功能,变更后请点击重置然后重新设置)</span>
597
+ </div>,
598
+ <div>
599
+ <Button
600
+ key="submit"
601
+ onClick={this.handleCancel}
602
+ style={{ marginRight: 0 }}
603
+ >
604
+ 取消
605
+ </Button>
606
+ <Button key="submit" type="primary" onClick={this.handleOk}>
607
+ 确认
608
+ </Button>
609
+ </div>,
544
610
  ]}
545
611
  >
546
612
  <div className={'sort_table'}>
@@ -709,6 +775,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
709
775
  row: this.DraggableBodyRow,
710
776
  },
711
777
  }}
778
+ scroll={{ y: 364 }}
712
779
  />
713
780
  </div>
714
781
  </div>
@@ -1469,8 +1469,12 @@ body .ant-table .ant-table-container .ant-table-thead > tr > th {
1469
1469
  .table_odd {
1470
1470
  background: #f7f8fb;
1471
1471
  }
1472
+ .table_gray {
1473
+ background: #D3D3D3;
1474
+ }
1472
1475
  // 浮起的列 设置斑马
1473
1476
  .table_base,
1477
+ .table_gray,
1474
1478
  .table_odd {
1475
1479
 
1476
1480
  .ant-table-cell-fix-left,
@@ -1908,16 +1912,18 @@ body .ant-table .ant-table-container .ant-table-thead > tr > th {
1908
1912
  }
1909
1913
  }
1910
1914
 
1911
- .ant-table-wrapper::-webkit-scrollbar {
1915
+ .ant-table-tbody::-webkit-scrollbar {
1912
1916
  display: none;
1913
1917
  }
1914
1918
 
1915
1919
  .ant-table-wrapper {
1916
1920
  margin-top: 10px;
1917
- height: 364px;
1918
- overflow: scroll;
1919
1921
  padding-bottom: 50px;
1920
1922
 
1923
+ tbody tr:first-child {
1924
+ display: none;
1925
+ }
1926
+
1921
1927
  tr {
1922
1928
  height: 30px;
1923
1929
  td {