@kmkf-fe-packages/services-components 1.6.0-beta.7 → 1.6.1

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/README.md CHANGED
@@ -2,6 +2,4 @@
2
2
 
3
3
  - 针对于自定义组件的后缀,在提交的时候是以组件类型的驼峰式来命名的
4
4
 
5
- ---
6
-
7
-
5
+ ---
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData" | "queryLabel";
2
+ declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
3
3
  declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useEffect, useState } from "react";
17
17
  import { Skeleton, Result, Button } from "antd";
18
- import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryWdtLogisticsCompany, queryWdtSendData, queryAllLogisticsCompany, queryLabel } from "../../service/api";
18
+ import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
19
19
  import { servers } from '@kmkf-fe-packages/kmkf-utils';
20
20
  var Global = function Global(_ref) {
21
21
  var children = _ref.children,
@@ -16,10 +16,10 @@ import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Ty
16
16
  import React, { useState, useMemo } from "react";
17
17
  import { ExpressData, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { getAlipayBillReceipt } from "../../service/api";
19
- import { CopyToClipboard } from "react-copy-to-clipboard";
20
- import CopyText from "../../commonComponents/CopyText";
19
+ import { CopyToClipboard } from 'react-copy-to-clipboard';
21
20
  import styles from "./index.module.less";
22
21
  import defaultImg from "./img/default-img.png";
22
+ import CopyText from "../../commonComponents/CopyText";
23
23
  var Paragraph = Typography.Paragraph;
24
24
  export var getFormItem = function getFormItem(_ref) {
25
25
  var name = _ref.name,
@@ -1058,9 +1058,7 @@ export var MsgContent = function MsgContent(_ref14) {
1058
1058
  wechat: '微信',
1059
1059
  qq: 'QQ',
1060
1060
  qywx: '企业微信',
1061
- YZDKH: '邮政拦截',
1062
- YT: '圆通拦截',
1063
- feishu: '飞书'
1061
+ YZDKH: '邮政大客户'
1064
1062
  };
1065
1063
  var detailContent = function detailContent(item) {
1066
1064
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
@@ -1,18 +1,18 @@
1
- import React from 'react';
2
- import { ComponentInterface, ColumnConfig, Record, PickOption } from '../../type';
1
+ import React from "react";
2
+ import { ComponentInterface, ColumnConfig, Record, PickOption } from "../../type";
3
3
  declare class Handler implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
- componentConfig: ComponentInterface['componentConfig'];
9
- effects: ComponentInterface['effects'];
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ effects: ComponentInterface["effects"];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface['dataType'];
15
- options: ComponentInterface['options'];
14
+ dataType: ComponentInterface["dataType"];
15
+ options: ComponentInterface["options"];
16
16
  constructor(options: PickOption);
17
17
  newOptions: () => {
18
18
  label: string;
@@ -39,7 +39,7 @@ declare class Handler implements ComponentInterface {
39
39
  }[];
40
40
  };
41
41
  filterFn: (value: string) => (i: Record) => boolean;
42
- formatFilterValue: (value: any) => any;
42
+ formatFilterValue: (value: any) => unknown[];
43
43
  };
44
44
  }
45
45
  export default Handler;
@@ -17,10 +17,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
17
17
  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; }
18
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
19
  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); }
20
- import React from 'react';
21
- import intersection from 'lodash/intersection';
22
- import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
20
+ import React from "react";
21
+ import intersection from "lodash/intersection";
22
+ import { filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
23
23
  import { SYMBOL } from "../../constant";
24
+ import { uniq } from "lodash";
24
25
  var Handler = /*#__PURE__*/_createClass(function Handler(options) {
25
26
  var _this = this,
26
27
  _this$effects4;
@@ -51,7 +52,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
51
52
  var value = record === null || record === void 0 ? void 0 : record[_this.id];
52
53
  return /*#__PURE__*/React.createElement("span", null, (_value$map$join = value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
53
54
  return item.account;
54
- })) === null || _value$map === void 0 ? void 0 : _value$map.join('')) !== null && _value$map$join !== void 0 ? _value$map$join : '--');
55
+ })) === null || _value$map === void 0 ? void 0 : _value$map.join("")) !== null && _value$map$join !== void 0 ? _value$map$join : "--");
55
56
  });
