@kmkf-fe-packages/services-components 0.26.2-alpha.1 → 0.26.2-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +1 -2
  2. package/dist/esm/commonComponents/SelectMark/index.js +2 -6
  3. package/dist/esm/components/BuyerNick/index.d.ts +3 -3
  4. package/dist/esm/components/BuyerNick/index.js +9 -19
  5. package/dist/esm/components/Common/index.d.ts +1 -0
  6. package/dist/esm/components/Common/index.js +76 -3
  7. package/dist/esm/components/CommonInput/index.d.ts +44 -0
  8. package/dist/esm/components/CommonInput/index.js +146 -0
  9. package/dist/esm/components/CompletedUser/index.js +1 -1
  10. package/dist/esm/components/FlowMarkSelect/index.js +2 -3
  11. package/dist/esm/components/FlowStatusSelect/index.js +0 -1
  12. package/dist/esm/components/FlowTag/index.js +1 -1
  13. package/dist/esm/components/Handler/index.js +1 -1
  14. package/dist/esm/components/HandlerDeadLine/index.js +1 -0
  15. package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +2 -2
  16. package/dist/esm/components/LogisticsInterception/InterceptStatus.js +1 -1
  17. package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.d.ts +31 -0
  18. package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +88 -0
  19. package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.d.ts +46 -0
  20. package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.js +111 -0
  21. package/dist/esm/components/{FlowWorkOrderStatus/index.d.ts → LogisticsMoreInterception/InterceptType.d.ts} +16 -12
  22. package/dist/esm/components/LogisticsMoreInterception/InterceptType.js +96 -0
  23. package/dist/esm/components/LogisticsMoreInterception/columnHeader.d.ts +5 -0
  24. package/dist/esm/components/LogisticsMoreInterception/columnHeader.js +55 -0
  25. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +69 -0
  26. package/dist/esm/components/LogisticsMoreInterception/index.js +184 -0
  27. package/dist/esm/components/LogisticsMoreInterception/interceptCompany.d.ts +39 -0
  28. package/dist/esm/components/LogisticsMoreInterception/interceptCompany.js +88 -0
  29. package/dist/esm/components/LogisticsMoreInterception/interceptItem.d.ts +34 -0
  30. package/dist/esm/components/{NodeInput/index.js → LogisticsMoreInterception/interceptItem.js} +47 -24
  31. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +35 -0
  32. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +82 -0
  33. package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.d.ts +34 -0
  34. package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +81 -0
  35. package/dist/esm/components/LogisticsMoreTrajectory/index.js +2 -2
  36. package/dist/esm/components/MultSelect/index.d.ts +4 -4
  37. package/dist/esm/components/MultSelect/index.js +13 -13
  38. package/dist/esm/components/NodeDeadLine/index.js +1 -0
  39. package/dist/esm/components/Payment/PaymentStatus.d.ts +4 -4
  40. package/dist/esm/components/Payment/PaymentStatus.js +30 -30
  41. package/dist/esm/components/PaymentVoucherCode/index.d.ts +33 -0
  42. package/dist/esm/components/{FlowWorkOrderStatus → PaymentVoucherCode}/index.js +46 -85
  43. package/dist/esm/components/PlatForm/index.js +1 -1
  44. package/dist/esm/components/ShopInput/index.js +1 -1
  45. package/dist/esm/constant.js +12 -13
  46. package/dist/esm/factory.d.ts +2 -2
  47. package/dist/esm/factory.js +10 -11
  48. package/dist/esm/index.d.ts +4 -3
  49. package/dist/esm/index.js +3 -2
  50. package/dist/esm/service/api.d.ts +1 -0
  51. package/dist/esm/service/api.js +8 -0
  52. package/dist/esm/type.d.ts +1 -1
  53. package/package.json +4 -4
  54. package/dist/esm/components/NodeInput/index.d.ts +0 -24
