@kmkf-fe-packages/kmkf-work-order-service-component 0.8.14-alpha.2 → 0.8.15-alpha.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/dist/esm/FlowTemplateDetail/components/ActionList/index.js +1 -2
- package/dist/esm/FlowTemplateDetail/components/FormRender/index.js +20 -15
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +6 -2
- package/dist/esm/common/utils/tools.d.ts +0 -1
- package/dist/esm/common/utils/tools.js +41 -58
- package/package.json +5 -5
|
@@ -77,10 +77,9 @@ var ActionList = function ActionList(props) {
|
|
|
77
77
|
onClick: function onClick(e) {
|
|
78
78
|
return e.preventDefault();
|
|
79
79
|
}
|
|
80
|
-
}, /*#__PURE__*/React.createElement(Space, null, "\u66F4\u591A", /*#__PURE__*/React.createElement(DownOutlined, null)))), (_buttonList$slice = buttonList.slice(0, 3)) === null || _buttonList$slice === void 0 ? void 0 : _buttonList$slice.map(function (button
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Space, null, "\u66F4\u591A", /*#__PURE__*/React.createElement(DownOutlined, null)))), (_buttonList$slice = buttonList.slice(0, 3)) === null || _buttonList$slice === void 0 ? void 0 : _buttonList$slice.map(function (button) {
|
|
81
81
|
var _buttonMap$button;
|
|
82
82
|
return /*#__PURE__*/React.createElement(Button, {
|
|
83
|
-
key: "button".concat(index),
|
|
84
83
|
type: buttonMap[button].type,
|
|
85
84
|
onClick: function onClick() {
|
|
86
85
|
return handleAction(button);
|
|
@@ -24,9 +24,9 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
24
24
|
import React, { useState, useRef, useEffect, useMemo } from 'react';
|
|
25
25
|
import { ConfigProvider, Form } from 'antd';
|
|
26
26
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
27
|
-
import { get, some, set, every, cloneDeep, isEmpty } from 'lodash';
|
|
27
|
+
import { get, some, set, every, cloneDeep, isEmpty, intersection } from 'lodash';
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
|
-
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, reversalFormValues
|
|
29
|
+
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, reversalFormValues } from "../../../common/utils/tools";
|
|
30
30
|
import { replaceCheck } from "../../../model/servers/api";
|
|
31
31
|
import { factory } from '@kmkf-fe-packages/services-components';
|
|
32
32
|
import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData, getExpression, formatDisplayConfig } from '@kmkf-fe-packages/kmkf-utils';
|
|
@@ -80,7 +80,7 @@ var FormRender = function FormRender(props) {
|
|
|
80
80
|
return i.componentUniqueKey === item.uniqueKey;
|
|
81
81
|
})) === null || _componentTemplateCon === void 0 ? void 0 : _componentTemplateCon.config) || {});
|
|
82
82
|
if ((_newItem$componentCon = newItem.componentConfig.mapping) !== null && _newItem$componentCon !== void 0 && _newItem$componentCon.triggerComponentKey && newItem.componentConfig.mapping.triggerComponentKey !== 'SHOP_SELECT_MAPPING' && (_newItem$componentCon2 = newItem.componentConfig.mapping) !== null && _newItem$componentCon2 !== void 0 && (_newItem$componentCon3 = _newItem$componentCon2.rules) !== null && _newItem$componentCon3 !== void 0 && _newItem$componentCon3.length) {
|
|
83
|
-
// PS: 直接修改triggerComponentKey会报错
|
|
83
|
+
// PS: 直接修改triggerComponentKey会报错
|
|
84
84
|
// Cannot assign to read only property 'triggerComponentKey' of object '#<Object>'
|
|
85
85
|
// 所以修改整个mapping
|
|
86
86
|
// newItem.componentConfig.mapping.triggerComponentKey = `${nodeId}-${newItem.componentConfig.mapping.triggerComponentKey}`
|
|
@@ -433,18 +433,11 @@ var FormRender = function FormRender(props) {
|
|
|
433
433
|
});
|
|
434
434
|
};
|
|
435
435
|
// 组件值变化
|
|
436
|
-
var componentOnValueChange = function componentOnValueChange(uniqueKey, value
|
|
436
|
+
var componentOnValueChange = function componentOnValueChange(uniqueKey, value) {
|
|
437
437
|
if (mappingConfig.config[uniqueKey]) {
|
|
438
438
|
// PS: 目前只有string 和 { value: string, other: ''}这两种类型,后面其他组件如果需要在调整
|
|
439
439
|
fillByMapping(uniqueKey, typeof value === 'string' ? value : value === null || value === void 0 ? void 0 : value.value);
|
|
440
440
|
}
|
|
441
|
-
if (workOrderComponentType === 'BS_SYSTEM_ORDER') {
|
|
442
|
-
bsSystemOrderBackValues({
|
|
443
|
-
templateList: templateDetail,
|
|
444
|
-
value: value,
|
|
445
|
-
form: form
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
441
|
};
|
|
449
442
|
//组件失焦事件
|
|
450
443
|
var componentOnBlur = /*#__PURE__*/function () {
|
|
@@ -484,7 +477,7 @@ var FormRender = function FormRender(props) {
|
|
|
484
477
|
setShopId(val);
|
|
485
478
|
// 清空表单字段
|
|
486
479
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
|
487
|
-
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD'
|
|
480
|
+
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
488
481
|
cur.push(nxt === null || nxt === void 0 ? void 0 : nxt.uniqueKey);
|
|
489
482
|
}
|
|
490
483
|
return cur;
|
|
@@ -682,12 +675,13 @@ var FormRender = function FormRender(props) {
|
|
|
682
675
|
return getExpression((_item$compareSymbol2 = item.compareSymbol) === null || _item$compareSymbol2 === void 0 ? void 0 : _item$compareSymbol2.toUpperCase(), leftValue, item.rightValue);
|
|
683
676
|
});
|
|
684
677
|
}, false);
|
|
678
|
+
console.debug('当前组件显影关系', instance === null || instance === void 0 ? void 0 : instance.id, instance === null || instance === void 0 ? void 0 : instance.name, show, currentIdDependenceOtherFields);
|
|
685
679
|
currentComponentDisplayStatus.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
|
|
686
680
|
checkFillMapping(show, uniqueKey, workOrderComponentType);
|
|
687
681
|
return instance.editRender({
|
|
688
682
|
onBlur: componentOnBlur,
|
|
689
683
|
onChange: function onChange(value) {
|
|
690
|
-
return componentOnValueChange(uniqueKey, value
|
|
684
|
+
return componentOnValueChange(uniqueKey, value);
|
|
691
685
|
},
|
|
692
686
|
hidden: !show || mappdingHideComponents.includes(uniqueKey)
|
|
693
687
|
});
|
|
@@ -696,7 +690,7 @@ var FormRender = function FormRender(props) {
|
|
|
696
690
|
return instance.editRender({
|
|
697
691
|
onBlur: componentOnBlur,
|
|
698
692
|
onChange: function onChange(value) {
|
|
699
|
-
return componentOnValueChange(uniqueKey, value
|
|
693
|
+
return componentOnValueChange(uniqueKey, value);
|
|
700
694
|
},
|
|
701
695
|
hidden: mappdingHideComponents.includes(uniqueKey)
|
|
702
696
|
});
|
|
@@ -754,6 +748,17 @@ var FormRender = function FormRender(props) {
|
|
|
754
748
|
var preNodeItems = [];
|
|
755
749
|
(_groupByPreNode = groupByPreNode(preNodeComponentDtoList)) === null || _groupByPreNode === void 0 ? void 0 : _groupByPreNode.forEach(function (item, key) {
|
|
756
750
|
var displayConfig = getCurrentNodeModifiedShowHideRule(flowAllShowHideRules === null || flowAllShowHideRules === void 0 ? void 0 : flowAllShowHideRules.allShowHideRules, key);
|
|
751
|
+
var finalDisplayConfig = displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.filter(function (item) {
|
|
752
|
+
var _item$rules, _intersection;
|
|
753
|
+
var dependenceLeftKeys = item === null || item === void 0 ? void 0 : (_item$rules = item.rules) === null || _item$rules === void 0 ? void 0 : _item$rules.map(function (i) {
|
|
754
|
+
return i.leftValue;
|
|
755
|
+
});
|
|
756
|
+
var preNodeComponentUniqueKeyList = preNodeComponentDtoList === null || preNodeComponentDtoList === void 0 ? void 0 : preNodeComponentDtoList.map(function (item) {
|
|
757
|
+
return item === null || item === void 0 ? void 0 : item.uniqueKey;
|
|
758
|
+
});
|
|
759
|
+
return ((_intersection = intersection(dependenceLeftKeys, preNodeComponentUniqueKeyList)) === null || _intersection === void 0 ? void 0 : _intersection.length) > 0;
|
|
760
|
+
});
|
|
761
|
+
console.debug('当前前置节点生效的显影规则', finalDisplayConfig);
|
|
757
762
|
preNodeItems.push(item === null || item === void 0 ? void 0 : item.map(newRenderColumnItem({
|
|
758
763
|
form: form,
|
|
759
764
|
shopList: shopList,
|
|
@@ -762,7 +767,7 @@ var FormRender = function FormRender(props) {
|
|
|
762
767
|
workOrderDetail: record,
|
|
763
768
|
templateDetail: templateDetail,
|
|
764
769
|
disabled: true,
|
|
765
|
-
displayConfig:
|
|
770
|
+
displayConfig: finalDisplayConfig
|
|
766
771
|
})));
|
|
767
772
|
});
|
|
768
773
|
return preNodeItems;
|
|
@@ -374,7 +374,11 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
374
374
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
375
375
|
placeholder: "\u521B\u5EFA\u4EBA",
|
|
376
376
|
options: useList,
|
|
377
|
-
allowClear: true
|
|
377
|
+
allowClear: true,
|
|
378
|
+
showSearch: true,
|
|
379
|
+
filterOption: function filterOption(input, option) {
|
|
380
|
+
return option.label.includes(input);
|
|
381
|
+
}
|
|
378
382
|
}))), /*#__PURE__*/React.createElement(Col, {
|
|
379
383
|
span: 16
|
|
380
384
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -427,7 +431,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
427
431
|
style: {
|
|
428
432
|
display: tabActive === 'custom' ? 'block' : 'none'
|
|
429
433
|
}
|
|
430
|
-
},
|
|
434
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
431
435
|
ref: listRef
|
|
432
436
|
}, /*#__PURE__*/React.createElement(LogicFlowList, {
|
|
433
437
|
logicFlowList: allLogicFlowList,
|
|
@@ -92,5 +92,4 @@ export declare const verifyHandle: (data: any, componentDtoList: Array<any>) =>
|
|
|
92
92
|
};
|
|
93
93
|
export declare const reversalFormValues: (templateList: any[] | undefined, values: any) => any;
|
|
94
94
|
export declare const deleteCacheOrder: (templateList: any[], values: any) => void;
|
|
95
|
-
export declare const bsSystemOrderBackValues: ({ templateList, value, form }: any) => void;
|
|
96
95
|
export {};
|
|
@@ -17,11 +17,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
17
17
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
18
18
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
19
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
|
-
import { get, every, maxBy } from 'lodash';
|
|
20
|
+
import { get, every, maxBy, isObject, isArray } from 'lodash';
|
|
21
21
|
import V from 'voca';
|
|
22
22
|
import { orderDetail, jstOrderDetail, bsOrderDetail } from "../../model/servers/api";
|
|
23
23
|
import moment from 'moment';
|
|
24
|
-
import { AddressData, ExpressData, orderBackFormValues, findLabelBySelectValue, request
|
|
24
|
+
import { AddressData, ExpressData, orderBackFormValues, findLabelBySelectValue, request } from '@kmkf-fe-packages/kmkf-utils';
|
|
25
25
|
import { cloneDeep, isEqual, set } from 'lodash';
|
|
26
26
|
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
27
27
|
import { PlatForm } from "../../model/flowTemplateDetail/types";
|
|
@@ -31,6 +31,8 @@ import cache from "../cache";
|
|
|
31
31
|
|
|
32
32
|
var ONLY_SHOW_COMPONENT_TYPE = ['RADIO', 'INPUT', 'TEXTAREA', 'CHECKBOX', 'SELECT', 'DATETIME', 'PICTURE', 'MULT_SELECT', 'ORDINARY_INVOICE'];
|
|
33
33
|
var workTypeKeys = {
|
|
34
|
+
// TRADE_ID_INPUT: 'tradeId', //订单号
|
|
35
|
+
// BUYER_NICK_INPUT: 'buyerNick', //买家旺旺
|
|
34
36
|
SHOP_NAME_INPUT: 'shopName',
|
|
35
37
|
//店铺名称
|
|
36
38
|
RECEIVER_NAME_INPUT: 'receiveName',
|
|
@@ -709,19 +711,12 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
709
711
|
content: get(nowData, "".concat(item.uniqueKey, ".postingReceiverMobile"), ''),
|
|
710
712
|
name: item.name
|
|
711
713
|
});
|
|
712
|
-
} else if (item.workOrderComponentType === '
|
|
714
|
+
} else if (item.workOrderComponentType === 'BUYER_MESSAGE_NOTICE') {
|
|
715
|
+
var _value3 = nowData[item.uniqueKey];
|
|
713
716
|
contentVoList.push({
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}, {
|
|
718
|
-
uniqueKey: "".concat(item.uniqueKey, "_bsSystemSelectIds"),
|
|
719
|
-
content: get(nowData, "".concat(item.uniqueKey, ".selectIds"), ''),
|
|
720
|
-
name: item.name
|
|
721
|
-
}, {
|
|
722
|
-
uniqueKey: "".concat(item.uniqueKey, "_bsSystemShowOrder"),
|
|
723
|
-
content: get(nowData, "".concat(item.uniqueKey, ".showOrderInfo"), ''),
|
|
724
|
-
name: item.name
|
|
717
|
+
content: (_value3 === null || _value3 === void 0 ? void 0 : _value3.value) || '',
|
|
718
|
+
name: item.name,
|
|
719
|
+
uniqueKey: "".concat(item.uniqueKey, "_buyerMessageNotice")
|
|
725
720
|
});
|
|
726
721
|
} else {
|
|
727
722
|
var _nowData$item$uniqueK;
|
|
@@ -1094,12 +1089,9 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1094
1089
|
bsExchangeGiftGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsExchangeGiftGoods")], []),
|
|
1095
1090
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1096
1091
|
}));
|
|
1097
|
-
} else if (nex.workOrderComponentType === '
|
|
1092
|
+
} else if (nex.workOrderComponentType === 'BUYER_MESSAGE_NOTICE') {
|
|
1098
1093
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1099
|
-
|
|
1100
|
-
orders: [],
|
|
1101
|
-
selectIds: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsSystemSelectIds")], []),
|
|
1102
|
-
showOrderInfo: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsSystemShowOrder")], [])
|
|
1094
|
+
value: item.jsonMap["".concat(nex.uniqueKey, "_buyerMessageNotice")]
|
|
1103
1095
|
}));
|
|
1104
1096
|
}
|
|
1105
1097
|
return cur;
|
|
@@ -1180,7 +1172,7 @@ var taobaoGoodHandle = /*#__PURE__*/function () {
|
|
|
1180
1172
|
//订单返填
|
|
1181
1173
|
export var orderBack = /*#__PURE__*/function () {
|
|
1182
1174
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
|
|
1183
|
-
var order_no, form, shopId, shopList, templateDetail, _ref2$type, type, callback, fromQNCreateWorkOrderByOrderNo, JOIN_SHOP, hasBs, _ref4, shopSourceStr, _ref4$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value,
|
|
1175
|
+
var order_no, form, shopId, shopList, templateDetail, _ref2$type, type, callback, fromQNCreateWorkOrderByOrderNo, JOIN_SHOP, hasBs, _ref4, shopSourceStr, _ref4$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, orderInfo, jstInfo, bsInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo;
|
|
1184
1176
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1185
1177
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1186
1178
|
case 0:
|
|
@@ -1189,7 +1181,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1189
1181
|
JOIN_SHOP = shopList.find(function (item) {
|
|
1190
1182
|
return !item.notJoin && item.shopId == shopId;
|
|
1191
1183
|
}); //判断是否有百胜组件 有就请求bs订单接口
|
|
1192
|
-
hasBs = HasFilterHandle(templateDetail, ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING'
|
|
1184
|
+
hasBs = HasFilterHandle(templateDetail, ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING']); //如果不是对接店铺且百胜组件都没有
|
|
1193
1185
|
if (!(!JOIN_SHOP && !hasBs)) {
|
|
1194
1186
|
_context2.next = 5;
|
|
1195
1187
|
break;
|
|
@@ -1252,12 +1244,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1252
1244
|
orderInfo = (data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data) || {};
|
|
1253
1245
|
jstInfo = (jstOrder === null || jstOrder === void 0 ? void 0 : (_jstOrder$value = jstOrder.value) === null || _jstOrder$value === void 0 ? void 0 : (_jstOrder$value$data = _jstOrder$value.data) === null || _jstOrder$value$data === void 0 ? void 0 : _jstOrder$value$data.orders) || [];
|
|
1254
1246
|
bsInfo = (bsOrder === null || bsOrder === void 0 ? void 0 : (_bsOrder$value = bsOrder.value) === null || _bsOrder$value === void 0 ? void 0 : _bsOrder$value.data) || {};
|
|
1255
|
-
|
|
1256
|
-
// console.log(bsOrder, JSON.stringify(bsOrder.value.data.orders));
|
|
1257
|
-
//如果bs订单信息大于1
|
|
1258
|
-
if ((bsInfo === null || bsInfo === void 0 ? void 0 : (_bsInfo$orders = bsInfo.orders) === null || _bsInfo$orders === void 0 ? void 0 : _bsInfo$orders.length) > 1) {
|
|
1259
|
-
delete bsInfo.orders;
|
|
1260
|
-
}
|
|
1247
|
+
console.log(bsOrder);
|
|
1261
1248
|
//获取当前表单字段
|
|
1262
1249
|
formValue = form.getFieldsValue();
|
|
1263
1250
|
detail = _objectSpread(_objectSpread({}, orderInfo), {}, {
|
|
@@ -1273,7 +1260,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1273
1260
|
hasSelectItem = HasErpItemSelectHandle(templateDetail);
|
|
1274
1261
|
erpPromiseList = [];
|
|
1275
1262
|
if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
|
|
1276
|
-
_context2.next =
|
|
1263
|
+
_context2.next = 41;
|
|
1277
1264
|
break;
|
|
1278
1265
|
}
|
|
1279
1266
|
list = detail['itemList'];
|
|
@@ -1288,10 +1275,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1288
1275
|
}
|
|
1289
1276
|
});
|
|
1290
1277
|
});
|
|
1291
|
-
_context2.prev =
|
|
1292
|
-
_context2.next =
|
|
1278
|
+
_context2.prev = 31;
|
|
1279
|
+
_context2.next = 34;
|
|
1293
1280
|
return Promise.all(promises);
|
|
1294
|
-
case
|
|
1281
|
+
case 34:
|
|
1295
1282
|
erpPromiseList = _context2.sent;
|
|
1296
1283
|
detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
|
|
1297
1284
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -1301,13 +1288,13 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1301
1288
|
})
|
|
1302
1289
|
});
|
|
1303
1290
|
});
|
|
1304
|
-
_context2.next =
|
|
1291
|
+
_context2.next = 41;
|
|
1305
1292
|
break;
|
|
1306
|
-
case
|
|
1307
|
-
_context2.prev =
|
|
1308
|
-
_context2.t0 = _context2["catch"](
|
|
1293
|
+
case 38:
|
|
1294
|
+
_context2.prev = 38;
|
|
1295
|
+
_context2.t0 = _context2["catch"](31);
|
|
1309
1296
|
console.error('调用erp获取宝贝编码错误', _context2.t0);
|
|
1310
|
-
case
|
|
1297
|
+
case 41:
|
|
1311
1298
|
values = orderBackFormValues({
|
|
1312
1299
|
detail: detail,
|
|
1313
1300
|
order_no: order_no,
|
|
@@ -1331,17 +1318,17 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1331
1318
|
}
|
|
1332
1319
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), values));
|
|
1333
1320
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
1334
|
-
_context2.next =
|
|
1321
|
+
_context2.next = 50;
|
|
1335
1322
|
break;
|
|
1336
|
-
case
|
|
1337
|
-
_context2.prev =
|
|
1323
|
+
case 47:
|
|
1324
|
+
_context2.prev = 47;
|
|
1338
1325
|
_context2.t1 = _context2["catch"](6);
|
|
1339
1326
|
console.error(_context2.t1);
|
|
1340
|
-
case
|
|
1327
|
+
case 50:
|
|
1341
1328
|
case "end":
|
|
1342
1329
|
return _context2.stop();
|
|
1343
1330
|
}
|
|
1344
|
-
}, _callee2, null, [[6,
|
|
1331
|
+
}, _callee2, null, [[6, 47], [31, 38]]);
|
|
1345
1332
|
}));
|
|
1346
1333
|
return function orderBack(_x) {
|
|
1347
1334
|
return _ref3.apply(this, arguments);
|
|
@@ -1596,6 +1583,7 @@ export var verifyHandle = function verifyHandle(data, componentDtoList) {
|
|
|
1596
1583
|
export var reversalFormValues = function reversalFormValues() {
|
|
1597
1584
|
var templateList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1598
1585
|
var values = arguments.length > 1 ? arguments[1] : undefined;
|
|
1586
|
+
console.log(templateList, values);
|
|
1599
1587
|
return templateList.reduce(function (prv, next) {
|
|
1600
1588
|
var _values$next$uniqueKe, _values$next$uniqueKe2, _values$next$uniqueKe3, _values$next$uniqueKe4, _values$next$uniqueKe5, _values$next$uniqueKe6;
|
|
1601
1589
|
if (!(values !== null && values !== void 0 && values[next.uniqueKey])) {
|
|
@@ -1647,6 +1635,18 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
1647
1635
|
}
|
|
1648
1636
|
return prv;
|
|
1649
1637
|
}, {});
|
|
1638
|
+
return Object.keys(values).reduce(function (prv, next) {
|
|
1639
|
+
if (isObject(values[next])) {
|
|
1640
|
+
Object.keys(values[next]).forEach(function (key) {
|
|
1641
|
+
prv["".concat(next, "_").concat(key)] = isArray(values[next][key]) ? JSON.stringify(values[next][key]) : values[next][key];
|
|
1642
|
+
});
|
|
1643
|
+
} else {
|
|
1644
|
+
if (templateKeysMap[next]) {
|
|
1645
|
+
prv["".concat(next, "_").concat(templateKeysMap[next])] = values[next];
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
return prv;
|
|
1649
|
+
}, {});
|
|
1650
1650
|
};
|
|
1651
1651
|
|
|
1652
1652
|
//删除缓存数据
|
|
@@ -1661,21 +1661,4 @@ export var deleteCacheOrder = function deleteCacheOrder(templateList, values) {
|
|
|
1661
1661
|
delete getCacheInfo[tradeId];
|
|
1662
1662
|
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(getCacheInfo));
|
|
1663
1663
|
}
|
|
1664
|
-
};
|
|
1665
|
-
export var bsSystemOrderBackValues = function bsSystemOrderBackValues(_ref6) {
|
|
1666
|
-
var _value$selectedRows, _templateList$compone;
|
|
1667
|
-
var templateList = _ref6.templateList,
|
|
1668
|
-
value = _ref6.value,
|
|
1669
|
-
form = _ref6.form;
|
|
1670
|
-
if (!(value !== null && value !== void 0 && (_value$selectedRows = value.selectedRows) !== null && _value$selectedRows !== void 0 && _value$selectedRows.length)) return;
|
|
1671
|
-
var bsGoodsComponent = (_templateList$compone = templateList.componentDtoList) === null || _templateList$compone === void 0 ? void 0 : _templateList$compone.filter(function (item) {
|
|
1672
|
-
return item.workOrderComponentType === 'BS_GOODS';
|
|
1673
|
-
});
|
|
1674
|
-
if (!(bsGoodsComponent !== null && bsGoodsComponent !== void 0 && bsGoodsComponent.length)) return;
|
|
1675
|
-
var values = bsOrderBackFormValues({
|
|
1676
|
-
orders: value.selectedRows
|
|
1677
|
-
}, {
|
|
1678
|
-
componentDtoList: bsGoodsComponent
|
|
1679
|
-
});
|
|
1680
|
-
form.setFieldsValue(values);
|
|
1681
1664
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.15-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "^0.8.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^0.8.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^0.8.13-alpha.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.8.15-alpha.0",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"gitHooks": {
|
|
76
76
|
"pre-commit": "lint-staged"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "0a3e70a912caa0b190bab078ba892d044b1da47a"
|
|
79
79
|
}
|