kmkf-work-order-service-component 0.1.12-alpha.1 → 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.
- package/dist/esm/WorkOrder/common/utils/tools.d.ts +1 -1
- package/dist/esm/WorkOrder/common/utils/tools.js +92 -27
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.js +3 -0
- package/dist/esm/WorkOrder/components/PayListOrderItem/ModifyModal.js +10 -2
- package/dist/esm/WorkOrder/components/PayListOrderItem/RecordModal.js +4 -2
- package/dist/esm/WorkOrder/components/RecordLog/index.js +3 -1
- package/dist/esm/WorkOrder/components/Widget/electricity/ETradeId/index.d.ts +0 -4
- package/dist/esm/WorkOrder/components/Widget/electricity/ETradeId/index.js +7 -24
- package/dist/esm/WorkOrder/components/Widget/third/Payment/index.d.ts +2 -4
- package/dist/esm/WorkOrder/components/Widget/third/Payment/index.js +60 -18
- package/dist/esm/WorkOrder/index.d.ts +1 -0
- package/dist/esm/WorkOrder/index.js +18 -3
- package/dist/esm/WorkOrder/model/servers/api.d.ts +1 -0
- package/dist/esm/WorkOrder/model/servers/api.js +14 -3
- package/package.json +3 -2
@@ -60,5 +60,5 @@ export interface WorkOrderDetail {
|
|
60
60
|
}
|
61
61
|
export declare const formatPictures: (pictures: any) => any;
|
62
62
|
export declare const calcWorkOrderList: (source: Partial<WorkOrderDetail>[], templateColumns: TemplateColumnConfig[], type?: string) => any[];
|
63
|
-
export declare const orderBack: ({ order_no, form, shopId, shopList, templateDetail }: any) => Promise<void>;
|
63
|
+
export declare const orderBack: ({ order_no, form, shopId, shopList, templateDetail, type, }: any) => Promise<void>;
|
64
64
|
export declare const imgResize: (url: string, w?: number, h?: number) => string;
|
@@ -1,5 +1,17 @@
|
|
1
1
|
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; }
|
2
2
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
|
+
|
5
|
+
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."); }
|
6
|
+
|
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
|
+
|
9
|
+
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; }
|
10
|
+
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
12
|
+
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
14
|
+
|
3
15
|
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
16
|
|
5
17
|
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); }); }; }
|
@@ -14,7 +26,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
14
26
|
|
15
27
|
import { get, isEmpty, find, keys, every } from 'lodash';
|
16
28
|
import V from 'voca';
|
17
|
-
import { orderDetail } from "../../model/servers/api";
|
29
|
+
import { orderDetail, getThirdOpenUidByOrderNo } from "../../model/servers/api";
|
18
30
|
import moment from 'moment';
|
19
31
|
import express from "./express";
|
20
32
|
import cache from "../cache";
|
@@ -619,39 +631,47 @@ export var orderBack = /*#__PURE__*/function () {
|
|
619
631
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
620
632
|
var _shopList$find;
|
621
633
|
|
622
|
-
var order_no, form, shopId, shopList, templateDetail, shopSourceStr, _yield$
|
634
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, shopSourceStr, _shopList$find2, _data$value, _buyer$value, taobaoId, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, buyer, orderInfo, buyerInfo, _ref3, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, itemList, transField, finalResponse, formValue, detail, componentsParams, detailsValue, _templateDetail$compo, paymentUniqueKey;
|
623
635
|
|
624
636
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
625
637
|
while (1) {
|
626
638
|
switch (_context.prev = _context.next) {
|
627
639
|
case 0:
|
628
|
-
order_no = _ref.order_no, form = _ref.form, shopId = _ref.shopId, shopList = _ref.shopList, templateDetail = _ref.templateDetail;
|
629
|
-
console.log(order_no, form, shopId, shopList, templateDetail);
|
640
|
+
order_no = _ref.order_no, form = _ref.form, shopId = _ref.shopId, shopList = _ref.shopList, templateDetail = _ref.templateDetail, _ref$type = _ref.type, type = _ref$type === void 0 ? 'add' : _ref$type;
|
630
641
|
shopSourceStr = (_shopList$find = shopList.find(function (item) {
|
631
642
|
return item.shopId == shopId;
|
632
643
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopSourceStr;
|
633
|
-
_context.
|
634
|
-
|
644
|
+
_context.prev = 2;
|
645
|
+
taobaoId = (_shopList$find2 = shopList.find(function (item) {
|
646
|
+
return item.shopSourceStr === 'TAOBAO' && item.shopId == shopId;
|
647
|
+
})) === null || _shopList$find2 === void 0 ? void 0 : _shopList$find2.taobaoId;
|
648
|
+
promise = [orderDetail({
|
635
649
|
shopId: shopId,
|
636
650
|
//店铺id
|
637
651
|
orderNo: order_no //订单id
|
638
652
|
|
639
|
-
});
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
653
|
+
})];
|
654
|
+
taobaoId ? promise.push(getThirdOpenUidByOrderNo({
|
655
|
+
orderNo: order_no,
|
656
|
+
toAppKey: '21819818',
|
657
|
+
platform: 'tb',
|
658
|
+
taobaoId: taobaoId
|
659
|
+
})) : promise.push(new Promise(function (resolve) {
|
660
|
+
resolve({});
|
661
|
+
}));
|
662
|
+
_context.next = 8;
|
663
|
+
return Promise.allSettled(promise);
|
664
|
+
|
665
|
+
case 8:
|
666
|
+
_yield$Promise$allSet = _context.sent;
|
667
|
+
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 2);
|
668
|
+
data = _yield$Promise$allSet2[0];
|
669
|
+
buyer = _yield$Promise$allSet2[1];
|
670
|
+
// console.log(data, buyer);
|
671
|
+
orderInfo = data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data;
|
672
|
+
buyerInfo = buyer === null || buyer === void 0 ? void 0 : (_buyer$value = buyer.value) === null || _buyer$value === void 0 ? void 0 : _buyer$value.data;
|
673
|
+
_ref3 = orderInfo || {}, orderNo = _ref3.orderNo, provinceCode = _ref3.provinceCode, cityCode = _ref3.cityCode, townCode = _ref3.townCode, orderCreateDateTime = _ref3.orderCreateDateTime, orderPaymentDateTime = _ref3.orderPaymentDateTime, orderDeliveryDateTime = _ref3.orderDeliveryDateTime, orderClosingDateTime = _ref3.orderClosingDateTime, itemList = _ref3.itemList;
|
674
|
+
transField = orderInfo ? {
|
655
675
|
tradeId: orderNo,
|
656
676
|
province: provinceCode,
|
657
677
|
city: cityCode,
|
@@ -662,8 +682,20 @@ export var orderBack = /*#__PURE__*/function () {
|
|
662
682
|
tradeClosingDateTime: orderClosingDateTime,
|
663
683
|
goodId: itemList,
|
664
684
|
goodSerial: itemList
|
665
|
-
};
|
666
|
-
finalResponse =
|
685
|
+
} : {};
|
686
|
+
finalResponse = {};
|
687
|
+
|
688
|
+
if (orderInfo) {
|
689
|
+
finalResponse = _objectSpread(_objectSpread({}, orderInfo || {}), transField);
|
690
|
+
}
|
691
|
+
|
692
|
+
if (buyerInfo) {
|
693
|
+
finalResponse = _objectSpread(_objectSpread({}, finalResponse), {}, {
|
694
|
+
buyer: buyerInfo || {},
|
695
|
+
payBuyer: buyerInfo || {}
|
696
|
+
});
|
697
|
+
} //获取当前表单字段
|
698
|
+
|
667
699
|
|
668
700
|
formValue = form.getFieldsValue();
|
669
701
|
detail = finalResponse || {}; //抖音数据
|
@@ -675,6 +707,8 @@ export var orderBack = /*#__PURE__*/function () {
|
|
675
707
|
componentsParams = getComponentsValue((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []); //获取详情映射表单字段
|
676
708
|
|
677
709
|
detailsValue = Object.keys(componentsParams).reduce(function (prv, next) {
|
710
|
+
var _detail$buyer, _detail$buyer2;
|
711
|
+
|
678
712
|
var key = componentsParams[next].key;
|
679
713
|
var uniqueKey = componentsParams[next].uniqueKey;
|
680
714
|
|
@@ -721,6 +755,18 @@ export var orderBack = /*#__PURE__*/function () {
|
|
721
755
|
prv[uniqueKey] = detail['itemList'];
|
722
756
|
break;
|
723
757
|
|
758
|
+
case 'payBuyer':
|
759
|
+
if (type === 'edit') break;
|
760
|
+
prv[uniqueKey] = {
|
761
|
+
enterprisePaymentTid: '',
|
762
|
+
enterprisePaymentRefundFee: '',
|
763
|
+
enterprisePaymentBuyerNick: (_detail$buyer = detail['buyer']) === null || _detail$buyer === void 0 ? void 0 : _detail$buyer.buyerNick,
|
764
|
+
enterprisePaymentBuyerOpenUid: (_detail$buyer2 = detail['buyer']) === null || _detail$buyer2 === void 0 ? void 0 : _detail$buyer2.buyerOpenUid,
|
765
|
+
enterprisePaymentAlipayNick: '',
|
766
|
+
enterprisePaymentAlipayNo: ''
|
767
|
+
};
|
768
|
+
break;
|
769
|
+
|
724
770
|
default:
|
725
771
|
prv["".concat(uniqueKey)] = detail[key];
|
726
772
|
break;
|
@@ -728,16 +774,35 @@ export var orderBack = /*#__PURE__*/function () {
|
|
728
774
|
}
|
729
775
|
|
730
776
|
return prv;
|
731
|
-
}, {});
|
777
|
+
}, {}); //打款组件
|
778
|
+
|
779
|
+
if (type !== 'edit') {
|
780
|
+
paymentUniqueKey = templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$compo = templateDetail.componentDtoList.find(function (item) {
|
781
|
+
return item.workOrderComponentType === 'ENTERPRISE_PAYMENT';
|
782
|
+
})) === null || _templateDetail$compo === void 0 ? void 0 : _templateDetail$compo.uniqueKey;
|
783
|
+
|
784
|
+
if (paymentUniqueKey && orderInfo) {
|
785
|
+
detailsValue[paymentUniqueKey] = _objectSpread(_objectSpread(_objectSpread({}, formValue[paymentUniqueKey]), detailsValue[paymentUniqueKey]), {}, {
|
786
|
+
enterprisePaymentTid: order_no
|
787
|
+
});
|
788
|
+
}
|
789
|
+
}
|
732
790
|
|
791
|
+
console.log('detailsValue++', formValue, detailsValue);
|
733
792
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), detailsValue));
|
793
|
+
_context.next = 31;
|
794
|
+
break;
|
795
|
+
|
796
|
+
case 29:
|
797
|
+
_context.prev = 29;
|
798
|
+
_context.t0 = _context["catch"](2);
|
734
799
|
|
735
|
-
case
|
800
|
+
case 31:
|
736
801
|
case "end":
|
737
802
|
return _context.stop();
|
738
803
|
}
|
739
804
|
}
|
740
|
-
}, _callee);
|
805
|
+
}, _callee, null, [[2, 29]]);
|
741
806
|
}));
|
742
807
|
|
743
808
|
return function orderBack(_x) {
|
@@ -34,6 +34,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
34
34
|
|
35
35
|
import React, { useState, useImperativeHandle, forwardRef, useMemo, useCallback } from 'react';
|
36
36
|
import { Drawer, Form, Spin, ConfigProvider, Button, message, Space } from 'antd';
|
37
|
+
import { LeftOutlined } from '@ant-design/icons';
|
37
38
|
import { get, find, some, set } from 'lodash';
|
38
39
|
import zhCN from 'antd/es/locale/zh_CN';
|
39
40
|
import moment from 'moment';
|
@@ -350,6 +351,7 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
350
351
|
}
|
351
352
|
|
352
353
|
if (next.workOrderComponentType === 'ENTERPRISE_PAYMENT') {
|
354
|
+
prv["".concat(next.uniqueKey, "_enterprisePaymentTid")] = orderNo || '';
|
353
355
|
prv["".concat(next.uniqueKey, "_enterprisePaymentBuyerOpenUid")] = buyerId;
|
354
356
|
prv["".concat(next.uniqueKey, "_enterprisePaymentBuyerNick")] = buyerNick;
|
355
357
|
}
|
@@ -472,6 +474,7 @@ var CustomizeFormModal = function CustomizeFormModal(props, ref) {
|
|
472
474
|
};
|
473
475
|
|
474
476
|
return /*#__PURE__*/_jsx(Drawer, {
|
477
|
+
closeIcon: /*#__PURE__*/_jsx(LeftOutlined, {}),
|
475
478
|
title: (templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.name) || '工单录入',
|
476
479
|
width: width,
|
477
480
|
open: visible,
|
@@ -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(
|
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:
|
26
|
-
* @LastEditTime: 2022-11-
|
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() {
|
@@ -35,14 +35,15 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
35
|
import React from 'react';
|
36
36
|
import { useState, useImperativeHandle, forwardRef } from 'react';
|
37
37
|
import { Drawer } from 'antd';
|
38
|
+
import { LeftOutlined } from '@ant-design/icons';
|
38
39
|
import moment from 'moment';
|
39
40
|
import { get } from 'lodash';
|
40
41
|
import { factory } from "../Widget";
|
41
42
|
import { calcWorkOrderList, jsonParseSecurity } from "../../common/utils/tools";
|
42
43
|
import { reportLogs } from "../../model/servers/api";
|
43
44
|
import styles from "./index.module.less";
|
44
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
45
45
|
import { jsx as _jsx } from "react/jsx-runtime";
|
46
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
46
47
|
var custom_word = {
|
47
48
|
ADD: '添加',
|
48
49
|
UPDATE: '更新',
|
@@ -120,6 +121,7 @@ var RecordLog = function RecordLog(props, ref) {
|
|
120
121
|
|
121
122
|
return /*#__PURE__*/_jsx(Drawer, {
|
122
123
|
open: visible,
|
124
|
+
closeIcon: /*#__PURE__*/_jsx(LeftOutlined, {}),
|
123
125
|
width: props === null || props === void 0 ? void 0 : props.width,
|
124
126
|
title: "\u64CD\u4F5C\u8BB0\u5F55",
|
125
127
|
onClose: function onClose() {
|
@@ -8,10 +8,6 @@ declare class ETradeId extends Input {
|
|
8
8
|
componentConfig: any;
|
9
9
|
time: any;
|
10
10
|
constructor(options: any);
|
11
|
-
searchHandle(val: {
|
12
|
-
buyerNick: any;
|
13
|
-
buyerOpenUid: any;
|
14
|
-
}): void;
|
15
11
|
changeHandle(order_no: string): Promise<void>;
|
16
12
|
editRender: (value: any) => JSX.Element;
|
17
13
|
}
|
@@ -37,7 +37,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
37
37
|
* @Author: litian
|
38
38
|
* @Date: 2022-06-30 17:30:05
|
39
39
|
* @LastEditors: litian
|
40
|
-
* @LastEditTime: 2022-10
|
40
|
+
* @LastEditTime: 2022-11-10 10:08:12
|
41
41
|
*/
|
42
42
|
import React from 'react';
|
43
43
|
import Input from "../../basic/Input";
|
@@ -82,9 +82,6 @@ var ETradeId = /*#__PURE__*/function (_Input) {
|
|
82
82
|
required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
|
83
83
|
component: /*#__PURE__*/_jsx(TradeId, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
|
84
84
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
85
|
-
onSearch: function onSearch(val) {
|
86
|
-
return _this.searchHandle(val);
|
87
|
-
},
|
88
85
|
onChange: function onChange(e) {
|
89
86
|
return _this.changeHandle(e.target.value);
|
90
87
|
}
|
@@ -102,30 +99,15 @@ var ETradeId = /*#__PURE__*/function (_Input) {
|
|
102
99
|
});
|
103
100
|
_this.time = null;
|
104
101
|
return _this;
|
105
|
-
}
|
102
|
+
} //订单返填
|
106
103
|
|
107
|
-
_createClass(ETradeId, [{
|
108
|
-
key: "searchHandle",
|
109
|
-
value: function searchHandle(val) {
|
110
|
-
var form = this.effects.form;
|
111
|
-
var values = form.getFieldsValue();
|
112
|
-
Object.keys(values).forEach(function (k) {
|
113
|
-
if (Object.prototype.toString.call(values[k]) === '[object Object]') {
|
114
|
-
if (values[k].hasOwnProperty('buyerNick')) {
|
115
|
-
values[k] = _objectSpread(_objectSpread({}, values[k]), {}, {
|
116
|
-
buyerNick: val.buyerNick,
|
117
|
-
buyerOpenUid: val.buyerOpenUid
|
118
|
-
});
|
119
|
-
}
|
120
|
-
}
|
121
|
-
});
|
122
|
-
form.setFieldsValue(values);
|
123
|
-
} //订单返填
|
124
104
|
|
125
|
-
|
105
|
+
_createClass(ETradeId, [{
|
126
106
|
key: "changeHandle",
|
127
107
|
value: function () {
|
128
108
|
var _changeHandle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(order_no) {
|
109
|
+
var _this2 = this;
|
110
|
+
|
129
111
|
var _this$effects, form, shopId, shopList, templateDetail;
|
130
112
|
|
131
113
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -152,7 +134,8 @@ var ETradeId = /*#__PURE__*/function (_Input) {
|
|
152
134
|
form: form,
|
153
135
|
shopId: shopId,
|
154
136
|
shopList: shopList,
|
155
|
-
templateDetail: templateDetail
|
137
|
+
templateDetail: templateDetail,
|
138
|
+
type: _this2.effects.isEditing ? 'edit' : 'add'
|
156
139
|
});
|
157
140
|
}, 1000);
|
158
141
|
|
@@ -17,11 +17,9 @@ declare class Payment extends BasicComponent {
|
|
17
17
|
paymentTid: PaymentTid;
|
18
18
|
alipayNo: AlipayNo;
|
19
19
|
payTime: PayTime;
|
20
|
+
time: number | null | undefined;
|
20
21
|
constructor(options: any);
|
21
|
-
|
22
|
-
buyerNick: any;
|
23
|
-
buyerOpenUid: any;
|
24
|
-
}): void;
|
22
|
+
changeHandle(order_no: string): Promise<void>;
|
25
23
|
customRules: (config: {
|
26
24
|
required: any;
|
27
25
|
zhiFubaoRequired: any;
|
@@ -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(
|
132
|
-
return _this.
|
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: "
|
183
|
-
value: function
|
184
|
-
var
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
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
|
-
|
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
|
|
@@ -27,8 +27,8 @@ 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:
|
31
|
-
* @LastEditTime: 2022-11-
|
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
|
*
|
@@ -72,6 +72,7 @@ export var PlatForm;
|
|
72
72
|
PlatForm["FXG"] = "fxg";
|
73
73
|
PlatForm["KS"] = "ks";
|
74
74
|
PlatForm["PDD"] = "pdd";
|
75
|
+
PlatForm["JD"] = "jd";
|
75
76
|
PlatForm["XIAOZHI"] = "xiaozhi";
|
76
77
|
})(PlatForm || (PlatForm = {}));
|
77
78
|
|
@@ -611,6 +612,7 @@ var PayOrderList = function PayOrderList(_ref4) {
|
|
611
612
|
buyerNick: platformInfo.buyerNick,
|
612
613
|
buyerOpenUid: platformInfo.buyerId,
|
613
614
|
shopId: platformInfo.shopId,
|
615
|
+
tid: platformInfo.orderNo,
|
614
616
|
shopName: (_shopList$find = shopList.find(function (item) {
|
615
617
|
return item.shopId == platformInfo.shopId;
|
616
618
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopName,
|
@@ -727,7 +729,20 @@ var PayOrderList = function PayOrderList(_ref4) {
|
|
727
729
|
width: platform === PlatForm.XIAOZHI ? '100%' : '90%'
|
728
730
|
}), /*#__PURE__*/_jsx(PayOrderModal, {
|
729
731
|
ref: payOrderRef,
|
730
|
-
afterSuccessUpdateWorkOrder:
|
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
|
+
},
|
731
746
|
width: platform === PlatForm.XIAOZHI ? '100%' : '90%'
|
732
747
|
}), /*#__PURE__*/_jsx(ExamineModal, {}), /*#__PURE__*/_jsx(UnExamineModal, {}), /*#__PURE__*/_jsx(DeletePaymentWorkOrderModal, {}), /*#__PURE__*/_jsx(FlagPayModal, {})]
|
733
748
|
});
|
@@ -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:
|
6
|
-
* @LastEditTime: 2022-
|
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
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "kmkf-work-order-service-component",
|
3
|
-
"version": "0.1.12
|
3
|
+
"version": "0.1.12",
|
4
4
|
"scripts": {
|
5
5
|
"start": "dumi dev",
|
6
6
|
"docs:build": "dumi build",
|
@@ -38,7 +38,8 @@
|
|
38
38
|
"react-dom": "^17.0.2"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@
|
41
|
+
"@ant-design/icons": "^4.7.0",
|
42
|
+
"@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.24",
|
42
43
|
"@reduxjs/toolkit": "^1.8.5",
|
43
44
|
"react-redux": "^7.2.8",
|
44
45
|
"store2": "^2.14.2",
|