@kmkf-fe-packages/services-components 2.0.54-beta.44 → 2.0.54-beta.46
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { BsType,
|
|
3
|
+
import { BsType, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
|
|
4
4
|
import SystemOrderType from "../SystemOrderType";
|
|
5
5
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
6
6
|
declare class PublicReissue implements ComponentInterface {
|
|
@@ -17,9 +17,8 @@ declare class PublicReissue implements ComponentInterface {
|
|
|
17
17
|
children: ComponentInterface[];
|
|
18
18
|
dataType: ComponentInterface["dataType"];
|
|
19
19
|
bsType: BsType;
|
|
20
|
-
bsMemo: BsMemo;
|
|
21
20
|
systemOrderNo: SystemOrderNo;
|
|
22
|
-
systemOrderType
|
|
21
|
+
systemOrderType?: SystemOrderType;
|
|
23
22
|
goods: BsHeaderGood | CommonHeaderGoods;
|
|
24
23
|
constructor(options: PickOption);
|
|
25
24
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -15,7 +15,7 @@ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
|
15
15
|
import { PublicReissue as Reissue, erpFormValidator } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
17
|
import { BsGoodsTable } from "../../Common/index";
|
|
18
|
-
import { BsType,
|
|
18
|
+
import { BsType, SystemOrderNo } from "../../BS/common/index";
|
|
19
19
|
import SystemOrderType from "../SystemOrderType";
|
|
20
20
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
21
21
|
var typeMap = {
|
|
@@ -28,6 +28,7 @@ var typeMap = {
|
|
|
28
28
|
errMsg: "请选择聚水潭补发商品",
|
|
29
29
|
name: "聚水潭",
|
|
30
30
|
compType: "补发",
|
|
31
|
+
hasSystemOrderType: true,
|
|
31
32
|
validator: function validator(_rule, value, type) {
|
|
32
33
|
if (!_rule.required) return Promise.resolve();
|
|
33
34
|
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
@@ -46,6 +47,7 @@ var typeMap = {
|
|
|
46
47
|
errMsg: "请选择聚水潭退货商品",
|
|
47
48
|
name: "聚水潭",
|
|
48
49
|
compType: "退货",
|
|
50
|
+
hasSystemOrderType: true,
|
|
49
51
|
validator: function validator(_rule, value, type) {
|
|
50
52
|
if (!_rule.required) return Promise.resolve();
|
|
51
53
|
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
@@ -86,8 +88,6 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
86
88
|
_typeMap$options$type8,
|
|
87
89
|
_typeMap$options$type9,
|
|
88
90
|
_typeMap$options$type10,
|
|
89
|
-
_typeMap$options$type11,
|
|
90
|
-
_typeMap$options$type12,
|
|
91
91
|
_this$componentConfig6;
|
|
92
92
|
_classCallCheck(this, PublicReissue);
|
|
93
93
|
_defineProperty(this, "name", void 0);
|
|
@@ -103,13 +103,12 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
103
103
|
_defineProperty(this, "children", void 0);
|
|
104
104
|
_defineProperty(this, "dataType", void 0);
|
|
105
105
|
_defineProperty(this, "bsType", void 0);
|
|
106
|
-
_defineProperty(this, "bsMemo", void 0);
|
|
107
106
|
_defineProperty(this, "systemOrderNo", void 0);
|
|
108
107
|
_defineProperty(this, "systemOrderType", void 0);
|
|
109
108
|
_defineProperty(this, "goods", void 0);
|
|
110
109
|
_defineProperty(this, "renderClient", function (record) {
|
|
111
110
|
var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
|
|
112
|
-
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.
|
|
111
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.systemOrderNo.renderClient(record), _this.systemOrderType && _this.systemOrderType.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
|
|
113
112
|
id: _this.id,
|
|
114
113
|
label: _this.name,
|
|
115
114
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
@@ -124,7 +123,7 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
124
123
|
});
|
|
125
124
|
_defineProperty(this, "renderLog", function (r) {
|
|
126
125
|
var _r, _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5, _r2, _typeMap$_this$type6, _typeMap$_this$type7, _typeMap$_this$type8, _this$componentConfig2;
|
|
127
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r))
|
|
126
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.systemOrderBillType)] && _this.systemOrderType ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B:", _this.systemOrderType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.compType, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
128
127
|
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key)]) || [],
|
|
129
128
|
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
|
|
130
129
|
type: _this.type
|
|
@@ -219,36 +218,32 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
219
218
|
id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.systemOrderNo),
|
|
220
219
|
name: "".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.name).concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.compType, "\u7CFB\u7EDF\u8BA2\u5355\u53F7")
|
|
221
220
|
}));
|
|
222
|
-
this.
|
|
223
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$
|
|
224
|
-
name: "".concat((_typeMap$options$
|
|
225
|
-
}));
|
|
226
|
-
this.systemOrderType = new SystemOrderType(_objectSpread(_objectSpread({}, options), {}, {
|
|
227
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.systemOrderBillType),
|
|
228
|
-
name: "".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.name, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B")
|
|
229
|
-
}));
|
|
221
|
+
this.systemOrderType = (_typeMap$options$type7 = typeMap[options.type]) !== null && _typeMap$options$type7 !== void 0 && _typeMap$options$type7.hasSystemOrderType ? new SystemOrderType(_objectSpread(_objectSpread({}, options), {}, {
|
|
222
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.systemOrderBillType),
|
|
223
|
+
name: "".concat((_typeMap$options$type9 = typeMap[options.type]) === null || _typeMap$options$type9 === void 0 ? void 0 : _typeMap$options$type9.name, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B")
|
|
224
|
+
})) : undefined;
|
|
230
225
|
this.goods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
231
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$
|
|
226
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.key),
|
|
232
227
|
name: "商品信息"
|
|
233
228
|
}));
|
|
234
|
-
this.children = [this.bsType, this.systemOrderNo, this.
|
|
229
|
+
this.children = [this.bsType, this.systemOrderNo, this.systemOrderType, this.goods].filter(Boolean);
|
|
235
230
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
236
231
|
var isRequired = this === null || this === void 0 ? void 0 : (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required;
|
|
237
232
|
this.rules = [{
|
|
238
233
|
required: isRequired,
|
|
239
234
|
validator: function validator(_, value) {
|
|
240
|
-
var _value, _typeMap$options$
|
|
241
|
-
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$
|
|
242
|
-
var _typeMap$options$
|
|
243
|
-
return Promise.reject(new Error("".concat((_typeMap$options$
|
|
235
|
+
var _value, _typeMap$options$type11;
|
|
236
|
+
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.key)]) !== null && _value !== void 0 && _value.length))) {
|
|
237
|
+
var _typeMap$options$type12;
|
|
238
|
+
return Promise.reject(new Error("".concat((_typeMap$options$type12 = typeMap[options.type]) === null || _typeMap$options$type12 === void 0 ? void 0 : _typeMap$options$type12.errMsg)));
|
|
244
239
|
}
|
|
245
240
|
return Promise.resolve();
|
|
246
241
|
}
|
|
247
242
|
}, {
|
|
248
243
|
required: isRequired,
|
|
249
244
|
validator: function validator(_rule, value) {
|
|
250
|
-
var _typeMap$options$
|
|
251
|
-
return ((_typeMap$options$
|
|
245
|
+
var _typeMap$options$type13, _typeMap$options$type14;
|
|
246
|
+
return ((_typeMap$options$type13 = typeMap[options.type]) === null || _typeMap$options$type13 === void 0 ? void 0 : (_typeMap$options$type14 = _typeMap$options$type13.validator) === null || _typeMap$options$type14 === void 0 ? void 0 : _typeMap$options$type14.call(_typeMap$options$type13, _rule, value, options.type)) || function () {
|
|
252
247
|
return Promise.resolve();
|
|
253
248
|
};
|
|
254
249
|
}
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, 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, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BuyerNick |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BuyerNick | JstSendGood | MsgStatus | PublicReissueGoods | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.0.54-beta.
|
|
3
|
+
"version": "2.0.54-beta.46",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.0.54-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.54-beta.46",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.46",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "832b0e90615859704a621522ebd87ae205be369f",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|