@kmkf-fe-packages/basic-components 2.0.72 → 2.0.73

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.
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
2
2
  import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton } from 'antd';
3
- import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
3
+ import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled, VideoCameraTwoTone } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
6
  import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
@@ -7722,7 +7722,8 @@ var Province = function Province(props) {
7722
7722
  workOrder: AddressData.getInstance(),
7723
7723
  bs: BsAddressData.getInstance(),
7724
7724
  wdt: WdtAddressData.getInstance(),
7725
- gy: GyAddressData.getInstance()
7725
+ gy: GyAddressData.getInstance(),
7726
+ km: AddressData.getInstance()
7726
7727
  };
7727
7728
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7728
7729
  options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
@@ -7828,6 +7829,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7828
7829
  bs: BsAddressData,
7829
7830
  wdt: WdtAddressData,
7830
7831
  gy: GyAddressData,
7832
+ km: AddressData,
7831
7833
  workOrder: AddressData
7832
7834
  }[type] || AddressData).getInstance();
7833
7835
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
@@ -18084,6 +18086,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
18084
18086
  deliveryState: item.deliveryState,
18085
18087
  vipCode: item.vipCode,
18086
18088
  shopCode: item.shopCode,
18089
+ cancelName: item.cancel ? '是' : '否',
18087
18090
  deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
18088
18091
  });
18089
18092
  });
@@ -18202,7 +18205,7 @@ var kmUtils = {
18202
18205
  getOrderListSingleton: getOrderListSingleton
18203
18206
  };
18204
18207
 
18205
- var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
18208
+ var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
18206
18209
  var columnsMap = {
18207
18210
  BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
18208
18211
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
@@ -18477,6 +18480,7 @@ var index$3 = (function (props) {
18477
18480
  deliveryState = _ref10.deliveryState,
18478
18481
  vipCode = _ref10.vipCode,
18479
18482
  shopCode = _ref10.shopCode,
18483
+ cancel = _ref10.cancel,
18480
18484
  rest = _objectWithoutProperties(_ref10, _excluded$h);
18481
18485
  return _objectSpread2(_objectSpread2({}, rest), {}, {
18482
18486
  billNo: billNo,
@@ -18484,6 +18488,7 @@ var index$3 = (function (props) {
18484
18488
  billTag: billTag,
18485
18489
  tradeTagName: tradeTagName,
18486
18490
  deliveryState: deliveryState,
18491
+ cancelName: cancel ? '是' : '否',
18487
18492
  deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
18488
18493
  vipCode: vipCode,
18489
18494
  shopCode: shopCode
@@ -19712,7 +19717,7 @@ var PublicReissue = function PublicReissue(props) {
19712
19717
  sysOrderNo: val
19713
19718
  });
19714
19719
  }
19715
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19720
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
19716
19721
  };
19717
19722
  //显示选择商品按钮
19718
19723
  var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]);
@@ -20353,6 +20358,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
20353
20358
  var _props$value = props.value,
20354
20359
  value = _props$value === void 0 ? [] : _props$value,
20355
20360
  onChange = props.onChange,
20361
+ onBlur = props.onBlur,
20356
20362
  disabled = props.disabled,
20357
20363
  _props$type = props.type,
20358
20364
  type = _props$type === void 0 ? 1 : _props$type;
@@ -20434,6 +20440,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
20434
20440
  onChange: function onChange(e) {
20435
20441
  return changeInputHandle(e.target.value, 'billNo');
20436
20442
  },
20443
+ onBlur: onBlur,
20437
20444
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
20438
20445
  })) : null) : null);
20439
20446
  };
@@ -20865,6 +20872,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
20865
20872
  })));
20866
20873
  };
20867
20874
 
20875
+ var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
20876
+ var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
20877
+ styleInject(css_248z$c);
20878
+
20868
20879
  var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
