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

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
@@ -6853,7 +6853,8 @@ hooks.HTML5_FMT = {
6853
6853
  MONTH: 'YYYY-MM', // <input type="month" />
6854
6854
  };
6855
6855
 
6856
- var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "actionUrl"];
6856
+ var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "actionUrl", "platform"];
6857
+ // import { getInfo } from 'react-mediainfo';
6857
6858
  var Dragger = Upload.Dragger;
6858
6859
  var fn$2 = function fn() {
6859
6860
  return void 0;
@@ -6876,6 +6877,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6876
6877
  hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
6877
6878
  _ref$actionUrl = _ref.actionUrl,
6878
6879
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
6880
+ _ref$platform = _ref.platform,
6881
+ platform = _ref$platform === void 0 ? '' : _ref$platform,
6879
6882
  resetProps = _objectWithoutProperties(_ref, _excluded$7);
6880
6883
  var inputRef = useRef(null);
6881
6884
  var _useState = useState(false),
@@ -6894,15 +6897,19 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6894
6897
  _useState8 = _slicedToArray(_useState7, 2),
6895
6898
  fileName = _useState8[0],
6896
6899
  setFileName = _useState8[1];
6897
- var valueRef = useRef(value);
6898
- var _useState9 = useState(false),
6900
+ var _useState9 = useState({}),
6899
6901
  _useState10 = _slicedToArray(_useState9, 2),
6900
- uploading = _useState10[0],
6901
- setUploading = _useState10[1];
6902
- var _useState11 = useState(true),
6902
+ blackList = _useState10[0],
6903
+ setBlackList = _useState10[1];
6904
+ var valueRef = useRef(value);
6905
+ var _useState11 = useState(false),
6903
6906
  _useState12 = _slicedToArray(_useState11, 2),
6904
- pasteDefaultStates = _useState12[0],
6905
- setPasteDefaultStates = _useState12[1];
6907
+ uploading = _useState12[0],
6908
+ setUploading = _useState12[1];
6909
+ var _useState13 = useState(true),
6910
+ _useState14 = _slicedToArray(_useState13, 2),
6911
+ pasteDefaultStates = _useState14[0],
6912
+ setPasteDefaultStates = _useState14[1];
6906
6913
  var fileList = useMemo(function () {
6907
6914
  return value.map(function (t, i) {
6908
6915
  return _objectSpread2(_objectSpread2({}, t), {}, {
@@ -6913,6 +6920,9 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6913
6920
  });
6914
6921
  });
6915
6922
  }, [value]);
6923
+ useEffect(function () {
6924
+ getVideoBlack();
6925
+ }, []);
6916
6926
  useEffect(function () {
6917
6927
  valueRef.current = value;
6918
6928
  }, [value]);
@@ -6932,25 +6942,52 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6932
6942
  });
6933
6943
  };
6934
6944
  }, [pasteDefaultStates]);
6935
- var asyncUpload = /*#__PURE__*/function () {
6936
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
6937
- var formData, fileName, _yield$request, success, data;
6945
+ //获取视频上传黑名单
6946
+ var getVideoBlack = /*#__PURE__*/function () {
6947
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6938
6948
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6939
6949
  while (1) switch (_context.prev = _context.next) {
6950
+ case 0:
6951
+ request('/qy/diamond/getConfigInfo', {
6952
+ method: 'get',
6953
+ params: {
6954
+ key: 'video-upload-code',
6955
+ name: 'getConfigInfo'
6956
+ }
6957
+ }).then(function (res) {
6958
+ if (res.success && res.data) {
6959
+ setBlackList(JSON.parse(res.data));
6960
+ }
6961
+ });
6962
+ case 1:
6963
+ case "end":
6964
+ return _context.stop();
6965
+ }
6966
+ }, _callee);
6967
+ }));
6968
+ return function getVideoBlack() {
6969
+ return _ref2.apply(this, arguments);
6970
+ };
6971
+ }();
6972
+ var asyncUpload = /*#__PURE__*/function () {
6973
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file) {
6974
+ var formData, fileName, _yield$request, success, data;
6975
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6976
+ while (1) switch (_context2.prev = _context2.next) {
6940
6977
  case 0:
6941
6978
  setUploading(true);
6942
6979
  formData = new FormData();
6943
6980
  formData.append('file', file);
6944
6981
  fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
6945
6982
  formData.append('fileName', fileName);
6946
- _context.prev = 5;
6947
- _context.next = 8;
6983
+ _context2.prev = 5;
6984
+ _context2.next = 8;
6948
6985
  return request(actionUrl, {
6949
6986
  method: 'post',
6950
6987
  body: formData
6951
6988
  });
6952
6989
  case 8:
6953
- _yield$request = _context.sent;
6990
+ _yield$request = _context2.sent;
6954
6991
  success = _yield$request.success;
6955
6992
  data = _yield$request.data;
6956
6993
  if (success) {
@@ -6959,30 +6996,82 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6959
6996
  url: "".concat(hostUrl, "/").concat(data)
6960
6997
  }]));
