@kmkf-fe-packages/kmkf-work-order-service-component 0.8.14-alpha.2 → 0.8.14
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 +1 -1
- package/dist/esm/common/utils/tools.d.ts +0 -1
- package/dist/esm/common/utils/tools.js +34 -62
- package/dist/esm/model/logicFlow/selector.d.ts +0 -3
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +0 -18
- package/dist/esm/model/singleShopWorkOrder/selector.d.ts +0 -10
- 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;
|
|
@@ -427,7 +427,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
427
427
|
style: {
|
|
428
428
|
display: tabActive === 'custom' ? 'block' : 'none'
|
|
429
429
|
}
|
|
430
|
-
},
|
|
430
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
431
431
|
ref: listRef
|
|
432
432
|
}, /*#__PURE__*/React.createElement(LogicFlowList, {
|
|
433
433
|
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,20 +711,6 @@ 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 === 'BS_SYSTEM_ORDER') {
|
|
713
|
-
contentVoList.push({
|
|
714
|
-
uniqueKey: "".concat(item.uniqueKey, "_bsSystemOrderNo"),
|
|
715
|
-
content: get(nowData, "".concat(item.uniqueKey, ".orderNo"), ''),
|
|
716
|
-
name: item.name
|
|
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
|
|
725
|
-
});
|
|
726
714
|
} else {
|
|
727
715
|
var _nowData$item$uniqueK;
|
|
728
716
|
contentVoList.push({
|
|
@@ -1094,13 +1082,6 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1094
1082
|
bsExchangeGiftGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsExchangeGiftGoods")], []),
|
|
1095
1083
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1096
1084
|
}));
|
|
1097
|
-
} else if (nex.workOrderComponentType === 'BS_SYSTEM_ORDER') {
|
|
1098
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1099
|
-
orderNo: item.jsonMap["".concat(nex.uniqueKey, "_bsSystemOrderNo")],
|
|
1100
|
-
orders: [],
|
|
1101
|
-
selectIds: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsSystemSelectIds")], []),
|
|
1102
|
-
showOrderInfo: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsSystemShowOrder")], [])
|
|
1103
|
-
}));
|
|
1104
1085
|
}
|
|
1105
1086
|
return cur;
|
|
1106
1087
|
}, {});
|
|
@@ -1180,7 +1161,7 @@ var taobaoGoodHandle = /*#__PURE__*/function () {
|
|
|
1180
1161
|
//订单返填
|
|
1181
1162
|
export var orderBack = /*#__PURE__*/function () {
|
|
1182
1163
|
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,
|
|
1164
|
+
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
1165
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1185
1166
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1186
1167
|
case 0:
|
|
@@ -1189,7 +1170,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1189
1170
|
JOIN_SHOP = shopList.find(function (item) {
|
|
1190
1171
|
return !item.notJoin && item.shopId == shopId;
|
|
1191
1172
|
}); //判断是否有百胜组件 有就请求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'
|
|
1173
|
+
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
1174
|
if (!(!JOIN_SHOP && !hasBs)) {
|
|
1194
1175
|
_context2.next = 5;
|
|
1195
1176
|
break;
|
|
@@ -1252,12 +1233,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1252
1233
|
orderInfo = (data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data) || {};
|
|
1253
1234
|
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
1235
|
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
|
-
}
|
|
1236
|
+
console.log(bsOrder);
|
|
1261
1237
|
//获取当前表单字段
|
|
1262
1238
|
formValue = form.getFieldsValue();
|
|
1263
1239
|
detail = _objectSpread(_objectSpread({}, orderInfo), {}, {
|
|
@@ -1273,7 +1249,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1273
1249
|
hasSelectItem = HasErpItemSelectHandle(templateDetail);
|
|
1274
1250
|
erpPromiseList = [];
|
|
1275
1251
|
if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
|
|
1276
|
-
_context2.next =
|
|
1252
|
+
_context2.next = 41;
|
|
1277
1253
|
break;
|
|
1278
1254
|
}
|
|
1279
1255
|
list = detail['itemList'];
|
|
@@ -1288,10 +1264,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1288
1264
|
}
|
|
1289
1265
|
});
|
|
1290
1266
|
});
|
|
1291
|
-
_context2.prev =
|
|
1292
|
-
_context2.next =
|
|
1267
|
+
_context2.prev = 31;
|
|
1268
|
+
_context2.next = 34;
|
|
1293
1269
|
return Promise.all(promises);
|
|
1294
|
-
case
|
|
1270
|
+
case 34:
|
|
1295
1271
|
erpPromiseList = _context2.sent;
|
|
1296
1272
|
detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
|
|
1297
1273
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -1301,13 +1277,13 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1301
1277
|
})
|
|
1302
1278
|
});
|
|
1303
1279
|
});
|
|
1304
|
-
_context2.next =
|
|
1280
|
+
_context2.next = 41;
|
|
1305
1281
|
break;
|
|
1306
|
-
case
|
|
1307
|
-
_context2.prev =
|
|
1308
|
-
_context2.t0 = _context2["catch"](
|
|
1282
|
+
case 38:
|
|
1283
|
+
_context2.prev = 38;
|
|
1284
|
+
_context2.t0 = _context2["catch"](31);
|
|
1309
1285
|
console.error('调用erp获取宝贝编码错误', _context2.t0);
|
|
1310
|
-
case
|
|
1286
|
+
case 41:
|
|
1311
1287
|
values = orderBackFormValues({
|
|
1312
1288
|
detail: detail,
|
|
1313
1289
|
order_no: order_no,
|
|
@@ -1331,17 +1307,17 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1331
1307
|
}
|
|
1332
1308
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), values));
|
|
1333
1309
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
1334
|
-
_context2.next =
|
|
1310
|
+
_context2.next = 50;
|
|
1335
1311
|
break;
|
|
1336
|
-
case
|
|
1337
|
-
_context2.prev =
|
|
1312
|
+
case 47:
|
|
1313
|
+
_context2.prev = 47;
|
|
1338
1314
|
_context2.t1 = _context2["catch"](6);
|
|
1339
1315
|
console.error(_context2.t1);
|
|
1340
|
-
case
|
|
1316
|
+
case 50:
|
|
1341
1317
|
case "end":
|
|
1342
1318
|
return _context2.stop();
|
|
1343
1319
|
}
|
|
1344
|
-
}, _callee2, null, [[6,
|
|
1320
|
+
}, _callee2, null, [[6, 47], [31, 38]]);
|
|
1345
1321
|
}));
|
|
1346
1322
|
return function orderBack(_x) {
|
|
1347
1323
|
return _ref3.apply(this, arguments);
|
|
@@ -1596,6 +1572,7 @@ export var verifyHandle = function verifyHandle(data, componentDtoList) {
|
|
|
1596
1572
|
export var reversalFormValues = function reversalFormValues() {
|
|
1597
1573
|
var templateList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1598
1574
|
var values = arguments.length > 1 ? arguments[1] : undefined;
|
|
1575
|
+
console.log(templateList, values);
|
|
1599
1576
|
return templateList.reduce(function (prv, next) {
|
|
1600
1577
|
var _values$next$uniqueKe, _values$next$uniqueKe2, _values$next$uniqueKe3, _values$next$uniqueKe4, _values$next$uniqueKe5, _values$next$uniqueKe6;
|
|
1601
1578
|
if (!(values !== null && values !== void 0 && values[next.uniqueKey])) {
|
|
@@ -1647,6 +1624,18 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
1647
1624
|
}
|
|
1648
1625
|
return prv;
|
|
1649
1626
|
}, {});
|
|
1627
|
+
return Object.keys(values).reduce(function (prv, next) {
|
|
1628
|
+
if (isObject(values[next])) {
|
|
1629
|
+
Object.keys(values[next]).forEach(function (key) {
|
|
1630
|
+
prv["".concat(next, "_").concat(key)] = isArray(values[next][key]) ? JSON.stringify(values[next][key]) : values[next][key];
|
|
1631
|
+
});
|
|
1632
|
+
} else {
|
|
1633
|
+
if (templateKeysMap[next]) {
|
|
1634
|
+
prv["".concat(next, "_").concat(templateKeysMap[next])] = values[next];
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
return prv;
|
|
1638
|
+
}, {});
|
|
1650
1639
|
};
|
|
1651
1640
|
|
|
1652
1641
|
//删除缓存数据
|
|
@@ -1661,21 +1650,4 @@ export var deleteCacheOrder = function deleteCacheOrder(templateList, values) {
|
|
|
1661
1650
|
delete getCacheInfo[tradeId];
|
|
1662
1651
|
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(getCacheInfo));
|
|
1663
1652
|
}
|
|
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
1653
|
};
|
|
@@ -6,7 +6,6 @@ export declare const selectFlowList: ((state: {
|
|
|
6
6
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
7
7
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
8
8
|
logicFlow: import("./types").LogicFlowState;
|
|
9
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
10
9
|
}) => import("./types").LogicFlow[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").LogicFlow[], {
|
|
11
10
|
clearCache: () => void;
|
|
12
11
|
}> & {
|
|
@@ -20,7 +19,6 @@ export declare const selectGroupFlowList: ((state: {
|
|
|
20
19
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
21
20
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
22
21
|
logicFlow: import("./types").LogicFlowState;
|
|
23
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
24
22
|
}) => import("./types").Option[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").Option[], {
|
|
25
23
|
clearCache: () => void;
|
|
26
24
|
}> & {
|
|
@@ -34,7 +32,6 @@ export declare const selectFlowTemplateGroupWorkOrderTemplateList: ((state: {
|
|
|
34
32
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
35
33
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
36
34
|
logicFlow: import("./types").LogicFlowState;
|
|
37
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
38
35
|
}) => import("./types").Option[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").Option[], {
|
|
39
36
|
clearCache: () => void;
|
|
40
37
|
}> & {
|
|
@@ -5,8 +5,6 @@ export declare const selectPaymentWorkOrderExamineModalVisible: ((state: {
|
|
|
5
5
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
6
6
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
7
7
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
8
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
9
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
10
8
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
|
|
11
9
|
clearCache: () => void;
|
|
12
10
|
}> & {
|
|
@@ -19,8 +17,6 @@ export declare const selectCurrentPaymentRecord: ((state: {
|
|
|
19
17
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
20
18
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
21
19
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
22
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
23
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
24
20
|
}) => any) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => any, {
|
|
25
21
|
clearCache: () => void;
|
|
26
22
|
}> & {
|
|
@@ -33,8 +29,6 @@ export declare const selectPaymentWorkOrderUnExamineModalVisible: ((state: {
|
|
|
33
29
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
34
30
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
35
31
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
36
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
37
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
38
32
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
|
|
39
33
|
clearCache: () => void;
|
|
40
34
|
}> & {
|
|
@@ -47,8 +41,6 @@ export declare const selectDeletePaymentWorkOrderVisible: ((state: {
|
|
|
47
41
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
48
42
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
49
43
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
50
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
51
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
52
44
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
|
|
53
45
|
clearCache: () => void;
|
|
54
46
|
}> & {
|
|
@@ -61,8 +53,6 @@ export declare const selectFlagPayModalVisible: ((state: {
|
|
|
61
53
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
62
54
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
63
55
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
64
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
65
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
66
56
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
|
|
67
57
|
clearCache: () => void;
|
|
68
58
|
}> & {
|
|
@@ -75,8 +65,6 @@ export declare const selectLogModalVisible: ((state: {
|
|
|
75
65
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
76
66
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
77
67
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
78
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
79
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
80
68
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
|
|
81
69
|
clearCache: () => void;
|
|
82
70
|
}> & {
|
|
@@ -89,8 +77,6 @@ export declare const selectPaymentFormModalVisible: ((state: {
|
|
|
89
77
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
90
78
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
91
79
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
92
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
93
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
94
80
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
|
|
95
81
|
clearCache: () => void;
|
|
96
82
|
}> & {
|
|
@@ -103,8 +89,6 @@ export declare const selectRepeatVisible: ((state: {
|
|
|
103
89
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
104
90
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
105
91
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
106
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
107
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
108
92
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
|
|
109
93
|
clearCache: () => void;
|
|
110
94
|
}> & {
|
|
@@ -117,8 +101,6 @@ export declare const selectRepeatWorkOrderList: ((state: {
|
|
|
117
101
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
118
102
|
paymentWorkOrder: import("./types").PaymentWorkOrderState;
|
|
119
103
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
120
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
121
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
122
104
|
}) => string[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => string[], {
|
|
123
105
|
clearCache: () => void;
|
|
124
106
|
}> & {
|
|
@@ -5,8 +5,6 @@ export declare const selectorSingleTemplateList: ((state: {
|
|
|
5
5
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
6
6
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
7
7
|
singleWorkOrder: import("./types").SingleWorkOrderState;
|
|
8
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
9
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
10
8
|
}) => import("./types").SelectI[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => import("./types").SelectI[], {
|
|
11
9
|
clearCache: () => void;
|
|
12
10
|
}> & {
|
|
@@ -19,8 +17,6 @@ export declare const selectDeleteCustomizeWorkOrderModalVisible: ((state: {
|
|
|
19
17
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
20
18
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
21
19
|
singleWorkOrder: import("./types").SingleWorkOrderState;
|
|
22
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
23
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
24
20
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => boolean, {
|
|
25
21
|
clearCache: () => void;
|
|
26
22
|
}> & {
|
|
@@ -33,8 +29,6 @@ export declare const selectorCurrentCustomizeRecord: ((state: {
|
|
|
33
29
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
34
30
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
35
31
|
singleWorkOrder: import("./types").SingleWorkOrderState;
|
|
36
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
37
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
38
32
|
}) => any) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => any, {
|
|
39
33
|
clearCache: () => void;
|
|
40
34
|
}> & {
|
|
@@ -47,8 +41,6 @@ export declare const selectorTemplateId: ((state: {
|
|
|
47
41
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
48
42
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
49
43
|
singleWorkOrder: import("./types").SingleWorkOrderState;
|
|
50
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
51
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
52
44
|
}) => string) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => string, {
|
|
53
45
|
clearCache: () => void;
|
|
54
46
|
}> & {
|
|
@@ -61,8 +53,6 @@ export declare const selectorFormModalVisible: ((state: {
|
|
|
61
53
|
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
62
54
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
63
55
|
singleWorkOrder: import("./types").SingleWorkOrderState;
|
|
64
|
-
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
65
|
-
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
66
56
|
}) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => boolean, {
|
|
67
57
|
clearCache: () => void;
|
|
68
58
|
}> & {
|
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.14
|
|
3
|
+
"version": "0.8.14",
|
|
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.9",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.9",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.8.9",
|
|
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": "5c6daec1529eee155902130238e4981056c20c92"
|
|
79
79
|
}
|