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
@@ -1,5 +1,11 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
 
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
+
3
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; }
4
10
 
5
11
  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; }
@@ -38,6 +44,7 @@ import BuyerOpenUid from "./BuyerOpenUid";
38
44
  import PaymentTid from "./PaymentTid";
39
45
  import AlipayNo from "./AlipayNo";
40
46
  import PayTime from "./PayTime";
47
+ import { orderBack } from "../../../../common/utils/tools";
41
48
  import { jsx as _jsx } from "react/jsx-runtime";
42
49
 
43
50
  var Payment = /*#__PURE__*/function (_BasicComponent) {
@@ -70,6 +77,8 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
70
77
 
71
78
  _defineProperty(_assertThisInitialized(_this), "payTime", void 0);
72
79
 
80
+ _defineProperty(_assertThisInitialized(_this), "time", void 0);
81
+
73
82
  _defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
74
83
  return [{
75
84
  validator: function validator(_, value) {
@@ -128,8 +137,8 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
128
137
  rules: _this.customRules(_this.componentConfig),
129
138
  required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required,
130
139
  component: /*#__PURE__*/_jsx(ApaasPayment, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
131
- onSearch: function onSearch(val) {
132
- return _this.searchHandle(val);
140
+ onSearch: function onSearch(e) {
141
+ return _this.changeHandle(e.target.value);
133
142
  }
134
143
  }))
135
144
  }, value));
@@ -175,26 +184,59 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
175
184
  shopList: options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.shopList,
176
185
  shopId: options === null || options === void 0 ? void 0 : (_options$effects2 = options.effects) === null || _options$effects2 === void 0 ? void 0 : _options$effects2.shopId
177
186
  });
187
+ _this.time = null;
178
188
  return _this;
179
- }
189
+ } //订单返填
190
+
180
191
 
181
192
  _createClass(Payment, [{
182
- key: "searchHandle",
183
- value: function searchHandle(val) {
184
- var form = this.effects.form;
185
- var values = form.getFieldsValue();
186
- Object.keys(values).forEach(function (k) {
187
- if (Object.prototype.toString.call(values[k]) === '[object Object]') {
188
- if (values[k].hasOwnProperty('enterprisePaymentBuyerNick')) {
189
- values[k] = _objectSpread(_objectSpread({}, values[k]), {}, {
190
- enterprisePaymentBuyerNick: val.buyerNick,
191
- enterprisePaymentBuyerOpenUid: val.buyerOpenUid
192
- });
193
+ key: "changeHandle",
194
+ value: function () {
195
+ var _changeHandle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(order_no) {
196
+ var _this$effects2, form, shopId, shopList, templateDetail;
197
+
198
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
199
+ while (1) {
200
+ switch (_context.prev = _context.next) {
201
+ case 0:
202
+ if (order_no) {
203
+ _context.next = 2;
204
+ break;
205
+ }
206
+
207
+ return _context.abrupt("return");
208
+
209
+ case 2:
210
+ _this$effects2 = this.effects, form = _this$effects2.form, shopId = _this$effects2.shopId, shopList = _this$effects2.shopList, templateDetail = _this$effects2.templateDetail;
211
+
212
+ if (this.time) {
213
+ clearTimeout(this.time);
214
+ }
215
+
216
+ this.time = setTimeout(function () {
217
+ orderBack({
218
+ order_no: order_no,
219
+ form: form,
220
+ shopId: shopId,
221
+ shopList: shopList,
222
+ templateDetail: templateDetail
223
+ });
224
+ }, 1000);
225
+
226
+ case 5:
227
+ case "end":
228
+ return _context.stop();
229
+ }
193
230
  }
194
- }
195
- });
196
- form.setFieldsValue(values);
197
- } //自定义规则
231
+ }, _callee, this);
232
+ }));
233
+
234
+ function changeHandle(_x) {
235
+ return _changeHandle.apply(this, arguments);
236
+ }
237
+
238
+ return changeHandle;
239
+ }() //自定义规则
198
240
 
199
241
  }]);
200
242
 
@@ -5,6 +5,7 @@ export declare enum PlatForm {
5
5
  FXG = "fxg",
6
6
  KS = "ks",
7
7
  PDD = "pdd",
8
+ JD = "jd",
8
9
  XIAOZHI = "xiaozhi"
9
10
  }
