@kmkf-fe-packages/basic-components 2.10.9-beta.6 → 2.10.9-beta.60

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,14 +1,15 @@
1
1
  import React, { useState, useMemo, useEffect, useRef, forwardRef, useImperativeHandle, useCallback } from 'react';
2
- import { Cascader, DatePicker, Image, InputNumber, Input, Select, Upload, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate as Rate$1, Form, Popover, Tooltip, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton, Empty, Tag } from 'antd';
2
+ import { Cascader, DatePicker, Image, InputNumber, Input, Select, Upload, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate as Rate$1, Form, Popover, Tooltip, Table, Tabs, ConfigProvider, Pagination, Typography, Empty, Skeleton, Tag } from 'antd';
3
3
  import { EyeOutlined, DeleteOutlined, CloseOutlined, PlusSquareOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, PlusOutlined, 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
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData, JstAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, kmSkuTypeMap, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, findLabelBySelectValue, BS_E3_BOOLEAN_STATUS_MAP, DxdSuppliersData, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterJkyOrders, JKY_ORDER_FROM_MAP, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, getJkyLogisticInfo, filterKmOrders, getSystemShowHead, 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, JY_SYSTEM_ORDER_CONFIG, JKY_SYSTEM_ORDER_CONFIG, WDT_RETURN_BILL_NO_CONFIG, PLATFORM_AFTER_SALES_ORDER_CONFIG, DXD_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, KM_ORDER_TYPE_MAP, KM_ORDER_STATUS, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, updateJkyGoodsHandle, updateDxdGoodsHandle, updateWdtAftersaleGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, JstAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, normalizeYouzanStar, servers, columnsGoodsList, LogisticsAddressData, isJdLogisticsCompany, getJdCustomerCodeOptions, SendDataCenter, kmSkuTypeMap, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, findLabelBySelectValue, BS_E3_BOOLEAN_STATUS_MAP, DxdSuppliersData, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, warehouseTypeMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterJkyOrders, JKY_ORDER_FROM_MAP, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, getJkyLogisticInfo, filterKmOrders, getSystemShowHead, 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, JY_SYSTEM_ORDER_CONFIG, JKY_SYSTEM_ORDER_CONFIG, WDT_RETURN_BILL_NO_CONFIG, PLATFORM_AFTER_SALES_ORDER_CONFIG, DXD_SYSTEM_ORDER_CONFIG, TTX_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, KM_ORDER_TYPE_MAP, KM_ORDER_STATUS, TTX_INTERNAL_ORDER_TYPE_MAP, TTX_STATUS_MAP, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, updateJkyGoodsHandle, updateDxdGoodsHandle, updateTtxGoodsHandle, updateWdtAftersaleGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import every from 'lodash/every';
8
8
  import maxBy from 'lodash/maxBy';
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';
9
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, 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';
@@ -735,6 +736,12 @@ var ApaasUpload = function ApaasUpload(_ref) {
735
736
  resetProps = _objectWithoutProperties(_ref, _excluded$4);
736
737
  var inputRef = useRef(null);
737
738
  var valueRef = useRef(value);
739
+ // 当前批次的文件选择序号,用于按选择顺序展示上传结果
740
+ var batchSeqRef = useRef(0);
741
+ // 当前批次的上传结果,按序号存储,最后统一排序合并
742
+ var batchResultsRef = useRef(new Map());
743
+ // 当前批次正在处理的文件数,用于判断批次何时结束
744
+ var pendingCountRef = useRef(0);
738
745
  var _useState = useState(false),
739
746
  _useState2 = _slicedToArray(_useState, 2),
740
747
  visible = _useState2[0],
@@ -750,6 +757,32 @@ var ApaasUpload = function ApaasUpload(_ref) {
750
757
  useEffect(function () {
751
758
  valueRef.current = value;
752
759
  }, [value]);
760
+ // 获取当前批次的文件选择序号;没有正在处理的文件时视为新一批,重置批次状态
761
+ var acquireBatchSeq = function acquireBatchSeq() {
762
+ if (pendingCountRef.current === 0) {
763
+ batchSeqRef.current = 0;
764
+ batchResultsRef.current.clear();
765
+ }
766
+ return batchSeqRef.current++;
767
+ };
768
+ // 将单个文件结果存入当前批次,本批次全部完成时按选择顺序合并到 value
769
+ var appendResult = function appendResult(batchSeq, result) {
770
+ if (valueRef.current.length + batchResultsRef.current.size < maxCount) {
771
+ batchResultsRef.current.set(batchSeq, result);
772
+ }
773
+ pendingCountRef.current = Math.max(0, pendingCountRef.current - 1);
774
+ if (pendingCountRef.current === 0 && batchResultsRef.current.size > 0) {
775
+ var sorted = _toConsumableArray(batchResultsRef.current.entries()).sort(function (a, b) {
776
+ return a[0] - b[0];
777
+ }).map(function (_ref2) {
778
+ var _ref3 = _slicedToArray(_ref2, 2),
779
+ v = _ref3[1];
780
+ return v;
781
+ });
782
+ handleChange([].concat(_toConsumableArray(valueRef.current), _toConsumableArray(sorted)));
783
+ batchResultsRef.current.clear();
784
+ }
785
+ };
753
786
  var imgReader = function imgReader(item) {
754
787
  var blob = item.getAsFile(),
755
788
  reader = new FileReader();
@@ -757,14 +790,16 @@ var ApaasUpload = function ApaasUpload(_ref) {
757
790
  message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
758
791
  return;
759
792
  }
760
- if (valueRef.current.length >= maxCount) {
793
+ if (valueRef.current.length + pendingCountRef.current >= maxCount) {
761
794
  message.error("\u53EA\u80FD\u4E0A\u4F20".concat(maxCount, "\u5F20\u56FE\u7247"));
762
795
  return;
763
796
  }
797
+ var batchSeq = acquireBatchSeq();
798
+ pendingCountRef.current += 1;
764
799
  reader.onload = function (e) {
765
800
  var _e$target;
766
801
  var result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
767
- handleChange([].concat(_toConsumableArray(valueRef.current), [result]));
802
+ appendResult(batchSeq, result);
768
803
  };
769
804
  reader.readAsDataURL(blob);
770
805
  };
@@ -797,7 +832,8 @@ var ApaasUpload = function ApaasUpload(_ref) {
797
832
  // 手动上传模式, 一直返回false
798
833
  var beforeUpload = function beforeUpload(file) {
799
834
  var size = file.size / 1024 / 1024 < maxSize;
800
- if (value.length > maxCount) {
835
+ // 并发上传时用「已上传 + 待上传」一起判断,避免一次选多张时超出 maxCount
836
+ if (valueRef.current.length + pendingCountRef.current >= maxCount) {
801
837
  message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
802
838
  return Upload.LIST_IGNORE;
803
839
  }
@@ -805,8 +841,10 @@ var ApaasUpload = function ApaasUpload(_ref) {
805
841
  message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
806
842
  return Upload.LIST_IGNORE;
807
843
  }
844
+ var batchSeq = acquireBatchSeq();
845
+ pendingCountRef.current += 1;
808
846
  getBase64(file).then(function (res) {
809
- return handleChange([].concat(_toConsumableArray(valueRef.current), [res]));
847
+ appendResult(batchSeq, res);
810
848
  });
811
849
  return Upload.LIST_IGNORE;
812
850
  };
@@ -908,6 +946,7 @@ var ApaasUpload = function ApaasUpload(_ref) {
908
946
  name: "file",
909
947
  listType: "picture-card",
910
948
  maxCount: maxCount,
949
+ multiple: true,
911
950
  className: styles.upload,
912
951
  beforeUpload: beforeUpload
913
952
  }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
@@ -1048,6 +1087,16 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1048
1087
  resetProps = _objectWithoutProperties(_ref, _excluded$6);
1049
1088
  var inputRef = useRef(null);
1050
1089
  var valueRef = useRef(value);
1090
+ // 并发上传时用于正确控制 loading 状态(多个文件同时上传)
1091
+ var uploadingCountRef = useRef(0);
1092
+ // 已选中待上传的文件数,用于数量预占,避免并发上传超过 maxCount
1093
+ var pendingCountRef = useRef(0);
1094
+ // 文件序号,保证并发上传时文件名唯一
1095
+ var seqRef = useRef(0);
1096
+ // 当前批次的文件选择序号,用于按选择顺序展示上传结果
1097
+ var batchSeqRef = useRef(0);
1098
+ // 当前批次的上传结果,按序号存储,最后统一排序合并
1099
+ var batchResultsRef = useRef(new Map());
1051
1100
  var _useState = useState(false),
1052
1101
  _useState2 = _slicedToArray(_useState, 2),
1053
1102
  uploading = _useState2[0],
@@ -1062,48 +1111,80 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1062
1111
  useEffect(function () {
1063
1112
  valueRef.current = value;
1064
1113
  }, [value]);
1114
+ var genFileName = function genFileName() {
1115
+ seqRef.current += 1;
1116
+ return "".concat(uniqueKey, "_").concat(seqRef.current, "_").concat(new Date().getTime(), ".jpg");
1117
+ };
1118
+ // 获取当前批次的文件选择序号;没有正在上传的文件时视为新一批,重置批次状态
1119
+ var acquireBatchSeq = function acquireBatchSeq() {
1120
+ if (pendingCountRef.current === 0) {
1121
+ batchSeqRef.current = 0;
1122
+ batchResultsRef.current.clear();
1123
+ }
1124
+ return batchSeqRef.current++;
1125
+ };
1065
1126
  var asyncUpload = /*#__PURE__*/function () {
1066
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
1067
- var _valueRef$current;
1068
- var formData, fileName, _yield$request, success, data;
1127
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file, batchSeq) {
1128
+ var formData, fileName, _yield$request, success, data, sorted;
1069
1129
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1070
1130
  while (1) switch (_context.prev = _context.next) {
1071
1131
  case 0:
1132
+ pendingCountRef.current += 1;
1133
+ uploadingCountRef.current += 1;
1072
1134
  setUploading(true);
1073
1135
  formData = new FormData();
1074
1136
  formData.append('file', file);
1075
- fileName = "".concat(uniqueKey, "_").concat(((_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.length) + 1, "_").concat(new Date().getTime(), ".jpg");
1137
+ fileName = genFileName();
1076
1138
  formData.append('fileName', fileName);
1077
- _context.prev = 5;
1078
- _context.next = 8;
1139
+ _context.prev = 7;
1140
+ _context.next = 10;
1079
1141
  return request(actionUrl, {
1080
1142
  method: 'post',
1081
1143
  body: formData
1082
1144
  });
1083
- case 8:
1145
+ case 10:
1084
1146
  _yield$request = _context.sent;
1085
1147
  success = _yield$request.success;
1086
1148
  data = _yield$request.data;
1087
1149
  if (success) {
1088
- handleChange([].concat(_toConsumableArray(valueRef.current), [data]));
1150
+ if (valueRef.current.length + batchResultsRef.current.size < maxCount) {
1151
+ // 先暂存到当前批次,等本批次全部完成后再按选择顺序合并
1152
+ batchResultsRef.current.set(batchSeq, data);
1153
+ }
1089
1154
  }
1090
- _context.next = 17;
1155
+ _context.next = 19;
1091
1156
  break;
1092
- case 14:
1093
- _context.prev = 14;
1094
- _context.t0 = _context["catch"](5);
1157
+ case 16:
1158
+ _context.prev = 16;
1159
+ _context.t0 = _context["catch"](7);
1095
1160
  message.error('图片上传失败');
1096
- case 17:
1097
- _context.prev = 17;
1098
- setUploading(false);
1099
- return _context.finish(17);
1100
- case 20:
1161
+ case 19:
1162
+ _context.prev = 19;
1163
+ pendingCountRef.current = Math.max(0, pendingCountRef.current - 1);
1164
+ uploadingCountRef.current = Math.max(0, uploadingCountRef.current - 1);
1165
+ // 本批次全部上传完成,按选择序号排序后一次性合并到 value
1166
+ if (pendingCountRef.current === 0 && batchResultsRef.current.size > 0) {
1167
+ sorted = _toConsumableArray(batchResultsRef.current.entries()).sort(function (a, b) {
1168
+ return a[0] - b[0];
1169
+ }).map(function (_ref3) {
1170
+ var _ref4 = _slicedToArray(_ref3, 2),
1171
+ v = _ref4[1];
1172
+ return v;
1173
+ });
1174
+ handleChange([].concat(_toConsumableArray(valueRef.current), _toConsumableArray(sorted)));
1175
+ batchResultsRef.current.clear();
1176
+ }
1177
+ if (uploadingCountRef.current === 0) {
1178
+ setUploading(false);
1179
+ }
1180
+ return _context.finish(19);
1181
+ case 25:
1101
1182
  case "end":
1102
1183
  return _context.stop();
1103
1184
  }
1104
- }, _callee, null, [[5, 14, 17, 20]]);
1185
+ }, _callee, null, [[7, 16, 19, 25]]);
1105
1186
  }));
1106
- return function asyncUpload(_x) {
1187
+ return function asyncUpload(_x, _x2) {
1107
1188
  return _ref2.apply(this, arguments);
1108
1189
  };
1109
1190
  }();
@@ -1119,24 +1200,24 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1119
1200
  return;
1120
1201
  }
1121
1202
  reader.onload = /*#__PURE__*/function () {
1122
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
1123
- var _e$target, _valueRef$current2;
1203
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
1204
+ var _e$target;
1124
1205
  var result, fileName, file;
1125
1206
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1126
1207
  while (1) switch (_context2.prev = _context2.next) {
1127
1208
  case 0:
1128
1209
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
1129
- fileName = "".concat(uniqueKey, "_").concat(((_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.length) + 1, "_").concat(new Date().getTime(), ".jpg");
1210
+ fileName = genFileName();
1130
1211
  file = dataURLtoFile(result, fileName);
1131
- asyncUpload(file);
1212
+ asyncUpload(file, acquireBatchSeq());
1132
1213
  case 4:
1133
1214
  case "end":
1134
1215
  return _context2.stop();
1135
1216
  }
1136
1217
  }, _callee2);
1137
1218
  }));
1138
- return function (_x2) {
1139
- return _ref3.apply(this, arguments);
1219
+ return function (_x3) {
1220
+ return _ref5.apply(this, arguments);
1140
1221
  };
1141
1222
  }();
1142
1223
  reader.readAsDataURL(blob);
@@ -1170,7 +1251,8 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1170
1251
  // 手动上传模式, 一直返回false
1171
1252
  var beforeUpload = function beforeUpload(file) {
1172
1253
  var size = file.size / 1024 / 1024 < maxSize;
1173
- if (value.length > maxCount) {
1254
+ // 并发上传时用「已上传 + 待上传」一起判断,避免一次选多张时超出 maxCount
1255
+ if (valueRef.current.length + pendingCountRef.current >= maxCount) {
1174
1256
  message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
1175
1257
  return Upload.LIST_IGNORE;
1176
1258
  }
@@ -1178,7 +1260,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1178
1260
  message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
1179
1261
  return Upload.LIST_IGNORE;
1180
1262
  }
1181
- asyncUpload(file);
1263
+ asyncUpload(file, acquireBatchSeq());
1182
1264
  return Upload.LIST_IGNORE;
1183
1265
  };
1184
1266
  var handleDelete = function handleDelete(key) {
@@ -1275,6 +1357,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1275
1357
  name: "file",
1276
1358
  listType: "picture-card",
1277
1359
  maxCount: maxCount,
1360
+ multiple: true,
1278
1361
  className: styles$1.upload,
1279
1362
  beforeUpload: beforeUpload
1280
1363
  }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
@@ -1318,6 +1401,16 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1318
1401
  resetProps = _objectWithoutProperties(_ref, _excluded$7);
1319
1402
  var inputRef = useRef(null);
1320
1403
  var valueRef = useRef(value);
1404
+ // 并发上传时用于正确控制 loading 状态(多个文件同时上传)
1405
+ var uploadingCountRef = useRef(0);
1406
+ // 已选中待上传的文件数,用于数量预占,避免并发上传超过 maxCount
1407
+ var pendingCountRef = useRef(0);
1408
+ // 文件序号,保证并发上传时文件名唯一
1409
+ var seqRef = useRef(0);
1410
+ // 当前批次的文件选择序号,用于按选择顺序展示上传结果
1411
+ var batchSeqRef = useRef(0);
1412
+ // 当前批次的上传结果,按序号存储,最后统一排序合并
1413
+ var batchResultsRef = useRef(new Map());
1321
1414
  var _useState = useState(false),
1322
1415
  _useState2 = _slicedToArray(_useState, 2),
1323
1416
  uploading = _useState2[0],
@@ -1332,61 +1425,84 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1332
1425
  useEffect(function () {
1333
1426
  valueRef.current = value;
1334
1427
  }, [value]);
1428
+ var genFileName = function genFileName() {
1429
+ seqRef.current += 1;
1430
+ return "".concat(uniqueKey, "_").concat(seqRef.current, "_").concat(new Date().getTime(), ".jpg");
1431
+ };
1432
+ // 获取当前批次的文件选择序号;没有正在上传的文件时视为新一批,重置批次状态
1433
+ var acquireBatchSeq = function acquireBatchSeq() {
1434
+ if (pendingCountRef.current === 0) {
1435
+ batchSeqRef.current = 0;
1436
+ batchResultsRef.current.clear();
1437
+ }
1438
+ return batchSeqRef.current++;
1439
+ };
1335
1440
  var asyncUpload = /*#__PURE__*/function () {
1336
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
1337
- var _valueRef$current;
1338
- var formData, fileName, showName, _yield$request, success, data;
1441
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file, batchSeq) {
1442
+ var formData, fileName, showName, _yield$request, success, data, sorted;
1339
1443
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1340
1444
  while (1) switch (_context.prev = _context.next) {
1341
1445
  case 0:
1446
+ pendingCountRef.current += 1;
1447
+ uploadingCountRef.current += 1;
1342
1448
  setUploading(true);
1343
1449
  formData = new FormData();
1344
1450
  formData.append('file', file);
1345
- fileName = "".concat(uniqueKey, "_").concat(((_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.length) + 1, "_").concat(new Date().getTime(), ".jpg");
1451
+ fileName = genFileName();
1346
1452
  formData.append('fileName', fileName);
1347
1453
  showName = file.name.substring(0, file.name.lastIndexOf('.'));
1348
- _context.prev = 6;
1349
- _context.next = 9;
1454
+ _context.prev = 8;
1455
+ _context.next = 11;
1350
1456
  return request(actionUrl, {
1351
1457
  method: 'post',
1352
1458
  body: formData
1353
1459
  });
1354
- case 9:
1460
+ case 11:
1355
1461
  _yield$request = _context.sent;
1356
1462
  success = _yield$request.success;
1357
1463
  data = _yield$request.data;
1358
- if (!success) {
1359
- _context.next = 16;
1360
- break;
1361
- }
1362
- if (!(valueRef.current.length >= maxCount)) {
1363
- _context.next = 15;
1364
- break;
1464
+ if (success) {
1465
+ if (valueRef.current.length + batchResultsRef.current.size < maxCount) {
1466
+ // 先暂存到当前批次,等本批次全部完成后再按选择顺序合并
1467
+ batchResultsRef.current.set(batchSeq, {
1468
+ url: data,
1469
+ name: showName
1470
+ });
1471
+ }
1365
1472
  }
1366
- return _context.abrupt("return");
1367
- case 15:
1368
- handleChange([].concat(_toConsumableArray(valueRef.current), [{
1369
- url: data,
1370
- name: showName
1371
- }]));
1372
- case 16:
1373
- _context.next = 21;
1473
+ _context.next = 20;
1374
1474
  break;
1375
- case 18:
1376
- _context.prev = 18;
1377
- _context.t0 = _context["catch"](6);
1475
+ case 17:
1476
+ _context.prev = 17;
1477
+ _context.t0 = _context["catch"](8);
1378
1478
  message.error('图片上传失败');
1379
- case 21:
1380
- _context.prev = 21;
1381
- setUploading(false);
1382
- return _context.finish(21);
1383
- case 24:
1479
+ case 20:
1480
+ _context.prev = 20;
1481
+ pendingCountRef.current = Math.max(0, pendingCountRef.current - 1);
1482
+ uploadingCountRef.current = Math.max(0, uploadingCountRef.current - 1);
1483
+ // 本批次全部上传完成,按选择序号排序后一次性合并到 value
1484
+ if (pendingCountRef.current === 0 && batchResultsRef.current.size > 0) {
1485
+ sorted = _toConsumableArray(batchResultsRef.current.entries()).sort(function (a, b) {
1486
+ return a[0] - b[0];
1487
+ }).map(function (_ref3) {
1488
+ var _ref4 = _slicedToArray(_ref3, 2),
1489
+ v = _ref4[1];
1490
+ return v;
1491
+ });
1492
+ handleChange([].concat(_toConsumableArray(valueRef.current), _toConsumableArray(sorted)));
1493
+ batchResultsRef.current.clear();
1494
+ }
1495
+ if (uploadingCountRef.current === 0) {
1496
+ setUploading(false);
1497
+ }
1498
+ return _context.finish(20);
1499
+ case 26:
1384
1500
  case "end":
1385
1501
  return _context.stop();
1386
1502
  }
1387
- }, _callee, null, [[6, 18, 21, 24]]);
1503
+ }, _callee, null, [[8, 17, 20, 26]]);
1388
1504
  }));
1389
- return function asyncUpload(_x) {
1505
+ return function asyncUpload(_x, _x2) {
1390
1506
  return _ref2.apply(this, arguments);
1391
1507
  };
1392
1508
  }();
@@ -1402,24 +1518,24 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1402
1518
  return;
1403
1519
  }
1404
1520
  reader.onload = /*#__PURE__*/function () {
1405
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
1406
- var _e$target, _valueRef$current2;
1521
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
1522
+ var _e$target;
1407
1523
  var result, fileName, file;
1408
1524
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1409
1525
  while (1) switch (_context2.prev = _context2.next) {
1410
1526
  case 0:
1411
1527
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
1412
- fileName = "".concat(uniqueKey, "_").concat(((_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.length) + 1, "_").concat(new Date().getTime(), ".jpg");
1528
+ fileName = genFileName();
1413
1529
  file = dataURLtoFile(result, fileName);
1414
- asyncUpload(file);
1530
+ asyncUpload(file, acquireBatchSeq());
1415
1531
  case 4:
1416
1532
  case "end":
1417
1533
  return _context2.stop();
1418
1534
  }
1419
1535
  }, _callee2);
1420
1536
  }));
1421
- return function (_x2) {
1422
- return _ref3.apply(this, arguments);
1537
+ return function (_x3) {
1538
+ return _ref5.apply(this, arguments);
1423
1539
  };
1424
1540
  }();
1425
1541
  reader.readAsDataURL(blob);
@@ -1453,7 +1569,8 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1453
1569
  // 手动上传模式, 一直返回false
1454
1570
  var beforeUpload = function beforeUpload(file) {
1455
1571
  var size = file.size / 1024 / 1024 < maxSize;
1456
- if (value.length > maxCount) {
1572
+ // 并发上传时用「已上传 + 待上传」一起判断,避免一次选多张时超出 maxCount
1573
+ if (valueRef.current.length + pendingCountRef.current >= maxCount) {
1457
1574
  message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
1458
1575
  return Upload.LIST_IGNORE;
1459
1576
  }
@@ -1461,7 +1578,7 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1461
1578
  message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
1462
1579
  return Upload.LIST_IGNORE;
1463
1580
  }
1464
- asyncUpload(file);
1581
+ asyncUpload(file, acquireBatchSeq());
1465
1582
  return Upload.LIST_IGNORE;
1466
1583
  };
1467
1584
  var handleDelete = function handleDelete(key) {
@@ -1595,6 +1712,7 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1595
1712
  name: "file",
1596
1713
  listType: "picture-card",
1597
1714
  maxCount: maxCount,
1715
+ multiple: true,
1598
1716
  className: styles$2.uploadPro,
1599
1717
  beforeUpload: beforeUpload
1600
1718
  }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
