@kmkf-fe-packages/basic-components 1.0.9 → 1.0.10-beta.0
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/README.md +1 -1
- package/dist/index.esm.js +27 -11
- package/dist/index.js +27 -11
- package/package.json +4 -4
package/README.md
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -12919,9 +12919,11 @@ var index$1 = (function (props) {
|
|
|
12919
12919
|
_onChange = props.onChange,
|
|
12920
12920
|
disabled = props.disabled,
|
|
12921
12921
|
type = props.type;
|
|
12922
|
+
var onceRef = useRef(false);
|
|
12922
12923
|
useEffect(function () {
|
|
12923
12924
|
var _value$orders, _value$showOrderInfo;
|
|
12924
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
12925
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length) && !onceRef.current) {
|
|
12926
|
+
onceRef.current = true;
|
|
12925
12927
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12926
12928
|
getOrderList(value.orderNo);
|
|
12927
12929
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12930,7 +12932,7 @@ var index$1 = (function (props) {
|
|
|
12930
12932
|
getWdtOrderList(value.orderNo);
|
|
12931
12933
|
}
|
|
12932
12934
|
}
|
|
12933
|
-
}, [value
|
|
12935
|
+
}, [value, type]);
|
|
12934
12936
|
var columns = useMemo(function () {
|
|
12935
12937
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12936
12938
|
return [{
|
|
@@ -12973,7 +12975,8 @@ var index$1 = (function (props) {
|
|
|
12973
12975
|
})
|
|
12974
12976
|
}));
|
|
12975
12977
|
}
|
|
12976
|
-
|
|
12978
|
+
onceRef.current = false;
|
|
12979
|
+
case 7:
|
|
12977
12980
|
case "end":
|
|
12978
12981
|
return _context.stop();
|
|
12979
12982
|
}
|
|
@@ -13018,7 +13021,8 @@ var index$1 = (function (props) {
|
|
|
13018
13021
|
})
|
|
13019
13022
|
}));
|
|
13020
13023
|
}
|
|
13021
|
-
|
|
13024
|
+
onceRef.current = false;
|
|
13025
|
+
case 7:
|
|
13022
13026
|
case "end":
|
|
13023
13027
|
return _context2.stop();
|
|
13024
13028
|
}
|
|
@@ -13030,7 +13034,7 @@ var index$1 = (function (props) {
|
|
|
13030
13034
|
}();
|
|
13031
13035
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13032
13036
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
13033
|
-
var _yield$request3, success, data;
|
|
13037
|
+
var _yield$request3, success, data, trades;
|
|
13034
13038
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
13035
13039
|
while (1) switch (_context3.prev = _context3.next) {
|
|
13036
13040
|
case 0:
|
|
@@ -13046,15 +13050,25 @@ var index$1 = (function (props) {
|
|
|
13046
13050
|
success = _yield$request3.success;
|
|
13047
13051
|
data = _yield$request3.data;
|
|
13048
13052
|
if (success) {
|
|
13053
|
+
trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
13054
|
+
return (item.srcTid || '').split(',').includes(orderNo);
|
|
13055
|
+
}).map(function (item) {
|
|
13056
|
+
if (Array.isArray(item.goodDetails)) {
|
|
13057
|
+
item.goodDetails = item.goodDetails.filter(function (good) {
|
|
13058
|
+
return good.srcTid === orderNo;
|
|
13059
|
+
});
|
|
13060
|
+
}
|
|
13061
|
+
return item;
|
|
13062
|
+
});
|
|
13049
13063
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13050
|
-
orders:
|
|
13064
|
+
orders: trades.map(function (item) {
|
|
13051
13065
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13052
13066
|
billNo: item.tradeNo,
|
|
13053
13067
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13054
13068
|
billTag: item.tagName
|
|
13055
13069
|
});
|
|
13056
13070
|
}),
|
|
13057
|
-
showOrderInfo:
|
|
13071
|
+
showOrderInfo: trades.map(function (item) {
|
|
13058
13072
|
return {
|
|
13059
13073
|
billNo: item.tradeNo,
|
|
13060
13074
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
@@ -13063,7 +13077,8 @@ var index$1 = (function (props) {
|
|
|
13063
13077
|
})
|
|
13064
13078
|
}));
|
|
13065
13079
|
}
|
|
13066
|
-
|
|
13080
|
+
onceRef.current = false;
|
|
13081
|
+
case 7:
|
|
13067
13082
|
case "end":
|
|
13068
13083
|
return _context3.stop();
|
|
13069
13084
|
}
|
|
@@ -13730,9 +13745,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13730
13745
|
var _typeMap$type25;
|
|
13731
13746
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
|
|
13732
13747
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
|
|
13733
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
13734
|
-
gutter: 8
|
|
13735
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
13748
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
13736
13749
|
className: "gutter-row",
|
|
13737
13750
|
xs: {
|
|
13738
13751
|
span: 11
|
|
@@ -13764,6 +13777,9 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13764
13777
|
},
|
|
13765
13778
|
md: {
|
|
13766
13779
|
span: 6
|
|
13780
|
+
},
|
|
13781
|
+
style: {
|
|
13782
|
+
marginLeft: '8px'
|
|
13767
13783
|
}
|
|
13768
13784
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
13769
13785
|
style: {
|
package/dist/index.js
CHANGED
|
@@ -12931,9 +12931,11 @@ var index$1 = (function (props) {
|
|
|
12931
12931
|
_onChange = props.onChange,
|
|
12932
12932
|
disabled = props.disabled,
|
|
12933
12933
|
type = props.type;
|
|
12934
|
+
var onceRef = React.useRef(false);
|
|
12934
12935
|
React.useEffect(function () {
|
|
12935
12936
|
var _value$orders, _value$showOrderInfo;
|
|
12936
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
12937
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length) && !onceRef.current) {
|
|
12938
|
+
onceRef.current = true;
|
|
12937
12939
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12938
12940
|
getOrderList(value.orderNo);
|
|
12939
12941
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12942,7 +12944,7 @@ var index$1 = (function (props) {
|
|
|
12942
12944
|
getWdtOrderList(value.orderNo);
|
|
12943
12945
|
}
|
|
12944
12946
|
}
|
|
12945
|
-
}, [value
|
|
12947
|
+
}, [value, type]);
|
|
12946
12948
|
var columns = React.useMemo(function () {
|
|
12947
12949
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12948
12950
|
return [{
|
|
@@ -12985,7 +12987,8 @@ var index$1 = (function (props) {
|
|
|
12985
12987
|
})
|
|
12986
12988
|
}));
|
|
12987
12989
|
}
|
|
12988
|
-
|
|
12990
|
+
onceRef.current = false;
|
|
12991
|
+
case 7:
|
|
12989
12992
|
case "end":
|
|
12990
12993
|
return _context.stop();
|
|
12991
12994
|
}
|
|
@@ -13030,7 +13033,8 @@ var index$1 = (function (props) {
|
|
|
13030
13033
|
})
|
|
13031
13034
|
}));
|
|
13032
13035
|
}
|
|
13033
|
-
|
|
13036
|
+
onceRef.current = false;
|
|
13037
|
+
case 7:
|
|
13034
13038
|
case "end":
|
|
13035
13039
|
return _context2.stop();
|
|
13036
13040
|
}
|
|
@@ -13042,7 +13046,7 @@ var index$1 = (function (props) {
|
|
|
13042
13046
|
}();
|
|
13043
13047
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13044
13048
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
13045
|
-
var _yield$request3, success, data;
|
|
13049
|
+
var _yield$request3, success, data, trades;
|
|
13046
13050
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
13047
13051
|
while (1) switch (_context3.prev = _context3.next) {
|
|
13048
13052
|
case 0:
|
|
@@ -13058,15 +13062,25 @@ var index$1 = (function (props) {
|
|
|
13058
13062
|
success = _yield$request3.success;
|
|
13059
13063
|
data = _yield$request3.data;
|
|
13060
13064
|
if (success) {
|
|
13065
|
+
trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
13066
|
+
return (item.srcTid || '').split(',').includes(orderNo);
|
|
13067
|
+
}).map(function (item) {
|
|
13068
|
+
if (Array.isArray(item.goodDetails)) {
|
|
13069
|
+
item.goodDetails = item.goodDetails.filter(function (good) {
|
|
13070
|
+
return good.srcTid === orderNo;
|
|
13071
|
+
});
|
|
13072
|
+
}
|
|
13073
|
+
return item;
|
|
13074
|
+
});
|
|
13061
13075
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13062
|
-
orders:
|
|
13076
|
+
orders: trades.map(function (item) {
|
|
13063
13077
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13064
13078
|
billNo: item.tradeNo,
|
|
13065
13079
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13066
13080
|
billTag: item.tagName
|
|
13067
13081
|
});
|
|
13068
13082
|
}),
|
|
13069
|
-
showOrderInfo:
|
|
13083
|
+
showOrderInfo: trades.map(function (item) {
|
|
13070
13084
|
return {
|
|
13071
13085
|
billNo: item.tradeNo,
|
|
13072
13086
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
@@ -13075,7 +13089,8 @@ var index$1 = (function (props) {
|
|
|
13075
13089
|
})
|
|
13076
13090
|
}));
|
|
13077
13091
|
}
|
|
13078
|
-
|
|
13092
|
+
onceRef.current = false;
|
|
13093
|
+
case 7:
|
|
13079
13094
|
case "end":
|
|
13080
13095
|
return _context3.stop();
|
|
13081
13096
|
}
|
|
@@ -13742,9 +13757,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13742
13757
|
var _typeMap$type25;
|
|
13743
13758
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
|
|
13744
13759
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
|
|
13745
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13746
|
-
gutter: 8
|
|
13747
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13760
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, null, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13748
13761
|
className: "gutter-row",
|
|
13749
13762
|
xs: {
|
|
13750
13763
|
span: 11
|
|
@@ -13776,6 +13789,9 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13776
13789
|
},
|
|
13777
13790
|
md: {
|
|
13778
13791
|
span: 6
|
|
13792
|
+
},
|
|
13793
|
+
style: {
|
|
13794
|
+
marginLeft: '8px'
|
|
13779
13795
|
}
|
|
13780
13796
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13781
13797
|
style: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10-beta.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"
|
|
14
|
+
"sync": "yarn build && yalc push",
|
|
15
15
|
"build": "yarn lint && father-build",
|
|
16
16
|
"lint": "eslint '**/*.{ts,tsx}'",
|
|
17
17
|
"lint:fix": "eslint --fix '**/*.{ts,tsx}'",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "^1.0.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^1.0.10-beta.0",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"bignumber.js": "^9.1.2",
|
|
26
26
|
"kmkf-monitor": "^0.8.8",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "3aa61d4f09daa69a202cb87beabc0406eec38ba9"
|
|
69
69
|
}
|