@kmkf-fe-packages/kmkf-work-order-service-component 0.8.5 → 0.8.7-alpha.0
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/BatchSubmitFormList/VirtualForm.d.ts +11 -0
- package/dist/esm/BatchSubmitFormList/VirtualForm.js +190 -0
- package/dist/esm/BatchSubmitFormList/common.d.ts +1 -0
- package/dist/esm/BatchSubmitFormList/common.js +71 -0
- package/dist/esm/BatchSubmitFormList/index.d.ts +16 -0
- package/dist/esm/BatchSubmitFormList/index.js +205 -0
- package/dist/esm/FlowTemplateDetail/common.js +2 -2
- package/dist/esm/FlowTemplateDetail/components/FormRender/index.js +18 -51
- package/dist/esm/FlowTemplateDetail/components/ShopName/index.d.ts +9 -0
- package/dist/esm/FlowTemplateDetail/components/ShopName/index.js +36 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js +35 -20
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/model/flowTemplateDetail/api.d.ts +19 -0
- package/dist/esm/model/flowTemplateDetail/api.js +8 -0
- package/package.json +5 -5
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormInstance } from 'antd';
|
|
3
|
+
import { FlowTemplateNodeDetailT } from '../model/flowTemplateDetail/api';
|
|
4
|
+
declare type VirtualFormProps = {
|
|
5
|
+
callBackPushForm: (p: FormInstance, workOrderId: string) => void;
|
|
6
|
+
record: any;
|
|
7
|
+
detail: FlowTemplateNodeDetailT;
|
|
8
|
+
shopList: any[];
|
|
9
|
+
};
|
|
10
|
+
declare const VirtualForm: ({ callBackPushForm, record, detail: templateDetail, shopList }: VirtualFormProps) => React.JSX.Element;
|
|
11
|
+
export default VirtualForm;
|
|
@@ -0,0 +1,190 @@
|
|
|
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
|
+
var _excluded = ["displayConfig", "disabled"];
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
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."); }
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
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."); }
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
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; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
import React, { useEffect, useMemo, useRef } from 'react';
|
|
21
|
+
import { Form } from 'antd';
|
|
22
|
+
import { get, every, some, cloneDeep } from 'lodash';
|
|
23
|
+
import { factory } from '@kmkf-fe-packages/services-components';
|
|
24
|
+
import { getExpression, formatDisplayConfig } from '@kmkf-fe-packages/kmkf-utils';
|
|
25
|
+
import { calcWorkOrderList } from "../common/utils/tools";
|
|
26
|
+
import ShopName from "../FlowTemplateDetail/components/ShopName";
|
|
27
|
+
var VirtualForm = function VirtualForm(_ref) {
|
|
28
|
+
var callBackPushForm = _ref.callBackPushForm,
|
|
29
|
+
record = _ref.record,
|
|
30
|
+
templateDetail = _ref.detail,
|
|
31
|
+
shopList = _ref.shopList;
|
|
32
|
+
console.log('record', record);
|
|
33
|
+
console.log('templateDetail', templateDetail);
|
|
34
|
+
var _Form$useForm = Form.useForm(),
|
|
35
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
36
|
+
form = _Form$useForm2[0];
|
|
37
|
+
var queryDetail = function queryDetail(record) {
|
|
38
|
+
// 先初始化端上内容
|
|
39
|
+
var newRecord = cloneDeep(record);
|
|
40
|
+
newRecord.jsonMap = _objectSpread({}, newRecord.jsonMap);
|
|
41
|
+
var transData = calcWorkOrderList([newRecord], [].concat(_toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList) || []), _toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || [])));
|
|
42
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, get(transData, '0', {})), {}, {
|
|
43
|
+
shopId: record === null || record === void 0 ? void 0 : record.shopId,
|
|
44
|
+
shopName: newRecord.shopName,
|
|
45
|
+
submitter: newRecord.submitter,
|
|
46
|
+
created: newRecord.created,
|
|
47
|
+
processTime: newRecord.processTime
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
useEffect(function () {
|
|
51
|
+
callBackPushForm(form, record === null || record === void 0 ? void 0 : record.id);
|
|
52
|
+
}, []);
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
queryDetail(record);
|
|
55
|
+
}, [record, templateDetail]);
|
|
56
|
+
var currentComponentDisplayStatus = useRef({});
|
|
57
|
+
// 根据字段id获取组件信息
|
|
58
|
+
var getComponentDetailByFieldId = function getComponentDetailByFieldId(id) {
|
|
59
|
+
var info = [].concat(_toConsumableArray(get(templateDetail, 'componentDtoList', [])), _toConsumableArray(get(templateDetail, 'preNodeComponentDtoList', []))).find(function (item) {
|
|
60
|
+
return item.uniqueKey === id;
|
|
61
|
+
});
|
|
62
|
+
if (!info) return {};
|
|
63
|
+
return factory(info.workOrderComponentType, {
|
|
64
|
+
id: info.uniqueKey,
|
|
65
|
+
name: info.name,
|
|
66
|
+
componentConfig: info.componentConfig,
|
|
67
|
+
effects: {},
|
|
68
|
+
type: info.workOrderComponentType
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
var newRenderColumnItem = function newRenderColumnItem(effects) {
|
|
72
|
+
return function (item) {
|
|
73
|
+
var _item$componentConfig = item.componentConfig,
|
|
74
|
+
componentConfig = _item$componentConfig === void 0 ? {} : _item$componentConfig,
|
|
75
|
+
workOrderComponentType = item.workOrderComponentType,
|
|
76
|
+
uniqueKey = item.uniqueKey,
|
|
77
|
+
name = item.name;
|
|
78
|
+
var displayConfig = effects.displayConfig,
|
|
79
|
+
disabled = effects.disabled,
|
|
80
|
+
others = _objectWithoutProperties(effects, _excluded);
|
|
81
|
+
var newComponentConfig = _objectSpread(_objectSpread({}, componentConfig), {}, {
|
|
82
|
+
disabled: disabled
|
|
83
|
+
});
|
|
84
|
+
var idConditionListMap = formatDisplayConfig(displayConfig);
|
|
85
|
+
var instance = factory(workOrderComponentType, {
|
|
86
|
+
id: uniqueKey,
|
|
87
|
+
name: name,
|
|
88
|
+
componentConfig: newComponentConfig,
|
|
89
|
+
effects: others,
|
|
90
|
+
type: workOrderComponentType
|
|
91
|
+
});
|
|
92
|
+
if (Reflect.has(idConditionListMap, instance.id)) {
|
|
93
|
+
var currentIdDependenceOtherFields = idConditionListMap[instance.id];
|
|
94
|
+
// 需要增加显隐处理逻辑
|
|
95
|
+
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
96
|
+
noStyle: true,
|
|
97
|
+
shouldUpdate: function shouldUpdate() {
|
|
98
|
+
return true; // TODO: 修复重复依赖的问题 https://tb.raycloud.com/task/64e4491e0b8b5c001e1099b9
|
|
99
|
+
}
|
|
100
|
+
}, function (_ref2) {
|
|
101
|
+
var getFieldValue = _ref2.getFieldValue;
|
|
102
|
+
var show = currentIdDependenceOtherFields === null || currentIdDependenceOtherFields === void 0 ? void 0 : currentIdDependenceOtherFields.reduce(function (cur, nxt) {
|
|
103
|
+
// 如果有一项满足展示条件则展示
|
|
104
|
+
if (cur) {
|
|
105
|
+
return cur;
|
|
106
|
+
}
|
|
107
|
+
var conditionList = nxt.rules;
|
|
108
|
+
var linkCondition = nxt.linkCondition;
|
|
109
|
+
// 满足所有
|
|
110
|
+
if (linkCondition === 'every') {
|
|
111
|
+
return every(conditionList, function (item) {
|
|
112
|
+
var _item$compareSymbol;
|
|
113
|
+
var dependenceDetail = getComponentDetailByFieldId(item.leftValue);
|
|
114
|
+
var leftValue = getFieldValue(item.leftValue);
|
|
115
|
+
if (typeof dependenceDetail.formDataTransform === 'function') {
|
|
116
|
+
leftValue = dependenceDetail.formDataTransform(leftValue);
|
|
117
|
+
}
|
|
118
|
+
// TODO: 如果依赖的组件是隐藏的,当前依赖项为false
|
|
119
|
+
if (Reflect.has(currentComponentDisplayStatus.current, item.leftValue) && !currentComponentDisplayStatus.current[item.leftValue]) {
|
|
120
|
+
console.log('every', item.leftValue, currentComponentDisplayStatus.current[item.leftValue]);
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return getExpression((_item$compareSymbol = item.compareSymbol) === null || _item$compareSymbol === void 0 ? void 0 : _item$compareSymbol.toUpperCase(), leftValue, item.rightValue);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// 满足其中之一
|
|
127
|
+
return some(conditionList, function (item) {
|
|
128
|
+
var _item$compareSymbol2;
|
|
129
|
+
var dependenceDetail = getComponentDetailByFieldId(item.leftValue);
|
|
130
|
+
var leftValue = getFieldValue(item.leftValue);
|
|
131
|
+
if (typeof dependenceDetail.formDataTransform === 'function') {
|
|
132
|
+
leftValue = dependenceDetail.formDataTransform(leftValue);
|
|
133
|
+
}
|
|
134
|
+
// TODO: 如果依赖的组件是隐藏的,当前依赖项为false
|
|
135
|
+
if (Reflect.has(currentComponentDisplayStatus.current, item.leftValue) && !currentComponentDisplayStatus.current[item.leftValue]) {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
return getExpression((_item$compareSymbol2 = item.compareSymbol) === null || _item$compareSymbol2 === void 0 ? void 0 : _item$compareSymbol2.toUpperCase(), leftValue, item.rightValue);
|
|
139
|
+
});
|
|
140
|
+
}, false);
|
|
141
|
+
currentComponentDisplayStatus.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
|
|
142
|
+
return instance.editRender({
|
|
143
|
+
hidden: !show
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return instance.editRender({});
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
var finalFormItems = useMemo(function () {
|
|
151
|
+
// TODO: 这里是正常的表单显隐逻辑
|
|
152
|
+
var otherItems = get(templateDetail, 'componentDtoList', []).map(newRenderColumnItem({
|
|
153
|
+
form: form,
|
|
154
|
+
shopList: shopList,
|
|
155
|
+
shopId: record === null || record === void 0 ? void 0 : record.shopId,
|
|
156
|
+
isEditing: true,
|
|
157
|
+
workOrderDetail: record,
|
|
158
|
+
templateDetail: templateDetail,
|
|
159
|
+
disabled: false,
|
|
160
|
+
displayConfig: get(templateDetail, 'flowTemplateConfig.showHideRule.rules', [])
|
|
161
|
+
}));
|
|
162
|
+
// TODO: 这里只是为了把前置组件的值能够set到当前form表单中去
|
|
163
|
+
// TODO: 为什么不直接把前置和当前放在同一个form里面呢?因为放在同一个里面会有必填校验等逻辑,前置节点在当前表单中只是做展示,但是还必须有控制显隐功能
|
|
164
|
+
var hiddenPreNode = get(templateDetail, 'preNodeComponentDtoList', []).map(function (item) {
|
|
165
|
+
var instance = factory(item.workOrderComponentType, {
|
|
166
|
+
id: item.uniqueKey,
|
|
167
|
+
name: item.name,
|
|
168
|
+
componentConfig: item.componentConfig,
|
|
169
|
+
effects: {},
|
|
170
|
+
type: item.workOrderComponentType
|
|
171
|
+
});
|
|
172
|
+
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
173
|
+
name: instance.id,
|
|
174
|
+
noStyle: true
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
return [].concat(_toConsumableArray(hiddenPreNode), _toConsumableArray(otherItems));
|
|
178
|
+
}, [templateDetail, shopList, record]);
|
|
179
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
180
|
+
form: form
|
|
181
|
+
}, /*#__PURE__*/React.createElement(ShopName, {
|
|
182
|
+
shopList: shopList,
|
|
183
|
+
handleChangeShopId: function handleChangeShopId() {
|
|
184
|
+
return null;
|
|
185
|
+
},
|
|
186
|
+
hidden: false,
|
|
187
|
+
disabled: false
|
|
188
|
+
}), finalFormItems);
|
|
189
|
+
};
|
|
190
|
+
export default VirtualForm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const concurrencyRequest: (promises: any[], maxNum: number) => Promise<unknown>;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 _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; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
|
+
// 并发请求函数
|
|
6
|
+
export var concurrencyRequest = function concurrencyRequest(promises, maxNum) {
|
|
7
|
+
return new Promise(function (resolve) {
|
|
8
|
+
if (promises.length === 0) {
|
|
9
|
+
resolve([]);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
var results = [];
|
|
13
|
+
var index = 0; // 下一个请求的下标
|
|
14
|
+
var count = 0; // 当前请求完成的数量
|
|
15
|
+
|
|
16
|
+
// 发送请求
|
|
17
|
+
function request() {
|
|
18
|
+
return _request.apply(this, arguments);
|
|
19
|
+
} // maxNum和urls.length取最小进行调用
|
|
20
|
+
function _request() {
|
|
21
|
+
_request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
22
|
+
var i, promise, resp;
|
|
23
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
24
|
+
while (1) switch (_context.prev = _context.next) {
|
|
25
|
+
case 0:
|
|
26
|
+
if (!(index === promises.length)) {
|
|
27
|
+
_context.next = 2;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
return _context.abrupt("return");
|
|
31
|
+
case 2:
|
|
32
|
+
i = index; // 保存序号,使result和urls相对应
|
|
33
|
+
promise = promises[index];
|
|
34
|
+
index++;
|
|
35
|
+
_context.prev = 5;
|
|
36
|
+
_context.next = 8;
|
|
37
|
+
return promise();
|
|
38
|
+
case 8:
|
|
39
|
+
resp = _context.sent;
|
|
40
|
+
// resp 加入到results
|
|
41
|
+
results[i] = resp;
|
|
42
|
+
_context.next = 15;
|
|
43
|
+
break;
|
|
44
|
+
case 12:
|
|
45
|
+
_context.prev = 12;
|
|
46
|
+
_context.t0 = _context["catch"](5);
|
|
47
|
+
// err 加入到results
|
|
48
|
+
results[i] = _context.t0;
|
|
49
|
+
case 15:
|
|
50
|
+
_context.prev = 15;
|
|
51
|
+
count++;
|
|
52
|
+
// 判断是否所有的请求都已完成
|
|
53
|
+
if (count === promises.length) {
|
|
54
|
+
resolve(results);
|
|
55
|
+
}
|
|
56
|
+
request();
|
|
57
|
+
return _context.finish(15);
|
|
58
|
+
case 20:
|
|
59
|
+
case "end":
|
|
60
|
+
return _context.stop();
|
|
61
|
+
}
|
|
62
|
+
}, _callee, null, [[5, 12, 15, 20]]);
|
|
63
|
+
}));
|
|
64
|
+
return _request.apply(this, arguments);
|
|
65
|
+
}
|
|
66
|
+
var times = Math.min(maxNum, promises.length);
|
|
67
|
+
for (var i = 0; i < times; i++) {
|
|
68
|
+
request();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PlatForm } from '../model/flowTemplateDetail/types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
workOrderList: Array<{
|
|
5
|
+
flowWorkOrderId: string;
|
|
6
|
+
flowTemplateKey: string;
|
|
7
|
+
[prop: string]: any;
|
|
8
|
+
}>;
|
|
9
|
+
shopList: any[];
|
|
10
|
+
plat: {
|
|
11
|
+
accountName: string;
|
|
12
|
+
platform: PlatForm;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,205 @@
|
|
|
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 _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; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useEffect, useRef, useState, useImperativeHandle, forwardRef } from 'react';
|
|
12
|
+
import { groupBy, get, find } from 'lodash';
|
|
13
|
+
import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
|
+
import VirtualForm from "./VirtualForm";
|
|
15
|
+
import { verifyHandle, submitParams } from "../FlowTemplateDetail/common";
|
|
16
|
+
import { submitWorkOrder } from "../model/flowTemplateDetail/api";
|
|
17
|
+
import { concurrencyRequest } from "./common";
|
|
18
|
+
import { batchQueryNodeDetail } from "../model/flowTemplateDetail/api";
|
|
19
|
+
var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
|
|
20
|
+
var workOrderList = _ref.workOrderList,
|
|
21
|
+
shopList = _ref.shopList,
|
|
22
|
+
plat = _ref.plat;
|
|
23
|
+
var formInstanceList = useRef([]);
|
|
24
|
+
var _useState = useState([]),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
flowTemplateNodeDetailList = _useState2[0],
|
|
27
|
+
setFlowTemplateNodeDetailList = _useState2[1];
|
|
28
|
+
AddressData.getInstance();
|
|
29
|
+
ExpressData.getInstance();
|
|
30
|
+
ExpressInterceptData.getInstance();
|
|
31
|
+
PlatData.getInstance();
|
|
32
|
+
LogisticsAddressData.getInstance();
|
|
33
|
+
// 批量查询所选择数据记录
|
|
34
|
+
var queryRecordList = /*#__PURE__*/function () {
|
|
35
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
36
|
+
var _yield$batchQueryNode, _yield$batchQueryNode2, data;
|
|
37
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38
|
+
while (1) switch (_context.prev = _context.next) {
|
|
39
|
+
case 0:
|
|
40
|
+
_context.next = 2;
|
|
41
|
+
return batchQueryNodeDetail({
|
|
42
|
+
paramList: params
|
|
43
|
+
});
|
|
44
|
+
case 2:
|
|
45
|
+
_yield$batchQueryNode = _context.sent;
|
|
46
|
+
_yield$batchQueryNode2 = _yield$batchQueryNode.data;
|
|
47
|
+
data = _yield$batchQueryNode2 === void 0 ? [] : _yield$batchQueryNode2;
|
|
48
|
+
setFlowTemplateNodeDetailList(data);
|
|
49
|
+
case 6:
|
|
50
|
+
case "end":
|
|
51
|
+
return _context.stop();
|
|
52
|
+
}
|
|
53
|
+
}, _callee);
|
|
54
|
+
}));
|
|
55
|
+
return function queryRecordList(_x2) {
|
|
56
|
+
return _ref2.apply(this, arguments);
|
|
57
|
+
};
|
|
58
|
+
}();
|
|
59
|
+
console.log('flowTemplateNodeDetailList', flowTemplateNodeDetailList);
|
|
60
|
+
var getNodeDetail = function getNodeDetail(_ref3) {
|
|
61
|
+
var flowTemplateId = _ref3.flowTemplateId,
|
|
62
|
+
nodeId = _ref3.nodeId;
|
|
63
|
+
return flowTemplateNodeDetailList === null || flowTemplateNodeDetailList === void 0 ? void 0 : flowTemplateNodeDetailList.find(function (item) {
|
|
64
|
+
return (item === null || item === void 0 ? void 0 : item.flowTemplateId) === flowTemplateId && (item === null || item === void 0 ? void 0 : item.nodeId) === nodeId;
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
useEffect(function () {
|
|
68
|
+
if ((workOrderList === null || workOrderList === void 0 ? void 0 : workOrderList.length) > 0) {
|
|
69
|
+
var _Object$getOwnPropert;
|
|
70
|
+
var FlowTemplateIdGroup = groupBy(workOrderList, 'flowTemplateId');
|
|
71
|
+
var params = (_Object$getOwnPropert = Object.getOwnPropertyNames(FlowTemplateIdGroup)) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.map(function (item) {
|
|
72
|
+
var _FlowTemplateIdGroup$;
|
|
73
|
+
return {
|
|
74
|
+
flowTemplateId: item,
|
|
75
|
+
nodeIdList: Array.from(new Set(FlowTemplateIdGroup === null || FlowTemplateIdGroup === void 0 ? void 0 : (_FlowTemplateIdGroup$ = FlowTemplateIdGroup[item]) === null || _FlowTemplateIdGroup$ === void 0 ? void 0 : _FlowTemplateIdGroup$.map(function (i) {
|
|
76
|
+
return i.nodeId;
|
|
77
|
+
})))
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
queryRecordList(params);
|
|
81
|
+
}
|
|
82
|
+
}, [workOrderList]);
|
|
83
|
+
var submitSingleRecord = /*#__PURE__*/function () {
|
|
84
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref4) {
|
|
85
|
+
var form, workOrderId, formData, record, _ref6, nodeDetail, result, params, res;
|
|
86
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
87
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
88
|
+
case 0:
|
|
89
|
+
form = _ref4.form, workOrderId = _ref4.workOrderId;
|
|
90
|
+
_context2.prev = 1;
|
|
91
|
+
_context2.next = 4;
|
|
92
|
+
return form.validateFields();
|
|
93
|
+
case 4:
|
|
94
|
+
formData = _context2.sent;
|
|
95
|
+
// todo: 通过工单id找到对应的record记录
|
|
96
|
+
record = workOrderList === null || workOrderList === void 0 ? void 0 : workOrderList.find(function (item) {
|
|
97
|
+
return item.id === workOrderId;
|
|
98
|
+
});
|
|
99
|
+
_ref6 = getNodeDetail({
|
|
100
|
+
flowTemplateId: record === null || record === void 0 ? void 0 : record.flowTemplateId,
|
|
101
|
+
nodeId: record === null || record === void 0 ? void 0 : record.nodeId
|
|
102
|
+
}) || {}, nodeDetail = _ref6.workOrderTemplateInfo;
|
|
103
|
+
result = verifyHandle(formData, (nodeDetail === null || nodeDetail === void 0 ? void 0 : nodeDetail.componentDtoList) || []);
|
|
104
|
+
if (result.success) {
|
|
105
|
+
_context2.next = 10;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
return _context2.abrupt("return");
|
|
109
|
+
case 10:
|
|
110
|
+
params = submitParams({
|
|
111
|
+
update: true,
|
|
112
|
+
formData: formData,
|
|
113
|
+
currentNodeDetail: {
|
|
114
|
+
workOrder: record,
|
|
115
|
+
workOrderTemplateInfo: nodeDetail
|
|
116
|
+
},
|
|
117
|
+
plat: plat,
|
|
118
|
+
operateParams: {
|
|
119
|
+
flowTemplateKey: record === null || record === void 0 ? void 0 : record.flowTemplateKey,
|
|
120
|
+
workOrderUpdateTime: record === null || record === void 0 ? void 0 : record.update,
|
|
121
|
+
flowWorkOrderUpdateTime: record === null || record === void 0 ? void 0 : record.flowWorkOrderUpdateTime,
|
|
122
|
+
flowTemplateId: record === null || record === void 0 ? void 0 : record.flowTemplateId,
|
|
123
|
+
flowWorkOrderId: record === null || record === void 0 ? void 0 : record.flowWorkOrderId,
|
|
124
|
+
workOrderId: record === null || record === void 0 ? void 0 : record.id,
|
|
125
|
+
nodeId: record === null || record === void 0 ? void 0 : record.currentNodeId,
|
|
126
|
+
flowVersion: record === null || record === void 0 ? void 0 : record.flowTemplateVersion
|
|
127
|
+
},
|
|
128
|
+
shopUniqueKey: get(find(shopList, function (s) {
|
|
129
|
+
return s.shopId === formData.shopId;
|
|
130
|
+
}), 'accessToken', '')
|
|
131
|
+
});
|
|
132
|
+
_context2.next = 13;
|
|
133
|
+
return submitWorkOrder(params);
|
|
134
|
+
case 13:
|
|
135
|
+
res = _context2.sent;
|
|
136
|
+
return _context2.abrupt("return", res);
|
|
137
|
+
case 17:
|
|
138
|
+
_context2.prev = 17;
|
|
139
|
+
_context2.t0 = _context2["catch"](1);
|
|
140
|
+
console.log('表单校验失败');
|
|
141
|
+
case 20:
|
|
142
|
+
case "end":
|
|
143
|
+
return _context2.stop();
|
|
144
|
+
}
|
|
145
|
+
}, _callee2, null, [[1, 17]]);
|
|
146
|
+
}));
|
|
147
|
+
return function submitSingleRecord(_x3) {
|
|
148
|
+
return _ref5.apply(this, arguments);
|
|
149
|
+
};
|
|
150
|
+
}();
|
|
151
|
+
useImperativeHandle(ref, function () {
|
|
152
|
+
return {
|
|
153
|
+
submit: function () {
|
|
154
|
+
var _submit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
155
|
+
var _formInstanceList$cur;
|
|
156
|
+
var promises, list;
|
|
157
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
158
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
159
|
+
case 0:
|
|
160
|
+
promises = (_formInstanceList$cur = formInstanceList.current) === null || _formInstanceList$cur === void 0 ? void 0 : _formInstanceList$cur.map(function (formInstance) {
|
|
161
|
+
return function () {
|
|
162
|
+
return submitSingleRecord(formInstance);
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
_context3.next = 3;
|
|
166
|
+
return concurrencyRequest(promises, 6);
|
|
167
|
+
case 3:
|
|
168
|
+
list = _context3.sent;
|
|
169
|
+
return _context3.abrupt("return", list);
|
|
170
|
+
case 5:
|
|
171
|
+
case "end":
|
|
172
|
+
return _context3.stop();
|
|
173
|
+
}
|
|
174
|
+
}, _callee3);
|
|
175
|
+
}));
|
|
176
|
+
function submit() {
|
|
177
|
+
return _submit.apply(this, arguments);
|
|
178
|
+
}
|
|
179
|
+
return submit;
|
|
180
|
+
}()
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
184
|
+
style: {
|
|
185
|
+
display: 'none'
|
|
186
|
+
}
|
|
187
|
+
}, workOrderList === null || workOrderList === void 0 ? void 0 : workOrderList.map(function (item) {
|
|
188
|
+
var _getNodeDetail;
|
|
189
|
+
return /*#__PURE__*/React.createElement(VirtualForm, {
|
|
190
|
+
callBackPushForm: function callBackPushForm(form, workOrderId) {
|
|
191
|
+
return formInstanceList.current.push({
|
|
192
|
+
form: form,
|
|
193
|
+
workOrderId: workOrderId
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
record: item,
|
|
197
|
+
detail: (_getNodeDetail = getNodeDetail({
|
|
198
|
+
flowTemplateId: item === null || item === void 0 ? void 0 : item.flowTemplateId,
|
|
199
|
+
nodeId: item === null || item === void 0 ? void 0 : item.nodeId
|
|
200
|
+
})) === null || _getNodeDetail === void 0 ? void 0 : _getNodeDetail.workOrderTemplateInfo,
|
|
201
|
+
shopList: shopList
|
|
202
|
+
});
|
|
203
|
+
}));
|
|
204
|
+
};
|
|
205
|
+
export default /*#__PURE__*/forwardRef(BatchSubmitFormList);
|
|
@@ -77,9 +77,9 @@ export var submitParams = function submitParams(_ref) {
|
|
|
77
77
|
var newTemplateDetail = cloneDeep(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) || {};
|
|
78
78
|
var params = {
|
|
79
79
|
isAdd: !update,
|
|
80
|
-
operateParams: _objectSpread(
|
|
80
|
+
operateParams: _objectSpread({
|
|
81
81
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no === void 0 ? void 0 : _currentNodeDetail$no.id
|
|
82
|
-
})
|
|
82
|
+
}, operateParams)
|
|
83
83
|
};
|
|
84
84
|
if (update) {
|
|
85
85
|
var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4, _currentNodeDetail$wo5;
|
|
@@ -28,43 +28,11 @@ import { get, some, set, every, cloneDeep, isEmpty } from 'lodash';
|
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
29
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME } from "../../../common/utils/tools";
|
|
30
30
|
import { replaceCheck } from "../../../model/servers/api";
|
|
31
|
-
import { factory
|
|
31
|
+
import { factory } from '@kmkf-fe-packages/services-components';
|
|
32
32
|
import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData, getExpression, formatDisplayConfig } from '@kmkf-fe-packages/kmkf-utils';
|
|
33
|
+
import ShopName from "../ShopName";
|
|
33
34
|
import { PlatForm } from "../../../model/flowTemplateDetail/types";
|
|
34
35
|
import "./index.less";
|
|
35
|
-
var ShopName = function ShopName(_ref) {
|
|
36
|
-
var shopList = _ref.shopList,
|
|
37
|
-
workOrderId = _ref.workOrderId,
|
|
38
|
-
look = _ref.look,
|
|
39
|
-
handleChangeShopId = _ref.handleChangeShopId,
|
|
40
|
-
hidden = _ref.hidden;
|
|
41
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: "form-item--wrap",
|
|
43
|
-
style: {
|
|
44
|
-
position: 'relative'
|
|
45
|
-
},
|
|
46
|
-
key: 'shopId'
|
|
47
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
48
|
-
name: "shopId",
|
|
49
|
-
label: "\u5E97\u94FA\u540D\u79F0",
|
|
50
|
-
className: "form-item-label--index",
|
|
51
|
-
hidden: hidden,
|
|
52
|
-
rules: [{
|
|
53
|
-
required: true,
|
|
54
|
-
message: '请选择店铺名称'
|
|
55
|
-
}]
|
|
56
|
-
}, /*#__PURE__*/React.createElement(ShopList, {
|
|
57
|
-
shopList: shopList,
|
|
58
|
-
disabled: !!workOrderId || look,
|
|
59
|
-
setShopId: handleChangeShopId,
|
|
60
|
-
placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
|
|
61
|
-
showSearch: true,
|
|
62
|
-
optionFilterProp: "label",
|
|
63
|
-
style: {
|
|
64
|
-
width: '220px'
|
|
65
|
-
}
|
|
66
|
-
})));
|
|
67
|
-
};
|
|
68
36
|
var hasComponent = function hasComponent(componentDtoList, workOrderComponentType) {
|
|
69
37
|
var _componentDtoList$fin;
|
|
70
38
|
return (_componentDtoList$fin = componentDtoList.find(function (item) {
|
|
@@ -137,7 +105,7 @@ var FormRender = function FormRender(props) {
|
|
|
137
105
|
};
|
|
138
106
|
//查询重复数量
|
|
139
107
|
var queryReplaceCount = /*#__PURE__*/function () {
|
|
140
|
-
var
|
|
108
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(componentValue, templateDetail) {
|
|
141
109
|
var needCheckComponentList, params, _yield$replaceCheck, resultList, resultParams;
|
|
142
110
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
143
111
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -177,7 +145,7 @@ var FormRender = function FormRender(props) {
|
|
|
177
145
|
}, _callee);
|
|
178
146
|
}));
|
|
179
147
|
return function queryReplaceCount(_x2, _x3) {
|
|
180
|
-
return
|
|
148
|
+
return _ref.apply(this, arguments);
|
|
181
149
|
};
|
|
182
150
|
}();
|
|
183
151
|
//自动返填重复校验
|
|
@@ -196,14 +164,14 @@ var FormRender = function FormRender(props) {
|
|
|
196
164
|
enterprisePaymentTid: orderNo
|
|
197
165
|
}, templateDetail);
|
|
198
166
|
};
|
|
199
|
-
var queryDetail = function queryDetail(
|
|
200
|
-
var workOrderId =
|
|
201
|
-
shopId =
|
|
202
|
-
shopList =
|
|
203
|
-
record =
|
|
204
|
-
orderNo =
|
|
205
|
-
buyerId =
|
|
206
|
-
buyerNick =
|
|
167
|
+
var queryDetail = function queryDetail(_ref2) {
|
|
168
|
+
var workOrderId = _ref2.workOrderId,
|
|
169
|
+
shopId = _ref2.shopId,
|
|
170
|
+
shopList = _ref2.shopList,
|
|
171
|
+
record = _ref2.record,
|
|
172
|
+
orderNo = _ref2.orderNo,
|
|
173
|
+
buyerId = _ref2.buyerId,
|
|
174
|
+
buyerNick = _ref2.buyerNick;
|
|
207
175
|
form.resetFields();
|
|
208
176
|
//获取一些默认数据
|
|
209
177
|
var jsonMap = templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList.reduce(function (prv, next) {
|
|
@@ -299,7 +267,7 @@ var FormRender = function FormRender(props) {
|
|
|
299
267
|
};
|
|
300
268
|
//组件失焦事件
|
|
301
269
|
var componentOnBlur = /*#__PURE__*/function () {
|
|
302
|
-
var
|
|
270
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value, type) {
|
|
303
271
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
304
272
|
while (1) switch (_context2.prev = _context2.next) {
|
|
305
273
|
case 0:
|
|
@@ -327,7 +295,7 @@ var FormRender = function FormRender(props) {
|
|
|
327
295
|
}, _callee2);
|
|
328
296
|
}));
|
|
329
297
|
return function componentOnBlur(_x4, _x5) {
|
|
330
|
-
return
|
|
298
|
+
return _ref3.apply(this, arguments);
|
|
331
299
|
};
|
|
332
300
|
}();
|
|
333
301
|
// 切换店铺
|
|
@@ -480,8 +448,8 @@ var FormRender = function FormRender(props) {
|
|
|
480
448
|
return cur || (prevValues === null || prevValues === void 0 ? void 0 : prevValues[nxt]) !== (currentValues === null || currentValues === void 0 ? void 0 : currentValues[nxt]);
|
|
481
449
|
}, false);
|
|
482
450
|
}
|
|
483
|
-
}, function (
|
|
484
|
-
var getFieldValue =
|
|
451
|
+
}, function (_ref4) {
|
|
452
|
+
var getFieldValue = _ref4.getFieldValue;
|
|
485
453
|
var show = currentIdDependenceOtherFields === null || currentIdDependenceOtherFields === void 0 ? void 0 : currentIdDependenceOtherFields.reduce(function (cur, nxt) {
|
|
486
454
|
// 如果有一项满足展示条件则展示
|
|
487
455
|
if (cur) {
|
|
@@ -599,10 +567,9 @@ var FormRender = function FormRender(props) {
|
|
|
599
567
|
form: form
|
|
600
568
|
}, formProps), /*#__PURE__*/React.createElement(ShopName, {
|
|
601
569
|
shopList: shopList,
|
|
602
|
-
workOrderId: workOrderId,
|
|
603
|
-
look: look,
|
|
604
570
|
handleChangeShopId: handleChangeShopId,
|
|
605
|
-
hidden: !isShowShopList
|
|
571
|
+
hidden: !isShowShopList,
|
|
572
|
+
disabled: !!workOrderId || look
|
|
606
573
|
}), finalFormItems));
|
|
607
574
|
};
|
|
608
575
|
export default FormRender;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type ShopNameProps = {
|
|
3
|
+
hidden: boolean;
|
|
4
|
+
shopList: any[];
|
|
5
|
+
handleChangeShopId: (val: string) => void;
|
|
6
|
+
disabled: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
declare const ShopName: ({ shopList, disabled, handleChangeShopId, hidden }: ShopNameProps) => React.JSX.Element;
|
|
9
|
+
export default ShopName;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Form } from 'antd';
|
|
3
|
+
import { ShopList } from '@kmkf-fe-packages/services-components';
|
|
4
|
+
var ShopName = function ShopName(_ref) {
|
|
5
|
+
var shopList = _ref.shopList,
|
|
6
|
+
disabled = _ref.disabled,
|
|
7
|
+
handleChangeShopId = _ref.handleChangeShopId,
|
|
8
|
+
hidden = _ref.hidden;
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "form-item--wrap",
|
|
11
|
+
style: {
|
|
12
|
+
position: 'relative'
|
|
13
|
+
},
|
|
14
|
+
key: 'shopId'
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
16
|
+
name: "shopId",
|
|
17
|
+
label: "\u5E97\u94FA\u540D\u79F0",
|
|
18
|
+
className: "form-item-label--index",
|
|
19
|
+
hidden: hidden,
|
|
20
|
+
rules: [{
|
|
21
|
+
required: true,
|
|
22
|
+
message: '请选择店铺名称'
|
|
23
|
+
}]
|
|
24
|
+
}, /*#__PURE__*/React.createElement(ShopList, {
|
|
25
|
+
shopList: shopList,
|
|
26
|
+
disabled: disabled,
|
|
27
|
+
setShopId: handleChangeShopId,
|
|
28
|
+
placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
|
|
29
|
+
showSearch: true,
|
|
30
|
+
optionFilterProp: "label",
|
|
31
|
+
style: {
|
|
32
|
+
width: '220px'
|
|
33
|
+
}
|
|
34
|
+
})));
|
|
35
|
+
};
|
|
36
|
+
export default ShopName;
|
package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js
CHANGED
|
@@ -2,7 +2,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2
2
|
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; }
|
|
3
3
|
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); } }
|
|
4
4
|
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); }); }; }
|
|
5
|
-
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useState } from 'react';
|
|
6
12
|
import { Divider, Modal, Button, message, Tooltip } from 'antd';
|
|
7
13
|
import moment from 'moment';
|
|
8
14
|
import copy from 'copy-to-clipboard';
|
|
@@ -129,6 +135,14 @@ function PaymentWorkOrderCard(props) {
|
|
|
129
135
|
}
|
|
130
136
|
}, payStatusMap[id]);
|
|
131
137
|
});
|
|
138
|
+
var _useState = useState(false),
|
|
139
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
140
|
+
visible = _useState2[0],
|
|
141
|
+
setVisible = _useState2[1];
|
|
142
|
+
var _useState3 = useState(""),
|
|
143
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
144
|
+
msg = _useState4[0],
|
|
145
|
+
setMsg = _useState4[1];
|
|
132
146
|
var handleClick = function handleClick(id, record) {
|
|
133
147
|
switch (id) {
|
|
134
148
|
case 'examine':
|
|
@@ -201,26 +215,14 @@ function PaymentWorkOrderCard(props) {
|
|
|
201
215
|
data = res.data, msg = res.message;
|
|
202
216
|
if (data) {
|
|
203
217
|
if (['fxg'].includes(platformInfo === null || platformInfo === void 0 ? void 0 : platformInfo.platform)) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
content: /*#__PURE__*/React.createElement("div", null, "\u8BF7\u590D\u5236\u94FE\u63A5\u5728\u6D4F\u89C8\u5668\u4E0A\u6253\u5F00\uFF0C\u94FE\u63A5\uFF1A".concat(data), ' ', /*#__PURE__*/React.createElement(Button, {
|
|
207
|
-
type: "primary",
|
|
208
|
-
onClick: function onClick() {
|
|
209
|
-
copy(data);
|
|
210
|
-
message.success('复制成功');
|
|
211
|
-
}
|
|
212
|
-
}, "\u70B9\u51FB\u590D\u5236")),
|
|
213
|
-
getContainer: false
|
|
214
|
-
});
|
|
218
|
+
setMsg(data);
|
|
219
|
+
setVisible(true);
|
|
215
220
|
} else {
|
|
216
221
|
window.open(data);
|
|
217
222
|
}
|
|
218
223
|
} else {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
content: msg,
|
|
222
|
-
getContainer: false
|
|
223
|
-
});
|
|
224
|
+
setMsg(msg);
|
|
225
|
+
setVisible(true);
|
|
224
226
|
}
|
|
225
227
|
case 6:
|
|
226
228
|
case "end":
|
|
@@ -228,7 +230,7 @@ function PaymentWorkOrderCard(props) {
|
|
|
228
230
|
}
|
|
229
231
|
}, _callee);
|
|
230
232
|
}));
|
|
231
|
-
return function voucherHandle(
|
|
233
|
+
return function voucherHandle(_x2) {
|
|
232
234
|
return _ref.apply(this, arguments);
|
|
233
235
|
};
|
|
234
236
|
}();
|
|
@@ -253,7 +255,7 @@ function PaymentWorkOrderCard(props) {
|
|
|
253
255
|
return null;
|
|
254
256
|
});
|
|
255
257
|
};
|
|
256
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
258
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
257
259
|
className: "listOrderItemBox"
|
|
258
260
|
}, /*#__PURE__*/React.createElement("div", {
|
|
259
261
|
className: "orderItem"
|
|
@@ -325,6 +327,19 @@ function PaymentWorkOrderCard(props) {
|
|
|
325
327
|
}
|
|
326
328
|
}), /*#__PURE__*/React.createElement("span", {
|
|
327
329
|
className: "orderItemRight"
|
|
328
|
-
}, btnList))
|
|
330
|
+
}, btnList)), /*#__PURE__*/React.createElement(Modal, {
|
|
331
|
+
title: "\u4ED8\u6B3E\u51ED\u8BC1",
|
|
332
|
+
visible: visible,
|
|
333
|
+
footer: false,
|
|
334
|
+
onCancel: function onCancel() {
|
|
335
|
+
return setVisible(false);
|
|
336
|
+
}
|
|
337
|
+
}, ['fxg'].includes(platformInfo === null || platformInfo === void 0 ? void 0 : platformInfo.platform) ? /*#__PURE__*/React.createElement("div", null, "\u8BF7\u590D\u5236\u94FE\u63A5\u5728\u6D4F\u89C8\u5668\u4E0A\u6253\u5F00\uFF0C\u94FE\u63A5\uFF1A".concat(msg), ' ', /*#__PURE__*/React.createElement(Button, {
|
|
338
|
+
type: "primary",
|
|
339
|
+
onClick: function onClick() {
|
|
340
|
+
copy(msg);
|
|
341
|
+
message.success('复制成功');
|
|
342
|
+
}
|
|
343
|
+
}, "\u70B9\u51FB\u590D\u5236")) : msg));
|
|
329
344
|
}
|
|
330
345
|
export default PaymentWorkOrderCard;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { default as SingleShopWorkOrder } from './SingleShopWorkOrder';
|
|
|
4
4
|
export { default as FormRender } from './FormRender';
|
|
5
5
|
export { default as FormRenderTemplateId } from './FormRenderTemplateId';
|
|
6
6
|
export { default as FlowWorkOrderDetail } from './FlowTemplateDetail';
|
|
7
|
+
export { default as BatchSubmitFormList } from './BatchSubmitFormList';
|
|
7
8
|
export * as utils from './common/utils/tools';
|
|
8
9
|
export * from './WorkOrder/types';
|
package/dist/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { default as SingleShopWorkOrder } from "./SingleShopWorkOrder";
|
|
|
14
14
|
export { default as FormRender } from "./FormRender";
|
|
15
15
|
export { default as FormRenderTemplateId } from "./FormRenderTemplateId";
|
|
16
16
|
export { default as FlowWorkOrderDetail } from "./FlowTemplateDetail";
|
|
17
|
+
export { default as BatchSubmitFormList } from "./BatchSubmitFormList";
|
|
17
18
|
import * as _utils from "./common/utils/tools";
|
|
18
19
|
export { _utils as utils };
|
|
19
20
|
export * from "./WorkOrder/types";
|
|
@@ -45,3 +45,22 @@ export declare const currentTradeIdJoinWorkOrder: (data: any) => Promise<serverP
|
|
|
45
45
|
total: number;
|
|
46
46
|
list: Array<any>;
|
|
47
47
|
}>>;
|
|
48
|
+
export declare type FlowTemplateNodeDetailT = {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
componentDtoList: Array<any>;
|
|
52
|
+
preNodeComponentDtoList: Array<any>;
|
|
53
|
+
flowTemplateConfig?: {
|
|
54
|
+
flowTemplateId: string;
|
|
55
|
+
flowTemplateKey?: string;
|
|
56
|
+
nodeId?: string;
|
|
57
|
+
showHideRule?: {
|
|
58
|
+
rules: Array<any>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export declare const batchQueryNodeDetail: (data: any) => Promise<serverProps<Array<{
|
|
63
|
+
flowTemplateId: string;
|
|
64
|
+
nodeId: string;
|
|
65
|
+
workOrderTemplateInfo: FlowTemplateNodeDetailT;
|
|
66
|
+
}>>>;
|
|
@@ -121,4 +121,12 @@ export var currentTradeIdJoinWorkOrder = function currentTradeIdJoinWorkOrder(da
|
|
|
121
121
|
method: 'post',
|
|
122
122
|
data: data
|
|
123
123
|
});
|
|
124
|
+
};
|
|
125
|
+
// 批量查询工单详情
|
|
126
|
+
export var batchQueryNodeDetail = function batchQueryNodeDetail(data) {
|
|
127
|
+
return request({
|
|
128
|
+
url: '/qy/view/queryNodeTemplate',
|
|
129
|
+
method: 'post',
|
|
130
|
+
data: data
|
|
131
|
+
});
|
|
124
132
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "^0.8.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^0.8.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^0.8.7-alpha.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.7-alpha.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.8.7-alpha.0",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"gitHooks": {
|
|
76
76
|
"pre-commit": "lint-staged"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "9158e2dbe552cdeb64e38bea7b604f3c3b37c8df"
|
|
79
79
|
}
|