ls-pro-common 3.0.96 → 3.0.98
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.
- package/dist/common.css +63 -0
- package/dist/common.js +1 -1
- package/dist/common.less +2 -1
- package/dist/common.min.css +63 -0
- package/dist/common.min.js +1 -1
- package/es/components/AreaCascader.js +5 -8
- package/es/components/AreaCascaderPanel.js +5 -9
- package/es/components/InputTable.js +87 -61
- package/es/components/ProButton/index.d.ts +10 -0
- package/es/components/ProButton/index.js +40 -0
- package/es/components/RecordLog/index.d.ts +16 -0
- package/es/components/RecordLog/index.js +114 -0
- package/es/components/RecordLog/index.less +71 -0
- package/es/hooks/useMdm.d.ts +7 -0
- package/es/hooks/useMdm.js +47 -0
- package/es/http/index.d.ts +2 -1
- package/es/http/index.js +16 -9
- package/es/http/mdmRequest.d.ts +184 -0
- package/es/http/mdmRequest.js +351 -0
- package/es/index.d.ts +6 -2
- package/es/index.js +6 -2
- package/es/utils/array.d.ts +26 -0
- package/es/utils/array.js +74 -0
- package/es/utils/format.d.ts +82 -0
- package/es/utils/format.js +148 -0
- package/es/utils/index.d.ts +19 -125
- package/es/utils/index.js +21 -478
- package/es/utils/modal.d.ts +43 -0
- package/es/utils/modal.js +225 -0
- package/es/utils/size.d.ts +9 -0
- package/es/utils/size.js +81 -0
- package/lib/components/AreaCascader.js +5 -8
- package/lib/components/AreaCascaderPanel.js +5 -9
- package/lib/components/InputTable.js +87 -61
- package/lib/components/ProButton/index.d.ts +10 -0
- package/lib/components/ProButton/index.js +40 -0
- package/lib/components/RecordLog/index.d.ts +16 -0
- package/lib/components/RecordLog/index.js +114 -0
- package/lib/components/RecordLog/index.less +71 -0
- package/lib/hooks/useMdm.d.ts +7 -0
- package/lib/hooks/useMdm.js +47 -0
- package/lib/http/index.d.ts +2 -1
- package/lib/http/index.js +16 -9
- package/lib/http/mdmRequest.d.ts +184 -0
- package/lib/http/mdmRequest.js +351 -0
- package/lib/index.d.ts +6 -2
- package/lib/index.js +6 -2
- package/lib/utils/array.d.ts +26 -0
- package/lib/utils/array.js +74 -0
- package/lib/utils/format.d.ts +82 -0
- package/lib/utils/format.js +148 -0
- package/lib/utils/index.d.ts +19 -125
- package/lib/utils/index.js +21 -478
- package/lib/utils/modal.d.ts +43 -0
- package/lib/utils/modal.js +225 -0
- package/lib/utils/size.d.ts +9 -0
- package/lib/utils/size.js +81 -0
- package/package.json +4 -2
package/es/http/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { extend } from 'umi-request';
|
|
5
|
-
import { getCache, getUrlQuery, setUrlQuery, getCookie, getResourceProps, showError, httpError, toGatewayUrl, reLogin, showLoading, exitLoading,
|
|
5
|
+
import { getCache, getUrlQuery, setUrlQuery, getCookie, getResourceProps, showError, httpError, toGatewayUrl, reLogin, showLoading, exitLoading, getBrowserId } from '../utils';
|
|
6
6
|
//默认超时时间为1分钟
|
|
7
7
|
var request = extend({
|
|
8
8
|
timeout: 60000
|
|
@@ -14,15 +14,24 @@ var httpStatus = {
|
|
|
14
14
|
503: '请求的服务器异常',
|
|
15
15
|
504: '请求服务超时'
|
|
16
16
|
};
|
|
17
|
+
var browserId = '';
|
|
18
|
+
(function () {
|
|
19
|
+
setTimeout(function () {
|
|
20
|
+
try {
|
|
21
|
+
getBrowserId().then(function (id) {
|
|
22
|
+
browserId = id;
|
|
23
|
+
});
|
|
24
|
+
} catch (_unused) {}
|
|
25
|
+
}, 0);
|
|
26
|
+
})();
|
|
17
27
|
/** 请求拦截器,统一添加token */
|
|
18
28
|
request.interceptors.request.use(function (url, options) {
|
|
19
29
|
var _options$params;
|
|
20
|
-
var token = getCookie('token');
|
|
21
30
|
options.headers = options.headers || {};
|
|
22
|
-
//
|
|
23
|
-
if (
|
|
31
|
+
// 处理浏览器指纹
|
|
32
|
+
if (browserId) {
|
|
24
33
|
// @ts-ignore
|
|
25
|
-
options.headers['
|
|
34
|
+
options.headers['browserId'] = browserId;
|
|
26
35
|
}
|
|
27
36
|
// 处理门店
|
|
28
37
|
var shopNo = getCache('shopNo', true) || getCache('shopNo');
|
|
@@ -281,17 +290,15 @@ export function httpDelete(url, data) {
|
|
|
281
290
|
* 读取数据字典
|
|
282
291
|
*
|
|
283
292
|
* @param dictCode 字典编码
|
|
293
|
+
* @param showValue 是否显示值
|
|
284
294
|
* @param needGateWay 是否需要网关 默认为true
|
|
285
|
-
* @returns Promise<Record<string,string
|
|
295
|
+
* @returns Promise<Record<string,string>[]>
|
|
286
296
|
*/
|
|
287
297
|
export function getDict(dictCode) {
|
|
288
298
|
var showValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
289
299
|
var needGateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
290
300
|
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
291
301
|
var api = '/lesoon-integration/sysDictDtl/listByProperties';
|
|
292
|
-
if (isSaasVersion()) {
|
|
293
|
-
api = '/tenant-integration-api/sysDictDtl/listByProperties';
|
|
294
|
-
}
|
|
295
302
|
var param = {
|
|
296
303
|
dictCode: dictCode
|
|
297
304
|
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param params 请求参数
|
|
3
|
+
* @name 获取主数据货主数据,调用接口/lesoon-mdm-center-api/bmOwner/findAll
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export declare const getOwner: (params?: any) => Promise<any>;
|
|
7
|
+
/**
|
|
8
|
+
* @param params 请求参数
|
|
9
|
+
* @name 获取主数据仓库数据,调用接口/lesoon-mdm-center-api/bmStore/findAll
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const getStore: (params?: any) => Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* @param params 请求参数
|
|
15
|
+
* @name 获取主数据品牌部数据,调用接口/lesoon-mdm-center-api/bmBrandDept/findAll
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare const getBrandDept: (params?: any) => Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* @param params 请求参数
|
|
21
|
+
* @name 获取主数据物流大区数据,调用接口/lesoon-mdm-center-api/bmLogisticRegion/findAll
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export declare const getLogisticRegion: (params?: any) => Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* @param where: {forwarderLevel: 1 // 承运商级别 1:一级 2:二级 , forwarderType: 1 // 承运商类型 0:货运公司 1:快递公司 }
|
|
27
|
+
* @name 获取快递/快运承运商,调用接口/lesoon-mdm-center-api/bmForwarder/findAll
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
export declare const getExpressCompany: (params?: any) => Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* @name 分页获取快递公司/承运商,调用接口/lesoon-mdm-center-api/bmForwarder/pageVo
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
export declare const getExpressCompanyPage: (params?: any) => Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* @name 实体仓,调用接口/lesoon-mdm-center-api/bmPhysicalStore/findAll
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
export declare const getPhysicalStore: (params?: any) => Promise<any>;
|
|
41
|
+
/**
|
|
42
|
+
* @param params
|
|
43
|
+
* @name 结算大类,调用接口/lesoon-mdm-center-api/bmSettlementCate/findAll
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
export declare const getSettleCategory: (params?: any) => Promise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* @param param
|
|
49
|
+
* @name 获取损益主体,调用接口/lesoon-mdm-center-api/bmProfitLossMain/findAll
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
export declare const getProfitLossMain: (param?: any) => Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* @param params
|
|
55
|
+
* @name 结算公司,调用接口/lesoon-mdm-center-api/bmSettleCompany/findAll
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
export declare const getSettleCompany: (params?: any) => Promise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* @param params
|
|
61
|
+
* @name 货权,调用接口/lesoon-mdm-center-api/bmPowerUnit/findAll
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
export declare const getPowerUnit: (params?: any) => Promise<any>;
|
|
65
|
+
/**
|
|
66
|
+
* @param params
|
|
67
|
+
* @name 结算账号,调用接口/lesoon-mdm-center-api/bmSettleAccount/findAll
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
export declare const getSettleAccount: (params?: any) => Promise<any>;
|
|
71
|
+
/**
|
|
72
|
+
* @name 获取物流大类,调用接口/lesoon-mdm-center-api/bmLogisticCategory/findAll
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
export declare const getLogisticCategory: (params?: any) => Promise<any>;
|
|
76
|
+
/**
|
|
77
|
+
* @param param
|
|
78
|
+
* @name 管理城市,调用接口/lesoon-mdm-center-api/bmManagingCity/findAll
|
|
79
|
+
* @returns
|
|
80
|
+
*/
|
|
81
|
+
export declare const getManagingCity: (params?: any) => Promise<any>;
|
|
82
|
+
interface AreaParams {
|
|
83
|
+
where?: {
|
|
84
|
+
level?: 'province' | 'city' | 'district';
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
};
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @param {where: {level:'province'}} level Province=省,city=市,district=区
|
|
91
|
+
* @name 获取省市区,调用接口/lesoon-mdm-center-api/sysAdministrativeDivision/findAll
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
export declare const getArea: (params?: AreaParams) => Promise<any>;
|
|
95
|
+
/**
|
|
96
|
+
* @param param
|
|
97
|
+
* @name 获取集散中心,调用接口/lesoon-mdm-center-api/tmsTransportLocno/findAll
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
export declare const getTransportLocno: (params?: any) => Promise<any>;
|
|
101
|
+
/**
|
|
102
|
+
* @param param
|
|
103
|
+
* @name 分页获取配送点,调用接口/lesoon-mdm-center-api/tmsTransportPoint/getTransportPointByPage
|
|
104
|
+
* @returns
|
|
105
|
+
*/
|
|
106
|
+
export declare const getTransportPointPage: (params?: any) => Promise<any>;
|
|
107
|
+
/**
|
|
108
|
+
* @param param
|
|
109
|
+
* @name 分页获取卸货点,调用接口/lesoon-mdm-center-api/tmsUploadPoint/findTmpUploadPintList
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
export declare const getUploadPointPage: (params?: any) => Promise<any>;
|
|
113
|
+
/**
|
|
114
|
+
* @param param
|
|
115
|
+
* @name 分页获取店铺,调用接口/lesoon-mdm-center-api/bmShop/pageVo
|
|
116
|
+
* @returns
|
|
117
|
+
*/
|
|
118
|
+
export declare const getShopPage: (params?: any) => Promise<any>;
|
|
119
|
+
/**
|
|
120
|
+
* @param param
|
|
121
|
+
* @name 获取颜色,调用接口/lesoon-mdm-center-api/bmColor/findAll
|
|
122
|
+
* @returns
|
|
123
|
+
*/
|
|
124
|
+
export declare const getColor: (params?: any) => Promise<any>;
|
|
125
|
+
/**
|
|
126
|
+
* @param param
|
|
127
|
+
* @name 获取尺码类型,调用接口/lesoon-mdm-center-api/bmSizeType/findAll
|
|
128
|
+
* @returns
|
|
129
|
+
*/
|
|
130
|
+
export declare const getSizeType: (params?: any) => Promise<any>;
|
|
131
|
+
/**
|
|
132
|
+
* @param param
|
|
133
|
+
* @name 获取性别,调用接口/lesoon-mdm-center-api/bmGender/findAll
|
|
134
|
+
* @returns
|
|
135
|
+
*/
|
|
136
|
+
export declare const getGender: (params?: any) => Promise<any>;
|
|
137
|
+
/**
|
|
138
|
+
* @param param
|
|
139
|
+
* @name 获取年份,调用接口/lesoon-mdm-center-api/bmYear/findAll
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
export declare const getYear: (params?: any) => Promise<any>;
|
|
143
|
+
/**
|
|
144
|
+
* @param param
|
|
145
|
+
* @name 获取季节,调用接口/lesoon-mdm-center-api/bmSeason/findAll
|
|
146
|
+
* @returns
|
|
147
|
+
*/
|
|
148
|
+
export declare const getSeason: (params?: any) => Promise<any>;
|
|
149
|
+
/**
|
|
150
|
+
* @param param
|
|
151
|
+
* @name 获取品类,调用接口/lesoon-mdm-center-api/bmCategory/findAll
|
|
152
|
+
* @returns
|
|
153
|
+
*/
|
|
154
|
+
export declare const getCategory: (params?: any) => Promise<any>;
|
|
155
|
+
declare const mdmMap: {
|
|
156
|
+
owner: (params?: any) => Promise<any>;
|
|
157
|
+
store: (params?: any) => Promise<any>;
|
|
158
|
+
brandDept: (params?: any) => Promise<any>;
|
|
159
|
+
logisticRegion: (params?: any) => Promise<any>;
|
|
160
|
+
expressCompany: (params?: any) => Promise<any>;
|
|
161
|
+
expressCompanyPage: (params?: any) => Promise<any>;
|
|
162
|
+
physicalStore: (params?: any) => Promise<any>;
|
|
163
|
+
settleCategory: (params?: any) => Promise<any>;
|
|
164
|
+
profitLossMain: (param?: any) => Promise<any>;
|
|
165
|
+
settleCompany: (params?: any) => Promise<any>;
|
|
166
|
+
powerUnit: (params?: any) => Promise<any>;
|
|
167
|
+
settleAccount: (params?: any) => Promise<any>;
|
|
168
|
+
logisticCategory: (params?: any) => Promise<any>;
|
|
169
|
+
managingCity: (params?: any) => Promise<any>;
|
|
170
|
+
area: (params?: AreaParams) => Promise<any>;
|
|
171
|
+
transportLocno: (params?: any) => Promise<any>;
|
|
172
|
+
transportPointPage: (params?: any) => Promise<any>;
|
|
173
|
+
uploadPointPage: (params?: any) => Promise<any>;
|
|
174
|
+
shopPage: (params?: any) => Promise<any>;
|
|
175
|
+
color: (params?: any) => Promise<any>;
|
|
176
|
+
sizeType: (params?: any) => Promise<any>;
|
|
177
|
+
gender: (params?: any) => Promise<any>;
|
|
178
|
+
year: (params?: any) => Promise<any>;
|
|
179
|
+
season: (params?: any) => Promise<any>;
|
|
180
|
+
category: (params?: any) => Promise<any>;
|
|
181
|
+
};
|
|
182
|
+
export declare type MdmType = keyof typeof mdmMap;
|
|
183
|
+
export declare const getMdmData: (type: MdmType, params?: any) => Promise<any>;
|
|
184
|
+
export {};
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import { httpGet } from '.';
|
|
4
|
+
import { getCache, setCache } from '../utils';
|
|
5
|
+
function setPageSize() {
|
|
6
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
if (params && params.pageSize === undefined) {
|
|
8
|
+
params.pageSize = 50000;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function httpGetWithCache(_x, _x2) {
|
|
12
|
+
return _httpGetWithCache.apply(this, arguments);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @param params 请求参数
|
|
16
|
+
* @name 获取主数据货主数据,调用接口/lesoon-mdm-center-api/bmOwner/findAll
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
function _httpGetWithCache() {
|
|
20
|
+
_httpGetWithCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(type, url) {
|
|
21
|
+
var _result$flag;
|
|
22
|
+
var params,
|
|
23
|
+
cacheKey,
|
|
24
|
+
cacheData,
|
|
25
|
+
result,
|
|
26
|
+
_args2 = arguments;
|
|
27
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
28
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
params = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
|
|
31
|
+
cacheKey = "mdm-".concat(type, "-").concat(JSON.stringify(params));
|
|
32
|
+
cacheData = getCache(cacheKey, true);
|
|
33
|
+
if (!cacheData) {
|
|
34
|
+
_context2.next = 5;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
return _context2.abrupt("return", cacheData);
|
|
38
|
+
case 5:
|
|
39
|
+
_context2.next = 7;
|
|
40
|
+
return httpGet(url, params);
|
|
41
|
+
case 7:
|
|
42
|
+
result = _context2.sent;
|
|
43
|
+
if ((result === null || result === void 0 ? void 0 : (_result$flag = result.flag) === null || _result$flag === void 0 ? void 0 : _result$flag.retCode) === '0') {
|
|
44
|
+
setCache(cacheKey, result, true);
|
|
45
|
+
}
|
|
46
|
+
return _context2.abrupt("return", result);
|
|
47
|
+
case 10:
|
|
48
|
+
case "end":
|
|
49
|
+
return _context2.stop();
|
|
50
|
+
}
|
|
51
|
+
}, _callee2);
|
|
52
|
+
}));
|
|
53
|
+
return _httpGetWithCache.apply(this, arguments);
|
|
54
|
+
}
|
|
55
|
+
export var getOwner = /*#__PURE__*/function () {
|
|
56
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
57
|
+
var params,
|
|
58
|
+
url,
|
|
59
|
+
_args = arguments;
|
|
60
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
61
|
+
while (1) switch (_context.prev = _context.next) {
|
|
62
|
+
case 0:
|
|
63
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
64
|
+
url = '/lesoon-mdm-center-api/bmOwner/findAll';
|
|
65
|
+
return _context.abrupt("return", httpGetWithCache('owner', url, params));
|
|
66
|
+
case 3:
|
|
67
|
+
case "end":
|
|
68
|
+
return _context.stop();
|
|
69
|
+
}
|
|
70
|
+
}, _callee);
|
|
71
|
+
}));
|
|
72
|
+
return function getOwner() {
|
|
73
|
+
return _ref.apply(this, arguments);
|
|
74
|
+
};
|
|
75
|
+
}();
|
|
76
|
+
/**
|
|
77
|
+
* @param params 请求参数
|
|
78
|
+
* @name 获取主数据仓库数据,调用接口/lesoon-mdm-center-api/bmStore/findAll
|
|
79
|
+
* @returns
|
|
80
|
+
*/
|
|
81
|
+
export var getStore = function getStore() {
|
|
82
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
83
|
+
var url = '/lesoon-mdm-center-api/bmStore/findAll';
|
|
84
|
+
return httpGetWithCache('store', url, params);
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* @param params 请求参数
|
|
88
|
+
* @name 获取主数据品牌部数据,调用接口/lesoon-mdm-center-api/bmBrandDept/findAll
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
export var getBrandDept = function getBrandDept() {
|
|
92
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
93
|
+
var url = '/lesoon-mdm-center-api/bmBrandDept/findAll';
|
|
94
|
+
return httpGetWithCache('brandDept', url, params);
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* @param params 请求参数
|
|
98
|
+
* @name 获取主数据物流大区数据,调用接口/lesoon-mdm-center-api/bmLogisticRegion/findAll
|
|
99
|
+
* @returns
|
|
100
|
+
*/
|
|
101
|
+
export var getLogisticRegion = function getLogisticRegion() {
|
|
102
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
103
|
+
var url = '/lesoon-mdm-center-api/bmLogisticRegion/findAll';
|
|
104
|
+
return httpGetWithCache('region', url, params);
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* @param where: {forwarderLevel: 1 // 承运商级别 1:一级 2:二级 , forwarderType: 1 // 承运商类型 0:货运公司 1:快递公司 }
|
|
108
|
+
* @name 获取快递/快运承运商,调用接口/lesoon-mdm-center-api/bmForwarder/findAll
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
export var getExpressCompany = function getExpressCompany() {
|
|
112
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
113
|
+
var url = '/lesoon-mdm-center-api/bmForwarder/findAll';
|
|
114
|
+
return httpGetWithCache('forwarder', url, params);
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* @name 分页获取快递公司/承运商,调用接口/lesoon-mdm-center-api/bmForwarder/pageVo
|
|
118
|
+
* @returns
|
|
119
|
+
*/
|
|
120
|
+
export var getExpressCompanyPage = function getExpressCompanyPage() {
|
|
121
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
122
|
+
setPageSize(params);
|
|
123
|
+
var url = '/lesoon-mdm-center-api/bmForwarder/pageVo';
|
|
124
|
+
return httpGetWithCache('forwarder', url, params);
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* @name 实体仓,调用接口/lesoon-mdm-center-api/bmPhysicalStore/findAll
|
|
128
|
+
* @returns
|
|
129
|
+
*/
|
|
130
|
+
export var getPhysicalStore = function getPhysicalStore() {
|
|
131
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
132
|
+
var url = '/lesoon-mdm-center-api/bmPhysicalStore/findAll';
|
|
133
|
+
return httpGetWithCache('physicalStore', url, params);
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* @param params
|
|
137
|
+
* @name 结算大类,调用接口/lesoon-mdm-center-api/bmSettlementCate/findAll
|
|
138
|
+
* @returns
|
|
139
|
+
*/
|
|
140
|
+
export var getSettleCategory = function getSettleCategory() {
|
|
141
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
142
|
+
var url = '/lesoon-mdm-center-api/bmSettlementCate/findAll';
|
|
143
|
+
return httpGetWithCache('settlementCate', url, params);
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* @param param
|
|
147
|
+
* @name 获取损益主体,调用接口/lesoon-mdm-center-api/bmProfitLossMain/findAll
|
|
148
|
+
* @returns
|
|
149
|
+
*/
|
|
150
|
+
export var getProfitLossMain = function getProfitLossMain() {
|
|
151
|
+
var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
152
|
+
var url = '/lesoon-mdm-center-api/bmProfitLossMain/findAll';
|
|
153
|
+
return httpGetWithCache('profitLossMain', url, param);
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* @param params
|
|
157
|
+
* @name 结算公司,调用接口/lesoon-mdm-center-api/bmSettleCompany/findAll
|
|
158
|
+
* @returns
|
|
159
|
+
*/
|
|
160
|
+
export var getSettleCompany = function getSettleCompany() {
|
|
161
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
162
|
+
var url = '/lesoon-mdm-center-api/bmSettleCompany/findAll';
|
|
163
|
+
return httpGetWithCache('settleCompany', url, params);
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* @param params
|
|
167
|
+
* @name 货权,调用接口/lesoon-mdm-center-api/bmPowerUnit/findAll
|
|
168
|
+
* @returns
|
|
169
|
+
*/
|
|
170
|
+
export var getPowerUnit = function getPowerUnit() {
|
|
171
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
172
|
+
var url = '/lesoon-mdm-center-api/bmPowerUnit/findAll';
|
|
173
|
+
return httpGetWithCache('powerUnit', url, params);
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* @param params
|
|
177
|
+
* @name 结算账号,调用接口/lesoon-mdm-center-api/bmSettleAccount/findAll
|
|
178
|
+
* @returns
|
|
179
|
+
*/
|
|
180
|
+
export var getSettleAccount = function getSettleAccount() {
|
|
181
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
182
|
+
var url = '/lesoon-mdm-center-api/bmSettleAccount/findAll';
|
|
183
|
+
return httpGetWithCache('settleAccount', url, params);
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* @name 获取物流大类,调用接口/lesoon-mdm-center-api/bmLogisticCategory/findAll
|
|
187
|
+
* @returns
|
|
188
|
+
*/
|
|
189
|
+
export var getLogisticCategory = function getLogisticCategory() {
|
|
190
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
191
|
+
var url = '/lesoon-mdm-center-api/bmLogisticCategory/findAll';
|
|
192
|
+
return httpGetWithCache('logisticCategory', url, params);
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* @param param
|
|
196
|
+
* @name 管理城市,调用接口/lesoon-mdm-center-api/bmManagingCity/findAll
|
|
197
|
+
* @returns
|
|
198
|
+
*/
|
|
199
|
+
export var getManagingCity = function getManagingCity() {
|
|
200
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
201
|
+
var url = '/lesoon-mdm-center-api/bmManagingCity/findAll';
|
|
202
|
+
return httpGetWithCache('managingCity', url, params);
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* @param {where: {level:'province'}} level Province=省,city=市,district=区
|
|
206
|
+
* @name 获取省市区,调用接口/lesoon-mdm-center-api/sysAdministrativeDivision/findAll
|
|
207
|
+
* @returns
|
|
208
|
+
*/
|
|
209
|
+
export var getArea = function getArea() {
|
|
210
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
211
|
+
var url = '/lesoon-mdm-center-api/sysAdministrativeDivision/findAll';
|
|
212
|
+
return httpGetWithCache('area', url, params);
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* @param param
|
|
216
|
+
* @name 获取集散中心,调用接口/lesoon-mdm-center-api/tmsTransportLocno/findAll
|
|
217
|
+
* @returns
|
|
218
|
+
*/
|
|
219
|
+
export var getTransportLocno = function getTransportLocno() {
|
|
220
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
221
|
+
var url = '/lesoon-mdm-center-api/tmsTransportLocno/findAll';
|
|
222
|
+
return httpGetWithCache('transportLocno', url, params);
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* @param param
|
|
226
|
+
* @name 分页获取配送点,调用接口/lesoon-mdm-center-api/tmsTransportPoint/getTransportPointByPage
|
|
227
|
+
* @returns
|
|
228
|
+
*/
|
|
229
|
+
export var getTransportPointPage = function getTransportPointPage() {
|
|
230
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
231
|
+
setPageSize(params);
|
|
232
|
+
var url = '/lesoon-mdm-center-api/tmsTransportPoint/getTransportPointByPage';
|
|
233
|
+
return httpGetWithCache('transportPoint', url, params);
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* @param param
|
|
237
|
+
* @name 分页获取卸货点,调用接口/lesoon-mdm-center-api/tmsUploadPoint/findTmpUploadPintList
|
|
238
|
+
* @returns
|
|
239
|
+
*/
|
|
240
|
+
export var getUploadPointPage = function getUploadPointPage() {
|
|
241
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
242
|
+
setPageSize(params);
|
|
243
|
+
var url = '/lesoon-mdm-center-api/tmsUploadPoint/findTmpUploadPintList';
|
|
244
|
+
return httpGetWithCache('uploadPoint', url, params);
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* @param param
|
|
248
|
+
* @name 分页获取店铺,调用接口/lesoon-mdm-center-api/bmShop/pageVo
|
|
249
|
+
* @returns
|
|
250
|
+
*/
|
|
251
|
+
export var getShopPage = function getShopPage() {
|
|
252
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
253
|
+
setPageSize(params);
|
|
254
|
+
var url = '/lesoon-mdm-center-api/bmShop/pageVo';
|
|
255
|
+
return httpGetWithCache('shop', url, params);
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* @param param
|
|
259
|
+
* @name 获取颜色,调用接口/lesoon-mdm-center-api/bmColor/findAll
|
|
260
|
+
* @returns
|
|
261
|
+
*/
|
|
262
|
+
export var getColor = function getColor() {
|
|
263
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
264
|
+
var url = '/lesoon-mdm-center-api/bmColor/findAll';
|
|
265
|
+
return httpGetWithCache('color', url, params);
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* @param param
|
|
269
|
+
* @name 获取尺码类型,调用接口/lesoon-mdm-center-api/bmSizeType/findAll
|
|
270
|
+
* @returns
|
|
271
|
+
*/
|
|
272
|
+
export var getSizeType = function getSizeType() {
|
|
273
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
274
|
+
var url = '/lesoon-mdm-center-api/bmSizeType/findAll';
|
|
275
|
+
return httpGetWithCache('sizeType', url, params);
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* @param param
|
|
279
|
+
* @name 获取性别,调用接口/lesoon-mdm-center-api/bmGender/findAll
|
|
280
|
+
* @returns
|
|
281
|
+
*/
|
|
282
|
+
export var getGender = function getGender() {
|
|
283
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
284
|
+
var url = '/lesoon-mdm-center-api/bmGender/findAll';
|
|
285
|
+
return httpGetWithCache('gender', url, params);
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* @param param
|
|
289
|
+
* @name 获取年份,调用接口/lesoon-mdm-center-api/bmYear/findAll
|
|
290
|
+
* @returns
|
|
291
|
+
*/
|
|
292
|
+
export var getYear = function getYear() {
|
|
293
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
294
|
+
var url = '/lesoon-mdm-center-api/bmYear/findAll';
|
|
295
|
+
return httpGetWithCache('year', url, params);
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* @param param
|
|
299
|
+
* @name 获取季节,调用接口/lesoon-mdm-center-api/bmSeason/findAll
|
|
300
|
+
* @returns
|
|
301
|
+
*/
|
|
302
|
+
export var getSeason = function getSeason() {
|
|
303
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
304
|
+
var url = '/lesoon-mdm-center-api/bmSeason/findAll';
|
|
305
|
+
return httpGetWithCache('season', url, params);
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* @param param
|
|
309
|
+
* @name 获取品类,调用接口/lesoon-mdm-center-api/bmCategory/findAll
|
|
310
|
+
* @returns
|
|
311
|
+
*/
|
|
312
|
+
export var getCategory = function getCategory() {
|
|
313
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
314
|
+
var url = '/lesoon-mdm-center-api/bmCategory/findAll';
|
|
315
|
+
return httpGetWithCache('category', url, params);
|
|
316
|
+
};
|
|
317
|
+
var mdmMap = {
|
|
318
|
+
owner: getOwner,
|
|
319
|
+
store: getStore,
|
|
320
|
+
brandDept: getBrandDept,
|
|
321
|
+
logisticRegion: getLogisticRegion,
|
|
322
|
+
expressCompany: getExpressCompany,
|
|
323
|
+
expressCompanyPage: getExpressCompanyPage,
|
|
324
|
+
physicalStore: getPhysicalStore,
|
|
325
|
+
settleCategory: getSettleCategory,
|
|
326
|
+
profitLossMain: getProfitLossMain,
|
|
327
|
+
settleCompany: getSettleCompany,
|
|
328
|
+
powerUnit: getPowerUnit,
|
|
329
|
+
settleAccount: getSettleAccount,
|
|
330
|
+
logisticCategory: getLogisticCategory,
|
|
331
|
+
managingCity: getManagingCity,
|
|
332
|
+
area: getArea,
|
|
333
|
+
transportLocno: getTransportLocno,
|
|
334
|
+
transportPointPage: getTransportPointPage,
|
|
335
|
+
uploadPointPage: getUploadPointPage,
|
|
336
|
+
shopPage: getShopPage,
|
|
337
|
+
color: getColor,
|
|
338
|
+
sizeType: getSizeType,
|
|
339
|
+
gender: getGender,
|
|
340
|
+
year: getYear,
|
|
341
|
+
season: getSeason,
|
|
342
|
+
category: getCategory
|
|
343
|
+
};
|
|
344
|
+
export var getMdmData = function getMdmData(type) {
|
|
345
|
+
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
346
|
+
var fn = mdmMap[type];
|
|
347
|
+
if (!fn) {
|
|
348
|
+
throw new Error("".concat(type, " \u4E0D\u5B58\u5728"));
|
|
349
|
+
}
|
|
350
|
+
return fn(params);
|
|
351
|
+
};
|
package/es/index.d.ts
CHANGED
|
@@ -17,8 +17,11 @@ import IconBell from './components/IconBell';
|
|
|
17
17
|
import IconSearch from './components/IconSearch';
|
|
18
18
|
import TagCheck from './components/TagCheck';
|
|
19
19
|
import ViewOffice from './components/ViewOffice';
|
|
20
|
-
import
|
|
20
|
+
import ProButton from './components/ProButton';
|
|
21
|
+
import RecordLog from './components/RecordLog';
|
|
21
22
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
23
|
+
import BaseService from './service/BaseService';
|
|
24
|
+
import * as mdmRequest from './http/mdmRequest';
|
|
22
25
|
import * as utils from './utils';
|
|
23
26
|
import exportProcess from './utils/exportProcess';
|
|
24
27
|
/** Hooks */
|
|
@@ -32,6 +35,7 @@ import useSelectOptions from './hooks/useSelectOptions';
|
|
|
32
35
|
import showConfirmFun from './hooks/useShowConfirm';
|
|
33
36
|
import useQueue from './hooks/useQueue';
|
|
34
37
|
import { useDict } from './hooks/useDict';
|
|
38
|
+
import useMdm from './hooks/useMdm';
|
|
35
39
|
/** Type */
|
|
36
40
|
import type { ApiResponse, TableToolbar, BaseApiType, MethodType } from './typing';
|
|
37
41
|
import type { DtlLyaoutProps } from './components/DtlLayout';
|
|
@@ -39,4 +43,4 @@ import type { DescritionCardProps } from './components/DescritionCard';
|
|
|
39
43
|
import type { PermissionProps } from './components/Permission';
|
|
40
44
|
import type { TDict } from './hooks/useDict';
|
|
41
45
|
export type { ApiResponse, TableToolbar, BaseApiType, MethodType, DtlLyaoutProps, DescritionCardProps, PermissionProps, TDict, };
|
|
42
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, ViewOffice, IconBack, IconText, IconBell, IconQuestion, IconSearch, TagCheck, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission, useGetState, useFilterLocal, useQueue, useBaseDict, useSelectOptions, useDict, showConfirmFun, exportProcess, };
|
|
46
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, ViewOffice, IconBack, IconText, IconBell, IconQuestion, IconSearch, TagCheck, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission, useGetState, useFilterLocal, useQueue, useBaseDict, useSelectOptions, useDict, useMdm, showConfirmFun, exportProcess, mdmRequest, ProButton, RecordLog, };
|
package/es/index.js
CHANGED
|
@@ -17,8 +17,11 @@ import IconBell from './components/IconBell';
|
|
|
17
17
|
import IconSearch from './components/IconSearch';
|
|
18
18
|
import TagCheck from './components/TagCheck';
|
|
19
19
|
import ViewOffice from './components/ViewOffice';
|
|
20
|
-
import
|
|
20
|
+
import ProButton from './components/ProButton';
|
|
21
|
+
import RecordLog from './components/RecordLog';
|
|
21
22
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
23
|
+
import BaseService from './service/BaseService';
|
|
24
|
+
import * as mdmRequest from './http/mdmRequest';
|
|
22
25
|
import * as utils from './utils';
|
|
23
26
|
import exportProcess from './utils/exportProcess';
|
|
24
27
|
/** Hooks */
|
|
@@ -32,4 +35,5 @@ import useSelectOptions from './hooks/useSelectOptions';
|
|
|
32
35
|
import showConfirmFun from './hooks/useShowConfirm';
|
|
33
36
|
import useQueue from './hooks/useQueue';
|
|
34
37
|
import { useDict } from './hooks/useDict';
|
|
35
|
-
|
|
38
|
+
import useMdm from './hooks/useMdm';
|
|
39
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, ViewOffice, IconBack, IconText, IconBell, IconQuestion, IconSearch, TagCheck, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission, useGetState, useFilterLocal, useQueue, useBaseDict, useSelectOptions, useDict, useMdm, showConfirmFun, exportProcess, mdmRequest, ProButton, RecordLog };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数组去重
|
|
3
|
+
*
|
|
4
|
+
* @param arr 原始数组
|
|
5
|
+
* @param property 按照什么属性去重 默认value
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const uniqueByProperty: (arr: any[], property?: string) => any;
|
|
9
|
+
/**
|
|
10
|
+
* 遍历树
|
|
11
|
+
*
|
|
12
|
+
* @param list 树对象
|
|
13
|
+
* @param fn 回调函数
|
|
14
|
+
* @param children 树属性字段
|
|
15
|
+
*/
|
|
16
|
+
export declare const treeEach: (list: any[], fn: (item: any, index: any, list: any[]) => void, children?: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* 查询数
|
|
19
|
+
*
|
|
20
|
+
* @param list 树对象
|
|
21
|
+
* @param key 查询属性
|
|
22
|
+
* @param val 查询值
|
|
23
|
+
* @param children 树属性字段
|
|
24
|
+
* @returns 返回符合条件的第一条对象
|
|
25
|
+
*/
|
|
26
|
+
export declare const treeFind: (list: any[], key: string, val: any, children?: string) => any;
|