@kmkf-fe-packages/services-components 2.0.11 → 2.0.12-beta.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/README.md +1 -1
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +10 -9
- package/dist/esm/components/BS/BsSystemOrder/index.js +3 -2
- package/dist/esm/components/BS/common/BsMemo.js +2 -1
- package/dist/esm/components/BS/common/BsType.js +2 -1
- package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
- package/dist/esm/components/Common/index.js +6 -4
- package/dist/esm/components/CommonHeaderGood/index.js +54 -4
- package/dist/esm/components/CommonSystemOrder/index.js +7 -0
- package/dist/esm/components/CommonTradeId/index.js +3 -0
- package/dist/esm/components/JST/JstSendGood/index.js +2 -2
- package/dist/esm/components/Label/index.d.ts +1 -0
- package/dist/esm/components/Label/index.js +9 -0
- package/dist/esm/components/MsgStatus/index.js +7 -2
- package/dist/esm/components/Payment/PaymentAmount.d.ts +0 -1
- package/dist/esm/components/Payment/PaymentAmount.js +0 -4
- package/dist/esm/components/Public/Goods/index.d.ts +38 -0
- package/dist/esm/components/Public/Goods/index.js +132 -0
- package/dist/esm/components/Public/ReissueGoods/index.d.ts +58 -0
- package/dist/esm/components/Public/ReissueGoods/index.js +236 -0
- package/dist/esm/components/Select/index.js +5 -2
- package/dist/esm/components/StatusSelect/index.js +4 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +9 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/package.json +6 -6
- package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
package/README.md
CHANGED
|
@@ -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, promises;
|
|
26
|
+
var hasWdt, hasGy, hasJst, promises;
|
|
27
27
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
28
28
|
while (1) switch (_context.prev = _context.next) {
|
|
29
29
|
case 0:
|
|
@@ -31,27 +31,28 @@ function useGetErpSendData(reduxData, notJudgedErp) {
|
|
|
31
31
|
setGlobalState("loading");
|
|
32
32
|
}
|
|
33
33
|
_context.prev = 1;
|
|
34
|
-
hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
|
|
34
|
+
hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy, hasJst = hasErpData.hasJst;
|
|
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
|
+
_context.next = 9;
|
|
39
40
|
return Promise.all(promises.map(function (promise) {
|
|
40
41
|
return promise();
|
|
41
42
|
}));
|
|
42
|
-
case
|
|
43
|
+
case 9:
|
|
43
44
|
setGlobalState("success");
|
|
44
|
-
_context.next =
|
|
45
|
+
_context.next = 15;
|
|
45
46
|
break;
|
|
46
|
-
case
|
|
47
|
-
_context.prev =
|
|
47
|
+
case 12:
|
|
48
|
+
_context.prev = 12;
|
|
48
49
|
_context.t0 = _context["catch"](1);
|
|
49
50
|
setGlobalState("failed");
|
|
50
|
-
case
|
|
51
|
+
case 15:
|
|
51
52
|
case "end":
|
|
52
53
|
return _context.stop();
|
|
53
54
|
}
|
|
54
|
-
}, _callee, null, [[1,
|
|
55
|
+
}, _callee, null, [[1, 12]]);
|
|
55
56
|
}));
|
|
56
57
|
return function asyncQueryData(_x2, _x3, _x4) {
|
|
57
58
|
return _ref.apply(this, arguments);
|
|
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
11
11
|
import React from "react";
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { isNull, KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import { BsSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { BsSystemOrderTable } from "../../Common";
|
|
17
17
|
import { BsHeaderChild } from "../common/index";
|
|
@@ -22,7 +22,8 @@ var typeMap = {
|
|
|
22
22
|
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG,
|
|
23
23
|
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG,
|
|
24
24
|
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG,
|
|
25
|
-
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG
|
|
25
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG,
|
|
26
|
+
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG
|
|
26
27
|
};
|
|
27
28
|
var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
28
29
|
var _this = this,
|
|
@@ -21,7 +21,8 @@ var componentType = {
|
|
|
21
21
|
WDT_REISSUE_GOODS: "wdtReissueType",
|
|
22
22
|
WDT_RETURN_GOODS: "wdtReturnType",
|
|
23
23
|
BS_E3_REISSUE_GOODS: "bsE3ReissueType",
|
|
24
|
-
GY_REISSUE_GOODS: "gyReissueType"
|
|
24
|
+
GY_REISSUE_GOODS: "gyReissueType",
|
|
25
|
+
JST_REISSUE_GOODS: "jstReissueType"
|
|
25
26
|
};
|
|
26
27
|
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
27
28
|
var _this = this;
|
|
@@ -22,7 +22,8 @@ var componentType = {
|
|
|
22
22
|
WDT_REISSUE_GOODS: "wdtReissueType",
|
|
23
23
|
WDT_RETURN_GOODS: "wdtReturnType",
|
|
24
24
|
BS_E3_REISSUE_GOODS: "bsE3ReissueType",
|
|
25
|
-
GY_REISSUE_GOODS: "gyReissueType"
|
|
25
|
+
GY_REISSUE_GOODS: "gyReissueType",
|
|
26
|
+
JST_REISSUE_GOODS: "jstReissueType"
|
|
26
27
|
};
|
|
27
28
|
var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
28
29
|
var _this = this;
|
|
@@ -17,7 +17,8 @@ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
|
17
17
|
var componentType = {
|
|
18
18
|
WDT_REISSUE_GOODS: "wdtSystemOrderNo",
|
|
19
19
|
BS_E3_REISSUE_GOODS: "bsE3SystemOrderNo",
|
|
20
|
-
GY_REISSUE_GOODS: "gySystemOrderNo"
|
|
20
|
+
GY_REISSUE_GOODS: "gySystemOrderNo",
|
|
21
|
+
JST_REISSUE_GOODS: "jstSystemOrderNo"
|
|
21
22
|
};
|
|
22
23
|
var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
|
|
23
24
|
var _this = this;
|
|
@@ -20,7 +20,7 @@ import { CopyToClipboard } from "react-copy-to-clipboard";
|
|
|
20
20
|
import styles from "./index.module.less";
|
|
21
21
|
import defaultImg from "./img/default-img.png";
|
|
22
22
|
import CopyText from "../../commonComponents/CopyText";
|
|
23
|
-
import { KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, msgTypeCh, getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
|
+
import { KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, msgTypeCh, getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
|
|
24
24
|
import { getColumnsMap } from "./constants/columnsBaseInfoMap";
|
|
25
25
|
var Paragraph = Typography.Paragraph;
|
|
26
26
|
export var getFormItem = function getFormItem(_ref) {
|
|
@@ -640,7 +640,8 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
640
640
|
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
641
641
|
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
642
642
|
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
643
|
-
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
643
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns,
|
|
644
|
+
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns
|
|
644
645
|
};
|
|
645
646
|
var rowKeyMap = {
|
|
646
647
|
BS_SYSTEM_ORDER: "billNo",
|
|
@@ -648,7 +649,8 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
648
649
|
WLN_SYSTEM_ORDER: "billNo",
|
|
649
650
|
WDT_SYSTEM_ORDER: "billNo",
|
|
650
651
|
BS_E3_SYSTEM_ORDER: "orderSn",
|
|
651
|
-
GY_SYSTEM_ORDER: "billNo"
|
|
652
|
+
GY_SYSTEM_ORDER: "billNo",
|
|
653
|
+
JST_SYSTEM_ORDER: "oId"
|
|
652
654
|
};
|
|
653
655
|
var rowSelection = {
|
|
654
656
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
|
|
@@ -731,7 +733,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
731
733
|
var key = item.msgType || "ding";
|
|
732
734
|
var formatMsgContent = /*#__PURE__*/React.createElement("span", {
|
|
733
735
|
key: index
|
|
734
|
-
}, msgTypeCh[key], "-", item.ruleName, "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "");
|
|
736
|
+
}, msgTypeCh[key] || key, "-", item.ruleName, "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "");
|
|
735
737
|
return /*#__PURE__*/React.createElement("div", {
|
|
736
738
|
key: "wrap_".concat(index),
|
|
737
739
|
style: {
|
|
@@ -766,6 +766,44 @@ var GoodHeaderMap = {
|
|
|
766
766
|
isGift: "是否赠品"
|
|
767
767
|
},
|
|
768
768
|
moneyKey: "goodPrice"
|
|
769
|
+
},
|
|
770
|
+
JST_GOODS: {
|
|
771
|
+
headerMap: {
|
|
772
|
+
name: "商品名称",
|
|
773
|
+
skuId: "商品编码",
|
|
774
|
+
iId: "款式编码",
|
|
775
|
+
pic: {
|
|
776
|
+
component: BsHeaderPic,
|
|
777
|
+
name: '商品图片'
|
|
778
|
+
},
|
|
779
|
+
propertiesValue: "规格值",
|
|
780
|
+
saleBasePrice: "原价",
|
|
781
|
+
salePrice: "单价",
|
|
782
|
+
qty: "数量",
|
|
783
|
+
saleAmount: "总金额",
|
|
784
|
+
batchId: "批次号",
|
|
785
|
+
isGift: "是否赠品",
|
|
786
|
+
outerOiId: "子订单号"
|
|
787
|
+
},
|
|
788
|
+
moneyKey: "salePrice"
|
|
789
|
+
},
|
|
790
|
+
JST_REISSUE_GOODS: {
|
|
791
|
+
headerMap: {
|
|
792
|
+
name: "商品名称",
|
|
793
|
+
skuId: "商品编码",
|
|
794
|
+
iId: "款式编码",
|
|
795
|
+
pic: {
|
|
796
|
+
component: BsHeaderPic,
|
|
797
|
+
name: '商品图片'
|
|
798
|
+
},
|
|
799
|
+
propertiesValue: "规格值",
|
|
800
|
+
saleBasePrice: "原价",
|
|
801
|
+
salePrice: "单价",
|
|
802
|
+
qty: "数量",
|
|
803
|
+
isGift: "是否赠品",
|
|
804
|
+
备注: "备注"
|
|
805
|
+
},
|
|
806
|
+
moneyKey: "salePrice"
|
|
769
807
|
}
|
|
770
808
|
};
|
|
771
809
|
GoodHeaderMap["WDT_REISSUE_GOODS"] = GoodHeaderMap["WDT_GOODS"];
|
|
@@ -868,10 +906,22 @@ var CommonHeaderGoods = /*#__PURE__*/function () {
|
|
|
868
906
|
}).map(function (item) {
|
|
869
907
|
return item.dataIndex;
|
|
870
908
|
}).includes(key))) {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
909
|
+
var _this2$itemKey;
|
|
910
|
+
var target = typeof GoodHeaderMap[_this2.type].headerMap[key] === 'string' ? {
|
|
911
|
+
component: BsHeaderChild,
|
|
912
|
+
name: GoodHeaderMap[_this2.type].headerMap[key],
|
|
913
|
+
key: key,
|
|
914
|
+
width: 80
|
|
915
|
+
} : {
|
|
916
|
+
component: GoodHeaderMap[_this2.type].headerMap[key].component || BsHeaderChild,
|
|
917
|
+
name: ((_this2$itemKey = _this2.itemKey) === null || _this2$itemKey === void 0 ? void 0 : _this2$itemKey[key]) || GoodHeaderMap[_this2.type].headerMap[key].name,
|
|
918
|
+
key: GoodHeaderMap[_this2.type].headerMap[key].key || key,
|
|
919
|
+
width: GoodHeaderMap[_this2.type].headerMap[key].width || 80
|
|
920
|
+
};
|
|
921
|
+
prv.push(new target.component(_objectSpread(_objectSpread({}, options), {}, {
|
|
922
|
+
name: target.name,
|
|
923
|
+
id: "".concat(options.id, "_").concat(target.key),
|
|
924
|
+
width: target.width
|
|
875
925
|
})));
|
|
876
926
|
}
|
|
877
927
|
return prv;
|
|
@@ -42,6 +42,13 @@ var typeMap = {
|
|
|
42
42
|
name: "换货单id",
|
|
43
43
|
type: 4,
|
|
44
44
|
valueKey: "billNo"
|
|
45
|
+
},
|
|
46
|
+
AFTER_SALE_TRADE_ID: {
|
|
47
|
+
key: "tradeItemList",
|
|
48
|
+
code: "tradeIdList",
|
|
49
|
+
name: "售后单id",
|
|
50
|
+
type: 5,
|
|
51
|
+
valueKey: "billNo"
|
|
45
52
|
}
|
|
46
53
|
};
|
|
47
54
|
var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(options) {
|
|
@@ -20,7 +20,7 @@ var typeMap = {
|
|
|
20
20
|
name: "jst",
|
|
21
21
|
sendId: "sendId",
|
|
22
22
|
sendName: "sendName",
|
|
23
|
-
platformType: "
|
|
23
|
+
platformType: "jst",
|
|
24
24
|
dataType: "arrayObject"
|
|
25
25
|
},
|
|
26
26
|
BS_SEND_GOOD: {
|
|
@@ -176,7 +176,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
176
176
|
});
|
|
177
177
|
_defineProperty(this, "filterConfig", function (item) {
|
|
178
178
|
var _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type11;
|
|
179
|
-
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
|
|
179
|
+
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "KM_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
|
|
180
180
|
searchDefaultConditions: SYMBOL.in,
|
|
181
181
|
type: item.type,
|
|
182
182
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.sendName),
|
|
@@ -38,6 +38,7 @@ declare class Label implements ComponentInterface {
|
|
|
38
38
|
options: any;
|
|
39
39
|
};
|
|
40
40
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
41
|
+
formatFilterValue: (val: Array<string>) => string[] | undefined;
|
|
41
42
|
};
|
|
42
43
|
formDataTransform: (v: Array<{
|
|
43
44
|
labelShowName: string;
|
|
@@ -140,6 +140,15 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
|
140
140
|
return function (i) {
|
|
141
141
|
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "label")).length > 0;
|
|
142
142
|
};
|
|
143
|
+
},
|
|
144
|
+
formatFilterValue: function formatFilterValue(val) {
|
|
145
|
+
if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
|
|
146
|
+
return val.map(function (item) {
|
|
147
|
+
return JSON.stringify({
|
|
148
|
+
labelShowName: item
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}
|
|
143
152
|
}
|
|
144
153
|
};
|
|
145
154
|
});
|
|
@@ -39,10 +39,15 @@ var typeMap = {
|
|
|
39
39
|
label: "等待执行",
|
|
40
40
|
color: "#e7780f"
|
|
41
41
|
}, {
|
|
42
|
-
oldValue: "
|
|
42
|
+
oldValue: "不满足条件,无需执行",
|
|
43
43
|
value: "不满足条件,无需执行",
|
|
44
44
|
label: "不满足条件,无需执行",
|
|
45
45
|
color: "#8A8A8A"
|
|
46
|
+
}, {
|
|
47
|
+
oldValue: "暂不满足条件,等待执行",
|
|
48
|
+
value: "暂不满足条件,等待执行",
|
|
49
|
+
label: "暂不满足条件,等待执行",
|
|
50
|
+
color: "#4D90F7"
|
|
46
51
|
}],
|
|
47
52
|
key: "msgStatusValues",
|
|
48
53
|
code: "msgStatus4Search",
|
|
@@ -125,7 +130,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
|
|
|
125
130
|
return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
|
|
126
131
|
});
|
|
127
132
|
var key = item.msgType || "ding";
|
|
128
|
-
return "".concat(msgTypeCh[key], "-").concat(item.ruleName, ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "");
|
|
133
|
+
return "".concat(msgTypeCh[key] || key, "-").concat(item.ruleName, ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "");
|
|
129
134
|
}).join(",");
|
|
130
135
|
});
|
|
131
136
|
_defineProperty(this, "editRender", function (p) {
|
|
@@ -36,6 +36,5 @@ declare class PaymentAmount implements ComponentInterface {
|
|
|
36
36
|
formatFilterValue: (val: Array<number | null>) => (number | null)[];
|
|
37
37
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
38
38
|
};
|
|
39
|
-
formDataTransform: (value: string) => string | number;
|
|
40
39
|
}
|
|
41
40
|
export default PaymentAmount;
|
|
@@ -132,10 +132,6 @@ var PaymentAmount = /*#__PURE__*/_createClass(function PaymentAmount(options) {
|
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
});
|
|
135
|
-
_defineProperty(this, "formDataTransform", function (value) {
|
|
136
|
-
var isNumber = new RegExp(/^[+-]?\d+(\.\d+)?$/);
|
|
137
|
-
return isNumber.test(value) ? Number(value) : value;
|
|
138
|
-
});
|
|
139
135
|
this.name = '打款金额';
|
|
140
136
|
this.id = "".concat(options.id, "_enterprisePaymentRefundFee");
|
|
141
137
|
this.sortField = "".concat(options.id, "_enterprisePaymentRefundFee");
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
4
|
+
declare const CONFIG_MAP: {
|
|
5
|
+
JST_GOODS: {
|
|
6
|
+
key: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare class PublicGoods implements ComponentInterface {
|
|
10
|
+
name: string;
|
|
11
|
+
id: string;
|
|
12
|
+
sortField: string;
|
|
13
|
+
type: keyof typeof CONFIG_MAP;
|
|
14
|
+
rules: any[];
|
|
15
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
16
|
+
effects: ComponentInterface["effects"];
|
|
17
|
+
isCombinationComponent: boolean;
|
|
18
|
+
formField: string;
|
|
19
|
+
canSort: boolean;
|
|
20
|
+
children: ComponentInterface[];
|
|
21
|
+
dataType: ComponentInterface["dataType"];
|
|
22
|
+
headers: CommonHeaderGoods;
|
|
23
|
+
constructor(options: PickOption);
|
|
24
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
25
|
+
renderPc: () => null;
|
|
26
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
27
|
+
getComponentValue: (r: Record) => any;
|
|
28
|
+
renderExport: () => null;
|
|
29
|
+
editRender: (p: any) => React.JSX.Element;
|
|
30
|
+
filterConfig: (item: ColumnConfig) => {
|
|
31
|
+
searchDefaultConditions: "like";
|
|
32
|
+
type: string;
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
filterComponentType: "Input";
|
|
36
|
+
}[];
|
|
37
|
+
}
|
|
38
|
+
export default PublicGoods;
|
|
@@ -0,0 +1,132 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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); }
|
|
5
|
+
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); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 "react";
|
|
12
|
+
import GetFormItem from "../../GetFormItem";
|
|
13
|
+
import { BsGoodsTable } from "../../Common";
|
|
14
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
|
+
import { SYMBOL } from "../../../constant";
|
|
19
|
+
var CONFIG_MAP = {
|
|
20
|
+
JST_GOODS: {
|
|
21
|
+
key: 'jstGoods'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
25
|
+
var _this = this,
|
|
26
|
+
_CONFIG_MAP$this$type,
|
|
27
|
+
_this$componentConfig6;
|
|
28
|
+
_classCallCheck(this, PublicGoods);
|
|
29
|
+
_defineProperty(this, "name", void 0);
|
|
30
|
+
_defineProperty(this, "id", void 0);
|
|
31
|
+
_defineProperty(this, "sortField", void 0);
|
|
32
|
+
_defineProperty(this, "type", void 0);
|
|
33
|
+
_defineProperty(this, "rules", void 0);
|
|
34
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
35
|
+
_defineProperty(this, "effects", void 0);
|
|
36
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
37
|
+
_defineProperty(this, "formField", void 0);
|
|
38
|
+
_defineProperty(this, "canSort", void 0);
|
|
39
|
+
_defineProperty(this, "children", void 0);
|
|
40
|
+
_defineProperty(this, "dataType", void 0);
|
|
41
|
+
_defineProperty(this, "headers", void 0);
|
|
42
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
43
|
+
var _record, _CONFIG_MAP$_this$typ, _this$componentConfig;
|
|
44
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
45
|
+
id: _this.id,
|
|
46
|
+
label: _this.name,
|
|
47
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
48
|
+
type: _this.type,
|
|
49
|
+
list: (record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record[(_CONFIG_MAP$_this$typ = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ === void 0 ? void 0 : _CONFIG_MAP$_this$typ.key]) || [],
|
|
50
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
51
|
+
})
|
|
52
|
+
})) : null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "renderPc", function () {
|
|
55
|
+
return null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
58
|
+
var _CONFIG_MAP$_this$typ2, _CONFIG_MAP$_this$typ3, _this$componentConfig2;
|
|
59
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_CONFIG_MAP$_this$typ2 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ2 === void 0 ? void 0 : _CONFIG_MAP$_this$typ2.key)])) return null;
|
|
60
|
+
return /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
61
|
+
type: _this.type,
|
|
62
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_CONFIG_MAP$_this$typ3 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ3 === void 0 ? void 0 : _CONFIG_MAP$_this$typ3.key)]) || [],
|
|
63
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
67
|
+
var _CONFIG_MAP$_this$typ4;
|
|
68
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_CONFIG_MAP$_this$typ4 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ4 === void 0 ? void 0 : _CONFIG_MAP$_this$typ4.key)];
|
|
69
|
+
});
|
|
70
|
+
_defineProperty(this, "renderExport", function () {
|
|
71
|
+
return null;
|
|
72
|
+
});
|
|
73
|
+
_defineProperty(this, "editRender", function (p) {
|
|
74
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3;
|
|
75
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
76
|
+
title: _this.name,
|
|
77
|
+
name: _this.id,
|
|
78
|
+
rules: _this.rules,
|
|
79
|
+
required: false,
|
|
80
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
81
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
82
|
+
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 : "",
|
|
83
|
+
component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
|
|
84
|
+
maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
|
|
85
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
86
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
87
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
88
|
+
type: _this.type,
|
|
89
|
+
width: "90%"
|
|
90
|
+
}))
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
94
|
+
var _CONFIG_MAP$_this$typ5;
|
|
95
|
+
return [{
|
|
96
|
+
searchDefaultConditions: SYMBOL.like,
|
|
97
|
+
type: item.type,
|
|
98
|
+
id: "".concat(item.id, "_").concat((_CONFIG_MAP$_this$typ5 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ5 === void 0 ? void 0 : _CONFIG_MAP$_this$typ5.key),
|
|
99
|
+
// 过滤组件id
|
|
100
|
+
name: item.name,
|
|
101
|
+
// 过滤组件名称
|
|
102
|
+
filterComponentType: "Input"
|
|
103
|
+
}];
|
|
104
|
+
});
|
|
105
|
+
this.type = options.type;
|
|
106
|
+
var key = (_CONFIG_MAP$this$type = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type === void 0 ? void 0 : _CONFIG_MAP$this$type.key;
|
|
107
|
+
this.name = options.name;
|
|
108
|
+
this.id = options.id;
|
|
109
|
+
this.sortField = "".concat(options.id, "_").concat(key);
|
|
110
|
+
this.formField = "".concat(options.id, "_").concat(key);
|
|
111
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
112
|
+
this.isCombinationComponent = true;
|
|
113
|
+
this.canSort = false;
|
|
114
|
+
this.headers = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
115
|
+
id: "".concat(options.id, "_").concat(key),
|
|
116
|
+
name: "商品信息"
|
|
117
|
+
}));
|
|
118
|
+
this.children = [this.headers];
|
|
119
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
120
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
|
|
121
|
+
required: true,
|
|
122
|
+
validator: function validator(_, value) {
|
|
123
|
+
var _value$key;
|
|
124
|
+
if (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length)) {
|
|
125
|
+
return Promise.reject(new Error("请选择聚水潭商品"));
|
|
126
|
+
}
|
|
127
|
+
return Promise.resolve();
|
|
128
|
+
}
|
|
129
|
+
}] : [];
|
|
130
|
+
this.dataType = "object";
|
|
131
|
+
});
|
|
132
|
+
export default PublicGoods;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
|
|
4
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
5
|
+
declare class PublicReissue implements ComponentInterface {
|
|
6
|
+
name: string;
|
|
7
|
+
id: string;
|
|
8
|
+
sortField: string;
|
|
9
|
+
type: string;
|
|
10
|
+
rules: any[];
|
|
11
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
+
effects: ComponentInterface["effects"];
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
bsType: BsType;
|
|
19
|
+
bsMemo: BsMemo;
|
|
20
|
+
systemOrderNo: SystemOrderNo;
|
|
21
|
+
reissueGoods: BsHeaderGood | CommonHeaderGoods;
|
|
22
|
+
constructor(options: PickOption);
|
|
23
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
24
|
+
renderPc: () => null;
|
|
25
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
26
|
+
getComponentValue: (r: Record) => {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
renderExport: () => null;
|
|
30
|
+
editRender: (p: any) => React.JSX.Element;
|
|
31
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
32
|
+
searchDefaultConditions: "in";
|
|
33
|
+
type: string;
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
filterComponentType: "Cascader";
|
|
37
|
+
props: {
|
|
38
|
+
options: any[] | undefined;
|
|
39
|
+
fieldNames: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
children: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
formatFilterValue: (val: Array<string>) => string[] | undefined;
|
|
46
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
47
|
+
} | {
|
|
48
|
+
searchDefaultConditions: "like";
|
|
49
|
+
type: string;
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
filterComponentType: "Input";
|
|
53
|
+
props?: undefined;
|
|
54
|
+
formatFilterValue?: undefined;
|
|
55
|
+
filterFn?: undefined;
|
|
56
|
+
})[];
|
|
57
|
+
}
|
|
58
|
+
export default PublicReissue;
|