6961
6998
  }
6962
- _context.next = 17;
6999
+ _context2.next = 17;
6963
7000
  break;
6964
7001
  case 14:
6965
- _context.prev = 14;
6966
- _context.t0 = _context["catch"](5);
7002
+ _context2.prev = 14;
7003
+ _context2.t0 = _context2["catch"](5);
6967
7004
  message.error('文件上传失败');
6968
7005
  case 17:
6969
- _context.prev = 17;
7006
+ _context2.prev = 17;
6970
7007
  setUploading(false);
6971
- return _context.finish(17);
7008
+ return _context2.finish(17);
6972
7009
  case 20:
6973
7010
  case "end":
6974
- return _context.stop();
7011
+ return _context2.stop();
6975
7012
  }
6976
- }, _callee, null, [[5, 14, 17, 20]]);
7013
+ }, _callee2, null, [[5, 14, 17, 20]]);
6977
7014
  }));
6978
7015
  return function asyncUpload(_x) {
6979
- return _ref2.apply(this, arguments);
7016
+ return _ref3.apply(this, arguments);
6980
7017
  };
6981
7018
  }();
6982
7019
  var handleChange = function handleChange(list) {
6983
7020
  valueRef.current = list;
6984
7021
  onChange(list);
6985
7022
  };
7023
+ var verificationFormat = /*#__PURE__*/function () {
7024
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(file) {
7025
+ var _yield$require, getInfo;
7026
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7027
+ while (1) switch (_context3.prev = _context3.next) {
7028
+ case 0:
7029
+ if (!(platform !== 'fxg')) {
7030
+ _context3.next = 8;
7031
+ break;
7032
+ }
7033
+ _context3.next = 3;
7034
+ return require('react-mediainfo');
7035
+ case 3:
7036
+ _yield$require = _context3.sent;
7037
+ getInfo = _yield$require.getInfo;
7038
+ getInfo(file).then(function (res) {
7039
+ var track = res.media.track;
7040
+ console.log(res);
7041
+ var videoItem = track.find(function (item) {
7042
+ return item['@type'] === 'Video';
7043
+ });
7044
+ var generalItem = track.find(function (item) {
7045
+ return item['@type'] === 'General';
7046
+ });
7047
+ 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())) {
7048
+ Modal.confirm({
7049
+ title: '提示',
7050
+ content: '上传的视频可能无法播放,确认要上传吗?',
7051
+ okText: '确定',
7052
+ cancelText: '取消',
7053
+ onOk: function onOk() {
7054
+ asyncUpload(file);
7055
+ }
7056
+ });
7057
+ } else {
7058
+ asyncUpload(file);
7059
+ }
7060
+ });
7061
+ _context3.next = 9;
7062
+ break;
7063
+ case 8:
7064
+ asyncUpload(file);
7065
+ case 9:
7066
+ case "end":
7067
+ return _context3.stop();
7068
+ }
7069
+ }, _callee3);
7070
+ }));
7071
+ return function verificationFormat(_x2) {
7072
+ return _ref4.apply(this, arguments);
7073
+ };
7074
+ }();
6986
7075
  // 手动上传模式, 一直返回false
6987
7076
  var beforeUpload = function beforeUpload(file) {
6988
7077
  console.log('beforeUpload', file);
@@ -6995,7 +7084,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6995
7084
  message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
6996
7085
  return Upload.LIST_IGNORE;
6997
7086
  }
