@kmkf-fe-packages/services-components 0.13.0-alpha.2 → 0.13.0-alpha.21

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 (58) hide show
  1. package/dist/esm/commonComponents/OperationLog/index.js +6 -1
  2. package/dist/esm/components/Address/index.d.ts +6 -6
  3. package/dist/esm/components/Address/index.js +32 -26
  4. package/dist/esm/components/BS/BsExchange/index.js +5 -5
  5. package/dist/esm/components/BS/BsPosting/components/City/index.d.ts +29 -0
  6. package/dist/esm/components/BS/BsPosting/components/City/index.js +76 -0
  7. package/dist/esm/components/BS/BsPosting/components/Detail/index.d.ts +27 -0
  8. package/dist/esm/components/BS/BsPosting/components/Detail/index.js +70 -0
  9. package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +29 -0
  10. package/dist/esm/components/BS/BsPosting/components/District/index.js +76 -0
  11. package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +29 -0
  12. package/dist/esm/components/BS/BsPosting/components/Province/index.js +76 -0
  13. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.d.ts +27 -0
  14. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +70 -0
  15. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.d.ts +27 -0
  16. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +70 -0
  17. package/dist/esm/components/BS/BsPosting/index.d.ts +43 -0
  18. package/dist/esm/components/BS/BsPosting/index.js +106 -0
  19. package/dist/esm/components/BS/BsReissue/index.js +3 -3
  20. package/dist/esm/components/BS/BsReturn/index.js +3 -3
  21. package/dist/esm/components/BS/BsSystemOrder/index.js +6 -3
  22. package/dist/esm/components/Cascader/index.d.ts +1 -1
  23. package/dist/esm/components/Cascader/index.js +2 -2
  24. package/dist/esm/components/Checkbox/index.d.ts +1 -1
  25. package/dist/esm/components/Checkbox/index.js +2 -2
  26. package/dist/esm/components/Common/img/reject.png +0 -0
  27. package/dist/esm/components/Common/img/reminder.png +0 -0
  28. package/dist/esm/components/Common/index.js +6 -1
  29. package/dist/esm/components/CommonDataTime/index.d.ts +1 -1
  30. package/dist/esm/components/CommonDataTime/index.js +2 -2
  31. package/dist/esm/components/CommonMultiStatus/index.d.ts +9 -2
  32. package/dist/esm/components/CommonMultiStatus/index.js +16 -9
  33. package/dist/esm/components/DataTime/index.d.ts +1 -1
  34. package/dist/esm/components/DataTime/index.js +2 -2
  35. package/dist/esm/components/FlowCreator/index.d.ts +39 -0
  36. package/dist/esm/components/FlowCreator/index.js +87 -0
  37. package/dist/esm/components/FlowTag/index.js +18 -6
  38. package/dist/esm/components/GetFormItem/index.d.ts +1 -1
  39. package/dist/esm/components/GetFormItem/index.js +4 -2
  40. package/dist/esm/components/Input/index.d.ts +6 -4
  41. package/dist/esm/components/Input/index.js +66 -9
  42. package/dist/esm/components/PrevSubmitter/index.d.ts +39 -0
  43. package/dist/esm/components/PrevSubmitter/index.js +87 -0
  44. package/dist/esm/components/Radio/index.d.ts +5 -5
  45. package/dist/esm/components/Radio/index.js +13 -13
  46. package/dist/esm/components/ReceiverAddress/index.d.ts +5 -5
  47. package/dist/esm/components/ReceiverAddress/index.js +27 -19
  48. package/dist/esm/components/Submitter/index.js +1 -1
  49. package/dist/esm/factory.d.ts +2 -2
  50. package/dist/esm/factory.js +12 -6
  51. package/dist/esm/index.d.ts +3 -0
  52. package/dist/esm/index.js +3 -0
  53. package/dist/esm/service/api.d.ts +1 -0
  54. package/dist/esm/service/api.js +9 -0
  55. package/dist/esm/service/request.d.ts +17 -0
  56. package/dist/esm/service/request.js +56 -0
  57. package/dist/esm/type.d.ts +16 -14
  58. package/package.json +4 -4