@@ -8228,6 +8346,11 @@ var systemOrderMap = {
8228
8346
  no: 'dxdSystemOrderNo',
8229
8347
  ids: 'dxdSystemSelectIds',
8230
8348
  order: 'dxdSystemShowOrder'
8349
+ },
8350
+ TTX_SYSTEM_ORDER: {
8351
+ no: 'ttxSystemOrderNo',
8352
+ ids: 'ttxSystemSelectIds',
8353
+ order: 'ttxSystemShowOrder'
8231
8354
  }
8232
8355
  };
8233
8356
  //直接将key component 添加到 transformWorkOrderData中的componentProcessors
@@ -8514,7 +8637,7 @@ var processLogisticsInterception = function processLogisticsInterception(getValu
8514
8637
  address = every(address, function (item) {
8515
8638
  return !item;
8516
8639
  }) ? [] : address;
8517
- var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey'];
8640
+ var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode'];
8518
8641
  var map = subFields.reduce(function (cur, nxt) {
8519
8642
  return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
8520
8643
  }, {});
@@ -8695,10 +8818,14 @@ var processSceneStatus = function processSceneStatus(getValue) {
8695
8818
  BS_E3_WAREHOUSING_STATUS: 'bsE3InStockStatusItemList',
8696
8819
  MSG_STATUS: 'msgStatusValues',
8697
8820
  WDT_WAREHOUSING_STATUS: 'wdtInStockStatusItemList',
8821
+ WDT_WAREHOUSING_STATUS_V2: 'wdtInStockStatusV2ItemList',
8822
+ DXD_WAREHOUSING_STATUS: 'dxdInStockStatusItemList',
8698
8823
  JKY_WAREHOUSING_STATUS: 'jkyInStockStatusItemList',
8699
8824
  JST_WAREHOUSING_STATUS: 'jstInStockStatusItemList',
8825
+ TTX_WAREHOUSING_STATUS: 'ttxInStockStatusItemList',
8700
8826
  WLN_WAREHOUSING_STATUS: 'wlnInStockStatusItemList',
8701
- KM_WAREHOUSING_STATUS: 'kmInStockStatusItemList'
8827
+ KM_WAREHOUSING_STATUS: 'kmInStockStatusItemList',
8828
+ JY_WAREHOUSING_STATUS: 'jyInStockStatusItemList'
8702
8829
  };
8703
8830
  return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(STATUS_LIST_MAP[nex.workOrderComponentType])), []));
8704
8831
  };
@@ -8726,6 +8853,12 @@ var processErpLogistics = function processErpLogistics(getValue) {
8726
8853
  },
8727
8854
  SKX_LOGISTICS: {
8728
8855
  listKey: 'skxLogisticsList'
8856
+ },
8857
+ DXD_LOGISTICS: {
8858
+ listKey: 'dxdLogisticsList'
8859
+ },
8860
+ TTX_LOGISTICS: {
8861
+ listKey: 'ttxLogisticsList'
8729
8862
  }
8730
8863
  };
8731
8864
  var initValue = [{
@@ -8756,6 +8889,9 @@ var processErpSendGood = function processErpSendGood(getValue) {
8756
8889
  },
8757
8890
  GY_SEND_GOOD: {
8758
8891
  list: 'gySendGood'
8892
+ },
8893
+ TTX_SEND_GOOD: {
8894
+ list: 'ttxSendGood'
8759
8895
  }
8760
8896
  };
8761
8897
  var initValue = [{
@@ -8861,6 +8997,23 @@ var processDxdGoods = function processDxdGoods(templateColumns) {
8861
8997
  };
8862
8998
  };
8863
8999
  };
9000
+ var processTtxGoods = function processTtxGoods(templateColumns) {
9001
+ return function (getValue) {
9002
+ return function (nex, config) {
9003
+ var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
9004
+ return col.workOrderComponentType === 'TRADE_ID_INPUT';
9005
+ });
9006
+ var systemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
9007
+ return col.workOrderComponentType === 'TTX_SYSTEM_ORDER';
9008
+ });
9009
+ return _defineProperty({}, nex.uniqueKey, {
9010
+ ttxGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_ttxGoods")), []),
9011
+ orderNo: tradeId ? getValue("".concat(tradeId.uniqueKey, "_tradeId")) : '',
9012
+ selectIds: systemOrder ? jsonParseSecurity(getValue("".concat(systemOrder.uniqueKey, "_").concat(systemOrderMap.TTX_SYSTEM_ORDER.ids)), []) : []
9013
+ });
9014
+ };
9015
+ };
9016
+ };
8864
9017
  var processDxdSuppliers = function processDxdSuppliers(templateColumns) {
8865
9018
  return function (getValue) {
8866
9019
  return function (nex, config) {
@@ -9222,6 +9375,11 @@ var processErpSystemOrder = function processErpSystemOrder(getValue) {
9222
9375
  no: 'dxdSystemOrderNo',
9223
9376
  ids: 'dxdSystemSelectIds',
9224
9377
  order: 'dxdSystemShowOrder'
9378
+ },
9379
+ TTX_SYSTEM_ORDER: {
9380
+ no: 'ttxSystemOrderNo',
9381
+ ids: 'ttxSystemSelectIds',
9382
+ order: 'ttxSystemShowOrder'
9225
9383
  }
9226
9384
  };
9227
9385
  return _defineProperty({}, nex.uniqueKey, _objectSpread2({
@@ -9491,14 +9649,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
9491
9649
  };
9492
9650
  var processLabel = function processLabel(getValue) {
9493
9651
  return function (nex, config) {
9494
- var _ref79;
9495
- return _ref79 = {}, _defineProperty(_ref79, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref79, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref79;
9652
+ var _ref80;
9653
+ return _ref80 = {}, _defineProperty(_ref80, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref80, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref80;
9496
9654
  };
9497
9655
  };
9498
9656
  var processMemberLevel = function processMemberLevel(getValue) {
9499
9657
  return function (nex, config) {
9500
- var _ref80;
9501
- return _ref80 = {}, _defineProperty(_ref80, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref80, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref80;
9658
+ var _ref81;
9659
+ return _ref81 = {}, _defineProperty(_ref81, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref81, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref81;
9502
9660
  };
9503
9661
  };
9504
9662
  var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
@@ -9604,28 +9762,36 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
9604
9762
  BS_E3_WAREHOUSING_STATUS: processSceneStatus,
9605
9763
  MSG_STATUS: processSceneStatus,
9606
9764
  WDT_WAREHOUSING_STATUS: processSceneStatus,
9765
+ WDT_WAREHOUSING_STATUS_V2: processSceneStatus,
9766
+ DXD_WAREHOUSING_STATUS: processSceneStatus,
9607
9767
  WLN_WAREHOUSING_STATUS: processSceneStatus,
9608
9768
  JKY_WAREHOUSING_STATUS: processSceneStatus,
9609
9769
  JST_WAREHOUSING_STATUS: processSceneStatus,
9770
+ TTX_WAREHOUSING_STATUS: processSceneStatus,
9610
9771
  KM_WAREHOUSING_STATUS: processSceneStatus,
9772
+ JY_WAREHOUSING_STATUS: processSceneStatus,
9611
9773
  BS_LOGISTICS: processErpLogistics,
9612
9774
  WLN_LOGISTICS: processErpLogistics,
9613
9775
  WDT_LOGISTICS: processErpLogistics,
9614
9776
  GY_LOGISTICS: processErpLogistics,
9615
9777
  BS_E3_LOGISTICS: processErpLogistics,
9616
9778
  KM_LOGISTICS: processErpLogistics,
9779
+ DXD_LOGISTICS: processErpLogistics,
9780
+ TTX_LOGISTICS: processErpLogistics,
9617
9781
  BS_SEND_GOOD: processErpSendGood,
9618
9782
  WLN_SEND_GOOD: processErpSendGood,
9619
9783
  WDT_SEND_GOOD: processErpSendGood,
9620
9784
  BS_E3_SEND_GOOD: processErpSendGood,
9621
9785
  KM_SEND_GOOD: processErpSendGood,
9622
9786
  GY_SEND_GOOD: processErpSendGood,
9787
+ TTX_SEND_GOOD: processErpSendGood,
9623
9788
  KM_RETURN_WAREHOUSE: processErpReturnWarehouse,
9624
9789
  BS_POSTING: processBsPosting,
9625
9790
  BS_GOODS: processBsGoods,
9626
9791
  WDT_GOODS: processWdtGoods(templateColumns),
9627
9792
  JKY_GOODS: processJkyGoods(templateColumns),
9628
9793
  DXD_GOODS: processDxdGoods(templateColumns),
9794
+ TTX_GOODS: processTtxGoods(templateColumns),
9629
9795
  DXD_SUPPLIERS: processDxdSuppliers(templateColumns),
9630
9796
  WDT_AFTERSALE_GOODS: processWdtAftersaleGoods(templateColumns),
9631
9797
  JST_AFTERSALE_GOODS: processJstAftersaleGoods(templateColumns),
@@ -9654,6 +9820,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
9654
9820
  JST_SYSTEM_ORDER: processErpSystemOrder,
9655
9821
  GY_SYSTEM_ORDER: processErpSystemOrder,
9656
9822
  DXD_SYSTEM_ORDER: processErpSystemOrder,
9823
+ TTX_SYSTEM_ORDER: processErpSystemOrder,
9657
9824
  BUYER_MESSAGE_NOTICE: processBuyerMessageNotice,
9658
9825
  ORDER_TYPE: processOrderType,
9659
9826
  REFUND_TYPE: processRefundType,
@@ -10347,6 +10514,7 @@ var SubForm = function SubForm(props) {
10347
10514
  maxCount = props.maxCount;
10348
10515
  var ref = useRef(null);
10349
10516
  var isRequest = useRef(false);
10517
+ var cursorIdRef = useRef(null);
10350
10518
  var _useState = useState(false),
10351
10519
  _useState2 = _slicedToArray(_useState, 2),
10352
10520
  open = _useState2[0],
@@ -10590,6 +10758,7 @@ var SubForm = function SubForm(props) {
10590
10758
  };
10591
10759
  var getWorkOrderList = /*#__PURE__*/function () {
10592
10760
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10761
+ var _cursorIdRef$current;
10593
10762
  var _ref2,
10594
10763
  _ref2$pageNo,
10595
10764
  pageNo,
@@ -10597,9 +10766,13 @@ var SubForm = function SubForm(props) {
10597
10766
  componentList,
10598
10767
  params,
10599
10768
  queryComponents,
10769
+ cursorParams,
10770
+ queryKey,
10600
10771
  res,
10601
10772
  data,
10602
10773
  success,
10774
+ _cursorIdRef$current2,
10775
+ _cursorIdRef$current3,
10603
10776
  transDataSourceItem,
10604
10777
  headerKeys,
10605
10778
  newList,
@@ -10622,6 +10795,8 @@ var SubForm = function SubForm(props) {
10622
10795
  templateKey: workOrderTemplateId,
10623
10796
  needReturnRepeatValue: true,
10624
10797
  needFilterShopByPermission: needFilterShopByPermission,
10798
+ needTotal: false,
10799
+ useNext: true,
10625
10800
  queryComponents: [{
10626
10801
  key: 'flowStatus',
10627
10802
  symbol: 'in',
@@ -10634,30 +10809,51 @@ var SubForm = function SubForm(props) {
10634
10809
  symbol: 'in',
10635
10810
  value: flowStatus
10636
10811
  }];
10637
- if (['0qFEv9GEyd_returnLogisticsCode', 'jbCFrJV4m7_trajectoryCode'].includes(selectKey)) {
10638
- queryComponents.push({
10639
- key: selectKey,
10640
- symbol: 'like',
10641
- value: inputValue
10642
- });
10812
+ queryComponents.push({
10813
+ key: selectKey,
10814
+ symbol: 'in',
10815
+ value: [inputValue]
10816
+ });
10817
+ params.queryComponents = queryComponents;
10818
+ }
10819
+ params.queryComponents = params.queryComponents.filter(function (item) {
10820
+ var _item$value;
10821
+ if (item.key === 'flowStatus' && ((_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.length) === 4) {
10822
+ return false;
10643
10823
  } else {
10644
- queryComponents.push({
10645
- key: selectKey,
10646
- symbol: 'in',
10647
- value: [inputValue]
10648
- });
10824
+ return true;
10649
10825
  }
10650
- params.queryComponents = queryComponents;
10826
+ });
10827
+ cursorParams = _objectSpread2({}, params);
10828
+ delete cursorParams.pageNo;
10829
+ queryKey = JSON.stringify(cursorParams);
10830
+ if (((_cursorIdRef$current = cursorIdRef.current) === null || _cursorIdRef$current === void 0 ? void 0 : _cursorIdRef$current.queryKey) === queryKey) {
10831
+ if (cursorIdRef.current.cursorId) {
10832
+ params.cursorId = cursorIdRef.current.cursorId;
10833
+ }
10834
+ if (cursorIdRef.current.cursorCreated) {
10835
+ params.cursorCreated = cursorIdRef.current.cursorCreated;
10836
+ }
10837
+ } else {
10838
+ cursorIdRef.current = {
10839
+ queryKey: queryKey
10840
+ };
10651
10841
  }
10652
- _context.next = 7;
10653
- return extendRequest('/qy/view/workOrderList', {
10842
+ _context.next = 12;
10843
+ return extendRequest('/qy/view/workOrderListCached', {
10654
10844
  method: 'post',
10655
10845
  data: params
10656
10846
  });
10657
- case 7:
10847
+ case 12:
10658
10848
  res = _context.sent;
10659
10849
  data = res.data, success = res.success;
10660
10850
  if (success) {
10851
+ if ((data === null || data === void 0 ? void 0 : data.cursorId) && ((_cursorIdRef$current2 = cursorIdRef.current) === null || _cursorIdRef$current2 === void 0 ? void 0 : _cursorIdRef$current2.queryKey) === queryKey) {
10852
+ cursorIdRef.current.cursorId = data.cursorId;
10853
+ }
10854
+ if ((data === null || data === void 0 ? void 0 : data.cursorCreated) && ((_cursorIdRef$current3 = cursorIdRef.current) === null || _cursorIdRef$current3 === void 0 ? void 0 : _cursorIdRef$current3.queryKey) === queryKey) {
10855
+ cursorIdRef.current.cursorCreated = data.cursorCreated;
10856
+ }
10661
10857
  transDataSourceItem = transformWorkOrderData(componentDtoList.length ? componentDtoList : componentList, 'edit');
10662
10858
  headerKeys = correlationList.map(function (t) {
10663
10859
  return t.key;
@@ -10683,7 +10879,7 @@ var SubForm = function SubForm(props) {
10683
10879
  setHasMore((data === null || data === void 0 ? void 0 : data.list.length) === pageSize);
10684
10880
  isRequest.current = false;
10685
10881
  }
10686
- case 10:
10882
+ case 15:
10687
10883
  case "end":
10688
10884
  return _context.stop();
10689
10885
  }
@@ -11071,6 +11267,39 @@ function ApaasAddress(props) {
11071
11267
  }));
11072
11268
  }
11073
11269
 
11270
+ var YouzanStar = function YouzanStar(_ref) {
11271
+ var disabled = _ref.disabled,
11272
+ compact = _ref.compact,
11273
+ value = _ref.value,
11274
+ _onChange = _ref.onChange;
11275
+ var star = normalizeYouzanStar(value);
11276
+ if (compact) {
11277
+ return star ? /*#__PURE__*/React.createElement("span", {
11278
+ style: {
11279
+ display: 'inline-flex',
11280
+ alignItems: 'center',
11281
+ gap: 4,
11282
+ color: '#f8da14'
11283
+ }
11284
+ }, /*#__PURE__*/React.createElement("span", null, star), /*#__PURE__*/React.createElement(Rate$1, {
11285
+ count: 1,
11286
+ disabled: true,
11287
+ value: 1,
11288
+ style: {
11289
+ color: '#f8da14'
11290
+ }
11291
+ })) : null;
11292
+ }
11293
+ return /*#__PURE__*/React.createElement(Rate$1, {
11294
+ allowClear: !disabled,
11295
+ disabled: disabled,
11296
+ value: star || 0,
11297
+ onChange: function onChange(nextValue) {
11298
+ return _onChange === null || _onChange === void 0 ? void 0 : _onChange(normalizeYouzanStar(nextValue));
11299
+ }
11300
+ });
11301
+ };
11302
+
11074
11303
  var trade0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1MEQ1MkIyMjIzQUIxMUU0QjU5NjkwNDQxQkU4N0E1MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1MEQ1MkIyMzIzQUIxMUU0QjU5NjkwNDQxQkU4N0E1MiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjUwRDUyQjIwMjNBQjExRTRCNTk2OTA0NDFCRTg3QTUyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjUwRDUyQjIxMjNBQjExRTRCNTk2OTA0NDFCRTg3QTUyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+PFEh+QAAAPhJREFUeNqM0MFKAkEcx/FZNcwSihBBT3oRog4RBHnqoiA+SuAL7J73Fbz7Ah5DOiw5QcdOQUhECoL1BBpC0/eP/0URUf/wYWaH+c3Ofzzf97+NMR1kcY85BuiqLxSRD8PQppgk0MC7WdQBLpWPsWzGC+qy+QEVfMBpKB7lwBKOcBUEwZkEnnCoJ/+YZbkVUjncSOBZF8sr11qvOHQngRHecK3NSnkbSDWT1tq/KIrOtfFIr9aGxRRpnGhgmNLJI1qYyW95vt/4LjR6yiAHZvDqOedkscDHpzwdm2tmS0kPhk0TSeOWcG5nQKuHY1T3DfR1vNgW+BdgACxMP/P+iLA3AAAAAElFTkSuQmCC";
11075
11304
 
11076
11305
  var trade1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFQ0NGNkNCNjIzQUExMUU0OTZDM0UxQUI1MEVCOUU2RSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFQ0NGNkNCNzIzQUExMUU0OTZDM0UxQUI1MEVCOUU2RSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkVDQ0Y2Q0I0MjNBQTExRTQ5NkMzRTFBQjUwRUI5RTZFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkVDQ0Y2Q0I1MjNBQTExRTQ5NkMzRTFBQjUwRUI5RTZFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+WQ64bQAAAPVJREFUeNqM0M9KQkEUx/GZwUDNhYQItjKCQNyEEOSqVZtewHcQfIE2Posv0FIiWvQHLDeuBBEXUgTX3LmxRHH6njgXrnC5eODDzFzmNzPn2jdrZ8aYDnJoYo0x7tQUxyhebrcvlsCcRYARGma3NviSzegRuHZMujjDBF43hmMKZWRx/u7ckQSekMYBviOn+wipAi4k8KofT/RZcRWGriTwgSFq2qyUjSF142hko886xQJ93KKt/X1GbvpJ6eQBLfzKtRyyCnfQaJ6hggwGxntv+LUlLPEo6yTSg+HE4D/NlBMLJqFcZH6PQ9T3DTzrWE0K/AkwAPKxWrUjgeKsAAAAAElFTkSuQmCC";
@@ -11087,6 +11316,7 @@ var TextArea$2 = Input.TextArea;
11087
11316
  var imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
11088
11317
  var RemarkInput = function RemarkInput(props) {
11089
11318
  var isShowFlag = props.isShowFlag,
11319
+ isYouzan = props.isYouzan,
11090
11320
  value = props.value,
11091
11321
  onChange = props.onChange,
11092
11322
  disabled = props.disabled;
@@ -11103,6 +11333,11 @@ var RemarkInput = function RemarkInput(props) {
11103
11333
  });
11104
11334
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
11105
11335
  };
11336
+ var changeStar = function changeStar(star) {
11337
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11338
+ flag: star
11339
+ }));
11340
+ };
11106
11341
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextArea$2, {
11107
11342
  disabled: disabled,
11108
11343
  rows: 4,
@@ -11110,7 +11345,19 @@ var RemarkInput = function RemarkInput(props) {
11110
11345
  placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8",
11111
11346
  key: "remark",
11112
11347
  onChange: changeRemark
11113
- }), isShowFlag && /*#__PURE__*/React.createElement(Radio.Group, {
11348
+ }), isShowFlag && isYouzan && /*#__PURE__*/React.createElement("div", {
11349
+ style: {
11350
+ marginTop: '12px'
11351
+ }
11352
+ }, /*#__PURE__*/React.createElement("span", {
11353
+ style: {
11354
+ marginRight: '8px'
11355
+ }
11356
+ }, "\u661F\u6807\uFF1A"), /*#__PURE__*/React.createElement(YouzanStar, {
11357
+ disabled: disabled,
11358
+ value: value === null || value === void 0 ? void 0 : value.flag,
11359
+ onChange: changeStar
11360
+ })), isShowFlag && !isYouzan && /*#__PURE__*/React.createElement(Radio.Group, {
11114
11361
  style: {
11115
11362
  marginTop: '12px'
11116
11363
  },
@@ -13295,7 +13542,6 @@ var Item = Form.Item;
13295
13542
  var LogisticsInterception = function LogisticsInterception(props) {
13296
13543
  var _value$interceptLogis3, _value$interceptLogis4, _value$interceptLogis5;
13297
13544
  var LogisticsAddress = LogisticsAddressData.getInstance();
13298
- var LogisticsAddressOptions = (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
13299
13545
  var address = AddressData.getInstance();
13300
13546
  var _props$value = props.value,
13301
13547
  value = _props$value === void 0 ? {} : _props$value,
@@ -13333,6 +13579,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
13333
13579
  _useState8 = _slicedToArray(_useState7, 2),
13334
13580
  isInterface = _useState8[0],
13335
13581
  setIsInterface = _useState8[1];
13582
+ var _useState9 = useState(function () {
13583
+ return (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
13584
+ }),
13585
+ _useState10 = _slicedToArray(_useState9, 2),
13586
+ logisticsAddressData = _useState10[0],
13587
+ setLogisticsAddressData = _useState10[1];
13336
13588
  useEffect(function () {
13337
13589
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) {
13338
13590
  setTypeOptions([]);
@@ -13347,6 +13599,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13347
13599
  setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.logisticsStatusList) || []);
13348
13600
  setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
13349
13601
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13602
+ useEffect(function () {
13603
+ if (!isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany) && (value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode) !== undefined) {
13604
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13605
+ interceptLogisticsCustomerCode: undefined
13606
+ }));
13607
+ }
13608
+ }, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode]);
13350
13609
  //拦截类型切换 需要清空派送地址
13351
13610
  useEffect(function () {
13352
13611
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) return;
@@ -13409,6 +13668,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
13409
13668
  }
13410
13669
  return isShow;
13411
13670
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13671
+ var showCustomerCode = useMemo(function () {
13672
+ return isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
13673
+ }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13412
13674
  //判断是否能修改物流信息
13413
13675
  var isEdit = useMemo(function () {
13414
13676
  var company = expressInterceptData.find(function (item) {
@@ -13420,13 +13682,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13420
13682
  var baseFieldDisabled = disabled || isEdit && !canEditPreCreateBaseFields;
13421
13683
  //退回地址列表
13422
13684
  var logisticsAddressOptions = useMemo(function () {
13423
- return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13685
+ return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13424
13686
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
13425
13687
  });
13426
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13688
+ }, [logisticsAddressData, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13427
13689
  // K码列表
13428
13690
  var kCodeList = useMemo(function () {
13429
- return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13691
+ return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13430
13692
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany) && item.userKCode;
13431
13693
  }).map(function (item) {
13432
13694
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -13434,7 +13696,45 @@ var LogisticsInterception = function LogisticsInterception(props) {
13434
13696
  label: item === null || item === void 0 ? void 0 : item.userKCode
13435
13697
  });
13436
13698
  });
13437
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13699
+ }, [logisticsAddressData, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13700
+ var customerCodeOptions = useMemo(function () {
13701
+ return getJdCustomerCodeOptions(logisticsAddressData);
13702
+ }, [logisticsAddressData]);
13703
+ var refreshLogisticsAddressOptions = /*#__PURE__*/function () {
13704
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
13705
+ var _yield$request, data, latestData;
13706
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13707
+ while (1) switch (_context.prev = _context.next) {
13708
+ case 0:
13709
+ _context.prev = 0;
13710
+ _context.next = 3;
13711
+ return request$1({
13712
+ url: '/qy/userConfig/listLogisticsAddress',
13713
+ method: 'get',
13714
+ data: {}
13715
+ });
13716
+ case 3:
13717
+ _yield$request = _context.sent;
13718
+ data = _yield$request.data;
13719
+ latestData = data || [];
13720
+ LogisticsAddress.setaddressData(latestData);
13721
+ setLogisticsAddressData(latestData);
13722
+ _context.next = 13;
13723
+ break;
13724
+ case 10:
13725
+ _context.prev = 10;
13726
+ _context.t0 = _context["catch"](0);
13727
+ console.log(_context.t0);
13728
+ case 13:
13729
+ case "end":
13730
+ return _context.stop();
13731
+ }
13732
+ }, _callee, null, [[0, 10]]);
13733
+ }));
13734
+ return function refreshLogisticsAddressOptions() {
13735
+ return _ref.apply(this, arguments);
13736
+ };
13737
+ }();
13438
13738
  var returnValue = useMemo(function () {
13439
13739
  var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
13440
13740
  var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
@@ -13490,9 +13790,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
13490
13790
  // userSecretKey: '12345678',
13491
13791
  // },
13492
13792
  // ];
13493
- var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13494
- return item.cpCode === val && item.userKCode;
13495
- });
13496
13793
  newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
13497
13794
  interceptCompany: val,
13498
13795
  interceptType: (_defaultInterceptType = defaultInterceptType) === null || _defaultInterceptType === void 0 ? void 0 : _defaultInterceptType.value,
@@ -13511,7 +13808,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
13511
13808
  },
13512
13809
  interceptLogisticsApiStatusReason: undefined,
13513
13810
  interceptLogisticsUserKCode: undefined,
13514
- interceptLogisticsUserSecretKey: undefined
13811
+ interceptLogisticsUserSecretKey: undefined,
13812
+ interceptLogisticsCustomerCode: undefined
13515
13813
  });
13516
13814
  }
13517
13815
  if (type === 'interceptLogisticsApiStatus') {
@@ -13592,7 +13890,41 @@ var LogisticsInterception = function LogisticsInterception(props) {
13592
13890
  return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur((_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim(), 'interceptCode');
13593
13891
  },
13594
13892
  value: value === null || value === void 0 ? void 0 : value.interceptCode
13595
- }))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
13893
+ }))), /*#__PURE__*/React.createElement(Item, {
13894
+ label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801", platform === 'pc' ? /*#__PURE__*/React.createElement(React.Fragment, null, "\uFF1A", /*#__PURE__*/React.createElement(Typography.Link, {
13895
+ style: {
13896
+ cursor: 'pointer'
13897
+ },
13898
+ onClick: function onClick() {
13899
+ return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
13900
+ type: 'interceptConfig',
13901
+ state: {
13902
+ tab: 'JDLCodeRelation'
13903
+ }
13904
+ }));
13905
+ }
13906
+ }, 'K码/EBU码配置>>')) : null),
13907
+ required: showCustomerCode,
13908
+ key: 'interceptLogisticsCustomerCode',
13909
+ hidden: !showCustomerCode
13910
+ }, /*#__PURE__*/React.createElement(Select, {
13911
+ disabled: disabled,
13912
+ placeholder: "\u9009\u62E9\u5BA2\u6237\u7F16\u7801",
13913
+ notFoundContent: "\u6682\u65E0\u5BA2\u6237\u7F16\u7801\u914D\u7F6E\uFF0C\u8BF7\u5148\u524D\u5F80K\u7801/EBU\u7801\u914D\u7F6E>>",
13914
+ showSearch: true,
13915
+ style: {
13916
+ width: '200px'
13917
+ },
13918
+ onChange: function onChange(val) {
13919
+ return changeHandle(val, 'interceptLogisticsCustomerCode');
13920
+ },
13921
+ onFocus: refreshLogisticsAddressOptions,
13922
+ options: customerCodeOptions,
13923
+ value: value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode,
13924
+ filterOption: function filterOption(input, option) {
13925
+ return option.label.includes(input);
13926
+ }
13927
+ })), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
13596
13928
  label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React.createElement(Typography.Link, {
13597
13929
  style: {
13598
13930
  cursor: 'pointer'
@@ -13637,7 +13969,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13637
13969
  value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
13638
13970
  }))), /*#__PURE__*/React.createElement(Item, {
13639
13971
  label: '拦截类型',
13640
- required: required,
13972
+ required: required && !showCustomerCode,
13641
13973
  key: 'interceptType'
13642
13974
  }, /*#__PURE__*/React.createElement(Select, {
13643
13975
  disabled: baseFieldDisabled,
@@ -14277,14 +14609,14 @@ var jstGoods = function jstGoods(props) {
14277
14609
  showField = _props$showField === void 0 ? '' : _props$showField,
14278
14610
  _props$platformType = props.platformType,
14279
14611
  platformType = _props$platformType === void 0 ? 'default' : _props$platformType,
14280
- onlyShowFieldSelect = props.onlyShowFieldSelect,
14281
- logisticsCompanyFormType = props.logisticsCompanyFormType;
14612
+ logisticsCompanyFormType = props.logisticsCompanyFormType,
14613
+ form = props.form;
14282
14614
  var _useState = useState(0),
14283
14615
  _useState2 = _slicedToArray(_useState, 2),
14284
14616
  changeIndex = _useState2[0],
14285
14617
  setChangeIndex = _useState2[1]; //选中的包裹
14286
14618
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
14287
- var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst', 'jy', 'jky', 'wln', 'dxd'].includes(platformType);
14619
+ var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst', 'jy', 'jky', 'wln', 'dxd', 'ttx'].includes(platformType);
14288
14620
  var expressDateInstance = ExpressData.getInstance(platformType);
14289
14621
  var isSendGoodSavedId = isSelectName && !['jst', 'wln'].includes(platformType);
14290
14622
  useEffect(function () {
@@ -14293,6 +14625,28 @@ var jstGoods = function jstGoods(props) {
14293
14625
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
14294
14626
  }
14295
14627
  }, [value, type]);
14628
+ useEffect(function () {
14629
+ //丢失sendSnapshotName,未找到具体原因,兜底处理
14630
+ if (type === 3 && isSendGoodSavedId && value && value.length && value.some(function (item) {
14631
+ return !item.sendSnapshotName;
14632
+ }) && value.every(function (item) {
14633
+ return item.sendId;
14634
+ })) {
14635
+ var orderNo = form === null || form === void 0 ? void 0 : form.getFieldValue('m3ap1EvEyd');
14636
+ console.log('发货仓走兜底处理-oldValue--', orderNo, cloneDeep(value));
14637
+ var newValue = cloneDeep(value).map(function (item) {
14638
+ if (item.sendSnapshotName || !item.sendId) return item;
14639
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14640
+ sendSnapshotName: SendDataCenter.getInstance(platformType).getSendNameByCode(item.sendId)
14641
+ });
14642
+ });
14643
+ Monitor.automaticReport({
14644
+ message: "\u53D1\u8D27\u4ED3\u8D70\u515C\u5E95\u5904\u7406-".concat(orderNo || '', "-oldValue-").concat(JSON.stringify(cloneDeep(value)), ",newValue-").concat(JSON.stringify(cloneDeep(newValue)))
14645
+ });
14646
+ console.log('发货仓走兜底处理-newValue--', orderNo, cloneDeep(newValue));
14647
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14648
+ }
14649
+ }, [JSON.stringify(value || []), type]);
14296
14650
  useEffect(function () {
14297
14651
  if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
14298
14652
  setChangeIndex(0);
@@ -14318,12 +14672,10 @@ var jstGoods = function jstGoods(props) {
14318
14672
  }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
14319
14673
  }));
14320
14674
  };
