@kmkf-fe-packages/services-components 0.7.15-alpha.50 → 0.7.15-alpha.52
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.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare class FlowWorkOrderId implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
copyHandle: (text: string) => void;
|
|
18
|
+
renderPc: (value: any, record: any) => React.JSX.Element;
|
|
19
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: (value: any, record: any) => any;
|
|
22
|
+
renderClient: () => null;
|
|
23
|
+
editRender: (p: any) => React.JSX.Element;
|
|
24
|
+
filterConfig: (item: ColumnConfig) => {
|
|
25
|
+
searchDefaultConditions: "like";
|
|
26
|
+
type: string;
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
filterComponentType: "Input";
|
|
30
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export default FlowWorkOrderId;
|
|
@@ -0,0 +1,107 @@
|
|
|
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 _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); }
|
|
3
|
+
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); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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
|
+
import React from 'react';
|
|
10
|
+
import { message } from 'antd';
|
|
11
|
+
import { CopyOutlined } from '@ant-design/icons';
|
|
12
|
+
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import { filterFn as _filterFn, isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
|
+
import GetFormItem from "../GetFormItem";
|
|
15
|
+
import copy from 'copy-to-clipboard';
|
|
16
|
+
import { SYMBOL } from "../../constant";
|
|
17
|
+
var FlowWorkOrderId = /*#__PURE__*/_createClass(function FlowWorkOrderId(options) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
_classCallCheck(this, FlowWorkOrderId);
|
|
20
|
+
_defineProperty(this, "name", void 0);
|
|
21
|
+
_defineProperty(this, "id", void 0);
|
|
22
|
+
_defineProperty(this, "sortField", void 0);
|
|
23
|
+
_defineProperty(this, "type", void 0);
|
|
24
|
+
_defineProperty(this, "rules", void 0);
|
|
25
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
26
|
+
_defineProperty(this, "effects", void 0);
|
|
27
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
28
|
+
_defineProperty(this, "formField", void 0);
|
|
29
|
+
_defineProperty(this, "canSort", void 0);
|
|
30
|
+
_defineProperty(this, "children", void 0);
|
|
31
|
+
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "copyHandle", function (text) {
|
|
33
|
+
copy(text);
|
|
34
|
+
message.success('复制成功');
|
|
35
|
+
});
|
|
36
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
37
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
|
|
41
|
+
onClick: function onClick() {
|
|
42
|
+
return _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
45
|
+
style: {
|
|
46
|
+
paddingLeft: '4px',
|
|
47
|
+
cursor: 'pointer'
|
|
48
|
+
}
|
|
49
|
+
}, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
52
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
53
|
+
return _this.renderPc(undefined, r);
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
56
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
59
|
+
var _record;
|
|
60
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
|
|
61
|
+
});
|
|
62
|
+
_defineProperty(this, "renderClient", function () {
|
|
63
|
+
return null;
|
|
64
|
+
});
|
|
65
|
+
_defineProperty(this, "editRender", function (p) {
|
|
66
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
67
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
68
|
+
title: _this.name,
|
|
69
|
+
name: _this.id,
|
|
70
|
+
rules: _this.rules,
|
|
71
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
72
|
+
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,
|
|
73
|
+
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
74
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
75
|
+
}))
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
79
|
+
return {
|
|
80
|
+
searchDefaultConditions: SYMBOL.like,
|
|
81
|
+
type: item.type,
|
|
82
|
+
id: item.id,
|
|
83
|
+
// 过滤组件id
|
|
84
|
+
name: item.name,
|
|
85
|
+
// 过滤组件名称
|
|
86
|
+
filterComponentType: 'Input',
|
|
87
|
+
filterFn: function filterFn(value) {
|
|
88
|
+
return function (i) {
|
|
89
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, '')).includes(value);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
this.name = options.name;
|
|
95
|
+
this.id = options.id;
|
|
96
|
+
this.sortField = options.id;
|
|
97
|
+
this.formField = options.id;
|
|
98
|
+
this.type = options.type;
|
|
99
|
+
this.componentConfig = options.componentConfig;
|
|
100
|
+
this.effects = options.effects;
|
|
101
|
+
this.dataType = 'string';
|
|
102
|
+
this.rules = [];
|
|
103
|
+
this.isCombinationComponent = false;
|
|
104
|
+
this.canSort = true;
|
|
105
|
+
this.children = [];
|
|
106
|
+
});
|
|
107
|
+
export default FlowWorkOrderId;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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, BsGoods, BsExchange, BsReissue } from "./index";
|
|
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
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ShopInput | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | Submitter | Handler | CompletedUser | FlowWorkOrderId;
|
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, BsGoods, BsExchange, BsReissue } from "./index";
|
|
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) {
|
|
@@ -121,6 +121,10 @@ export var factory = function factory(type, options) {
|
|
|
121
121
|
return new BsExchange(options);
|
|
122
122
|
case "BS_REISSUE_GOODS":
|
|
123
123
|
return new BsReissue(options);
|
|
124
|
+
case "FLOW_WORK_ORDER_ID_INPUT":
|
|
125
|
+
return new FlowWorkOrderId(options);
|
|
126
|
+
case "OUTER_WORK_ORDER_ID_INPUT":
|
|
127
|
+
return new FlowWorkOrderId(options);
|
|
124
128
|
default:
|
|
125
129
|
return new BasicInput(options);
|
|
126
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/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.52",
|
|
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.52",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.52"
|
|
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": "0199c87bc3d0e9052898417651a1dc322297619d"
|
|
44
44
|
}
|