@kmkf-fe-packages/basic-components 0.8.21-alpha.1 → 0.8.21-alpha.5

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
@@ -3,6 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
3
3
  import { EyeOutlined, DeleteOutlined } 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
+ import { getInfo } from 'react-mediainfo';
6
7
  import { AddressData, BsAddressData, request as request$1, ExpressData, LogisticsAddressData, uuid } from '@kmkf-fe-packages/kmkf-utils';
7
8
  import zhCN from 'antd/lib/locale/zh_CN';
8
9
  import pubsub from 'pubsub-js';
@@ -6894,15 +6895,19 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6894
6895
  _useState8 = _slicedToArray(_useState7, 2),
6895
6896
  fileName = _useState8[0],
6896
6897
  setFileName = _useState8[1];
6897
- var valueRef = useRef(value);
6898
- var _useState9 = useState(false),
6898
+ var _useState9 = useState({}),
6899
6899
  _useState10 = _slicedToArray(_useState9, 2),
6900
- uploading = _useState10[0],
6901
- setUploading = _useState10[1];
6902
- var _useState11 = useState(true),
6900
+ blackList = _useState10[0],
6901
+ setBlackList = _useState10[1];
6902
+ var valueRef = useRef(value);
6903
+ var _useState11 = useState(false),
6903
6904
  _useState12 = _slicedToArray(_useState11, 2),
6904
- pasteDefaultStates = _useState12[0],
6905
- setPasteDefaultStates = _useState12[1];
6905
+ uploading = _useState12[0],
6906
+ setUploading = _useState12[1];
6907
+ var _useState13 = useState(true),
6908
+ _useState14 = _slicedToArray(_useState13, 2),
6909
+ pasteDefaultStates = _useState14[0],
6910
+ setPasteDefaultStates = _useState14[1];
6906
6911
  var fileList = useMemo(function () {
6907
6912
  return value.map(function (t, i) {
6908
6913
  return _objectSpread2(_objectSpread2({}, t), {}, {
@@ -6913,6 +6918,9 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6913
6918
  });
6914
6919
  });
6915
6920
  }, [value]);
6921
+ useEffect(function () {
6922
+ getVideoBlack();
6923
+ }, []);
6916
6924
  useEffect(function () {
6917
6925
  valueRef.current = value;
6918
6926
  }, [value]);
@@ -6932,25 +6940,52 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6932
6940
  });
6933
6941
  };
6934
6942
  }, [pasteDefaultStates]);
6935
- var asyncUpload = /*#__PURE__*/function () {
6936
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
6937
- var formData, fileName, _yield$request, success, data;
6943
+ //获取视频上传黑名单
6944
+ var getVideoBlack = /*#__PURE__*/function () {
6945
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6938
6946
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6939
6947
  while (1) switch (_context.prev = _context.next) {
6948
+ case 0:
6949
+ request('/qy/diamond/getConfigInfo', {
6950
+ method: 'get',
6951
+ params: {
6952
+ key: 'video-upload-code',
6953
+ name: 'getConfigInfo'
6954
+ }
6955
+ }).then(function (res) {
6956
+ if (res.success && res.data) {
6957
+ setBlackList(JSON.parse(res.data));
6958
+ }
6959
+ });
6960
+ case 1:
6961
+ case "end":
6962
+ return _context.stop();
6963
+ }
6964
+ }, _callee);
6965
+ }));
6966
+ return function getVideoBlack() {
6967
+ return _ref2.apply(this, arguments);
6968
+ };
6969
+ }();
6970
+ var asyncUpload = /*#__PURE__*/function () {
6971
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file) {
6972
+ var formData, fileName, _yield$request, success, data;
6973
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6974
+ while (1) switch (_context2.prev = _context2.next) {
6940
6975
  case 0:
6941
6976
  setUploading(true);
6942
6977
  formData = new FormData();
6943
6978
  formData.append('file', file);
6944
6979
  fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
6945
6980
  formData.append('fileName', fileName);
6946
- _context.prev = 5;
6947
- _context.next = 8;
6981
+ _context2.prev = 5;
6982
+ _context2.next = 8;
6948
6983
  return request(actionUrl, {
6949
6984
  method: 'post',
6950
6985
  body: formData
6951
6986
  });
6952
6987
  case 8:
6953
- _yield$request = _context.sent;
6988
+ _yield$request = _context2.sent;
6954
6989
  success = _yield$request.success;
6955
6990
  data = _yield$request.data;
6956
6991
  if (success) {
@@ -6959,30 +6994,55 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6959
6994
  url: "".concat(hostUrl, "/").concat(data)
6960
6995
  }]));
