wt-enjoy-link-antd-repack 4.1.30 → 4.1.32
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/BiuAForm/index.d.ts +1 -1
- package/dist/esm/component/BiuField/component/lpnSelectNew.d.ts +2 -1
- package/dist/esm/component/BiuField/component/lpnSelectNew.js +11 -7
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +1 -1
- package/dist/esm/component/BiuTableSelect/index.d.ts +1 -1
- package/dist/esm/component/BiuVirtualTable/index.d.ts +1 -1
- package/dist/esm/package/requestWrapper/index.js +7 -7
- package/package.json +1 -1
@@ -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?: "" | "warning" | "error" | "success" | "validating" | undefined;
|
6
6
|
};
|
7
7
|
}>;
|
@@ -6,6 +6,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
6
6
|
isFirstLoad?: boolean | undefined;
|
7
7
|
isAutoComplete?: boolean | undefined;
|
8
8
|
locationType?: number | undefined;
|
9
|
-
|
9
|
+
defaultValues?: string | number | undefined;
|
10
|
+
style?: any;
|
10
11
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
11
12
|
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 = ["locationId", "onChange", "onChangeData", "isFirstLoad", "isAutoComplete", "locationType", "
|
2
|
+
var _excluded = ["locationId", "onChange", "onChangeData", "isFirstLoad", "isAutoComplete", "locationType", "defaultValues", "style"];
|
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; }
|
@@ -43,18 +43,21 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
43
43
|
_props$isAutoComplete = props.isAutoComplete,
|
44
44
|
isAutoComplete = _props$isAutoComplete === void 0 ? true : _props$isAutoComplete,
|
45
45
|
locationType = props.locationType,
|
46
|
-
|
46
|
+
defaultValues = props.defaultValues,
|
47
|
+
style = props.style,
|
47
48
|
restProps = _objectWithoutProperties(props, _excluded);
|
48
49
|
var _useState3 = useState(isFirstLoad),
|
49
50
|
_useState4 = _slicedToArray(_useState3, 2),
|
50
51
|
isFirstLoadSearch = _useState4[0],
|
51
52
|
setIsFirstLoadSearch = _useState4[1];
|
52
|
-
var _useState5 = useState(
|
53
|
+
var _useState5 = useState(defaultValues),
|
53
54
|
_useState6 = _slicedToArray(_useState5, 2),
|
54
55
|
defaultValue = _useState6[0],
|
55
56
|
setDefaultValue = _useState6[1];
|
56
57
|
useEffect(function () {
|
57
|
-
|
58
|
+
if (locationId) {
|
59
|
+
setDefaultValue('');
|
60
|
+
}
|
58
61
|
}, [locationId]);
|
59
62
|
useEffect(function () {
|
60
63
|
if (!locationType && !locationId) {
|
@@ -78,7 +81,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
78
81
|
});
|
79
82
|
setResult(data || []);
|
80
83
|
});
|
81
|
-
}, [locationId, isFirstLoadSearch, locationType,
|
84
|
+
}, [locationId, isFirstLoadSearch, locationType, defaultValue]);
|
82
85
|
var onSearch = useCallback(function () {
|
83
86
|
setIsFirstLoadSearch(true);
|
84
87
|
}, []);
|
@@ -87,9 +90,9 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
87
90
|
popupClassName: "certain-category-search-dropdown"
|
88
91
|
// dropdownMatchSelectWidth={100}
|
89
92
|
,
|
90
|
-
style: {
|
93
|
+
style: _objectSpread({
|
91
94
|
width: '100%'
|
92
|
-
},
|
95
|
+
}, style),
|
93
96
|
options: result,
|
94
97
|
placeholder: "\u8BF7\u9009\u62E9\u6258\u76D8",
|
95
98
|
onSearch: onSearch,
|
@@ -110,6 +113,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
110
113
|
showSearch: true,
|
111
114
|
optionFilterProp: "children",
|
112
115
|
loading: false,
|
116
|
+
style: _objectSpread({}, style),
|
113
117
|
value: defaultValue,
|
114
118
|
onChange: function onChange(values, option) {
|
115
119
|
setDefaultValue(values);
|
@@ -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 | 4 | 2 | 5;
|
13
13
|
isFirstLoad: boolean;
|
14
14
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
15
15
|
export default _default;
|
@@ -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>, "showSearch" | "allowClear"> & Pick<TableProps<any>, "dataSource" | "onRow"> & 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
|
})[];
|
@@ -16,7 +16,7 @@ import { notification } from 'antd';
|
|
16
16
|
import { pick, sortBy } from 'lodash';
|
17
17
|
import { BasicRequest } from "./baseRequest";
|
18
18
|
import { generalRequestURI } from "./utils";
|
19
|
-
import { BUBU100_CACHE_WAREINFO_KEY } from "../../constant";
|
19
|
+
import { BUBU100_CACHE_WAREINFO_KEY, BUBU100_CACHE_USERINFO_KEY } from "../../constant";
|
20
20
|
import { IsSubSYS, cacheDB, clearAuthToken, clearToken, getAuthToken, getToken, setAuthToken } from "../../utils";
|
21
21
|
|
22
22
|
/**
|
@@ -50,16 +50,16 @@ var RequestDataFormat = function RequestDataFormat(data) {
|
|
50
50
|
* @param apiName 接口名称
|
51
51
|
*/
|
52
52
|
var generalRequestHeader = function generalRequestHeader() {
|
53
|
-
var _localStorage$getItem, _getAuthToken;
|
54
|
-
var
|
55
|
-
var
|
56
|
-
var obj = JSON.parse(baseObj ? '{}' : wareHouseObject);
|
53
|
+
var _localStorage$getItem, _localStorage$getItem2, _getAuthToken;
|
54
|
+
var warehouseInfo = JSON.parse((_localStorage$getItem = localStorage.getItem(BUBU100_CACHE_WAREINFO_KEY)) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : '{}');
|
55
|
+
var userInfo = JSON.parse((_localStorage$getItem2 = localStorage.getItem(BUBU100_CACHE_USERINFO_KEY)) !== null && _localStorage$getItem2 !== void 0 ? _localStorage$getItem2 : '{}');
|
57
56
|
var headers = {
|
58
57
|
Authorization: getToken() || '',
|
59
58
|
authToken: (_getAuthToken = getAuthToken()) !== null && _getAuthToken !== void 0 ? _getAuthToken : ''
|
60
59
|
};
|
61
|
-
|
62
|
-
|
60
|
+
var currentWarehouse = warehouseInfo[userInfo === null || userInfo === void 0 ? void 0 : userInfo.employeecode] || {};
|
61
|
+
if (currentWarehouse && currentWarehouse.id) headers = _objectSpread(_objectSpread({}, headers), {}, {
|
62
|
+
warehouseId: currentWarehouse.id
|
63
63
|
});
|
64
64
|
return headers;
|
65
65
|
};
|