20869
20880
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
20870
20881
  var typeMap$4 = {
@@ -21101,10 +21112,10 @@ var GyReissue = function GyReissue(props) {
21101
21112
  }, /*#__PURE__*/React.createElement(Col, {
21102
21113
  className: "gutter-row",
21103
21114
  xs: {
21104
- span: 11
21115
+ span: 12
21105
21116
  },
21106
21117
  sm: {
21107
- span: 6
21118
+ span: 8
21108
21119
  }
21109
21120
  }, /*#__PURE__*/React.createElement(Select, {
21110
21121
  style: {
@@ -21120,14 +21131,16 @@ var GyReissue = function GyReissue(props) {
21120
21131
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
21121
21132
  }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.showOrderInfo) || []).map(function (item) {
21122
21133
  return /*#__PURE__*/React.createElement(Select.Option, {
21134
+ className: styles$5.systemNoDisabled,
21123
21135
  key: item.billNo,
21124
21136
  value: item.billNo,
21125
- label: item.billNo
21126
- }, item.billNo);
21137
+ label: item.billNo,
21138
+ disabled: item.cancel
21139
+ }, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
21127
21140
  }))), /*#__PURE__*/React.createElement(Col, {
21128
21141
  className: "gutter-row",
21129
21142
  xs: {
21130
- span: 11
21143
+ span: 12
21131
21144
  },
21132
21145
  sm: {
21133
21146
  span: 6
@@ -21394,10 +21407,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
21394
21407
  }, /*#__PURE__*/React.createElement(Col, {
21395
21408
  className: "gutter-row",
21396
21409
  xs: {
21397
- span: 11
21410
+ span: 12
21398
21411
  },
21399
21412
  sm: {
21400
- span: 6
21413
+ span: 8
21401
21414
  }
21402
21415
  }, /*#__PURE__*/React.createElement(Select, {
21403
21416
  style: {
@@ -21413,14 +21426,16 @@ var GyReturnGoods = function GyReturnGoods(props) {
21413
21426
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
21414
21427
  }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
21415
21428
  return /*#__PURE__*/React.createElement(Select.Option, {
21429
+ className: styles$5.systemNoDisabled,
21416
21430
  key: item.billNo,
21417
21431
  value: item.billNo,
21418
- label: item.billNo
21419
- }, item.billNo);
21432
+ label: item.billNo,
21433
+ disabled: item === null || item === void 0 ? void 0 : item.cancel
21434
+ }, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
21420
21435
  }))), /*#__PURE__*/React.createElement(Col, {
21421
21436
  className: "gutter-row",
21422
21437
  xs: {
21423
- span: 11
21438
+ span: 12
21424
21439
  },
21425
21440
  sm: {
21426
21441
  span: 6
@@ -21462,4 +21477,247 @@ var GyReturnGoods = function GyReturnGoods(props) {
21462
21477
  })));
21463
21478
  };
21464
21479
 
