@kmkf-fe-packages/services-components 2.4.0-rc.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/Hooks/index.d.ts +2 -0
- package/dist/esm/Hooks/index.js +2 -0
- package/dist/esm/Hooks/useColumnsConfig.d.ts +26 -0
- package/dist/esm/Hooks/useColumnsConfig.js +243 -0
- package/dist/esm/Hooks/useGoodsSourceFormat.d.ts +29 -0
- package/dist/esm/Hooks/useGoodsSourceFormat.js +441 -0
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +4 -2
- package/dist/esm/commonComponents/GlobalContext/index.js +10 -3
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +14 -11
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +14 -12
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +11 -9
- package/dist/esm/commonComponents/OperationLog/index.d.ts +2 -1
- package/dist/esm/commonComponents/OperationLog/index.js +4 -2
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +5 -3
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -19
- package/dist/esm/commonComponents/ShopList/index.js +3 -1
- package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -2
- package/dist/esm/components/BS/BsLogistics/index.js +61 -8
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +56 -9
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderChild.js +8 -8
- package/dist/esm/components/BS/common/BsHeaderGood.js +2 -2
- package/dist/esm/components/BS/common/BsHeaderPic.d.ts +2 -0
- package/dist/esm/components/BS/common/BsHeaderPic.js +20 -10
- package/dist/esm/components/BS/common/BsMemo.js +4 -1
- package/dist/esm/components/BS/common/BsType.js +4 -1
- package/dist/esm/components/BS/common/SystemOrderNo.js +4 -1
- package/dist/esm/components/BS/common/expressCode.d.ts +4 -1
- package/dist/esm/components/BS/common/expressCode.js +16 -4
- package/dist/esm/components/BS/common/expressCompany.d.ts +5 -2
- package/dist/esm/components/BS/common/expressCompany.js +31 -5
- package/dist/esm/components/BsE3/BsReissueE3/index.js +4 -1
- package/dist/esm/components/Cascader/index.d.ts +8 -6
- package/dist/esm/components/Cascader/index.js +26 -22
- package/dist/esm/components/Common/constants/bs.js +2 -2
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -2
- package/dist/esm/components/Common/constants/defaultColumns.js +2 -2
- package/dist/esm/components/Common/constants/wdt.js +104 -0
- package/dist/esm/components/Common/index.d.ts +3 -3
- package/dist/esm/components/Common/index.js +49 -28
- package/dist/esm/components/CommonDataTime/index.d.ts +2 -2
- package/dist/esm/components/CommonDataTime/index.js +2 -2
- package/dist/esm/components/CommonHeaderGood/index.js +1165 -18
- package/dist/esm/components/CommonInput/index.js +11 -3
- package/dist/esm/components/CommonMultiStatus/index.js +73 -36
- 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 -10
- package/dist/esm/components/FlowOverallStatusSelect/index.d.ts +40 -0
- package/dist/esm/components/FlowOverallStatusSelect/index.js +180 -0
- package/dist/esm/components/GY/GyGoods/index.js +5 -1
- package/dist/esm/components/GY/GyReissue/index.js +5 -1
- package/dist/esm/components/GY/GyReturn/index.js +5 -1
- package/dist/esm/components/Input/index.d.ts +4 -4
- package/dist/esm/components/Input/index.js +35 -31
- package/dist/esm/components/JST/JstSendGood/index.js +17 -1
- package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
- package/dist/esm/components/KM/KmExchange/index.js +136 -0
- package/dist/esm/components/KmErpSendGood/index.js +1 -1
- package/dist/esm/components/Logistics/index.d.ts +1 -0
- package/dist/esm/components/Logistics/index.js +10 -0
- package/dist/esm/components/LogisticsInterception/columnHeader.js +1 -1
- package/dist/esm/components/LogisticsInterception/index.d.ts +20 -0
- package/dist/esm/components/LogisticsInterception/index.js +10 -5
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.d.ts +45 -0
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.js +97 -0
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +3 -2
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +4 -2
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +5 -5
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +9 -9
- package/dist/esm/components/OrderSubForm/index.d.ts +56 -0
- package/dist/esm/components/OrderSubForm/index.js +285 -0
- package/dist/esm/components/Payment/index.d.ts +13 -12
- package/dist/esm/components/Payment/index.js +31 -11
- package/dist/esm/components/PaymentVoucherCode/Preview.js +35 -9
- package/dist/esm/components/Picture/index.d.ts +5 -5
- package/dist/esm/components/Picture/index.js +20 -20
- package/dist/esm/components/PicturePro/index.d.ts +15 -6
- package/dist/esm/components/PicturePro/index.js +42 -25
- package/dist/esm/components/PostIng/index.d.ts +5 -0
- package/dist/esm/components/PostIng/index.js +42 -8
- package/dist/esm/components/Public/Goods/index.d.ts +10 -8
- package/dist/esm/components/Public/Goods/index.js +42 -2
- package/dist/esm/components/Public/ReissueGoods/index.js +62 -4
- package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
- package/dist/esm/components/Public/ReturnWarehouse/index.js +210 -0
- package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
- package/dist/esm/components/ReceiverAddress/index.js +41 -27
- package/dist/esm/components/Reissue/Logistics/index.js +2 -2
- package/dist/esm/components/Remark/index.d.ts +18 -2
- package/dist/esm/components/Remark/index.js +37 -2
- package/dist/esm/components/ReturnLogistics/index.d.ts +7 -6
- package/dist/esm/components/ReturnLogistics/index.js +34 -17
- package/dist/esm/components/SKX/SkxGoods/index.js +4 -0
- package/dist/esm/components/SKX/SkxIdInputSelect/index.js +4 -0
- package/dist/esm/components/Select/index.d.ts +1 -0
- package/dist/esm/components/Select/index.js +22 -11
- package/dist/esm/components/ShopInput/index.d.ts +5 -5
- package/dist/esm/components/ShopInput/index.js +12 -9
- package/dist/esm/components/StatusSelect/index.js +4 -0
- 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 +78 -6
- package/dist/esm/components/TradeId/index.d.ts +5 -5
- package/dist/esm/components/TradeId/index.js +17 -14
- package/dist/esm/components/WDT/WdtRessuie/index.js +28 -8
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +37 -7
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +7 -1
- package/dist/esm/service/api.d.ts +3 -0
- package/dist/esm/service/api.js +34 -1
- package/dist/esm/type.d.ts +38 -0
- package/package.json +4 -4
- package/dist/esm/components/Common/constants/gy.d.ts +0 -3
- package/dist/esm/components/Common/constants/gy.js +0 -219
|
@@ -8,9 +8,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
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; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
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); }
|
|
11
|
-
import React from
|
|
12
|
-
import { ExpressData } from
|
|
13
|
-
import { ExpressLogistics } from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import { ExpressLogistics } from "@kmkf-fe-packages/basic-components";
|
|
14
14
|
import Express from "../Express";
|
|
15
15
|
import ExpressCode from "../ExpressCode";
|
|
16
16
|
import GetFormItem from "../GetFormItem";
|
|
@@ -33,6 +33,7 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
|
|
|
33
33
|
_defineProperty(this, "canSort", void 0);
|
|
34
34
|
_defineProperty(this, "children", void 0);
|
|
35
35
|
_defineProperty(this, "dataType", void 0);
|
|
36
|
+
_defineProperty(this, "isChange", void 0);
|
|
36
37
|
_defineProperty(this, "renderClient", function (record) {
|
|
37
38
|
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record));
|
|
38
39
|
});
|
|
@@ -53,6 +54,20 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
|
|
|
53
54
|
});
|
|
54
55
|
_defineProperty(this, "editRender", function (p) {
|
|
55
56
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
|
|
57
|
+
var onReturnLogisticsCodeBlur = function onReturnLogisticsCodeBlur(val) {
|
|
58
|
+
if (_this.isChange) {
|
|
59
|
+
var _p$onBlur;
|
|
60
|
+
p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, val, "returnLogisticsCode");
|
|
61
|
+
_this.isChange = false;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var onReturnLogisticsCodeChange = function onReturnLogisticsCodeChange() {
|
|
65
|
+
_this.isChange = true;
|
|
66
|
+
for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
67
|
+
e[_key] = arguments[_key];
|
|
68
|
+
}
|
|
69
|
+
p === null || p === void 0 ? void 0 : p.onChange.apply(p, e);
|
|
70
|
+
};
|
|
56
71
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
57
72
|
title: _this.name,
|
|
58
73
|
name: _this.id,
|
|
@@ -60,18 +75,19 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
|
|
|
60
75
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
61
76
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
62
77
|
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,
|
|
63
|
-
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 :
|
|
78
|
+
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 : "",
|
|
64
79
|
component: /*#__PURE__*/React.createElement(ExpressLogistics, _extends({}, _this.componentConfig, {
|
|
65
80
|
options: _this.expressDateInstance.getExpressData(),
|
|
66
|
-
onBlur:
|
|
81
|
+
onBlur: onReturnLogisticsCodeBlur,
|
|
82
|
+
onChange: onReturnLogisticsCodeChange
|
|
67
83
|
}))
|
|
68
84
|
});
|
|
69
85
|
});
|
|
70
86
|
_defineProperty(this, "filterConfig", function (item) {
|
|
71
87
|
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
72
|
-
subKey:
|
|
88
|
+
subKey: "returnLogisticsCompany"
|
|
73
89
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
74
|
-
subKey:
|
|
90
|
+
subKey: "returnLogisticsCode"
|
|
75
91
|
}))];
|
|
76
92
|
});
|
|
77
93
|
this.name = options.name;
|
|
@@ -80,37 +96,38 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
|
|
|
80
96
|
this.formField = options.id;
|
|
81
97
|
this.type = options.type;
|
|
82
98
|
this.showContains = false;
|
|
83
|
-
this.dataType =
|
|
99
|
+
this.dataType = "string";
|
|
84
100
|
this.componentConfig = options.componentConfig;
|
|
85
101
|
this.expressDateInstance = ExpressData.getInstance();
|
|
86
102
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
87
|
-
name:
|
|
103
|
+
name: "退货物流公司",
|
|
88
104
|
id: "".concat(options.id, "_returnLogisticsCompany")
|
|
89
105
|
}));
|
|
90
106
|
this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
91
|
-
name:
|
|
107
|
+
name: "退货物流单号",
|
|
92
108
|
id: "".concat(options.id, "_returnLogisticsCode")
|
|
93
109
|
}));
|
|
94
110
|
this.isCombinationComponent = true;
|
|
95
111
|
this.canSort = false;
|
|
96
|
-
this.dataType =
|
|
112
|
+
this.dataType = "object";
|
|
97
113
|
this.children = [this.express, this.expressCode];
|
|
114
|
+
this.isChange = false;
|
|
98
115
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
99
116
|
validator: function validator(_, value) {
|
|
100
117
|
var _this$componentConfig6;
|
|
101
118
|
if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.isSingle) {
|
|
102
119
|
var _this$componentConfig7, _this$componentConfig8;
|
|
103
|
-
if (((_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.showField) ===
|
|
104
|
-
return Promise.reject(new Error(
|
|
105
|
-
} else if (((_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.showField) ===
|
|
106
|
-
return Promise.reject(new Error(
|
|
120
|
+
if (((_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.showField) === "EXPRESS_COMPANY" && !(value !== null && value !== void 0 && value.company)) {
|
|
121
|
+
return Promise.reject(new Error("请选择物流公司"));
|
|
122
|
+
} else if (((_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.showField) === "EXPRESS_WAYBILL_CODE" && !(value !== null && value !== void 0 && value.order)) {
|
|
123
|
+
return Promise.reject(new Error("请输入物流单号"));
|
|
107
124
|
}
|
|
108
125
|
} else {
|
|
109
126
|
if (!(value !== null && value !== void 0 && value.company)) {
|
|
110
|
-
return Promise.reject(new Error(
|
|
127
|
+
return Promise.reject(new Error("请选择物流公司"));
|
|
111
128
|
}
|
|
112
129
|
if (!(value !== null && value !== void 0 && value.order)) {
|
|
113
|
-
return Promise.reject(new Error(
|
|
130
|
+
return Promise.reject(new Error("请输入物流单号"));
|
|
114
131
|
}
|
|
115
132
|
}
|
|
116
133
|
return Promise.resolve();
|
|
@@ -16,6 +16,10 @@ var typeMap = {
|
|
|
16
16
|
SKX_OUTBOUND_NOTICE_NO: {
|
|
17
17
|
key: "skxOutboundNoticeNo",
|
|
18
18
|
blurType: "skxOutboundNoticeNo"
|
|
19
|
+
},
|
|
20
|
+
SKX_RETURN_BILL_NO: {
|
|
21
|
+
key: "skxReturnBillNo",
|
|
22
|
+
blurType: "skxReturnBillNo"
|
|
19
23
|
}
|
|
20
24
|
};
|
|
21
25
|
var SkxIdInputSelect = /*#__PURE__*/_createClass(function SkxIdInputSelect(options) {
|
|
@@ -16,6 +16,7 @@ declare class BasicSelect implements ComponentInterface {
|
|
|
16
16
|
optionsMap: ComponentInterface["optionsMap"];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
getKeyByComponentType: (type: string) => any;
|
|
19
|
+
getIsValue: () => boolean;
|
|
19
20
|
editRender: (p: any) => React.JSX.Element;
|
|
20
21
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
22
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -31,11 +31,17 @@ var typeMap = {
|
|
|
31
31
|
},
|
|
32
32
|
EXECUTE_ACTION_TYPE: {
|
|
33
33
|
key: "executeActionType"
|
|
34
|
+
},
|
|
35
|
+
ERP_ORDER_STATUS: {
|
|
36
|
+
key: "erpOrderStatus"
|
|
37
|
+
},
|
|
38
|
+
JST_OUTBOUND_STATUS: {
|
|
39
|
+
key: "jstOutboundStatus"
|
|
34
40
|
}
|
|
35
41
|
};
|
|
36
42
|
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
37
43
|
var _this = this,
|
|
38
|
-
_this$
|
|
44
|
+
_this$componentConfig6,
|
|
39
45
|
_this$options;
|
|
40
46
|
_classCallCheck(this, BasicSelect);
|
|
41
47
|
_defineProperty(this, "name", void 0);
|
|
@@ -54,16 +60,20 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
54
60
|
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
55
61
|
return typeMap[type].key || "";
|
|
56
62
|
});
|
|
63
|
+
_defineProperty(this, "getIsValue", function () {
|
|
64
|
+
var _this$componentConfig;
|
|
65
|
+
return ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.webUniqueKey) === "PLATFORM_STATUS" || _this.type === "JST_OUTBOUND_STATUS";
|
|
66
|
+
});
|
|
57
67
|
_defineProperty(this, "editRender", function (p) {
|
|
58
|
-
var _this$
|
|
68
|
+
var _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
|
|
59
69
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
60
70
|
title: _this.name,
|
|
61
71
|
name: _this.id,
|
|
62
72
|
rules: _this.rules,
|
|
63
73
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
64
74
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
65
|
-
required: (_this$
|
|
66
|
-
tooltip: (_this$
|
|
75
|
+
required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
|
|
76
|
+
tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : "",
|
|
67
77
|
component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
|
|
68
78
|
placeholder: typeMap[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
69
79
|
showSearch: true,
|
|
@@ -72,9 +82,10 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
72
82
|
});
|
|
73
83
|
});
|
|
74
84
|
_defineProperty(this, "renderClient", function (record) {
|
|
75
|
-
var _this$
|
|
85
|
+
var _this$optionsMap;
|
|
86
|
+
console.log("renderClient", record, _this.getIsValue());
|
|
76
87
|
// 特殊自定义组件为平台状态时匹配出label
|
|
77
|
-
var label =
|
|
88
|
+
var label = _this.getIsValue() ? (_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
|
|
78
89
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
79
90
|
id: _this.id,
|
|
80
91
|
label: _this.name,
|
|
@@ -82,11 +93,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
82
93
|
}) : null;
|
|
83
94
|
});
|
|
84
95
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
85
|
-
var _this$
|
|
96
|
+
var _this$optionsMap2;
|
|
86
97
|
var type = _this.type;
|
|
87
98
|
var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
88
99
|
// 特殊自定义组件为平台状态时匹配出label
|
|
89
|
-
var label =
|
|
100
|
+
var label = _this.getIsValue() ? ((_this$optionsMap2 = _this.optionsMap) === null || _this$optionsMap2 === void 0 ? void 0 : _this$optionsMap2[key]) || "" : key;
|
|
90
101
|
return /*#__PURE__*/React.createElement("span", null, label !== null && label !== void 0 ? label : "--");
|
|
91
102
|
});
|
|
92
103
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -99,11 +110,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
99
110
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
100
111
|
});
|
|
101
112
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
102
|
-
var _this$
|
|
113
|
+
var _this$optionsMap3;
|
|
103
114
|
var type = _this.type;
|
|
104
115
|
var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
105
116
|
// 特殊自定义组件为平台状态时匹配出label
|
|
106
|
-
var label =
|
|
117
|
+
var label = _this.getIsValue() ? ((_this$optionsMap3 = _this.optionsMap) === null || _this$optionsMap3 === void 0 ? void 0 : _this$optionsMap3[key]) || "" : key;
|
|
107
118
|
return label !== null && label !== void 0 ? label : "--";
|
|
108
119
|
});
|
|
109
120
|
_defineProperty(this, "filterConfig", function (item) {
|
|
@@ -138,7 +149,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
138
149
|
this.canSort = true;
|
|
139
150
|
this.children = [];
|
|
140
151
|
this.dataType = "string";
|
|
141
|
-
this.options = ((_this$
|
|
152
|
+
this.options = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || [];
|
|
142
153
|
this.optionsMap = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.reduce(function (prev, next) {
|
|
143
154
|
prev[next.value] = next.label;
|
|
144
155
|
return prev;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ComponentInterface, ColumnConfig, Record, PickOption } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentInterface, ColumnConfig, Record, PickOption } from "../../type";
|
|
3
3
|
declare class ShopInput implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -11,9 +11,9 @@ declare class ShopInput implements ComponentInterface {
|
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
15
|
-
options: ComponentInterface[
|
|
16
|
-
format: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
options: ComponentInterface["options"];
|
|
16
|
+
format: ComponentInterface["format"];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
renderPc: (shopName: unknown, record: any) => React.JSX.Element;
|
|
19
19
|
renderLog: (record: Record) => any;
|
|
@@ -5,9 +5,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
8
|
+
import React from "react";
|
|
9
9
|
import PlatformAvatar from "../../commonComponents/PlatformAvatar";
|
|
10
|
-
import { filterFn as _filterFn } from
|
|
10
|
+
import { filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
11
|
import { SYMBOL } from "../../constant";
|
|
12
12
|
var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
13
13
|
var _this = this,
|
|
@@ -35,15 +35,18 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
|
35
35
|
}), record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
36
36
|
});
|
|
37
37
|
_defineProperty(this, "renderLog", function (record) {
|
|
38
|
+
var _this$options, _this$options$find;
|
|
38
39
|
if (!(record !== null && record !== void 0 && record[_this.id])) return null;
|
|
39
|
-
return
|
|
40
|
+
return (_this$options = _this.options) === null || _this$options === void 0 ? void 0 : (_this$options$find = _this$options.find(function (t) {
|
|
41
|
+
return (t === null || t === void 0 ? void 0 : t.uniqueKey) === (record === null || record === void 0 ? void 0 : record[_this.id]);
|
|
42
|
+
})) === null || _this$options$find === void 0 ? void 0 : _this$options$find.shopName;
|
|
40
43
|
});
|
|
41
44
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
45
|
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
43
46
|
});
|
|
44
47
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
45
48
|
var _record;
|
|
46
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record :
|
|
49
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
|
|
47
50
|
});
|
|
48
51
|
_defineProperty(this, "renderClient", function () {
|
|
49
52
|
return null;
|
|
@@ -60,10 +63,10 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
|
60
63
|
// 过滤组件id
|
|
61
64
|
name: item.name,
|
|
62
65
|
// 过滤组件名称
|
|
63
|
-
filterComponentType:
|
|
66
|
+
filterComponentType: "ShopList",
|
|
64
67
|
props: {
|
|
65
68
|
shopList: (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopList) || [],
|
|
66
|
-
mode:
|
|
69
|
+
mode: "multiple"
|
|
67
70
|
},
|
|
68
71
|
filterFn: function filterFn(value) {
|
|
69
72
|
return function (i) {
|
|
@@ -72,7 +75,7 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
|
72
75
|
return value === null || value === void 0 ? void 0 : value.includes(item.shopId);
|
|
73
76
|
})) === null || _this$effects2$shopLi2 === void 0 ? void 0 : (_this$effects2$shopLi3 = _this$effects2$shopLi2.map(function (item) {
|
|
74
77
|
return item.shopId;
|
|
75
|
-
})) === null || _this$effects2$shopLi3 === void 0 ? void 0 : _this$effects2$shopLi3.includes(_filterFn.filterTableListItemColumnValue(i,
|
|
78
|
+
})) === null || _this$effects2$shopLi3 === void 0 ? void 0 : _this$effects2$shopLi3.includes(_filterFn.filterTableListItemColumnValue(i, "shopId", ""));
|
|
76
79
|
};
|
|
77
80
|
},
|
|
78
81
|
formatFilterValue: function formatFilterValue(shopList) {
|
|
@@ -95,8 +98,8 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
|
95
98
|
this.isCombinationComponent = false;
|
|
96
99
|
this.canSort = true;
|
|
97
100
|
this.children = [];
|
|
98
|
-
this.dataType =
|
|
101
|
+
this.dataType = "string";
|
|
99
102
|
this.options = this === null || this === void 0 ? void 0 : (_this$effects4 = this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.shopList;
|
|
100
|
-
this.format =
|
|
103
|
+
this.format = "shopInput";
|
|
101
104
|
});
|
|
102
105
|
export default ShopInput;
|
|
@@ -36,6 +36,10 @@ var selectTypeMap = {
|
|
|
36
36
|
key: "agreeRefundStatusValue",
|
|
37
37
|
info: "agreeRefundStatusReason"
|
|
38
38
|
}),
|
|
39
|
+
REPAIR_ORDER_STATUS: getSelectTypeAttribute({
|
|
40
|
+
key: "repairOrderStatusValue",
|
|
41
|
+
info: "repairOrderStatusReason"
|
|
42
|
+
}),
|
|
39
43
|
REJECT_REFUND_STATUS: getSelectTypeAttribute({
|
|
40
44
|
key: "rejectRefundStatusValue",
|
|
41
45
|
info: "rejectRefundStatusReason"
|
|
@@ -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;
|