@kmkf-fe-packages/basic-components 2.10.5 → 2.10.7

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
@@ -9,6 +9,7 @@ import maxBy from 'lodash/maxBy';
9
9
  import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject as reject$1, intersection, isEmpty } from 'lodash';
10
10
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
11
11
  import zhCN from 'antd/lib/locale/zh_CN';
12
+ import Monitor from 'kmkf-monitor';
12
13
  import pubsub from 'pubsub-js';
13
14
  import { internals, useTablePipeline, features, BaseTable } from 'ali-react-table';
14
15
  import zh_CN from 'antd/lib/locale-provider/zh_CN';
@@ -14178,7 +14179,8 @@ var jstGoods = function jstGoods(props) {
14178
14179
  _props$platformType = props.platformType,
14179
14180
  platformType = _props$platformType === void 0 ? 'default' : _props$platformType,
14180
14181
  onlyShowFieldSelect = props.onlyShowFieldSelect,
14181
- logisticsCompanyFormType = props.logisticsCompanyFormType;
14182
+ logisticsCompanyFormType = props.logisticsCompanyFormType,
14183
+ form = props.form;
14182
14184
  var _useState = useState(0),
14183
14185
  _useState2 = _slicedToArray(_useState, 2),
14184
14186
  changeIndex = _useState2[0],
@@ -14193,6 +14195,26 @@ var jstGoods = function jstGoods(props) {
14193
14195
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
14194
14196
  }
14195
14197
  }, [value, type]);
14198
+ useEffect(function () {
14199
+ //丢失sendSnapshotName,未找到具体原因,兜底处理
14200
+ if (type === 3 && isSendGoodSavedId && value && value.length && value.some(function (item) {
14201
+ return !item.sendSnapshotName;
14202
+ }) && value.every(function (item) {
14203
+ return item.sendId;
14204
+ })) {
14205
+ var orderNo = form === null || form === void 0 ? void 0 : form.getFieldValue('m3ap1EvEyd');
14206
+ var newValue = cloneDeep(value).map(function (item) {
14207
+ if (item.sendSnapshotName || !item.sendId) return item;
14208
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14209
+ sendSnapshotName: SendDataCenter.getInstance(platformType).getSendNameByCode(item.sendId)
14210
+ });
14211
+ });
14212
+ Monitor.automaticReport({
14213
+ message: "\u53D1\u8D27\u4ED3\u8D70\u515C\u5E95\u5904\u7406-".concat(orderNo || '', "-oldValue-").concat(JSON.stringify(cloneDeep(value)), ",newValue-").concat(JSON.stringify(cloneDeep(newValue)))
14214
+ });
14215
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14216
+ }
14217
+ }, [JSON.stringify(value || []), type]);
14196
14218
  useEffect(function () {
14197
14219
  if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
14198
14220
  setChangeIndex(0);
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { FormInstance } from 'antd';
2
3
  import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
3
4
  interface JstGoodsProps {
4
5
  value: any[];
@@ -12,6 +13,7 @@ interface JstGoodsProps {
12
13
  onlyShowFieldSelect: boolean;
13
14
  expressDateInstance: InstanceType<typeof ExpressData>;
14
15
  logisticsCompanyFormType?: string;
16
+ form?: FormInstance;
15
17
  }
16
18
  declare const jstGoods: (props: Partial<JstGoodsProps>) => React.JSX.Element;
17
19
  export default jstGoods;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.5",
3
+ "version": "2.10.7",
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.10.5",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.10.7",
24
24
  "ahooks": "^3.7.4",
25
25
  "ali-react-table": "2.6.1",
26
26
  "bignumber.js": "^9.1.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "bb8d17f40a7854b3d3a494c4c90233386a81c15c"
69
+ "gitHead": "419755fa7a36d0e41be3e73386c9fdb48c9fea55"
70
70
  }