21465
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
21480
+ var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
21481
+ var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
21482
+ styleInject(css_248z$d);
21483
+
21484
+ var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
21485
+ var Dragger$1 = Upload.Dragger;
21486
+ var fn$4 = function fn() {
21487
+ return void 0;
21488
+ };
21489
+ var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
21490
+ var KmVideo = function KmVideo(_ref) {
21491
+ var _ref$maxCount = _ref.maxCount,
21492
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
21493
+ _ref$maxSize = _ref.maxSize,
21494
+ maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
21495
+ _ref$onChange = _ref.onChange,
21496
+ onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
21497
+ _ref$value = _ref.value,
21498
+ value = _ref$value === void 0 ? [] : _ref$value,
21499
+ _ref$disabled = _ref.disabled,
21500
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21501
+ _ref$hostUrl = _ref.hostUrl,
21502
+ hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
21503
+ _ref$canDownload = _ref.canDownload,
21504
+ canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
21505
+ _ref$actionUrl = _ref.actionUrl,
21506
+ actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
21507
+ resetProps = _objectWithoutProperties(_ref, _excluded$r);
21508
+ var _useState = useState(false),
21509
+ _useState2 = _slicedToArray(_useState, 2),
21510
+ visible = _useState2[0],
21511
+ setVisible = _useState2[1];
21512
+ var _useState3 = useState(''),
21513
+ _useState4 = _slicedToArray(_useState3, 2),
21514
+ fileUrl = _useState4[0],
21515
+ setFileUrl = _useState4[1];
21516
+ var _useState5 = useState(''),
21517
+ _useState6 = _slicedToArray(_useState5, 2),
21518
+ fileType = _useState6[0],
21519
+ setFileType = _useState6[1];
21520
+ var _useState7 = useState(''),
21521
+ _useState8 = _slicedToArray(_useState7, 2),
21522
+ fileName = _useState8[0],
21523
+ setFileName = _useState8[1];
21524
+ var valueRef = useRef(value);
21525
+ var uploadCount = useRef(0);
21526
+ var _useState9 = useState(false),
21527
+ _useState10 = _slicedToArray(_useState9, 2),
21528
+ uploading = _useState10[0],
21529
+ setUploading = _useState10[1];
21530
+ var fileList = useMemo(function () {
21531
+ return value.map(function (t, i) {
21532
+ return _objectSpread2(_objectSpread2({}, t), {}, {
21533
+ percent: 100,
21534
+ uid: i + ''
21535
+ });
21536
+ });
21537
+ }, [value]);
21538
+ useEffect(function () {
21539
+ valueRef.current = value;
21540
+ }, [value]);
21541
+ var asyncUpload = /*#__PURE__*/function () {
21542
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
21543
+ var formData, fileName, _yield$request, success, data;
21544
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
21545
+ while (1) switch (_context.prev = _context.next) {
21546
+ case 0:
21547
+ setUploading(true);
21548
+ uploadCount.current++;
21549
+ formData = new FormData();
21550
+ formData.append('file', file);
21551
+ fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
21552
+ formData.append('fileName', fileName);
21553
+ _context.prev = 6;
21554
+ _context.next = 9;
21555
+ return request(actionUrl, {
21556
+ method: 'post',
21557
+ body: formData
21558
+ });
21559
+ case 9:
21560
+ _yield$request = _context.sent;
21561
+ success = _yield$request.success;
21562
+ data = _yield$request.data;
21563
+ if (success) {
21564
+ handleChange([].concat(_toConsumableArray(valueRef.current), [{
21565
+ kmVideoName: file.name,
21566
+ kmVideoUrl: "".concat(hostUrl, "/").concat(data)
21567
+ }]));
21568
+ }
21569
+ _context.next = 18;
21570
+ break;
21571
+ case 15:
21572
+ _context.prev = 15;
21573
+ _context.t0 = _context["catch"](6);
21574
+ message.error('文件上传失败');
21575
+ case 18:
21576
+ _context.prev = 18;
21577
+ uploadCount.current--;
21578
+ if (uploadCount.current < 1) {
21579
+ setUploading(false);
21580
+ }
21581
+ return _context.finish(18);
21582
+ case 22:
21583
+ case "end":
21584
+ return _context.stop();
21585
+ }
21586
+ }, _callee, null, [[6, 15, 18, 22]]);
21587
+ }));
21588
+ return function asyncUpload(_x) {
21589
+ return _ref2.apply(this, arguments);
21590
+ };
21591
+ }();
21592
+ var download = function download(url, name) {
21593
+ if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
21594
+ window.open(url);
21595
+ return;
21596
+ }
21597
+ fetch(url).then(function (res) {
21598
+ return res.blob();
21599
+ }).then(function (blob) {
21600
+ var a = document.createElement('a');
21601
+ document.body.appendChild(a);
21602
+ a.style.display = 'none';
21603
+ var url = window.URL.createObjectURL(blob);
21604
+ a.href = url;
21605
+ a.download = name;
21606
+ a.click();
21607
+ document.body.removeChild(a);
21608
+ window.URL.revokeObjectURL(url);
21609
+ });
21610
+ };
21611
+ var handleChange = function handleChange(list) {
21612
+ valueRef.current = list;
21613
+ onChange(list);
21614
+ };
21615
+ // 手动上传模式, 一直返回false
21616
+ var beforeUpload = function beforeUpload(file, fileList) {
21617
+ // console.log('beforeUpload', file);
21618
+ var size = file.size / 1024 / 1024 < maxSize;
21619
+ // TODO: 批量提交的时候
21620
+ if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
21621
+ message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
21622
+ return Upload.LIST_IGNORE;
21623
+ }
21624
+ if (!size) {
21625
+ message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
21626
+ return Upload.LIST_IGNORE;
21627
+ }
21628
+ asyncUpload(file);
21629
+ return Upload.LIST_IGNORE;
21630
+ };
21631
+ var onRemove = function onRemove(file) {
21632
+ var newValue = value.filter(function (item) {
21633
+ return item.kmVideoUrl !== file.kmVideoUrl;
21634
+ });
21635
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
21636
+ };
21637
+ var onPreview = function onPreview(file) {
21638
+ var _file$url;
21639
+ var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
21640
+ var fileType = fileArr[fileArr.length - 1];
21641
+ if (videoSuffixList.includes(fileType.toLowerCase())) {
21642
+ setFileUrl(file === null || file === void 0 ? void 0 : file.url);
21643
+ setFileName(file === null || file === void 0 ? void 0 : file.name);
21644
+ setFileType('video');
21645
+ setVisible(true);
21646
+ } else {
21647
+ window.open(file === null || file === void 0 ? void 0 : file.url);
21648
+ }
21649
+ };
21650
+ var handleCancel = function handleCancel() {
21651
+ setFileUrl('');
21652
+ setFileName('');
21653
+ setVisible(false);
21654
+ };
21655
+ return /*#__PURE__*/React.createElement(Spin, {
21656
+ spinning: uploading
21657
+ }, /*#__PURE__*/React.createElement("p", {
21658
+ className: styles$6.tips
21659
+ }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React.createElement("div", {
21660
+ className: styles$6.imageBox
21661
+ }, /*#__PURE__*/React.createElement(Dragger$1, _objectSpread2({
21662
+ disabled: disabled,
21663
+ multiple: true,
21664
+ name: "file",
21665
+ maxCount: maxCount,
21666
+ beforeUpload: beforeUpload,
21667
+ onPreview: onPreview,
21668
+ fileList: fileList.map(function (item) {
21669
+ return _objectSpread2(_objectSpread2({}, item), {}, {
21670
+ url: item.kmVideoUrl,
21671
+ name: item.kmVideoName
21672
+ });
21673
+ }),
21674
+ onRemove: onRemove,
21675
+ accept: ".".concat(videoSuffixList.join(',.')),
21676
+ iconRender: function iconRender(file) {
21677
+ return /*#__PURE__*/React.createElement(Space, {
21678
+ align: "center"
21679
+ }, /*#__PURE__*/React.createElement(VideoCameraTwoTone, {
21680
+ style: {
21681
+ fontSize: 16
21682
+ }
21683
+ }), file.kmVideoType && "".concat(file.kmVideoType));
21684
+ }
21685
+ }, resetProps), /*#__PURE__*/React.createElement("span", {
21686
+ className: styles$6.addBtn
21687
+ }, "+"), /*#__PURE__*/React.createElement("p", {
21688
+ className: styles$6.addBtn
21689
+ }, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React.createElement(Modal, {
21690
+ visible: visible,
21691
+ title: fileName,
21692
+ footer: null,
21693
+ onCancel: handleCancel
21694
+ }, canDownload ? /*#__PURE__*/React.createElement(Button, {
21695
+ type: "link",
21696
+ onClick: function onClick() {
21697
+ return download(fileUrl, fileName);
21698
+ }
21699
+ }, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
21700
+ text: fileUrl,
21701
+ onCopy: function onCopy() {
21702
+ message.success('复制成功');
21703
+ }
21704
+ }, /*#__PURE__*/React.createElement(Button, {
21705
+ type: "link"
21706
+ }, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
21707
+ alt: "example",
21708
+ style: {
21709
+ width: '100%'
21710
+ },
21711
+ src: fileUrl
21712
+ }) : /*#__PURE__*/React.createElement("video", {
21713
+ style: {
21714
+ width: '100%',
21715
+ height: '100%'
21716
+ },
21717
+ autoPlay: true,
21718
+ controls: true,
21719
+ src: fileUrl
21720
+ }))));
21721
+ };
21722
+
21723
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
package/dist/index.js CHANGED
@@ -7734,7 +7734,8 @@ var Province = function Province(props) {
7734
7734
  workOrder: kmkfUtils.AddressData.getInstance(),
7735
7735
  bs: kmkfUtils.BsAddressData.getInstance(),
7736
7736
  wdt: kmkfUtils.WdtAddressData.getInstance(),
7737
- gy: kmkfUtils.GyAddressData.getInstance()
7737
+ gy: kmkfUtils.GyAddressData.getInstance(),
7738
+ km: kmkfUtils.AddressData.getInstance()
7738
7739
  };
7739
7740
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7740
7741
  options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
@@ -7840,6 +7841,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7840
7841
  bs: kmkfUtils.BsAddressData,
7841
7842
  wdt: kmkfUtils.WdtAddressData,
7842
7843
  gy: kmkfUtils.GyAddressData,
7844
+ km: kmkfUtils.AddressData,
7843
7845
  workOrder: kmkfUtils.AddressData
7844
7846
  }[type] || kmkfUtils.AddressData).getInstance();