10
11
  interface WorkOrderProps {
@@ -27,17 +27,17 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
27
  /*
28
28
  * @Author: wangzhenggui jianjia.wzg@raycloud.com
29
29
  * @Date: 2022-09-16 11:19:43
30
- * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
31
- * @LastEditTime: 2022-10-27 14:22:52
30
+ * @LastEditors: litian
31
+ * @LastEditTime: 2022-11-07 16:09:48
32
32
  * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/index.tsx
33
33
  * @Description:
34
34
  *
35
35
  * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
36
36
  */
37
- import React, { useState, useEffect, useRef } from 'react';
37
+ import React, { useState, useEffect, useRef, useLayoutEffect } from 'react';
38
38
  import { Tabs, Select, Pagination, Cascader, DatePicker, Space, Checkbox, Spin, message } from 'antd';
39
39
  import { useAppSelector, useAppDispatch } from "./model/hooks";
40
- import { fetchQueryGroupCustomTemplate, fetchQueryWorkOrder, fetchQueryCurrentCompanyUser, fetchQueryPaymentWorkOrderList, fetchDeleteWorkOrder } from "./model/workOrder";
40
+ import { fetchQueryGroupCustomTemplate, fetchQueryWorkOrder, fetchQueryCurrentCompanyUser, fetchQueryPaymentWorkOrderList } from "./model/workOrder";
41
41
  import CustomizeFormModal from "./components/CustomizeFormModal";
42
42
  import PayOrderModal from "./components/PayListOrderItem/ModifyModal";
43
43
  import express from "./common/utils/express";
@@ -45,6 +45,12 @@ import formatAddrData from "./common/utils/formatAddrData";
45
45
  import ListOrderItem from "./components/ListOrderItem";
46
46
  import PayListOrderItem from "./components/PayListOrderItem";
47
47
  import RecordModal from "./components/PayListOrderItem/RecordModal";
48
+ import DeleteCustomizeOrderModal from "./components/DeleteCustomizeOrderModal";
49
+ import DealWorkOrderModal from "./components/DealWorkOrderModal";
50
+ import ExamineModal from "./components/ExamineModal";
51
+ import UnExamineModal from "./components/UnExamineModal";
52
+ import DeletePaymentWorkOrderModal from "./components/DeletePaymentWorkOrderModal";
53
+ import FlagPayModal from "./components/FlagPayModal";
48
54
  import RecordLog from "./components/RecordLog";
49
55
  import TransferOrderModal from "./components/TransferOrderModal";
50
56
  import store from "./model/store";
@@ -66,6 +72,7 @@ export var PlatForm;
66
72
  PlatForm["FXG"] = "fxg";
67
73
  PlatForm["KS"] = "ks";
68
74
  PlatForm["PDD"] = "pdd";
75
+ PlatForm["JD"] = "jd";
69
76
  PlatForm["XIAOZHI"] = "xiaozhi";
70
77
  })(PlatForm || (PlatForm = {}));
71
78
 
