@kmkf-fe-packages/kmkf-work-order-service-component 2.0.12-beta.13 → 2.0.12-beta.15
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/CloseModal/index.js +21 -8
- package/dist/esm/FlowTemplateDetailV2/components/RemarkListModal/index.js +7 -8
- package/dist/esm/FlowTemplateDetailV2/components/RemarkShow/index.js +6 -1
- package/dist/esm/common/utils/tools.js +38 -29
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
9
9
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import React, { useRef, useContext } from 'react';
|
|
12
|
-
import { Modal, Form, Input, message } from 'antd';
|
|
12
|
+
import { Modal, Form, Input, message, Radio } from 'antd';
|
|
13
13
|
import { ApaasUploadAsync } from '@kmkf-fe-packages/basic-components';
|
|
14
14
|
import { selectCurrentAction } from "../../store/selector";
|
|
15
15
|
import { useSelector } from "../../context/useSelector";
|
|
@@ -47,9 +47,12 @@ var CloseModal = function CloseModal(_ref) {
|
|
|
47
47
|
return form.validateFields();
|
|
48
48
|
case 4:
|
|
49
49
|
remark = _context.sent;
|
|
50
|
+
if (!(remark !== null && remark !== void 0 && remark.flowRefuseType)) {
|
|
51
|
+
remark.flowRefuseType = 1;
|
|
52
|
+
}
|
|
50
53
|
handleClose(remark);
|
|
51
54
|
form.resetFields();
|
|
52
|
-
case
|
|
55
|
+
case 8:
|
|
53
56
|
case "end":
|
|
54
57
|
return _context.stop();
|
|
55
58
|
}
|
|
@@ -64,14 +67,24 @@ var CloseModal = function CloseModal(_ref) {
|
|
|
64
67
|
visible: action === 'close',
|
|
65
68
|
onCancel: closeModal,
|
|
66
69
|
onOk: onOK
|
|
67
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
68
|
-
style: {
|
|
69
|
-
marginBottom: '16px'
|
|
70
|
-
}
|
|
71
|
-
}, "\u786E\u5B9A\u8981\u5173\u95ED\u8BE5\u6761\u5DE5\u5355\u5417\uFF1F"), /*#__PURE__*/React.createElement(Form, {
|
|
70
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
|
|
72
71
|
form: form,
|
|
73
|
-
layout: "vertical"
|
|
72
|
+
layout: "vertical",
|
|
73
|
+
initialValues: {
|
|
74
|
+
flowRefuseType: 1
|
|
75
|
+
}
|
|
74
76
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
77
|
+
name: "flowRefuseType",
|
|
78
|
+
label: "\u8BF7\u9009\u62E9\u5DE5\u5355\u5173\u95ED\u65B9\u5F0F?",
|
|
79
|
+
rules: [{
|
|
80
|
+
required: true,
|
|
81
|
+
message: "\u8BF7\u9009\u62E9\u5DE5\u5355\u5173\u95ED\u65B9\u5F0F"
|
|
82
|
+
}]
|
|
83
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, null, /*#__PURE__*/React.createElement(Radio, {
|
|
84
|
+
value: 1
|
|
85
|
+
}, "\u5C06\u5F53\u524D\u8282\u70B9\u5DE5\u5355\u72B6\u6001\u548C\u6D41\u7A0B\u72B6\u6001\u53D8\u4E3A\u5DF2\u5173\u95ED"), /*#__PURE__*/React.createElement(Radio, {
|
|
86
|
+
value: 2
|
|
87
|
+
}, "\u5C06\u5DF2\u6D41\u8F6C\u7684\u6240\u6709\u4EBA\u5DE5\u8282\u70B9\u5DE5\u5355\u72B6\u6001\u548C\u6D41\u7A0B\u72B6\u6001\u53D8\u4E3A\u5DF2\u5173\u95ED"))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
75
88
|
label: "\u5907\u6CE8",
|
|
76
89
|
name: "remark",
|
|
77
90
|
rules: [{
|
|
@@ -23,10 +23,6 @@ import { listTemplateDetail } from "../../../model/servers/api";
|
|
|
23
23
|
import { getFlowOperate } from "../../common";
|
|
24
24
|
import { OperationLog } from '@kmkf-fe-packages/services-components';
|
|
25
25
|
import styles from "./index.module.less";
|
|
26
|
-
var refuseTypeMap = {
|
|
27
|
-
1: '将当前节点工单状态和流程状态变为已关闭',
|
|
28
|
-
2: '将已流转的所有人工节点工单状态和流程状态变为已关闭'
|
|
29
|
-
};
|
|
30
26
|
var Record = function Record(props) {
|
|
31
27
|
var time = props.time,
|
|
32
28
|
operator = props.operator,
|
|
@@ -35,9 +31,8 @@ var Record = function Record(props) {
|
|
|
35
31
|
nodeName = props.nodeName,
|
|
36
32
|
workOrderUpdateLog = props.workOrderUpdateLog,
|
|
37
33
|
componentDtoList = props.componentDtoList,
|
|
38
|
-
imgList = props.imgList
|
|
39
|
-
|
|
40
|
-
flowRefuseType = _props$flowRefuseType === void 0 ? 1 : _props$flowRefuseType;
|
|
34
|
+
imgList = props.imgList;
|
|
35
|
+
var contextLines = context === null || context === void 0 ? void 0 : context.split('\n');
|
|
41
36
|
return /*#__PURE__*/React.createElement("div", {
|
|
42
37
|
className: styles.remarkContext
|
|
43
38
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -53,7 +48,11 @@ var Record = function Record(props) {
|
|
|
53
48
|
}
|
|
54
49
|
}, getFlowOperate === null || getFlowOperate === void 0 ? void 0 : getFlowOperate[operatorType]))), /*#__PURE__*/React.createElement("div", null, "\u8282\u70B9\uFF1A", nodeName), /*#__PURE__*/React.createElement("div", {
|
|
55
50
|
className: styles.context
|
|
56
|
-
},
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", null, contextLines === null || contextLines === void 0 ? void 0 : contextLines.map(function (item, index) {
|
|
52
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
key: index
|
|
54
|
+
}, item, /*#__PURE__*/React.createElement("br", null));
|
|
55
|
+
})), /*#__PURE__*/React.createElement("div", null, imgList === null || imgList === void 0 ? void 0 : imgList.map(function (item) {
|
|
57
56
|
return /*#__PURE__*/React.createElement(Image, {
|
|
58
57
|
width: 40,
|
|
59
58
|
height: 40,
|
|
@@ -4,6 +4,7 @@ import { imgResize } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
4
4
|
import { getFlowOperate } from "../../common";
|
|
5
5
|
import styles from "./index.module.less";
|
|
6
6
|
var RemarkShow = function RemarkShow(props) {
|
|
7
|
+
var _context$split;
|
|
7
8
|
var time = props.time,
|
|
8
9
|
operator = props.operator,
|
|
9
10
|
context = props.context,
|
|
@@ -34,7 +35,11 @@ var RemarkShow = function RemarkShow(props) {
|
|
|
34
35
|
onClick: handleOpenRemarkList
|
|
35
36
|
}, "\u8BB0\u5F55"))), /*#__PURE__*/React.createElement("div", {
|
|
36
37
|
className: styles.context
|
|
37
|
-
}, /*#__PURE__*/React.createElement("
|
|
38
|
+
}, /*#__PURE__*/React.createElement("div", null, context === null || context === void 0 ? void 0 : (_context$split = context.split('\n')) === null || _context$split === void 0 ? void 0 : _context$split.map(function (item, index) {
|
|
39
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
key: index
|
|
41
|
+
}, item, /*#__PURE__*/React.createElement("br", null));
|
|
42
|
+
})), /*#__PURE__*/React.createElement(React.Fragment, null, imgList === null || imgList === void 0 ? void 0 : imgList.map(function (item) {
|
|
38
43
|
return /*#__PURE__*/React.createElement(Image, {
|
|
39
44
|
width: 20,
|
|
40
45
|
height: 20,
|
|
@@ -131,30 +131,39 @@ var getBasicsOrderInfo = function getBasicsOrderInfo(orderInfo, xiaozhiOrder) {
|
|
|
131
131
|
//订单返填
|
|
132
132
|
export var orderBack = /*#__PURE__*/function () {
|
|
133
133
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
134
|
-
var order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, shopId, _res$data, res, _res$
|
|
134
|
+
var order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, shopId, _res$data, _res$data2, _res$data4, res, _res$data3, _res$data5, JOIN_SHOP, hasFlagMap, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, thirdShopSubType, _data$value, _data$value3, _jstOrder$value, _jstOrder$value2, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsE3Order$value, _kmOrder$value, _gyOrder$value, _bsOrders$orders, _bsE3Orders$orderList, _wlnOrders$orders, _wdtOrders$trades, _gyOrders$trades, _kmOrders$orderDetail, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, xiaozhiOrder, jstOrder, bsOrder, wlnOrder, wdtOrder, bsE3Order, kmOrder, gyOrder, _data$value2, orderInfo, jstOrders, bsOrders, wlnOrders, wdtOrders, bsE3Orders, kmOrders, gyOrders, bsInfo, wlnInfo, bsE3Info, wdtInfo, kmInfo, gyInfo, jstInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, paymentUniqueKey;
|
|
135
135
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
136
136
|
while (1) switch (_context.prev = _context.next) {
|
|
137
137
|
case 0:
|
|
138
138
|
order_no = _ref.order_no, form = _ref.form, propsShopid = _ref.shopId, shopList = _ref.shopList, templateDetail = _ref.templateDetail, _ref$type = _ref.type, type = _ref$type === void 0 ? 'add' : _ref$type, callback = _ref.callback, fromQNCreateWorkOrderByOrderNo = _ref.fromQNCreateWorkOrderByOrderNo, _ref$plat = _ref.plat, plat = _ref$plat === void 0 ? {} : _ref$plat, callbackShopId = _ref.callbackShopId;
|
|
139
139
|
shopId = propsShopid; //如果是pc平台且没有shopId的情况下 获取shopId
|
|
140
140
|
if (!(order_no && plat.platform === PlatForm.PC && !!(plat !== null && plat !== void 0 && plat.bindERP))) {
|
|
141
|
-
_context.next =
|
|
141
|
+
_context.next = 13;
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
|
-
_context.
|
|
144
|
+
_context.prev = 3;
|
|
145
|
+
_context.next = 6;
|
|
145
146
|
return queryShopByTid({
|
|
146
147
|
tid: order_no
|
|
147
148
|
});
|
|
148
|
-
case
|
|
149
|
+
case 6:
|
|
149
150
|
res = _context.sent;
|
|
150
|
-
if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.shopId) {
|
|
151
|
-
|
|
151
|
+
if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.shopId && !(res !== null && res !== void 0 && (_res$data2 = res.data) !== null && _res$data2 !== void 0 && _res$data2.auditStatus)) {
|
|
152
|
+
message.error("\u5339\u914D\u5E97\u94FA\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5".concat(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.shopName, "\u6388\u6743\u662F\u5426\u6B63\u5E38"));
|
|
153
|
+
} else if (res !== null && res !== void 0 && (_res$data4 = res.data) !== null && _res$data4 !== void 0 && _res$data4.shopId) {
|
|
154
|
+
shopId = res === null || res === void 0 ? void 0 : (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.shopId;
|
|
152
155
|
form.setFieldsValue({
|
|
153
156
|
shopId: shopId
|
|
154
157
|
});
|
|
155
158
|
callbackShopId === null || callbackShopId === void 0 ? void 0 : callbackShopId(shopId);
|
|
156
159
|
}
|
|
157
|
-
|
|
160
|
+
_context.next = 13;
|
|
161
|
+
break;
|
|
162
|
+
case 10:
|
|
163
|
+
_context.prev = 10;
|
|
164
|
+
_context.t0 = _context["catch"](3);
|
|
165
|
+
console.error(_context.t0);
|
|
166
|
+
case 13:
|
|
158
167
|
//是否是对接平台,只有对接平台才能返填订单号
|
|
159
168
|
JOIN_SHOP = shopList.find(function (item) {
|
|
160
169
|
return !item.notJoin && item.shopId == shopId;
|
|
@@ -170,15 +179,15 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
170
179
|
}).every(function (item) {
|
|
171
180
|
return item === false;
|
|
172
181
|
}))) {
|
|
173
|
-
_context.next =
|
|
182
|
+
_context.next = 17;
|
|
174
183
|
break;
|
|
175
184
|
}
|
|
176
185
|
return _context.abrupt("return");
|
|
177
|
-
case
|
|
186
|
+
case 17:
|
|
178
187
|
_ref3 = shopList.find(function (item) {
|
|
179
188
|
return item.shopId == shopId;
|
|
180
189
|
}) || {}, shopSourceStr = _ref3.shopSourceStr, _ref3$thirdUserNick = _ref3.thirdUserNick, thirdUserNick = _ref3$thirdUserNick === void 0 ? '' : _ref3$thirdUserNick, thirdShopSubType = _ref3.thirdShopSubType;
|
|
181
|
-
_context.prev =
|
|
190
|
+
_context.prev = 18;
|
|
182
191
|
promise = [];
|
|
183
192
|
if (!JOIN_SHOP || thirdShopSubType === 1 && shopSourceStr === 'JD') {
|
|
184
193
|
promise.push(Promise.resolve([]));
|
|
@@ -213,9 +222,9 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
213
222
|
});
|
|
214
223
|
|
|
215
224
|
//需按照orderBackMap中的顺序结构
|
|
216
|
-
_context.next =
|
|
225
|
+
_context.next = 25;
|
|
217
226
|
return Promise.allSettled(promise);
|
|
218
|
-
case
|
|
227
|
+
case 25:
|
|
219
228
|
_yield$Promise$allSet = _context.sent;
|
|
220
229
|
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 9);
|
|
221
230
|
data = _yield$Promise$allSet2[0];
|
|
@@ -397,7 +406,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
397
406
|
hasSelectItem = HasErpItemSelectHandle(templateDetail);
|
|
398
407
|
erpPromiseList = [];
|
|
399
408
|
if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
|
|
400
|
-
_context.next =
|
|
409
|
+
_context.next = 85;
|
|
401
410
|
break;
|
|
402
411
|
}
|
|
403
412
|
list = detail['itemList'];
|
|
@@ -415,10 +424,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
415
424
|
resolve({});
|
|
416
425
|
});
|
|
417
426
|
});
|
|
418
|
-
_context.prev =
|
|
419
|
-
_context.next =
|
|
427
|
+
_context.prev = 75;
|
|
428
|
+
_context.next = 78;
|
|
420
429
|
return Promise.all(promises);
|
|
421
|
-
case
|
|
430
|
+
case 78:
|
|
422
431
|
erpPromiseList = _context.sent;
|
|
423
432
|
detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
|
|
424
433
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -428,13 +437,13 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
428
437
|
})
|
|
429
438
|
});
|
|
430
439
|
});
|
|
431
|
-
_context.next =
|
|
440
|
+
_context.next = 85;
|
|
432
441
|
break;
|
|
433
|
-
case
|
|
434
|
-
_context.prev =
|
|
435
|
-
_context.
|
|
436
|
-
console.error('调用erp获取宝贝编码错误', _context.
|
|
437
|
-
case
|
|
442
|
+
case 82:
|
|
443
|
+
_context.prev = 82;
|
|
444
|
+
_context.t1 = _context["catch"](75);
|
|
445
|
+
console.error('调用erp获取宝贝编码错误', _context.t1);
|
|
446
|
+
case 85:
|
|
438
447
|
// console.log('detail', detail);
|
|
439
448
|
values = orderBackFormValues({
|
|
440
449
|
detail: detail,
|
|
@@ -476,17 +485,17 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
476
485
|
fixed_field_buyerOpenUid: orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.buyerOpenUid
|
|
477
486
|
}));
|
|
478
487
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
479
|
-
_context.next =
|
|
488
|
+
_context.next = 96;
|
|
480
489
|
break;
|
|
481
|
-
case
|
|
482
|
-
_context.prev =
|
|
483
|
-
_context.
|
|
484
|
-
console.error(_context.
|
|
485
|
-
case
|
|
490
|
+
case 93:
|
|
491
|
+
_context.prev = 93;
|
|
492
|
+
_context.t2 = _context["catch"](18);
|
|
493
|
+
console.error(_context.t2);
|
|
494
|
+
case 96:
|
|
486
495
|
case "end":
|
|
487
496
|
return _context.stop();
|
|
488
497
|
}
|
|
489
|
-
}, _callee, null, [[
|
|
498
|
+
}, _callee, null, [[3, 10], [18, 93], [75, 82]]);
|
|
490
499
|
}));
|
|
491
500
|
return function orderBack(_x) {
|
|
492
501
|
return _ref2.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "2.0.12-beta.
|
|
3
|
+
"version": "2.0.12-beta.15",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "90180d9c23017d15ff0930a2c94b970bd812f282",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|