@kmkf-fe-packages/services-components 0.8.14-alpha.2 → 0.8.15-alpha.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.
@@ -1,5 +1,5 @@
1
- export { default as BsType } from "./BsType";
2
- export { default as BsMemo } from "./BsMemo";
3
- export { default as BsHeaderPic } from "./BsHeaderPic";
4
- export { default as BsHeaderChild } from "./BsHeaderChild";
5
- export { default as BsHeaderGood } from "./BsHeaderGood";
1
+ export { default as BsType } from './BsType';
2
+ export { default as BsMemo } from './BsMemo';
3
+ export { default as BsHeaderPic } from './BsHeaderPic';
4
+ export { default as BsHeaderChild } from './BsHeaderChild';
5
+ export { default as BsHeaderGood } from './BsHeaderGood';
@@ -1,5 +1,12 @@
1
1
  export { default as BsType } from "./BsType";
2
2
  export { default as BsMemo } from "./BsMemo";
3
3
  export { default as BsHeaderPic } from "./BsHeaderPic";
4
+ // export { default as BsHeaderName } from "./BsHeaderName";
5
+ // export { default as BsHeaderCode } from "./BsHeaderCode";
6
+ // export { default as BsHeaderSku } from "./BsHeaderSku";
7
+ // export { default as BsHeaderMoney } from "./BsHeaderMoney";
8
+ // export { default as BsHeaderNumber } from "./BsHeaderNumber";
9
+ // export { default as BsHeaderShare } from "./BsHeaderShare";
10
+ // export { default as BsHeaderType } from "./BsHeaderType";
4
11
  export { default as BsHeaderChild } from "./BsHeaderChild";
5
12
  export { default as BsHeaderGood } from "./BsHeaderGood";
@@ -27,5 +27,4 @@ export declare const BsGoodsTable: ({ list, showHeader, text, }: {
27
27
  text?: string | undefined;
28
28
  }) => React.JSX.Element;
29
29
  export declare const FileRender: ({ fileList }: any) => React.JSX.Element;
30
- export declare const BsSystemOrderTable: ({ value }: any) => React.JSX.Element;
31
30
  export {};
@@ -467,41 +467,4 @@ export var FileRender = function FileRender(_ref10) {
467
467
  controls: true,
468
468
  src: fileUrl
469
469
  })));
470
- };
471
- export var BsSystemOrderTable = function BsSystemOrderTable(_ref11) {
472
- var value = _ref11.value;
473
- var columns = [{
474
- dataIndex: "billType",
475
- title: "单据类型"
476
- }, {
477
- dataIndex: "billNo",
478
- title: "系统订单号"
479
- }, {
480
- dataIndex: "billTag",
481
- title: "标签"
482
- }];
483
- var rowSelection = {
484
- selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
485
- getCheckboxProps: function getCheckboxProps(record) {
486
- return {
487
- disabled: true,
488
- // Column configuration not to be checked
489
- name: record.name
490
- };
491
- }
492
- };
493
- return /*#__PURE__*/React.createElement(Table, {
494
- dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
495
- columns: columns,
496
- rowSelection: rowSelection,
497
- rowKey: "billNo",
498
- size: "small",
499
- pagination: false,
500
- scroll: {
501
- x: "100%"
502
- },
503
- locale: {
504
- emptyText: "暂无数据"
505
- }
506
- });
507
470
  };