7845
7847
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
@@ -18096,6 +18098,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
18096
18098
  deliveryState: item.deliveryState,
18097
18099
  vipCode: item.vipCode,
18098
18100
  shopCode: item.shopCode,
18101
+ cancelName: item.cancel ? '是' : '否',
18099
18102
  deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[item.deliveryState]
18100
18103
  });
18101
18104
  });
@@ -18214,7 +18217,7 @@ var kmUtils = {
18214
18217
  getOrderListSingleton: getOrderListSingleton
18215
18218
  };
18216
18219
 
18217
- var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
18220
+ var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
18218
18221
  var columnsMap = {
18219
18222
  BS_SYSTEM_ORDER: kmkfUtils.BS_SYSTEM_ORDER_CONFIG.columns,
18220
18223
  KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
@@ -18489,6 +18492,7 @@ var index$3 = (function (props) {
18489
18492
  deliveryState = _ref10.deliveryState,
18490
18493
  vipCode = _ref10.vipCode,
18491
18494
  shopCode = _ref10.shopCode,
18495
+ cancel = _ref10.cancel,
18492
18496
  rest = _objectWithoutProperties(_ref10, _excluded$h);
18493
18497
  return _objectSpread2(_objectSpread2({}, rest), {}, {
18494
18498
  billNo: billNo,
@@ -18496,6 +18500,7 @@ var index$3 = (function (props) {
18496
18500
  billTag: billTag,
18497
18501
  tradeTagName: tradeTagName,
18498
18502
  deliveryState: deliveryState,
18503
+ cancelName: cancel ? '是' : '否',
18499
18504
  deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState],
18500
18505
  vipCode: vipCode,
18501
18506
  shopCode: shopCode
@@ -19724,7 +19729,7 @@ var PublicReissue = function PublicReissue(props) {
19724
19729
  sysOrderNo: val
19725
19730
  });
19726
19731
  }
19727
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19732
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
19728
19733
  };
19729
19734
  //显示选择商品按钮
19730
19735
  var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]);
@@ -20365,6 +20370,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
20365
20370
  var _props$value = props.value,
20366
20371
  value = _props$value === void 0 ? [] : _props$value,
20367
20372
  onChange = props.onChange,
20373
+ onBlur = props.onBlur,
20368
20374
  disabled = props.disabled,
20369
20375
  _props$type = props.type,
20370
20376
  type = _props$type === void 0 ? 1 : _props$type;
@@ -20446,6 +20452,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
20446
20452
  onChange: function onChange(e) {
20447
20453
  return changeInputHandle(e.target.value, 'billNo');
20448
20454
  },
20455
+ onBlur: onBlur,
20449
20456
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
20450
20457
  })) : null) : null);
