@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31-beta.55 → 2.2.31-beta.57
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.
|
@@ -962,31 +962,40 @@ var FormRender = function FormRender(props, ref) {
|
|
|
962
962
|
|
|
963
963
|
//组件失焦事件
|
|
964
964
|
var componentOnBlur = /*#__PURE__*/function () {
|
|
965
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type) {
|
|
965
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type, uniqueKey) {
|
|
966
966
|
var promises;
|
|
967
967
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
968
968
|
while (1) switch (_context6.prev = _context6.next) {
|
|
969
969
|
case 0:
|
|
970
|
+
setTimeout(function () {
|
|
971
|
+
var allValue = form.getFieldsValue();
|
|
972
|
+
updateComponentToUpperCase({
|
|
973
|
+
componentDtoList: templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList,
|
|
974
|
+
allValues: allValue,
|
|
975
|
+
uniqueKey: uniqueKey,
|
|
976
|
+
form: form
|
|
977
|
+
});
|
|
978
|
+
}, 0);
|
|
970
979
|
if (!(type === 'erpAfterSaleTradeId')) {
|
|
971
|
-
_context6.next =
|
|
980
|
+
_context6.next = 6;
|
|
972
981
|
break;
|
|
973
982
|
}
|
|
974
|
-
_context6.next =
|
|
983
|
+
_context6.next = 4;
|
|
975
984
|
return onBlurErpAfterSaleTradeId({
|
|
976
985
|
form: form,
|
|
977
986
|
value: value,
|
|
978
987
|
templateDetail: templateDetail,
|
|
979
988
|
setKmLoading: setKmLoading
|
|
980
989
|
});
|
|
981
|
-
case
|
|
982
|
-
_context6.next =
|
|
990
|
+
case 4:
|
|
991
|
+
_context6.next = 49;
|
|
983
992
|
break;
|
|
984
|
-
case
|
|
993
|
+
case 6:
|
|
985
994
|
if (!(type === 'expressLogisticsCode')) {
|
|
986
|
-
_context6.next =
|
|
995
|
+
_context6.next = 16;
|
|
987
996
|
break;
|
|
988
997
|
}
|
|
989
|
-
_context6.next =
|
|
998
|
+
_context6.next = 9;
|
|
990
999
|
return onBlurExpressLogisticsCode({
|
|
991
1000
|
form: form,
|
|
992
1001
|
value: value,
|
|
@@ -994,21 +1003,21 @@ var FormRender = function FormRender(props, ref) {
|
|
|
994
1003
|
setKmLoading: setKmLoading,
|
|
995
1004
|
componentOnBlur: componentOnBlur
|
|
996
1005
|
});
|
|
997
|
-
case
|
|
1006
|
+
case 9:
|
|
998
1007
|
if (!['TR3E2FYXFZCFANVG6O6AALSM' //prod 斯凯奇
|
|
999
1008
|
].includes(companyKey)) {
|
|
1000
|
-
_context6.next =
|
|
1009
|
+
_context6.next = 12;
|
|
1001
1010
|
break;
|
|
1002
1011
|
}
|
|
1003
|
-
_context6.next =
|
|
1012
|
+
_context6.next = 12;
|
|
1004
1013
|
return onBlurSkxLogisticsCode({
|
|
1005
1014
|
form: form,
|
|
1006
1015
|
value: value,
|
|
1007
1016
|
templateDetail: templateDetail,
|
|
1008
1017
|
componentOnBlur: componentOnBlur
|
|
1009
1018
|
});
|
|
1010
|
-
case
|
|
1011
|
-
_context6.next =
|
|
1019
|
+
case 12:
|
|
1020
|
+
_context6.next = 14;
|
|
1012
1021
|
return onBlurReturnLogisticsCode({
|
|
1013
1022
|
form: form,
|
|
1014
1023
|
value: value,
|
|
@@ -1016,15 +1025,15 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1016
1025
|
componentOnBlur: componentOnBlur,
|
|
1017
1026
|
orderBackRule: 'outSid'
|
|
1018
1027
|
});
|
|
1019
|
-
case
|
|
1020
|
-
_context6.next =
|
|
1028
|
+
case 14:
|
|
1029
|
+
_context6.next = 49;
|
|
1021
1030
|
break;
|
|
1022
|
-
case
|
|
1031
|
+
case 16:
|
|
1023
1032
|
if (!(type === 'returnLogisticsCode')) {
|
|
1024
|
-
_context6.next =
|
|
1033
|
+
_context6.next = 21;
|
|
1025
1034
|
break;
|
|
1026
1035
|
}
|
|
1027
|
-
_context6.next =
|
|
1036
|
+
_context6.next = 19;
|
|
1028
1037
|
return onBlurReturnLogisticsCode({
|
|
1029
1038
|
form: form,
|
|
1030
1039
|
value: value,
|
|
@@ -1032,57 +1041,57 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1032
1041
|
componentOnBlur: componentOnBlur,
|
|
1033
1042
|
orderBackRule: 'logisticsCode'
|
|
1034
1043
|
});
|
|
1035
|
-
case
|
|
1036
|
-
_context6.next =
|
|
1044
|
+
case 19:
|
|
1045
|
+
_context6.next = 49;
|
|
1037
1046
|
break;
|
|
1038
|
-
case
|
|
1047
|
+
case 21:
|
|
1039
1048
|
if (!(type === 'skxOutboundNoticeNo')) {
|
|
1040
|
-
_context6.next =
|
|
1049
|
+
_context6.next = 27;
|
|
1041
1050
|
break;
|
|
1042
1051
|
}
|
|
1043
1052
|
//[SKX]ON出库通知单号 返填
|
|
1044
1053
|
console.log('skxOutboundNoticeNo', value);
|
|
1045
|
-
_context6.next =
|
|
1054
|
+
_context6.next = 25;
|
|
1046
1055
|
return onBlurSkxOutboundNoticeNo({
|
|
1047
1056
|
form: form,
|
|
1048
1057
|
value: value,
|
|
1049
1058
|
templateDetail: templateDetail,
|
|
1050
1059
|
componentOnBlur: componentOnBlur
|
|
1051
1060
|
});
|
|
1052
|
-
case
|
|
1053
|
-
_context6.next =
|
|
1061
|
+
case 25:
|
|
1062
|
+
_context6.next = 49;
|
|
1054
1063
|
break;
|
|
1055
|
-
case
|
|
1064
|
+
case 27:
|
|
1056
1065
|
if (!(type === 'skxReturnBillNo')) {
|
|
1057
|
-
_context6.next =
|
|
1066
|
+
_context6.next = 32;
|
|
1058
1067
|
break;
|
|
1059
1068
|
}
|
|
1060
|
-
_context6.next =
|
|
1069
|
+
_context6.next = 30;
|
|
1061
1070
|
return onBlurSkxReturnBillNo({
|
|
1062
1071
|
form: form,
|
|
1063
1072
|
value: value,
|
|
1064
1073
|
templateDetail: templateDetail,
|
|
1065
1074
|
componentOnBlur: componentOnBlur
|
|
1066
1075
|
});
|
|
1067
|
-
case
|
|
1068
|
-
_context6.next =
|
|
1076
|
+
case 30:
|
|
1077
|
+
_context6.next = 49;
|
|
1069
1078
|
break;
|
|
1070
|
-
case
|
|
1079
|
+
case 32:
|
|
1071
1080
|
if (!(type === 'skxReturnTHLogisticsCode')) {
|
|
1072
|
-
_context6.next =
|
|
1081
|
+
_context6.next = 37;
|
|
1073
1082
|
break;
|
|
1074
1083
|
}
|
|
1075
|
-
_context6.next =
|
|
1084
|
+
_context6.next = 35;
|
|
1076
1085
|
return onBlurSkxReturnTHLogisticsCode({
|
|
1077
1086
|
form: form,
|
|
1078
1087
|
value: value,
|
|
1079
1088
|
templateDetail: templateDetail,
|
|
1080
1089
|
componentOnBlur: componentOnBlur
|
|
1081
1090
|
});
|
|
1082
|
-
case
|
|
1083
|
-
_context6.next =
|
|
1091
|
+
case 35:
|
|
1092
|
+
_context6.next = 49;
|
|
1084
1093
|
break;
|
|
1085
|
-
case
|
|
1094
|
+
case 37:
|
|
1086
1095
|
// 收集所有需要执行的异步操作
|
|
1087
1096
|
promises = [];
|
|
1088
1097
|
if (type === 'tradeId') {
|
|
@@ -1094,7 +1103,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1094
1103
|
promises.push(handleChangeTradeId(value));
|
|
1095
1104
|
}
|
|
1096
1105
|
if (value) {
|
|
1097
|
-
_context6.next =
|
|
1106
|
+
_context6.next = 44;
|
|
1098
1107
|
break;
|
|
1099
1108
|
}
|
|
1100
1109
|
setReplaceValue(function (prev) {
|
|
@@ -1105,24 +1114,24 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1105
1114
|
});
|
|
1106
1115
|
replaceValueRef.current = _objectSpread(_objectSpread({}, replaceValue), {}, _defineProperty({}, type, 0));
|
|
1107
1116
|
return _context6.abrupt("return");
|
|
1108
|
-
case
|
|
1117
|
+
case 44:
|
|
1109
1118
|
promises.push(queryReplaceCount(_defineProperty({}, type, value), templateDetail));
|
|
1110
1119
|
// TODO: ERP不走订单反弹逻辑
|
|
1111
1120
|
if ((type === 'tradeId' || type === 'enterprisePaymentTid') && !isErpUse) {
|
|
1112
1121
|
promises.push(changeHandle(value));
|
|
1113
1122
|
}
|
|
1114
1123
|
// 等待所有异步操作完成
|
|
1115
|
-
_context6.next =
|
|
1124
|
+
_context6.next = 48;
|
|
1116
1125
|
return Promise.all(promises);
|
|
1117
|
-
case 47:
|
|
1118
|
-
return _context6.abrupt("return", Promise.resolve());
|
|
1119
1126
|
case 48:
|
|
1127
|
+
return _context6.abrupt("return", Promise.resolve());
|
|
1128
|
+
case 49:
|
|
1120
1129
|
case "end":
|
|
1121
1130
|
return _context6.stop();
|
|
1122
1131
|
}
|
|
1123
1132
|
}, _callee6);
|
|
1124
1133
|
}));
|
|
1125
|
-
return function componentOnBlur(_x10, _x11) {
|
|
1134
|
+
return function componentOnBlur(_x10, _x11, _x12) {
|
|
1126
1135
|
return _ref7.apply(this, arguments);
|
|
1127
1136
|
};
|
|
1128
1137
|
}();
|
|
@@ -1431,7 +1440,9 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1431
1440
|
currentComponentDisplayStatus.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
|
|
1432
1441
|
checkFillMapping(show, uniqueKey, workOrderComponentType);
|
|
1433
1442
|
return instance.editRender({
|
|
1434
|
-
onBlur:
|
|
1443
|
+
onBlur: function onBlur(value, type) {
|
|
1444
|
+
return componentOnBlur(value, type, uniqueKey);
|
|
1445
|
+
},
|
|
1435
1446
|
onChange: function onChange(value, type) {
|
|
1436
1447
|
return componentOnValueChange(uniqueKey, value, workOrderComponentType, type);
|
|
1437
1448
|
},
|
|
@@ -1443,7 +1454,9 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1443
1454
|
});
|
|
1444
1455
|
}
|
|
1445
1456
|
return instance.editRender({
|
|
1446
|
-
onBlur:
|
|
1457
|
+
onBlur: function onBlur(value, type) {
|
|
1458
|
+
return componentOnBlur(value, type, uniqueKey);
|
|
1459
|
+
},
|
|
1447
1460
|
onChange: function onChange(value, type) {
|
|
1448
1461
|
return componentOnValueChange(uniqueKey, value, workOrderComponentType, type);
|
|
1449
1462
|
},
|
|
@@ -1499,7 +1512,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1499
1512
|
return item.workOrderComponentType === 'NUMERICAL_CALCULATION';
|
|
1500
1513
|
});
|
|
1501
1514
|
}, [templateDetail]);
|
|
1502
|
-
var handleWatchFormValueChange = function handleWatchFormValueChange() {
|
|
1515
|
+
var handleWatchFormValueChange = function handleWatchFormValueChange(changedValues) {
|
|
1503
1516
|
var componentShowMap = currentTemplateAllComponentsDisplay.current;
|
|
1504
1517
|
var allValues = form.getFieldsValue(true);
|
|
1505
1518
|
var formValue = {};
|
|
@@ -1518,11 +1531,12 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1518
1531
|
//缓存防止bs商品组件联动返填获取不到值
|
|
1519
1532
|
setTimeout(function () {
|
|
1520
1533
|
//部分组件小写改成大写
|
|
1521
|
-
updateComponentToUpperCase({
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1534
|
+
// updateComponentToUpperCase({
|
|
1535
|
+
// componentDtoList: templateDetail?.componentDtoList,
|
|
1536
|
+
// allValues,
|
|
1537
|
+
// changedValues,
|
|
1538
|
+
// form,
|
|
1539
|
+
// });
|
|
1526
1540
|
changeValuesCacheOrderInfo(_objectSpread(_objectSpread({}, form.getFieldsValue()), formValue), templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList);
|
|
1527
1541
|
});
|
|
1528
1542
|
};
|
|
@@ -294,7 +294,7 @@ export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
|
|
|
294
294
|
});
|
|
295
295
|
form.setFieldsValue(_objectSpread(_objectSpread({}, values || {}), {}, {
|
|
296
296
|
m3ap1EvEyd: tradeId,
|
|
297
|
-
'78CADF2951': value
|
|
297
|
+
'78CADF2951': value.toUpperCase()
|
|
298
298
|
}));
|
|
299
299
|
return _context5.abrupt("return", res.data);
|
|
300
300
|
case 11:
|
|
@@ -132,5 +132,5 @@ export declare const getHashParams: (key?: string) => {};
|
|
|
132
132
|
/**
|
|
133
133
|
* 修改部分组件小写改成大写
|
|
134
134
|
*/
|
|
135
|
-
export declare const updateComponentToUpperCase: ({ componentDtoList, allValues, form, }: any) => void;
|
|
135
|
+
export declare const updateComponentToUpperCase: ({ componentDtoList, allValues, uniqueKey, form, }: any) => void;
|
|
136
136
|
export {};
|
|
@@ -1716,36 +1716,65 @@ export var updateComponentToUpperCase = function updateComponentToUpperCase(_ref
|
|
|
1716
1716
|
componentDtoList = _ref17$componentDtoLi === void 0 ? [] : _ref17$componentDtoLi,
|
|
1717
1717
|
_ref17$allValues = _ref17.allValues,
|
|
1718
1718
|
allValues = _ref17$allValues === void 0 ? {} : _ref17$allValues,
|
|
1719
|
+
uniqueKey = _ref17.uniqueKey,
|
|
1719
1720
|
form = _ref17.form;
|
|
1720
|
-
console.log('修改部分组件小写改成大写');
|
|
1721
|
-
var value = cloneDeep(allValues);
|
|
1722
1721
|
//固定组件自动转换
|
|
1723
1722
|
var FIXED_COMPONENTS = ['SKX_OUTBOUND_NOTICE_NO', 'SKX_LOGISTICS', 'SKX_RETURN_BILL_NO', 'SKX_RETURN_LOGISTICS'];
|
|
1724
1723
|
var updateComponent = componentDtoList.filter(function (item) {
|
|
1725
1724
|
var _item$componentConfig;
|
|
1726
1725
|
return FIXED_COMPONENTS.includes(item.workOrderComponentType) || ((_item$componentConfig = item.componentConfig) === null || _item$componentConfig === void 0 ? void 0 : _item$componentConfig.toUpperCase);
|
|
1727
1726
|
});
|
|
1727
|
+
//是否有转换组件
|
|
1728
1728
|
if (updateComponent.length) {
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1729
|
+
//只修改需要转换的值
|
|
1730
|
+
var value = {};
|
|
1731
|
+
//判断是否是值变化
|
|
1732
|
+
if (uniqueKey) {
|
|
1733
|
+
var changeComponent = componentDtoList.filter(function (item) {
|
|
1734
|
+
return uniqueKey === item.uniqueKey;
|
|
1735
|
+
});
|
|
1736
|
+
changeComponent.forEach(function (item) {
|
|
1737
|
+
if (allValues[item.uniqueKey]) {
|
|
1738
|
+
if (['EXPRESS_LOGISTICS_SELECT', 'RETURN_LOGISTICS_SELECT'].includes(item.workOrderComponentType)) {
|
|
1739
|
+
var _allValues$item$uniqu, _allValues$item$uniqu2;
|
|
1740
|
+
value[item.uniqueKey] = _objectSpread(_objectSpread({}, allValues[item.uniqueKey]), {}, {
|
|
1741
|
+
order: (_allValues$item$uniqu = allValues[item.uniqueKey]) === null || _allValues$item$uniqu === void 0 ? void 0 : (_allValues$item$uniqu2 = _allValues$item$uniqu.order) === null || _allValues$item$uniqu2 === void 0 ? void 0 : _allValues$item$uniqu2.toUpperCase()
|
|
1741
1742
|
});
|
|
1742
|
-
})
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1743
|
+
} else if (['SKX_LOGISTICS', 'SKX_RETURN_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
1744
|
+
value[item.uniqueKey] = cloneDeep(allValues[item.uniqueKey]).map(function (t) {
|
|
1745
|
+
var _t$logisticsCode;
|
|
1746
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
|
1747
|
+
logisticsCode: (_t$logisticsCode = t.logisticsCode) === null || _t$logisticsCode === void 0 ? void 0 : _t$logisticsCode.toUpperCase()
|
|
1748
|
+
});
|
|
1749
|
+
});
|
|
1750
|
+
} else {
|
|
1751
|
+
var _allValues$item$uniqu3;
|
|
1752
|
+
value[item.uniqueKey] = (_allValues$item$uniqu3 = allValues[item.uniqueKey]) === null || _allValues$item$uniqu3 === void 0 ? void 0 : _allValues$item$uniqu3.toUpperCase();
|
|
1753
|
+
}
|
|
1746
1754
|
}
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1755
|
+
});
|
|
1756
|
+
} else {
|
|
1757
|
+
updateComponent.forEach(function (item) {
|
|
1758
|
+
if (allValues[item.uniqueKey]) {
|
|
1759
|
+
if (['EXPRESS_LOGISTICS_SELECT', 'RETURN_LOGISTICS_SELECT'].includes(item.workOrderComponentType)) {
|
|
1760
|
+
var _allValues$item$uniqu4, _allValues$item$uniqu5;
|
|
1761
|
+
value[item.uniqueKey] = _objectSpread(_objectSpread({}, allValues[item.uniqueKey]), {}, {
|
|
1762
|
+
order: (_allValues$item$uniqu4 = allValues[item.uniqueKey]) === null || _allValues$item$uniqu4 === void 0 ? void 0 : (_allValues$item$uniqu5 = _allValues$item$uniqu4.order) === null || _allValues$item$uniqu5 === void 0 ? void 0 : _allValues$item$uniqu5.toUpperCase()
|
|
1763
|
+
});
|
|
1764
|
+
} else if (['SKX_LOGISTICS', 'SKX_RETURN_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
1765
|
+
value[item.uniqueKey] = cloneDeep(allValues[item.uniqueKey]).map(function (t) {
|
|
1766
|
+
var _t$logisticsCode2;
|
|
1767
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
|
1768
|
+
logisticsCode: (_t$logisticsCode2 = t.logisticsCode) === null || _t$logisticsCode2 === void 0 ? void 0 : _t$logisticsCode2.toUpperCase()
|
|
1769
|
+
});
|
|
1770
|
+
});
|
|
1771
|
+
} else {
|
|
1772
|
+
var _allValues$item$uniqu6;
|
|
1773
|
+
value[item.uniqueKey] = (_allValues$item$uniqu6 = allValues[item.uniqueKey]) === null || _allValues$item$uniqu6 === void 0 ? void 0 : _allValues$item$uniqu6.toUpperCase();
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
form.setFieldsValue(_objectSpread({}, value));
|
|
1749
1779
|
}
|
|
1750
|
-
form.setFieldsValue(_objectSpread({}, value));
|
|
1751
1780
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "2.2.31-beta.
|
|
3
|
+
"version": "2.2.31-beta.57",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
35
|
"@kmkf-fe-packages/basic-components": "2.2.31-beta.53",
|
|
36
36
|
"@kmkf-fe-packages/kmkf-utils": "2.2.31-beta.53",
|
|
37
|
-
"@kmkf-fe-packages/services-components": "2.2.31-beta.
|
|
37
|
+
"@kmkf-fe-packages/services-components": "2.2.31-beta.57",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "a70cd51a0127966607a31d3572f1285ae8dc15a4",
|
|
79
79
|
"gitHooks": {
|
|
80
80
|
"pre-commit": "lint-staged"
|
|
81
81
|
}
|