@kmkf-fe-packages/services-components 0.10.0-alpha.1 → 0.10.0-alpha.3
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/FlowMarkSelect/index.d.ts +1 -1
- package/dist/esm/components/FlowMarkSelect/index.js +35 -25
- package/dist/esm/components/HandlerDeadLine/index.js +3 -0
- package/dist/esm/components/NodeDeadLine/index.js +3 -0
- package/dist/esm/components/WorkOrderId/index.js +2 -21
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +3 -0
- package/dist/esm/type.d.ts +0 -1
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ declare class FlowMarkSelect implements ComponentInterface {
|
|
|
16
16
|
dataType: ComponentInterface["dataType"];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
|
-
renderLog: (r: Record) =>
|
|
19
|
+
renderLog: (r: Record) => any;
|
|
20
20
|
getComponentValue: (r: Record) => any;
|
|
21
21
|
renderExport: (value: any, record: Record) => any;
|
|
22
22
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -15,6 +15,12 @@ import { ApaasSelect } from "@kmkf-fe-packages/basic-components";
|
|
|
15
15
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import GetFormItem from "../GetFormItem";
|
|
17
17
|
import { SYMBOL } from "../../constant";
|
|
18
|
+
import xing from "../../commonComponents/SelectMark/img/xingxing.png";
|
|
19
|
+
import xingRed from "../../commonComponents/SelectMark/img/xingxing-red.png";
|
|
20
|
+
import xingYellow from "../../commonComponents/SelectMark/img/xingxing-yellow.png";
|
|
21
|
+
import xingBlue from "../../commonComponents/SelectMark/img/xingxing-blue.png";
|
|
22
|
+
import xingGreen from "../../commonComponents/SelectMark/img/xingxing-green.png";
|
|
23
|
+
import xingPurple from "../../commonComponents/SelectMark/img/xingxing-purple.png";
|
|
18
24
|
var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options) {
|
|
19
25
|
var _this = this;
|
|
20
26
|
_classCallCheck(this, FlowMarkSelect);
|
|
@@ -46,13 +52,10 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
46
52
|
return item.value === (r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
|
|
47
53
|
});
|
|
48
54
|
if (!mark) return null;
|
|
49
|
-
return
|
|
55
|
+
return mark === null || mark === void 0 ? void 0 : mark.label;
|
|
50
56
|
});
|
|
51
57
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
52
|
-
|
|
53
|
-
return item.value === (r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
|
|
54
|
-
});
|
|
55
|
-
return mark;
|
|
58
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
56
59
|
});
|
|
57
60
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
58
61
|
var MARK_MAP = {
|
|
@@ -69,11 +72,15 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
69
72
|
return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : "--";
|
|
70
73
|
});
|
|
71
74
|
_defineProperty(this, "renderClient", function (record) {
|
|
72
|
-
|
|
75
|
+
if (!isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
76
|
+
var mark = _this.workOrderMark.find(function (item) {
|
|
77
|
+
return item.value === (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
78
|
+
});
|
|
79
|
+
return /*#__PURE__*/React.createElement(ItemView, {
|
|
73
80
|
id: _this.id,
|
|
74
81
|
label: _this.name,
|
|
75
|
-
value:
|
|
76
|
-
})
|
|
82
|
+
value: mark === null || mark === void 0 ? void 0 : mark.label
|
|
83
|
+
});
|
|
77
84
|
});
|
|
78
85
|
_defineProperty(this, "editRender", function (p) {
|
|
79
86
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -137,47 +144,50 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
137
144
|
this.canSort = false;
|
|
138
145
|
this.children = [];
|
|
139
146
|
this.workOrderMark = [{
|
|
140
|
-
label: /*#__PURE__*/React.createElement("
|
|
141
|
-
|
|
147
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
148
|
+
src: xing,
|
|
149
|
+
style: {
|
|
150
|
+
width: "16px"
|
|
151
|
+
}
|
|
142
152
|
}),
|
|
143
153
|
value: "1"
|
|
144
154
|
}, {
|
|
145
|
-
label: /*#__PURE__*/React.createElement("
|
|
146
|
-
|
|
155
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
156
|
+
src: xingRed,
|
|
147
157
|
style: {
|
|
148
|
-
|
|
158
|
+
width: "16px"
|
|
149
159
|
}
|
|
150
160
|
}),
|
|
151
161
|
value: "2"
|
|
152
162
|
}, {
|
|
153
|
-
label: /*#__PURE__*/React.createElement("
|
|
154
|
-
|
|
163
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
164
|
+
src: xingYellow,
|
|
155
165
|
style: {
|
|
156
|
-
|
|
166
|
+
width: "16px"
|
|
157
167
|
}
|
|
158
168
|
}),
|
|
159
169
|
value: "3"
|
|
160
170
|
}, {
|
|
161
|
-
label: /*#__PURE__*/React.createElement("
|
|
162
|
-
|
|
171
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
172
|
+
src: xingBlue,
|
|
163
173
|
style: {
|
|
164
|
-
|
|
174
|
+
width: "16px"
|
|
165
175
|
}
|
|
166
176
|
}),
|
|
167
177
|
value: "4"
|
|
168
178
|
}, {
|
|
169
|
-
label: /*#__PURE__*/React.createElement("
|
|
170
|
-
|
|
179
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
180
|
+
src: xingGreen,
|
|
171
181
|
style: {
|
|
172
|
-
|
|
182
|
+
width: "16px"
|
|
173
183
|
}
|
|
174
184
|
}),
|
|
175
185
|
value: "5"
|
|
176
186
|
}, {
|
|
177
|
-
label: /*#__PURE__*/React.createElement("
|
|
178
|
-
|
|
187
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
188
|
+
src: xingPurple,
|
|
179
189
|
style: {
|
|
180
|
-
|
|
190
|
+
width: "16px"
|
|
181
191
|
}
|
|
182
192
|
}),
|
|
183
193
|
value: "6"
|
|
@@ -12,7 +12,6 @@ import { CopyOutlined } from '@ant-design/icons';
|
|
|
12
12
|
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
13
|
import { filterFn as _filterFn, isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
|
-
import repeatPng from "./img/repeat.png";
|
|
16
15
|
import copy from 'copy-to-clipboard';
|
|
17
16
|
import { SYMBOL } from "../../constant";
|
|
18
17
|
var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
@@ -35,28 +34,10 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
35
34
|
message.success('复制成功');
|
|
36
35
|
});
|
|
37
36
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
|
-
var _record$repeatValueLi;
|
|
39
37
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
40
38
|
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
41
39
|
}
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
-
src: repeatPng,
|
|
44
|
-
style: {
|
|
45
|
-
width: '16px'
|
|
46
|
-
},
|
|
47
|
-
alt: "",
|
|
48
|
-
onClick: function onClick(e) {
|
|
49
|
-
var _this$effects, _this$effects2, _this$effects3, _this$effects4;
|
|
50
|
-
// TODO: 前端筛选时的重复提醒版本,等分享页面整改之后,这个将会废弃
|
|
51
|
-
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleOpenRepeatList) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.handleOpenRepeatList(record === null || record === void 0 ? void 0 : record.repeatConfig));
|
|
52
|
-
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.handleOpenRepeatDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects4 = _this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.handleOpenRepeatDetail({
|
|
53
|
-
templateId: record === null || record === void 0 ? void 0 : record.templateId,
|
|
54
|
-
workOrderUniqueKey: record === null || record === void 0 ? void 0 : record.id,
|
|
55
|
-
fieldList: record === null || record === void 0 ? void 0 : record.repeatValueList
|
|
56
|
-
}));
|
|
57
|
-
e.stopPropagation();
|
|
58
|
-
}
|
|
59
|
-
}), /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
|
|
60
41
|
onClick: function onClick(e) {
|
|
61
42
|
_this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
62
43
|
e.stopPropagation();
|
|
@@ -66,7 +47,7 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
66
47
|
paddingLeft: '4px',
|
|
67
48
|
cursor: 'pointer'
|
|
68
49
|
}
|
|
69
|
-
}, /*#__PURE__*/React.createElement(CopyOutlined, null))))
|
|
50
|
+
}, /*#__PURE__*/React.createElement(CopyOutlined, null))));
|
|
70
51
|
});
|
|
71
52
|
_defineProperty(this, "renderLog", function (r) {
|
|
72
53
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
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, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration } 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) => CommonMultiStatus | CommonSystemOrder | BasicFile | FlowMarkSelect | HandlerDeadLine | LogisticsInterception | NodeDeadLine | StatusSelect | TradeId | WorkOrderId | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicPosting | CommonDataTime | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | TemplateSelect | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | CommonTradeId | Calculation | NodeStayDuration;
|
package/dist/esm/factory.js
CHANGED
|
@@ -151,10 +151,13 @@ export var factory = function factory(type, options) {
|
|
|
151
151
|
case "NUMERICAL_CALCULATION":
|
|
152
152
|
return new Calculation(options);
|
|
153
153
|
case "NODE_DEAD_LINE_INPUT":
|
|
154
|
+
// 工单时效
|
|
154
155
|
return new NodeDeadLine(options);
|
|
155
156
|
case "HANDLER_DEAD_LINE_INPUT":
|
|
157
|
+
// 处理人时效
|
|
156
158
|
return new HandlerDeadLine(options);
|
|
157
159
|
case "NODE_STAY_DURATION_INPUT":
|
|
160
|
+
// 工单停留时长
|
|
158
161
|
return new NodeStayDuration(options);
|
|
159
162
|
default:
|
|
160
163
|
return new BasicInput(options);
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -161,7 +161,6 @@ export interface ComponentInterface {
|
|
|
161
161
|
effects?: {
|
|
162
162
|
queryWorkOrderDetail?: (r: Record) => void;
|
|
163
163
|
handleOpenRepeatList?: (r: Record) => void;
|
|
164
|
-
handleOpenRepeatDetail?: (r: Record) => void;
|
|
165
164
|
handleChangeSingleWorkOrderMark?: (t: string, r: Record) => void;
|
|
166
165
|
templateList?: any[];
|
|
167
166
|
isEditing?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.10.0-alpha.
|
|
3
|
+
"version": "0.10.0-alpha.3",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "bfbdec0b09011a9c9fedb9e4577aad0a5887732a"
|
|
44
44
|
}
|