kmkf-work-order-service-component 0.1.11 → 0.1.12

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.
Files changed (39) hide show
  1. package/dist/esm/WorkOrder/common/utils/tools.d.ts +1 -1
  2. package/dist/esm/WorkOrder/common/utils/tools.js +92 -27
  3. package/dist/esm/WorkOrder/components/CustomizeFormModal/index.js +15 -11
  4. package/dist/esm/WorkOrder/components/DealWorkOrderModal/index.d.ts +3 -0
  5. package/dist/esm/WorkOrder/components/DealWorkOrderModal/index.js +110 -0
  6. package/dist/esm/WorkOrder/components/DeleteCustomizeOrderModal/index.d.ts +3 -0
  7. package/dist/esm/WorkOrder/components/DeleteCustomizeOrderModal/index.js +109 -0
  8. package/dist/esm/WorkOrder/components/DeletePaymentWorkOrderModal/index.d.ts +3 -0
  9. package/dist/esm/WorkOrder/components/DeletePaymentWorkOrderModal/index.js +107 -0
  10. package/dist/esm/WorkOrder/components/ExamineModal/index.d.ts +3 -0
  11. package/dist/esm/WorkOrder/components/ExamineModal/index.js +108 -0
  12. package/dist/esm/WorkOrder/components/FlagPayModal/index.d.ts +3 -0
  13. package/dist/esm/WorkOrder/components/FlagPayModal/index.js +110 -0
  14. package/dist/esm/WorkOrder/components/ListOrderItem/index.js +23 -69
  15. package/dist/esm/WorkOrder/components/PayListOrderItem/ModifyModal.js +10 -2
  16. package/dist/esm/WorkOrder/components/PayListOrderItem/RecordModal.js +4 -2
  17. package/dist/esm/WorkOrder/components/PayListOrderItem/index.js +43 -179
  18. package/dist/esm/WorkOrder/components/RecordLog/index.js +3 -1
  19. package/dist/esm/WorkOrder/components/TransferOrderModal/index.js +1 -1
  20. package/dist/esm/WorkOrder/components/UnExamineModal/index.d.ts +3 -0
  21. package/dist/esm/WorkOrder/components/UnExamineModal/index.js +108 -0
  22. package/dist/esm/WorkOrder/components/Widget/electricity/ETradeId/index.d.ts +0 -4
  23. package/dist/esm/WorkOrder/components/Widget/electricity/ETradeId/index.js +7 -24
  24. package/dist/esm/WorkOrder/components/Widget/third/Payment/index.d.ts +2 -4
  25. package/dist/esm/WorkOrder/components/Widget/third/Payment/index.js +60 -18
  26. package/dist/esm/WorkOrder/index.d.ts +1 -0
  27. package/dist/esm/WorkOrder/index.js +52 -74
  28. package/dist/esm/WorkOrder/index.less +9 -7
  29. package/dist/esm/WorkOrder/model/global.d.ts +7 -0
  30. package/dist/esm/WorkOrder/model/global.js +10 -3
  31. package/dist/esm/WorkOrder/model/servers/api.d.ts +1 -0
  32. package/dist/esm/WorkOrder/model/servers/api.js +14 -3
  33. package/dist/esm/WorkOrder/model/servers/request.js +8 -25
  34. package/dist/esm/WorkOrder/model/workOrder.d.ts +49 -0
  35. package/dist/esm/WorkOrder/model/workOrder.js +59 -3
  36. package/package.json +3 -2
  37. package/dist/esm/WorkOrder/components/Reminder/index.d.ts +0 -5
  38. package/dist/esm/WorkOrder/components/Reminder/index.js +0 -52
  39. package/dist/esm/WorkOrder/components/Reminder/index.module.less +0 -25