@@ -0,0 +1,81 @@
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 _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); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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";
9
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
10
+ import { SYMBOL } from "../../constant";
11
+ var InterceptSnapshot = /*#__PURE__*/_createClass(function InterceptSnapshot(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, InterceptSnapshot);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "type", void 0);
17
+ _defineProperty(this, "rules", void 0);
18
+ _defineProperty(this, "componentConfig", void 0);
19
+ _defineProperty(this, "effects", void 0);
20
+ _defineProperty(this, "align", void 0);
21
+ _defineProperty(this, "width", void 0);
22
+ _defineProperty(this, "isCombinationComponent", void 0);
23
+ _defineProperty(this, "sortField", void 0);
24
+ _defineProperty(this, "formField", void 0);
25
+ _defineProperty(this, "canSort", void 0);
26
+ _defineProperty(this, "dataType", void 0);
27
+ _defineProperty(this, "children", void 0);
28
+ _defineProperty(this, "renderSnapshot", function (record) {
29
+ var snapshotList = record[_this.id] || [];
30
+ return /*#__PURE__*/React.createElement(React.Fragment, null, snapshotList.map(function (item, index) {
31
+ return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), item);
32
+ }));
33
+ });
34
+ _defineProperty(this, "getComponentValue", function (r) {
35
+ var _r$_this$id;
36
+ return r === null || r === void 0 ? void 0 : (_r$_this$id = r[_this.id]) === null || _r$_this$id === void 0 ? void 0 : _r$_this$id.join(",");
37
+ });
38
+ _defineProperty(this, "renderClient", function () {
39
+ return null;
40
+ });
41
+ _defineProperty(this, "renderPc", function (value, record) {
42
+ return !isNull(record[_this.id]) ? _this.renderSnapshot(record) : "--";
43
+ });
44
+ _defineProperty(this, "renderLog", function () {
45
+ return null;
46
+ });
47
+ _defineProperty(this, "renderExport", function (value, record) {
48
+ var _this$getComponentVal;
49
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
50
+ });
51
+ _defineProperty(this, "editRender", function () {
52
+ return null;
53
+ });
54
+ _defineProperty(this, "filterConfig", function (item) {
55
+ return {
56
+ searchDefaultConditions: SYMBOL.like,
57
+ type: item.type,
58
+ id: "".concat(item.id, "_logisticsInterceptSnapshotList"),
59
+ name: "".concat(item.name, "-\u5FEB\u7167"),
60
+ filterComponentType: "Input"
61
+ // formatFilterValue: (input: string) => {
62
+ // return batchInput(input);
63
+ // },
64
+ };
65
+ });
66
+ this.name = "快照";
67
+ this.id = "".concat(options.id, "_logisticsInterceptSnapshotList");
68
+ this.formField = "".concat(options.id, "_logisticsInterceptSnapshotList");
69
+ this.sortField = "".concat(options.id, "_logisticsInterceptSnapshotList");
70
+ this.dataType = "object";
71
+ this.type = options.type;
72
+ this.componentConfig = options.componentConfig;
73
+ this.rules = [];
74
+ this.align = "left";
75
+ this.width = 200;
76
+ this.isCombinationComponent = false;
77
+ this.canSort = false;
78
+ this.children = [];
79
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
80
+ });
81
+ export default InterceptSnapshot;
@@ -107,10 +107,10 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
107
107
  var hasNoCode = value.some(function (item) {
108
108
  return !item.trajectoryCode;
109
109
  });
110
- if (!hasNoCompany) {
110
+ if (hasNoCompany) {
111
111
  return Promise.reject(new Error("请选择物流公司"));
112
112
  }
113
- if (!hasNoCode) {
113
+ if (hasNoCode) {
114
114
  return Promise.reject(new Error("请输入物流单号"));
115
115
  }
116
116
  return Promise.resolve();
@@ -1,5 +1,5 @@
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 BasicMultSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -11,8 +11,8 @@ declare class BasicMultSelect implements ComponentInterface {
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
  renderClient: (record: any) => React.JSX.Element | null;
18
18
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -6,12 +6,12 @@ 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 intersection from 'lodash/intersection';
11
- import { ApaasMultipleSelect } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
10
+ import intersection from "lodash/intersection";
11
+ import { ApaasMultipleSelect } from "@kmkf-fe-packages/basic-components";
12
12
  import GetFormItem from "../GetFormItem";
13
13
  import ItemView from "../../commonComponents/ItemView";
14
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
15
  import { SYMBOL } from "../../constant";
16
16
  var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options) {
17
17
  var _this = this,
@@ -34,15 +34,15 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
34
34
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
35
35
  id: _this.id,
36
36
  label: _this.name,
37
- value: record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.join(',')
37
+ value: record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.join(",")
38
38
  }) : null;
39
39
  });