56
57
  _defineProperty(this, "renderLog", function () {
57
58
  return null;
@@ -64,7 +65,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
64
65
  var values = record === null || record === void 0 ? void 0 : record[_this.id];
65
66
  return (_values$map$join = values === null || values === void 0 ? void 0 : (_values$map = values.map(function (item) {
66
67
  return item.account;
67
- })) === null || _values$map === void 0 ? void 0 : _values$map.join('')) !== null && _values$map$join !== void 0 ? _values$map$join : '--';
68
+ })) === null || _values$map === void 0 ? void 0 : _values$map.join("")) !== null && _values$map$join !== void 0 ? _values$map$join : "--";
68
69
  });
69
70
  _defineProperty(this, "renderClient", function () {
70
71
  return null;
@@ -80,7 +81,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
80
81
  // 过滤组件id
81
82
  name: item.name,
82
83
  // 过滤组件名称
83
- filterComponentType: 'MultipleSelect',
84
+ filterComponentType: "MultipleSelect",
84
85
  props: {
85
86
  options: _this.newOptions() || []
86
87
  },
@@ -93,8 +94,8 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
93
94
  };
94
95
  },
95
96
  formatFilterValue: function formatFilterValue(value) {
96
- return value.reduce(function (prv, next) {
97
- var _next$split = next.split(':'),
97
+ var useList = value.reduce(function (prv, next) {
98
+ var _next$split = next.split(":"),
98
99
  _next$split2 = _slicedToArray(_next$split, 2),
99
100
  val = _next$split2[0],
100
101
  groupText = _next$split2[1];
@@ -111,19 +112,20 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
111
112
  }
112
113
  return prv;
113
114
  }, []);
115
+ return uniq(useList);
114
116
  }
115
117
  };
116
118
  });
117
- this.name = (options === null || options === void 0 ? void 0 : options.name) || '处理人';
118
- this.id = (options === null || options === void 0 ? void 0 : options.id) || 'handlerList';
119
- this.sortField = 'handlerList';
120
- this.formField = 'handlerList';
121
- this.type = 'HANDLER_INPUT';
119
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "处理人";
120
+ this.id = (options === null || options === void 0 ? void 0 : options.id) || "handlerList";
121
+ this.sortField = "handlerList";
122
+ this.formField = "handlerList";
123
+ this.type = "HANDLER_INPUT";
122
124
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
123
125
  this.isCombinationComponent = false;
124
126
  this.canSort = false;
125
127
  this.children = [];
126
- this.dataType = 'string';
128
+ this.dataType = "string";
127
129
  this.options = ((_this$effects4 = this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.userList) || [];
128
130
  });
129
131
  export default Handler;
@@ -49,9 +49,7 @@ var msgTypeCh = {
49
49
  wechat: '微信',
50
50
  qq: 'QQ',
51
51
  qywx: '企业微信',
52
- YZDKH: '邮政拦截',
53
- YT: '圆通拦截',
54
- feishu: "飞书"
52
+ YZDKH: '邮政大客户'
55
53
  };
56
54
  var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
57
55
  var _this = this,
@@ -1,3 +1,3 @@
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";
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, KmErpSendGood, AfterSalesOrderId } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | TradeId | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
3
+ export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | TradeId | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
@@ -1,4 +1,4 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, ErpTradeId, 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,
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, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
2
2
  // CommonTradeId,
3
3
  CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, KmErpSendGood, AfterSalesOrderId } from "./index";