@@ -118,6 +125,15 @@ var WorkOrder = function WorkOrder(props) {
118
125
  useEffect(function () {
119
126
  initHandle();
120
127
  }, []);
128
+ useLayoutEffect(function () {
129
+ var _document$getElementB;
130
+
131
+ var el = (_document$getElementB = document.getElementById('customize-work-order-component')) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.getBoundingClientRect();
132
+ dispatch({
133
+ type: 'global/setTop',
134
+ payload: el === null || el === void 0 ? void 0 : el.top
135
+ });
136
+ }, []);
121
137
 
122
138
  var initHandle = function initHandle() {
123
139
  dispatch(fetchQueryGroupCustomTemplate());
@@ -129,6 +145,7 @@ var WorkOrder = function WorkOrder(props) {
129
145
  return /*#__PURE__*/_jsx(Spin, {
130
146
  spinning: loading,
131
147
  children: /*#__PURE__*/_jsxs("div", {
148
+ id: "customize-work-order-component",
132
149
  className: "order_container ".concat(platform === PlatForm.FXG ? '' : 'order_container_padding_bottom'),
133
150
  children: [/*#__PURE__*/_jsx("header", {
134
151
  className: "order_header",
@@ -270,70 +287,18 @@ var OrderList = function OrderList(_ref) {
270
287
  recordLogRef.current.open(item);
271
288
  };
272
289
 
273
- var onDelete = /*#__PURE__*/function () {
274
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(item) {
275
- var _item$templateDetailD;
276
-
277
- return _regeneratorRuntime().wrap(function _callee$(_context) {
278
- while (1) {
279
- switch (_context.prev = _context.next) {
280
- case 0:
281
- _context.prev = 0;
282
- _context.next = 3;
283
- return dispatch(fetchDeleteWorkOrder({
284
- uniqueKey: item === null || item === void 0 ? void 0 : (_item$templateDetailD = item.templateDetailDto) === null || _item$templateDetailD === void 0 ? void 0 : _item$templateDetailD.uniqueKey,
285
- workOrderId: item === null || item === void 0 ? void 0 : item.id
286
- })).unwrap();
287
-
288
- case 3:
289
- _context.next = 5;
290
- return dispatch({
291
- type: 'workOrder/setState',
292
- payload: {
293
- customSearch: _objectSpread(_objectSpread({}, customSearch), {}, {
294
- pageNo: 1
295
- })
296
- }
297
- });
298
-
299
- case 5:
300
- _context.next = 7;
301
- return dispatch(fetchQueryWorkOrder());
302
-
303
- case 7:
304
- _context.next = 12;
305
- break;
306
-
307
- case 9:
308
- _context.prev = 9;
309
- _context.t0 = _context["catch"](0);
310
- console.log('e', _context.t0);
311
-
312
- case 12:
313
- case "end":
314
- return _context.stop();
315
- }
316
- }
317
- }, _callee, null, [[0, 9]]);
318
- }));
319
-
320
- return function onDelete(_x) {
321
- return _ref2.apply(this, arguments);
322
- };
323
- }();
324
-
325
290
  var onTransfer = function onTransfer(item) {
326
291
  transferRef.current.openModal(item);
327
292
  }; //转交客服
328
293
 
329
294
 
330
295
  var transCustomer = /*#__PURE__*/function () {
331
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record, currentCustomer) {
296
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, currentCustomer) {
332
297
  var id, jsonMap, _record$templateDetai, componentDtoList, uniqueKey, params, workOrderStatusKey;
333
298
 
334
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
299
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
335
300
  while (1) {
336
- switch (_context2.prev = _context2.next) {
301
+ switch (_context.prev = _context.next) {
337
302
  case 0:
338
303
  id = record.id, jsonMap = record.jsonMap, _record$templateDetai = record.templateDetailDto, componentDtoList = _record$templateDetai.componentDtoList, uniqueKey = _record$templateDetai.uniqueKey;
339
304
  params = {};
@@ -363,14 +328,14 @@ var OrderList = function OrderList(_ref) {
363
328
 
364
329
  case 6:
365
330
  case "end":
366
- return _context2.stop();
331
+ return _context.stop();
367
332
  }
368
333
  }
369
- }, _callee2);
334
+ }, _callee);
370
335
  }));
371
336
 
372
- return function transCustomer(_x2, _x3) {
373
- return _ref3.apply(this, arguments);
337
+ return function transCustomer(_x, _x2) {
338
+ return _ref2.apply(this, arguments);
374
339
  };
375
340
  }();
376
341
 
@@ -464,15 +429,14 @@ var OrderList = function OrderList(_ref) {
464
429
  })
465
430
  })]
