@kmkf-fe-packages/kmkf-work-order-service-component 2.2.22 → 2.2.24
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/CurrentNode/index.js +7 -2
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.d.ts +1 -0
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +21 -1
- package/dist/esm/FlowTemplateDetailV2/components/Item/index.d.ts +1 -0
- package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +12 -2
- package/dist/esm/FlowTemplateDetailV2/components/RemarkListModal/index.d.ts +1 -0
- package/dist/esm/FlowTemplateDetailV2/components/RemarkListModal/index.js +19 -11
- package/dist/esm/FlowTemplateDetailV2/index.js +7 -1
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +1 -1
- package/dist/esm/common/utils/tools.js +20 -12
- package/dist/esm/common/utils/transformWorkOrderData.js +3 -3
- package/dist/esm/model/servers/api.js +5 -0
- package/package.json +5 -5
|
@@ -20,6 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
20
20
|
import React, { useEffect, useMemo, useState, useRef, forwardRef, useImperativeHandle, useContext } from 'react';
|
|
21
21
|
import { message } from 'antd';
|
|
22
22
|
import { useMemoizedFn } from 'ahooks';
|
|
23
|
+
import { get, find } from 'lodash';
|
|
23
24
|
import { calcWorkOrderList, submitParams } from "../../../common/utils/tools";
|
|
24
25
|
import { FlowStatus, NodeType, NodeStatus } from "../../../model/flowTemplateDetail/types";
|
|
25
26
|
import { modifyWorkOrder, restartAutoTask } from "../../../model/flowTemplateDetail/api";
|
|
@@ -40,7 +41,7 @@ var formProps = {
|
|
|
40
41
|
layout: 'vertical'
|
|
41
42
|
};
|
|
42
43
|
var CurrentNode = function CurrentNode(props, ref) {
|
|
43
|
-
var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$fl, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo22;
|
|
44
|
+
var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$fl, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo22, _currentNodeDetail$no22, _currentNodeDetail$wo23;
|
|
44
45
|
var formRenderRef = useRef(null);
|
|
45
46
|
useImperativeHandle(ref, function () {
|
|
46
47
|
return {
|
|
@@ -201,7 +202,10 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
201
202
|
flowWorkOrderId: flowWorkOrderId,
|
|
202
203
|
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.id,
|
|
203
204
|
workOrderUpdateTime: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.update
|
|
204
|
-
})
|
|
205
|
+
}),
|
|
206
|
+
shopUniqueKey: get(find(shopList, function (s) {
|
|
207
|
+
return s.shopId === formData.shopId;
|
|
208
|
+
}), 'accessToken', '')
|
|
205
209
|
});
|
|
206
210
|
_context.next = 7;
|
|
207
211
|
return modifyWorkOrder(params);
|
|
@@ -330,6 +334,7 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
330
334
|
handleChangeTradeId: handleChangeTradeId,
|
|
331
335
|
canModifyPayment: true,
|
|
332
336
|
flowAllShowHideRules: allShowHideRules,
|
|
337
|
+
isStartNodeWaiting: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no22 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.nodeType) && [NodeStatus.WAITING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo23 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.flowStatus),
|
|
333
338
|
firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
|
|
334
339
|
autoSubmit: autoSubmit
|
|
335
340
|
})), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
|
|
@@ -32,6 +32,7 @@ declare type FormRenderProps = {
|
|
|
32
32
|
firstOrderBackfill?: boolean;
|
|
33
33
|
isErpUse?: boolean;
|
|
34
34
|
autoSubmit?: boolean;
|
|
35
|
+
isStartNodeWaiting?: boolean;
|
|
35
36
|
};
|
|
36
37
|
declare const _default: React.ForwardRefExoticComponent<FormRenderProps & React.RefAttributes<unknown>>;
|
|
37
38
|
export default _default;
|
|
@@ -93,6 +93,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
93
93
|
isErpUse = _props$isErpUse === void 0 ? false : _props$isErpUse,
|
|
94
94
|
_props$autoSubmit = props.autoSubmit,
|
|
95
95
|
autoSubmit = _props$autoSubmit === void 0 ? false : _props$autoSubmit,
|
|
96
|
+
_props$isStartNodeWai = props.isStartNodeWaiting,
|
|
97
|
+
isStartNodeWaiting = _props$isStartNodeWai === void 0 ? false : _props$isStartNodeWai,
|
|
96
98
|
onJumpPage = props.onJumpPage;
|
|
97
99
|
var shopIdToUniqueKeyMap = useMemo(function () {
|
|
98
100
|
var json = {};
|
|
@@ -101,6 +103,11 @@ var FormRender = function FormRender(props, ref) {
|
|
|
101
103
|
});
|
|
102
104
|
return json;
|
|
103
105
|
}, [shopList]);
|
|
106
|
+
var userInfo = JSON.parse(localStorage.getItem('reduxData_userInfo') || '{}');
|
|
107
|
+
var canEditShopName = useMemo(function () {
|
|
108
|
+
var _userInfo$companyUser, _userInfo$companyUser2;
|
|
109
|
+
return (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$companyUser = userInfo.companyUserConfig) === null || _userInfo$companyUser === void 0 ? void 0 : (_userInfo$companyUser2 = _userInfo$companyUser.pc) === null || _userInfo$companyUser2 === void 0 ? void 0 : _userInfo$companyUser2.canEditShopName) || false;
|
|
110
|
+
}, [userInfo]);
|
|
104
111
|
var mappingConfig = useMemo(function () {
|
|
105
112
|
return getMappingConfigByTemplateDetail(templateDetail);
|
|
106
113
|
}, [templateDetail]);
|
|
@@ -1577,6 +1584,19 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1577
1584
|
labelList: labelList,
|
|
1578
1585
|
shopId: shopId
|
|
1579
1586
|
}));
|
|
1587
|
+
var shopNameDisabled = useMemo(function () {
|
|
1588
|
+
console.log(isStartNodeWaiting, canEditShopName, look, workOrderId);
|
|
1589
|
+
if (isStartNodeWaiting && !look) {
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
if (canEditShopName && !look) {
|
|
1593
|
+
return false;
|
|
1594
|
+
}
|
|
1595
|
+
if (look || !!workOrderId) {
|
|
1596
|
+
return true;
|
|
1597
|
+
}
|
|
1598
|
+
return false;
|
|
1599
|
+
}, [workOrderId, look, canEditShopName, isStartNodeWaiting]);
|
|
1580
1600
|
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
1581
1601
|
locale: zhCN
|
|
1582
1602
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1609,7 +1629,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1609
1629
|
shopList: shopList,
|
|
1610
1630
|
handleChangeShopId: handleChangeShopId,
|
|
1611
1631
|
hidden: !isShowShopList,
|
|
1612
|
-
disabled:
|
|
1632
|
+
disabled: shopNameDisabled
|
|
1613
1633
|
}), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1614
1634
|
name: "fixed_field_buyerOpenUid",
|
|
1615
1635
|
hidden: true
|
|
@@ -20,6 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
20
20
|
import React, { useState, useMemo, useEffect, useContext } from 'react';
|
|
21
21
|
import { Form, message } from 'antd';
|
|
22
22
|
import { useRequest } from 'ahooks';
|
|
23
|
+
import { get, find } from 'lodash';
|
|
23
24
|
import Header from "../Header";
|
|
24
25
|
import FormRender from "../FormRender";
|
|
25
26
|
import RenderDetail from "../RenderDetail";
|
|
@@ -45,6 +46,7 @@ var NodeItem = function NodeItem(props) {
|
|
|
45
46
|
onOpenWangWang = props.onOpenWangWang,
|
|
46
47
|
openCloseCallback = props.openCloseCallback,
|
|
47
48
|
queryRemarkList = props.queryRemarkList,
|
|
49
|
+
updateShopId = props.updateShopId,
|
|
48
50
|
handler = props.handler,
|
|
49
51
|
canWithdraw = props.canWithdraw,
|
|
50
52
|
_props$readonly = props.readonly,
|
|
@@ -166,7 +168,7 @@ var NodeItem = function NodeItem(props) {
|
|
|
166
168
|
};
|
|
167
169
|
var handleSave = /*#__PURE__*/function () {
|
|
168
170
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
169
|
-
var _data$data, _data$data$workOrder, _data$data2, _data$data2$workOrder, formData, params, res;
|
|
171
|
+
var _data$data, _data$data$workOrder, _data$data2, _data$data2$workOrder, formData, params, res, _params$updateInfo, _params$updateInfo$up, isUpdateShopId;
|
|
170
172
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
171
173
|
while (1) switch (_context2.prev = _context2.next) {
|
|
172
174
|
case 0:
|
|
@@ -185,7 +187,10 @@ var NodeItem = function NodeItem(props) {
|
|
|
185
187
|
flowWorkOrderId: flowWorkOrderId,
|
|
186
188
|
workOrderId: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$workOrder = _data$data.workOrder) === null || _data$data$workOrder === void 0 ? void 0 : _data$data$workOrder.id,
|
|
187
189
|
workOrderUpdateTime: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$workOrder = _data$data2.workOrder) === null || _data$data2$workOrder === void 0 ? void 0 : _data$data2$workOrder.update
|
|
188
|
-
})
|
|
190
|
+
}),
|
|
191
|
+
shopUniqueKey: get(find(shopList, function (s) {
|
|
192
|
+
return s.shopId === formData.shopId;
|
|
193
|
+
}), 'accessToken', '')
|
|
189
194
|
});
|
|
190
195
|
_context2.next = 7;
|
|
191
196
|
return modifyWorkOrder(params);
|
|
@@ -195,6 +200,11 @@ var NodeItem = function NodeItem(props) {
|
|
|
195
200
|
message.success('数据修改成功');
|
|
196
201
|
run();
|
|
197
202
|
queryRemarkList();
|
|
203
|
+
//如果修改了店铺 回调
|
|
204
|
+
isUpdateShopId = (_params$updateInfo = params.updateInfo) === null || _params$updateInfo === void 0 ? void 0 : (_params$updateInfo$up = _params$updateInfo.updateList) === null || _params$updateInfo$up === void 0 ? void 0 : _params$updateInfo$up.some(function (item) {
|
|
205
|
+
return item.dataKey === 'userId';
|
|
206
|
+
});
|
|
207
|
+
isUpdateShopId && (updateShopId === null || updateShopId === void 0 ? void 0 : updateShopId());
|
|
198
208
|
setEditing(false);
|
|
199
209
|
}
|
|
200
210
|
_context2.next = 14;
|
|
@@ -1,18 +1,18 @@
|
|
|
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
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
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
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); } }
|
|
9
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); }); }; }
|
|
10
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
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."); }
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
14
8
|
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; } }
|
|
15
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
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); }
|
|
13
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
15
|
+
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; }
|
|
16
16
|
import React, { useEffect, useState, useContext } from 'react';
|
|
17
17
|
import { Modal, Timeline, Image } from 'antd';
|
|
18
18
|
import { cloneDeep } from 'lodash';
|
|
@@ -33,7 +33,8 @@ var Record = function Record(props) {
|
|
|
33
33
|
workOrderUpdateLog = props.workOrderUpdateLog,
|
|
34
34
|
componentDtoList = props.componentDtoList,
|
|
35
35
|
imgList = props.imgList,
|
|
36
|
-
plat = props.plat
|
|
36
|
+
plat = props.plat,
|
|
37
|
+
shopList = props.shopList;
|
|
37
38
|
var contextLines = context === null || context === void 0 ? void 0 : context.split('\n');
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
40
|
className: styles.remarkContext
|
|
@@ -66,12 +67,18 @@ var Record = function Record(props) {
|
|
|
66
67
|
}))), workOrderUpdateLog ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(OperationLog, {
|
|
67
68
|
content: workOrderUpdateLog.content,
|
|
68
69
|
operation: workOrderUpdateLog.operation,
|
|
69
|
-
componentDtoList: componentDtoList,
|
|
70
|
-
|
|
70
|
+
componentDtoList: [].concat(_toConsumableArray(componentDtoList), [{
|
|
71
|
+
name: '店铺名称',
|
|
72
|
+
uniqueKey: 'userId',
|
|
73
|
+
workOrderComponentType: 'SHOP_INPUT'
|
|
74
|
+
}]),
|
|
75
|
+
plat: plat,
|
|
76
|
+
shopList: shopList
|
|
71
77
|
})) : null);
|
|
72
78
|
};
|
|
73
79
|
var RemarkListModal = function RemarkListModal(props) {
|
|
74
|
-
var plat = props.plat
|
|
80
|
+
var plat = props.plat,
|
|
81
|
+
shopList = props.shopList;
|
|
75
82
|
var visible = useSelector(selectVisibleRemarkList);
|
|
76
83
|
var list = useSelector(selectRemarkRecordList);
|
|
77
84
|
var _useState = useState([]),
|
|
@@ -153,7 +160,8 @@ var RemarkListModal = function RemarkListModal(props) {
|
|
|
153
160
|
}
|
|
154
161
|
}, /*#__PURE__*/React.createElement(Timeline, null, remarkList === null || remarkList === void 0 ? void 0 : remarkList.map(function (flowRecord) {
|
|
155
162
|
return /*#__PURE__*/React.createElement(Timeline.Item, null, /*#__PURE__*/React.createElement(Record, _extends({}, flowRecord, {
|
|
156
|
-
plat: plat
|
|
163
|
+
plat: plat,
|
|
164
|
+
shopList: shopList
|
|
157
165
|
})));
|
|
158
166
|
})));
|
|
159
167
|
};
|
|
@@ -1095,6 +1095,10 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1095
1095
|
flowWorkOrderId: flowWorkOrderIdState
|
|
1096
1096
|
}));
|
|
1097
1097
|
};
|
|
1098
|
+
var updateShopId = function updateShopId() {
|
|
1099
|
+
reFreshPanel();
|
|
1100
|
+
callbackDealWorkOrderSuccess === null || callbackDealWorkOrderSuccess === void 0 ? void 0 : callbackDealWorkOrderSuccess('updateShopId');
|
|
1101
|
+
};
|
|
1098
1102
|
useEffect(function () {
|
|
1099
1103
|
if (flowTemplateKey) {
|
|
1100
1104
|
reFreshPanel();
|
|
@@ -1337,6 +1341,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1337
1341
|
onOpenWangWang: onOpenWangWang,
|
|
1338
1342
|
onJumpPage: onJumpPage,
|
|
1339
1343
|
queryRemarkList: queryRemarkList,
|
|
1344
|
+
updateShopId: updateShopId,
|
|
1340
1345
|
handler: flowRecord.operator,
|
|
1341
1346
|
canWithdraw: canWithdraw,
|
|
1342
1347
|
readonly: readonly,
|
|
@@ -1392,7 +1397,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1392
1397
|
});
|
|
1393
1398
|
}
|
|
1394
1399
|
}), /*#__PURE__*/React.createElement(RemarkListModal, {
|
|
1395
|
-
plat: plat
|
|
1400
|
+
plat: plat,
|
|
1401
|
+
shopList: shopList
|
|
1396
1402
|
}), /*#__PURE__*/React.createElement(ForWardModal, {
|
|
1397
1403
|
flowTemplateId: flowTemplateId,
|
|
1398
1404
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no27 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no27 === void 0 ? void 0 : _currentNodeDetail$no27.id,
|
|
@@ -511,7 +511,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
511
511
|
};
|
|
512
512
|
var onDealWorkOrderSuccess = function onDealWorkOrderSuccess(type) {
|
|
513
513
|
dispatch(setWorkOrderProcessStatus(type));
|
|
514
|
-
if (['submit', 'forward', 'close', 'rejected'].includes(type)) {
|
|
514
|
+
if (['submit', 'forward', 'close', 'rejected'].includes(type) || type === 'updateShopId' && platform !== PlatForm.WEB) {
|
|
515
515
|
dispatch(setFormModalVisible(false));
|
|
516
516
|
}
|
|
517
517
|
//除了 暂停和启动外,都需要更新列表数据
|
|
@@ -140,7 +140,7 @@ var getBasicsOrderInfo = function getBasicsOrderInfo(orderInfo, xiaozhiOrder) {
|
|
|
140
140
|
//订单返填
|
|
141
141
|
export var orderBack = /*#__PURE__*/function () {
|
|
142
142
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
143
|
-
var companyKey, order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, setLoading, callKey, shopId, trySetShopId, _res$data, res, _res$data2, _res$data3, JOIN_SHOP, hasFlagMap, _ref4, shopSourceStr, _ref4$thirdUserNick, thirdUserNick, thirdShopMainType, _kmVideoComponent$com, _data$value, _data$value3, _data$value4, _jstOrder$value, _jstOrder$value2, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsE3Order$value, _kmOrder$value, _gyOrder$value, _jyOrder$value,
|
|
143
|
+
var companyKey, order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, setLoading, callKey, shopId, trySetShopId, _res$data, res, _res$data2, _res$data3, JOIN_SHOP, hasFlagMap, _ref4, shopSourceStr, _ref4$thirdUserNick, thirdUserNick, thirdShopMainType, _kmVideoComponent$com, _data$value, _data$value3, _data$value4, _jstOrder$value, _jstOrder$value2, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsE3Order$value, _kmOrder$value, _gyOrder$value, _jyOrder$value, _skxOrder$value, _skxReturnOrder$value, _bsOrders$orders, _bsE3Orders$orderList, _wlnOrders$orders, _wdtOrders$trades, _gyOrders$trades, _jyOrders$trades, _kmOrders$orderDetail, promise, kmVideoComponent, OrderSubFormComponent, _yield$Promise$allSet, _yield$Promise$allSet2, data, xiaozhiOrder, jstOrder, bsOrder, wlnOrder, wdtOrder, bsE3Order, kmOrder, gyOrder, jyOrder, skxOrder, skxReturnOrder, kmVideoOrder, orderSubFormOrder, _data$value2, orderInfo, jstOrders, bsOrders, wlnOrders, wdtOrders, bsE3Orders, kmOrders, gyOrders, jyOrders, skxOrders, skxReturnOrders, bsInfo, wlnInfo, bsE3Info, wdtInfo, kmInfo, orderSubFormInfo, gyInfo, jyInfo, jstInfo, skxInfo, skxReturnInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, hasSigningDatetime, _signDatetime$data, signDatetime, values, paymentUniqueKey;
|
|
144
144
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
145
145
|
while (1) switch (_context.prev = _context.next) {
|
|
146
146
|
case 0:
|
|
@@ -346,7 +346,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
346
346
|
bsE3Orders = bsE3Order === null || bsE3Order === void 0 ? void 0 : (_bsE3Order$value = bsE3Order.value) === null || _bsE3Order$value === void 0 ? void 0 : _bsE3Order$value.data;
|
|
347
347
|
kmOrders = kmOrder === null || kmOrder === void 0 ? void 0 : (_kmOrder$value = kmOrder.value) === null || _kmOrder$value === void 0 ? void 0 : _kmOrder$value.data;
|
|
348
348
|
gyOrders = gyOrder === null || gyOrder === void 0 ? void 0 : (_gyOrder$value = gyOrder.value) === null || _gyOrder$value === void 0 ? void 0 : _gyOrder$value.data;
|
|
349
|
-
jyOrders = jyOrder === null || jyOrder === void 0 ? void 0 : (_jyOrder$value = jyOrder.value) === null || _jyOrder$value === void 0 ? void 0 :
|
|
349
|
+
jyOrders = jyOrder === null || jyOrder === void 0 ? void 0 : (_jyOrder$value = jyOrder.value) === null || _jyOrder$value === void 0 ? void 0 : _jyOrder$value.data;
|
|
350
350
|
skxOrders = skxOrder === null || skxOrder === void 0 ? void 0 : (_skxOrder$value = skxOrder.value) === null || _skxOrder$value === void 0 ? void 0 : _skxOrder$value.data;
|
|
351
351
|
skxReturnOrders = skxReturnOrder === null || skxReturnOrder === void 0 ? void 0 : (_skxReturnOrder$value = skxReturnOrder.value) === null || _skxReturnOrder$value === void 0 ? void 0 : _skxReturnOrder$value.data;
|
|
352
352
|
console.log('skxOrders', {
|
|
@@ -877,7 +877,7 @@ export var submitParams = function submitParams(_ref5) {
|
|
|
877
877
|
}, operateParams)
|
|
878
878
|
};
|
|
879
879
|
if (update) {
|
|
880
|
-
var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4, _currentNodeDetail$wo5, _currentNodeDetail$wo6, _currentNodeDetail$wo7;
|
|
880
|
+
var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4, _currentNodeDetail$wo5, _currentNodeDetail$wo6, _currentNodeDetail$wo7, _currentNodeDetail$wo8;
|
|
881
881
|
params.updateInfo = {
|
|
882
882
|
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo === void 0 ? void 0 : _currentNodeDetail$wo.templateId,
|
|
883
883
|
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo2 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo2 === void 0 ? void 0 : _currentNodeDetail$wo2.id,
|
|
@@ -929,25 +929,33 @@ export var submitParams = function submitParams(_ref5) {
|
|
|
929
929
|
dataValue: false
|
|
930
930
|
});
|
|
931
931
|
}
|
|
932
|
+
if (shopUniqueKey !== (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.shopUniqueKey)) {
|
|
933
|
+
var _currentNodeDetail$wo9;
|
|
934
|
+
updateList.push({
|
|
935
|
+
dataKey: 'userId',
|
|
936
|
+
oldValue: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.shopUniqueKey,
|
|
937
|
+
dataValue: shopUniqueKey
|
|
938
|
+
});
|
|
939
|
+
}
|
|
932
940
|
params.updateInfo.updateList = updateList;
|
|
933
941
|
params.updateInfo.needTransForm = params.needTransForm;
|
|
934
942
|
delete params.workOrderUpdateKeyVos;
|
|
935
943
|
delete params.needTransForm;
|
|
936
944
|
} else {
|
|
937
|
-
var _Object$keys, _currentNodeDetail$
|
|
945
|
+
var _Object$keys, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20;
|
|
938
946
|
// TODO: 新保存工单
|
|
939
947
|
// 获取当前表单中非空字段
|
|
940
948
|
var finalComponentList = (_Object$keys = Object.keys(formData)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.filter(function (i) {
|
|
941
949
|
return !isNull(formData[i]);
|
|
942
950
|
});
|
|
943
951
|
// 获取非空字段对应的组件
|
|
944
|
-
var finalDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
952
|
+
var finalDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : (_currentNodeDetail$wo11 = _currentNodeDetail$wo10.componentDtoList) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.filter(function (item) {
|
|
945
953
|
return finalComponentList.includes(item.uniqueKey) || item.workOrderComponentType === 'BUYER_MESSAGE_NOTICE';
|
|
946
954
|
});
|
|
947
955
|
set(newTemplateDetail, 'componentDtoList', finalDtoList);
|
|
948
956
|
params.workOrder = {
|
|
949
|
-
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
950
|
-
handleWorkOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
957
|
+
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.uniqueKey,
|
|
958
|
+
handleWorkOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.id,
|
|
951
959
|
buyerNick: plat === null || plat === void 0 ? void 0 : plat.buyerNick,
|
|
952
960
|
buyerOpenUid: plat === null || plat === void 0 ? void 0 : plat.buyerId,
|
|
953
961
|
shopUniqueKey: shopUniqueKey,
|
|
@@ -957,13 +965,13 @@ export var submitParams = function submitParams(_ref5) {
|
|
|
957
965
|
};
|
|
958
966
|
|
|
959
967
|
// 判断是否有订单号组建,订单号数据需要特殊处理
|
|
960
|
-
var tradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
968
|
+
var tradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : (_currentNodeDetail$wo15 = _currentNodeDetail$wo14.componentDtoList) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : (_currentNodeDetail$wo16 = _currentNodeDetail$wo15.find(function (item) {
|
|
961
969
|
return item.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
962
|
-
})) === null || _currentNodeDetail$
|
|
970
|
+
})) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.uniqueKey;
|
|
963
971
|
// 判断是否有订单号组建,订单号数据需要特殊处理
|
|
964
|
-
var paymentTradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
972
|
+
var paymentTradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo17 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : (_currentNodeDetail$wo18 = _currentNodeDetail$wo17.componentDtoList) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : (_currentNodeDetail$wo19 = _currentNodeDetail$wo18.find(function (item) {
|
|
965
973
|
return item.workOrderComponentType === 'ENTERPRISE_PAYMENT';
|
|
966
|
-
})) === null || _currentNodeDetail$
|
|
974
|
+
})) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.uniqueKey;
|
|
967
975
|
if (paymentTradeIdUniqueKey) {
|
|
968
976
|
var _formData;
|
|
969
977
|
params.workOrder.tid = formData === null || formData === void 0 ? void 0 : (_formData = formData["".concat(paymentTradeIdUniqueKey)]) === null || _formData === void 0 ? void 0 : _formData.enterprisePaymentTid;
|
|
@@ -974,7 +982,7 @@ export var submitParams = function submitParams(_ref5) {
|
|
|
974
982
|
if (formData !== null && formData !== void 0 && formData['fixed_field_buyerOpenUid']) {
|
|
975
983
|
params.workOrder.buyerOpenUid = formData === null || formData === void 0 ? void 0 : formData['fixed_field_buyerOpenUid'];
|
|
976
984
|
}
|
|
977
|
-
params.workOrder.workOrderComponents = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$
|
|
985
|
+
params.workOrder.workOrderComponents = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo20 !== void 0 && _currentNodeDetail$wo20.id), currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder, params.workOrder, (plat === null || plat === void 0 ? void 0 : plat.accountName) || '');
|
|
978
986
|
//端上有买家id 就返填当前买家 即使不是当前买家的订单
|
|
979
987
|
if (plat.platform !== PlatForm.PC && plat !== null && plat !== void 0 && plat.buyerId) {
|
|
980
988
|
params.workOrder.buyerOpenUid = plat === null || plat === void 0 ? void 0 : plat.buyerId;
|
|
@@ -740,7 +740,7 @@ var processSkxReturnGoods = function processSkxReturnGoods(getValue) {
|
|
|
740
740
|
var processBsReissueGoods = function processBsReissueGoods(getValue) {
|
|
741
741
|
return function (nex, config) {
|
|
742
742
|
return _defineProperty({}, nex.uniqueKey, {
|
|
743
|
-
bsReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsReissueType")), []),
|
|
743
|
+
bsReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsReissueType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? Array.isArray(config.initReason) ? config.initReason : [config.initReason] : []),
|
|
744
744
|
bsReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsReissueGoods")), []),
|
|
745
745
|
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
746
746
|
});
|
|
@@ -748,7 +748,7 @@ var processBsReissueGoods = function processBsReissueGoods(getValue) {
|
|
|
748
748
|
};
|
|
749
749
|
var processBsExchangeGoods = function processBsExchangeGoods(getValue) {
|
|
750
750
|
return function (nex, config) {
|
|
751
|
-
var bsExchangeType = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeType")), []);
|
|
751
|
+
var bsExchangeType = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? Array.isArray(config.initReason) ? config.initReason : [config.initReason] : []);
|
|
752
752
|
var bsExchangeReturnGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeReturnGoods")), []);
|
|
753
753
|
var bsExchangeSwapOutGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeSwapOutGoods")), []);
|
|
754
754
|
//补发组装数据
|
|
@@ -813,7 +813,7 @@ var processBsReturnGoods = function processBsReturnGoods(getValue) {
|
|
|
813
813
|
shopCodeKey: 'shopCode'
|
|
814
814
|
}
|
|
815
815
|
};
|
|
816
|
-
return _defineProperty({}, "".concat(nex.uniqueKey), (_$concat = {}, _defineProperty(_$concat, returnGoodsMap[compType].returnTypeKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnTypeKey)), [])), _defineProperty(_$concat, returnGoodsMap[compType].returnGoodsKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnGoodsKey)), [])), _defineProperty(_$concat, returnGoodsMap[compType].shopCodeKey, getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].shopCodeKey))), _$concat));
|
|
816
|
+
return _defineProperty({}, "".concat(nex.uniqueKey), (_$concat = {}, _defineProperty(_$concat, returnGoodsMap[compType].returnTypeKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnTypeKey)), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? Array.isArray(config.initReason) ? config.initReason : [config.initReason] : [])), _defineProperty(_$concat, returnGoodsMap[compType].returnGoodsKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnGoodsKey)), [])), _defineProperty(_$concat, returnGoodsMap[compType].shopCodeKey, getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].shopCodeKey))), _$concat));
|
|
817
817
|
};
|
|
818
818
|
};
|
|
819
819
|
var processErpSystemOrder = function processErpSystemOrder(getValue) {
|
|
@@ -641,5 +641,10 @@ export var jyOrderDetail = function jyOrderDetail(data) {
|
|
|
641
641
|
method: 'post',
|
|
642
642
|
data: data,
|
|
643
643
|
infoLevel: 'warning'
|
|
644
|
+
}).then(function (res) {
|
|
645
|
+
var _res$data2;
|
|
646
|
+
return {
|
|
647
|
+
data: (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.tradeOrderDetails) || []
|
|
648
|
+
};
|
|
644
649
|
});
|
|
645
650
|
};
|
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.24",
|
|
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.24",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.24",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "2.2.24",
|
|
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": "35bc1e4833e1bcb1255c9c43cb3c807d2544e88c",
|
|
78
78
|
"gitHooks": {
|
|
79
79
|
"pre-commit": "lint-staged"
|
|
80
80
|
}
|