kmkf-work-order-service-component 0.3.9-alpha.1 → 0.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/FormRender/index.d.ts +24 -0
- package/dist/esm/FormRender/index.js +646 -0
- package/dist/esm/FormRender/index.less +134 -0
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeFormModal/index.js +0 -2
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.js +9 -7
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/DealerSelectModal/index.d.ts +3 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/DealerSelectModal/index.js +5 -5
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/DeleteCustomizeOrderModal/index.d.ts +3 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/DeleteCustomizeOrderModal/index.js +10 -30
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RecordLog/index.js +3 -4
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/StatusSelectModal/index.d.ts +3 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/StatusSelectModal/index.js +5 -5
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.js +346 -211
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.less +41 -1
- package/dist/esm/WorkOrder/components/Widget/basic/DateTime/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/index.d.ts +1 -1
- package/dist/esm/WorkOrder/components/Widget/third/Status/index.js +3 -1
- package/dist/esm/WorkOrder/index.js +3 -0
- package/dist/esm/common/utils/tools.d.ts +5 -1
- package/dist/esm/common/utils/tools.js +11 -1
- package/dist/esm/model/customizeWorkOrder/api.d.ts +6 -0
- package/dist/esm/model/customizeWorkOrder/api.js +9 -0
- package/dist/esm/model/customizeWorkOrder/index.d.ts +6 -2
- package/dist/esm/model/customizeWorkOrder/index.js +98 -25
- package/dist/esm/model/customizeWorkOrder/selector.d.ts +34 -0
- package/dist/esm/model/customizeWorkOrder/selector.js +6 -0
- package/dist/esm/model/customizeWorkOrder/types.d.ts +17 -0
- package/dist/esm/model/servers/api.d.ts +1 -0
- package/dist/esm/model/servers/api.js +8 -0
- package/package.json +1 -1
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.less +0 -34
- package/dist/esm/WorkOrder/components/CustomizeFormModal/wrap.d.ts +0 -5
- package/dist/esm/WorkOrder/components/CustomizeFormModal/wrap.js +0 -53
@@ -0,0 +1,134 @@
|
|
1
|
+
.customizeFormModalWrapper {
|
2
|
+
p,
|
3
|
+
lable {
|
4
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
5
|
+
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
6
|
+
'Noto Color Emoji';
|
7
|
+
}
|
8
|
+
.ant-modal-body {
|
9
|
+
overflow-x: hidden;
|
10
|
+
overflow-y: auto;
|
11
|
+
}
|
12
|
+
.ant-select.ant-select-single.ant-select-show-arrow.ant-select-show-search {
|
13
|
+
margin-bottom: 8px;
|
14
|
+
}
|
15
|
+
.ant-picker-suffix,
|
16
|
+
.ant-select-arrow svg {
|
17
|
+
color: #4e5969;
|
18
|
+
}
|
19
|
+
.status-payment--basic {
|
20
|
+
.ant-row.ant-form-item {
|
21
|
+
margin-bottom: 5px;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
.ant-modal-footer {
|
25
|
+
margin-top: 20px;
|
26
|
+
}
|
27
|
+
.ant-input[disabled],
|
28
|
+
.ant-input-number-disabled {
|
29
|
+
border: none;
|
30
|
+
}
|
31
|
+
.ant-select-disabled .ant-select-arrow svg {
|
32
|
+
color: #c9cdd4;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
.customizeFormModalClassName {
|
37
|
+
:global(.goods-uploaded-state) {
|
38
|
+
margin: 6px 0 5px 0;
|
39
|
+
padding-left: 7px;
|
40
|
+
font-size: 12px;
|
41
|
+
}
|
42
|
+
|
43
|
+
:global(.ant-picker) {
|
44
|
+
width: 100%;
|
45
|
+
|
46
|
+
box-shadow: none;
|
47
|
+
// background: #f2f3f5;
|
48
|
+
// border: none;
|
49
|
+
|
50
|
+
input {
|
51
|
+
&::placeholder {
|
52
|
+
color: #86909c;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
&:hover {
|
57
|
+
border-color: #4583ff;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
:global(.ant-radio-inner) {
|
62
|
+
background-color: #fff;
|
63
|
+
}
|
64
|
+
|
65
|
+
:global(.ant-select) {
|
66
|
+
width: 100% !important;
|
67
|
+
|
68
|
+
.ant-select-selector {
|
69
|
+
background: #f2f3f5 !important;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
:global(.ant-form-item) {
|
74
|
+
margin-bottom: 8px;
|
75
|
+
}
|
76
|
+
|
77
|
+
:global(.ant-form-item .ant-form-item-label) {
|
78
|
+
padding: 0px;
|
79
|
+
}
|
80
|
+
|
81
|
+
:global(.ant-form-item-label) {
|
82
|
+
position: relative;
|
83
|
+
max-width: 100px;
|
84
|
+
overflow: initial;
|
85
|
+
color: rgba(0, 0, 0, 0.55);
|
86
|
+
// font-weight: bold;
|
87
|
+
font-size: 14px;
|
88
|
+
white-space: normal;
|
89
|
+
text-align: left;
|
90
|
+
}
|
91
|
+
|
92
|
+
:global(.form-item-label--index .ant-form-item-label label) {
|
93
|
+
// padding-left: 23px;
|
94
|
+
text-align: left;
|
95
|
+
// font-family: 'PingFangSC-Semibold';
|
96
|
+
|
97
|
+
// &[title='处理客服'] {
|
98
|
+
// padding-left: 0;
|
99
|
+
// font-weight: lighter;
|
100
|
+
// font-family: 'PingFangSC-Regular';
|
101
|
+
// }
|
102
|
+
}
|
103
|
+
|
104
|
+
:global(.label-title--index) {
|
105
|
+
position: absolute;
|
106
|
+
color: #86909c;
|
107
|
+
font-family: 'PingFangSC-Semibold';
|
108
|
+
}
|
109
|
+
|
110
|
+
:global(.goods-title) {
|
111
|
+
color: #4e5969;
|
112
|
+
font-size: 12px;
|
113
|
+
}
|
114
|
+
|
115
|
+
:global(div.ant-form-item.invoice-title--basic label) {
|
116
|
+
padding-left: 0;
|
117
|
+
font-weight: normal;
|
118
|
+
font-family: 'PingFangSC-Regular';
|
119
|
+
}
|
120
|
+
|
121
|
+
:global(.payment-widgets--basic div.ant-form-item-label label) {
|
122
|
+
padding-left: 0;
|
123
|
+
font-weight: lighter;
|
124
|
+
font-family: 'PingFangSC-Regular';
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
.tipBox {
|
129
|
+
position: sticky;
|
130
|
+
top: -24px;
|
131
|
+
z-index: 1;
|
132
|
+
color: #e99d42;
|
133
|
+
background-color: #fff;
|
134
|
+
}
|
@@ -26,11 +26,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
import React from 'react';
|
27
27
|
import { Divider } from 'antd';
|
28
28
|
import moment from 'moment';
|
29
|
-
import { useAppDispatch } from "../../../../../model/hooks";
|
29
|
+
import { useAppDispatch, useAppSelector } from "../../../../../model/hooks";
|
30
30
|
import { factory } from "../../../Widget";
|
31
31
|
import { calcWorkOrderList, isNull } from "../../../../../common/utils/tools";
|
32
32
|
import { WORK_ORDER_STATUS, WAITING, HANDLING, STOPPING } from "../../../../../common/constant";
|
33
33
|
import { setStatusSelectModalVisible, setLogModalVisible, setFormModalVisible, setTemplateId, setCustomizeFormShopId, setCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder";
|
34
|
+
import { selectorAllTemplateList } from "../../../../../model/customizeWorkOrder/selector";
|
34
35
|
import "./index.less";
|
35
36
|
import { jsx as _jsx } from "react/jsx-runtime";
|
36
37
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -41,7 +42,7 @@ function CustomizeWorkOrderCard(props) {
|
|
41
42
|
|
42
43
|
var item = props.item;
|
43
44
|
var dispatch = useAppDispatch();
|
44
|
-
var componentDtoList =
|
45
|
+
var componentDtoList = useAppSelector(selectorAllTemplateList);
|
45
46
|
|
46
47
|
var _calcWorkOrderList = calcWorkOrderList([_objectSpread({}, item)], componentDtoList),
|
47
48
|
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
@@ -51,7 +52,8 @@ function CustomizeWorkOrderCard(props) {
|
|
51
52
|
var ItemHeader = function ItemHeader() {
|
52
53
|
var _WORK_ORDER_STATUS, _WORK_ORDER_STATUS2;
|
53
54
|
|
54
|
-
var
|
55
|
+
var templateName = item.templateName,
|
56
|
+
flowStatus = item.flowStatus,
|
55
57
|
jsonMap = item.jsonMap;
|
56
58
|
return /*#__PURE__*/_jsx("div", {
|
57
59
|
className: "orderItem",
|
@@ -63,12 +65,12 @@ function CustomizeWorkOrderCard(props) {
|
|
63
65
|
className: "orderItemLeftIcon"
|
64
66
|
}), /*#__PURE__*/_jsxs("div", {
|
65
67
|
className: "orderItemLeftName",
|
66
|
-
children: [
|
68
|
+
children: [templateName, flowStatus && /*#__PURE__*/_jsx("span", {
|
67
69
|
className: "status",
|
68
70
|
style: {
|
69
|
-
background: (_WORK_ORDER_STATUS = WORK_ORDER_STATUS[
|
71
|
+
background: (_WORK_ORDER_STATUS = WORK_ORDER_STATUS[flowStatus]) === null || _WORK_ORDER_STATUS === void 0 ? void 0 : _WORK_ORDER_STATUS.bgColor
|
70
72
|
},
|
71
|
-
children: (_WORK_ORDER_STATUS2 = WORK_ORDER_STATUS[
|
73
|
+
children: (_WORK_ORDER_STATUS2 = WORK_ORDER_STATUS[flowStatus]) === null || _WORK_ORDER_STATUS2 === void 0 ? void 0 : _WORK_ORDER_STATUS2.label
|
72
74
|
})]
|
73
75
|
})]
|
74
76
|
})
|
@@ -106,7 +108,7 @@ function CustomizeWorkOrderCard(props) {
|
|
106
108
|
var handleEdit = function handleEdit(record) {
|
107
109
|
dispatch(setCurrentCustomizeRecord(record));
|
108
110
|
dispatch(setFormModalVisible(true));
|
109
|
-
dispatch(setTemplateId(
|
111
|
+
dispatch(setTemplateId(record.templateId));
|
110
112
|
dispatch(setCustomizeFormShopId(item.shopId));
|
111
113
|
};
|
112
114
|
|
package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/DealerSelectModal/index.js
CHANGED
@@ -12,11 +12,11 @@ import { useSelector, useDispatch } from 'react-redux';
|
|
12
12
|
import { debounce } from 'lodash';
|
13
13
|
import { setSelectedUserList, setDealerModalVisible, setCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder";
|
14
14
|
import { selectorDealerModalVisible, selectorCompanyUserList, selectorSelectedCompanyUserList, selectorCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder/selector";
|
15
|
-
import { fetchQueryWorkOrder } from "../../../../../model/workOrder";
|
16
15
|
import { appointTo } from "../../../../../model/servers/api";
|
17
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
18
17
|
|
19
|
-
var DealerSelectModal = function DealerSelectModal() {
|
18
|
+
var DealerSelectModal = function DealerSelectModal(_ref) {
|
19
|
+
var onSuccess = _ref.onSuccess;
|
20
20
|
var visible = useSelector(selectorDealerModalVisible);
|
21
21
|
var companyUserList = useSelector(selectorCompanyUserList);
|
22
22
|
var record = useSelector(selectorCurrentCustomizeRecord);
|
@@ -43,7 +43,7 @@ var DealerSelectModal = function DealerSelectModal() {
|
|
43
43
|
|
44
44
|
|
45
45
|
var handleAppointTo = /*#__PURE__*/function () {
|
46
|
-
var
|
46
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
47
47
|
var _yield$appointTo, success, errMsg;
|
48
48
|
|
49
49
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -74,7 +74,7 @@ var DealerSelectModal = function DealerSelectModal() {
|
|
74
74
|
message.success('转交成功');
|
75
75
|
dispatch(setDealerModalVisible(false));
|
76
76
|
dispatch(setSelectedUserList([]));
|
77
|
-
|
77
|
+
onSuccess();
|
78
78
|
} else {
|
79
79
|
message.error(errMsg);
|
80
80
|
}
|
@@ -88,7 +88,7 @@ var DealerSelectModal = function DealerSelectModal() {
|
|
88
88
|
}));
|
89
89
|
|
90
90
|
return function handleAppointTo() {
|
91
|
-
return
|
91
|
+
return _ref2.apply(this, arguments);
|
92
92
|
};
|
93
93
|
}();
|
94
94
|
|
@@ -2,12 +2,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
2
2
|
|
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, $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 generator._invoke = function (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); } }; }(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; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return 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, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), 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 (object) { var 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
4
|
|
5
|
-
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; }
|
6
|
-
|
7
|
-
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; }
|
8
|
-
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
10
|
-
|
11
5
|
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); } }
|
12
6
|
|
13
7
|
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); }); }; }
|
@@ -26,18 +20,16 @@ import React, { useCallback } from 'react';
|
|
26
20
|
import { Modal } from 'antd';
|
27
21
|
import { useSelector } from 'react-redux';
|
28
22
|
import { debounce } from 'lodash';
|
29
|
-
import {
|
23
|
+
import { useAppDispatch } from "../../../../../model/hooks";
|
30
24
|
import { fetchDeleteWorkOrder } from "../../../../../model/workOrder";
|
31
25
|
import { setCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder";
|
32
26
|
import { selectDeleteCustomizeWorkOrderModalVisible, selectorCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder/selector";
|
33
27
|
import { jsx as _jsx } from "react/jsx-runtime";
|
34
28
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
35
29
|
|
36
|
-
var DeleteCustomizeOrderModal = function DeleteCustomizeOrderModal() {
|
30
|
+
var DeleteCustomizeOrderModal = function DeleteCustomizeOrderModal(_ref) {
|
31
|
+
var submit = _ref.submit;
|
37
32
|
var dispatch = useAppDispatch();
|
38
|
-
var customSearch = useAppSelector(function (state) {
|
39
|
-
return state.workOrder.customSearch;
|
40
|
-
});
|
41
33
|
var deleteCustomizeWorkOrderModalVisible = useSelector(selectDeleteCustomizeWorkOrderModalVisible);
|
42
34
|
var record = useSelector(selectorCurrentCustomizeRecord);
|
43
35
|
|
@@ -50,8 +42,6 @@ var DeleteCustomizeOrderModal = function DeleteCustomizeOrderModal() {
|
|
50
42
|
};
|
51
43
|
|
52
44
|
var onDelete = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
53
|
-
var _record$templateDetai;
|
54
|
-
|
55
45
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
56
46
|
while (1) {
|
57
47
|
switch (_context.prev = _context.next) {
|
@@ -59,37 +49,27 @@ var DeleteCustomizeOrderModal = function DeleteCustomizeOrderModal() {
|
|
59
49
|
_context.prev = 0;
|
60
50
|
_context.next = 3;
|
61
51
|
return dispatch(fetchDeleteWorkOrder({
|
62
|
-
uniqueKey: record === null || record === void 0 ? void 0 :
|
52
|
+
uniqueKey: record === null || record === void 0 ? void 0 : record.templateId,
|
63
53
|
workOrderId: record === null || record === void 0 ? void 0 : record.id
|
64
54
|
})).unwrap();
|
65
55
|
|
66
56
|
case 3:
|
67
|
-
|
68
|
-
return dispatch({
|
69
|
-
type: 'workOrder/setState',
|
70
|
-
payload: {
|
71
|
-
customSearch: _objectSpread(_objectSpread({}, customSearch), {}, {
|
72
|
-
pageNo: 1
|
73
|
-
})
|
74
|
-
}
|
75
|
-
});
|
76
|
-
|
77
|
-
case 5:
|
57
|
+
submit();
|
78
58
|
handleCancel();
|
79
|
-
_context.next =
|
59
|
+
_context.next = 10;
|
80
60
|
break;
|
81
61
|
|
82
|
-
case
|
83
|
-
_context.prev =
|
62
|
+
case 7:
|
63
|
+
_context.prev = 7;
|
84
64
|
_context.t0 = _context["catch"](0);
|
85
65
|
console.log('e', _context.t0);
|
86
66
|
|
87
|
-
case
|
67
|
+
case 10:
|
88
68
|
case "end":
|
89
69
|
return _context.stop();
|
90
70
|
}
|
91
71
|
}
|
92
|
-
}, _callee, null, [[0,
|
72
|
+
}, _callee, null, [[0, 7]]);
|
93
73
|
})), [record]);
|
94
74
|
return /*#__PURE__*/_jsx(Modal, {
|
95
75
|
title: "\u5220\u9664\u5DE5\u5355",
|
@@ -42,7 +42,7 @@ import { useSelector, useDispatch } from 'react-redux';
|
|
42
42
|
import { factory } from "../../../Widget";
|
43
43
|
import { calcWorkOrderList, jsonParseSecurity } from "../../../../../common/utils/tools";
|
44
44
|
import { reportLogs } from "../../../../../model/servers/api";
|
45
|
-
import { selectorLogModalVisible, selectorCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder/selector";
|
45
|
+
import { selectorLogModalVisible, selectorCurrentCustomizeRecord, selectorAllTemplateList } from "../../../../../model/customizeWorkOrder/selector";
|
46
46
|
import { setLogModalVisible } from "../../../../../model/customizeWorkOrder";
|
47
47
|
import "./index.less";
|
48
48
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -67,6 +67,7 @@ var RecordLog = function RecordLog(props) {
|
|
67
67
|
var dispatch = useDispatch();
|
68
68
|
var visible = useSelector(selectorLogModalVisible);
|
69
69
|
var currentRecord = useSelector(selectorCurrentCustomizeRecord);
|
70
|
+
var componentDtoList = useSelector(selectorAllTemplateList);
|
70
71
|
useEffect(function () {
|
71
72
|
if (visible) {
|
72
73
|
getLog(currentRecord);
|
@@ -151,8 +152,6 @@ var RecordLog = function RecordLog(props) {
|
|
151
152
|
}
|
152
153
|
} else if (/^(UPDATE|ADD)/.test(record.operation)) {
|
153
154
|
if (/^\[.+\]$/.test(value)) {
|
154
|
-
var _currentRecord$templa, _currentRecord$templa2;
|
155
|
-
|
156
155
|
var newContent = jsonParseSecurity(value, []).reduce(function (nxt, cur) {
|
157
156
|
nxt[cur['uniqueKey']] = cur['content'];
|
158
157
|
return nxt;
|
@@ -162,7 +161,7 @@ var RecordLog = function RecordLog(props) {
|
|
162
161
|
return nxt;
|
163
162
|
}, {});
|
164
163
|
var currentNeedContentId = Object.keys(newContent);
|
165
|
-
var newTemplateColumns =
|
164
|
+
var newTemplateColumns = componentDtoList === null || componentDtoList === void 0 ? void 0 : componentDtoList.filter(function (item) {
|
166
165
|
return currentNeedContentId.findIndex(function (id) {
|
167
166
|
return id === null || id === void 0 ? void 0 : id.startsWith(item === null || item === void 0 ? void 0 : item.uniqueKey);
|
168
167
|
}) > -1;
|
package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/StatusSelectModal/index.js
CHANGED
@@ -24,7 +24,6 @@ import { useSelector, useDispatch } from 'react-redux';
|
|
24
24
|
import { debounce, isEmpty, isEqual } from 'lodash';
|
25
25
|
import { selectorModalVisible, selectorCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder/selector";
|
26
26
|
import { setStatusSelectModalVisible, setCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder";
|
27
|
-
import { fetchQueryWorkOrder } from "../../../../../model/workOrder";
|
28
27
|
import { WAITING, HANDLING, STOPPING, COMPLETED } from "../../../../../common/constant";
|
29
28
|
import every from 'lodash/every';
|
30
29
|
import get from 'lodash/get';
|
@@ -73,7 +72,8 @@ var checkPaymentStatusByList = function checkPaymentStatusByList(list) {
|
|
73
72
|
});
|
74
73
|
};
|
75
74
|
|
76
|
-
var StatusSelectModal = function StatusSelectModal() {
|
75
|
+
var StatusSelectModal = function StatusSelectModal(_ref) {
|
76
|
+
var onSuccess = _ref.onSuccess;
|
77
77
|
var dispatch = useDispatch();
|
78
78
|
|
79
79
|
var _useState = useState(''),
|
@@ -119,7 +119,7 @@ var StatusSelectModal = function StatusSelectModal() {
|
|
119
119
|
};
|
120
120
|
|
121
121
|
var handleAppointTo = /*#__PURE__*/function () {
|
122
|
-
var
|
122
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
123
123
|
var params, _yield$updateFlowStat, success, errMsg;
|
124
124
|
|
125
125
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -150,7 +150,7 @@ var StatusSelectModal = function StatusSelectModal() {
|
|
150
150
|
if (success) {
|
151
151
|
message.success('状态设置成功');
|
152
152
|
handleCancel();
|
153
|
-
|
153
|
+
onSuccess();
|
154
154
|
} else {
|
155
155
|
message.error(errMsg);
|
156
156
|
}
|
@@ -164,7 +164,7 @@ var StatusSelectModal = function StatusSelectModal() {
|
|
164
164
|
}));
|
165
165
|
|
166
166
|
return function handleAppointTo() {
|
167
|
-
return
|
167
|
+
return _ref2.apply(this, arguments);
|
168
168
|
};
|
169
169
|
}();
|
170
170
|
|