20451
20458
  };
@@ -20877,6 +20884,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
20877
20884
  })));
20878
20885
  };
20879
20886
 
20887
+ var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
20888
+ var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
20889
+ styleInject(css_248z$c);
20890
+
20880
20891
  var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
20881
20892
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
20882
20893
  var typeMap$4 = {
@@ -21113,10 +21124,10 @@ var GyReissue = function GyReissue(props) {
21113
21124
  }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
21114
21125
  className: "gutter-row",
21115
21126
  xs: {
21116
- span: 11
21127
+ span: 12
21117
21128
  },
21118
21129
  sm: {
21119
- span: 6
21130
+ span: 8
21120
21131
  }
21121
21132
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
21122
21133
  style: {
@@ -21132,14 +21143,16 @@ var GyReissue = function GyReissue(props) {
21132
21143
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
21133
21144
  }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.showOrderInfo) || []).map(function (item) {
21134
21145
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
21146
+ className: styles$5.systemNoDisabled,
21135
21147
  key: item.billNo,
21136
21148
  value: item.billNo,
21137
- label: item.billNo
21138
- }, item.billNo);
21149
+ label: item.billNo,
21150
+ disabled: item.cancel
21151
+ }, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
21139
21152
  }))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
21140
21153
  className: "gutter-row",
21141
21154
  xs: {
21142
- span: 11
21155
+ span: 12
21143
21156
  },
21144
21157
  sm: {
21145
21158
  span: 6
@@ -21406,10 +21419,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
21406
21419
  }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
21407
21420
  className: "gutter-row",
21408
21421
  xs: {
21409
- span: 11
21422
+ span: 12
21410
21423
  },
21411
21424
  sm: {
21412
- span: 6
21425
+ span: 8
21413
21426
  }
21414
21427
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
21415
21428
  style: {
@@ -21425,14 +21438,16 @@ var GyReturnGoods = function GyReturnGoods(props) {
21425
21438
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
21426
21439
  }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
21427
21440
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
21441
+ className: styles$5.systemNoDisabled,
21428
21442
  key: item.billNo,
21429
21443
  value: item.billNo,
21430
- label: item.billNo
21431
- }, item.billNo);
21444
+ label: item.billNo,
21445
+ disabled: item === null || item === void 0 ? void 0 : item.cancel
21446
+ }, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
21432
21447
  }))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
21433
21448
  className: "gutter-row",
21434
21449
  xs: {
21435
- span: 11
21450
+ span: 12
21436
21451
  },
21437
21452
  sm: {
21438
21453
  span: 6
@@ -21474,6 +21489,249 @@ var GyReturnGoods = function GyReturnGoods(props) {
21474
21489
  })));
21475
21490
  };
21476
21491
 
