@kmkf-fe-packages/kmkf-work-order-service-component 0.11.1 → 0.12.0-alpha.1
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.
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
5
|
+
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); }); }; }
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
+
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; }
|
|
10
|
+
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; } }
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
import React, { useEffect, useState } from 'react';
|
|
2
13
|
import { Modal, Timeline } from 'antd';
|
|
3
14
|
import { useSelector, useDispatch } from 'react-redux';
|
|
4
|
-
import { selectVisibleRemarkList, selectRemarkRecordList } from "../../../model/flowTemplateDetail/selector";
|
|
15
|
+
import { selectVisibleRemarkList, selectRemarkRecordList, selectCurrentNodeDetail } from "../../../model/flowTemplateDetail/selector";
|
|
5
16
|
import { setVisibleRemarkList } from "../../../model/flowTemplateDetail";
|
|
17
|
+
import { reportLogs } from "../../../model/servers/api";
|
|
6
18
|
import { getFlowOperate } from "../../common";
|
|
19
|
+
import { OperationLog } from '@kmkf-fe-packages/services-components';
|
|
7
20
|
import styles from "./index.module.less";
|
|
8
21
|
var Record = function Record(props) {
|
|
9
22
|
var time = props.time,
|
|
10
23
|
operator = props.operator,
|
|
11
24
|
context = props.context,
|
|
12
|
-
operatorType = props.operatorType
|
|
25
|
+
operatorType = props.operatorType,
|
|
26
|
+
componentDtoList = props.componentDtoList,
|
|
27
|
+
content = props.content;
|
|
13
28
|
return /*#__PURE__*/React.createElement("div", {
|
|
14
29
|
className: styles.remarkContext
|
|
15
30
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -22,15 +37,57 @@ var Record = function Record(props) {
|
|
|
22
37
|
className: styles.tag
|
|
23
38
|
}, getFlowOperate === null || getFlowOperate === void 0 ? void 0 : getFlowOperate[operatorType]))), /*#__PURE__*/React.createElement("div", {
|
|
24
39
|
className: styles.context
|
|
25
|
-
}, context)
|
|
40
|
+
}, context), /*#__PURE__*/React.createElement(OperationLog, {
|
|
41
|
+
content: content,
|
|
42
|
+
operation: 'ADD',
|
|
43
|
+
componentDtoList: componentDtoList
|
|
44
|
+
}));
|
|
26
45
|
};
|
|
27
46
|
var RemarkListModal = function RemarkListModal() {
|
|
47
|
+
var _useState = useState(),
|
|
48
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
49
|
+
content = _useState2[0],
|
|
50
|
+
setContent = _useState2[1];
|
|
28
51
|
var visible = useSelector(selectVisibleRemarkList);
|
|
29
52
|
var list = useSelector(selectRemarkRecordList);
|
|
53
|
+
var currentNodeDetail = useSelector(selectCurrentNodeDetail);
|
|
30
54
|
var dispatch = useDispatch();
|
|
31
55
|
var closeModal = function closeModal() {
|
|
32
56
|
dispatch(setVisibleRemarkList(false));
|
|
33
57
|
};
|
|
58
|
+
var getLog = /*#__PURE__*/function () {
|
|
59
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
60
|
+
var _result$;
|
|
61
|
+
var _yield$reportLogs, result;
|
|
62
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
63
|
+
while (1) switch (_context.prev = _context.next) {
|
|
64
|
+
case 0:
|
|
65
|
+
_context.next = 2;
|
|
66
|
+
return reportLogs({
|
|
67
|
+
pageNo: 1,
|
|
68
|
+
pageSize: 1000,
|
|
69
|
+
rowId: '65378bdcdec9e2017fcc852d',
|
|
70
|
+
shopId: '460026190'
|
|
71
|
+
});
|
|
72
|
+
case 2:
|
|
73
|
+
_yield$reportLogs = _context.sent;
|
|
74
|
+
result = _yield$reportLogs.data.result;
|
|
75
|
+
setContent((_result$ = result[0]) === null || _result$ === void 0 ? void 0 : _result$.content);
|
|
76
|
+
case 5:
|
|
77
|
+
case "end":
|
|
78
|
+
return _context.stop();
|
|
79
|
+
}
|
|
80
|
+
}, _callee);
|
|
81
|
+
}));
|
|
82
|
+
return function getLog() {
|
|
83
|
+
return _ref.apply(this, arguments);
|
|
84
|
+
};
|
|
85
|
+
}();
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
if (visible) {
|
|
88
|
+
getLog();
|
|
89
|
+
}
|
|
90
|
+
}, [visible]);
|
|
34
91
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
35
92
|
title: "\u8BB0\u5F55",
|
|
36
93
|
visible: visible,
|
|
@@ -41,7 +98,11 @@ var RemarkListModal = function RemarkListModal() {
|
|
|
41
98
|
overflowY: 'auto'
|
|
42
99
|
}
|
|
43
100
|
}, /*#__PURE__*/React.createElement(Timeline, null, list === null || list === void 0 ? void 0 : list.map(function (flowRecord) {
|
|
44
|
-
|
|
101
|
+
var _currentNodeDetail$wo;
|
|
102
|
+
return /*#__PURE__*/React.createElement(Timeline.Item, null, /*#__PURE__*/React.createElement(Record, _extends({}, flowRecord, {
|
|
103
|
+
componentDtoList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo === void 0 ? void 0 : _currentNodeDetail$wo.componentDtoList,
|
|
104
|
+
content: content
|
|
105
|
+
})));
|
|
45
106
|
})));
|
|
46
107
|
};
|
|
47
108
|
export default RemarkListModal;
|
|
@@ -893,13 +893,17 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
893
893
|
name: item.name
|
|
894
894
|
});
|
|
895
895
|
} else if (['REISSUE_TRADE_ID', 'EXCHANGE_TRADE_ID'].includes(item.workOrderComponentType)) {
|
|
896
|
-
var
|
|
897
|
-
REISSUE_TRADE_ID: 'reissueTradeId',
|
|
898
|
-
EXCHANGE_TRADE_ID: 'exchangeTradeId'
|
|
899
|
-
};
|
|
896
|
+
var tradeItemList = get(nowData, "".concat(item.uniqueKey), []);
|
|
900
897
|
contentVoList.push({
|
|
901
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
902
|
-
content:
|
|
898
|
+
uniqueKey: "".concat(item.uniqueKey, "_tradeItemList"),
|
|
899
|
+
content: tradeItemList,
|
|
900
|
+
name: item.name
|
|
901
|
+
});
|
|
902
|
+
contentVoList.push({
|
|
903
|
+
uniqueKey: "".concat(item.uniqueKey, "_tradeIdList"),
|
|
904
|
+
content: tradeItemList.map(function (item) {
|
|
905
|
+
return item.billNo + '';
|
|
906
|
+
}),
|
|
903
907
|
name: item.name
|
|
904
908
|
});
|
|
905
909
|
} else if (item.workOrderComponentType === 'WLN_LOGISTICS') {
|
|
@@ -1244,12 +1248,6 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1244
1248
|
logisticsCode: null
|
|
1245
1249
|
}]);
|
|
1246
1250
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList6));
|
|
1247
|
-
} else if (['REISSUE_TRADE_ID'].includes(nex.workOrderComponentType)) {
|
|
1248
|
-
var TRADE_ID_MAP = {
|
|
1249
|
-
REISSUE_TRADE_ID: 'reissueTradeId',
|
|
1250
|
-
EXCHANGE_TRADE_ID: 'exchangeTradeId'
|
|
1251
|
-
};
|
|
1252
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_").concat(TRADE_ID_MAP[nex.workOrderComponentType])]));
|
|
1253
1251
|
} else if (['REISSUE_STATUS', 'ADJUST_WORK_ORDER_STATUS', 'CREATE_STATUS', 'INVOICE_STATUS'].includes(nex.workOrderComponentType)) {
|
|
1254
1252
|
var STATUS_MAP = {
|
|
1255
1253
|
REISSUE_STATUS: {
|
|
@@ -1411,9 +1409,7 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1411
1409
|
}));
|
|
1412
1410
|
} else if (nex.workOrderComponentType === 'BUYER_MESSAGE_NOTICE') {
|
|
1413
1411
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_buyerMessageNotice")] || (config === null || config === void 0 ? void 0 : config.select)));
|
|
1414
|
-
} else if (['RETURN_GOODS_TRADE_ID', 'BS_DELIVERY_NO',
|
|
1415
|
-
// 'REISSUE_TRADE_ID',
|
|
1416
|
-
'EXCHANGE_TRADE_ID'].includes(nex.workOrderComponentType)) {
|
|
1412
|
+
} else if (['RETURN_GOODS_TRADE_ID', 'BS_DELIVERY_NO', 'REISSUE_TRADE_ID', 'EXCHANGE_TRADE_ID'].includes(nex.workOrderComponentType)) {
|
|
1417
1413
|
var SYSTEM_ORDER_MAP = {
|
|
1418
1414
|
BS_DELIVERY_NO: {
|
|
1419
1415
|
key: 'deliveryNoList',
|
|
@@ -1471,7 +1467,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
|
|
|
1471
1467
|
//订单返填
|
|
1472
1468
|
export var orderBack = /*#__PURE__*/function () {
|
|
1473
1469
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
1474
|
-
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, orderInfo, jstInfo, bsOrders, wlnOrders, bsInfo, wlnInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo,
|
|
1470
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, orderInfo, jstInfo, bsOrders, wlnOrders, bsInfo, wlnInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread68, _cacheOrderInfo;
|
|
1475
1471
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1476
1472
|
while (1) switch (_context.prev = _context.next) {
|
|
1477
1473
|
case 0:
|
|
@@ -1670,7 +1666,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1670
1666
|
sessionStorage.setItem('cacheOmsOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, cacheOrderInfo), {}, _defineProperty({}, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, plat === null || plat === void 0 ? void 0 : plat.subOrderNo, _objectSpread(_objectSpread({}, formValue), values))))));
|
|
1671
1667
|
} else {
|
|
1672
1668
|
_cacheOrderInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
1673
|
-
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (
|
|
1669
|
+
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (_objectSpread68 = {}, _defineProperty(_objectSpread68, order_no, values), _defineProperty(_objectSpread68, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, order_no, _objectSpread(_objectSpread({}, formValue), values))), _objectSpread68))));
|
|
1674
1670
|
}
|
|
1675
1671
|
}
|
|
1676
1672
|
// console.log('orderback', values);
|
|
@@ -1994,6 +1990,9 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
1994
1990
|
case 'RETURN_GOODS_TRADE_ID':
|
|
1995
1991
|
prv["".concat(next.uniqueKey, "_returnGoodsTradeItemList")] = JSON.stringify(values[next.uniqueKey] || []);
|
|
1996
1992
|
break;
|
|
1993
|
+
case 'REISSUE_TRADE_ID':
|
|
1994
|
+
prv["".concat(next.uniqueKey, "_tradeItemList")] = JSON.stringify(values[next.uniqueKey] || []);
|
|
1995
|
+
break;
|
|
1997
1996
|
case 'EXCHANGE_TRADE_ID':
|
|
1998
1997
|
prv["".concat(next.uniqueKey, "_tradeItemList")] = JSON.stringify(values[next.uniqueKey] || []);
|
|
1999
1998
|
break;
|
|
@@ -6,6 +6,7 @@ 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;
|
|
9
10
|
}) => import("./types").LogicFlow[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").LogicFlow[], {
|
|
10
11
|
clearCache: () => void;
|
|
11
12
|
}> & {
|
|
@@ -19,6 +20,7 @@ export declare const selectGroupFlowList: ((state: {
|
|
|
19
20
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
20
21
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
21
22
|
logicFlow: import("./types").LogicFlowState;
|
|
23
|
+
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
22
24
|
}) => import("./types").Option[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").Option[], {
|
|
23
25
|
clearCache: () => void;
|
|
24
26
|
}> & {
|
|
@@ -32,6 +34,7 @@ export declare const selectFlowTemplateGroupWorkOrderTemplateList: ((state: {
|
|
|
32
34
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
33
35
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
34
36
|
logicFlow: import("./types").LogicFlowState;
|
|
37
|
+
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
35
38
|
}) => import("./types").Option[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").Option[], {
|
|
36
39
|
clearCache: () => void;
|
|
37
40
|
}> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-alpha.1",
|
|
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.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^0.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^0.12.0-alpha.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.12.0-alpha.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.12.0-alpha.1",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "dacb2b0d1a63e567725fefa01677383a21678756",
|
|
76
76
|
"gitHooks": {
|
|
77
77
|
"pre-commit": "lint-staged"
|
|
78
78
|
}
|