@kmkf-fe-packages/services-components 0.23.1-beta.11 → 0.23.1-beta.13

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.
@@ -43,12 +43,13 @@ declare class BsLogistics implements ComponentInterface {
43
43
  };
44
44
  filterFn: (value: string) => (i: Record) => any;
45
45
  } | {
46
- searchDefaultConditions: "like";
46
+ searchDefaultConditions: "in";
47
47
  type: string;
48
48
  id: string;
49
49
  name: string;
50
- filterComponentType: "Input";
50
+ filterComponentType: "SelectInput";
51
51
  filterFn: (value: string) => (i: Record) => boolean;
52
+ formatFilterValue: (value: any) => any;
52
53
  })[];
53
54
  }
54
55
  export default BsLogistics;
@@ -1,19 +1,19 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
3
  declare class ExpressCode implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
10
  align: ALignType;
11
11
  width: number;
12
12
  isCombinationComponent: boolean;
13
13
  formField: string;
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
- dataType: ComponentInterface['dataType'];
16
+ dataType: ComponentInterface["dataType"];
17
17
  parentName: string;
18
18
  constructor(options: PickOption);
19
19
  renderClient: () => null;
@@ -23,12 +23,13 @@ declare class ExpressCode implements ComponentInterface {
23
23
  renderExport: (value: string, record: Record) => any;
24
24
  editRender: () => null;
25
25
  filterConfig: (item: ColumnConfig) => {
26
- searchDefaultConditions: "like";
26
+ searchDefaultConditions: "in";
27
27
  type: string;
28
28
  id: string;
29
29
  name: string;
30
- filterComponentType: "Input";
30
+ filterComponentType: "SelectInput";
31
31
  filterFn: (value: string) => (i: Record) => boolean;
32
+ formatFilterValue: (value: any) => any;
32
33
  };
33
34
  }
34
35
  export default ExpressCode;
@@ -11,16 +11,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  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; }
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  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); }
14
- import React from 'react';
14
+ import React from "react";
15
15
  import { BsExpressRender } from "../../Common";
16
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
- import { SYMBOL } from "../../../constant";
16
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
+ import { SYMBOL, batchInput } from "../../../constant";
18
18
  var typeMap = {
19
19
  BS_LOGISTICS: {
20
- key: 'bsLogisticsItem'
20
+ key: "bsLogisticsItem"
21
21
  },
22
22
  WLN_LOGISTICS: {
23
- key: 'wlnLogisticsItem'
23
+ key: "wlnLogisticsItem"
24
24
  },
25
25
  WDT_LOGISTICS: {
26
26
  key: 'wdtLogisticsItem'
@@ -48,7 +48,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
48
48
  return null;
49
49
  });
50
50
  _defineProperty(this, "renderPc", function (value, record) {
51
- var _this$id$split = _this.id.split('_'),
51
+ var _this$id$split = _this.id.split("_"),
52
52
  _this$id$split2 = _slicedToArray(_this$id$split, 3),
53
53
  key = _this$id$split2[0],
54
54
  parentKey = _this$id$split2[1],
@@ -58,7 +58,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
58
58
  }
59
59
  return /*#__PURE__*/React.createElement(BsExpressRender, {
60
60
  list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)],
61
- showField: 'code'
61
+ showField: "code"
62
62
  });
63
63
  });
64
64
  _defineProperty(this, "renderLog", function (r) {
@@ -70,7 +70,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
70
70
  });
71
71
  _defineProperty(this, "renderExport", function (value, record) {
72
72
  var _record;
73
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
73
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
74
74
  });
75
75
  _defineProperty(this, "editRender", function () {
76
76
  return null;
@@ -78,15 +78,22 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
78
78
  _defineProperty(this, "filterConfig", function (item) {
79
79
  var subKey = item.subKey;
80
80
  return {
81
- searchDefaultConditions: SYMBOL.like,
81
+ searchDefaultConditions: SYMBOL.in,
82
82
  type: item.type,
83
83
  id: "".concat(item.id, "_").concat(subKey),
84
84
  name: "".concat(_this.parentName, "\u7269\u6D41\u5355\u53F7"),
85
- filterComponentType: 'Input',
85
+ filterComponentType: "SelectInput",
86
86
  filterFn: function filterFn(value) {
87
87
  return function (i) {
88
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCode'), value);
88
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCode"), value);
89
89
  };
90
+ },
91
+ formatFilterValue: function formatFilterValue(value) {
92
+ if (value.type === "keywords") {
93
+ return batchInput(value.keywords);
94
+ } else {
95
+ return value;
96
+ }
90
97
  }
91
98
  };
92
99
  });
@@ -101,14 +108,14 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
101
108
  if (/^[0-9a-zA-Z]*$/.test(value)) {
102
109
  return Promise.resolve();
103
110
  }
104
- return Promise.reject(new Error('只能输入数字和字母'));
111
+ return Promise.reject(new Error("只能输入数字和字母"));
105
112
  }
106
113
  }] : [];