6998
- asyncUpload(file);
7087
+ verificationFormat(file);
7088
+ // asyncUpload(file);
6999
7089
  return Upload.LIST_IGNORE;
7000
7090
  };
7001
7091
  var onRemove = function onRemove(file) {
@@ -7056,24 +7146,24 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7056
7146
  return;
7057
7147
  }
7058
7148
  reader.onload = /*#__PURE__*/function () {
7059
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
7149
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
7060
7150
  var _e$target;
7061
7151
  var result, fileName, file;
7062
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7063
- while (1) switch (_context2.prev = _context2.next) {
7152
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
7153
+ while (1) switch (_context4.prev = _context4.next) {
7064
7154
  case 0:
7065
7155
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
7066
7156
  fileName = blob.name;
7067
- file = dataURLtoFile(result, fileName);
7068
- asyncUpload(file);
7157
+ file = dataURLtoFile(result, fileName); // asyncUpload(file);
7158
+ verificationFormat(file);
7069
7159
  case 4:
7070
7160
  case "end":
7071
- return _context2.stop();
7161
+ return _context4.stop();
7072
7162
  }
7073
- }, _callee2);
7163
+ }, _callee4);
7074
7164
  }));
7075
- return function (_x2) {
7076
- return _ref3.apply(this, arguments);
7165
+ return function (_x3) {
7166
+ return _ref5.apply(this, arguments);
7077
7167
  };
7078
7168
  }();
7079
7169
  reader.readAsDataURL(blob);
@@ -7445,7 +7535,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7445
7535
  receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
7446
7536
  address: []
7447
7537
  };
7448
- if (val === null || val === void 0 ? void 0 : val.province) {
7538
+ if ((val === null || val === void 0 ? void 0 : val.province) && AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7449
7539
  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
7540
  }
7451
7541
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
@@ -9415,7 +9505,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
9415
9505
  interceptReceiverName: undefined,
9416
9506
  interceptReceiverMobile: undefined,
9417
9507
  interceptLogisticsStatus: undefined,
9418
- interceptLogisticsStatusOther: undefined
9508
+ interceptLogisticsStatusOther: undefined,
9509
+ interceptLogisticsSnapshot: undefined
9419
9510
  });
9420
9511
  }
9421
9512
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -10710,12 +10801,14 @@ var BsExchange = function BsExchange(props) {
10710
10801
  }, []);