6961
6996
  }
6962
- _context.next = 17;
6997
+ _context2.next = 17;
6963
6998
  break;
6964
6999
  case 14:
6965
- _context.prev = 14;
6966
- _context.t0 = _context["catch"](5);
7000
+ _context2.prev = 14;
7001
+ _context2.t0 = _context2["catch"](5);
6967
7002
  message.error('文件上传失败');
6968
7003
  case 17:
6969
- _context.prev = 17;
7004
+ _context2.prev = 17;
6970
7005
  setUploading(false);
6971
- return _context.finish(17);
7006
+ return _context2.finish(17);
6972
7007
  case 20:
6973
7008
  case "end":
6974
- return _context.stop();
7009
+ return _context2.stop();
6975
7010
  }
6976
- }, _callee, null, [[5, 14, 17, 20]]);
7011
+ }, _callee2, null, [[5, 14, 17, 20]]);
6977
7012
  }));
6978
7013
  return function asyncUpload(_x) {
6979
- return _ref2.apply(this, arguments);
7014
+ return _ref3.apply(this, arguments);
6980
7015
  };
6981
7016
  }();
6982
7017
  var handleChange = function handleChange(list) {
6983
7018
  valueRef.current = list;
6984
7019
  onChange(list);
6985
7020
  };
7021
+ var verificationFormat = function verificationFormat(file) {
7022
+ getInfo(file).then(function (res) {
7023
+ var track = res.media.track;
7024
+ console.log(res);
7025
+ var videoItem = track.find(function (item) {
7026
+ return item['@type'] === 'Video';
7027
+ });
7028
+ var generalItem = track.find(function (item) {
7029
+ return item['@type'] === 'General';
7030
+ });
7031
+ if (videoItem && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()] && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()].includes(videoItem === null || videoItem === void 0 ? void 0 : videoItem.Format.toUpperCase())) {
7032
+ Modal.confirm({
7033
+ title: '提示',
7034
+ content: '上传的视屏无法播放确认要上传吗?',
7035
+ okText: '确定',
7036
+ cancelText: '取消',
7037
+ onOk: function onOk() {
7038
+ asyncUpload(file);
7039
+ }
7040
+ });
7041
+ } else {
7042
+ asyncUpload(file);
7043
+ }
7044
+ });
7045
+ };
6986
7046
  // 手动上传模式, 一直返回false
6987
7047
  var beforeUpload = function beforeUpload(file) {
6988
7048
  console.log('beforeUpload', file);
@@ -6995,7 +7055,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6995
7055
  message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
6996
7056
  return Upload.LIST_IGNORE;
6997
7057
  }
6998
- asyncUpload(file);
7058
+ verificationFormat(file);
7059
+ // asyncUpload(file);
6999
7060
  return Upload.LIST_IGNORE;
7000
7061
  };
7001
7062
  var onRemove = function onRemove(file) {
@@ -7056,24 +7117,24 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7056
7117
  return;
7057
7118
  }
