@bit-sun/business-component 2.4.24 → 2.4.26-beta01

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 (159) hide show
  1. package/dist/components/Business/BsLayouts/service.d.ts +1 -1
  2. package/dist/components/Business/BsSulaQueryTable/index.d.ts +0 -1
  3. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +1 -1
  4. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +0 -1
  5. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +0 -1
  6. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +1 -1
  7. package/dist/components/Functional/QueryMutipleInput/index.d.ts +1 -2
  8. package/dist/components/Solution/RuleComponent/services.d.ts +1 -1
  9. package/dist/index.esm.js +1185 -1739
  10. package/dist/index.js +1179 -1735
  11. package/dist/utils/TableUtils.d.ts +2 -93
  12. package/dist/utils/index.d.ts +4 -6
  13. package/dist/utils/utils.d.ts +0 -13
  14. package/package.json +4 -7
  15. package/src/assets/32.svg +27 -27
  16. package/src/assets/addIcon.svg +17 -17
  17. package/src/assets/allfunc.svg +27 -27
  18. package/src/assets/arrowRight.svg +24 -24
  19. package/src/assets/btn-delete.svg +29 -29
  20. package/src/assets/btn-edit.svg +19 -19
  21. package/src/assets/btn-more.svg +17 -17
  22. package/src/assets/btn-submit.svg +19 -19
  23. package/src/assets/close.svg +26 -26
  24. package/src/assets/drag.svg +17 -17
  25. package/src/assets/fixed-left.svg +15 -15
  26. package/src/assets/fixed-right.svg +15 -15
  27. package/src/assets/guanbi.svg +15 -15
  28. package/src/assets/icon-quanping.svg +15 -15
  29. package/src/assets/icon-shezhi.svg +17 -17
  30. package/src/assets/label_icon_bottom.svg +25 -25
  31. package/src/assets/list-no-img.svg +21 -21
  32. package/src/assets/morentouxiang-32.svg +23 -23
  33. package/src/assets/scanning.svg +24 -24
  34. package/src/assets/upExport.svg +22 -22
  35. package/src/common/ENUM.ts +41 -41
  36. package/src/components/Business/AddSelectBusiness/index.tsx +22 -40
  37. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  38. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  39. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  40. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  41. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  42. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  43. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  44. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  45. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  46. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -163
  47. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  48. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +2 -19
  49. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  50. package/src/components/Business/BsLayouts/index.less +79 -79
  51. package/src/components/Business/BsLayouts/index.tsx +1484 -1494
  52. package/src/components/Business/BsLayouts/service.ts +2 -2
  53. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  54. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +9 -9
  55. package/src/components/Business/BsSulaQueryTable/index.less +221 -221
  56. package/src/components/Business/BsSulaQueryTable/index.tsx +175 -346
  57. package/src/components/Business/BsSulaQueryTable/setting.tsx +87 -125
  58. package/src/components/Business/BsSulaQueryTable/utils.tsx +34 -57
  59. package/src/components/Business/CommodityEntry/index.md +70 -70
  60. package/src/components/Business/CommodityEntry/index.tsx +81 -80
  61. package/src/components/Business/CommonGuideWrapper/index.less +112 -121
  62. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  63. package/src/components/Business/CommonGuideWrapper/index.tsx +84 -94
  64. package/src/components/Business/DetailPageWrapper/index.less +1 -9
  65. package/src/components/Business/DetailPageWrapper/index.tsx +110 -121
  66. package/src/components/Business/HomePageWrapper/index.md +45 -45
  67. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  68. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  69. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  70. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  71. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  72. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  73. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  74. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  75. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  76. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  77. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  78. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  79. package/src/components/Business/JsonQueryTable/index.less +16 -16
  80. package/src/components/Business/JsonQueryTable/index.md +328 -328
  81. package/src/components/Business/JsonQueryTable/index.tsx +537 -535
  82. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  83. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  84. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  85. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  86. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  87. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  88. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  89. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  90. package/src/components/Business/SearchSelect/utils.ts +3 -3
  91. package/src/components/Business/StateFlow/index.md +60 -60
  92. package/src/components/Business/StateFlow/index.tsx +29 -29
  93. package/src/components/Business/columnSettingTable/columnSetting.tsx +8 -10
  94. package/src/components/Business/columnSettingTable/index.less +247 -247
  95. package/src/components/Business/columnSettingTable/index.md +357 -357
  96. package/src/components/Business/columnSettingTable/utils.tsx +71 -71
  97. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +87 -87
  98. package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
  99. package/src/components/Business/moreTreeTable/index.less +99 -99
  100. package/src/components/Business/moreTreeTable/index.tsx +387 -387
  101. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  102. package/src/components/Functional/AddSelect/helps.ts +3 -4
  103. package/src/components/Functional/AddSelect/index.less +367 -367
  104. package/src/components/Functional/AddSelect/index.tsx +33 -79
  105. package/src/components/Functional/BillEntry/index.less +371 -371
  106. package/src/components/Functional/BillEntry/index.tsx +3 -3
  107. package/src/components/Functional/BsAntdSula/index.ts +2 -2
  108. package/src/components/Functional/DataImport/index.less +63 -63
  109. package/src/components/Functional/DataImport/index.tsx +3 -3
  110. package/src/components/Functional/DataValidation/index.less +63 -63
  111. package/src/components/Functional/DataValidation/index.tsx +3 -3
  112. package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -5
  113. package/src/components/Functional/EllipsisTooltip/index.js +36 -36
  114. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +5 -10
  115. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  116. package/src/components/Functional/QueryMutipleInput/index.tsx +1 -2
  117. package/src/components/Functional/SearchSelect/index.less +0 -6
  118. package/src/components/Functional/SearchSelect/index.tsx +45 -152
  119. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  120. package/src/components/Functional/TreeSearchSelect/index.tsx +22 -24
  121. package/src/components/Solution/RuleComponent/Formula.tsx +335 -335
  122. package/src/components/Solution/RuleComponent/index.d.ts +29 -29
  123. package/src/components/Solution/RuleComponent/index.js +652 -7
  124. package/src/components/Solution/RuleComponent/index.less +230 -230
  125. package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -99
  126. package/src/components/Solution/RuleComponent/services.ts +13 -13
  127. package/src/plugin/TableColumnSetting/index.less +247 -247
  128. package/src/plugin/TableColumnSetting/index.md +50 -50
  129. package/src/plugin/TableColumnSetting/index.tsx +2 -2
  130. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  131. package/src/utils/CheckOneUser/index.md +39 -39
  132. package/src/utils/CheckOneUser/index.ts +51 -51
  133. package/src/utils/LocalstorageUtils.ts +95 -95
  134. package/src/utils/TableUtils.tsx +18 -691
  135. package/src/utils/checkUtils.ts +39 -39
  136. package/src/utils/enumConfig.ts +11 -11
  137. package/src/utils/getFormMode.js +12 -12
  138. package/src/utils/index.ts +4 -6
  139. package/src/utils/requestUtils.ts +2 -29
  140. package/src/utils/serialize.js +7 -7
  141. package/src/utils/utils.ts +21 -64
  142. package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +0 -3
  143. package/dist/components/Business/BsLayouts/Components/ChooseStore/services.d.ts +0 -1
  144. package/dist/components/Business/BsLayouts/Components/RightContent/i18n.d.ts +0 -9
  145. package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +0 -2
  146. package/dist/utils/businessUtils.d.ts +0 -27
  147. package/dist/utils/constant.d.ts +0 -37
  148. package/dist/utils/request.d.ts +0 -2
  149. package/src/assets/arrow_top.svg +0 -18
  150. package/src/components/Business/BsLayouts/Components/ChooseStore/index.less +0 -0
  151. package/src/components/Business/BsLayouts/Components/ChooseStore/index.tsx +0 -193
  152. package/src/components/Business/BsLayouts/Components/ChooseStore/services.ts +0 -10
  153. package/src/components/Business/BsLayouts/Components/RightContent/i18n.ts +0 -9
  154. package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +0 -5
  155. package/src/components/Solution/RuleComponent/RenderCompItem.tsx +0 -637
  156. package/src/utils/TableUtils.less +0 -52
  157. package/src/utils/businessUtils.ts +0 -441
  158. package/src/utils/constant.ts +0 -39
  159. package/src/utils/request.ts +0 -53