21492
+ var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
21493
+ var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
21494
+ styleInject(css_248z$d);
21495
+
21496
+ var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
21497
+ var Dragger$1 = antd.Upload.Dragger;
21498
+ var fn$4 = function fn() {
21499
+ return void 0;
21500
+ };
21501
+ var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
21502
+ var KmVideo = function KmVideo(_ref) {
21503
+ var _ref$maxCount = _ref.maxCount,
21504
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
21505
+ _ref$maxSize = _ref.maxSize,
21506
+ maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
21507
+ _ref$onChange = _ref.onChange,
21508
+ onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
21509
+ _ref$value = _ref.value,
21510
+ value = _ref$value === void 0 ? [] : _ref$value,
21511
+ _ref$disabled = _ref.disabled,
21512
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21513
+ _ref$hostUrl = _ref.hostUrl,
21514
+ hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
21515
+ _ref$canDownload = _ref.canDownload,
21516
+ canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
21517
+ _ref$actionUrl = _ref.actionUrl,
21518
+ actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
21519
+ resetProps = _objectWithoutProperties(_ref, _excluded$r);
21520
+ var _useState = React.useState(false),
21521
+ _useState2 = _slicedToArray(_useState, 2),
21522
+ visible = _useState2[0],
21523
+ setVisible = _useState2[1];
21524
+ var _useState3 = React.useState(''),
21525
+ _useState4 = _slicedToArray(_useState3, 2),
21526
+ fileUrl = _useState4[0],
21527
+ setFileUrl = _useState4[1];
21528
+ var _useState5 = React.useState(''),
21529
+ _useState6 = _slicedToArray(_useState5, 2),
21530
+ fileType = _useState6[0],
21531
+ setFileType = _useState6[1];
21532
+ var _useState7 = React.useState(''),
21533
+ _useState8 = _slicedToArray(_useState7, 2),
21534
+ fileName = _useState8[0],
21535
+ setFileName = _useState8[1];
21536
+ var valueRef = React.useRef(value);
21537
+ var uploadCount = React.useRef(0);
21538
+ var _useState9 = React.useState(false),
21539
+ _useState10 = _slicedToArray(_useState9, 2),
21540
+ uploading = _useState10[0],
21541
+ setUploading = _useState10[1];
21542
+ var fileList = React.useMemo(function () {
21543
+ return value.map(function (t, i) {
21544
+ return _objectSpread2(_objectSpread2({}, t), {}, {
21545
+ percent: 100,
21546
+ uid: i + ''
21547
+ });
21548
+ });
21549
+ }, [value]);
21550
+ React.useEffect(function () {
21551
+ valueRef.current = value;
21552
+ }, [value]);
21553
+ var asyncUpload = /*#__PURE__*/function () {
21554
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
21555
+ var formData, fileName, _yield$request, success, data;
21556
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
21557
+ while (1) switch (_context.prev = _context.next) {
21558
+ case 0:
21559
+ setUploading(true);
21560
+ uploadCount.current++;
21561
+ formData = new FormData();
21562
+ formData.append('file', file);
21563
+ fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
21564
+ formData.append('fileName', fileName);
21565
+ _context.prev = 6;
21566
+ _context.next = 9;
21567
+ return request__default['default'](actionUrl, {
21568
+ method: 'post',
21569
+ body: formData
21570
+ });
21571
+ case 9:
21572
+ _yield$request = _context.sent;
21573
+ success = _yield$request.success;
21574
+ data = _yield$request.data;
21575
+ if (success) {
21576
+ handleChange([].concat(_toConsumableArray(valueRef.current), [{
21577
+ kmVideoName: file.name,
21578
+ kmVideoUrl: "".concat(hostUrl, "/").concat(data)
21579
+ }]));
21580
+ }
21581
+ _context.next = 18;
21582
+ break;
21583
+ case 15:
21584
+ _context.prev = 15;
21585
+ _context.t0 = _context["catch"](6);
21586
+ antd.message.error('文件上传失败');
21587
+ case 18:
21588
+ _context.prev = 18;
21589
+ uploadCount.current--;
21590
+ if (uploadCount.current < 1) {
21591
+ setUploading(false);
21592
+ }
21593
+ return _context.finish(18);
21594
+ case 22:
21595
+ case "end":
21596
+ return _context.stop();
21597
+ }
21598
+ }, _callee, null, [[6, 15, 18, 22]]);
21599
+ }));
21600
+ return function asyncUpload(_x) {
21601
+ return _ref2.apply(this, arguments);
21602
+ };
21603
+ }();
21604
+ var download = function download(url, name) {
21605
+ if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
21606
+ window.open(url);
21607
+ return;
21608
+ }
21609
+ fetch(url).then(function (res) {
21610
+ return res.blob();
21611
+ }).then(function (blob) {
21612
+ var a = document.createElement('a');
21613
+ document.body.appendChild(a);
21614
+ a.style.display = 'none';
21615
+ var url = window.URL.createObjectURL(blob);
21616
+ a.href = url;
21617
+ a.download = name;
21618
+ a.click();
21619
+ document.body.removeChild(a);
21620
+ window.URL.revokeObjectURL(url);
21621
+ });
21622
+ };
21623
+ var handleChange = function handleChange(list) {
21624
+ valueRef.current = list;
21625
+ onChange(list);
21626
+ };
21627
+ // 手动上传模式, 一直返回false
21628
+ var beforeUpload = function beforeUpload(file, fileList) {
21629
+ // console.log('beforeUpload', file);
21630
+ var size = file.size / 1024 / 1024 < maxSize;
21631
+ // TODO: 批量提交的时候
21632
+ if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
21633
+ antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
21634
+ return antd.Upload.LIST_IGNORE;
21635
+ }
21636
+ if (!size) {
21637
+ antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
21638
+ return antd.Upload.LIST_IGNORE;
21639
+ }
21640
+ asyncUpload(file);
21641
+ return antd.Upload.LIST_IGNORE;
21642
+ };
21643
+ var onRemove = function onRemove(file) {
21644
+ var newValue = value.filter(function (item) {
21645
+ return item.kmVideoUrl !== file.kmVideoUrl;
21646
+ });
21647
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
21648
+ };
21649
+ var onPreview = function onPreview(file) {
21650
+ var _file$url;
21651
+ var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
21652
+ var fileType = fileArr[fileArr.length - 1];
21653
+ if (videoSuffixList.includes(fileType.toLowerCase())) {
21654
+ setFileUrl(file === null || file === void 0 ? void 0 : file.url);
21655
+ setFileName(file === null || file === void 0 ? void 0 : file.name);
21656
+ setFileType('video');
21657
+ setVisible(true);
21658
+ } else {
21659
+ window.open(file === null || file === void 0 ? void 0 : file.url);
21660
+ }
21661
+ };
21662
+ var handleCancel = function handleCancel() {
21663
+ setFileUrl('');
21664
+ setFileName('');
21665
+ setVisible(false);
21666
+ };
21667
+ return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
21668
+ spinning: uploading
21669
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
21670
+ className: styles$6.tips
21671
+ }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement("div", {
21672
+ className: styles$6.imageBox
21673
+ }, /*#__PURE__*/React__default['default'].createElement(Dragger$1, _objectSpread2({
21674
+ disabled: disabled,
21675
+ multiple: true,
21676
+ name: "file",
21677
+ maxCount: maxCount,
21678
+ beforeUpload: beforeUpload,
21679
+ onPreview: onPreview,
21680
+ fileList: fileList.map(function (item) {
21681
+ return _objectSpread2(_objectSpread2({}, item), {}, {
21682
+ url: item.kmVideoUrl,
21683
+ name: item.kmVideoName
21684
+ });
21685
+ }),
21686
+ onRemove: onRemove,
21687
+ accept: ".".concat(videoSuffixList.join(',.')),
21688
+ iconRender: function iconRender(file) {
21689
+ return /*#__PURE__*/React__default['default'].createElement(antd.Space, {
21690
+ align: "center"
21691
+ }, /*#__PURE__*/React__default['default'].createElement(icons.VideoCameraTwoTone, {
21692
+ style: {
21693
+ fontSize: 16
21694
+ }
21695
+ }), file.kmVideoType && "".concat(file.kmVideoType));
21696
+ }
21697
+ }, resetProps), /*#__PURE__*/React__default['default'].createElement("span", {
21698
+ className: styles$6.addBtn
21699
+ }, "+"), /*#__PURE__*/React__default['default'].createElement("p", {
21700
+ className: styles$6.addBtn
21701
+ }, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
21702
+ visible: visible,
21703
+ title: fileName,
21704
+ footer: null,
21705
+ onCancel: handleCancel
21706
+ }, canDownload ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
21707
+ type: "link",
21708
+ onClick: function onClick() {
21709
+ return download(fileUrl, fileName);
21710
+ }
21711
+ }, "\u4E0B\u8F7D") : /*#__PURE__*/React__default['default'].createElement(reactCopyToClipboard.CopyToClipboard, {
21712
+ text: fileUrl,
21713
+ onCopy: function onCopy() {
21714
+ antd.message.success('复制成功');
21715
+ }
21716
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
21717
+ type: "link"
21718
+ }, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React__default['default'].createElement("img", {
21719
+ alt: "example",
21720
+ style: {
21721
+ width: '100%'
21722
+ },
21723
+ src: fileUrl
21724
+ }) : /*#__PURE__*/React__default['default'].createElement("video", {
21725
+ style: {
21726
+ width: '100%',
21727
+ height: '100%'
21728
+ },
21729
+ autoPlay: true,
21730
+ controls: true,
21731
+ src: fileUrl
21732
+ }))));
21733
+ };
21734
+
21477
21735
  exports.Address = ApaasAddress;