7058
7119
  reader.onload = /*#__PURE__*/function () {
7059
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
7120
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
7060
7121
  var _e$target;
7061
7122
  var result, fileName, file;
7062
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7063
- while (1) switch (_context2.prev = _context2.next) {
7123
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7124
+ while (1) switch (_context3.prev = _context3.next) {
7064
7125
  case 0:
7065
7126
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
7066
7127
  fileName = blob.name;
7067
- file = dataURLtoFile(result, fileName);
7068
- asyncUpload(file);
7128
+ file = dataURLtoFile(result, fileName); // asyncUpload(file);
7129
+ verificationFormat(file);
7069
7130
  case 4:
7070
7131
  case "end":
7071
- return _context2.stop();
7132
+ return _context3.stop();
7072
7133
  }
7073
- }, _callee2);
7134
+ }, _callee3);
7074
7135
  }));
7075
7136
  return function (_x2) {
7076
- return _ref3.apply(this, arguments);
7137
+ return _ref4.apply(this, arguments);
7077
7138
  };
7078
7139
  }();
7079
7140
  reader.readAsDataURL(blob);
@@ -7445,7 +7506,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7445
7506
  receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
7446
7507
  address: []
7447
7508
  };
7448
- if (val === null || val === void 0 ? void 0 : val.province) {
7509
+ if ((val === null || val === void 0 ? void 0 : val.province) && AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7449
7510
  params.address = [AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7450
7511
  }
7451
7512
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
@@ -9415,7 +9476,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
9415
9476
  interceptReceiverName: undefined,
9416
9477
  interceptReceiverMobile: undefined,
9417
9478
  interceptLogisticsStatus: undefined,
9418
- interceptLogisticsStatusOther: undefined
9479
+ interceptLogisticsStatusOther: undefined,
9480
+ interceptLogisticsSnapshot: undefined
9419
9481
  });
9420
9482
  }
9421
9483
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -10710,12 +10772,14 @@ var BsExchange = function BsExchange(props) {
10710
10772
  }, []);