@@ -10,7 +10,7 @@ declare class BasicRadio implements ComponentInterface {
10
10
  sortField: string;
11
11
  type: string;
12
12
  rules: any[];
13
- componentConfig: ComponentInterface["componentConfig"];
13
+ componentConfig: ComponentInterface['componentConfig'];
14
14
  isCombinationComponent: boolean;
15
15
  formField: string;
16
16
  canSort: boolean;
@@ -26,6 +26,7 @@ declare class BasicRadio implements ComponentInterface {
26
26
  other: any;
27
27
  };
28
28
  renderExport: (value: any, record: Record) => string;
29
+ getKeyByComponentType: (type: string) => any;
29
30
  renderClient: (record: Record) => React.JSX.Element | null;
30
31
  editRender: (p: any) => React.JSX.Element;
31
32
  filterConfig: (item: ColumnConfig) => {
@@ -13,6 +13,10 @@ import ItemView from "../../commonComponents/ItemView";
13
13
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
14
  import get from 'lodash/get';
15
15
  import { SYMBOL } from "../../constant";
16
+ var typeMap = {
17
+ BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
18
+ RADIO: 'radio'
19
+ };
16
20
  var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
17
21
  var _this = this,
18
22
  _this$componentConfig3,
@@ -32,29 +36,36 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
32
36
  _defineProperty(this, "options", void 0);
33
37
  _defineProperty(this, "render", function (value) {
34
38
  var _value$value;
35
- return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
39
+ return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && typeof value.value === 'string' && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
36
40
  });
37
41
  _defineProperty(this, "renderPc", function (value, record) {
38
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")]) === undefined && (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radioOther")]) === undefined) {
42
+ var type = _this.type;
43
+ if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) === undefined && (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type], "Other")]) === undefined) {
39
44
  return /*#__PURE__*/React.createElement("span", null, "--");
40
45
  }
41
- return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")], record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radioOther")]);
46
+ return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])], record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type], "Other")]);
42
47
  });
43
48
  _defineProperty(this, "renderLog", function (r) {
44
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radio")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radioOther")])) return null;
49
+ var type = _this.type;
50
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type], "Other")])) return null;
45
51
  return _this.renderPc(undefined, r);
46
52
  });
47
53
  _defineProperty(this, "getComponentValue", function (r) {
54
+ var type = _this.type;
48
55
  return {
49
- value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radio")],
50
- other: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radioOther")]
56
+ value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])],
57
+ other: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type], "Other")]
51
58
  };
52
59
  });
53
60
  _defineProperty(this, "renderExport", function (value, record) {
54
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")]) === undefined) {
61
+ var type = _this.type;
62
+ if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) === undefined) {
55
63
  return '--';
56
64
  }
57
- return "".concat(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")], " ").concat(get(record, "".concat(_this.id, "_radioOther"), ''));
65
+ return "".concat(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])], " ").concat(get(record, "".concat(_this.id, "_").concat(typeMap[type], "Other"), ''));
66
+ });
67
+ _defineProperty(this, "getKeyByComponentType", function (type) {
68
+ return typeMap[type] || '';
58
69
  });
59
70
  _defineProperty(this, "renderClient", function (record) {
60
71
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -78,10 +89,11 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
78
89
  });
79
90
  _defineProperty(this, "filterConfig", function (item) {
80
91
  var _item$config, _item$config2, _item$config2$options, _item$config3;
92
+ var key = _this.getKeyByComponentType(item.type);
81
93
  return {
82
94
  searchDefaultConditions: SYMBOL.in,
83
95
  type: item.type,
84
- id: "".concat(item.id, "_radio"),
96
+ id: "".concat(item.id, "_").concat(key),
85
97
  // 过滤组件id
86
98
  name: item.name,
87
99
  // 过滤组件名称
@@ -94,7 +106,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
94
106
  },
95
107
  filterFn: function filterFn(value) {
96
108
  return function (i) {
97
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'radio'));
109
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, key));
98
110
  };
99
111
  } // 第一个为选中值,第二个参数为表格行记录值
100
112
  };
@@ -107,8 +119,8 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
107
119
  this.type = options.type;
108
120
  this.isCombinationComponent = false;
109
121
  this.canSort = true;
110
- this.sortField = "".concat(options.id, "_radio");
111
- this.formField = "".concat(options.id, "_radio");
122
+ this.sortField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
123
+ this.formField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
112
124
  this.children = [];
113
125
  this.componentConfig = options.componentConfig;
