@kmkf-fe-packages/services-components 0.27.1-test.2 → 0.28.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/GlobalContext/index.js +4 -5
- package/dist/esm/components/BuyerNick/index.d.ts +3 -3
- package/dist/esm/components/BuyerNick/index.js +9 -19
- package/dist/esm/components/Common/index.d.ts +1 -0
- package/dist/esm/components/Common/index.js +82 -3
- package/dist/esm/components/CommonInput/index.d.ts +34 -0
- package/dist/esm/components/CommonInput/index.js +105 -0
- package/dist/esm/components/Payment/PaymentStatus.d.ts +4 -4
- package/dist/esm/components/Payment/PaymentStatus.js +30 -30
- package/dist/esm/components/PaymentVoucherCode/index.d.ts +33 -0
- package/dist/esm/components/PaymentVoucherCode/index.js +108 -0
- package/dist/esm/components/Select/index.d.ts +5 -5
- package/dist/esm/components/Select/index.js +22 -14
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +7 -2
- package/dist/esm/index.d.ts +5 -3
- package/dist/esm/index.js +2 -0
- package/dist/esm/service/api.d.ts +4 -0
- package/dist/esm/service/api.js +82 -14
- package/package.json +4 -4
|
@@ -15,8 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState } from "react";
|
|
17
17
|
import { Skeleton, Result, Button } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryAllLogisticsCompany } from "../../service/api";
|
|
19
|
-
import { servers } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
|
+
import { queryAddressData, queryBsAddressData, queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryWdtAddressData, queryAllLogisticsCompany } from "../../service/api";
|
|
20
19
|
var Global = function Global(_ref) {
|
|
21
20
|
var children = _ref.children,
|
|
22
21
|
_ref$requestList = _ref.requestList,
|
|
@@ -34,12 +33,12 @@ var Global = function Global(_ref) {
|
|
|
34
33
|
while (1) switch (_context.prev = _context.next) {
|
|
35
34
|
case 0:
|
|
36
35
|
mapping = {
|
|
37
|
-
queryAddressData:
|
|
38
|
-
queryBsAddressData:
|
|
36
|
+
queryAddressData: queryAddressData,
|
|
37
|
+
queryBsAddressData: queryBsAddressData,
|
|
39
38
|
queryExpressInterceptData: queryExpressInterceptData,
|
|
40
39
|
queryLogisticsAddressData: queryLogisticsAddressData,
|
|
41
40
|
queryPlatData: queryPlatData,
|
|
42
|
-
queryWdtAddressData:
|
|
41
|
+
queryWdtAddressData: queryWdtAddressData,
|
|
43
42
|
queryAllLogisticsCompany: queryAllLogisticsCompany
|
|
44
43
|
};
|
|
45
44
|
mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class EBuyerNick implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -12,7 +12,7 @@ declare class EBuyerNick implements ComponentInterface {
|
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderTaoBaoWangWang: (record: any, params: any) => React.JSX.Element;
|
|
18
18
|
renderClient: (record: any, params: any) => React.JSX.Element | null;
|
|
@@ -6,18 +6,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
import React from
|
|
10
|
-
import { BuyerNick } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { BuyerNick } from "@kmkf-fe-packages/basic-components";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
13
|
import PlatBuyer from "../../commonComponents/PlatBuyer";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
import wangImg from "../../commonComponents/Wangwang/img/wang.gif";
|
|
17
17
|
var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
18
18
|
var _this = this,
|
|
19
|
-
_this$componentConfig3
|
|
20
|
-
_this$componentConfig4;
|
|
19
|
+
_this$componentConfig3;
|
|
21
20
|
_classCallCheck(this, EBuyerNick);
|
|
22
21
|
_defineProperty(this, "name", void 0);
|
|
23
22
|
_defineProperty(this, "id", void 0);
|
|
@@ -36,7 +35,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
36
35
|
return /*#__PURE__*/React.createElement("span", {
|
|
37
36
|
onClick: function onClick() {
|
|
38
37
|
var _record$_this$id, _record$_this$id2;
|
|
39
|
-
typeof params.openWangWang ===
|
|
38
|
+
typeof params.openWangWang === "function" && params.openWangWang(record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.buyerNick, record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.buyerOpenUid);
|
|
40
39
|
}
|
|
41
40
|
}, /*#__PURE__*/React.createElement("img", {
|
|
42
41
|
alt: "\u8BF7\u70B9\u51FB\u76F4\u63A5\u8BBF\u95EE",
|
|
@@ -50,7 +49,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
50
49
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
51
50
|
id: _this.id,
|
|
52
51
|
label: _this.name,
|
|
53
|
-
value: (params === null || params === void 0 ? void 0 : params.platform) ===
|
|
52
|
+
value: (params === null || params === void 0 ? void 0 : params.platform) === "tb" ? _this.renderTaoBaoWangWang(record, params) : record === null || record === void 0 ? void 0 : (_record$_this$id4 = record[_this.id]) === null || _record$_this$id4 === void 0 ? void 0 : _record$_this$id4.buyerNick
|
|
54
53
|
}) : null;
|
|
55
54
|
});
|
|
56
55
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -109,10 +108,10 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
109
108
|
// 过滤组件id
|
|
110
109
|
name: item.name,
|
|
111
110
|
// 过滤组件名称
|
|
112
|
-
filterComponentType:
|
|
111
|
+
filterComponentType: "Input",
|
|
113
112
|
filterFn: function filterFn(value) {
|
|
114
113
|
return function (i) {
|
|
115
|
-
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
114
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "buyerNick")).includes(value);
|
|
116
115
|
};
|
|
117
116
|
}
|
|
118
117
|
};
|
|
@@ -125,17 +124,8 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
125
124
|
this.isCombinationComponent = false;
|
|
126
125
|
this.canSort = true;
|
|
127
126
|
this.children = [];
|
|
128
|
-
this.dataType =
|
|
127
|
+
this.dataType = "string";
|
|
129
128
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
130
|
-
validator: function validator(_, value) {
|
|
131
|
-
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
132
|
-
return Promise.reject(new Error('请输入买家昵称'));
|
|
133
|
-
}
|
|
134
|
-
return Promise.resolve();
|
|
135
|
-
}
|
|
136
|
-
}] : [];
|
|
137
|
-
this.componentConfig = options.componentConfig;
|
|
138
|
-
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
139
129
|
validator: function validator(_, value) {
|
|
140
130
|
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
141
131
|
return Promise.reject(new Error("请输入买家昵称"));
|
|
@@ -33,4 +33,5 @@ export declare const BsGoodsTable: ({ list, showHeader, text, type, }: {
|
|
|
33
33
|
export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
34
34
|
export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
|
|
35
35
|
export declare const MsgContent: ({ horizontal, list, valueKey, failValue, options, }: any) => React.JSX.Element;
|
|
36
|
+
export declare const AlipayBill: (props: any) => React.JSX.Element;
|
|
36
37
|
export {};
|
|
@@ -1,3 +1,7 @@
|
|
|
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
|
+
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
|
+
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
|
+
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); }); }; }
|
|
1
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
7
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -8,12 +12,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
12
|
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
13
|
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
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message } from "antd";
|
|
15
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Typography } from "antd";
|
|
12
16
|
import React, { useState, useMemo } from "react";
|
|
13
17
|
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
|
+
import { getAlipayBillReceipt } from "../../service/api";
|
|
14
19
|
import { CopyToClipboard } from "react-copy-to-clipboard";
|
|
15
20
|
import styles from "./index.module.less";
|
|
16
21
|
import defaultImg from "./img/default-img.png";
|
|
22
|
+
var Paragraph = Typography.Paragraph;
|
|
17
23
|
export var getFormItem = function getFormItem(_ref) {
|
|
18
24
|
var name = _ref.name,
|
|
19
25
|
title = _ref.title,
|
|
@@ -52,7 +58,7 @@ export var showImage = function showImage(_ref2) {
|
|
|
52
58
|
key: index
|
|
53
59
|
}, type === "itemCode" && !showHeader.includes("picUrl") ? null : (item === null || item === void 0 ? void 0 : item.platform) === "taobao" ? /*#__PURE__*/React.createElement("a", {
|
|
54
60
|
target: "_blank",
|
|
55
|
-
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) :
|
|
61
|
+
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) : "javascript:void(0);"
|
|
56
62
|
}, /*#__PURE__*/React.createElement("img", {
|
|
57
63
|
style: {
|
|
58
64
|
width: "40px",
|
|
@@ -152,7 +158,7 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
152
158
|
},
|
|
153
159
|
key: index
|
|
154
160
|
}, type === "itemCode" && !showHeader.includes("picUrl") ? null : /*#__PURE__*/React.createElement("a", {
|
|
155
|
-
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) === "taobao" && i.numIid ? "https://item.taobao.com/item.htm?id=".concat(i.numIid) :
|
|
161
|
+
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) === "taobao" && i.numIid ? "https://item.taobao.com/item.htm?id=".concat(i.numIid) : "javascript:void(0);"),
|
|
156
162
|
target: "__blank",
|
|
157
163
|
style: {
|
|
158
164
|
marginRight: "12px",
|
|
@@ -893,4 +899,77 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
893
899
|
key: index
|
|
894
900
|
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")));
|
|
895
901
|
}) : null);
|
|
902
|
+
};
|
|
903
|
+
//获取付款凭证
|
|
904
|
+
export var AlipayBill = function AlipayBill(props) {
|
|
905
|
+
var value = props.value,
|
|
906
|
+
platform = props.platform;
|
|
907
|
+
var _useState13 = useState(false),
|
|
908
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
909
|
+
visible = _useState14[0],
|
|
910
|
+
setVisible = _useState14[1];
|
|
911
|
+
var _useState15 = useState(""),
|
|
912
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
913
|
+
msg = _useState16[0],
|
|
914
|
+
setMsg = _useState16[1];
|
|
915
|
+
var _useState17 = useState(false),
|
|
916
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
917
|
+
hasUrl = _useState18[0],
|
|
918
|
+
setHasUrl = _useState18[1];
|
|
919
|
+
var voucherHandle = /*#__PURE__*/function () {
|
|
920
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
921
|
+
var params, res, data, msg;
|
|
922
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
923
|
+
while (1) switch (_context.prev = _context.next) {
|
|
924
|
+
case 0:
|
|
925
|
+
e.stopPropagation();
|
|
926
|
+
params = {
|
|
927
|
+
alipayBillReceiptDetailId: value
|
|
928
|
+
};
|
|
929
|
+
_context.next = 4;
|
|
930
|
+
return getAlipayBillReceipt(params);
|
|
931
|
+
case 4:
|
|
932
|
+
res = _context.sent;
|
|
933
|
+
data = res.data, msg = res.message;
|
|
934
|
+
if (data) {
|
|
935
|
+
setHasUrl(true);
|
|
936
|
+
if (["fxg"].includes(platform)) {
|
|
937
|
+
setMsg(data);
|
|
938
|
+
setVisible(true);
|
|
939
|
+
} else {
|
|
940
|
+
window.open(data);
|
|
941
|
+
}
|
|
942
|
+
} else {
|
|
943
|
+
setHasUrl(false);
|
|
944
|
+
setMsg(msg);
|
|
945
|
+
setVisible(true);
|
|
946
|
+
}
|
|
947
|
+
case 7:
|
|
948
|
+
case "end":
|
|
949
|
+
return _context.stop();
|
|
950
|
+
}
|
|
951
|
+
}, _callee);
|
|
952
|
+
}));
|
|
953
|
+
return function voucherHandle(_x2) {
|
|
954
|
+
return _ref15.apply(this, arguments);
|
|
955
|
+
};
|
|
956
|
+
}();
|
|
957
|
+
var closeHandle = function closeHandle(e) {
|
|
958
|
+
e.stopPropagation();
|
|
959
|
+
setVisible(false);
|
|
960
|
+
};
|
|
961
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
962
|
+
style: {
|
|
963
|
+
color: "#1890ff",
|
|
964
|
+
cursor: "pointer"
|
|
965
|
+
},
|
|
966
|
+
onClick: voucherHandle
|
|
967
|
+
}, value), /*#__PURE__*/React.createElement(Modal, {
|
|
968
|
+
title: "\u4ED8\u6B3E\u51ED\u8BC1",
|
|
969
|
+
visible: visible,
|
|
970
|
+
footer: false,
|
|
971
|
+
onCancel: closeHandle
|
|
972
|
+
}, ["fxg"].includes(platform) && hasUrl ? /*#__PURE__*/React.createElement("div", null, "\u8BF7\u590D\u5236\u94FE\u63A5\u5728\u6D4F\u89C8\u5668\u4E0A\u6253\u5F00\uFF0C\u94FE\u63A5\uFF1A", /*#__PURE__*/React.createElement(Paragraph, {
|
|
973
|
+
copyable: true
|
|
974
|
+
}, msg)) : msg));
|
|
896
975
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class CommonInput implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
showContains: boolean;
|
|
10
|
+
onlyContainsString: boolean;
|
|
11
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
+
effects: ComponentInterface["effects"];
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
options: ComponentInterface["options"];
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
|
+
renderPc: (value: unknown, record: Record) => any;
|
|
22
|
+
renderLog: (r: Record) => any;
|
|
23
|
+
getComponentValue: (r: Record) => any;
|
|
24
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
25
|
+
editRender: (p: any) => React.JSX.Element;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: "like";
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "Input";
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export default CommonInput;
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { Input } from "antd";
|
|
11
|
+
import GetFormItem from "../GetFormItem";
|
|
12
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { SYMBOL } from "../../constant";
|
|
15
|
+
var INPUT_MAP = {
|
|
16
|
+
BUSINESS_ORDER_NO: {
|
|
17
|
+
key: "businessOrderNo",
|
|
18
|
+
disabled: true,
|
|
19
|
+
placeholder: "自动获取无需填写"
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var CommonInput = /*#__PURE__*/_createClass(function CommonInput(options) {
|
|
23
|
+
var _this = this;
|
|
24
|
+
_classCallCheck(this, CommonInput);
|
|
25
|
+
_defineProperty(this, "name", void 0);
|
|
26
|
+
_defineProperty(this, "id", void 0);
|
|
27
|
+
_defineProperty(this, "sortField", void 0);
|
|
28
|
+
_defineProperty(this, "type", void 0);
|
|
29
|
+
_defineProperty(this, "rules", void 0);
|
|
30
|
+
_defineProperty(this, "showContains", void 0);
|
|
31
|
+
_defineProperty(this, "onlyContainsString", void 0);
|
|
32
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
33
|
+
_defineProperty(this, "effects", void 0);
|
|
34
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
35
|
+
_defineProperty(this, "formField", void 0);
|
|
36
|
+
_defineProperty(this, "canSort", void 0);
|
|
37
|
+
_defineProperty(this, "children", void 0);
|
|
38
|
+
_defineProperty(this, "dataType", void 0);
|
|
39
|
+
_defineProperty(this, "options", void 0);
|
|
40
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
41
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
42
|
+
id: _this.id,
|
|
43
|
+
label: _this.name,
|
|
44
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
45
|
+
}) : null;
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(INPUT_MAP[_this.type].key)]) === undefined) {
|
|
49
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
50
|
+
}
|
|
51
|
+
return record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(INPUT_MAP[_this.type].key)];
|
|
52
|
+
});
|
|
53
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
54
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(INPUT_MAP[_this.type].key)])) return null;
|
|
55
|
+
return _this.renderPc(undefined, r);
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
58
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(INPUT_MAP[_this.type].key)];
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
61
|
+
var _record;
|
|
62
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(INPUT_MAP[_this.type].key)]) !== null && _record !== void 0 ? _record : "--";
|
|
63
|
+
});
|
|
64
|
+
_defineProperty(this, "editRender", function (p) {
|
|
65
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
66
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
67
|
+
title: _this.name,
|
|
68
|
+
name: _this.id,
|
|
69
|
+
rules: _this.rules,
|
|
70
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
71
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
72
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
73
|
+
component: /*#__PURE__*/React.createElement(Input, _extends({}, _this.componentConfig, {
|
|
74
|
+
placeholder: INPUT_MAP[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
75
|
+
disabled: INPUT_MAP[_this.type].disabled
|
|
76
|
+
}))
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
80
|
+
return {
|
|
81
|
+
searchDefaultConditions: SYMBOL.like,
|
|
82
|
+
type: item.type,
|
|
83
|
+
id: "".concat(item.id, "_").concat(INPUT_MAP[_this.type].key),
|
|
84
|
+
// 过滤组件id
|
|
85
|
+
name: item.name,
|
|
86
|
+
// 过滤组件名称
|
|
87
|
+
filterComponentType: "Input"
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
this.name = options.name;
|
|
91
|
+
this.id = options.id;
|
|
92
|
+
this.sortField = "".concat(options.id, "_").concat(INPUT_MAP[options.type].key);
|
|
93
|
+
this.formField = "".concat(options.id, "_").concat(INPUT_MAP[options.type].key);
|
|
94
|
+
this.type = options.type;
|
|
95
|
+
this.showContains = false;
|
|
96
|
+
this.onlyContainsString = true;
|
|
97
|
+
this.componentConfig = options.componentConfig;
|
|
98
|
+
this.effects = options.effects;
|
|
99
|
+
this.rules = [];
|
|
100
|
+
this.isCombinationComponent = false;
|
|
101
|
+
this.canSort = !!INPUT_MAP[options.type].canSort;
|
|
102
|
+
this.children = [];
|
|
103
|
+
this.dataType = "string";
|
|
104
|
+
});
|
|
105
|
+
export default CommonInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class PaymentStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -20,8 +20,8 @@ declare class PaymentStatus implements ComponentInterface {
|
|
|
20
20
|
formField: string;
|
|
21
21
|
canSort: boolean;
|
|
22
22
|
children: ComponentInterface[];
|
|
23
|
-
dataType: ComponentInterface[
|
|
24
|
-
options: ComponentInterface[
|
|
23
|
+
dataType: ComponentInterface["dataType"];
|
|
24
|
+
options: ComponentInterface["options"];
|
|
25
25
|
constructor(options: PickOption);
|
|
26
26
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
27
27
|
renderPc: (value: unknown, record: any) => any;
|
|
@@ -5,9 +5,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
8
|
+
import React from "react";
|
|
9
9
|
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
-
import { isNull, filterFn as _filterFn } from
|
|
10
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
11
|
import { SYMBOL } from "../../constant";
|
|
12
12
|
var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
13
13
|
var _this = this;
|
|
@@ -37,7 +37,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
39
39
|
var _record$_this$id;
|
|
40
|
-
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id :
|
|
40
|
+
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
|
|
41
41
|
});
|
|
42
42
|
_defineProperty(this, "renderLog", function (r) {
|
|
43
43
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
@@ -47,7 +47,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
47
47
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
48
48
|
});
|
|
49
49
|
_defineProperty(this, "renderExport", function (value) {
|
|
50
|
-
return value !== null && value !== void 0 ? value :
|
|
50
|
+
return value !== null && value !== void 0 ? value : "--";
|
|
51
51
|
});
|
|
52
52
|
_defineProperty(this, "editRender", function () {
|
|
53
53
|
return null;
|
|
@@ -58,57 +58,57 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
58
58
|
type: item.type,
|
|
59
59
|
id: "".concat(item.id, "_enterprisePaymentStatus"),
|
|
60
60
|
name: "".concat(item.name, "-\u6253\u6B3E\u72B6\u6001"),
|
|
61
|
-
filterComponentType:
|
|
61
|
+
filterComponentType: "MultipleSelect",
|
|
62
62
|
props: {
|
|
63
63
|
options: _this.paymentStatusOptions
|
|
64
64
|
},
|
|
65
65
|
filterFn: function filterFn(value) {
|
|
66
66
|
return function (i) {
|
|
67
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
67
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "enterprisePaymentStatus"));
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
});
|
|
72
|
-
this.name =
|
|
72
|
+
this.name = "打款状态";
|
|
73
73
|
this.id = "".concat(options.id, "_enterprisePaymentStatus");
|
|
74
74
|
this.sortField = "".concat(options.id, "_enterprisePaymentStatus");
|
|
75
75
|
this.formField = "".concat(options.id, "_enterprisePaymentStatus");
|
|
76
76
|
this.type = options.type;
|
|
77
77
|
this.componentConfig = options.componentConfig;
|
|
78
78
|
this.rules = [];
|
|
79
|
-
this.align =
|
|
79
|
+
this.align = "left";
|
|
80
80
|
this.width = 200;
|
|
81
|
-
this.dataType =
|
|
81
|
+
this.dataType = "string";
|
|
82
82
|
this.paymentStatus = {
|
|
83
|
-
WAITING_EXAMINE:
|
|
84
|
-
EXAMINED:
|
|
85
|
-
FLAG_PAID:
|
|
86
|
-
ALI_PAY_WAITING:
|
|
87
|
-
ALI_PAY_SUCCESS:
|
|
88
|
-
ALI_PAY_FAIL:
|
|
89
|
-
ALI_PAY_CLOSE:
|
|
83
|
+
WAITING_EXAMINE: "未打款",
|
|
84
|
+
EXAMINED: "审核通过",
|
|
85
|
+
FLAG_PAID: "标记已打款",
|
|
86
|
+
ALI_PAY_WAITING: "支付宝待付款",
|
|
87
|
+
ALI_PAY_SUCCESS: "支付宝打款成功",
|
|
88
|
+
ALI_PAY_FAIL: "支付宝打款失败",
|
|
89
|
+
ALI_PAY_CLOSE: "支付宝打款关闭"
|
|
90
90
|
};
|
|
91
91
|
this.paymentStatusOptions = [{
|
|
92
|
-
label:
|
|
93
|
-
value:
|
|
92
|
+
label: "未打款",
|
|
93
|
+
value: "未打款"
|
|
94
94
|
}, {
|
|
95
|
-
label:
|
|
96
|
-
value:
|
|
95
|
+
label: "审核通过",
|
|
96
|
+
value: "审核通过"
|
|
97
97
|
}, {
|
|
98
|
-
label:
|
|
99
|
-
value:
|
|
98
|
+
label: "标记已打款",
|
|
99
|
+
value: "标记已打款"
|
|
100
100
|
}, {
|
|
101
|
-
label:
|
|
102
|
-
value:
|
|
101
|
+
label: "支付宝待付款",
|
|
102
|
+
value: "支付宝待付款"
|
|
103
103
|
}, {
|
|
104
|
-
label:
|
|
105
|
-
value:
|
|
104
|
+
label: "支付宝打款成功",
|
|
105
|
+
value: "支付宝打款成功"
|
|
106
106
|
}, {
|
|
107
|
-
label:
|
|
108
|
-
value:
|
|
107
|
+
label: "支付宝打款失败",
|
|
108
|
+
value: "支付宝打款失败"
|
|
109
109
|
}, {
|
|
110
|
-
label:
|
|
111
|
-
value:
|
|
110
|
+
label: "支付宝打款关闭",
|
|
111
|
+
value: "支付宝打款关闭"
|
|
112
112
|
}];
|
|
113
113
|
this.options = this.paymentStatusOptions;
|
|
114
114
|
this.isCombinationComponent = false;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class PaymentVoucherCode implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
isCombinationComponent: boolean;
|
|
11
|
+
formField: string;
|
|
12
|
+
canSort: boolean;
|
|
13
|
+
children: ComponentInterface[];
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
templateId?: string;
|
|
16
|
+
workOrderUniqueKey?: string;
|
|
17
|
+
effects: ComponentInterface["effects"];
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderPc: (value: any, record: Record) => React.JSX.Element | "--";
|
|
20
|
+
renderLog: (r: Record) => React.JSX.Element | "--" | null;
|
|
21
|
+
getComponentValue: (r: Record) => any;
|
|
22
|
+
renderExport: (value: any, record: Record) => any;
|
|
23
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
24
|
+
editRender: (p: any) => React.JSX.Element;
|
|
25
|
+
filterConfig: (item: ColumnConfig) => {
|
|
26
|
+
searchDefaultConditions: "like";
|
|
27
|
+
type: string;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
filterComponentType: "Input";
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export default PaymentVoucherCode;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { ApaasInput } from "@kmkf-fe-packages/basic-components";
|
|
11
|
+
import GetFormItem from "../GetFormItem";
|
|
12
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { SYMBOL } from "../../constant";
|
|
15
|
+
import { AlipayBill } from "../Common/index";
|
|
16
|
+
var PaymentVoucherCode = /*#__PURE__*/_createClass(function PaymentVoucherCode(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, PaymentVoucherCode);
|
|
19
|
+
_defineProperty(this, "name", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "sortField", void 0);
|
|
22
|
+
_defineProperty(this, "type", void 0);
|
|
23
|
+
_defineProperty(this, "rules", void 0);
|
|
24
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
25
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
26
|
+
_defineProperty(this, "formField", void 0);
|
|
27
|
+
_defineProperty(this, "canSort", void 0);
|
|
28
|
+
_defineProperty(this, "children", void 0);
|
|
29
|
+
_defineProperty(this, "dataType", void 0);
|
|
30
|
+
_defineProperty(this, "templateId", void 0);
|
|
31
|
+
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
32
|
+
_defineProperty(this, "effects", void 0);
|
|
33
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
|
+
var _this$effects;
|
|
35
|
+
if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")])) return "--";
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
onClick: function onClick(e) {
|
|
38
|
+
return e.stopPropagation();
|
|
39
|
+
}
|
|
40
|
+
}, /*#__PURE__*/React.createElement(AlipayBill, {
|
|
41
|
+
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")],
|
|
42
|
+
platform: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.env
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
46
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_paymentVoucherCode")])) return null;
|
|
47
|
+
return _this.renderPc(undefined, r);
|
|
48
|
+
});
|
|
49
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
50
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_paymentVoucherCode")];
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
53
|
+
var _record;
|
|
54
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")]) !== null && _record !== void 0 ? _record : "--";
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
57
|
+
var _this$effects2;
|
|
58
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
59
|
+
id: _this.id,
|
|
60
|
+
label: _this.name,
|
|
61
|
+
value: /*#__PURE__*/React.createElement(AlipayBill, {
|
|
62
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
63
|
+
platform: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.env
|
|
64
|
+
})
|
|
65
|
+
}) : null;
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "editRender", function (p) {
|
|
68
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
69
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
70
|
+
title: _this.name,
|
|
71
|
+
name: _this.id,
|
|
72
|
+
rules: _this.rules,
|
|
73
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
74
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
75
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
76
|
+
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
77
|
+
placeholder: "\u81EA\u52A8\u83B7\u53D6\u65E0\u9700\u586B\u5199",
|
|
78
|
+
disabled: true
|
|
79
|
+
}))
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
83
|
+
return {
|
|
84
|
+
searchDefaultConditions: SYMBOL.like,
|
|
85
|
+
type: item.type,
|
|
86
|
+
id: "".concat(item.id, "_paymentVoucherCode"),
|
|
87
|
+
// 过滤组件id
|
|
88
|
+
name: item.name,
|
|
89
|
+
// 过滤组件名称
|
|
90
|
+
filterComponentType: "Input"
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
this.name = options.name;
|
|
94
|
+
this.id = options.id;
|
|
95
|
+
this.sortField = "".concat(options.id, "_paymentVoucherCode");
|
|
96
|
+
this.formField = "".concat(options.id, "_paymentVoucherCode");
|
|
97
|
+
this.type = options.type;
|
|
98
|
+
this.templateId = options.templateId;
|
|
99
|
+
this.componentConfig = options.componentConfig;
|
|
100
|
+
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
101
|
+
this.rules = [];
|
|
102
|
+
this.isCombinationComponent = false;
|
|
103
|
+
this.canSort = false;
|
|
104
|
+
this.children = [];
|
|
105
|
+
this.dataType = "string";
|
|
106
|
+
this.effects = options.effects;
|
|
107
|
+
});
|
|
108
|
+
export default PaymentVoucherCode;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class BasicSelect implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
10
|
isCombinationComponent: boolean;
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
15
|
-
options: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
options: ComponentInterface["options"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getKeyByComponentType: (type: string) => any;
|
|
18
18
|
editRender: (p: any) => React.JSX.Element;
|
|
@@ -6,15 +6,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
import React from
|
|
10
|
-
import { ApaasSelect } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { ApaasSelect } from "@kmkf-fe-packages/basic-components";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
-
import { isNull, filterFn as _filterFn } from
|
|
13
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import { SYMBOL } from "../../constant";
|
|
15
15
|
var typeMap = {
|
|
16
|
-
BUYER_MESSAGE_NOTICE:
|
|
17
|
-
|
|
16
|
+
BUYER_MESSAGE_NOTICE: {
|
|
17
|
+
key: "buyerMessageNotice"
|
|
18
|
+
},
|
|
19
|
+
SELECT: {
|
|
20
|
+
key: "select"
|
|
21
|
+
},
|
|
22
|
+
NEW_PAYMENT_STATUS: {
|
|
23
|
+
key: "newPaymentStatus",
|
|
24
|
+
placeholder: "自动获取无需填写"
|
|
25
|
+
}
|
|
18
26
|
};
|
|
19
27
|
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
20
28
|
var _this = this,
|
|
@@ -33,7 +41,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
33
41
|
_defineProperty(this, "dataType", void 0);
|
|
34
42
|
_defineProperty(this, "options", void 0);
|
|
35
43
|
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
36
|
-
return typeMap[type] ||
|
|
44
|
+
return typeMap[type].key || "";
|
|
37
45
|
});
|
|
38
46
|
_defineProperty(this, "editRender", function (p) {
|
|
39
47
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -45,7 +53,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
45
53
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
46
54
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
47
55
|
component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
|
|
48
|
-
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
56
|
+
placeholder: typeMap[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
49
57
|
showSearch: true,
|
|
50
58
|
onChange: p === null || p === void 0 ? void 0 : p.onChange
|
|
51
59
|
}))
|
|
@@ -55,27 +63,27 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
55
63
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
56
64
|
id: _this.id,
|
|
57
65
|
label: _this.name,
|
|
58
|
-
value: (record === null || record === void 0 ? void 0 : record[_this.id]) ||
|
|
66
|
+
value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ""
|
|
59
67
|
}) : null;
|
|
60
68
|
});
|
|
61
69
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
62
70
|
var _record;
|
|
63
71
|
var type = _this.type;
|
|
64
|
-
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record :
|
|
72
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)]) !== null && _record !== void 0 ? _record : "--");
|
|
65
73
|
});
|
|
66
74
|
_defineProperty(this, "renderLog", function (r) {
|
|
67
75
|
var type = _this.type;
|
|
68
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])])) return null;
|
|
76
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)])) return null;
|
|
69
77
|
return _this.renderPc(undefined, r);
|
|
70
78
|
});
|
|
71
79
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
72
80
|
var type = _this.type;
|
|
73
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])];
|
|
81
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
74
82
|
});
|
|
75
83
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
76
84
|
var _record2;
|
|
77
85
|
var type = _this.type;
|
|
78
|
-
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 :
|
|
86
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)]) !== null && _record2 !== void 0 ? _record2 : "--";
|
|
79
87
|
});
|
|
80
88
|
_defineProperty(this, "filterConfig", function (item) {
|
|
81
89
|
var _item$config;
|
|
@@ -87,7 +95,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
87
95
|
// 过滤组件id
|
|
88
96
|
name: item.name,
|
|
89
97
|
// 过滤组件名称
|
|
90
|
-
filterComponentType:
|
|
98
|
+
filterComponentType: "MultipleSelect",
|
|
91
99
|
props: {
|
|
92
100
|
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []
|
|
93
101
|
},
|
|
@@ -108,7 +116,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
108
116
|
this.isCombinationComponent = false;
|
|
109
117
|
this.canSort = true;
|
|
110
118
|
this.children = [];
|
|
111
|
-
this.dataType =
|
|
119
|
+
this.dataType = "string";
|
|
112
120
|
this.options = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [];
|
|
113
121
|
});
|
|
114
122
|
export default BasicSelect;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | FlowWorkOrderStatus | BasicGrade | Handler | HandlerDeadLine | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsMoreInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | NodeDeadLine | NodeInput | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | StatusSelect | SystemOrderNo | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WdtGoods | WlnGoods | WorkOrderId | CommonDataTime | TemplateSelect | Submitter | PrevSubmitter | FlowCreator | NodeStayDuration | CommonInput | PaymentVoucherCode;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods } from "./index";
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -30,6 +30,7 @@ export var factory = function factory(type, options) {
|
|
|
30
30
|
return new BasicDataTime(options);
|
|
31
31
|
case "SELECT":
|
|
32
32
|
case "BUYER_MESSAGE_NOTICE":
|
|
33
|
+
case "NEW_PAYMENT_STATUS":
|
|
33
34
|
return new BasicSelect(options);
|
|
34
35
|
case "PICTURE":
|
|
35
36
|
return new BasicPicture(options);
|
|
@@ -195,9 +196,13 @@ export var factory = function factory(type, options) {
|
|
|
195
196
|
return new CommonDataTime(options);
|
|
196
197
|
case "FLOW_UPDATE_DATETIME":
|
|
197
198
|
return new CommonDataTime(options);
|
|
198
|
-
case
|
|
199
|
+
case "WDT_GOODS":
|
|
199
200
|
// 万里牛商品
|
|
200
201
|
return new WdtGoods(options);
|
|
202
|
+
case "BUSINESS_ORDER_NO":
|
|
203
|
+
return new CommonInput(options);
|
|
204
|
+
case "PAYMENT_VOUCHER_CODE":
|
|
205
|
+
return new PaymentVoucherCode(options);
|
|
201
206
|
default:
|
|
202
207
|
return new BasicInput(options);
|
|
203
208
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -70,10 +70,12 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
70
70
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
71
71
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
72
72
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
73
|
-
export { default as NodeInput } from
|
|
74
|
-
export { default as FlowWorkOrderStatus } from
|
|
75
|
-
export { default as MsgStatus } from
|
|
73
|
+
export { default as NodeInput } from "./components/NodeInput";
|
|
74
|
+
export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus";
|
|
75
|
+
export { default as MsgStatus } from "./components/MsgStatus";
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
|
+
export { default as CommonInput } from "./components/CommonInput";
|
|
78
|
+
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
77
79
|
export { factory } from "./factory";
|
|
78
80
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
79
81
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/dist/esm/index.js
CHANGED
|
@@ -74,6 +74,8 @@ export { default as NodeInput } from "./components/NodeInput";
|
|
|
74
74
|
export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus";
|
|
75
75
|
export { default as MsgStatus } from "./components/MsgStatus";
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
|
+
export { default as CommonInput } from "./components/CommonInput";
|
|
78
|
+
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
77
79
|
export { factory } from "./factory";
|
|
78
80
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
79
81
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const replaceCheck: (data: any) => Promise<any>;
|
|
2
|
+
export declare const queryAddressData: () => Promise<void>;
|
|
3
|
+
export declare const queryBsAddressData: () => Promise<void>;
|
|
4
|
+
export declare const queryWdtAddressData: () => Promise<void>;
|
|
2
5
|
export declare const queryPlatData: () => Promise<void>;
|
|
3
6
|
export declare const queryExpressInterceptData: () => Promise<void>;
|
|
4
7
|
export declare const queryLogisticsAddressData: () => Promise<void>;
|
|
5
8
|
export declare const queryAllLogisticsCompany: () => Promise<void>;
|
|
9
|
+
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -10,16 +10,76 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
12
|
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; }
|
|
13
|
-
import { PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData } from
|
|
13
|
+
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import get from "lodash/get";
|
|
14
15
|
import request from "./request";
|
|
15
16
|
// 重复校验
|
|
16
17
|
export var replaceCheck = function replaceCheck(data) {
|
|
17
18
|
return request({
|
|
18
|
-
url:
|
|
19
|
-
method:
|
|
19
|
+
url: "/qy/gdfw/workOrder/repeatCheck",
|
|
20
|
+
method: "post",
|
|
20
21
|
data: data
|
|
21
22
|
});
|
|
22
23
|
};
|
|
24
|
+
export var queryAddressData = function queryAddressData() {
|
|
25
|
+
return request({
|
|
26
|
+
url: "/qy/gdfw/template/queryAreas/noLogin",
|
|
27
|
+
method: "get",
|
|
28
|
+
data: {}
|
|
29
|
+
}).then(function (resp) {
|
|
30
|
+
var map = {};
|
|
31
|
+
var res = {};
|
|
32
|
+
var list = resp.data;
|
|
33
|
+
for (var i = 0; i < list.length; i++) {
|
|
34
|
+
res[list[i]["id"]] = [list[i]["name"], list[i]["parentId"]];
|
|
35
|
+
map[list[i]["name"]] = list[i]["id"];
|
|
36
|
+
}
|
|
37
|
+
var instance = AddressData.getInstance();
|
|
38
|
+
instance.addrData = res;
|
|
39
|
+
instance.addrNameMap = map;
|
|
40
|
+
instance.addressOptions = get(toTree(list, 0), "0.children", []);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export var queryBsAddressData = function queryBsAddressData() {
|
|
44
|
+
return request({
|
|
45
|
+
url: "/qy/gdfw/template/queryBsAreas/noLogin",
|
|
46
|
+
method: "get",
|
|
47
|
+
data: {}
|
|
48
|
+
}).then(function (resp) {
|
|
49
|
+
var map = {};
|
|
50
|
+
var res = {};
|
|
51
|
+
var _resp$data = resp.data,
|
|
52
|
+
list = _resp$data === void 0 ? [] : _resp$data;
|
|
53
|
+
for (var i = 0; i < list.length; i++) {
|
|
54
|
+
res[list[i]["id"]] = [list[i]["name"], list[i]["parentId"]];
|
|
55
|
+
map[list[i]["name"]] = list[i]["id"];
|
|
56
|
+
}
|
|
57
|
+
var instance = BsAddressData.getInstance();
|
|
58
|
+
instance.addrData = res;
|
|
59
|
+
instance.addrNameMap = map;
|
|
60
|
+
instance.addressOptions = toTree(list, 1);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export var queryWdtAddressData = function queryWdtAddressData() {
|
|
64
|
+
return request({
|
|
65
|
+
url: "/qy/gdfw/template/queryWdtAreas/noLogin",
|
|
66
|
+
method: "get",
|
|
67
|
+
data: {}
|
|
68
|
+
}).then(function (resp) {
|
|
69
|
+
var map = {};
|
|
70
|
+
var res = {};
|
|
71
|
+
var _resp$data2 = resp.data,
|
|
72
|
+
list = _resp$data2 === void 0 ? [] : _resp$data2;
|
|
73
|
+
for (var i = 0; i < list.length; i++) {
|
|
74
|
+
res[list[i]["id"]] = [list[i]["name"], list[i]["parentId"]];
|
|
75
|
+
map[list[i]["name"]] = list[i]["id"];
|
|
76
|
+
}
|
|
77
|
+
var instance = WdtAddressData.getInstance();
|
|
78
|
+
instance.addrData = res;
|
|
79
|
+
instance.addrNameMap = map;
|
|
80
|
+
instance.addressOptions = toTree(list, 1);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
23
83
|
export var queryPlatData = function queryPlatData() {
|
|
24
84
|
return request({
|
|
25
85
|
url: "/qy/platform/listPlatform/noLogin",
|
|
@@ -50,8 +110,8 @@ export var queryPlatData = function queryPlatData() {
|
|
|
50
110
|
};
|
|
51
111
|
export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
52
112
|
return request({
|
|
53
|
-
url:
|
|
54
|
-
method:
|
|
113
|
+
url: "/qy/logistics/listLogisticsWithInterceptInfo/noLogin",
|
|
114
|
+
method: "get",
|
|
55
115
|
data: {
|
|
56
116
|
platformType: 118
|
|
57
117
|
}
|
|
@@ -59,10 +119,10 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
|
59
119
|
var data = res.data;
|
|
60
120
|
var instance = ExpressInterceptData.getInstance();
|
|
61
121
|
var companyTypeMap = {
|
|
62
|
-
SF:
|
|
63
|
-
ZTO:
|
|
64
|
-
JT:
|
|
65
|
-
DEFAULT:
|
|
122
|
+
SF: "顺丰",
|
|
123
|
+
ZTO: "中通",
|
|
124
|
+
JT: "极兔",
|
|
125
|
+
DEFAULT: ""
|
|
66
126
|
};
|
|
67
127
|
var expressList = data.map(function (item) {
|
|
68
128
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -125,26 +185,26 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
|
125
185
|
instance.typeOptions = Object.keys(typeObj).map(function (key) {
|
|
126
186
|
return {
|
|
127
187
|
label: key,
|
|
128
|
-
value: _toConsumableArray(typeObj[key]).join(
|
|
188
|
+
value: _toConsumableArray(typeObj[key]).join(",")
|
|
129
189
|
};
|
|
130
190
|
});
|
|
131
191
|
instance.typeConditionOptions = Object.keys(instance.typeNameMap).map(function (key) {
|
|
132
|
-
var type = key.split(
|
|
192
|
+
var type = key.split("|")[0];
|
|
133
193
|
return {
|
|
134
|
-
label: "".concat(companyTypeMap[type] ||
|
|
194
|
+
label: "".concat(companyTypeMap[type] || "").concat(instance.typeNameMap[key]),
|
|
135
195
|
value: key
|
|
136
196
|
};
|
|
137
197
|
});
|
|
138
198
|
instance.statusOptions = Object.keys(statusObj).map(function (key) {
|
|
139
199
|
return {
|
|
140
200
|
label: key,
|
|
141
|
-
value: _toConsumableArray(statusObj[key]).join(
|
|
201
|
+
value: _toConsumableArray(statusObj[key]).join(",")
|
|
142
202
|
};
|
|
143
203
|
});
|
|
144
204
|
var tempList = [];
|
|
145
205
|
var tempObj = {};
|
|
146
206
|
Object.keys(instance.statusNameMap).forEach(function (key) {
|
|
147
|
-
var type = key.split(
|
|
207
|
+
var type = key.split("|")[1];
|
|
148
208
|
if (!tempObj[type]) {
|
|
149
209
|
tempList.push({
|
|
150
210
|
label: instance.statusNameMap[key],
|
|
@@ -187,4 +247,12 @@ export var queryAllLogisticsCompany = function queryAllLogisticsCompany() {
|
|
|
187
247
|
});
|
|
188
248
|
instance.expressData = expressList;
|
|
189
249
|
});
|
|
250
|
+
};
|
|
251
|
+
// 获取支付宝电子回单
|
|
252
|
+
export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
|
|
253
|
+
return request({
|
|
254
|
+
url: "/qy/payment/paymentOrder/getAlipayBillReceipt",
|
|
255
|
+
method: "post",
|
|
256
|
+
data: data
|
|
257
|
+
});
|
|
190
258
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0-alpha.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.28.0-alpha.0",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.28.0-alpha.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "a5a0208a80be28f9d89587bea0e8fd8e94f39b42",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|