@kmkf-fe-packages/services-components 0.27.1-test.2 → 0.27.1-test.4

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.
@@ -5,9 +5,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5
5
  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; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  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); }
8
- import React from 'react';
8
+ import React from "react";
9
9
  import ItemView from "../../commonComponents/ItemView";
10
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
10
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
11
11
  import { SYMBOL } from "../../constant";
12
12
  var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
13
13
  var _this = this;
@@ -37,7 +37,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
37
37
  });
38
38
  _defineProperty(this, "renderPc", function (value, record) {
39
39
  var _record$_this$id;
40
- return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : '--';
40
+ return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
41
41
  });
42
42
  _defineProperty(this, "renderLog", function (r) {
43
43
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
@@ -47,7 +47,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
47
47
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
48
48
  });
49
49
  _defineProperty(this, "renderExport", function (value) {
50
- return value !== null && value !== void 0 ? value : '--';
50
+ return value !== null && value !== void 0 ? value : "--";
51
51
  });
52
52
  _defineProperty(this, "editRender", function () {
53
53
  return null;
@@ -58,57 +58,57 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
58
58
  type: item.type,
59
59
  id: "".concat(item.id, "_enterprisePaymentStatus"),
60
60
  name: "".concat(item.name, "-\u6253\u6B3E\u72B6\u6001"),
61
- filterComponentType: 'MultipleSelect',
61
+ filterComponentType: "MultipleSelect",
62
62
  props: {
63
63
  options: _this.paymentStatusOptions
64
64
  },
65
65
  filterFn: function filterFn(value) {
66
66
  return function (i) {
67
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'enterprisePaymentStatus'));
67
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "enterprisePaymentStatus"));
68
68
  };
69
69
  }
70
70
  };
71
71
  });
72
- this.name = '打款状态';
72
+ this.name = "打款状态";
73
73
  this.id = "".concat(options.id, "_enterprisePaymentStatus");
74
74
  this.sortField = "".concat(options.id, "_enterprisePaymentStatus");
75
75
  this.formField = "".concat(options.id, "_enterprisePaymentStatus");
76
76
  this.type = options.type;
77
77
  this.componentConfig = options.componentConfig;
78
78
  this.rules = [];
79
- this.align = 'left';
79
+ this.align = "left";
80
80
  this.width = 200;
81
- this.dataType = 'string';
81
+ this.dataType = "string";
82
82
  this.paymentStatus = {
83
- WAITING_EXAMINE: '未打款',
84
- EXAMINED: '审核通过',
85
- FLAG_PAID: '标记已打款',
86
- ALI_PAY_WAITING: '支付宝待付款',
87
- ALI_PAY_SUCCESS: '支付宝打款成功',
88
- ALI_PAY_FAIL: '支付宝打款失败',
89
- ALI_PAY_CLOSE: '支付宝打款关闭'
83
+ WAITING_EXAMINE: "未打款",
84
+ EXAMINED: "审核通过",
85
+ FLAG_PAID: "标记已打款",
86
+ ALI_PAY_WAITING: "支付宝待付款",
87
+ ALI_PAY_SUCCESS: "支付宝打款成功",
88
+ ALI_PAY_FAIL: "支付宝打款失败",
89
+ ALI_PAY_CLOSE: "支付宝打款关闭"
90
90
  };
91
91
  this.paymentStatusOptions = [{
92
- label: '未打款',
93
- value: '未打款'
92
+ label: "未打款",
93
+ value: "未打款"
94
94
  }, {
95
- label: '审核通过',
96
- value: '审核通过'
95
+ label: "审核通过",
96
+ value: "审核通过"
97
97
  }, {
98
- label: '标记已打款',
99
- value: '标记已打款'
98
+ label: "标记已打款",
99
+ value: "标记已打款"
100
100
  }, {
101
- label: '支付宝待付款',
102
- value: '支付宝待付款'
101
+ label: "支付宝待付款",
102
+ value: "支付宝待付款"
103
103
  }, {
104
- label: '支付宝打款成功',
105
- value: '支付宝打款成功'
104
+ label: "支付宝打款成功",
105
+ value: "支付宝打款成功"
106
106
  }, {
107
- label: '支付宝打款失败',
108
- value: '支付宝打款失败'
107
+ label: "支付宝打款失败",
108
+ value: "支付宝打款失败"
109
109
  }, {
110
- label: '支付宝打款关闭',
111
- value: '支付宝打款关闭'
110
+ label: "支付宝打款关闭",
111
+ value: "支付宝打款关闭"
112
112
  }];
