@kmkf-fe-packages/services-components 1.1.3 → 1.3.0-rc.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.
@@ -13,6 +13,7 @@ declare class BasicInput implements ComponentInterface {
13
13
  children: ComponentInterface[];
14
14
  dataType: ComponentInterface["dataType"];
15
15
  templateId?: string;
16
+ flowTemplateKey?: string;
16
17
  workOrderUniqueKey?: string;
17
18
  constructor(options: PickOption);
18
19
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -32,6 +32,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
32
32
  _defineProperty(this, "children", void 0);
33
33
  _defineProperty(this, "dataType", void 0);
34
34
  _defineProperty(this, "templateId", void 0);
35
+ _defineProperty(this, "flowTemplateKey", void 0);
35
36
  _defineProperty(this, "workOrderUniqueKey", void 0);
36
37
  _defineProperty(this, "renderPc", function (value, record) {
37
38
  var _record;
@@ -103,6 +104,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
103
104
  this.formField = "".concat(options.id, "_input");
104
105
  this.type = options.type;
105
106
  this.templateId = options.templateId;
107
+ this.flowTemplateKey = options.flowTemplateKey;
106
108
  this.componentConfig = options.componentConfig;
107
109
  this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
108
110
  this.rules = [{
@@ -152,7 +154,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
152
154
  validator: function () {
153
155
  var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
154
156
  var _this$componentConfig11;
155
- var _resultList$, params, _yield$replaceCheck, resultList;
157
+ var _resultList$, params, _yield$replaceCheck, resultList, _this$componentConfig12, _this$componentConfig13, _this$componentConfig14, messageMap;
156
158
  return _regeneratorRuntime().wrap(function _callee$(_context) {
157
159
  while (1) switch (_context.prev = _context.next) {
158
160
  case 0:
@@ -163,10 +165,11 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
163
165
  return _context.abrupt("return", Promise.resolve());
164
166
  case 2:
165
167
  if (!((_this$componentConfig11 = _this.componentConfig) !== null && _this$componentConfig11 !== void 0 && _this$componentConfig11.replaceWarn)) {
166
- _context.next = 10;
168
+ _context.next = 11;
167
169
  break;
168
170
  }
169
171
  params = {
172
+ flowTemplateKey: _this.flowTemplateKey,
170
173
  templateId: _this.templateId,
171
174
  workOrderUniqueKey: _this.workOrderUniqueKey,
172
175
  needCheckComponentList: [{
@@ -180,11 +183,16 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
180
183
  _yield$replaceCheck = _context.sent;
181
184
  resultList = _yield$replaceCheck.data.resultList;
182
185
  if (!((resultList === null || resultList === void 0 ? void 0 : (_resultList$ = resultList[0]) === null || _resultList$ === void 0 ? void 0 : _resultList$.repeatCount) > 0)) {
183
- _context.next = 10;
186
+ _context.next = 11;
184
187
  break;
185
188
  }
186
- return _context.abrupt("return", Promise.reject(new Error("内容已存在,不能重复提交")));
187
- case 10:
189
+ messageMap = {
190
+ currWorkOrder: "数据已存在本模版同节点中,不能重复提交",
191
+ currFlow: "数据已存在本模版中,不能重复提交",
192
+ allWorkOrder: "数据已存在其他模版中,不能重复提交"
193
+ };
194
+ return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$componentConfig12 = (_this$componentConfig13 = _this.componentConfig) === null || _this$componentConfig13 === void 0 ? void 0 : (_this$componentConfig14 = _this$componentConfig13.repeatConfig) === null || _this$componentConfig14 === void 0 ? void 0 : _this$componentConfig14.repeatRange) !== null && _this$componentConfig12 !== void 0 ? _this$componentConfig12 : ""] || "内容已存在,不能重复提交")));
195
+ case 11:
188
196
  case "end":
189
197
  return _context.stop();
190
198
  }
@@ -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, 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 } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => AliPay | BasicCascader | CommonMultiStatus | CommonSystemOrder | Label | StatusSelect | WdtExchange | WdtReturn | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | 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 | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | CommonInput | PaymentVoucherCode;
3
+ export declare const factory: (type: string, options: PickOption) => AliPay | BasicCascader | CommonMultiStatus | CommonSystemOrder | FlowMarkSelect | BasicInput | Label | MsgStatus | StatusSelect | WdtExchange | WdtReturn | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | CommonInput | PaymentVoucherCode;
@@ -51,6 +51,7 @@ export interface ComponentInterface {
51
51
  format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
52
52
  options?: Array<any>;
53
53
  templateId?: string;
54
+ flowTemplateKey?: string;
54
55
  workOrderUniqueKey?: string;
55
56
  platform?: PlatForm;
56
57
  parentName?: string;
@@ -169,6 +170,10 @@ export interface ComponentInterface {
169
170
  selectRules?: Array<string>;
170
171
  logistics?: string;
171
172
  belongType?: string;
173
+ repeatConfig?: {
174
+ repeatRange: string;
175
+ repeatComponents: any[];
176
+ };
172
177
  };
173
178
  effects?: {
174
179
  queryWorkOrderDetail?: (r: Record) => void;
@@ -237,7 +242,7 @@ export interface ComponentInterface {
237
242
  getComponentValue: (r: Record) => any;
238
243
  formDataTransform?: (r: any) => any;
239
244
  }
240
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width">;
245
+ export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey">;
241
246
  export declare type ColumnConfig = {
242
247
  id: string;
243
248
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.1.3",
3
+ "version": "1.3.0-rc.0",
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": "1.1.3",
24
- "@kmkf-fe-packages/kmkf-utils": "1.1.3"
23
+ "@kmkf-fe-packages/basic-components": "1.3.0-rc.0",
24
+ "@kmkf-fe-packages/kmkf-utils": "1.3.0-rc.0"
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": "494ca5814926023eb2ef71d545d4ba9c5eccf965",
40
+ "gitHead": "9c12f39cee1a086e3c49778be6c26e64bdc0833b",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }