@kmkf-fe-packages/services-components 2.9.0-rc.0 → 2.9.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 (127) hide show
  1. package/dist/esm/Hooks/index.d.ts +2 -0
  2. package/dist/esm/Hooks/index.js +2 -0
  3. package/dist/esm/Hooks/useColumnsConfig.d.ts +26 -0
  4. package/dist/esm/Hooks/useColumnsConfig.js +243 -0
  5. package/dist/esm/Hooks/useGoodsSourceFormat.d.ts +29 -0
  6. package/dist/esm/Hooks/useGoodsSourceFormat.js +437 -0
  7. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
  8. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +4 -3
  9. package/dist/esm/commonComponents/GlobalContext/index.js +61 -23
  10. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +14 -11
  11. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +14 -12
  12. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +12 -9
  13. package/dist/esm/commonComponents/OperationLog/index.d.ts +2 -1
  14. package/dist/esm/commonComponents/OperationLog/index.js +4 -4
  15. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +5 -3
  16. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -19
  17. package/dist/esm/commonComponents/ShopList/index.js +3 -1
  18. package/dist/esm/components/BS/BsGoods/index.js +0 -1
  19. package/dist/esm/components/BS/BsLogistics/index.d.ts +2 -0
  20. package/dist/esm/components/BS/BsLogistics/index.js +50 -9
  21. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
  22. package/dist/esm/components/BS/BsSystemOrder/index.js +62 -9
  23. package/dist/esm/components/BS/common/BsHeaderChild.d.ts +9 -8
  24. package/dist/esm/components/BS/common/BsHeaderChild.js +16 -12
  25. package/dist/esm/components/BS/common/BsHeaderGood.js +2 -2
  26. package/dist/esm/components/BS/common/BsHeaderPic.d.ts +2 -0
  27. package/dist/esm/components/BS/common/BsHeaderPic.js +17 -2
  28. package/dist/esm/components/BS/common/BsMemo.js +5 -1
  29. package/dist/esm/components/BS/common/BsType.js +5 -1
  30. package/dist/esm/components/BS/common/SystemOrderNo.js +5 -1
  31. package/dist/esm/components/BS/common/expressCode.js +6 -0
  32. package/dist/esm/components/BS/common/expressCompany.js +20 -1
  33. package/dist/esm/components/BsE3/BsReissueE3/index.js +4 -1
  34. package/dist/esm/components/Cascader/index.d.ts +8 -6
  35. package/dist/esm/components/Cascader/index.js +26 -22
  36. package/dist/esm/components/Common/constants/bs.js +2 -2
  37. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -2
  38. package/dist/esm/components/Common/constants/defaultColumns.js +2 -2
  39. package/dist/esm/components/Common/constants/wdt.js +104 -0
  40. package/dist/esm/components/Common/index.d.ts +2 -2
  41. package/dist/esm/components/Common/index.js +45 -24
  42. package/dist/esm/components/CommonDataTime/index.d.ts +2 -2
  43. package/dist/esm/components/CommonDataTime/index.js +2 -2
  44. package/dist/esm/components/CommonHeaderGood/index.js +1417 -110
  45. package/dist/esm/components/CommonInput/index.js +11 -3
  46. package/dist/esm/components/CommonMultiStatus/index.js +96 -36
  47. package/dist/esm/components/CommonSystemOrder/index.js +7 -0
  48. package/dist/esm/components/ErpTradeId/components/OrderNum/communication.js +0 -2
  49. package/dist/esm/components/ErpTradeId/index.d.ts +2 -2
  50. package/dist/esm/components/ErpTradeId/index.js +7 -4
  51. package/dist/esm/components/File/index.d.ts +6 -6
  52. package/dist/esm/components/File/index.js +9 -10
  53. package/dist/esm/components/FlowOverallStatusSelect/index.d.ts +40 -0
  54. package/dist/esm/components/FlowOverallStatusSelect/index.js +180 -0
  55. package/dist/esm/components/GY/GyGoods/index.js +5 -1
  56. package/dist/esm/components/GY/GyReissue/index.js +5 -1
  57. package/dist/esm/components/GY/GyReturn/index.js +5 -1
  58. package/dist/esm/components/Input/index.d.ts +4 -4
  59. package/dist/esm/components/Input/index.js +35 -31
  60. package/dist/esm/components/JST/JstSendGood/index.d.ts +10 -0
  61. package/dist/esm/components/JST/JstSendGood/index.js +66 -18
  62. package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
  63. package/dist/esm/components/KM/KmExchange/index.js +136 -0
  64. package/dist/esm/components/KmErpSendGood/index.js +1 -1
  65. package/dist/esm/components/Logistics/index.d.ts +1 -0
  66. package/dist/esm/components/Logistics/index.js +10 -0
  67. package/dist/esm/components/LogisticsInterception/columnHeader.js +1 -1
  68. package/dist/esm/components/LogisticsInterception/index.d.ts +21 -0
  69. package/dist/esm/components/LogisticsInterception/index.js +30 -7
  70. package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.d.ts +45 -0
  71. package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.js +97 -0
  72. package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +3 -2
  73. package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +4 -2
  74. package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +1 -1
  75. package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
  76. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +5 -5
  77. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +9 -9
  78. package/dist/esm/components/OrderSubForm/index.d.ts +7 -0
  79. package/dist/esm/components/OrderSubForm/index.js +18 -1
  80. package/dist/esm/components/Payment/index.d.ts +13 -12
  81. package/dist/esm/components/Payment/index.js +31 -11
  82. package/dist/esm/components/PaymentVoucherCode/Preview.js +35 -9
  83. package/dist/esm/components/Picture/index.d.ts +5 -5
  84. package/dist/esm/components/Picture/index.js +20 -20
  85. package/dist/esm/components/PicturePro/PictureName.js +1 -3
  86. package/dist/esm/components/PicturePro/index.d.ts +15 -6
  87. package/dist/esm/components/PicturePro/index.js +43 -28
  88. package/dist/esm/components/PostIng/index.d.ts +5 -0
  89. package/dist/esm/components/PostIng/index.js +42 -8
  90. package/dist/esm/components/Public/AsyncSelect/index.js +4 -7
  91. package/dist/esm/components/Public/Goods/index.d.ts +10 -8
  92. package/dist/esm/components/Public/Goods/index.js +46 -2
  93. package/dist/esm/components/Public/ReissueGoods/index.js +80 -4
  94. package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
  95. package/dist/esm/components/Public/ReturnWarehouse/index.js +210 -0
  96. package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
  97. package/dist/esm/components/ReceiverAddress/index.js +43 -30
  98. package/dist/esm/components/Reissue/Logistics/index.js +2 -2
  99. package/dist/esm/components/Remark/index.d.ts +18 -2
  100. package/dist/esm/components/Remark/index.js +37 -2
  101. package/dist/esm/components/ReturnLogistics/index.d.ts +7 -6
  102. package/dist/esm/components/ReturnLogistics/index.js +34 -17
  103. package/dist/esm/components/Select/index.d.ts +1 -0
  104. package/dist/esm/components/Select/index.js +18 -11
  105. package/dist/esm/components/ShopInput/index.d.ts +5 -5
  106. package/dist/esm/components/ShopInput/index.js +12 -9
  107. package/dist/esm/components/StatusSelect/index.js +22 -2
  108. package/dist/esm/components/SubForm/children/HeaderChildFile.d.ts +30 -0
  109. package/dist/esm/components/SubForm/children/HeaderChildFile.js +117 -0
  110. package/dist/esm/components/SubForm/children/HeaderChildPic.d.ts +30 -0
  111. package/dist/esm/components/SubForm/children/HeaderChildPic.js +116 -0
  112. package/dist/esm/components/SubForm/index.js +78 -6
  113. package/dist/esm/components/TradeId/index.d.ts +6 -5
  114. package/dist/esm/components/TradeId/index.js +31 -15
  115. package/dist/esm/components/WDT/WdtGoods/index.js +2 -1
  116. package/dist/esm/components/WDT/WdtRessuie/index.js +28 -8
  117. package/dist/esm/factory.d.ts +2 -2
  118. package/dist/esm/factory.js +40 -10
  119. package/dist/esm/index.d.ts +4 -0
  120. package/dist/esm/index.js +6 -1
  121. package/dist/esm/service/api.d.ts +3 -0
  122. package/dist/esm/service/api.js +41 -14
  123. package/dist/esm/service/request.js +1 -4
  124. package/dist/esm/type.d.ts +43 -3
  125. package/package.json +4 -4
  126. package/dist/esm/components/Common/constants/gy.d.ts +0 -3
  127. package/dist/esm/components/Common/constants/gy.js +0 -219
@@ -5,8 +5,8 @@ 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 { isNull } from '@kmkf-fe-packages/kmkf-utils';
8
+ import React from "react";
9
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
10
10
  import { SYMBOL } from "../../constant";
11
11
  var InterceptSenderMobile = /*#__PURE__*/_createClass(function InterceptSenderMobile(options) {
12
12
  var _this = this;
@@ -35,7 +35,7 @@ var InterceptSenderMobile = /*#__PURE__*/_createClass(function InterceptSenderMo
35
35
  _defineProperty(this, "getComponentValue", function (r) {
36
36
  return ((r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_logisticsInterceptList")]) || []).map(function (t) {
37
37
  return t.interceptSenderMobile;
38
- }).join(',');
38
+ }).join(",");
39
39
  });
40
40
  _defineProperty(this, "renderClient", function () {
41
41
  return null;
@@ -49,7 +49,7 @@ var InterceptSenderMobile = /*#__PURE__*/_createClass(function InterceptSenderMo
49
49
  });
50
50
  _defineProperty(this, "renderExport", function (value, record) {
51
51
  var _this$getComponentVal;
52
- return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--';
52
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
53
53
  });
54
54
  _defineProperty(this, "editRender", function () {
55
55
  return null;
@@ -59,20 +59,20 @@ var InterceptSenderMobile = /*#__PURE__*/_createClass(function InterceptSenderMo
59
59
  searchDefaultConditions: SYMBOL.like,
60
60
  type: item.type,
61
61
  id: "".concat(item.id, "_logisticsInterceptList"),
62
- name: "".concat(item.name, "-\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7"),
63
- filterComponentType: 'Input'
62
+ name: "".concat(item.name, "-\u53D1\u4EF6\u4EBA/\u6536\u4EF6\u4EBA\u624B\u673A\u53F7"),
63
+ filterComponentType: "Input"
64
64
  };
65
65
  });
66
- this.name = '发件人手机号';
66
+ this.name = "发件人手机号";
67
67
  this.id = "".concat(options.id, "_interceptMobileList");
68
68
  this.companyId = "".concat(options.id);
69
69
  this.formField = "".concat(options.id);
70
70
  this.sortField = "".concat(options.id);
71
- this.dataType = 'string';
71
+ this.dataType = "string";
72
72
  this.type = options.type;
73
73
  this.componentConfig = options.componentConfig;
74
74
  this.rules = [];
75
- this.align = 'left';
75
+ this.align = "left";
76
76
  this.width = 200;
77
77
  this.isCombinationComponent = false;
78
78
  this.canSort = false;
@@ -28,7 +28,14 @@ declare class OrderSubForm implements ComponentInterface {
28
28
  expressDateInstance: InstanceType<typeof ExpressData>;
29
29
  children: ComponentInterface[];
30
30
  dataType: ComponentInterface["dataType"];
31
+ sortChildField: {
32
+ name: string;
33
+ key: string;
34
+ dataType: string;
35
+ [key: string]: any;
36
+ }[];
31
37
  constructor(options: PickOption);
38
+ getSortChildFields: () => any;
32
39
  renderTransformItem: (item: subConfigType, val: any) => any;
33
40
  getNewTableHeader: () => any;
34
41
  renderTabel: (list: any) => React.JSX.Element;
@@ -48,6 +48,19 @@ function OrderSubForm(options) {
48
48
  _defineProperty(this, "expressDateInstance", void 0);
49
49
  _defineProperty(this, "children", void 0);
50
50
  _defineProperty(this, "dataType", void 0);
51
+ _defineProperty(this, "sortChildField", void 0);
52
+ _defineProperty(this, "getSortChildFields", function () {
53
+ var orderSubformColumns = getOrderSubformColumns();
54
+ return orderSubformColumns.filter(function (item) {
55
+ return !["picUrl"].includes(item.dataIndex);
56
+ }).map(function (item) {
57
+ return {
58
+ name: item.title,
59
+ key: "".concat(_this.id, "_").concat(item.dataIndex),
60
+ dataType: "arrayObject"
61
+ };
62
+ });
63
+ });
51
64
  _defineProperty(this, "renderTransformItem", function (item, val) {
52
65
  var _getSelectWidgetMap;
53
66
  var mapValue = (_getSelectWidgetMap = getSelectWidgetMap(_this.expressDateInstance)) === null || _getSelectWidgetMap === void 0 ? void 0 : _getSelectWidgetMap[item.dataIndex];
@@ -230,10 +243,12 @@ function OrderSubForm(options) {
230
243
  if (item.widget === "upload") {
231
244
  return new BsHeaderPic(_objectSpread(_objectSpread({}, options), {}, {
232
245
  name: item.title,
246
+ width: (item === null || item === void 0 ? void 0 : item.width) || 150,
233
247
  id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex)
234
248
  }));
235
249
  } else if (item.widget === "select") {
236
250
  return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
251
+ width: (item === null || item === void 0 ? void 0 : item.width) || 150,
237
252
  name: item.title,
238
253
  id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex),
239
254
  transformValue: function transformValue(val) {
@@ -245,6 +260,7 @@ function OrderSubForm(options) {
245
260
  }));
246
261
  } else if (item.widget === "datePicker") {
247
262
  return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
263
+ width: (item === null || item === void 0 ? void 0 : item.width) || 150,
248
264
  name: item.title,
249
265
  id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex),
250
266
  transformValue: function transformValue(val) {
@@ -256,6 +272,7 @@ function OrderSubForm(options) {
256
272
  }));
257
273
  } else {
258
274
  return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
275
+ width: (item === null || item === void 0 ? void 0 : item.width) || 150,
259
276
  name: item.title,
260
277
  id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex)
261
278
  }));
@@ -263,6 +280,6 @@ function OrderSubForm(options) {
263
280
  });
264
281
  this.dataType = "object";
265
282
  this.expressDateInstance = ExpressData.getInstance();
266
- console.log("componentConfig", this.componentConfig);
283
+ this.sortChildField = this.getSortChildFields();
267
284
  });
268
285
  export default OrderSubForm;
@@ -1,19 +1,19 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
3
- import AlipayNick from "./AlipayNick";
4
- import AlipayNo from "./AlipayNo";
5
- import AlipayTime from "./AlipayTime";
6
- import BuyerNick from "./BuyerNick";
7
- import PaymentAmount from "./PaymentAmount";
8
- import PaymentStatus from "./PaymentStatus";
9
- import PaymentTid from "./PaymentTid";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
+ import AlipayNick from './AlipayNick';
4
+ import AlipayNo from './AlipayNo';
5
+ import AlipayTime from './AlipayTime';
6
+ import BuyerNick from './BuyerNick';
7
+ import PaymentAmount from './PaymentAmount';
8
+ import PaymentStatus from './PaymentStatus';
9
+ import PaymentTid from './PaymentTid';
10
10
  declare class Logistics implements ComponentInterface {
11
11
  name: string;
12
12
  id: string;
13
13
  sortField: string;
14
14
  type: string;
15
15
  rules: any[];
16
- componentConfig: ComponentInterface["componentConfig"];
16
+ componentConfig: ComponentInterface['componentConfig'];
17
17
  paymentTid: PaymentTid;
18
18
  paymentStatus: PaymentStatus;
19
19
  paymentAmount: PaymentAmount;
@@ -25,8 +25,9 @@ declare class Logistics implements ComponentInterface {
25
25
  formField: string;
26
26
  canSort: boolean;
27
27
  children: ComponentInterface[];
28
- dataType: ComponentInterface["dataType"];
29
- effects: ComponentInterface["effects"];
28
+ dataType: ComponentInterface['dataType'];
29
+ effects: ComponentInterface['effects'];
30
+ compoundConfig: ComponentInterface['compoundConfig'];
30
31
  constructor(options: PickOption);
31
32
  renderClient: (record: any, params: any) => React.JSX.Element;
32
33
  renderPc: () => null;
@@ -8,8 +8,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
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
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
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 { Payment as ApaasPayment } from "@kmkf-fe-packages/basic-components";
11
+ import React from 'react';
12
+ import { Payment as ApaasPayment } from '@kmkf-fe-packages/basic-components';
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import AlipayNick from "./AlipayNick";
15
15
  import AlipayNo from "./AlipayNo";
@@ -40,6 +40,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
40
40
  _defineProperty(this, "children", void 0);
41
41
  _defineProperty(this, "dataType", void 0);
42
42
  _defineProperty(this, "effects", void 0);
43
+ _defineProperty(this, "compoundConfig", void 0);
43
44
  _defineProperty(this, "renderClient", function (record, params) {
44
45
  return /*#__PURE__*/React.createElement(React.Fragment, null, _this.alipayNick.renderClient(record), _this.paymentAmount.renderClient(record), _this.alipayNo.renderClient(record), _this.buyerNick.renderClient(record, params), _this.paymentTid.renderClient(record), _this.paymentStatus.renderClient(record), _this.payTime.renderClient(record));
45
46
  });
@@ -104,32 +105,51 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
104
105
  validator: function validator(_, value) {
105
106
  var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9;
106
107
  if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
107
- return Promise.reject(new Error("请输入打款金额"));
108
+ return Promise.reject(new Error('请输入打款金额'));
108
109
  } else if (value !== null && value !== void 0 && value.enterprisePaymentRefundFee && !/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/.test(value === null || value === void 0 ? void 0 : value.enterprisePaymentRefundFee)) {
109
- return Promise.reject(new Error("打款金额最多2位小数"));
110
+ return Promise.reject(new Error('打款金额最多2位小数'));
110
111
  }
111
112
  if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
112
- return Promise.reject(new Error("请输入订单编号"));
113
+ return Promise.reject(new Error('请输入订单编号'));
113
114
  } else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
114
- return Promise.reject(new Error("请输入正确的订单编号"));
115
+ return Promise.reject(new Error('请输入正确的订单编号'));
115
116
  }
116
117
  if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
117
- return Promise.reject(new Error("请输入支付宝名称"));
118
+ return Promise.reject(new Error('请输入支付宝名称'));
118
119
  }
119
120
  if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 && _this$componentConfig9.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
120
- return Promise.reject(new Error("请输入支付宝账号"));
121
+ return Promise.reject(new Error('请输入支付宝账号'));
121
122
  } else if (value.enterprisePaymentAlipayNo && !/^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/.test(value.enterprisePaymentAlipayNo)) {
122
- return Promise.reject(new Error("请输入正确的支付宝账号格式"));
123
+ return Promise.reject(new Error('请输入正确的支付宝账号格式'));
123
124
  }
124
125
  //支付宝信息不能只填一个,否则不能打款
125
126
  if (value !== null && value !== void 0 && value.enterprisePaymentAlipayNick || value !== null && value !== void 0 && value.enterprisePaymentAlipayNo) {
126
127
  if (!(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick && value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
127
- return Promise.reject(new Error("支付宝姓名/账号都要填写"));
128
+ return Promise.reject(new Error('支付宝姓名/账号都要填写'));
128
129
  }
129
130
  }
130
131
  return Promise.resolve();
131
132
  }
132
133
  }];
133
- this.dataType = "object";
134
+ this.dataType = 'object';
135
+ this.compoundConfig = [{
136
+ name: "\u8BA2\u5355\u7F16\u53F7",
137
+ id: "".concat(options.id, "_enterprisePaymentTid")
138
+ }, {
139
+ name: "\u6253\u6B3E\u91D1\u989D",
140
+ id: "".concat(options.id, "_enterprisePaymentRefundFee")
141
+ }, {
142
+ name: "\u4E70\u5BB6\u6635\u79F0",
143
+ id: "".concat(options.id, "_enterprisePaymentBuyerNick")
144
+ }, {
145
+ name: "\u652F\u4ED8\u5B9D\u59D3\u540D",
146
+ id: "".concat(options.id, "_enterprisePaymentAlipayNick")
147
+ }, {
148
+ name: "\u652F\u4ED8\u5B9D\u8D26\u53F7",
149
+ id: "".concat(options.id, "_enterprisePaymentAlipayNo")
150
+ }, {
151
+ name: "\u6253\u6B3E\u72B6\u6001",
152
+ id: "".concat(options.id, "_enterprisePaymentStatus")
153
+ }];
134
154
  });
135
155
  export default Logistics;
@@ -27,6 +27,10 @@ var Preview = function Preview(_ref) {
27
27
  }),
28
28
  _usePdf2 = _slicedToArray(_usePdf, 1),
29
29
  loading = _usePdf2[0];
30
+ var copyUrl = function copyUrl() {
31
+ copy(url);
32
+ message.success("复制图片链接成功");
33
+ };
30
34
  var copyHandle = /*#__PURE__*/function () {
31
35
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
32
36
  var _yield$navigator$perm, state;
@@ -43,9 +47,28 @@ var Preview = function Preview(_ref) {
43
47
  state = _yield$navigator$perm.state;
44
48
  if (state == "granted") {
45
49
  html2canvas(canvasEl === null || canvasEl === void 0 ? void 0 : canvasEl.current, {
46
- useCORS: true
50
+ useCORS: true,
51
+ // scale: 2,
52
+ width: 595,
53
+ height: 455,
54
+ onclone: function onclone(clonedDoc) {
55
+ var _clonedDoc$querySelec;
56
+ var ctx = (_clonedDoc$querySelec = clonedDoc.querySelector("canvas")) === null || _clonedDoc$querySelec === void 0 ? void 0 : _clonedDoc$querySelec.getContext("2d");
57
+ if (ctx) {
58
+ ctx.mozImageSmoothingEnabled = false;
59
+ ctx.webkitImageSmoothingEnabled = false;
60
+ ctx.msImageSmoothingEnabled = false;
61
+ ctx.imageSmoothingEnabled = false;
62
+ }
63
+ }
47
64
  }).then(function (canvas) {
48
- var imgUrl = canvas.toDataURL("image/png");
65
+ var scale = window.devicePixelRatio || 1;
66
+ canvas.style.width = "".concat(canvas.width / scale, "px"); // [citation:1][citation:6]
67
+ canvas.style.height = "".concat(canvas.height / scale, "px");
68
+
69
+ // 将Canvas插入页面或转换为图片
70
+ // document.body.appendChild(canvas);
71
+ var imgUrl = canvas.toDataURL("image/png", 1.0);
49
72
  var str = imgUrl.replace(/data:image\/png;base64,/, "");
50
73
  var file = b64toBlob(str, "image/png");
51
74
  var clipboardItemInput = new window.ClipboardItem({
@@ -55,17 +78,15 @@ var Preview = function Preview(_ref) {
55
78
  message.success("复制图片成功");
56
79
  });
57
80
  } else {
58
- copy(url);
59
- message.success("复制图片链接成功");
81
+ copyUrl();
60
82
  }
61
- _context.next = 12;
83
+ _context.next = 11;
62
84
  break;
63
85
  case 8:
64
86
  _context.prev = 8;
65
87
  _context.t0 = _context["catch"](0);
66
- copy(url);
67
- message.success("复制图片链接成功");
68
- case 12:
88
+ copyUrl();
89
+ case 11:
69
90
  case "end":
70
91
  return _context.stop();
71
92
  }
@@ -78,7 +99,12 @@ var Preview = function Preview(_ref) {
78
99
  return /*#__PURE__*/React.createElement("div", null, !loading && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
79
100
  type: "link",
80
101
  onClick: copyHandle
81
- }, "\u590D\u5236\u51ED\u8BC1")), /*#__PURE__*/React.createElement("canvas", {
102
+ }, "\u590D\u5236\u51ED\u8BC1"), /*#__PURE__*/React.createElement(Button, {
103
+ type: "link",
104
+ onClick: function onClick() {
105
+ return copyUrl();
106
+ }
107
+ }, "\u590D\u5236\u94FE\u63A5")), /*#__PURE__*/React.createElement("canvas", {
82
108
  ref: canvasEl
83
109
  }));
84
110
  };
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, Record } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import React from 'react';
3
3
  declare type Value = string[] | undefined;
4
4
  declare class BasicPicture implements ComponentInterface {
5
5
  name: string;
@@ -7,13 +7,13 @@ declare class BasicPicture implements ComponentInterface {
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface["componentConfig"];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
16
- currenEnv: ComponentInterface["platform"];
15
+ dataType: ComponentInterface['dataType'];
16
+ currenEnv: ComponentInterface['platform'];
17
17
  constructor(options: PickOption);
18
18
  formatPictures: (pictures: string) => string[];
19
19
  render: (value: Value) => React.JSX.Element | null;
@@ -6,13 +6,13 @@ 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 { Image } from "antd";
11
- import { ApaasUploadAsync, ApaasUpload } from "@kmkf-fe-packages/basic-components";
12
- import { imgResize } from "@kmkf-fe-packages/kmkf-utils";
9
+ import React from 'react';
10
+ import { Image } from 'antd';
11
+ import { ApaasUploadAsync, ApaasUpload } from '@kmkf-fe-packages/basic-components';
12
+ import { imgResize } from '@kmkf-fe-packages/kmkf-utils';
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
16
16
  import { hostUrl } from "../../constant";
17
17
  var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
18
18
  var _this = this,
@@ -31,9 +31,9 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
31
31
  _defineProperty(this, "dataType", void 0);
32
32
  _defineProperty(this, "currenEnv", void 0);
33
33
  _defineProperty(this, "formatPictures", function (pictures) {
34
- pictures = pictures.replace(/[\[\]]/g, "");
35
- pictures = pictures.replace(/\s/g, "");
36
- return pictures ? pictures.split(",") : [];
34
+ pictures = pictures.replace(/[\[\]]/g, '');
35
+ pictures = pictures.replace(/\s/g, '');
36
+ return pictures ? pictures.split(',') : [];
37
37
  });
38
38
  _defineProperty(this, "render", function (value) {
39
39
  var _document;
@@ -41,20 +41,20 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
41
41
  return null;
42
42
  }
43
43
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
44
- preview: _this.currenEnv === "ks" ? {
45
- getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById("root")
44
+ preview: _this.currenEnv === 'ks' ? {
45
+ getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
46
46
  } : true
47
47
  }, value === null || value === void 0 ? void 0 : value.map(function (pic) {
48
48
  return /*#__PURE__*/React.createElement("div", {
49
49
  style: {
50
- marginRight: "5px",
51
- display: "inline-block"
50
+ marginRight: '5px',
51
+ display: 'inline-block'
52
52
  }
53
53
  }, /*#__PURE__*/React.createElement(Image, {
54
54
  width: 32,
55
- src: imgResize(pic || ""),
55
+ src: imgResize(pic || ''),
56
56
  preview: {
57
- src: imgResize(pic || "", 0, 0)
57
+ src: imgResize(pic || '', 0, 0)
58
58
  }
59
59
  }));
60
60
  })));
@@ -64,13 +64,13 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
64
64
  return /*#__PURE__*/React.createElement("span", null, "--");
65
65
  }
66
66
  var finalPictures = _this.formatPictures(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_picture")]).map(function (item) {
67
- return item.startsWith("http") ? item : "".concat(hostUrl, "/").concat(item);
67
+ return item.startsWith('http') ? item : "".concat(hostUrl, "/").concat(item);
68
68
  });
69
69
  return /*#__PURE__*/React.createElement(Image.PreviewGroup, null, finalPictures === null || finalPictures === void 0 ? void 0 : finalPictures.map(function (pic) {
70
70
  return /*#__PURE__*/React.createElement("div", {
71
71
  style: {
72
- marginRight: "5px",
73
- display: "inline-block"
72
+ marginRight: '5px',
73
+ display: 'inline-block'
74
74
  },
75
75
  onClick: function onClick(e) {
76
76
  return e.stopPropagation();
@@ -107,9 +107,9 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
107
107
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
108
108
  display: p === null || p === void 0 ? void 0 : p.display,
109
109
  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,
110
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
110
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
111
111
  component: (_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.isSingleShop ? /*#__PURE__*/React.createElement(ApaasUpload, _this.componentConfig) : /*#__PURE__*/React.createElement(ApaasUploadAsync, _extends({}, _this.componentConfig, {
112
- uniqueKey: _this.id,
112
+ uniqueKey: 'picture',
113
113
  hostUrl: hostUrl,
114
114
  platform: _this.currenEnv
115
115
  }))
@@ -131,7 +131,7 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
131
131
  this.isCombinationComponent = false;
132
132
  this.canSort = true;
133
133
  this.children = [];
134
- this.dataType = "string";
134
+ this.dataType = 'string';
135
135
  this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
136
136
  });
137
137
  export default BasicPicture;
@@ -74,9 +74,7 @@ var PictureName = /*#__PURE__*/_createClass(function PictureName(options) {
74
74
  document.body.removeChild(a);
75
75
  window.URL.revokeObjectURL(url);
76
76
  });
77
- } catch (error) {
78
- console.error(error);
79
- }
77
+ } catch (error) {}
80
78
  };
81
79
  return /*#__PURE__*/React.createElement(Space, {
82
80
  className: "pictruePc"
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, Record } from "../../type";
2
- import React from "react";
3
- import "./index.less";
1
+ import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import React from 'react';
3
+ import './index.less';
4
4
  declare type Value = {
5
5
  url: string;
6
6
  name: string;
@@ -11,15 +11,24 @@ declare class BasicPicturePro implements ComponentInterface {
11
11
  sortField: string;
12
12
  type: string;
13
13
  rules: any[];
14
- componentConfig: ComponentInterface["componentConfig"];
14
+ componentConfig: ComponentInterface['componentConfig'];
15
15
  isCombinationComponent: boolean;
16
16
  formField: string;
17
17
  canSort: boolean;
18
18
  children: ComponentInterface[];
19
- dataType: ComponentInterface["dataType"];
20
- currenEnv: ComponentInterface["platform"];
19
+ dataType: ComponentInterface['dataType'];
20
+ currenEnv: ComponentInterface['platform'];
21
+ sortChildField: {
22
+ name: string;
23
+ key: string;
24
+ dataType: string;
25
+ [key: string]: any;
26
+ }[];
27
+ exampleValue?: string;
28
+ standardDateType: ComponentInterface['standardDateType'];
21
29
  constructor(options: PickOption);
22
30
  formatPictures: (pictures: string) => string[];
31
+ getSortChildFields: () => any;
23
32
  render: (value: Value) => React.JSX.Element | null;
24
33
  renderPc: () => null;
25
34
  renderLog: (r: Record) => React.JSX.Element | null;