ls-pro-common 3.1.45 → 3.1.47
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 +16 -0
- package/dist/common.js +1 -1
- package/dist/common.less +2 -1
- package/dist/common.min.css +16 -0
- package/dist/common.min.js +1 -1
- package/es/components/Select/AreaCitySelect.d.ts +5 -0
- package/es/components/Select/AreaCitySelect.js +25 -0
- package/es/components/Select/AreaDistrictSelect.d.ts +5 -0
- package/es/components/Select/AreaDistrictSelect.js +25 -0
- package/es/components/Select/AreaProvinceSelect.d.ts +5 -0
- package/es/components/Select/AreaProvinceSelect.js +25 -0
- package/es/components/Select/Base.d.ts +11 -0
- package/es/components/Select/Base.js +127 -0
- package/es/components/Select/BrandDeptSelect.d.ts +5 -0
- package/es/components/Select/BrandDeptSelect.js +12 -0
- package/es/components/Select/CategorySelect.d.ts +5 -0
- package/es/components/Select/CategorySelect.js +12 -0
- package/es/components/Select/ColorSelect.d.ts +5 -0
- package/es/components/Select/ColorSelect.js +12 -0
- package/es/components/Select/ExpressCompanyPageSelect.d.ts +5 -0
- package/es/components/Select/ExpressCompanyPageSelect.js +12 -0
- package/es/components/Select/ExpressCompanySelect.d.ts +5 -0
- package/es/components/Select/ExpressCompanySelect.js +12 -0
- package/es/components/Select/GenderSelect.d.ts +5 -0
- package/es/components/Select/GenderSelect.js +12 -0
- package/es/components/Select/LogisticCategorySelect.d.ts +5 -0
- package/es/components/Select/LogisticCategorySelect.js +12 -0
- package/es/components/Select/LogisticRegionSelect.d.ts +5 -0
- package/es/components/Select/LogisticRegionSelect.js +12 -0
- package/es/components/Select/ManagingCitySelect.d.ts +5 -0
- package/es/components/Select/ManagingCitySelect.js +12 -0
- package/es/components/Select/OwnerSelect.d.ts +5 -0
- package/es/components/Select/OwnerSelect.js +12 -0
- package/es/components/Select/PhysicalStoreSelect.d.ts +5 -0
- package/es/components/Select/PhysicalStoreSelect.js +12 -0
- package/es/components/Select/PowerUnitSelect.d.ts +5 -0
- package/es/components/Select/PowerUnitSelect.js +12 -0
- package/es/components/Select/ProfitLossMainSelect.d.ts +5 -0
- package/es/components/Select/ProfitLossMainSelect.js +12 -0
- package/es/components/Select/SeasonSelect.d.ts +5 -0
- package/es/components/Select/SeasonSelect.js +12 -0
- package/es/components/Select/SettleAccountSelect.d.ts +5 -0
- package/es/components/Select/SettleAccountSelect.js +12 -0
- package/es/components/Select/SettleCategorySelect.d.ts +5 -0
- package/es/components/Select/SettleCategorySelect.js +12 -0
- package/es/components/Select/SettleCompanySelect.d.ts +5 -0
- package/es/components/Select/SettleCompanySelect.js +12 -0
- package/es/components/Select/ShopPageSelect.d.ts +5 -0
- package/es/components/Select/ShopPageSelect.js +12 -0
- package/es/components/Select/SizeTypeSelect.d.ts +5 -0
- package/es/components/Select/SizeTypeSelect.js +12 -0
- package/es/components/Select/StoreSelect.d.ts +5 -0
- package/es/components/Select/StoreSelect.js +12 -0
- package/es/components/Select/SupplierSelect.d.ts +5 -0
- package/es/components/Select/SupplierSelect.js +12 -0
- package/es/components/Select/TransportLocnoSelect.d.ts +5 -0
- package/es/components/Select/TransportLocnoSelect.js +12 -0
- package/es/components/Select/TransportPointPageSelect.d.ts +5 -0
- package/es/components/Select/TransportPointPageSelect.js +12 -0
- package/es/components/Select/UploadPointPageSelect.d.ts +5 -0
- package/es/components/Select/UploadPointPageSelect.js +12 -0
- package/es/components/Select/YearSelect.d.ts +5 -0
- package/es/components/Select/YearSelect.js +12 -0
- package/es/components/Select/common.d.ts +32 -0
- package/es/components/Select/common.js +20 -0
- package/es/components/Select/index.less +17 -0
- package/es/components/ViewOffice.js +1 -0
- package/es/components/index.d.ts +28 -0
- package/es/components/index.js +29 -1
- package/es/hooks/useMdm.d.ts +11 -2
- package/es/hooks/useMdm.js +26 -11
- package/es/http/index.d.ts +21 -0
- package/es/http/index.js +246 -2
- package/es/http/mdmCache.d.ts +19 -0
- package/es/http/mdmCache.js +157 -0
- package/es/http/mdmRequest.d.ts +148 -73
- package/es/http/mdmRequest.js +223 -93
- package/es/utils/index.d.ts +5 -3
- package/es/utils/index.js +15 -3
- package/es/utils/modal.js +1 -1
- package/es/utils/pasteUpload.d.ts +27 -0
- package/es/utils/pasteUpload.js +117 -0
- package/lib/components/Select/AreaCitySelect.d.ts +5 -0
- package/lib/components/Select/AreaCitySelect.js +25 -0
- package/lib/components/Select/AreaDistrictSelect.d.ts +5 -0
- package/lib/components/Select/AreaDistrictSelect.js +25 -0
- package/lib/components/Select/AreaProvinceSelect.d.ts +5 -0
- package/lib/components/Select/AreaProvinceSelect.js +25 -0
- package/lib/components/Select/Base.d.ts +11 -0
- package/lib/components/Select/Base.js +127 -0
- package/lib/components/Select/BrandDeptSelect.d.ts +5 -0
- package/lib/components/Select/BrandDeptSelect.js +12 -0
- package/lib/components/Select/CategorySelect.d.ts +5 -0
- package/lib/components/Select/CategorySelect.js +12 -0
- package/lib/components/Select/ColorSelect.d.ts +5 -0
- package/lib/components/Select/ColorSelect.js +12 -0
- package/lib/components/Select/ExpressCompanyPageSelect.d.ts +5 -0
- package/lib/components/Select/ExpressCompanyPageSelect.js +12 -0
- package/lib/components/Select/ExpressCompanySelect.d.ts +5 -0
- package/lib/components/Select/ExpressCompanySelect.js +12 -0
- package/lib/components/Select/GenderSelect.d.ts +5 -0
- package/lib/components/Select/GenderSelect.js +12 -0
- package/lib/components/Select/LogisticCategorySelect.d.ts +5 -0
- package/lib/components/Select/LogisticCategorySelect.js +12 -0
- package/lib/components/Select/LogisticRegionSelect.d.ts +5 -0
- package/lib/components/Select/LogisticRegionSelect.js +12 -0
- package/lib/components/Select/ManagingCitySelect.d.ts +5 -0
- package/lib/components/Select/ManagingCitySelect.js +12 -0
- package/lib/components/Select/OwnerSelect.d.ts +5 -0
- package/lib/components/Select/OwnerSelect.js +12 -0
- package/lib/components/Select/PhysicalStoreSelect.d.ts +5 -0
- package/lib/components/Select/PhysicalStoreSelect.js +12 -0
- package/lib/components/Select/PowerUnitSelect.d.ts +5 -0
- package/lib/components/Select/PowerUnitSelect.js +12 -0
- package/lib/components/Select/ProfitLossMainSelect.d.ts +5 -0
- package/lib/components/Select/ProfitLossMainSelect.js +12 -0
- package/lib/components/Select/SeasonSelect.d.ts +5 -0
- package/lib/components/Select/SeasonSelect.js +12 -0
- package/lib/components/Select/SettleAccountSelect.d.ts +5 -0
- package/lib/components/Select/SettleAccountSelect.js +12 -0
- package/lib/components/Select/SettleCategorySelect.d.ts +5 -0
- package/lib/components/Select/SettleCategorySelect.js +12 -0
- package/lib/components/Select/SettleCompanySelect.d.ts +5 -0
- package/lib/components/Select/SettleCompanySelect.js +12 -0
- package/lib/components/Select/ShopPageSelect.d.ts +5 -0
- package/lib/components/Select/ShopPageSelect.js +12 -0
- package/lib/components/Select/SizeTypeSelect.d.ts +5 -0
- package/lib/components/Select/SizeTypeSelect.js +12 -0
- package/lib/components/Select/StoreSelect.d.ts +5 -0
- package/lib/components/Select/StoreSelect.js +12 -0
- package/lib/components/Select/SupplierSelect.d.ts +5 -0
- package/lib/components/Select/SupplierSelect.js +12 -0
- package/lib/components/Select/TransportLocnoSelect.d.ts +5 -0
- package/lib/components/Select/TransportLocnoSelect.js +12 -0
- package/lib/components/Select/TransportPointPageSelect.d.ts +5 -0
- package/lib/components/Select/TransportPointPageSelect.js +12 -0
- package/lib/components/Select/UploadPointPageSelect.d.ts +5 -0
- package/lib/components/Select/UploadPointPageSelect.js +12 -0
- package/lib/components/Select/YearSelect.d.ts +5 -0
- package/lib/components/Select/YearSelect.js +12 -0
- package/lib/components/Select/common.d.ts +32 -0
- package/lib/components/Select/common.js +20 -0
- package/lib/components/Select/index.less +17 -0
- package/lib/components/ViewOffice.js +1 -0
- package/lib/components/index.d.ts +28 -0
- package/lib/components/index.js +29 -1
- package/lib/hooks/useMdm.d.ts +11 -2
- package/lib/hooks/useMdm.js +26 -11
- package/lib/http/index.d.ts +21 -0
- package/lib/http/index.js +246 -2
- package/lib/http/mdmCache.d.ts +19 -0
- package/lib/http/mdmCache.js +157 -0
- package/lib/http/mdmRequest.d.ts +148 -73
- package/lib/http/mdmRequest.js +223 -93
- package/lib/utils/index.d.ts +5 -3
- package/lib/utils/index.js +15 -3
- package/lib/utils/modal.js +1 -1
- package/lib/utils/pasteUpload.d.ts +27 -0
- package/lib/utils/pasteUpload.js +117 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "profitLossMain",
|
|
7
|
+
labelField: "profitLossName",
|
|
8
|
+
valueField: "profitLossNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "season",
|
|
7
|
+
labelField: "seasonName",
|
|
8
|
+
valueField: "seasonCode"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "settleAccount",
|
|
7
|
+
labelField: "settleAccountName",
|
|
8
|
+
valueField: "settleAccountNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "settleCategory",
|
|
7
|
+
labelField: "cateName",
|
|
8
|
+
valueField: "cateNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "settleCompany",
|
|
7
|
+
labelField: "settleCompanyName",
|
|
8
|
+
valueField: "settleCompanyNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "shopPage",
|
|
7
|
+
labelField: "shopName",
|
|
8
|
+
valueField: "shopNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "sizeType",
|
|
7
|
+
labelField: "sizeTypeName",
|
|
8
|
+
valueField: "sizeTypeCode"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "store",
|
|
7
|
+
labelField: "storeName",
|
|
8
|
+
valueField: "storeNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "supplier",
|
|
7
|
+
labelField: "supplierName",
|
|
8
|
+
valueField: "supplierNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "transportLocno",
|
|
7
|
+
labelField: "transportLocnoName",
|
|
8
|
+
valueField: "transportLocnoNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "transportPointPage",
|
|
7
|
+
labelField: "transportPointName",
|
|
8
|
+
valueField: "transportPointNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "uploadPointPage",
|
|
7
|
+
labelField: "uploadPointName",
|
|
8
|
+
valueField: "uploadPointNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Base from './Base';
|
|
4
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
6
|
+
type: "year",
|
|
7
|
+
labelField: "yearName",
|
|
8
|
+
valueField: "yearNo"
|
|
9
|
+
}, props, {
|
|
10
|
+
ref: ref
|
|
11
|
+
}));
|
|
12
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SelectProps } from 'antd';
|
|
2
|
+
export interface MdmSelectProps extends SelectProps {
|
|
3
|
+
/** @name请求参数 */
|
|
4
|
+
params?: Record<string, any>;
|
|
5
|
+
/** @name 获取选项回调 */
|
|
6
|
+
getOptions?: (list: any[]) => void;
|
|
7
|
+
/** @name 是否显示重新加载按钮 */
|
|
8
|
+
showReload?: boolean;
|
|
9
|
+
/** @name 是否显示总数 */
|
|
10
|
+
showTotal?: boolean;
|
|
11
|
+
/** @name 是否全选 */
|
|
12
|
+
selectAll?: boolean;
|
|
13
|
+
/** @name 本地过滤选项 */
|
|
14
|
+
filterOptions?: (options: SelectOptionProps[]) => SelectOptionProps[];
|
|
15
|
+
}
|
|
16
|
+
export interface SelectOptionProps {
|
|
17
|
+
value: string | number;
|
|
18
|
+
label: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 数据转换
|
|
25
|
+
*
|
|
26
|
+
* @param rows 原始数据集
|
|
27
|
+
* @param valueField 值字段
|
|
28
|
+
* @param labelField 标签字段
|
|
29
|
+
* @param statusField 状态字段
|
|
30
|
+
* @returns 转换后的数据集
|
|
31
|
+
*/
|
|
32
|
+
export declare function transformOption(rows: any[], valueField: string, labelField: string, statusField?: string): SelectOptionProps[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
/**
|
|
3
|
+
* 数据转换
|
|
4
|
+
*
|
|
5
|
+
* @param rows 原始数据集
|
|
6
|
+
* @param valueField 值字段
|
|
7
|
+
* @param labelField 标签字段
|
|
8
|
+
* @param statusField 状态字段
|
|
9
|
+
* @returns 转换后的数据集
|
|
10
|
+
*/
|
|
11
|
+
export function transformOption(rows, valueField, labelField) {
|
|
12
|
+
var statusField = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'status';
|
|
13
|
+
return rows.map(function (row) {
|
|
14
|
+
return _objectSpread(_objectSpread({}, row), {}, {
|
|
15
|
+
value: row[valueField],
|
|
16
|
+
label: row[labelField],
|
|
17
|
+
disabled: statusField in row ? row[statusField] === 0 : false
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.select-footer {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
padding: 4px 12px;
|
|
5
|
+
background-color: #fff;
|
|
6
|
+
|
|
7
|
+
.select-footer-total {
|
|
8
|
+
color: #999;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
text-align: left;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.select-footer-reload {
|
|
14
|
+
flex: 1;
|
|
15
|
+
text-align: right;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -39,6 +39,7 @@ var ViewDocment = function ViewDocment(props) {
|
|
|
39
39
|
href = href + (href.includes('?') ? '&' : '?') + 'token=' + token;
|
|
40
40
|
}
|
|
41
41
|
if (!href.includes('fullfilename=')) {
|
|
42
|
+
filename = filename.replace(/\//g, '');
|
|
42
43
|
href = href + (href.includes('?') ? '&' : '?') + 'fullfilename=' + filename;
|
|
43
44
|
}
|
|
44
45
|
var doc = base64Encode(href);
|
|
@@ -19,3 +19,31 @@ export { default as TagCheck } from './TagCheck';
|
|
|
19
19
|
export { default as ViewOffice } from './ViewOffice';
|
|
20
20
|
export { default as ProButton } from './ProButton';
|
|
21
21
|
export { default as RecordLog } from './RecordLog';
|
|
22
|
+
export { default as OwnerSelect } from './Select/OwnerSelect';
|
|
23
|
+
export { default as BrandDeptSelect } from './Select/BrandDeptSelect';
|
|
24
|
+
export { default as StoreSelect } from './Select/StoreSelect';
|
|
25
|
+
export { default as LogisticRegionSelect } from './Select/LogisticRegionSelect';
|
|
26
|
+
export { default as ExpressCompanySelect } from './Select/ExpressCompanySelect';
|
|
27
|
+
export { default as ExpressCompanyPageSelect } from './Select/ExpressCompanyPageSelect';
|
|
28
|
+
export { default as PhysicalStoreSelect } from './Select/PhysicalStoreSelect';
|
|
29
|
+
export { default as SettleCategorySelect } from './Select/SettleCategorySelect';
|
|
30
|
+
export { default as ProfitLossMainSelect } from './Select/ProfitLossMainSelect';
|
|
31
|
+
export { default as SettleCompanySelect } from './Select/SettleCompanySelect';
|
|
32
|
+
export { default as PowerUnitSelect } from './Select/PowerUnitSelect';
|
|
33
|
+
export { default as SettleAccountSelect } from './Select/SettleAccountSelect';
|
|
34
|
+
export { default as LogisticCategorySelect } from './Select/LogisticCategorySelect';
|
|
35
|
+
export { default as ManagingCitySelect } from './Select/ManagingCitySelect';
|
|
36
|
+
export { default as TransportLocnoSelect } from './Select/TransportLocnoSelect';
|
|
37
|
+
export { default as TransportPointPageSelect } from './Select/TransportPointPageSelect';
|
|
38
|
+
export { default as UploadPointPageSelect } from './Select/UploadPointPageSelect';
|
|
39
|
+
export { default as ShopPageSelect } from './Select/ShopPageSelect';
|
|
40
|
+
export { default as ColorSelect } from './Select/ColorSelect';
|
|
41
|
+
export { default as SizeTypeSelect } from './Select/SizeTypeSelect';
|
|
42
|
+
export { default as GenderSelect } from './Select/GenderSelect';
|
|
43
|
+
export { default as YearSelect } from './Select/YearSelect';
|
|
44
|
+
export { default as SeasonSelect } from './Select/SeasonSelect';
|
|
45
|
+
export { default as CategorySelect } from './Select/CategorySelect';
|
|
46
|
+
export { default as SupplierSelect } from './Select/SupplierSelect';
|
|
47
|
+
export { default as AreaProvinceSelect } from './Select/AreaProvinceSelect';
|
|
48
|
+
export { default as AreaCitySelect } from './Select/AreaCitySelect';
|
|
49
|
+
export { default as AreaDistrictSelect } from './Select/AreaDistrictSelect';
|
package/lib/components/index.js
CHANGED
|
@@ -18,4 +18,32 @@ export { default as IconSearch } from './IconSearch';
|
|
|
18
18
|
export { default as TagCheck } from './TagCheck';
|
|
19
19
|
export { default as ViewOffice } from './ViewOffice';
|
|
20
20
|
export { default as ProButton } from './ProButton';
|
|
21
|
-
export { default as RecordLog } from './RecordLog';
|
|
21
|
+
export { default as RecordLog } from './RecordLog';
|
|
22
|
+
export { default as OwnerSelect } from './Select/OwnerSelect';
|
|
23
|
+
export { default as BrandDeptSelect } from './Select/BrandDeptSelect';
|
|
24
|
+
export { default as StoreSelect } from './Select/StoreSelect';
|
|
25
|
+
export { default as LogisticRegionSelect } from './Select/LogisticRegionSelect';
|
|
26
|
+
export { default as ExpressCompanySelect } from './Select/ExpressCompanySelect';
|
|
27
|
+
export { default as ExpressCompanyPageSelect } from './Select/ExpressCompanyPageSelect';
|
|
28
|
+
export { default as PhysicalStoreSelect } from './Select/PhysicalStoreSelect';
|
|
29
|
+
export { default as SettleCategorySelect } from './Select/SettleCategorySelect';
|
|
30
|
+
export { default as ProfitLossMainSelect } from './Select/ProfitLossMainSelect';
|
|
31
|
+
export { default as SettleCompanySelect } from './Select/SettleCompanySelect';
|
|
32
|
+
export { default as PowerUnitSelect } from './Select/PowerUnitSelect';
|
|
33
|
+
export { default as SettleAccountSelect } from './Select/SettleAccountSelect';
|
|
34
|
+
export { default as LogisticCategorySelect } from './Select/LogisticCategorySelect';
|
|
35
|
+
export { default as ManagingCitySelect } from './Select/ManagingCitySelect';
|
|
36
|
+
export { default as TransportLocnoSelect } from './Select/TransportLocnoSelect';
|
|
37
|
+
export { default as TransportPointPageSelect } from './Select/TransportPointPageSelect';
|
|
38
|
+
export { default as UploadPointPageSelect } from './Select/UploadPointPageSelect';
|
|
39
|
+
export { default as ShopPageSelect } from './Select/ShopPageSelect';
|
|
40
|
+
export { default as ColorSelect } from './Select/ColorSelect';
|
|
41
|
+
export { default as SizeTypeSelect } from './Select/SizeTypeSelect';
|
|
42
|
+
export { default as GenderSelect } from './Select/GenderSelect';
|
|
43
|
+
export { default as YearSelect } from './Select/YearSelect';
|
|
44
|
+
export { default as SeasonSelect } from './Select/SeasonSelect';
|
|
45
|
+
export { default as CategorySelect } from './Select/CategorySelect';
|
|
46
|
+
export { default as SupplierSelect } from './Select/SupplierSelect';
|
|
47
|
+
export { default as AreaProvinceSelect } from './Select/AreaProvinceSelect';
|
|
48
|
+
export { default as AreaCitySelect } from './Select/AreaCitySelect';
|
|
49
|
+
export { default as AreaDistrictSelect } from './Select/AreaDistrictSelect';
|
package/lib/hooks/useMdm.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { type MdmType } from '../http/mdmRequest';
|
|
2
|
-
interface MdmParams {
|
|
2
|
+
interface MdmParams<T = any> {
|
|
3
3
|
type: MdmType;
|
|
4
4
|
params?: any;
|
|
5
|
+
transfor?: (rows: any[]) => T[];
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* UseMdm hook 返回值类型
|
|
9
|
+
*
|
|
10
|
+
* @template T 数组元素类型,默认为 any
|
|
11
|
+
* @returns 返回一个元组,包含: - run: 执行获取数据的异步函数,返回 Promise<T[]> - list: 当前数据列表,类型为 T[] - setList:
|
|
12
|
+
* 设置数据列表的函数 - loading: 加载状态,类型为 boolean
|
|
13
|
+
*/
|
|
14
|
+
declare type UseMdmReturn<T = any> = [() => Promise<T[]>, T[], (list: T[]) => void, boolean];
|
|
15
|
+
export default function <T = any>(props: MdmParams<T>): UseMdmReturn<T>;
|
|
7
16
|
export {};
|
package/lib/hooks/useMdm.js
CHANGED
|
@@ -6,7 +6,8 @@ import { getMdmData } from '../http/mdmRequest';
|
|
|
6
6
|
export default function (props) {
|
|
7
7
|
var type = props.type,
|
|
8
8
|
_props$params = props.params,
|
|
9
|
-
params = _props$params === void 0 ? {} : _props$params
|
|
9
|
+
params = _props$params === void 0 ? {} : _props$params,
|
|
10
|
+
transfor = props.transfor;
|
|
10
11
|
var _useState = useState([]),
|
|
11
12
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12
13
|
list = _useState2[0],
|
|
@@ -17,27 +18,41 @@ export default function (props) {
|
|
|
17
18
|
setLoading = _useState4[1];
|
|
18
19
|
var run = /*#__PURE__*/function () {
|
|
19
20
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
20
|
-
var
|
|
21
|
+
var isCache,
|
|
22
|
+
res,
|
|
23
|
+
rows,
|
|
24
|
+
_args = arguments;
|
|
21
25
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
22
26
|
while (1) switch (_context.prev = _context.next) {
|
|
23
27
|
case 0:
|
|
24
|
-
|
|
28
|
+
isCache = _args.length > 0 && _args[0] !== undefined ? _args[0] : true;
|
|
29
|
+
_context.prev = 1;
|
|
25
30
|
setLoading(true);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
setList([]);
|
|
32
|
+
_context.next = 6;
|
|
33
|
+
return getMdmData(type, params, isCache);
|
|
34
|
+
case 6:
|
|
29
35
|
res = _context.sent;
|
|
30
36
|
rows = res.rows || [];
|
|
37
|
+
if (transfor) {
|
|
38
|
+
rows = transfor(res.rows || []);
|
|
39
|
+
}
|
|
31
40
|
setList(rows);
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
return _context.abrupt("return", rows);
|
|
42
|
+
case 13:
|
|
43
|
+
_context.prev = 13;
|
|
44
|
+
_context.t0 = _context["catch"](1);
|
|
45
|
+
console.error('获取主数据失败:', _context.t0);
|
|
46
|
+
return _context.abrupt("return", []);
|
|
47
|
+
case 17:
|
|
48
|
+
_context.prev = 17;
|
|
34
49
|
setLoading(false);
|
|
35
|
-
return _context.finish(
|
|
36
|
-
case
|
|
50
|
+
return _context.finish(17);
|
|
51
|
+
case 20:
|
|
37
52
|
case "end":
|
|
38
53
|
return _context.stop();
|
|
39
54
|
}
|
|
40
|
-
}, _callee, null, [[
|
|
55
|
+
}, _callee, null, [[1, 13, 17, 20]]);
|
|
41
56
|
}));
|
|
42
57
|
return function run() {
|
|
43
58
|
return _ref.apply(this, arguments);
|
package/lib/http/index.d.ts
CHANGED
|
@@ -71,6 +71,27 @@ export declare function getDict(dictCodes: string, showValue?: boolean, needGate
|
|
|
71
71
|
*/
|
|
72
72
|
export declare function fetchOptions(url: string, param: any, valueField: string, labelField: string, showValue?: boolean, needGateWay?: boolean, timeout?: number, isGet?: boolean, valueIsNumber?: boolean): Promise<any>;
|
|
73
73
|
export declare const getResourceRight: (ids: string[]) => Promise<any>;
|
|
74
|
+
/** 上传文件进度回调 */
|
|
75
|
+
export interface UploadProgressCallback {
|
|
76
|
+
(progress: number): void;
|
|
77
|
+
}
|
|
78
|
+
/** 上传文件返回值 */
|
|
79
|
+
export interface UploadResult {
|
|
80
|
+
promise: Promise<any>;
|
|
81
|
+
cancel: () => void;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 上传文件,因fetch不支持进度回调,使用XMLHttpRequest实现上传文件
|
|
85
|
+
*
|
|
86
|
+
* @param url 上传接口地址
|
|
87
|
+
* @param file 要上传的文件
|
|
88
|
+
* @param params 附加其它参数 {key:value}
|
|
89
|
+
* @param labelName 对应后端接口的文件字段名,默认为 'file'
|
|
90
|
+
* @param needGateWay 是否需要网关,默认为 true,如果url里已包含网关,则不需要网关
|
|
91
|
+
* @param onProgress 进度回调函数,参数为 0-100 的进度百分比
|
|
92
|
+
* @returns 返回包含 promise 和 cancel 方法的对象
|
|
93
|
+
*/
|
|
94
|
+
export declare const httpUpload: (url: string, file: File, params?: Record<string, any>, labelName?: string, needGateWay?: boolean, onProgress?: UploadProgressCallback | undefined) => UploadResult;
|
|
74
95
|
/**
|
|
75
96
|
* 分批获取数据,当一次性取大于2000条,且是第一页时,分多次去取,避免一次性取太多数据导致后端工程压力过大
|
|
76
97
|
*
|