21478
21736
  exports.AliPay = AliPay;
21479
21737
  exports.ApaasAddress = Province;
@@ -21521,6 +21779,7 @@ exports.IdentifyAddress = IdentifyAddress;
21521
21779
  exports.Invoice = Invoice;
21522
21780
  exports.JstGoods = jstGoods;
21523
21781
  exports.JstItemList = ItemList;
21782
+ exports.KmVideo = KmVideo;
21524
21783
  exports.LogisticsInterception = LogisticsInterception;
21525
21784
  exports.LogisticsMoreInterception = LogisticsMoreInterception;
21526
21785
  exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
@@ -3,7 +3,7 @@ interface ProvinceType {
3
3
  value: string[];
4
4
  disabled: boolean;
5
5
  onChange: (value: any, selectedOptions: any) => void;
6
- type?: 'workOrder' | 'bs' | 'wdt';
6
+ type?: 'workOrder' | 'bs' | 'wdt' | 'gy' | 'km';
7
7
  }
8
8
  declare const Province: (props: Partial<ProvinceType>) => React.JSX.Element;
9
9
  export default Province;
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import React, { FocusEventHandler } from 'react';
2
2
  interface CommonSystemOrderProps {
3
3
  value: any[];
4
4
  type: number;
5
5
  options: any[];
6
6
  disabled: boolean;
7
7
  onChange: (val: any[]) => void;
8
+ onBlur: FocusEventHandler<HTMLInputElement>;
8
9
  }