@@ -0,0 +1,107 @@
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
+
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
+
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); } }
6
+
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); }); }; }
8
+
9
+ /*
10
+ * @Author: wangzhenggui jianjia.wzg@raycloud.com
11
+ * @Date: 2022-11-03 16:01:49
12
+ * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
13
+ * @LastEditTime: 2022-11-04 09:48:20
14
+ * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/components/DeletePaymentWorkOrderModal/index.tsx
15
+ * @Description:
16
+ *
17
+ * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
18
+ */
19
+ import React, { useCallback } from 'react';
20
+ import { Modal, message } from 'antd';
21
+ import { useAppSelector, useAppDispatch } from "../../model/hooks";
22
+ import { selectDeletePaymentWorkOrderModalVisible, selectCurrentRecord, fetchQueryPaymentWorkOrderList } from "../../model/workOrder";
23
+ import { deletePaymentOrder } from "../../model/servers/api";
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ import { jsxs as _jsxs } from "react/jsx-runtime";
26
+
27
+ var DeletePaymentWorkOrderModal = function DeletePaymentWorkOrderModal() {
28
+ var dispatch = useAppDispatch();
29
+ var visible = useAppSelector(selectDeletePaymentWorkOrderModalVisible);
30
+ var record = useAppSelector(selectCurrentRecord);
31
+
32
+ var handleCancel = function handleCancel() {
33
+ dispatch({
34
+ type: 'workOrder/setCurrentCustomizeRecord',
35
+ payload: {}
36
+ });
37
+ dispatch({
38
+ type: 'workOrder/setDeletePaymentWorkOrder',
39
+ payload: false
40
+ });
41
+ };
42
+
43
+ var fetchDeletePaymentOrder = /*#__PURE__*/function () {
44
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
45
+ var _yield$deletePaymentO, success;
46
+
47
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
48
+ while (1) {
49
+ switch (_context.prev = _context.next) {
50
+ case 0:
51
+ _context.prev = 0;
52
+ _context.next = 3;
53
+ return deletePaymentOrder(params);
54
+
55
+ case 3:
56
+ _yield$deletePaymentO = _context.sent;
57
+ success = _yield$deletePaymentO.success;
58
+
59
+ if (success) {
60
+ message.success('删除成功');
61
+ dispatch(fetchQueryPaymentWorkOrderList());
62
+ handleCancel();
63
+ }
64
+
65
+ _context.next = 11;
66
+ break;
67
+
68
+ case 8:
69
+ _context.prev = 8;
70
+ _context.t0 = _context["catch"](0);
71
+ console.error('e', _context.t0);
72
+
73
+ case 11:
74
+ case "end":
75
+ return _context.stop();
76
+ }
77
+ }
78
+ }, _callee, null, [[0, 8]]);
79
+ }));
80
+
81
+ return function fetchDeletePaymentOrder(_x) {
82
+ return _ref.apply(this, arguments);
83
+ };
84
+ }();
85
+
86
+ var handleOk = useCallback(function () {
87
+ fetchDeletePaymentOrder({
88
+ ids: [record.id]
89
+ });
90
+ }, [record]);
91
+ return /*#__PURE__*/_jsx(Modal, {
92
+ title: "\u5220\u9664\u6253\u6B3E\u5DE5\u5355",
93
+ open: visible,
94
+ okText: "\u786E\u5B9A",
95
+ cancelText: "\u53D6\u6D88",
96
+ onOk: handleOk,
97
+ onCancel: handleCancel,
98
+ children: /*#__PURE__*/_jsxs("div", {
99
+ children: [/*#__PURE__*/_jsx("span", {
100
+ className: "red",
101
+ children: "\u5220\u9664\u540E\u7684\u5DE5\u5355\u65E0\u6CD5\u6062\u590D"
102
+ }), "\uFF0C \u4F60\u8FD8\u8981\u7EE7\u7EED\u5417\uFF1F"]
103
+ })
104
+ });
105
+ };
106
+
107
+ export default DeletePaymentWorkOrderModal;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const ExamineModal: () => JSX.Element;
3
+ export default ExamineModal;
@@ -0,0 +1,108 @@
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
+
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
+
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); } }
6
+
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); }); }; }
8
+
9
+ /*
10
+ * @Author: wangzhenggui jianjia.wzg@raycloud.com
11
+ * @Date: 2022-11-03 16:01:49
12
+ * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
13
+ * @LastEditTime: 2022-11-04 09:48:31
14
+ * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/components/ExamineModal/index.tsx
15
+ * @Description:
16
+ *
17
+ * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
18
+ */
19
+ import React, { useCallback } from 'react';
20
+ import { Modal, message } from 'antd';
21
+ import { useAppSelector, useAppDispatch } from "../../model/hooks";
22
+ import { selectExamineModalVisible, selectCurrentRecord, fetchQueryPaymentWorkOrderList } from "../../model/workOrder";
23
+ import { examinePaymentOrder } from "../../model/servers/api";
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ import { jsxs as _jsxs } from "react/jsx-runtime";
26
+
27
+ var ExamineModal = function ExamineModal() {
28
+ var dispatch = useAppDispatch();
29
+ var deleteCustomizeWorkOrderModalVisible = useAppSelector(selectExamineModalVisible);
30
+ var record = useAppSelector(selectCurrentRecord);
31
+
32
+ var handleCancel = function handleCancel() {
33
+ dispatch({
34
+ type: 'workOrder/setCurrentCustomizeRecord',
35
+ payload: {}
36
+ });
37
+ dispatch({
38
+ type: 'workOrder/setExamineModalVisible',
39
+ payload: false
40
+ });
41
+ };
42
+
43
+ var examineRemitOrder = /*#__PURE__*/function () {
44
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
45
+ var _yield$examinePayment, success;
46
+
47
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
48
+ while (1) {
49
+ switch (_context.prev = _context.next) {
50
+ case 0:
51
+ _context.prev = 0;
52
+ _context.next = 3;
53
+ return examinePaymentOrder(params);
54
+
55
+ case 3:
56
+ _yield$examinePayment = _context.sent;
57
+ success = _yield$examinePayment.success;
58
+
59
+ if (success) {
60
+ message.success('操作成功');
61
+ dispatch(fetchQueryPaymentWorkOrderList());
62
+ handleCancel();
63
+ }
64
+
65
+ _context.next = 11;
66
+ break;
67
+
68
+ case 8:
69
+ _context.prev = 8;
70
+ _context.t0 = _context["catch"](0);
71
+ console.error('e', _context.t0);
72
+
73
+ case 11:
74
+ case "end":
75
+ return _context.stop();
76
+ }
77
+ }
78
+ }, _callee, null, [[0, 8]]);
79
+ }));
80
+
81
+ return function examineRemitOrder(_x) {
82
+ return _ref.apply(this, arguments);
83
+ };
84
+ }();
85
+
86
+ var handleOk = useCallback(function () {
87
+ examineRemitOrder({
88
+ workPayStatus: 'EXAMINED',
89
+ ids: [record.id]
90
+ });
91
+ }, [record]);
92
+ return /*#__PURE__*/_jsx(Modal, {
93
+ title: "\u5BA1\u6838\u6253\u6B3E\u5DE5\u5355",
94
+ open: deleteCustomizeWorkOrderModalVisible,
95
+ okText: "\u786E\u5B9A",
96
+ cancelText: "\u53D6\u6D88",
97
+ onOk: handleOk,
98
+ onCancel: handleCancel,
99
+ children: /*#__PURE__*/_jsxs("div", {
100
+ children: [/*#__PURE__*/_jsx("span", {
101
+ className: "red",
102
+ children: "\u5BA1\u6838\u901A\u8FC7\u540E\u7684\u5DE5\u5355\u4E0D\u5141\u8BB8\u4FEE\u6539\u548C\u5220\u9664\u64CD\u4F5C"
103
+ }), "\uFF0C \u4F60\u8FD8\u8981\u7EE7\u7EED\u5417\uFF1F"]
104
+ })
105
+ });
106
+ };
107
+
108
+ export default ExamineModal;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const FlagPayModal: () => JSX.Element;
3
+ export default FlagPayModal;
@@ -0,0 +1,110 @@
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
+
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
+
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); } }
6
+
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); }); }; }
8
+
9
+ /*
10
+ * @Author: wangzhenggui jianjia.wzg@raycloud.com
11
+ * @Date: 2022-11-03 16:01:49
12
+ * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
13
+ * @LastEditTime: 2022-11-04 09:44:54
14
+ * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/components/FlagPayModal/index.tsx
15
+ * @Description:
16
+ *
17
+ * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
18
+ */
19
+ import React, { useCallback } from 'react';
20
+ import { Modal, message } from 'antd';
21
+ import { useAppSelector, useAppDispatch } from "../../model/hooks";
22
+ import { selectFlagPayModalVisible, selectCurrentRecord, fetchQueryPaymentWorkOrderList } from "../../model/workOrder";
23
+ import { paymentOrder } from "../../model/servers/api";
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ import { jsxs as _jsxs } from "react/jsx-runtime";
26
+
27
+ var FlagPayModal = function FlagPayModal() {
28
+ var dispatch = useAppDispatch();
29
+ var visible = useAppSelector(selectFlagPayModalVisible);
30
+ var record = useAppSelector(selectCurrentRecord);
31
+
32
+ var handleCancel = function handleCancel() {
33
+ dispatch({
34
+ type: 'workOrder/setCurrentCustomizeRecord',
35
+ payload: {}
36
+ });
37
+ dispatch({
38
+ type: 'workOrder/setFlagPayModalVisible',
39
+ payload: false
40
+ });
41
+ };
42
+
43
+ var fetchFlagPaymentOrder = /*#__PURE__*/function () {
44
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
45
+ var _yield$paymentOrder, success;
46
+
47
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
48
+ while (1) {
49
+ switch (_context.prev = _context.next) {
50
+ case 0:
51
+ _context.prev = 0;
52
+ _context.next = 3;
53
+ return paymentOrder(params);
54
+
55
+ case 3:
56
+ _yield$paymentOrder = _context.sent;
57
+ success = _yield$paymentOrder.success;
58
+
59
+ if (success) {
60
+ message.success('操作成功');
61
+ dispatch(fetchQueryPaymentWorkOrderList());
62
+ handleCancel();
63
+ }
64
+
65
+ _context.next = 11;
66
+ break;
67
+
68
+ case 8:
69
+ _context.prev = 8;
70
+ _context.t0 = _context["catch"](0);
71
+ console.error('e', _context.t0);
72
+
73
+ case 11:
74
+ case "end":
75
+ return _context.stop();
76
+ }
77
+ }
78
+ }, _callee, null, [[0, 8]]);
79
+ }));
80
+
81
+ return function fetchFlagPaymentOrder(_x) {
82
+ return _ref.apply(this, arguments);
83
+ };
84
+ }();
85
+
86
+ var handleOk = useCallback(function () {
87
+ fetchFlagPaymentOrder({
88
+ ids: [record.id],
89
+ workPayStatus: 'FLAG_PAID'
90
+ });
91
+ }, [record]);
92
+ return /*#__PURE__*/_jsx(Modal, {
93
+ title: "\u6253\u6B3E",
94
+ open: visible,
95
+ okText: "\u786E\u5B9A",
96
+ cancelText: "\u53D6\u6D88",
97
+ onOk: handleOk,
98
+ onCancel: handleCancel,
99
+ children: /*#__PURE__*/_jsxs("div", {
100
+ children: [/*#__PURE__*/_jsx("span", {
101
+ children: "\u786E\u8BA4\u628A\u8BE5\u7B14\u5DE5\u5355\u6807\u8BB0\u4E3A"
102
+ }), /*#__PURE__*/_jsx("span", {
103
+ className: "green",
104
+ children: "\u5DF2\u6253\u6B3E"
105
+ }), "\u72B6\u6001\u5417\uFF1F"]
106
+ })
107
+ });
108
+ };
109
+
110
+ export default FlagPayModal;
@@ -21,14 +21,14 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
  * @Author: litian
