wt-enjoy-link-antd-repack 4.2.30 → 4.2.34
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/BiuField/component/TableSelectLocal/locationSelect.d.ts.map +1 -1
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +63 -55
- package/dist/esm/hooks/useUmeng.d.ts +1 -1
- package/dist/esm/hooks/useUmeng.d.ts.map +1 -1
- package/dist/esm/hooks/useUmeng.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locationSelect.d.ts","sourceRoot":"","sources":["locationSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+D,MAAM,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CnF,
|
|
1
|
+
{"version":3,"file":"locationSelect.d.ts","sourceRoot":"","sources":["locationSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+D,MAAM,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CnF,wBA4IC"}
|
|
@@ -13,7 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
-
import {
|
|
16
|
+
import { isNil } from 'lodash';
|
|
17
17
|
import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
18
18
|
import TableSelectBase from "./base";
|
|
19
19
|
import { GATEWAY_ROUTE_WMS } from "../../../../constant";
|
|
@@ -97,62 +97,70 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
|
97
97
|
var timerRef = useRef();
|
|
98
98
|
useEffect(function () {
|
|
99
99
|
if (initialValue && !props.initSelectValue && (props.value === initialValue || props.value === undefined || props.value === null)) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
props.onChange
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
props.onChangeData
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
setLocationList([]);
|
|
135
|
-
setInitSelectValue(undefined);
|
|
136
|
-
if (props.onChange) {
|
|
137
|
-
props.onChange(undefined, undefined);
|
|
100
|
+
setLoading(true);
|
|
101
|
+
getWarehouseLoctionList({
|
|
102
|
+
warehouseLocationIds: initialValue,
|
|
103
|
+
warehouseIds: warehouseIds,
|
|
104
|
+
warehouseAreaId: warehouseAreaId,
|
|
105
|
+
goodsId: goodsId,
|
|
106
|
+
ownerId: ownerId,
|
|
107
|
+
defWth: isDefWth,
|
|
108
|
+
batch: batch,
|
|
109
|
+
page: 1,
|
|
110
|
+
size: 20,
|
|
111
|
+
isAutoGenerate: isAutoGenerate,
|
|
112
|
+
filterInv: filterInv,
|
|
113
|
+
isGoodType: isGoodType,
|
|
114
|
+
isQueryScene: isQueryScene
|
|
115
|
+
}).then(function (res) {
|
|
116
|
+
if (res !== null && res !== void 0 && res.length && res[0].id) {
|
|
117
|
+
setLocationList(res);
|
|
118
|
+
setInitSelectValue(res[0][rowLabel]);
|
|
119
|
+
if (props.onChange) {
|
|
120
|
+
props.onChange(initialValue, res[0]);
|
|
121
|
+
}
|
|
122
|
+
if (props.onChangeData) {
|
|
123
|
+
props.onChangeData(initialValue, res[0]);
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
setLocationList([]);
|
|
127
|
+
setInitSelectValue(undefined);
|
|
128
|
+
if (props.onChange) {
|
|
129
|
+
props.onChange(undefined, undefined);
|
|
130
|
+
}
|
|
131
|
+
if (props.onChangeData) {
|
|
132
|
+
props.onChangeData(undefined, {});
|
|
133
|
+
}
|
|
138
134
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
setLoading(false);
|
|
145
|
-
});
|
|
146
|
-
}, [warehouseIds, goodsId, ownerId, isDefWth, batch, warehouseAreaId, isAutoGenerate, rowLabel, filterInv, isGoodType, isQueryScene]);
|
|
147
|
-
var debounceFetchData = debounce(function (sValue) {
|
|
148
|
-
return fetchData(sValue);
|
|
149
|
-
}, searchTimes);
|
|
150
|
-
useEffect(function () {
|
|
151
|
-
if (isFirstLoadSearch) debounceFetchData();
|
|
152
|
-
}, [isFirstLoadSearch]);
|
|
135
|
+
}).finally(function () {
|
|
136
|
+
setLoading(false);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}, [initialValue, warehouseIds, goodsId, ownerId, isDefWth, batch, warehouseAreaId, props, isAutoGenerate, rowLabel, filterInv, isGoodType, isQueryScene]);
|
|
153
140
|
var onSearch = useCallback(function (sValue) {
|
|
154
|
-
|
|
155
|
-
|
|
141
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
142
|
+
timerRef.current = setTimeout(function () {
|
|
143
|
+
setLoading(true);
|
|
144
|
+
getWarehouseLoctionList({
|
|
145
|
+
warehouseIds: warehouseIds,
|
|
146
|
+
remoteSearchCValue: sValue,
|
|
147
|
+
goodsId: goodsId,
|
|
148
|
+
ownerId: ownerId,
|
|
149
|
+
defWth: isDefWth,
|
|
150
|
+
batch: batch,
|
|
151
|
+
page: 1,
|
|
152
|
+
size: 20,
|
|
153
|
+
isAutoGenerate: isAutoGenerate,
|
|
154
|
+
filterInv: filterInv,
|
|
155
|
+
isGoodType: isGoodType,
|
|
156
|
+
isQueryScene: isQueryScene
|
|
157
|
+
}).then(function (res) {
|
|
158
|
+
setLocationList(res);
|
|
159
|
+
}).finally(function () {
|
|
160
|
+
setLoading(false);
|
|
161
|
+
});
|
|
162
|
+
}, searchTimes);
|
|
163
|
+
}, [searchTimes, warehouseIds, goodsId, ownerId, isDefWth, batch, isAutoGenerate, filterInv, isGoodType, isQueryScene]);
|
|
156
164
|
return /*#__PURE__*/_jsx(TableSelectBase, _objectSpread(_objectSpread({
|
|
157
165
|
ref: ref
|
|
158
166
|
}, restProps), {}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUmeng.d.ts","sourceRoot":"","sources":["useUmeng.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,UAAU,EAAgB,uBAAqB;AAIzE,eAAO,MAAM,QAAQ;+
|
|
1
|
+
{"version":3,"file":"useUmeng.d.ts","sourceRoot":"","sources":["useUmeng.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,UAAU,EAAgB,uBAAqB;AAIzE,eAAO,MAAM,QAAQ;+BAuHL,MAAM,YAAY,MAAM;wBA7BX,UAAU;CAyEtC,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { UmengButtonType, UmengSysType } from "../types/track";
|
|
|
3
3
|
import { getButtonFunction, getButtonType } from "../utils/umeng";
|
|
4
4
|
import { useCallback } from 'react';
|
|
5
5
|
export var useUmeng = function useUmeng() {
|
|
6
|
-
var debug =
|
|
6
|
+
var debug = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
7
7
|
var isParentWindow = window !== window.parent;
|
|
8
8
|
|
|
9
9
|
// 日志函数
|