@kmkf-fe-packages/services-components 1.17.8 → 1.18.0
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.
|
@@ -110,7 +110,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
110
110
|
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
111
111
|
this.rules = [{
|
|
112
112
|
validator: function validator(_, value) {
|
|
113
|
-
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9, _this$componentConfig10;
|
|
113
|
+
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9, _this$componentConfig10, _this$componentConfig11;
|
|
114
114
|
if (!value) {
|
|
115
115
|
return Promise.resolve();
|
|
116
116
|
}
|
|
@@ -127,11 +127,14 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
127
127
|
if (testList.length && !isTest) {
|
|
128
128
|
return Promise.reject(new Error("请填写正确的格式"));
|
|
129
129
|
}
|
|
130
|
-
if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 &&
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 && _this$componentConfig9.isNumber && value > Number.MAX_SAFE_INTEGER) {
|
|
131
|
+
return Promise.reject(new Error("输入数值超出最大数字上限,请使用文本框替代当前数字输入框组件"));
|
|
132
|
+
}
|
|
133
|
+
if ((_this$componentConfig10 = _this.componentConfig) !== null && _this$componentConfig10 !== void 0 && (_this$componentConfig11 = _this$componentConfig10.rulesOptions) !== null && _this$componentConfig11 !== void 0 && _this$componentConfig11.length) {
|
|
134
|
+
var _this$componentConfig12;
|
|
135
|
+
var rulesList = (_this$componentConfig12 = _this.componentConfig) === null || _this$componentConfig12 === void 0 ? void 0 : _this$componentConfig12.rulesOptions.filter(function (item) {
|
|
136
|
+
var _this$componentConfig13;
|
|
137
|
+
return (((_this$componentConfig13 = _this.componentConfig) === null || _this$componentConfig13 === void 0 ? void 0 : _this$componentConfig13.selectRules) || []).includes(item.id);
|
|
135
138
|
});
|
|
136
139
|
if (!rulesList.length) {
|
|
137
140
|
return Promise.resolve();
|
|
@@ -154,8 +157,8 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
154
157
|
validateTrigger: "onBlur",
|
|
155
158
|
validator: function () {
|
|
156
159
|
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
|
|
157
|
-
var _this$
|
|
158
|
-
var _resultList$, params, _yield$replaceCheck, resultList, _this$
|
|
160
|
+
var _this$componentConfig14;
|
|
161
|
+
var _resultList$, params, _yield$replaceCheck, resultList, _this$componentConfig15, _this$componentConfig16, _this$componentConfig17, messageMap;
|
|
159
162
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
160
163
|
while (1) switch (_context.prev = _context.next) {
|
|
161
164
|
case 0:
|
|
@@ -165,7 +168,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
165
168
|
}
|
|
166
169
|
return _context.abrupt("return", Promise.resolve());
|
|
167
170
|
case 2:
|
|
168
|
-
if (!((_this$
|
|
171
|
+
if (!((_this$componentConfig14 = _this.componentConfig) !== null && _this$componentConfig14 !== void 0 && _this$componentConfig14.replaceWarn)) {
|
|
169
172
|
_context.next = 11;
|
|
170
173
|
break;
|
|
171
174
|
}
|
|
@@ -192,7 +195,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
192
195
|
currFlow: "数据已存在本模版中,不能重复提交",
|
|
193
196
|
allWorkOrder: "数据已存在其他模版中,不能重复提交"
|
|
194
197
|
};
|
|
195
|
-
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$
|
|
198
|
+
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$componentConfig15 = (_this$componentConfig16 = _this.componentConfig) === null || _this$componentConfig16 === void 0 ? void 0 : (_this$componentConfig17 = _this$componentConfig16.repeatConfig) === null || _this$componentConfig17 === void 0 ? void 0 : _this$componentConfig17.repeatRange) !== null && _this$componentConfig15 !== void 0 ? _this$componentConfig15 : ""] || "内容已存在,不能重复提交")));
|
|
196
199
|
case 11:
|
|
197
200
|
case "end":
|
|
198
201
|
return _context.stop();
|
|
@@ -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
|
});
|
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) => BasicCascader |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BasicCascader | StatusSelect | TradeId | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | 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 | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | KmErpSendGood | AfterSalesOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
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.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.18.0",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.18.0",
|
|
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": "265fae291ea1a593f34557f5496e072a4b6b2ea4",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|