@kmkf-fe-packages/services-components 0.21.6-alpha.4 → 0.21.6-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +7 -6
- package/dist/esm/components/BS/BsSystemOrder/index.js +22 -19
- package/dist/esm/components/BS/DeliveryNo/index.d.ts +6 -5
- package/dist/esm/components/BS/DeliveryNo/index.js +15 -12
- package/dist/esm/components/CommonMultiStatus/index.d.ts +6 -5
- package/dist/esm/components/CommonMultiStatus/index.js +58 -51
- package/dist/esm/components/CommonSystemOrder/index.d.ts +6 -5
- package/dist/esm/components/CommonSystemOrder/index.js +29 -26
- package/dist/esm/components/Input/index.d.ts +3 -2
- package/dist/esm/components/Input/index.js +10 -3
- package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -0
- package/dist/esm/components/JST/JstLogistics/index.js +18 -4
- package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +12 -2
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +7 -14
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.d.ts +7 -7
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.js +18 -37
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.d.ts +8 -8
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.js +16 -29
- package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.d.ts +6 -6
- package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.js +14 -29
- package/dist/esm/components/Payment/index.d.ts +12 -12
- package/dist/esm/components/Payment/index.js +11 -12
- package/dist/esm/components/PostIng/index.js +1 -1
- package/dist/esm/components/TradeId/index.d.ts +1 -1
- package/dist/esm/components/TradeId/index.js +2 -2
- package/dist/esm/constant.d.ts +1 -0
- package/dist/esm/constant.js +3 -0
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +14 -14
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import AlipayNick from
|
|
4
|
-
import AlipayNo from
|
|
5
|
-
import AlipayTime from
|
|
6
|
-
import BuyerNick from
|
|
7
|
-
import PaymentAmount from
|
|
8
|
-
import PaymentStatus from
|
|
9
|
-
import PaymentTid from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import AlipayNick from "./AlipayNick";
|
|
4
|
+
import AlipayNo from "./AlipayNo";
|
|
5
|
+
import AlipayTime from "./AlipayTime";
|
|
6
|
+
import BuyerNick from "./BuyerNick";
|
|
7
|
+
import PaymentAmount from "./PaymentAmount";
|
|
8
|
+
import PaymentStatus from "./PaymentStatus";
|
|
9
|
+
import PaymentTid from "./PaymentTid";
|
|
10
10
|
declare class Logistics implements ComponentInterface {
|
|
11
11
|
name: string;
|
|
12
12
|
id: string;
|
|
13
13
|
sortField: string;
|
|
14
14
|
type: string;
|
|
15
15
|
rules: any[];
|
|
16
|
-
componentConfig: ComponentInterface[
|
|
16
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
17
17
|
paymentTid: PaymentTid;
|
|
18
18
|
paymentStatus: PaymentStatus;
|
|
19
19
|
paymentAmount: PaymentAmount;
|
|
@@ -25,8 +25,8 @@ declare class Logistics implements ComponentInterface {
|
|
|
25
25
|
formField: string;
|
|
26
26
|
canSort: boolean;
|
|
27
27
|
children: ComponentInterface[];
|
|
28
|
-
dataType: ComponentInterface[
|
|
29
|
-
effects: ComponentInterface[
|
|
28
|
+
dataType: ComponentInterface["dataType"];
|
|
29
|
+
effects: ComponentInterface["effects"];
|
|
30
30
|
constructor(options: PickOption);
|
|
31
31
|
renderClient: (record: any, params: any) => React.JSX.Element;
|
|
32
32
|
renderPc: () => null;
|
|
@@ -8,8 +8,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
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
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
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
|
|
12
|
-
import { Payment as ApaasPayment } from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { Payment as ApaasPayment } from "@kmkf-fe-packages/basic-components";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import AlipayNick from "./AlipayNick";
|
|
15
15
|
import AlipayNo from "./AlipayNo";
|
|
@@ -97,38 +97,37 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
97
97
|
this.isCombinationComponent = true;
|
|
98
98
|
this.canSort = false;
|
|
99
99
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
100
|
-
console.log();
|
|
101
100
|
this.children = [this.alipayNick, this.alipayNo, this.buyerNick, this.paymentAmount, this.paymentStatus, this.paymentTid, this.payTime];
|
|
102
101
|
this.rules = [{
|
|
103
102
|
validator: function validator(_, value) {
|
|
104
103
|
var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
|
|
105
104
|
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
|
|
106
|
-
return Promise.reject(new Error(
|
|
105
|
+
return Promise.reject(new Error("请输入打款金额"));
|
|
107
106
|
} else if (value !== null && value !== void 0 && value.enterprisePaymentRefundFee && !/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/.test(value === null || value === void 0 ? void 0 : value.enterprisePaymentRefundFee)) {
|
|
108
|
-
return Promise.reject(new Error(
|
|
107
|
+
return Promise.reject(new Error("打款金额最多2位小数"));
|
|
109
108
|
}
|
|
110
109
|
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
|
|
111
|
-
return Promise.reject(new Error(
|
|
110
|
+
return Promise.reject(new Error("请输入订单编号"));
|
|
112
111
|
} else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
|
|
113
|
-
return Promise.reject(new Error(
|
|
112
|
+
return Promise.reject(new Error("请输入正确的订单编号"));
|
|
114
113
|
}
|
|
115
114
|
if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
|
|
116
|
-
return Promise.reject(new Error(
|
|
115
|
+
return Promise.reject(new Error("请输入支付宝名称"));
|
|
117
116
|
}
|
|
118
117
|
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
|
|
119
|
-
return Promise.reject(new Error(
|
|
118
|
+
return Promise.reject(new Error("请输入支付宝账号"));
|
|
120
119
|
} else if (value.enterprisePaymentAlipayNo && !/^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/.test(value.enterprisePaymentAlipayNo)) {
|
|
121
|
-
return Promise.reject(new Error(
|
|
120
|
+
return Promise.reject(new Error("请输入正确的支付宝账号格式"));
|
|
122
121
|
}
|
|
123
122
|
//支付宝信息不能只填一个,否则不能打款
|
|
124
123
|
if (value !== null && value !== void 0 && value.enterprisePaymentAlipayNick || value !== null && value !== void 0 && value.enterprisePaymentAlipayNo) {
|
|
125
124
|
if (!(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick && value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
|
|
126
|
-
return Promise.reject(new Error(
|
|
125
|
+
return Promise.reject(new Error("支付宝姓名/账号都要填写"));
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
128
|
return Promise.resolve();
|
|
130
129
|
}
|
|
131
130
|
}];
|
|
132
|
-
this.dataType =
|
|
131
|
+
this.dataType = "object";
|
|
133
132
|
});
|
|
134
133
|
export default Logistics;
|
|
@@ -169,7 +169,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
169
169
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
170
170
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
171
171
|
component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
|
|
172
|
-
type: _this.type === "
|
|
172
|
+
type: _this.type === "POSTING" || ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) === "workOrder" ? "workOrder" : "bs"
|
|
173
173
|
}))
|
|
174
174
|
});
|
|
175
175
|
});
|
|
@@ -30,7 +30,7 @@ declare class ETradeId implements ComponentInterface {
|
|
|
30
30
|
name: string;
|
|
31
31
|
filterComponentType: "Input";
|
|
32
32
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
33
|
-
formatFilterValue: (input: string) => string[];
|
|
33
|
+
formatFilterValue: (input: string) => string | string[];
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
export default ETradeId;
|
|
@@ -14,7 +14,7 @@ import GetFormItem from "../GetFormItem";
|
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
15
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
16
|
import copy from 'copy-to-clipboard';
|
|
17
|
-
import { SYMBOL } from "../../constant";
|
|
17
|
+
import { SYMBOL, batchInput } from "../../constant";
|
|
18
18
|
var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
19
19
|
var _this = this;
|
|
20
20
|
_classCallCheck(this, ETradeId);
|
|
@@ -109,7 +109,7 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
|
|
|
109
109
|
};
|
|
110
110
|
},
|
|
111
111
|
formatFilterValue: function formatFilterValue(input) {
|
|
112
|
-
return input
|
|
112
|
+
return batchInput(input);
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
});
|
package/dist/esm/constant.d.ts
CHANGED
package/dist/esm/constant.js
CHANGED
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, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } 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) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonDataTime | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowCreator | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | BasicGrade | Handler | HandlerDeadLine | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | NodeDeadLine | NodeStayDuration | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | PrevSubmitter | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | StatusSelect | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WlnGoods | WorkOrderId;
|
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;
|
|
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
|
|
|
27
27
|
filterFn?: (p: any) => (r: Record) => unknown;
|
|
28
28
|
formatFilterValue?: (p: any) => any;
|
|
29
29
|
};
|
|
30
|
-
export declare type FilterComponentType =
|
|
30
|
+
export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
|
|
31
31
|
export interface ComponentInterface {
|
|
32
32
|
id: string;
|
|
33
33
|
sortField: string;
|
|
@@ -47,8 +47,8 @@ export interface ComponentInterface {
|
|
|
47
47
|
rules?: any[];
|
|
48
48
|
width?: number;
|
|
49
49
|
align?: ALignType;
|
|
50
|
-
dataType:
|
|
51
|
-
format?:
|
|
50
|
+
dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
|
|
51
|
+
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput";
|
|
52
52
|
options?: Array<any>;
|
|
53
53
|
templateId?: string;
|
|
54
54
|
workOrderUniqueKey?: string;
|
|
@@ -77,7 +77,7 @@ export interface ComponentInterface {
|
|
|
77
77
|
/**
|
|
78
78
|
* @description 显示字段名称
|
|
79
79
|
*/
|
|
80
|
-
showField?:
|
|
80
|
+
showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder";
|
|
81
81
|
/**
|
|
82
82
|
* @description 是否选择SKU
|
|
83
83
|
*/
|
|
@@ -97,7 +97,7 @@ export interface ComponentInterface {
|
|
|
97
97
|
/**
|
|
98
98
|
* @description 备注状态
|
|
99
99
|
*/
|
|
100
|
-
associatedType?:
|
|
100
|
+
associatedType?: "APPEND";
|
|
101
101
|
isAssociated?: boolean;
|
|
102
102
|
isShowFlag?: boolean;
|
|
103
103
|
/**
|
|
@@ -138,7 +138,7 @@ export interface ComponentInterface {
|
|
|
138
138
|
* @description 时间初始值
|
|
139
139
|
*/
|
|
140
140
|
dateTime?: string;
|
|
141
|
-
dateType?:
|
|
141
|
+
dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
|
|
142
142
|
maxSize?: number;
|
|
143
143
|
basicGrade?: number;
|
|
144
144
|
range?: number;
|
|
@@ -233,13 +233,13 @@ export interface ComponentInterface {
|
|
|
233
233
|
getComponentValue: (r: Record) => any;
|
|
234
234
|
formDataTransform?: (r: any) => any;
|
|
235
235
|
}
|
|
236
|
-
export declare type PickOption = Pick<ComponentInterface,
|
|
236
|
+
export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey">;
|
|
237
237
|
export declare type ColumnConfig = {
|
|
238
238
|
id: string;
|
|
239
239
|
name: string;
|
|
240
240
|
type: string;
|
|
241
241
|
subKey?: string;
|
|
242
|
-
mode?:
|
|
243
|
-
config?: ComponentInterface[
|
|
244
|
-
templateConfig?: ComponentInterface[
|
|
242
|
+
mode?: "multiple";
|
|
243
|
+
config?: ComponentInterface["componentConfig"];
|
|
244
|
+
templateConfig?: ComponentInterface["componentConfig"];
|
|
245
245
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.21.6-alpha.
|
|
3
|
+
"version": "0.21.6-alpha.5",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.21.6-alpha.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.21.6-alpha.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.21.6-alpha.5",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.21.6-alpha.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "70403ea96f15ae50fca601163149eeff73d911eb",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|