@@ -1,39 +1,39 @@
1
- import { message } from 'antd';
2
- import _ from 'lodash';
3
-
4
- const checkQuantityAccuracy = (value: any, accuracy: any, errorInfo?: any) => {
5
- let errorMessage= {showTips: true, tipsMessage: null,...errorInfo}
6
- if (_.trim(value)) {
7
- const target = `${value}`;
8
- if (target.includes(".")) {
9
- if (target.split(".")[1].length > accuracy) {
10
- if(errorMessage?.showTips) {
11
- message.warning(errorMessage?.tipsMessage || `系统设置数量最大精度为${accuracy}位`)
12
- }
13
- return false;
14
- }
15
- }
16
- }
17
- return true;
18
- }
19
-
20
- const precisionQuantity = (num: any, accuracy: any) => {
21
- if (_.trim(num)) {
22
- const target = `${num}`;
23
- if (target.includes(".")) {
24
- if (target.split(".")[1].length > accuracy) {
25
- const beforeDot = target.split(".")[0];
26
- const afterDot = target.split(".")[1]?.slice(0,accuracy)
27
- const result = accuracy == 0 ? Number(`${beforeDot}`) : Number(`${beforeDot}.${afterDot}`)
28
- return result
29
- } else if (target.split(".")[1].length < accuracy) {
30
- return Number(Number(num).toFixed(Math.abs(accuracy)))
31
- } else {
32
- return Number(num)
33
- }
34
- }
35
- }
36
- return ''
37
- }
38
-
39
- export { checkQuantityAccuracy, precisionQuantity }
1
+ import { message } from 'antd';
2
+ import _ from 'lodash';
3
+
4
+ const checkQuantityAccuracy = (value: any, accuracy: any, errorInfo?: any) => {
5
+ let errorMessage= {showTips: true, tipsMessage: null,...errorInfo}
6
+ if (_.trim(value)) {
7
+ const target = `${value}`;
8
+ if (target.includes(".")) {
9
+ if (target.split(".")[1].length > accuracy) {
10
+ if(errorMessage?.showTips) {
11
+ message.warning(errorMessage?.tipsMessage || `系统设置数量最大精度为${accuracy}位`)
12
+ }
13
+ return false;
14
+ }
15
+ }
16
+ }
17
+ return true;
18
+ }
19
+
20
+ const precisionQuantity = (num: any, accuracy: any) => {
21
+ if (_.trim(num)) {
22
+ const target = `${num}`;
23
+ if (target.includes(".")) {
24
+ if (target.split(".")[1].length > accuracy) {
25
+ const beforeDot = target.split(".")[0];
26
+ const afterDot = target.split(".")[1]?.slice(0,accuracy)
27
+ const result = accuracy == 0 ? Number(`${beforeDot}`) : Number(`${beforeDot}.${afterDot}`)
28
+ return result
29
+ } else if (target.split(".")[1].length < accuracy) {
30
+ return Number(Number(num).toFixed(Math.abs(accuracy)))
31
+ } else {
32
+ return Number(num)
33
+ }
34
+ }
35
+ }
36
+ return ''
37
+ }
38
+
39
+ export { checkQuantityAccuracy, precisionQuantity }
@@ -1,12 +1,12 @@
1
- export default {
2
- // 浏览器缓存信息
3
- BROWSER_CACHE: {
4
- COLUMN_CONDITION: 'columnCondition', //表格列信息缓存
5
- MAIN_AUTH_CODES: 'menuAuth_mainProject', //按钮资源权限集合
6
- LIMIT_MENU_DATA: 'limitedMenuData', //权限过滤后的菜单数据
7
- USER_INFO: 'userInfo', //用户信息
8
- DICT_CODES: 'dicData', //数据字典数据
9
- CHILD_APP_BACK: 'child_app_back', //标记子应用goback事件
10
- SEARCH_FIELDS_CONDITION: 'searchFieldsCondition', //表格搜索项信息缓存
11
- }
1
+ export default {
2
+ // 浏览器缓存信息
3
+ BROWSER_CACHE: {
4
+ COLUMN_CONDITION: 'columnCondition', //表格列信息缓存
5
+ MAIN_AUTH_CODES: 'menuAuth_mainProject', //按钮资源权限集合
6
+ LIMIT_MENU_DATA: 'limitedMenuData', //权限过滤后的菜单数据
7
+ USER_INFO: 'userInfo', //用户信息
8
+ DICT_CODES: 'dicData', //数据字典数据
9
+ CHILD_APP_BACK: 'child_app_back', //标记子应用goback事件
10
+ SEARCH_FIELDS_CONDITION: 'searchFieldsCondition', //表格搜索项信息缓存
11
+ }
12
12
  }
@@ -1,12 +1,12 @@
1
- const getFormMode = props => {
2
- let mode = 'create';
3
- const { path } = props.match;
4
- if (path.includes('edit')) {
5
- mode = 'edit';
6
- } else if (path.includes('view') || path.includes('detail')) {
7
- mode = 'view';
8
- }
9
- return mode;
10
- };
11
-
12
- export default getFormMode;
1
+ const getFormMode = props => {
2
+ let mode = 'create';
3
+ const { path } = props.match;
4
+ if (path.includes('edit')) {
5
+ mode = 'edit';
6
+ } else if (path.includes('view') || path.includes('detail')) {
7
+ mode = 'view';
8
+ }
9
+ return mode;
10
+ };
11
+
12
+ export default getFormMode;
@@ -1,6 +1,4 @@
1
- export * from './requestUtils';
2
- export * from './checkUtils';
3
- export * from './LocalstorageUtils';
4
- export * from './TableUtils';
5
- export * from './businessUtils';
6
- export * from './utils';
1
+ import './requestUtils';
2
+ import './checkUtils';
3
+ import './LocalstorageUtils';
4
+ import './utils';
@@ -1,5 +1,4 @@
1
1
  import axios from 'axios';
2
- import request from "umi-request";
3
2
  import ENUM from './enumConfig';
4
3
  import { getCurrentTenantId, getEmployeeId, getSessionId, getAccountId } from './LocalstorageUtils';
5
4
  import { getEekaSessionId, getEekaAccountId, getEekaEmployeeId, getEekaTenantId, getEekaToken,
@@ -79,7 +78,7 @@ const handleCommonHeader = () => {
79
78
  * 处理请求头方法-包含一般请求头、权限请求头。组件默认统一处理一遍,若组件使用处需要可以单独在组件处传参进来处理
80
79
  * @param {*} config 请求参数配置
81
80
  * */
82
- const handleAxioRequestHeader = (config: any) => {
81
+ const handleRequestHeader = (config: any) => {
83
82
 
84
83
  let commonHeaders = handleCommonHeader();
85
84
 
@@ -98,37 +97,11 @@ const handleAxioRequestHeader = (config: any) => {
98
97
 
99
98
  // 拦截器
100
99
  axios.interceptors.request.use((config: any) => {
101
- handleAxioRequestHeader(config)
100
+ handleRequestHeader(config)
102
101
  return config
103
102
  })
104
103
 
105
104
 
106
- const handleRequestHeader = (url: any, options: any) => {
107
-
108
- let commonHeaders = handleCommonHeader();
109
-
110
- let config = { url, headers: { ...options?.headers } }
111
-
112
- if (localStorage.getItem('x-user-auth-context')) {
113
- // @ts-ignore
114
- commonHeaders['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
115
- }
116
- !!!config.headers['x-biz-code'] && handleRequestAuthHeader(config)
117
-
118
- config.headers = {
119
- ...commonHeaders,
120
- ...config.headers
121
- }
122
-
123
- options.headers = config.headers
124
- }
125
- request.interceptors.request.use((url, options) => {
126
- handleRequestHeader(url, options)
127
- return {
128
- url,
129
- options,
130
- };
131
- });
132
105
 
133
106
 
134
107
  /**
@@ -1,7 +1,7 @@
1
- import serialize from 'serialize-javascript';
2
-
3
- export default serialize;
4
-
5
- export const deserialize = data => {
6
- return eval('(' + data + ')');
7
- };
1
+ import serialize from 'serialize-javascript';
2
+
3
+ export default serialize;
4
+
5
+ export const deserialize = data => {
6
+ return eval('(' + data + ')');
7
+ };
@@ -4,7 +4,6 @@ import { formatMessage, history } from 'umi';
4
4
  import isEqual from 'lodash/isEqual';
5
5
  import ENUM from './enumConfig';
6
6
  import {
7
- authFn,
8
7
  handleTextDouble,
9
8
  handleTextLineFeed,
10
9
  handleTextOverflow,
@@ -78,28 +77,34 @@ export const handleBssulaColumnsSpecialParams = (col: any) => {
78
77
  if (col.timeRenderHour) {
79
78
  col.render = ({ text }: any) =>
80
79
  handleTooltipHours(text, col.timeRenderHour);
81
- } else if (col.timeRender) {
82
- // 处理不显示 时分秒的时间
80
+ }
81
+ // 处理不显示 时分秒的时间
82
+ if (col.timeRender) {
83
83
  col.render = ({ text }: any) => handleTooltip(text, col.timeRender);
84
- } else if (col.textOverflow) {
85
- // 处理文字太长
86
- col.render = ({ text }: any) => handleTextOverflow(text, col.width);
87
- } else if (col.images) {
84
+ }
85
+ // 处理文字太长
86
+ if (col.textOverflow) {
87
+ col.render = ({ text }: any) => handleTextOverflow(text,col.width);
88
+ }
89
+ if (col.images) {
88
90
  col.render = ({ text }: any) => tableColumnsImage(text);
89
- } else if (col.double) {
91
+ }
92
+ if (col.double) {
90
93
  col.render = ({ record }: any) =>
91
94
  handleTextDouble(record[col.textOne], record[col.textTwo]);
92
- } else if (col.lineFeed) {
95
+ }
96
+ if (col.lineFeed) {
93
97
  col.render = ({ text }: any) => handleTextLineFeed(text);
94
- } else if (col.indexNumber) {
95
- // 处理序号
98
+ }
99
+
100
+ // 处理序号
101
+ if (col.indexNumber) {
96
102
  col.render = ({ index }: any) => index + 1;
97
- } else if (col.isPermissionColumn && Array.isArray(col?.render)) {
98
- col.render = col.render.filter((item) => authFn(item.code));
99
- } else if (!col.render) {
100
- // 没有值默认显示 - -
103
+ }
104
+ // 没有值默认显示 - -
105
+ if (!col.render) {
101
106
  // col.render = ({ text }: any) => text || '- -';
102
- col.render = ({ text }: any) => text ?? '--';
107
+ col.render = ({ text }: any) => text || '--';
103
108
  }
104
109
  };
105
110
  /**
@@ -188,51 +193,3 @@ export const judgeIsEmpty = (value: any) => {
188
193
  }
189
194
  return false;
190
195
  };
191
-
192
- // /**
193
- // * 处理错误请求
194
- // * @param {*} response 返回结果
195
- // * @param {*} needBackError 是否需要将错误回传到页面单独处理
196
- // */
197
- // export function handleError(response: object, needBackError?: boolean) {
198
- // // @ts-ignore
199
- // if (
200
- // !response ||
201
- // (response.code ? response.code !== '000000' : response.status !== '0')
202
- // ) {
203
- // if (response && !needBackError) {
204
- // // @ts-ignore
205
- // response.msg && message.error(response.msg);
206
- // }
207
- // return false;
208
- // }
209
-
210
- // return true;
211
- // }
212
-
213
- /**
214
- * 判断一个对象是否为非空对象
215
- * @param obj 要判断的对象
216
- * @returns boolean
217
- */
218
- export const noEmptyArr = (obj: any) => Array.isArray(obj) && obj.length > 0;
219
-
220
-
221
- /**
222
- * 生成任意长度随机字符串
223
- * @param len 长度
224
- * @returns 字符串
225
- */
226
- export const randomString = (len?: any) => {
227
- len = len || 32;
228
- const $chars =
229
- 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz'; /** **默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1*** */
230
- const maxPos = $chars.length;
231
- let pwd = '';
232
- for (let i = 0; i < len; i++) {
233
- pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
234
- }
235
- return pwd;
236
- };
237
-
238
- export const createUniqID = length => Number(Math.random().toString().substr(3, length) + Date.now()).toString(36);
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const ChooseStore: (props: any) => React.JSX.Element;
3
- export default ChooseStore;
@@ -1 +0,0 @@
1
- export declare function getStoreByName(params: any): Promise<any>;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- 'zh-CN': {
3
- lang: string;
4
- };
5
- 'en-US': {
6
- lang: string;
7
- };
8
- };
9
- export default _default;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export default function RenderCompItem(props: any): React.JSX.Element | undefined;
@@ -1,27 +0,0 @@
1
- import { downloadExcel } from '@/utils/utils';
2
- declare const handleBaseUrlPre: (baseName: string) => string | null;
3
- /**
4
- * 统一参数处理逻辑
5
- * 增量补充
6
- * @param newParams
7
- */
8
- declare const paramsControl: (params: any) => any;
9
- declare const handleOssUrl: (fileList: any[]) => {};
10
- declare const getDictionaryTextByValue: (dicCode: string, value: string) => any;
11
- declare const getJoinDictionaryText: (dicCode: string, value: string) => any;
12
- declare const authFunc: (code: string) => any;
13
- declare const handleBeforeUpload: (file: any, size: any, suffixRule: any) => Promise<unknown>;
14
- declare const handleExport: (type: number, params: any, url: any, methods?: any, fileName?: any, promiseResult?: any) => void;
15
- declare const handleExportBarCode: (type: number, params: any, url: any, methods?: any, fileName?: any, promiseResult?: any) => void;
16
- declare const getBreadcrumbNameMap: (menuData: any) => any;
17
- declare const ergodicMenuRoutes: (routes: any) => any;
18
- declare const socketFunctions: {
19
- /**
20
- * 请求打印机列表demo
21
- * */
22
- getPrinterList: (socket: any) => void;
23
- getRequestObject: (cmd: any) => any;
24
- getUUID: (len: any, radix: any) => string;
25
- doSalesPrint: (socket: WebSocket, data: number[], printer: string, preview?: boolean) => void;
26
- };
27
- export { socketFunctions, ergodicMenuRoutes, paramsControl, handleOssUrl, downloadExcel, getDictionaryTextByValue, getJoinDictionaryText, authFunc, handleBeforeUpload, handleExport, handleBaseUrlPre, handleExportBarCode, getBreadcrumbNameMap, };
@@ -1,37 +0,0 @@
1
- export declare const FORMAT_TIME_STR = "YYYY-MM-DD HH:mm:ss";
2
- export declare const FORMAT_DAY_STR = "YYYY-MM-DD";
3
- export declare const FUNCTION_UNDEFINED = "undefined";
4
- export declare const FUNCTION_GET = "GET";
5
- export declare const REQUEST_SUCCESS_CODE = "000000";
6
- export declare const FORMAT_ARRAY_START = "YYYY-MM-DD 00:00:00";
7
- export declare const FORMAT_ARRAY_END = "YYYY-MM-DD 23:59:59";
8
- export declare const APPLICATION_SHEET = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
9
- export declare const MENU_AUTH_KEY = "menuAuth_mainProject";
10
- export declare const DIC_DATA_KEY = "dicData";
11
- export declare const NUMBER_VALUE: Readonly<{
12
- ZERO: 0;
13
- ONE: 1;
14
- TWO: 2;
15
- THREE: 3;
16
- FOUR: 4;
17
- FIVE: 5;
18
- SIX: 6;
19
- SEVEN: 7;
20
- EIGHT: 8;
21
- NINE: 9;
22
- TEN: 10;
23
- ELEVEN: 11;
24
- TWELVE: 12;
25
- THIRTEEN: 13;
26
- FOURTEEN: 14;
27
- FIFTEEN: 15;
28
- SIXTEEN: 16;
29
- SEVENTEEN: 17;
30
- EIGHTEEN: 18;
31
- NINETEEN: 19;
32
- TWENTY: 20;
33
- TWENTY_ONE: 21;
34
- TWENTY_TWO: 22;
35
- TWENTY_THREE: 23;
36
- TWENTY_FOUR: 24;
37
- }>;
@@ -1,2 +0,0 @@
1
- declare const requestUtil: any;
2
- export default requestUtil;
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>arrow_icon_up</title>
4
- <g id="零售【单据详情】改造" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
- <g transform="translate(-462.000000, -1828.000000)" id="编组-5">
6
- <g transform="translate(372.000000, 1534.000000)">
7
- <g id="编组-2" transform="translate(10.000000, 286.000000)">
8
- <g id="编组-17" transform="translate(80.000000, 8.000000)">
9
- <rect id="arrow_icon_up" fill="#D8D8D8" opacity="0" x="0" y="0" width="20" height="20"></rect>
10
- <g id="编组" transform="translate(2.500000, 2.500000)" fill="#B6B6B6" fill-rule="nonzero">
11
- <path d="M7.5,0 C11.6422059,0 15,3.35779411 15,7.5 C15,11.6422059 11.6422059,15 7.5,15 C3.35779411,15 0,11.6422059 0,7.5 C0,3.35779411 3.35779411,0 7.5,0 Z M7.61029411,4.79955883 L3.58632353,8.82352941 L4.52205883,9.7592647 L7.61029411,6.67102942 L10.6985294,9.7592647 L11.6342647,8.82352941 L7.61029411,4.79955883 Z" id="形状"></path>
12
- </g>
13
- </g>
14
- </g>
15
- </g>
16
- </g>
17
- </g>
18
- </svg>
@@ -1,193 +0,0 @@
1
- import React, { useEffect, useRef, useState, useMemo } from 'react';
2
- import { Select, Form, Modal, Input, Radio, List } from 'antd';
3
- import { getStoreByName } from './services';
4
- import debounce from 'lodash/debounce';
5
-
6
- const debounceTimeout = 800;
7
-
8
- const ChooseStore = (props: any) => {
9
- const { employeeCode } = props;
10
- const plainOptions = ['UR', '本来'];
11
- const name: any = localStorage.getItem('WARE_HOUSE_NAME');
12
- const code: any = localStorage.getItem('WARE_HOUSE_CODE');
13
-
14
- const fetchRef = useRef(0);
15
-
16
-
17
- const [index, setIndex] = useState(-1);
18
- const [value, setValue] = useState([{ label: name, value: code }]);
19
- // const [ key, setKey ] = useState(undefined);
20
- const [key, setKey] = useState<'UR' | 'BL' | undefined>(undefined);
21
- const [openSelect, setOpenSelect] = useState(false);
22
- const [options, setOptions] = useState<any[]>([]);
23
- const [rescouse, setRescouse] = useState([]);
24
- const [searchValue, setSearchValue] = useState('');
25
- const [store, setStore] = useState([{ label: name, value: code }]);
26
-
27
- async function fetchUserList(storeName: any, init?: boolean) {
28
- return getStoreByName({
29
- orgName: storeName ? storeName : undefined,
30
- platCompanyCode: init ? undefined : key,
31
- 'qp-employeeCode-eq': employeeCode || 'EMP231011000002',
32
- 'qp-orgViewCode-eq': 'business-organizational-view',
33
- }).then((res) => {
34
- const { data } = res;
35
- if (data.code != '000000') {
36
- return;
37
- }
38
- return data.data.map((item: any) => {
39
- return {
40
- label: item.orgName,
41
- value: item.orgCode,
42
- defaultOrg: item.defaultOrg,
43
- platCompanyCode: item.platCompanyCode,
44
- };
45
- });
46
- });
47
- }
48
-
49
- const debounceFetcher = useMemo(() => {
50
- const loadOptions = (str: string) => {
51
- fetchRef.current += 1;
52
- const fetchId = fetchRef.current;
53
- setOptions([]);
54
- setRescouse([]);
55
- fetchUserList(str).then((newOptions) => {
56
- if (fetchId !== fetchRef.current) {
57
- return;
58
- }
59
- setOptions(newOptions);
60
- setRescouse(newOptions);
61
- });
62
- };
63
-
64
- return debounce(loadOptions, debounceTimeout);
65
- }, [debounceTimeout, key]);
66
-
67
- const changeInput = async (str: string) => {
68
- const res: any = await debounceFetcher(str);
69
- setOptions(res);
70
- setRescouse(res);
71
- };
72
-
73
- useEffect(() => {
74
- (async () => {
75
- const res: any = await fetchUserList(undefined, true);
76
- res.map((item: any, indexNumber: number) => {
77
- if (item.label === name) {
78
- setIndex(indexNumber);
79
- }
80
- if (item.defaultOrg) {
81
- if (name) {
82
- return;
83
- }
84
- localStorage.setItem('WARE_HOUSE_NAME', item?.label);
85
- localStorage.setItem('WARE_HOUSE_CODE', item?.value);
86
- setValue([item]);
87
- }
88
- });
89
- setOptions(res);
90
- setRescouse(res);
91
- })();
92
- }, []);
93
-
94
- return (
95
- <div>
96
- <Select
97
- value={value}
98
- style={{ width: 280, marginRight: 20 }}
99
- open={false}
100
- onClick={() => {
101
- setOpenSelect(true);
102
- }}
103
- />
104
-
105
- <Modal
106
- open={openSelect}
107
- onCancel={() => {
108
- setOpenSelect(false);
109
- }}
110
- onOk={() => {
111
- localStorage.setItem('WARE_HOUSE_NAME', store[0]?.label);
112
- localStorage.setItem('WARE_HOUSE_CODE', store[0]?.value);
113
- window.location.reload();
114
- }}
115
- >
116
- <Form
117
- style={{ height: 300, marginTop: 20 }}
118
- labelCol={{ span: 3 }}
119
- wrapperCol={{ span: 16 }}
120
- >
121
- <Form.Item label="品牌" name="brand">
122
- <Radio.Group
123
- options={plainOptions}
124
- onChange={(item: any) => {
125
- const str = item?.target?.value;
126
- setKey(str === 'UR' ? 'UR' : 'BL');
127
- if (str === 'UR') {
128
- const res: any = rescouse?.filter((current: any) => {
129
- return current.platCompanyCode === 'UR';
130
- });
131
- setOptions(res);
132
- setSearchValue('');
133
- } else {
134
- const res: any = rescouse?.filter((current: any) => {
135
- return current.platCompanyCode === 'BL';
136
- });
137
- setOptions(res);
138
- setSearchValue('');
139
- }
140
- }}
141
- optionType="button"
142
- buttonStyle="solid"
143
- />
144
- </Form.Item>
145
- <Form.Item
146
- label="门店"
147
- name="store"
148
- rules={[{ required: true, message: '请选择门店' }]}
149
- >
150
- <Input
151
- placeholder="输入门店名称"
152
- value={searchValue}
153
- onChange={(e) => {
154
- changeInput(e.target.value);
155
- setSearchValue(e.target.value);
156
- }}
157
- />
158
- <div
159
- style={{
160
- height: 220,
161
- overflowY: 'scroll',
162
- }}
163
- >
164
- <List
165
- dataSource={options}
166
- bordered
167
- renderItem={(item, indexNumber) => (
168
- <List.Item
169
- style={
170
- indexNumber === index ? {
171
- // opacity
172
- color: '#0047bb',
173
- } : {}
174
- }
175
- onClick={(current: any) => {
176
- // setValue([item]);
177
- setStore([item]);
178
- setIndex(indexNumber);
179
- }}
180
- >
181
- {item.label}
182
- </List.Item>
183
- )}
184
- />
185
- </div>
186
- </Form.Item>
187
- </Form>
188
- </Modal>
189
- </div>
190
- );
191
- };
192
-
193
- export default ChooseStore;
@@ -1,10 +0,0 @@
1
- import request from '@/utils/request';
2
-
3
- // -- 查询店铺 --
4
- export async function getStoreByName(params: any) {
5
- return request({
6
- url: '/store-house/orgViewNode/listNoPage',
7
- method: 'GET',
8
- params: { ...params },
9
- })
10
- }
@@ -1,9 +0,0 @@
1
- export default {
2
- 'zh-CN': {
3
- lang: '中文',
4
- },
5
-
6
- 'en-US': {
7
- lang: 'English',
8
- },
9
- }
@@ -1,5 +0,0 @@
1
- #bs-sula-query-table {
2
- .ant-table-title+.ant-table-container table {
3
- visibility: unset !important;
4
- }
5
- }