@kmkf-fe-packages/services-components 0.7.15-alpha.5 → 0.7.15-alpha.51
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/QueryLogisticsTrack/index.js +23 -21
- package/dist/esm/components/BS/BsExchange/index.d.ts +6 -8
- package/dist/esm/components/BS/BsExchange/index.js +207 -116
- package/dist/esm/components/BS/BsGoods/index.d.ts +9 -9
- package/dist/esm/components/BS/BsGoods/index.js +82 -60
- package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -7
- package/dist/esm/components/BS/BsLogistics/index.js +14 -14
- package/dist/esm/components/BS/BsReissue/index.d.ts +8 -5
- package/dist/esm/components/BS/BsReissue/index.js +89 -50
- package/dist/esm/components/BS/common/{BsChildCode.d.ts → BsHeaderCode.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildCode.js → BsHeaderCode.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildMoney.d.ts → BsHeaderMoney.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildMoney.js → BsHeaderMoney.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildName.d.ts → BsHeaderName.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildName.js → BsHeaderName.js} +28 -11
- package/dist/esm/components/BS/common/{BsChildNumber.d.ts → BsHeaderNumber.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildNumber.js → BsHeaderNumber.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildPic.d.ts → BsHeaderPic.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildPic.js → BsHeaderPic.js} +26 -10
- package/dist/esm/components/BS/common/{BsChildShare.d.ts → BsHeaderShare.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildShare.js → BsHeaderShare.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildSku.d.ts → BsHeaderSku.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildSku.js → BsHeaderSku.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildType.d.ts → BsHeaderType.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildType.js → BsHeaderType.js} +27 -11
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -3
- package/dist/esm/components/BS/common/BsMemo.js +43 -13
- package/dist/esm/components/BS/common/BsType.d.ts +1 -0
- package/dist/esm/components/BS/common/BsType.js +34 -8
- package/dist/esm/components/BS/common/index.d.ts +10 -10
- package/dist/esm/components/BS/common/index.js +8 -8
- package/dist/esm/components/Cascader/index.d.ts +1 -0
- package/dist/esm/components/Cascader/index.js +3 -1
- package/dist/esm/components/Common/index.d.ts +5 -0
- package/dist/esm/components/Common/index.js +102 -2
- package/dist/esm/components/File/index.d.ts +4 -4
- package/dist/esm/components/File/index.js +29 -9
- package/dist/esm/components/FlowStatusSelect/index.d.ts +0 -1
- package/dist/esm/components/FlowStatusSelect/index.js +30 -24
- package/dist/esm/components/FlowWorkOrderId/index.d.ts +33 -0
- package/dist/esm/components/FlowWorkOrderId/index.js +107 -0
- package/dist/esm/components/JST/JstLogistics/index.js +25 -8
- package/dist/esm/components/LogisticsTrajectory/index.d.ts +8 -9
- package/dist/esm/components/LogisticsTrajectory/index.js +12 -10
- package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +6 -5
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +6 -6
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +8 -8
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +4 -10
- package/dist/esm/components/Payment/BuyerNick.js +1 -2
- package/dist/esm/components/Payment/index.d.ts +1 -0
- package/dist/esm/components/Payment/index.js +9 -6
- package/dist/esm/components/PostIng/index.d.ts +6 -29
- package/dist/esm/components/PostIng/index.js +73 -77
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +6 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +15 -14
- package/package.json +4 -4
- package/dist/esm/components/BS/common/BsExchangeImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsExchangeImage.js +0 -126
- package/dist/esm/components/BS/common/BsGoodImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsGoodImage.js +0 -88
package/dist/esm/factory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory,
|
|
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, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue } from "./index";
|
|
2
2
|
export var factory = function factory(type, options) {
|
|
3
3
|
var _options$componentCon;
|
|
4
4
|
switch (type) {
|
|
@@ -62,8 +62,6 @@ export var factory = function factory(type, options) {
|
|
|
62
62
|
return new TradeDateTime(options);
|
|
63
63
|
case "EXPRESS_LOGISTICS_SELECT":
|
|
64
64
|
return new Logistics(options);
|
|
65
|
-
case "BS_LOGISTICS":
|
|
66
|
-
return new BsLogistics(options);
|
|
67
65
|
case "RETURN_LOGISTICS_SELECT":
|
|
68
66
|
return new ReturnLogistics(options);
|
|
69
67
|
case "ACTUAL_PAYMENT":
|
|
@@ -106,6 +104,7 @@ export var factory = function factory(type, options) {
|
|
|
106
104
|
case "TEMPLATE_ID_INPUT":
|
|
107
105
|
return new TemplateSelect(options);
|
|
108
106
|
case "JST_LOGISTICS":
|
|
107
|
+
case "BS_LOGISTICS":
|
|
109
108
|
return new JstLogistics(options);
|
|
110
109
|
case "JST_ITEM_SELECT_THIRD":
|
|
111
110
|
return new JstItemSelect(options);
|
|
@@ -122,6 +121,10 @@ export var factory = function factory(type, options) {
|
|
|
122
121
|
return new BsExchange(options);
|
|
123
122
|
case "BS_REISSUE_GOODS":
|
|
124
123
|
return new BsReissue(options);
|
|
124
|
+
case "FLOW_WORK_ORDER_ID":
|
|
125
|
+
return new FlowWorkOrderId(options);
|
|
126
|
+
case "OUTER_WORK_ORDER_ID":
|
|
127
|
+
return new FlowWorkOrderId(options);
|
|
125
128
|
default:
|
|
126
129
|
return new BasicInput(options);
|
|
127
130
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export { default as ShopInput } from "./components/ShopInput";
|
|
|
51
51
|
export { default as Submitter } from "./components/Submitter";
|
|
52
52
|
export { default as Handler } from "./components/Handler";
|
|
53
53
|
export { default as CompletedUser } from "./components/CompletedUser";
|
|
54
|
+
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
54
55
|
export { factory } from "./factory";
|
|
55
56
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
56
57
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/dist/esm/index.js
CHANGED
|
@@ -51,6 +51,7 @@ export { default as ShopInput } from "./components/ShopInput";
|
|
|
51
51
|
export { default as Submitter } from "./components/Submitter";
|
|
52
52
|
export { default as Handler } from "./components/Handler";
|
|
53
53
|
export { default as CompletedUser } from "./components/CompletedUser";
|
|
54
|
+
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
54
55
|
export { factory } from "./factory";
|
|
55
56
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
56
57
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FormInstance } from
|
|
3
|
-
import { SYMBOL } from
|
|
4
|
-
export declare type DataType =
|
|
5
|
-
export declare type ALignType =
|
|
2
|
+
import type { FormInstance } from 'antd';
|
|
3
|
+
import { SYMBOL } from './constant';
|
|
4
|
+
export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
|
|
5
|
+
export declare type ALignType = 'left' | 'right' | 'center';
|
|
6
6
|
export declare type QuerySymbol = keyof typeof SYMBOL;
|
|
7
7
|
export declare type Record = {
|
|
8
8
|
[props in string]: any;
|
|
@@ -18,7 +18,7 @@ export declare type FilterConfigType = {
|
|
|
18
18
|
filterFn?: (p: any) => (r: Record) => unknown;
|
|
19
19
|
formatFilterValue?: (p: any) => any;
|
|
20
20
|
};
|
|
21
|
-
export declare type FilterComponentType =
|
|
21
|
+
export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate';
|
|
22
22
|
export interface ComponentInterface {
|
|
23
23
|
id: string;
|
|
24
24
|
sortField: string;
|
|
@@ -32,8 +32,8 @@ export interface ComponentInterface {
|
|
|
32
32
|
rules?: any[];
|
|
33
33
|
width?: number;
|
|
34
34
|
align?: ALignType;
|
|
35
|
-
dataType:
|
|
36
|
-
format?:
|
|
35
|
+
dataType: 'string' | 'number' | 'boolean' | 'array' | 'range' | 'object';
|
|
36
|
+
format?: 'dateTime' | 'date' | 'time' | 'cascader';
|
|
37
37
|
options?: Array<any>;
|
|
38
38
|
/**
|
|
39
39
|
* @description 组件下标
|
|
@@ -56,7 +56,7 @@ export interface ComponentInterface {
|
|
|
56
56
|
/**
|
|
57
57
|
* @description 显示字段名称
|
|
58
58
|
*/
|
|
59
|
-
showField?:
|
|
59
|
+
showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all';
|
|
60
60
|
/**
|
|
61
61
|
* @description 是否选择SKU
|
|
62
62
|
*/
|
|
@@ -76,7 +76,7 @@ export interface ComponentInterface {
|
|
|
76
76
|
/**
|
|
77
77
|
* @description 备注状态
|
|
78
78
|
*/
|
|
79
|
-
associatedType?:
|
|
79
|
+
associatedType?: 'APPEND';
|
|
80
80
|
isAssociated?: boolean;
|
|
81
81
|
isShowFlag?: boolean;
|
|
82
82
|
/**
|
|
@@ -117,7 +117,7 @@ export interface ComponentInterface {
|
|
|
117
117
|
* @description 时间初始值
|
|
118
118
|
*/
|
|
119
119
|
dateTime?: string;
|
|
120
|
-
dateType?:
|
|
120
|
+
dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
|
|
121
121
|
maxSize?: number;
|
|
122
122
|
basicGrade?: number;
|
|
123
123
|
range?: number;
|
|
@@ -137,13 +137,14 @@ export interface ComponentInterface {
|
|
|
137
137
|
* @description 针对ERP的订单组件需要特殊展示,此处增加一个特殊标识
|
|
138
138
|
*/
|
|
139
139
|
erpFlag?: boolean;
|
|
140
|
+
showHeader?: string[];
|
|
140
141
|
reasonList?: any[];
|
|
142
|
+
disabled?: boolean;
|
|
141
143
|
};
|
|
142
144
|
effects?: {
|
|
143
145
|
queryWorkOrderDetail?: (r: Record) => void;
|
|
144
146
|
handleOpenRepeatList?: (r: Record) => void;
|
|
145
147
|
handleOpenRepeatDetail?: (r: Record) => void;
|
|
146
|
-
handleChangeSingleWorkOrderStatus?: (t: string, r: Record) => void;
|
|
147
148
|
templateList?: any[];
|
|
148
149
|
isEditing?: boolean;
|
|
149
150
|
form?: FormInstance;
|
|
@@ -205,12 +206,12 @@ export interface ComponentInterface {
|
|
|
205
206
|
getComponentValue: (r: Record) => any;
|
|
206
207
|
formDataTransform?: (r: any) => any;
|
|
207
208
|
}
|
|
208
|
-
export declare type PickOption = Pick<ComponentInterface,
|
|
209
|
+
export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader'>;
|
|
209
210
|
export declare type ColumnConfig = {
|
|
210
211
|
id: string;
|
|
211
212
|
name: string;
|
|
212
213
|
type: string;
|
|
213
214
|
subKey?: string;
|
|
214
|
-
mode?:
|
|
215
|
-
config?: ComponentInterface[
|
|
215
|
+
mode?: 'multiple';
|
|
216
|
+
config?: ComponentInterface['componentConfig'];
|
|
216
217
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.51",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.50",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.50"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "ef285b21acbabbbb71a86889ca27a4c97ffc7864"
|
|
44
44
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare class BsExchangeGoodImage implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
-
align: ALignType;
|
|
10
|
-
width: number;
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
formField: string;
|
|
13
|
-
canSort: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface["dataType"];
|
|
16
|
-
constructor(options: PickOption);
|
|
17
|
-
getComponentValue: () => null;
|
|
18
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
-
renderExport: (value: string, record: Record) => null;
|
|
22
|
-
editRender: () => null;
|
|
23
|
-
filterConfig: (item: ColumnConfig) => {
|
|
24
|
-
searchDefaultConditions: "like";
|
|
25
|
-
type: string;
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
filterComponentType: "Input";
|
|
29
|
-
}[];
|
|
30
|
-
}
|
|
31
|
-
export default BsExchangeGoodImage;
|
|
@@ -1,126 +0,0 @@
|
|
|
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 _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); } }
|
|
3
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from "react";
|
|
9
|
-
import { maxBy } from "lodash";
|
|
10
|
-
import ItemView from "../../../commonComponents/ItemView";
|
|
11
|
-
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
-
import { SYMBOL } from "../../../constant";
|
|
13
|
-
import { BsGoodImage as BsGood, BsExchangeList } from "../../Common";
|
|
14
|
-
var BsExchangeGoodImage = /*#__PURE__*/_createClass(function BsExchangeGoodImage(options) {
|
|
15
|
-
var _this = this;
|
|
16
|
-
_classCallCheck(this, BsExchangeGoodImage);
|
|
17
|
-
_defineProperty(this, "name", void 0);
|
|
18
|
-
_defineProperty(this, "id", void 0);
|
|
19
|
-
_defineProperty(this, "sortField", void 0);
|
|
20
|
-
_defineProperty(this, "type", void 0);
|
|
21
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
22
|
-
_defineProperty(this, "align", void 0);
|
|
23
|
-
_defineProperty(this, "width", void 0);
|
|
24
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
-
_defineProperty(this, "formField", void 0);
|
|
26
|
-
_defineProperty(this, "canSort", void 0);
|
|
27
|
-
_defineProperty(this, "children", void 0);
|
|
28
|
-
_defineProperty(this, "dataType", void 0);
|
|
29
|
-
_defineProperty(this, "getComponentValue", function () {
|
|
30
|
-
return null;
|
|
31
|
-
});
|
|
32
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
33
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
|
-
id: _this.id,
|
|
35
|
-
label: _this.name,
|
|
36
|
-
value: _this.renderPc(undefined, record)
|
|
37
|
-
}) : null;
|
|
38
|
-
});
|
|
39
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
40
|
-
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
41
|
-
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
42
|
-
}
|
|
43
|
-
var type = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeType")];
|
|
44
|
-
var returnGoods = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeReturnGoods")];
|
|
45
|
-
var swapOutGoods = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeSwapOutGoods")];
|
|
46
|
-
var giftGoods = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeGiftGoods")];
|
|
47
|
-
var newReturnGoods = [];
|
|
48
|
-
if (["1", "3"].includes(type === null || type === void 0 ? void 0 : type[0])) {
|
|
49
|
-
newReturnGoods = returnGoods.reduce(function (prv, next) {
|
|
50
|
-
prv.push({
|
|
51
|
-
returnGood: next,
|
|
52
|
-
swapGood: next
|
|
53
|
-
});
|
|
54
|
-
return prv;
|
|
55
|
-
}, []);
|
|
56
|
-
} else if (["2", "4"].includes(type === null || type === void 0 ? void 0 : type[0])) {
|
|
57
|
-
var maxLen = maxBy(returnGoods, function (t) {
|
|
58
|
-
return t.index;
|
|
59
|
-
});
|
|
60
|
-
var newGoods = Array(maxLen.index).fill({
|
|
61
|
-
returnGood: [],
|
|
62
|
-
swapGood: []
|
|
63
|
-
});
|
|
64
|
-
returnGoods.forEach(function (item) {
|
|
65
|
-
newGoods[item.index].returnGood.push(item);
|
|
66
|
-
});
|
|
67
|
-
swapOutGoods.forEach(function (item) {
|
|
68
|
-
newGoods[item.index].swapGood.push(item);
|
|
69
|
-
});
|
|
70
|
-
newReturnGoods = newGoods;
|
|
71
|
-
}
|
|
72
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BsExchangeList, {
|
|
73
|
-
list: newReturnGoods
|
|
74
|
-
}), (giftGoods || []).map(function (item, index) {
|
|
75
|
-
return /*#__PURE__*/React.createElement(BsGood, {
|
|
76
|
-
item: item,
|
|
77
|
-
index: index
|
|
78
|
-
});
|
|
79
|
-
}));
|
|
80
|
-
});
|
|
81
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
82
|
-
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
83
|
-
return _this.renderPc(undefined, r);
|
|
84
|
-
});
|
|
85
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
86
|
-
return null;
|
|
87
|
-
});
|
|
88
|
-
_defineProperty(this, "editRender", function () {
|
|
89
|
-
return null;
|
|
90
|
-
});
|
|
91
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
92
|
-
var subKey = item.subKey;
|
|
93
|
-
return [{
|
|
94
|
-
searchDefaultConditions: SYMBOL.like,
|
|
95
|
-
type: item.type,
|
|
96
|
-
id: "".concat(item.id, "_bsExchangeReturnGoods"),
|
|
97
|
-
name: "".concat(_this.name, "-\u9000\u56DE\u5546\u54C1"),
|
|
98
|
-
filterComponentType: "Input"
|
|
99
|
-
}, {
|
|
100
|
-
searchDefaultConditions: SYMBOL.like,
|
|
101
|
-
type: item.type,
|
|
102
|
-
id: "".concat(item.id, "_bsExchangeSwapOutGoods"),
|
|
103
|
-
name: "".concat(_this.name, "-\u6362\u8D27\u5546\u54C1"),
|
|
104
|
-
filterComponentType: "Input"
|
|
105
|
-
}, {
|
|
106
|
-
searchDefaultConditions: SYMBOL.like,
|
|
107
|
-
type: item.type,
|
|
108
|
-
id: "".concat(item.id, "_bsExchangeGiftGoods"),
|
|
109
|
-
name: "".concat(_this.name, "-\u8D60\u54C1\u5546\u54C1"),
|
|
110
|
-
filterComponentType: "Input"
|
|
111
|
-
}];
|
|
112
|
-
});
|
|
113
|
-
this.name = options.name;
|
|
114
|
-
this.id = options.id;
|
|
115
|
-
this.sortField = options.id;
|
|
116
|
-
this.formField = options.id;
|
|
117
|
-
this.type = options.type;
|
|
118
|
-
this.componentConfig = options.componentConfig;
|
|
119
|
-
this.align = "left";
|
|
120
|
-
this.width = 300;
|
|
121
|
-
this.isCombinationComponent = false;
|
|
122
|
-
this.canSort = true;
|
|
123
|
-
this.dataType = "string";
|
|
124
|
-
this.children = [];
|
|
125
|
-
});
|
|
126
|
-
export default BsExchangeGoodImage;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare class BsGoodImage implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
-
align: ALignType;
|
|
10
|
-
width: number;
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
formField: string;
|
|
13
|
-
canSort: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface["dataType"];
|
|
16
|
-
constructor(options: PickOption);
|
|
17
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
-
renderPc: (value: unknown, record: Record) => any;
|
|
19
|
-
renderLog: (r: Record) => any;
|
|
20
|
-
getComponentValue: (r: Record) => any;
|
|
21
|
-
renderExport: (value: string, record: Record) => any;
|
|
22
|
-
editRender: () => null;
|
|
23
|
-
filterConfig: (item: ColumnConfig) => {
|
|
24
|
-
searchDefaultConditions: "like";
|
|
25
|
-
type: string;
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
filterComponentType: "Input";
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export default BsGoodImage;
|
|
@@ -1,88 +0,0 @@
|
|
|
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 _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); } }
|
|
3
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from "react";
|
|
9
|
-
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
-
import { SYMBOL } from "../../../constant";
|
|
12
|
-
import { BsGoodImage as BsGood } from "../../Common";
|
|
13
|
-
var BsGoodImage = /*#__PURE__*/_createClass(function BsGoodImage(options) {
|
|
14
|
-
var _this = this;
|
|
15
|
-
_classCallCheck(this, BsGoodImage);
|
|
16
|
-
_defineProperty(this, "name", void 0);
|
|
17
|
-
_defineProperty(this, "id", void 0);
|
|
18
|
-
_defineProperty(this, "sortField", void 0);
|
|
19
|
-
_defineProperty(this, "type", void 0);
|
|
20
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
-
_defineProperty(this, "align", void 0);
|
|
22
|
-
_defineProperty(this, "width", void 0);
|
|
23
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
-
_defineProperty(this, "formField", void 0);
|
|
25
|
-
_defineProperty(this, "canSort", void 0);
|
|
26
|
-
_defineProperty(this, "children", void 0);
|
|
27
|
-
_defineProperty(this, "dataType", void 0);
|
|
28
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
29
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
30
|
-
id: _this.id,
|
|
31
|
-
label: _this.name,
|
|
32
|
-
value: _this.getComponentValue(record)
|
|
33
|
-
}) : null;
|
|
34
|
-
});
|
|
35
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
36
|
-
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
37
|
-
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
38
|
-
}
|
|
39
|
-
//兼容多个商品
|
|
40
|
-
return record === null || record === void 0 ? void 0 : record["".concat(_this.id)].map(function (item, index) {
|
|
41
|
-
return /*#__PURE__*/React.createElement(BsGood, {
|
|
42
|
-
item: item,
|
|
43
|
-
index: index
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
48
|
-
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
49
|
-
return _this.renderPc(undefined, r);
|
|
50
|
-
});
|
|
51
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
52
|
-
var _find, _this$componentConfig;
|
|
53
|
-
var type = r !== null && r !== void 0 && r[_this.id] ? r === null || r === void 0 ? void 0 : r[_this.id][0] : "";
|
|
54
|
-
var text = (_find = (((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.reasonList) || []).find(function (item) {
|
|
55
|
-
return item.value === type;
|
|
56
|
-
})) === null || _find === void 0 ? void 0 : _find.label;
|
|
57
|
-
return text;
|
|
58
|
-
});
|
|
59
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
60
|
-
var _this$getComponentVal;
|
|
61
|
-
return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
|
|
62
|
-
});
|
|
63
|
-
_defineProperty(this, "editRender", function () {
|
|
64
|
-
return null;
|
|
65
|
-
});
|
|
66
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
67
|
-
return {
|
|
68
|
-
searchDefaultConditions: SYMBOL.like,
|
|
69
|
-
type: item.type,
|
|
70
|
-
id: "".concat(item.id),
|
|
71
|
-
name: _this.name,
|
|
72
|
-
filterComponentType: "Input"
|
|
73
|
-
};
|
|
74
|
-
});
|
|
75
|
-
this.name = options.name;
|
|
76
|
-
this.id = options.id;
|
|
77
|
-
this.sortField = options.id;
|
|
78
|
-
this.formField = options.id;
|
|
79
|
-
this.type = options.type;
|
|
80
|
-
this.componentConfig = options.componentConfig;
|
|
81
|
-
this.align = "left";
|
|
82
|
-
this.width = 200;
|
|
83
|
-
this.isCombinationComponent = false;
|
|
84
|
-
this.canSort = true;
|
|
85
|
-
this.dataType = "string";
|
|
86
|
-
this.children = [];
|
|
87
|
-
});
|
|
88
|
-
export default BsGoodImage;
|