22
22
  * @Date: 2022-09-07 17:04:02
23
23
  * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
24
- * @LastEditTime: 2022-10-25 11:26:29
24
+ * @LastEditTime: 2022-11-03 23:41:23
25
25
  */
26
26
  import React from 'react';
27
+ import { useAppDispatch } from "../../model/hooks";
27
28
  import { factory } from "../Widget";
28
29
  import { calcWorkOrderList } from "../../common/utils/tools";
29
- import { Modal, Divider } from 'antd';
30
+ import { Divider } from 'antd';
30
31
  import moment from 'moment';
31
- import { dealWorkOrder } from "../../model/servers/api";
32
32
  import { isEmpty } from 'lodash';
33
33
  import styles from "./index.module.less";
34
34
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -38,9 +38,8 @@ function ListOrderItem(props) {
38
38
  var item = props.item,
39
39
  onEdit = props.onEdit,
40
40
  onLog = props.onLog,
41
- onRefresh = props.onRefresh,
42
- onTransfer = props.onTransfer,
43
- onDelete = props.onDelete;
41
+ onTransfer = props.onTransfer;
42
+ var dispatch = useAppDispatch();
44
43
  var componentDtoList = item.templateDetailDto.componentDtoList;
45
44
 
46
45
  var _calcWorkOrderList = calcWorkOrderList([_objectSpread({}, item)], componentDtoList),
@@ -165,73 +164,28 @@ function ListOrderItem(props) {
165
164
 
166
165
 
167
166
  var upDateState = function upDateState(item, status) {
168
- return Modal.confirm({
169
- title: '处理工单',
170
- content: "\u786E\u8BA4\u5C06\u8BE5\u6761\u5DE5\u5355\u7684\u72B6\u6001\u66F4\u6539\u4E3A\u3010\u5DF2".concat(status, "\u3011\u72B6\u6001\u5417\uFF1F"),
171
- icon: null,
172
- onOk: function onOk() {
173
- var jsonMap = item.jsonMap,
174
- templateDetailDto = item.templateDetailDto;
175
- var params = {
176
- uniqueKey: templateDetailDto.uniqueKey,
177
- workOrderUpdateKeyVos: {
178
- workOrderId: item.id,
179
- workOrderUpdateKeySupVos: []
180
- }
181
- };
182
-
183
- for (var key in jsonMap) {
184
- if (jsonMap.hasOwnProperty(key)) {
185
- var _key$split = key.split('_'),
186
- _key$split2 = _slicedToArray(_key$split, 2),
187
- uniqueKey = _key$split2[0],
188
- fieldName = _key$split2[1];
189
-
190
- var oldContent = '';
191
-
192
- if (fieldName && fieldName === 'customerService') {
193
- oldContent = jsonMap[key];
194
- }
195
-
196
- if (fieldName && fieldName === 'status') {
197
- params.workOrderUpdateKeyVos.workOrderUpdateKeySupVos.push({
198
- uniqueKey: key,
199
- content: '1',
200
- oldContent: '0'
201
- });
202
- params.workOrderUpdateKeyVos.workOrderUpdateKeySupVos.push({
203
- uniqueKey: "".concat(uniqueKey, "_customerService"),
204
- content: '' // oldContent
205
-
206
- });
207
- }
208
- }
209
- }
210
-
211
- dealWorkOrder(params).then(function (res) {
212
- if (res.success) {
213
- onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh();
214
- }
215
- });
216
- }
167
+ dispatch({
168
+ type: 'workOrder/setCurrentCustomizeRecord',
169
+ payload: item
170
+ });
171
+ dispatch({
172
+ type: 'workOrder/setDealCustomizeWorkOrderModalVisible',
173
+ payload: true
174
+ });
175
+ dispatch({
176
+ type: 'workOrder/setCurrentStatusText',
177
+ payload: status
217
178
  });
218
179
  };
219
180
 
220
181
  var deleteHandle = function deleteHandle(record) {
221
- Modal.confirm({
222
- title: '删除工单',
223
- icon: null,
224
- content: /*#__PURE__*/_jsxs("div", {
225
- children: [/*#__PURE__*/_jsx("span", {
226
- className: styles.red,
227
- children: "\u5220\u9664\u540E\u7684\u5DE5\u5355\u65E0\u6CD5\u6062\u590D"
228
- }), "\uFF0C \u786E\u8BA4\u8981\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F"]
229
- }),
230
- okText: '确认',
231
- cancelText: '取消',
232
- onOk: function onOk() {
233
- return onDelete(record);
234
- }
182
+ dispatch({
183
+ type: 'workOrder/setCurrentCustomizeRecord',
184
+ payload: record
185
+ });
186
+ dispatch({
187
+ type: 'workOrder/setDeleteCustomizeWorkOrderModalVisible',
188
+ payload: true
235
189
  });
236
190
  }; //转交
237
191
 
@@ -32,6 +32,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
32
 
33
33
  import React, { useState, useImperativeHandle, forwardRef } from 'react';
34
34
  import { Drawer, Form, Spin, Input, Space, Button, message } from 'antd';
35
+ import { LeftOutlined } from '@ant-design/icons';
35
36
  import { get } from 'lodash';
36
37
  import { decodeAlipayInfo, editRemitOrder, addPaymentOrder } from "../../model/servers/api";
37
38
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -137,7 +138,7 @@ function ModifyModal(props, ref) {
137
138
  if (success) {
138
139
  message.success('保存成功');
139
140
  form.resetFields();
140
- afterSuccessUpdateWorkOrder && afterSuccessUpdateWorkOrder(1); // 重新查询表格
141
+ afterSuccessUpdateWorkOrder && afterSuccessUpdateWorkOrder(type); // 重新查询表格
141
142
 
142
143
  setVisible(false);
143
144
  }
@@ -216,7 +217,12 @@ function ModifyModal(props, ref) {
216
217
  };
217
218
  }();
218
219
 
220
+ var TidChangeHandle = function TidChangeHandle(e) {
221
+ console.log(e.target.value);
222
+ };
223
+
219
224
  return /*#__PURE__*/_jsx(Drawer, {
225
+ closeIcon: /*#__PURE__*/_jsx(LeftOutlined, {}),
220
226
  open: visible,
221
227
  width: width,
222
228
  onClose: function onClose() {
@@ -287,7 +293,9 @@ function ModifyModal(props, ref) {
287
293
  pattern: /^[0-9a-zA-Z_-]{1,}$/,
288
294
  message: '请输入正确的订单编号'
289
295
  }],
290
- children: /*#__PURE__*/_jsx(Input, {})
296
+ children: /*#__PURE__*/_jsx(Input, {
297
+ onChange: TidChangeHandle
298
+ })
291
299
  }), /*#__PURE__*/_jsx(Form.Item, {
292
300
  label: "\u652F\u4ED8\u5B9D\u59D3\u540D",
293
301
  name: "accountNick",
@@ -22,11 +22,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
22
  * @Description:
23
23
  * @Author: litian
24
24
  * @Date: 2022-09-09 16:58:00
25
- * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
26
- * @LastEditTime: 2022-10-26 15:06:21
25
+ * @LastEditors: litian
26
+ * @LastEditTime: 2022-11-07 16:10:03
27
27
  */
28
28
  import React, { useImperativeHandle, forwardRef, useState } from 'react';
29
29
  import { Drawer } from 'antd';
30
+ import { LeftOutlined } from '@ant-design/icons';
30
31
  import moment from 'moment';
31
32
  import { reportLogs } from "../../model/servers/api";
32
33
  import styles from "./record.module.less";
@@ -106,6 +107,7 @@ function RecordModal(props, ref) {
106
107
 
107
108
  return /*#__PURE__*/_jsx(Drawer, {
108
109
  title: "\u8BB0\u5F55",
110
+ closeIcon: /*#__PURE__*/_jsx(LeftOutlined, {}),
109
111
  width: props === null || props === void 0 ? void 0 : props.width,
110
112
  open: visible,
111
113
  onClose: function onClose() {