466
431
  }), /*#__PURE__*/_jsx("main", {
467
- className: "custom_box_main ".concat(platform === PlatForm.FXG ? 'custom_box_main_feige' : 'custom_box_main_other'),
432
+ className: "custom_box_main custom_box_main_".concat(platform),
468
433
  children: orderList.length ? orderList.map(function (item) {
469
434
  return /*#__PURE__*/_jsx(ListOrderItem, {
470
435
  item: item,
471
436
  onEdit: onEdit,
472
437
  onLog: onLog,
473
438
  onRefresh: onSearch,
474
- onTransfer: onTransfer,
475
- onDelete: onDelete
439
+ onTransfer: onTransfer
476
440
  }, item.id);
477
441
  }) : /*#__PURE__*/_jsx("div", {
478
442
  className: "custom_box_main_empty",
@@ -508,8 +472,8 @@ var OrderList = function OrderList(_ref) {
508
472
  ref: customizeFormRef,
509
473
  shopList: shopList,
510
474
  width: platform === PlatForm.XIAOZHI ? '100%' : '90%',
511
- onSuccess: function onSuccess(_ref4) {
512
- var type = _ref4.type;
475
+ onSuccess: function onSuccess(_ref3) {
476
+ var type = _ref3.type;
513
477
  onSearch();
514
478
 
515
479
  if (type === 'ADD') {
@@ -523,15 +487,15 @@ var OrderList = function OrderList(_ref) {
523
487
  });
524
488
  }
525
489
  }
526
- })]
490
+ }), /*#__PURE__*/_jsx(DeleteCustomizeOrderModal, {}), /*#__PURE__*/_jsx(DealWorkOrderModal, {})]
527
491
  });
528
492
  };
529
493
 
530
494
  //打款工单列表
531
- var PayOrderList = function PayOrderList(_ref5) {
495
+ var PayOrderList = function PayOrderList(_ref4) {
532
496
  var _paySearch$time;
533
497
 
534
- var tabActive = _ref5.tabActive;
498
+ var tabActive = _ref4.tabActive;
535
499
  var dispatch = useAppDispatch();
536
500
  var payOrderList = useAppSelector(function (state) {
537
501
  return state.workOrder.payOrderList;
@@ -648,6 +612,7 @@ var PayOrderList = function PayOrderList(_ref5) {
648
612
  buyerNick: platformInfo.buyerNick,
649
613
  buyerOpenUid: platformInfo.buyerId,
650
614
  shopId: platformInfo.shopId,
615
+ tid: platformInfo.orderNo,
651
616
  shopName: (_shopList$find = shopList.find(function (item) {
652
617
  return item.shopId == platformInfo.shopId;
653
618
  })) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopName,
@@ -723,7 +688,7 @@ var PayOrderList = function PayOrderList(_ref5) {
723
688
  })
724
689
  })]
725
690
  }), /*#__PURE__*/_jsx("div", {
726
- className: "payment_box_main ".concat(platform === PlatForm.FXG ? 'payment_box_main_feige' : 'payment_box_main_other'),
691
+ className: "payment_box_main payment_box_main_".concat(platform),
727
692
  children: payOrderList.length ? payOrderList.map(function (item) {
728
693
  return /*#__PURE__*/_jsx(PayListOrderItem, {
729
694
  record: item,
@@ -764,9 +729,22 @@ var PayOrderList = function PayOrderList(_ref5) {
764
729
  width: platform === PlatForm.XIAOZHI ? '100%' : '90%'
765
730
  }), /*#__PURE__*/_jsx(PayOrderModal, {
766
731
  ref: payOrderRef,
767
- afterSuccessUpdateWorkOrder: onSearch,
732
+ afterSuccessUpdateWorkOrder: function afterSuccessUpdateWorkOrder(type) {
733
+ if (type === 'add') {
734
+ dispatch({
735
+ type: 'global/setState',
736
+ payload: {
737
+ platformInfo: _objectSpread(_objectSpread({}, platformInfo), {}, {
738
+ orderNo: ''
739
+ })
740
+ }
741
+ });
742
+ }
743
+
744
+ onSearch();
745
+ },
768
746
  width: platform === PlatForm.XIAOZHI ? '100%' : '90%'
769
- })]
747
+ }), /*#__PURE__*/_jsx(ExamineModal, {}), /*#__PURE__*/_jsx(UnExamineModal, {}), /*#__PURE__*/_jsx(DeletePaymentWorkOrderModal, {}), /*#__PURE__*/_jsx(FlagPayModal, {})]
770
748
  });
771
749
  };
772
750
 
@@ -138,16 +138,17 @@
138
138
  }
139
139
 
140
140
  .custom_box_main {
141
+ height: calc(100vh - 338px);
141
142
  overflow: auto;
142
143
  background-color: #fafafa;
143
144
  }