10711
10773
  var getListHandle = function getListHandle(list, val) {
10712
10774
  var _val$bsExchangeType, _val$bsExchangeType2;
10775
+ //固定的sku
10776
+ var FIXED_FIELD = ['Q0000002', '600123001', '10103003', 'Q0000003', 'Q0000004'];
10713
10777
  //如果是原单换
10714
10778
  if (['1', '3'].includes(val === null || val === void 0 ? void 0 : (_val$bsExchangeType = val.bsExchangeType) === null || _val$bsExchangeType === void 0 ? void 0 : _val$bsExchangeType[0])) {
10715
10779
  return list.reduce(function (prv, next) {
10716
10780
  next.canDelete = false;
10717
10781
  //数量大于1 拆开
10718
- if (next.number > 1) {
10782
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10719
10783
  var newList = Array(next.number).fill({}).map(function () {
10720
10784
  var newNext = _objectSpread2({}, next);
10721
10785
  newNext.money = newNext.share;
@@ -10735,7 +10799,7 @@ var BsExchange = function BsExchange(props) {
10735
10799
  next.canDelete = true;
10736
10800
  next.index = index;
10737
10801
  //数量大于1 拆开
10738
- if (next.number > 1) {
10802
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10739
10803
  var newList = Array(next.number).fill({}).map(function () {
10740
10804
  var newNext = _objectSpread2({}, next);
10741
10805
  newNext.money = newNext.share;
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ var antd = require('antd');
7
7
  var icons = require('@ant-design/icons');
8
8
  var request = require('umi-request');
9
9
  var reactCopyToClipboard = require('react-copy-to-clipboard');
10
+ var reactMediainfo = require('react-mediainfo');
10
11
  var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
11
12
  var zhCN = require('antd/lib/locale/zh_CN');
12
13
  var pubsub = require('pubsub-js');
@@ -6905,15 +6906,19 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6905
6906
  _useState8 = _slicedToArray(_useState7, 2),
6906
6907
  fileName = _useState8[0],
6907
6908
  setFileName = _useState8[1];
6908
- var valueRef = React.useRef(value);
6909
- var _useState9 = React.useState(false),
6909
+ var _useState9 = React.useState({}),
6910
6910
  _useState10 = _slicedToArray(_useState9, 2),
6911
- uploading = _useState10[0],
6912
- setUploading = _useState10[1];
6913
- var _useState11 = React.useState(true),
6911
+ blackList = _useState10[0],
6912
+ setBlackList = _useState10[1];
6913
+ var valueRef = React.useRef(value);
6914
+ var _useState11 = React.useState(false),
6914
6915
  _useState12 = _slicedToArray(_useState11, 2),
6915
- pasteDefaultStates = _useState12[0],
6916
- setPasteDefaultStates = _useState12[1];
6916
+ uploading = _useState12[0],
6917
+ setUploading = _useState12[1];
6918
+ var _useState13 = React.useState(true),
6919
+ _useState14 = _slicedToArray(_useState13, 2),
6920
+ pasteDefaultStates = _useState14[0],
6921
+ setPasteDefaultStates = _useState14[1];
6917
6922
  var fileList = React.useMemo(function () {
6918
6923
  return value.map(function (t, i) {
6919
6924
  return _objectSpread2(_objectSpread2({}, t), {}, {
@@ -6924,6 +6929,9 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6924
6929
  });
6925
6930
  });
6926
6931
  }, [value]);
6932
+ React.useEffect(function () {
6933
+ getVideoBlack();
6934
+ }, []);
6927
6935
  React.useEffect(function () {
6928
6936
  valueRef.current = value;
6929
6937
  }, [value]);
@@ -6943,25 +6951,52 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6943
6951
  });
6944
6952
  };
6945
6953
  }, [pasteDefaultStates]);
6946
- var asyncUpload = /*#__PURE__*/function () {
6947
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
6948
- var formData, fileName, _yield$request, success, data;
6954
+ //获取视频上传黑名单
6955
+ var getVideoBlack = /*#__PURE__*/function () {
6956
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6949
6957
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6950
6958
  while (1) switch (_context.prev = _context.next) {
6959
+ case 0:
6960
+ request__default['default']('/qy/diamond/getConfigInfo', {
6961
+ method: 'get',
6962
+ params: {
6963
+ key: 'video-upload-code',
6964
+ name: 'getConfigInfo'
6965
+ }
6966
+ }).then(function (res) {
6967
+ if (res.success && res.data) {
6968
+ setBlackList(JSON.parse(res.data));
6969
+ }
6970
+ });
6971
+ case 1:
6972
+ case "end":
6973
+ return _context.stop();
6974
+ }
6975
+ }, _callee);
6976
+ }));
6977
+ return function getVideoBlack() {
6978
+ return _ref2.apply(this, arguments);
6979
+ };
6980
+ }();
6981
+ var asyncUpload = /*#__PURE__*/function () {
6982
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file) {
6983
+ var formData, fileName, _yield$request, success, data;
6984
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6985
+ while (1) switch (_context2.prev = _context2.next) {
6951
6986
  case 0:
6952
6987
  setUploading(true);
6953
6988
  formData = new FormData();
6954
6989
  formData.append('file', file);
6955
6990
  fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
6956
6991
  formData.append('fileName', fileName);
6957
- _context.prev = 5;
6958
- _context.next = 8;
6992
+ _context2.prev = 5;
6993
+ _context2.next = 8;
6959
6994
  return request__default['default'](actionUrl, {
6960
6995
  method: 'post',
6961
6996
  body: formData
6962
6997
  });
6963
6998
  case 8:
6964
- _yield$request = _context.sent;
6999
+ _yield$request = _context2.sent;
6965
7000
  success = _yield$request.success;
6966
7001
  data = _yield$request.data;
6967
7002
  if (success) {
@@ -6970,30 +7005,55 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6970
7005
  url: "".concat(hostUrl, "/").concat(data)
6971
7006
  }]));
6972
7007
  }