@@ -6,15 +6,15 @@ 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 { ApaasRadio } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
10
+ import { ApaasRadio } 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';
14
- import get from 'lodash/get';
13
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
+ import get from "lodash/get";
15
15
  import { SYMBOL } from "../../constant";
16
16
  var typeMap = {
17
- RADIO: 'radio'
17
+ RADIO: "radio"
18
18
  };
19
19
  var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
20
20
  var _this = this,
@@ -35,7 +35,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
35
35
  _defineProperty(this, "options", void 0);
36
36
  _defineProperty(this, "render", function (value) {
37
37
  var _value$value;
38
- 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, ")"));
38
+ 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, ")"));
39
39
  });
40
40
  _defineProperty(this, "renderPc", function (value, record) {
41
41
  var type = _this.type;
@@ -59,12 +59,12 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
59
59
  _defineProperty(this, "renderExport", function (value, record) {
60
60
  var type = _this.type;
61
61
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) === undefined) {
62
- return '--';
62
+ return "--";
63
63
  }
64
- 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"), ''));
64
+ 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"), ""));
65
65
  });
66
66
  _defineProperty(this, "getKeyByComponentType", function (type) {
67
- return typeMap[type] || '';
67
+ return typeMap[type] || "";
68
68
  });
69
69
  _defineProperty(this, "renderClient", function (record) {
70
70
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -96,11 +96,11 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
96
96
  // 过滤组件id
97
97
  name: item.name,
98
98
  // 过滤组件名称
99
- filterComponentType: 'MultipleSelect',
99
+ filterComponentType: "MultipleSelect",
100
100
  props: {
101
101
  options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
102
- label: '其他',
103
- value: '其他'
102
+ label: "其他",
103
+ value: "其他"
104
104
  }) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || []
105
105
  },
106
106
  filterFn: function filterFn(value) {
@@ -130,7 +130,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
130
130
  return Promise.resolve();
131
131
  }
132
132
  }] : [];
133
- this.dataType = 'string';
133
+ this.dataType = "string";
134
134
  this.options = ((_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.options) || [];
135
135
  });
136
136
  export default BasicRadio;
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, Record } from '../../type';
2
- import React from 'react';
3
- import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
1
+ import { ComponentInterface, PickOption, Record } from "../../type";
2
+ import React from "react";
3
+ import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
4
4
  declare type Value = {
5
5
  address?: (string | number)[];
6
6
  detail?: string;
@@ -18,12 +18,12 @@ declare class BasicInput implements ComponentInterface {
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
20
  addressDateInstance: InstanceType<typeof AddressData>;
21
- dataType: ComponentInterface['dataType'];
21
+ dataType: ComponentInterface["dataType"];
22
22
  constructor(options: PickOption);
23
23
  render: (value: Value) => React.JSX.Element;
24
24
  transTextToNumber: (value?: string) => string | number | undefined;
25
25
  renderPc: (value: any, record: Record) => React.JSX.Element;
26
- renderLog: (r: Record) => React.JSX.Element | null;
26
+ renderLog: (r: Record) => string;
27
27
  getComponentValue: (r: Record) => {
28
28
  address: any[];
29
29
  detail: any;
@@ -5,13 +5,13 @@ 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';
9
- import { Address } from '@kmkf-fe-packages/basic-components';
10
- import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
8
+ import React from "react";
9
+ import { Address } from "@kmkf-fe-packages/basic-components";
10
+ import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
14
- import every from 'lodash/every';
13
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
+ import every from "lodash/every";
15
15
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
16
16
  var _this = this,
17
17
  _this$componentConfig3;
@@ -35,7 +35,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
35
35
  className: "pointer"
36
36
  }, value === null || value === void 0 ? void 0 : (_value$address = value.address) === null || _value$address === void 0 ? void 0 : _value$address.map(function (suffix) {
37
37
  return _this.addressDateInstance.getNameByCode(suffix);
38
- }).join(''), value === null || value === void 0 ? void 0 : value.detail);
38
+ }).join(""), value === null || value === void 0 ? void 0 : value.detail);
39
39
  });
