@kmkf-fe-packages/services-components 1.0.6-rc.0 → 1.0.6-rc.5
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/components/BS/common/BsMemo.js +2 -1
- package/dist/esm/components/BS/common/BsType.js +2 -1
- package/dist/esm/components/Common/index.js +166 -1
- package/dist/esm/components/CommonHeaderGood/index.js +168 -0
- package/dist/esm/components/WDT/WdtExchange/index.d.ts +35 -0
- package/dist/esm/components/WDT/WdtExchange/index.js +183 -0
- package/dist/esm/components/WDT/WdtReturn/index.d.ts +54 -0
- package/dist/esm/components/WDT/WdtReturn/index.js +150 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +5 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@ 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'
|
|
21
|
+
WDT_REISSUE_GOODS: 'wdtReissueType',
|
|
22
|
+
WDT_RETURN_GOODS: 'wdtReturnType'
|
|
22
23
|
};
|
|
23
24
|
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
24
25
|
var _this = this;
|
|
@@ -19,7 +19,8 @@ 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'
|
|
22
|
+
WDT_REISSUE_GOODS: 'wdtReissueType',
|
|
23
|
+
WDT_RETURN_GOODS: 'wdtReturnType'
|
|
23
24
|
};
|
|
24
25
|
var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
25
26
|
var _this = this;
|
|
@@ -415,7 +415,6 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
415
415
|
text = _ref11$text === void 0 ? '' : _ref11$text,
|
|
416
416
|
type = _ref11.type;
|
|
417
417
|
//商品信息
|
|
418
|
-
|
|
419
418
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
420
419
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
421
420
|
return function (type) {
|
|
@@ -568,6 +567,172 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
568
567
|
}
|
|
569
568
|
}];
|
|
570
569
|
break;
|
|
570
|
+
case 'WDT_RETURN_GOODS':
|
|
571
|
+
{
|
|
572
|
+
columns = [{
|
|
573
|
+
dataIndex: 'goodId',
|
|
574
|
+
title: "SPUID",
|
|
575
|
+
align: 'center',
|
|
576
|
+
ellipsis: true,
|
|
577
|
+
width: 70
|
|
578
|
+
}, {
|
|
579
|
+
dataIndex: 'goodNo',
|
|
580
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
581
|
+
align: 'center',
|
|
582
|
+
ellipsis: true,
|
|
583
|
+
width: 180
|
|
584
|
+
}, {
|
|
585
|
+
dataIndex: 'goodName',
|
|
586
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
587
|
+
align: 'center',
|
|
588
|
+
ellipsis: true,
|
|
589
|
+
width: 250
|
|
590
|
+
}, {
|
|
591
|
+
dataIndex: 'specId',
|
|
592
|
+
title: "".concat(text, "SKUID"),
|
|
593
|
+
align: 'center',
|
|
594
|
+
ellipsis: true,
|
|
595
|
+
width: 100
|
|
596
|
+
}, {
|
|
597
|
+
dataIndex: 'specNo',
|
|
598
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
599
|
+
align: 'center',
|
|
600
|
+
ellipsis: true,
|
|
601
|
+
width: 180
|
|
602
|
+
}, {
|
|
603
|
+
dataIndex: 'specName',
|
|
604
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
605
|
+
align: 'center',
|
|
606
|
+
ellipsis: true,
|
|
607
|
+
width: 250
|
|
608
|
+
}, {
|
|
609
|
+
dataIndex: 'num',
|
|
610
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
611
|
+
align: 'center',
|
|
612
|
+
ellipsis: true,
|
|
613
|
+
width: 100
|
|
614
|
+
}, {
|
|
615
|
+
dataIndex: 'sharePrice',
|
|
616
|
+
title: "\u5206\u644A\u4EF7",
|
|
617
|
+
align: 'center',
|
|
618
|
+
ellipsis: true,
|
|
619
|
+
width: 80
|
|
620
|
+
}, {
|
|
621
|
+
dataIndex: 'returnPrice',
|
|
622
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
623
|
+
align: 'center',
|
|
624
|
+
ellipsis: true,
|
|
625
|
+
width: 100
|
|
626
|
+
}, {
|
|
627
|
+
dataIndex: 'giftType',
|
|
628
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
629
|
+
align: 'center',
|
|
630
|
+
ellipsis: true,
|
|
631
|
+
width: 100,
|
|
632
|
+
render: function render(val) {
|
|
633
|
+
var giftTypeMap = {
|
|
634
|
+
0: '非赠品',
|
|
635
|
+
1: '自动赠送',
|
|
636
|
+
2: '手工赠送',
|
|
637
|
+
3: '回购自动送赠品',
|
|
638
|
+
4: '前N有礼送赠品',
|
|
639
|
+
6: '天猫优仓赠品',
|
|
640
|
+
7: '淘宝CRM会员送赠'
|
|
641
|
+
};
|
|
642
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
643
|
+
}
|
|
644
|
+
}, {
|
|
645
|
+
dataIndex: 'type',
|
|
646
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
647
|
+
align: 'center',
|
|
648
|
+
ellipsis: true,
|
|
649
|
+
width: 100
|
|
650
|
+
}];
|
|
651
|
+
}
|
|
652
|
+
break;
|
|
653
|
+
case 'WDT_EXCHANGE_GOODS':
|
|
654
|
+
{
|
|
655
|
+
columns = [{
|
|
656
|
+
dataIndex: 'goodId',
|
|
657
|
+
title: "SPUID",
|
|
658
|
+
align: 'center',
|
|
659
|
+
ellipsis: true,
|
|
660
|
+
width: 70
|
|
661
|
+
}, {
|
|
662
|
+
dataIndex: 'goodNo',
|
|
663
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
664
|
+
align: 'center',
|
|
665
|
+
ellipsis: true,
|
|
666
|
+
width: 180
|
|
667
|
+
}, {
|
|
668
|
+
dataIndex: 'goodName',
|
|
669
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
670
|
+
align: 'center',
|
|
671
|
+
ellipsis: true,
|
|
672
|
+
width: 250
|
|
673
|
+
}, {
|
|
674
|
+
dataIndex: 'specId',
|
|
675
|
+
title: "".concat(text, "SKUID"),
|
|
676
|
+
align: 'center',
|
|
677
|
+
ellipsis: true,
|
|
678
|
+
width: 100
|
|
679
|
+
}, {
|
|
680
|
+
dataIndex: 'specNo',
|
|
681
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
682
|
+
align: 'center',
|
|
683
|
+
ellipsis: true,
|
|
684
|
+
width: 180
|
|
685
|
+
}, {
|
|
686
|
+
dataIndex: 'specName',
|
|
687
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
688
|
+
align: 'center',
|
|
689
|
+
ellipsis: true,
|
|
690
|
+
width: 250
|
|
691
|
+
}, {
|
|
692
|
+
dataIndex: 'num',
|
|
693
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
694
|
+
align: 'center',
|
|
695
|
+
ellipsis: true,
|
|
696
|
+
width: 100
|
|
697
|
+
}, {
|
|
698
|
+
dataIndex: 'price',
|
|
699
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
700
|
+
align: 'center',
|
|
701
|
+
ellipsis: true,
|
|
702
|
+
width: 100
|
|
703
|
+
}, {
|
|
704
|
+
dataIndex: 'exchangePrice',
|
|
705
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
706
|
+
align: 'center',
|
|
707
|
+
ellipsis: true,
|
|
708
|
+
width: 100
|
|
709
|
+
}, {
|
|
710
|
+
dataIndex: 'giftType',
|
|
711
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
712
|
+
align: 'center',
|
|
713
|
+
ellipsis: true,
|
|
714
|
+
width: 100,
|
|
715
|
+
render: function render(val) {
|
|
716
|
+
var giftTypeMap = {
|
|
717
|
+
0: '非赠品',
|
|
718
|
+
1: '自动赠送',
|
|
719
|
+
2: '手工赠送',
|
|
720
|
+
3: '回购自动送赠品',
|
|
721
|
+
4: '前N有礼送赠品',
|
|
722
|
+
6: '天猫优仓赠品',
|
|
723
|
+
7: '淘宝CRM会员送赠'
|
|
724
|
+
};
|
|
725
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
726
|
+
}
|
|
727
|
+
}, {
|
|
728
|
+
dataIndex: 'type',
|
|
729
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
730
|
+
align: 'center',
|
|
731
|
+
ellipsis: true,
|
|
732
|
+
width: 100
|
|
733
|
+
}];
|
|
734
|
+
}
|
|
735
|
+
break;
|
|
571
736
|
default:
|
|
572
737
|
columns = [{
|
|
573
738
|
dataIndex: 'mark',
|
|
@@ -104,6 +104,174 @@ 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
|
+
}
|
|
176
|
+
},
|
|
177
|
+
itemKey: {
|
|
178
|
+
goodId: "SPUID",
|
|
179
|
+
goodNo: "商品SPU编码",
|
|
180
|
+
goodName: "商品名称",
|
|
181
|
+
specId: "SKUID",
|
|
182
|
+
specNo: "商品SKU编码",
|
|
183
|
+
specName: "商品SKU名称",
|
|
184
|
+
num: "退货数量",
|
|
185
|
+
sharePrice: "分摊价",
|
|
186
|
+
returnPrice: "退款金额",
|
|
187
|
+
giftType: "赠品方式",
|
|
188
|
+
type: "商品类型"
|
|
189
|
+
},
|
|
190
|
+
moneyKey: "returnPrice"
|
|
191
|
+
},
|
|
192
|
+
"WDT_EXCHANGE_GOODS": {
|
|
193
|
+
headerMap: {
|
|
194
|
+
goodId: {
|
|
195
|
+
component: BsHeaderChild,
|
|
196
|
+
name: "SPUID",
|
|
197
|
+
key: "goodId",
|
|
198
|
+
width: 140
|
|
199
|
+
},
|
|
200
|
+
goodNo: {
|
|
201
|
+
component: BsHeaderChild,
|
|
202
|
+
name: "商品SPU编码",
|
|
203
|
+
key: "goodNo",
|
|
204
|
+
width: 180
|
|
205
|
+
},
|
|
206
|
+
goodName: {
|
|
207
|
+
component: BsHeaderChild,
|
|
208
|
+
name: "商品名称",
|
|
209
|
+
key: "goodName",
|
|
210
|
+
width: 100
|
|
211
|
+
},
|
|
212
|
+
specId: {
|
|
213
|
+
component: BsHeaderChild,
|
|
214
|
+
name: "SKUID",
|
|
215
|
+
key: "specId",
|
|
216
|
+
width: 200
|
|
217
|
+
},
|
|
218
|
+
specNo: {
|
|
219
|
+
component: BsHeaderChild,
|
|
220
|
+
name: "商品SKU编码",
|
|
221
|
+
key: "specNo",
|
|
222
|
+
width: 180
|
|
223
|
+
},
|
|
224
|
+
specName: {
|
|
225
|
+
component: BsHeaderChild,
|
|
226
|
+
name: "商品SKU名称",
|
|
227
|
+
key: "specName",
|
|
228
|
+
width: 140
|
|
229
|
+
},
|
|
230
|
+
num: {
|
|
231
|
+
component: BsHeaderChild,
|
|
232
|
+
name: "换出数量",
|
|
233
|
+
key: "num",
|
|
234
|
+
width: 100
|
|
235
|
+
},
|
|
236
|
+
productPrice: {
|
|
237
|
+
component: BsHeaderChild,
|
|
238
|
+
name: "商品单价",
|
|
239
|
+
key: "productPrice",
|
|
240
|
+
width: 120
|
|
241
|
+
},
|
|
242
|
+
exchangePrice: {
|
|
243
|
+
component: BsHeaderChild,
|
|
244
|
+
name: "换出金额",
|
|
245
|
+
key: "exchangePrice",
|
|
246
|
+
width: 120
|
|
247
|
+
},
|
|
248
|
+
type: {
|
|
249
|
+
component: BsHeaderChild,
|
|
250
|
+
name: "商品类型",
|
|
251
|
+
key: "type",
|
|
252
|
+
width: 100
|
|
253
|
+
},
|
|
254
|
+
giftType: {
|
|
255
|
+
component: BsHeaderChild,
|
|
256
|
+
name: "赠品方式",
|
|
257
|
+
key: "giftType",
|
|
258
|
+
width: 150
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
itemKey: {
|
|
262
|
+
goodId: "SPUID",
|
|
263
|
+
goodNo: "商品SPU编码",
|
|
264
|
+
goodName: "商品名称",
|
|
265
|
+
specId: "SKUID",
|
|
266
|
+
specNo: "商品SKU编码",
|
|
267
|
+
specName: "商品SKU名称",
|
|
268
|
+
num: "换出数量",
|
|
269
|
+
productPrice: "商品单价",
|
|
270
|
+
exchangePrice: "换出金额",
|
|
271
|
+
type: "商品类型",
|
|
272
|
+
giftType: "赠品方式"
|
|
273
|
+
},
|
|
274
|
+
moneyKey: "exchangePrice"
|
|
107
275
|
}
|
|
108
276
|
};
|
|
109
277
|
GoodHeaderMap['WDT_REISSUE_GOODS'] = GoodHeaderMap['WDT_GOODS'];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
4
|
+
declare class WDTExchange implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
isCombinationComponent: boolean;
|
|
13
|
+
formField: string;
|
|
14
|
+
canSort: boolean;
|
|
15
|
+
children: ComponentInterface[];
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
|
+
returnGoods: CommonHeaderGoods;
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: () => null;
|
|
21
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
22
|
+
getComponentValue: (r: Record) => {
|
|
23
|
+
wdtExchangeGoods: any;
|
|
24
|
+
};
|
|
25
|
+
renderExport: (value: any, record: any) => null;
|
|
26
|
+
editRender: (p: any) => React.JSX.Element;
|
|
27
|
+
filterConfig: (item: ColumnConfig) => {
|
|
28
|
+
searchDefaultConditions: "like";
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
filterComponentType: "Input";
|
|
33
|
+
}[];
|
|
34
|
+
}
|
|
35
|
+
export default WDTExchange;
|
|
@@ -0,0 +1,183 @@
|
|
|
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 ItemView from "../../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { SYMBOL } from "../../../constant";
|
|
17
|
+
// import { BsType, BsMemo } from "../../Bs/common";
|
|
18
|
+
import { CommonExchangeGoods } from "@kmkf-fe-packages/basic-components";
|
|
19
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
+
var WDTExchange = /*#__PURE__*/_createClass(
|
|
21
|
+
// wdtType: BsType;
|
|
22
|
+
// wdtMemo: BsMemo;
|
|
23
|
+
|
|
24
|
+
// swapOutGoods: BsHeaderGood;
|
|
25
|
+
// giftGoods: BsHeaderGood;
|
|
26
|
+
function WDTExchange(options) {
|
|
27
|
+
var _this = this,
|
|
28
|
+
_this$componentConfig4;
|
|
29
|
+
_classCallCheck(this, WDTExchange);
|
|
30
|
+
_defineProperty(this, "name", void 0);
|
|
31
|
+
_defineProperty(this, "id", void 0);
|
|
32
|
+
_defineProperty(this, "sortField", void 0);
|
|
33
|
+
_defineProperty(this, "type", void 0);
|
|
34
|
+
_defineProperty(this, "rules", void 0);
|
|
35
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
36
|
+
_defineProperty(this, "effects", void 0);
|
|
37
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
38
|
+
_defineProperty(this, "formField", void 0);
|
|
39
|
+
_defineProperty(this, "canSort", void 0);
|
|
40
|
+
_defineProperty(this, "children", void 0);
|
|
41
|
+
_defineProperty(this, "dataType", void 0);
|
|
42
|
+
_defineProperty(this, "returnGoods", void 0);
|
|
43
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
44
|
+
var _this$componentConfig;
|
|
45
|
+
var wdtExchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_wdtExchangeGoods")]) || "[]");
|
|
46
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
47
|
+
id: "".concat(_this.id, "-out"),
|
|
48
|
+
label: "".concat(_this.name, "-\u6362\u51FA"),
|
|
49
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
50
|
+
type: _this.type,
|
|
51
|
+
list: wdtExchangeGoods || [],
|
|
52
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
53
|
+
})
|
|
54
|
+
})) : null;
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(this, "renderPc", function () {
|
|
57
|
+
return null;
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
60
|
+
var _r, _this$componentConfig2;
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_wdtExchangeGoods")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement("div", null, "\u6362\u51FA\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
62
|
+
type: _this.type,
|
|
63
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtExchangeGoods")]) || [],
|
|
64
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
65
|
+
})) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
68
|
+
return {
|
|
69
|
+
wdtExchangeGoods: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtExchangeGoods")]
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
73
|
+
return null;
|
|
74
|
+
});
|
|
75
|
+
_defineProperty(this, "editRender", function (p) {
|
|
76
|
+
var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
|
|
77
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
78
|
+
title: _this.name,
|
|
79
|
+
name: _this.id,
|
|
80
|
+
rules: _this.rules,
|
|
81
|
+
required: false,
|
|
82
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
83
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
84
|
+
component: /*#__PURE__*/React.createElement(CommonExchangeGoods, _extends({}, _this.componentConfig, {
|
|
85
|
+
maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
|
|
86
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
87
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
88
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
89
|
+
width: "90%",
|
|
90
|
+
type: "WDT_EXCHANGE_GOODS"
|
|
91
|
+
}))
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
95
|
+
return [{
|
|
96
|
+
searchDefaultConditions: SYMBOL.like,
|
|
97
|
+
type: item.type,
|
|
98
|
+
id: "".concat(item.id, "_wdtExchangeGoods"),
|
|
99
|
+
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
100
|
+
filterComponentType: "Input"
|
|
101
|
+
}];
|
|
102
|
+
});
|
|
103
|
+
this.name = options.name;
|
|
104
|
+
this.id = options.id;
|
|
105
|
+
this.sortField = "".concat(options.id);
|
|
106
|
+
this.formField = "".concat(options.id);
|
|
107
|
+
this.type = options.type;
|
|
108
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
109
|
+
this.isCombinationComponent = true;
|
|
110
|
+
this.canSort = false;
|
|
111
|
+
// this.wdtType = new BsType({
|
|
112
|
+
// ...options,
|
|
113
|
+
// id: `${options.id}_wdtExchangeType`,
|
|
114
|
+
// name: "换货类型",
|
|
115
|
+
// });
|
|
116
|
+
// this.wdtMemo = new BsMemo({
|
|
117
|
+
// ...options,
|
|
118
|
+
// id: `${options.id}_wdtExchangeType_memo`,
|
|
119
|
+
// name: "换货备注",
|
|
120
|
+
// });
|
|
121
|
+
this.returnGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
122
|
+
id: "".concat(options.id, "_wdtExchangeGoods"),
|
|
123
|
+
name: "换出商品"
|
|
124
|
+
}));
|
|
125
|
+
// this.swapOutGoods = new BsHeaderGood({
|
|
126
|
+
// ...options,
|
|
127
|
+
// id: `${options.id}_wdtExchangeSwapOutGoods`,
|
|
128
|
+
// name: "换出商品",
|
|
129
|
+
// });
|
|
130
|
+
// this.giftGoods = new BsHeaderGood({
|
|
131
|
+
// ...options,
|
|
132
|
+
// id: `${options.id}_wdtExchangeGiftGoods`,
|
|
133
|
+
// name: "赠品商品",
|
|
134
|
+
// });
|
|
135
|
+
this.children = [
|
|
136
|
+
// this.wdtType,
|
|
137
|
+
// this.wdtMemo,
|
|
138
|
+
this.returnGoods
|
|
139
|
+
// this.swapOutGoods,
|
|
140
|
+
// this.giftGoods,
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
144
|
+
this.rules = [{
|
|
145
|
+
required: (_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required,
|
|
146
|
+
validator: function validator(_, value) {
|
|
147
|
+
var _this$componentConfig5, _value$wdtExchangeGoo;
|
|
148
|
+
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && (_value$wdtExchangeGoo = value.wdtExchangeGoods) !== null && _value$wdtExchangeGoo !== void 0 && _value$wdtExchangeGoo.length)) {
|
|
149
|
+
return Promise.reject(new Error("请选择wdt换货商品"));
|
|
150
|
+
}
|
|
151
|
+
return Promise.resolve();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/* {
|
|
155
|
+
validator: (_: any, value: any) => {
|
|
156
|
+
if (value && ["2", "4"].includes(value?.wdtExchangeType?.[0])) {
|
|
157
|
+
const hasNoGood = (value?.wdtExchangeGoods || []).some(
|
|
158
|
+
(item: any) => {
|
|
159
|
+
return !item?.wdtExchangeGoods.length;
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
if (hasNoGood) {
|
|
163
|
+
return Promise.reject(new Error("请选择退回商品后再提交工单"));
|
|
164
|
+
}
|
|
165
|
+
const hasLen = (value?.wdtExchangeGoods || []).some(
|
|
166
|
+
(item: any) => {
|
|
167
|
+
return (
|
|
168
|
+
item?.wdtExchangeGoods.length !==
|
|
169
|
+
item?.wdtExchangeSwapOutGoods.length
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
if (hasLen) {
|
|
174
|
+
return Promise.reject(new Error("请核对商品数据,再提交工单"));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return Promise.resolve();
|
|
178
|
+
},
|
|
179
|
+
},*/];
|
|
180
|
+
|
|
181
|
+
this.dataType = "object";
|
|
182
|
+
});
|
|
183
|
+
export default WDTExchange;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsType } from "../../BS/common/index";
|
|
4
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
5
|
+
declare class WdtReturn 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
|
+
wdtType: BsType;
|
|
19
|
+
reissueGoods: CommonHeaderGoods;
|
|
20
|
+
constructor(options: PickOption);
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: () => null;
|
|
23
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
24
|
+
getComponentValue: (r: Record) => any;
|
|
25
|
+
renderExport: () => null;
|
|
26
|
+
editRender: (p: any) => React.JSX.Element;
|
|
27
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
28
|
+
searchDefaultConditions: "in";
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
filterComponentType: "Cascader";
|
|
33
|
+
props: {
|
|
34
|
+
options: any[] | undefined;
|
|
35
|
+
fieldNames: {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
children: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
formatFilterValue: (val: Array<string>) => string[] | undefined;
|
|
42
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
43
|
+
} | {
|
|
44
|
+
searchDefaultConditions: "like";
|
|
45
|
+
type: string;
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
filterComponentType: "Input";
|
|
49
|
+
props?: undefined;
|
|
50
|
+
formatFilterValue?: undefined;
|
|
51
|
+
filterFn?: undefined;
|
|
52
|
+
})[];
|
|
53
|
+
}
|
|
54
|
+
export default WdtReturn;
|
|
@@ -0,0 +1,150 @@
|
|
|
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 ItemView from "../../../commonComponents/ItemView";
|
|
14
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
+
import { SYMBOL } from "../../../constant";
|
|
16
|
+
import { BsGoodsTable } from "../../Common";
|
|
17
|
+
import { BsType } from "../../BS/common/index";
|
|
18
|
+
import { CommonReturnGoods } from "@kmkf-fe-packages/basic-components";
|
|
19
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
+
var WdtReturn = /*#__PURE__*/_createClass(function WdtReturn(options) {
|
|
21
|
+
var _this = this,
|
|
22
|
+
_this$componentConfig4;
|
|
23
|
+
_classCallCheck(this, WdtReturn);
|
|
24
|
+
_defineProperty(this, "name", void 0);
|
|
25
|
+
_defineProperty(this, "id", void 0);
|
|
26
|
+
_defineProperty(this, "sortField", void 0);
|
|
27
|
+
_defineProperty(this, "type", void 0);
|
|
28
|
+
_defineProperty(this, "rules", void 0);
|
|
29
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
30
|
+
_defineProperty(this, "effects", void 0);
|
|
31
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
32
|
+
_defineProperty(this, "formField", void 0);
|
|
33
|
+
_defineProperty(this, "canSort", void 0);
|
|
34
|
+
_defineProperty(this, "children", void 0);
|
|
35
|
+
_defineProperty(this, "dataType", void 0);
|
|
36
|
+
_defineProperty(this, "wdtType", void 0);
|
|
37
|
+
_defineProperty(this, "reissueGoods", void 0);
|
|
38
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
39
|
+
var _this$componentConfig;
|
|
40
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.wdtType.renderClient(record), record !== null && record !== void 0 && record["".concat(_this.id)].wdtReturnGoods.length ? /*#__PURE__*/React.createElement(ItemView, {
|
|
41
|
+
id: _this.id,
|
|
42
|
+
label: _this.name,
|
|
43
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
44
|
+
type: _this.type,
|
|
45
|
+
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].wdtReturnGoods) || [],
|
|
46
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
47
|
+
})
|
|
48
|
+
}) : null) : null;
|
|
49
|
+
});
|
|
50
|
+
_defineProperty(this, "renderPc", function () {
|
|
51
|
+
return null;
|
|
52
|
+
});
|
|
53
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
54
|
+
var _r, _r2, _this$componentConfig2;
|
|
55
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_wdtReturnType")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.wdtType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_wdtReturnGoods")]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
56
|
+
type: _this.type,
|
|
57
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtReturnGoods")]) || [],
|
|
58
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
59
|
+
})) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
|
|
60
|
+
});
|
|
61
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
62
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtReturnGoods")];
|
|
63
|
+
});
|
|
64
|
+
_defineProperty(this, "renderExport", function () {
|
|
65
|
+
return null;
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "editRender", function (p) {
|
|
68
|
+
var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
|
|
69
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
70
|
+
title: _this.name,
|
|
71
|
+
name: _this.id,
|
|
72
|
+
rules: _this.rules,
|
|
73
|
+
required: false,
|
|
74
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
75
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
76
|
+
component: /*#__PURE__*/React.createElement(CommonReturnGoods, _extends({}, _this.componentConfig, {
|
|
77
|
+
maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
|
|
78
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
79
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
80
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
81
|
+
type: "WDT_RETURN_GOODS",
|
|
82
|
+
width: "90%"
|
|
83
|
+
}))
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
87
|
+
var _item$templateConfig;
|
|
88
|
+
return [{
|
|
89
|
+
searchDefaultConditions: SYMBOL.in,
|
|
90
|
+
type: item.type,
|
|
91
|
+
id: "".concat(item.id, "_wdtReturnType"),
|
|
92
|
+
name: "".concat(item.name, "-\u9000\u8D27\u7C7B\u578B"),
|
|
93
|
+
filterComponentType: "Cascader",
|
|
94
|
+
props: {
|
|
95
|
+
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
96
|
+
fieldNames: {
|
|
97
|
+
label: "label",
|
|
98
|
+
value: "value",
|
|
99
|
+
children: "children"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
formatFilterValue: function formatFilterValue(val) {
|
|
103
|
+
if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
|
|
104
|
+
return [val[val.length - 1]];
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
filterFn: function filterFn(value) {
|
|
108
|
+
return function (i) {
|
|
109
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "wdtReturnType"), value);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
searchDefaultConditions: SYMBOL.like,
|
|
114
|
+
type: item.type,
|
|
115
|
+
id: "".concat(item.id, "_wdtReturnGoods"),
|
|
116
|
+
name: "".concat(_this.name),
|
|
117
|
+
filterComponentType: "Input"
|
|
118
|
+
}];
|
|
119
|
+
});
|
|
120
|
+
this.name = options.name;
|
|
121
|
+
this.id = options.id;
|
|
122
|
+
this.sortField = "".concat(options.id);
|
|
123
|
+
this.formField = "".concat(options.id);
|
|
124
|
+
this.type = options.type;
|
|
125
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
126
|
+
this.isCombinationComponent = true;
|
|
127
|
+
this.canSort = false;
|
|
128
|
+
this.wdtType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
129
|
+
id: "".concat(options.id, "_wdtReturnType"),
|
|
130
|
+
name: "退货类型"
|
|
131
|
+
}));
|
|
132
|
+
this.reissueGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
133
|
+
id: "".concat(options.id, "_wdtReturnGoods"),
|
|
134
|
+
name: "商品信息"
|
|
135
|
+
}));
|
|
136
|
+
this.children = [this.wdtType, this.reissueGoods];
|
|
137
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
138
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
139
|
+
required: true,
|
|
140
|
+
validator: function validator(_, value) {
|
|
141
|
+
var _value$wdtReturnGoods;
|
|
142
|
+
if (!value || !(value !== null && value !== void 0 && (_value$wdtReturnGoods = value.wdtReturnGoods) !== null && _value$wdtReturnGoods !== void 0 && _value$wdtReturnGoods.length)) {
|
|
143
|
+
return Promise.reject(new Error("请选择wdt退货商品"));
|
|
144
|
+
}
|
|
145
|
+
return Promise.resolve();
|
|
146
|
+
}
|
|
147
|
+
}] : [];
|
|
148
|
+
this.dataType = "object";
|
|
149
|
+
});
|
|
150
|
+
export default WdtReturn;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, Label, WdtReissue } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => AliPay |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => AliPay | JstSendGood | Label | LogisticsInterception | WdtReissue | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, Label, WdtReissue } from "./index";
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -143,12 +143,16 @@ export var factory = function factory(type, options) {
|
|
|
143
143
|
return new WdtGoods(options);
|
|
144
144
|
case "BS_EXCHANGE_GOODS":
|
|
145
145
|
return new BsExchange(options);
|
|
146
|
+
case "WDT_EXCHANGE_GOODS":
|
|
147
|
+
return new WdtExchange(options);
|
|
146
148
|
case "BS_REISSUE_GOODS":
|
|
147
149
|
return new BsReissue(options);
|
|
148
150
|
case "WDT_REISSUE_GOODS":
|
|
149
151
|
return new WdtReissue(options);
|
|
150
152
|
case "BS_RETURN_GOODS":
|
|
151
153
|
return new BsReturn(options);
|
|
154
|
+
case "WDT_RETURN_GOODS":
|
|
155
|
+
return new WdtReturn(options);
|
|
152
156
|
case "REISSUE_TRADE_ID":
|
|
153
157
|
case "BS_DELIVERY_NO":
|
|
154
158
|
case "RETURN_GOODS_TRADE_ID":
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -75,6 +75,8 @@ export { default as FlowWorkOrderStatus } from './components/FlowWorkOrderStatus
|
|
|
75
75
|
export { default as MsgStatus } from './components/MsgStatus';
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
77
|
export { default as WdtReissue } from "./components/WDT/WdtRessuie";
|
|
78
|
+
export { default as WdtReturn } from "./components/WDT/WdtReturn";
|
|
79
|
+
export { default as WdtExchange } from "./components/WDT/WdtExchange";
|
|
78
80
|
export { default as CommonInput } from "./components/CommonInput";
|
|
79
81
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
80
82
|
export { default as Label } from "./components/Label";
|
package/dist/esm/index.js
CHANGED
|
@@ -75,6 +75,8 @@ export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus
|
|
|
75
75
|
export { default as MsgStatus } from "./components/MsgStatus";
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
77
|
export { default as WdtReissue } from "./components/WDT/WdtRessuie";
|
|
78
|
+
export { default as WdtReturn } from "./components/WDT/WdtReturn";
|
|
79
|
+
export { default as WdtExchange } from "./components/WDT/WdtExchange";
|
|
78
80
|
export { default as CommonInput } from "./components/CommonInput";
|
|
79
81
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
80
82
|
export { default as Label } from "./components/Label";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.0.6-rc.
|
|
3
|
+
"version": "1.0.6-rc.5",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^1.0.6-rc.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^1.0.6-rc.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^1.0.6-rc.5",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^1.0.6-rc.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "bfe2b801bf682c9b64a5b6138db951af85d74cad",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|