6973
- _context.next = 17;
7008
+ _context2.next = 17;
6974
7009
  break;
6975
7010
  case 14:
6976
- _context.prev = 14;
6977
- _context.t0 = _context["catch"](5);
7011
+ _context2.prev = 14;
7012
+ _context2.t0 = _context2["catch"](5);
6978
7013
  antd.message.error('文件上传失败');
6979
7014
  case 17:
6980
- _context.prev = 17;
7015
+ _context2.prev = 17;
6981
7016
  setUploading(false);
6982
- return _context.finish(17);
7017
+ return _context2.finish(17);
6983
7018
  case 20:
6984
7019
  case "end":
6985
- return _context.stop();
7020
+ return _context2.stop();
6986
7021
  }
6987
- }, _callee, null, [[5, 14, 17, 20]]);
7022
+ }, _callee2, null, [[5, 14, 17, 20]]);
6988
7023
  }));
6989
7024
  return function asyncUpload(_x) {
6990
- return _ref2.apply(this, arguments);
7025
+ return _ref3.apply(this, arguments);
6991
7026
  };
6992
7027
  }();
6993
7028
  var handleChange = function handleChange(list) {
6994
7029
  valueRef.current = list;
6995
7030
  onChange(list);
6996
7031
  };
7032
+ var verificationFormat = function verificationFormat(file) {
7033
+ reactMediainfo.getInfo(file).then(function (res) {
7034
+ var track = res.media.track;
7035
+ console.log(res);
7036
+ var videoItem = track.find(function (item) {
7037
+ return item['@type'] === 'Video';
7038
+ });
7039
+ var generalItem = track.find(function (item) {
7040
+ return item['@type'] === 'General';
7041
+ });
7042
+ if (videoItem && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()] && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()].includes(videoItem === null || videoItem === void 0 ? void 0 : videoItem.Format.toUpperCase())) {
7043
+ antd.Modal.confirm({
7044
+ title: '提示',
7045
+ content: '上传的视屏无法播放确认要上传吗?',
7046
+ okText: '确定',
7047
+ cancelText: '取消',
7048
+ onOk: function onOk() {
7049
+ asyncUpload(file);
7050
+ }
7051
+ });
7052
+ } else {
7053
+ asyncUpload(file);
7054
+ }
7055
+ });
7056
+ };
6997
7057
  // 手动上传模式, 一直返回false
6998
7058
  var beforeUpload = function beforeUpload(file) {
6999
7059
  console.log('beforeUpload', file);
@@ -7006,7 +7066,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7006
7066
  antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
7007
7067
  return antd.Upload.LIST_IGNORE;
7008
7068
  }
7009
- asyncUpload(file);
7069
+ verificationFormat(file);
7070
+ // asyncUpload(file);
7010
7071
  return antd.Upload.LIST_IGNORE;
7011
7072
  };
7012
7073
  var onRemove = function onRemove(file) {
@@ -7067,24 +7128,24 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7067
7128
  return;
7068
7129
  }
7069
7130
  reader.onload = /*#__PURE__*/function () {
7070
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
7131
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
7071
7132
  var _e$target;
7072
7133
  var result, fileName, file;
7073
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7074
- while (1) switch (_context2.prev = _context2.next) {
7134
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7135
+ while (1) switch (_context3.prev = _context3.next) {
7075
7136
  case 0:
7076
7137
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
7077
7138
  fileName = blob.name;
7078
- file = dataURLtoFile(result, fileName);
7079
- asyncUpload(file);
7139
+ file = dataURLtoFile(result, fileName); // asyncUpload(file);
7140
+ verificationFormat(file);
7080
7141
  case 4:
7081
7142
  case "end":
7082
- return _context2.stop();
7143
+ return _context3.stop();
7083
7144
  }
7084
- }, _callee2);
7145
+ }, _callee3);
7085
7146
  }));