40
40
  _defineProperty(this, "transTextToNumber", function (value) {
41
41
  return value ? +value : value;
@@ -54,17 +54,25 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
54
54
  className: "pointer",
55
55
  onClick: function onClick(e) {
56
56
  var _this$effects, _this$effects2;
57
- typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
57
+ typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
58
58
  e.stopPropagation();
59
59
  }
60
60
  }, (_address = address) === null || _address === void 0 ? void 0 : _address.map(function () {
61
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
61
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
62
62
  return _this.addressDateInstance.getNameByCode(suffix);
63
- }).join(''), detail);
63
+ }).join(""), detail);
64
64
  });
65
65
  _defineProperty(this, "renderLog", function (r) {
66
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_province")])) return null;
67
- return _this.renderPc(undefined, r);
66
+ var _address2;
67
+ var address = [_this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_province")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_city")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_district")])];
68
+ address = every(address, function (item) {
69
+ return !item;
70
+ }) ? [] : address;
71
+ var detail = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_address")];
72
+ return "".concat((_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function () {
73
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
74
+ return _this.addressDateInstance.getNameByCode(suffix);
75
+ }).join(""), " ").concat(detail || "");
68
76
  });
69
77
  _defineProperty(this, "getComponentValue", function (r) {
70
78
  return {
@@ -73,19 +81,19 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
73
81
  };
74
82
  });
75
83
  _defineProperty(this, "renderExport", function (value, record) {
76
- var _address2;
84
+ var _address3;
77
85
  if (record["".concat(_this.id, "_province")] === undefined) {
78
- return '--';
86
+ return "--";
79
87
  }
80
88
  var address = [_this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_province")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_city")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_district")])];
81
89
  address = every(address, function (item) {
82
90
  return !item;
83
91
  }) ? [] : address;
84
92
  var detail = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_address")];
85
- return "".concat((_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function () {
86
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
93
+ return "".concat((_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.map(function () {
94
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
87
95
  return _this.addressDateInstance.getNameByCode(suffix);
88
- }).join(''), " ").concat(detail || '');
96
+ }).join(""), " ").concat(detail || "");
89
97
  });
90
98
  _defineProperty(this, "renderClient", function (record) {
91
99
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -121,16 +129,16 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
121
129
  validator: function validator(_, value) {
122
130
  var _value$address2;
123
131
  if (!(value !== null && value !== void 0 && (_value$address2 = value.address) !== null && _value$address2 !== void 0 && _value$address2.length)) {
124
- return Promise.reject(new Error('请选择地址'));
132
+ return Promise.reject(new Error("请选择地址"));
125
133
  }
126
134
  if (!(value !== null && value !== void 0 && value.detail)) {
127
- return Promise.reject(new Error('请填写详细地址'));
135
+ return Promise.reject(new Error("请填写详细地址"));
128
136
  }
129
137
  return Promise.resolve();
130
138
  }
131
139
  }] : [];
132
140
  this.effects = options.effects;
133
141
  this.addressDateInstance = AddressData.getInstance();
134
- this.dataType = 'object';
142
+ this.dataType = "object";
135
143
  });
136
144
  export default BasicInput;
@@ -72,7 +72,7 @@ var Submitter = /*#__PURE__*/_createClass(function Submitter(options) {
72
72
  }
73
73
  };
74
74
  });
75
- this.name = "提交人";
75
+ this.name = options.name || "提交人";
76
76
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "submitter";
77
77
  this.type = "OPERATOR_INPUT";
