@kmkf-fe-packages/kmkf-work-order-service-component 2.2.27 → 2.2.28
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/FlowTemplateDetailV2/components/FormRender/index.js +11 -18
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.d.ts +2 -2
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.js +34 -17
- package/dist/esm/common/utils/transformWorkOrderData.js +5 -0
- package/dist/esm/model/servers/api.d.ts +1 -0
- package/dist/esm/model/servers/api.js +17 -1
- package/package.json +5 -5
|
@@ -23,9 +23,9 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
23
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
24
|
import React, { useState, useRef, useEffect, useMemo, forwardRef, useImperativeHandle, useContext } from 'react';
|
|
25
25
|
import { ConfigProvider, Form, Space, Tag } from 'antd';
|
|
26
|
-
import { useWhyDidYouUpdate } from 'ahooks';
|
|
26
|
+
import { useWhyDidYouUpdate, useDebounceFn } from 'ahooks';
|
|
27
27
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
28
|
-
import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle, groupBy, find, isArray,
|
|
28
|
+
import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle, groupBy, find, isArray, isMatch, isEqual } from 'lodash';
|
|
29
29
|
import 'moment/locale/zh-cn';
|
|
30
30
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
|
|
31
31
|
// 重复检验不需要展示在顶部的
|
|
@@ -377,8 +377,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
377
377
|
enterprisePaymentTid: orderNo,
|
|
378
378
|
enterprisePaymentAlipayNo: enterprisePaymentAlipayNo
|
|
379
379
|
}, templateDetail);
|
|
380
|
-
|
|
381
|
-
handleWatchFormValueChange(undefined, formData);
|
|
380
|
+
handleWatchFormValueChange();
|
|
382
381
|
};
|
|
383
382
|
useEffect(function () {
|
|
384
383
|
if (labelComponent && !isNull(record)) {
|
|
@@ -988,11 +987,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
988
987
|
componentOnBlur: componentOnBlur
|
|
989
988
|
});
|
|
990
989
|
case 8:
|
|
991
|
-
if (!['
|
|
992
|
-
//test 测马奔腾
|
|
993
|
-
'6O47IBXFR26FJF4HUQ7WGO4H',
|
|
994
|
-
//prod 陈健企业工单
|
|
995
|
-
'TR3E2FYXFZCFANVG6O6AALSM' //prod 斯凯奇
|
|
990
|
+
if (!['TR3E2FYXFZCFANVG6O6AALSM' //prod 斯凯奇
|
|
996
991
|
].includes(companyKey)) {
|
|
997
992
|
_context6.next = 11;
|
|
998
993
|
break;
|
|
@@ -1398,8 +1393,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1398
1393
|
if (currentTemplateAllComponentsDisplay.current[instance === null || instance === void 0 ? void 0 : instance.id] !== show) {
|
|
1399
1394
|
// 发现组件从显示变成隐藏后,立即将其变成隐藏状态,执行计算组件逻辑的时候会使用到这个标示
|
|
1400
1395
|
currentTemplateAllComponentsDisplay.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
|
|
1401
|
-
|
|
1402
|
-
handleWatchFormValueChange(undefined, formData);
|
|
1396
|
+
handleWatchFormValueChange();
|
|
1403
1397
|
}
|
|
1404
1398
|
currentComponentDisplayStatus.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
|
|
1405
1399
|
checkFillMapping(show, uniqueKey, workOrderComponentType);
|
|
@@ -1472,9 +1466,9 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1472
1466
|
return item.workOrderComponentType === 'NUMERICAL_CALCULATION';
|
|
1473
1467
|
});
|
|
1474
1468
|
}, [templateDetail]);
|
|
1475
|
-
var handleWatchFormValueChange = function handleWatchFormValueChange(
|
|
1476
|
-
var allValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1469
|
+
var handleWatchFormValueChange = function handleWatchFormValueChange() {
|
|
1477
1470
|
var componentShowMap = currentTemplateAllComponentsDisplay.current;
|
|
1471
|
+
var allValues = form.getFieldsValue(true);
|
|
1478
1472
|
var formValue = {};
|
|
1479
1473
|
// FIXME: 计算组件存在,此处还可能出现性能问题
|
|
1480
1474
|
if (calculationTypeComponentList.length > 0) {
|
|
@@ -1493,11 +1487,10 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1493
1487
|
changeValuesCacheOrderInfo(_objectSpread(_objectSpread({}, form.getFieldsValue()), formValue), templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList);
|
|
1494
1488
|
});
|
|
1495
1489
|
};
|
|
1496
|
-
var
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
[handleWatchFormValueChange]);
|
|
1490
|
+
var _useDebounceFn = useDebounceFn(handleWatchFormValueChange, {
|
|
1491
|
+
wait: 150
|
|
1492
|
+
}),
|
|
1493
|
+
debouncedHandleWatchFormValueChange = _useDebounceFn.run;
|
|
1501
1494
|
var changeValuesCacheOrderInfo = throttle(function (value, tempLateList) {
|
|
1502
1495
|
//如果店铺id不存在 不缓存
|
|
1503
1496
|
if (!(value !== null && value !== void 0 && value.shopId)) return;
|
|
@@ -5,7 +5,7 @@ export declare const onBlurErpAfterSaleTradeId: ({ form, value, templateDetail,
|
|
|
5
5
|
templateDetail: any;
|
|
6
6
|
setKmLoading: (loading: boolean) => void;
|
|
7
7
|
}) => Promise<void>;
|
|
8
|
-
export declare const onBlurExpressLogisticsCode: ({ form, value, templateDetail, setKmLoading, componentOnBlur, onlyGetTid, needTradeIdOrderBack }: {
|
|
8
|
+
export declare const onBlurExpressLogisticsCode: ({ form, value, templateDetail, setKmLoading, componentOnBlur, onlyGetTid, needTradeIdOrderBack, }: {
|
|
9
9
|
form: FormInstance;
|
|
10
10
|
value: string;
|
|
11
11
|
templateDetail: any;
|
|
@@ -14,7 +14,7 @@ export declare const onBlurExpressLogisticsCode: ({ form, value, templateDetail,
|
|
|
14
14
|
onlyGetTid?: boolean | undefined;
|
|
15
15
|
needTradeIdOrderBack?: boolean | undefined;
|
|
16
16
|
}) => Promise<any>;
|
|
17
|
-
export declare const onBlurSkxOutboundNoticeNo: ({ form, value, templateDetail, componentOnBlur, onlyGetTid, needTradeIdOrderBack }: {
|
|
17
|
+
export declare const onBlurSkxOutboundNoticeNo: ({ form, value, templateDetail, componentOnBlur, onlyGetTid, needTradeIdOrderBack, }: {
|
|
18
18
|
form: FormInstance;
|
|
19
19
|
value: string;
|
|
20
20
|
templateDetail: any;
|
|
@@ -9,7 +9,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
9
9
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
10
10
|
import { orderBackKmVideoByLogisticsCode } from "../../../common/utils/orderBackKm";
|
|
11
11
|
import { isNull, skxSystemOrderBackValues, skxReturnSystemOrderBackValues } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
|
-
import { queryTidByOutSid } from "../../../model/servers/api";
|
|
12
|
+
import { queryTidByOutSid, queryTidByWdtOutSid } from "../../../model/servers/api";
|
|
13
13
|
import { servers } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
14
|
export var onBlurErpAfterSaleTradeId = /*#__PURE__*/function () {
|
|
15
15
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
@@ -47,7 +47,7 @@ export var onBlurErpAfterSaleTradeId = /*#__PURE__*/function () {
|
|
|
47
47
|
export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
|
|
48
48
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
|
|
49
49
|
var _kmErpVideoComponent$2;
|
|
50
|
-
var form, value, templateDetail, setKmLoading, componentOnBlur, _ref3$onlyGetTid, onlyGetTid, _ref3$needTradeIdOrde, needTradeIdOrderBack, hasTradeIdComponent, kmErpVideoComponent, _res$data, hasKm, userInfo, _userInfo$companyUser, _companyUserConfig$pl, _companyUserConfig, _companyUserConfig$pl2, _companyUserConfig$pl3, companyUserConfig, oldValue, res, tradeId, blurPromise;
|
|
50
|
+
var form, value, templateDetail, setKmLoading, componentOnBlur, _ref3$onlyGetTid, onlyGetTid, _ref3$needTradeIdOrde, needTradeIdOrderBack, hasTradeIdComponent, kmErpVideoComponent, _res$data, hasKm, hasWdt, userInfo, _userInfo$companyUser, _companyUserConfig$pl, _companyUserConfig, _companyUserConfig$pl2, _companyUserConfig$pl3, _companyUserConfig$pl4, _companyUserConfig2, _companyUserConfig2$p, _companyUserConfig2$p2, companyUserConfig, oldValue, res, tradeId, blurPromise;
|
|
51
51
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
52
52
|
while (1) switch (_context2.prev = _context2.next) {
|
|
53
53
|
case 0:
|
|
@@ -72,10 +72,11 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
|
|
|
72
72
|
});
|
|
73
73
|
case 6:
|
|
74
74
|
if (!hasTradeIdComponent) {
|
|
75
|
-
_context2.next =
|
|
75
|
+
_context2.next = 35;
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
78
|
hasKm = false;
|
|
79
|
+
hasWdt = false;
|
|
79
80
|
try {
|
|
80
81
|
userInfo = JSON.parse(localStorage.getItem('reduxData_userInfo') || '{}');
|
|
81
82
|
if (isNull(userInfo)) {
|
|
@@ -86,6 +87,7 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
|
|
|
86
87
|
companyUserConfig = JSON.parse(companyUserConfig);
|
|
87
88
|
}
|
|
88
89
|
hasKm = (_companyUserConfig$pl = (_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl2 = _companyUserConfig.plugins) === null || _companyUserConfig$pl2 === void 0 ? void 0 : (_companyUserConfig$pl3 = _companyUserConfig$pl2.km) === null || _companyUserConfig$pl3 === void 0 ? void 0 : _companyUserConfig$pl3.show) !== null && _companyUserConfig$pl !== void 0 ? _companyUserConfig$pl : false;
|
|
90
|
+
hasWdt = (_companyUserConfig$pl4 = (_companyUserConfig2 = companyUserConfig) === null || _companyUserConfig2 === void 0 ? void 0 : (_companyUserConfig2$p = _companyUserConfig2.plugins) === null || _companyUserConfig2$p === void 0 ? void 0 : (_companyUserConfig2$p2 = _companyUserConfig2$p.wdt) === null || _companyUserConfig2$p2 === void 0 ? void 0 : _companyUserConfig2$p2.show) !== null && _companyUserConfig$pl4 !== void 0 ? _companyUserConfig$pl4 : false;
|
|
89
91
|
}
|
|
90
92
|
} catch (error) {
|
|
91
93
|
console.error(error);
|
|
@@ -98,50 +100,65 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
|
|
|
98
100
|
// hasKm,
|
|
99
101
|
// form,
|
|
100
102
|
// });
|
|
101
|
-
if (hasKm) {
|
|
102
|
-
_context2.next =
|
|
103
|
+
if (!(!hasKm && !hasWdt)) {
|
|
104
|
+
_context2.next = 12;
|
|
103
105
|
break;
|
|
104
106
|
}
|
|
105
107
|
return _context2.abrupt("return");
|
|
106
|
-
case
|
|
108
|
+
case 12:
|
|
107
109
|
oldValue = form.getFieldValue('0eVTfMGEyd');
|
|
108
|
-
|
|
110
|
+
if (!hasWdt) {
|
|
111
|
+
_context2.next = 19;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
_context2.next = 16;
|
|
115
|
+
return queryTidByWdtOutSid({
|
|
116
|
+
outSid: value
|
|
117
|
+
});
|
|
118
|
+
case 16:
|
|
119
|
+
_context2.t0 = _context2.sent;
|
|
120
|
+
_context2.next = 22;
|
|
121
|
+
break;
|
|
122
|
+
case 19:
|
|
123
|
+
_context2.next = 21;
|
|
109
124
|
return queryTidByOutSid({
|
|
110
125
|
outSid: value
|
|
111
126
|
});
|
|
112
|
-
case
|
|
113
|
-
|
|
127
|
+
case 21:
|
|
128
|
+
_context2.t0 = _context2.sent;
|
|
129
|
+
case 22:
|
|
130
|
+
res = _context2.t0;
|
|
114
131
|
tradeId = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.tid;
|
|
115
132
|
if (!onlyGetTid) {
|
|
116
|
-
_context2.next =
|
|
133
|
+
_context2.next = 26;
|
|
117
134
|
break;
|
|
118
135
|
}
|
|
119
136
|
return _context2.abrupt("return", tradeId);
|
|
120
|
-
case
|
|
137
|
+
case 26:
|
|
121
138
|
if (tradeId) {
|
|
122
|
-
_context2.next =
|
|
139
|
+
_context2.next = 28;
|
|
123
140
|
break;
|
|
124
141
|
}
|
|
125
142
|
return _context2.abrupt("return");
|
|
126
|
-
case
|
|
143
|
+
case 28:
|
|
127
144
|
form.setFieldsValue({
|
|
128
145
|
m3ap1EvEyd: tradeId
|
|
129
146
|
});
|
|
130
147
|
if (!needTradeIdOrderBack) {
|
|
131
|
-
_context2.next =
|
|
148
|
+
_context2.next = 33;
|
|
132
149
|
break;
|
|
133
150
|
}
|
|
134
151
|
// 创建一个异步操作的Promise
|
|
135
152
|
blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
|
|
136
|
-
_context2.next =
|
|
153
|
+
_context2.next = 33;
|
|
137
154
|
return blurPromise;
|
|
138
|
-
case
|
|
155
|
+
case 33:
|
|
139
156
|
// 所有异步操作完成后执行
|
|
140
157
|
form.setFieldsValue({
|
|
141
158
|
'0eVTfMGEyd': oldValue
|
|
142
159
|
});
|
|
143
160
|
return _context2.abrupt("return", res.data);
|
|
144
|
-
case
|
|
161
|
+
case 35:
|
|
145
162
|
case "end":
|
|
146
163
|
return _context2.stop();
|
|
147
164
|
}
|
|
@@ -949,6 +949,11 @@ var processWlnGoods = function processWlnGoods(templateColumns) {
|
|
|
949
949
|
var processWdtReissueGoods = function processWdtReissueGoods(templateColumns) {
|
|
950
950
|
return function (getValue) {
|
|
951
951
|
return function (nex, config) {
|
|
952
|
+
if (['wdtReissueType', 'wdtReissueGoods', 'wdtSystemOrderNo'].every(function (key) {
|
|
953
|
+
return !getValue("".concat(nex.uniqueKey, "_").concat(key));
|
|
954
|
+
})) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
952
957
|
var orderNo = '';
|
|
953
958
|
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
954
959
|
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
@@ -107,6 +107,7 @@ export declare const queryMemberLevel: (data: {
|
|
|
107
107
|
}) => Promise<serverProps<Array<string>>>;
|
|
108
108
|
export declare const queryShopByTid: (data: any) => Promise<any>;
|
|
109
109
|
export declare const queryTidByOutSid: (data: any) => Promise<any>;
|
|
110
|
+
export declare const queryTidByWdtOutSid: (data: any) => Promise<any>;
|
|
110
111
|
export declare const skqOrderDetail: (data: any) => Promise<any>;
|
|
111
112
|
export declare const nodeWorkOrderPending: (data: any) => Promise<any>;
|
|
112
113
|
export declare const jyOrderDetail: (data: any) => Promise<any>;
|
|
@@ -384,9 +384,17 @@ export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
|
|
|
384
384
|
});
|
|
385
385
|
};
|
|
386
386
|
// jst订单详情
|
|
387
|
+
// export const jstOrderDetail: (data: any) => Promise<any> = (data: any) => {
|
|
388
|
+
// return request({
|
|
389
|
+
// url: '/qy/gdfw/order/jstOrderDetail',
|
|
390
|
+
// method: 'post',
|
|
391
|
+
// data,
|
|
392
|
+
// infoLevel: 'warning',
|
|
393
|
+
// });
|
|
394
|
+
// };
|
|
387
395
|
export var jstOrderDetail = function jstOrderDetail(data) {
|
|
388
396
|
return request({
|
|
389
|
-
url: '/qy/gdfw/
|
|
397
|
+
url: '/qy/gdfw/jst/erp/jstShopCode',
|
|
390
398
|
method: 'post',
|
|
391
399
|
data: data,
|
|
392
400
|
infoLevel: 'warning'
|
|
@@ -618,6 +626,14 @@ export var queryTidByOutSid = function queryTidByOutSid(data) {
|
|
|
618
626
|
data: data
|
|
619
627
|
});
|
|
620
628
|
};
|
|
629
|
+
//通过快递单号获取订单号--旺店通
|
|
630
|
+
export var queryTidByWdtOutSid = function queryTidByWdtOutSid(data) {
|
|
631
|
+
return request({
|
|
632
|
+
url: '/qy/gdfw/wdt/erp/queryTidByOutSid',
|
|
633
|
+
method: 'post',
|
|
634
|
+
data: data
|
|
635
|
+
});
|
|
636
|
+
};
|
|
621
637
|
|
|
622
638
|
// 获取skq订单商品详情
|
|
623
639
|
export var skqOrderDetail = function skqOrderDetail(data) {
|
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.
|
|
3
|
+
"version": "2.2.28",
|
|
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": "2.2.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "2.2.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "2.2.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "2.2.28",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.28",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "2.2.28",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "2e9500bbcbdd5a1ac6f32998d9ec75566c1782c2",
|
|
78
78
|
"gitHooks": {
|
|
79
79
|
"pre-commit": "lint-staged"
|
|
80
80
|
}
|