@kmkf-fe-packages/services-components 0.28.2-rc.9 → 0.29.0-beta.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/README.md +2 -0
- package/dist/esm/commonComponents/CopyText/index.d.ts +7 -0
- package/dist/esm/commonComponents/CopyText/index.js +14 -0
- package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +8 -5
- package/dist/esm/commonComponents/PlatBuyer/index.d.ts +1 -1
- package/dist/esm/commonComponents/PlatBuyer/index.js +4 -17
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +1 -1
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +21 -15
- package/dist/esm/components/BS/BsLogistics/index.js +12 -7
- package/dist/esm/components/BS/BsReissue/index.js +7 -7
- package/dist/esm/components/BS/common/BsMemo.js +2 -1
- package/dist/esm/components/BS/common/BsType.js +2 -1
- package/dist/esm/components/BS/common/SystemOrderNo.d.ts +26 -0
- package/dist/esm/components/BS/common/SystemOrderNo.js +94 -0
- package/dist/esm/components/BS/common/expressCompany.d.ts +4 -1
- package/dist/esm/components/BS/common/expressCompany.js +5 -2
- package/dist/esm/components/BS/common/index.d.ts +1 -0
- package/dist/esm/components/BS/common/index.js +2 -1
- package/dist/esm/components/Common/index.d.ts +2 -2
- package/dist/esm/components/Common/index.js +353 -177
- package/dist/esm/components/CommonHeaderGood/index.js +168 -0
- package/dist/esm/components/CommonTradeId/index.d.ts +5 -6
- package/dist/esm/components/CommonTradeId/index.js +15 -26
- package/dist/esm/components/ErpTradeId/components/OrderNum/index.d.ts +1 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/index.js +7 -7
- package/dist/esm/components/ErpTradeId/components/OrderNum/{index.module.scss → index.less} +2 -2
- package/dist/esm/components/ExpressCode/index.d.ts +2 -2
- package/dist/esm/components/ExpressCode/index.js +9 -5
- package/dist/esm/components/FlowWorkOrderId/index.d.ts +2 -3
- package/dist/esm/components/FlowWorkOrderId/index.js +4 -18
- package/dist/esm/components/JST/JstLogistics/index.js +16 -11
- package/dist/esm/components/JST/JstSendGood/index.js +8 -5
- package/dist/esm/components/LogisticsInterception/index.d.ts +16 -4
- package/dist/esm/components/LogisticsInterception/index.js +6 -11
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +13 -13
- package/dist/esm/components/LogisticsMoreInterception/index.js +17 -14
- package/dist/esm/components/LogisticsMoreInterception/{interceptItem.d.ts → interceptCode.d.ts} +2 -2
- package/dist/esm/components/LogisticsMoreInterception/{interceptItem.js → interceptCode.js} +7 -4
- package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +3 -3
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +16 -7
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryLastLogisticsInfo.d.ts +30 -0
- package/dist/esm/components/{LogisticsInterception/InterceptState.js → LogisticsMoreTrajectory/trajectoryLastLogisticsInfo.js} +37 -46
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryLastUpdateTime.d.ts +29 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryLastUpdateTime.js +77 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryStatus.d.ts +32 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryStatus.js +96 -0
- package/dist/esm/components/LogisticsTrajectory/index.js +2 -1
- package/dist/esm/components/LogisticsTrajectory/trajectoryStatus.d.ts +3 -1
- package/dist/esm/components/LogisticsTrajectory/trajectoryStatus.js +4 -4
- package/dist/esm/components/Payment/PaymentTid.d.ts +2 -2
- package/dist/esm/components/Payment/PaymentTid.js +14 -3
- package/dist/esm/components/TradeId/index.d.ts +0 -1
- package/dist/esm/components/TradeId/index.js +7 -19
- 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/WdtRessuie/index.d.ts +58 -0
- package/dist/esm/components/WDT/WdtRessuie/index.js +185 -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/components/WorkOrderId/index.d.ts +2 -3
- package/dist/esm/components/WorkOrderId/index.js +4 -18
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +10 -2
- package/dist/esm/index.d.ts +6 -3
- package/dist/esm/index.js +3 -0
- package/dist/esm/service/api.d.ts +2 -0
- package/dist/esm/service/api.js +13 -1
- package/dist/esm/type.d.ts +4 -2
- package/package.json +4 -4
- package/dist/esm/components/LogisticsInterception/InterceptState.d.ts +0 -37
|
@@ -0,0 +1,77 @@
|
|
|
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 { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
|
+
var TrajectoryLastUpdateTime = /*#__PURE__*/_createClass(function TrajectoryLastUpdateTime(options) {
|
|
11
|
+
var _this = this;
|
|
12
|
+
_classCallCheck(this, TrajectoryLastUpdateTime);
|
|
13
|
+
_defineProperty(this, "name", void 0);
|
|
14
|
+
_defineProperty(this, "id", void 0);
|
|
15
|
+
_defineProperty(this, "parentId", void 0);
|
|
16
|
+
_defineProperty(this, "sortField", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "rules", void 0);
|
|
19
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
20
|
+
_defineProperty(this, "align", void 0);
|
|
21
|
+
_defineProperty(this, "width", void 0);
|
|
22
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
23
|
+
_defineProperty(this, "formField", void 0);
|
|
24
|
+
_defineProperty(this, "canSort", void 0);
|
|
25
|
+
_defineProperty(this, "children", void 0);
|
|
26
|
+
_defineProperty(this, "dataType", void 0);
|
|
27
|
+
_defineProperty(this, "renderCode", function (record) {
|
|
28
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
29
|
+
var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.parentId, "_trajectoryList")]) || [];
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
onClick: function onClick(e) {
|
|
32
|
+
return e.stopPropagation();
|
|
33
|
+
}
|
|
34
|
+
}, list.length ? list.map(function (item, index) {
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", item.trajectoryLastUpdateTime);
|
|
36
|
+
}) : "--");
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "renderClient", function () {
|
|
39
|
+
return null;
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
42
|
+
return _this.renderCode(record || [], 700);
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
45
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
46
|
+
return _this.renderPc(undefined, r);
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
+
var _list$map;
|
|
50
|
+
var list = record === null || record === void 0 ? void 0 : record[_this.id];
|
|
51
|
+
if ((list === null || list === void 0 ? void 0 : list.length) === 0) return '--';
|
|
52
|
+
return list === null || list === void 0 ? void 0 : (_list$map = list.map(function (item, index) {
|
|
53
|
+
return "\u5305\u88F9".concat(index + 1, ": ").concat(item !== null && item !== void 0 ? item : '--');
|
|
54
|
+
})) === null || _list$map === void 0 ? void 0 : _list$map.join('/');
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(this, "editRender", function () {
|
|
57
|
+
return null;
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
60
|
+
return [];
|
|
61
|
+
});
|
|
62
|
+
this.name = options.name;
|
|
63
|
+
this.id = options.id;
|
|
64
|
+
this.parentId = options.parentId;
|
|
65
|
+
this.sortField = options.id;
|
|
66
|
+
this.formField = options.id;
|
|
67
|
+
this.type = options.type;
|
|
68
|
+
this.componentConfig = options.componentConfig;
|
|
69
|
+
this.align = "left";
|
|
70
|
+
this.width = 200;
|
|
71
|
+
this.isCombinationComponent = false;
|
|
72
|
+
this.canSort = false;
|
|
73
|
+
this.dataType = "string";
|
|
74
|
+
this.children = [];
|
|
75
|
+
this.rules = [];
|
|
76
|
+
});
|
|
77
|
+
export default TrajectoryLastUpdateTime;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
declare class trajectoryStatus implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
parentId: string;
|
|
8
|
+
sortField: string;
|
|
9
|
+
type: string;
|
|
10
|
+
rules: any[];
|
|
11
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
+
align: ALignType;
|
|
13
|
+
width: number;
|
|
14
|
+
isCombinationComponent: boolean;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
children: ComponentInterface[];
|
|
18
|
+
dataType: ComponentInterface["dataType"];
|
|
19
|
+
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
20
|
+
constructor(options: PickOption & {
|
|
21
|
+
parentId: string;
|
|
22
|
+
});
|
|
23
|
+
renderStatus: (record: any, w?: number) => React.JSX.Element;
|
|
24
|
+
renderCode: (record: any, w?: number) => React.JSX.Element;
|
|
25
|
+
renderClient: () => null;
|
|
26
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
27
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
28
|
+
renderExport: (value: string, record: Record) => any;
|
|
29
|
+
editRender: () => null;
|
|
30
|
+
filterConfig: (item: ColumnConfig) => never[];
|
|
31
|
+
}
|
|
32
|
+
export default trajectoryStatus;
|
|
@@ -0,0 +1,96 @@
|
|
|
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 { isNull, ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
|
+
import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
|
|
11
|
+
var trajectoryStatus = /*#__PURE__*/_createClass(function trajectoryStatus(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, trajectoryStatus);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "parentId", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", 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, "expressInterceptInstance", void 0);
|
|
29
|
+
_defineProperty(this, "renderStatus", function (record) {
|
|
30
|
+
var _this$expressIntercep;
|
|
31
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
32
|
+
var value = (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record['trajectoryStatus'])];
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
onClick: function onClick(e) {
|
|
35
|
+
return e.stopPropagation();
|
|
36
|
+
}
|
|
37
|
+
}, value !== null && value !== void 0 ? value : "--", value ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
38
|
+
modelWidth: w,
|
|
39
|
+
interceptCompany: record['trajectoryCompany'],
|
|
40
|
+
interceptCode: record['trajectoryCode'],
|
|
41
|
+
interceptSenderMobile: record['trajectoryPhone']
|
|
42
|
+
}) : null);
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderCode", function (record) {
|
|
45
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
46
|
+
var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.parentId, "_trajectoryList")]) || [];
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
onClick: function onClick(e) {
|
|
49
|
+
return e.stopPropagation();
|
|
50
|
+
}
|
|
51
|
+
}, list.length ? list.map(function (item, index) {
|
|
52
|
+
return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.renderStatus(item));
|
|
53
|
+
}) : "--");
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "renderClient", function () {
|
|
56
|
+
return null;
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
59
|
+
return _this.renderCode(record || [], 700);
|
|
60
|
+
});
|
|
61
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
62
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
63
|
+
return _this.renderPc(undefined, r);
|
|
64
|
+
});
|
|
65
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
66
|
+
var _list$map;
|
|
67
|
+
var list = record === null || record === void 0 ? void 0 : record[_this.id];
|
|
68
|
+
if ((list === null || list === void 0 ? void 0 : list.length) === 0) return '--';
|
|
69
|
+
return list === null || list === void 0 ? void 0 : (_list$map = list.map(function (item, index) {
|
|
70
|
+
var _this$expressIntercep2, _this$expressIntercep3;
|
|
71
|
+
return "\u5305\u88F9".concat(index + 1, ": ").concat((_this$expressIntercep2 = (_this$expressIntercep3 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep3 === void 0 ? void 0 : _this$expressIntercep3[item]) !== null && _this$expressIntercep2 !== void 0 ? _this$expressIntercep2 : '--');
|
|
72
|
+
})) === null || _list$map === void 0 ? void 0 : _list$map.join('/');
|
|
73
|
+
});
|
|
74
|
+
_defineProperty(this, "editRender", function () {
|
|
75
|
+
return null;
|
|
76
|
+
});
|
|
77
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
78
|
+
return [];
|
|
79
|
+
});
|
|
80
|
+
this.name = options.name;
|
|
81
|
+
this.id = options.id;
|
|
82
|
+
this.parentId = options.parentId;
|
|
83
|
+
this.sortField = options.id;
|
|
84
|
+
this.formField = options.id;
|
|
85
|
+
this.type = options.type;
|
|
86
|
+
this.componentConfig = options.componentConfig;
|
|
87
|
+
this.align = "left";
|
|
88
|
+
this.width = 200;
|
|
89
|
+
this.isCombinationComponent = false;
|
|
90
|
+
this.canSort = false;
|
|
91
|
+
this.dataType = "string";
|
|
92
|
+
this.children = [];
|
|
93
|
+
this.rules = [];
|
|
94
|
+
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
95
|
+
});
|
|
96
|
+
export default trajectoryStatus;
|
|
@@ -102,7 +102,8 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
102
102
|
}));
|
|
103
103
|
this.trajectoryStatus = new TrajectoryStatus(_objectSpread(_objectSpread({}, options), {}, {
|
|
104
104
|
name: "".concat(this.name, "-\u7269\u6D41\u72B6\u6001"),
|
|
105
|
-
id: "".concat(this.id)
|
|
105
|
+
id: "".concat(this.id, "_trajectoryStatus"),
|
|
106
|
+
parentId: "".concat(this.id)
|
|
106
107
|
}));
|
|
107
108
|
this.trajectoryLastLogisticsInfo = new TrajectoryLastLogisticsInfo(_objectSpread(_objectSpread({}, options), {}, {
|
|
108
109
|
name: "".concat(this.name, "-\u6700\u540E\u7269\u6D41\u4FE1\u606F"),
|
|
@@ -17,7 +17,9 @@ declare class TrajectoryStatus implements ComponentInterface {
|
|
|
17
17
|
children: ComponentInterface[];
|
|
18
18
|
dataType: ComponentInterface["dataType"];
|
|
19
19
|
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
20
|
-
constructor(options: PickOption
|
|
20
|
+
constructor(options: PickOption & {
|
|
21
|
+
parentId: string;
|
|
22
|
+
});
|
|
21
23
|
renderStatus: (record: any, w?: number) => React.JSX.Element;
|
|
22
24
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
23
25
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -75,10 +75,10 @@ var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(optio
|
|
|
75
75
|
return [];
|
|
76
76
|
});
|
|
77
77
|
this.name = options.name;
|
|
78
|
-
this.parentId = "".concat(options.
|
|
79
|
-
this.id = "".concat(options.id
|
|
80
|
-
this.sortField = "".concat(options.id
|
|
81
|
-
this.formField = "".concat(options.id
|
|
78
|
+
this.parentId = "".concat(options.parentId);
|
|
79
|
+
this.id = "".concat(options.id);
|
|
80
|
+
this.sortField = "".concat(options.id);
|
|
81
|
+
this.formField = "".concat(options.id);
|
|
82
82
|
this.type = options.type;
|
|
83
83
|
this.componentConfig = options.componentConfig;
|
|
84
84
|
this.rules = [];
|
|
@@ -6,7 +6,7 @@ declare class PaymentTid implements ComponentInterface {
|
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
10
|
align: ALignType;
|
|
11
11
|
width: number;
|
|
12
12
|
isCombinationComponent: boolean;
|
|
@@ -16,7 +16,7 @@ declare class PaymentTid implements ComponentInterface {
|
|
|
16
16
|
dataType: ComponentInterface['dataType'];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
renderPc: (value: unknown, record:
|
|
19
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
21
|
getComponentValue: (r: Record) => any;
|
|
22
22
|
renderExport: (value: string) => string;
|
|
@@ -11,6 +11,7 @@ import GetFormItem from "../GetFormItem";
|
|
|
11
11
|
import ItemView from "../../commonComponents/ItemView";
|
|
12
12
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
13
|
import { SYMBOL } from "../../constant";
|
|
14
|
+
import CopyText from "../../commonComponents/CopyText";
|
|
14
15
|
var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
15
16
|
var _this = this;
|
|
16
17
|
_classCallCheck(this, PaymentTid);
|
|
@@ -31,12 +32,22 @@ var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
|
31
32
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
32
33
|
id: _this.id,
|
|
33
34
|
label: _this.name,
|
|
34
|
-
value:
|
|
35
|
+
value: /*#__PURE__*/React.createElement(CopyText, {
|
|
36
|
+
text: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
|
|
37
|
+
})
|
|
35
38
|
}) : null;
|
|
36
39
|
});
|
|
37
40
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
42
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
43
|
+
}
|
|
44
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
45
|
+
onClick: function onClick(e) {
|
|
46
|
+
return e.stopPropagation();
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/React.createElement(CopyText, {
|
|
49
|
+
text: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
|
|
50
|
+
}));
|
|
40
51
|
});
|
|
41
52
|
_defineProperty(this, "renderLog", function (r) {
|
|
42
53
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
@@ -17,7 +17,6 @@ declare class ETradeId implements ComponentInterface {
|
|
|
17
17
|
dataType: ComponentInterface['dataType'];
|
|
18
18
|
constructor(options: PickOption);
|
|
19
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
-
copyHandle: (text: string) => void;
|
|
21
20
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
22
21
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
23
22
|
getComponentValue: (r: Record) => any;
|
|
@@ -7,14 +7,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { message } from 'antd';
|
|
11
10
|
import { TradeId } from '@kmkf-fe-packages/basic-components';
|
|
12
|
-
import { CopyOutlined } from '@ant-design/icons';
|
|
13
11
|
import GetFormItem from "../GetFormItem";
|
|
14
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
13
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
-
import copy from 'copy-to-clipboard';
|
|
17
14
|
import { SYMBOL, batchInput } from "../../constant";
|
|
15
|
+
import CopyText from "../../commonComponents/CopyText";
|
|
18
16
|
var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
19
17
|
var _this = this;
|
|
20
18
|
_classCallCheck(this, ETradeId);
|
|
@@ -36,13 +34,11 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
36
34
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
37
35
|
id: _this.id,
|
|
38
36
|
label: _this.name,
|
|
39
|
-
value:
|
|
37
|
+
value: /*#__PURE__*/React.createElement(CopyText, {
|
|
38
|
+
text: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]
|
|
39
|
+
})
|
|
40
40
|
}) : null;
|
|
41
41
|
});
|
|
42
|
-
_defineProperty(this, "copyHandle", function (text) {
|
|
43
|
-
copy(text);
|
|
44
|
-
message.success('复制成功');
|
|
45
|
-
});
|
|
46
42
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
47
43
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) === undefined) {
|
|
48
44
|
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
@@ -51,17 +47,9 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
51
47
|
onClick: function onClick(e) {
|
|
52
48
|
return e.stopPropagation();
|
|
53
49
|
}
|
|
54
|
-
}, /*#__PURE__*/React.createElement(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
e.stopPropagation();
|
|
58
|
-
}
|
|
59
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
60
|
-
style: {
|
|
61
|
-
paddingLeft: '4px',
|
|
62
|
-
cursor: 'pointer'
|
|
63
|
-
}
|
|
64
|
-
}, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
|
|
50
|
+
}, /*#__PURE__*/React.createElement(CopyText, {
|
|
51
|
+
text: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]
|
|
52
|
+
}));
|
|
65
53
|
});
|
|
66
54
|
_defineProperty(this, "renderLog", function (r) {
|
|
67
55
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_tradeId")])) return null;
|
|
@@ -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,58 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
|
|
4
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
5
|
+
declare class WdtReissue implements ComponentInterface {
|
|
6
|
+
name: string;
|
|
7
|
+
id: string;
|
|
8
|
+
sortField: string;
|
|
9
|
+
type: string;
|
|
10
|
+
rules: any[];
|
|
11
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
+
effects: ComponentInterface["effects"];
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
bsType: BsType;
|
|
19
|
+
bsMemo: BsMemo;
|
|
20
|
+
systemOrderNo: SystemOrderNo;
|
|
21
|
+
reissueGoods: BsHeaderGood | CommonHeaderGoods;
|
|
22
|
+
constructor(options: PickOption);
|
|
23
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
24
|
+
renderPc: () => null;
|
|
25
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
26
|
+
getComponentValue: (r: Record) => {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
renderExport: () => null;
|
|
30
|
+
editRender: (p: any) => React.JSX.Element;
|
|
31
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
32
|
+
searchDefaultConditions: "in";
|
|
33
|
+
type: string;
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
filterComponentType: "Cascader";
|
|
37
|
+
props: {
|
|
38
|
+
options: any[] | undefined;
|
|
39
|
+
fieldNames: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
children: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
formatFilterValue: (val: Array<string>) => string[] | undefined;
|
|
46
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
47
|
+
} | {
|
|
48
|
+
searchDefaultConditions: "like";
|
|
49
|
+
type: string;
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
filterComponentType: "Input";
|
|
53
|
+
props?: undefined;
|
|
54
|
+
formatFilterValue?: undefined;
|
|
55
|
+
filterFn?: undefined;
|
|
56
|
+
})[];
|
|
57
|
+
}
|
|
58
|
+
export default WdtReissue;
|