10711
10802
  var getListHandle = function getListHandle(list, val) {
10712
10803
  var _val$bsExchangeType, _val$bsExchangeType2;
10804
+ //固定的sku
10805
+ var FIXED_FIELD = ['Q0000002', '600123001', '10103003', 'Q0000003', 'Q0000004'];
10713
10806
  //如果是原单换
10714
10807
  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
10808
  return list.reduce(function (prv, next) {
10716
10809
  next.canDelete = false;
10717
10810
  //数量大于1 拆开
10718
- if (next.number > 1) {
10811
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10719
10812
  var newList = Array(next.number).fill({}).map(function () {
10720
10813
  var newNext = _objectSpread2({}, next);
10721
10814
  newNext.money = newNext.share;
@@ -10735,7 +10828,7 @@ var BsExchange = function BsExchange(props) {
10735
10828
  next.canDelete = true;
10736
10829
  next.index = index;
10737
10830
  //数量大于1 拆开
10738
- if (next.number > 1) {
10831
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10739
10832
  var newList = Array(next.number).fill({}).map(function () {
10740
10833
  var newNext = _objectSpread2({}, next);
10741
10834
  newNext.money = newNext.share;
package/dist/index.js CHANGED
@@ -6864,7 +6864,8 @@ hooks.HTML5_FMT = {
6864
6864
  MONTH: 'YYYY-MM', // <input type="month" />
6865
6865
  };
6866
6866
 
6867
- var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "actionUrl"];
6867
+ var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "actionUrl", "platform"];
6868
+ // import { getInfo } from 'react-mediainfo';
6868
6869
  var Dragger = antd.Upload.Dragger;
6869
6870
  var fn$2 = function fn() {
6870
6871
  return void 0;
@@ -6887,6 +6888,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6887
6888
  hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
6888
6889
  _ref$actionUrl = _ref.actionUrl,
6889
6890
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
6891
+ _ref$platform = _ref.platform,
6892
+ platform = _ref$platform === void 0 ? '' : _ref$platform,
6890
6893
  resetProps = _objectWithoutProperties(_ref, _excluded$7);
6891
6894
  var inputRef = React.useRef(null);
6892
6895
  var _useState = React.useState(false),
@@ -6905,15 +6908,19 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6905
6908
  _useState8 = _slicedToArray(_useState7, 2),
6906
6909
  fileName = _useState8[0],
6907
6910
  setFileName = _useState8[1];
6908
- var valueRef = React.useRef(value);
6909
- var _useState9 = React.useState(false),
6911
+ var _useState9 = React.useState({}),
6910
6912
  _useState10 = _slicedToArray(_useState9, 2),
6911
- uploading = _useState10[0],
6912
- setUploading = _useState10[1];
6913
- var _useState11 = React.useState(true),
6913
+ blackList = _useState10[0],
6914
+ setBlackList = _useState10[1];
6915
+ var valueRef = React.useRef(value);
6916
+ var _useState11 = React.useState(false),
6914
6917
  _useState12 = _slicedToArray(_useState11, 2),
6915
- pasteDefaultStates = _useState12[0],
6916
- setPasteDefaultStates = _useState12[1];
6918
+ uploading = _useState12[0],
6919
+ setUploading = _useState12[1];
6920
+ var _useState13 = React.useState(true),
6921
+ _useState14 = _slicedToArray(_useState13, 2),
6922
+ pasteDefaultStates = _useState14[0],
6923
+ setPasteDefaultStates = _useState14[1];
6917
6924
  var fileList = React.useMemo(function () {
6918
6925
  return value.map(function (t, i) {
6919
6926
  return _objectSpread2(_objectSpread2({}, t), {}, {
@@ -6924,6 +6931,9 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6924
6931
  });
6925
6932
  });
6926
6933
  }, [value]);
6934
+ React.useEffect(function () {
6935
+ getVideoBlack();
6936
+ }, []);
6927
6937
  React.useEffect(function () {
6928
6938
  valueRef.current = value;
6929
6939
  }, [value]);
@@ -6943,25 +6953,52 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6943
6953
  });
6944
6954
  };
6945
6955
  }, [pasteDefaultStates]);
6946
- var asyncUpload = /*#__PURE__*/function () {
6947
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
6948
- var formData, fileName, _yield$request, success, data;
6956
+ //获取视频上传黑名单
6957
+ var getVideoBlack = /*#__PURE__*/function () {
6958
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6949
6959
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6950
6960
  while (1) switch (_context.prev = _context.next) {
6961
+ case 0:
6962
+ request__default['default']('/qy/diamond/getConfigInfo', {
6963
+ method: 'get',
6964
+ params: {
6965
+ key: 'video-upload-code',
6966
+ name: 'getConfigInfo'
6967
+ }
6968
+ }).then(function (res) {
6969
+ if (res.success && res.data) {
6970
+ setBlackList(JSON.parse(res.data));
6971
+ }
6972
+ });
6973
+ case 1:
6974
+ case "end":
6975
+ return _context.stop();
6976
+ }
6977
+ }, _callee);
6978
+ }));
6979
+ return function getVideoBlack() {
6980
+ return _ref2.apply(this, arguments);
6981
+ };
6982
+ }();
6983
+ var asyncUpload = /*#__PURE__*/function () {
6984
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file) {
6985
+ var formData, fileName, _yield$request, success, data;
6986
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6987
+ while (1) switch (_context2.prev = _context2.next) {
6951
6988
  case 0:
6952
6989
  setUploading(true);
6953
6990
  formData = new FormData();
6954
6991
  formData.append('file', file);
6955
6992
  fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
6956
6993
  formData.append('fileName', fileName);
6957
- _context.prev = 5;
6958
- _context.next = 8;
6994
+ _context2.prev = 5;
6995
+ _context2.next = 8;
6959
6996
  return request__default['default'](actionUrl, {
6960
6997
  method: 'post',
6961
6998
  body: formData
6962
6999
  });
6963
7000
  case 8:
6964
- _yield$request = _context.sent;
7001
+ _yield$request = _context2.sent;
6965
7002
  success = _yield$request.success;
6966
7003
  data = _yield$request.data;
6967
7004
  if (success) {
@@ -6970,30 +7007,82 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6970
7007
  url: "".concat(hostUrl, "/").concat(data)
6971
7008
  }]));