14321
- var handleSelected = function handleSelected(val, type, option, onlyShowFieldSelect) {
14675
+ var handleSelected = function handleSelected(val, type, option) {
14322
14676
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
14323
14677
  changeOrderInfo[type] = val;
14324
- if (!onlyShowFieldSelect) {
14325
- changeOrderInfo['sendId'] = option.value;
14326
- }
14678
+ changeOrderInfo['sendId'] = option.value;
14327
14679
  if (isSelectName && type === 'sendName') {
14328
14680
  if (isSendGoodSavedId) {
14329
14681
  // 如果发货仓名称存的是id,将名称存入快照
@@ -14338,12 +14690,10 @@ var jstGoods = function jstGoods(props) {
14338
14690
  newList[changeIndex] = changeOrderInfo;
14339
14691
  onChange === null || onChange === void 0 ? void 0 : onChange(newList);
14340
14692
  };
14341
- var handleSelectedReturn = function handleSelectedReturn(val, type, option, onlyShowFieldSelect) {
14693
+ var handleSelectedReturn = function handleSelectedReturn(val, type, option) {
14342
14694
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
14343
14695
  changeOrderInfo[type] = val;
14344
- if (!onlyShowFieldSelect) {
14345
- changeOrderInfo['returnWarehouseId'] = option.value;
14346
- }
14696
+ changeOrderInfo['returnWarehouseId'] = option.value;
14347
14697
  if (isSelectName && type === 'returnWarehouseName') {
14348
14698
  // 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
14349
14699
  changeOrderInfo['sendSnapshotId'] = option.value;
@@ -14450,7 +14800,7 @@ var jstGoods = function jstGoods(props) {
14450
14800
  filterOption: filterOption,
14451
14801
  value: ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendSnapshotId) || ((_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName) || null,
14452
14802
  onChange: function onChange(value, option) {
14453
- return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
14803
+ return handleSelected(value, 'sendName', option);
14454
14804
  }
14455
14805
  }) : /*#__PURE__*/React.createElement(Input, {
14456
14806
  disabled: disabled,
@@ -14485,7 +14835,7 @@ var jstGoods = function jstGoods(props) {
14485
14835
  filterOption: filterOption,
14486
14836
  value: ((_value$changeIndex15 = value[changeIndex]) === null || _value$changeIndex15 === void 0 ? void 0 : _value$changeIndex15.sendSnapshotId) || ((_value$changeIndex16 = value[changeIndex]) === null || _value$changeIndex16 === void 0 ? void 0 : _value$changeIndex16.returnWarehouseName) || null,
14487
14837
  onChange: function onChange(value, option) {
14488
- return handleSelectedReturn(value, 'returnWarehouseName', option, onlyShowFieldSelect);
14838
+ return handleSelectedReturn(value, 'returnWarehouseName', option);
14489
14839
  }
14490
14840
  }) : /*#__PURE__*/React.createElement(Input, {
14491
14841
  disabled: disabled,
@@ -16105,6 +16455,227 @@ var useGetColumns = (function (type) {
16105
16455
  return [columns, showColumnsDataIndexList, loading];
16106
16456
  });
16107
16457
 
16458
+ var ACTION_CONFIG = {
16459
+ JST_ERP: [{
16460
+ sourceField: 'styleCode',
16461
+ requestField: 'styleCodes'
16462
+ }, {
16463
+ sourceField: 'goodNo',
16464
+ requestField: 'goodNos'
16465
+ }],
16466
+ WLN_ERP: [{
16467
+ sourceField: 'goodNo',
16468
+ requestField: 'goodNos'
16469
+ }, {
16470
+ sourceField: 'specNo',
16471
+ requestField: 'skuCodes'
16472
+ }],
16473
+ WDT_ERP: [{
16474
+ sourceField: 'goodNo',
16475
+ requestField: 'goodNos'
16476
+ }, {
16477
+ sourceField: 'skuCode',
16478
+ requestField: 'skuCodes'
16479
+ }],
16480
+ GY_ERP: [{
16481
+ sourceField: 'goodNo',
16482
+ requestField: 'goodNos'
16483
+ }],
16484
+ JY_ERP: [{
16485
+ sourceField: 'goodNo',
16486
+ requestField: 'goodNos'
16487
+ }, {
16488
+ sourceField: 'skuCode',
16489
+ requestField: 'skuCodes'
16490
+ }],
16491
+ KM_ERP: [{
16492
+ sourceField: 'goodNo',
16493
+ requestField: 'goodNos'
16494
+ }, {
16495
+ sourceField: 'skuCode',
16496
+ requestField: 'skuCodes'
16497
+ }]
16498
+ };
16499
+ var getSearchValue = function getSearchValue(value) {
16500
+ var _value$inputValue;
16501
+ var inputValue = (_value$inputValue = value === null || value === void 0 ? void 0 : value.inputValue) !== null && _value$inputValue !== void 0 ? _value$inputValue : value;
16502
+ if (inputValue === undefined || inputValue === null) return '';
16503
+ return String(inputValue).trim();
16504
+ };
16505
+ var getSkuType = function getSkuType(platform, formData) {
16506
+ if (platform !== 'JST_ERP' && platform !== 'WLN_ERP') return undefined;
16507
+ var values = Array.isArray(formData.skuType) ? formData.skuType : [formData.skuType];
16508
+ var skuTypes = values.filter(function (value) {
16509
+ return value === 'normal' || value === 'combine';
16510
+ });
16511
+ return skuTypes.length === 1 ? skuTypes[0] : undefined;
16512
+ };
16513
+ var getReSyncActions = function getReSyncActions(platform, total, formData) {
16514
+ if (total !== 0) return [];
16515
+ var skuType = getSkuType(platform, formData);
16516
+ var requestData = _objectSpread2({
16517
+ platform: platform
16518
+ }, skuType ? {
16519
+ skuType: skuType
16520
+ } : {});
16521
+ var values = [];
16522
+ ACTION_CONFIG[platform].forEach(function (config) {
16523
+ var value = getSearchValue(formData[config.sourceField]);
16524
+ if (!value) return;
16525
+ requestData[config.requestField] = [value];
16526
+ values.push(value);
16527
+ });
16528
+ if (!values.length) return [];
16529
+ return [{
16530
+ key: 'goods',
16531
+ label: '同步商品',
16532
+ targetName: '商品',
16533
+ value: values.join('、'),
16534
+ requestData: requestData
16535
+ }];
16536
+ };
16537
+
16538
+ var useGoodsReSyncQuery = function useGoodsReSyncQuery(service) {
16539
+ var _React$useState = React.useState({
16540
+ total: null,
16541
+ formData: {}
16542
+ }),
16543
+ _React$useState2 = _slicedToArray(_React$useState, 2),
16544
+ queryState = _React$useState2[0],
16545
+ setQueryState = _React$useState2[1];
16546
+ var serviceWithReSyncState = React.useCallback(function (pagination, formData) {
16547
+ var currentFormData = formData;
16548
+ setQueryState({
16549
+ total: null,
16550
+ formData: currentFormData
16551
+ });
16552
+ return service(pagination, formData).then(function (result) {
16553
+ setQueryState({
16554
+ total: result.total,
16555
+ formData: currentFormData
16556
+ });
16557
+ return result;
16558
+ }, function (error) {
16559
+ setQueryState({
16560
+ total: null,
16561
+ formData: currentFormData
16562
+ });
16563
+ throw error;
16564
+ });
16565
+ }, [service]);
16566
+ return [serviceWithReSyncState, queryState];
16567
+ };
16568
+ var getErrorMessage = function getErrorMessage(error, action) {
16569
+ var _error$data;
16570
+ return (error === null || error === void 0 ? void 0 : (_error$data = error.data) === null || _error$data === void 0 ? void 0 : _error$data.message) || (error === null || error === void 0 ? void 0 : error.message) || "".concat(action.label, "\u5931\u8D25");
16571
+ };
16572
+ var GoodsReSync = function GoodsReSync(_ref) {
16573
+ var platform = _ref.platform,
16574
+ queryState = _ref.queryState,
16575
+ onSuccess = _ref.onSuccess;
16576
+ var _React$useState3 = React.useState(null),
16577
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
16578
+ loadingAction = _React$useState4[0],
16579
+ setLoadingAction = _React$useState4[1];
16580
+ var actions = getReSyncActions(platform, queryState.total, queryState.formData);
16581
+ var handleReSync = function handleReSync(action) {
16582
+ Modal.confirm({
16583
+ title: "\u786E\u8BA4".concat(action.label),
16584
+ content: "\u5C06\u4ECE ERP \u91CD\u65B0\u62C9\u53D6".concat(action.targetName, "\u201C").concat(action.value, "\u201D\u5E76\u8986\u76D6\u672C\u5730\u6570\u636E"),
16585
+ okText: '确认同步',
16586
+ cancelText: '取消',
16587
+ onOk: function () {
16588
+ var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
16589
+ var response;
16590
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
16591
+ while (1) switch (_context.prev = _context.next) {
16592
+ case 0:
16593
+ setLoadingAction(action.key);
16594
+ _context.prev = 1;
16595
+ _context.next = 4;
16596
+ return extendRequest('/qy/gdfw/product/reSync', {
16597
+ method: 'post',
16598
+ timeout: 60000,
16599
+ data: action.requestData
16600
+ });
16601
+ case 4:
16602
+ response = _context.sent;
16603
+ if (!((response === null || response === void 0 ? void 0 : response.success) === false)) {
16604
+ _context.next = 7;
16605
+ break;
16606
+ }
16607
+ throw new Error(response.message || "".concat(action.label, "\u5931\u8D25"));
16608
+ case 7:
16609
+ message.success((response === null || response === void 0 ? void 0 : response.message) || "".concat(action.label, "\u6210\u529F"));
16610
+ _context.next = 10;
16611
+ return onSuccess();
16612
+ case 10:
16613
+ _context.next = 16;
16614
+ break;
16615
+ case 12:
16616
+ _context.prev = 12;
16617
+ _context.t0 = _context["catch"](1);
16618
+ message.error(getErrorMessage(_context.t0, action));
16619
+ throw _context.t0;
16620
+ case 16:
16621
+ _context.prev = 16;
16622
+ setLoadingAction(null);
16623
+ return _context.finish(16);
16624
+ case 19:
16625
+ case "end":
16626
+ return _context.stop();
16627
+ }
16628
+ }, _callee, null, [[1, 12, 16, 19]]);
16629
+ }));
16630
+ function onOk() {
16631
+ return _onOk.apply(this, arguments);
16632
+ }
16633
+ return onOk;
16634
+ }()
16635
+ });
16636
+ };
16637
+ return /*#__PURE__*/React.createElement(Empty, {
16638
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
16639
+ description: actions.length ? /*#__PURE__*/React.createElement(Space, {
16640
+ size: 8
16641
+ }, actions.map(function (action) {
16642
+ return /*#__PURE__*/React.createElement(Button, {
16643
+ key: action.key,
16644
+ loading: loadingAction === action.key,
16645
+ disabled: loadingAction !== null && loadingAction !== action.key,
16646
+ onClick: function onClick() {
16647
+ return handleReSync(action);
16648
+ }
16649
+ }, action.label);
16650
+ })) : '暂无数据'
16651
+ });
16652
+ };
16653
+
16654
+ var transformFormData = function transformFormData(formData) {
16655
+ var conditionList = [];
16656
+ for (var key in formData) {
16657
+ if (formData[key]) {
16658
+ var _formData$key, _formData$key2, _formData$key3, _formData$key4;
16659
+ var value = ((_formData$key = formData[key]) === null || _formData$key === void 0 ? void 0 : _formData$key.type) ? (_formData$key2 = formData[key]) === null || _formData$key2 === void 0 ? void 0 : _formData$key2.inputValue : formData[key];
16660
+ var compareSymbol = ((_formData$key3 = formData[key]) === null || _formData$key3 === void 0 ? void 0 : _formData$key3.type) ? (_formData$key4 = formData[key]) === null || _formData$key4 === void 0 ? void 0 : _formData$key4.type : Array.isArray(value) ? 'eq' : 'like';
16661
+ var hasValue = Array.isArray(value) ? value.length > 0 : !isNull(value);
16662
+ if (hasValue) {
16663
+ conditionList.push({
16664
+ leftValue: key,
16665
+ compareSymbol: compareSymbol,
16666
+ rightValue: value
16667
+ });
16668
+ }
16669
+ }
16670
+ }
16671
+ return conditionList;
16672
+ };
16673
+ var shouldSubmitOnBlur = function shouldSubmitOnBlur(relatedTarget) {
16674
+ var _target$closest;
16675
+ var target = relatedTarget;
16676
+ return !(target === null || target === void 0 ? void 0 : (_target$closest = target.closest) === null || _target$closest === void 0 ? void 0 : _target$closest.call(target, '.search-form-actions'));
16677
+ };
16678
+
16108
16679
  var compareSymbolList = [{
16109
16680
  label: '模糊',
16110
16681
  value: 'like'
@@ -16119,11 +16690,13 @@ var OptionalInput = function OptionalInput(props) {
16119
16690
  placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
16120
16691
  onPressEnter = props.onPressEnter,
16121
16692
  onBlur = props.onBlur,
16122
- formItemProps = props.formItemProps;
16693
+ formItemProps = props.formItemProps,
16694
+ _props$defaultCompare = props.defaultCompareSymbol,
16695
+ defaultCompareSymbol = _props$defaultCompare === void 0 ? 'like' : _props$defaultCompare;
16123
16696
  var handleSelectChange = function handleSelectChange(compareSymbol) {
16124
16697
  if (typeof onChange === 'function') {
16125
16698
  onChange({
16126
- type: compareSymbol || 'like',
16699
+ type: compareSymbol || defaultCompareSymbol,
16127
16700
  inputValue: value === null || value === void 0 ? void 0 : value.inputValue
16128
16701
  });
16129
16702
  }
@@ -16131,16 +16704,22 @@ var OptionalInput = function OptionalInput(props) {
16131
16704
  var handleInputChange = function handleInputChange(e) {
16132
16705
  if (typeof onChange === 'function') {
16133
16706
  onChange({
16134
- type: (value === null || value === void 0 ? void 0 : value.type) || 'like',
16707
+ type: (value === null || value === void 0 ? void 0 : value.type) || defaultCompareSymbol,
16135
16708
  inputValue: e.target.value
16136
16709
  });
16137
16710
  }
16138
16711
  };
16712
+ var handleBlur = function handleBlur(event) {
16713
+ var nextTarget = event.relatedTarget;
16714
+ if (nextTarget && event.currentTarget.contains(nextTarget)) return;
16715
+ if (typeof onBlur === 'function') onBlur(event);
16716
+ };
16139
16717
  return /*#__PURE__*/React.createElement("div", {
16140
16718
  style: {
16141
16719
  display: 'flex',
16142
16720
  alignItems: 'center'
16143
- }
16721
+ },
16722
+ onBlur: handleBlur
16144
16723
  }, /*#__PURE__*/React.createElement(Select, {
16145
16724
  className: "optional-input-select",
16146
16725
  style: {
@@ -16148,8 +16727,7 @@ var OptionalInput = function OptionalInput(props) {
16148
16727
  },
16149
16728
  options: compareSymbolList,
16150
16729
  onChange: handleSelectChange,
16151
- value: (value === null || value === void 0 ? void 0 : value.type) || 'like',
16152
- onBlur: onBlur
16730
+ value: (value === null || value === void 0 ? void 0 : value.type) || defaultCompareSymbol
16153
16731
  }), /*#__PURE__*/React.createElement(Input, _objectSpread2({
16154
16732
  style: {
16155
16733
  width: '150px'
@@ -16158,7 +16736,6 @@ var OptionalInput = function OptionalInput(props) {
16158
16736
  placeholder: placeholder,
16159
16737
  onChange: handleInputChange,
16160
16738
  onPressEnter: onPressEnter,
16161
- onBlur: onBlur,
16162
16739
  value: value === null || value === void 0 ? void 0 : value.inputValue
16163
16740
  }, formItemProps)));
16164
16741
  };
@@ -16168,11 +16745,16 @@ function SearchForm(_ref) {
16168
16745
  form = _ref.form,
16169
16746
  showColumnsDataIndexList = _ref.showColumnsDataIndexList,
16170
16747
  submit = _ref.submit,
16171
- reset = _ref.reset;
16748
+ reset = _ref.reset,
16749
+ _ref$optionalInputDef = _ref.optionalInputDefaultCompareSymbol,
16750
+ optionalInputDefaultCompareSymbol = _ref$optionalInputDef === void 0 ? 'like' : _ref$optionalInputDef;
16172
16751
  var _useState = useState({}),
16173
16752
  _useState2 = _slicedToArray(_useState, 2),
16174
16753
  searchData = _useState2[0],
16175
16754
  setSearchData = _useState2[1];
16755
+ var visibleFieldNames = (showColumnsDataIndexList === null || showColumnsDataIndexList === void 0 ? void 0 : showColumnsDataIndexList.length) ? showColumnsDataIndexList : searchFormData.map(function (item) {
16756
+ return item.dataIndex || item.name;
16757
+ });
16176
16758
  var submitForm = /*#__PURE__*/function () {
16177
16759
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(submitBtnClickFlag) {
16178
16760
  var values;
@@ -16197,6 +16779,10 @@ function SearchForm(_ref) {
16197
16779
  return _ref2.apply(this, arguments);
16198
16780
  };
16199
16781
  }();
16782
+ var submitFormOnBlur = function submitFormOnBlur(event) {
16783
+ if (!shouldSubmitOnBlur(event.relatedTarget)) return;
16784
+ submitForm();
16785
+ };
16200
16786
  return /*#__PURE__*/React.createElement(Form, {
16201
16787
  layout: "inline",
16202
16788
  form: form,
@@ -16208,7 +16794,7 @@ function SearchForm(_ref) {
16208
16794
  type = item.type,
16209
16795
  _item$formItemProps = item.formItemProps,
16210
16796
  formItemProps = _item$formItemProps === void 0 ? {} : _item$formItemProps;
16211
- if (!showColumnsDataIndexList.includes(dataIndex || name)) return;
16797
+ if (!visibleFieldNames.includes(dataIndex || name)) return;
16212
16798
  return /*#__PURE__*/React.createElement(Form.Item, {
16213
16799
  name: name,
16214
16800
  style: {
@@ -16218,11 +16804,10 @@ function SearchForm(_ref) {
16218
16804
  onPressEnter: function onPressEnter() {
16219
16805
  return submitForm();
16220
16806
  },
16221
- onBlur: function onBlur() {
16222
- return submitForm();
16223
- },
16807
+ onBlur: submitFormOnBlur,
16224
16808
  placeholder: label,
16225
- formItemProps: formItemProps
16809
+ formItemProps: formItemProps,
16810
+ defaultCompareSymbol: optionalInputDefaultCompareSymbol
16226
16811
  }) : type === 'select' ? /*#__PURE__*/React.createElement(Select, _objectSpread2({
16227
16812
  placeholder: label,
16228
16813
  showSearch: true,
@@ -16230,9 +16815,7 @@ function SearchForm(_ref) {
16230
16815
  style: {
16231
16816
  width: 150
16232
16817
  },
16233
- onBlur: function onBlur() {
16234
- return submitForm();
16235
- }
16818
+ onBlur: submitFormOnBlur
16236
16819
  }, formItemProps)) : /*#__PURE__*/React.createElement(Input, _objectSpread2({
16237
16820
  placeholder: label,
16238
16821
  allowClear: true,
@@ -16242,9 +16825,7 @@ function SearchForm(_ref) {
16242
16825
  onPressEnter: function onPressEnter() {
16243
16826
  return submitForm();
16244
16827
  },
16245
- onBlur: function onBlur() {
16246
- return submitForm();
16247
- }
16828
+ onBlur: submitFormOnBlur
16248
16829
  }, formItemProps)));
16249
16830
  }), /*#__PURE__*/React.createElement(Form.Item, {
16250
16831
  style: {
@@ -16264,21 +16845,433 @@ function SearchForm(_ref) {
16264
16845
  }, "\u91CD\u7F6E")));
16265
16846
  }
16266
16847
 
16267
- var transformFormData = function transformFormData(formData) {
16268
- var conditionList = [];
16269
- for (var key in formData) {
16270
- if (formData[key]) {
16271
- var _formData$key, _formData$key2, _formData$key3, _formData$key4;
16272
- var value = ((_formData$key = formData[key]) === null || _formData$key === void 0 ? void 0 : _formData$key.type) ? (_formData$key2 = formData[key]) === null || _formData$key2 === void 0 ? void 0 : _formData$key2.inputValue : formData[key];
16273
- var compareSymbol = ((_formData$key3 = formData[key]) === null || _formData$key3 === void 0 ? void 0 : _formData$key3.type) ? (_formData$key4 = formData[key]) === null || _formData$key4 === void 0 ? void 0 : _formData$key4.type : Array.isArray(value) ? 'eq' : 'like';
16274
- conditionList.push({
16275
- leftValue: key,
16276
- compareSymbol: compareSymbol,
16277
- rightValue: value
16278
- });
16848
+ /**
16849
+ * Builds the search fields used by the WDT goods selector.
16850
+ * Brand options are supplied by the caller because they are loaded at runtime.
16851
+ */
16852
+ var createWdtSearchFormData = function createWdtSearchFormData() {
16853
+ var brandOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
16854
+ return [{
16855
+ label: 'SKU名称',
16856
+ name: 'skuName',
16857
+ dataIndex: 'specName'
16858
+ }, {
16859
+ label: 'SKU编码',
16860
+ name: 'skuCode',
16861
+ dataIndex: 'specNo',
16862
+ type: 'optionalInput'
16863
+ }, {
16864
+ label: '商品名称',
16865
+ name: 'goodName'
16866
+ }, {
16867
+ label: '商品编码',
16868
+ name: 'goodNo',
16869
+ type: 'optionalInput'
16870
+ }, {
16871
+ label: '品牌',
16872
+ name: 'brandIds',
16873
+ dataIndex: 'brandName',
16874
+ type: 'select',
16875
+ formItemProps: {
16876
+ mode: 'multiple',
16877
+ filterOption: function filterOption(input, option) {
16878
+ return option.label.includes(input);
16879
+ },
16880
+ options: brandOptions
16881
+ }
16882
+ }, {
16883
+ label: '是否组合装',
16884
+ name: 'skuType',
16885
+ dataIndex: 'skuType',
16886
+ type: 'select',
16887
+ formItemProps: {
16888
+ mode: 'multiple',
16889
+ filterOption: function filterOption(input, option) {
16890
+ return option.label.includes(input);
16891
+ },
16892
+ options: [{
16893
+ label: '组合装',
16894
+ value: 'suite'
16895
+ }, {
16896
+ label: '非组合装',
16897
+ value: ''
16898
+ }]
16899
+ }
16900
+ }, {
16901
+ label: '工单赠品标记',
16902
+ name: 'isSelfGift',
16903
+ type: 'select',
16904
+ formItemProps: {
16905
+ mode: 'multiple',
16906
+ options: [{
16907
+ label: '赠品',
16908
+ value: 1
16909
+ }, {
16910
+ label: '未标记',
16911
+ value: 0
16912
+ }]
16913
+ }
16914
+ }];
16915
+ };
16916
+ var createBsE3SearchFormData = function createBsE3SearchFormData() {
16917
+ return [{
16918
+ label: '商品货号',
16919
+ name: 'goodNo',
16920
+ type: 'optionalInput'
16921
+ }, {
16922
+ label: '商品名称',
16923
+ name: 'goodName'
16924
+ }, {
16925
+ label: 'SKU',
16926
+ name: 'skuCode',
16927
+ dataIndex: 'specNo',
16928
+ type: 'optionalInput'
16929
+ }, {
16930
+ label: 'SKU ID',
16931
+ name: 'skuId',
16932
+ dataIndex: 'specId',
16933
+ type: 'optionalInput'
16934
+ }];
16935
+ };
16936
+ var createGySearchFormData = function createGySearchFormData() {
16937
+ return [{
16938
+ label: '商品简称',
16939
+ name: 'goodShortName'
16940
+ }, {
16941
+ label: '商品sku名称',
16942
+ name: 'skuName',
16943
+ dataIndex: 'specName'
16944
+ }, {
16945
+ label: '商品sku编码',
16946
+ name: 'skuCode',
16947
+ dataIndex: 'specNo',
16948
+ type: 'optionalInput'
16949
+ }, {
16950
+ label: '商品名称',
16951
+ name: 'goodName'
16952
+ }, {
16953
+ label: '商品编码',
16954
+ name: 'goodNo',
16955
+ type: 'optionalInput'
16956
+ }];
16957
+ };
16958
+ var createJstSearchFormData = function createJstSearchFormData() {
16959
+ return [{
16960
+ label: '商品名称',
16961
+ name: 'goodName'
16962
+ }, {
16963
+ label: '商品编码',
16964
+ name: 'goodNo',
16965
+ type: 'optionalInput'
16966
+ }, {
16967
+ label: '款式编码',
16968
+ name: 'styleCode',
16969
+ type: 'optionalInput'
16970
+ }, {
16971
+ label: '规格值',
16972
+ name: 'propertiesValue',
16973
+ type: 'optionalInput'
16974
+ }, {
16975
+ label: '商品类型',
16976
+ name: 'skuType',
16977
+ type: 'select',
16978
+ formItemProps: {
16979
+ options: [{
16980
+ label: '普通商品',
16981
+ value: 'normal'
16982
+ }, {
16983
+ label: '组合装商品',
16984
+ value: 'combine'
16985
+ }]
16986
+ }
16987
+ }];
16988
+ };
16989
+ var createKmSearchFormData = function createKmSearchFormData() {
16990
+ return [{
16991
+ label: '商品名称',
16992
+ name: 'goodName'
16993
+ }, {
16994
+ label: '商品编码',
16995
+ name: 'goodNo',
16996
+ type: 'optionalInput'
16997
+ }, {
16998
+ label: 'SKU名称',
16999
+ name: 'skuName',
17000
+ dataIndex: 'specName'
17001
+ }, {
17002
+ label: 'SKU编码',
17003
+ name: 'skuCode',
17004
+ dataIndex: 'specNo',
17005
+ type: 'optionalInput'
17006
+ }];
17007
+ };
17008
+ var createJySearchFormData = function createJySearchFormData() {
17009
+ return [{
17010
+ label: '规格名称',
17011
+ name: 'skuName',
17012
+ dataIndex: 'specName'
17013
+ }, {
17014
+ label: '规格编码',
17015
+ name: 'skuCode',
17016
+ dataIndex: 'specNo',
17017
+ type: 'optionalInput'
17018
+ }, {
17019
+ label: '商品名称',
17020
+ name: 'goodName'
17021
+ }, {
17022
+ label: '商品编码',
17023
+ name: 'goodNo',
17024
+ type: 'optionalInput'
17025
+ }, {
17026
+ label: '巨益赠品标记',
17027
+ name: 'isGift',
17028
+ type: 'select',
17029
+ formItemProps: {
17030
+ mode: 'multiple',
17031
+ options: [{
17032
+ label: '是',
17033
+ value: 1
17034
+ }, {
17035
+ label: '否',
17036
+ value: 0
17037
+ }]
17038
+ }
17039
+ }, {
17040
+ label: '工单赠品标记',
17041
+ name: 'isSelfGift',
17042
+ type: 'select',
17043
+ formItemProps: {
17044
+ mode: 'multiple',
17045
+ options: [{
17046
+ label: '赠品',
17047
+ value: 1
17048
+ }, {
17049
+ label: '未标记',
17050
+ value: 0
17051
+ }]
17052
+ }
17053
+ }];
17054
+ };
17055
+ var createWlnSearchFormData = function createWlnSearchFormData() {
17056
+ return [{
17057
+ label: '规格值',
17058
+ name: 'propertiesValue'
17059
+ }, {
17060
+ label: 'SKU编码',
17061
+ name: 'specNo',
17062
+ type: 'optionalInput'
17063
+ }, {
17064
+ label: '商品名称',
17065
+ name: 'goodName'
17066
+ }, {
17067
+ label: '商品编码',
17068
+ name: 'goodNo',
17069
+ type: 'optionalInput'
17070
+ }, {
17071
+ label: '是否组合装',
17072
+ name: 'skuType',
17073
+ type: 'select',
17074
+ formItemProps: {
17075
+ mode: 'multiple',
17076
+ filterOption: function filterOption(input, option) {
17077
+ return option.label.includes(input);
17078
+ },
17079
+ options: [{
17080
+ label: '普通商品',
17081
+ value: 'normal'
17082
+ }, {
17083
+ label: '组合装商品',
17084
+ value: 'combine'
17085
+ }]
16279
17086
  }
17087
+ }];
17088
+ };
17089
+ var createJkySearchFormData = function createJkySearchFormData() {
17090
+ return [{
17091
+ label: '规格名称',
17092
+ name: 'skuName',
17093
+ dataIndex: 'specName'
17094
+ }, {
17095
+ label: '规格编码',
17096
+ name: 'skuCode',
17097
+ dataIndex: 'specNo',
17098
+ type: 'optionalInput'
17099
+ }, {
17100
+ label: '货品名称',
17101
+ name: 'goodName'
17102
+ }, {
17103
+ label: '货品编码',
17104
+ name: 'goodNo',
17105
+ type: 'optionalInput'
17106
+ }];
17107
+ };
17108
+
17109
+ var WDT_BRAND_PAGE_SIZE = 100;
17110
+ var loadWdtBrandOptions = /*#__PURE__*/function () {
17111
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
17112
+ var options, pageNo, hasNextPage, _response$data, response, detailList;
17113
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
17114
+ while (1) switch (_context.prev = _context.next) {
17115
+ case 0:
17116
+ options = [];
17117
+ pageNo = 0;
17118
+ hasNextPage = true;
17119
+ case 3:
17120
+ if (!hasNextPage) {
17121
+ _context.next = 15;
17122
+ break;
17123
+ }
17124
+ _context.next = 6;
17125
+ return extendRequest('/qy/gdfw/wdt/erp/goodBrand/list', {
17126
+ method: 'post',
17127
+ data: {
17128
+ pageSize: WDT_BRAND_PAGE_SIZE,
17129
+ pageNo: pageNo
17130
+ }
17131
+ });
17132
+ case 6:
17133
+ response = _context.sent;
17134
+ if (!((response === null || response === void 0 ? void 0 : response.success) !== true)) {
17135
+ _context.next = 9;
17136
+ break;
17137
+ }
17138
+ throw new Error('Failed to load WDT brand options');
17139
+ case 9:
17140
+ detailList = (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.detailList) || [];
17141
+ options.push.apply(options, _toConsumableArray(detailList.filter(function (item) {
17142
+ return !item.isDisabled;
17143
+ }).map(function (item) {
17144
+ return {
17145
+ value: item.brandId,
17146
+ label: item.brandName
17147
+ };
17148
+ })));
17149
+ hasNextPage = detailList.length >= WDT_BRAND_PAGE_SIZE;
17150
+ pageNo += 1;
17151
+ _context.next = 3;
17152
+ break;
17153
+ case 15:
17154
+ return _context.abrupt("return", {
17155
+ brandIds: options
17156
+ });
17157
+ case 16:
17158
+ case "end":
17159
+ return _context.stop();
17160
+ }
17161
+ }, _callee);
17162
+ }));
17163
+ return function loadWdtBrandOptions() {
17164
+ return _ref.apply(this, arguments);
17165
+ };
17166
+ }();
17167
+
17168
+ var GOODS_SEARCH_FORM_CONFIG = {
17169
+ wdt: {
17170
+ createSearchFormData: function createSearchFormData(options) {
17171
+ return createWdtSearchFormData(options.brandIds || []);
17172
+ },
17173
+ loadOptions: [loadWdtBrandOptions]
17174
+ },
17175
+ bse3: {
17176
+ createSearchFormData: function createSearchFormData() {
17177
+ return createBsE3SearchFormData();
17178
+ },
17179
+ loadOptions: []
17180
+ },
17181
+ gy: {
17182
+ createSearchFormData: function createSearchFormData() {
17183
+ return createGySearchFormData();
17184
+ },
17185
+ loadOptions: []
17186
+ },
17187
+ jst: {
17188
+ createSearchFormData: function createSearchFormData() {
17189
+ return createJstSearchFormData();
17190
+ },
17191
+ loadOptions: []
17192
+ },
17193
+ km: {
17194
+ createSearchFormData: function createSearchFormData() {
17195
+ return createKmSearchFormData();
17196
+ },
17197
+ loadOptions: []
17198
+ },
17199
+ jy: {
17200
+ createSearchFormData: function createSearchFormData() {
17201
+ return createJySearchFormData();
17202
+ },
17203
+ loadOptions: []
17204
+ },
17205
+ wln: {
17206
+ createSearchFormData: function createSearchFormData() {
17207
+ return createWlnSearchFormData();
17208
+ },
17209
+ loadOptions: []
17210
+ },
17211
+ jky: {
17212
+ createSearchFormData: function createSearchFormData() {
17213
+ return createJkySearchFormData();
17214
+ },
17215
+ loadOptions: []
16280
17216
  }
16281
- return conditionList;
17217
+ };
17218
+
17219
+ var _excluded$e = ["type", "searchFormData", "loadOptions"];
17220
+ var EMPTY_LOADERS = [];
17221
+ var mergeOptionMaps = function mergeOptionMaps(optionMaps) {
17222
+ return optionMaps.reduce(function (merged, optionMap) {
17223
+ return _objectSpread2(_objectSpread2({}, merged), optionMap);
17224
+ }, {});
17225
+ };
17226
+ var GoodsSearchForm = function GoodsSearchForm(_ref) {
17227
+ var type = _ref.type,
17228
+ customSearchFormData = _ref.searchFormData,
17229
+ _ref$loadOptions = _ref.loadOptions,
17230
+ loadOptions = _ref$loadOptions === void 0 ? EMPTY_LOADERS : _ref$loadOptions,
17231
+ searchFormProps = _objectWithoutProperties(_ref, _excluded$e);
17232
+ var config = GOODS_SEARCH_FORM_CONFIG[type];
17233
+ var _useState = useState({}),
17234
+ _useState2 = _slicedToArray(_useState, 2),
17235
+ optionMap = _useState2[0],
17236
+ setOptionMap = _useState2[1];
17237
+ var loaders = useMemo(function () {
17238
+ return loadOptions === EMPTY_LOADERS ? config.loadOptions : loadOptions;
17239
+ }, [config, loadOptions]);
17240
+ useEffect(function () {
17241
+ var disposed = false;
17242
+ if (!loaders.length) return undefined;
17243
+ setOptionMap({});
17244
+ Promise.allSettled(loaders.map(function (loader) {
17245
+ return loader();
17246
+ })).then(function (results) {
17247
+ if (disposed) return;
17248
+ setOptionMap(mergeOptionMaps(results.filter(function (result) {
17249
+ return result.status === 'fulfilled';
17250
+ }).map(function (result) {
17251
+ return result.value;
17252
+ })));
17253
+ });
17254
+ return function () {
17255
+ disposed = true;
17256
+ };
17257
+ }, [loaders]);
17258
+ var applyOptions = function applyOptions(data) {
17259
+ return data.map(function (item) {
17260
+ var options = optionMap[item.name];
17261
+ if (!options) return item;
17262
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17263
+ formItemProps: _objectSpread2(_objectSpread2({}, item.formItemProps || {}), {}, {
17264
+ options: options
17265
+ })
17266
+ });
17267
+ });
17268
+ };
17269
+ var searchFormData = useMemo(function () {
17270
+ return applyOptions(customSearchFormData || config.createSearchFormData(optionMap));
17271
+ }, [config, customSearchFormData, optionMap]);
17272
+ return /*#__PURE__*/React.createElement(SearchForm, _objectSpread2(_objectSpread2({}, searchFormProps), {}, {
17273
+ searchFormData: searchFormData
17274
+ }));
16282
17275
  };
16283
17276
 
16284
17277
  var getTableData = function getTableData(_ref, formData) {
@@ -16319,10 +17312,6 @@ var GoodList = function GoodList(props, ref) {
16319
17312
  _useState4 = _slicedToArray(_useState3, 2),
16320
17313
  selectIds = _useState4[0],
16321
17314
  setSelectIds = _useState4[1];
16322
- var _useState5 = useState([]),
16323
- _useState6 = _slicedToArray(_useState5, 2),
16324
- brandList = _useState6[0],
16325
- setBrandList = _useState6[1];
16326
17315
  var _useGetColumns = useGetColumns('wdt'),
16327
17316
  _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
16328
17317
  columns = _useGetColumns2[0],
@@ -16338,103 +17327,18 @@ var GoodList = function GoodList(props, ref) {
16338
17327
  var _Form$useForm = Form.useForm(),
16339
17328
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
16340
17329
  form = _Form$useForm2[0];
16341
- var _useAntdTable = useAntdTable(getTableData, {
17330
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData),
17331
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
17332
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
17333
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
17334
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
16342
17335
  defaultPageSize: 10,
16343
17336
  form: form
16344
17337
  }),
16345
17338
  tableProps = _useAntdTable.tableProps,
16346
- search = _useAntdTable.search,
16347
- params = _useAntdTable.params;
17339
+ search = _useAntdTable.search;
16348
17340
  var submit = search.submit,
16349
17341
  reset = search.reset;
16350
- var setGoodBrandList = function setGoodBrandList() {
16351
- var list = [];
16352
- var pageNo = 0;
16353
- var pageSize = 100;
16354
- var getMore = function getMore() {
16355
- extendRequest('/qy/gdfw/wdt/erp/goodBrand/list', {
16356
- method: 'post',
16357
- data: {
16358
- pageSize: pageSize,
16359
- pageNo: pageNo
16360
- }
16361
- }).then(function (res) {
16362
- var _res$data2;
16363
- if (res.success && (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.detailList)) {
16364
- var _res$data3, _res$data4;
16365
- list.push.apply(list, _toConsumableArray((res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.detailList) || []));
16366
- if ((res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.detailList.length) === pageSize) {
16367
- pageNo += 1;
16368
- getMore();
16369
- } else {
16370
- setBrandList(list);
16371
- }
16372
- } else {
16373
- reject$1(res);
16374
- }
16375
- }).catch(console.error);
16376
- };
16377
- getMore();
16378
- };
16379
- React.useEffect(function () {
16380
- setGoodBrandList();
16381
- }, []);
16382
- var searchFormData = [{
16383
- label: 'SKU名称',
16384
- name: 'skuName',
16385
- dataIndex: 'specName'
16386
- }, {
16387
- label: 'SKU编码',
16388
- name: 'skuCode',
16389
- dataIndex: 'specNo',
16390
- type: 'optionalInput'
16391
- }, {
16392
- label: '商品名称',
16393
- name: 'goodName'
16394
- }, {
16395
- label: '商品编码',
16396
- name: 'goodNo',
16397
- type: 'optionalInput'
16398
- }, {
16399
- label: '品牌',
16400
- name: 'brandIds',
16401
- dataIndex: 'brandName',
16402
- type: 'select',
16403
- formItemProps: {
16404
- mode: 'multiple',
16405
- filterOption: function filterOption(input, option) {
16406
- return option.label.includes(input);
16407
- },
16408
- options: brandList.filter(function (item) {
16409
- return !item.isDisabled;
16410
- }).map(function (_ref2) {
16411
- var value = _ref2.brandId,
16412
- label = _ref2.brandName;
16413
- return {
16414
- value: value,
16415
- label: label
16416
- };
16417
- })
16418
- }
16419
- }, {
16420
- label: '是否组合装',
16421
- name: 'skuType',
16422
- dataIndex: 'skuType',
16423
- type: 'select',
16424
- formItemProps: {
16425
- mode: 'multiple',
16426
- filterOption: function filterOption(input, option) {
16427
- return option.label.includes(input);
16428
- },
16429
- options: [{
16430
- label: '组合装',
16431
- value: 'suite'
16432
- }, {
16433
- label: '非组合装',
16434
- value: ''
16435
- }]
16436
- }
16437
- }];
16438
17342
  var rowSelection = {
16439
17343
  selectedRowKeys: selectIds,
16440
17344
  fixed: true,
@@ -16521,8 +17425,8 @@ var GoodList = function GoodList(props, ref) {
16521
17425
  return /*#__PURE__*/React.createElement(Skeleton, {
16522
17426
  active: true,
16523
17427
  loading: loading
16524
- }, /*#__PURE__*/React.createElement(SearchForm, {
16525
- searchFormData: searchFormData,
17428
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
17429
+ type: "wdt",
16526
17430
  form: form,
16527
17431
  showColumnsDataIndexList: showColumnsDataIndexList,
16528
17432
  submit: submit,
@@ -16543,6 +17447,13 @@ var GoodList = function GoodList(props, ref) {
16543
17447
  y: 250
16544
17448
  }
16545
17449
  }, tableProps), {}, {
17450
+ locale: {
17451
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
17452
+ platform: "WDT_ERP",
17453
+ queryState: reSyncQueryState,
17454
+ onSuccess: submit
17455
+ })
17456
+ },
16546
17457
  size: "small"
16547
17458
  }))), /*#__PURE__*/React.createElement(Popover, {
16548
17459
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -16634,35 +17545,6 @@ var getTableData$1 = function getTableData(_ref, formData) {
16634
17545
  };
16635
17546
  });
16636
17547
  };
16637
- var searchFormData = [{
16638
- label: '商品名称',
16639
- name: 'goodName'
16640
- }, {
16641
- label: '商品编码',
16642
- name: 'goodNo',
16643
- type: 'optionalInput'
16644
- }, {
16645
- label: '款式编码',
16646
- name: 'styleCode',
16647
- type: 'optionalInput'
16648
- }, {
16649
- label: '规格值',
16650
- name: 'propertiesValue',
16651
- type: 'optionalInput'
16652
- }, {
16653
- label: '商品类型',
16654
- name: 'skuType',
16655
- type: 'select',
16656
- formItemProps: {
16657
- options: [{
16658
- label: '普通商品',
16659
- value: 'normal'
16660
- }, {
16661
- label: '组合装商品',
16662
- value: 'combine'
16663
- }]
16664
- }
16665
- }];
16666
17548
  var GoodList$1 = function GoodList(props, ref) {
16667
17549
  var _useState = useState([]),
16668
17550
  _useState2 = _slicedToArray(_useState, 2),
@@ -16687,13 +17569,16 @@ var GoodList$1 = function GoodList(props, ref) {
16687
17569
  var _Form$useForm = Form.useForm(),
16688
17570
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
16689
17571
  form = _Form$useForm2[0];
16690
- var _useAntdTable = useAntdTable(getTableData$1, {
17572
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$1),
17573
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
17574
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
17575
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
17576
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
16691
17577
  defaultPageSize: 10,
16692
17578
  form: form
16693
17579
  }),
16694
17580
  tableProps = _useAntdTable.tableProps,
16695
- search = _useAntdTable.search,
16696
- params = _useAntdTable.params;
17581
+ search = _useAntdTable.search;
16697
17582
  var submit = search.submit,
16698
17583
  reset = search.reset;
16699
17584
  var rowSelection = {
@@ -16785,8 +17670,8 @@ var GoodList$1 = function GoodList(props, ref) {
16785
17670
  return /*#__PURE__*/React.createElement(Skeleton, {
16786
17671
  active: true,
16787
17672
  loading: loading
16788
- }, /*#__PURE__*/React.createElement(SearchForm, {
16789
- searchFormData: searchFormData,
17673
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
17674
+ type: "jst",
16790
17675
  form: form,
16791
17676
  showColumnsDataIndexList: showColumnsDataIndexList,
16792
17677
  submit: submit,
@@ -16795,7 +17680,7 @@ var GoodList$1 = function GoodList(props, ref) {
16795
17680
  style: {
16796
17681
  marginTop: '4px'
16797
17682
  }
16798
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
17683
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
16799
17684
  className: "GoodModalColumns",
16800
17685
  rowSelection: rowSelection,
16801
17686
  rowKey: "goodNo",
@@ -16805,7 +17690,15 @@ var GoodList$1 = function GoodList(props, ref) {
16805
17690
  y: 250
16806
17691
  },
16807
17692
  size: "small"
16808
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
17693
+ }, tableProps), {}, {
17694
+ locale: {
17695
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
17696
+ platform: "JST_ERP",
17697
+ queryState: reSyncQueryState,
17698
+ onSuccess: submit
17699
+ })
17700
+ }
17701
+ }))), /*#__PURE__*/React.createElement(Popover, {
16809
17702
  getPopupContainer: function getPopupContainer(triggerNode) {
16810
17703
  return triggerNode.parentElement;
16811
17704
  },
@@ -16895,24 +17788,6 @@ var getTableData$2 = function getTableData(_ref, formData) {
16895
17788
  };
16896
17789
  });
16897
17790
  };
16898
- var searchFormData$1 = [{
16899
- label: '商品货号',
16900
- name: 'goodNo',
16901
- type: 'optionalInput'
16902
- }, {
16903
- label: '商品名称',
16904
- name: 'goodName'
16905
- }, {
16906
- label: 'SKU',
16907
- name: 'skuCode',
16908
- dataIndex: 'specNo',
16909
- type: 'optionalInput'
16910
- }, {
16911
- label: 'SKU ID',
16912
- name: 'skuId',
16913
- dataIndex: 'specId',
16914
- type: 'optionalInput'
16915
- }];
16916
17791
  var GoodList$2 = function GoodList(props, ref) {
16917
17792
  var _useState = useState([]),
16918
17793
  _useState2 = _slicedToArray(_useState, 2),
@@ -17026,8 +17901,8 @@ var GoodList$2 = function GoodList(props, ref) {
17026
17901
  return /*#__PURE__*/React.createElement(Skeleton, {
17027
17902
  active: true,
17028
17903
  loading: loading
17029
- }, /*#__PURE__*/React.createElement(SearchForm, {
17030
- searchFormData: searchFormData$1,
17904
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
17905
+ type: "bse3",
17031
17906
  form: form,
17032
17907
  showColumnsDataIndexList: showColumnsDataIndexList,
17033
17908
  submit: submit,
@@ -17137,23 +18012,6 @@ var getTableData$3 = function getTableData(_ref, formData) {
17137
18012
  };
17138
18013
  });
17139
18014
  };
17140
- var searchFormData$2 = [{
17141
- label: '商品名称',
17142
- name: 'goodName'
17143
- }, {
17144
- label: '商品编码',
17145
- name: 'goodNo',
17146
- type: 'optionalInput'
17147
- }, {
17148
- label: 'SKU名称',
17149
- name: 'skuName',
17150
- dataIndex: 'specName'
17151
- }, {
17152
- label: 'SKU编码',
17153
- name: 'skuCode',
17154
- dataIndex: 'specNo',
17155
- type: 'optionalInput'
17156
- }];
17157
18015
  var GoodList$3 = function GoodList(props, ref) {
17158
18016
  var _useState = useState([]),
17159
18017
  _useState2 = _slicedToArray(_useState, 2),
@@ -17178,13 +18036,16 @@ var GoodList$3 = function GoodList(props, ref) {
17178
18036
  var _Form$useForm = Form.useForm(),
17179
18037
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
17180
18038
  form = _Form$useForm2[0];
17181
- var _useAntdTable = useAntdTable(getTableData$3, {
18039
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$3),
18040
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
18041
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
18042
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
18043
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
17182
18044
  defaultPageSize: 10,
17183
18045
  form: form
17184
18046
  }),
17185
18047
  tableProps = _useAntdTable.tableProps,
17186
- search = _useAntdTable.search,
17187
- params = _useAntdTable.params;
18048
+ search = _useAntdTable.search;
17188
18049
  var submit = search.submit,
17189
18050
  reset = search.reset;
17190
18051
  var rowSelection = {
@@ -17276,8 +18137,8 @@ var GoodList$3 = function GoodList(props, ref) {
17276
18137
  return /*#__PURE__*/React.createElement(Skeleton, {
17277
18138
  active: true,
17278
18139
  loading: loading
17279
- }, /*#__PURE__*/React.createElement(SearchForm, {
17280
- searchFormData: searchFormData$2,
18140
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
18141
+ type: "km",
17281
18142
  form: form,
17282
18143
  showColumnsDataIndexList: showColumnsDataIndexList,
17283
18144
  submit: submit,
@@ -17286,7 +18147,7 @@ var GoodList$3 = function GoodList(props, ref) {
17286
18147
  style: {
17287
18148
  marginTop: '4px'
17288
18149
  }
17289
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
18150
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
17290
18151
  className: "GoodModalColumns",
17291
18152
  rowSelection: rowSelection,
17292
18153
  rowKey: rowCheckKey,
@@ -17296,7 +18157,15 @@ var GoodList$3 = function GoodList(props, ref) {
17296
18157
  y: 250
17297
18158
  },
17298
18159
  size: "small"
17299
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
18160
+ }, tableProps), {}, {
18161
+ locale: {
18162
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
18163
+ platform: "KM_ERP",
18164
+ queryState: reSyncQueryState,
18165
+ onSuccess: submit
18166
+ })
18167
+ }
18168
+ }))), /*#__PURE__*/React.createElement(Popover, {
17300
18169
  getPopupContainer: function getPopupContainer(triggerNode) {
17301
18170
  return triggerNode.parentElement;
17302
18171
  },
@@ -17384,26 +18253,6 @@ var getTableData$4 = function getTableData(_ref, formData) {
17384
18253
  };
17385
18254
  });
17386
18255
  };
17387
- var searchFormData$3 = [{
17388
- label: '商品简称',
17389
- name: 'goodShortName'
17390
- }, {
17391
- label: '商品sku名称',
17392
- name: 'skuName',
17393
- dataIndex: 'specName'
17394
- }, {
17395
- label: '商品sku编码',
17396
- name: 'skuCode',
17397
- dataIndex: 'specNo',
17398
- type: 'optionalInput'
17399
- }, {
17400
- label: '商品名称',
17401
- name: 'goodName'
17402
- }, {
17403
- label: '商品编码',
17404
- name: 'goodNo',
17405
- type: 'optionalInput'
17406
- }];
17407
18256
  var GoodList$4 = function GoodList(props, ref) {
17408
18257
  var _useState = useState([]),
17409
18258
  _useState2 = _slicedToArray(_useState, 2),
@@ -17428,13 +18277,16 @@ var GoodList$4 = function GoodList(props, ref) {
17428
18277
  var _Form$useForm = Form.useForm(),
17429
18278
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
17430
18279
  form = _Form$useForm2[0];
17431
- var _useAntdTable = useAntdTable(getTableData$4, {
18280
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$4),
18281
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
18282
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
18283
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
18284
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
17432
18285
  defaultPageSize: 10,
17433
18286
  form: form
17434
18287
  }),
17435
18288
  tableProps = _useAntdTable.tableProps,
17436
- search = _useAntdTable.search,
17437
- params = _useAntdTable.params;
18289
+ search = _useAntdTable.search;
17438
18290
  var submit = search.submit,
17439
18291
  reset = search.reset;
17440
18292
  var rowSelection = {
@@ -17517,8 +18369,8 @@ var GoodList$4 = function GoodList(props, ref) {
17517
18369
  return /*#__PURE__*/React.createElement(Skeleton, {
17518
18370
  active: true,
17519
18371
  loading: loading
17520
- }, /*#__PURE__*/React.createElement(SearchForm, {
17521
- searchFormData: searchFormData$3,
18372
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
18373
+ type: "gy",
17522
18374
  form: form,
17523
18375
  showColumnsDataIndexList: showColumnsDataIndexList,
17524
18376
  submit: submit,
@@ -17537,6 +18389,13 @@ var GoodList$4 = function GoodList(props, ref) {
17537
18389
  y: 250
17538
18390
  }
17539
18391
  }, tableProps), {}, {
18392
+ locale: {
18393
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
18394
+ platform: "GY_ERP",
18395
+ queryState: reSyncQueryState,
18396
+ onSuccess: submit
18397
+ })
18398
+ },
17540
18399
  size: "small"
17541
18400
  }))), /*#__PURE__*/React.createElement(Popover, {
17542
18401
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -17753,11 +18612,11 @@ function multiSelect() {
17753
18612
  var css_248z$d = ".high-performance-table .lock-left {\n background: #FFF !important;\n}\n.high-performance-table .art-empty-wrapper {\n margin-top: 24px;\n}\n.high-performance-table .cell-content {\n height: 48px;\n display: flex;\n align-items: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 8px 12px;\n}\n";
17754
18613
  styleInject(css_248z$d);
17755
18614
 
17756
- var _excluded$e = ["children"];
18615
+ var _excluded$f = ["children"];
17757
18616
  var Cell = function Cell(_ref) {
17758
18617
  var tdProps = _ref.tdProps;
17759
18618
  var children = tdProps.children,
17760
- otherProps = _objectWithoutProperties(tdProps, _excluded$e);
18619
+ otherProps = _objectWithoutProperties(tdProps, _excluded$f);
17761
18620
  return /*#__PURE__*/React.createElement("td", _objectSpread2({}, otherProps), /*#__PURE__*/React.createElement("div", {
17762
18621
  className: "cell-content"
17763
18622
  }, children));
@@ -17909,7 +18768,7 @@ var reject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbS
17909
18768
 
17910
18769
  var reminder = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAjiSURBVHic7Z07bBvHFob/2eUy4sq+vjZZCLCUziJsOIDUCUphwCHcBBTUBKpcEFTltE5hA2mTAEkbFwEFBlCTRyNYXSAYcCFGnQVcwcHKJWVACMjr64dWEsnduUVIQQ+KO/uY3eXqfJUgDQ+P8HPOnDlzdsjgkmapdKujqncYcBec34CiXAfnVwGobm0RA7HA2BvY9msw9ooDz1KW9Txbrb50Y4SJDNq9f3+Uado8U9UH4HwGgOLJZcIvNhjb4Jb1hLfbK2PLy3tOL3AUeLdcLjLgG8bY7WB8JIKAc77FgcdjS0urg8adK3C9XL6WZuxbBiyCZmxcsTlQaXH+aGJp6b/9BvQVeGdxcTwN/A5gRqp7RFBstIAvxiuVndN/OCNwV9w/ANwMxTUiKP5qAfdOi3wi9NbL5WvdmUviDh8308Dv9XL52vFfnhA4zdi3oLA8zMx0NTziKETvlstFhbEVUEI17Ng25/O97JoB3X1uOr1BW6FkwDnf4q3WzNjy8p4CAEzT5knc5MAYu800bR7ohmOmqg+idYkImp6mrFkq3bJU9T+gtTdp2KplfaJ0VPUOSNwkonRU9Y7CgLtRe0LIgQF3FXB+I2pHCElwfkOBolyP2g9CEopyXeke1hNJhPOrCqgTI8molD0nnFTUDsQJJZsVGmc3m5I9CY5YCTw6NwdtchLt7W0cvniBTr0e6vtfffgQSi43cEx7exv/+/77kDzyT6wETk9NITUxAS2fh14sgpsmDmo1HG5uolOvg5tm1C4OHbERWMlmkZqYOPE7puvIFArIFArgpolOvY6DWg0HtVpEXg4fsRH4o+npgX9nug4tnz8RtpmuQzv1oTiN3f1ghE06n3ccYzUasCSv5/EReGpKaNzh5ubRzyyTwZWHDweOj2rNdPILAMzVVew9fSrVj1hsk3qz0wlummgbRggeJYdYCKwXCkLjaO11TywE1iYnhcYdD8+EGJELrOXzFJ4lErnAoskVhWdvRCow03WMzM4KjaXw7I1IBR6ZnQXTdcdxbcOg8OyRSAX2svcl3BGZwG6SK1p/vRNZJWu0WBQad1Cr+T5kED0GjMqeTCIRWM1mhWYv4D88a5OTyH73nS8bMu3JJpIQrc/NCY3r1OuUXPkkdIGZrgsnV1GcAiWN0AUeLRaFtkZEMIQqsJrNIiN4sEAEQ6gCi669RHCEJrCWzwuXJYngCE1g0X0vESyh7INFq1Zu4fv7MFcHXvQWKCyTOfo/WgGUT1shbAGlC8x0Hf8qlaTY5qZ51NPEdB3Xvv4anZ0dtAwjkAoY8E/zXHpqCqmPPz5qTLCbTRysr0tvmAsC6QLrhUIopb3UxASUXA7pXA7pqSlcWliA3WjgcHPTVV+1ms0iPT2Nj6anz+00Ubq7gQ+//hr0vxE4UgVOTUxAD2nt7Vc8UXK5E33VbcPA2ydPHG1dWlhwHJMpFLC/thb7WSw1ybosKTT3wylDZ7qOzs6ZqxzPYDWbwqdXw7Dtkybw6NzcmScVZKHl80LVMdGkxhTsVR6ZnYUa85MlKQKHGZoBscYBu9EQPriwmk20t7eFxo58+qnQuKgIXGCm67jy5ZdBmx34fiIFlIM//3Rl92B9XWhc3Is3gSdZVx48CPVAPC0Ynq1Gw5VfLcMAN01H272M+vDFC2Hbp+H7+9KenAxU4LSkgsYgMp99JjROZsJ3aWFBKPM+j7c//CCt6BFoiG4ZRqhnuL1niYnzCXwN3gtx8x/39S8OBC5wyzAcM1Bumr7XHDdN8xcZKdskp33k+59/9i2wXihQZ4gAUgRuGca5N9Hsr635yjiB7tUOgsnVRUdaJavfk+t2s4m9AI73aPaKI+2w4aBWw+jc3Im957tq1XdoVrNZV7OXm6ZQDbofqfFxxw+SH/s9bIm3B0k9TWoZxlEiZK6uBtLjrM/NuZq93DQ939FxuVRyTOT82A8DqadJvWSrbRiBXDZCfV3ukTqDrWYTh7Ua3gewN5bZGZJkpHd0vKtWA7EzWix6rnF7fp3gUuCn9i773svY3JM1CC2f99wwr+RyUh8W82M/jDu8Ir+jwwk1m6XQ7IPYC3y5VBqq53HjRuwFVh2u9yUGE3uB3weUpF1UYi9wr4md8MZQZNHm06e+Chx2o+HpdUzXhapmXu1bHl/nhqEQuNer7EVku9FA89EjT+8rUqr0Yz8MYh+ie/Q7Y6YrHpwZGoFPP3FgN5uUgAkwNAIDwOExgd9Vq1KP2ZLCUKzBPXqdIge1GtqGIVQAUXI5/Purrzy9n8hjKX7sd+p1fPjlF0+vFWWoBAaAtz/+6HrtFb1w3Cuy7fthqEI0QImVW4ZOYMIdJHDCIYETDgmccIYui3YLN03Pl6WMzM46Ptzmx34Y93tcCIG9nkZp+Tw0ifbDgEJ0wiGBE07iQzTTdYx6vO5I5JYgP/ZPY66tBX6Vw4UQWOaNP0Ha319fD1xgCtEJhwROOCRwwiGBEw4JnHBI4IRDAiecxO+D4963LBuawQmHBE44kYXoD7/9BpbJDBzjdF4q8rU6F713mv29uMijdoKQB4XohKMAsKJ2gpCGpYCxN1F7QUiCsTcKbPt11H4QkrDt1woYexW1H4QkGHulcOBZ1H4QcuDAMyVlWc8B2FE7QwSOnbKs50q2Wn0Jxjai9oYIGMY2stXqSwUAuGU5fyUnMVT0NP1H4HZ7hXO+Fa1LRFBwzrd4u70CdAUeW17e48Bj0FqcBGwOPB5bXt4DjpUqx5aWVjlQic4vIgg4UBlbWjo6gTlRi25x/ggAJVzDy0ZXwyPY6RE7i4vjaeAPADdDc4sIgr9awL3xSuXEV8CcOU0ar1R2WsA90EweJjb6iQucc1w4XqnsHHL+OQd+AiVeccbmwE+HnH/eT1ygT4g+zW65XGTAN4yx28H7R3iFc77FgcfHE6p+OAoMALv3748yTZtnqvoAnM+AGgWiwgZjG9yynvB2e6W3FRqEkMDHaZZKtzqqeocBd8H5DSjKdXB+FYDqyWXiPCww9ga2/RqMveLAs5RlPc9Wqy/dGPk/lTM43UA4NxYAAAAASUVORK5CYII=";
17911
18770
 
17912
- var _excluded$f = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
18771
+ var _excluded$g = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
17913
18772
  var AsyncSelect = function AsyncSelect(props) {
17914
18773
  var mode = props.mode,
17915
18774
  maxSelectCount = props.maxSelectCount,
@@ -17917,7 +18776,7 @@ var AsyncSelect = function AsyncSelect(props) {
17917
18776
  showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
17918
18777
  getOptionsAsync = props.getOptionsAsync,
17919
18778
  _onChange = props.onChange,
17920
- otherProps = _objectWithoutProperties(props, _excluded$f);
18779
+ otherProps = _objectWithoutProperties(props, _excluded$g);
17921
18780
  var _React$useState = React.useState([]),
17922
18781
  _React$useState2 = _slicedToArray(_React$useState, 2),
17923
18782
  data = _React$useState2[0],
@@ -17967,7 +18826,7 @@ var AsyncSelect = function AsyncSelect(props) {
17967
18826
  }));
17968
18827
  };
17969
18828
 
17970
- var _excluded$g = ["filterComponentType", "searchDefaultConditions", "props", "ShopList"];
18829
+ var _excluded$h = ["filterComponentType", "searchDefaultConditions", "props", "ShopList"];
17971
18830
  var RangePicker = DatePicker.RangePicker;
17972
18831
  var _SelectInput = function SelectInput(props) {
17973
18832
  var _props$value = props.value,
@@ -18182,7 +19041,7 @@ var FilterSelectOption = function FilterSelectOption(props) {
18182
19041
  searchDefaultConditions = props.searchDefaultConditions,
18183
19042
  componentProps = props.props,
18184
19043
  ShopList = props.ShopList,
18185
- otherProps = _objectWithoutProperties(props, _excluded$g);
19044
+ otherProps = _objectWithoutProperties(props, _excluded$h);
18186
19045
  var handleChange = function handleChange() {
18187
19046
  var _props$onChange, _props$onSubmit;
18188
19047
  for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -19067,38 +19926,6 @@ var getTableData$5 = function getTableData(_ref, formData) {
19067
19926
  };
19068
19927
  });
19069
19928
  };
19070
- var searchFormData$4 = [{
19071
- label: '规格值',
19072
- name: 'propertiesValue'
19073
- }, {
19074
- label: 'SKU编码',
19075
- name: 'specNo',
19076
- type: 'optionalInput'
19077
- }, {
19078
- label: '商品名称',
19079
- name: 'goodName'
19080
- }, {
19081
- label: '商品编码',
19082
- name: 'goodNo',
19083
- type: 'optionalInput'
19084
- }, {
19085
- label: '是否组合装',
19086
- name: 'skuType',
19087
- type: 'select',
19088
- formItemProps: {
19089
- mode: 'multiple',
19090
- filterOption: function filterOption(input, option) {
19091
- return option.label.includes(input);
19092
- },
19093
- options: [{
19094
- label: '普通商品',
19095
- value: 'normal'
19096
- }, {
19097
- label: '组合装商品',
19098
- value: 'combine'
19099
- }]
19100
- }
19101
- }];
19102
19929
  var GoodList$5 = function GoodList(props, ref) {
19103
19930
  var _useState = useState([]),
19104
19931
  _useState2 = _slicedToArray(_useState, 2),
@@ -19123,13 +19950,16 @@ var GoodList$5 = function GoodList(props, ref) {
19123
19950
  var _Form$useForm = Form.useForm(),
19124
19951
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
19125
19952
  form = _Form$useForm2[0];
19126
- var _useAntdTable = useAntdTable(getTableData$5, {
19953
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$5),
19954
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
19955
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
19956
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
19957
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
19127
19958
  defaultPageSize: 10,
19128
19959
  form: form
19129
19960
  }),
19130
19961
  tableProps = _useAntdTable.tableProps,
19131
- search = _useAntdTable.search,
19132
- params = _useAntdTable.params;
19962
+ search = _useAntdTable.search;
19133
19963
  var submit = search.submit,
19134
19964
  reset = search.reset;
19135
19965
  var rowSelection = {
@@ -19221,8 +20051,8 @@ var GoodList$5 = function GoodList(props, ref) {
19221
20051
  return /*#__PURE__*/React.createElement(Skeleton, {
19222
20052
  active: true,
19223
20053
  loading: loading
19224
- }, /*#__PURE__*/React.createElement(SearchForm, {
19225
- searchFormData: searchFormData$4,
20054
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
20055
+ type: "wln",
19226
20056
  form: form,
19227
20057
  showColumnsDataIndexList: showColumnsDataIndexList,
19228
20058
  submit: submit,
@@ -19231,7 +20061,7 @@ var GoodList$5 = function GoodList(props, ref) {
19231
20061
  style: {
19232
20062
  marginTop: '4px'
19233
20063
  }
19234
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
20064
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
19235
20065
  className: "GoodModalColumns",
19236
20066
  rowSelection: rowSelection,
19237
20067
  rowKey: "id",
@@ -19241,7 +20071,15 @@ var GoodList$5 = function GoodList(props, ref) {
19241
20071
  y: 250
19242
20072
  },
19243
20073
  size: "small"
19244
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
20074
+ }, tableProps), {}, {
20075
+ locale: {
20076
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
20077
+ platform: "WLN_ERP",
20078
+ queryState: reSyncQueryState,
20079
+ onSuccess: submit
20080
+ })
20081
+ }
20082
+ }))), /*#__PURE__*/React.createElement(Popover, {
19245
20083
  getPopupContainer: function getPopupContainer(triggerNode) {
19246
20084
  return triggerNode.parentElement;
19247
20085
  },
@@ -19329,23 +20167,6 @@ var getTableData$6 = function getTableData(_ref, formData) {
19329
20167
  };
19330
20168
  });
19331
20169
  };
19332
- var searchFormData$5 = [{
19333
- label: '规格名称',
19334
- name: 'skuName',
19335
- dataIndex: 'specName'
19336
- }, {
19337
- label: '规格编码',
19338
- name: 'skuCode',
19339
- dataIndex: 'specNo',
19340
- type: 'optionalInput'
19341
- }, {
19342
- label: '商品名称',
19343
- name: 'goodName'
19344
- }, {
19345
- label: '商品编码',
19346
- name: 'goodNo',
19347
- type: 'optionalInput'
19348
- }];
19349
20170
  var GoodList$6 = function GoodList(props, ref) {
19350
20171
  var _useState = useState([]),
19351
20172
  _useState2 = _slicedToArray(_useState, 2),
@@ -19370,13 +20191,16 @@ var GoodList$6 = function GoodList(props, ref) {
19370
20191
  var _Form$useForm = Form.useForm(),
19371
20192
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
19372
20193
  form = _Form$useForm2[0];
19373
- var _useAntdTable = useAntdTable(getTableData$6, {
20194
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$6),
20195
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
20196
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
20197
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
20198
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
19374
20199
  defaultPageSize: 10,
19375
20200
  form: form
19376
20201
  }),
19377
20202
  tableProps = _useAntdTable.tableProps,
19378
- search = _useAntdTable.search,
19379
- params = _useAntdTable.params;
20203
+ search = _useAntdTable.search;
19380
20204
  var submit = search.submit,
19381
20205
  reset = search.reset;
19382
20206
  var rowSelection = {
@@ -19468,8 +20292,8 @@ var GoodList$6 = function GoodList(props, ref) {
19468
20292
  return /*#__PURE__*/React.createElement(Skeleton, {
19469
20293
  active: true,
19470
20294
  loading: loading
19471
- }, /*#__PURE__*/React.createElement(SearchForm, {
19472
- searchFormData: searchFormData$5,
20295
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
20296
+ type: "jy",
19473
20297
  form: form,
19474
20298
  showColumnsDataIndexList: showColumnsDataIndexList,
19475
20299
  submit: submit,
@@ -19478,7 +20302,7 @@ var GoodList$6 = function GoodList(props, ref) {
19478
20302
  style: {
19479
20303
  marginTop: '4px'
19480
20304
  }
19481
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
20305
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
19482
20306
  className: "GoodModalColumns",
19483
20307
  rowSelection: rowSelection,
19484
20308
  rowKey: "id",
@@ -19488,7 +20312,15 @@ var GoodList$6 = function GoodList(props, ref) {
19488
20312
  y: 250
19489
20313
  },
19490
20314
  size: "small"
19491
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
20315
+ }, tableProps), {}, {
20316
+ locale: {
20317
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
20318
+ platform: "JY_ERP",
20319
+ queryState: reSyncQueryState,
20320
+ onSuccess: submit
20321
+ })
20322
+ }
20323
+ }))), /*#__PURE__*/React.createElement(Popover, {
19492
20324
  getPopupContainer: function getPopupContainer(triggerNode) {
19493
20325
  return triggerNode.parentElement;
19494
20326
  },
@@ -19576,23 +20408,6 @@ var getTableData$7 = function getTableData(_ref, formData) {
19576
20408
  };
19577
20409
  });
19578
20410
  };
19579
- var searchFormData$6 = [{
19580
- label: '规格名称',
19581
- name: 'skuName',
19582
- dataIndex: 'specName'
19583
- }, {
19584
- label: '规格编码',
19585
- name: 'skuCode',
19586
- dataIndex: 'specNo',
19587
- type: 'optionalInput'
19588
- }, {
19589
- label: '货品名称',
19590
- name: 'goodName'
19591
- }, {
19592
- label: '货品编码',
19593
- name: 'goodNo',
19594
- type: 'optionalInput'
19595
- }];
19596
20411
  var GoodList$7 = function GoodList(props, ref) {
19597
20412
  var _useState = useState([]),
19598
20413
  _useState2 = _slicedToArray(_useState, 2),
@@ -19715,8 +20530,8 @@ var GoodList$7 = function GoodList(props, ref) {
19715
20530
  return /*#__PURE__*/React.createElement(Skeleton, {
19716
20531
  active: true,
19717
20532
  loading: loading
19718
- }, /*#__PURE__*/React.createElement(SearchForm, {
19719
- searchFormData: searchFormData$6,
20533
+ }, /*#__PURE__*/React.createElement(GoodsSearchForm, {
20534
+ type: "jky",
19720
20535
  form: form,
19721
20536
  showColumnsDataIndexList: showColumnsDataIndexList,
19722
20537
  submit: submit,
@@ -20701,7 +21516,7 @@ var getColumns$2 = function getColumns(_ref) {
20701
21516
  }
20702
21517
  }, {
20703
21518
  dataIndex: 'returnPrice',
20704
- title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
21519
+ title: "".concat(text, "\u9000\u6B3E\u91D1\u989D"),
20705
21520
  align: 'center',
20706
21521
  ellipsis: true,
20707
21522
  width: 100
@@ -21106,17 +21921,18 @@ var getColumns$2 = function getColumns(_ref) {
21106
21921
  };
21107
21922
 
21108
21923
  var getYesOrNo$4 = function getYesOrNo(val) {
21924
+ var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['是', '否'];
21109
21925
  switch (val) {
21110
21926
  case true:
21111
21927
  case '1':
21112
21928
  case 1:
21113
- return '是';
21929
+ return content[0];
21114
21930
  case false:
21115
21931
  case '0':
21116
21932
  case 0:
21117
21933
  return '否';
21118
21934
  default:
21119
- return null;
21935
+ return content[1];
21120
21936
  }
21121
21937
  };
21122
21938
 
@@ -21315,7 +22131,7 @@ var getColumns$3 = function getColumns(_ref) {
21315
22131
  label: '非赠品',
21316
22132
  value: 0
21317
22133
  }]
21318
- }) : /*#__PURE__*/React.createElement("span", null, isNull(val) ? null : val ? '赠品' : '非赠品');
22134
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val, ['赠品', '非赠品']));
21319
22135
  }
21320
22136
  }, {
21321
22137
  dataIndex: 'isPackage',
@@ -21547,7 +22363,7 @@ var getColumns$3 = function getColumns(_ref) {
21547
22363
  label: '非赠品',
21548
22364
  value: 0
21549
22365
  }]
21550
- }) : /*#__PURE__*/React.createElement("span", null, isNull(val) ? null : val ? '赠品' : '非赠品');
22366
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val, ['赠品', '非赠品']));
21551
22367
  }
21552
22368
  }, {
21553
22369
  dataIndex: 'isPackage',
@@ -22694,10 +23510,14 @@ var getColumns$5 = function getColumns() {
22694
23510
  }, {
22695
23511
  dataIndex: 'qty',
22696
23512
  title: "\u7533\u8BF7\u6570\u91CF",
23513
+ conditionTitle: "\u7533\u8BF7\u603B\u6570\u91CF",
22697
23514
  width: 150,
22698
23515
  align: 'center',
22699
23516
  ellipsis: true,
22700
- render: renderTextEllipsis
23517
+ render: renderTextEllipsis,
23518
+ conditionOptionsSetting: {
23519
+ dataType: 'number'
23520
+ }
22701
23521
  }, {
22702
23522
  dataIndex: 'rQty',
22703
23523
  title: "\u5B9E\u6536\u9000\u8D27\u6570\u91CF",
@@ -24567,7 +25387,7 @@ var getColumns$a = function getColumns() {
24567
25387
  },
24568
25388
  render: function render(_val, record, index) {
24569
25389
  var options = DxdSuppliersData.getInstance().getSuppliersBySkuCode(record === null || record === void 0 ? void 0 : record.skuCode);
24570
- return /*#__PURE__*/React.createElement(Select, {
25390
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
24571
25391
  style: {
24572
25392
  width: '100%'
24573
25393
  },
@@ -24587,7 +25407,7 @@ var getColumns$a = function getColumns() {
24587
25407
  supplierName: (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : ''
24588
25408
  }, index);
24589
25409
  }
24590
- });
25410
+ }) : DxdSuppliersData.getInstance().getSupplierNameByCode(record === null || record === void 0 ? void 0 : record.supplierCode);
24591
25411
  },
24592
25412
  conditionOptionsSetting: {
24593
25413
  dataType: 'weakenArray',
@@ -24629,7 +25449,128 @@ var getColumns$a = function getColumns() {
24629
25449
  };
24630
25450
  };
24631
25451
 
24632
- var getColumns$b = function getColumns(_ref) {
25452
+ var TTX_BOM_TYPE_MAP = {
25453
+ '0': '正常品',
25454
+ '1': '实物组套',
25455
+ '2': '虚拟组套',
25456
+ '3': '虚拟组套子品',
25457
+ '4': '虚拟品'
25458
+ };
25459
+ var getTtxBomTypeName = function getTtxBomTypeName(value) {
25460
+ var _TTX_BOM_TYPE_MAP$Str;
25461
+ return (_TTX_BOM_TYPE_MAP$Str = TTX_BOM_TYPE_MAP[String(value)]) !== null && _TTX_BOM_TYPE_MAP$Str !== void 0 ? _TTX_BOM_TYPE_MAP$Str : value;
25462
+ };
25463
+ var getColumns$b = function getColumns() {
25464
+ return {
25465
+ TTX_GOODS: [{
25466
+ dataIndex: 'skuName',
25467
+ title: 'SKU名称',
25468
+ width: 150,
25469
+ render: renderTextEllipsis
25470
+ }, {
25471
+ dataIndex: 'skuCode',
25472
+ title: 'SKU编码',
25473
+ width: 150,
25474
+ render: renderTextEllipsis
25475
+ }, {
25476
+ dataIndex: 'sourceSpuId',
25477
+ title: '平台商品ID',
25478
+ width: 150,
25479
+ render: renderTextEllipsis
25480
+ }, {
25481
+ dataIndex: 'sourceSkuId',
25482
+ title: '平台SKU ID',
25483
+ width: 150,
25484
+ render: renderTextEllipsis
25485
+ }, {
25486
+ dataIndex: 'requestQty',
25487
+ title: '要求发货数量',
25488
+ width: 150,
25489
+ render: renderTextEllipsis
25490
+ }, {
25491
+ dataIndex: 'shipQty',
25492
+ title: '已发货数量',
25493
+ width: 150,
25494
+ render: renderTextEllipsis
25495
+ }, {
25496
+ dataIndex: 'returnQty',
25497
+ title: '退货数量',
25498
+ width: 150,
25499
+ render: renderTextEllipsis
25500
+ }, {
25501
+ dataIndex: 'listPrice',
25502
+ title: '零售价/标价',
25503
+ width: 150,
25504
+ render: renderTextEllipsis
25505
+ }, {
25506
+ dataIndex: 'netPrice',
25507
+ title: '客户实付单价',
25508
+ width: 150,
25509
+ render: renderTextEllipsis
25510
+ }, {
25511
+ dataIndex: 'msrPrice',
25512
+ title: '建议零售价',
25513
+ width: 150,
25514
+ render: renderTextEllipsis
25515
+ }, {
25516
+ dataIndex: 'itemTotalAmount',
25517
+ title: '商品总金额',
25518
+ width: 150,
25519
+ render: renderTextEllipsis
25520
+ }, {
25521
+ dataIndex: 'totalPayAmount',
25522
+ title: '实付金额',
25523
+ width: 150,
25524
+ render: renderTextEllipsis
25525
+ }, {
25526
+ dataIndex: 'isGift',
25527
+ title: '是否赠品',
25528
+ width: 150,
25529
+ render: function render(value) {
25530
+ return renderTextEllipsis(getYesOrNo$4(value));
25531
+ },
25532
+ renderExport: getYesOrNo$4,
25533
+ headerMapping: {
25534
+ transformValue: getYesOrNo$4,
25535
+ renderExport: getYesOrNo$4
25536
+ }
25537
+ }, {
25538
+ dataIndex: 'bomType',
25539
+ title: 'BOM类型',
25540
+ width: 150,
25541
+ render: function render(value) {
25542
+ return renderTextEllipsis(getTtxBomTypeName(value));
25543
+ },
25544
+ renderExport: getTtxBomTypeName,
25545
+ headerMapping: {
25546
+ transformValue: getTtxBomTypeName,
25547
+ renderExport: getTtxBomTypeName
25548
+ }
25549
+ }, {
25550
+ dataIndex: 'bomSkuCode',
25551
+ title: 'BOM商品编码',
25552
+ width: 150,
25553
+ render: renderTextEllipsis
25554
+ }, {
25555
+ dataIndex: 'platformSpuCode',
25556
+ title: '商品货号',
25557
+ width: 150,
25558
+ render: renderTextEllipsis
25559
+ }, {
25560
+ dataIndex: 'platformSkuCode',
25561
+ title: 'SKU货号',
25562
+ width: 150,
25563
+ render: renderTextEllipsis
25564
+ }].map(function (item) {
25565
+ return _objectSpread2(_objectSpread2({}, item), {}, {
25566
+ align: 'center',
25567
+ ellipsis: true
25568
+ });
25569
+ })
25570
+ };
25571
+ };
25572
+
25573
+ var getColumns$c = function getColumns(_ref) {
24633
25574
  var _ref$text = _ref.text,
24634
25575
  text = _ref$text === void 0 ? '' : _ref$text,
24635
25576
  disabled = _ref.disabled,
@@ -24739,6 +25680,18 @@ var getColumns$b = function getColumns(_ref) {
24739
25680
  };
24740
25681
  };
24741
25682
 
25683
+ var MIN_COLUMN_WIDTH = 80;
25684
+ var MAX_COLUMN_WIDTH = 600;
25685
+ var resolveColumnWidth = function resolveColumnWidth(width, defaultWidth) {
25686
+ if (width === undefined || width === null || width === '') {
25687
+ return defaultWidth;
25688
+ }
25689
+ var parsedWidth = Number(width);
25690
+ if (!isFinite(parsedWidth)) {
25691
+ return defaultWidth;
25692
+ }
25693
+ return Math.min(MAX_COLUMN_WIDTH, Math.max(MIN_COLUMN_WIDTH, Math.round(parsedWidth)));
25694
+ };
24742
25695
  var getColumnsMap$1 = function getColumnsMap(args) {
24743
25696
  var _ref = args || {},
24744
25697
  _ref$text = _ref.text,
@@ -24746,7 +25699,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
24746
25699
  disabled = _ref.disabled,
24747
25700
  updateHandle = _ref.updateHandle,
24748
25701
  updateDataHandle = _ref.updateDataHandle;
24749
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
25702
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
24750
25703
  text: text,
24751
25704
  disabled: disabled,
24752
25705
  updateHandle: updateHandle
@@ -24795,8 +25748,8 @@ var getColumnsMap$1 = function getColumnsMap(args) {
24795
25748
  disabled: disabled,
24796
25749
  updateHandle: updateHandle,
24797
25750
  updateDataHandle: updateDataHandle
24798
- })), {}, {
24799
- default: getColumns$b({
25751
+ })), getColumns$b()), {}, {
25752
+ default: getColumns$c({
24800
25753
  text: text,
24801
25754
  disabled: disabled,
24802
25755
  updateHandle: updateHandle
@@ -24832,11 +25785,13 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
24832
25785
  var newColumns = {};
24833
25786
  Object.keys(clone_columnsMap).forEach(function (key) {
24834
25787
  newColumns[key] = clone_columnsMap[key].map(function (col) {
24835
- return {
25788
+ return _objectSpread2({
24836
25789
  title: col.title,
24837
25790
  dataIndex: col.dataIndex,
24838
25791
  disabled: !!col.validator
24839
- };
25792
+ }, key === 'KM_REISSUE_GOODS' ? {
25793
+ width: col.width
25794
+ } : {});
24840
25795
  });
24841
25796
  });
24842
25797
  return newColumns;
@@ -24949,6 +25904,9 @@ var isErpType = {
24949
25904
  },
24950
25905
  isWln: function isWln(type) {
24951
25906
  return ['WLN_GOODS', 'WLN_REISSUE_GOODS'].includes(type);
25907
+ },
25908
+ isTtx: function isTtx(type) {
25909
+ return ['TTX_GOODS'].includes(type);
24952
25910
  }
24953
25911
  };
24954
25912
  var processGoods$1 = function processGoods(_ref) {
@@ -25015,6 +25973,12 @@ var processGoods$1 = function processGoods(_ref) {
25015
25973
  canUpdateNumber: canUpdateNumber,
25016
25974
  source: source
25017
25975
  });
25976
+ } else if (isErpType.isTtx(type)) {
25977
+ newList = processTtxGoods$1({
25978
+ list: list,
25979
+ type: type,
25980
+ canUpdateNumber: canUpdateNumber
25981
+ });
25018
25982
  } else {
25019
25983
  newList = processDefaultGoods({
25020
25984
  list: list,
@@ -25025,9 +25989,21 @@ var processGoods$1 = function processGoods(_ref) {
25025
25989
  }
25026
25990
  return newList;
25027
25991
  };
25028
- var processJyGoods = function processJyGoods(_ref2) {
25992
+ var processTtxGoods$1 = function processTtxGoods(_ref2) {
25029
25993
  var list = _ref2.list,
25030
25994
  canUpdateNumber = _ref2.canUpdateNumber;
25995
+ return list.map(function (item) {
25996
+ return _objectSpread2(_objectSpread2({}, item), {}, {
25997
+ uuid: (item === null || item === void 0 ? void 0 : item.uuid) || uuid(),
25998
+ canDelete: true,
25999
+ canEdit: true,
26000
+ canUpdateNumber: canUpdateNumber
26001
+ });
26002
+ });
26003
+ };
26004
+ var processJyGoods = function processJyGoods(_ref3) {
26005
+ var list = _ref3.list,
26006
+ canUpdateNumber = _ref3.canUpdateNumber;
25031
26007
  return list.map(function (item) {
25032
26008
  var goodName = item.goodName,
25033
26009
  goodNo = item.goodNo,
@@ -25063,9 +26039,9 @@ var processJyGoods = function processJyGoods(_ref2) {
25063
26039
  });
25064
26040
  });
25065
26041
  };
25066
- var processJkyGoods$1 = function processJkyGoods(_ref3) {
25067
- var list = _ref3.list,
25068
- canUpdateNumber = _ref3.canUpdateNumber;
26042
+ var processJkyGoods$1 = function processJkyGoods(_ref4) {
26043
+ var list = _ref4.list,
26044
+ canUpdateNumber = _ref4.canUpdateNumber;
25069
26045
  return list.map(function (item) {
25070
26046
  var goodName = item.goodName,
25071
26047
  goodNo = item.goodNo,
@@ -25097,9 +26073,9 @@ var processJkyGoods$1 = function processJkyGoods(_ref3) {
25097
26073
  });
25098
26074
  });
25099
26075
  };
25100
- var processWlnGoods$1 = function processWlnGoods(_ref4) {
25101
- var list = _ref4.list,
25102
- canUpdateNumber = _ref4.canUpdateNumber;
26076
+ var processWlnGoods$1 = function processWlnGoods(_ref5) {
26077
+ var list = _ref5.list,
26078
+ canUpdateNumber = _ref5.canUpdateNumber;
25103
26079
  return list.map(function (item) {
25104
26080
  var goodName = item.goodName,
25105
26081
  goodShortName = item.goodShortName,
@@ -25150,10 +26126,10 @@ var processWlnGoods$1 = function processWlnGoods(_ref4) {
25150
26126
  });
25151
26127
  };
25152
26128
  // 处理不同类型的商品数据
25153
- var processWdtGoods$1 = function processWdtGoods(_ref5) {
25154
- var list = _ref5.list,
25155
- type = _ref5.type,
25156
- canUpdateNumber = _ref5.canUpdateNumber;
26129
+ var processWdtGoods$1 = function processWdtGoods(_ref6) {
26130
+ var list = _ref6.list,
26131
+ type = _ref6.type,
26132
+ canUpdateNumber = _ref6.canUpdateNumber;
25157
26133
  return list.map(function (item) {
25158
26134
  var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
25159
26135
  uuid: uuid(),
@@ -25171,9 +26147,9 @@ var processWdtGoods$1 = function processWdtGoods(_ref5) {
25171
26147
  return processedItem;
25172
26148
  });
25173
26149
  };
25174
- var processBsE3Goods$1 = function processBsE3Goods(_ref6) {
25175
- var list = _ref6.list,
25176
- canUpdateNumber = _ref6.canUpdateNumber;
26150
+ var processBsE3Goods$1 = function processBsE3Goods(_ref7) {
26151
+ var list = _ref7.list,
26152
+ canUpdateNumber = _ref7.canUpdateNumber;
25177
26153
  return list.map(function (item) {
25178
26154
  var specNo = item.specNo,
25179
26155
  specId = item.specId,
@@ -25208,9 +26184,9 @@ var processBsE3Goods$1 = function processBsE3Goods(_ref6) {
25208
26184
  });
25209
26185
  });
25210
26186
  };
25211
- var processGyGoods$1 = function processGyGoods(_ref7) {
25212
- var list = _ref7.list,
25213
- source = _ref7.source;
26187
+ var processGyGoods$1 = function processGyGoods(_ref8) {
26188
+ var list = _ref8.list,
26189
+ source = _ref8.source;
25214
26190
  var isFormWorkOrder = source === 'workOrder';
25215
26191
  return list.map(function (item) {
25216
26192
  var goodName = item.goodName,
@@ -25237,8 +26213,8 @@ var processGyGoods$1 = function processGyGoods(_ref7) {
25237
26213
  });
25238
26214
  });
25239
26215
  };
25240
- var processJstGoods$1 = function processJstGoods(_ref8) {
25241
- var list = _ref8.list;
26216
+ var processJstGoods$1 = function processJstGoods(_ref9) {
26217
+ var list = _ref9.list;
25242
26218
  return list.map(function (item) {
25243
26219
  return {
25244
26220
  name: item.goodName,
@@ -25256,9 +26232,9 @@ var processJstGoods$1 = function processJstGoods(_ref8) {
25256
26232
  };
25257
26233
  });
25258
26234
  };
25259
- var processKmGoods$1 = function processKmGoods(_ref9) {
25260
- var list = _ref9.list,
25261
- type = _ref9.type;
26235
+ var processKmGoods$1 = function processKmGoods(_ref10) {
26236
+ var list = _ref10.list,
26237
+ type = _ref10.type;
25262
26238
  var initParamsMap = {
25263
26239
  KM_GOODS: {
25264
26240
  num: 1
@@ -25276,7 +26252,7 @@ var processKmGoods$1 = function processKmGoods(_ref9) {
25276
26252
  return list.map(function (item) {
25277
26253
  return _objectSpread2(_objectSpread2({}, item), {}, {
25278
26254
  skuPropertiesName: item.specName,
25279
- sysSkuPropertiesName: item.specId,
26255
+ sysSkuPropertiesName: item.propertiesValue,
25280
26256
  sysTitle: item.goodName,
25281
26257
  title: null,
25282
26258
  shortTitle: item.goodShortName,
@@ -25297,9 +26273,9 @@ var processKmGoods$1 = function processKmGoods(_ref9) {
25297
26273
  }, initParamsMap[type] || {});
25298
26274
  });
25299
26275
  };
25300
- var processDefaultGoods = function processDefaultGoods(_ref10) {
25301
- var list = _ref10.list,
25302
- canUpdateNumber = _ref10.canUpdateNumber;
26276
+ var processDefaultGoods = function processDefaultGoods(_ref11) {
26277
+ var list = _ref11.list,
26278
+ canUpdateNumber = _ref11.canUpdateNumber;
25303
26279
  return list.map(function (item) {
25304
26280
  var goodsId = item.goodsId,
25305
26281
  name = item.name,
@@ -25365,6 +26341,7 @@ var systemOrderNoMap = {
25365
26341
  JKY_GOODS: 'tradeNo',
25366
26342
  JKY_REISSUE_GOODS: 'tradeNo',
25367
26343
  DXD_GOODS: 'orderNo',
26344
+ TTX_GOODS: 'code',
25368
26345
  WLN_REISSUE_GOODS: 'tradeNo',
25369
26346
  KM_REISSUE_GOODS: 'sid',
25370
26347
  KM_RETURN_GOODS: 'sid',
@@ -25400,7 +26377,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
25400
26377
  _ref$isReloadSelectTa = _ref.isReloadSelectTable,
25401
26378
  isReloadSelectTable = _ref$isReloadSelectTa === void 0 ? false : _ref$isReloadSelectTa,
25402
26379
  validSystemOrderFn = _ref.validSystemOrderFn;
25403
- console.log('systemOrders---', systemOrders);
25404
26380
  var _useState = useState(),
25405
26381
  _useState2 = _slicedToArray(_useState, 2),
25406
26382
  selectSystemNo = _useState2[0],
@@ -25672,6 +26648,8 @@ var GoodItem$1 = function GoodItem(props) {
25672
26648
  otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
25673
26649
  _props$canUpdateNumbe = props.canUpdateNumber,
25674
26650
  canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
26651
+ _props$notAllowedOper = props.notAllowedOperation,
26652
+ notAllowedOperation = _props$notAllowedOper === void 0 ? false : _props$notAllowedOper,
25675
26653
  shopCode = props.shopCode,
25676
26654
  _props$companyKey = props.companyKey,
25677
26655
  companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
@@ -25695,7 +26673,7 @@ var GoodItem$1 = function GoodItem(props) {
25695
26673
  // const isShowSelectTradeGoods =
25696
26674
  // type !== 'JST_EXCHANGE_GOODS' || jstReturnGoods?.jstSystemOrderNo;
25697
26675
  // 判断是否为是否展示系统单筛选项
25698
- var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'DXD_GOODS', 'DXD_SUPPLIERS', 'WLN_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
26676
+ var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'DXD_GOODS', 'DXD_SUPPLIERS', 'TTX_GOODS', 'WLN_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
25699
26677
  var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS', 'JKY_REISSUE_GOODS', 'WLN_REISSUE_GOODS'].includes(type) || false;
25700
26678
  var refModal = useRef();
25701
26679
  console.debug('表格数据', value);
@@ -25793,6 +26771,7 @@ var GoodItem$1 = function GoodItem(props) {
25793
26771
  case 'JKY_REISSUE_GOODS':
25794
26772
  case 'DXD_GOODS':
25795
26773
  case 'DXD_SUPPLIERS':
26774
+ case 'TTX_GOODS':
25796
26775
  case 'WLN_REISSUE_GOODS':
25797
26776
  case 'SKX_GOODS':
25798
26777
  case 'SKX_RETURN_GOODS':
@@ -25858,7 +26837,9 @@ var GoodItem$1 = function GoodItem(props) {
25858
26837
  });
25859
26838
  // 如果列应该显示(show不为false)或者有验证器,则返回对应的列配置
25860
26839
  if (currentCol && (col.show !== false || (currentCol === null || currentCol === void 0 ? void 0 : currentCol.validator))) {
25861
- return currentCol;
26840
+ return _objectSpread2(_objectSpread2({}, currentCol), {}, {
26841
+ width: resolveColumnWidth(col.width, currentCol.width)
26842
+ });
25862
26843
  }
25863
26844
  return undefined;
25864
26845
  }).filter(Boolean);
@@ -25880,14 +26861,14 @@ var GoodItem$1 = function GoodItem(props) {
25880
26861
  render: function render(val, record, index) {
25881
26862
  return /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
25882
26863
  index: index,
25883
- hoveredRowIndex: !disabled && (record.canDelete || canDelete) ? hoveredRowIndex : null,
26864
+ hoveredRowIndex: !disabled && !notAllowedOperation && (record.canDelete || canDelete) ? hoveredRowIndex : null,
25884
26865
  handleClick: function handleClick() {
25885
26866
  return handleDelete(record, index);
25886
26867
  }
25887
26868
  });
25888
26869
  }
25889
26870
  }].concat(_toConsumableArray(baseInfoColumns));
25890
- if (!disabled) {
26871
+ if (!disabled && !notAllowedOperation) {
25891
26872
  columnList.push({
25892
26873
  dataIndex: '',
25893
26874
  title: "\u64CD\u4F5C",
@@ -25929,22 +26910,11 @@ var GoodItem$1 = function GoodItem(props) {
25929
26910
  }
25930
26911
  }].concat(_toConsumableArray(list));
25931
26912
  }, [showHeader, value, disabled, hoveredRowIndex]);
25932
- var orderColumns = useMemo(function () {
25933
- var columns = COLUMNS_MAP('', {
25934
- operate: false,
25935
- disabled: true
25936
- })(type);
25937
- return [{
25938
- dataIndex: '',
25939
- title: '序号',
25940
- align: 'center',
25941
- ellipsis: true,
25942
- width: 50,
25943
- render: function render(val, record, index) {
25944
- return /*#__PURE__*/React.createElement("span", null, index + 1);
25945
- }
25946
- }].concat(_toConsumableArray(columns));
25947
- }, []);
26913
+ var tableScrollX = useMemo(function () {
26914
+ return newColumns.reduce(function (total, column) {
26915
+ return total + (Number(column.width) || 0);
26916
+ }, 0);
26917
+ }, [newColumns]);
25948
26918
  var onSubmit = function onSubmit(list) {
25949
26919
  var newList = processGoods$1({
25950
26920
  list: list,
@@ -25984,7 +26954,7 @@ var GoodItem$1 = function GoodItem(props) {
25984
26954
  var validSystemOrder = useMemo(function () {
25985
26955
  return ['GY_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'KM_REISSUE_GOODS'].includes(type) && !hasSelectedSystemOrder;
25986
26956
  }, [type, hasSelectedSystemOrder]);
25987
- return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
26957
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && !notAllowedOperation && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
25988
26958
  style: {
25989
26959
  float: 'right'
25990
26960
  }
@@ -26024,7 +26994,7 @@ var GoodItem$1 = function GoodItem(props) {
26024
26994
  size: "small",
26025
26995
  pagination: false,
26026
26996
  scroll: {
26027
- x: '100%'
26997
+ x: tableScrollX
26028
26998
  },
26029
26999
  locale: {
26030
27000
  emptyText: '暂无数据'
@@ -26039,7 +27009,7 @@ var GoodItem$1 = function GoodItem(props) {
26039
27009
  }
26040
27010
  };
26041
27011
  }
26042
- })), /*#__PURE__*/React.createElement(TheGoodsModal, {
27012
+ })), showErpGoodsBtn && /*#__PURE__*/React.createElement(TheGoodsModal, {
26043
27013
  ref: refModal,
26044
27014
  onSubmit: onSubmit,
26045
27015
  width: width,
@@ -26190,7 +27160,7 @@ var BsGoods = function BsGoods(props) {
26190
27160
  }));
26191
27161
  };
26192
27162
 
26193
- var _excluded$h = ["value", "onChange", "reasonList", "disabled", "isSettingConfig"];
27163
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "isSettingConfig"];
26194
27164
  var BsExchange = function BsExchange(props) {
26195
27165
  var _value$bsExchangeType6, _value$bsExchangeType7, _value$bsExchangeType8;
26196
27166
  var value = props.value,
@@ -26199,7 +27169,7 @@ var BsExchange = function BsExchange(props) {
26199
27169
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
26200
27170
  disabled = props.disabled,
26201
27171
  isSettingConfig = props.isSettingConfig,
26202
- other = _objectWithoutProperties(props, _excluded$h);
27172
+ other = _objectWithoutProperties(props, _excluded$i);
26203
27173
  var valueRef = useRef({});
26204
27174
  useEffect(function () {
26205
27175
  valueRef.current = value;
@@ -26438,7 +27408,7 @@ var BsExchange = function BsExchange(props) {
26438
27408
  }))) : null);
26439
27409
  };
26440
27410
 
26441
- var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
27411
+ var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
26442
27412
  var typeMap = {
26443
27413
  BS_REISSUE_GOODS: {
26444
27414
  key: 'bsReissueGoods',
@@ -26464,7 +27434,7 @@ var BsReissue = function BsReissue(props) {
26464
27434
  disabled = props.disabled,
26465
27435
  type = props.type,
26466
27436
  isSettingConfig = props.isSettingConfig,
26467
- other = _objectWithoutProperties(props, _excluded$i);
27437
+ other = _objectWithoutProperties(props, _excluded$j);
26468
27438
  var valueRef = useRef({});
26469
27439
  useEffect(function () {
26470
27440
  var _value$bsReissueType;
@@ -26592,7 +27562,7 @@ var BsReissue = function BsReissue(props) {
26592
27562
  })));
26593
27563
  };
26594
27564
 
26595
- var _excluded$j = ["value", "onChange", "reasonList", "disabled", "isSettingConfig"];
27565
+ var _excluded$k = ["value", "onChange", "reasonList", "disabled", "isSettingConfig"];
26596
27566
  var BsReturnGoods = function BsReturnGoods(props) {
26597
27567
  var value = props.value,
26598
27568
  onChange = props.onChange,
@@ -26600,7 +27570,7 @@ var BsReturnGoods = function BsReturnGoods(props) {
26600
27570
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
26601
27571
  disabled = props.disabled,
26602
27572
  isSettingConfig = props.isSettingConfig,
26603
- other = _objectWithoutProperties(props, _excluded$j);
27573
+ other = _objectWithoutProperties(props, _excluded$k);
26604
27574
  var valueRef = useRef({});
26605
27575
  useEffect(function () {
26606
27576
  pubsub.subscribe('returnSelectList', function (_, data) {
@@ -26720,12 +27690,13 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
26720
27690
  var _data$data, _data$data$trades;
26721
27691
  if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
26722
27692
  data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
26723
- var _tradeStatusMap$data$;
27693
+ var _tradeStatusMap$data$, _warehouseTypeMap$dat;
26724
27694
  return _objectSpread2(_objectSpread2({}, item), {}, {
26725
27695
  billNo: item.tradeNo,
26726
27696
  billType: WDT_ORDER_TYPE_MAP[item.tradeType],
26727
27697
  billTag: item.tagName || item.tags,
26728
27698
  tradeStatusValue: tradeStatusMap === null || tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus],
27699
+ warehouseType: warehouseTypeMap === null || warehouseTypeMap === void 0 ? void 0 : (_warehouseTypeMap$dat = warehouseTypeMap[data.data.version]) === null || _warehouseTypeMap$dat === void 0 ? void 0 : _warehouseTypeMap$dat[item.warehouseType],
26729
27700
  logisticsName: ExpressData.getInstance('wdt').getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCode, false) || (item === null || item === void 0 ? void 0 : item.logisticsName)
26730
27701
  });
26731
27702
  });
@@ -27079,6 +28050,16 @@ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
27079
28050
  }
27080
28051
  }).then(function (data) {
27081
28052
  if (data === null || data === void 0 ? void 0 : data.success) {
28053
+ var _data$data, _data$data$doOrders;
28054
+ if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$doOrders = _data$data.doOrders) === null || _data$data$doOrders === void 0 ? void 0 : _data$data$doOrders.length) {
28055
+ var _data$data2;
28056
+ (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.doOrders.forEach(function (item) {
28057
+ item.platformOrderNo = data.platformOrderNo;
28058
+ item.shopCode = data.shopCode;
28059
+ item.shopName = data.shopName;
28060
+ item.split = data.split;
28061
+ });
28062
+ }
27082
28063
  resolve((data === null || data === void 0 ? void 0 : data.data) || {});
27083
28064
  // 延迟10秒清除,保证订单的时效性
27084
28065
  setTimeout(function () {
@@ -27098,13 +28079,43 @@ var dxdUtils = {
27098
28079
  };
27099
28080
 
27100
28081
  var singletonMap$9 = new Map();
28082
+ var normalizeOrder = function normalizeOrder(entry) {
28083
+ return _objectSpread2(_objectSpread2({}, (entry === null || entry === void 0 ? void 0 : entry.header) || entry), {}, {
28084
+ details: (entry === null || entry === void 0 ? void 0 : entry.details) || []
28085
+ });
28086
+ };
28087
+ var getOrderListSingleton$3 = function getOrderListSingleton(orderNo) {
28088
+ if (!singletonMap$9.has(orderNo)) {
28089
+ var promise = extendRequest('/qy/gdfw/ttx/erp/orderDetail', {
28090
+ method: 'post',
28091
+ data: {
28092
+ sourceOrderCode: orderNo
28093
+ }
28094
+ }).then(function (response) {
28095
+ var data = response === null || response === void 0 ? void 0 : response.data;
28096
+ return Array.isArray(data) ? data.map(normalizeOrder) : [];
28097
+ });
28098
+ singletonMap$9.set(orderNo, promise);
28099
+ promise.finally(function () {
28100
+ setTimeout(function () {
28101
+ return singletonMap$9.delete(orderNo);
28102
+ }, 10000);
28103
+ });
28104
+ }
28105
+ return singletonMap$9.get(orderNo);
28106
+ };
28107
+ var ttxUtils = {
28108
+ getOrderListSingleton: getOrderListSingleton$3
28109
+ };
28110
+
28111
+ var singletonMap$a = new Map();
27101
28112
  var getAfterSalesOrderList = function getAfterSalesOrderList(params) {
27102
28113
  var cacheKey = "".concat(params.orderNo, "_").concat(params.shopId);
27103
- if (!singletonMap$9.has(cacheKey)) {
28114
+ if (!singletonMap$a.has(cacheKey)) {
27104
28115
  var p = new Promise(function (resolve, reject) {
27105
28116
  var doReject = function doReject(err) {
27106
28117
  // 清空掉错误的请求记录
27107
- singletonMap$9.delete(cacheKey);
28118
+ singletonMap$a.delete(cacheKey);
27108
28119
  reject(err);
27109
28120
  };
27110
28121
  extendRequest('/qy/gdfw/order/queryTradeAfterSaleList', {
@@ -27115,28 +28126,28 @@ var getAfterSalesOrderList = function getAfterSalesOrderList(params) {
27115
28126
  resolve(res.data || []);
27116
28127
  // 延迟10秒清除,保证订单的时效性
27117
28128
  setTimeout(function () {
27118
- singletonMap$9.delete(cacheKey);
28129
+ singletonMap$a.delete(cacheKey);
27119
28130
  }, 1000 * 10);
27120
28131
  } else {
27121
28132
  doReject(res);
27122
28133
  }
27123
28134
  }).catch(doReject);
27124
28135
  });
27125
- singletonMap$9.set(cacheKey, p);
28136
+ singletonMap$a.set(cacheKey, p);
27126
28137
  }
27127
- return singletonMap$9.get(cacheKey);
28138
+ return singletonMap$a.get(cacheKey);
27128
28139
  };
27129
28140
  var platformUtils = {
27130
28141
  getAfterSalesOrderList: getAfterSalesOrderList
27131
28142
  };
27132
28143
 
27133
- var singletonMap$a = new Map();
27134
- var getOrderListSingleton$3 = function getOrderListSingleton(orderNo) {
27135
- if (!singletonMap$a.has(orderNo)) {
28144
+ var singletonMap$b = new Map();
28145
+ var getOrderListSingleton$4 = function getOrderListSingleton(orderNo) {
28146
+ if (!singletonMap$b.has(orderNo)) {
27136
28147
  var p = new Promise(function (resolve, reject) {
27137
28148
  var doReject = function doReject(err) {
27138
28149
  // 清空掉错误的请求记录
27139
- singletonMap$a.delete(orderNo);
28150
+ singletonMap$b.delete(orderNo);
27140
28151
  reject(err);
27141
28152
  };
27142
28153
  extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
@@ -27162,24 +28173,23 @@ var getOrderListSingleton$3 = function getOrderListSingleton(orderNo) {
27162
28173
  }
27163
28174
  // 延迟10秒清除,保证订单的时效性
27164
28175
  setTimeout(function () {
27165
- singletonMap$a.delete(orderNo);
28176
+ singletonMap$b.delete(orderNo);
27166
28177
  }, 1000 * 10);
27167
28178
  } else {
27168
28179
  doReject(data);
27169
28180
  }
27170
28181
  }).catch(doReject);
27171
28182
  });
27172
- singletonMap$a.set(orderNo, p);
28183
+ singletonMap$b.set(orderNo, p);
27173
28184
  }
27174
- return singletonMap$a.get(orderNo);
28185
+ return singletonMap$b.get(orderNo);
27175
28186
  };
27176
28187
  var kmUtils = {
27177
- getOrderListSingleton: getOrderListSingleton$3
28188
+ getOrderListSingleton: getOrderListSingleton$4
27178
28189
  };
27179
28190
 
27180
- var _excluded$k = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"],
27181
- _excluded2 = ["shopCode"],
27182
- _excluded3 = ["doOrders", "isSplit", "billNo", "billType", "billTag", "sysStatus"];
28191
+ var _excluded$l = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"],
28192
+ _excluded2 = ["shopCode"];
27183
28193
  var columnsMap = {
27184
28194
  BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
27185
28195
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
@@ -27192,7 +28202,8 @@ var columnsMap = {
27192
28202
  JKY_SYSTEM_ORDER: JKY_SYSTEM_ORDER_CONFIG.columns,
27193
28203
  WDT_RETURN_BILL_NO: WDT_RETURN_BILL_NO_CONFIG.columns,
27194
28204
  PLATFORM_AFTER_SALES_ORDER: PLATFORM_AFTER_SALES_ORDER_CONFIG.columns,
27195
- DXD_SYSTEM_ORDER: DXD_SYSTEM_ORDER_CONFIG.columns
28205
+ DXD_SYSTEM_ORDER: DXD_SYSTEM_ORDER_CONFIG.columns,
28206
+ TTX_SYSTEM_ORDER: TTX_SYSTEM_ORDER_CONFIG.columns
27196
28207
  };
27197
28208
  var rowKeyMap = {
27198
28209
  BS_SYSTEM_ORDER: 'billNo',
@@ -27206,7 +28217,8 @@ var rowKeyMap = {
27206
28217
  JKY_SYSTEM_ORDER: 'tradeNo',
27207
28218
  WDT_RETURN_BILL_NO: 'refundNo',
27208
28219
  PLATFORM_AFTER_SALES_ORDER: 'afterSaleOrderId',
27209
- DXD_SYSTEM_ORDER: 'billNo'
28220
+ DXD_SYSTEM_ORDER: 'billNo',
28221
+ TTX_SYSTEM_ORDER: 'code'
27210
28222
  };
27211
28223
  var RADIO_TABLE_KEYS = ['PLATFORM_AFTER_SALES_ORDER'];
27212
28224
  var index$2 = (function (props) {
@@ -27272,6 +28284,8 @@ var index$2 = (function (props) {
27272
28284
  getJkyOrderList(value.orderNo);
27273
28285
  } else if (type === 'DXD_SYSTEM_ORDER') {
27274
28286
  getDxdOrderList(value.orderNo);
28287
+ } else if (type === 'TTX_SYSTEM_ORDER') {
28288
+ getTtxOrderList(value.orderNo);
27275
28289
  } else if (type === 'PLATFORM_AFTER_SALES_ORDER') {
27276
28290
  value.shopId && getPlatformAfterSalesOrderList(value.orderNo, value.shopId);
27277
28291
  }
@@ -27347,6 +28361,14 @@ var index$2 = (function (props) {
27347
28361
  false: '否'
27348
28362
  };
27349
28363
  }
28364
+ if (type === 'TTX_SYSTEM_ORDER') {
28365
+ map['internalOrderType'] = _objectSpread2({}, TTX_INTERNAL_ORDER_TYPE_MAP);
28366
+ map['status'] = _objectSpread2({}, TTX_STATUS_MAP);
28367
+ map['split'] = {
28368
+ '1': '拆单',
28369
+ '0': ''
28370
+ };
28371
+ }
27350
28372
  return map;
27351
28373
  }, [type]);
27352
28374
  // 过滤后的表格数据 - 根据选中字段和关键词模糊匹配(不区分大小写)
@@ -27585,7 +28607,7 @@ var index$2 = (function (props) {
27585
28607
  vipCode = _ref9.vipCode,
27586
28608
  shopCode = _ref9.shopCode,
27587
28609
  cancel = _ref9.cancel,
27588
- rest = _objectWithoutProperties(_ref9, _excluded$k);
28610
+ rest = _objectWithoutProperties(_ref9, _excluded$l);
27589
28611
  return _objectSpread2(_objectSpread2({}, rest), {}, {
27590
28612
  billNo: billNo,
27591
28613
  billType: billType,
@@ -27694,44 +28716,17 @@ var index$2 = (function (props) {
27694
28716
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
27695
28717
  while (1) switch (_context11.prev = _context11.next) {
27696
28718
  case 0:
27697
- dxdUtils.getOrderListSingleton(orderNo).then(function (trades) {
27698
- var formatDxdOrders = (trades || []).reduce(function (prv, trade) {
27699
- var _ref15 = trade || {},
27700
- _ref15$doOrders = _ref15.doOrders,
27701
- doOrders = _ref15$doOrders === void 0 ? [] : _ref15$doOrders,
27702
- isSplit = _ref15.isSplit,
27703
- billNo = _ref15.billNo,
27704
- billType = _ref15.billType,
27705
- billTag = _ref15.billTag,
27706
- sysStatus = _ref15.sysStatus,
27707
- restTrade = _objectWithoutProperties(_ref15, _excluded3);
27708
- if (!doOrders.length) {
27709
- prv.push(_objectSpread2(_objectSpread2({}, restTrade), {}, {
27710
- billNo: billNo,
27711
- billType: billType,
27712
- billTag: billTag,
27713
- sysStatus: sysStatus,
27714
- isSplit: isSplit,
27715
- rowKey: billNo
27716
- }));
27717
- return prv;
27718
- }
27719
- doOrders.forEach(function (doOrder, index) {
27720
- var currentOrderNo = doOrder === null || doOrder === void 0 ? void 0 : doOrder.orderNo;
27721
- prv.push(_objectSpread2(_objectSpread2(_objectSpread2({}, restTrade), doOrder), {}, {
27722
- billNo: billNo,
27723
- billType: billType,
27724
- billTag: billTag,
27725
- sysStatus: sysStatus,
27726
- isSplit: isSplit,
27727
- rowKey: currentOrderNo ? "".concat(billNo, "_").concat(currentOrderNo) : "".concat(billNo, "_").concat(index)
27728
- }));
28719
+ dxdUtils.getOrderListSingleton(orderNo).then(function (trade) {
28720
+ var _trade$doOrders;
28721
+ var data = (_trade$doOrders = trade.doOrders) === null || _trade$doOrders === void 0 ? void 0 : _trade$doOrders.map(function (order) {
28722
+ return _objectSpread2(_objectSpread2({}, order), {}, {
28723
+ billNo: order.orderNo,
28724
+ billType: (trade === null || trade === void 0 ? void 0 : trade.split) ? '拆分订单' : '普通订单'
27729
28725
  });
27730
- return prv;
27731
- }, []);
28726
+ });
27732
28727
  _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
27733
- orders: formatDxdOrders,
27734
- showOrderInfo: formatDxdOrders
28728
+ orders: data || [],
28729
+ showOrderInfo: data || []
27735
28730
  }));
27736
28731
  });
27737
28732
  onceRef.current = false;
@@ -27745,6 +28740,34 @@ var index$2 = (function (props) {
27745
28740
  return _ref14.apply(this, arguments);
27746
28741
  };
27747
28742
  }();
28743
+ var getTtxOrderList = /*#__PURE__*/function () {
28744
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(orderNo) {
28745
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
28746
+ while (1) switch (_context12.prev = _context12.next) {
28747
+ case 0:
28748
+ ttxUtils.getOrderListSingleton(orderNo).then(function (data) {
28749
+ var orders = (data || []).map(function (order) {
28750
+ return _objectSpread2(_objectSpread2({}, order), {}, {
28751
+ code: order.code || order.orderCode || order.orderNo,
28752
+ billNo: order.code || order.orderCode || order.orderNo
28753
+ });
28754
+ });
28755
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
28756
+ orders: orders,
28757
+ showOrderInfo: orders
28758
+ }));
28759
+ });
28760
+ onceRef.current = false;
28761
+ case 2:
28762
+ case "end":
28763
+ return _context12.stop();
28764
+ }
28765
+ }, _callee12);
28766
+ }));
28767
+ return function getTtxOrderList(_x13) {
28768
+ return _ref15.apply(this, arguments);
28769
+ };
28770
+ }();
27748
28771
  var rowKey = rowKeyMap[type] || 'billNo';
27749
28772
  var handleRadioChange = function handleRadioChange(record) {
27750
28773
  var _value$selectIds;
@@ -28219,16 +29242,16 @@ var orderSubFormConstants = {
28219
29242
  };
28220
29243
 
28221
29244
  var getSelectWidgetMap$1 = orderSubFormConstants.getSelectWidgetMap;
28222
- var singletonMap$b = new Map();
28223
- var getOrderListSingleton$4 = function getOrderListSingleton(parmas) {
29245
+ var singletonMap$c = new Map();
29246
+ var getOrderListSingleton$5 = function getOrderListSingleton(parmas) {
28224
29247
  var orderNo = parmas.orderNo,
28225
29248
  shopId = parmas.shopId;
28226
29249
  var key = "".concat(orderNo, "-").concat(shopId);
28227
- if (!singletonMap$b.has(key)) {
29250
+ if (!singletonMap$c.has(key)) {
28228
29251
  var p = new Promise(function (resolve, reject) {
28229
29252
  var doReject = function doReject(err) {
28230
29253
  // 清空掉错误的请求记录
28231
- singletonMap$b.delete(key);
29254
+ singletonMap$c.delete(key);
28232
29255
  reject(err);
28233
29256
  };
28234
29257
  extendRequest('/qy/gdfw/order/subOrderItemsDetail', {
@@ -28244,16 +29267,16 @@ var getOrderListSingleton$4 = function getOrderListSingleton(parmas) {
28244
29267
  }
28245
29268
  // 延迟10秒清除,保证订单的时效性
28246
29269
  setTimeout(function () {
28247
- singletonMap$b.delete(key);
29270
+ singletonMap$c.delete(key);
28248
29271
  }, 1000 * 10);
28249
29272
  } else {
28250
29273
  doReject(data);
28251
29274
  }
28252
29275
  }).catch(doReject);
28253
29276
  });
28254
- singletonMap$b.set(key, p);
29277
+ singletonMap$c.set(key, p);
28255
29278
  }
28256
- return singletonMap$b.get(key);
29279
+ return singletonMap$c.get(key);
28257
29280
  };
28258
29281
  var renderEditItem = function renderEditItem(_ref) {
28259
29282
  var item = _ref.item,
@@ -28385,7 +29408,7 @@ var renderDetailItem = function renderDetailItem(_ref2) {
28385
29408
  return Component;
28386
29409
  };
28387
29410
  var utils = {
28388
- getOrderListSingleton: getOrderListSingleton$4,
29411
+ getOrderListSingleton: getOrderListSingleton$5,
28389
29412
  renderEditItem: renderEditItem,
28390
29413
  renderDetailItem: renderDetailItem
28391
29414
  };
@@ -28393,7 +29416,7 @@ var utils = {
28393
29416
  var getOrderSubformColumns$1 = orderSubFormConstants.getOrderSubformColumns;
28394
29417
  var renderEditItem$1 = utils.renderEditItem,
28395
29418
  renderDetailItem$1 = utils.renderDetailItem,
28396
- getOrderListSingleton$5 = utils.getOrderListSingleton;
29419
+ getOrderListSingleton$6 = utils.getOrderListSingleton;
28397
29420
  var OrderSubForm = function OrderSubForm(props) {
28398
29421
  var _props$value = props.value,
28399
29422
  value = _props$value === void 0 ? {} : _props$value,
@@ -28595,7 +29618,7 @@ var OrderSubForm = function OrderSubForm(props) {
28595
29618
  var JOIN_SHOP = shopList === null || shopList === void 0 ? void 0 : shopList.find(function (item) {
28596
29619
  return !item.notJoin && item.shopId == shopId;
28597
29620
  });
28598
- return (value === null || value === void 0 ? void 0 : value.orderNo) && shopId && JOIN_SHOP ? getOrderListSingleton$5({
29621
+ return (value === null || value === void 0 ? void 0 : value.orderNo) && shopId && JOIN_SHOP ? getOrderListSingleton$6({
28599
29622
  orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
28600
29623
  shopId: shopId
28601
29624
  }).then(function (data) {
@@ -28692,6 +29715,9 @@ var isErpType$1 = {
28692
29715
  },
28693
29716
  isDxd: function isDxd(type) {
28694
29717
  return ['DXD_GOODS', 'DXD_SUPPLIERS'].includes(type);
29718
+ },
29719
+ isTtx: function isTtx(type) {
29720
+ return ['TTX_GOODS'].includes(type);
28695
29721
  }
28696
29722
  };
28697
29723
  var processAllOrders = function processAllOrders(_ref) {
@@ -28726,7 +29752,13 @@ var processAllOrders = function processAllOrders(_ref) {
28726
29752
  });
28727
29753
  } else if (isErpType$1.isDxd(type)) {
28728
29754
  // DXD 选品用出库订单 doOrders(每项含 skus[])
28729
- newList = (data === null || data === void 0 ? void 0 : data.doOrders) || [];
29755
+ newList = processDxdOrders({
29756
+ data: data
29757
+ });
29758
+ } else if (isErpType$1.isTtx(type)) {
29759
+ newList = processTtxOrders({
29760
+ data: data
29761
+ });
28730
29762
  } else {
28731
29763
  newList = processDefaultOrders({
28732
29764
  data: data
@@ -28773,8 +29805,32 @@ var processWlnOrders = function processWlnOrders(_ref6) {
28773
29805
  var data = _ref6.data;
28774
29806
  return (data === null || data === void 0 ? void 0 : data.orders) || [];
28775
29807
  };
28776
- var processDefaultOrders = function processDefaultOrders(_ref7) {
29808
+ var processDxdOrders = function processDxdOrders(_ref7) {
29809
+ var _data$doOrders;
28777
29810
  var data = _ref7.data;
29811
+ var _ref8 = data || {},
29812
+ isSplit = _ref8.isSplit,
29813
+ billNo = _ref8.billNo,
29814
+ billType = _ref8.billType,
29815
+ billTag = _ref8.billTag,
29816
+ sysStatus = _ref8.sysStatus;
29817
+ var trades = (_data$doOrders = data.doOrders) === null || _data$doOrders === void 0 ? void 0 : _data$doOrders.map(function (item) {
29818
+ return _objectSpread2(_objectSpread2({}, item), {}, {
29819
+ billNo: billNo,
29820
+ billType: billType,
29821
+ billTag: billTag,
29822
+ isSplit: isSplit,
29823
+ sysStatus: sysStatus
29824
+ });
29825
+ });
29826
+ return trades;
29827
+ };
29828
+ var processTtxOrders = function processTtxOrders(_ref9) {
29829
+ var data = _ref9.data;
29830
+ return Array.isArray(data) ? data : [];
29831
+ };
29832
+ var processDefaultOrders = function processDefaultOrders(_ref10) {
29833
+ var data = _ref10.data;
28778
29834
  return data || [];
28779
29835
  };
28780
29836
 
@@ -29063,6 +30119,23 @@ var componentMap$2 = {
29063
30119
  changeShopCode: 'dxdSuppliersChangeShopCode'
29064
30120
  }
29065
30121
  },
30122
+ TTX_GOODS: {
30123
+ type: 'ttx',
30124
+ key: 'ttxGoods',
30125
+ name: '通天晓',
30126
+ orderNo: 'code',
30127
+ goodDetailOrderNo: 'code',
30128
+ hiddenErpGoodsBtn: true,
30129
+ eventNameMap: {
30130
+ type: 'ttxType',
30131
+ updateGoodsHandle: updateTtxGoodsHandle,
30132
+ selectListReturn: 'ttxSelectListReturn',
30133
+ selectList: 'ttxSelectList',
30134
+ changeShopCode: 'ttxChangeShopCode',
30135
+ deleteGood: 'ttxDeleteGood'
30136
+ },
30137
+ getOrderList: ttxUtils.getOrderListSingleton
30138
+ },
29066
30139
  WLN_GOODS: {
29067
30140
  type: 'jky',
29068
30141
  key: 'wlnGoods',
@@ -29129,13 +30202,13 @@ var componentMap$2 = {
29129
30202
  var CommonGoods = function CommonGoods(props) {
29130
30203
  var _componentMap$compTyp, _withInfo$current3, _withInfo$current4, _componentMap$compTyp7, _componentMap$compTyp8;
29131
30204
  var value = props.value,
29132
- rawDisabled = props.disabled,
30205
+ disabled = props.disabled,
29133
30206
  onChange = props.onChange,
29134
30207
  compType = props.type;
29135
30208
  // DXD_SUPPLIERS 纯镜像 DXD_GOODS(由 FormRender useWatch 联动同步增删),禁用独立增删
29136
- var disabled = rawDisabled || compType === 'DXD_SUPPLIERS';
29137
30209
  // console.log('value?.orders', value?.orders);
29138
30210
  // 合并单订单会包含","
30211
+ var notAllowedOperation = ['DXD_SUPPLIERS'].includes(compType);
29139
30212
  var showModeBtn = ((_componentMap$compTyp = componentMap$2[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.checkShowModeBtn) ? componentMap$2[compType].checkShowModeBtn(value) : !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
29140
30213
  var _order$componentMap$c;
29141
30214
  return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$2[compType].orderNo]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.includes(',');
@@ -29493,7 +30566,6 @@ var CommonGoods = function CommonGoods(props) {
29493
30566
  orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
29494
30567
  type: compType
29495
30568
  });
29496
- console.log('list---', list);
29497
30569
  onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
29498
30570
  allOrders: list || []
29499
30571
  }));
@@ -29523,6 +30595,7 @@ var CommonGoods = function CommonGoods(props) {
29523
30595
  selectedSystemOrders: value === null || value === void 0 ? void 0 : value.orders,
29524
30596
  showChangeBtn: (_componentMap$compTyp7 = componentMap$2[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.showChangeBtn,
29525
30597
  showErpGoodsBtn: !((_componentMap$compTyp8 = componentMap$2[compType]) === null || _componentMap$compTyp8 === void 0 ? void 0 : _componentMap$compTyp8.hiddenErpGoodsBtn),
30598
+ notAllowedOperation: notAllowedOperation,
29526
30599
  tradeGoods: {
29527
30600
  originDataSource: originDataSource,
29528
30601
  getDataSourceAsync: getDataSourceAsync,
@@ -29934,7 +31007,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29934
31007
  })));
29935
31008
  };
29936
31009
 
29937
- var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
31010
+ var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
29938
31011
  var typeMap$1 = {
29939
31012
  WDT_REISSUE_GOODS: {
29940
31013
  key: 'wdtReissueGoods',
@@ -29964,7 +31037,7 @@ var wdtReissue = function wdtReissue(props) {
29964
31037
  disabled = props.disabled,
29965
31038
  type = props.type,
29966
31039
  isSettingConfig = props.isSettingConfig,
29967
- other = _objectWithoutProperties(props, _excluded$l);
31040
+ other = _objectWithoutProperties(props, _excluded$m);
29968
31041
  var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
29969
31042
  var _order$srcTid;
29970
31043
  return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
@@ -30188,7 +31261,7 @@ var wdtReissue = function wdtReissue(props) {
30188
31261
  })));
30189
31262
  };
30190
31263
 
30191
- var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
31264
+ var _excluded$n = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
30192
31265
  var typeMap$2 = {
30193
31266
  JST_REISSUE_GOODS: {
30194
31267
  compType: '补发',
@@ -30339,7 +31412,7 @@ var PublicReissue = function PublicReissue(props) {
30339
31412
  disabled = props.disabled,
30340
31413
  type = props.type,
30341
31414
  isSettingConfig = props.isSettingConfig,
30342
- other = _objectWithoutProperties(props, _excluded$m);
31415
+ other = _objectWithoutProperties(props, _excluded$n);
30343
31416
  var showModeBtn = ((_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.checkShowModeBtn) ? typeMap$2[type].checkShowModeBtn(value) : !!((_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.showModeBtn) || false;
30344
31417
  var getOrderFlag = useRef(false);
30345
31418
  var _useState = useState(false),
@@ -31204,12 +32277,12 @@ var Goods$1 = function Goods(props, ref) {
31204
32277
  };
31205
32278
  var index$3 = /*#__PURE__*/forwardRef(Goods$1);
31206
32279
 
31207
- var _excluded$n = ["onChange", "value", "failValue"];
32280
+ var _excluded$o = ["onChange", "value", "failValue"];
31208
32281
  function CommonStatus(props) {
31209
32282
  var onChange = props.onChange,
31210
32283
  value = props.value,
31211
32284
  failValue = props.failValue,
31212
- other = _objectWithoutProperties(props, _excluded$n);
32285
+ other = _objectWithoutProperties(props, _excluded$o);
31213
32286
  var changeHandle = function changeHandle(val) {
31214
32287
  onChange === null || onChange === void 0 ? void 0 : onChange({
31215
32288
  status: val,
@@ -31348,7 +32421,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
31348
32421
  })) : null) : null);
31349
32422
  };
31350
32423
 
31351
- var _excluded$o = ["value", "onChange", "disabled", "failValue", "type"];
32424
+ var _excluded$p = ["value", "onChange", "disabled", "failValue", "type"];
31352
32425
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
31353
32426
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
31354
32427
  var _props$value = props.value,
@@ -31358,7 +32431,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
31358
32431
  failValue = props.failValue,
31359
32432
  _props$type = props.type,
31360
32433
  type = _props$type === void 0 ? 1 : _props$type,
31361
- other = _objectWithoutProperties(props, _excluded$o);
32434
+ other = _objectWithoutProperties(props, _excluded$p);
31362
32435
  var _useState = useState(0),
31363
32436
  _useState2 = _slicedToArray(_useState, 2),
31364
32437
  changeIndex = _useState2[0],
@@ -31424,7 +32497,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
31424
32497
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
31425
32498
  };
31426
32499
 
31427
- var _excluded$p = ["value", "onChange", "disabled", "failValue", "type"];
32500
+ var _excluded$q = ["value", "onChange", "disabled", "failValue", "type"];
31428
32501
  var MsgStatus = function MsgStatus(props) {
31429
32502
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
31430
32503
  var _props$value = props.value,
@@ -31434,7 +32507,7 @@ var MsgStatus = function MsgStatus(props) {
31434
32507
  failValue = props.failValue,
31435
32508
  _props$type = props.type,
31436
32509
  type = _props$type === void 0 ? 1 : _props$type,
31437
- other = _objectWithoutProperties(props, _excluded$p);
32510
+ other = _objectWithoutProperties(props, _excluded$q);
31438
32511
  var _useState = useState(0),
31439
32512
  _useState2 = _slicedToArray(_useState, 2),
31440
32513
  changeIndex = _useState2[0],
@@ -31503,7 +32576,7 @@ var CalculationInput = function CalculationInput(props) {
31503
32576
  }, config === null || config === void 0 ? void 0 : config.unit));
31504
32577
  };
31505
32578
 
31506
- var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
32579
+ var _excluded$r = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
31507
32580
  var typeMap$3 = {
31508
32581
  BS_E3_REISSUE_GOODS: {
31509
32582
  key: 'bsE3ReissueGoods',
@@ -31523,7 +32596,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
31523
32596
  disabled = props.disabled,
31524
32597
  type = props.type,
31525
32598
  isSettingConfig = props.isSettingConfig,
31526
- other = _objectWithoutProperties(props, _excluded$q);
32599
+ other = _objectWithoutProperties(props, _excluded$r);
31527
32600
  var getOrderFlag = useRef(false);
31528
32601
  var valueRef = useRef(null);
31529
32602
  var _useState = useState(false),
@@ -31762,7 +32835,7 @@ var css_248z$h = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-d
31762
32835
  var styles$6 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
31763
32836
  styleInject(css_248z$h);
31764
32837
 
31765
- var _excluded$r = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
32838
+ var _excluded$s = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
31766
32839
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
31767
32840
  var typeMap$4 = {
31768
32841
  GY_REISSUE_GOODS: {
@@ -31793,7 +32866,7 @@ var GyReissue = function GyReissue(props) {
31793
32866
  disabled = props.disabled,
31794
32867
  type = props.type,
31795
32868
  isSettingConfig = props.isSettingConfig,
31796
- other = _objectWithoutProperties(props, _excluded$r);
32869
+ other = _objectWithoutProperties(props, _excluded$s);
31797
32870
  // const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
31798
32871
  // order?.platformCode?.includes(';'),
31799
32872
  // );
@@ -32087,7 +33160,7 @@ var GyReissue = function GyReissue(props) {
32087
33160
  })));
32088
33161
  };
32089
33162
 
32090
- var _excluded$s = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
33163
+ var _excluded$t = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
32091
33164
  _excluded2$2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
32092
33165
  var typeMap$5 = {
32093
33166
  GY_RETURN_GOODS: {
@@ -32117,7 +33190,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
32117
33190
  disabled = props.disabled,
32118
33191
  type = props.type,
32119
33192
  isSettingConfig = props.isSettingConfig,
32120
- other = _objectWithoutProperties(props, _excluded$s);
33193
+ other = _objectWithoutProperties(props, _excluded$t);
32121
33194
  var valueRef = useRef({});
32122
33195
  var getOrderFlag = useRef(false);
32123
33196
  var _useState = useState(false),
@@ -32389,7 +33462,7 @@ var css_248z$i = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap
32389
33462
  var styles$7 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
32390
33463
  styleInject(css_248z$i);
32391
33464
 
32392
- var _excluded$t = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
33465
+ var _excluded$u = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
32393
33466
  var Dragger$1 = Upload.Dragger;
32394
33467
  var fn$4 = function fn() {
32395
33468
  return void 0;
@@ -32412,7 +33485,7 @@ var KmVideo = function KmVideo(_ref) {
32412
33485
  canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
32413
33486
  _ref$actionUrl = _ref.actionUrl,
32414
33487
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
32415
- resetProps = _objectWithoutProperties(_ref, _excluded$t);
33488
+ resetProps = _objectWithoutProperties(_ref, _excluded$u);
32416
33489
  var _useState = useState(false),
32417
33490
  _useState2 = _slicedToArray(_useState, 2),
32418
33491
  visible = _useState2[0],
@@ -33021,10 +34094,11 @@ var SYSTEM_ORDER_COLUMNS_MAP = {
33021
34094
  JY_SYSTEM_ORDER: JY_SYSTEM_ORDER_CONFIG.columns,
33022
34095
  JKY_SYSTEM_ORDER: JKY_SYSTEM_ORDER_CONFIG.columns,
33023
34096
  WDT_RETURN_BILL_NO: WDT_RETURN_BILL_NO_CONFIG.columns,
33024
- DXD_SYSTEM_ORDER: DXD_SYSTEM_ORDER_CONFIG.columns
34097
+ DXD_SYSTEM_ORDER: DXD_SYSTEM_ORDER_CONFIG.columns,
34098
+ TTX_SYSTEM_ORDER: TTX_SYSTEM_ORDER_CONFIG.columns
33025
34099
  };
33026
34100
  var FIELD_COLUMNS_MAP = {
33027
34101
  PLATFORM_AFTER_SALES_ORDER: PLATFORM_AFTER_SALES_ORDER_CONFIG.columns
33028
34102
  };
33029
34103
 
33030
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasImage, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync$1 as ApaasUploadAsync, ApaasUploadFile, index as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$2 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, FIELD_COLUMNS_MAP, Goods, index$3 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, OrderSubForm, utils as OrderSubFormUtils, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, SYSTEM_ORDER_COLUMNS_MAP, ShopNameSelect as ShopName, SkxGoods, IdInputSelect as SkxIdInputSelect, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$1 as erpModalColumnsMap, getColumns$a as getDxdColumns, getColumns$4 as getGyColumns, getColumns$9 as getJkyColumns, getColumns$5 as getJstColumns, getColumns$7 as getJyColumns, getColumns$6 as getKmColumns, getColumns$8 as getSkxColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns, orderSubFormConstants, renderMap, renderSplitMap };
34104
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasImage, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync$1 as ApaasUploadAsync, ApaasUploadFile, index as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$2 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, FIELD_COLUMNS_MAP, GOODS_SEARCH_FORM_CONFIG, Goods, GoodsReSync, GoodsSearchForm, index$3 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MAX_COLUMN_WIDTH, MIN_COLUMN_WIDTH, MsgStatus, OrderSubForm, utils as OrderSubFormUtils, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, SYSTEM_ORDER_COLUMNS_MAP, SearchForm, ShopNameSelect as ShopName, SkxGoods, IdInputSelect as SkxIdInputSelect, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, YouzanStar, columnsBaseInfoMap, createBsE3SearchFormData, createGySearchFormData, createJkySearchFormData, createJstSearchFormData, createJySearchFormData, createKmSearchFormData, createWdtSearchFormData, createWlnSearchFormData, erpColumnsMap, erpFormValidator, index$1 as erpModalColumnsMap, getColumns$a as getDxdColumns, getColumns$4 as getGyColumns, getColumns$9 as getJkyColumns, getColumns$5 as getJstColumns, getColumns$7 as getJyColumns, getColumns$6 as getKmColumns, getColumns$8 as getSkxColumns, getColumns$b as getTtxColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns, loadWdtBrandOptions, orderSubFormConstants, renderMap, renderSplitMap, resolveColumnWidth, shouldSubmitOnBlur, transformFormData, useGoodsReSyncQuery };