40
40
  _defineProperty(this, "renderPc", function (value, record) {
41
41
  var _record;
42
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")]) === undefined) {
42
+ if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")])) {
43
43
  return /*#__PURE__*/React.createElement("span", null, "--");
44
44
  }
45
- return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(','));
45
+ return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(","));
46
46
  });
47
47
  _defineProperty(this, "renderLog", function (r) {
48
48
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_basicMultSelect")])) return null;
@@ -53,10 +53,10 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
53
53
  });
54
54
  _defineProperty(this, "renderExport", function (value, record) {
55
55
  var _record2;
56
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")]) === undefined) {
57
- return '--';
56
+ if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")])) {
57
+ return "--";
58
58
  }
59
- return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_basicMultSelect")]) === null || _record2 === void 0 ? void 0 : _record2.join(',');
59
+ return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_basicMultSelect")]) === null || _record2 === void 0 ? void 0 : _record2.join(",");
60
60
  });
61
61
  _defineProperty(this, "editRender", function (p) {
62
62
  var _this$componentConfig, _this$componentConfig2;
@@ -81,13 +81,13 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
81
81
  // 过滤组件id
82
82
  name: item.name,
83
83
  // 过滤组件名称
84
- filterComponentType: 'MultipleSelect',
84
+ filterComponentType: "MultipleSelect",
85
85
  props: {
86
86
  options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []
87
87
  },
88
88
  filterFn: function filterFn(value) {
89
89
  return function (i) {
90
- return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
90
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "basicMultSelect")).length > 0;
91
91
  };
92
92
  }
93
93
  };
@@ -102,7 +102,7 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
102
102
  this.isCombinationComponent = false;
103
103
  this.canSort = true;
104
104
  this.children = [];
105
- this.dataType = 'array';
105
+ this.dataType = "array";
106
106
  this.options = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [];
107
107
  });
108
108
  export default BasicMultSelect;
