wt-enjoy-link-antd-repack 4.1.17 → 4.1.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm/component/BiuAButton/index.d.ts +2 -2
- package/dist/esm/component/BiuAForm/index.d.ts +1 -1
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +4 -7
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +1 -1
- package/dist/esm/component/BiuField/component/userSelect.d.ts +2 -0
- package/dist/esm/component/BiuField/component/userSelect.js +11 -4
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +1 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +5 -3
- package/dist/esm/component/BiuTableSelect/index.d.ts +1 -1
- package/dist/esm/component/BiuVirtualTable/index.d.ts +1 -1
- package/dist/esm/utils/excelUtils.js +35 -24
- package/package.json +59 -59
@@ -4,14 +4,14 @@ export declare const BiuAButton: React.MemoExoticComponent<import("styled-compon
|
|
4
4
|
target?: string | undefined;
|
5
5
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
6
6
|
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "type" | "onClick"> & {
|
7
|
-
htmlType?: "button" | "
|
7
|
+
htmlType?: "button" | "submit" | "reset" | undefined;
|
8
8
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
9
9
|
} & Omit<React.ButtonHTMLAttributes<any>, "type" | "onClick">> & React.RefAttributes<HTMLElement>, never>> & Omit<React.ForwardRefExoticComponent<Partial<{
|
10
10
|
href: string;
|
11
11
|
target?: string | undefined;
|
12
12
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
13
13
|
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "type" | "onClick"> & {
|
14
|
-
htmlType?: "button" | "
|
14
|
+
htmlType?: "button" | "submit" | "reset" | undefined;
|
15
15
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
16
16
|
} & Omit<React.ButtonHTMLAttributes<any>, "type" | "onClick">> & React.RefAttributes<HTMLElement>> & {
|
17
17
|
Group: React.FC<import("antd/lib/button").ButtonGroupProps>;
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
2
2
|
export { Form as BiuAForm } from 'antd';
|
3
3
|
export declare const BiuAFormItem: React.MemoExoticComponent<(<Values = any>(props: import("antd").FormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
4
4
|
useStatus: () => {
|
5
|
-
status?: "" | "
|
5
|
+
status?: "" | "success" | "warning" | "error" | "validating" | undefined;
|
6
6
|
};
|
7
7
|
}>;
|
@@ -43,12 +43,9 @@ var columns = [{
|
|
43
43
|
dataIndex: 'warehouseCode',
|
44
44
|
ellipsis: true,
|
45
45
|
width: 100
|
46
|
-
},
|
47
|
-
|
48
|
-
|
49
|
-
ellipsis: true,
|
50
|
-
width: 100
|
51
|
-
}, {
|
46
|
+
},
|
47
|
+
// { title: '仓库名称', dataIndex: 'warehouseName', ellipsis: true, width: 100 },
|
48
|
+
{
|
52
49
|
title: '库区编码',
|
53
50
|
dataIndex: 'warehouseAreaCode',
|
54
51
|
ellipsis: true,
|
@@ -133,7 +130,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
133
130
|
setLoading(true);
|
134
131
|
getWarehouseLoctionList({
|
135
132
|
warehouseIds: warehouseIds,
|
136
|
-
|
133
|
+
remoteSearchCValue: sValue,
|
137
134
|
goodsId: goodsId,
|
138
135
|
ownerId: ownerId,
|
139
136
|
defWth: isDefWth,
|
@@ -9,7 +9,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
9
9
|
/**
|
10
10
|
* 0:入库 1:出库 2:移库 3:冻结 4:调整 5:属性变更
|
11
11
|
*/
|
12
|
-
orderType: 0 | 1 |
|
12
|
+
orderType: 0 | 1 | 3 | 2 | 4 | 5;
|
13
13
|
isFirstLoad: boolean;
|
14
14
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
15
15
|
export default _default;
|
@@ -4,5 +4,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
4
4
|
isModel?: "multiple" | "tags" | undefined;
|
5
5
|
onChangeData?: any;
|
6
6
|
warehouseFilter?: any;
|
7
|
+
employeeType?: any;
|
8
|
+
isEnable?: number | undefined;
|
7
9
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
8
10
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["isModel", "onChange", "onChangeData", "value", "warehouseFilter"];
|
2
|
+
var _excluded = ["isModel", "onChange", "onChangeData", "value", "warehouseFilter", "employeeType", "isEnable"];
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -61,6 +61,9 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
61
61
|
value = props.value,
|
62
62
|
_props$warehouseFilte = props.warehouseFilter,
|
63
63
|
warehouseFilter = _props$warehouseFilte === void 0 ? true : _props$warehouseFilte,
|
64
|
+
employeeType = props.employeeType,
|
65
|
+
_props$isEnable = props.isEnable,
|
66
|
+
isEnable = _props$isEnable === void 0 ? 0 : _props$isEnable,
|
64
67
|
restProps = _objectWithoutProperties(props, _excluded);
|
65
68
|
var linkUserInfo = JSON.parse((_sessionStorage$getIt = sessionStorage.getItem(BUBU100_CACHE_USERINFO_KEY)) !== null && _sessionStorage$getIt !== void 0 ? _sessionStorage$getIt : '{}');
|
66
69
|
var _useState = useState([]),
|
@@ -112,13 +115,15 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
112
115
|
getuserData({
|
113
116
|
companyid: departStr,
|
114
117
|
id: value,
|
115
|
-
warehouseFilter: warehouseFilter
|
118
|
+
warehouseFilter: warehouseFilter,
|
119
|
+
employeeType: employeeType,
|
120
|
+
isEnable: isEnable
|
116
121
|
}).then(function (res) {
|
117
122
|
setUserList(res.rows);
|
118
123
|
setLoading(false);
|
119
124
|
});
|
120
125
|
}
|
121
|
-
}, [linkUserInfo.companyid, treeNodeList, value, warehouseFilter]);
|
126
|
+
}, [employeeType, isEnable, linkUserInfo.companyid, treeNodeList, value, warehouseFilter]);
|
122
127
|
var selectProps = useMemo(function () {
|
123
128
|
return {
|
124
129
|
showSearch: true,
|
@@ -133,6 +138,8 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
133
138
|
getuserData({
|
134
139
|
remoteSearchCValue: searchValue,
|
135
140
|
warehouseFilter: warehouseFilter,
|
141
|
+
employeeType: employeeType,
|
142
|
+
isEnable: isEnable,
|
136
143
|
page: 1,
|
137
144
|
size: 20
|
138
145
|
}).then(function (data) {
|
@@ -140,7 +147,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
140
147
|
setUserList(data.rows);
|
141
148
|
}
|
142
149
|
});
|
143
|
-
}, [warehouseFilter]);
|
150
|
+
}, [employeeType, isEnable, warehouseFilter]);
|
144
151
|
return /*#__PURE__*/_jsx(BiuASelect, _objectSpread(_objectSpread(_objectSpread({
|
145
152
|
ref: ref
|
146
153
|
}, selectProps), restProps), {}, {
|
@@ -9,5 +9,6 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
9
9
|
onChangeData?: ((value: any, record: any) => void) | undefined;
|
10
10
|
type?: string | undefined;
|
11
11
|
isFirstLoad?: boolean | undefined;
|
12
|
+
warehouseId?: string | number | undefined;
|
12
13
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
13
14
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["warehouseName", "ownerId", "clientid", "onChange", "onChangeData", "type", "employeecode"];
|
2
|
+
var _excluded = ["warehouseName", "ownerId", "clientid", "onChange", "onChangeData", "type", "employeecode", "warehouseId"];
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -35,6 +35,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
35
35
|
_props$type = props.type,
|
36
36
|
type = _props$type === void 0 ? '' : _props$type,
|
37
37
|
employeecode = props.employeecode,
|
38
|
+
warehouseId = props.warehouseId,
|
38
39
|
restProps = _objectWithoutProperties(props, _excluded);
|
39
40
|
var _useState = useState([]),
|
40
41
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -49,9 +50,10 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
49
50
|
warehouseName: wareName,
|
50
51
|
ownerId: ownerId,
|
51
52
|
clientId: clientid,
|
52
|
-
employeecode: employeecode
|
53
|
+
employeecode: employeecode,
|
54
|
+
warehouseId: warehouseId
|
53
55
|
};
|
54
|
-
}, [wareName, ownerId, clientid, employeecode]);
|
56
|
+
}, [wareName, ownerId, clientid, employeecode, warehouseId]);
|
55
57
|
var onSearch = useCallback(function (value) {
|
56
58
|
setWareName(value);
|
57
59
|
}, []);
|
@@ -46,4 +46,4 @@ export declare const BiuTableSelect: React.MemoExoticComponent<React.ForwardRefE
|
|
46
46
|
* 转换下绑定到组件上的数据源
|
47
47
|
*/
|
48
48
|
dataOption?: ((value: Record<string, any>) => Record<string, any>[]) | undefined;
|
49
|
-
} & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "allowClear" | "showSearch"> & Pick<TableProps<any>, "
|
49
|
+
} & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "allowClear" | "showSearch"> & Pick<TableProps<any>, "onRow" | "dataSource"> & React.RefAttributes<unknown>>>;
|
@@ -10,7 +10,7 @@ export type BiuVirtualTablePropsType = Omit<TableProps<any>, 'columns' | 'scroll
|
|
10
10
|
y: number;
|
11
11
|
};
|
12
12
|
};
|
13
|
-
export declare const BiuVirtualTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TableProps<any>, "
|
13
|
+
export declare const BiuVirtualTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TableProps<any>, "columns" | "scroll"> & {
|
14
14
|
columns: (Omit<BiuColumnType, 'width'> & {
|
15
15
|
width: number;
|
16
16
|
})[];
|
@@ -30,31 +30,42 @@ export var exportExcel = function exportExcel(columns, data) {
|
|
30
30
|
omit[_key2 - 3] = arguments[_key2];
|
31
31
|
}
|
32
32
|
if (!(data === null || data !== null && data !== void 0 && data.length)) {
|
33
|
-
//
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
var keys = [];
|
38
|
-
var keyMap = columns.reduce(function (obj, cur) {
|
39
|
-
if (cur.noShow || omit && omit.includes(cur.dataIndex || cur.key)) return obj;
|
40
|
-
keys.push(cur.dataIndex || cur.key);
|
41
|
-
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, cur.dataIndex || cur.key, cur.title));
|
42
|
-
}, {});
|
43
|
-
var newData = data === null || data === void 0 ? void 0 : data.reduce(function (arr, cur) {
|
44
|
-
var newObj = keys.reduce(function (newCur, key) {
|
45
|
-
return _objectSpread(_objectSpread({}, newCur), {}, _defineProperty({}, keyMap[key], cur[key] === undefined || cur[key] === null ? '' : cur[key]));
|
33
|
+
// const worksheet = utils.json_to_sheet([])
|
34
|
+
var header = columns === null || columns === void 0 ? void 0 : columns.reduce(function (obj, cur) {
|
35
|
+
if (cur.noShow || omit && omit.includes(cur.dataIndex || cur.key)) return obj;
|
36
|
+
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, cur.title, ''));
|
46
37
|
}, {});
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
38
|
+
var worksheet = utils.json_to_sheet([header]);
|
39
|
+
var workbook = utils.book_new();
|
40
|
+
utils.book_append_sheet(workbook, worksheet);
|
41
|
+
writeFile(workbook, "".concat(fileName).concat(moment().format('x'), ".xls"), {
|
42
|
+
bookType: 'xls',
|
43
|
+
bookSST: false,
|
44
|
+
type: 'base64' // 编码方式
|
45
|
+
});
|
46
|
+
} else {
|
47
|
+
var keys = [];
|
48
|
+
var keyMap = columns.reduce(function (obj, cur) {
|
49
|
+
if (cur.noShow || omit && omit.includes(cur.dataIndex || cur.key)) return obj;
|
50
|
+
keys.push(cur.dataIndex || cur.key);
|
51
|
+
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, cur.dataIndex || cur.key, cur.title));
|
52
|
+
}, {});
|
53
|
+
var newData = data === null || data === void 0 ? void 0 : data.reduce(function (arr, cur) {
|
54
|
+
var newObj = keys.reduce(function (newCur, key) {
|
55
|
+
return _objectSpread(_objectSpread({}, newCur), {}, _defineProperty({}, keyMap[key], cur[key] === undefined || cur[key] === null ? '' : cur[key]));
|
56
|
+
}, {});
|
57
|
+
arr.push(newObj);
|
58
|
+
return arr;
|
59
|
+
}, []);
|
60
|
+
var _worksheet = utils.json_to_sheet(newData);
|
61
|
+
var _workbook = utils.book_new();
|
62
|
+
utils.book_append_sheet(_workbook, _worksheet);
|
63
|
+
writeFile(_workbook, "".concat(fileName).concat(moment().format('x'), ".xls"), {
|
64
|
+
bookType: 'xls',
|
65
|
+
bookSST: false,
|
66
|
+
type: 'base64' // 编码方式
|
67
|
+
});
|
68
|
+
}
|
58
69
|
};
|
59
70
|
|
60
71
|
/**
|
package/package.json
CHANGED
@@ -1,59 +1,59 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
"
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
"
|
57
|
-
|
58
|
-
|
59
|
-
}
|
1
|
+
{
|
2
|
+
"name": "wt-enjoy-link-antd-repack",
|
3
|
+
"version": "4.1.21",
|
4
|
+
"description": "纷享链业务组件",
|
5
|
+
"sideEffects": false,
|
6
|
+
"main": "dist/index.js",
|
7
|
+
"module": "dist/esm/index.js",
|
8
|
+
"typings": "dist/esm/index.d.ts",
|
9
|
+
"files": [
|
10
|
+
"dist"
|
11
|
+
],
|
12
|
+
"dependencies": {
|
13
|
+
"@amap/amap-jsapi-loader": "^1.0.1",
|
14
|
+
"@ant-design/icons": "^5.3.0",
|
15
|
+
"ahooks": "^3.7.9",
|
16
|
+
"antd": "^4.24.14",
|
17
|
+
"classnames": "^2.5.1",
|
18
|
+
"dumi": "^2.2.17",
|
19
|
+
"idb": "^7.1.1",
|
20
|
+
"jsbarcode": "^3.11.6",
|
21
|
+
"lodash": "^4.17.20",
|
22
|
+
"moment": "^2.30.1",
|
23
|
+
"path": "^0.12.7",
|
24
|
+
"react": "^18.2.0",
|
25
|
+
"react-dom": "^18.2.0",
|
26
|
+
"react-drag-listview": "^2.0.0",
|
27
|
+
"react-draggable": "^4.4.6",
|
28
|
+
"react-resizable": "^3.0.5",
|
29
|
+
"react-window": "^1.8.10",
|
30
|
+
"styled-components": "^6.1.8",
|
31
|
+
"umi-request": "^1.3.9",
|
32
|
+
"use-media-antd-query": "^1.1.0",
|
33
|
+
"xlsx": "^0.18.5"
|
34
|
+
},
|
35
|
+
"devDependencies": {
|
36
|
+
"@types/lodash": "^4.14.202",
|
37
|
+
"@types/node": "^20.11.14",
|
38
|
+
"@types/react": "^18.2.48",
|
39
|
+
"@types/react-dom": "^18.2.17",
|
40
|
+
"@types/react-resizable": "^3.0.7",
|
41
|
+
"@types/react-window": "^1.8.8",
|
42
|
+
"@umijs/fabric": "^4.0.1",
|
43
|
+
"eslint": "^8.54.0",
|
44
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
45
|
+
"eslint-plugin-import": "^2.29.0",
|
46
|
+
"father": "^4.4.0",
|
47
|
+
"prettier": "^3.2.4",
|
48
|
+
"typescript": "^5.3.2"
|
49
|
+
},
|
50
|
+
"publishConfig": {
|
51
|
+
"registry": "https://registry.npmjs.org"
|
52
|
+
},
|
53
|
+
"scripts": {
|
54
|
+
"start": "dumi dev",
|
55
|
+
"start:hot-rebuild": "father dev",
|
56
|
+
"build": "father build",
|
57
|
+
"repack": "pnpm run build && pnpm publish --no-git-checks && npx cnpm sync enjoy-link-antd-repack"
|
58
|
+
}
|
59
|
+
}
|