9
10
  declare const CommonSystemOrder: (props: Partial<CommonSystemOrderProps>) => React.JSX.Element;
10
11
  export default CommonSystemOrder;
@@ -9,7 +9,7 @@ interface IdentifyAddressProps {
9
9
  onChange: (value: any) => void;
10
10
  disabled?: boolean;
11
11
  showIdentify?: boolean;
12
- type?: 'workOrder' | 'bs' | 'wdt';
12
+ type?: 'workOrder' | 'bs' | 'wdt' | 'gy' | 'km';
13
13
  }
14
14
  declare const IdentifyAddress: (props: IdentifyAddressProps) => React.JSX.Element;
15
15
  export default IdentifyAddress;
@@ -67,5 +67,6 @@ export type { WdtGoods } from './bs/component/model/WdtGoodList';
67
67
  export { default as GyReissue } from './gy/Reissue';
68
68
  export * from './constants/index';
69
69
  export { default as GyReturn } from './gy/Return';
70
+ export { default as KmVideo } from './km/KmVideo';
70
71
  export { default as columnsBaseInfoMap, erpColumnsMap, erpFormValidator, } from './constants/columnsBaseInfoMap';
71
72
  export { default as erpModalColumnsMap } from './bs/component/model/Columns';
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { UploadProps } from 'antd';
3
+ declare type UploadValue = {
4
+ kmVideoName: string;
5
+ kmVideoUrl: string;
6
+ kmVideoType?: string;
7
+ }[];
8
+ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'> {
9
+ maxCount?: number;
10
+ maxSize?: number;
11
+ uploadText?: string;
12
+ disabled?: boolean;
13
+ onChange?: (value: UploadValue) => void;
14
+ value?: UploadValue;
15
+ hostUrl?: string;
16
+ actionUrl?: string;
17
+ canDownload?: boolean;
18
+ }
19
+ declare const KmVideo: ({ maxCount, maxSize, onChange, value, disabled, hostUrl, canDownload, actionUrl, ...resetProps }: ApaasUploadProps) => React.JSX.Element;
20
+ export default KmVideo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.0.72",
3
+ "version": "2.0.73",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "2.0.72",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.0.73",
24
24
  "ahooks": "^3.7.4",
25
25
  "bignumber.js": "^9.1.2",
26
26
  "kmkf-monitor": "^0.8.9",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "a1b731ea34c1ca5c30dc52797bcfab8f98ad8f70"
68
+ "gitHead": "6f08fe153ffd7f8eb5fcb19b5b9e3fd5cd82b959"
69
69
  }