78
78
  this.sortField = "submitter";
@@ -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, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } 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, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | CommonTradeId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
3
+ export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | FlowTag | 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 | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting;
@@ -1,4 +1,6 @@
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, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } 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, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
2
+ // CommonTradeId,
3
+ CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
2
4
  export var factory = function factory(type, options) {
3
5
  var _options$componentCon;
4
6
  switch (type) {
@@ -8,6 +10,10 @@ export var factory = function factory(type, options) {
8
10
  return new ShopInput(options);
9
11
  case "OPERATOR_INPUT":
10
12
  return new Submitter(options);
13
+ case "PREV_SUBMITTER_INPUT":
14
+ return new PrevSubmitter(options);
15
+ case "FLOW_CREATOR_INPUT":
16
+ return new FlowCreator(options);
11
17
  case "HANDLER_INPUT":
12
18
  return new Handler(options);
13
19
  case "COMPLETED_USER_INPUT":
@@ -123,7 +129,7 @@ export var factory = function factory(type, options) {
123
129
  case "WLN_SEND_GOOD":
124
130
  return new JstSendGood(options);
125
131
  case "BS_POSTING":
126
- return new BasicPosting(options);
132
+ return new BsPosting(options);
127
133
  case "BS_GOODS":
128
134
  return new BsGoods(options);
129
135
  case "BS_EXCHANGE_GOODS":
@@ -132,7 +138,7 @@ export var factory = function factory(type, options) {
132
138
  return new BsReissue(options);
133
139
  case "BS_RETURN_GOODS":
134
140
  return new BsReturn(options);
135
- // case 'REISSUE_TRADE_ID':
141
+ case 'REISSUE_TRADE_ID':
136
142
  case "BS_DELIVERY_NO":
137
143
  case "RETURN_GOODS_TRADE_ID":
138
144
  case "EXCHANGE_TRADE_ID":
@@ -153,9 +159,9 @@ export var factory = function factory(type, options) {
153
159
  case "EXCHANGE_STATUS":
154
160
  case "WAREHOUSING_STATUS":
155
161
  return new CommonMultiStatus(options);
156
- case "REISSUE_TRADE_ID":
157
- // case 'EXCHANGE_TRADE_ID':
158
- return new CommonTradeId(options);
162
+ // case "REISSUE_TRADE_ID":
163
+ // case 'EXCHANGE_TRADE_ID':
164
+ // return new CommonTradeId(options);
159
165
  case "NUMERICAL_CALCULATION":
160
166
  return new Calculation(options);
161
167
  case "NODE_DEAD_LINE_INPUT":
@@ -53,6 +53,8 @@ export { default as LogisticsTrajectory } from "./components/LogisticsTrajectory
53
53
  export { default as PlatForm } from "./components/PlatForm";
54
54
  export { default as ShopInput } from "./components/ShopInput";
55
55
  export { default as Submitter } from "./components/Submitter";
56
+ export { default as PrevSubmitter } from "./components/PrevSubmitter";
57
+ export { default as FlowCreator } from "./components/FlowCreator";
56
58
  export { default as Handler } from "./components/Handler";
57
59
  export { default as CompletedUser } from "./components/CompletedUser";
58
60
  export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
@@ -65,6 +67,7 @@ export { default as NodeDeadLine } from "./components/NodeDeadLine";
65
67
  export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
66
68
  export { default as NodeStayDuration } from "./components/NodeStayDuration";
67
69
  export { default as WlnGoods } from "./components/WLN/WlnGoods";
70
+ export { default as BsPosting } from "./components/BS/BsPosting";
68
71
  export { factory } from "./factory";
69
72
  export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
70
73
  export { default as SelectMark } from "./commonComponents/SelectMark";
package/dist/esm/index.js CHANGED
@@ -53,6 +53,8 @@ export { default as LogisticsTrajectory } from "./components/LogisticsTrajectory
53
53
  export { default as PlatForm } from "./components/PlatForm";
54
54
  export { default as ShopInput } from "./components/ShopInput";
55
55
  export { default as Submitter } from "./components/Submitter";
56
+ export { default as PrevSubmitter } from "./components/PrevSubmitter";
57
+ export { default as FlowCreator } from "./components/FlowCreator";
56
58
  export { default as Handler } from "./components/Handler";
57
59
  export { default as CompletedUser } from "./components/CompletedUser";
58
60
  export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
@@ -65,6 +67,7 @@ export { default as NodeDeadLine } from "./components/NodeDeadLine";
65
67
  export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
66
68
  export { default as NodeStayDuration } from "./components/NodeStayDuration";
67
69
  export { default as WlnGoods } from "./components/WLN/WlnGoods";
70
+ export { default as BsPosting } from "./components/BS/BsPosting";
68
71
  export { factory } from "./factory";
69
72
  export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
70
73
  export { default as SelectMark } from "./commonComponents/SelectMark";
@@ -0,0 +1 @@
1
+ export declare const replaceCheck: (data: any) => Promise<any>;
@@ -0,0 +1,9 @@
1
+ import request from "./request";
2
+ // 重复校验
3
+ export var replaceCheck = function replaceCheck(data) {
4
+ return request({
5
+ url: '/qy/gdfw/workOrder/repeatCheck',
6
+ method: 'post',
7
+ data: data
8
+ });
9
+ };
@@ -0,0 +1,17 @@
1
+ interface RequestProps {
2
+ url: string;
3
+ method: string;
4
+ data: any;
5
+ headers?: any;
6
+ infoLevel?: 'error' | 'warning' | 'quiet';
7
+ options?: any;
8
+ }
9
+ export interface serverProps<T = any> {
10
+ data?: T;
11
+ result: number;
12
+ success: boolean;
13
+ traceId: string;
14
+ [key: string]: any;
15
+ }
16
+ declare const requestApi: ({ url, method, data, headers, infoLevel, options }: RequestProps) => Promise<serverProps>;
17
+ export default requestApi;
@@ -0,0 +1,56 @@
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 _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; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ /*
8
+ * @Description:
9
+ * @Author: litian
10
+ * @Date: 2022-09-06 09:29:34
11
+ * @LastEditors: litian
12
+ * @LastEditTime: 2022-11-24 09:11:45
13
+ */
14
+ import { extend } from 'umi-request';
15
+ import { message } from 'antd';
16
+ var request = extend({});
17
+ var requestApi = function requestApi(_ref) {
18
+ var url = _ref.url,
19
+ method = _ref.method,
20
+ data = _ref.data,
21
+ _ref$headers = _ref.headers,
22
+ headers = _ref$headers === void 0 ? {} : _ref$headers,
23
+ _ref$infoLevel = _ref.infoLevel,
24
+ infoLevel = _ref$infoLevel === void 0 ? 'error' : _ref$infoLevel,
25
+ _ref$options = _ref.options,
26
+ options = _ref$options === void 0 ? {} : _ref$options;
27
+ return new Promise(function (resolve, reject) {
28
+ var params = _objectSpread({
29
+ method: method,
30
+ headers: headers
31
+ }, options);
32
+ if (method.toLocaleLowerCase() === 'get') {
33
+ params.params = data;
34
+ } else {
35
+ params.data = data;
36
+ }
37
+ request(url, params).then(function (res) {
38
+ if (res.result === 100 || res.success) {
39
+ resolve(res);
40
+ } else {
41
+ if (infoLevel === 'warning') {
42
+ message.warn(res.message);
43
+ } else if (infoLevel === 'error') {
44
+ message.error(res.message);
45
+ } else {
46
+ console.log(res.message);
47
+ }
48
+ reject(res);
49
+ }
50
+ }).catch(function (e) {
51
+ console.error('请求错误', e);
52
+ reject(e);
53
+ });
54
+ });
55
+ };
56
+ export default requestApi;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FormInstance } from "antd";
3
- import { SYMBOL } from "./constant";
4
- export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
- export declare type ALignType = "left" | "right" | "center";
2
+ import type { FormInstance } from 'antd';
3
+ import { SYMBOL } from './constant';
4
+ export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
5
+ export declare type ALignType = 'left' | 'right' | 'center';
6
6
  export declare type QuerySymbol = keyof typeof SYMBOL;
7
7
  export declare type Record = {
8
8
  [props in string]: any;
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
27
27
  filterFn?: (p: any) => (r: Record) => unknown;
28
28
  formatFilterValue?: (p: any) => any;
29
29
  };
30
- export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate";
30
+ export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate';
31
31
  export interface ComponentInterface {
32
32
  id: string;
33
33
  sortField: string;
@@ -47,9 +47,11 @@ export interface ComponentInterface {
47
47
  rules?: any[];
48
48
  width?: number;
49
49
  align?: ALignType;
50
- dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
51
- format?: "dateTime" | "date" | "time" | "cascader" | "shopInput";
50
+ dataType: 'string' | 'number' | 'boolean' | 'array' | 'range' | 'object';
51
+ format?: 'dateTime' | 'date' | 'time' | 'cascader' | 'shopInput';
52
52
  options?: Array<any>;
53
+ templateId?: string;
54
+ workOrderUniqueKey?: string;
53
55
  /**
54
56
  * @description 组件下标
55
57
  * @deprecated 已弃用字段,后续版本不在使用
@@ -71,7 +73,7 @@ export interface ComponentInterface {
71
73
  /**
72
74
  * @description 显示字段名称
73
75
  */
74
- showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder";
76
+ showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all' | 'bs' | 'workOrder';
75
77
  /**
76
78
  * @description 是否选择SKU
77
79
  */
@@ -91,7 +93,7 @@ export interface ComponentInterface {
91
93
  /**
92
94
  * @description 备注状态
93
95
  */
94
- associatedType?: "APPEND";
96
+ associatedType?: 'APPEND';
95
97
  isAssociated?: boolean;
96
98
  isShowFlag?: boolean;
97
99
  /**
@@ -132,7 +134,7 @@ export interface ComponentInterface {
132
134
  * @description 时间初始值
133
135
  */
134
136
  dateTime?: string;
135
- dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
137
+ dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
136
138
  maxSize?: number;
137
139
  basicGrade?: number;
138
140
  range?: number;
@@ -227,13 +229,13 @@ export interface ComponentInterface {
227
229
  getComponentValue: (r: Record) => any;
228
230
  formDataTransform?: (r: any) => any;
229
231
  }
230
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader">;
232
+ export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader' | 'templateId' | 'workOrderUniqueKey'>;
231
233
  export declare type ColumnConfig = {
232
234
  id: string;
233
235
  name: string;
234
236
  type: string;
235
237
  subKey?: string;
236
- mode?: "multiple";
237
- config?: ComponentInterface["componentConfig"];
238
- templateConfig?: ComponentInterface["componentConfig"];
238
+ mode?: 'multiple';
239
+ config?: ComponentInterface['componentConfig'];
240
+ templateConfig?: ComponentInterface['componentConfig'];
239
241
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.13.0-alpha.2",
3
+ "version": "0.13.0-alpha.21",
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.13.0-alpha.2",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.13.0-alpha.2"
29
+ "@kmkf-fe-packages/basic-components": "^0.13.0-alpha.21",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.13.0-alpha.21"
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": "28fcac29b9d97a98033d60ab0b100ede3186f1e6"
43
+ "gitHead": "fbeb98f026a1e5e5afbfd113179bbe85271213d6"
44
44
  }