@bit-sun/business-component 2.3.21 → 2.3.22-beta10

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 (86) hide show
  1. package/dist/components/Business/AddSelectBusiness/index.d.ts +4 -3
  2. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +2 -1
  3. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  4. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
  5. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
  6. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +2 -1
  7. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -1
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  9. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +2 -1
  10. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -1
  11. package/dist/components/Business/BsLayouts/index.d.ts +1 -1
  12. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
  13. package/dist/components/Business/BsSulaQueryTable/index.d.ts +2 -1
  14. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +5 -5
  15. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +14 -13
  16. package/dist/components/Business/CommodityEntry/index.d.ts +2 -1
  17. package/dist/components/Business/CommonAlert/index.d.ts +2 -1
  18. package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
  19. package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -5
  20. package/dist/components/Business/HomePageWrapper/index.d.ts +2 -1
  21. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +2 -1
  22. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +2 -1
  23. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +2 -1
  24. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +2 -1
  25. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +2 -1
  26. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  27. package/dist/components/Business/StateFlow/index.d.ts +2 -1
  28. package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
  29. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +5 -5
  30. package/dist/components/Business/columnSettingTable/index.d.ts +2 -2
  31. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +2 -2
  32. package/dist/components/Business/columnSettingTable/utils.d.ts +2 -1
  33. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  34. package/dist/components/Functional/AddSelect/helps.d.ts +13 -0
  35. package/dist/components/Functional/AddSelect/index.d.ts +2 -1
  36. package/dist/components/Functional/DataImport/index.d.ts +3 -3
  37. package/dist/components/Functional/DataValidation/index.d.ts +3 -3
  38. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +2 -1
  39. package/dist/components/Functional/QueryMutipleInput/index.d.ts +2 -1
  40. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  41. package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -1
  42. package/dist/components/Solution/RuleComponent/Formula.d.ts +2 -1
  43. package/dist/index.esm.js +1416 -1315
  44. package/dist/index.js +1422 -1321
  45. package/dist/plugin/TableColumnSetting/index.d.ts +5 -5
  46. package/dist/utils/LocalstorageUtils.d.ts +5 -0
  47. package/dist/utils/utils.d.ts +1 -1
  48. package/lib/assets/exportFail.svg +9 -9
  49. package/lib/assets/exportProcessing.svg +9 -9
  50. package/lib/assets/exportSuccess.svg +9 -9
  51. package/package.json +3 -3
  52. package/src/assets/caidan.svg +1 -1
  53. package/src/assets/exportFail.svg +9 -9
  54. package/src/assets/exportProcessing.svg +9 -9
  55. package/src/assets/exportSuccess.svg +9 -9
  56. package/src/assets/fixed-left-active.svg +1 -1
  57. package/src/assets/fixed-right-active.svg +1 -1
  58. package/src/components/Business/AddSelectBusiness/index.tsx +352 -187
  59. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +1 -1
  60. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +1 -1
  61. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +3 -3
  62. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +4 -4
  63. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +1 -1
  64. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +1 -1
  65. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +1 -1
  66. package/src/components/Business/BsLayouts/Components/RightContent/home.less +1 -1
  67. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +3 -3
  68. package/src/components/Business/BsLayouts/index.less +2 -2
  69. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +7 -6
  70. package/src/components/Business/BsSulaQueryTable/index.tsx +1 -5
  71. package/src/components/Business/BsSulaQueryTable/setting.tsx +12 -9
  72. package/src/components/Business/BsSulaQueryTable/utils.less +1 -1
  73. package/src/components/Business/CommonAlert/index.tsx +1 -1
  74. package/src/components/Business/CommonGuideWrapper/index.less +2 -2
  75. package/src/components/Business/DetailPageWrapper/index.less +2 -2
  76. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +1 -1
  77. package/src/components/Business/StateFlow/index.less +3 -3
  78. package/src/components/Business/columnSettingTable/columnSetting.tsx +8 -6
  79. package/src/components/Functional/AddSelect/helps.ts +65 -0
  80. package/src/components/Functional/AddSelect/index.tsx +15 -127
  81. package/src/components/Functional/BillEntry/index.tsx +6 -6
  82. package/src/components/Functional/SearchSelect/index.tsx +1 -1
  83. package/src/plugin/TableColumnSetting/index.tsx +8 -6
  84. package/src/styles/bsDefault.less +12 -34
  85. package/src/utils/LocalstorageUtils.ts +19 -0
  86. package/src/utils/requestUtils.ts +13 -5
