@kmkf-fe-packages/services-components 2.2.5-beta.4 → 2.2.5-beta.6
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/Hooks/useColumnsConfig.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +3 -2
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +13 -12
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +10 -9
- package/dist/esm/components/BS/BsLogistics/index.js +2 -1
- package/dist/esm/components/File/index.d.ts +6 -6
- package/dist/esm/components/File/index.js +9 -9
- package/dist/esm/components/SubForm/children/HeaderChildFile.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildFile.js +117 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.js +116 -0
- package/dist/esm/components/SubForm/index.d.ts +4 -4
- package/dist/esm/components/SubForm/index.js +101 -22
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +6 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import LogisticsInterception from "../components/LogisticsInterception";
|
|
2
2
|
import LogisticsMoreInterception from "../components/LogisticsMoreInterception";
|
|
3
|
-
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/
|
|
3
|
+
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/ActualPayment").default | import("../components/Address").default | import("../components/AfterSalesOrderId").default | import("../components/Alipay").default | import("../components/BS/BsExchange").default | import("../components/BS/BsGoods").default | import("../components/BS/BsLogistics").default | import("../components/BS/BsPosting").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/BS/BsSystemOrder").default | import("../components/BsE3/BsGoods").default | import("../components/BsE3/BsReissueE3").default | import("../components/BuyerNick").default | import("../components/Calculation").default | import("../components/Cascader").default | import("../components/Checkbox").default | import("../components/CommonDataTime").default | import("../components/CommonInput").default | import("../components/CommonMultiStatus").default | import("../components/CommonSystemOrder").default | import("../components/CompletedUser").default | import("../components/DataTime").default | import("../components/EItemEnCode").default | import("../components/EItemId").default | import("../components/EItemSelect").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/PicturePro").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/TradeId").default | import("../components/ShopName").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/ReceiverAddress").default | import("../components/TradeDateTime").default | import("../components/Logistics").default | import("../components/ReturnLogistics").default | import("../components/Remark").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Payment").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSendGood").default | import("../components/JST/JstSupply").default | import("../components/Public/Goods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/Exchange").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | LogisticsInterception | LogisticsMoreInterception | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/WLN/WlnGoods").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/MsgStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/KM/KmVideo").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/GY/GyGoods").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/Public/AsyncSelect").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default;
|
|
4
4
|
export declare const useColumnsConfig: ({ queryWorkOrderDetail, flatTemplateList, shopList, sortState, onChangeSort, handleReset, handleSubmit, handleChangeSingleWorkOrderMark, userList, tbAppKey, isShare, openSingleColumnsFilter, openSingleColumnsSort, }: {
|
|
5
5
|
queryWorkOrderDetail?: ((p: any) => void) | undefined;
|
|
6
6
|
flatTemplateList?: any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare type HasErpDataKeyType = "hasWln" | "hasWdt" | "hasBs" | "hasE3" | "hasJst" | "hasGy";
|
|
1
|
+
declare type HasErpDataKeyType = "hasWln" | "hasWdt" | "hasBs" | "hasE3" | "hasJst" | "hasGy" | "hasJy";
|
|
2
2
|
declare function useGetHasErpData(reduxData: any): Record<HasErpDataKeyType, boolean>;
|
|
3
3
|
export default useGetHasErpData;
|
|
@@ -6,14 +6,15 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { useEffect, useMemo, useState } from "react";
|
|
8
8
|
var getTemplate = function getTemplate(companyUserConfig) {
|
|
9
|
-
var _companyUserConfig$pl, _companyUserConfig$pl2, _companyUserConfig$pl3, _companyUserConfig$pl4, _companyUserConfig$pl5, _companyUserConfig$pl6, _companyUserConfig$pl7, _companyUserConfig$pl8, _companyUserConfig$pl9, _companyUserConfig$pl10, _companyUserConfig$pl11, _companyUserConfig$pl12, _companyUserConfig$pl13, _companyUserConfig$pl14, _companyUserConfig$pl15, _companyUserConfig$pl16, _companyUserConfig$pl17, _companyUserConfig$pl18;
|
|
9
|
+
var _companyUserConfig$pl, _companyUserConfig$pl2, _companyUserConfig$pl3, _companyUserConfig$pl4, _companyUserConfig$pl5, _companyUserConfig$pl6, _companyUserConfig$pl7, _companyUserConfig$pl8, _companyUserConfig$pl9, _companyUserConfig$pl10, _companyUserConfig$pl11, _companyUserConfig$pl12, _companyUserConfig$pl13, _companyUserConfig$pl14, _companyUserConfig$pl15, _companyUserConfig$pl16, _companyUserConfig$pl17, _companyUserConfig$pl18, _companyUserConfig$pl19, _companyUserConfig$pl20, _companyUserConfig$pl21;
|
|
10
10
|
return JSON.stringify({
|
|
11
11
|
hasWln: (_companyUserConfig$pl = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl2 = companyUserConfig.plugins) === null || _companyUserConfig$pl2 === void 0 ? void 0 : (_companyUserConfig$pl3 = _companyUserConfig$pl2.wln) === null || _companyUserConfig$pl3 === void 0 ? void 0 : _companyUserConfig$pl3.show) !== null && _companyUserConfig$pl !== void 0 ? _companyUserConfig$pl : false,
|
|
12
12
|
hasWdt: (_companyUserConfig$pl4 = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl5 = companyUserConfig.plugins) === null || _companyUserConfig$pl5 === void 0 ? void 0 : (_companyUserConfig$pl6 = _companyUserConfig$pl5.wdt) === null || _companyUserConfig$pl6 === void 0 ? void 0 : _companyUserConfig$pl6.show) !== null && _companyUserConfig$pl4 !== void 0 ? _companyUserConfig$pl4 : false,
|
|
13
13
|
hasBs: (_companyUserConfig$pl7 = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl8 = companyUserConfig.plugins) === null || _companyUserConfig$pl8 === void 0 ? void 0 : (_companyUserConfig$pl9 = _companyUserConfig$pl8.bs) === null || _companyUserConfig$pl9 === void 0 ? void 0 : _companyUserConfig$pl9.show) !== null && _companyUserConfig$pl7 !== void 0 ? _companyUserConfig$pl7 : false,
|
|
14
14
|
hasE3: (_companyUserConfig$pl10 = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl11 = companyUserConfig.plugins) === null || _companyUserConfig$pl11 === void 0 ? void 0 : (_companyUserConfig$pl12 = _companyUserConfig$pl11.bse3) === null || _companyUserConfig$pl12 === void 0 ? void 0 : _companyUserConfig$pl12.show) !== null && _companyUserConfig$pl10 !== void 0 ? _companyUserConfig$pl10 : false,
|
|
15
15
|
hasJst: (_companyUserConfig$pl13 = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl14 = companyUserConfig.plugins) === null || _companyUserConfig$pl14 === void 0 ? void 0 : (_companyUserConfig$pl15 = _companyUserConfig$pl14.jst) === null || _companyUserConfig$pl15 === void 0 ? void 0 : _companyUserConfig$pl15.show) !== null && _companyUserConfig$pl13 !== void 0 ? _companyUserConfig$pl13 : false,
|
|
16
|
-
hasGy: (_companyUserConfig$pl16 = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl17 = companyUserConfig.plugins) === null || _companyUserConfig$pl17 === void 0 ? void 0 : (_companyUserConfig$pl18 = _companyUserConfig$pl17.gy) === null || _companyUserConfig$pl18 === void 0 ? void 0 : _companyUserConfig$pl18.show) !== null && _companyUserConfig$pl16 !== void 0 ? _companyUserConfig$pl16 : false
|
|
16
|
+
hasGy: (_companyUserConfig$pl16 = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl17 = companyUserConfig.plugins) === null || _companyUserConfig$pl17 === void 0 ? void 0 : (_companyUserConfig$pl18 = _companyUserConfig$pl17.gy) === null || _companyUserConfig$pl18 === void 0 ? void 0 : _companyUserConfig$pl18.show) !== null && _companyUserConfig$pl16 !== void 0 ? _companyUserConfig$pl16 : false,
|
|
17
|
+
hasJy: (_companyUserConfig$pl19 = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl20 = companyUserConfig.plugins) === null || _companyUserConfig$pl20 === void 0 ? void 0 : (_companyUserConfig$pl21 = _companyUserConfig$pl20.jy) === null || _companyUserConfig$pl21 === void 0 ? void 0 : _companyUserConfig$pl21.show) !== null && _companyUserConfig$pl19 !== void 0 ? _companyUserConfig$pl19 : false
|
|
17
18
|
});
|
|
18
19
|
};
|
|
19
20
|
function useGetHasErpData(reduxData) {
|
|
@@ -10,7 +10,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { useEffect, useState } from "react";
|
|
12
12
|
import useGetHasErpData from "../hook/useGetHasErpData";
|
|
13
|
-
import { queryWdtLogisticsCompany, queryBsE3LogisticsCompany, queryJSTLogisticsCompany, queryWLNLogisticsCompany, queryGYLogisticsCompany } from "../../../service/api";
|
|
13
|
+
import { queryWdtLogisticsCompany, queryBsE3LogisticsCompany, queryJSTLogisticsCompany, queryWLNLogisticsCompany, queryGYLogisticsCompany, queryJYLogisticsCompany } from "../../../service/api";
|
|
14
14
|
function useGetErpLogisticsCompany(reduxData, notJudgedErp) {
|
|
15
15
|
var _useState = useState("loading"),
|
|
16
16
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22,38 +22,39 @@ function useGetErpLogisticsCompany(reduxData, notJudgedErp) {
|
|
|
22
22
|
}, [hasErpData, notJudgedErp]);
|
|
23
23
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
24
24
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
25
|
-
var hasWdt, hasE3, hasJst, hasWln, hasGy, promises;
|
|
25
|
+
var hasWdt, hasE3, hasJst, hasWln, hasGy, hasJy, promises;
|
|
26
26
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
27
27
|
while (1) switch (_context.prev = _context.next) {
|
|
28
28
|
case 0:
|
|
29
29
|
if (!isReload) {
|
|
30
30
|
setGlobalState("loading");
|
|
31
31
|
}
|
|
32
|
-
hasWdt = hasErpData.hasWdt, hasE3 = hasErpData.hasE3, hasJst = hasErpData.hasJst, hasWln = hasErpData.hasWln, hasGy = hasErpData.hasGy;
|
|
32
|
+
hasWdt = hasErpData.hasWdt, hasE3 = hasErpData.hasE3, hasJst = hasErpData.hasJst, hasWln = hasErpData.hasWln, hasGy = hasErpData.hasGy, hasJy = hasErpData.hasJy;
|
|
33
33
|
promises = [];
|
|
34
34
|
if (hasWdt || notJudgedErp) promises.push(queryWdtLogisticsCompany);
|
|
35
35
|
if (hasE3 || notJudgedErp) promises.push(queryBsE3LogisticsCompany);
|
|
36
36
|
if (hasJst || notJudgedErp) promises.push(queryJSTLogisticsCompany);
|
|
37
37
|
if (hasWln || notJudgedErp) promises.push(queryWLNLogisticsCompany);
|
|
38
38
|
if (hasGy || notJudgedErp) promises.push(queryGYLogisticsCompany);
|
|
39
|
-
|
|
40
|
-
_context.
|
|
39
|
+
if (hasJy || notJudgedErp) promises.push(queryJYLogisticsCompany);
|
|
40
|
+
_context.prev = 9;
|
|
41
|
+
_context.next = 12;
|
|
41
42
|
return Promise.all(promises.map(function (promise) {
|
|
42
43
|
return promise();
|
|
43
44
|
}));
|
|
44
|
-
case
|
|
45
|
+
case 12:
|
|
45
46
|
setGlobalState("success");
|
|
46
|
-
_context.next =
|
|
47
|
+
_context.next = 18;
|
|
47
48
|
break;
|
|
48
|
-
case
|
|
49
|
-
_context.prev =
|
|
50
|
-
_context.t0 = _context["catch"](
|
|
49
|
+
case 15:
|
|
50
|
+
_context.prev = 15;
|
|
51
|
+
_context.t0 = _context["catch"](9);
|
|
51
52
|
setGlobalState("failed");
|
|
52
|
-
case
|
|
53
|
+
case 18:
|
|
53
54
|
case "end":
|
|
54
55
|
return _context.stop();
|
|
55
56
|
}
|
|
56
|
-
}, _callee, null, [[
|
|
57
|
+
}, _callee, null, [[9, 15]]);
|
|
57
58
|
}));
|
|
58
59
|
return function asyncQueryData(_x2, _x3, _x4) {
|
|
59
60
|
return _ref.apply(this, arguments);
|
|
@@ -23,7 +23,7 @@ function useGetErpSendData(reduxData, notJudgedErp) {
|
|
|
23
23
|
}, [hasErpData, notJudgedErp]);
|
|
24
24
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
25
25
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
26
|
-
var hasWdt, hasGy, hasJst, promises;
|
|
26
|
+
var hasWdt, hasGy, hasJst, hasJy, promises;
|
|
27
27
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
28
28
|
while (1) switch (_context.prev = _context.next) {
|
|
29
29
|
case 0:
|
|
@@ -31,28 +31,29 @@ function useGetErpSendData(reduxData, notJudgedErp) {
|
|
|
31
31
|
setGlobalState("loading");
|
|
32
32
|
}
|
|
33
33
|
_context.prev = 1;
|
|
34
|
-
hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy, hasJst = hasErpData.hasJst;
|
|
34
|
+
hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy, hasJst = hasErpData.hasJst, hasJy = hasErpData.hasJy;
|
|
35
35
|
promises = [];
|
|
36
36
|
if (hasWdt || notJudgedErp) promises.push(SendDataCenter.getInstance("wdt").fetchData);
|
|
37
37
|
if (hasGy || notJudgedErp) promises.push(SendDataCenter.getInstance("gy").fetchData);
|
|
38
38
|
if (hasJst || notJudgedErp) promises.push(SendDataCenter.getInstance("jst").fetchData);
|
|
39
|
-
|
|
39
|
+
if (hasJy || notJudgedErp) promises.push(SendDataCenter.getInstance("jy").fetchData);
|
|
40
|
+
_context.next = 10;
|
|
40
41
|
return Promise.all(promises.map(function (promise) {
|
|
41
42
|
return promise();
|
|
42
43
|
}));
|
|
43
|
-
case
|
|
44
|
+
case 10:
|
|
44
45
|
setGlobalState("success");
|
|
45
|
-
_context.next =
|
|
46
|
+
_context.next = 16;
|
|
46
47
|
break;
|
|
47
|
-
case
|
|
48
|
-
_context.prev =
|
|
48
|
+
case 13:
|
|
49
|
+
_context.prev = 13;
|
|
49
50
|
_context.t0 = _context["catch"](1);
|
|
50
51
|
setGlobalState("failed");
|
|
51
|
-
case
|
|
52
|
+
case 16:
|
|
52
53
|
case "end":
|
|
53
54
|
return _context.stop();
|
|
54
55
|
}
|
|
55
|
-
}, _callee, null, [[1,
|
|
56
|
+
}, _callee, null, [[1, 13]]);
|
|
56
57
|
}));
|
|
57
58
|
return function asyncQueryData(_x2, _x3, _x4) {
|
|
58
59
|
return _ref.apply(this, arguments);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BasicFile implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -7,14 +7,14 @@ declare class BasicFile implements ComponentInterface {
|
|
|
7
7
|
formField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
effects: ComponentInterface[
|
|
15
|
-
dataType: ComponentInterface[
|
|
14
|
+
effects: ComponentInterface['effects'];
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
exampleValue?: string;
|
|
17
|
-
standardDateType: ComponentInterface[
|
|
17
|
+
standardDateType: ComponentInterface['standardDateType'];
|
|
18
18
|
constructor(options: PickOption);
|
|
19
19
|
renderPc: (value: any, record: Record) => any;
|
|
20
20
|
renderLog: (r: Record) => any;
|
|
@@ -12,11 +12,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
12
12
|
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; }
|
|
13
13
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
14
|
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); }
|
|
15
|
-
import React from
|
|
16
|
-
import { ApaasUploadFile } from
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { ApaasUploadFile } from '@kmkf-fe-packages/basic-components';
|
|
17
17
|
import GetFormItem from "../GetFormItem";
|
|
18
18
|
import ItemView from "../../commonComponents/ItemView";
|
|
19
|
-
import { isNull } from
|
|
19
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
20
20
|
import { FileRender } from "../Common";
|
|
21
21
|
import { PlatForm } from "../../type";
|
|
22
22
|
var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
@@ -46,7 +46,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
46
46
|
href: file.url,
|
|
47
47
|
target: "_blank",
|
|
48
48
|
style: {
|
|
49
|
-
display:
|
|
49
|
+
display: 'block'
|
|
50
50
|
}
|
|
51
51
|
}, file.name);
|
|
52
52
|
});
|
|
@@ -60,7 +60,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "renderClient", function (record) {
|
|
62
62
|
var _this$effects;
|
|
63
|
-
var _this$id$split = _this.id.split(
|
|
63
|
+
var _this$id$split = _this.id.split('_'),
|
|
64
64
|
_this$id$split2 = _slicedToArray(_this$id$split, 1),
|
|
65
65
|
id = _this$id$split2[0];
|
|
66
66
|
var canDownload = ![PlatForm.KS, PlatForm.FXG].includes((_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.env);
|
|
@@ -83,7 +83,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
83
83
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
84
84
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
85
85
|
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,
|
|
86
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
86
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
|
|
87
87
|
component: /*#__PURE__*/React.createElement(ApaasUploadFile, _extends({}, _this.componentConfig, {
|
|
88
88
|
uniqueKey: _this.id,
|
|
89
89
|
platform: p === null || p === void 0 ? void 0 : p.platform,
|
|
@@ -97,7 +97,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
97
97
|
prv.push(next.url);
|
|
98
98
|
return prv;
|
|
99
99
|
}, []);
|
|
100
|
-
return textArr === null || textArr === void 0 ? void 0 : textArr.join(
|
|
100
|
+
return textArr === null || textArr === void 0 ? void 0 : textArr.join(',');
|
|
101
101
|
});
|
|
102
102
|
_defineProperty(this, "filterConfig", function () {
|
|
103
103
|
return [];
|
|
@@ -112,9 +112,9 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
112
112
|
this.isCombinationComponent = false;
|
|
113
113
|
this.canSort = false;
|
|
114
114
|
this.children = [];
|
|
115
|
-
this.dataType =
|
|
115
|
+
this.dataType = 'array';
|
|
116
116
|
this.effects = options.effects;
|
|
117
117
|
this.exampleValue = '[{"name":"c.jpeg","url":"https://kefu.kuaimai.com/pic/c.jpeg"}]';
|
|
118
|
-
this.standardDateType =
|
|
118
|
+
this.standardDateType = 'Array';
|
|
119
119
|
});
|
|
120
120
|
export default BasicFile;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare class HeaderChildFile implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
|
+
parentName?: string;
|
|
17
|
+
transformValue: (val: any, record?: any, parentName?: string) => any;
|
|
18
|
+
export: (val: any, record?: any, parentName?: string) => any;
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getParentId: () => string;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: unknown, record: Record) => any;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
getComponentValue: (r: Record) => any;
|
|
25
|
+
getComponentExport: (r: Record) => any;
|
|
26
|
+
renderExport: (value: string, record: Record) => any;
|
|
27
|
+
editRender: () => null;
|
|
28
|
+
filterConfig: () => never[];
|
|
29
|
+
}
|
|
30
|
+
export default HeaderChildFile;
|
|
@@ -0,0 +1,117 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
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); } }
|
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
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); }
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
|
+
var HeaderChildFile = /*#__PURE__*/_createClass(function HeaderChildFile(options) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
_classCallCheck(this, HeaderChildFile);
|
|
20
|
+
_defineProperty(this, "name", void 0);
|
|
21
|
+
_defineProperty(this, "id", void 0);
|
|
22
|
+
_defineProperty(this, "sortField", void 0);
|
|
23
|
+
_defineProperty(this, "type", void 0);
|
|
24
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
25
|
+
_defineProperty(this, "align", void 0);
|
|
26
|
+
_defineProperty(this, "width", void 0);
|
|
27
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
28
|
+
_defineProperty(this, "formField", void 0);
|
|
29
|
+
_defineProperty(this, "canSort", void 0);
|
|
30
|
+
_defineProperty(this, "children", void 0);
|
|
31
|
+
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "parentName", void 0);
|
|
33
|
+
_defineProperty(this, "transformValue", function (val) {
|
|
34
|
+
return val;
|
|
35
|
+
});
|
|
36
|
+
_defineProperty(this, "export", function (val) {
|
|
37
|
+
return val;
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "getParentId", function () {
|
|
40
|
+
var _this$id$split = _this.id.split('_'),
|
|
41
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
42
|
+
key = _this$id$split2[0],
|
|
43
|
+
name = _this$id$split2[1],
|
|
44
|
+
code = _this$id$split2[2];
|
|
45
|
+
return "".concat(key, "_").concat(name);
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
48
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
49
|
+
id: _this.id,
|
|
50
|
+
label: _this.name,
|
|
51
|
+
value: _this.getComponentValue(record)
|
|
52
|
+
}) : null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
55
|
+
var fileList = _this.getComponentValue(record);
|
|
56
|
+
if (!fileList.length) {
|
|
57
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
58
|
+
}
|
|
59
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file) {
|
|
60
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
61
|
+
href: file.url,
|
|
62
|
+
onClick: function onClick(e) {
|
|
63
|
+
return e.stopPropagation();
|
|
64
|
+
},
|
|
65
|
+
target: "_blank",
|
|
66
|
+
style: {
|
|
67
|
+
display: 'block'
|
|
68
|
+
}
|
|
69
|
+
}, file.name);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
73
|
+
var id = _this.getParentId();
|
|
74
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
75
|
+
return _this.renderPc(undefined, r);
|
|
76
|
+
});
|
|
77
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
78
|
+
return (r === null || r === void 0 ? void 0 : r[_this.id]) || [];
|
|
79
|
+
});
|
|
80
|
+
_defineProperty(this, "getComponentExport", function (r) {
|
|
81
|
+
return _this.export(r === null || r === void 0 ? void 0 : r[_this.id], r, _this.parentName);
|
|
82
|
+
});
|
|
83
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
84
|
+
var fileList = _this.getComponentValue(record) || [];
|
|
85
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file) {
|
|
86
|
+
return file.url;
|
|
87
|
+
}).join(',');
|
|
88
|
+
});
|
|
89
|
+
_defineProperty(this, "editRender", function () {
|
|
90
|
+
return null;
|
|
91
|
+
});
|
|
92
|
+
_defineProperty(this, "filterConfig", function () {
|
|
93
|
+
return [];
|
|
94
|
+
});
|
|
95
|
+
this.name = options.name;
|
|
96
|
+
this.id = options.id;
|
|
97
|
+
this.sortField = options.id;
|
|
98
|
+
this.formField = options.id;
|
|
99
|
+
this.type = options.type;
|
|
100
|
+
if (options.parentName) {
|
|
101
|
+
this.parentName = options.parentName;
|
|
102
|
+
}
|
|
103
|
+
this.componentConfig = options.componentConfig;
|
|
104
|
+
this.align = 'left';
|
|
105
|
+
this.width = (options === null || options === void 0 ? void 0 : options.width) || 100;
|
|
106
|
+
this.isCombinationComponent = false;
|
|
107
|
+
this.canSort = false;
|
|
108
|
+
this.dataType = 'string';
|
|
109
|
+
this.children = [];
|
|
110
|
+
if (options.transformValue) {
|
|
111
|
+
this.transformValue = options.transformValue;
|
|
112
|
+
}
|
|
113
|
+
if (options.renderExport) {
|
|
114
|
+
this.export = options.renderExport;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
export default HeaderChildFile;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare class HeaderChildPic implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
|
+
parentName?: string;
|
|
17
|
+
transformValue: (val: any, record?: any, parentName?: string) => any;
|
|
18
|
+
export: (val: any, record?: any, parentName?: string) => any;
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getParentId: () => string;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: unknown, record: Record) => any;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
getComponentValue: (r: Record) => any;
|
|
25
|
+
getComponentExport: (r: Record) => any;
|
|
26
|
+
renderExport: (value: string, record: Record) => any;
|
|
27
|
+
editRender: () => null;
|
|
28
|
+
filterConfig: () => never[];
|
|
29
|
+
}
|
|
30
|
+
export default HeaderChildPic;
|
|
@@ -0,0 +1,116 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
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); } }
|
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
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); }
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { Image } from 'antd';
|
|
16
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
17
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
|
+
var HeaderChildPic = /*#__PURE__*/_createClass(function HeaderChildPic(options) {
|
|
19
|
+
var _this = this;
|
|
20
|
+
_classCallCheck(this, HeaderChildPic);
|
|
21
|
+
_defineProperty(this, "name", void 0);
|
|
22
|
+
_defineProperty(this, "id", void 0);
|
|
23
|
+
_defineProperty(this, "sortField", void 0);
|
|
24
|
+
_defineProperty(this, "type", void 0);
|
|
25
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
26
|
+
_defineProperty(this, "align", void 0);
|
|
27
|
+
_defineProperty(this, "width", void 0);
|
|
28
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
29
|
+
_defineProperty(this, "formField", void 0);
|
|
30
|
+
_defineProperty(this, "canSort", void 0);
|
|
31
|
+
_defineProperty(this, "children", void 0);
|
|
32
|
+
_defineProperty(this, "dataType", void 0);
|
|
33
|
+
_defineProperty(this, "parentName", void 0);
|
|
34
|
+
_defineProperty(this, "transformValue", function (val) {
|
|
35
|
+
return val;
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "export", function (val) {
|
|
38
|
+
return val;
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "getParentId", function () {
|
|
41
|
+
var _this$id$split = _this.id.split('_'),
|
|
42
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
43
|
+
key = _this$id$split2[0],
|
|
44
|
+
name = _this$id$split2[1],
|
|
45
|
+
code = _this$id$split2[2];
|
|
46
|
+
return "".concat(key, "_").concat(name);
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
49
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
50
|
+
id: _this.id,
|
|
51
|
+
label: _this.name,
|
|
52
|
+
value: _this.getComponentValue(record)
|
|
53
|
+
}) : null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
56
|
+
var picList = _this.getComponentValue(record);
|
|
57
|
+
if (!picList.length) {
|
|
58
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
59
|
+
}
|
|
60
|
+
return picList.map(function (t) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
62
|
+
width: 30,
|
|
63
|
+
src: t,
|
|
64
|
+
onClick: function onClick(e) {
|
|
65
|
+
return e.stopPropagation();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
71
|
+
var id = _this.getParentId();
|
|
72
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
73
|
+
return _this.renderPc(undefined, r);
|
|
74
|
+
});
|
|
75
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
76
|
+
var picList = (r === null || r === void 0 ? void 0 : r[_this.id]) || [];
|
|
77
|
+
return picList === null || picList === void 0 ? void 0 : picList.map(function (url) {
|
|
78
|
+
return url.startsWith('http') ? url : url.startsWith('/') ? "https://kefu.kuaimai.com".concat(url) : "https://kefu.kuaimai.com/".concat(url);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
_defineProperty(this, "getComponentExport", function (r) {
|
|
82
|
+
return _this.export(r === null || r === void 0 ? void 0 : r[_this.id], r, _this.parentName);
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
85
|
+
var picList = _this.getComponentValue(record) || [];
|
|
86
|
+
return picList.join(',');
|
|
87
|
+
});
|
|
88
|
+
_defineProperty(this, "editRender", function () {
|
|
89
|
+
return null;
|
|
90
|
+
});
|
|
91
|
+
_defineProperty(this, "filterConfig", function () {
|
|
92
|
+
return [];
|
|
93
|
+
});
|
|
94
|
+
this.name = options.name;
|
|
95
|
+
this.id = options.id;
|
|
96
|
+
this.sortField = options.id;
|
|
97
|
+
this.formField = options.id;
|
|
98
|
+
this.type = options.type;
|
|
99
|
+
if (options.parentName) {
|
|
100
|
+
this.parentName = options.parentName;
|
|
101
|
+
}
|
|
102
|
+
this.componentConfig = options.componentConfig;
|
|
103
|
+
this.align = 'left';
|
|
104
|
+
this.width = (options === null || options === void 0 ? void 0 : options.width) || 100;
|
|
105
|
+
this.isCombinationComponent = false;
|
|
106
|
+
this.canSort = false;
|
|
107
|
+
this.dataType = 'string';
|
|
108
|
+
this.children = [];
|
|
109
|
+
if (options.transformValue) {
|
|
110
|
+
this.transformValue = options.transformValue;
|
|
111
|
+
}
|
|
112
|
+
if (options.renderExport) {
|
|
113
|
+
this.export = options.renderExport;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export default HeaderChildPic;
|
|
@@ -1,17 +1,17 @@
|
|
|
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 SubForm 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[
|
|
14
|
+
dataType: ComponentInterface['dataType'];
|
|
15
15
|
templateId?: string;
|
|
16
16
|
workOrderUniqueKey?: string;
|
|
17
17
|
constructor(options: PickOption);
|
|
@@ -14,15 +14,82 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
14
14
|
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; }
|
|
15
15
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
16
|
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); }
|
|
17
|
-
import React from
|
|
18
|
-
import { Table } from
|
|
19
|
-
import { SubForm as SubFormComponent, renderMap } from
|
|
20
|
-
import BsHeaderChild from "../BS/common
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { Table } from 'antd';
|
|
19
|
+
import { SubForm as SubFormComponent, renderMap } from '@kmkf-fe-packages/basic-components';
|
|
20
|
+
import { BsHeaderChild } from "../BS/common";
|
|
21
|
+
import HeaderChildFile from "./children/HeaderChildFile";
|
|
22
|
+
import HeaderChildPic from "./children/HeaderChildPic";
|
|
21
23
|
import GetFormItem from "../GetFormItem";
|
|
22
24
|
import ItemView from "../../commonComponents/ItemView";
|
|
23
|
-
import { isNull } from
|
|
24
|
-
import { difference } from
|
|
25
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
26
|
+
import { difference } from 'lodash';
|
|
25
27
|
import { SYMBOL } from "../../constant";
|
|
28
|
+
var ChildrenMap = {
|
|
29
|
+
INPUT: {
|
|
30
|
+
component: BsHeaderChild
|
|
31
|
+
},
|
|
32
|
+
TEXTAREA: {
|
|
33
|
+
component: BsHeaderChild
|
|
34
|
+
},
|
|
35
|
+
SELECT: {
|
|
36
|
+
component: BsHeaderChild
|
|
37
|
+
},
|
|
38
|
+
RADIO: {
|
|
39
|
+
component: BsHeaderChild,
|
|
40
|
+
transformValue: function transformValue(value) {
|
|
41
|
+
var _value$value;
|
|
42
|
+
console.log('value', value);
|
|
43
|
+
return "".concat(value === null || value === void 0 ? void 0 : value.value, "\n ").concat(value !== null && value !== void 0 && value.value && typeof value.value === 'string' && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && value !== null && value !== void 0 && value.other ? "(".concat(value === null || value === void 0 ? void 0 : value.other, ")") : '');
|
|
44
|
+
},
|
|
45
|
+
renderExport: function renderExport(value) {
|
|
46
|
+
var _value$value2;
|
|
47
|
+
return "".concat(value === null || value === void 0 ? void 0 : value.value, "\n ").concat((value === null || value === void 0 ? void 0 : value.value) && typeof value.value === 'string' && (value === null || value === void 0 ? void 0 : (_value$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
CHECKBOX: {
|
|
51
|
+
component: BsHeaderChild,
|
|
52
|
+
transformValue: function transformValue(value) {
|
|
53
|
+
var _value$value3, _value$value4, _value$value5;
|
|
54
|
+
if ((value === null || value === void 0 ? void 0 : (_value$value3 = value.value) === null || _value$value3 === void 0 ? void 0 : _value$value3.length) === 0 && isNull(value === null || value === void 0 ? void 0 : value.other)) return null;
|
|
55
|
+
var findIndex = value === null || value === void 0 ? void 0 : (_value$value4 = value.value) === null || _value$value4 === void 0 ? void 0 : _value$value4.findIndex(function (item) {
|
|
56
|
+
return item === '其他';
|
|
57
|
+
});
|
|
58
|
+
if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
|
|
61
|
+
}
|
|
62
|
+
return value === null || value === void 0 ? void 0 : (_value$value5 = value.value) === null || _value$value5 === void 0 ? void 0 : _value$value5.join('/');
|
|
63
|
+
},
|
|
64
|
+
renderExport: function renderExport(value) {
|
|
65
|
+
var _value$value6, _value$value7, _value$value8;
|
|
66
|
+
if ((value === null || value === void 0 ? void 0 : (_value$value6 = value.value) === null || _value$value6 === void 0 ? void 0 : _value$value6.length) === 0 && isNull(value === null || value === void 0 ? void 0 : value.other)) return null;
|
|
67
|
+
var findIndex = value === null || value === void 0 ? void 0 : (_value$value7 = value.value) === null || _value$value7 === void 0 ? void 0 : _value$value7.findIndex(function (item) {
|
|
68
|
+
return item === '其他';
|
|
69
|
+
});
|
|
70
|
+
if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
|
|
73
|
+
}
|
|
74
|
+
return value === null || value === void 0 ? void 0 : (_value$value8 = value.value) === null || _value$value8 === void 0 ? void 0 : _value$value8.join('/');
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
BASIC_MULT_SELECT: {
|
|
78
|
+
component: BsHeaderChild,
|
|
79
|
+
transformValue: function transformValue(value) {
|
|
80
|
+
return value === null || value === void 0 ? void 0 : value.join(',');
|
|
81
|
+
},
|
|
82
|
+
renderExport: function renderExport(value) {
|
|
83
|
+
return value === null || value === void 0 ? void 0 : value.join(',');
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
PICTURE: {
|
|
87
|
+
component: HeaderChildPic
|
|
88
|
+
},
|
|
89
|
+
FILE: {
|
|
90
|
+
component: HeaderChildFile
|
|
91
|
+
}
|
|
92
|
+
};
|
|
26
93
|
var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
27
94
|
var _this = this;
|
|
28
95
|
_classCallCheck(this, SubForm);
|
|
@@ -50,7 +117,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
50
117
|
isEdit: false,
|
|
51
118
|
isRequired: false,
|
|
52
119
|
isNumber: false,
|
|
53
|
-
precision:
|
|
120
|
+
precision: 'nolimit',
|
|
54
121
|
width: 150
|
|
55
122
|
};
|
|
56
123
|
if (t.isShow) {
|
|
@@ -62,9 +129,9 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
62
129
|
_defineProperty(this, "renderTabel", function (list) {
|
|
63
130
|
var _ref, _ref$filter;
|
|
64
131
|
var columns = [{
|
|
65
|
-
dataIndex:
|
|
66
|
-
title:
|
|
67
|
-
align:
|
|
132
|
+
dataIndex: '',
|
|
133
|
+
title: '序号',
|
|
134
|
+
align: 'center',
|
|
68
135
|
ellipsis: true,
|
|
69
136
|
width: 50,
|
|
70
137
|
render: function render(val, record, index) {
|
|
@@ -76,14 +143,14 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
76
143
|
return {
|
|
77
144
|
dataIndex: item.key,
|
|
78
145
|
title: item.name,
|
|
79
|
-
align:
|
|
146
|
+
align: 'center',
|
|
80
147
|
ellipsis: true,
|
|
81
148
|
width: item.width,
|
|
82
149
|
render: function render(val) {
|
|
83
150
|
return renderMap[item.workOrderComponentType] ? /*#__PURE__*/React.createElement("div", {
|
|
84
151
|
style: {
|
|
85
|
-
width:
|
|
86
|
-
overflow:
|
|
152
|
+
width: '100%',
|
|
153
|
+
overflow: 'auto'
|
|
87
154
|
}
|
|
88
155
|
}, renderMap[item.workOrderComponentType](val)) : /*#__PURE__*/React.createElement("span", null, val);
|
|
89
156
|
}
|
|
@@ -92,14 +159,14 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
92
159
|
return /*#__PURE__*/React.createElement(Table, {
|
|
93
160
|
columns: columns,
|
|
94
161
|
dataSource: list,
|
|
95
|
-
rowKey:
|
|
162
|
+
rowKey: 'uuid',
|
|
96
163
|
size: "small",
|
|
97
164
|
pagination: false,
|
|
98
165
|
scroll: {
|
|
99
|
-
x:
|
|
166
|
+
x: '100%'
|
|
100
167
|
},
|
|
101
168
|
locale: {
|
|
102
|
-
emptyText:
|
|
169
|
+
emptyText: '暂无数据'
|
|
103
170
|
}
|
|
104
171
|
});
|
|
105
172
|
});
|
|
@@ -132,7 +199,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
132
199
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
133
200
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
134
201
|
required: (_this$componentConfig5 = (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required) !== null && _this$componentConfig5 !== void 0 ? _this$componentConfig5 : false,
|
|
135
|
-
tooltip: (_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.showTooltip ? (_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.tooltip :
|
|
202
|
+
tooltip: (_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.showTooltip ? (_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.tooltip : '',
|
|
136
203
|
component: /*#__PURE__*/React.createElement(SubFormComponent, _extends({}, _this.componentConfig, {
|
|
137
204
|
platform: p === null || p === void 0 ? void 0 : p.platform
|
|
138
205
|
}))
|
|
@@ -146,7 +213,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
146
213
|
// 过滤组件id
|
|
147
214
|
name: item.name,
|
|
148
215
|
// 过滤组件名称
|
|
149
|
-
filterComponentType:
|
|
216
|
+
filterComponentType: 'Input'
|
|
150
217
|
}];
|
|
151
218
|
});
|
|
152
219
|
this.name = options.name;
|
|
@@ -186,7 +253,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
186
253
|
}
|
|
187
254
|
});
|
|
188
255
|
return prv;
|
|
189
|
-
},
|
|
256
|
+
}, '');
|
|
190
257
|
if (msg) {
|
|
191
258
|
return Promise.reject(new Error(msg));
|
|
192
259
|
}
|
|
@@ -196,11 +263,23 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
196
263
|
this.isCombinationComponent = true;
|
|
197
264
|
this.canSort = false;
|
|
198
265
|
this.children = (this.getNewTableHeader() || []).map(function (item) {
|
|
199
|
-
|
|
266
|
+
var _ChildrenMap$item$wor = ChildrenMap[item.workOrderComponentType],
|
|
267
|
+
component = _ChildrenMap$item$wor.component,
|
|
268
|
+
transformValue = _ChildrenMap$item$wor.transformValue,
|
|
269
|
+
renderExport = _ChildrenMap$item$wor.renderExport;
|
|
270
|
+
return new component(_objectSpread(_objectSpread({}, options), {}, {
|
|
200
271
|
name: item.name,
|
|
201
|
-
id: "".concat(options.id, "_productList_").concat(item.key)
|
|
272
|
+
id: "".concat(options.id, "_productList_").concat(item.key),
|
|
273
|
+
transformValue: transformValue,
|
|
274
|
+
renderExport: renderExport
|
|
202
275
|
}));
|
|
276
|
+
// return new BsHeaderChild({
|
|
277
|
+
// ...options,
|
|
278
|
+
// name: item.name,
|
|
279
|
+
// id: `${options.id}_productList_${item.key}`,
|
|
280
|
+
// });
|
|
203
281
|
});
|
|
204
|
-
|
|
282
|
+
|
|
283
|
+
this.dataType = 'object';
|
|
205
284
|
});
|
|
206
285
|
export default SubForm;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, 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, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BsLogistics |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BsE3Goods | BsE3Reissue | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonDataTime | CommonInput | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | BasicInput | BasicTypeInput | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | PublicGoods | PublicReissueGoods | PublicExchange | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | PaymentVoucherCode | Label | MemberLevel | GyGoods | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm;
|
|
@@ -10,6 +10,7 @@ export declare const queryWdtLogisticsCompany: () => Promise<void>;
|
|
|
10
10
|
export declare const queryBsE3LogisticsCompany: () => Promise<void>;
|
|
11
11
|
export declare const queryJSTLogisticsCompany: () => Promise<void>;
|
|
12
12
|
export declare const queryGYLogisticsCompany: () => Promise<void>;
|
|
13
|
+
export declare const queryJYLogisticsCompany: () => Promise<void>;
|
|
13
14
|
export declare const queryWLNLogisticsCompany: () => Promise<void>;
|
|
14
15
|
export declare const queryKMLogisticsCompany: () => Promise<void>;
|
|
15
16
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -275,6 +275,12 @@ export var queryGYLogisticsCompany = function queryGYLogisticsCompany() {
|
|
|
275
275
|
instance.expressData = data;
|
|
276
276
|
}).catch(console.log);
|
|
277
277
|
};
|
|
278
|
+
export var queryJYLogisticsCompany = function queryJYLogisticsCompany() {
|
|
279
|
+
var instance = ExpressData.getInstance("jy");
|
|
280
|
+
return servers.JY.getLogisticsDataAsync().then(function (data) {
|
|
281
|
+
instance.expressData = data;
|
|
282
|
+
}).catch(console.log);
|
|
283
|
+
};
|
|
278
284
|
export var queryWLNLogisticsCompany = function queryWLNLogisticsCompany() {
|
|
279
285
|
var instance = ExpressData.getInstance("wln");
|
|
280
286
|
return servers.WLN.getLogisticsDataAsync().then(function (data) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.2.5-beta.
|
|
3
|
+
"version": "2.2.5-beta.6",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.2.5-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.2.5-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.2.5-beta.6",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.5-beta.5",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "3d4d3383179b439c41d2162767d4d25eacf98ce4",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|