@kmkf-fe-packages/services-components 0.7.15-alpha.67 → 0.7.15-alpha.69
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/Common/index.js +1 -1
- package/dist/esm/components/FlowWorkOrderId/index.js +3 -2
- package/dist/esm/components/PostIng/index.d.ts +5 -5
- package/dist/esm/components/PostIng/index.js +34 -29
- package/dist/esm/components/WorkOrderId/index.js +3 -2
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -115,7 +115,7 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
115
115
|
return setVisible(true);
|
|
116
116
|
}
|
|
117
117
|
}, "\u67E5\u770B\u5168\u90E8(".concat(total, ")")), /*#__PURE__*/React.createElement(Modal, {
|
|
118
|
-
|
|
118
|
+
visible: visible,
|
|
119
119
|
footer: null,
|
|
120
120
|
onCancel: function onCancel() {
|
|
121
121
|
return setVisible(false);
|
|
@@ -42,8 +42,9 @@ var FlowWorkOrderId = /*#__PURE__*/_createClass(function FlowWorkOrderId(options
|
|
|
42
42
|
return e.stopPropagation();
|
|
43
43
|
}
|
|
44
44
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
|
|
45
|
-
onClick: function onClick() {
|
|
46
|
-
|
|
45
|
+
onClick: function onClick(e) {
|
|
46
|
+
_this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
47
|
+
e.stopPropagation();
|
|
47
48
|
}
|
|
48
49
|
}, /*#__PURE__*/React.createElement("span", {
|
|
49
50
|
style: {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { AddressData } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
4
|
declare class BasicPosting implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -6,28 +6,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
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
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
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
|
|
10
|
-
import { ApaasPosting } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
-
import { isNull } from
|
|
14
|
-
import { AddressData, BsAddressData } from
|
|
13
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { AddressData, BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
var typeMap = {
|
|
16
16
|
POSTING: {
|
|
17
|
-
province:
|
|
18
|
-
city:
|
|
19
|
-
district:
|
|
20
|
-
detail:
|
|
21
|
-
name:
|
|
22
|
-
mobile:
|
|
17
|
+
province: "postingProvince",
|
|
18
|
+
city: "postingCity",
|
|
19
|
+
district: "postingDistrict",
|
|
20
|
+
detail: "postingDetail",
|
|
21
|
+
name: "postingReceiverName",
|
|
22
|
+
mobile: "postingReceiverMobile"
|
|
23
23
|
},
|
|
24
24
|
BS_POSTING: {
|
|
25
|
-
province:
|
|
26
|
-
city:
|
|
27
|
-
district:
|
|
28
|
-
detail:
|
|
29
|
-
name:
|
|
30
|
-
mobile:
|
|
25
|
+
province: "bsPostingProvince",
|
|
26
|
+
city: "bsPostingCity",
|
|
27
|
+
district: "bsPostingDistrict",
|
|
28
|
+
detail: "bsPostingDetail",
|
|
29
|
+
name: "bsPostingReceiverName",
|
|
30
|
+
mobile: "bsPostingReceiverMobile"
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
@@ -59,8 +59,13 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
59
59
|
}
|
|
60
60
|
var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
|
|
61
61
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
62
|
-
}).join(
|
|
63
|
-
return /*#__PURE__*/React.createElement("
|
|
62
|
+
}).join("");
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
style: {
|
|
65
|
+
maxHeight: "100px",
|
|
66
|
+
overflowY: "auto"
|
|
67
|
+
}
|
|
68
|
+
}, "".concat(addressText).concat(detail), /*#__PURE__*/React.createElement("br", null), "".concat(name, " ").concat(mobile));
|
|
64
69
|
});
|
|
65
70
|
_defineProperty(this, "renderLog", function (r) {
|
|
66
71
|
var _ref2;
|
|
@@ -76,7 +81,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
76
81
|
})) return null;
|
|
77
82
|
var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
|
|
78
83
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
79
|
-
}).join(
|
|
84
|
+
}).join("");
|
|
80
85
|
return /*#__PURE__*/React.createElement(React.Fragment, null, "".concat(addressText).concat(detail, " ").concat(name).concat(mobile));
|
|
81
86
|
});
|
|
82
87
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
@@ -85,9 +90,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
85
90
|
province: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.province)],
|
|
86
91
|
city: 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.city)],
|
|
87
92
|
district: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.district)],
|
|
88
|
-
detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.detail)]) ||
|
|
89
|
-
name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.name)]) ||
|
|
90
|
-
mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.mobile)]) ||
|
|
93
|
+
detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.detail)]) || "",
|
|
94
|
+
name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.name)]) || "",
|
|
95
|
+
mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.mobile)]) || ""
|
|
91
96
|
};
|
|
92
97
|
});
|
|
93
98
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
@@ -104,7 +109,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
104
109
|
})) return null;
|
|
105
110
|
var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
|
|
106
111
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
107
|
-
}).join(
|
|
112
|
+
}).join("");
|
|
108
113
|
return "".concat(addressText).concat(detail, " ").concat(name).concat(mobile);
|
|
109
114
|
});
|
|
110
115
|
_defineProperty(this, "renderClient", function (record) {
|
|
@@ -117,9 +122,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
117
122
|
var mobile = record["".concat(_this.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.mobile)];
|
|
118
123
|
var addressText = (_ref4 = [province, city, district]) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (suffix) {
|
|
119
124
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
120
|
-
}).join(
|
|
125
|
+
}).join("");
|
|
121
126
|
var hasValue = addressText || detail || name || mobile;
|
|
122
|
-
var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join(
|
|
127
|
+
var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join("/"), /*#__PURE__*/React.createElement("br", null), [name, mobile].join("/")) : null;
|
|
123
128
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
124
129
|
id: _this.id,
|
|
125
130
|
label: _this.name,
|
|
@@ -135,7 +140,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
135
140
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
136
141
|
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,
|
|
137
142
|
component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
|
|
138
|
-
type: _this.type ===
|
|
143
|
+
type: _this.type === "POSTING" ? "workOrder" : "bs"
|
|
139
144
|
}))
|
|
140
145
|
});
|
|
141
146
|
});
|
|
@@ -194,13 +199,13 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
194
199
|
this.isCombinationComponent = false;
|
|
195
200
|
this.canSort = false;
|
|
196
201
|
this.children = [];
|
|
197
|
-
this.dataType =
|
|
198
|
-
this.addressDateInstance = options.type ===
|
|
202
|
+
this.dataType = "string";
|
|
203
|
+
this.addressDateInstance = options.type === "BS_POSTING" ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
199
204
|
this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
|
|
200
205
|
validator: function validator(_, value) {
|
|
201
206
|
var _value$postingAddress;
|
|
202
207
|
if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
|
|
203
|
-
return Promise.reject(new Error(
|
|
208
|
+
return Promise.reject(new Error("请填写地址"));
|
|
204
209
|
}
|
|
205
210
|
return Promise.resolve();
|
|
206
211
|
}
|
|
@@ -57,8 +57,9 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
57
57
|
e.stopPropagation();
|
|
58
58
|
}
|
|
59
59
|
}), /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
|
|
60
|
-
onClick: function onClick() {
|
|
61
|
-
|
|
60
|
+
onClick: function onClick(e) {
|
|
61
|
+
_this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
62
|
+
e.stopPropagation();
|
|
62
63
|
}
|
|
63
64
|
}, /*#__PURE__*/React.createElement("span", {
|
|
64
65
|
style: {
|
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, 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) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsReissue | BuyerNick | BasicCascader | BasicCheckbox | CommonDataTime | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowStatusSelect | FlowWorkOrderId | BasicGrade | Handler | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsTrajectory | BasicMultSelect | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WorkOrderId;
|
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.69",
|
|
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.69",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.69"
|
|
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": "10f0ff0eb8ca3abf9895f3489db3cde4ffbfa05e"
|
|
44
44
|
}
|