@kmkf-fe-packages/kmkf-work-order-service-component 1.8.0 → 1.8.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/esm/FlowTemplateDetail/components/FormRender/index.js +45 -8
- package/dist/esm/FlowTemplateDetail/index.js +1 -1
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/DeletePaymentWorkOrderModal/index.js +41 -16
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js +7 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/model/servers/api.d.ts +1 -0
- package/dist/esm/model/servers/api.js +9 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -63,4 +63,5 @@ const Text = ()=>{
|
|
|
63
63
|
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
| 字段 | 说明 | 数据类型 | | ----------------- | ---------------- | ------------------------------------ | | platform | 平台 | TAOBAO =淘宝\|FXG=抖音\|PDD=拼多多\| | | shopId | 店铺 ID | number | | buyerNick | 买家昵称 | string | | buyerId | 买家 id | string | | orderNo | 订单 id | string | | onEmpowerCallback | 授权弹框点击回调 | function |
|
|
66
|
+
| 字段 | 说明 | 数据类型 | | ----------------- | ---------------- | ------------------------------------ | | platform | 平台 | TAOBAO =淘宝\|FXG=抖音\|PDD=拼多多\| | | shopId | 店铺 ID | number | | buyerNick | 买家昵称 | string | | buyerId | 买家 id | string | | orderNo | 订单 id | string | | onEmpowerCallback | 授权弹框点击回调 | function |
|
|
67
|
+
|
|
@@ -28,7 +28,7 @@ import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle, grou
|
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
29
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
|
|
30
30
|
// 重复检验不需要展示在顶部的
|
|
31
|
-
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo } from "../../../common/utils/tools";
|
|
31
|
+
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, COMPONENT_MAP } from "../../../common/utils/tools";
|
|
32
32
|
import { replaceCheck, orderDetail, queryLabelByTradeId } from "../../../model/servers/api";
|
|
33
33
|
import { factory } from '@kmkf-fe-packages/services-components';
|
|
34
34
|
import { getExpression, formatDisplayConfig, isNull, LabelData } from '@kmkf-fe-packages/kmkf-utils';
|
|
@@ -194,7 +194,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
194
194
|
var obj = {};
|
|
195
195
|
Object.keys(params).forEach(function (key) {
|
|
196
196
|
var _params$key;
|
|
197
|
-
if (params[key] && ((_params$key = params[key]) === null || _params$key === void 0 ? void 0 : _params$key.indexOf('*')) > -1) {
|
|
197
|
+
if (params[key] && typeof params[key] === 'string' && ((_params$key = params[key]) === null || _params$key === void 0 ? void 0 : _params$key.indexOf('*')) > -1) {
|
|
198
198
|
obj[key] = 0;
|
|
199
199
|
}
|
|
200
200
|
});
|
|
@@ -460,8 +460,45 @@ var FormRender = function FormRender(props, ref) {
|
|
|
460
460
|
(antFormEl === null || antFormEl === void 0 ? void 0 : antFormEl.length) > 0 && set(antFormEl, '0.scrollTop', 0);
|
|
461
461
|
resetMappdingHideComponents();
|
|
462
462
|
};
|
|
463
|
+
var repeatWarningDataSchema = function repeatWarningDataSchema(formValue, templateDetail) {
|
|
464
|
+
var getKeyByValue = function getKeyByValue(value) {
|
|
465
|
+
return Object.keys(COMPONENT_MAP).find(function (key) {
|
|
466
|
+
return COMPONENT_MAP[key] === value;
|
|
467
|
+
});
|
|
468
|
+
};
|
|
469
|
+
var needRepeatWarnComponent = Object.values(COMPONENT_MAP);
|
|
470
|
+
return templateDetail.componentDtoList.reduce(function (cur, nxt) {
|
|
471
|
+
if (needRepeatWarnComponent !== null && needRepeatWarnComponent !== void 0 && needRepeatWarnComponent.includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
472
|
+
var instance = factory(nxt.workOrderComponentType, {
|
|
473
|
+
id: nxt.uniqueKey,
|
|
474
|
+
name: nxt.name,
|
|
475
|
+
componentConfig: nxt.componentConfig,
|
|
476
|
+
effects: {},
|
|
477
|
+
type: nxt.workOrderComponentType
|
|
478
|
+
});
|
|
479
|
+
var _id = instance === null || instance === void 0 ? void 0 : instance.id;
|
|
480
|
+
var value = formValue[_id];
|
|
481
|
+
var _key = getKeyByValue(nxt.workOrderComponentType);
|
|
482
|
+
// TODO: 如果是订单号组件, 将值设置为orderNo
|
|
483
|
+
if (nxt.workOrderComponentType === 'TRADE_ID_INPUT') {
|
|
484
|
+
_key = 'orderNo';
|
|
485
|
+
}
|
|
486
|
+
if (_key) {
|
|
487
|
+
cur[_key] = value;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return cur;
|
|
491
|
+
}, {});
|
|
492
|
+
};
|
|
463
493
|
useEffect(function () {
|
|
464
|
-
if (isErpUse)
|
|
494
|
+
if (isErpUse && templateDetail) {
|
|
495
|
+
var formValue = form.getFieldsValue(true);
|
|
496
|
+
console.debug('表单内容值', formValue);
|
|
497
|
+
// TODO: 拼装需要重复提醒的组件数据格式
|
|
498
|
+
var value = repeatWarningDataSchema(formValue, templateDetail);
|
|
499
|
+
console.debug('重复提醒转换之后数据', value);
|
|
500
|
+
return orderBackReplace(value, templateDetail);
|
|
501
|
+
}
|
|
465
502
|
queryDetail({
|
|
466
503
|
workOrderId: workOrderId,
|
|
467
504
|
shopId: shopId,
|
|
@@ -471,7 +508,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
471
508
|
buyerId: buyerId,
|
|
472
509
|
buyerNick: buyerNick
|
|
473
510
|
});
|
|
474
|
-
}, [workOrderId, record, shopId, isErpUse]);
|
|
511
|
+
}, [workOrderId, record, shopId, isErpUse, templateDetail]);
|
|
475
512
|
|
|
476
513
|
// 重置映射隐藏的组件, 目前只有单选、下拉组件可能会因为映射关系隐藏
|
|
477
514
|
var resetMappdingHideComponents = function resetMappdingHideComponents() {
|
|
@@ -502,8 +539,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
502
539
|
|
|
503
540
|
// 批量映射
|
|
504
541
|
var batchFillByMapping = function batchFillByMapping(values) {
|
|
505
|
-
for (var
|
|
506
|
-
fillByMapping(
|
|
542
|
+
for (var _key2 in values) {
|
|
543
|
+
fillByMapping(_key2, values[_key2]);
|
|
507
544
|
}
|
|
508
545
|
};
|
|
509
546
|
// 组件映射
|
|
@@ -516,8 +553,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
516
553
|
form.setFieldsValue(mapping === null || mapping === void 0 ? void 0 : mapping[triggerValue]);
|
|
517
554
|
} else {
|
|
518
555
|
var resetSet = new Set();
|
|
519
|
-
for (var
|
|
520
|
-
for (var uniqueKey in mapping[
|
|
556
|
+
for (var _key3 in mapping) {
|
|
557
|
+
for (var uniqueKey in mapping[_key3]) {
|
|
521
558
|
resetSet.add(uniqueKey);
|
|
522
559
|
}
|
|
523
560
|
}
|
|
@@ -45,8 +45,8 @@ import SubmitRemindModal from "./components/SubmitRemindModal";
|
|
|
45
45
|
import { useSignal } from "../hooks/useSignal";
|
|
46
46
|
import { verifyHandle, submitParams, FLOW_STATUS_V2, getTag, currentUserHasOperatorAuth, CANNOT_BACK_FILL } from "./common";
|
|
47
47
|
import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder, withDrawWorkOrder, reminder, cancelReminder } from "../model/flowTemplateDetail/api";
|
|
48
|
-
import { COMPONENT_MAP } from "../common/utils/tools";
|
|
49
48
|
import RenderDetail from "./components/RenderDetail";
|
|
49
|
+
import { COMPONENT_MAP } from "../common/utils/tools";
|
|
50
50
|
import { orderDetail } from "../model/servers/api";
|
|
51
51
|
import cache from "../common/cache";
|
|
52
52
|
import "./index.less";
|
|
@@ -2,6 +2,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
11
|
/*
|
|
6
12
|
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7
13
|
* @Date: 2022-11-03 16:01:49
|
|
@@ -12,36 +18,43 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
12
18
|
*
|
|
13
19
|
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
14
20
|
*/
|
|
15
|
-
import React, { useCallback } from 'react';
|
|
16
|
-
import { Modal, message } from 'antd';
|
|
21
|
+
import React, { useEffect, useCallback, useState } from 'react';
|
|
22
|
+
import { Modal, message, Input } from 'antd';
|
|
17
23
|
import { useDispatch, useSelector } from 'react-redux';
|
|
18
24
|
import { debounce } from 'lodash';
|
|
19
25
|
import { setCurrentPaymentRecord, setDeletePaymentWorkOrderVisible } from "../../../../../model/paymentWorkOrder";
|
|
20
26
|
import { selectDeletePaymentWorkOrderVisible, selectCurrentPaymentRecord } from "../../../../../model/paymentWorkOrder/selector";
|
|
21
|
-
import {
|
|
27
|
+
import { voidPaymentOrder } from "../../../../../model/servers/api";
|
|
22
28
|
var DeletePaymentWorkOrderModal = function DeletePaymentWorkOrderModal(props) {
|
|
23
29
|
var onSuccess = props.onSuccess;
|
|
24
30
|
var dispatch = useDispatch();
|
|
31
|
+
var _useState = useState(''),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
value = _useState2[0],
|
|
34
|
+
setValue = _useState2[1];
|
|
25
35
|
var visible = useSelector(selectDeletePaymentWorkOrderVisible);
|
|
26
36
|
var record = useSelector(selectCurrentPaymentRecord);
|
|
37
|
+
useEffect(function () {
|
|
38
|
+
setValue('');
|
|
39
|
+
}, [visible]);
|
|
27
40
|
var handleCancel = function handleCancel() {
|
|
28
41
|
dispatch(setCurrentPaymentRecord({}));
|
|
29
42
|
dispatch(setDeletePaymentWorkOrderVisible(false));
|
|
30
43
|
};
|
|
31
|
-
var
|
|
44
|
+
var fetchVoidPaymentOrder = /*#__PURE__*/function () {
|
|
32
45
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
33
|
-
var _yield$
|
|
46
|
+
var _yield$voidPaymentOrd, success;
|
|
34
47
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
35
48
|
while (1) switch (_context.prev = _context.next) {
|
|
36
49
|
case 0:
|
|
37
50
|
_context.prev = 0;
|
|
38
51
|
_context.next = 3;
|
|
39
|
-
return
|
|
52
|
+
return voidPaymentOrder(params);
|
|
40
53
|
case 3:
|
|
41
|
-
_yield$
|
|
42
|
-
success = _yield$
|
|
54
|
+
_yield$voidPaymentOrd = _context.sent;
|
|
55
|
+
success = _yield$voidPaymentOrd.success;
|
|
43
56
|
if (success) {
|
|
44
|
-
message.success('
|
|
57
|
+
message.success('作废成功');
|
|
45
58
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
46
59
|
handleCancel();
|
|
47
60
|
}
|
|
@@ -57,24 +70,36 @@ var DeletePaymentWorkOrderModal = function DeletePaymentWorkOrderModal(props) {
|
|
|
57
70
|
}
|
|
58
71
|
}, _callee, null, [[0, 8]]);
|
|
59
72
|
}));
|
|
60
|
-
return function
|
|
73
|
+
return function fetchVoidPaymentOrder(_x2) {
|
|
61
74
|
return _ref.apply(this, arguments);
|
|
62
75
|
};
|
|
63
76
|
}();
|
|
64
77
|
var handleOk = useCallback(function () {
|
|
65
|
-
|
|
66
|
-
ids: [record.id]
|
|
78
|
+
fetchVoidPaymentOrder({
|
|
79
|
+
ids: [record.id],
|
|
80
|
+
voidReason: value
|
|
67
81
|
});
|
|
68
82
|
}, [record]);
|
|
69
83
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
70
|
-
title: "\
|
|
84
|
+
title: "\u4F5C\u5E9F",
|
|
71
85
|
open: visible,
|
|
72
86
|
okText: "\u786E\u5B9A",
|
|
73
87
|
cancelText: "\u53D6\u6D88",
|
|
74
88
|
onOk: debounce(handleOk, 300),
|
|
75
89
|
onCancel: handleCancel
|
|
76
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("
|
|
77
|
-
|
|
78
|
-
|
|
90
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
91
|
+
style: {
|
|
92
|
+
color: 'red'
|
|
93
|
+
}
|
|
94
|
+
}, "\u6253\u6B3E\u5DE5\u5355\u5C06\u79FB\u9664\u5230\u6253\u6B3E\u5DE5\u5355\u56DE\u6536\u7AD9\uFF0C\u65E0\u6CD5\u6062\u590D\uFF01"), /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
95
|
+
rows: 4,
|
|
96
|
+
maxLength: 200,
|
|
97
|
+
showCount: true,
|
|
98
|
+
placeholder: "\u8BF7\u8F93\u5165\u4F5C\u5E9F\u539F\u56E0",
|
|
99
|
+
value: value,
|
|
100
|
+
onChange: function onChange(e) {
|
|
101
|
+
return setValue(e.target.value);
|
|
102
|
+
}
|
|
103
|
+
})));
|
|
79
104
|
};
|
|
80
105
|
export default DeletePaymentWorkOrderModal;
|
package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js
CHANGED
|
@@ -22,18 +22,18 @@ import QnOpenWangWang from "../QnOpenWangWang";
|
|
|
22
22
|
import "./index.less";
|
|
23
23
|
var workPayStatusFuncMap = {
|
|
24
24
|
WAITING_EXAMINE: ['examine', 'edit', 'deleteHandle', 'recordHandle'],
|
|
25
|
-
EXAMINED: ['waitingExamine', 'pay', 'recordHandle'],
|
|
25
|
+
EXAMINED: ['waitingExamine', 'pay', 'deleteHandle', 'recordHandle'],
|
|
26
26
|
FLAG_PAID: ['recordHandle'],
|
|
27
27
|
ALI_PAY_WAITING: ['recordHandle'],
|
|
28
28
|
ALI_PAY_SUCCESS: ['recordHandle', 'voucher'],
|
|
29
|
-
ALI_PAY_FAIL: ['recordHandle'],
|
|
29
|
+
ALI_PAY_FAIL: ['deleteHandle', 'recordHandle'],
|
|
30
30
|
ALI_PAY_CLOSE: ['recordHandle'],
|
|
31
31
|
ALI_PAY_EXPIRED: ['recordHandle']
|
|
32
32
|
};
|
|
33
33
|
var payStatusMap = {
|
|
34
34
|
examine: '审核',
|
|
35
35
|
edit: '修改',
|
|
36
|
-
deleteHandle: '
|
|
36
|
+
deleteHandle: '作废',
|
|
37
37
|
recordHandle: '记录',
|
|
38
38
|
waitingExamine: '取消审核',
|
|
39
39
|
pay: '打款',
|
|
@@ -70,6 +70,10 @@ var PAY_STATUS = [{
|
|
|
70
70
|
value: 'ALI_PAY_CLOSE',
|
|
71
71
|
label: '打款关闭',
|
|
72
72
|
color: 'rgba(156,156,156)'
|
|
73
|
+
}, {
|
|
74
|
+
value: 'VOID',
|
|
75
|
+
label: '已作废',
|
|
76
|
+
color: 'rgba(156,156,156)'
|
|
73
77
|
}];
|
|
74
78
|
var PAY_STATUS_ICON = {
|
|
75
79
|
WAITING_EXAMINE: '#FF4050',
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { default as FormRender } from './FormRender';
|
|
|
5
5
|
export { default as FormRenderTemplateId } from './FormRenderTemplateId';
|
|
6
6
|
export { default as FlowWorkOrderDetail } from './FlowTemplateDetail';
|
|
7
7
|
export { default as TradeList } from './TradeList';
|
|
8
|
-
export { default as WdtTradeList } from './WdtTradeList';
|
|
9
8
|
export { default as FlowFormRender } from './FlowTemplateDetail/components/FormRender';
|
|
9
|
+
export { default as WdtTradeList } from './WdtTradeList';
|
|
10
10
|
export * as utils from './common/utils/tools';
|
|
11
11
|
export * as arithmetic from './common/utils/arithmetic';
|
|
12
12
|
export * from './WorkOrder/types';
|
package/dist/esm/index.js
CHANGED
|
@@ -15,8 +15,8 @@ export { default as FormRender } from "./FormRender";
|
|
|
15
15
|
export { default as FormRenderTemplateId } from "./FormRenderTemplateId";
|
|
16
16
|
export { default as FlowWorkOrderDetail } from "./FlowTemplateDetail";
|
|
17
17
|
export { default as TradeList } from "./TradeList";
|
|
18
|
-
export { default as WdtTradeList } from "./WdtTradeList";
|
|
19
18
|
export { default as FlowFormRender } from "./FlowTemplateDetail/components/FormRender";
|
|
19
|
+
export { default as WdtTradeList } from "./WdtTradeList";
|
|
20
20
|
import * as _utils from "./common/utils/tools";
|
|
21
21
|
export { _utils as utils };
|
|
22
22
|
import * as _arithmetic from "./common/utils/arithmetic";
|
|
@@ -22,6 +22,7 @@ export declare const decodeAlipayInfo: (data: any) => Promise<any>;
|
|
|
22
22
|
export declare const queryPaymentWorkOrderList: (data: any) => Promise<any>;
|
|
23
23
|
export declare const examinePaymentOrder: (data: any) => Promise<any>;
|
|
24
24
|
export declare const deletePaymentOrder: (data: any) => Promise<any>;
|
|
25
|
+
export declare const voidPaymentOrder: (data: any) => Promise<any>;
|
|
25
26
|
export declare const paymentOrder: (data: any) => Promise<any>;
|
|
26
27
|
export declare const reportLogs: (data: any) => Promise<any>;
|
|
27
28
|
export declare const editRemitOrder: (data: any) => Promise<any>;
|
|
@@ -150,6 +150,15 @@ export var deletePaymentOrder = function deletePaymentOrder(data) {
|
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
+
//作废打款
|
|
154
|
+
export var voidPaymentOrder = function voidPaymentOrder(data) {
|
|
155
|
+
return request({
|
|
156
|
+
url: '/qy/payment/paymentOrder/voidOpt',
|
|
157
|
+
method: 'post',
|
|
158
|
+
data: data
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
|
|
153
162
|
//
|
|
154
163
|
export var paymentOrder = function paymentOrder(data) {
|
|
155
164
|
return request({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "1.8.0",
|
|
3
|
+
"version": "1.8.1-beta.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "1.8.0",
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "1.8.0",
|
|
37
|
-
"@kmkf-fe-packages/services-components": "1.8.0",
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "1.8.1-beta.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "1.8.1-beta.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "1.8.1-beta.0",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "7cab2017babab9a6e23fdd3e6f9fa238de78bddb",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|