4
4
  export var factory = function factory(type, options) {
@@ -48,8 +48,6 @@ export var factory = function factory(type, options) {
48
48
  return new BasicFile(options);
49
49
  case "POSTING":
50
50
  return new BasicPosting(options);
51
- case "SUBFORM":
52
- return new SubForm(options);
53
51
  case "SHOP_NAME_INPUT":
54
52
  return new ShopName(options);
55
53
  case "TRADE_ID_INPUT":
@@ -141,8 +139,6 @@ export var factory = function factory(type, options) {
141
139
  return new BsPosting(options);
142
140
  case "BS_GOODS":
143
141
  return new BsGoods(options);
144
- case "WDT_GOODS":
145
- return new WdtGoods(options);
146
142
  case "BS_EXCHANGE_GOODS":
147
143
  return new BsExchange(options);
148
144
  case "WDT_EXCHANGE_GOODS":
@@ -205,6 +201,9 @@ export var factory = function factory(type, options) {
205
201
  return new CommonDataTime(options);
206
202
  case "FLOW_UPDATE_DATETIME":
207
203
  return new CommonDataTime(options);
204
+ case "WDT_GOODS":
205
+ // 万里牛商品
206
+ return new WdtGoods(options);
208
207
  case "BUSINESS_ORDER_NO":
209
208
  return new CommonInput(options);
210
209
  case "PAYMENT_VOUCHER_CODE":
@@ -12,7 +12,6 @@ export { default as BasicGrade } from "./components/Grade";
12
12
  export { default as BasicRate } from "./components/Rate";
13
13
  export { default as BasicFile } from "./components/File";
14
14
  export { default as BasicPosting } from "./components/PostIng";
15
- export { default as SubForm } from "./components/SubForm";
16
15
  export { default as CommonDataTime } from "./components/CommonDataTime";
17
16
  export { default as TradeId } from "./components/TradeId";
18
17
  export { default as ErpTradeId } from "./components/ErpTradeId";
package/dist/esm/index.js CHANGED
@@ -12,7 +12,6 @@ export { default as BasicGrade } from "./components/Grade";
12
12
  export { default as BasicRate } from "./components/Rate";
13
13
  export { default as BasicFile } from "./components/File";
14
14
  export { default as BasicPosting } from "./components/PostIng";
15
- export { default as SubForm } from "./components/SubForm";
16
15
  export { default as CommonDataTime } from "./components/CommonDataTime";
17
16
  export { default as TradeId } from "./components/TradeId";
18
17
  export { default as ErpTradeId } from "./components/ErpTradeId";
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FormInstance } from "antd";
3
- import { SYMBOL } from "./constant";
4
- export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
- export declare type ALignType = "left" | "right" | "center";
2
+ import type { FormInstance } from 'antd';
3
+ import { SYMBOL } from './constant';
4
+ export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
5
+ export declare type ALignType = 'left' | 'right' | 'center';
6
6
  export declare type QuerySymbol = keyof typeof SYMBOL;
7
7
  export declare type Record = {
8
8
  [props in string]: any;
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
27
27
  filterFn?: (p: any) => (r: Record) => unknown;
28
28
  formatFilterValue?: (p: any) => any;
29
29
  };
30
- export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
30
+ export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate' | 'SelectInput';
31
31
  export interface ComponentInterface {
32
32
  id: string;
33
33
  sortField: string;
@@ -47,8 +47,8 @@ export interface ComponentInterface {
47
47
  rules?: any[];
48
48
  width?: number;
49
49
  align?: ALignType;
50
- dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
51
- format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
50
+ dataType: 'string' | 'number' | 'boolean' | 'array' | 'range' | 'object';
51
+ format?: 'dateTime' | 'date' | 'time' | 'cascader' | 'shopInput' | 'staffGroup';
52
52
  options?: Array<any>;
53
53
  templateId?: string;
54
54
  flowTemplateKey?: string;
@@ -84,7 +84,7 @@ export interface ComponentInterface {
84
84
  /**
85
85
  * @description 显示字段名称
86
86
  */
87
- showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder" | "logisticsCompany" | "logisticsCode";
87
+ showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all' | 'bs' | 'workOrder' | 'logisticsCompany' | 'logisticsCode';
88
88
  /**
89
89
  * @description 是否选择SKU
90
90
  */
@@ -104,7 +104,7 @@ export interface ComponentInterface {
104
104
  /**
105
105
  * @description 备注状态
106
106
  */
107
- associatedType?: "APPEND";
107
+ associatedType?: 'APPEND';
108
108
  isAssociated?: boolean;
109
109
  isShowFlag?: boolean;
110
110
  /**
@@ -145,7 +145,7 @@ export interface ComponentInterface {
145
145
  * @description 时间初始值
146
146
  */
147
147
  dateTime?: string;
148
- dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
148
+ dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
149
149
  maxSize?: number;
150
150
  basicGrade?: number;
151
151
  range?: number;
@@ -173,13 +173,11 @@ export interface ComponentInterface {
173
173
  rulesOptions?: Array<any>;
174
174
  selectRules?: Array<string>;
175
175
  logistics?: string;
176
- flowStatus?: string[];
177
- flowTemplateKey?: any;
178
- nodeId?: string;
179
- workOrderTemplateId?: string;
180
- needFilterShopByPermission?: boolean;
181
- tableHeader?: any;
182
- correlationList?: any;
176
+ belongType?: string;
177
+ repeatConfig?: {
178
+ repeatRange: string;
179
+ repeatComponents: any[];
180
+ };
183
181
  };
184
182
  effects?: {
185
183
  queryWorkOrderDetail?: (r: Record) => void;
@@ -253,13 +251,13 @@ export interface ComponentInterface {
253
251
  getComponentValue: (r: Record) => any;
254
252
  formDataTransform?: (r: any) => any;
255
253
  }
256
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey">;
254
+ export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader' | 'templateId' | 'workOrderUniqueKey' | 'platform' | 'parentName' | 'width' | 'flowTemplateKey'>;
257
255
  export declare type ColumnConfig = {
258
256
  id: string;
259
257
  name: string;
260
258
  type: string;
261
259
  subKey?: string;
262
- mode?: "multiple";
263
- config?: ComponentInterface["componentConfig"];
264
- templateConfig?: ComponentInterface["componentConfig"];
260
+ mode?: 'multiple';
261
+ config?: ComponentInterface['componentConfig'];
262
+ templateConfig?: ComponentInterface['componentConfig'];
265
263
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.6.0-beta.7",
3
+ "version": "1.6.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
+ "sync": "yarn build && yalc push",
10
11
  "build": "yarn run lint && father build",
11
12
  "lint": "eslint '**/*.{ts,tsx}'",
12
- "lint:fix": "eslint --fix '**/*.{ts,tsx}'",
13
- "sync": "yarn build && yalc push"
13
+ "lint:fix": "eslint --fix '**/*.{ts,tsx}'"
14
14
  },
15
15
  "lint-staged": {
16
16
  "*.{js,jsx,less,md,json}": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "1.6.0-beta.7",
25
- "@kmkf-fe-packages/kmkf-utils": "1.6.0-beta.0"
24
+ "@kmkf-fe-packages/basic-components": "1.6.1",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.6.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@typescript-eslint/eslint-plugin": "^5.59.2",
@@ -38,7 +38,7 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "c38400ef6d80574b913bd0493501c5a2443a3634",
41
+ "gitHead": "6012d491910b54eb0ad306be7ddfc340ab2f5fa5",
42
42
  "gitHooks": {
43
43
  "pre-commit": "lint-staged"
44
44
  }
@@ -1,34 +0,0 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
3
- declare class SubForm implements ComponentInterface {
4
- name: string;
5
- id: string;
6
- sortField: string;
7
- type: string;
8
- rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
10
- isCombinationComponent: boolean;
11
- formField: string;
12
- canSort: boolean;
13
- children: ComponentInterface[];
14
- dataType: ComponentInterface["dataType"];
15
- templateId?: string;
16
- workOrderUniqueKey?: string;
17
- constructor(options: PickOption);
18
- getNewTableHeader: () => any;
19
- renderTabel: (list: any) => React.JSX.Element;
20
- renderPc: () => null;
21
- renderLog: (r: Record) => React.JSX.Element | null;
22
- getComponentValue: (r: Record) => any;
23
- renderExport: () => null;
24
- renderClient: (record: Record) => React.JSX.Element | null;
25
- editRender: (p: any) => React.JSX.Element;
26
- filterConfig: (item: ColumnConfig) => {
27
- searchDefaultConditions: "like";
28
- type: string;
29
- id: string;
30
- name: string;
31
- filterComponentType: "Input";
32
- }[];
33
- }
34
- export default SubForm;
@@ -1,189 +0,0 @@
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
- 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); } }
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
- 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; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
- 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); }
16
- import React from "react";
17
- import { Table } from "antd";
18
- import { SubForm as SubFormComponent } from "@kmkf-fe-packages/basic-components";
19
- import Input from "../Input";
20
- import TextArea from "../TextArea";
21
- import BsHeaderChild from "../BS/common/BsHeaderChild";
22
- import GetFormItem from "../GetFormItem";
23
- import ItemView from "../../commonComponents/ItemView";
24
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
25
- import { SYMBOL } from "../../constant";
26
- var WidgetMap = {
27
- INPUT: Input,
28
- TEXTAREA: TextArea
29
- };
30
- var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
31
- var _this = this,
32
- _this$componentConfig8;
33
- _classCallCheck(this, SubForm);
34
- _defineProperty(this, "name", void 0);
35
- _defineProperty(this, "id", void 0);
36
- _defineProperty(this, "sortField", void 0);
37
- _defineProperty(this, "type", void 0);
38
- _defineProperty(this, "rules", void 0);
39
- _defineProperty(this, "componentConfig", void 0);
40
- _defineProperty(this, "isCombinationComponent", void 0);
41
- _defineProperty(this, "formField", void 0);
42
- _defineProperty(this, "canSort", void 0);
43
- _defineProperty(this, "children", void 0);
44
- _defineProperty(this, "dataType", void 0);
45
- _defineProperty(this, "templateId", void 0);
46
- _defineProperty(this, "workOrderUniqueKey", void 0);
47
- _defineProperty(this, "getNewTableHeader", function () {
48
- var _this$componentConfig, _this$componentConfig2;
49
- return (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : (_this$componentConfig2 = _this$componentConfig.correlationList) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.map(function (item) {
50
- var _this$componentConfig3;
51
- var t = ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.tableHeader.find(function (v) {
52
- return v.key === item.key;
53
- })) || {
54
- isShow: true,
55
- isEdit: false,
56
- isRequired: false,
57
- isNumber: false,
58
- precision: "nolimit",
59
- width: 150
60
- };
61
- return _objectSpread(_objectSpread({}, item), t);
62
- });
63
- });
64
- _defineProperty(this, "renderTabel", function (list) {
65
- var _ref, _ref$filter;
66
- var columns = [{
67
- dataIndex: "",
68
- title: "序号",
69
- align: "center",
70
- ellipsis: true,
71
- width: 50,
72
- render: function render(val, record, index) {
73
- return /*#__PURE__*/React.createElement("span", null, index + 1);
74
- }
75
- }].concat(_toConsumableArray(((_ref = _this.getNewTableHeader() || []) === null || _ref === void 0 ? void 0 : (_ref$filter = _ref.filter(function (t) {
76
- return t.isShow;
77
- })) === null || _ref$filter === void 0 ? void 0 : _ref$filter.map(function (item) {
78
- return {
79
- dataIndex: item.key,
80
- title: item.name,
81
- align: "center",
82
- ellipsis: true,
83
- width: item.width,
84
- render: function render(val) {
85
- return /*#__PURE__*/React.createElement("span", null, val);
86
- }
87
- };
88
- })) || []));
89
- return /*#__PURE__*/React.createElement(Table, {
90
- columns: columns,
91
- dataSource: list,
92
- rowKey: "uuid",
93
- size: "small",
94
- pagination: false,
95
- scroll: {
96
- x: "100%"
97
- },
98
- locale: {
99
- emptyText: "暂无数据"
100
- }
101
- });
102
- });
103
- _defineProperty(this, "renderPc", function () {
104
- return null;
105
- });
106
- _defineProperty(this, "renderLog", function (r) {
107
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")])) return null;
108
- return _this.renderTabel(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")]);
109
- });
110
- _defineProperty(this, "getComponentValue", function (r) {
111
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")];
112
- });
113
- _defineProperty(this, "renderExport", function () {
114
- return null;
115
- });
116
- _defineProperty(this, "renderClient", function (record) {
117
- return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
118
- id: _this.id,
119
- label: _this.name,
120
- value: _this.renderTabel(record === null || record === void 0 ? void 0 : record["".concat(_this.id)])
121
- }) : null;
122
- });
123
- _defineProperty(this, "editRender", function (p) {
124
- var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
125
- return /*#__PURE__*/React.createElement(GetFormItem, {
126
- title: _this.name,
127
- name: _this.id,
128
- rules: _this.rules,
129
- hidden: p === null || p === void 0 ? void 0 : p.hidden,
130
- display: p === null || p === void 0 ? void 0 : p.display,
131
- required: (_this$componentConfig4 = (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required) !== null && _this$componentConfig4 !== void 0 ? _this$componentConfig4 : false,
132
- tooltip: (_this$componentConfig6 = (_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.tooltip) !== null && _this$componentConfig6 !== void 0 ? _this$componentConfig6 : "",
133
- component: /*#__PURE__*/React.createElement(SubFormComponent, _this.componentConfig)
134
- });
135
- });
136
- _defineProperty(this, "filterConfig", function (item) {
137
- return [{
138
- searchDefaultConditions: SYMBOL.like,
139
- type: item.type,
140
- id: "".concat(item.id, "_productList"),
141
- // 过滤组件id
142
- name: item.name,
143
- // 过滤组件名称
144
- filterComponentType: "Input"
145
- }];
146
- });
147
- this.name = options.name;
148
- this.id = options.id;
149
- this.sortField = "".concat(options.id, "_productList");
150
- this.formField = "".concat(options.id, "_productList");
151
- this.type = options.type;
152
- this.templateId = options.templateId;
153
- this.componentConfig = options.componentConfig;
154
- this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
155
- this.rules = [{
156
- required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
157
- validator: function validator(_, value) {
158
- var _this$componentConfig9, _this$componentConfig10;
159
- var result = (_this$componentConfig9 = _this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : (_this$componentConfig10 = _this$componentConfig9.tableHeader) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.reduce(function (prv, next) {
160
- if (next.isRequired && next.isShow && !next.isEdit) {
161
- prv[next.key] = "".concat(next.name, "\u4E0D\u80FD\u4E3A\u7A7A");
162
- }
163
- return prv;
164
- }, {});
165
- var msg = (value || []).reduce(function (prv, next) {
166
- Object.keys(next).forEach(function (key) {
167
- if (result[key] && !next[key]) {
168
- prv = result[key];
169
- }
170
- });
171
- return prv;
172
- }, "");
173
- if (msg) {
174
- return Promise.reject(new Error(msg));
175
- }
176
- return Promise.resolve();
177
- }
178
- }];
179
- this.isCombinationComponent = true;
180
- this.canSort = false;
181
- this.children = (this.getNewTableHeader() || []).map(function (item) {
182
- return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
183
- name: item.name,
184
- id: "".concat(options.id, "_productList_").concat(item.key)
185
- }));
186
- });
187
- this.dataType = "object";
188
- });
189
- export default SubForm;