114
126
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
@@ -1,3 +1,3 @@
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, BsSystemOrder } 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, 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) => BsSystemOrder | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | 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 | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
3
+ export declare const factory: (type: string, options: PickOption) => BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | 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 | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
@@ -1,4 +1,4 @@
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, BsSystemOrder } 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, 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
  export var factory = function factory(type, options) {
3
3
  var _options$componentCon;
4
4
  switch (type) {
@@ -15,6 +15,7 @@ export var factory = function factory(type, options) {
15
15
  case "INPUT":
16
16
  return new BasicInput(options);
17
17
  case "RADIO":
18
+ case "BUYER_MESSAGE_NOTICE":
18
19
  return new BasicRadio(options);
19
20
  case "TEXTAREA":
20
21
  return new BasicTextArea(options);
@@ -110,8 +111,6 @@ export var factory = function factory(type, options) {
110
111
  return new JstItemSelect(options);
111
112
  case "JST_SUPPLY":
112
113
  return new JstSupply(options);
113
- case "BS_SYSTEM_ORDER":
114
- return new BsSystemOrder(options);
115
114
  case "JST_SEND_GOOD":
116
115
  case "BS_SEND_GOOD":
117
116
  return new JstSendGood(options);
@@ -37,7 +37,6 @@ export { default as JstLogistics } from "./components/JST/JstLogistics";
37
37
  export { default as JstItemSelect } from "./components/JST/JstItemSelect";
38
38
  export { default as JstSendGood } from "./components/JST/JstSendGood";
39
39
  export { default as JstSupply } from "./components/JST/JstSupply";
40
- export { default as BsSystemOrder } from "./components/BS/BsSystemOrder";
41
40
  export { default as BsGoods } from "./components/BS/BsGoods";
42
41
  export { default as BsExchange } from "./components/BS/BsExchange";
43
42
  export { default as BsReissue } from "./components/BS/BsReissue";
package/dist/esm/index.js CHANGED
@@ -37,7 +37,6 @@ export { default as JstLogistics } from "./components/JST/JstLogistics";
37
37
  export { default as JstItemSelect } from "./components/JST/JstItemSelect";
38
38
  export { default as JstSendGood } from "./components/JST/JstSendGood";
39
39
  export { default as JstSupply } from "./components/JST/JstSupply";
40
- export { default as BsSystemOrder } from "./components/BS/BsSystemOrder";
41
40
  export { default as BsGoods } from "./components/BS/BsGoods";
42
41
  export { default as BsExchange } from "./components/BS/BsExchange";
43
42
  export { default as BsReissue } from "./components/BS/BsReissue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.8.14-alpha.2",
3
+ "version": "0.8.15-alpha.0",
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.8.14-alpha.2",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.8.14-alpha.0"
29
+ "@kmkf-fe-packages/basic-components": "^0.8.13-alpha.0",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.0"
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": "85f5fc827314bf23ca07f425958dcd47a9cac094"
43
+ "gitHead": "0a3e70a912caa0b190bab078ba892d044b1da47a"
44
44
  }
@@ -1,25 +0,0 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
- import React from "react";
3
- declare class BsSystemOrder implements ComponentInterface {
4
- name: string;
5
- id: string;
6
- sortField: string;
7
- type: string;
8
- rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
10
- effects: ComponentInterface["effects"];
11
- isCombinationComponent: boolean;
12
- formField: string;
13
- canSort: boolean;
14
- dataType: ComponentInterface["dataType"];
15
- children: ComponentInterface[];
16
- constructor(options: PickOption);
17
- renderClient: (record: any) => React.JSX.Element | null;
18
- renderPc: () => null;
19
- renderLog: (r: Record) => null;
20
- getComponentValue: (r: Record) => any;
21
- renderExport: () => null;
22
- editRender: (p: any) => React.JSX.Element;
23
- filterConfig: (item: ColumnConfig) => never[];
24
- }
25
- export default BsSystemOrder;
@@ -1,104 +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 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; }
3
- 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; }
4
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
- 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); } }
6
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
- 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; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
- 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); }
11
- import React from "react";
12
- import GetFormItem from "../../GetFormItem";
13
- import ItemView from "../../../commonComponents/ItemView";
14
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
15
- import { BsSystemOrder as Goods } from "@kmkf-fe-packages/basic-components";
16
- import { BsSystemOrderTable } from "../../Common";
17
- import { BsHeaderChild } from "../common/index";
18
- var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
19
- var _this = this,
20
- _this$componentConfig;
21
- _classCallCheck(this, BsSystemOrder);
22
- _defineProperty(this, "name", void 0);
23
- _defineProperty(this, "id", void 0);
24
- _defineProperty(this, "sortField", void 0);
25
- _defineProperty(this, "type", void 0);
26
- _defineProperty(this, "rules", void 0);
27
- _defineProperty(this, "componentConfig", void 0);
28
- _defineProperty(this, "effects", void 0);
29
- _defineProperty(this, "isCombinationComponent", void 0);
30
- _defineProperty(this, "formField", void 0);
31
- _defineProperty(this, "canSort", void 0);
32
- _defineProperty(this, "dataType", void 0);
33
- _defineProperty(this, "children", void 0);
34
- _defineProperty(this, "renderClient", function (record) {
35
- return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
36
- id: _this.id,
37
- label: _this.name,
38
- value: /*#__PURE__*/React.createElement(BsSystemOrderTable, {
39
- value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
40
- })
41
- })) : null;
42
- });
43
- _defineProperty(this, "renderPc", function () {
44
- return null;
45
- });
46
- _defineProperty(this, "renderLog", function (r) {
47
- return null;
48
- });
49
- _defineProperty(this, "getComponentValue", function (r) {
50
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
51
- });
52
- _defineProperty(this, "renderExport", function () {
53
- return null;
54
- });
55
- _defineProperty(this, "editRender", function (p) {
56
- return /*#__PURE__*/React.createElement(GetFormItem, {
57
- title: _this.name,
58
- name: _this.id,
59
- rules: _this.rules,
60
- required: false,
61
- hidden: p === null || p === void 0 ? void 0 : p.hidden,
62
- component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
63
- onChange: p === null || p === void 0 ? void 0 : p.onChange
64
- }))
65
- });
66
- });
67
- _defineProperty(this, "filterConfig", function (item) {
68
- return [];
69
- });
70
- this.name = options.name;
71
- this.id = options.id;
72
- this.sortField = "".concat(options.id, "_bsSystemShowOrder");
73
- this.formField = "".concat(options.id, "_bsSystemShowOrder");
74
- this.type = options.type;
75
- this.effects = options === null || options === void 0 ? void 0 : options.effects;
76
- this.isCombinationComponent = true;
77
- this.canSort = false;
78
- this.children = [new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
79
- name: "单据类型",
80
- id: "".concat(options.id, "_bsSystemShowOrder_billType"),
81
- width: 150
82
- })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
83
- name: "系统订单号",
84
- id: "".concat(options.id, "_bsSystemShowOrder_billNo"),
85
- width: 150
86
- })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
87
- name: "标签",
88
- id: "".concat(options.id, "_bsSystemShowOrder_billTag"),
89
- width: 150
90
- }))];
91
- this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
92
- this.rules = this !== null && this !== void 0 && (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
93
- required: true,
94
- validator: function validator(_, value) {
95
- var _value$selectIds;
96
- if (!value || !(value !== null && value !== void 0 && (_value$selectIds = value.selectIds) !== null && _value$selectIds !== void 0 && _value$selectIds.length)) {
97
- return Promise.reject(new Error("请选择bs系统订单号"));
98
- }
99
- return Promise.resolve();
100
- }
101
- }] : [];
102
- this.dataType = "object";
103
- });
104
- export default BsSystemOrder;