@kmkf-fe-packages/services-components 2.2.5-beta.2 → 2.2.5-beta.20
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/commonComponents/ShopList/index.js +1 -0
- package/dist/esm/components/BS/BsLogistics/index.d.ts +2 -0
- package/dist/esm/components/BS/BsLogistics/index.js +25 -2
- package/dist/esm/components/ErpTradeId/index.d.ts +2 -2
- package/dist/esm/components/ErpTradeId/index.js +7 -4
- 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.js +79 -3
- package/dist/esm/components/TradeId/index.d.ts +5 -5
- package/dist/esm/components/TradeId/index.js +17 -14
- 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/BS/BsLogistics").default | import("../components/BS/BsSystemOrder").default | import("../components/
|
|
3
|
+
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsLogistics").default | import("../components/BS/BsSystemOrder").default | import("../components/TradeId").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Address").default | import("../components/Cascader").default | import("../components/Checkbox").default | import("../components/DataTime").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/CommonDataTime").default | import("../components/ShopName").default | import("../components/BuyerNick").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/ActualPayment").default | import("../components/Remark").default | import("../components/Alipay").default | import("../components/EItemSelect").default | import("../components/EItemId").default | import("../components/EItemEnCode").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/BS/BsGoods").default | import("../components/BsE3/BsGoods").default | import("../components/Public/Goods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/Exchange").default | import("../components/BsE3/BsReissueE3").default | import("../components/BS/BsExchange").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").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/CompletedUser").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/Calculation").default | import("../components/CommonSystemOrder").default | import("../components/CommonMultiStatus").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/WLN/WlnGoods").default | import("../components/BS/BsPosting").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/CommonInput").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/AfterSalesOrderId").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);
|
|
@@ -32,6 +32,7 @@ var ShopList = function ShopList(_ref) {
|
|
|
32
32
|
});
|
|
33
33
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
34
34
|
disabled: item.disabled || disabledList.includes(item === null || item === void 0 ? void 0 : item[valueMapping]),
|
|
35
|
+
title: "".concat((plat === null || plat === void 0 ? void 0 : plat.platformName) || "").concat(item.shopName),
|
|
35
36
|
value: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
36
37
|
key: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
37
38
|
label: "".concat((plat === null || plat === void 0 ? void 0 : plat.platformName) || "").concat(item.shopName)
|
|
@@ -25,6 +25,8 @@ declare class BsLogistics implements ComponentInterface {
|
|
|
25
25
|
dataType: ComponentInterface["dataType"];
|
|
26
26
|
expressCompany: ExpressCompany;
|
|
27
27
|
expressCode: ExpressCode;
|
|
28
|
+
isChange: boolean;
|
|
29
|
+
effects: ComponentInterface["effects"];
|
|
28
30
|
constructor(options: PickOption);
|
|
29
31
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
30
32
|
getSortChildFields: (type: string, options: PickOption) => any;
|
|
@@ -88,7 +88,8 @@ var typeMap = {
|
|
|
88
88
|
company: "jyLogisticsCompany",
|
|
89
89
|
code: "jyLogisticsCode",
|
|
90
90
|
platformType: "jy",
|
|
91
|
-
companyDataType: "arrayObject"
|
|
91
|
+
companyDataType: "arrayObject",
|
|
92
|
+
companyCodeType: "arrayObject"
|
|
92
93
|
},
|
|
93
94
|
SKX_LOGISTICS: {
|
|
94
95
|
key: "skxLogisticsList",
|
|
@@ -141,6 +142,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
141
142
|
_defineProperty(this, "dataType", void 0);
|
|
142
143
|
_defineProperty(this, "expressCompany", void 0);
|
|
143
144
|
_defineProperty(this, "expressCode", void 0);
|
|
145
|
+
_defineProperty(this, "isChange", void 0);
|
|
146
|
+
_defineProperty(this, "effects", void 0);
|
|
144
147
|
_defineProperty(this, "renderClient", function (record) {
|
|
145
148
|
var _typeMap$_this$type;
|
|
146
149
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
@@ -203,6 +206,23 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
203
206
|
});
|
|
204
207
|
_defineProperty(this, "editRender", function (p) {
|
|
205
208
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$expressDateInst2, _typeMap$_this$type6;
|
|
209
|
+
var onLogisticsCodeBlur = function onLogisticsCodeBlur(val) {
|
|
210
|
+
if (_this.isChange) {
|
|
211
|
+
var _this$effects, _this$effects$form, _p$onBlur;
|
|
212
|
+
(_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : (_this$effects$form = _this$effects.form) === null || _this$effects$form === void 0 ? void 0 : _this$effects$form.setFieldsValue({
|
|
213
|
+
skx_return_billNo_blur_from: _this.id
|
|
214
|
+
});
|
|
215
|
+
_this.type === "SKX_RETURN_LOGISTICS" && (p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, val, "skxReturnTHLogisticsCode"));
|
|
216
|
+
_this.isChange = false;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var onLogisticsCodeChange = function onLogisticsCodeChange() {
|
|
220
|
+
_this.isChange = true;
|
|
221
|
+
for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
222
|
+
e[_key] = arguments[_key];
|
|
223
|
+
}
|
|
224
|
+
p === null || p === void 0 ? void 0 : p.onChange.apply(p, e);
|
|
225
|
+
};
|
|
206
226
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
207
227
|
title: _this.name,
|
|
208
228
|
name: _this.id,
|
|
@@ -215,7 +235,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
215
235
|
type: 1,
|
|
216
236
|
platformType: _this.platformType,
|
|
217
237
|
options: ((_this$expressDateInst2 = _this.expressDateInstance) === null || _this$expressDateInst2 === void 0 ? void 0 : _this$expressDateInst2.getExpressData()) || [],
|
|
218
|
-
onChange:
|
|
238
|
+
onChange: onLogisticsCodeChange,
|
|
239
|
+
onBlur: onLogisticsCodeBlur,
|
|
219
240
|
logisticsCompanyFormType: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.logisticsCompanyFormType
|
|
220
241
|
}))
|
|
221
242
|
});
|
|
@@ -237,6 +258,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
237
258
|
this.componentConfig = _options.componentConfig;
|
|
238
259
|
this.isCombinationComponent = true;
|
|
239
260
|
this.canSort = false;
|
|
261
|
+
this.isChange = false;
|
|
262
|
+
this.effects = _options.effects;
|
|
240
263
|
this.expressCompany = new ExpressCompany(_objectSpread(_objectSpread({}, _options), {}, {
|
|
241
264
|
name: "物流公司",
|
|
242
265
|
parentName: this.name,
|
|
@@ -13,7 +13,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13
13
|
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; }
|
|
14
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
15
|
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); }
|
|
16
|
-
import React from
|
|
16
|
+
import React from "react";
|
|
17
17
|
import GetFormItem from "../GetFormItem";
|
|
18
18
|
import TradeId from "../TradeId";
|
|
19
19
|
import OrderNo from "./components/OrderNum";
|
|
@@ -30,8 +30,11 @@ var ErpTradeId = /*#__PURE__*/function (_TradeId) {
|
|
|
30
30
|
_defineProperty(_assertThisInitialized(_this), "editRender", function (p) {
|
|
31
31
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
|
|
32
32
|
var onTradeIdBlur = function onTradeIdBlur(value) {
|
|
33
|
-
var _p$onBlur;
|
|
34
|
-
|
|
33
|
+
var _this$effects, _this$effects$form, _p$onBlur;
|
|
34
|
+
(_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : (_this$effects$form = _this$effects.form) === null || _this$effects$form === void 0 ? void 0 : _this$effects$form.setFieldsValue({
|
|
35
|
+
skx_return_billNo_blur_from: _this.id
|
|
36
|
+
});
|
|
37
|
+
p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, value, "tradeId");
|
|
35
38
|
};
|
|
36
39
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
37
40
|
title: _this.name,
|
|
@@ -40,7 +43,7 @@ var ErpTradeId = /*#__PURE__*/function (_TradeId) {
|
|
|
40
43
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
41
44
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
42
45
|
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,
|
|
43
|
-
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 :
|
|
46
|
+
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 : "",
|
|
44
47
|
component: /*#__PURE__*/React.createElement(OrderNo, _extends({}, _this.componentConfig, {
|
|
45
48
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
46
49
|
onTradeIdBlur: onTradeIdBlur
|
|
@@ -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 = 'SubPicture';
|
|
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,4 +1,7 @@
|
|
|
1
|
+
var _excluded = ["component"];
|
|
1
2
|
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); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
5
|
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
6
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
7
|
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."); }
|
|
@@ -17,12 +20,82 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
17
20
|
import React from "react";
|
|
18
21
|
import { Table } from "antd";
|
|
19
22
|
import { SubForm as SubFormComponent, renderMap } from "@kmkf-fe-packages/basic-components";
|
|
20
|
-
import BsHeaderChild from "../BS/common
|
|
23
|
+
import { BsHeaderChild } from "../BS/common";
|
|
24
|
+
import HeaderChildFile from "./children/HeaderChildFile";
|
|
25
|
+
import HeaderChildPic from "./children/HeaderChildPic";
|
|
21
26
|
import GetFormItem from "../GetFormItem";
|
|
22
27
|
import ItemView from "../../commonComponents/ItemView";
|
|
23
28
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
24
29
|
import { difference } from "lodash";
|
|
25
30
|
import { SYMBOL } from "../../constant";
|
|
31
|
+
var ChildrenMap = {
|
|
32
|
+
INPUT: {
|
|
33
|
+
component: BsHeaderChild
|
|
34
|
+
},
|
|
35
|
+
TEXTAREA: {
|
|
36
|
+
component: BsHeaderChild
|
|
37
|
+
},
|
|
38
|
+
SELECT: {
|
|
39
|
+
component: BsHeaderChild
|
|
40
|
+
},
|
|
41
|
+
RADIO: {
|
|
42
|
+
component: BsHeaderChild,
|
|
43
|
+
transformValue: function transformValue(value) {
|
|
44
|
+
var _value$value;
|
|
45
|
+
if (!(value !== null && value !== void 0 && value.value)) return null;
|
|
46
|
+
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, ")") : "");
|
|
47
|
+
},
|
|
48
|
+
renderExport: function renderExport(value) {
|
|
49
|
+
var _value$value2;
|
|
50
|
+
if (!(value !== null && value !== void 0 && value.value)) return null;
|
|
51
|
+
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$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.indexOf("其他")) > -1 && value !== null && value !== void 0 && value.other ? "(".concat(value === null || value === void 0 ? void 0 : value.other, ")") : "");
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
CHECKBOX: {
|
|
55
|
+
component: BsHeaderChild,
|
|
56
|
+
transformValue: function transformValue(value) {
|
|
57
|
+
var _value$value3, _value$value4, _value$value5;
|
|
58
|
+
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;
|
|
59
|
+
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) {
|
|
60
|
+
return item === "其他";
|
|
61
|
+
});
|
|
62
|
+
if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
|
|
65
|
+
}
|
|
66
|
+
return value === null || value === void 0 ? void 0 : (_value$value5 = value.value) === null || _value$value5 === void 0 ? void 0 : _value$value5.join("/");
|
|
67
|
+
},
|
|
68
|
+
renderExport: function renderExport(value) {
|
|
69
|
+
var _value$value6, _value$value7, _value$value8;
|
|
70
|
+
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;
|
|
71
|
+
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) {
|
|
72
|
+
return item === "其他";
|
|
73
|
+
});
|
|
74
|
+
if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
|
|
77
|
+
}
|
|
78
|
+
return value === null || value === void 0 ? void 0 : (_value$value8 = value.value) === null || _value$value8 === void 0 ? void 0 : _value$value8.join("/");
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
BASIC_MULT_SELECT: {
|
|
82
|
+
component: BsHeaderChild,
|
|
83
|
+
transformValue: function transformValue(value) {
|
|
84
|
+
if (!(value !== null && value !== void 0 && value.length)) return null;
|
|
85
|
+
return value === null || value === void 0 ? void 0 : value.join(",");
|
|
86
|
+
},
|
|
87
|
+
renderExport: function renderExport(value) {
|
|
88
|
+
if (!(value !== null && value !== void 0 && value.length)) return null;
|
|
89
|
+
return value === null || value === void 0 ? void 0 : value.join(",");
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
PICTURE: {
|
|
93
|
+
component: HeaderChildPic
|
|
94
|
+
},
|
|
95
|
+
FILE: {
|
|
96
|
+
component: HeaderChildFile
|
|
97
|
+
}
|
|
98
|
+
};
|
|
26
99
|
var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
27
100
|
var _this = this;
|
|
28
101
|
_classCallCheck(this, SubForm);
|
|
@@ -196,10 +269,13 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
196
269
|
this.isCombinationComponent = true;
|
|
197
270
|
this.canSort = false;
|
|
198
271
|
this.children = (this.getNewTableHeader() || []).map(function (item) {
|
|
199
|
-
|
|
272
|
+
var _ChildrenMap$item$wor = ChildrenMap[item.workOrderComponentType],
|
|
273
|
+
component = _ChildrenMap$item$wor.component,
|
|
274
|
+
other = _objectWithoutProperties(_ChildrenMap$item$wor, _excluded);
|
|
275
|
+
return new component(_objectSpread(_objectSpread({}, options), {}, {
|
|
200
276
|
name: item.name,
|
|
201
277
|
id: "".concat(options.id, "_productList_").concat(item.key)
|
|
202
|
-
}));
|
|
278
|
+
}, other));
|
|
203
279
|
});
|
|
204
280
|
this.dataType = "object";
|
|
205
281
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record, ColumnConfig } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class ETradeId implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -8,13 +8,13 @@ declare class ETradeId implements ComponentInterface {
|
|
|
8
8
|
rules: any[];
|
|
9
9
|
showContains: boolean;
|
|
10
10
|
onlyContainsString: boolean;
|
|
11
|
-
componentConfig: ComponentInterface[
|
|
12
|
-
effects: ComponentInterface[
|
|
11
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
+
effects: ComponentInterface["effects"];
|
|
13
13
|
isCombinationComponent: boolean;
|
|
14
14
|
formField: string;
|
|
15
15
|
canSort: boolean;
|
|
16
16
|
children: ComponentInterface[];
|
|
17
|
-
dataType: ComponentInterface[
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
18
|
constructor(options: PickOption);
|
|
19
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
20
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
@@ -6,11 +6,11 @@ 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 { TradeId } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { TradeId } 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, batchInput } from "../../constant";
|
|
15
15
|
import CopyText from "../../commonComponents/CopyText";
|
|
16
16
|
var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
@@ -50,7 +50,7 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
50
50
|
}, /*#__PURE__*/React.createElement(CopyText, {
|
|
51
51
|
text: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")],
|
|
52
52
|
style: {
|
|
53
|
-
color: ((record === null || record === void 0 ? void 0 : record.repeatValueKeys) || []).includes("".concat(_this.id, "_tradeId")) ?
|
|
53
|
+
color: ((record === null || record === void 0 ? void 0 : record.repeatValueKeys) || []).includes("".concat(_this.id, "_tradeId")) ? "red" : "inherit"
|
|
54
54
|
}
|
|
55
55
|
}));
|
|
56
56
|
});
|
|
@@ -63,13 +63,16 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
63
63
|
});
|
|
64
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
65
65
|
var _record;
|
|
66
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record !== void 0 ? _record :
|
|
66
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record !== void 0 ? _record : "--";
|
|
67
67
|
});
|
|
68
68
|
_defineProperty(this, "editRender", function (p) {
|
|
69
|
-
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$
|
|
69
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$effects2, _this$effects3;
|
|
70
70
|
var onTradeIdBlur = function onTradeIdBlur(e) {
|
|
71
|
-
var _p$onBlur;
|
|
72
|
-
|
|
71
|
+
var _this$effects, _this$effects$form, _p$onBlur;
|
|
72
|
+
(_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : (_this$effects$form = _this$effects.form) === null || _this$effects$form === void 0 ? void 0 : _this$effects$form.setFieldsValue({
|
|
73
|
+
skx_return_billNo_blur_from: _this.id
|
|
74
|
+
});
|
|
75
|
+
p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, e.target.value, "tradeId");
|
|
73
76
|
};
|
|
74
77
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
75
78
|
title: _this.name,
|
|
@@ -78,10 +81,10 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
78
81
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
79
82
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
80
83
|
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,
|
|
81
|
-
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 :
|
|
84
|
+
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 : "",
|
|
82
85
|
component: /*#__PURE__*/React.createElement(TradeId, _extends({}, _this.componentConfig, {
|
|
83
|
-
shopId: (_this$
|
|
84
|
-
shopList: (_this$
|
|
86
|
+
shopId: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopId,
|
|
87
|
+
shopList: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.shopList,
|
|
85
88
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
86
89
|
onBlur: onTradeIdBlur
|
|
87
90
|
}))
|
|
@@ -95,10 +98,10 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
95
98
|
// 过滤组件id
|
|
96
99
|
name: item.name,
|
|
97
100
|
// 过滤组件名称
|
|
98
|
-
filterComponentType:
|
|
101
|
+
filterComponentType: "TradeInput",
|
|
99
102
|
filterFn: function filterFn(value) {
|
|
100
103
|
return function (i) {
|
|
101
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
104
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "tradeId"), value);
|
|
102
105
|
};
|
|
103
106
|
},
|
|
104
107
|
formatFilterValue: function formatFilterValue(value) {
|
|
@@ -119,6 +122,6 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
119
122
|
this.isCombinationComponent = false;
|
|
120
123
|
this.canSort = true;
|
|
121
124
|
this.children = [];
|
|
122
|
-
this.dataType =
|
|
125
|
+
this.dataType = "string";
|
|
123
126
|
});
|
|
124
127
|
export default ETradeId;
|
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 | BsSystemOrder |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | TradeId | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | 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.20",
|
|
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.18",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.5-beta.18",
|
|
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": "ab426f7e72facb55899562d5c4fab5baba8f597d",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|