144
145
 
145
- .custom_box_main_other {
146
- height: calc(100vh - 338px);
146
+ .custom_box_main_fxg {
147
+ height: calc(100vh - 446px);
147
148
  }
148
149
 
149
- .custom_box_main_feige {
150
- height: calc(100vh - 446px);
150
+ .custom_box_main_ks {
151
+ height: calc(100vh - 482px); // TODO: ks顶部多144px
151
152
  }
152
153
 
153
154
  .custom_box_main_empty {
@@ -161,16 +162,17 @@
161
162
  }
162
163
 
163
164
  .payment_box_main {
165
+ height: calc(100vh - 236px);
164
166
  overflow: auto;
165
167
  background-color: #fafafa;
166
168
  }
167
169
 
168
- .payment_box_main_feige {
170
+ .payment_box_main_fxg {
169
171
  height: calc(100vh - 340px);
170
172
  }
171
173
 
172
- .payment_box_main_other {
173
- height: calc(100vh - 236px);
174
+ .payment_box_main_ks {
175
+ height: calc(100vh - 380px);
174
176
  }
175
177
 
176
178
  .custom_box_page {
@@ -1,12 +1,19 @@
1
+ import { RootState } from '../app/store';
1
2
  export interface GlobalState {
2
3
  platformInfo: any;
4
+ top: number;
3
5
  }
4
6
  export declare const globalSlice: import("@reduxjs/toolkit").Slice<GlobalState, {
5
7
  setState: (state: import("immer/dist/internal").WritableDraft<GlobalState>, action: {
6
8
  payload: any;
7
9
  type: string;
8
10
  }) => any;
11
+ setTop: (state: import("immer/dist/internal").WritableDraft<GlobalState>, action: {
12
+ payload: any;
13
+ type: string;
14
+ }) => void;
9
15
  }, "global">;
10
16
  export declare const setState: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
17
+ export declare const selectTop: (state: RootState) => number;
11
18
  declare const _default: import("redux").Reducer<GlobalState, import("redux").AnyAction>;
12
19
  export default _default;
@@ -8,12 +8,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8
8
  * @Description:
9
9
  * @Author: litian
10
10
  * @Date: 2022-09-06 17:44:56
11
- * @LastEditors: litian
12
- * @LastEditTime: 2022-09-08 16:28:25
11
+ * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
12
+ * @LastEditTime: 2022-11-04 10:19:43
13
13
  */
14
14
  import { createSlice } from '@reduxjs/toolkit';
15
15
  var initialState = {
16
- platformInfo: {}
16
+ platformInfo: {},
17
+ top: 0
17
18
  };
18
19
  export var globalSlice = createSlice({
19
20
  name: 'global',
@@ -21,10 +22,16 @@ export var globalSlice = createSlice({
21
22
  reducers: {
22
23
  setState: function setState(state, action) {
23
24
  return _objectSpread(_objectSpread({}, state), action.payload);
25
+ },
26
+ setTop: function setTop(state, action) {
27
+ state.top = action.payload;
24
28
  }
25
29
  }
26
30
  }); // 每个 case reducer 函数会生成对应的 Action creators
27
31
 
28
32
  var setState = globalSlice.actions.setState;
29
33
  export { setState };
34
+ export var selectTop = function selectTop(state) {
35
+ return state.global.top;
36
+ };
30
37
  export default globalSlice.reducer;
@@ -36,3 +36,4 @@ export declare type LoginParams = {
36
36
  export declare const login: (data: LoginParams) => Promise<any>;
37
37
  export declare const queryShopList: () => Promise<any>;
38
38
  export declare const deleteWorkOrder: (data: any) => Promise<any>;
39
+ export declare const getThirdOpenUidByOrderNo: (data: any) => Promise<any>;
@@ -2,8 +2,8 @@
2
2
  * @Description:
3
3
  * @Author: litian
4
4
  * @Date: 2022-09-06 10:28:04
5
- * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
6
- * @LastEditTime: 2022-10-19 19:04:54
5
+ * @LastEditors: litian
6
+ * @LastEditTime: 2022-11-08 13:58:05
7
7
  */
8
8
  import request from "./request";
9
9
  //获取灰度白名
@@ -191,6 +191,7 @@ export var transferWorkOrder = function transferWorkOrder(data) {
191
191
  data: data
192
192
  });
193
193
  };
194
+ //获取灰度名单列表
194
195
  export var grayWhiteListApi = function grayWhiteListApi(data) {
195
196
  return request({
196
197
  url: '/qy/grayWhiteList/names',
@@ -198,13 +199,15 @@ export var grayWhiteListApi = function grayWhiteListApi(data) {
198
199
  data: data
199
200
  });
200
201
  };
202
+ //登陆
201
203
  export var login = function login(data) {
202
204
  return request({
203
205
  url: '/qy/gdfw/company/login',
204
206
  method: 'post',
205
207
  data: data
206
208
  });
207
- };
209
+ }; //获取店铺列表
210
+
208
211
  export var queryShopList = function queryShopList() {
209
212
  return request({
210
213
  url: '/qy/gdfw/company/queryShop',
@@ -218,4 +221,12 @@ export var deleteWorkOrder = function deleteWorkOrder(data) {
218
221
  method: 'post',
219
222
  data: data
220
223
  });
224
+ }; // 通过订单号获取三方用户openUid - 目前只用于淘宝
225
+
226
+ export var getThirdOpenUidByOrderNo = function getThirdOpenUidByOrderNo(data) {
227
+ return request({
228
+ url: '/shop/getThirdOpenUidByOrderNo',
229
+ method: 'post',
230
+ data: data
231
+ });
221
232
  };
@@ -1,18 +1,13 @@
1
- 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; }
2
-
3
- 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; }
4
-
5
- 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; }
6
-
7
1
  /*
8
2
  * @Description:
9
3
  * @Author: litian
10
4
  * @Date: 2022-09-06 09:29:34
11
5
  * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
12
- * @LastEditTime: 2022-10-25 14:36:13
6
+ * @LastEditTime: 2022-11-04 16:58:58
13
7
  */
14
8
  import { extend } from 'umi-request';
15
9
  import { message } from 'antd';
10
+ var request = extend({});
16
11
 
17
12
  var requestApi = function requestApi(_ref) {
18
13
  var url = _ref.url,
@@ -20,24 +15,13 @@ var requestApi = function requestApi(_ref) {
20
15
  data = _ref.data,
21
16
  _ref$headers = _ref.headers,
22
17
  headers = _ref$headers === void 0 ? {} : _ref$headers;
23
- var request = extend({});
24
18
  return new Promise(function (resolve, reject) {
25
- var _localStorage$getItem;
26
-
27
19
  var params = {
28
20
  method: method,
29
- headers: _objectSpread({
30
- 'Content-type': 'application/json;charset=UTF-8'
31
- }, headers)
32
- }; // const host = localStorage.getItem('kmkf_kmgd_host') || '';
33
-
34
- var cookies = localStorage.getItem('kmkf_kmgd_cookie') ? (_localStorage$getItem = localStorage.getItem('kmkf_kmgd_cookie')) === null || _localStorage$getItem === void 0 ? void 0 : _localStorage$getItem.split(':') : [];
35
-
36
- if (cookies) {
37
- params.headers = _objectSpread(_objectSpread({}, params.headers), {}, _defineProperty({}, cookies[0], cookies[1]));
38
- }
21
+ headers: headers
22
+ };
39
23
 
40
- if (method === 'get') {
24
+ if (method.toLocaleLowerCase() === 'get') {
41
25
  params.params = data;
42
26
  } else {
43
27
  params.data = data;
@@ -47,12 +31,11 @@ var requestApi = function requestApi(_ref) {
47
31
  if (res.result === 100 || res.success) {
48
32
  resolve(res);
49
33
  } else {
50
- message.destroy();
51
- var msg = "".concat(url, "\u5931\u8D25\uFF1B").concat((res === null || res === void 0 ? void 0 : res.message) || '');
52
- message.error(msg);
53
- reject();
34
+ message.error(res.message);
35
+ reject(res);
54
36
  }
55
37
  }).catch(function (e) {
38
+ message.error(e.message);
56
39
  reject(e);
57
40
  });
58
41
  });