@kmkf-fe-packages/basic-components 0.7.14-alpha.9 → 0.7.15-alpha.2
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 +1013 -156
- package/dist/index.js +1017 -153
- package/dist/src/apaas/ApaasAddress/index.d.ts +1 -0
- package/dist/src/apaas/ApaasPosting/index.d.ts +15 -0
- package/dist/src/apaas/ApaasUploadFile/index.d.ts +20 -0
- package/dist/src/bs/Exchange/index.d.ts +3 -0
- package/dist/src/bs/Goods/index.d.ts +3 -0
- package/dist/src/bs/Reissue/index.d.ts +3 -0
- package/dist/src/bs/component/GoodItem/index.d.ts +20 -0
- package/dist/src/bs/component/GoodsModal.d.ts +10 -0
- package/dist/src/business/LogisticsTrajectory/index.d.ts +3 -0
- package/dist/src/common/IdentifyAddress/index.d.ts +2 -0
- package/dist/src/index.d.ts +6 -0
- package/package.json +5 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
2
|
-
import { Cascader, DatePicker, Input, InputNumber, Select, Upload, Image, message, Radio, Space, Spin, Checkbox, Row, Col, Slider, Rate, Form, Tabs, Modal,
|
|
3
|
-
import { EyeOutlined, DeleteOutlined } from '@ant-design/icons';
|
|
2
|
+
import { Cascader, DatePicker, Input, InputNumber, Select, Upload, Image, message, Radio, Space, Spin, Checkbox, Row, Col, Slider, Rate, Button, Form, Tabs, Modal, ConfigProvider, Pagination, Popover, Table } from 'antd';
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, InboxOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend } from 'umi-request';
|
|
5
5
|
import { AddressData, request as request$1, LogisticsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
6
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
7
|
+
import pubsub from 'pubsub-js';
|
|
7
8
|
|
|
8
9
|
function _iterableToArrayLimit(arr, i) {
|
|
9
10
|
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -1160,7 +1161,145 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
|
1160
1161
|
})));
|
|
1161
1162
|
};
|
|
1162
1163
|
|
|
1163
|
-
var
|
|
1164
|
+
var css_248z$2 = ".index-module_imageBox__1rpoB {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1rpoB .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__1rpoB .index-module_inputImage__MyiR1 {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageShow__3BNqT {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP {\n width: 100px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover {\n background: transparent;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover .index-module_mask__uy8r2:before {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP .index-module_delete__28zCp {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2:hover .index-module_actions__1-6f4 {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 .index-module_icon__3yEcS {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C {\n display: inline-block;\n margin-right: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- .index-module_addBtn__3a1TQ {\n color: #86909C;\n}\n.index-module_imageBox__1rpoB .index-module_upload__3Pe3e .ant-upload {\n height: 80px;\n width: 80px;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageBox__1rpoB .index-module_upload__3Pe3e .ant-upload .index-module_addBtn__3a1TQ {\n color: #86909C;\n}\n.index-module_tips__168Vy {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
1165
|
+
var styles$2 = {"imageBox":"index-module_imageBox__1rpoB","inputImage":"index-module_inputImage__MyiR1","imageShow":"index-module_imageShow__3BNqT","imageWrap":"index-module_imageWrap__LyKfP","-webkit-mask":"index-module_mask__uy8r2","mask":"index-module_mask__uy8r2","delete":"index-module_delete__28zCp","actions":"index-module_actions__1-6f4","icon":"index-module_icon__3yEcS","imagePaste":"index-module_imagePaste__Ac77C","fakeBox":"index-module_fakeBox__3W1d-","addBtn":"index-module_addBtn__3a1TQ","upload":"index-module_upload__3Pe3e","tips":"index-module_tips__168Vy"};
|
|
1166
|
+
styleInject(css_248z$2);
|
|
1167
|
+
|
|
1168
|
+
var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "actionUrl"];
|
|
1169
|
+
var Dragger = Upload.Dragger;
|
|
1170
|
+
var fn$2 = function fn() {
|
|
1171
|
+
return void 0;
|
|
1172
|
+
};
|
|
1173
|
+
var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
|
|
1174
|
+
var _ref$maxCount = _ref.maxCount,
|
|
1175
|
+
maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
|
|
1176
|
+
_ref$maxSize = _ref.maxSize,
|
|
1177
|
+
maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
|
|
1178
|
+
_ref$onChange = _ref.onChange,
|
|
1179
|
+
onChange = _ref$onChange === void 0 ? fn$2 : _ref$onChange,
|
|
1180
|
+
_ref$value = _ref.value,
|
|
1181
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
1182
|
+
_ref$accept = _ref.accept,
|
|
1183
|
+
accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
|
|
1184
|
+
_ref$disabled = _ref.disabled,
|
|
1185
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1186
|
+
uniqueKey = _ref.uniqueKey,
|
|
1187
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
1188
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
1189
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
1190
|
+
var valueRef = useRef(value);
|
|
1191
|
+
var _useState = useState(false),
|
|
1192
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1193
|
+
uploading = _useState2[0],
|
|
1194
|
+
setUploading = _useState2[1];
|
|
1195
|
+
var fileList = useMemo(function () {
|
|
1196
|
+
return value.map(function (t, i) {
|
|
1197
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
1198
|
+
// status: 'success',
|
|
1199
|
+
percent: 100,
|
|
1200
|
+
uid: i + ''
|
|
1201
|
+
// name: ,
|
|
1202
|
+
});
|
|
1203
|
+
});
|
|
1204
|
+
}, [value]);
|
|
1205
|
+
useEffect(function () {
|
|
1206
|
+
valueRef.current = value;
|
|
1207
|
+
}, [value]);
|
|
1208
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
1209
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
1210
|
+
var formData, fileName, _yield$request, success, data;
|
|
1211
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1212
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1213
|
+
case 0:
|
|
1214
|
+
console.log('asyncUpload', file);
|
|
1215
|
+
setUploading(true);
|
|
1216
|
+
formData = new FormData();
|
|
1217
|
+
formData.append('file', file);
|
|
1218
|
+
fileName = "".concat(uniqueKey, "_").concat(new Date().getTime(), "_").concat(file.name);
|
|
1219
|
+
formData.append('fileName', fileName);
|
|
1220
|
+
_context.prev = 6;
|
|
1221
|
+
_context.next = 9;
|
|
1222
|
+
return request(actionUrl, {
|
|
1223
|
+
method: 'post',
|
|
1224
|
+
body: formData
|
|
1225
|
+
});
|
|
1226
|
+
case 9:
|
|
1227
|
+
_yield$request = _context.sent;
|
|
1228
|
+
success = _yield$request.success;
|
|
1229
|
+
data = _yield$request.data;
|
|
1230
|
+
if (success) {
|
|
1231
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
1232
|
+
name: file.name,
|
|
1233
|
+
url: data
|
|
1234
|
+
}]));
|
|
1235
|
+
}
|
|
1236
|
+
_context.next = 18;
|
|
1237
|
+
break;
|
|
1238
|
+
case 15:
|
|
1239
|
+
_context.prev = 15;
|
|
1240
|
+
_context.t0 = _context["catch"](6);
|
|
1241
|
+
message.error('文件上传失败');
|
|
1242
|
+
case 18:
|
|
1243
|
+
_context.prev = 18;
|
|
1244
|
+
setUploading(false);
|
|
1245
|
+
return _context.finish(18);
|
|
1246
|
+
case 21:
|
|
1247
|
+
case "end":
|
|
1248
|
+
return _context.stop();
|
|
1249
|
+
}
|
|
1250
|
+
}, _callee, null, [[6, 15, 18, 21]]);
|
|
1251
|
+
}));
|
|
1252
|
+
return function asyncUpload(_x) {
|
|
1253
|
+
return _ref2.apply(this, arguments);
|
|
1254
|
+
};
|
|
1255
|
+
}();
|
|
1256
|
+
var handleChange = function handleChange(list) {
|
|
1257
|
+
valueRef.current = list;
|
|
1258
|
+
onChange(list);
|
|
1259
|
+
};
|
|
1260
|
+
// 手动上传模式, 一直返回false
|
|
1261
|
+
var beforeUpload = function beforeUpload(file) {
|
|
1262
|
+
console.log('beforeUpload', file);
|
|
1263
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
1264
|
+
if (value.length > maxCount) {
|
|
1265
|
+
message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
|
|
1266
|
+
return Upload.LIST_IGNORE;
|
|
1267
|
+
}
|
|
1268
|
+
if (!size) {
|
|
1269
|
+
message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
1270
|
+
return Upload.LIST_IGNORE;
|
|
1271
|
+
}
|
|
1272
|
+
asyncUpload(file);
|
|
1273
|
+
return Upload.LIST_IGNORE;
|
|
1274
|
+
};
|
|
1275
|
+
var onRemove = function onRemove(file) {
|
|
1276
|
+
var newValue = value.filter(function (item) {
|
|
1277
|
+
return item.url !== file.url;
|
|
1278
|
+
});
|
|
1279
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
1280
|
+
};
|
|
1281
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
1282
|
+
spinning: uploading
|
|
1283
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1284
|
+
className: styles$2.imageBox
|
|
1285
|
+
}, /*#__PURE__*/React.createElement(Dragger, _objectSpread2({
|
|
1286
|
+
disabled: disabled,
|
|
1287
|
+
multiple: true,
|
|
1288
|
+
accept: accept,
|
|
1289
|
+
name: "file",
|
|
1290
|
+
maxCount: maxCount,
|
|
1291
|
+
// className={styles.upload}
|
|
1292
|
+
beforeUpload: beforeUpload,
|
|
1293
|
+
fileList: fileList,
|
|
1294
|
+
onRemove: onRemove
|
|
1295
|
+
}, resetProps), /*#__PURE__*/React.createElement("p", {
|
|
1296
|
+
className: "ant-upload-drag-icon"
|
|
1297
|
+
}, /*#__PURE__*/React.createElement(InboxOutlined, null)), /*#__PURE__*/React.createElement("p", {
|
|
1298
|
+
className: "ant-upload-text"
|
|
1299
|
+
}, "\u70B9\u51FB\u201C\u9009\u62E9\u6587\u4EF6\u201D\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64\u533A\u57DF"))));
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
var _excluded$8 = ["showOther", "horizontal", "options", "value", "onChange", "disabled"];
|
|
1164
1303
|
function ApaasCheckbox(props) {
|
|
1165
1304
|
var showOther = props.showOther,
|
|
1166
1305
|
_props$horizontal = props.horizontal,
|
|
@@ -1171,7 +1310,7 @@ function ApaasCheckbox(props) {
|
|
|
1171
1310
|
value = _props$value === void 0 ? {} : _props$value,
|
|
1172
1311
|
onChange = props.onChange,
|
|
1173
1312
|
disabled = props.disabled,
|
|
1174
|
-
otherProps = _objectWithoutProperties(props, _excluded$
|
|
1313
|
+
otherProps = _objectWithoutProperties(props, _excluded$8);
|
|
1175
1314
|
var checkboxValue = value.value,
|
|
1176
1315
|
other = value.other;
|
|
1177
1316
|
var triggerChange = function triggerChange(changedValue) {
|
|
@@ -1257,11 +1396,11 @@ function ApaasSlider(props) {
|
|
|
1257
1396
|
})));
|
|
1258
1397
|
}
|
|
1259
1398
|
|
|
1260
|
-
var css_248z$
|
|
1261
|
-
var styles$
|
|
1262
|
-
styleInject(css_248z$
|
|
1399
|
+
var css_248z$3 = ".index-module_rateLabel__3k-Xa {\n margin-right: 8px;\n}\n.index-module_rateText__A1GRy {\n margin-left: 8px;\n}\n";
|
|
1400
|
+
var styles$3 = {"rateLabel":"index-module_rateLabel__3k-Xa","rateText":"index-module_rateText__A1GRy"};
|
|
1401
|
+
styleInject(css_248z$3);
|
|
1263
1402
|
|
|
1264
|
-
var _excluded$
|
|
1403
|
+
var _excluded$9 = ["value", "onChange", "options", "textStyle"];
|
|
1265
1404
|
//状态文字映射
|
|
1266
1405
|
var RATE_MAP = {
|
|
1267
1406
|
0: '',
|
|
@@ -1283,7 +1422,7 @@ function ApaasRate(props) {
|
|
|
1283
1422
|
_props$options = props.options,
|
|
1284
1423
|
options = _props$options === void 0 ? [] : _props$options,
|
|
1285
1424
|
textStyle = props.textStyle,
|
|
1286
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
1425
|
+
other = _objectWithoutProperties(props, _excluded$9);
|
|
1287
1426
|
var rateValues = useMemo(function () {
|
|
1288
1427
|
return (value || []).reduce(function (prv, next) {
|
|
1289
1428
|
prv[next.id || ''] = next.value;
|
|
@@ -1319,14 +1458,14 @@ function ApaasRate(props) {
|
|
|
1319
1458
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
1320
1459
|
span: 24
|
|
1321
1460
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1322
|
-
className: styles$
|
|
1461
|
+
className: styles$3.rateLabel
|
|
1323
1462
|
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React.createElement(Rate, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
1324
1463
|
value: rateValues[item.id] || 0,
|
|
1325
1464
|
onChange: function onChange(val) {
|
|
1326
1465
|
return changeHandle(val, item.id);
|
|
1327
1466
|
}
|
|
1328
1467
|
})), /*#__PURE__*/React.createElement("span", {
|
|
1329
|
-
className: styles$
|
|
1468
|
+
className: styles$3.rateText,
|
|
1330
1469
|
style: textStyle
|
|
1331
1470
|
}, RATE_MAP[rateValues[item.id]])));
|
|
1332
1471
|
}));
|
|
@@ -1367,7 +1506,139 @@ var Province = function Province(props) {
|
|
|
1367
1506
|
})));
|
|
1368
1507
|
};
|
|
1369
1508
|
|
|
1370
|
-
var
|
|
1509
|
+
var TextArea = Input.TextArea;
|
|
1510
|
+
var ParseLogistics = function ParseLogistics(props) {
|
|
1511
|
+
var onChange = props.onChange;
|
|
1512
|
+
var _useState = useState(''),
|
|
1513
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1514
|
+
value = _useState2[0],
|
|
1515
|
+
setValue = _useState2[1];
|
|
1516
|
+
var handleIdentify = function handleIdentify() {
|
|
1517
|
+
if (!value) {
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
request$1({
|
|
1521
|
+
url: '/qy/logistics/addressAnalysis',
|
|
1522
|
+
method: 'post',
|
|
1523
|
+
data: {
|
|
1524
|
+
fullAddress: value
|
|
1525
|
+
}
|
|
1526
|
+
}).then(function (res) {
|
|
1527
|
+
var data = res.data;
|
|
1528
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
1529
|
+
}).catch(function (e) {
|
|
1530
|
+
console.log(e);
|
|
1531
|
+
});
|
|
1532
|
+
};
|
|
1533
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextArea, {
|
|
1534
|
+
placeholder: "\u590D\u5236\u7269\u6D41\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
|
|
1535
|
+
rows: 3,
|
|
1536
|
+
value: value,
|
|
1537
|
+
onChange: function onChange(e) {
|
|
1538
|
+
return setValue(e.target.value);
|
|
1539
|
+
}
|
|
1540
|
+
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
1541
|
+
size: "small",
|
|
1542
|
+
type: "primary",
|
|
1543
|
+
onClick: handleIdentify
|
|
1544
|
+
}, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
|
|
1545
|
+
size: "small",
|
|
1546
|
+
onClick: function onClick() {
|
|
1547
|
+
return setValue('');
|
|
1548
|
+
}
|
|
1549
|
+
}, "\u6E05\u7A7A")));
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
var IdentifyAddress = function IdentifyAddress(props) {
|
|
1553
|
+
var value = props.value,
|
|
1554
|
+
onChange = props.onChange,
|
|
1555
|
+
_props$disabled = props.disabled,
|
|
1556
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1557
|
+
_props$showIdentify = props.showIdentify,
|
|
1558
|
+
showIdentify = _props$showIdentify === void 0 ? true : _props$showIdentify,
|
|
1559
|
+
type = props.type;
|
|
1560
|
+
var changeHandle = function changeHandle(val, type) {
|
|
1561
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
1562
|
+
};
|
|
1563
|
+
var handleParseLogistics = function handleParseLogistics(val) {
|
|
1564
|
+
var params = {
|
|
1565
|
+
detail: val === null || val === void 0 ? void 0 : val.addressDetail,
|
|
1566
|
+
receiverName: val === null || val === void 0 ? void 0 : val.name,
|
|
1567
|
+
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
1568
|
+
address: []
|
|
1569
|
+
};
|
|
1570
|
+
if (val === null || val === void 0 ? void 0 : val.province) {
|
|
1571
|
+
params.address = [AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
|
|
1572
|
+
}
|
|
1573
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
1574
|
+
};
|
|
1575
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showIdentify && /*#__PURE__*/React.createElement(ParseLogistics, {
|
|
1576
|
+
onChange: handleParseLogistics
|
|
1577
|
+
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Province, {
|
|
1578
|
+
value: value.address,
|
|
1579
|
+
onChange: function onChange(val) {
|
|
1580
|
+
return changeHandle(val, 'address');
|
|
1581
|
+
},
|
|
1582
|
+
options: [],
|
|
1583
|
+
disabled: disabled,
|
|
1584
|
+
type: type
|
|
1585
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
1586
|
+
value: value.detail,
|
|
1587
|
+
disabled: disabled,
|
|
1588
|
+
placeholder: "\u8BE6\u7EC6\u5730\u5740",
|
|
1589
|
+
onChange: function onChange(e) {
|
|
1590
|
+
return changeHandle(e.target.value, 'detail');
|
|
1591
|
+
}
|
|
1592
|
+
})), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
1593
|
+
value: value.receiverName,
|
|
1594
|
+
disabled: disabled,
|
|
1595
|
+
placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
|
|
1596
|
+
onChange: function onChange(e) {
|
|
1597
|
+
return changeHandle(e.target.value, 'receiverName');
|
|
1598
|
+
}
|
|
1599
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
1600
|
+
value: value.receiverMobile,
|
|
1601
|
+
disabled: disabled,
|
|
1602
|
+
placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
|
|
1603
|
+
onChange: function onChange(e) {
|
|
1604
|
+
return changeHandle(e.target.value, 'receiverMobile');
|
|
1605
|
+
}
|
|
1606
|
+
})));
|
|
1607
|
+
};
|
|
1608
|
+
|
|
1609
|
+
function ApaasPosting(props) {
|
|
1610
|
+
var _props$value = props.value,
|
|
1611
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
1612
|
+
_props$disabled = props.disabled,
|
|
1613
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1614
|
+
_props$type = props.type,
|
|
1615
|
+
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
1616
|
+
onChange = props.onChange;
|
|
1617
|
+
var handleChange = function handleChange(val) {
|
|
1618
|
+
//智能识别返填
|
|
1619
|
+
var parseValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
1620
|
+
postingAddress: (val === null || val === void 0 ? void 0 : val.address) || [],
|
|
1621
|
+
postingDetail: (val === null || val === void 0 ? void 0 : val.detail) || '',
|
|
1622
|
+
postingReceiverName: (val === null || val === void 0 ? void 0 : val.receiverName) || '',
|
|
1623
|
+
postingReceiverMobile: (val === null || val === void 0 ? void 0 : val.receiverMobile) || ''
|
|
1624
|
+
});
|
|
1625
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parseValue);
|
|
1626
|
+
};
|
|
1627
|
+
return /*#__PURE__*/React.createElement(IdentifyAddress, {
|
|
1628
|
+
disabled: disabled,
|
|
1629
|
+
value: {
|
|
1630
|
+
address: (value === null || value === void 0 ? void 0 : value.postingAddress) || [],
|
|
1631
|
+
detail: (value === null || value === void 0 ? void 0 : value.postingDetail) || '',
|
|
1632
|
+
receiverName: (value === null || value === void 0 ? void 0 : value.postingReceiverName) || '',
|
|
1633
|
+
receiverMobile: (value === null || value === void 0 ? void 0 : value.postingReceiverMobile) || ''
|
|
1634
|
+
},
|
|
1635
|
+
onChange: handleChange,
|
|
1636
|
+
type: type,
|
|
1637
|
+
showIdentify: type !== 'bs'
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
var _excluded$a = ["label", "name", "extra", "required", "rules", "initialValue"];
|
|
1371
1642
|
function withFormItem(WrappedComponent) {
|
|
1372
1643
|
return function (props) {
|
|
1373
1644
|
var label = props.label,
|
|
@@ -1376,7 +1647,7 @@ function withFormItem(WrappedComponent) {
|
|
|
1376
1647
|
required = props.required,
|
|
1377
1648
|
rules = props.rules,
|
|
1378
1649
|
initialValue = props.initialValue,
|
|
1379
|
-
otherProps = _objectWithoutProperties(props, _excluded$
|
|
1650
|
+
otherProps = _objectWithoutProperties(props, _excluded$a);
|
|
1380
1651
|
return /*#__PURE__*/React.createElement(Form.Item, _objectSpread2({}, {
|
|
1381
1652
|
label: label,
|
|
1382
1653
|
name: name,
|
|
@@ -1508,7 +1779,7 @@ var trade4 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVzn
|
|
|
1508
1779
|
|
|
1509
1780
|
var trade5 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0MUVBOUVCQjIzQUIxMUU0QUZCMkFCQ0QzMzVDM0ZDMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0MUVBOUVCQzIzQUIxMUU0QUZCMkFCQ0QzMzVDM0ZDMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjQxRUE5RUI5MjNBQjExRTRBRkIyQUJDRDMzNUMzRkMwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjQxRUE5RUJBMjNBQjExRTRBRkIyQUJDRDMzNUMzRkMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+xU6hIgAAAPdJREFUeNqM0M9KAlEUx/E7MoF/WoiIoCslCyIXIgS5alMgvoJvIPgCbXwWobYuJVqVgeCmVSAyxGgE1dJVicH1e/AMDSLqgQ935nJ+d+4Z57bofxljOjhEEwuM0VU+csg0vHzf5SGCGkZmVQcoqRt8SDMGuJbmHk7gwWooWOXAPOIo3x1PUhJ4RFRP/jb/ZUOk0jiXwLNuFkLXWq8gdCmBKV5R0WGlnA2k6hEm/9NrHWGGoQ7b1vneQ1/6cfXhAS38ymc5ZB50MGiS5RQxvDjWWtnM8vImv47mK7OlZAZD06ekcUE4vTOgdY8EqvsGnnQ92xZYCjAAxxw+q99X1uIAAAAASUVORK5CYII=";
|
|
1510
1781
|
|
|
1511
|
-
var TextArea = Input.TextArea;
|
|
1782
|
+
var TextArea$1 = Input.TextArea;
|
|
1512
1783
|
var imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
|
|
1513
1784
|
var RemarkInput = function RemarkInput(props) {
|
|
1514
1785
|
var isShowFlag = props.isShowFlag,
|
|
@@ -1527,7 +1798,7 @@ var RemarkInput = function RemarkInput(props) {
|
|
|
1527
1798
|
});
|
|
1528
1799
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
1529
1800
|
};
|
|
1530
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextArea, {
|
|
1801
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextArea$1, {
|
|
1531
1802
|
disabled: disabled,
|
|
1532
1803
|
rows: 4,
|
|
1533
1804
|
value: value === null || value === void 0 ? void 0 : value.remark,
|
|
@@ -1551,8 +1822,8 @@ var RemarkInput = function RemarkInput(props) {
|
|
|
1551
1822
|
})));
|
|
1552
1823
|
};
|
|
1553
1824
|
|
|
1554
|
-
var css_248z$
|
|
1555
|
-
styleInject(css_248z$
|
|
1825
|
+
var css_248z$4 = ".mb8 {\n margin-bottom: 8px;\n}\n";
|
|
1826
|
+
styleInject(css_248z$4);
|
|
1556
1827
|
|
|
1557
1828
|
var Logistics = function Logistics(props) {
|
|
1558
1829
|
var options = props.options,
|
|
@@ -1596,7 +1867,7 @@ var Logistics = function Logistics(props) {
|
|
|
1596
1867
|
return /*#__PURE__*/React.createElement(Input, {
|
|
1597
1868
|
disabled: disabled,
|
|
1598
1869
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
1599
|
-
className: css_248z$
|
|
1870
|
+
className: css_248z$4.logisticsInput,
|
|
1600
1871
|
onChange: handleInputChange,
|
|
1601
1872
|
value: value === null || value === void 0 ? void 0 : value.order,
|
|
1602
1873
|
onBlur: function onBlur(e) {
|
|
@@ -1605,7 +1876,7 @@ var Logistics = function Logistics(props) {
|
|
|
1605
1876
|
});
|
|
1606
1877
|
};
|
|
1607
1878
|
return /*#__PURE__*/React.createElement("div", {
|
|
1608
|
-
className: css_248z$
|
|
1879
|
+
className: css_248z$4.logistics
|
|
1609
1880
|
}, isSingle ? showField === 'EXPRESS_COMPANY' ? LogisticsCompany() : null : LogisticsCompany(), isSingle ? showField === 'EXPRESS_WAYBILL_CODE' ? LogisticsCode() : null : LogisticsCode());
|
|
1610
1881
|
};
|
|
1611
1882
|
|
|
@@ -1660,8 +1931,8 @@ var AliPay = function AliPay(props) {
|
|
|
1660
1931
|
*/
|
|
1661
1932
|
var extendRequest = extend({});
|
|
1662
1933
|
|
|
1663
|
-
var css_248z$
|
|
1664
|
-
styleInject(css_248z$
|
|
1934
|
+
var css_248z$5 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
1935
|
+
styleInject(css_248z$5);
|
|
1665
1936
|
|
|
1666
1937
|
var defaultImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAOKADAAQAAAABAAAAOAAAAAANV2hTAAACcklEQVRoBe1aa3OqMBBdlFatfVivnV7H29f//0md6XSc1hegKCCigE2c0YKtri7Rm3ayX0zCbjhnzyZEVBs53hx+seV+MbcFNUXwpyusFFQKSp4BVaKSC4TCUwqiKZLcQSkouUAoPKUgmiLJHZSCkguEwtNRjw0O8/kcTMuGWRhu8BAzfKLrUPtTAU3TSBOSCXqeD2bfJt1036BSqQjn5dK+YQt/8hoMo4h0Q0pQmKFKyAomgdZva1C5ukgOZW7bQwfaXTPzPEIIZkXBXnyBN/aBr7fq9SXkcuTC+gLlvxPkG5VhDVbAHHcMj/f1VT9rQ1yqiEj69jAVOQkC8CdBaixL5ygEB/YIhiM3C05y7EFLNGI7battgMvWF7d8Pv9lu69WrlIlWiwUoFQswHQ6I5NKBh6MIC+z93YPZrPPg0Cr04Onh8ZiM1mC4A/x09OT1CZDfagv50x+HoTgwHag2zNh/TeBKIoZaQMe/v1NnUzO2IP88qKcxCWsLXQNxnEMrY4BnW/ILRH7/mRVkvy4x/2fX5osxgLeF23CFAzYmnlv9SCYTlGMVn8IMVOTx4wZYW58IwrDCBr1m5S66GSIgxCCLjuXdg0L4nh3BQbspLJujutB8y2Cu8bt+iVyX0iJcmD7kNuGliv62mwD34FFmBAFRQBJzsHL3DDxUk/GbGoLUXDT5FnGdy/27XeRluB22LtfVQR3z5WcnmQFdXauPJbp7Hsi1ciRZfaOpFatHOWlU/msSOUHmvobCTl3cgSS16Ac8HEUiiCeI7k9lIJy64OjUwriOZLbQykotz44OqUgniO5PZSCcuuDo1MK4jmS2+MD4RXMNiaoge4AAAAASUVORK5CYII=";
|
|
1667
1938
|
|
|
@@ -2640,8 +2911,8 @@ var Supplier = function Supplier(props) {
|
|
|
2640
2911
|
}));
|
|
2641
2912
|
};
|
|
2642
2913
|
|
|
2643
|
-
var css_248z$
|
|
2644
|
-
styleInject(css_248z$
|
|
2914
|
+
var css_248z$6 = ".cardBox {\n position: absolute;\n z-index: 1;\n border: 1px solid #e6e6e6;\n background-color: #fff;\n color: #303133;\n border-radius: 4px;\n overflow: auto;\n height: 200px;\n cursor: pointer;\n}\n.cardBox .cardli {\n padding: 7px 13px;\n width: 332px;\n}\n.cardBox .cardli:hover {\n background-color: #f5f7fa;\n}\n.cardBox .cardText {\n font-size: 14px;\n color: #333;\n margin: 0;\n padding: 0;\n line-height: 26px;\n}\n.cardBox .c-f60 {\n color: #f60;\n}\n.btn-discern {\n margin-left: 10px;\n height: 24px;\n font-size: 12px;\n color: #1B5BF3;\n border-color: #1B5BF3;\n padding: 0;\n}\n";
|
|
2915
|
+
styleInject(css_248z$6);
|
|
2645
2916
|
|
|
2646
2917
|
var Invoice = function Invoice(props) {
|
|
2647
2918
|
var _props$value = props.value,
|
|
@@ -3052,122 +3323,26 @@ var Payment = function Payment(props) {
|
|
|
3052
3323
|
}));
|
|
3053
3324
|
};
|
|
3054
3325
|
|
|
3055
|
-
var
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
var
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
}).catch(function (e) {
|
|
3076
|
-
console.log(e);
|
|
3077
|
-
});
|
|
3078
|
-
};
|
|
3079
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextArea$1, {
|
|
3080
|
-
placeholder: "\u590D\u5236\u7269\u6D41\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
|
|
3081
|
-
rows: 3,
|
|
3082
|
-
value: value,
|
|
3083
|
-
onChange: function onChange(e) {
|
|
3084
|
-
return setValue(e.target.value);
|
|
3085
|
-
}
|
|
3086
|
-
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
3087
|
-
size: "small",
|
|
3088
|
-
type: "primary",
|
|
3089
|
-
onClick: handleIdentify
|
|
3090
|
-
}, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
|
|
3091
|
-
size: "small",
|
|
3092
|
-
onClick: function onClick() {
|
|
3093
|
-
return setValue('');
|
|
3094
|
-
}
|
|
3095
|
-
}, "\u6E05\u7A7A")));
|
|
3096
|
-
};
|
|
3097
|
-
|
|
3098
|
-
var IdentifyAddress = function IdentifyAddress(props) {
|
|
3099
|
-
var value = props.value,
|
|
3100
|
-
onChange = props.onChange,
|
|
3101
|
-
_props$disabled = props.disabled,
|
|
3102
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
3103
|
-
var changeHandle = function changeHandle(val, type) {
|
|
3104
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
3105
|
-
};
|
|
3106
|
-
var handleParseLogistics = function handleParseLogistics(val) {
|
|
3107
|
-
var params = {
|
|
3108
|
-
detail: val === null || val === void 0 ? void 0 : val.addressDetail,
|
|
3109
|
-
receiverName: val === null || val === void 0 ? void 0 : val.name,
|
|
3110
|
-
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
3111
|
-
address: []
|
|
3112
|
-
};
|
|
3113
|
-
if (val === null || val === void 0 ? void 0 : val.province) {
|
|
3114
|
-
params.address = [AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
|
|
3115
|
-
}
|
|
3116
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
3117
|
-
};
|
|
3118
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && /*#__PURE__*/React.createElement(ParseLogistics, {
|
|
3119
|
-
onChange: handleParseLogistics
|
|
3120
|
-
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Province, {
|
|
3121
|
-
value: value.address,
|
|
3122
|
-
onChange: function onChange(val) {
|
|
3123
|
-
return changeHandle(val, 'address');
|
|
3124
|
-
},
|
|
3125
|
-
options: [],
|
|
3126
|
-
disabled: disabled
|
|
3127
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
3128
|
-
value: value.detail,
|
|
3129
|
-
disabled: disabled,
|
|
3130
|
-
placeholder: "\u8BE6\u7EC6\u5730\u5740",
|
|
3131
|
-
onChange: function onChange(e) {
|
|
3132
|
-
return changeHandle(e.target.value, 'detail');
|
|
3133
|
-
}
|
|
3134
|
-
})), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
3135
|
-
value: value.receiverName,
|
|
3136
|
-
disabled: disabled,
|
|
3137
|
-
placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
|
|
3138
|
-
onChange: function onChange(e) {
|
|
3139
|
-
return changeHandle(e.target.value, 'receiverName');
|
|
3140
|
-
}
|
|
3141
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
3142
|
-
value: value.receiverMobile,
|
|
3143
|
-
disabled: disabled,
|
|
3144
|
-
placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
|
|
3145
|
-
onChange: function onChange(e) {
|
|
3146
|
-
return changeHandle(e.target.value, 'receiverMobile');
|
|
3147
|
-
}
|
|
3148
|
-
})));
|
|
3149
|
-
};
|
|
3150
|
-
|
|
3151
|
-
var css_248z$6 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
3152
|
-
styleInject(css_248z$6);
|
|
3153
|
-
|
|
3154
|
-
var Item = Form.Item;
|
|
3155
|
-
var LogisticsAddress = LogisticsAddressData.getInstance();
|
|
3156
|
-
var address$1 = AddressData.getInstance();
|
|
3157
|
-
var LogisticsInterception = function LogisticsInterception(props) {
|
|
3158
|
-
var _props$value = props.value,
|
|
3159
|
-
value = _props$value === void 0 ? {} : _props$value,
|
|
3160
|
-
_props$logisticsOptio = props.logisticsOptions,
|
|
3161
|
-
logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
|
|
3162
|
-
_props$expressInterce = props.expressInterceptData,
|
|
3163
|
-
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
3164
|
-
_props$required = props.required,
|
|
3165
|
-
required = _props$required === void 0 ? false : _props$required,
|
|
3166
|
-
onChange = props.onChange,
|
|
3167
|
-
_props$disabled = props.disabled,
|
|
3168
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
3169
|
-
_props$isEditing = props.isEditing,
|
|
3170
|
-
isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
|
|
3326
|
+
var css_248z$7 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
3327
|
+
styleInject(css_248z$7);
|
|
3328
|
+
|
|
3329
|
+
var Item = Form.Item;
|
|
3330
|
+
var LogisticsAddress = LogisticsAddressData.getInstance();
|
|
3331
|
+
var address$1 = AddressData.getInstance();
|
|
3332
|
+
var LogisticsInterception = function LogisticsInterception(props) {
|
|
3333
|
+
var _props$value = props.value,
|
|
3334
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
3335
|
+
_props$logisticsOptio = props.logisticsOptions,
|
|
3336
|
+
logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
|
|
3337
|
+
_props$expressInterce = props.expressInterceptData,
|
|
3338
|
+
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
3339
|
+
_props$required = props.required,
|
|
3340
|
+
required = _props$required === void 0 ? false : _props$required,
|
|
3341
|
+
onChange = props.onChange,
|
|
3342
|
+
_props$disabled = props.disabled,
|
|
3343
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
3344
|
+
_props$isEditing = props.isEditing,
|
|
3345
|
+
isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
|
|
3171
3346
|
var _useState = useState(''),
|
|
3172
3347
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3173
3348
|
initCompany = _useState2[0],
|
|
@@ -3211,12 +3386,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3211
3386
|
return item.value === (value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
3212
3387
|
});
|
|
3213
3388
|
var showAddress = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).some(function (item) {
|
|
3214
|
-
var _item$config;
|
|
3215
|
-
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.showAddress);
|
|
3389
|
+
var _item$config, _item$config2;
|
|
3390
|
+
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && ((item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.showAddress) || ((_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.showAddressSelect));
|
|
3216
3391
|
});
|
|
3217
3392
|
var showSender = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).some(function (item) {
|
|
3218
|
-
var _item$
|
|
3219
|
-
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$
|
|
3393
|
+
var _item$config3;
|
|
3394
|
+
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.showSenderMobile);
|
|
3220
3395
|
});
|
|
3221
3396
|
var params = _objectSpread2({}, value);
|
|
3222
3397
|
if (!showAddress) {
|
|
@@ -3289,8 +3464,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3289
3464
|
return item.value === val;
|
|
3290
3465
|
});
|
|
3291
3466
|
var _returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
3292
|
-
var _item$
|
|
3293
|
-
return item === null || item === void 0 ? void 0 : (_item$
|
|
3467
|
+
var _item$config4;
|
|
3468
|
+
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
3294
3469
|
});
|
|
3295
3470
|
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3296
3471
|
interceptCompany: val,
|
|
@@ -3320,7 +3495,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3320
3495
|
//选择退回地址
|
|
3321
3496
|
var changeReturnAddress = function changeReturnAddress(uk) {
|
|
3322
3497
|
var item = LogisticsAddress.getItemByUk(uk);
|
|
3323
|
-
console.log(item);
|
|
3324
3498
|
if (item) {
|
|
3325
3499
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
3326
3500
|
interceptAddress: [item === null || item === void 0 ? void 0 : item.province, item === null || item === void 0 ? void 0 : item.city, item === null || item === void 0 ? void 0 : item.district],
|
|
@@ -3331,7 +3505,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3331
3505
|
}
|
|
3332
3506
|
};
|
|
3333
3507
|
return /*#__PURE__*/React.createElement("div", {
|
|
3334
|
-
className: css_248z$
|
|
3508
|
+
className: css_248z$7.interceptBox
|
|
3335
3509
|
}, /*#__PURE__*/React.createElement(Item, {
|
|
3336
3510
|
label: '物流信息',
|
|
3337
3511
|
required: required,
|
|
@@ -3451,6 +3625,64 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3451
3625
|
})));
|
|
3452
3626
|
};
|
|
3453
3627
|
|
|
3628
|
+
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
3629
|
+
var options = props.options,
|
|
3630
|
+
showField = props.showField,
|
|
3631
|
+
_props$value = props.value,
|
|
3632
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
3633
|
+
disabled = props.disabled,
|
|
3634
|
+
onChange = props.onChange;
|
|
3635
|
+
var handleInputChange = function handleInputChange(e, type) {
|
|
3636
|
+
var val = e.target.value;
|
|
3637
|
+
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
3638
|
+
};
|
|
3639
|
+
var handelSelectChange = function handelSelectChange(val) {
|
|
3640
|
+
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
3641
|
+
company: val
|
|
3642
|
+
}));
|
|
3643
|
+
};
|
|
3644
|
+
//物流公司
|
|
3645
|
+
var LogisticsCompany = function LogisticsCompany() {
|
|
3646
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
3647
|
+
disabled: disabled,
|
|
3648
|
+
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
3649
|
+
onChange: handelSelectChange,
|
|
3650
|
+
value: (value === null || value === void 0 ? void 0 : value.company) === '' ? undefined : value === null || value === void 0 ? void 0 : value.company,
|
|
3651
|
+
options: options,
|
|
3652
|
+
showSearch: true,
|
|
3653
|
+
style: {
|
|
3654
|
+
width: '100%'
|
|
3655
|
+
},
|
|
3656
|
+
filterOption: function filterOption(input, option) {
|
|
3657
|
+
return option.label.includes(input);
|
|
3658
|
+
}
|
|
3659
|
+
});
|
|
3660
|
+
};
|
|
3661
|
+
//物流单号
|
|
3662
|
+
var LogisticsCode = function LogisticsCode() {
|
|
3663
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
3664
|
+
disabled: disabled,
|
|
3665
|
+
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
3666
|
+
onChange: function onChange(e) {
|
|
3667
|
+
return handleInputChange(e, 'order');
|
|
3668
|
+
},
|
|
3669
|
+
value: value === null || value === void 0 ? void 0 : value.order
|
|
3670
|
+
});
|
|
3671
|
+
};
|
|
3672
|
+
//物流快照
|
|
3673
|
+
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
3674
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
3675
|
+
disabled: true,
|
|
3676
|
+
placeholder: "\u7269\u6D41\u5FEB\u7167",
|
|
3677
|
+
onChange: function onChange(e) {
|
|
3678
|
+
return handleInputChange(e, 'snapshot');
|
|
3679
|
+
},
|
|
3680
|
+
value: value === null || value === void 0 ? void 0 : value.snapshot
|
|
3681
|
+
});
|
|
3682
|
+
};
|
|
3683
|
+
return /*#__PURE__*/React.createElement("div", null, ['all', 'EXPRESS_COMPANY'].includes(showField) ? LogisticsCompany() : null, LogisticsCode(), ['all', 'EXPRESS_SNAPSHOT'].includes(showField) ? LogisticsSnapshot() : null);
|
|
3684
|
+
};
|
|
3685
|
+
|
|
3454
3686
|
var jstGoods = function jstGoods(props) {
|
|
3455
3687
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6;
|
|
3456
3688
|
var _props$value = props.value,
|
|
@@ -3565,8 +3797,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
3565
3797
|
})) : null) : null);
|
|
3566
3798
|
};
|
|
3567
3799
|
|
|
3568
|
-
var css_248z$
|
|
3569
|
-
styleInject(css_248z$
|
|
3800
|
+
var css_248z$8 = ".jstGoodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.jstGoodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.jstGoodsBox .right-context {\n font-size: 12px;\n}\n.jstGoodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.jstGoodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.jstGoodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.jstimgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n display: flex;\n justify-items: center;\n align-items: center;\n}\n.jstimgBox .add-btn {\n color: #86909c;\n}\n.jstimgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
3801
|
+
styleInject(css_248z$8);
|
|
3570
3802
|
|
|
3571
3803
|
var ItemList = function ItemList(props) {
|
|
3572
3804
|
var _props$value = props.value,
|
|
@@ -3639,13 +3871,638 @@ var ItemList = function ItemList(props) {
|
|
|
3639
3871
|
}, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
|
|
3640
3872
|
};
|
|
3641
3873
|
|
|
3642
|
-
var css_248z$8 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
3643
|
-
styleInject(css_248z$8);
|
|
3644
|
-
|
|
3645
3874
|
var TabPane$1 = Tabs.TabPane;
|
|
3875
|
+
var columns = [{
|
|
3876
|
+
dataIndex: 'picUrl',
|
|
3877
|
+
title: '主图',
|
|
3878
|
+
render: function render(val) {
|
|
3879
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
3880
|
+
width: 60,
|
|
3881
|
+
src: val
|
|
3882
|
+
});
|
|
3883
|
+
}
|
|
3884
|
+
}, {
|
|
3885
|
+
dataIndex: 'outerId',
|
|
3886
|
+
title: '款式编码'
|
|
3887
|
+
}, {
|
|
3888
|
+
dataIndex: 'numIid',
|
|
3889
|
+
title: '商品编码'
|
|
3890
|
+
}, {
|
|
3891
|
+
dataIndex: 'title',
|
|
3892
|
+
title: '商品名称'
|
|
3893
|
+
}, {
|
|
3894
|
+
dataIndex: 'skus',
|
|
3895
|
+
title: '颜色及规格'
|
|
3896
|
+
}];
|
|
3897
|
+
var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
3898
|
+
useImperativeHandle(ref, function () {
|
|
3899
|
+
return {
|
|
3900
|
+
open: function open() {
|
|
3901
|
+
setVisible(true);
|
|
3902
|
+
setSelect([]);
|
|
3903
|
+
setSelectIds([]);
|
|
3904
|
+
}
|
|
3905
|
+
};
|
|
3906
|
+
});
|
|
3907
|
+
var onSubmit = props.onSubmit,
|
|
3908
|
+
shopId = props.shopId,
|
|
3909
|
+
shopList = props.shopList,
|
|
3910
|
+
width = props.width;
|
|
3911
|
+
var _useState = useState(false),
|
|
3912
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3913
|
+
visible = _useState2[0],
|
|
3914
|
+
setVisible = _useState2[1];
|
|
3915
|
+
var _useState3 = useState([]),
|
|
3916
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
3917
|
+
selectList = _useState4[0],
|
|
3918
|
+
setSelect = _useState4[1];
|
|
3919
|
+
var _useState5 = useState([]),
|
|
3920
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3921
|
+
selectIds = _useState6[0],
|
|
3922
|
+
setSelectIds = _useState6[1];
|
|
3923
|
+
var _useState7 = useState([]),
|
|
3924
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
3925
|
+
goodList = _useState8[0],
|
|
3926
|
+
setGoodList = _useState8[1];
|
|
3927
|
+
var _useState9 = useState(false),
|
|
3928
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
3929
|
+
loading = _useState10[0],
|
|
3930
|
+
setLoading = _useState10[1];
|
|
3931
|
+
var _useState11 = useState({
|
|
3932
|
+
apiName: 'queryItems',
|
|
3933
|
+
desc: true,
|
|
3934
|
+
numIids: '',
|
|
3935
|
+
orderBy: 'list_time',
|
|
3936
|
+
pageNo: 1,
|
|
3937
|
+
pageSize: 10,
|
|
3938
|
+
shopId: shopId,
|
|
3939
|
+
type: 'onSale',
|
|
3940
|
+
cids: '',
|
|
3941
|
+
title: ''
|
|
3942
|
+
}),
|
|
3943
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
3944
|
+
searchParams = _useState12[0],
|
|
3945
|
+
setSearch = _useState12[1];
|
|
3946
|
+
var _useState13 = useState(0),
|
|
3947
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
3948
|
+
total = _useState14[0],
|
|
3949
|
+
setTotal = _useState14[1];
|
|
3950
|
+
var _useState15 = useState(''),
|
|
3951
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
3952
|
+
platform = _useState16[0],
|
|
3953
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
3954
|
+
// const [shopInfo, setShopInfo] = useState<any>({}); //店铺信息
|
|
3955
|
+
var _useState17 = useState([{
|
|
3956
|
+
tab: '所选商品',
|
|
3957
|
+
key: 'onSale'
|
|
3958
|
+
}
|
|
3959
|
+
// { tab: '已选商品', key: 'select' },
|
|
3960
|
+
]),
|
|
3961
|
+
_useState18 = _slicedToArray(_useState17, 1),
|
|
3962
|
+
tabs = _useState18[0];
|
|
3963
|
+
//选择页码
|
|
3964
|
+
var pageChange = function pageChange(page, pageSize) {
|
|
3965
|
+
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
3966
|
+
pageNo: page,
|
|
3967
|
+
pageSize: pageSize
|
|
3968
|
+
}));
|
|
3969
|
+
};
|
|
3970
|
+
/**
|
|
3971
|
+
* 选择商品
|
|
3972
|
+
* @param good
|
|
3973
|
+
* @returns
|
|
3974
|
+
*/
|
|
3975
|
+
// const changeItem = (good: any) => {
|
|
3976
|
+
// if (searchParams.type === 'select') {
|
|
3977
|
+
// const newSelect = selectList.filter((item: any) => {
|
|
3978
|
+
// return item.numIid !== good.numIid;
|
|
3979
|
+
// });
|
|
3980
|
+
// setSelect([...newSelect]);
|
|
3981
|
+
// const ids = newSelect.map((item) => {
|
|
3982
|
+
// return item.numIid;
|
|
3983
|
+
// });
|
|
3984
|
+
// setSelectIds(ids);
|
|
3985
|
+
// } else {
|
|
3986
|
+
// if (selectList.length >= maxLength) {
|
|
3987
|
+
// message.error(`最多添加${maxLength}张`);
|
|
3988
|
+
// return;
|
|
3989
|
+
// }
|
|
3990
|
+
// const hasGood = selectList.some((t) => {
|
|
3991
|
+
// return t.numIid === good.numIid;
|
|
3992
|
+
// });
|
|
3993
|
+
// if (hasGood) {
|
|
3994
|
+
// const newSelectList = selectList.filter((item) => {
|
|
3995
|
+
// return item.numIid !== good.numIid;
|
|
3996
|
+
// });
|
|
3997
|
+
// setSelect(newSelectList);
|
|
3998
|
+
// const ids = newSelectList.map((item) => {
|
|
3999
|
+
// return item.numIid;
|
|
4000
|
+
// });
|
|
4001
|
+
// setSelectIds(ids);
|
|
4002
|
+
// } else {
|
|
4003
|
+
// setSelect([...selectList, good]);
|
|
4004
|
+
// setSelectIds([...selectIds, good.numIid]);
|
|
4005
|
+
// }
|
|
4006
|
+
// }
|
|
4007
|
+
// };
|
|
4008
|
+
/**
|
|
4009
|
+
*
|
|
4010
|
+
* @returns 获取查询参数
|
|
4011
|
+
*/
|
|
4012
|
+
var queryPd = function queryPd() {
|
|
4013
|
+
var params = {
|
|
4014
|
+
apiName: 'queryItems',
|
|
4015
|
+
desc: searchParams.desc,
|
|
4016
|
+
productIds: searchParams.numIids,
|
|
4017
|
+
orderBy: searchParams.orderBy,
|
|
4018
|
+
pageNo: searchParams.pageNo,
|
|
4019
|
+
pageSize: searchParams.pageSize,
|
|
4020
|
+
shopId: shopId,
|
|
4021
|
+
type: searchParams.type,
|
|
4022
|
+
title: searchParams.title,
|
|
4023
|
+
cids: searchParams.cids
|
|
4024
|
+
};
|
|
4025
|
+
return params;
|
|
4026
|
+
};
|
|
4027
|
+
/**
|
|
4028
|
+
* 查询商品
|
|
4029
|
+
*/
|
|
4030
|
+
var queryItems = /*#__PURE__*/function () {
|
|
4031
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(platform) {
|
|
4032
|
+
var res, _ref2, items, totalCount;
|
|
4033
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4034
|
+
while (1) switch (_context.prev = _context.next) {
|
|
4035
|
+
case 0:
|
|
4036
|
+
_context.prev = 0;
|
|
4037
|
+
setLoading(true);
|
|
4038
|
+
_context.next = 4;
|
|
4039
|
+
return extendRequest('/qy/gdfw/workOrder/queryItems', {
|
|
4040
|
+
method: 'post',
|
|
4041
|
+
data: queryPd()
|
|
4042
|
+
});
|
|
4043
|
+
case 4:
|
|
4044
|
+
res = _context.sent;
|
|
4045
|
+
_ref2 = res.data || {
|
|
4046
|
+
items: [],
|
|
4047
|
+
totalCount: 0
|
|
4048
|
+
}, items = _ref2.items, totalCount = _ref2.totalCount;
|
|
4049
|
+
items.forEach(function (item) {
|
|
4050
|
+
item.platform = platform;
|
|
4051
|
+
item.key = item.numIid;
|
|
4052
|
+
});
|
|
4053
|
+
setGoodList(_toConsumableArray(items));
|
|
4054
|
+
setTotal(totalCount);
|
|
4055
|
+
case 9:
|
|
4056
|
+
_context.prev = 9;
|
|
4057
|
+
setLoading(false);
|
|
4058
|
+
return _context.finish(9);
|
|
4059
|
+
case 12:
|
|
4060
|
+
case "end":
|
|
4061
|
+
return _context.stop();
|
|
4062
|
+
}
|
|
4063
|
+
}, _callee, null, [[0,, 9, 12]]);
|
|
4064
|
+
}));
|
|
4065
|
+
return function queryItems(_x) {
|
|
4066
|
+
return _ref.apply(this, arguments);
|
|
4067
|
+
};
|
|
4068
|
+
}();
|
|
4069
|
+
var getItem = function getItem(searchParams, platform) {
|
|
4070
|
+
if (searchParams.type === 'select') {
|
|
4071
|
+
setTotal(1);
|
|
4072
|
+
return;
|
|
4073
|
+
} else {
|
|
4074
|
+
queryItems(platform);
|
|
4075
|
+
}
|
|
4076
|
+
};
|
|
4077
|
+
useEffect(function () {
|
|
4078
|
+
var shopInfo = shopList.find(function (item) {
|
|
4079
|
+
return shopId === item.shopId || shopId === item.shopName;
|
|
4080
|
+
});
|
|
4081
|
+
// setShopInfo(shopInfo);
|
|
4082
|
+
var platform = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopSourceStr.toLowerCase();
|
|
4083
|
+
setPlatform(platform);
|
|
4084
|
+
}, []);
|
|
4085
|
+
useEffect(function () {
|
|
4086
|
+
platform && getItem(searchParams, platform);
|
|
4087
|
+
}, [searchParams, platform]);
|
|
4088
|
+
var rowSelection = {
|
|
4089
|
+
selectedRowKeys: selectIds,
|
|
4090
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
4091
|
+
console.log(selectedRowKeys, selectedRows, info);
|
|
4092
|
+
setSelectIds(selectedRowKeys);
|
|
4093
|
+
setSelect(_toConsumableArray(selectedRows));
|
|
4094
|
+
}
|
|
4095
|
+
// getCheckboxProps: (record: any) => {
|
|
4096
|
+
// return {
|
|
4097
|
+
// disabled: record.hasOwnProperty('children'),
|
|
4098
|
+
// };
|
|
4099
|
+
// },
|
|
4100
|
+
};
|
|
4101
|
+
|
|
4102
|
+
var _onCancel = function onCancel() {
|
|
4103
|
+
setVisible(false);
|
|
4104
|
+
};
|
|
4105
|
+
var onOk = function onOk() {
|
|
4106
|
+
onSubmit(selectList);
|
|
4107
|
+
_onCancel();
|
|
4108
|
+
};
|
|
4109
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
4110
|
+
title: '选择商品编码',
|
|
4111
|
+
okText: '确认',
|
|
4112
|
+
cancelText: '取消',
|
|
4113
|
+
visible: visible,
|
|
4114
|
+
width: width || 850,
|
|
4115
|
+
onCancel: function onCancel() {
|
|
4116
|
+
_onCancel();
|
|
4117
|
+
},
|
|
4118
|
+
onOk: onOk,
|
|
4119
|
+
wrapClassName: "goodModal"
|
|
4120
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
4121
|
+
type: "card",
|
|
4122
|
+
activeKey: searchParams.type,
|
|
4123
|
+
onChange: function onChange(e) {
|
|
4124
|
+
var params = _objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
4125
|
+
type: e,
|
|
4126
|
+
pageNo: 1
|
|
4127
|
+
});
|
|
4128
|
+
setSearch(params);
|
|
4129
|
+
}
|
|
4130
|
+
}, tabs.map(function (tab) {
|
|
4131
|
+
return /*#__PURE__*/React.createElement(TabPane$1, {
|
|
4132
|
+
tab: tab.tab + (tab.key === 'select' ? "(".concat(selectList.length, ")") : ''),
|
|
4133
|
+
key: tab.key
|
|
4134
|
+
});
|
|
4135
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
4136
|
+
className: "searchBox",
|
|
4137
|
+
style: {
|
|
4138
|
+
display: searchParams.type === 'select' ? 'none' : ''
|
|
4139
|
+
}
|
|
4140
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
4141
|
+
layout: "inline"
|
|
4142
|
+
}, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
4143
|
+
placeholder: "\u6B3E\u5F0F\u7F16\u7801"
|
|
4144
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
4145
|
+
placeholder: "\u5546\u54C1\u7F16\u7801"
|
|
4146
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
4147
|
+
placeholder: "\u5546\u54C1\u540D\u79F0"
|
|
4148
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
4149
|
+
type: "primary",
|
|
4150
|
+
htmlType: "submit"
|
|
4151
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, null, "\u91CD\u7F6E")))), /*#__PURE__*/React.createElement(Spin, {
|
|
4152
|
+
spinning: loading
|
|
4153
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
4154
|
+
rowSelection: rowSelection,
|
|
4155
|
+
columns: columns,
|
|
4156
|
+
dataSource: searchParams.type == 'select' ? selectList : goodList,
|
|
4157
|
+
scroll: {
|
|
4158
|
+
y: 300
|
|
4159
|
+
},
|
|
4160
|
+
pagination: {
|
|
4161
|
+
size: 'small',
|
|
4162
|
+
total: total,
|
|
4163
|
+
current: searchParams.pageNo,
|
|
4164
|
+
pageSize: searchParams.pageSize,
|
|
4165
|
+
onChange: pageChange
|
|
4166
|
+
}
|
|
4167
|
+
})));
|
|
4168
|
+
};
|
|
4169
|
+
var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
4170
|
+
|
|
4171
|
+
// interface GoodsItem {
|
|
4172
|
+
// title: string;
|
|
4173
|
+
// pic: string;
|
|
4174
|
+
// platform: string;
|
|
4175
|
+
// skuId: string;
|
|
4176
|
+
// styleId: string;
|
|
4177
|
+
// }
|
|
4178
|
+
var GoodItem = function GoodItem(props) {
|
|
4179
|
+
var _props$value = props.value,
|
|
4180
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
4181
|
+
onChange = props.onChange,
|
|
4182
|
+
disabled = props.disabled,
|
|
4183
|
+
_props$showField = props.showField,
|
|
4184
|
+
showField = _props$showField === void 0 ? [] : _props$showField,
|
|
4185
|
+
width = props.width,
|
|
4186
|
+
_props$shopList = props.shopList,
|
|
4187
|
+
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
4188
|
+
_props$shopId = props.shopId,
|
|
4189
|
+
shopId = _props$shopId === void 0 ? '' : _props$shopId,
|
|
4190
|
+
_props$maxLength = props.maxLength,
|
|
4191
|
+
maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
|
|
4192
|
+
_props$showChangeBtn = props.showChangeBtn,
|
|
4193
|
+
showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
|
|
4194
|
+
_props$tableSelect = props.tableSelect,
|
|
4195
|
+
tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
|
|
4196
|
+
_props$otherOperation = props.otherOperations,
|
|
4197
|
+
otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
|
|
4198
|
+
_props$canUpdateNumbe = props.canUpdateNumber,
|
|
4199
|
+
canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
|
|
4200
|
+
onSelect = props.onSelect;
|
|
4201
|
+
var refModal = useRef();
|
|
4202
|
+
var handleDelete = function handleDelete(index) {
|
|
4203
|
+
var newList = value.filter(function (item, i) {
|
|
4204
|
+
return index !== i;
|
|
4205
|
+
});
|
|
4206
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
4207
|
+
};
|
|
4208
|
+
var _useState = useState([]),
|
|
4209
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
4210
|
+
selectedRowKeys = _useState2[0],
|
|
4211
|
+
setSelectedRowKeys = _useState2[1];
|
|
4212
|
+
var updateHandle = function updateHandle(val, index, type) {
|
|
4213
|
+
value[index][type] = val;
|
|
4214
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
4215
|
+
};
|
|
4216
|
+
//商品信息
|
|
4217
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
4218
|
+
return [{
|
|
4219
|
+
dataIndex: 'name',
|
|
4220
|
+
title: "bs\u540D\u79F0",
|
|
4221
|
+
width: 200
|
|
4222
|
+
}, {
|
|
4223
|
+
dataIndex: 'code',
|
|
4224
|
+
title: "bs\u7F16\u7801",
|
|
4225
|
+
width: 200
|
|
4226
|
+
}, {
|
|
4227
|
+
dataIndex: 'skuId',
|
|
4228
|
+
title: "bssku\u7F16\u7801",
|
|
4229
|
+
width: 200
|
|
4230
|
+
}, {
|
|
4231
|
+
dataIndex: 'money',
|
|
4232
|
+
title: "bs\u5B9E\u4ED8\u91D1\u989D",
|
|
4233
|
+
width: 200
|
|
4234
|
+
}, {
|
|
4235
|
+
dataIndex: 'number',
|
|
4236
|
+
title: "bs\u6570\u91CF",
|
|
4237
|
+
width: 200,
|
|
4238
|
+
render: function render(val, record, index) {
|
|
4239
|
+
return canUpdateNumber ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
4240
|
+
value: val,
|
|
4241
|
+
onChange: function onChange(num) {
|
|
4242
|
+
return updateHandle(num, index, 'number');
|
|
4243
|
+
}
|
|
4244
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
4245
|
+
}
|
|
4246
|
+
}, {
|
|
4247
|
+
dataIndex: 'share',
|
|
4248
|
+
title: "bs\u5206\u644A\u4EF7",
|
|
4249
|
+
width: 200
|
|
4250
|
+
}, {
|
|
4251
|
+
dataIndex: 'type',
|
|
4252
|
+
title: "bs\u8D60\u54C1\u7C7B\u578B",
|
|
4253
|
+
width: 200
|
|
4254
|
+
}];
|
|
4255
|
+
};
|
|
4256
|
+
var newColumns = useMemo(function () {
|
|
4257
|
+
return [{
|
|
4258
|
+
dataIndex: 'pic',
|
|
4259
|
+
title: "bs\u56FE\u7247",
|
|
4260
|
+
width: 200,
|
|
4261
|
+
render: function render(val) {
|
|
4262
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
4263
|
+
width: 60,
|
|
4264
|
+
src: val
|
|
4265
|
+
});
|
|
4266
|
+
}
|
|
4267
|
+
}].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
|
|
4268
|
+
return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
4269
|
+
})), [{
|
|
4270
|
+
dataIndex: '',
|
|
4271
|
+
title: "\u64CD\u4F5C",
|
|
4272
|
+
render: function render(val, record, index) {
|
|
4273
|
+
return record.canDelete ? /*#__PURE__*/React.createElement(Button, {
|
|
4274
|
+
type: "link",
|
|
4275
|
+
onClick: function onClick() {
|
|
4276
|
+
return handleDelete(index);
|
|
4277
|
+
}
|
|
4278
|
+
}, "\u5220\u9664") : null;
|
|
4279
|
+
}
|
|
4280
|
+
}]);
|
|
4281
|
+
}, [showField]);
|
|
4282
|
+
var onSubmit = function onSubmit(list) {
|
|
4283
|
+
var newList = list.map(function (item) {
|
|
4284
|
+
var picUrl = item.picUrl,
|
|
4285
|
+
numIid = item.numIid,
|
|
4286
|
+
outerId = item.outerId,
|
|
4287
|
+
title = item.title,
|
|
4288
|
+
price = item.price,
|
|
4289
|
+
platform = item.platform;
|
|
4290
|
+
return {
|
|
4291
|
+
pic: picUrl,
|
|
4292
|
+
numIid: numIid,
|
|
4293
|
+
outerId: outerId,
|
|
4294
|
+
title: title,
|
|
4295
|
+
price: price,
|
|
4296
|
+
platform: platform,
|
|
4297
|
+
number: 10,
|
|
4298
|
+
canDelete: true
|
|
4299
|
+
};
|
|
4300
|
+
});
|
|
4301
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
4302
|
+
};
|
|
4303
|
+
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
4304
|
+
setSelectedRowKeys(newSelectedRowKeys);
|
|
4305
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
|
|
4306
|
+
return newSelectedRowKeys.includes(t);
|
|
4307
|
+
}));
|
|
4308
|
+
};
|
|
4309
|
+
var handleChangeGoods = function handleChangeGoods() {
|
|
4310
|
+
refModal.current.open();
|
|
4311
|
+
};
|
|
4312
|
+
var rowSelection = {
|
|
4313
|
+
selectedRowKeys: selectedRowKeys,
|
|
4314
|
+
onChange: onSelectChange
|
|
4315
|
+
};
|
|
4316
|
+
var tableConfig = useMemo(function () {
|
|
4317
|
+
var params = {
|
|
4318
|
+
columns: newColumns,
|
|
4319
|
+
dataSource: value
|
|
4320
|
+
};
|
|
4321
|
+
if (tableSelect) {
|
|
4322
|
+
params.rowSelection = rowSelection;
|
|
4323
|
+
}
|
|
4324
|
+
return params;
|
|
4325
|
+
}, [tableSelect, newColumns, value]);
|
|
4326
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement(Space, {
|
|
4327
|
+
align: "end"
|
|
4328
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
4329
|
+
type: "link",
|
|
4330
|
+
onClick: handleChangeGoods
|
|
4331
|
+
}, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React.createElement("div", {
|
|
4332
|
+
style: {
|
|
4333
|
+
width: '100%',
|
|
4334
|
+
overflowX: 'auto'
|
|
4335
|
+
}
|
|
4336
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
4337
|
+
pagination: false
|
|
4338
|
+
}))), /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
4339
|
+
ref: refModal,
|
|
4340
|
+
onSubmit: onSubmit,
|
|
4341
|
+
width: width,
|
|
4342
|
+
shopList: shopList,
|
|
4343
|
+
shopId: shopId,
|
|
4344
|
+
maxLength: maxLength
|
|
4345
|
+
}));
|
|
4346
|
+
};
|
|
4347
|
+
|
|
4348
|
+
var BsGoods = function BsGoods(props) {
|
|
4349
|
+
var value = props.value;
|
|
4350
|
+
var _useState = useState(false),
|
|
4351
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
4352
|
+
tableSelect = _useState2[0],
|
|
4353
|
+
setTableSelect = _useState2[1];
|
|
4354
|
+
var ref = useRef();
|
|
4355
|
+
useEffect(function () {
|
|
4356
|
+
ref.current = pubsub.subscribe('type', function (_, val) {
|
|
4357
|
+
setTableSelect(['2', '4'].includes(val));
|
|
4358
|
+
if (['1', '3'].includes(val)) {
|
|
4359
|
+
pubsub.publish('selectList', {
|
|
4360
|
+
type: val,
|
|
4361
|
+
list: _toConsumableArray(value).map(function (item) {
|
|
4362
|
+
item.canDelete = false;
|
|
4363
|
+
})
|
|
4364
|
+
});
|
|
4365
|
+
}
|
|
4366
|
+
});
|
|
4367
|
+
return function () {
|
|
4368
|
+
pubsub.unsubscribe(ref.current);
|
|
4369
|
+
};
|
|
4370
|
+
}, []);
|
|
4371
|
+
var onSelect = function onSelect(list) {
|
|
4372
|
+
pubsub.publish('selectList', list.map(function (item) {
|
|
4373
|
+
item.canDelete = true;
|
|
4374
|
+
}));
|
|
4375
|
+
};
|
|
4376
|
+
return /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
4377
|
+
tableSelect: tableSelect,
|
|
4378
|
+
onSelect: onSelect
|
|
4379
|
+
}));
|
|
4380
|
+
};
|
|
4381
|
+
|
|
4382
|
+
var _excluded$b = ["value", "onChange", "reasonList", "disabled"];
|
|
4383
|
+
var BsExchange = function BsExchange(props) {
|
|
4384
|
+
var _value$bsExchangeType2, _value$bsExchangeType3;
|
|
4385
|
+
var value = props.value,
|
|
4386
|
+
onChange = props.onChange,
|
|
4387
|
+
_props$reasonList = props.reasonList,
|
|
4388
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
4389
|
+
disabled = props.disabled,
|
|
4390
|
+
other = _objectWithoutProperties(props, _excluded$b);
|
|
4391
|
+
useEffect(function () {
|
|
4392
|
+
pubsub.subscribe('selectList', function (_, list) {
|
|
4393
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
4394
|
+
bsExchangeReturnGoods: list
|
|
4395
|
+
}));
|
|
4396
|
+
});
|
|
4397
|
+
}, []);
|
|
4398
|
+
var changeHandle = function changeHandle(val, key) {
|
|
4399
|
+
var newValue = _objectSpread2({}, value);
|
|
4400
|
+
newValue[key] = val;
|
|
4401
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
4402
|
+
if (key === 'bsExchangeType') {
|
|
4403
|
+
console.log(val);
|
|
4404
|
+
pubsub.publish('type', val[0]);
|
|
4405
|
+
}
|
|
4406
|
+
};
|
|
4407
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
4408
|
+
var showChangeBtn = useMemo(function () {
|
|
4409
|
+
var _value$bsExchangeType;
|
|
4410
|
+
return ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0]) || disabled;
|
|
4411
|
+
}, [value === null || value === void 0 ? void 0 : value.bsExchangeType]);
|
|
4412
|
+
var copyGoods = function copyGoods() {
|
|
4413
|
+
var copyHandle = function copyHandle() {
|
|
4414
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
4415
|
+
bsExchangeSwapOutGoods: [].concat(_toConsumableArray((value === null || value === void 0 ? void 0 : value.bsExchangeSwapOutGoods) || []), _toConsumableArray((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []))
|
|
4416
|
+
}));
|
|
4417
|
+
};
|
|
4418
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
4419
|
+
type: "link",
|
|
4420
|
+
onClick: copyHandle
|
|
4421
|
+
}, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
|
|
4422
|
+
};
|
|
4423
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
|
|
4424
|
+
options: reasonList,
|
|
4425
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeType,
|
|
4426
|
+
onChange: function onChange(val) {
|
|
4427
|
+
return changeHandle(val, 'bsExchangeType');
|
|
4428
|
+
}
|
|
4429
|
+
}), /*#__PURE__*/React.createElement("p", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
4430
|
+
disabled: disabled,
|
|
4431
|
+
showChangeBtn: showChangeBtn,
|
|
4432
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
|
|
4433
|
+
onChange: function onChange(val) {
|
|
4434
|
+
return changeHandle(val, 'bsExchangeReturnGoods');
|
|
4435
|
+
}
|
|
4436
|
+
})), /*#__PURE__*/React.createElement("p", null, "\u6362\u51FA\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
4437
|
+
disabled: disabled,
|
|
4438
|
+
otherOperations: ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType2 = value.bsExchangeType) === null || _value$bsExchangeType2 === void 0 ? void 0 : _value$bsExchangeType2[0]) ? copyGoods() : null,
|
|
4439
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeSwapOutGoods,
|
|
4440
|
+
onChange: function onChange(val) {
|
|
4441
|
+
return changeHandle(val, 'bsExchangeSwapOutGoods');
|
|
4442
|
+
}
|
|
4443
|
+
})), ['3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType3 = value.bsExchangeType) === null || _value$bsExchangeType3 === void 0 ? void 0 : _value$bsExchangeType3[0]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
4444
|
+
disabled: disabled
|
|
4445
|
+
}, other), {}, {
|
|
4446
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeGiftGoods,
|
|
4447
|
+
onChange: function onChange(val) {
|
|
4448
|
+
return changeHandle(val, 'bsExchangeGiftGoods');
|
|
4449
|
+
}
|
|
4450
|
+
}))) : null);
|
|
4451
|
+
};
|
|
4452
|
+
|
|
4453
|
+
var _excluded$c = ["value", "onChange", "reasonList"];
|
|
4454
|
+
var BsReissue = function BsReissue(props) {
|
|
4455
|
+
var value = props.value,
|
|
4456
|
+
onChange = props.onChange,
|
|
4457
|
+
_props$reasonList = props.reasonList,
|
|
4458
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
4459
|
+
other = _objectWithoutProperties(props, _excluded$c);
|
|
4460
|
+
useEffect(function () {
|
|
4461
|
+
pubsub.subscribe('selectList', function (_, list) {
|
|
4462
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
4463
|
+
bsReissueGoods: list.map(function (item) {
|
|
4464
|
+
item.money = 0;
|
|
4465
|
+
return item;
|
|
4466
|
+
})
|
|
4467
|
+
}));
|
|
4468
|
+
});
|
|
4469
|
+
}, []);
|
|
4470
|
+
var changeHandle = function changeHandle(val, key) {
|
|
4471
|
+
var newValue = _objectSpread2({}, value);
|
|
4472
|
+
newValue[key] = val;
|
|
4473
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
4474
|
+
if (key === 'bsReissueType') {
|
|
4475
|
+
pubsub.publish('type', val);
|
|
4476
|
+
}
|
|
4477
|
+
};
|
|
4478
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
4479
|
+
var showChangeBtn = useMemo(function () {
|
|
4480
|
+
var _value$bsReissueType;
|
|
4481
|
+
return ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsReissueType = value.bsReissueType) === null || _value$bsReissueType === void 0 ? void 0 : _value$bsReissueType[0]);
|
|
4482
|
+
}, [value === null || value === void 0 ? void 0 : value.bsReissueType]);
|
|
4483
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
|
|
4484
|
+
options: reasonList,
|
|
4485
|
+
value: value === null || value === void 0 ? void 0 : value.bsReissueType,
|
|
4486
|
+
onChange: function onChange(val) {
|
|
4487
|
+
return changeHandle(val, 'bsReissueType');
|
|
4488
|
+
}
|
|
4489
|
+
}), /*#__PURE__*/React.createElement("p", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
4490
|
+
canUpdateNumber: true,
|
|
4491
|
+
showChangeBtn: showChangeBtn,
|
|
4492
|
+
value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
|
|
4493
|
+
onChange: function onChange(val) {
|
|
4494
|
+
return changeHandle(val, 'bsReissueGoods');
|
|
4495
|
+
}
|
|
4496
|
+
})));
|
|
4497
|
+
};
|
|
4498
|
+
|
|
4499
|
+
var css_248z$9 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
4500
|
+
styleInject(css_248z$9);
|
|
4501
|
+
|
|
4502
|
+
var TabPane$2 = Tabs.TabPane;
|
|
3646
4503
|
var Option$2 = Select.Option;
|
|
3647
4504
|
var Search$1 = Input.Search;
|
|
3648
|
-
var GoodsModal$
|
|
4505
|
+
var GoodsModal$3 = function GoodsModal(props) {
|
|
3649
4506
|
var onSubmit = props.onSubmit,
|
|
3650
4507
|
_onCancel = props.onCancel,
|
|
3651
4508
|
visible = props.visible,
|
|
@@ -3958,7 +4815,7 @@ var GoodsModal$1 = function GoodsModal(props) {
|
|
|
3958
4815
|
}));
|
|
3959
4816
|
}
|
|
3960
4817
|
}, tabs.map(function (tab) {
|
|
3961
|
-
return /*#__PURE__*/React.createElement(TabPane$
|
|
4818
|
+
return /*#__PURE__*/React.createElement(TabPane$2, {
|
|
3962
4819
|
tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
|
|
3963
4820
|
key: tab.key
|
|
3964
4821
|
});
|
|
@@ -4096,7 +4953,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
4096
4953
|
};
|
|
4097
4954
|
return /*#__PURE__*/React.createElement("div", {
|
|
4098
4955
|
className: "goodsBox"
|
|
4099
|
-
}, /*#__PURE__*/React.createElement(GoodsModal$
|
|
4956
|
+
}, /*#__PURE__*/React.createElement(GoodsModal$3, {
|
|
4100
4957
|
visible: visible,
|
|
4101
4958
|
onSubmit: onSubmit,
|
|
4102
4959
|
type: type,
|
|
@@ -4115,4 +4972,4 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
4115
4972
|
};
|
|
4116
4973
|
var index = /*#__PURE__*/forwardRef(Goods$1);
|
|
4117
4974
|
|
|
4118
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasMultipleSelect, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, BuyerNick, ChooseBaby, ExpressLogistics, Goods, index as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };
|
|
4975
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadAsync$1 as ApaasUploadFile, BsExchange, BsGoods, BsReissue, BuyerNick, ChooseBaby, ExpressLogistics, Goods, index as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };
|