7086
7147
  return function (_x2) {
7087
- return _ref3.apply(this, arguments);
7148
+ return _ref4.apply(this, arguments);
7088
7149
  };
7089
7150
  }();
7090
7151
  reader.readAsDataURL(blob);
@@ -7456,7 +7517,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7456
7517
  receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
7457
7518
  address: []
7458
7519
  };
7459
- if (val === null || val === void 0 ? void 0 : val.province) {
7520
+ if ((val === null || val === void 0 ? void 0 : val.province) && kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7460
7521
  params.address = [kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7461
7522
  }
7462
7523
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
@@ -9426,7 +9487,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
9426
9487
  interceptReceiverName: undefined,
9427
9488
  interceptReceiverMobile: undefined,
9428
9489
  interceptLogisticsStatus: undefined,
9429
- interceptLogisticsStatusOther: undefined
9490
+ interceptLogisticsStatusOther: undefined,
9491
+ interceptLogisticsSnapshot: undefined
9430
9492
  });
9431
9493
  }
9432
9494
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -10721,12 +10783,14 @@ var BsExchange = function BsExchange(props) {
10721
10783
  }, []);
10722
10784
  var getListHandle = function getListHandle(list, val) {
10723
10785
  var _val$bsExchangeType, _val$bsExchangeType2;
10786
+ //固定的sku
10787
+ var FIXED_FIELD = ['Q0000002', '600123001', '10103003', 'Q0000003', 'Q0000004'];
10724
10788
  //如果是原单换
10725
10789
  if (['1', '3'].includes(val === null || val === void 0 ? void 0 : (_val$bsExchangeType = val.bsExchangeType) === null || _val$bsExchangeType === void 0 ? void 0 : _val$bsExchangeType[0])) {
10726
10790
  return list.reduce(function (prv, next) {
10727
10791
  next.canDelete = false;
10728
10792
  //数量大于1 拆开
10729
- if (next.number > 1) {
10793
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10730
10794
  var newList = Array(next.number).fill({}).map(function () {
10731
10795
  var newNext = _objectSpread2({}, next);
10732
10796
  newNext.money = newNext.share;
@@ -10746,7 +10810,7 @@ var BsExchange = function BsExchange(props) {
10746
10810
  next.canDelete = true;
10747
10811
  next.index = index;
10748
10812
  //数量大于1 拆开
10749
- if (next.number > 1) {
10813
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10750
10814
  var newList = Array(next.number).fill({}).map(function () {
10751
10815
  var newNext = _objectSpread2({}, next);
10752
10816
  newNext.money = newNext.share;
@@ -10,6 +10,7 @@ interface LogisticsInterceptionValueType {
10
10
  interceptReceiverMobile: string;
11
11
  interceptLogisticsStatus: string | number;
12
12
  interceptLogisticsStatusOther: string;
13
+ interceptLogisticsSnapshot: string;
13
14
  }
14
15
  interface LogisticsInterceptionProps {
15
16
  value: Partial<LogisticsInterceptionValueType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.8.21-alpha.1",
3
+ "version": "0.8.21-alpha.5",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -24,6 +24,7 @@
24
24
  "lodash": "^4.17.21",
25
25
  "pubsub-js": "^1.9.4",
26
26
  "react-copy-to-clipboard": "^5.1.0",
27
+ "react-mediainfo": "^0.0.42",
27
28
  "umi-request": "^1.4.0"
28
29
  },
29
30
  "devDependencies": {
@@ -60,5 +61,5 @@
60
61
  "publishConfig": {
61
62
  "access": "public"
62
63
  },
63
- "gitHead": "1f85f4ce9472dc2958c5b43d45ac9a0cf219e83e"
64
+ "gitHead": "774fbea8e36807731a7ad1d25d462ef28da2ebb9"
64
65
  }