@kmkf-fe-packages/basic-components 2.10.9-beta.2 → 2.10.9-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -3,12 +3,13 @@ import { Cascader, DatePicker, Image, InputNumber, Input, Select, Upload, messag
|
|
|
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, 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, 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';
|
|
7
7
|
import every from 'lodash/every';
|
|
8
8
|
import maxBy from 'lodash/maxBy';
|
|
9
9
|
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject as reject$1, intersection, isEmpty } from 'lodash';
|
|
10
10
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
11
11
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
12
|
+
import Monitor from 'kmkf-monitor';
|
|
12
13
|
import pubsub from 'pubsub-js';
|
|
13
14
|
import { internals, useTablePipeline, features, BaseTable } from 'ali-react-table';
|
|
14
15
|
import zh_CN from 'antd/lib/locale-provider/zh_CN';
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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 =
|
|
1137
|
+
fileName = genFileName();
|
|
1076
1138
|
formData.append('fileName', fileName);
|
|
1077
|
-
_context.prev =
|
|
1078
|
-
_context.next =
|
|
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
|
|
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
|
-
|
|
1150
|
+
if (valueRef.current.length + batchResultsRef.current.size < maxCount) {
|
|
1151
|
+
// 先暂存到当前批次,等本批次全部完成后再按选择顺序合并
|
|
1152
|
+
batchResultsRef.current.set(batchSeq, data);
|
|
1153
|
+
}
|
|
1089
1154
|
}
|
|
1090
|
-
_context.next =
|
|
1155
|
+
_context.next = 19;
|
|
1091
1156
|
break;
|
|
1092
|
-
case
|
|
1093
|
-
_context.prev =
|
|
1094
|
-
_context.t0 = _context["catch"](
|
|
1157
|
+
case 16:
|
|
1158
|
+
_context.prev = 16;
|
|
1159
|
+
_context.t0 = _context["catch"](7);
|
|
1095
1160
|
message.error('图片上传失败');
|
|
1096
|
-
case
|
|
1097
|
-
_context.prev =
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
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, [[
|
|
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
|
|
1123
|
-
var _e$target
|
|
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 =
|
|
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 (
|
|
1139
|
-
return
|
|
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
|
-
|
|
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
|
|
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 =
|
|
1451
|
+
fileName = genFileName();
|
|
1346
1452
|
formData.append('fileName', fileName);
|
|
1347
1453
|
showName = file.name.substring(0, file.name.lastIndexOf('.'));
|
|
1348
|
-
_context.prev =
|
|
1349
|
-
_context.next =
|
|
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
|
|
1460
|
+
case 11:
|
|
1355
1461
|
_yield$request = _context.sent;
|
|
1356
1462
|
success = _yield$request.success;
|
|
1357
1463
|
data = _yield$request.data;
|
|
1358
|
-
if (
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
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
|
-
|
|
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
|
|
1376
|
-
_context.prev =
|
|
1377
|
-
_context.t0 = _context["catch"](
|
|
1475
|
+
case 17:
|
|
1476
|
+
_context.prev = 17;
|
|
1477
|
+
_context.t0 = _context["catch"](8);
|
|
1378
1478
|
message.error('图片上传失败');
|
|
1379
|
-
case
|
|
1380
|
-
_context.prev =
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
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, [[
|
|
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
|
|
1406
|
-
var _e$target
|
|
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 =
|
|
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 (
|
|
1422
|
-
return
|
|
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
|
-
|
|
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", {
|
|
@@ -7816,6 +7934,22 @@ var Province = function Province(props) {
|
|
|
7816
7934
|
};
|
|
7817
7935
|
|
|
7818
7936
|
var TextArea$1 = Input.TextArea;
|
|
7937
|
+
/**
|
|
7938
|
+
* 直辖市省份名称映射(带"市" → 不带"市")
|
|
7939
|
+
* 接口返回的 province 可能带"市"(如"重庆市"),但省市区下拉数据一级节点不带"市"(如"重庆"),
|
|
7940
|
+
* 此处做单向转换确保匹配。
|
|
7941
|
+
*/
|
|
7942
|
+
var MUNICIPALITY_PROVINCE_MAP = {
|
|
7943
|
+
'北京市': '北京',
|
|
7944
|
+
'天津市': '天津',
|
|
7945
|
+
'上海市': '上海',
|
|
7946
|
+
'重庆市': '重庆'
|
|
7947
|
+
};
|
|
7948
|
+
/** 直辖市省份名称去"市"处理,普通省份保持原值 */
|
|
7949
|
+
var normalizeMunicipalityProvince = function normalizeMunicipalityProvince(province) {
|
|
7950
|
+
if (!province) return province;
|
|
7951
|
+
return MUNICIPALITY_PROVINCE_MAP[province] || province;
|
|
7952
|
+
};
|
|
7819
7953
|
var ParseLogistics = function ParseLogistics(props) {
|
|
7820
7954
|
var onChange = props.onChange,
|
|
7821
7955
|
_props$selfCalibratio = props.selfCalibration;
|
|
@@ -7855,11 +7989,10 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7855
7989
|
}
|
|
7856
7990
|
}).then(function (res) {
|
|
7857
7991
|
var data = res.data;
|
|
7858
|
-
//
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
// }
|
|
7992
|
+
// 规范化直辖市省份名称,兼容接口带"市"、数据不带"市"的情况
|
|
7993
|
+
if (data === null || data === void 0 ? void 0 : data.province) {
|
|
7994
|
+
data.province = normalizeMunicipalityProvince(data.province);
|
|
7995
|
+
}
|
|
7863
7996
|
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7864
7997
|
}).catch(function (e) {
|
|
7865
7998
|
handleAIIdentify(fullAddress);
|
|
@@ -7885,6 +8018,10 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7885
8018
|
}
|
|
7886
8019
|
}).then(function (res) {
|
|
7887
8020
|
var data = res.data;
|
|
8021
|
+
// 规范化直辖市省份名称,兼容接口带"市"、数据不带"市"的情况
|
|
8022
|
+
if (data === null || data === void 0 ? void 0 : data.province) {
|
|
8023
|
+
data.province = normalizeMunicipalityProvince(data.province);
|
|
8024
|
+
}
|
|
7888
8025
|
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7889
8026
|
}).catch(function (e) {
|
|
7890
8027
|
console.log(e);
|
|
@@ -8495,7 +8632,7 @@ var processLogisticsInterception = function processLogisticsInterception(getValu
|
|
|
8495
8632
|
address = every(address, function (item) {
|
|
8496
8633
|
return !item;
|
|
8497
8634
|
}) ? [] : address;
|
|
8498
|
-
var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey'];
|
|
8635
|
+
var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode'];
|
|
8499
8636
|
var map = subFields.reduce(function (cur, nxt) {
|
|
8500
8637
|
return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
|
|
8501
8638
|
}, {});
|
|
@@ -8676,6 +8813,7 @@ var processSceneStatus = function processSceneStatus(getValue) {
|
|
|
8676
8813
|
BS_E3_WAREHOUSING_STATUS: 'bsE3InStockStatusItemList',
|
|
8677
8814
|
MSG_STATUS: 'msgStatusValues',
|
|
8678
8815
|
WDT_WAREHOUSING_STATUS: 'wdtInStockStatusItemList',
|
|
8816
|
+
DXD_WAREHOUSING_STATUS: 'dxdInStockStatusItemList',
|
|
8679
8817
|
JKY_WAREHOUSING_STATUS: 'jkyInStockStatusItemList',
|
|
8680
8818
|
JST_WAREHOUSING_STATUS: 'jstInStockStatusItemList',
|
|
8681
8819
|
WLN_WAREHOUSING_STATUS: 'wlnInStockStatusItemList',
|
|
@@ -8707,6 +8845,9 @@ var processErpLogistics = function processErpLogistics(getValue) {
|
|
|
8707
8845
|
},
|
|
8708
8846
|
SKX_LOGISTICS: {
|
|
8709
8847
|
listKey: 'skxLogisticsList'
|
|
8848
|
+
},
|
|
8849
|
+
DXD_LOGISTICS: {
|
|
8850
|
+
listKey: 'dxdLogisticsList'
|
|
8710
8851
|
}
|
|
8711
8852
|
};
|
|
8712
8853
|
var initValue = [{
|
|
@@ -9585,6 +9726,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9585
9726
|
BS_E3_WAREHOUSING_STATUS: processSceneStatus,
|
|
9586
9727
|
MSG_STATUS: processSceneStatus,
|
|
9587
9728
|
WDT_WAREHOUSING_STATUS: processSceneStatus,
|
|
9729
|
+
DXD_WAREHOUSING_STATUS: processSceneStatus,
|
|
9588
9730
|
WLN_WAREHOUSING_STATUS: processSceneStatus,
|
|
9589
9731
|
JKY_WAREHOUSING_STATUS: processSceneStatus,
|
|
9590
9732
|
JST_WAREHOUSING_STATUS: processSceneStatus,
|
|
@@ -9595,6 +9737,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9595
9737
|
GY_LOGISTICS: processErpLogistics,
|
|
9596
9738
|
BS_E3_LOGISTICS: processErpLogistics,
|
|
9597
9739
|
KM_LOGISTICS: processErpLogistics,
|
|
9740
|
+
DXD_LOGISTICS: processErpLogistics,
|
|
9598
9741
|
BS_SEND_GOOD: processErpSendGood,
|
|
9599
9742
|
WLN_SEND_GOOD: processErpSendGood,
|
|
9600
9743
|
WDT_SEND_GOOD: processErpSendGood,
|
|
@@ -13328,6 +13471,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13328
13471
|
setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.logisticsStatusList) || []);
|
|
13329
13472
|
setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
|
|
13330
13473
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
13474
|
+
useEffect(function () {
|
|
13475
|
+
if (!isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany) && (value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode) !== undefined) {
|
|
13476
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13477
|
+
interceptLogisticsCustomerCode: undefined
|
|
13478
|
+
}));
|
|
13479
|
+
}
|
|
13480
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode]);
|
|
13331
13481
|
//拦截类型切换 需要清空派送地址
|
|
13332
13482
|
useEffect(function () {
|
|
13333
13483
|
if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) return;
|
|
@@ -13390,6 +13540,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13390
13540
|
}
|
|
13391
13541
|
return isShow;
|
|
13392
13542
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
13543
|
+
var showCustomerCode = useMemo(function () {
|
|
13544
|
+
return isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
13545
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
13393
13546
|
//判断是否能修改物流信息
|
|
13394
13547
|
var isEdit = useMemo(function () {
|
|
13395
13548
|
var company = expressInterceptData.find(function (item) {
|
|
@@ -13416,6 +13569,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13416
13569
|
});
|
|
13417
13570
|
});
|
|
13418
13571
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
13572
|
+
var customerCodeOptions = useMemo(function () {
|
|
13573
|
+
return getJdCustomerCodeOptions(LogisticsAddressOptions, value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
13574
|
+
}, [LogisticsAddressOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
13419
13575
|
var returnValue = useMemo(function () {
|
|
13420
13576
|
var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
|
|
13421
13577
|
var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
|
|
@@ -13471,9 +13627,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13471
13627
|
// userSecretKey: '12345678',
|
|
13472
13628
|
// },
|
|
13473
13629
|
// ];
|
|
13474
|
-
var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
13475
|
-
return item.cpCode === val && item.userKCode;
|
|
13476
|
-
});
|
|
13477
13630
|
newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
13478
13631
|
interceptCompany: val,
|
|
13479
13632
|
interceptType: (_defaultInterceptType = defaultInterceptType) === null || _defaultInterceptType === void 0 ? void 0 : _defaultInterceptType.value,
|
|
@@ -13492,7 +13645,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13492
13645
|
},
|
|
13493
13646
|
interceptLogisticsApiStatusReason: undefined,
|
|
13494
13647
|
interceptLogisticsUserKCode: undefined,
|
|
13495
|
-
interceptLogisticsUserSecretKey: undefined
|
|
13648
|
+
interceptLogisticsUserSecretKey: undefined,
|
|
13649
|
+
interceptLogisticsCustomerCode: undefined
|
|
13496
13650
|
});
|
|
13497
13651
|
}
|
|
13498
13652
|
if (type === 'interceptLogisticsApiStatus') {
|
|
@@ -13573,7 +13727,37 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13573
13727
|
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');
|
|
13574
13728
|
},
|
|
13575
13729
|
value: value === null || value === void 0 ? void 0 : value.interceptCode
|
|
13576
|
-
}))), /*#__PURE__*/React.createElement(
|
|
13730
|
+
}))), /*#__PURE__*/React.createElement(Item, {
|
|
13731
|
+
label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801", platform === 'pc' ? /*#__PURE__*/React.createElement(React.Fragment, null, "\uFF1A", /*#__PURE__*/React.createElement(Typography.Link, {
|
|
13732
|
+
style: {
|
|
13733
|
+
cursor: 'pointer'
|
|
13734
|
+
},
|
|
13735
|
+
onClick: function onClick() {
|
|
13736
|
+
return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
|
|
13737
|
+
type: 'interceptConfig'
|
|
13738
|
+
}));
|
|
13739
|
+
}
|
|
13740
|
+
}, 'K码/EBU码配置>>')) : null),
|
|
13741
|
+
required: showCustomerCode,
|
|
13742
|
+
key: 'interceptLogisticsCustomerCode',
|
|
13743
|
+
hidden: !showCustomerCode
|
|
13744
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
13745
|
+
disabled: disabled,
|
|
13746
|
+
placeholder: "\u9009\u62E9\u5BA2\u6237\u7F16\u7801",
|
|
13747
|
+
notFoundContent: "\u6682\u65E0\u5BA2\u6237\u7F16\u7801\u914D\u7F6E\uFF0C\u8BF7\u5148\u524D\u5F80K\u7801/EBU\u7801\u914D\u7F6E>>",
|
|
13748
|
+
showSearch: true,
|
|
13749
|
+
style: {
|
|
13750
|
+
width: '200px'
|
|
13751
|
+
},
|
|
13752
|
+
onChange: function onChange(val) {
|
|
13753
|
+
return changeHandle(val, 'interceptLogisticsCustomerCode');
|
|
13754
|
+
},
|
|
13755
|
+
options: customerCodeOptions,
|
|
13756
|
+
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode,
|
|
13757
|
+
filterOption: function filterOption(input, option) {
|
|
13758
|
+
return option.label.includes(input);
|
|
13759
|
+
}
|
|
13760
|
+
})), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
|
|
13577
13761
|
label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React.createElement(Typography.Link, {
|
|
13578
13762
|
style: {
|
|
13579
13763
|
cursor: 'pointer'
|
|
@@ -13618,7 +13802,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13618
13802
|
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
|
|
13619
13803
|
}))), /*#__PURE__*/React.createElement(Item, {
|
|
13620
13804
|
label: '拦截类型',
|
|
13621
|
-
required: required,
|
|
13805
|
+
required: required && !showCustomerCode,
|
|
13622
13806
|
key: 'interceptType'
|
|
13623
13807
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
13624
13808
|
disabled: baseFieldDisabled,
|
|
@@ -14259,7 +14443,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
14259
14443
|
_props$platformType = props.platformType,
|
|
14260
14444
|
platformType = _props$platformType === void 0 ? 'default' : _props$platformType,
|
|
14261
14445
|
onlyShowFieldSelect = props.onlyShowFieldSelect,
|
|
14262
|
-
logisticsCompanyFormType = props.logisticsCompanyFormType
|
|
14446
|
+
logisticsCompanyFormType = props.logisticsCompanyFormType,
|
|
14447
|
+
form = props.form;
|
|
14263
14448
|
var _useState = useState(0),
|
|
14264
14449
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14265
14450
|
changeIndex = _useState2[0],
|
|
@@ -14274,6 +14459,28 @@ var jstGoods = function jstGoods(props) {
|
|
|
14274
14459
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
14275
14460
|
}
|
|
14276
14461
|
}, [value, type]);
|
|
14462
|
+
useEffect(function () {
|
|
14463
|
+
//丢失sendSnapshotName,未找到具体原因,兜底处理
|
|
14464
|
+
if (type === 3 && isSendGoodSavedId && value && value.length && value.some(function (item) {
|
|
14465
|
+
return !item.sendSnapshotName;
|
|
14466
|
+
}) && value.every(function (item) {
|
|
14467
|
+
return item.sendId;
|
|
14468
|
+
})) {
|
|
14469
|
+
var orderNo = form === null || form === void 0 ? void 0 : form.getFieldValue('m3ap1EvEyd');
|
|
14470
|
+
console.log('发货仓走兜底处理-oldValue--', orderNo, cloneDeep(value));
|
|
14471
|
+
var newValue = cloneDeep(value).map(function (item) {
|
|
14472
|
+
if (item.sendSnapshotName || !item.sendId) return item;
|
|
14473
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14474
|
+
sendSnapshotName: SendDataCenter.getInstance(platformType).getSendNameByCode(item.sendId)
|
|
14475
|
+
});
|
|
14476
|
+
});
|
|
14477
|
+
Monitor.automaticReport({
|
|
14478
|
+
message: "\u53D1\u8D27\u4ED3\u8D70\u515C\u5E95\u5904\u7406-".concat(orderNo || '', "-oldValue-").concat(JSON.stringify(cloneDeep(value)), ",newValue-").concat(JSON.stringify(cloneDeep(newValue)))
|
|
14479
|
+
});
|
|
14480
|
+
console.log('发货仓走兜底处理-newValue--', orderNo, cloneDeep(newValue));
|
|
14481
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14482
|
+
}
|
|
14483
|
+
}, [JSON.stringify(value || []), type]);
|
|
14277
14484
|
useEffect(function () {
|
|
14278
14485
|
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
14279
14486
|
setChangeIndex(0);
|
|
@@ -21087,17 +21294,18 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
21087
21294
|
};
|
|
21088
21295
|
|
|
21089
21296
|
var getYesOrNo$4 = function getYesOrNo(val) {
|
|
21297
|
+
var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['是', '否'];
|
|
21090
21298
|
switch (val) {
|
|
21091
21299
|
case true:
|
|
21092
21300
|
case '1':
|
|
21093
21301
|
case 1:
|
|
21094
|
-
return
|
|
21302
|
+
return content[0];
|
|
21095
21303
|
case false:
|
|
21096
21304
|
case '0':
|
|
21097
21305
|
case 0:
|
|
21098
21306
|
return '否';
|
|
21099
21307
|
default:
|
|
21100
|
-
return
|
|
21308
|
+
return content[1];
|
|
21101
21309
|
}
|
|
21102
21310
|
};
|
|
21103
21311
|
|
|
@@ -21296,7 +21504,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21296
21504
|
label: '非赠品',
|
|
21297
21505
|
value: 0
|
|
21298
21506
|
}]
|
|
21299
|
-
}) : /*#__PURE__*/React.createElement("span", null,
|
|
21507
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val, ['赠品', '非赠品']));
|
|
21300
21508
|
}
|
|
21301
21509
|
}, {
|
|
21302
21510
|
dataIndex: 'isPackage',
|
|
@@ -21528,7 +21736,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
21528
21736
|
label: '非赠品',
|
|
21529
21737
|
value: 0
|
|
21530
21738
|
}]
|
|
21531
|
-
}) : /*#__PURE__*/React.createElement("span", null,
|
|
21739
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val, ['赠品', '非赠品']));
|
|
21532
21740
|
}
|
|
21533
21741
|
}, {
|
|
21534
21742
|
dataIndex: 'isPackage',
|
|
@@ -22678,7 +22886,10 @@ var getColumns$5 = function getColumns() {
|
|
|
22678
22886
|
width: 150,
|
|
22679
22887
|
align: 'center',
|
|
22680
22888
|
ellipsis: true,
|
|
22681
|
-
render: renderTextEllipsis
|
|
22889
|
+
render: renderTextEllipsis,
|
|
22890
|
+
conditionOptionsSetting: {
|
|
22891
|
+
dataType: 'number'
|
|
22892
|
+
}
|
|
22682
22893
|
}, {
|
|
22683
22894
|
dataIndex: 'rQty',
|
|
22684
22895
|
title: "\u5B9E\u6536\u9000\u8D27\u6570\u91CF",
|
|
@@ -24548,7 +24759,7 @@ var getColumns$a = function getColumns() {
|
|
|
24548
24759
|
},
|
|
24549
24760
|
render: function render(_val, record, index) {
|
|
24550
24761
|
var options = DxdSuppliersData.getInstance().getSuppliersBySkuCode(record === null || record === void 0 ? void 0 : record.skuCode);
|
|
24551
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
24762
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
24552
24763
|
style: {
|
|
24553
24764
|
width: '100%'
|
|
24554
24765
|
},
|
|
@@ -24568,7 +24779,7 @@ var getColumns$a = function getColumns() {
|
|
|
24568
24779
|
supplierName: (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : ''
|
|
24569
24780
|
}, index);
|
|
24570
24781
|
}
|
|
24571
|
-
});
|
|
24782
|
+
}) : DxdSuppliersData.getInstance().getSupplierNameByCode(record === null || record === void 0 ? void 0 : record.supplierCode);
|
|
24572
24783
|
},
|
|
24573
24784
|
conditionOptionsSetting: {
|
|
24574
24785
|
dataType: 'weakenArray',
|
|
@@ -25381,7 +25592,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
25381
25592
|
_ref$isReloadSelectTa = _ref.isReloadSelectTable,
|
|
25382
25593
|
isReloadSelectTable = _ref$isReloadSelectTa === void 0 ? false : _ref$isReloadSelectTa,
|
|
25383
25594
|
validSystemOrderFn = _ref.validSystemOrderFn;
|
|
25384
|
-
console.log('systemOrders---', systemOrders);
|
|
25385
25595
|
var _useState = useState(),
|
|
25386
25596
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25387
25597
|
selectSystemNo = _useState2[0],
|
|
@@ -25653,6 +25863,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25653
25863
|
otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
|
|
25654
25864
|
_props$canUpdateNumbe = props.canUpdateNumber,
|
|
25655
25865
|
canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
|
|
25866
|
+
_props$notAllowedOper = props.notAllowedOperation,
|
|
25867
|
+
notAllowedOperation = _props$notAllowedOper === void 0 ? false : _props$notAllowedOper,
|
|
25656
25868
|
shopCode = props.shopCode,
|
|
25657
25869
|
_props$companyKey = props.companyKey,
|
|
25658
25870
|
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
@@ -25861,14 +26073,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25861
26073
|
render: function render(val, record, index) {
|
|
25862
26074
|
return /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
|
|
25863
26075
|
index: index,
|
|
25864
|
-
hoveredRowIndex: !disabled && (record.canDelete || canDelete) ? hoveredRowIndex : null,
|
|
26076
|
+
hoveredRowIndex: !disabled && !notAllowedOperation && (record.canDelete || canDelete) ? hoveredRowIndex : null,
|
|
25865
26077
|
handleClick: function handleClick() {
|
|
25866
26078
|
return handleDelete(record, index);
|
|
25867
26079
|
}
|
|
25868
26080
|
});
|
|
25869
26081
|
}
|
|
25870
26082
|
}].concat(_toConsumableArray(baseInfoColumns));
|
|
25871
|
-
if (!disabled) {
|
|
26083
|
+
if (!disabled && !notAllowedOperation) {
|
|
25872
26084
|
columnList.push({
|
|
25873
26085
|
dataIndex: '',
|
|
25874
26086
|
title: "\u64CD\u4F5C",
|
|
@@ -25910,22 +26122,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25910
26122
|
}
|
|
25911
26123
|
}].concat(_toConsumableArray(list));
|
|
25912
26124
|
}, [showHeader, value, disabled, hoveredRowIndex]);
|
|
25913
|
-
var orderColumns = useMemo(function () {
|
|
25914
|
-
var columns = COLUMNS_MAP('', {
|
|
25915
|
-
operate: false,
|
|
25916
|
-
disabled: true
|
|
25917
|
-
})(type);
|
|
25918
|
-
return [{
|
|
25919
|
-
dataIndex: '',
|
|
25920
|
-
title: '序号',
|
|
25921
|
-
align: 'center',
|
|
25922
|
-
ellipsis: true,
|
|
25923
|
-
width: 50,
|
|
25924
|
-
render: function render(val, record, index) {
|
|
25925
|
-
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
25926
|
-
}
|
|
25927
|
-
}].concat(_toConsumableArray(columns));
|
|
25928
|
-
}, []);
|
|
25929
26125
|
var onSubmit = function onSubmit(list) {
|
|
25930
26126
|
var newList = processGoods$1({
|
|
25931
26127
|
list: list,
|
|
@@ -25965,7 +26161,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25965
26161
|
var validSystemOrder = useMemo(function () {
|
|
25966
26162
|
return ['GY_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'KM_REISSUE_GOODS'].includes(type) && !hasSelectedSystemOrder;
|
|
25967
26163
|
}, [type, hasSelectedSystemOrder]);
|
|
25968
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
|
|
26164
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && !notAllowedOperation && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
|
|
25969
26165
|
style: {
|
|
25970
26166
|
float: 'right'
|
|
25971
26167
|
}
|
|
@@ -27060,6 +27256,16 @@ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
|
|
|
27060
27256
|
}
|
|
27061
27257
|
}).then(function (data) {
|
|
27062
27258
|
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
27259
|
+
var _data$data, _data$data$doOrders;
|
|
27260
|
+
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) {
|
|
27261
|
+
var _data$data2;
|
|
27262
|
+
(_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.doOrders.forEach(function (item) {
|
|
27263
|
+
item.platformOrderNo = data.platformOrderNo;
|
|
27264
|
+
item.shopCode = data.shopCode;
|
|
27265
|
+
item.shopName = data.shopName;
|
|
27266
|
+
item.split = data.split;
|
|
27267
|
+
});
|
|
27268
|
+
}
|
|
27063
27269
|
resolve((data === null || data === void 0 ? void 0 : data.data) || {});
|
|
27064
27270
|
// 延迟10秒清除,保证订单的时效性
|
|
27065
27271
|
setTimeout(function () {
|
|
@@ -27159,8 +27365,7 @@ var kmUtils = {
|
|
|
27159
27365
|
};
|
|
27160
27366
|
|
|
27161
27367
|
var _excluded$k = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"],
|
|
27162
|
-
_excluded2 = ["shopCode"]
|
|
27163
|
-
_excluded3 = ["doOrders", "isSplit", "billNo", "billType", "billTag", "sysStatus"];
|
|
27368
|
+
_excluded2 = ["shopCode"];
|
|
27164
27369
|
var columnsMap = {
|
|
27165
27370
|
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
27166
27371
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -27675,44 +27880,17 @@ var index$2 = (function (props) {
|
|
|
27675
27880
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
27676
27881
|
while (1) switch (_context11.prev = _context11.next) {
|
|
27677
27882
|
case 0:
|
|
27678
|
-
dxdUtils.getOrderListSingleton(orderNo).then(function (
|
|
27679
|
-
var
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27683
|
-
|
|
27684
|
-
billNo = _ref15.billNo,
|
|
27685
|
-
billType = _ref15.billType,
|
|
27686
|
-
billTag = _ref15.billTag,
|
|
27687
|
-
sysStatus = _ref15.sysStatus,
|
|
27688
|
-
restTrade = _objectWithoutProperties(_ref15, _excluded3);
|
|
27689
|
-
if (!doOrders.length) {
|
|
27690
|
-
prv.push(_objectSpread2(_objectSpread2({}, restTrade), {}, {
|
|
27691
|
-
billNo: billNo,
|
|
27692
|
-
billType: billType,
|
|
27693
|
-
billTag: billTag,
|
|
27694
|
-
sysStatus: sysStatus,
|
|
27695
|
-
isSplit: isSplit,
|
|
27696
|
-
rowKey: billNo
|
|
27697
|
-
}));
|
|
27698
|
-
return prv;
|
|
27699
|
-
}
|
|
27700
|
-
doOrders.forEach(function (doOrder, index) {
|
|
27701
|
-
var currentOrderNo = doOrder === null || doOrder === void 0 ? void 0 : doOrder.orderNo;
|
|
27702
|
-
prv.push(_objectSpread2(_objectSpread2(_objectSpread2({}, restTrade), doOrder), {}, {
|
|
27703
|
-
billNo: billNo,
|
|
27704
|
-
billType: billType,
|
|
27705
|
-
billTag: billTag,
|
|
27706
|
-
sysStatus: sysStatus,
|
|
27707
|
-
isSplit: isSplit,
|
|
27708
|
-
rowKey: currentOrderNo ? "".concat(billNo, "_").concat(currentOrderNo) : "".concat(billNo, "_").concat(index)
|
|
27709
|
-
}));
|
|
27883
|
+
dxdUtils.getOrderListSingleton(orderNo).then(function (trade) {
|
|
27884
|
+
var _trade$doOrders;
|
|
27885
|
+
var data = (_trade$doOrders = trade.doOrders) === null || _trade$doOrders === void 0 ? void 0 : _trade$doOrders.map(function (order) {
|
|
27886
|
+
return _objectSpread2(_objectSpread2({}, order), {}, {
|
|
27887
|
+
billNo: order.orderNo,
|
|
27888
|
+
billType: (trade === null || trade === void 0 ? void 0 : trade.split) ? '拆分订单' : '普通订单'
|
|
27710
27889
|
});
|
|
27711
|
-
|
|
27712
|
-
}, []);
|
|
27890
|
+
});
|
|
27713
27891
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
27714
|
-
orders:
|
|
27715
|
-
showOrderInfo:
|
|
27892
|
+
orders: data || [],
|
|
27893
|
+
showOrderInfo: data || []
|
|
27716
27894
|
}));
|
|
27717
27895
|
});
|
|
27718
27896
|
onceRef.current = false;
|
|
@@ -28707,7 +28885,9 @@ var processAllOrders = function processAllOrders(_ref) {
|
|
|
28707
28885
|
});
|
|
28708
28886
|
} else if (isErpType$1.isDxd(type)) {
|
|
28709
28887
|
// DXD 选品用出库订单 doOrders(每项含 skus[])
|
|
28710
|
-
newList = (
|
|
28888
|
+
newList = processDxdOrders({
|
|
28889
|
+
data: data
|
|
28890
|
+
});
|
|
28711
28891
|
} else {
|
|
28712
28892
|
newList = processDefaultOrders({
|
|
28713
28893
|
data: data
|
|
@@ -28754,8 +28934,28 @@ var processWlnOrders = function processWlnOrders(_ref6) {
|
|
|
28754
28934
|
var data = _ref6.data;
|
|
28755
28935
|
return (data === null || data === void 0 ? void 0 : data.orders) || [];
|
|
28756
28936
|
};
|
|
28757
|
-
var
|
|
28937
|
+
var processDxdOrders = function processDxdOrders(_ref7) {
|
|
28938
|
+
var _data$doOrders;
|
|
28758
28939
|
var data = _ref7.data;
|
|
28940
|
+
var _ref8 = data || {},
|
|
28941
|
+
isSplit = _ref8.isSplit,
|
|
28942
|
+
billNo = _ref8.billNo,
|
|
28943
|
+
billType = _ref8.billType,
|
|
28944
|
+
billTag = _ref8.billTag,
|
|
28945
|
+
sysStatus = _ref8.sysStatus;
|
|
28946
|
+
var trades = (_data$doOrders = data.doOrders) === null || _data$doOrders === void 0 ? void 0 : _data$doOrders.map(function (item) {
|
|
28947
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
28948
|
+
billNo: billNo,
|
|
28949
|
+
billType: billType,
|
|
28950
|
+
billTag: billTag,
|
|
28951
|
+
isSplit: isSplit,
|
|
28952
|
+
sysStatus: sysStatus
|
|
28953
|
+
});
|
|
28954
|
+
});
|
|
28955
|
+
return trades;
|
|
28956
|
+
};
|
|
28957
|
+
var processDefaultOrders = function processDefaultOrders(_ref9) {
|
|
28958
|
+
var data = _ref9.data;
|
|
28759
28959
|
return data || [];
|
|
28760
28960
|
};
|
|
28761
28961
|
|
|
@@ -29110,13 +29310,13 @@ var componentMap$2 = {
|
|
|
29110
29310
|
var CommonGoods = function CommonGoods(props) {
|
|
29111
29311
|
var _componentMap$compTyp, _withInfo$current3, _withInfo$current4, _componentMap$compTyp7, _componentMap$compTyp8;
|
|
29112
29312
|
var value = props.value,
|
|
29113
|
-
|
|
29313
|
+
disabled = props.disabled,
|
|
29114
29314
|
onChange = props.onChange,
|
|
29115
29315
|
compType = props.type;
|
|
29116
29316
|
// DXD_SUPPLIERS 纯镜像 DXD_GOODS(由 FormRender useWatch 联动同步增删),禁用独立增删
|
|
29117
|
-
var disabled = rawDisabled || compType === 'DXD_SUPPLIERS';
|
|
29118
29317
|
// console.log('value?.orders', value?.orders);
|
|
29119
29318
|
// 合并单订单会包含","
|
|
29319
|
+
var notAllowedOperation = ['DXD_SUPPLIERS'].includes(compType);
|
|
29120
29320
|
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) {
|
|
29121
29321
|
var _order$componentMap$c;
|
|
29122
29322
|
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(',');
|
|
@@ -29474,7 +29674,6 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
29474
29674
|
orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
|
|
29475
29675
|
type: compType
|
|
29476
29676
|
});
|
|
29477
|
-
console.log('list---', list);
|
|
29478
29677
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
|
|
29479
29678
|
allOrders: list || []
|
|
29480
29679
|
}));
|
|
@@ -29504,6 +29703,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
29504
29703
|
selectedSystemOrders: value === null || value === void 0 ? void 0 : value.orders,
|
|
29505
29704
|
showChangeBtn: (_componentMap$compTyp7 = componentMap$2[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.showChangeBtn,
|
|
29506
29705
|
showErpGoodsBtn: !((_componentMap$compTyp8 = componentMap$2[compType]) === null || _componentMap$compTyp8 === void 0 ? void 0 : _componentMap$compTyp8.hiddenErpGoodsBtn),
|
|
29706
|
+
notAllowedOperation: notAllowedOperation,
|
|
29507
29707
|
tradeGoods: {
|
|
29508
29708
|
originDataSource: originDataSource,
|
|
29509
29709
|
getDataSourceAsync: getDataSourceAsync,
|
|
@@ -19,6 +19,7 @@ interface LogisticsInterceptionValueType {
|
|
|
19
19
|
interceptLogisticsApiStatusReason: string;
|
|
20
20
|
interceptLogisticsUserKCode: string;
|
|
21
21
|
interceptLogisticsUserSecretKey: string;
|
|
22
|
+
interceptLogisticsCustomerCode: string;
|
|
22
23
|
}
|
|
23
24
|
interface LogisticsInterceptionProps {
|
|
24
25
|
value: Partial<LogisticsInterceptionValueType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getYesOrNo: (val: boolean | string | number) =>
|
|
1
|
+
export declare const getYesOrNo: (val: boolean | string | number, content?: string[]) => string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FormInstance } from 'antd';
|
|
2
3
|
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
3
4
|
interface JstGoodsProps {
|
|
4
5
|
value: any[];
|
|
@@ -12,6 +13,7 @@ interface JstGoodsProps {
|
|
|
12
13
|
onlyShowFieldSelect: boolean;
|
|
13
14
|
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
14
15
|
logisticsCompanyFormType?: string;
|
|
16
|
+
form?: FormInstance;
|
|
15
17
|
}
|
|
16
18
|
declare const jstGoods: (props: Partial<JstGoodsProps>) => React.JSX.Element;
|
|
17
19
|
export default jstGoods;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.10.9-beta.
|
|
3
|
+
"version": "2.10.9-beta.21",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.20",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"ali-react-table": "2.6.1",
|
|
26
26
|
"bignumber.js": "^9.1.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "4dedd2a3b38f76b1511c4cc6e50830a0db126ae9"
|
|
70
70
|
}
|