@kmkf-fe-packages/basic-components 0.7.14-alpha.5 → 0.7.15-alpha.0
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 +741 -156
- package/dist/index.js +741 -153
- package/dist/src/apaas/ApaasPosting/index.d.ts +14 -0
- package/dist/src/apaas/ApaasUploadFile/index.d.ts +20 -0
- package/dist/src/bs/Goods/index.d.ts +15 -0
- package/dist/src/bs/component/GoodsModal.d.ts +12 -0
- package/dist/src/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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';
|
|
@@ -1160,7 +1160,145 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
|
1160
1160
|
})));
|
|
1161
1161
|
};
|
|
1162
1162
|
|
|
1163
|
-
var
|
|
1163
|
+
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";
|
|
1164
|
+
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"};
|
|
1165
|
+
styleInject(css_248z$2);
|
|
1166
|
+
|
|
1167
|
+
var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "actionUrl"];
|
|
1168
|
+
var Dragger = Upload.Dragger;
|
|
1169
|
+
var fn$2 = function fn() {
|
|
1170
|
+
return void 0;
|
|
1171
|
+
};
|
|
1172
|
+
var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
|
|
1173
|
+
var _ref$maxCount = _ref.maxCount,
|
|
1174
|
+
maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
|
|
1175
|
+
_ref$maxSize = _ref.maxSize,
|
|
1176
|
+
maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
|
|
1177
|
+
_ref$onChange = _ref.onChange,
|
|
1178
|
+
onChange = _ref$onChange === void 0 ? fn$2 : _ref$onChange,
|
|
1179
|
+
_ref$value = _ref.value,
|
|
1180
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
1181
|
+
_ref$accept = _ref.accept,
|
|
1182
|
+
accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
|
|
1183
|
+
_ref$disabled = _ref.disabled,
|
|
1184
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1185
|
+
uniqueKey = _ref.uniqueKey,
|
|
1186
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
1187
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
1188
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
1189
|
+
var valueRef = useRef(value);
|
|
1190
|
+
var _useState = useState(false),
|
|
1191
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1192
|
+
uploading = _useState2[0],
|
|
1193
|
+
setUploading = _useState2[1];
|
|
1194
|
+
var fileList = useMemo(function () {
|
|
1195
|
+
return value.map(function (t, i) {
|
|
1196
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
1197
|
+
// status: 'success',
|
|
1198
|
+
percent: 100,
|
|
1199
|
+
uid: i + ''
|
|
1200
|
+
// name: ,
|
|
1201
|
+
});
|
|
1202
|
+
});
|
|
1203
|
+
}, [value]);
|
|
1204
|
+
useEffect(function () {
|
|
1205
|
+
valueRef.current = value;
|
|
1206
|
+
}, [value]);
|
|
1207
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
1208
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
1209
|
+
var formData, fileName, _yield$request, success, data;
|
|
1210
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1211
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1212
|
+
case 0:
|
|
1213
|
+
console.log('asyncUpload', file);
|
|
1214
|
+
setUploading(true);
|
|
1215
|
+
formData = new FormData();
|
|
1216
|
+
formData.append('file', file);
|
|
1217
|
+
fileName = "".concat(uniqueKey, "_").concat(new Date().getTime(), "_").concat(file.name);
|
|
1218
|
+
formData.append('fileName', fileName);
|
|
1219
|
+
_context.prev = 6;
|
|
1220
|
+
_context.next = 9;
|
|
1221
|
+
return request(actionUrl, {
|
|
1222
|
+
method: 'post',
|
|
1223
|
+
body: formData
|
|
1224
|
+
});
|
|
1225
|
+
case 9:
|
|
1226
|
+
_yield$request = _context.sent;
|
|
1227
|
+
success = _yield$request.success;
|
|
1228
|
+
data = _yield$request.data;
|
|
1229
|
+
if (success) {
|
|
1230
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
1231
|
+
name: file.name,
|
|
1232
|
+
url: data
|
|
1233
|
+
}]));
|
|
1234
|
+
}
|
|
1235
|
+
_context.next = 18;
|
|
1236
|
+
break;
|
|
1237
|
+
case 15:
|
|
1238
|
+
_context.prev = 15;
|
|
1239
|
+
_context.t0 = _context["catch"](6);
|
|
1240
|
+
message.error('文件上传失败');
|
|
1241
|
+
case 18:
|
|
1242
|
+
_context.prev = 18;
|
|
1243
|
+
setUploading(false);
|
|
1244
|
+
return _context.finish(18);
|
|
1245
|
+
case 21:
|
|
1246
|
+
case "end":
|
|
1247
|
+
return _context.stop();
|
|
1248
|
+
}
|
|
1249
|
+
}, _callee, null, [[6, 15, 18, 21]]);
|
|
1250
|
+
}));
|
|
1251
|
+
return function asyncUpload(_x) {
|
|
1252
|
+
return _ref2.apply(this, arguments);
|
|
1253
|
+
};
|
|
1254
|
+
}();
|
|
1255
|
+
var handleChange = function handleChange(list) {
|
|
1256
|
+
valueRef.current = list;
|
|
1257
|
+
onChange(list);
|
|
1258
|
+
};
|
|
1259
|
+
// 手动上传模式, 一直返回false
|
|
1260
|
+
var beforeUpload = function beforeUpload(file) {
|
|
1261
|
+
console.log('beforeUpload', file);
|
|
1262
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
1263
|
+
if (value.length > maxCount) {
|
|
1264
|
+
message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
|
|
1265
|
+
return Upload.LIST_IGNORE;
|
|
1266
|
+
}
|
|
1267
|
+
if (!size) {
|
|
1268
|
+
message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
1269
|
+
return Upload.LIST_IGNORE;
|
|
1270
|
+
}
|
|
1271
|
+
asyncUpload(file);
|
|
1272
|
+
return Upload.LIST_IGNORE;
|
|
1273
|
+
};
|
|
1274
|
+
var onRemove = function onRemove(file) {
|
|
1275
|
+
var newValue = value.filter(function (item) {
|
|
1276
|
+
return item.url !== file.url;
|
|
1277
|
+
});
|
|
1278
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
1279
|
+
};
|
|
1280
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
1281
|
+
spinning: uploading
|
|
1282
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1283
|
+
className: styles$2.imageBox
|
|
1284
|
+
}, /*#__PURE__*/React.createElement(Dragger, _objectSpread2({
|
|
1285
|
+
disabled: disabled,
|
|
1286
|
+
multiple: true,
|
|
1287
|
+
accept: accept,
|
|
1288
|
+
name: "file",
|
|
1289
|
+
maxCount: maxCount,
|
|
1290
|
+
// className={styles.upload}
|
|
1291
|
+
beforeUpload: beforeUpload,
|
|
1292
|
+
fileList: fileList,
|
|
1293
|
+
onRemove: onRemove
|
|
1294
|
+
}, resetProps), /*#__PURE__*/React.createElement("p", {
|
|
1295
|
+
className: "ant-upload-drag-icon"
|
|
1296
|
+
}, /*#__PURE__*/React.createElement(InboxOutlined, null)), /*#__PURE__*/React.createElement("p", {
|
|
1297
|
+
className: "ant-upload-text"
|
|
1298
|
+
}, "\u70B9\u51FB\u201C\u9009\u62E9\u6587\u4EF6\u201D\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64\u533A\u57DF"))));
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
var _excluded$8 = ["showOther", "horizontal", "options", "value", "onChange", "disabled"];
|
|
1164
1302
|
function ApaasCheckbox(props) {
|
|
1165
1303
|
var showOther = props.showOther,
|
|
1166
1304
|
_props$horizontal = props.horizontal,
|
|
@@ -1171,7 +1309,7 @@ function ApaasCheckbox(props) {
|
|
|
1171
1309
|
value = _props$value === void 0 ? {} : _props$value,
|
|
1172
1310
|
onChange = props.onChange,
|
|
1173
1311
|
disabled = props.disabled,
|
|
1174
|
-
otherProps = _objectWithoutProperties(props, _excluded$
|
|
1312
|
+
otherProps = _objectWithoutProperties(props, _excluded$8);
|
|
1175
1313
|
var checkboxValue = value.value,
|
|
1176
1314
|
other = value.other;
|
|
1177
1315
|
var triggerChange = function triggerChange(changedValue) {
|
|
@@ -1257,11 +1395,11 @@ function ApaasSlider(props) {
|
|
|
1257
1395
|
})));
|
|
1258
1396
|
}
|
|
1259
1397
|
|
|
1260
|
-
var css_248z$
|
|
1261
|
-
var styles$
|
|
1262
|
-
styleInject(css_248z$
|
|
1398
|
+
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";
|
|
1399
|
+
var styles$3 = {"rateLabel":"index-module_rateLabel__3k-Xa","rateText":"index-module_rateText__A1GRy"};
|
|
1400
|
+
styleInject(css_248z$3);
|
|
1263
1401
|
|
|
1264
|
-
var _excluded$
|
|
1402
|
+
var _excluded$9 = ["value", "onChange", "options", "textStyle"];
|
|
1265
1403
|
//状态文字映射
|
|
1266
1404
|
var RATE_MAP = {
|
|
1267
1405
|
0: '',
|
|
@@ -1283,7 +1421,7 @@ function ApaasRate(props) {
|
|
|
1283
1421
|
_props$options = props.options,
|
|
1284
1422
|
options = _props$options === void 0 ? [] : _props$options,
|
|
1285
1423
|
textStyle = props.textStyle,
|
|
1286
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
1424
|
+
other = _objectWithoutProperties(props, _excluded$9);
|
|
1287
1425
|
var rateValues = useMemo(function () {
|
|
1288
1426
|
return (value || []).reduce(function (prv, next) {
|
|
1289
1427
|
prv[next.id || ''] = next.value;
|
|
@@ -1319,14 +1457,14 @@ function ApaasRate(props) {
|
|
|
1319
1457
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
1320
1458
|
span: 24
|
|
1321
1459
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1322
|
-
className: styles$
|
|
1460
|
+
className: styles$3.rateLabel
|
|
1323
1461
|
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React.createElement(Rate, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
1324
1462
|
value: rateValues[item.id] || 0,
|
|
1325
1463
|
onChange: function onChange(val) {
|
|
1326
1464
|
return changeHandle(val, item.id);
|
|
1327
1465
|
}
|
|
1328
1466
|
})), /*#__PURE__*/React.createElement("span", {
|
|
1329
|
-
className: styles$
|
|
1467
|
+
className: styles$3.rateText,
|
|
1330
1468
|
style: textStyle
|
|
1331
1469
|
}, RATE_MAP[rateValues[item.id]])));
|
|
1332
1470
|
}));
|
|
@@ -1367,7 +1505,131 @@ var Province = function Province(props) {
|
|
|
1367
1505
|
})));
|
|
1368
1506
|
};
|
|
1369
1507
|
|
|
1370
|
-
var
|
|
1508
|
+
var TextArea = Input.TextArea;
|
|
1509
|
+
var ParseLogistics = function ParseLogistics(props) {
|
|
1510
|
+
var onChange = props.onChange;
|
|
1511
|
+
var _useState = useState(''),
|
|
1512
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1513
|
+
value = _useState2[0],
|
|
1514
|
+
setValue = _useState2[1];
|
|
1515
|
+
var handleIdentify = function handleIdentify() {
|
|
1516
|
+
if (!value) {
|
|
1517
|
+
return;
|
|
1518
|
+
}
|
|
1519
|
+
request$1({
|
|
1520
|
+
url: '/qy/logistics/addressAnalysis',
|
|
1521
|
+
method: 'post',
|
|
1522
|
+
data: {
|
|
1523
|
+
fullAddress: value
|
|
1524
|
+
}
|
|
1525
|
+
}).then(function (res) {
|
|
1526
|
+
var data = res.data;
|
|
1527
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
1528
|
+
}).catch(function (e) {
|
|
1529
|
+
console.log(e);
|
|
1530
|
+
});
|
|
1531
|
+
};
|
|
1532
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextArea, {
|
|
1533
|
+
placeholder: "\u590D\u5236\u7269\u6D41\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
|
|
1534
|
+
rows: 3,
|
|
1535
|
+
value: value,
|
|
1536
|
+
onChange: function onChange(e) {
|
|
1537
|
+
return setValue(e.target.value);
|
|
1538
|
+
}
|
|
1539
|
+
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
1540
|
+
size: "small",
|
|
1541
|
+
type: "primary",
|
|
1542
|
+
onClick: handleIdentify
|
|
1543
|
+
}, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
|
|
1544
|
+
size: "small",
|
|
1545
|
+
onClick: function onClick() {
|
|
1546
|
+
return setValue('');
|
|
1547
|
+
}
|
|
1548
|
+
}, "\u6E05\u7A7A")));
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1551
|
+
var IdentifyAddress = function IdentifyAddress(props) {
|
|
1552
|
+
var value = props.value,
|
|
1553
|
+
onChange = props.onChange,
|
|
1554
|
+
_props$disabled = props.disabled,
|
|
1555
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
1556
|
+
var changeHandle = function changeHandle(val, type) {
|
|
1557
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
1558
|
+
};
|
|
1559
|
+
var handleParseLogistics = function handleParseLogistics(val) {
|
|
1560
|
+
var params = {
|
|
1561
|
+
detail: val === null || val === void 0 ? void 0 : val.addressDetail,
|
|
1562
|
+
receiverName: val === null || val === void 0 ? void 0 : val.name,
|
|
1563
|
+
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
1564
|
+
address: []
|
|
1565
|
+
};
|
|
1566
|
+
if (val === null || val === void 0 ? void 0 : val.province) {
|
|
1567
|
+
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)];
|
|
1568
|
+
}
|
|
1569
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
1570
|
+
};
|
|
1571
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && /*#__PURE__*/React.createElement(ParseLogistics, {
|
|
1572
|
+
onChange: handleParseLogistics
|
|
1573
|
+
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Province, {
|
|
1574
|
+
value: value.address,
|
|
1575
|
+
onChange: function onChange(val) {
|
|
1576
|
+
return changeHandle(val, 'address');
|
|
1577
|
+
},
|
|
1578
|
+
options: [],
|
|
1579
|
+
disabled: disabled
|
|
1580
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
1581
|
+
value: value.detail,
|
|
1582
|
+
disabled: disabled,
|
|
1583
|
+
placeholder: "\u8BE6\u7EC6\u5730\u5740",
|
|
1584
|
+
onChange: function onChange(e) {
|
|
1585
|
+
return changeHandle(e.target.value, 'detail');
|
|
1586
|
+
}
|
|
1587
|
+
})), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
1588
|
+
value: value.receiverName,
|
|
1589
|
+
disabled: disabled,
|
|
1590
|
+
placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
|
|
1591
|
+
onChange: function onChange(e) {
|
|
1592
|
+
return changeHandle(e.target.value, 'receiverName');
|
|
1593
|
+
}
|
|
1594
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
1595
|
+
value: value.receiverMobile,
|
|
1596
|
+
disabled: disabled,
|
|
1597
|
+
placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
|
|
1598
|
+
onChange: function onChange(e) {
|
|
1599
|
+
return changeHandle(e.target.value, 'receiverMobile');
|
|
1600
|
+
}
|
|
1601
|
+
})));
|
|
1602
|
+
};
|
|
1603
|
+
|
|
1604
|
+
function ApaasPosting(props) {
|
|
1605
|
+
var _props$value = props.value,
|
|
1606
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
1607
|
+
_props$disabled = props.disabled,
|
|
1608
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1609
|
+
onChange = props.onChange;
|
|
1610
|
+
var handleChange = function handleChange(val) {
|
|
1611
|
+
//智能识别返填
|
|
1612
|
+
var parseValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
1613
|
+
postingAddress: (val === null || val === void 0 ? void 0 : val.address) || [],
|
|
1614
|
+
postingDetail: (val === null || val === void 0 ? void 0 : val.detail) || '',
|
|
1615
|
+
postingReceiverName: (val === null || val === void 0 ? void 0 : val.receiverName) || '',
|
|
1616
|
+
postingReceiverMobile: (val === null || val === void 0 ? void 0 : val.receiverMobile) || ''
|
|
1617
|
+
});
|
|
1618
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parseValue);
|
|
1619
|
+
};
|
|
1620
|
+
return /*#__PURE__*/React.createElement(IdentifyAddress, {
|
|
1621
|
+
disabled: disabled,
|
|
1622
|
+
value: {
|
|
1623
|
+
address: (value === null || value === void 0 ? void 0 : value.postingAddress) || [],
|
|
1624
|
+
detail: (value === null || value === void 0 ? void 0 : value.postingDetail) || '',
|
|
1625
|
+
receiverName: (value === null || value === void 0 ? void 0 : value.postingReceiverName) || '',
|
|
1626
|
+
receiverMobile: (value === null || value === void 0 ? void 0 : value.postingReceiverMobile) || ''
|
|
1627
|
+
},
|
|
1628
|
+
onChange: handleChange
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
var _excluded$a = ["label", "name", "extra", "required", "rules", "initialValue"];
|
|
1371
1633
|
function withFormItem(WrappedComponent) {
|
|
1372
1634
|
return function (props) {
|
|
1373
1635
|
var label = props.label,
|
|
@@ -1376,7 +1638,7 @@ function withFormItem(WrappedComponent) {
|
|
|
1376
1638
|
required = props.required,
|
|
1377
1639
|
rules = props.rules,
|
|
1378
1640
|
initialValue = props.initialValue,
|
|
1379
|
-
otherProps = _objectWithoutProperties(props, _excluded$
|
|
1641
|
+
otherProps = _objectWithoutProperties(props, _excluded$a);
|
|
1380
1642
|
return /*#__PURE__*/React.createElement(Form.Item, _objectSpread2({}, {
|
|
1381
1643
|
label: label,
|
|
1382
1644
|
name: name,
|
|
@@ -1508,7 +1770,7 @@ var trade4 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVzn
|
|
|
1508
1770
|
|
|
1509
1771
|
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
1772
|
|
|
1511
|
-
var TextArea = Input.TextArea;
|
|
1773
|
+
var TextArea$1 = Input.TextArea;
|
|
1512
1774
|
var imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
|
|
1513
1775
|
var RemarkInput = function RemarkInput(props) {
|
|
1514
1776
|
var isShowFlag = props.isShowFlag,
|
|
@@ -1527,7 +1789,7 @@ var RemarkInput = function RemarkInput(props) {
|
|
|
1527
1789
|
});
|
|
1528
1790
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
1529
1791
|
};
|
|
1530
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextArea, {
|
|
1792
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextArea$1, {
|
|
1531
1793
|
disabled: disabled,
|
|
1532
1794
|
rows: 4,
|
|
1533
1795
|
value: value === null || value === void 0 ? void 0 : value.remark,
|
|
@@ -1551,8 +1813,8 @@ var RemarkInput = function RemarkInput(props) {
|
|
|
1551
1813
|
})));
|
|
1552
1814
|
};
|
|
1553
1815
|
|
|
1554
|
-
var css_248z$
|
|
1555
|
-
styleInject(css_248z$
|
|
1816
|
+
var css_248z$4 = ".mb8 {\n margin-bottom: 8px;\n}\n";
|
|
1817
|
+
styleInject(css_248z$4);
|
|
1556
1818
|
|
|
1557
1819
|
var Logistics = function Logistics(props) {
|
|
1558
1820
|
var options = props.options,
|
|
@@ -1596,7 +1858,7 @@ var Logistics = function Logistics(props) {
|
|
|
1596
1858
|
return /*#__PURE__*/React.createElement(Input, {
|
|
1597
1859
|
disabled: disabled,
|
|
1598
1860
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
1599
|
-
className: css_248z$
|
|
1861
|
+
className: css_248z$4.logisticsInput,
|
|
1600
1862
|
onChange: handleInputChange,
|
|
1601
1863
|
value: value === null || value === void 0 ? void 0 : value.order,
|
|
1602
1864
|
onBlur: function onBlur(e) {
|
|
@@ -1605,7 +1867,7 @@ var Logistics = function Logistics(props) {
|
|
|
1605
1867
|
});
|
|
1606
1868
|
};
|
|
1607
1869
|
return /*#__PURE__*/React.createElement("div", {
|
|
1608
|
-
className: css_248z$
|
|
1870
|
+
className: css_248z$4.logistics
|
|
1609
1871
|
}, isSingle ? showField === 'EXPRESS_COMPANY' ? LogisticsCompany() : null : LogisticsCompany(), isSingle ? showField === 'EXPRESS_WAYBILL_CODE' ? LogisticsCode() : null : LogisticsCode());
|
|
1610
1872
|
};
|
|
1611
1873
|
|
|
@@ -1660,8 +1922,8 @@ var AliPay = function AliPay(props) {
|
|
|
1660
1922
|
*/
|
|
1661
1923
|
var extendRequest = extend({});
|
|
1662
1924
|
|
|
1663
|
-
var css_248z$
|
|
1664
|
-
styleInject(css_248z$
|
|
1925
|
+
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";
|
|
1926
|
+
styleInject(css_248z$5);
|
|
1665
1927
|
|
|
1666
1928
|
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
1929
|
|
|
@@ -2640,8 +2902,8 @@ var Supplier = function Supplier(props) {
|
|
|
2640
2902
|
}));
|
|
2641
2903
|
};
|
|
2642
2904
|
|
|
2643
|
-
var css_248z$
|
|
2644
|
-
styleInject(css_248z$
|
|
2905
|
+
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";
|
|
2906
|
+
styleInject(css_248z$6);
|
|
2645
2907
|
|
|
2646
2908
|
var Invoice = function Invoice(props) {
|
|
2647
2909
|
var _props$value = props.value,
|
|
@@ -3052,122 +3314,26 @@ var Payment = function Payment(props) {
|
|
|
3052
3314
|
}));
|
|
3053
3315
|
};
|
|
3054
3316
|
|
|
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;
|
|
3317
|
+
var css_248z$7 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
3318
|
+
styleInject(css_248z$7);
|
|
3319
|
+
|
|
3320
|
+
var Item = Form.Item;
|
|
3321
|
+
var LogisticsAddress = LogisticsAddressData.getInstance();
|
|
3322
|
+
var address$1 = AddressData.getInstance();
|
|
3323
|
+
var LogisticsInterception = function LogisticsInterception(props) {
|
|
3324
|
+
var _props$value = props.value,
|
|
3325
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
3326
|
+
_props$logisticsOptio = props.logisticsOptions,
|
|
3327
|
+
logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
|
|
3328
|
+
_props$expressInterce = props.expressInterceptData,
|
|
3329
|
+
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
3330
|
+
_props$required = props.required,
|
|
3331
|
+
required = _props$required === void 0 ? false : _props$required,
|
|
3332
|
+
onChange = props.onChange,
|
|
3333
|
+
_props$disabled = props.disabled,
|
|
3334
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
3335
|
+
_props$isEditing = props.isEditing,
|
|
3336
|
+
isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
|
|
3171
3337
|
var _useState = useState(''),
|
|
3172
3338
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3173
3339
|
initCompany = _useState2[0],
|
|
@@ -3211,12 +3377,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3211
3377
|
return item.value === (value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
3212
3378
|
});
|
|
3213
3379
|
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);
|
|
3380
|
+
var _item$config, _item$config2;
|
|
3381
|
+
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
3382
|
});
|
|
3217
3383
|
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$
|
|
3384
|
+
var _item$config3;
|
|
3385
|
+
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
3386
|
});
|
|
3221
3387
|
var params = _objectSpread2({}, value);
|
|
3222
3388
|
if (!showAddress) {
|
|
@@ -3289,8 +3455,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3289
3455
|
return item.value === val;
|
|
3290
3456
|
});
|
|
3291
3457
|
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$
|
|
3458
|
+
var _item$config4;
|
|
3459
|
+
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
3294
3460
|
});
|
|
3295
3461
|
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3296
3462
|
interceptCompany: val,
|
|
@@ -3320,7 +3486,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3320
3486
|
//选择退回地址
|
|
3321
3487
|
var changeReturnAddress = function changeReturnAddress(uk) {
|
|
3322
3488
|
var item = LogisticsAddress.getItemByUk(uk);
|
|
3323
|
-
console.log(item);
|
|
3324
3489
|
if (item) {
|
|
3325
3490
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
3326
3491
|
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 +3496,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3331
3496
|
}
|
|
3332
3497
|
};
|
|
3333
3498
|
return /*#__PURE__*/React.createElement("div", {
|
|
3334
|
-
className: css_248z$
|
|
3499
|
+
className: css_248z$7.interceptBox
|
|
3335
3500
|
}, /*#__PURE__*/React.createElement(Item, {
|
|
3336
3501
|
label: '物流信息',
|
|
3337
3502
|
required: required,
|
|
@@ -3565,8 +3730,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
3565
3730
|
})) : null) : null);
|
|
3566
3731
|
};
|
|
3567
3732
|
|
|
3568
|
-
var css_248z$
|
|
3569
|
-
styleInject(css_248z$
|
|
3733
|
+
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";
|
|
3734
|
+
styleInject(css_248z$8);
|
|
3570
3735
|
|
|
3571
3736
|
var ItemList = function ItemList(props) {
|
|
3572
3737
|
var _props$value = props.value,
|
|
@@ -3639,13 +3804,433 @@ var ItemList = function ItemList(props) {
|
|
|
3639
3804
|
}, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
|
|
3640
3805
|
};
|
|
3641
3806
|
|
|
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
3807
|
var TabPane$1 = Tabs.TabPane;
|
|
3808
|
+
var columns = [{
|
|
3809
|
+
dataIndex: 'picUrl',
|
|
3810
|
+
title: '主图',
|
|
3811
|
+
render: function render(val) {
|
|
3812
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
3813
|
+
width: 60,
|
|
3814
|
+
src: val
|
|
3815
|
+
});
|
|
3816
|
+
}
|
|
3817
|
+
}, {
|
|
3818
|
+
dataIndex: 'outerId',
|
|
3819
|
+
title: '款式编码'
|
|
3820
|
+
}, {
|
|
3821
|
+
dataIndex: 'numIid',
|
|
3822
|
+
title: '商品编码'
|
|
3823
|
+
}, {
|
|
3824
|
+
dataIndex: 'title',
|
|
3825
|
+
title: '商品名称'
|
|
3826
|
+
}, {
|
|
3827
|
+
dataIndex: 'skus',
|
|
3828
|
+
title: '颜色及规格'
|
|
3829
|
+
}];
|
|
3830
|
+
var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
3831
|
+
useImperativeHandle(ref, function () {
|
|
3832
|
+
return {
|
|
3833
|
+
open: function open(_ref) {
|
|
3834
|
+
var list = _ref.list;
|
|
3835
|
+
setVisible(true);
|
|
3836
|
+
setSelect(list);
|
|
3837
|
+
var ids = list.map(function (item) {
|
|
3838
|
+
return item.numIid;
|
|
3839
|
+
});
|
|
3840
|
+
setSelectIds(ids);
|
|
3841
|
+
}
|
|
3842
|
+
};
|
|
3843
|
+
});
|
|
3844
|
+
var onSubmit = props.onSubmit,
|
|
3845
|
+
_onCancel = props.onCancel,
|
|
3846
|
+
shopId = props.shopId,
|
|
3847
|
+
shopList = props.shopList,
|
|
3848
|
+
width = props.width;
|
|
3849
|
+
var _useState = useState(false),
|
|
3850
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3851
|
+
visible = _useState2[0],
|
|
3852
|
+
setVisible = _useState2[1];
|
|
3853
|
+
var _useState3 = useState([]),
|
|
3854
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
3855
|
+
selectList = _useState4[0],
|
|
3856
|
+
setSelect = _useState4[1];
|
|
3857
|
+
var _useState5 = useState([]),
|
|
3858
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3859
|
+
selectIds = _useState6[0],
|
|
3860
|
+
setSelectIds = _useState6[1];
|
|
3861
|
+
var _useState7 = useState([]),
|
|
3862
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
3863
|
+
goodList = _useState8[0],
|
|
3864
|
+
setGoodList = _useState8[1];
|
|
3865
|
+
var _useState9 = useState(false),
|
|
3866
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
3867
|
+
loading = _useState10[0],
|
|
3868
|
+
setLoading = _useState10[1];
|
|
3869
|
+
var _useState11 = useState({
|
|
3870
|
+
apiName: 'queryItems',
|
|
3871
|
+
desc: true,
|
|
3872
|
+
numIids: '',
|
|
3873
|
+
orderBy: 'list_time',
|
|
3874
|
+
pageNo: 1,
|
|
3875
|
+
pageSize: 10,
|
|
3876
|
+
shopId: shopId,
|
|
3877
|
+
type: 'onSale',
|
|
3878
|
+
cids: '',
|
|
3879
|
+
title: ''
|
|
3880
|
+
}),
|
|
3881
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
3882
|
+
searchParams = _useState12[0],
|
|
3883
|
+
setSearch = _useState12[1];
|
|
3884
|
+
var _useState13 = useState(0),
|
|
3885
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
3886
|
+
total = _useState14[0],
|
|
3887
|
+
setTotal = _useState14[1];
|
|
3888
|
+
var _useState15 = useState(''),
|
|
3889
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
3890
|
+
platform = _useState16[0],
|
|
3891
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
3892
|
+
// const [shopInfo, setShopInfo] = useState<any>({}); //店铺信息
|
|
3893
|
+
var _useState17 = useState([{
|
|
3894
|
+
tab: '所选商品',
|
|
3895
|
+
key: 'onSale'
|
|
3896
|
+
}, {
|
|
3897
|
+
tab: '已选商品',
|
|
3898
|
+
key: 'select'
|
|
3899
|
+
}]),
|
|
3900
|
+
_useState18 = _slicedToArray(_useState17, 1),
|
|
3901
|
+
tabs = _useState18[0];
|
|
3902
|
+
//选择页码
|
|
3903
|
+
var pageChange = function pageChange(page, pageSize) {
|
|
3904
|
+
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
3905
|
+
pageNo: page,
|
|
3906
|
+
pageSize: pageSize
|
|
3907
|
+
}));
|
|
3908
|
+
};
|
|
3909
|
+
/**
|
|
3910
|
+
* 选择商品
|
|
3911
|
+
* @param good
|
|
3912
|
+
* @returns
|
|
3913
|
+
*/
|
|
3914
|
+
// const changeItem = (good: any) => {
|
|
3915
|
+
// if (searchParams.type === 'select') {
|
|
3916
|
+
// const newSelect = selectList.filter((item: any) => {
|
|
3917
|
+
// return item.numIid !== good.numIid;
|
|
3918
|
+
// });
|
|
3919
|
+
// setSelect([...newSelect]);
|
|
3920
|
+
// const ids = newSelect.map((item) => {
|
|
3921
|
+
// return item.numIid;
|
|
3922
|
+
// });
|
|
3923
|
+
// setSelectIds(ids);
|
|
3924
|
+
// } else {
|
|
3925
|
+
// if (selectList.length >= maxLength) {
|
|
3926
|
+
// message.error(`最多添加${maxLength}张`);
|
|
3927
|
+
// return;
|
|
3928
|
+
// }
|
|
3929
|
+
// const hasGood = selectList.some((t) => {
|
|
3930
|
+
// return t.numIid === good.numIid;
|
|
3931
|
+
// });
|
|
3932
|
+
// if (hasGood) {
|
|
3933
|
+
// const newSelectList = selectList.filter((item) => {
|
|
3934
|
+
// return item.numIid !== good.numIid;
|
|
3935
|
+
// });
|
|
3936
|
+
// setSelect(newSelectList);
|
|
3937
|
+
// const ids = newSelectList.map((item) => {
|
|
3938
|
+
// return item.numIid;
|
|
3939
|
+
// });
|
|
3940
|
+
// setSelectIds(ids);
|
|
3941
|
+
// } else {
|
|
3942
|
+
// setSelect([...selectList, good]);
|
|
3943
|
+
// setSelectIds([...selectIds, good.numIid]);
|
|
3944
|
+
// }
|
|
3945
|
+
// }
|
|
3946
|
+
// };
|
|
3947
|
+
/**
|
|
3948
|
+
*
|
|
3949
|
+
* @returns 获取查询参数
|
|
3950
|
+
*/
|
|
3951
|
+
var queryPd = function queryPd() {
|
|
3952
|
+
var params = {
|
|
3953
|
+
apiName: 'queryItems',
|
|
3954
|
+
desc: searchParams.desc,
|
|
3955
|
+
productIds: searchParams.numIids,
|
|
3956
|
+
orderBy: searchParams.orderBy,
|
|
3957
|
+
pageNo: searchParams.pageNo,
|
|
3958
|
+
pageSize: searchParams.pageSize,
|
|
3959
|
+
shopId: shopId,
|
|
3960
|
+
type: searchParams.type,
|
|
3961
|
+
title: searchParams.title,
|
|
3962
|
+
cids: searchParams.cids
|
|
3963
|
+
};
|
|
3964
|
+
return params;
|
|
3965
|
+
};
|
|
3966
|
+
/**
|
|
3967
|
+
* 查询商品
|
|
3968
|
+
*/
|
|
3969
|
+
var queryItems = /*#__PURE__*/function () {
|
|
3970
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(platform) {
|
|
3971
|
+
var res, _ref3, items, totalCount;
|
|
3972
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3973
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3974
|
+
case 0:
|
|
3975
|
+
_context.prev = 0;
|
|
3976
|
+
setLoading(true);
|
|
3977
|
+
_context.next = 4;
|
|
3978
|
+
return extendRequest('/qy/gdfw/workOrder/queryItems', {
|
|
3979
|
+
method: 'post',
|
|
3980
|
+
data: queryPd()
|
|
3981
|
+
});
|
|
3982
|
+
case 4:
|
|
3983
|
+
res = _context.sent;
|
|
3984
|
+
_ref3 = res.data || {
|
|
3985
|
+
items: [],
|
|
3986
|
+
totalCount: 0
|
|
3987
|
+
}, items = _ref3.items, totalCount = _ref3.totalCount;
|
|
3988
|
+
items.forEach(function (item) {
|
|
3989
|
+
item.platform = platform;
|
|
3990
|
+
item.key = item.numIid;
|
|
3991
|
+
});
|
|
3992
|
+
setGoodList(_toConsumableArray(items));
|
|
3993
|
+
setTotal(totalCount);
|
|
3994
|
+
case 9:
|
|
3995
|
+
_context.prev = 9;
|
|
3996
|
+
setLoading(false);
|
|
3997
|
+
return _context.finish(9);
|
|
3998
|
+
case 12:
|
|
3999
|
+
case "end":
|
|
4000
|
+
return _context.stop();
|
|
4001
|
+
}
|
|
4002
|
+
}, _callee, null, [[0,, 9, 12]]);
|
|
4003
|
+
}));
|
|
4004
|
+
return function queryItems(_x) {
|
|
4005
|
+
return _ref2.apply(this, arguments);
|
|
4006
|
+
};
|
|
4007
|
+
}();
|
|
4008
|
+
var getItem = function getItem(searchParams, platform) {
|
|
4009
|
+
if (searchParams.type === 'select') {
|
|
4010
|
+
setTotal(1);
|
|
4011
|
+
return;
|
|
4012
|
+
} else {
|
|
4013
|
+
queryItems(platform);
|
|
4014
|
+
}
|
|
4015
|
+
};
|
|
4016
|
+
useEffect(function () {
|
|
4017
|
+
var shopInfo = shopList.find(function (item) {
|
|
4018
|
+
return shopId === item.shopId || shopId === item.shopName;
|
|
4019
|
+
});
|
|
4020
|
+
// setShopInfo(shopInfo);
|
|
4021
|
+
var platform = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopSourceStr.toLowerCase();
|
|
4022
|
+
setPlatform(platform);
|
|
4023
|
+
}, []);
|
|
4024
|
+
useEffect(function () {
|
|
4025
|
+
platform && getItem(searchParams, platform);
|
|
4026
|
+
}, [searchParams, platform]);
|
|
4027
|
+
var rowSelection = {
|
|
4028
|
+
selectedRowKeys: selectIds,
|
|
4029
|
+
// type: 'radio',
|
|
4030
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
4031
|
+
console.log(selectedRowKeys, selectedRows, info);
|
|
4032
|
+
setSelectIds(selectedRowKeys);
|
|
4033
|
+
setSelect(_toConsumableArray(selectedRows));
|
|
4034
|
+
}
|
|
4035
|
+
// getCheckboxProps: (record: any) => {
|
|
4036
|
+
// return {
|
|
4037
|
+
// disabled: record.hasOwnProperty('children'),
|
|
4038
|
+
// };
|
|
4039
|
+
// },
|
|
4040
|
+
};
|
|
4041
|
+
|
|
4042
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
4043
|
+
title: '选择商品编码',
|
|
4044
|
+
okText: '确认',
|
|
4045
|
+
cancelText: '取消',
|
|
4046
|
+
visible: visible,
|
|
4047
|
+
width: width || 850,
|
|
4048
|
+
onCancel: function onCancel() {
|
|
4049
|
+
_onCancel();
|
|
4050
|
+
},
|
|
4051
|
+
onOk: function onOk() {
|
|
4052
|
+
onSubmit(selectList);
|
|
4053
|
+
},
|
|
4054
|
+
wrapClassName: "goodModal"
|
|
4055
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
4056
|
+
type: "card",
|
|
4057
|
+
activeKey: searchParams.type,
|
|
4058
|
+
onChange: function onChange(e) {
|
|
4059
|
+
var params = _objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
4060
|
+
type: e,
|
|
4061
|
+
pageNo: 1
|
|
4062
|
+
});
|
|
4063
|
+
setSearch(params);
|
|
4064
|
+
}
|
|
4065
|
+
}, tabs.map(function (tab) {
|
|
4066
|
+
return /*#__PURE__*/React.createElement(TabPane$1, {
|
|
4067
|
+
tab: tab.tab + (tab.key === 'select' ? "(".concat(selectList.length, ")") : ''),
|
|
4068
|
+
key: tab.key
|
|
4069
|
+
});
|
|
4070
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
4071
|
+
className: "searchBox",
|
|
4072
|
+
style: {
|
|
4073
|
+
display: searchParams.type === 'select' ? 'none' : ''
|
|
4074
|
+
}
|
|
4075
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
4076
|
+
layout: "inline"
|
|
4077
|
+
}, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
4078
|
+
placeholder: "\u6B3E\u5F0F\u7F16\u7801"
|
|
4079
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
4080
|
+
placeholder: "\u5546\u54C1\u7F16\u7801"
|
|
4081
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
4082
|
+
placeholder: "\u5546\u54C1\u540D\u79F0"
|
|
4083
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
4084
|
+
type: "primary",
|
|
4085
|
+
htmlType: "submit"
|
|
4086
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, null, "\u91CD\u7F6E")))), /*#__PURE__*/React.createElement(Spin, {
|
|
4087
|
+
spinning: loading
|
|
4088
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
4089
|
+
rowSelection: rowSelection,
|
|
4090
|
+
columns: columns,
|
|
4091
|
+
dataSource: searchParams.type == 'select' ? selectList : goodList,
|
|
4092
|
+
scroll: {
|
|
4093
|
+
y: 300
|
|
4094
|
+
},
|
|
4095
|
+
pagination: {
|
|
4096
|
+
size: 'small',
|
|
4097
|
+
total: total,
|
|
4098
|
+
current: searchParams.pageNo,
|
|
4099
|
+
pageSize: searchParams.pageSize,
|
|
4100
|
+
onChange: pageChange
|
|
4101
|
+
}
|
|
4102
|
+
})));
|
|
4103
|
+
};
|
|
4104
|
+
var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
4105
|
+
|
|
4106
|
+
// interface GoodsItem {
|
|
4107
|
+
// title: string;
|
|
4108
|
+
// picUrl: string;
|
|
4109
|
+
// platform: string;
|
|
4110
|
+
// skuId: string;
|
|
4111
|
+
// styleId: string;
|
|
4112
|
+
// }
|
|
4113
|
+
var BsGoods = function BsGoods(props) {
|
|
4114
|
+
var _props$value = props.value,
|
|
4115
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
4116
|
+
onChange = props.onChange,
|
|
4117
|
+
disabled = props.disabled,
|
|
4118
|
+
_props$type = props.type,
|
|
4119
|
+
type = _props$type === void 0 ? 1 : _props$type,
|
|
4120
|
+
_props$showField = props.showField,
|
|
4121
|
+
showField = _props$showField === void 0 ? [] : _props$showField,
|
|
4122
|
+
width = props.width,
|
|
4123
|
+
_props$shopList = props.shopList,
|
|
4124
|
+
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
4125
|
+
_props$shopId = props.shopId,
|
|
4126
|
+
shopId = _props$shopId === void 0 ? '' : _props$shopId,
|
|
4127
|
+
_props$maxLength = props.maxLength,
|
|
4128
|
+
maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength;
|
|
4129
|
+
var _useState = useState(false),
|
|
4130
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
4131
|
+
visible = _useState2[0],
|
|
4132
|
+
setVisible = _useState2[1];
|
|
4133
|
+
var handleDelete = function handleDelete(record) {
|
|
4134
|
+
var newList = value.filter(function (item) {
|
|
4135
|
+
return item.numIid !== record.numIid;
|
|
4136
|
+
});
|
|
4137
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
4138
|
+
};
|
|
4139
|
+
//商品信息
|
|
4140
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS(text) {
|
|
4141
|
+
return [{
|
|
4142
|
+
dataIndex: 'picUrl',
|
|
4143
|
+
title: "bs".concat(text, "\u56FE\u7247"),
|
|
4144
|
+
render: function render(val) {
|
|
4145
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
4146
|
+
width: 60,
|
|
4147
|
+
src: val
|
|
4148
|
+
});
|
|
4149
|
+
}
|
|
4150
|
+
}, {
|
|
4151
|
+
dataIndex: 'title',
|
|
4152
|
+
title: "bs".concat(text, "\u540D\u79F0")
|
|
4153
|
+
}, {
|
|
4154
|
+
dataIndex: 'skuName',
|
|
4155
|
+
title: "bs".concat(text, "\u7F16\u7801")
|
|
4156
|
+
}, {
|
|
4157
|
+
dataIndex: 'skuId',
|
|
4158
|
+
title: "bs".concat(text, "sku\u7F16\u7801")
|
|
4159
|
+
}, {
|
|
4160
|
+
dataIndex: 'money',
|
|
4161
|
+
title: "bs".concat(text, "\u5B9E\u4ED8\u91D1\u989D")
|
|
4162
|
+
}, {
|
|
4163
|
+
dataIndex: 'number',
|
|
4164
|
+
title: "bs".concat(text, "\u6570\u91CF")
|
|
4165
|
+
}, {
|
|
4166
|
+
dataIndex: '',
|
|
4167
|
+
title: "\u64CD\u4F5C",
|
|
4168
|
+
render: function render(val, record) {
|
|
4169
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
4170
|
+
type: "link",
|
|
4171
|
+
onClick: function onClick() {
|
|
4172
|
+
return handleDelete(record);
|
|
4173
|
+
}
|
|
4174
|
+
}, "\u5220\u9664");
|
|
4175
|
+
}
|
|
4176
|
+
}];
|
|
4177
|
+
};
|
|
4178
|
+
var newColumns = useMemo(function () {
|
|
4179
|
+
return GOODS_INFO_COLUMNS('商品').filter(function (t) {
|
|
4180
|
+
return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
4181
|
+
});
|
|
4182
|
+
}, [showField]);
|
|
4183
|
+
console.log(newColumns);
|
|
4184
|
+
var onSubmit = function onSubmit(list) {
|
|
4185
|
+
console.log(list);
|
|
4186
|
+
var newList = list.map(function (item) {
|
|
4187
|
+
var picUrl = item.picUrl,
|
|
4188
|
+
numIid = item.numIid,
|
|
4189
|
+
outerId = item.outerId,
|
|
4190
|
+
title = item.title,
|
|
4191
|
+
price = item.price,
|
|
4192
|
+
platform = item.platform;
|
|
4193
|
+
return {
|
|
4194
|
+
picUrl: picUrl,
|
|
4195
|
+
numIid: numIid,
|
|
4196
|
+
outerId: outerId,
|
|
4197
|
+
title: title,
|
|
4198
|
+
price: price,
|
|
4199
|
+
platform: platform
|
|
4200
|
+
};
|
|
4201
|
+
});
|
|
4202
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
4203
|
+
setVisible(false);
|
|
4204
|
+
};
|
|
4205
|
+
var handleChangeGoods = function handleChangeGoods() {
|
|
4206
|
+
setVisible(true);
|
|
4207
|
+
};
|
|
4208
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && /*#__PURE__*/React.createElement(Button, {
|
|
4209
|
+
type: "link",
|
|
4210
|
+
onClick: handleChangeGoods
|
|
4211
|
+
}, "\u9009\u62E9\u5546\u54C1"), /*#__PURE__*/React.createElement(Table, {
|
|
4212
|
+
columns: GOODS_INFO_COLUMNS('商品'),
|
|
4213
|
+
dataSource: value
|
|
4214
|
+
}), /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
4215
|
+
onSubmit: onSubmit,
|
|
4216
|
+
width: width,
|
|
4217
|
+
type: type,
|
|
4218
|
+
shopList: shopList,
|
|
4219
|
+
shopId: shopId,
|
|
4220
|
+
maxLength: maxLength,
|
|
4221
|
+
onCancel: function onCancel() {
|
|
4222
|
+
setVisible(false);
|
|
4223
|
+
}
|
|
4224
|
+
}));
|
|
4225
|
+
};
|
|
4226
|
+
|
|
4227
|
+
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";
|
|
4228
|
+
styleInject(css_248z$9);
|
|
4229
|
+
|
|
4230
|
+
var TabPane$2 = Tabs.TabPane;
|
|
3646
4231
|
var Option$2 = Select.Option;
|
|
3647
4232
|
var Search$1 = Input.Search;
|
|
3648
|
-
var GoodsModal$
|
|
4233
|
+
var GoodsModal$3 = function GoodsModal(props) {
|
|
3649
4234
|
var onSubmit = props.onSubmit,
|
|
3650
4235
|
_onCancel = props.onCancel,
|
|
3651
4236
|
visible = props.visible,
|
|
@@ -3958,7 +4543,7 @@ var GoodsModal$1 = function GoodsModal(props) {
|
|
|
3958
4543
|
}));
|
|
3959
4544
|
}
|
|
3960
4545
|
}, tabs.map(function (tab) {
|
|
3961
|
-
return /*#__PURE__*/React.createElement(TabPane$
|
|
4546
|
+
return /*#__PURE__*/React.createElement(TabPane$2, {
|
|
3962
4547
|
tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
|
|
3963
4548
|
key: tab.key
|
|
3964
4549
|
});
|
|
@@ -4096,7 +4681,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
4096
4681
|
};
|
|
4097
4682
|
return /*#__PURE__*/React.createElement("div", {
|
|
4098
4683
|
className: "goodsBox"
|
|
4099
|
-
}, /*#__PURE__*/React.createElement(GoodsModal$
|
|
4684
|
+
}, /*#__PURE__*/React.createElement(GoodsModal$3, {
|
|
4100
4685
|
visible: visible,
|
|
4101
4686
|
onSubmit: onSubmit,
|
|
4102
4687
|
type: type,
|
|
@@ -4115,4 +4700,4 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
4115
4700
|
};
|
|
4116
4701
|
var index = /*#__PURE__*/forwardRef(Goods$1);
|
|
4117
4702
|
|
|
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 };
|
|
4703
|
+
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, BsGoods, 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 };
|