wt-enjoy-link-antd-repack 4.1.23 → 4.1.25
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/esm/component/BiuAButton/index.js +1 -1
- package/dist/esm/component/BiuAForm/index.d.ts +1 -1
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +4 -4
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +1 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +9 -5
- package/dist/esm/component/BiuField/component/index.d.ts +1 -0
- package/dist/esm/component/BiuField/component/index.js +1 -0
- package/dist/esm/component/BiuField/component/lpnSelectNew.d.ts +9 -0
- package/dist/esm/component/BiuField/component/lpnSelectNew.js +114 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +1 -1
- package/dist/esm/component/BiuField/component/userSelect.js +2 -2
- package/dist/esm/component/BiuField/index.d.ts +1 -1
- package/dist/esm/component/BiuField/index.js +25 -15
- package/dist/esm/component/BiuTable/component/tableCellRender.js +1 -1
- package/dist/esm/component/BiuTableSelect/index.d.ts +1 -1
- package/dist/esm/hooks/useAuth.js +1 -1
- package/dist/esm/hooks/useCurrentSystem.js +5 -5
- package/dist/esm/hooks/useUserInfo.js +5 -5
- package/dist/esm/utils/authUtils.js +6 -6
- package/dist/esm/utils/excelUtils.js +2 -1
- package/package.json +1 -1
@@ -4,5 +4,5 @@ import { styled } from 'styled-components';
|
|
4
4
|
var StyledAButton = styled(Button).withConfig({
|
5
5
|
displayName: "StyledAButton",
|
6
6
|
componentId: "wt-enjoy-link-antd-repack__sc-1r2pes0-0"
|
7
|
-
})(["height:26px !important;&:not(.ant-btn-circle){border-radius:3px !important;padding:0 15px !important;}&.ant-btn-primary{background:#0470fe;border-color:none;color:#ffffff;&:hover{background:#478bff;}&:active{background:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-default{border-color:#d6d6d6;background:#ffffff;color:#333333;&:hover{color:#478bff;border-color:#478bff;}&:active{color:#305fd6;border-color:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-background-ghost{border-color:#4578f8;background:#ffffff;color:#4578f8;&:hover{color:#478bff;border-color:#478bff;}&:active{color:#305fd6;border-color:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-link{color:#0470fe;&:hover{color:#478bff;}&:active{color:#305fd6;}&[disabled]{color:#c8c8c8 !important;}}"]);
|
7
|
+
})(["height:26px !important;&:not(.ant-btn-circle){border-radius:3px !important;padding:0 15px !important;}&.ant-btn-primary{background:#0470fe;border-color:none;color:#ffffff;&:hover{background:#478bff;}&:active{background:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-default{border-color:#d6d6d6;background:#ffffff;color:#333333;&:hover{color:#478bff;border-color:#478bff;}&:active{color:#305fd6;border-color:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-background-ghost{border-color:#4578f8;background:#ffffff;color:#4578f8;&:hover{color:#478bff;border-color:#478bff;}&:active{color:#305fd6;border-color:#305fd6;}&[disabled]{background:#fafafa !important;color:#c8c8c8 !important;border:1px solid #d6d6d6 !important;}}&.ant-btn-link{color:#0470fe;&:hover{color:#478bff;}&:active{color:#305fd6;}&[disabled]{color:#c8c8c8 !important;}}&.ant-btn-dangerous{background:#ffffff !important;border:1px solid #ff4d4f !important;color:#ff4d4f !important;&:active{border:1px solid #ff7072 !important;color:#ff7072;}&:active{color:#e63739;border-color:#e63739;}&[disabled]{border:1px solit #D6D6D6 !important;color:#C8C8C8 !important;background:#FAFAFA !important;}}"]);
|
8
8
|
export var BiuAButton = /*#__PURE__*/React.memo(StyledAButton);
|
@@ -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
|
}>;
|
@@ -17,7 +17,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
17
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
18
18
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
-
import { useBoolean, useMount,
|
20
|
+
import { useBoolean, useMount, useLocalStorageState, useToggle } from 'ahooks';
|
21
21
|
import { Checkbox, TreeSelect } from 'antd';
|
22
22
|
import { isFunction } from 'lodash';
|
23
23
|
import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
|
@@ -266,9 +266,9 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
266
266
|
_useBoolean2$ = _useBoolean2[1],
|
267
267
|
setFalse = _useBoolean2$.setFalse,
|
268
268
|
setTrue = _useBoolean2$.setTrue;
|
269
|
-
var
|
270
|
-
|
271
|
-
linkUserInfo =
|
269
|
+
var _useLocalStorageState = useLocalStorageState(BUBU100_CACHE_USERINFO_KEY),
|
270
|
+
_useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 1),
|
271
|
+
linkUserInfo = _useLocalStorageState2[0];
|
272
272
|
|
273
273
|
/**
|
274
274
|
* 初始化的时候获取数据源,需要注意的是,固定参数不支持后续更改
|
@@ -18,6 +18,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
18
18
|
addresstype?: "1" | "2" | undefined;
|
19
19
|
clientidNull?: string | undefined;
|
20
20
|
addresstypeStr?: string | undefined;
|
21
|
+
addressAttrStr?: string | undefined;
|
21
22
|
requestParams?: ((params: any) => any) | undefined;
|
22
23
|
} & React.RefAttributes<unknown>>>;
|
23
24
|
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["clientid", "initialValue", "searchTimes", "addresstype", "rowLabel", "clientidNull", "addresstypeStr", "value", "requestParams"];
|
1
|
+
var _excluded = ["clientid", "initialValue", "searchTimes", "addresstype", "rowLabel", "clientidNull", "addresstypeStr", "addressAttrStr", "value", "requestParams"];
|
2
2
|
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); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -86,6 +86,8 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
86
86
|
clientidNull = _props$clientidNull === void 0 ? '' : _props$clientidNull,
|
87
87
|
_props$addresstypeStr = props.addresstypeStr,
|
88
88
|
addresstypeStr = _props$addresstypeStr === void 0 ? '' : _props$addresstypeStr,
|
89
|
+
_props$addressAttrStr = props.addressAttrStr,
|
90
|
+
addressAttrStr = _props$addressAttrStr === void 0 ? '' : _props$addressAttrStr,
|
89
91
|
value = props.value,
|
90
92
|
_props$requestParams = props.requestParams,
|
91
93
|
requestParams = _props$requestParams === void 0 ? function (params) {
|
@@ -117,7 +119,8 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
117
119
|
id: initialValue,
|
118
120
|
addresstype: addresstype,
|
119
121
|
clientidNull: clientidNull,
|
120
|
-
addresstypeStr: addresstypeStr
|
122
|
+
addresstypeStr: addresstypeStr,
|
123
|
+
addressAttrStr: addressAttrStr
|
121
124
|
}).then(function (_ref) {
|
122
125
|
var _ref$rows = _ref.rows,
|
123
126
|
rows = _ref$rows === void 0 ? [] : _ref$rows;
|
@@ -144,7 +147,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
144
147
|
setLoading(false);
|
145
148
|
});
|
146
149
|
}
|
147
|
-
}, [addresstype, addresstypeStr, clientidNull, initialValue, props, rowLabel]);
|
150
|
+
}, [addresstype, addresstypeStr, addressAttrStr, clientidNull, initialValue, props, rowLabel]);
|
148
151
|
var onSearch = useCallback(function (sValue) {
|
149
152
|
if (timerRef.current) clearTimeout(timerRef.current);
|
150
153
|
timerRef.current = setTimeout(function () {
|
@@ -154,7 +157,8 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
154
157
|
remoteSearchCValue: sValue,
|
155
158
|
addresstype: addresstype,
|
156
159
|
clientidNull: clientidNull,
|
157
|
-
addresstypeStr: addresstypeStr
|
160
|
+
addresstypeStr: addresstypeStr,
|
161
|
+
addressAttrStr: addressAttrStr
|
158
162
|
})).then(function (_ref2) {
|
159
163
|
var _ref2$rows = _ref2.rows,
|
160
164
|
rows = _ref2$rows === void 0 ? [] : _ref2$rows;
|
@@ -170,7 +174,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
170
174
|
setLoading(false);
|
171
175
|
});
|
172
176
|
}, searchTimes);
|
173
|
-
}, [addresstype, addresstypeStr, clientid, clientidNull, requestParams, searchTimes]);
|
177
|
+
}, [addresstype, addresstypeStr, addressAttrStr, clientid, clientidNull, requestParams, searchTimes]);
|
174
178
|
return /*#__PURE__*/_jsx(TableSelectBase, _objectSpread(_objectSpread({
|
175
179
|
ref: ref
|
176
180
|
}, restProps), {}, {
|
@@ -24,6 +24,7 @@ export { default as PlatformSelect } from './electronicFaceSheet/platformSelect'
|
|
24
24
|
export { default as GoodsTypeSelect } from './goodsTypeSelect';
|
25
25
|
export { default as InterfaceNameSelect } from './interfaceNameSelect';
|
26
26
|
export { default as LpnSelect } from './lpnSelect';
|
27
|
+
export { default as LpnSelectNew } from './lpnSelectNew';
|
27
28
|
export { default as OrderTypeSelect } from './orderTypeSelect';
|
28
29
|
export { default as OrderTypeTableSelect } from './orderTypeTableSelect';
|
29
30
|
export { default as DistributionCentreSelect } from './parkSelect';
|
@@ -24,6 +24,7 @@ export { default as PlatformSelect } from "./electronicFaceSheet/platformSelect"
|
|
24
24
|
export { default as GoodsTypeSelect } from "./goodsTypeSelect";
|
25
25
|
export { default as InterfaceNameSelect } from "./interfaceNameSelect";
|
26
26
|
export { default as LpnSelect } from "./lpnSelect";
|
27
|
+
export { default as LpnSelectNew } from "./lpnSelectNew";
|
27
28
|
export { default as OrderTypeSelect } from "./orderTypeSelect";
|
28
29
|
export { default as OrderTypeTableSelect } from "./orderTypeTableSelect";
|
29
30
|
export { default as DistributionCentreSelect } from "./parkSelect";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { SelectProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
4
|
+
locationId?: string | number | undefined;
|
5
|
+
onChangeData?: ((value: any, record: any) => void) | undefined;
|
6
|
+
isFirstLoad?: boolean | undefined;
|
7
|
+
isAutoComplete?: boolean | undefined;
|
8
|
+
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
9
|
+
export default _default;
|
@@ -0,0 +1,114 @@
|
|
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 = ["locationId", "onChange", "onChangeData", "isFirstLoad", "isAutoComplete"];
|
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
|
+
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
|
+
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; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
16
|
+
import { AutoComplete } from 'antd';
|
17
|
+
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
18
|
+
import { BiuASelect, BiuASelectOption } from "../../BiuASelect";
|
19
|
+
import { GATEWAY_ROUTE_WMS } from "../../../constant";
|
20
|
+
import { request } from "../../../package";
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
22
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
23
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
var getLpnList = function getLpnList(queryData) {
|
25
|
+
return request({
|
26
|
+
apiName: 'wms.stock.queryLpnInfoByLocationId',
|
27
|
+
data: queryData,
|
28
|
+
requestConfig: {
|
29
|
+
GatewayRoute: GATEWAY_ROUTE_WMS
|
30
|
+
}
|
31
|
+
});
|
32
|
+
};
|
33
|
+
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
34
|
+
var _useState = useState([]),
|
35
|
+
_useState2 = _slicedToArray(_useState, 2),
|
36
|
+
result = _useState2[0],
|
37
|
+
setResult = _useState2[1];
|
38
|
+
var locationId = props.locationId,
|
39
|
+
_onChange = props.onChange,
|
40
|
+
onChangeData = props.onChangeData,
|
41
|
+
_props$isFirstLoad = props.isFirstLoad,
|
42
|
+
isFirstLoad = _props$isFirstLoad === void 0 ? true : _props$isFirstLoad,
|
43
|
+
_props$isAutoComplete = props.isAutoComplete,
|
44
|
+
isAutoComplete = _props$isAutoComplete === void 0 ? true : _props$isAutoComplete,
|
45
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
46
|
+
var _useState3 = useState(isFirstLoad),
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
48
|
+
isFirstLoadSearch = _useState4[0],
|
49
|
+
setIsFirstLoadSearch = _useState4[1];
|
50
|
+
useEffect(function () {
|
51
|
+
if (!locationId) {
|
52
|
+
setResult([]);
|
53
|
+
return;
|
54
|
+
}
|
55
|
+
getLpnList({
|
56
|
+
locationId: locationId
|
57
|
+
}).then(function (res) {
|
58
|
+
var data = res.map(function (item) {
|
59
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
60
|
+
title: item.lpn,
|
61
|
+
label: item.lpn,
|
62
|
+
value: item.lpn
|
63
|
+
});
|
64
|
+
});
|
65
|
+
setResult(data || []);
|
66
|
+
});
|
67
|
+
}, [locationId, isFirstLoadSearch]);
|
68
|
+
var onSearch = useCallback(function () {
|
69
|
+
setIsFirstLoadSearch(true);
|
70
|
+
}, []);
|
71
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
72
|
+
children: [isAutoComplete && /*#__PURE__*/_jsx(AutoComplete, {
|
73
|
+
popupClassName: "certain-category-search-dropdown",
|
74
|
+
dropdownMatchSelectWidth: 100,
|
75
|
+
style: {
|
76
|
+
width: 100
|
77
|
+
},
|
78
|
+
options: result,
|
79
|
+
placeholder: "\u8BF7\u9009\u62E9\u6258\u76D8",
|
80
|
+
onSearch: onSearch,
|
81
|
+
onChange: function onChange(value, option) {
|
82
|
+
if (_onChange) {
|
83
|
+
_onChange(value, option);
|
84
|
+
}
|
85
|
+
if (onChangeData) {
|
86
|
+
onChangeData(value, result.filter(function (item) {
|
87
|
+
return "".concat(item.value) === "".concat(value);
|
88
|
+
})[0]);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}), !isAutoComplete && /*#__PURE__*/_jsx(BiuASelect, _objectSpread(_objectSpread({
|
92
|
+
ref: ref,
|
93
|
+
showSearch: true,
|
94
|
+
optionFilterProp: "children",
|
95
|
+
loading: false
|
96
|
+
}, restProps), {}, {
|
97
|
+
onChange: function onChange(value, option) {
|
98
|
+
if (_onChange) _onChange(value, option);
|
99
|
+
if (onChangeData) {
|
100
|
+
onChangeData(value, result.filter(function (item) {
|
101
|
+
return "".concat(item.id) === "".concat(value);
|
102
|
+
})[0]);
|
103
|
+
}
|
104
|
+
},
|
105
|
+
onSearch: onSearch,
|
106
|
+
children: result.map(function (e) {
|
107
|
+
return /*#__PURE__*/_jsx(BiuASelectOption, {
|
108
|
+
value: e.lpn,
|
109
|
+
children: e.lpn || ''
|
110
|
+
}, e.id);
|
111
|
+
})
|
112
|
+
}), "lpnSelectNew")]
|
113
|
+
});
|
114
|
+
}));
|
@@ -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 | 3 | 1 |
|
12
|
+
orderType: 0 | 3 | 1 | 2 | 5 | 4;
|
13
13
|
isFirstLoad: boolean;
|
14
14
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
15
15
|
export default _default;
|
@@ -54,7 +54,7 @@ var flatSubValue = function flatSubValue(departList, currentId) {
|
|
54
54
|
return subObj;
|
55
55
|
};
|
56
56
|
export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
57
|
-
var
|
57
|
+
var _localStorage$getItem;
|
58
58
|
var mode = props.isModel,
|
59
59
|
onChange = props.onChange,
|
60
60
|
onChangeData = props.onChangeData,
|
@@ -65,7 +65,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
65
65
|
_props$isEnable = props.isEnable,
|
66
66
|
isEnable = _props$isEnable === void 0 ? 0 : _props$isEnable,
|
67
67
|
restProps = _objectWithoutProperties(props, _excluded);
|
68
|
-
var linkUserInfo = JSON.parse((
|
68
|
+
var linkUserInfo = JSON.parse((_localStorage$getItem = localStorage.getItem(BUBU100_CACHE_USERINFO_KEY)) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : '{}');
|
69
69
|
var _useState = useState([]),
|
70
70
|
_useState2 = _slicedToArray(_useState, 2),
|
71
71
|
userList = _useState2[0],
|
@@ -4,5 +4,5 @@ export type BiuFieldPropsType = {
|
|
4
4
|
} & {
|
5
5
|
[P in string]: any;
|
6
6
|
};
|
7
|
-
export type BiuFieldType = 'sninput' | 'omswarehousesel' | 'cityareaselect' | 'label' | 'text' | 'textarea' | 'inputpassword' | 'number' | 'time' | 'date' | 'datetime' | 'month' | 'dicselect' | 'cityareacascader' | 'daterange' | 'distributioncentreselect' | 'warehouseinfoselect' | 'warehouseloctionwelect' | 'departtreeselect' | 'select' | 'goodsselect' | 'warehouseareaselect' | 'clientselect' | 'checkbox' | 'ordertypetableselect' | 'customer' | 'goodstypeselect' | 'shipperselect' | 'ordertypeselect' | 'dicselectname' | 'carrierinfoselect' | 'databaseSelect' | 'editLocationSelect' | 'departorgselect' | 'departmentTreeSelect' | 'tableselectlocal' | 'appliedgoodstypeselect' | 'dockingPartySelect' | 'interfaceNameSelect' | 'boxtypeselect' | 'propertNameSelect' | 'userSelect' | 'channelSelect' | 'customMenu' | 'lpnselect' | 'autoComplete' | 'platformSelect' | 'accountSelect' | 'addressSelect' | 'addressTableSelect' | 'personnelinfoselect' | 'businessdistrictselect' | 'checkboxgroup' | 'filter';
|
7
|
+
export type BiuFieldType = 'sninput' | 'omswarehousesel' | 'cityareaselect' | 'label' | 'text' | 'textarea' | 'inputpassword' | 'number' | 'time' | 'date' | 'datetime' | 'month' | 'dicselect' | 'cityareacascader' | 'daterange' | 'distributioncentreselect' | 'warehouseinfoselect' | 'warehouseloctionwelect' | 'departtreeselect' | 'select' | 'goodsselect' | 'warehouseareaselect' | 'clientselect' | 'checkbox' | 'ordertypetableselect' | 'customer' | 'goodstypeselect' | 'shipperselect' | 'ordertypeselect' | 'dicselectname' | 'carrierinfoselect' | 'databaseSelect' | 'editLocationSelect' | 'departorgselect' | 'departmentTreeSelect' | 'tableselectlocal' | 'appliedgoodstypeselect' | 'dockingPartySelect' | 'interfaceNameSelect' | 'boxtypeselect' | 'propertNameSelect' | 'userSelect' | 'channelSelect' | 'customMenu' | 'lpnselect' | 'lpnSelectNew' | 'autoComplete' | 'platformSelect' | 'accountSelect' | 'addressSelect' | 'addressTableSelect' | 'personnelinfoselect' | 'businessdistrictselect' | 'checkboxgroup' | 'filter';
|
8
8
|
export declare const BiuField: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<BiuFieldPropsType, "ref"> & React.RefAttributes<unknown>>>;
|
@@ -29,7 +29,7 @@ import { Checkbox } from 'antd';
|
|
29
29
|
import { omit, pick } from 'lodash';
|
30
30
|
import moment from 'moment';
|
31
31
|
import React, { forwardRef, useMemo } from 'react';
|
32
|
-
import { AccountSelect, AddressSelect, AddressTableSelect, AppliedgoodsTypeSelect, AutoCompleteSelect, BoxTypeSelect, CarrierInfoSelect, ChannelSelect, CityAreaCascader, CityAreaSelect, ClientInfoTableSelect, CustomMenu, DatabaseSelect, DepartmentTreeSelect, DepartOrgSelect, DicNameSelect, DicTypeSelect, DistributionCentreSelect, DockingPartySelect, EditLocationSelect, GoodsTypeSelect, InterfaceNameSelect, LpnSelect, OmsWarehouseSel, OrderTypeSelect, OrderTypeTableSelect, PersonnelInfoSelect, BusinessDistrictSelect, PlatformSelect, PropertNameSelect, ShipperTableSelect, SNInput, TableSelectLocal, UserSelect, WarehouseAreaSelect, WarehouseLoctionSelect, WarehouseSelect } from "./component";
|
32
|
+
import { AccountSelect, AddressSelect, AddressTableSelect, AppliedgoodsTypeSelect, AutoCompleteSelect, BoxTypeSelect, CarrierInfoSelect, ChannelSelect, CityAreaCascader, CityAreaSelect, ClientInfoTableSelect, CustomMenu, DatabaseSelect, DepartmentTreeSelect, DepartOrgSelect, DicNameSelect, DicTypeSelect, DistributionCentreSelect, DockingPartySelect, EditLocationSelect, GoodsTypeSelect, InterfaceNameSelect, LpnSelect, OmsWarehouseSel, OrderTypeSelect, OrderTypeTableSelect, PersonnelInfoSelect, BusinessDistrictSelect, PlatformSelect, PropertNameSelect, ShipperTableSelect, SNInput, TableSelectLocal, UserSelect, WarehouseAreaSelect, WarehouseLoctionSelect, WarehouseSelect, LpnSelectNew } from "./component";
|
33
33
|
import { BiuCustomSelect, BiuAInput, BiuATextArea, BiuAPassword, BiuAInputNumber, BiuADatePicker, BiuAMouthPicker, BiuARangePicker, BiuATimePicker } from "./..";
|
34
34
|
import { objToMoment } from "../../utils";
|
35
35
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -551,52 +551,62 @@ export var BiuField = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function
|
|
551
551
|
placeholder: "\u8BF7\u9009\u62E9"
|
552
552
|
}, commonProps));
|
553
553
|
}
|
554
|
-
case '
|
554
|
+
case 'lpnSelectNew':
|
555
555
|
{
|
556
556
|
var _onChangeData18 = diffProps.onChangeData,
|
557
557
|
_allowClear41 = diffProps.allowClear;
|
558
|
-
return /*#__PURE__*/_jsx(
|
558
|
+
return /*#__PURE__*/_jsx(LpnSelectNew, _objectSpread({
|
559
559
|
allowClear: _allowClear41,
|
560
|
-
onChangeData: _onChangeData18
|
560
|
+
onChangeData: _onChangeData18,
|
561
|
+
placeholder: "\u8BF7\u9009\u62E9"
|
561
562
|
}, commonProps));
|
562
563
|
}
|
563
|
-
case '
|
564
|
+
case 'autoComplete':
|
564
565
|
{
|
565
566
|
var _onChangeData19 = diffProps.onChangeData,
|
566
567
|
_allowClear42 = diffProps.allowClear;
|
567
|
-
return /*#__PURE__*/_jsx(
|
568
|
+
return /*#__PURE__*/_jsx(AutoCompleteSelect, _objectSpread({
|
568
569
|
allowClear: _allowClear42,
|
569
|
-
onChangeData: _onChangeData19
|
570
|
-
placeholder: "\u8BF7\u9009\u62E9"
|
570
|
+
onChangeData: _onChangeData19
|
571
571
|
}, commonProps));
|
572
572
|
}
|
573
|
-
case '
|
573
|
+
case 'platformSelect':
|
574
574
|
{
|
575
575
|
var _onChangeData20 = diffProps.onChangeData,
|
576
576
|
_allowClear43 = diffProps.allowClear;
|
577
|
-
return /*#__PURE__*/_jsx(
|
577
|
+
return /*#__PURE__*/_jsx(PlatformSelect, _objectSpread({
|
578
578
|
allowClear: _allowClear43,
|
579
|
-
onChangeData: _onChangeData20
|
579
|
+
onChangeData: _onChangeData20,
|
580
|
+
placeholder: "\u8BF7\u9009\u62E9"
|
580
581
|
}, commonProps));
|
581
582
|
}
|
582
|
-
case '
|
583
|
+
case 'accountSelect':
|
583
584
|
{
|
584
585
|
var _onChangeData21 = diffProps.onChangeData,
|
585
586
|
_allowClear44 = diffProps.allowClear;
|
586
|
-
return /*#__PURE__*/_jsx(
|
587
|
+
return /*#__PURE__*/_jsx(AccountSelect, _objectSpread({
|
587
588
|
allowClear: _allowClear44,
|
588
589
|
onChangeData: _onChangeData21
|
589
590
|
}, commonProps));
|
590
591
|
}
|
591
|
-
case '
|
592
|
+
case 'addressSelect':
|
592
593
|
{
|
593
594
|
var _onChangeData22 = diffProps.onChangeData,
|
594
595
|
_allowClear45 = diffProps.allowClear;
|
595
|
-
return /*#__PURE__*/_jsx(
|
596
|
+
return /*#__PURE__*/_jsx(AddressSelect, _objectSpread({
|
596
597
|
allowClear: _allowClear45,
|
597
598
|
onChangeData: _onChangeData22
|
598
599
|
}, commonProps));
|
599
600
|
}
|
601
|
+
case 'addressTableSelect':
|
602
|
+
{
|
603
|
+
var _onChangeData23 = diffProps.onChangeData,
|
604
|
+
_allowClear46 = diffProps.allowClear;
|
605
|
+
return /*#__PURE__*/_jsx(AddressTableSelect, _objectSpread({
|
606
|
+
allowClear: _allowClear46,
|
607
|
+
onChangeData: _onChangeData23
|
608
|
+
}, commonProps));
|
609
|
+
}
|
600
610
|
default:
|
601
611
|
var allowClear = diffProps.allowClear;
|
602
612
|
return /*#__PURE__*/_jsx(BiuAInput, _objectSpread({
|
@@ -21,7 +21,7 @@ var ColumnActionItem = /*#__PURE__*/React.memo(function (props) {
|
|
21
21
|
title = props.title,
|
22
22
|
onLinkClick = props.onLinkClick;
|
23
23
|
var resolveCodeList = [];
|
24
|
-
var cacheButtonAuth =
|
24
|
+
var cacheButtonAuth = localStorage.getItem(BUBU100_CACHE_AUTH_BUTTON_KEY);
|
25
25
|
if (cacheButtonAuth) {
|
26
26
|
resolveCodeList = JSON.parse(cacheButtonAuth).resolveCodeList || [];
|
27
27
|
}
|
@@ -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>, "
|
49
|
+
} & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "allowClear" | "showSearch"> & Pick<TableProps<any>, "onRow" | "dataSource"> & React.RefAttributes<unknown>>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useCallback, useMemo } from 'react';
|
2
2
|
import { BUBU100_CACHE_AUTH_BUTTON_KEY } from "../constant";
|
3
|
-
var cacheButtonAuth =
|
3
|
+
var cacheButtonAuth = localStorage.getItem(BUBU100_CACHE_AUTH_BUTTON_KEY);
|
4
4
|
var resolveCodeList = [];
|
5
5
|
if (cacheButtonAuth) {
|
6
6
|
resolveCodeList = JSON.parse(cacheButtonAuth).resolveCodeList || [];
|
@@ -4,12 +4,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
-
import {
|
7
|
+
import { useLocalStorageState } from 'ahooks';
|
8
8
|
import { BUBU100_CACHE_SYSTEM_KEY } from "../constant";
|
9
9
|
export var useCurrentSystem = function useCurrentSystem() {
|
10
|
-
var
|
11
|
-
|
12
|
-
currentSystem =
|
13
|
-
setCurrentSystem =
|
10
|
+
var _useLocalStorageState = useLocalStorageState(BUBU100_CACHE_SYSTEM_KEY),
|
11
|
+
_useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2),
|
12
|
+
currentSystem = _useLocalStorageState2[0],
|
13
|
+
setCurrentSystem = _useLocalStorageState2[1];
|
14
14
|
return [currentSystem !== null && currentSystem !== void 0 ? currentSystem : 'SSO', setCurrentSystem];
|
15
15
|
};
|
@@ -4,12 +4,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
-
import {
|
7
|
+
import { useLocalStorageState } from 'ahooks';
|
8
8
|
import { BUBU100_CACHE_USERINFO_KEY } from "../constant";
|
9
9
|
export var useUserInfo = function useUserInfo() {
|
10
|
-
var
|
11
|
-
|
12
|
-
userInfo =
|
13
|
-
setUserInfo =
|
10
|
+
var _useLocalStorageState = useLocalStorageState(BUBU100_CACHE_USERINFO_KEY),
|
11
|
+
_useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2),
|
12
|
+
userInfo = _useLocalStorageState2[0],
|
13
|
+
setUserInfo = _useLocalStorageState2[1];
|
14
14
|
return [userInfo !== null && userInfo !== void 0 ? userInfo : {}, setUserInfo];
|
15
15
|
};
|
@@ -4,29 +4,29 @@ import { BUBU100_CACHE_AUTH_TOKEN_KEY, BUBU100_CACHE_TOKEN_KEY } from "../consta
|
|
4
4
|
* 清除 token
|
5
5
|
*/
|
6
6
|
export function clearToken() {
|
7
|
-
|
7
|
+
localStorage.removeItem(BUBU100_CACHE_TOKEN_KEY);
|
8
8
|
}
|
9
9
|
/**
|
10
10
|
* 设置 token
|
11
11
|
* @param token token
|
12
12
|
*/
|
13
13
|
export function setToken(token) {
|
14
|
-
|
14
|
+
localStorage.setItem(BUBU100_CACHE_TOKEN_KEY, token);
|
15
15
|
}
|
16
16
|
/**
|
17
17
|
* 获取 token
|
18
18
|
*/
|
19
19
|
export function getToken() {
|
20
|
-
return
|
20
|
+
return localStorage.getItem(BUBU100_CACHE_TOKEN_KEY);
|
21
21
|
}
|
22
22
|
export function clearAuthToken() {
|
23
|
-
|
23
|
+
localStorage.removeItem(BUBU100_CACHE_AUTH_TOKEN_KEY);
|
24
24
|
}
|
25
25
|
export function setAuthToken(token) {
|
26
|
-
|
26
|
+
localStorage.setItem(BUBU100_CACHE_AUTH_TOKEN_KEY, token);
|
27
27
|
}
|
28
28
|
export function getAuthToken() {
|
29
|
-
return
|
29
|
+
return localStorage.getItem(BUBU100_CACHE_AUTH_TOKEN_KEY);
|
30
30
|
}
|
31
31
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
@@ -103,8 +103,9 @@ export var importExcel = function importExcel(file, fieldMap, dataOptions) {
|
|
103
103
|
var dataSource = jArray.reduce(function (arr, cur, index) {
|
104
104
|
if (index <= importOptions.rowStart - 1) return arr;
|
105
105
|
var obj = {};
|
106
|
+
//时间导入会少43秒,所有手动加上43秒
|
106
107
|
cur.forEach(function (item, itemIndex) {
|
107
|
-
var value = moment.
|
108
|
+
var value = moment.isDate(item) ? moment(item).add(43, 's').format('YYYY-MM-DD HH:mm:ss') : item;
|
108
109
|
var title = sheetTitle[itemIndex];
|
109
110
|
obj[fieldMap ? fieldMap[title] : title] = value;
|
110
111
|
});
|