@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31-beta.55 → 2.2.31-beta.56
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.
|
@@ -1045,7 +1045,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1045
1045
|
_context6.next = 24;
|
|
1046
1046
|
return onBlurSkxOutboundNoticeNo({
|
|
1047
1047
|
form: form,
|
|
1048
|
-
value: value,
|
|
1048
|
+
value: value === null || value === void 0 ? void 0 : value.toUpperCase(),
|
|
1049
|
+
// 转大写特殊处理,其他转大写字段都走updateComponentToUpperCase,这个组件onchangValue被拦截了
|
|
1049
1050
|
templateDetail: templateDetail,
|
|
1050
1051
|
componentOnBlur: componentOnBlur
|
|
1051
1052
|
});
|
|
@@ -1060,7 +1061,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1060
1061
|
_context6.next = 29;
|
|
1061
1062
|
return onBlurSkxReturnBillNo({
|
|
1062
1063
|
form: form,
|
|
1063
|
-
value: value,
|
|
1064
|
+
value: value === null || value === void 0 ? void 0 : value.toUpperCase(),
|
|
1065
|
+
// 转大写特殊处理,其他转大写字段都走updateComponentToUpperCase,这个组件onchangValue被拦截了
|
|
1064
1066
|
templateDetail: templateDetail,
|
|
1065
1067
|
componentOnBlur: componentOnBlur
|
|
1066
1068
|
});
|
|
@@ -1499,7 +1501,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1499
1501
|
return item.workOrderComponentType === 'NUMERICAL_CALCULATION';
|
|
1500
1502
|
});
|
|
1501
1503
|
}, [templateDetail]);
|
|
1502
|
-
var handleWatchFormValueChange = function handleWatchFormValueChange() {
|
|
1504
|
+
var handleWatchFormValueChange = function handleWatchFormValueChange(changedValues) {
|
|
1503
1505
|
var componentShowMap = currentTemplateAllComponentsDisplay.current;
|
|
1504
1506
|
var allValues = form.getFieldsValue(true);
|
|
1505
1507
|
var formValue = {};
|
|
@@ -1521,6 +1523,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1521
1523
|
updateComponentToUpperCase({
|
|
1522
1524
|
componentDtoList: templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList,
|
|
1523
1525
|
allValues: allValues,
|
|
1526
|
+
changedValues: changedValues,
|
|
1524
1527
|
form: form
|
|
1525
1528
|
});
|
|
1526
1529
|
changeValuesCacheOrderInfo(_objectSpread(_objectSpread({}, form.getFieldsValue()), formValue), templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList);
|
|
@@ -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, changedValues, form, }: any) => void;
|
|
136
136
|
export {};
|
|
@@ -1716,36 +1716,66 @@ 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
|
+
_ref17$changedValues = _ref17.changedValues,
|
|
1720
|
+
changedValues = _ref17$changedValues === void 0 ? {} : _ref17$changedValues,
|
|
1719
1721
|
form = _ref17.form;
|
|
1720
|
-
console.log('修改部分组件小写改成大写');
|
|
1721
|
-
var value = cloneDeep(allValues);
|
|
1722
1722
|
//固定组件自动转换
|
|
1723
1723
|
var FIXED_COMPONENTS = ['SKX_OUTBOUND_NOTICE_NO', 'SKX_LOGISTICS', 'SKX_RETURN_BILL_NO', 'SKX_RETURN_LOGISTICS'];
|
|
1724
1724
|
var updateComponent = componentDtoList.filter(function (item) {
|
|
1725
1725
|
var _item$componentConfig;
|
|
1726
1726
|
return FIXED_COMPONENTS.includes(item.workOrderComponentType) || ((_item$componentConfig = item.componentConfig) === null || _item$componentConfig === void 0 ? void 0 : _item$componentConfig.toUpperCase);
|
|
1727
1727
|
});
|
|
1728
|
+
//是否有转换组件
|
|
1728
1729
|
if (updateComponent.length) {
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1730
|
+
//只修改需要转换的值
|
|
1731
|
+
var value = {};
|
|
1732
|
+
//判断是否是值变化
|
|
1733
|
+
if (changedValues) {
|
|
1734
|
+
var changeComponent = componentDtoList.filter(function (item) {
|
|
1735
|
+
return Object.keys(changedValues).includes(item.uniqueKey);
|
|
1736
|
+
});
|
|
1737
|
+
changeComponent.forEach(function (item) {
|
|
1738
|
+
if (allValues[item.uniqueKey]) {
|
|
1739
|
+
if (['EXPRESS_LOGISTICS_SELECT', 'RETURN_LOGISTICS_SELECT'].includes(item.workOrderComponentType)) {
|
|
1740
|
+
var _allValues$item$uniqu, _allValues$item$uniqu2;
|
|
1741
|
+
value[item.uniqueKey] = _objectSpread(_objectSpread({}, allValues[item.uniqueKey]), {}, {
|
|
1742
|
+
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
1743
|
});
|
|
1742
|
-
})
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1744
|
+
} else if (['SKX_LOGISTICS', 'SKX_RETURN_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
1745
|
+
value[item.uniqueKey] = cloneDeep(allValues[item.uniqueKey]).map(function (t) {
|
|
1746
|
+
var _t$logisticsCode;
|
|
1747
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
|
1748
|
+
logisticsCode: (_t$logisticsCode = t.logisticsCode) === null || _t$logisticsCode === void 0 ? void 0 : _t$logisticsCode.toUpperCase()
|
|
1749
|
+
});
|
|
1750
|
+
});
|
|
1751
|
+
} else {
|
|
1752
|
+
var _allValues$item$uniqu3;
|
|
1753
|
+
value[item.uniqueKey] = (_allValues$item$uniqu3 = allValues[item.uniqueKey]) === null || _allValues$item$uniqu3 === void 0 ? void 0 : _allValues$item$uniqu3.toUpperCase();
|
|
1754
|
+
}
|
|
1746
1755
|
}
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1756
|
+
});
|
|
1757
|
+
} else {
|
|
1758
|
+
updateComponent.forEach(function (item) {
|
|
1759
|
+
if (allValues[item.uniqueKey]) {
|
|
1760
|
+
if (['EXPRESS_LOGISTICS_SELECT', 'RETURN_LOGISTICS_SELECT'].includes(item.workOrderComponentType)) {
|
|
1761
|
+
var _allValues$item$uniqu4, _allValues$item$uniqu5;
|
|
1762
|
+
value[item.uniqueKey] = _objectSpread(_objectSpread({}, allValues[item.uniqueKey]), {}, {
|
|
1763
|
+
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()
|
|
1764
|
+
});
|
|
1765
|
+
} else if (['SKX_LOGISTICS', 'SKX_RETURN_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
1766
|
+
value[item.uniqueKey] = cloneDeep(allValues[item.uniqueKey]).map(function (t) {
|
|
1767
|
+
var _t$logisticsCode2;
|
|
1768
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
|
1769
|
+
logisticsCode: (_t$logisticsCode2 = t.logisticsCode) === null || _t$logisticsCode2 === void 0 ? void 0 : _t$logisticsCode2.toUpperCase()
|
|
1770
|
+
});
|
|
1771
|
+
});
|
|
1772
|
+
} else {
|
|
1773
|
+
var _allValues$item$uniqu6;
|
|
1774
|
+
value[item.uniqueKey] = (_allValues$item$uniqu6 = allValues[item.uniqueKey]) === null || _allValues$item$uniqu6 === void 0 ? void 0 : _allValues$item$uniqu6.toUpperCase();
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
});
|
|
1778
|
+
}
|
|
1779
|
+
form.setFieldsValue(_objectSpread({}, value));
|
|
1749
1780
|
}
|
|
1750
|
-
form.setFieldsValue(_objectSpread({}, value));
|
|
1751
1781
|
};
|
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.56",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "ee06d843a8a146c2aa3a327a288ea9a5cf7748a8",
|
|
79
79
|
"gitHooks": {
|
|
80
80
|
"pre-commit": "lint-staged"
|
|
81
81
|
}
|