@kmkf-fe-packages/services-components 1.16.5-alpha.0 → 1.16.5-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +11 -9
- package/dist/esm/components/BS/BsLogistics/index.js +13 -31
- package/dist/esm/components/Common/index.js +2 -2
- package/dist/esm/components/EItemEnCode/index.d.ts +7 -0
- package/dist/esm/components/EItemEnCode/index.js +21 -1
- package/dist/esm/components/Input/index.js +13 -10
- package/dist/esm/components/JST/JstItemSelect/index.d.ts +7 -0
- package/dist/esm/components/JST/JstItemSelect/index.js +21 -5
- package/dist/esm/components/JST/JstLogistics/index.js +13 -31
- package/dist/esm/components/JST/JstSendGood/index.d.ts +2 -1
- package/dist/esm/components/JST/JstSendGood/index.js +20 -31
- package/dist/esm/components/JST/JstSupply/index.d.ts +7 -0
- package/dist/esm/components/JST/JstSupply/index.js +27 -11
- package/dist/esm/components/KmErpSendGood/index.js +11 -26
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.d.ts +39 -0
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.js +112 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
- package/dist/esm/components/LogisticsInterception/index.js +8 -4
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.d.ts +40 -0
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +107 -0
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +15 -13
- package/dist/esm/components/LogisticsMoreInterception/index.js +26 -19
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +1 -1
- package/dist/esm/components/MsgStatus/index.js +21 -11
- package/dist/esm/components/SubForm/index.js +16 -2
- package/dist/esm/components/ThirdItemSelect/index.d.ts +7 -0
- package/dist/esm/components/ThirdItemSelect/index.js +25 -9
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +2 -2
- package/package.json +4 -4
|
@@ -21,6 +21,7 @@ import BsHeaderChild from "../BS/common/BsHeaderChild";
|
|
|
21
21
|
import GetFormItem from "../GetFormItem";
|
|
22
22
|
import ItemView from "../../commonComponents/ItemView";
|
|
23
23
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
24
|
+
import { difference } from 'lodash';
|
|
24
25
|
import { SYMBOL } from "../../constant";
|
|
25
26
|
var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
26
27
|
var _this = this;
|
|
@@ -160,9 +161,22 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
160
161
|
}
|
|
161
162
|
return prv;
|
|
162
163
|
}, {});
|
|
163
|
-
|
|
164
|
+
// TODO: 补充确省字段
|
|
165
|
+
var fillKeysValue = value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
166
|
+
var _this$componentConfig11, _this$componentConfig12;
|
|
167
|
+
var lostKeys = difference((_this$componentConfig11 = _this.componentConfig) === null || _this$componentConfig11 === void 0 ? void 0 : (_this$componentConfig12 = _this$componentConfig11.tableHeader) === null || _this$componentConfig12 === void 0 ? void 0 : _this$componentConfig12.map(function (item) {
|
|
168
|
+
return item.key;
|
|
169
|
+
}), Object.keys(item));
|
|
170
|
+
if (!isNull(lostKeys)) {
|
|
171
|
+
return lostKeys.reduce(function (prv, next) {
|
|
172
|
+
return _objectSpread(_objectSpread({}, prv), {}, _defineProperty({}, next, undefined));
|
|
173
|
+
}, item);
|
|
174
|
+
}
|
|
175
|
+
return item;
|
|
176
|
+
});
|
|
177
|
+
var msg = (fillKeysValue || []).reduce(function (prv, next) {
|
|
164
178
|
Object.keys(next).forEach(function (key) {
|
|
165
|
-
if (result[key] &&
|
|
179
|
+
if (result[key] && isNull(next[key])) {
|
|
166
180
|
prv = result[key];
|
|
167
181
|
}
|
|
168
182
|
});
|
|
@@ -13,7 +13,14 @@ declare class ThirdItemSelect implements ComponentInterface {
|
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface['dataType'];
|
|
16
|
+
sortChildField: {
|
|
17
|
+
name: string;
|
|
18
|
+
key: string;
|
|
19
|
+
dataType: string;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}[];
|
|
16
22
|
constructor(options: PickOption);
|
|
23
|
+
getSortChildFields: () => any;
|
|
17
24
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
18
25
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
26
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -15,7 +15,7 @@ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options) {
|
|
17
17
|
var _this = this,
|
|
18
|
-
_this$
|
|
18
|
+
_this$componentConfig6;
|
|
19
19
|
_classCallCheck(this, ThirdItemSelect);
|
|
20
20
|
_defineProperty(this, "name", void 0);
|
|
21
21
|
_defineProperty(this, "id", void 0);
|
|
@@ -29,6 +29,21 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
29
29
|
_defineProperty(this, "canSort", void 0);
|
|
30
30
|
_defineProperty(this, "children", void 0);
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
33
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
34
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
35
|
+
return [{
|
|
36
|
+
name: '供应商编码',
|
|
37
|
+
key: "".concat(_this.id, "_itemId"),
|
|
38
|
+
dataType: "arrayObject",
|
|
39
|
+
disabled: !((_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.enableItemId)
|
|
40
|
+
}, {
|
|
41
|
+
name: '供应商名称',
|
|
42
|
+
key: "".concat(_this.id, "_supplierName"),
|
|
43
|
+
dataType: "arrayObject",
|
|
44
|
+
disabled: !((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.enableSupplierName)
|
|
45
|
+
}];
|
|
46
|
+
});
|
|
32
47
|
_defineProperty(this, "renderClient", function (record) {
|
|
33
48
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
49
|
id: _this.id,
|
|
@@ -68,7 +83,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
68
83
|
});
|
|
69
84
|
});
|
|
70
85
|
_defineProperty(this, "editRender", function (p) {
|
|
71
|
-
var _this$
|
|
86
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2;
|
|
72
87
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
73
88
|
title: _this.name,
|
|
74
89
|
name: _this.id,
|
|
@@ -76,9 +91,9 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
76
91
|
required: false,
|
|
77
92
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
78
93
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
79
|
-
tooltip: (_this$
|
|
94
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
|
|
80
95
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
81
|
-
maxLength: ((_this$
|
|
96
|
+
maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
|
|
82
97
|
type: 4,
|
|
83
98
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
84
99
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
@@ -118,28 +133,29 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
118
133
|
this.isCombinationComponent = false;
|
|
119
134
|
this.canSort = false;
|
|
120
135
|
this.children = [];
|
|
121
|
-
this.dataType = '
|
|
122
|
-
this.rules = (_this$
|
|
136
|
+
this.dataType = 'array';
|
|
137
|
+
this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
|
|
123
138
|
required: true,
|
|
124
139
|
validator: function validator(_, value) {
|
|
125
|
-
var _this$
|
|
140
|
+
var _this$componentConfig7, _this$componentConfig8;
|
|
126
141
|
if (!value || !value.length) {
|
|
127
142
|
return Promise.reject(new Error('请选择宝贝'));
|
|
128
143
|
}
|
|
129
144
|
var hasNotId = (value || []).some(function (item) {
|
|
130
145
|
return !item.itemId && !item.supplierItemOuterId;
|
|
131
146
|
});
|
|
132
|
-
if ((_this$
|
|
147
|
+
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.enableItemId && hasNotId) {
|
|
133
148
|
return Promise.reject(new Error('请输入供应商编码'));
|
|
134
149
|
}
|
|
135
150
|
var hasNotName = (value || []).some(function (item) {
|
|
136
151
|
return !item.supplierName;
|
|
137
152
|
});
|
|
138
|
-
if ((_this$
|
|
153
|
+
if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.enableSupplierName && hasNotName) {
|
|
139
154
|
return Promise.reject(new Error('请输入供应商名称'));
|
|
140
155
|
}
|
|
141
156
|
return Promise.resolve();
|
|
142
157
|
}
|
|
143
158
|
}] : [];
|
|
159
|
+
this.sortChildField = this.getSortChildFields();
|
|
144
160
|
});
|
|
145
161
|
export default ThirdItemSelect;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, 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, KmErpSendGood, AfterSalesOrderId } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | BasicCheckbox | ItemEnCode | FlowWorkOrderId | FlowWorkOrderStatus | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | KmErpSendGood | LogisticsInterception | LogisticsMoreInterception | MsgStatus | SubForm | ThirdItemSelect | BasicDataTime | TradeDateTime | BasicAddress | BasicCascader | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | SystemOrderNo | Ordinary | Payment | BsGoods | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | AfterSalesOrderId;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -47,8 +47,8 @@ export interface ComponentInterface {
|
|
|
47
47
|
rules?: any[];
|
|
48
48
|
width?: number;
|
|
49
49
|
align?: ALignType;
|
|
50
|
-
dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
|
|
51
|
-
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
|
|
50
|
+
dataType: "string" | "number" | "boolean" | "array" | "range" | "object" | "arrayObject";
|
|
51
|
+
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup" | "object";
|
|
52
52
|
options?: Array<any>;
|
|
53
53
|
templateId?: string;
|
|
54
54
|
flowTemplateKey?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.16.5-alpha.
|
|
3
|
+
"version": "1.16.5-alpha.6",
|
|
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": "1.16.5-alpha.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.16.5-alpha.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.16.5-alpha.6",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.16.5-alpha.6",
|
|
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": "adec71dedd1a96f8077aaba07425a02bcb6c5e04",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|