6972
7009
  }
6973
- _context.next = 17;
7010
+ _context2.next = 17;
6974
7011
  break;
6975
7012
  case 14:
6976
- _context.prev = 14;
6977
- _context.t0 = _context["catch"](5);
7013
+ _context2.prev = 14;
7014
+ _context2.t0 = _context2["catch"](5);
6978
7015
  antd.message.error('文件上传失败');
6979
7016
  case 17:
6980
- _context.prev = 17;
7017
+ _context2.prev = 17;
6981
7018
  setUploading(false);
6982
- return _context.finish(17);
7019
+ return _context2.finish(17);
6983
7020
  case 20:
6984
7021
  case "end":
6985
- return _context.stop();
7022
+ return _context2.stop();
6986
7023
  }
6987
- }, _callee, null, [[5, 14, 17, 20]]);
7024
+ }, _callee2, null, [[5, 14, 17, 20]]);
6988
7025
  }));
6989
7026
  return function asyncUpload(_x) {
6990
- return _ref2.apply(this, arguments);
7027
+ return _ref3.apply(this, arguments);
6991
7028
  };
6992
7029
  }();
6993
7030
  var handleChange = function handleChange(list) {
6994
7031
  valueRef.current = list;
6995
7032
  onChange(list);
6996
7033
  };
7034
+ var verificationFormat = /*#__PURE__*/function () {
7035
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(file) {
7036
+ var _yield$require, getInfo;
7037
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7038
+ while (1) switch (_context3.prev = _context3.next) {
7039
+ case 0:
7040
+ if (!(platform !== 'fxg')) {
7041
+ _context3.next = 8;
7042
+ break;
7043
+ }
7044
+ _context3.next = 3;
7045
+ return require('react-mediainfo');
7046
+ case 3:
7047
+ _yield$require = _context3.sent;
7048
+ getInfo = _yield$require.getInfo;
7049
+ getInfo(file).then(function (res) {
7050
+ var track = res.media.track;
7051
+ console.log(res);
7052
+ var videoItem = track.find(function (item) {
7053
+ return item['@type'] === 'Video';
7054
+ });
7055
+ var generalItem = track.find(function (item) {
7056
+ return item['@type'] === 'General';
7057
+ });
7058
+ 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())) {
7059
+ antd.Modal.confirm({
7060
+ title: '提示',
7061
+ content: '上传的视频可能无法播放,确认要上传吗?',
7062
+ okText: '确定',
7063
+ cancelText: '取消',
7064
+ onOk: function onOk() {
7065
+ asyncUpload(file);
7066
+ }
7067
+ });
7068
+ } else {
7069
+ asyncUpload(file);
7070
+ }
7071
+ });
7072
+ _context3.next = 9;
7073
+ break;
7074
+ case 8:
7075
+ asyncUpload(file);
7076
+ case 9:
7077
+ case "end":
7078
+ return _context3.stop();
7079
+ }
7080
+ }, _callee3);
7081
+ }));
7082
+ return function verificationFormat(_x2) {
7083
+ return _ref4.apply(this, arguments);
7084
+ };
7085
+ }();
6997
7086
  // 手动上传模式, 一直返回false
6998
7087
  var beforeUpload = function beforeUpload(file) {
6999
7088
  console.log('beforeUpload', file);
@@ -7006,7 +7095,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7006
7095
  antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
7007
7096
  return antd.Upload.LIST_IGNORE;
7008
7097
  }
7009
- asyncUpload(file);
7098
+ verificationFormat(file);
7099
+ // asyncUpload(file);
7010
7100
  return antd.Upload.LIST_IGNORE;
7011
7101
  };
7012
7102
  var onRemove = function onRemove(file) {
@@ -7067,24 +7157,24 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7067
7157
  return;
7068
7158
  }
