@kmkf-fe-packages/services-components 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +2 -3
- package/dist/esm/components/BS/common/BsMemo.js +1 -2
- package/dist/esm/components/BS/common/BsType.js +1 -2
- package/dist/esm/components/Cascader/index.d.ts +0 -1
- package/dist/esm/components/Cascader/index.js +1 -4
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +4 -185
- package/dist/esm/components/CommonHeaderGood/index.js +0 -182
- package/dist/esm/components/CommonMultiStatus/index.js +19 -25
- package/dist/esm/components/CommonSystemOrder/index.js +8 -10
- package/dist/esm/components/StatusSelect/index.js +0 -3
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +1 -7
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +0 -3
- package/dist/esm/service/api.d.ts +0 -1
- package/dist/esm/service/api.js +1 -20
- package/dist/esm/type.d.ts +2 -3
- package/package.json +4 -4
- package/dist/esm/components/Label/index.d.ts +0 -36
- package/dist/esm/components/Label/index.js +0 -142
- package/dist/esm/components/WDT/WdtExchange/index.d.ts +0 -35
- package/dist/esm/components/WDT/WdtExchange/index.js +0 -183
- package/dist/esm/components/WDT/WdtReturn/index.d.ts +0 -54
- package/dist/esm/components/WDT/WdtReturn/index.js +0 -150
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData";
|
|
3
3
|
declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
|
|
4
4
|
requestList?: RequestType[] | undefined;
|
|
5
5
|
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState } from "react";
|
|
17
17
|
import { Skeleton, Result, Button } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData,
|
|
18
|
+
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
|
|
19
19
|
import { servers } from '@kmkf-fe-packages/kmkf-utils';
|
|
20
20
|
var Global = function Global(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
@@ -39,9 +39,8 @@ var Global = function Global(_ref) {
|
|
|
39
39
|
queryExpressInterceptData: queryExpressInterceptData,
|
|
40
40
|
queryLogisticsAddressData: queryLogisticsAddressData,
|
|
41
41
|
queryPlatData: queryPlatData,
|
|
42
|
-
queryAllLogisticsCompany: queryAllLogisticsCompany,
|
|
43
|
-
queryLabel: queryLabel,
|
|
44
42
|
queryWdtAddressData: servers.queryWdtAddressData,
|
|
43
|
+
queryAllLogisticsCompany: queryAllLogisticsCompany,
|
|
45
44
|
queryWdtLogisticsCompany: queryWdtLogisticsCompany,
|
|
46
45
|
queryWdtSendData: queryWdtSendData
|
|
47
46
|
};
|
|
@@ -18,8 +18,7 @@ var componentType = {
|
|
|
18
18
|
BS_EXCHANGE_GOODS: 'bsExchangeType',
|
|
19
19
|
BS_REISSUE_GOODS: 'bsReissueType',
|
|
20
20
|
BS_RETURN_GOODS: 'bsReturnType',
|
|
21
|
-
WDT_REISSUE_GOODS: 'wdtReissueType'
|
|
22
|
-
WDT_RETURN_GOODS: 'wdtReturnType'
|
|
21
|
+
WDT_REISSUE_GOODS: 'wdtReissueType'
|
|
23
22
|
};
|
|
24
23
|
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
25
24
|
var _this = this;
|
|
@@ -19,8 +19,7 @@ var componentType = {
|
|
|
19
19
|
BS_EXCHANGE_GOODS: 'bsExchangeType',
|
|
20
20
|
BS_REISSUE_GOODS: 'bsReissueType',
|
|
21
21
|
BS_RETURN_GOODS: 'bsReturnType',
|
|
22
|
-
WDT_REISSUE_GOODS: 'wdtReissueType'
|
|
23
|
-
WDT_RETURN_GOODS: 'wdtReturnType'
|
|
22
|
+
WDT_REISSUE_GOODS: 'wdtReissueType'
|
|
24
23
|
};
|
|
25
24
|
var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
26
25
|
var _this = this;
|
|
@@ -13,7 +13,6 @@ declare class BasicCascader implements ComponentInterface {
|
|
|
13
13
|
children: ComponentInterface[];
|
|
14
14
|
dataType: ComponentInterface['dataType'];
|
|
15
15
|
format: ComponentInterface['format'];
|
|
16
|
-
options: ComponentInterface['options'];
|
|
17
16
|
constructor(options: PickOption);
|
|
18
17
|
/**
|
|
19
18
|
* 通过值计算展示内容
|
|
@@ -15,8 +15,7 @@ import ItemView from "../../commonComponents/ItemView";
|
|
|
15
15
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
16
|
import { SYMBOL } from "../../constant";
|
|
17
17
|
var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
18
|
-
var _this = this
|
|
19
|
-
_this$componentConfig7;
|
|
18
|
+
var _this = this;
|
|
20
19
|
_classCallCheck(this, BasicCascader);
|
|
21
20
|
_defineProperty(this, "name", void 0);
|
|
22
21
|
_defineProperty(this, "id", void 0);
|
|
@@ -30,7 +29,6 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
30
29
|
_defineProperty(this, "children", void 0);
|
|
31
30
|
_defineProperty(this, "dataType", void 0);
|
|
32
31
|
_defineProperty(this, "format", void 0);
|
|
33
|
-
_defineProperty(this, "options", void 0);
|
|
34
32
|
_defineProperty(this, "getValues", function (value) {
|
|
35
33
|
var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
|
|
36
34
|
return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
|
|
@@ -149,7 +147,6 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
149
147
|
this.canSort = true;
|
|
150
148
|
this.dataType = 'array';
|
|
151
149
|
this.format = 'cascader';
|
|
152
|
-
this.options = ((_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.options) || [];
|
|
153
150
|
}
|
|
154
151
|
|
|
155
152
|
/**
|
|
@@ -17,7 +17,7 @@ export declare const ShowTotalImage: ({ total, allImage, type, showHeader, }: an
|
|
|
17
17
|
export declare const GoodImage: ({ list, type, showHeader }: any) => React.JSX.Element | null;
|
|
18
18
|
export declare const JstGoodImage: ({ list, type, platformType }: any) => any;
|
|
19
19
|
export declare const BsExpressRender: ({ list, showField, platformType }: any) => any;
|
|
20
|
-
export declare const CommonOrderContent: ({ list, valueKey, failValue, options,
|
|
20
|
+
export declare const CommonOrderContent: ({ list, valueKey, failValue, options, }: any) => any;
|
|
21
21
|
export declare const BsGoodImage: ({ item, index }: {
|
|
22
22
|
item: any;
|
|
23
23
|
index: number;
|
|
@@ -311,9 +311,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
311
311
|
valueKey = _ref8.valueKey,
|
|
312
312
|
failValue = _ref8.failValue,
|
|
313
313
|
_ref8$options = _ref8.options,
|
|
314
|
-
options = _ref8$options === void 0 ? [] : _ref8$options
|
|
315
|
-
_ref8$isShowPopover = _ref8.isShowPopover,
|
|
316
|
-
isShowPopover = _ref8$isShowPopover === void 0 ? true : _ref8$isShowPopover;
|
|
314
|
+
options = _ref8$options === void 0 ? [] : _ref8$options;
|
|
317
315
|
var orderContent = function orderContent(item, index) {
|
|
318
316
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
319
317
|
style: {
|
|
@@ -329,7 +327,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
329
327
|
var currentOption = options.find(function (option) {
|
|
330
328
|
return item[valueKey] === option.value;
|
|
331
329
|
});
|
|
332
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null,
|
|
330
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
333
331
|
content: orderContent(item, index),
|
|
334
332
|
overlayStyle: {
|
|
335
333
|
zIndex: 1080
|
|
@@ -340,7 +338,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
340
338
|
color: '#1890ff',
|
|
341
339
|
cursor: 'pointer'
|
|
342
340
|
}
|
|
343
|
-
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":"))
|
|
341
|
+
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
|
|
344
342
|
style: {
|
|
345
343
|
color: color
|
|
346
344
|
}
|
|
@@ -417,6 +415,7 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
417
415
|
text = _ref11$text === void 0 ? '' : _ref11$text,
|
|
418
416
|
type = _ref11.type;
|
|
419
417
|
//商品信息
|
|
418
|
+
|
|
420
419
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
421
420
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
422
421
|
return function (type) {
|
|
@@ -569,186 +568,6 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
569
568
|
}
|
|
570
569
|
}];
|
|
571
570
|
break;
|
|
572
|
-
case 'WDT_RETURN_GOODS':
|
|
573
|
-
{
|
|
574
|
-
columns = [{
|
|
575
|
-
dataIndex: 'goodId',
|
|
576
|
-
title: "SPUID",
|
|
577
|
-
align: 'center',
|
|
578
|
-
ellipsis: true,
|
|
579
|
-
width: 70
|
|
580
|
-
}, {
|
|
581
|
-
dataIndex: 'goodNo',
|
|
582
|
-
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
583
|
-
align: 'center',
|
|
584
|
-
ellipsis: true,
|
|
585
|
-
width: 180
|
|
586
|
-
}, {
|
|
587
|
-
dataIndex: 'goodName',
|
|
588
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
589
|
-
align: 'center',
|
|
590
|
-
ellipsis: true,
|
|
591
|
-
width: 250
|
|
592
|
-
}, {
|
|
593
|
-
dataIndex: 'specId',
|
|
594
|
-
title: "".concat(text, "SKUID"),
|
|
595
|
-
align: 'center',
|
|
596
|
-
ellipsis: true,
|
|
597
|
-
width: 100
|
|
598
|
-
}, {
|
|
599
|
-
dataIndex: 'specNo',
|
|
600
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
601
|
-
align: 'center',
|
|
602
|
-
ellipsis: true,
|
|
603
|
-
width: 180
|
|
604
|
-
}, {
|
|
605
|
-
dataIndex: 'specName',
|
|
606
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
607
|
-
align: 'center',
|
|
608
|
-
ellipsis: true,
|
|
609
|
-
width: 250
|
|
610
|
-
}, {
|
|
611
|
-
dataIndex: 'num',
|
|
612
|
-
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
613
|
-
align: 'center',
|
|
614
|
-
ellipsis: true,
|
|
615
|
-
width: 100
|
|
616
|
-
}, {
|
|
617
|
-
dataIndex: 'sharePrice',
|
|
618
|
-
title: "\u5206\u644A\u4EF7",
|
|
619
|
-
align: 'center',
|
|
620
|
-
ellipsis: true,
|
|
621
|
-
width: 80
|
|
622
|
-
}, {
|
|
623
|
-
dataIndex: 'returnPrice',
|
|
624
|
-
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
625
|
-
align: 'center',
|
|
626
|
-
ellipsis: true,
|
|
627
|
-
width: 100
|
|
628
|
-
}, {
|
|
629
|
-
dataIndex: 'giftType',
|
|
630
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
631
|
-
align: 'center',
|
|
632
|
-
ellipsis: true,
|
|
633
|
-
width: 100,
|
|
634
|
-
render: function render(val) {
|
|
635
|
-
var giftTypeMap = {
|
|
636
|
-
0: '非赠品',
|
|
637
|
-
1: '自动赠送',
|
|
638
|
-
2: '手工赠送',
|
|
639
|
-
3: '回购自动送赠品',
|
|
640
|
-
4: '前N有礼送赠品',
|
|
641
|
-
6: '天猫优仓赠品',
|
|
642
|
-
7: '淘宝CRM会员送赠'
|
|
643
|
-
};
|
|
644
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
645
|
-
}
|
|
646
|
-
}, {
|
|
647
|
-
dataIndex: 'type',
|
|
648
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
649
|
-
align: 'center',
|
|
650
|
-
ellipsis: true,
|
|
651
|
-
width: 100,
|
|
652
|
-
render: function render(val) {
|
|
653
|
-
var typeMap = {
|
|
654
|
-
'1': '单品',
|
|
655
|
-
'2': '组合装'
|
|
656
|
-
};
|
|
657
|
-
return /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
658
|
-
}
|
|
659
|
-
}];
|
|
660
|
-
}
|
|
661
|
-
break;
|
|
662
|
-
case 'WDT_EXCHANGE_GOODS':
|
|
663
|
-
{
|
|
664
|
-
columns = [{
|
|
665
|
-
dataIndex: 'goodId',
|
|
666
|
-
title: "SPUID",
|
|
667
|
-
align: 'center',
|
|
668
|
-
ellipsis: true,
|
|
669
|
-
width: 70
|
|
670
|
-
}, {
|
|
671
|
-
dataIndex: 'goodNo',
|
|
672
|
-
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
673
|
-
align: 'center',
|
|
674
|
-
ellipsis: true,
|
|
675
|
-
width: 180
|
|
676
|
-
}, {
|
|
677
|
-
dataIndex: 'goodName',
|
|
678
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
679
|
-
align: 'center',
|
|
680
|
-
ellipsis: true,
|
|
681
|
-
width: 250
|
|
682
|
-
}, {
|
|
683
|
-
dataIndex: 'specId',
|
|
684
|
-
title: "".concat(text, "SKUID"),
|
|
685
|
-
align: 'center',
|
|
686
|
-
ellipsis: true,
|
|
687
|
-
width: 100
|
|
688
|
-
}, {
|
|
689
|
-
dataIndex: 'specNo',
|
|
690
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
691
|
-
align: 'center',
|
|
692
|
-
ellipsis: true,
|
|
693
|
-
width: 180
|
|
694
|
-
}, {
|
|
695
|
-
dataIndex: 'specName',
|
|
696
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
697
|
-
align: 'center',
|
|
698
|
-
ellipsis: true,
|
|
699
|
-
width: 250
|
|
700
|
-
}, {
|
|
701
|
-
dataIndex: 'num',
|
|
702
|
-
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
703
|
-
align: 'center',
|
|
704
|
-
ellipsis: true,
|
|
705
|
-
width: 100
|
|
706
|
-
}, {
|
|
707
|
-
dataIndex: 'price',
|
|
708
|
-
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
709
|
-
align: 'center',
|
|
710
|
-
ellipsis: true,
|
|
711
|
-
width: 100
|
|
712
|
-
}, {
|
|
713
|
-
dataIndex: 'exchangePrice',
|
|
714
|
-
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
715
|
-
align: 'center',
|
|
716
|
-
ellipsis: true,
|
|
717
|
-
width: 100
|
|
718
|
-
}, {
|
|
719
|
-
dataIndex: 'giftType',
|
|
720
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
721
|
-
align: 'center',
|
|
722
|
-
ellipsis: true,
|
|
723
|
-
width: 100,
|
|
724
|
-
render: function render(val) {
|
|
725
|
-
var giftTypeMap = {
|
|
726
|
-
0: '非赠品',
|
|
727
|
-
1: '自动赠送',
|
|
728
|
-
2: '手工赠送',
|
|
729
|
-
3: '回购自动送赠品',
|
|
730
|
-
4: '前N有礼送赠品',
|
|
731
|
-
6: '天猫优仓赠品',
|
|
732
|
-
7: '淘宝CRM会员送赠'
|
|
733
|
-
};
|
|
734
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
735
|
-
}
|
|
736
|
-
}, {
|
|
737
|
-
dataIndex: 'type',
|
|
738
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
739
|
-
align: 'center',
|
|
740
|
-
ellipsis: true,
|
|
741
|
-
width: 100,
|
|
742
|
-
render: function render(val) {
|
|
743
|
-
var typeMap = {
|
|
744
|
-
'1': '单品',
|
|
745
|
-
'2': '组合装'
|
|
746
|
-
};
|
|
747
|
-
return /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
748
|
-
}
|
|
749
|
-
}];
|
|
750
|
-
}
|
|
751
|
-
break;
|
|
752
571
|
default:
|
|
753
572
|
columns = [{
|
|
754
573
|
dataIndex: 'mark',
|
|
@@ -104,188 +104,6 @@ var GoodHeaderMap = {
|
|
|
104
104
|
giftType: "赠品方式"
|
|
105
105
|
},
|
|
106
106
|
moneyKey: "orderPrice"
|
|
107
|
-
},
|
|
108
|
-
"WDT_RETURN_GOODS": {
|
|
109
|
-
headerMap: {
|
|
110
|
-
goodId: {
|
|
111
|
-
component: BsHeaderChild,
|
|
112
|
-
name: "SPUID",
|
|
113
|
-
key: "goodId",
|
|
114
|
-
width: 140
|
|
115
|
-
},
|
|
116
|
-
goodNo: {
|
|
117
|
-
component: BsHeaderChild,
|
|
118
|
-
name: "商品SPU编码",
|
|
119
|
-
key: "goodNo",
|
|
120
|
-
width: 180
|
|
121
|
-
},
|
|
122
|
-
goodName: {
|
|
123
|
-
component: BsHeaderChild,
|
|
124
|
-
name: "商品名称",
|
|
125
|
-
key: "goodName",
|
|
126
|
-
width: 100
|
|
127
|
-
},
|
|
128
|
-
specId: {
|
|
129
|
-
component: BsHeaderChild,
|
|
130
|
-
name: "SKUID",
|
|
131
|
-
key: "specId",
|
|
132
|
-
width: 200
|
|
133
|
-
},
|
|
134
|
-
specNo: {
|
|
135
|
-
component: BsHeaderChild,
|
|
136
|
-
name: "商品SKU编码",
|
|
137
|
-
key: "specNo",
|
|
138
|
-
width: 180
|
|
139
|
-
},
|
|
140
|
-
specName: {
|
|
141
|
-
component: BsHeaderChild,
|
|
142
|
-
name: "商品SKU名称",
|
|
143
|
-
key: "specName",
|
|
144
|
-
width: 140
|
|
145
|
-
},
|
|
146
|
-
num: {
|
|
147
|
-
component: BsHeaderChild,
|
|
148
|
-
name: "退货数量",
|
|
149
|
-
key: "num",
|
|
150
|
-
width: 100
|
|
151
|
-
},
|
|
152
|
-
sharePrice: {
|
|
153
|
-
component: BsHeaderChild,
|
|
154
|
-
name: "分摊价",
|
|
155
|
-
key: "sharePrice",
|
|
156
|
-
width: 120
|
|
157
|
-
},
|
|
158
|
-
returnPrice: {
|
|
159
|
-
component: BsHeaderChild,
|
|
160
|
-
name: "退款金额",
|
|
161
|
-
key: "returnPrice",
|
|
162
|
-
width: 120
|
|
163
|
-
},
|
|
164
|
-
giftType: {
|
|
165
|
-
component: BsHeaderChild,
|
|
166
|
-
name: "赠品方式",
|
|
167
|
-
key: "giftType",
|
|
168
|
-
width: 150
|
|
169
|
-
},
|
|
170
|
-
type: {
|
|
171
|
-
component: BsHeaderChild,
|
|
172
|
-
name: "商品类型",
|
|
173
|
-
key: "type",
|
|
174
|
-
width: 100,
|
|
175
|
-
render: function render(val) {
|
|
176
|
-
var typeMap = {
|
|
177
|
-
'1': '单品',
|
|
178
|
-
'2': '组合装'
|
|
179
|
-
};
|
|
180
|
-
return /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
itemKey: {
|
|
185
|
-
goodId: "SPUID",
|
|
186
|
-
goodNo: "商品SPU编码",
|
|
187
|
-
goodName: "商品名称",
|
|
188
|
-
specId: "SKUID",
|
|
189
|
-
specNo: "商品SKU编码",
|
|
190
|
-
specName: "商品SKU名称",
|
|
191
|
-
num: "退货数量",
|
|
192
|
-
sharePrice: "分摊价",
|
|
193
|
-
returnPrice: "退款金额",
|
|
194
|
-
giftType: "赠品方式",
|
|
195
|
-
type: "商品类型"
|
|
196
|
-
},
|
|
197
|
-
moneyKey: "returnPrice"
|
|
198
|
-
},
|
|
199
|
-
"WDT_EXCHANGE_GOODS": {
|
|
200
|
-
headerMap: {
|
|
201
|
-
goodId: {
|
|
202
|
-
component: BsHeaderChild,
|
|
203
|
-
name: "SPUID",
|
|
204
|
-
key: "goodId",
|
|
205
|
-
width: 140
|
|
206
|
-
},
|
|
207
|
-
goodNo: {
|
|
208
|
-
component: BsHeaderChild,
|
|
209
|
-
name: "商品SPU编码",
|
|
210
|
-
key: "goodNo",
|
|
211
|
-
width: 180
|
|
212
|
-
},
|
|
213
|
-
goodName: {
|
|
214
|
-
component: BsHeaderChild,
|
|
215
|
-
name: "商品名称",
|
|
216
|
-
key: "goodName",
|
|
217
|
-
width: 100
|
|
218
|
-
},
|
|
219
|
-
specId: {
|
|
220
|
-
component: BsHeaderChild,
|
|
221
|
-
name: "SKUID",
|
|
222
|
-
key: "specId",
|
|
223
|
-
width: 200
|
|
224
|
-
},
|
|
225
|
-
specNo: {
|
|
226
|
-
component: BsHeaderChild,
|
|
227
|
-
name: "商品SKU编码",
|
|
228
|
-
key: "specNo",
|
|
229
|
-
width: 180
|
|
230
|
-
},
|
|
231
|
-
specName: {
|
|
232
|
-
component: BsHeaderChild,
|
|
233
|
-
name: "商品SKU名称",
|
|
234
|
-
key: "specName",
|
|
235
|
-
width: 140
|
|
236
|
-
},
|
|
237
|
-
num: {
|
|
238
|
-
component: BsHeaderChild,
|
|
239
|
-
name: "换出数量",
|
|
240
|
-
key: "num",
|
|
241
|
-
width: 100
|
|
242
|
-
},
|
|
243
|
-
productPrice: {
|
|
244
|
-
component: BsHeaderChild,
|
|
245
|
-
name: "商品单价",
|
|
246
|
-
key: "productPrice",
|
|
247
|
-
width: 120
|
|
248
|
-
},
|
|
249
|
-
exchangePrice: {
|
|
250
|
-
component: BsHeaderChild,
|
|
251
|
-
name: "换出金额",
|
|
252
|
-
key: "exchangePrice",
|
|
253
|
-
width: 120
|
|
254
|
-
},
|
|
255
|
-
type: {
|
|
256
|
-
component: BsHeaderChild,
|
|
257
|
-
name: "商品类型",
|
|
258
|
-
key: "type",
|
|
259
|
-
width: 100,
|
|
260
|
-
render: function render(val) {
|
|
261
|
-
var typeMap = {
|
|
262
|
-
'1': '单品',
|
|
263
|
-
'2': '组合装'
|
|
264
|
-
};
|
|
265
|
-
return /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
giftType: {
|
|
269
|
-
component: BsHeaderChild,
|
|
270
|
-
name: "赠品方式",
|
|
271
|
-
key: "giftType",
|
|
272
|
-
width: 150
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
itemKey: {
|
|
276
|
-
goodId: "SPUID",
|
|
277
|
-
goodNo: "商品SPU编码",
|
|
278
|
-
goodName: "商品名称",
|
|
279
|
-
specId: "SKUID",
|
|
280
|
-
specNo: "商品SKU编码",
|
|
281
|
-
specName: "商品SKU名称",
|
|
282
|
-
num: "换出数量",
|
|
283
|
-
productPrice: "商品单价",
|
|
284
|
-
exchangePrice: "换出金额",
|
|
285
|
-
type: "商品类型",
|
|
286
|
-
giftType: "赠品方式"
|
|
287
|
-
},
|
|
288
|
-
moneyKey: "exchangePrice"
|
|
289
107
|
}
|
|
290
108
|
};
|
|
291
109
|
GoodHeaderMap['WDT_REISSUE_GOODS'] = GoodHeaderMap['WDT_GOODS'];
|
|
@@ -80,7 +80,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
80
80
|
var _this = this,
|
|
81
81
|
_typeMap$options$type,
|
|
82
82
|
_typeMap$options$type2,
|
|
83
|
-
_this$
|
|
83
|
+
_this$componentConfig3;
|
|
84
84
|
_classCallCheck(this, CommonMultiStatus);
|
|
85
85
|
_defineProperty(this, "name", void 0);
|
|
86
86
|
_defineProperty(this, "id", void 0);
|
|
@@ -95,7 +95,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
95
95
|
_defineProperty(this, "children", void 0);
|
|
96
96
|
_defineProperty(this, "dataType", void 0);
|
|
97
97
|
_defineProperty(this, "renderClient", function (record) {
|
|
98
|
-
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3
|
|
98
|
+
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
|
|
99
99
|
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) {
|
|
100
100
|
return !isNull(item);
|
|
101
101
|
}) : false;
|
|
@@ -106,13 +106,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
106
106
|
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
107
107
|
valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey,
|
|
108
108
|
failValue: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.failValue,
|
|
109
|
-
options: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.options
|
|
110
|
-
isShowPopover: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.belongType) !== "wdt"
|
|
109
|
+
options: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.options
|
|
111
110
|
})
|
|
112
111
|
}) : null;
|
|
113
112
|
});
|
|
114
113
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
115
|
-
var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7
|
|
114
|
+
var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7;
|
|
116
115
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
|
|
117
116
|
//兼容多个商品
|
|
118
117
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -123,8 +122,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
123
122
|
list: list,
|
|
124
123
|
valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey,
|
|
125
124
|
failValue: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.failValue,
|
|
126
|
-
options: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.options
|
|
127
|
-
isShowPopover: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.belongType) !== "wdt"
|
|
125
|
+
options: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.options
|
|
128
126
|
}));
|
|
129
127
|
});
|
|
130
128
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -141,39 +139,35 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
141
139
|
var _typeMap$_this$type10;
|
|
142
140
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
|
|
143
141
|
return (list || []).map(function (item) {
|
|
144
|
-
var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13,
|
|
142
|
+
var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15, _typeMap$_this$type16;
|
|
145
143
|
var currentOption = (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : (_typeMap$_this$type12 = _typeMap$_this$type11.options) === null || _typeMap$_this$type12 === void 0 ? void 0 : (_typeMap$_this$type13 = _typeMap$_this$type12.find) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.call(_typeMap$_this$type12, function (option) {
|
|
146
144
|
var _typeMap$_this$type14;
|
|
147
145
|
return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
|
|
148
146
|
});
|
|
149
|
-
|
|
150
|
-
var _typeMap$_this$type15;
|
|
151
|
-
return 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]) || '';
|
|
152
|
-
}
|
|
153
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || '');
|
|
147
|
+
return "".concat(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.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || '');
|
|
154
148
|
}).join(',');
|
|
155
149
|
});
|
|
156
150
|
_defineProperty(this, "editRender", function (p) {
|
|
157
|
-
var _this$
|
|
151
|
+
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type17;
|
|
158
152
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
159
153
|
title: _this.name,
|
|
160
154
|
name: _this.id,
|
|
161
155
|
rules: _this.rules,
|
|
162
156
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
163
157
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
164
|
-
required: (_this$
|
|
158
|
+
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,
|
|
165
159
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
166
|
-
type: (_typeMap$_this$
|
|
160
|
+
type: (_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.type,
|
|
167
161
|
failValue: typeMap[_this.type].failValue
|
|
168
162
|
}))
|
|
169
163
|
});
|
|
170
164
|
});
|
|
171
165
|
_defineProperty(this, "filterConfig", function (item) {
|
|
172
|
-
var _typeMap$_this$
|
|
166
|
+
var _typeMap$_this$type18, _item$templateConfig;
|
|
173
167
|
return {
|
|
174
168
|
searchDefaultConditions: _this.type === 'WAREHOUSING_STATUS' ? SYMBOL.in : SYMBOL.like,
|
|
175
169
|
type: item.type,
|
|
176
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
170
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
|
|
177
171
|
name: "".concat(_this.name),
|
|
178
172
|
filterComponentType: _this.type === 'WAREHOUSING_STATUS' ? 'MultipleSelect' : 'SelectInput',
|
|
179
173
|
props: {
|
|
@@ -185,8 +179,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
185
179
|
},
|
|
186
180
|
filterFn: function filterFn(value) {
|
|
187
181
|
return function (i) {
|
|
188
|
-
var _typeMap$_this$
|
|
189
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
182
|
+
var _typeMap$_this$type19;
|
|
183
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code), value);
|
|
190
184
|
};
|
|
191
185
|
},
|
|
192
186
|
formatFilterValue: _this.type === 'WAREHOUSING_STATUS' ? null : function (value) {
|
|
@@ -210,16 +204,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
210
204
|
this.canSort = false;
|
|
211
205
|
this.children = [];
|
|
212
206
|
this.dataType = 'object';
|
|
213
|
-
this.rules = (_this$
|
|
207
|
+
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
214
208
|
required: true,
|
|
215
209
|
validator: function validator(_, value) {
|
|
216
210
|
var hasNo = (value || []).some(function (item) {
|
|
217
|
-
var _typeMap$_this$
|
|
218
|
-
return item[(_typeMap$_this$
|
|
211
|
+
var _typeMap$_this$type20;
|
|
212
|
+
return item[(_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.valueKey];
|
|
219
213
|
});
|
|
220
214
|
if (!hasNo) {
|
|
221
|
-
var _typeMap$_this$
|
|
222
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$
|
|
215
|
+
var _typeMap$_this$type21;
|
|
216
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.name)));
|
|
223
217
|
}
|
|
224
218
|
return Promise.resolve();
|
|
225
219
|
}
|