113
113
  this.options = this.paymentStatusOptions;
114
114
  this.isCombinationComponent = false;
@@ -0,0 +1,33 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ declare class PaymentVoucherCode 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
+ effects: ComponentInterface["effects"];
18
+ constructor(options: PickOption);
19
+ renderPc: (value: any, record: Record) => React.JSX.Element | "--";
20
+ renderLog: (r: Record) => React.JSX.Element | "--" | null;
21
+ getComponentValue: (r: Record) => any;
22
+ renderExport: (value: any, record: Record) => any;
23
+ renderClient: (record: Record) => React.JSX.Element | null;
24
+ editRender: (p: any) => React.JSX.Element;
25
+ filterConfig: (item: ColumnConfig) => {
26
+ searchDefaultConditions: "like";
27
+ type: string;
28
+ id: string;
29
+ name: string;
30
+ filterComponentType: "Input";
31
+ };
32
+ }
33
+ export default PaymentVoucherCode;
@@ -0,0 +1,108 @@
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 _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); }
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ 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; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ 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); }
9
+ import React from "react";
10
+ import { ApaasInput } from "@kmkf-fe-packages/basic-components";
11
+ import GetFormItem from "../GetFormItem";
12
+ import ItemView from "../../commonComponents/ItemView";
13
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
+ import { SYMBOL } from "../../constant";
15
+ import { AlipayBill } from "../Common/index";
16
+ var PaymentVoucherCode = /*#__PURE__*/_createClass(function PaymentVoucherCode(options) {
17
+ var _this = this;
18
+ _classCallCheck(this, PaymentVoucherCode);
19
+ _defineProperty(this, "name", void 0);
20
+ _defineProperty(this, "id", void 0);
21
+ _defineProperty(this, "sortField", void 0);
22
+ _defineProperty(this, "type", void 0);
23
+ _defineProperty(this, "rules", void 0);
24
+ _defineProperty(this, "componentConfig", void 0);
25
+ _defineProperty(this, "isCombinationComponent", void 0);
26
+ _defineProperty(this, "formField", void 0);
27
+ _defineProperty(this, "canSort", void 0);
28
+ _defineProperty(this, "children", void 0);
29
+ _defineProperty(this, "dataType", void 0);
30
+ _defineProperty(this, "templateId", void 0);
31
+ _defineProperty(this, "workOrderUniqueKey", void 0);
32
+ _defineProperty(this, "effects", void 0);
33
+ _defineProperty(this, "renderPc", function (value, record) {
34
+ var _this$effects;
35
+ if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")])) return "--";
36
+ return /*#__PURE__*/React.createElement("div", {
37
+ onClick: function onClick(e) {
38
+ return e.stopPropagation();
39
+ }
40
+ }, /*#__PURE__*/React.createElement(AlipayBill, {
41
+ value: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")],
42
+ platform: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.env
43
+ }));
44
+ });
45
+ _defineProperty(this, "renderLog", function (r) {
46
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_paymentVoucherCode")])) return null;
47
+ return _this.renderPc(undefined, r);
48
+ });
49
+ _defineProperty(this, "getComponentValue", function (r) {
50
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_paymentVoucherCode")];
51
+ });
52
+ _defineProperty(this, "renderExport", function (value, record) {
53
+ var _record;
54
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")]) !== null && _record !== void 0 ? _record : "--";
55
+ });
56
+ _defineProperty(this, "renderClient", function (record) {
57
+ var _this$effects2;
58
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
59
+ id: _this.id,
60
+ label: _this.name,
61
+ value: /*#__PURE__*/React.createElement(AlipayBill, {
62
+ value: record === null || record === void 0 ? void 0 : record[_this.id],
63
+ platform: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.env
64
+ })
65
+ }) : null;
66
+ });
67
+ _defineProperty(this, "editRender", function (p) {
68
+ var _this$componentConfig, _this$componentConfig2;
69
+ return /*#__PURE__*/React.createElement(GetFormItem, {
70
+ title: _this.name,
71
+ name: _this.id,
72
+ rules: _this.rules,
73
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
74
+ display: p === null || p === void 0 ? void 0 : p.display,
75
+ required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
76
+ component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
77
+ placeholder: "\u81EA\u52A8\u83B7\u53D6\u65E0\u9700\u586B\u5199",
78
+ disabled: true
79
+ }))
80
+ });
81
+ });
82
+ _defineProperty(this, "filterConfig", function (item) {
83
+ return {
84
+ searchDefaultConditions: SYMBOL.like,
85
+ type: item.type,
86
+ id: "".concat(item.id, "_paymentVoucherCode"),
87
+ // 过滤组件id
88
+ name: item.name,
89
+ // 过滤组件名称
90
+ filterComponentType: "Input"
91
+ };
92
+ });
93
+ this.name = options.name;
94
+ this.id = options.id;
95
+ this.sortField = "".concat(options.id, "_paymentVoucherCode");
96
+ this.formField = "".concat(options.id, "_paymentVoucherCode");
97
+ this.type = options.type;
98
+ this.templateId = options.templateId;
99
+ this.componentConfig = options.componentConfig;
100
+ this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
101
+ this.rules = [];
102
+ this.isCombinationComponent = false;
103
+ this.canSort = false;
104
+ this.children = [];
105
+ this.dataType = "string";
106
+ this.effects = options.effects;
107
+ });
108
+ export default PaymentVoucherCode;
@@ -1,18 +1,18 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
3
  declare class BasicSelect 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
  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
  getKeyByComponentType: (type: string) => any;
18
18
  editRender: (p: any) => React.JSX.Element;
@@ -6,15 +6,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  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; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  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); }
9
- import React from 'react';
10
- import { ApaasSelect } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
10
+ import { ApaasSelect } from "@kmkf-fe-packages/basic-components";
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
14
  import { SYMBOL } from "../../constant";
15
15
  var typeMap = {
16
- BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
17
- SELECT: 'select'
16
+ BUYER_MESSAGE_NOTICE: {
17
+ key: "buyerMessageNotice"
18
+ },
19
+ SELECT: {
20
+ key: "select"
21
+ },
22
+ NEW_PAYMENT_STATUS: {
23
+ key: "newPaymentStatus",
24
+ placeholder: "自动获取无需填写"
25
+ }
18
26
  };
19
27
  var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
20
28
  var _this = this,
@@ -33,7 +41,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
33
41
  _defineProperty(this, "dataType", void 0);
34
42
  _defineProperty(this, "options", void 0);
35
43
  _defineProperty(this, "getKeyByComponentType", function (type) {
36
- return typeMap[type] || '';
44
+ return typeMap[type].key || "";
37
45
  });
38
46
  _defineProperty(this, "editRender", function (p) {
39
47
  var _this$componentConfig, _this$componentConfig2;
@@ -45,7 +53,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
45
53
  display: p === null || p === void 0 ? void 0 : p.display,
46
54
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
47
55
  component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
48
- placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
56
+ placeholder: typeMap[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
49
57
  showSearch: true,
50
58
  onChange: p === null || p === void 0 ? void 0 : p.onChange
51
59
  }))
@@ -55,27 +63,27 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
55
63
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
56
64
  id: _this.id,
57
65
  label: _this.name,
58
- value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
66
+ value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ""
59
67
  }) : null;
60
68
  });
61
69
  _defineProperty(this, "renderPc", function (value, record) {
62
70
  var _record;
63
71
  var type = _this.type;
64
- return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record : '--');
72
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)]) !== null && _record !== void 0 ? _record : "--");
65
73
  });
66
74
  _defineProperty(this, "renderLog", function (r) {
67
75
  var type = _this.type;
68
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])])) return null;
76
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)])) return null;
69
77
  return _this.renderPc(undefined, r);
70
78
  });
71
79
  _defineProperty(this, "getComponentValue", function (r) {
72
80
  var type = _this.type;
73
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])];
81
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
74
82
  });
75
83
  _defineProperty(this, "renderExport", function (value, record) {
76
84
  var _record2;
77
85
  var type = _this.type;
78
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : '--';
86
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)]) !== null && _record2 !== void 0 ? _record2 : "--";
79
87
  });
80
88
  _defineProperty(this, "filterConfig", function (item) {
81
89
  var _item$config;
@@ -87,7 +95,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
87
95
  // 过滤组件id
88
96
  name: item.name,
89
97
  // 过滤组件名称
90
- filterComponentType: 'MultipleSelect',
98
+ filterComponentType: "MultipleSelect",
91
99
  props: {
92
100
  options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []
93
101
  },
@@ -108,7 +116,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
108
116
  this.isCombinationComponent = false;
109
117
  this.canSort = true;
110
118
  this.children = [];
111
- this.dataType = 'string';
119
+ this.dataType = "string";
112
120
  this.options = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [];
113
121
  });
114
122
  export default BasicSelect;
@@ -0,0 +1,58 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
4
+ import CommonHeaderGoods from "../../CommonHeaderGood";
5
+ declare class WdtReissue implements ComponentInterface {
6
+ name: string;
7
+ id: string;
8
+ sortField: string;
9
+ type: string;
10
+ rules: any[];
11
+ componentConfig: ComponentInterface["componentConfig"];
12
+ effects: ComponentInterface["effects"];
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface["dataType"];
18
+ bsType: BsType;
19
+ bsMemo: BsMemo;
20
+ systemOrderNo: SystemOrderNo;
21
+ reissueGoods: BsHeaderGood | CommonHeaderGoods;
22
+ constructor(options: PickOption);
23
+ renderClient: (record: any) => React.JSX.Element | null;
24
+ renderPc: () => null;
25
+ renderLog: (r: Record) => React.JSX.Element;
26
+ getComponentValue: (r: Record) => {
27
+ [key: string]: any;
28
+ };
29
+ renderExport: () => null;
30
+ editRender: (p: any) => React.JSX.Element;
31
+ filterConfig: (item: ColumnConfig) => ({
32
+ searchDefaultConditions: "in";
33
+ type: string;
34
+ id: string;
35
+ name: string;
36
+ filterComponentType: "Cascader";
37
+ props: {
38
+ options: any[] | undefined;
39
+ fieldNames: {
40
+ label: string;
41
+ value: string;
42
+ children: string;
43
+ };
44
+ };
45
+ formatFilterValue: (val: Array<string>) => string[] | undefined;
46
+ filterFn: (value: string) => (i: Record) => boolean;
47
+ } | {
48
+ searchDefaultConditions: "like";
49
+ type: string;
50
+ id: string;
51
+ name: string;
52
+ filterComponentType: "Input";
53
+ props?: undefined;
54
+ formatFilterValue?: undefined;
55
+ filterFn?: undefined;
56
+ })[];
57
+ }
58
+ export default WdtReissue;
@@ -0,0 +1,185 @@
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, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { WdtReissue as Reissue } from "@kmkf-fe-packages/basic-components";
16
+ import { SYMBOL } from "../../../constant";
17
+ import { BsGoodsTable } from "../../Common/index";
18
+ import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
19
+ import CommonHeaderGoods from "../../CommonHeaderGood";
20
+ var typeMap = {
21
+ WDT_REISSUE_GOODS: {
22
+ key: "wdtReissueGoods",
23
+ name: "旺店通",
24
+ typeName: "wdtReissueType",
25
+ remark: "wdtReissueType_memo",
26
+ systemOrderNo: "wdtSystemOrderNo",
27
+ errMsg: "请选择旺店通补发商品"
28
+ }
29
+ };
30
+ var WdtReissue = /*#__PURE__*/_createClass(function WdtReissue(options) {
31
+ var _this = this,
32
+ _typeMap$options$type,
33
+ _typeMap$options$type2,
34
+ _typeMap$options$type3,
35
+ _typeMap$options$type4,
36
+ _typeMap$options$type5,
37
+ _this$componentConfig4;
38
+ _classCallCheck(this, WdtReissue);
39
+ _defineProperty(this, "name", void 0);
40
+ _defineProperty(this, "id", void 0);
41
+ _defineProperty(this, "sortField", void 0);
42
+ _defineProperty(this, "type", void 0);
43
+ _defineProperty(this, "rules", void 0);
44
+ _defineProperty(this, "componentConfig", void 0);
45
+ _defineProperty(this, "effects", void 0);
46
+ _defineProperty(this, "isCombinationComponent", void 0);
47
+ _defineProperty(this, "formField", void 0);
48
+ _defineProperty(this, "canSort", void 0);
49
+ _defineProperty(this, "children", void 0);
50
+ _defineProperty(this, "dataType", void 0);
51
+ _defineProperty(this, "bsType", void 0);
52
+ _defineProperty(this, "bsMemo", void 0);
53
+ _defineProperty(this, "systemOrderNo", void 0);
54
+ _defineProperty(this, "reissueGoods", void 0);
55
+ _defineProperty(this, "renderClient", function (record) {
56
+ var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
57
+ return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), _this.systemOrderNo.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
58
+ id: _this.id,
59
+ label: _this.name,
60
+ value: /*#__PURE__*/React.createElement(BsGoodsTable, {
61
+ list: (record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id)]) === null || _record2 === void 0 ? void 0 : _record2["".concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)]) || [],
62
+ showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || [],
63
+ type: _this.type
64
+ })
65
+ }) : null) : null;
66
+ });
67
+ _defineProperty(this, "renderPc", function () {
68
+ return null;
69
+ });
70
+ _defineProperty(this, "renderLog", function (r) {
71
+ var _r, _typeMap$_this$type3, _typeMap$_this$type4, _r2, _typeMap$_this$type5, _typeMap$_this$type6, _this$componentConfig2;
72
+ return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u8865\u53D1\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
73
+ list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) || [],
74
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
75
+ type: _this.type
76
+ })) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
77
+ });
78
+ _defineProperty(this, "getComponentValue", function (r) {
79
+ var _typeMap$_this$type7, _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type10, _typeMap$_this$type11, _typeMap$_this$type12;
80
+ var obj = {};
81
+ obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.typeName)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.typeName)];
82
+ obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
83
+ obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.systemOrderNo)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.systemOrderNo)];
84
+ return obj;
85
+ });
86
+ _defineProperty(this, "renderExport", function () {
87
+ return null;
88
+ });
89
+ _defineProperty(this, "editRender", function (p) {
90
+ var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
91
+ return /*#__PURE__*/React.createElement(GetFormItem, {
92
+ title: _this.name,
93
+ name: _this.id,
94
+ rules: _this.rules,
95
+ required: false,
96
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
97
+ display: p === null || p === void 0 ? void 0 : p.display,
98
+ component: /*#__PURE__*/React.createElement(Reissue, _extends({}, _this.componentConfig, {
99
+ maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
100
+ shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
101
+ shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
102
+ companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
103
+ width: "90%",
104
+ type: _this.type
105
+ }))
106
+ });
107
+ });
108
+ _defineProperty(this, "filterConfig", function (item) {
109
+ var _item$templateConfig;
110
+ return [{
111
+ searchDefaultConditions: SYMBOL.in,
112
+ type: item.type,
113
+ id: "".concat(item.id, "_").concat(typeMap[_this.type].typeName),
114
+ name: "".concat(item.name, "-\u8865\u53D1\u7C7B\u578B"),
115
+ filterComponentType: "Cascader",
116
+ props: {
117
+ options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
118
+ fieldNames: {
119
+ label: "label",
120
+ value: "value",
121
+ children: "children"
122
+ }
123
+ },
124
+ formatFilterValue: function formatFilterValue(val) {
125
+ if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
126
+ return [val[val.length - 1]];
127
+ }
128
+ },
129
+ filterFn: function filterFn(value) {
130
+ return function (i) {
131
+ var _typeMap$_this$type13;
132
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.typeName)), value);
133
+ };
134
+ }
135
+ }, {
136
+ searchDefaultConditions: SYMBOL.like,
137
+ type: item.type,
138
+ id: "".concat(item.id, "_").concat(typeMap[_this.type].key),
139
+ name: "".concat(_this.name),
140
+ filterComponentType: "Input"
141
+ }];
142
+ });
143
+ this.name = options.name;
144
+ this.id = options.id;
145
+ this.sortField = "".concat(options.id);
146
+ this.formField = "".concat(options.id);
147
+ this.type = options.type;
148
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
149
+ this.isCombinationComponent = true;
150
+ this.canSort = false;
151
+ this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
152
+ id: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.typeName),
153
+ name: "补发类型"
154
+ }));
155
+ this.systemOrderNo = new SystemOrderNo(_objectSpread(_objectSpread({}, options), {}, {
156
+ id: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.systemOrderNo),
157
+ name: "补发系统订单号"
158
+ }));
159
+ this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
160
+ id: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.remark),
161
+ name: "补发备注"
162
+ }));
163
+ this.reissueGoods = this.type === "BS_REISSUE_GOODS" ? new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
164
+ id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key),
165
+ name: "商品信息"
166
+ })) : new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
167
+ id: "".concat(options.id, "_").concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key),
168
+ name: "商品信息"
169
+ }));
170
+ this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.reissueGoods];
171
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
172
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
173
+ required: true,
174
+ validator: function validator(_, value) {
175
+ var _value, _typeMap$options$type6;
176
+ if (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.key)]) !== null && _value !== void 0 && _value.length)) {
177
+ var _typeMap$options$type7;
178
+ return Promise.reject(new Error("".concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.errMsg)));
179
+ }
180
+ return Promise.resolve();
181
+ }
182
+ }] : [];
183
+ this.dataType = "object";
184
+ });
185
+ export default WdtReissue;