7069
7159
  reader.onload = /*#__PURE__*/function () {
7070
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
7160
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
7071
7161
  var _e$target;
7072
7162
  var result, fileName, file;
7073
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7074
- while (1) switch (_context2.prev = _context2.next) {
7163
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
7164
+ while (1) switch (_context4.prev = _context4.next) {
7075
7165
  case 0:
7076
7166
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
7077
7167
  fileName = blob.name;
7078
- file = dataURLtoFile(result, fileName);
7079
- asyncUpload(file);
7168
+ file = dataURLtoFile(result, fileName); // asyncUpload(file);
7169
+ verificationFormat(file);
7080
7170
  case 4:
7081
7171
  case "end":
7082
- return _context2.stop();
7172
+ return _context4.stop();
7083
7173
  }
7084
- }, _callee2);
7174
+ }, _callee4);
7085
7175
  }));
7086
- return function (_x2) {
7087
- return _ref3.apply(this, arguments);
7176
+ return function (_x3) {
7177
+ return _ref5.apply(this, arguments);
7088
7178
  };
7089
7179
  }();
7090
7180
  reader.readAsDataURL(blob);
@@ -7456,7 +7546,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7456
7546
  receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
7457
7547
  address: []
7458
7548
  };
7459
- if (val === null || val === void 0 ? void 0 : val.province) {
7549
+ if ((val === null || val === void 0 ? void 0 : val.province) && kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7460
7550
  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
7551
  }
7462
7552
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
@@ -9426,7 +9516,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
9426
9516
  interceptReceiverName: undefined,
9427
9517
  interceptReceiverMobile: undefined,
9428
9518
  interceptLogisticsStatus: undefined,
9429
- interceptLogisticsStatusOther: undefined
9519
+ interceptLogisticsStatusOther: undefined,
9520
+ interceptLogisticsSnapshot: undefined
9430
9521
  });
9431
9522
  }
9432
9523
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -10721,12 +10812,14 @@ var BsExchange = function BsExchange(props) {
10721
10812
  }, []);
10722
10813
  var getListHandle = function getListHandle(list, val) {
10723
10814
  var _val$bsExchangeType, _val$bsExchangeType2;
10815
+ //固定的sku
10816
+ var FIXED_FIELD = ['Q0000002', '600123001', '10103003', 'Q0000003', 'Q0000004'];
10724
10817
  //如果是原单换
10725
10818
  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
10819
  return list.reduce(function (prv, next) {
10727
10820
  next.canDelete = false;
10728
10821
  //数量大于1 拆开
10729
- if (next.number > 1) {
10822
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10730
10823
  var newList = Array(next.number).fill({}).map(function () {
10731
10824
  var newNext = _objectSpread2({}, next);
10732
10825
  newNext.money = newNext.share;
@@ -10746,7 +10839,7 @@ var BsExchange = function BsExchange(props) {
10746
10839
  next.canDelete = true;
10747
10840
  next.index = index;
10748
10841
  //数量大于1 拆开
10749
- if (next.number > 1) {
10842
+ if (next.number > 1 && !FIXED_FIELD.includes(next.sku)) {
10750
10843
  var newList = Array(next.number).fill({}).map(function () {
10751
10844
  var newNext = _objectSpread2({}, next);
10752
10845
  newNext.money = newNext.share;
@@ -15,6 +15,7 @@ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'
15
15
  uniqueKey?: string;
16
16
  hostUrl?: string;
17
17
  actionUrl?: string;
18
+ platform?: string;
18
19
  }
19
- declare const ApaasUploadAsync: ({ maxCount, maxSize, onChange, value, accept, disabled, uniqueKey, hostUrl, actionUrl, ...resetProps }: ApaasUploadProps) => React.JSX.Element;
20
+ declare const ApaasUploadAsync: ({ maxCount, maxSize, onChange, value, accept, disabled, uniqueKey, hostUrl, actionUrl, platform, ...resetProps }: ApaasUploadProps) => React.JSX.Element;
20
21
  export default ApaasUploadAsync;
@@ -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.10",
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": "8a843a5781b214063eae2bdf8a14386b9de483a2"
64
65
  }