@@ -26,6 +26,7 @@ var NodeDeadLine = /*#__PURE__*/_createClass(function NodeDeadLine(options) {
26
26
  _defineProperty(this, "options", void 0);
27
27
  _defineProperty(this, "renderPc", function (value, record) {
28
28
  var _record, _record2;
29
+ if (!(record !== null && record !== void 0 && record.hasNodeDeadLine)) return /*#__PURE__*/React.createElement("span", null, "\u672A\u8BBE\u7F6E");
29
30
  return /*#__PURE__*/React.createElement("span", {
30
31
  className: record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record.includes('已超时') ? 'timeout' : ''
31
32
  }, (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--');
@@ -1,5 +1,5 @@
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 PaymentStatus implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -20,8 +20,8 @@ declare class PaymentStatus implements ComponentInterface {
20
20
  formField: string;
21
21
  canSort: boolean;
22
22
  children: ComponentInterface[];
23
- dataType: ComponentInterface['dataType'];
24
- options: ComponentInterface['options'];
23
+ dataType: ComponentInterface["dataType"];
24
+ options: ComponentInterface["options"];
25
25
  constructor(options: PickOption);
26
26
  renderClient: (record: any) => React.JSX.Element | null;
27
27
  renderPc: (value: unknown, record: any) => any;
@@ -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;
@@ -6,54 +6,59 @@ 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';
11
- import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
9
+ import React from "react";
10
+ import { ApaasInput } from "@kmkf-fe-packages/basic-components";
12
11
  import GetFormItem from "../GetFormItem";
13
- import get from 'lodash/get';
12
+ import ItemView from "../../commonComponents/ItemView";
13
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
14
  import { SYMBOL } from "../../constant";
15
- // 节点状态
16
- var FlowWorkOrderStatus = /*#__PURE__*/_createClass(function FlowWorkOrderStatus(options) {
17
- var _this = this,
18
- _Object$keys2;
19
- _classCallCheck(this, FlowWorkOrderStatus);
15
+ import { AlipayBill } from "../Common/index";
16
+ var PaymentVoucherCode = /*#__PURE__*/_createClass(function PaymentVoucherCode(options) {
17
+ var _this = this;
18
+ _classCallCheck(this, PaymentVoucherCode);
20
19
  _defineProperty(this, "name", void 0);
21
20
  _defineProperty(this, "id", void 0);
22
21
  _defineProperty(this, "sortField", void 0);
23
22
  _defineProperty(this, "type", void 0);
24
23
  _defineProperty(this, "rules", void 0);
25
24
  _defineProperty(this, "componentConfig", void 0);
26
- _defineProperty(this, "effects", void 0);
27
- _defineProperty(this, "workOrderStatus", void 0);
28
25
  _defineProperty(this, "isCombinationComponent", void 0);
29
26
  _defineProperty(this, "formField", void 0);
30
27
  _defineProperty(this, "canSort", void 0);
31
28
  _defineProperty(this, "children", void 0);
32
29
  _defineProperty(this, "dataType", void 0);
33
- _defineProperty(this, "options", void 0);
30
+ _defineProperty(this, "templateId", void 0);
31
+ _defineProperty(this, "workOrderUniqueKey", void 0);
32
+ _defineProperty(this, "effects", void 0);
34
33
  _defineProperty(this, "renderPc", function (value, record) {
35
- var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
36
- return status ? /*#__PURE__*/React.createElement("span", {
37
- style: {
38
- color: status.color
39
- }
40
- }, status === null || status === void 0 ? void 0 : status.label) : /*#__PURE__*/React.createElement("span", null, "--");
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(AlipayBill, {
37
+ value: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")],
38
+ platform: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.env
39
+ });
41
40
  });
42
41
  _defineProperty(this, "renderLog", function (r) {
43
- var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
44
- if (!status) return null;
42
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_paymentVoucherCode")])) return null;
45
43
  return _this.renderPc(undefined, r);
46
44
  });
47
45
  _defineProperty(this, "getComponentValue", function (r) {
48
- var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
49
- return status;
46
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_paymentVoucherCode")];
50
47
  });
51
48
  _defineProperty(this, "renderExport", function (value, record) {
52
- var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
53
- return status ? status === null || status === void 0 ? void 0 : status.label : '--';
49
+ var _record;
50
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_paymentVoucherCode")]) !== null && _record !== void 0 ? _record : "--";
54
51
  });
55
- _defineProperty(this, "renderClient", function () {
56
- return null;
52
+ _defineProperty(this, "renderClient", function (record) {
53
+ var _this$effects2;
54
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
55
+ id: _this.id,
56
+ label: _this.name,
57
+ value: /*#__PURE__*/React.createElement(AlipayBill, {
58
+ value: record === null || record === void 0 ? void 0 : record[_this.id],
59
+ platform: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.env
60
+ })
61
+ }) : null;
57
62
  });
58
63
  _defineProperty(this, "editRender", function (p) {
59
64
  var _this$componentConfig, _this$componentConfig2;
@@ -62,82 +67,38 @@ var FlowWorkOrderStatus = /*#__PURE__*/_createClass(function FlowWorkOrderStatus
62
67
  name: _this.id,
63
68
  rules: _this.rules,
64
69
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
70
+ display: p === null || p === void 0 ? void 0 : p.display,
65
71
  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,
66
- component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
67
- placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
68
- showSearch: true
72
+ component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
73
+ placeholder: "\u81EA\u52A8\u83B7\u53D6\u65E0\u9700\u586B\u5199",
74
+ disabled: true
69
75
  }))
70
76
  });
71
77
  });
72
78
  _defineProperty(this, "filterConfig", function (item) {
73
- var _Object$keys;
74
79
  return {
75
- searchDefaultConditions: SYMBOL.in,
80
+ searchDefaultConditions: SYMBOL.like,
76
81
  type: item.type,
77
- id: item.id,
82
+ id: "".concat(item.id, "_paymentVoucherCode"),
78
83
  // 过滤组件id
79
84
  name: item.name,
80
85
  // 过滤组件名称
81
- filterComponentType: 'MultipleSelect',
82
- props: {
83
- options: (_Object$keys = Object.keys(_this.workOrderStatus)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (item) {
84
- return {
85
- label: _this.workOrderStatus[item].label,
86
- value: item
87
- };
88
- })
89
- },
90
- filterFn: function filterFn(value) {
91
- return function (i) {
92
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
93
- };
94
- }
86
+ filterComponentType: "Input"
95
87
  };
96
88
  });
97
89
  this.name = options.name;
98
90
  this.id = options.id;
99
- this.sortField = options.id;
100
- this.formField = options.id;
91
+ this.sortField = "".concat(options.id, "_paymentVoucherCode");
92
+ this.formField = "".concat(options.id, "_paymentVoucherCode");
101
93
  this.type = options.type;
94
+ this.templateId = options.templateId;
102
95
  this.componentConfig = options.componentConfig;
103
- this.effects = options.effects;
96
+ this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
104
97
  this.rules = [];
105
98
  this.isCombinationComponent = false;
106
- this.canSort = true;
99
+ this.canSort = false;
107
100
  this.children = [];
108
- this.workOrderStatus = {
109
- "WAITING": {
110
- label: '待处理',
111
- color: '#faad14',
112
- bgColor: '#faad14'
113
- },
114
- "PROCESSING": {
115
- label: '处理中',
116
- color: '#1890ff',
117
- bgColor: '#1890ff'
118
- },
119
- "STOPPING": {
120
- label: '暂停中',
121
- color: '#ff4d4f',
122
- bgColor: '#ff4d4f'
123
- },
124
- "COMPLETED": {
125
- label: '已完成',
126
- color: '#73d13d',
127
- bgColor: '#73d13d'
128
- },
129
- "CLOSED": {
130
- label: '已关闭',
131
- color: 'rgba(0, 0, 0, 0.65)',
132
- bgColor: 'rgba(0, 0, 0, 0.04);'
133
- }
134
- };
135
- this.dataType = 'string';
136
- this.options = (_Object$keys2 = Object.keys(this.workOrderStatus)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.map(function (item) {
137
- return {
138
- label: _this.workOrderStatus[item].label,
139
- value: item
140
- };
141
- });
101
+ this.dataType = "string";
102
+ this.effects = options.effects;
142
103
  });
143
- export default FlowWorkOrderStatus;
104
+ export default PaymentVoucherCode;
@@ -64,7 +64,7 @@ var PlatForm = /*#__PURE__*/_createClass(function PlatForm(options) {
64
64
  options: platData
65
65
  };
66
66
  });
67
- this.name = (options === null || options === void 0 ? void 0 : options.name) || "平台";
67
+ this.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';
@@ -86,7 +86,7 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
86
86
  }
87
87
  };
88
88
  });
89
- this.name = (options === null || options === void 0 ? void 0 : options.name) || "店铺名称";
89
+ this.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,19 +1,18 @@
1
1
  export var SYMBOL = {
2
- between: 'between',
3
- eq: 'eq',
4
- like: 'like',
5
- gt: 'gt',
6
- gte: 'gte',
7
- lt: 'lt',
8
- lte: 'lte',
9
- ne: 'ne',
10
- in: 'in',
11
- nin: 'nin',
12
- non: 'non',
13
- notnull: 'notnull'
2
+ between: "between",
3
+ eq: "eq",
4
+ like: "like",
5
+ gt: "gt",
6
+ gte: "gte",
7
+ lt: "lt",
8
+ lte: "lte",
9
+ ne: "ne",
10
+ in: "in",
11
+ nin: "nin",
12
+ non: "non",
13
+ notnull: "notnull"
14
14
  };
15
15
  export var batchInput = function batchInput(val) {
16
- console.log('batchInput', val);
17
16
  return val ? val.split(/[,|,|\s|\n|\rn]/).filter(function (t) {
18
17
  return !!t;
19
18
  }).map(function (t) {
@@ -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, 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, NodeInput, FlowWorkOrderStatus, WdtGoods } 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, 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, WdtGoods, CommonInput, PaymentVoucherCode } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | FlowWorkOrderStatus | BasicGrade | Handler | HandlerDeadLine | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | NodeDeadLine | NodeInput | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | StatusSelect | SystemOrderNo | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WdtGoods | WlnGoods | WorkOrderId | CommonDataTime | TemplateSelect | Submitter | PrevSubmitter | FlowCreator | NodeStayDuration;
3
+ export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | BasicGrade | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsMoreInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | Ordinary | Payment | PaymentVoucherCode | BasicPicture | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopName | StatusSelect | SystemOrderNo | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WdtGoods | WlnGoods | WorkOrderId | CommonDataTime | TemplateSelect | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | NodeDeadLine | HandlerDeadLine | NodeStayDuration;