@@ -81,7 +81,7 @@ const GlobalHeaderCom = (props: any) => {
81
81
  return (
82
82
  <>
83
83
  <span>{beforeStr}</span>
84
- <span style={{color: '#1890ff'}}>{keyWord}</span>
84
+ <span style={{color: '#02B56E'}}>{keyWord}</span>
85
85
  <span>{afterStr}</span>
86
86
  </>
87
87
  )
@@ -44,7 +44,7 @@
44
44
  .account {
45
45
  .avatar {
46
46
  margin-right: 8px;
47
- color: #005cff;
47
+ color: #02B56E;
48
48
  vertical-align: top;
49
49
  background: rgba(255, 255, 255, 0.85);
50
50
  }
@@ -44,7 +44,7 @@
44
44
  .account {
45
45
  .avatar {
46
46
  margin-right: 8px;
47
- color: #005cff;
47
+ color: #02B56E;
48
48
  vertical-align: top;
49
49
  background: rgba(255, 255, 255, 0.85);
50
50
  }
@@ -117,7 +117,7 @@
117
117
  left: -1px;
118
118
  width: 92px;
119
119
  height: 40px;
120
- background: #005cff;
120
+ background: #02B56E;
121
121
  border-radius: 0px 4px 4px 0px;
122
122
  }
123
123
 
@@ -131,7 +131,7 @@
131
131
  }
132
132
 
133
133
  .themeColor {
134
- color: #005CFF;
134
+ color: #02B56E;
135
135
  }
136
136
 
137
137
  .serachView{
@@ -1,6 +1,6 @@
1
1
  .customer_menu_content {
2
2
  color: #b1bad4;
3
- background: #141620;
3
+ background: #494B4A;
4
4
  display: flex;
5
5
  align-items: center;
6
6
  justify-content: center;
@@ -26,7 +26,7 @@
26
26
  .link_style:hover {
27
27
  background-color: #e4e7ed;
28
28
  cursor: pointer;
29
- color: #1890ff;
29
+ color: #02B56E;
30
30
  }
31
31
 
32
32
  .sub_menu_content {
@@ -44,20 +44,21 @@ class SearchItemTable extends React.Component {
44
44
  let that = this;
45
45
  let configvalue = config
46
46
  ? config.map((item) => ({
47
- name: item.name,
48
- hidden: item.hidden,
49
- }))
47
+ name: item.name,
48
+ hidden: item.hidden,
49
+ }))
50
50
  : '';
51
51
 
52
52
  axios({
53
- url: '/user/appConfig/saveQueryCriteria',
53
+ // url: '/user/appConfig/saveQueryCriteria',
54
+ url: '/api/mallops/appConfig/saveQueryCriteria', //赢家项目地址
54
55
  method: 'POST',
55
56
  data: {
56
57
  code: that.state.bsTableCode,
57
58
  detail: configvalue ? JSON.stringify(configvalue) : '',
58
59
  },
59
- }).then((res:any) => {
60
- if (res?.data?.status === '0') {
60
+ }).then((res: any) => {
61
+ if (res?.data?.status === '0' || res?.data?.code == '000000') {
61
62
  this.patchConfigToLocalstorage(configvalue)
62
63
  } else {
63
64
  message.error('保存搜索项自定义失败,请稍后尝试');
@@ -152,11 +152,7 @@ export default (props: any) => {
152
152
  ? JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES) as string)
153
153
  : [];
154
154
  Object.keys(resourceCodeArray).forEach((item: any) => {
155
- let Item = item;
156
- if (Number(item.slice(-1)) >= 1) {
157
- Item = item.substr(0, item.length - 1);
158
- }
159
- if (!authButton.filter((itemInner: any) => Item === itemInner).length) {
155
+ if (!authButton.filter((itemInner: any) => item === itemInner).length) {
160
156
  resourceCodeArray[item].visible = false;
161
157
  }
162
158
  });
@@ -27,6 +27,7 @@ import fixedRight from '../../../assets/fixed-right.svg';
27
27
  import fixedRightActive from '../../../assets/fixed-right-active.svg';
28
28
  import './index.less';
29
29
  import ENUM from '@/utils/enumConfig';
30
+ import { handleError } from '@/utils/utils';
30
31
 
31
32
  const DragHandle = SortableHandle(() => <img width={25} src={drag} />);
32
33
 
@@ -50,23 +51,25 @@ class SortableTable extends React.Component {
50
51
  let that = this;
51
52
  let configvalue = config
52
53
  ? config.map((item) => ({
53
- key: item.key,
54
- dataIndex: item.dataIndex,
55
- width: item.width,
56
- hidden: item.hidden,
57
- fixed: item.fixed,
58
- }))
54
+ key: item.key,
55
+ dataIndex: item.dataIndex,
56
+ width: item.width,
57
+ hidden: item.hidden,
58
+ fixed: item.fixed,
59
+ }))
59
60
  : '';
60
61
  return new Promise((resolve: any, reject: any) => {
61
62
  axios({
62
- url: '/user/appConfig/saveUserOrder',
63
+ // url: '/user/appConfig/saveUserOrder',
64
+ url: '/api/mallops/appConfig/saveUserOrder', //赢家地址
63
65
  method: 'POST',
64
66
  data: {
65
67
  code: that.state.bsTableCode,
66
68
  detail: configvalue ? JSON.stringify(configvalue) : '',
67
69
  },
68
- }).then((res:any) => {
69
- if (res?.data?.status === '0') {
70
+ }).then((res: any) => {
71
+ // if (res?.data?.status === '0') {
72
+ if (res?.data?.status === '0' || res?.data?.code == '000000') {
70
73
  this.patchConfigToLocalstorage(configvalue);
71
74
  resolve({ status: '0' });
72
75
  } else {
@@ -52,7 +52,7 @@
52
52
  margin: 0 0 5px !important;
53
53
  }
54
54
  .card_department {
55
- color: #005cff !important;
55
+ color: #02B56E !important;
56
56
  }
57
57
 
58
58
  .user_info_card {
@@ -8,7 +8,7 @@ export default (props: any) => {
8
8
  <div style={{ width: '100%', background: '#fff', padding: '0 20px' }} className={'common_Alert'}>
9
9
  <Alert
10
10
  style={{
11
- borderColor: '#005CFF',
11
+ borderColor: '#02B56E',
12
12
  background: '#e5eeff',
13
13
  borderRadius: '4px',
14
14
  }}
@@ -8,7 +8,7 @@
8
8
  z-index: 10;
9
9
  top: 50%;
10
10
  transform: translateY(-50%);
11
- background-color: #141620;
11
+ background-color: #494B4A;
12
12
  .form-guide-top {
13
13
  padding: 0px 10px;
14
14
  display: flex;
@@ -98,7 +98,7 @@
98
98
  display: inline-block;
99
99
  width: 4px;
100
100
  height: 100%;
101
- background-color: #005CFF;
101
+ background-color: #02B56E;
102
102
  height: 20px;
103
103
  margin-right: 16px;
104
104
  }
@@ -40,8 +40,8 @@
40
40
  }
41
41
 
42
42
  .back_home_img_content:hover {
43
- background-color: #005CFF;
44
- border: 1px solid #005CFF;
43
+ background-color: #02B56E;
44
+ border: 1px solid #02B56E;
45
45
  .anticon-arrow-left {
46
46
  color: #FFFFFF;
47
47
  }
@@ -5,7 +5,7 @@
5
5
  }
6
6
 
7
7
  .title {
8
- color: #1890ff;
8
+ color: #02B56E;
9
9
  padding: 12px;
10
10
  font-weight: bold;
11
11
  }
@@ -9,7 +9,7 @@
9
9
  align-items: center;
10
10
  }
11
11
  .choosed-status-label.form-status-label {
12
- background-color: #005CFF;
12
+ background-color: #02B56E;
13
13
  }
14
14
 
15
15
  .form-status-label:last-child {
@@ -30,11 +30,11 @@
30
30
  }
31
31
 
32
32
  .choosed-status-label.form-status-label::after {
33
- border-left: 12px solid #005CFF;
33
+ border-left: 12px solid #02B56E;
34
34
  }
35
35
 
36
36
  .choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {
37
- border-left: 12px solid #005CFF;
37
+ border-left: 12px solid #02B56E;
38
38
  }
39
39
 
40
40
  .form-status-label:last-child::after {
@@ -68,7 +68,7 @@ class SortableTable extends React.Component<SortTableProps> {
68
68
  patchUserColumnConfig = (config: any) => {
69
69
  const { tableCode }: any = this.props;
70
70
  if (!tableCode) return;
71
- let configvalue = config.map((item:any) => ({
71
+ let configvalue = config.map((item: any) => ({
72
72
  key: item.key,
73
73
  dataIndex: item.dataIndex,
74
74
  width: item.width,
@@ -77,20 +77,22 @@ class SortableTable extends React.Component<SortTableProps> {
77
77
  }))
78
78
 
79
79
  axios({
80
- url: '/user/appConfig/saveUserOrder',
81
- method:'POST',
80
+ // url: '/user/appConfig/saveUserOrder',
81
+ url: '/api/mallops/appConfig/saveUserOrder', //赢家地址
82
+ method: 'POST',
82
83
  data: {
83
84
  "code": tableCode,
84
85
  "detail": JSON.stringify(configvalue)
85
86
  },
86
- }).then((res:any) => {
87
- if (res?.data?.status === '0') {
87
+ }).then((res: any) => {
88
+ // if (res?.data?.status === '0') {
89
+ if (res?.data?.status === '0' || res?.data?.code == '000000') {
88
90
  this.patchConfigToLocalstorage(configvalue, tableCode)
89
91
  } else {
90
92
  message.error('保存表头列自定义失败,请稍后尝试');
91
93
  }
92
94
  })
93
- }
95
+ };
94
96
 
95
97
  patchConfigToLocalstorage = (configvalue:any, tableCode:string) => {
96
98
  let config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]'
@@ -1,3 +1,7 @@
1
+ import axios from 'axios';
2
+ import { stringify } from 'querystring';
3
+ import { message } from 'antd';
4
+
1
5
  // 下拉框数据源
2
6
  // 情况①:每条记录下拉框数据不同----查询接口每条记录返回字段,前后端约定好,用dataSourceCode记录
3
7
  // 情况②:所有查询记录共有一个数据源---选择器加载查询记录渲染给到dataSource
@@ -12,3 +16,64 @@ export const getSelectDataList = (record: any,item: any, selectKey: string) => {
12
16
  }
13
17
  return result;
14
18
  }
19
+
20
+ export const loadSelectSource = (url: string, params?: any) => {
21
+ return new Promise((resolve, reject) => {
22
+ axios
23
+ .get(`${url}?${stringify(params)}`)
24
+ .then((result: any) => {
25
+ result = result.data;
26
+ if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
27
+ message.error(result.msg);
28
+ resolve(result);
29
+ return;
30
+ }
31
+ resolve(result);
32
+ })
33
+ .catch((err) => {
34
+ reject(err);
35
+ });
36
+ })
37
+ };
38
+
39
+ export const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
40
+ const data = reData && reData[position]?.data;
41
+ const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
42
+ const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
43
+ changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
44
+ }
45
+ // 格式化树选择器数据源
46
+ export const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
47
+ const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
48
+ return {
49
+ title: treeDataItem[resKeyValue[1]],
50
+ value: treeDataItem[resKeyValue[0]],
51
+ parentId: treeDataItem.parent,
52
+ data: { ...treeDataItem },
53
+ isLeaf: !haveChildren,
54
+ disabled: haveChildren,
55
+ children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
56
+ };
57
+ };
58
+ export const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
59
+ const data = reData && reData[position]?.data;
60
+ const formatData = (data &&
61
+ Array.isArray(data) &&
62
+ data.length &&
63
+ data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
64
+ []
65
+ changeSearchForm[changePosition].field.props.treeData = formatData;
66
+ }
67
+
68
+ export const formatFormSourceList = (x: any,loadList: any, tableSearchForm: any)=> {
69
+ loadList.forEach((i: any,index: any) => {
70
+ if(i.resType == 'list') {
71
+ const resKeyValue = i.resKeyValue || ['code', 'name']
72
+ formatSource(x,index, i.resPosition, tableSearchForm,resKeyValue)
73
+ }
74
+ if(i.resType == 'treeList') {
75
+ const resKeyValue = i.resKeyValue || ['id', 'name']
76
+ formatTreeDataSource(x,index, i.resPosition, tableSearchForm,resKeyValue)
77
+ }
78
+ })
79
+ }
@@ -15,25 +15,7 @@ import { setInitialShowColumn } from '@/plugin/TableColumnSetting/utils';
15
15
  import { handleAntdColumnsSpecialParams, uuid } from '@/utils/utils';
16
16
  import { getItemDefaultWidth, noEmptyArray } from '@/components/Business/columnSettingTable/utils';
17
17
  import { getEmployeeId } from '@/utils/LocalstorageUtils';
18
- import { getSelectDataList } from './helps';
19
-
20
- const loadSelectSource = (url: string, params?: any) => {
21
- return new Promise((resolve, reject) => {
22
- axios
23
- .get(`${url}?${stringify(params)}`)
24
- .then((result: any) => {
25
- result = result.data;
26
- if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
27
- message.error(result.msg);
28
- return;
29
- }
30
- resolve(result);
31
- })
32
- .catch((err) => {
33
- reject(err);
34
- });
35
- })
36
- };
18
+ import { getSelectDataList, loadSelectSource, formatFormSourceList } from './helps';
37
19
 
38
20
  const checkSpuMatchCode = (data: any) => {
39
21
  return new Promise((resolve, reject) => {
@@ -71,36 +53,6 @@ const ResizeableTitle = (props) => {
71
53
  );
72
54
  };
73
55
 
74
- const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
75
- const data = reData && reData[position]?.data;
76
- const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
77
- const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
78
- changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
79
- }
80
-
81
- // 格式化树选择器数据源
82
- const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
83
- const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
84
- return {
85
- title: treeDataItem[resKeyValue[1]],
86
- value: treeDataItem[resKeyValue[0]],
87
- parentId: treeDataItem.parent,
88
- data: { ...treeDataItem },
89
- isLeaf: !haveChildren,
90
- disabled: haveChildren,
91
- children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
92
- };
93
- };
94
- const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
95
- const data = reData && reData[position]?.data;
96
- const formatData = (data &&
97
- Array.isArray(data) &&
98
- data.length &&
99
- data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
100
- []
101
- changeSearchForm[changePosition].field.props.treeData = formatData;
102
- }
103
-
104
56
  const initTableCode = {
105
57
  'sku': ['skuSelect-tableOptionsToChoosePartCode','skuSelect-tableSelectedItemPartCode'],
106
58
  'skc': ['skcSelect-tableOptionsToChoosePartCode','skcSelect-tableSelectedItemPartCode'],
@@ -128,7 +80,7 @@ const AddSelect = (props: any) => {
128
80
  tableCodeList = [], // 非必填 默认取组件定义code,如需自定义----数组第一位为供选择商品的table的code,第二位为已选择商品的table的code
129
81
  businessType = 'sku',
130
82
  isAllowRepeatedSelect = false,
131
- noUseItemEancode = true
83
+
132
84
  } = props;
133
85
  const { url, otherParams, isMap, fixedparameter, fieldValToParam, mappingTextField = 'name', mappingTextShowKeyField, mappingValueField = 'code', mappingTextShowTextField } = requestConfig || {};
134
86
  const resultSourceKey = sourceName || requestConfig?.sourceName || 'supplierCode'
@@ -436,7 +388,7 @@ const AddSelect = (props: any) => {
436
388
  fixed: 'right',
437
389
  render: (text, record, index) => {
438
390
  return (
439
- <span style={{cursor: 'pointer', color: '#005CFF' }} onClick={() => {
391
+ <span style={{cursor: 'pointer', color: '#02B56E' }} onClick={() => {
440
392
  deleteRecord(record)
441
393
  }} type={"text"}>删除</span>
442
394
  )
@@ -666,78 +618,14 @@ const AddSelect = (props: any) => {
666
618
  }
667
619
 
668
620
  useEffect(() => {
669
- if(businessType == 'sku') {
670
- Promise.all([
671
- loadSelectSource(`/items/brand/queryBrandList`, {
672
- pageSize: 5000,
673
- currentPage: 1,
674
- 'ctl-withAuth': true
675
- }),
676
- loadSelectSource(`/items/category/queryCategoryTree`, {
677
- pageSize: 5000,
678
- currentPage: 1,
679
- }),
680
- ]).then((x: any)=>{
681
- const searchPosition1 = noUseItemEancode ? 3 : 2;
682
- const searchPosition2 = noUseItemEancode ? 4 : 3;
683
- formatSource(x,0, searchPosition1, tableSearchForm,['id','name'])
684
- formatTreeDataSource(x,1, searchPosition2, tableSearchForm)
685
- })
686
- }
687
- if(businessType == 'skc') {
688
- Promise.all([
689
- loadSelectSource(`/items/item/propertyValue/sizeBySkcConfig`, {
690
- pageSize: 10000,
691
- currentPage: 1,
692
- type: 2, // 类型:1尺码;2颜色
693
- }),
694
- loadSelectSource(`/items/category/queryCategoryTree`, {
695
- pageSize: 5000,
696
- currentPage: 1,
697
- }),
698
- loadSelectSource(`/items/class/withProperty`, {
699
- pageSize: 5000,
700
- currentPage: 1,
701
- }),
702
- loadSelectSource(`/items/brand/queryBrandList`, {
703
- pageSize: 5000,
704
- currentPage: 1,
705
- 'ctl-withAuth': true
706
- }),
707
- ]).then((x: any)=>{
708
- formatSource(x,0, 3, tableSearchForm,['value','value'])
709
- formatTreeDataSource(x,1, 4, tableSearchForm)
710
- formatSource(x,2, 5, tableSearchForm,['id','name'])
711
- formatSource(x,3, 6, tableSearchForm,['id','name'])
712
- })
713
- }
714
- if(businessType == 'spu') {
715
- Promise.all([
716
- loadSelectSource(`/user/orgViewNode/listNoPage`, {
717
- 'qp-employeeId-eq': getEmployeeId(),
718
- 'qp-orgViewCode-eq': 'business-organizational-view',
719
- 'ctl-withDefaultOrg': true,
720
- }),
721
- loadSelectSource(`/items/brand/queryBrandList`, {
722
- pageSize: 5000,
723
- currentPage: 1,
724
- 'ctl-withAuth': true
725
- }),
726
- loadSelectSource(`/items/category/queryCategoryTree`, {
727
- pageSize: 5000,
728
- currentPage: 1,
729
- }),
730
- loadSelectSource(`/items/class/withProperty`, {
731
- pageSize: 5000,
732
- currentPage: 1,
733
- }),
734
- ]).then((x: any)=>{
735
- formatSource(x,0, 2, tableSearchForm,['targetId','name'])
736
- formatSource(x,1, 3, tableSearchForm,['id','name'])
737
- formatTreeDataSource(x,2, 4, tableSearchForm)
738
- formatSource(x,3, 5, tableSearchForm,['id','name'])
739
- })
740
- }
621
+ const pList = modalTableProps?.promiseLoadList || []
622
+ if(!pList?.length) return;
623
+ const list = pList.map((i: any) => {
624
+ return loadSelectSource(i.url, i.params)
625
+ });
626
+ Promise.all(list).then((x: any)=>{
627
+ formatFormSourceList(x,pList,tableSearchForm)
628
+ })
741
629
  }, [businessType])
742
630
 
743
631
  useEffect(() => {
@@ -955,7 +843,7 @@ const AddSelect = (props: any) => {
955
843
  }
956
844
  }
957
845
 
958
- const themeColor = { color: '#005CFF' }
846
+ const themeColor = { color: '#02B56E' }
959
847
 
960
848
  const formItem = (list) => {
961
849
  if (isModalVisible && list?.length) {
@@ -1051,8 +939,8 @@ const AddSelect = (props: any) => {
1051
939
  setPopValue(popvalue.filter(item => item.uuid !== record.uuid))
1052
940
  setSelectedRowKeys([])
1053
941
  } else {
1054
- setPopValue(popvalue.filter(item => item.skuCode !== record.skuCode))
1055
- setSelectedRowKeys([...selectedRowKeys.filter(item => item !== record.skuCode)])
942
+ setPopValue(popvalue.filter(item => item[selectRowKey] !== record[selectRowKey]))
943
+ setSelectedRowKeys([...selectedRowKeys.filter(item => item !== record[selectRowKey])])
1056
944
  }
1057
945
  }
1058
946
 
@@ -1147,7 +1035,7 @@ const AddSelect = (props: any) => {
1147
1035
  </Button>,
1148
1036
  <Button
1149
1037
  key="save-and-continue"
1150
- style={{color: '#005CFF', borderColor: '#005CFF'}}
1038
+ style={{color: '#02B56E', borderColor: '#02B56E'}}
1151
1039
  onClick={() => {handleOk(true)}}
1152
1040
  loading={confirmContinueLoading}
1153
1041
  disabled={!tableData.length || (selectProps?.disabled || props?.disabled)}
@@ -67,7 +67,7 @@ const InputElement = ({
67
67
  if (searchData.length && hoverVisibled) {
68
68
  let dom = tableRef?.current?.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[0]
69
69
  if (dom) {
70
- dom.style.background = '#005CFF30'
70
+ dom.style.background = '#02B56E30'
71
71
  }
72
72
  }
73
73
  }, [hoverVisibled, tableRef?.current])
@@ -105,7 +105,7 @@ const InputElement = ({
105
105
  if (dom) {
106
106
  tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex].style.background = ''
107
107
  setSelectIndex(currentIndex + 1)
108
- dom.style.background = '#005CFF30'
108
+ dom.style.background = '#02B56E30'
109
109
  dom.scrollIntoViewIfNeeded(false)
110
110
  }
111
111
  } else if (e.keyCode === 38) {
@@ -113,7 +113,7 @@ const InputElement = ({
113
113
  if (dom) {
114
114
  tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex].style.background = ''
115
115
  setSelectIndex(currentIndex - 1)
116
- dom.style.background = '#005CFF30'
116
+ dom.style.background = '#02B56E30'
117
117
  dom.scrollIntoViewIfNeeded(false)
118
118
  }
119
119
  }
@@ -126,7 +126,7 @@ const InputElement = ({
126
126
  // body: {
127
127
  // cell: ({index, record, ...props}) => {
128
128
  // debugger
129
- // return <td {...props} style={selectIndex === record?.index ? {background: '#005CFF30'} : {} } />
129
+ // return <td {...props} style={selectIndex === record?.index ? {background: '#02B56E30'} : {} } />
130
130
  // }
131
131
  // }
132
132
  // }
@@ -139,7 +139,7 @@ const InputElement = ({
139
139
  [...(tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr'))].map(item => {
140
140
  item.style.background = ''
141
141
  })
142
- dom.style.background = '#005CFF30'
142
+ dom.style.background = '#02B56E30'
143
143
  dom.scrollIntoViewIfNeeded(false)
144
144
  }
145
145
  setSelectIndex(index)
@@ -580,7 +580,7 @@ const BillEntry: React.FC = ({ onSaveCallback, validDataUrl="/items/sku/import/c
580
580
  render: (text, record, index) => {
581
581
  if (index !== 0) {
582
582
  return (
583
- <span style={{ cursor: 'pointer', color: '#005CFF' }} onClick={() => {
583
+ <span style={{ cursor: 'pointer', color: '#02B56E' }} onClick={() => {
584
584
  deleteRecord(record)
585
585
  }}>删除</span>
586
586
  )
@@ -646,7 +646,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
646
646
  }
647
647
  }
648
648
 
649
- const themeColor = { color: '#1890ff' }
649
+ const themeColor = { color: '#02B56E' }
650
650
 
651
651
  const formItem = (list) => {
652
652
  if (isModalVisible && list?.length) {
@@ -56,7 +56,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
56
56
  patchUserColumnConfig = (config: any) => {
57
57
  const { tableCode }: any = this.props;
58
58
  if (!tableCode) return;
59
- let configvalue = config.map((item:any) => ({
59
+ let configvalue = config.map((item: any) => ({
60
60
  key: item.key,
61
61
  dataIndex: item.dataIndex,
62
62
  width: item.width,
@@ -65,20 +65,22 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
65
65
  }))
66
66
 
67
67
  axios({
68
- url: '/user/appConfig/saveUserOrder',
69
- method:'POST',
68
+ // url: '/user/appConfig/saveUserOrder',
69
+ url: '/api/mallops/appConfig/saveUserOrder', //赢家地址
70
+ method: 'POST',
70
71
  data: {
71
72
  "code": tableCode,
72
73
  "detail": JSON.stringify(configvalue)
73
74
  },
74
- }).then((res:any) => {
75
- if (res?.data?.status === '0') {
75
+ }).then((res: any) => {
76
+ // if (res?.data?.status === '0') {
77
+ if (res?.data?.status === '0' || res?.data?.code == '000000') {
76
78
  setConfigTableColumns(configvalue, tableCode)
77
79
  } else {
78
80
  message.error('保存表头列自定义失败,请稍后尝试');
79
81
  }
80
82
  })
81
- }
83
+ };
82
84
 
83
85
  setInitValue = (datasource: any[]) => {
84
86
  const { showColumns=[], tableCode } = this.props;