107
- this.align = 'left';
114
+ this.align = "left";
108
115
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
109
116
  this.isCombinationComponent = false;
110
117
  this.canSort = false;
111
- this.dataType = 'string';
118
+ this.dataType = "string";
112
119
  this.children = [];
113
120
  this.parentName = options === null || options === void 0 ? void 0 : options.parentName;
114
121
  });
@@ -64,7 +64,7 @@ var CompletedUser = /*#__PURE__*/_createClass(function CompletedUser(options) {
64
64
  }
65
65
  };
66
66
  });
67
- this.name = "完成人";
67
+ this.name = this.name = (options === null || options === void 0 ? void 0 : options.name) || "完成人";
68
68
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "completedUserName";
69
69
  this.sortField = "completedUserName";
70
70
  this.formField = "completedUserName";
@@ -74,7 +74,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
74
74
  }
75
75
  };
76
76
  });
77
- this.name = "处理人";
77
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "处理人";
78
78
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "handlerList";
79
79
  this.sortField = "handlerList";
80
80
  this.formField = "handlerList";
@@ -45,7 +45,7 @@ var NodeInput = /*#__PURE__*/_createClass(function NodeInput(options) {
45
45
  _defineProperty(this, "filterConfig", function () {
46
46
  return [];
47
47
  });
48
- this.name = "当前步骤";
48
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "当前步骤";
49
49
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "nodeId";
50
50
  this.type = "NODE_INPUT";
51
51
  this.sortField = 'nodeId';
@@ -64,7 +64,7 @@ var PlatForm = /*#__PURE__*/_createClass(function PlatForm(options) {
64
64
  options: platData
65
65
  };
66
66
  });
67
- this.name = "平台";
67
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "平台";
68
68
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "platform";
69
69
  this.type = "PLATFORM_INPUT";
70
70
  this.sortField = 'platform';
@@ -13,7 +13,7 @@ import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
- import { AddressData, BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { AddressData, BsAddressData, WdtAddressData } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import Province from "../BS/BsPosting/components/Province";
18
18
  import City from "../BS/BsPosting/components//City";
19
19
  import District from "../BS/BsPosting/components//District";
@@ -186,7 +186,12 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
186
186
  this.isCombinationComponent = this.isSplitColumns;
187
187
  this.canSort = false;
188
188
  this.dataType = "string";
189
- this.addressDateInstance = ((_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField) === "bs" ? BsAddressData.getInstance() : AddressData.getInstance();
189
+ var showField = (_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField;
190
+ this.addressDateInstance = (showField && {
191
+ bs: BsAddressData,
192
+ wdt: WdtAddressData,
193
+ workOrder: AddressData
194
+ }[showField] || AddressData).getInstance();
190
195
  this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
191
196
  id: "".concat(options.id, "_postingProvince"),
192
197
  name: "省",
@@ -86,7 +86,7 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
86
86
  }
87
87
  };
88
88
  });
89
- this.name = "店铺名称";
89
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "店铺名称";
90
90
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "shopName";
91
91
  this.type = "SHOP_INPUT";
92
92
  this.sortField = "shopName";
@@ -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, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, WdtGoods, NodeInput, FlowWorkOrderStatus } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderStatus | NodeInput | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | 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 | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus | WdtGoods;
3
+ export declare const factory: (type: string, options: PickOption) => BsLogistics | CompletedUser | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderStatus | Handler | JstLogistics | JstSendGood | NodeInput | PlatForm | BasicPosting | ShopInput | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | LogisticsMoreTrajectory | Submitter | PrevSubmitter | FlowCreator | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus | WdtGoods;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.23.1-beta.11",
3
+ "version": "0.23.1-beta.13",
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": "^0.23.1-beta.11",
24
- "@kmkf-fe-packages/kmkf-utils": "^0.23.1-beta.11"
23
+ "@kmkf-fe-packages/basic-components": "^0.23.1-beta.13",
24
+ "@kmkf-fe-packages/kmkf-utils": "^0.23.1-beta.13"
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": "a50813e4cefd5c1cf0dec7defe301d16ed08c212",
40
+ "gitHead": "223ab35b159b1acce8d5316096e3dc2e248c3640",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }