@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.js
CHANGED
|
@@ -8,12 +8,14 @@ var icons = require('@ant-design/icons');
|
|
|
8
8
|
var request = require('umi-request');
|
|
9
9
|
var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
|
|
10
10
|
var zhCN = require('antd/lib/locale/zh_CN');
|
|
11
|
+
var pubsub = require('pubsub-js');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
14
|
|
|
14
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
16
|
var request__default = /*#__PURE__*/_interopDefaultLegacy(request);
|
|
16
17
|
var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
|
|
18
|
+
var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
|
|
17
19
|
|
|
18
20
|
function _iterableToArrayLimit(arr, i) {
|
|
19
21
|
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -1170,7 +1172,145 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
|
1170
1172
|
})));
|
|
1171
1173
|
};
|
|
1172
1174
|
|
|
1173
|
-
var
|
|
1175
|
+
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";
|
|
1176
|
+
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"};
|
|
1177
|
+
styleInject(css_248z$2);
|
|
1178
|
+
|
|
1179
|
+
var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "actionUrl"];
|
|
1180
|
+
var Dragger = antd.Upload.Dragger;
|
|
1181
|
+
var fn$2 = function fn() {
|
|
1182
|
+
return void 0;
|
|
1183
|
+
};
|
|
1184
|
+
var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
|
|
1185
|
+
var _ref$maxCount = _ref.maxCount,
|
|
1186
|
+
maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
|
|
1187
|
+
_ref$maxSize = _ref.maxSize,
|
|
1188
|
+
maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
|
|
1189
|
+
_ref$onChange = _ref.onChange,
|
|
1190
|
+
onChange = _ref$onChange === void 0 ? fn$2 : _ref$onChange,
|
|
1191
|
+
_ref$value = _ref.value,
|
|
1192
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
1193
|
+
_ref$accept = _ref.accept,
|
|
1194
|
+
accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
|
|
1195
|
+
_ref$disabled = _ref.disabled,
|
|
1196
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1197
|
+
uniqueKey = _ref.uniqueKey,
|
|
1198
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
1199
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
1200
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
1201
|
+
var valueRef = React.useRef(value);
|
|
1202
|
+
var _useState = React.useState(false),
|
|
1203
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1204
|
+
uploading = _useState2[0],
|
|
1205
|
+
setUploading = _useState2[1];
|
|
1206
|
+
var fileList = React.useMemo(function () {
|
|
1207
|
+
return value.map(function (t, i) {
|
|
1208
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
1209
|
+
// status: 'success',
|
|
1210
|
+
percent: 100,
|
|
1211
|
+
uid: i + ''
|
|
1212
|
+
// name: ,
|
|
1213
|
+
});
|
|
1214
|
+
});
|
|
1215
|
+
}, [value]);
|
|
1216
|
+
React.useEffect(function () {
|
|
1217
|
+
valueRef.current = value;
|
|
1218
|
+
}, [value]);
|
|
1219
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
1220
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
1221
|
+
var formData, fileName, _yield$request, success, data;
|
|
1222
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1223
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1224
|
+
case 0:
|
|
1225
|
+
console.log('asyncUpload', file);
|
|
1226
|
+
setUploading(true);
|
|
1227
|
+
formData = new FormData();
|
|
1228
|
+
formData.append('file', file);
|
|
1229
|
+
fileName = "".concat(uniqueKey, "_").concat(new Date().getTime(), "_").concat(file.name);
|
|
1230
|
+
formData.append('fileName', fileName);
|
|
1231
|
+
_context.prev = 6;
|
|
1232
|
+
_context.next = 9;
|
|
1233
|
+
return request__default['default'](actionUrl, {
|
|
1234
|
+
method: 'post',
|
|
1235
|
+
body: formData
|
|
1236
|
+
});
|
|
1237
|
+
case 9:
|
|
1238
|
+
_yield$request = _context.sent;
|
|
1239
|
+
success = _yield$request.success;
|
|
1240
|
+
data = _yield$request.data;
|
|
1241
|
+
if (success) {
|
|
1242
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
1243
|
+
name: file.name,
|
|
1244
|
+
url: data
|
|
1245
|
+
}]));
|
|
1246
|
+
}
|
|
1247
|
+
_context.next = 18;
|
|
1248
|
+
break;
|
|
1249
|
+
case 15:
|
|
1250
|
+
_context.prev = 15;
|
|
1251
|
+
_context.t0 = _context["catch"](6);
|
|
1252
|
+
antd.message.error('文件上传失败');
|
|
1253
|
+
case 18:
|
|
1254
|
+
_context.prev = 18;
|
|
1255
|
+
setUploading(false);
|
|
1256
|
+
return _context.finish(18);
|
|
1257
|
+
case 21:
|
|
1258
|
+
case "end":
|
|
1259
|
+
return _context.stop();
|
|
1260
|
+
}
|
|
1261
|
+
}, _callee, null, [[6, 15, 18, 21]]);
|
|
1262
|
+
}));
|
|
1263
|
+
return function asyncUpload(_x) {
|
|
1264
|
+
return _ref2.apply(this, arguments);
|
|
1265
|
+
};
|
|
1266
|
+
}();
|
|
1267
|
+
var handleChange = function handleChange(list) {
|
|
1268
|
+
valueRef.current = list;
|
|
1269
|
+
onChange(list);
|
|
1270
|
+
};
|
|
1271
|
+
// 手动上传模式, 一直返回false
|
|
1272
|
+
var beforeUpload = function beforeUpload(file) {
|
|
1273
|
+
console.log('beforeUpload', file);
|
|
1274
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
1275
|
+
if (value.length > maxCount) {
|
|
1276
|
+
antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
|
|
1277
|
+
return antd.Upload.LIST_IGNORE;
|
|
1278
|
+
}
|
|
1279
|
+
if (!size) {
|
|
1280
|
+
antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
1281
|
+
return antd.Upload.LIST_IGNORE;
|
|
1282
|
+
}
|
|
1283
|
+
asyncUpload(file);
|
|
1284
|
+
return antd.Upload.LIST_IGNORE;
|
|
1285
|
+
};
|
|
1286
|
+
var onRemove = function onRemove(file) {
|
|
1287
|
+
var newValue = value.filter(function (item) {
|
|
1288
|
+
return item.url !== file.url;
|
|
1289
|
+
});
|
|
1290
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
1291
|
+
};
|
|
1292
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
|
|
1293
|
+
spinning: uploading
|
|
1294
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1295
|
+
className: styles$2.imageBox
|
|
1296
|
+
}, /*#__PURE__*/React__default['default'].createElement(Dragger, _objectSpread2({
|
|
1297
|
+
disabled: disabled,
|
|
1298
|
+
multiple: true,
|
|
1299
|
+
accept: accept,
|
|
1300
|
+
name: "file",
|
|
1301
|
+
maxCount: maxCount,
|
|
1302
|
+
// className={styles.upload}
|
|
1303
|
+
beforeUpload: beforeUpload,
|
|
1304
|
+
fileList: fileList,
|
|
1305
|
+
onRemove: onRemove
|
|
1306
|
+
}, resetProps), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
1307
|
+
className: "ant-upload-drag-icon"
|
|
1308
|
+
}, /*#__PURE__*/React__default['default'].createElement(icons.InboxOutlined, null)), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
1309
|
+
className: "ant-upload-text"
|
|
1310
|
+
}, "\u70B9\u51FB\u201C\u9009\u62E9\u6587\u4EF6\u201D\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64\u533A\u57DF"))));
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
var _excluded$8 = ["showOther", "horizontal", "options", "value", "onChange", "disabled"];
|
|
1174
1314
|
function ApaasCheckbox(props) {
|
|
1175
1315
|
var showOther = props.showOther,
|
|
1176
1316
|
_props$horizontal = props.horizontal,
|
|
@@ -1181,7 +1321,7 @@ function ApaasCheckbox(props) {
|
|
|
1181
1321
|
value = _props$value === void 0 ? {} : _props$value,
|
|
1182
1322
|
onChange = props.onChange,
|
|
1183
1323
|
disabled = props.disabled,
|
|
1184
|
-
otherProps = _objectWithoutProperties(props, _excluded$
|
|
1324
|
+
otherProps = _objectWithoutProperties(props, _excluded$8);
|
|
1185
1325
|
var checkboxValue = value.value,
|
|
1186
1326
|
other = value.other;
|
|
1187
1327
|
var triggerChange = function triggerChange(changedValue) {
|
|
@@ -1267,11 +1407,11 @@ function ApaasSlider(props) {
|
|
|
1267
1407
|
})));
|
|
1268
1408
|
}
|
|
1269
1409
|
|
|
1270
|
-
var css_248z$
|
|
1271
|
-
var styles$
|
|
1272
|
-
styleInject(css_248z$
|
|
1410
|
+
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";
|
|
1411
|
+
var styles$3 = {"rateLabel":"index-module_rateLabel__3k-Xa","rateText":"index-module_rateText__A1GRy"};
|
|
1412
|
+
styleInject(css_248z$3);
|
|
1273
1413
|
|
|
1274
|
-
var _excluded$
|
|
1414
|
+
var _excluded$9 = ["value", "onChange", "options", "textStyle"];
|
|
1275
1415
|
//状态文字映射
|
|
1276
1416
|
var RATE_MAP = {
|
|
1277
1417
|
0: '',
|
|
@@ -1293,7 +1433,7 @@ function ApaasRate(props) {
|
|
|
1293
1433
|
_props$options = props.options,
|
|
1294
1434
|
options = _props$options === void 0 ? [] : _props$options,
|
|
1295
1435
|
textStyle = props.textStyle,
|
|
1296
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
1436
|
+
other = _objectWithoutProperties(props, _excluded$9);
|
|
1297
1437
|
var rateValues = React.useMemo(function () {
|
|
1298
1438
|
return (value || []).reduce(function (prv, next) {
|
|
1299
1439
|
prv[next.id || ''] = next.value;
|
|
@@ -1329,14 +1469,14 @@ function ApaasRate(props) {
|
|
|
1329
1469
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
1330
1470
|
span: 24
|
|
1331
1471
|
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
1332
|
-
className: styles$
|
|
1472
|
+
className: styles$3.rateLabel
|
|
1333
1473
|
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default['default'].createElement(antd.Rate, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
1334
1474
|
value: rateValues[item.id] || 0,
|
|
1335
1475
|
onChange: function onChange(val) {
|
|
1336
1476
|
return changeHandle(val, item.id);
|
|
1337
1477
|
}
|
|
1338
1478
|
})), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
1339
|
-
className: styles$
|
|
1479
|
+
className: styles$3.rateText,
|
|
1340
1480
|
style: textStyle
|
|
1341
1481
|
}, RATE_MAP[rateValues[item.id]])));
|
|
1342
1482
|
}));
|
|
@@ -1377,7 +1517,139 @@ var Province = function Province(props) {
|
|
|
1377
1517
|
})));
|
|
1378
1518
|
};
|
|
1379
1519
|
|
|
1380
|
-
var
|
|
1520
|
+
var TextArea = antd.Input.TextArea;
|
|
1521
|
+
var ParseLogistics = function ParseLogistics(props) {
|
|
1522
|
+
var onChange = props.onChange;
|
|
1523
|
+
var _useState = React.useState(''),
|
|
1524
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1525
|
+
value = _useState2[0],
|
|
1526
|
+
setValue = _useState2[1];
|
|
1527
|
+
var handleIdentify = function handleIdentify() {
|
|
1528
|
+
if (!value) {
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
kmkfUtils.request({
|
|
1532
|
+
url: '/qy/logistics/addressAnalysis',
|
|
1533
|
+
method: 'post',
|
|
1534
|
+
data: {
|
|
1535
|
+
fullAddress: value
|
|
1536
|
+
}
|
|
1537
|
+
}).then(function (res) {
|
|
1538
|
+
var data = res.data;
|
|
1539
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
1540
|
+
}).catch(function (e) {
|
|
1541
|
+
console.log(e);
|
|
1542
|
+
});
|
|
1543
|
+
};
|
|
1544
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(TextArea, {
|
|
1545
|
+
placeholder: "\u590D\u5236\u7269\u6D41\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
|
|
1546
|
+
rows: 3,
|
|
1547
|
+
value: value,
|
|
1548
|
+
onChange: function onChange(e) {
|
|
1549
|
+
return setValue(e.target.value);
|
|
1550
|
+
}
|
|
1551
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
1552
|
+
size: "small",
|
|
1553
|
+
type: "primary",
|
|
1554
|
+
onClick: handleIdentify
|
|
1555
|
+
}, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
1556
|
+
size: "small",
|
|
1557
|
+
onClick: function onClick() {
|
|
1558
|
+
return setValue('');
|
|
1559
|
+
}
|
|
1560
|
+
}, "\u6E05\u7A7A")));
|
|
1561
|
+
};
|
|
1562
|
+
|
|
1563
|
+
var IdentifyAddress = function IdentifyAddress(props) {
|
|
1564
|
+
var value = props.value,
|
|
1565
|
+
onChange = props.onChange,
|
|
1566
|
+
_props$disabled = props.disabled,
|
|
1567
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1568
|
+
_props$showIdentify = props.showIdentify,
|
|
1569
|
+
showIdentify = _props$showIdentify === void 0 ? true : _props$showIdentify,
|
|
1570
|
+
type = props.type;
|
|
1571
|
+
var changeHandle = function changeHandle(val, type) {
|
|
1572
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
1573
|
+
};
|
|
1574
|
+
var handleParseLogistics = function handleParseLogistics(val) {
|
|
1575
|
+
var params = {
|
|
1576
|
+
detail: val === null || val === void 0 ? void 0 : val.addressDetail,
|
|
1577
|
+
receiverName: val === null || val === void 0 ? void 0 : val.name,
|
|
1578
|
+
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
1579
|
+
address: []
|
|
1580
|
+
};
|
|
1581
|
+
if (val === null || val === void 0 ? void 0 : val.province) {
|
|
1582
|
+
params.address = [kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
|
|
1583
|
+
}
|
|
1584
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
1585
|
+
};
|
|
1586
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showIdentify && /*#__PURE__*/React__default['default'].createElement(ParseLogistics, {
|
|
1587
|
+
onChange: handleParseLogistics
|
|
1588
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(Province, {
|
|
1589
|
+
value: value.address,
|
|
1590
|
+
onChange: function onChange(val) {
|
|
1591
|
+
return changeHandle(val, 'address');
|
|
1592
|
+
},
|
|
1593
|
+
options: [],
|
|
1594
|
+
disabled: disabled,
|
|
1595
|
+
type: type
|
|
1596
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
1597
|
+
value: value.detail,
|
|
1598
|
+
disabled: disabled,
|
|
1599
|
+
placeholder: "\u8BE6\u7EC6\u5730\u5740",
|
|
1600
|
+
onChange: function onChange(e) {
|
|
1601
|
+
return changeHandle(e.target.value, 'detail');
|
|
1602
|
+
}
|
|
1603
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
1604
|
+
value: value.receiverName,
|
|
1605
|
+
disabled: disabled,
|
|
1606
|
+
placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
|
|
1607
|
+
onChange: function onChange(e) {
|
|
1608
|
+
return changeHandle(e.target.value, 'receiverName');
|
|
1609
|
+
}
|
|
1610
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
1611
|
+
value: value.receiverMobile,
|
|
1612
|
+
disabled: disabled,
|
|
1613
|
+
placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
|
|
1614
|
+
onChange: function onChange(e) {
|
|
1615
|
+
return changeHandle(e.target.value, 'receiverMobile');
|
|
1616
|
+
}
|
|
1617
|
+
})));
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
function ApaasPosting(props) {
|
|
1621
|
+
var _props$value = props.value,
|
|
1622
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
1623
|
+
_props$disabled = props.disabled,
|
|
1624
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1625
|
+
_props$type = props.type,
|
|
1626
|
+
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
1627
|
+
onChange = props.onChange;
|
|
1628
|
+
var handleChange = function handleChange(val) {
|
|
1629
|
+
//智能识别返填
|
|
1630
|
+
var parseValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
1631
|
+
postingAddress: (val === null || val === void 0 ? void 0 : val.address) || [],
|
|
1632
|
+
postingDetail: (val === null || val === void 0 ? void 0 : val.detail) || '',
|
|
1633
|
+
postingReceiverName: (val === null || val === void 0 ? void 0 : val.receiverName) || '',
|
|
1634
|
+
postingReceiverMobile: (val === null || val === void 0 ? void 0 : val.receiverMobile) || ''
|
|
1635
|
+
});
|
|
1636
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parseValue);
|
|
1637
|
+
};
|
|
1638
|
+
return /*#__PURE__*/React__default['default'].createElement(IdentifyAddress, {
|
|
1639
|
+
disabled: disabled,
|
|
1640
|
+
value: {
|
|
1641
|
+
address: (value === null || value === void 0 ? void 0 : value.postingAddress) || [],
|
|
1642
|
+
detail: (value === null || value === void 0 ? void 0 : value.postingDetail) || '',
|
|
1643
|
+
receiverName: (value === null || value === void 0 ? void 0 : value.postingReceiverName) || '',
|
|
1644
|
+
receiverMobile: (value === null || value === void 0 ? void 0 : value.postingReceiverMobile) || ''
|
|
1645
|
+
},
|
|
1646
|
+
onChange: handleChange,
|
|
1647
|
+
type: type,
|
|
1648
|
+
showIdentify: type !== 'bs'
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
var _excluded$a = ["label", "name", "extra", "required", "rules", "initialValue"];
|
|
1381
1653
|
function withFormItem(WrappedComponent) {
|
|
1382
1654
|
return function (props) {
|
|
1383
1655
|
var label = props.label,
|
|
@@ -1386,7 +1658,7 @@ function withFormItem(WrappedComponent) {
|
|
|
1386
1658
|
required = props.required,
|
|
1387
1659
|
rules = props.rules,
|
|
1388
1660
|
initialValue = props.initialValue,
|
|
1389
|
-
otherProps = _objectWithoutProperties(props, _excluded$
|
|
1661
|
+
otherProps = _objectWithoutProperties(props, _excluded$a);
|
|
1390
1662
|
return /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, _objectSpread2({}, {
|
|
1391
1663
|
label: label,
|
|
1392
1664
|
name: name,
|
|
@@ -1518,7 +1790,7 @@ var trade4 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVzn
|
|
|
1518
1790
|
|
|
1519
1791
|
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=";
|
|
1520
1792
|
|
|
1521
|
-
var TextArea = antd.Input.TextArea;
|
|
1793
|
+
var TextArea$1 = antd.Input.TextArea;
|
|
1522
1794
|
var imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
|
|
1523
1795
|
var RemarkInput = function RemarkInput(props) {
|
|
1524
1796
|
var isShowFlag = props.isShowFlag,
|
|
@@ -1537,7 +1809,7 @@ var RemarkInput = function RemarkInput(props) {
|
|
|
1537
1809
|
});
|
|
1538
1810
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
1539
1811
|
};
|
|
1540
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(TextArea, {
|
|
1812
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(TextArea$1, {
|
|
1541
1813
|
disabled: disabled,
|
|
1542
1814
|
rows: 4,
|
|
1543
1815
|
value: value === null || value === void 0 ? void 0 : value.remark,
|
|
@@ -1561,8 +1833,8 @@ var RemarkInput = function RemarkInput(props) {
|
|
|
1561
1833
|
})));
|
|
1562
1834
|
};
|
|
1563
1835
|
|
|
1564
|
-
var css_248z$
|
|
1565
|
-
styleInject(css_248z$
|
|
1836
|
+
var css_248z$4 = ".mb8 {\n margin-bottom: 8px;\n}\n";
|
|
1837
|
+
styleInject(css_248z$4);
|
|
1566
1838
|
|
|
1567
1839
|
var Logistics = function Logistics(props) {
|
|
1568
1840
|
var options = props.options,
|
|
@@ -1606,7 +1878,7 @@ var Logistics = function Logistics(props) {
|
|
|
1606
1878
|
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
1607
1879
|
disabled: disabled,
|
|
1608
1880
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
1609
|
-
className: css_248z$
|
|
1881
|
+
className: css_248z$4.logisticsInput,
|
|
1610
1882
|
onChange: handleInputChange,
|
|
1611
1883
|
value: value === null || value === void 0 ? void 0 : value.order,
|
|
1612
1884
|
onBlur: function onBlur(e) {
|
|
@@ -1615,7 +1887,7 @@ var Logistics = function Logistics(props) {
|
|
|
1615
1887
|
});
|
|
1616
1888
|
};
|
|
1617
1889
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1618
|
-
className: css_248z$
|
|
1890
|
+
className: css_248z$4.logistics
|
|
1619
1891
|
}, isSingle ? showField === 'EXPRESS_COMPANY' ? LogisticsCompany() : null : LogisticsCompany(), isSingle ? showField === 'EXPRESS_WAYBILL_CODE' ? LogisticsCode() : null : LogisticsCode());
|
|
1620
1892
|
};
|
|
1621
1893
|
|
|
@@ -1670,8 +1942,8 @@ var AliPay = function AliPay(props) {
|
|
|
1670
1942
|
*/
|
|
1671
1943
|
var extendRequest = request.extend({});
|
|
1672
1944
|
|
|
1673
|
-
var css_248z$
|
|
1674
|
-
styleInject(css_248z$
|
|
1945
|
+
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";
|
|
1946
|
+
styleInject(css_248z$5);
|
|
1675
1947
|
|
|
1676
1948
|
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=";
|
|
1677
1949
|
|
|
@@ -2650,8 +2922,8 @@ var Supplier = function Supplier(props) {
|
|
|
2650
2922
|
}));
|
|
2651
2923
|
};
|
|
2652
2924
|
|
|
2653
|
-
var css_248z$
|
|
2654
|
-
styleInject(css_248z$
|
|
2925
|
+
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";
|
|
2926
|
+
styleInject(css_248z$6);
|
|
2655
2927
|
|
|
2656
2928
|
var Invoice = function Invoice(props) {
|
|
2657
2929
|
var _props$value = props.value,
|
|
@@ -3062,122 +3334,26 @@ var Payment = function Payment(props) {
|
|
|
3062
3334
|
}));
|
|
3063
3335
|
};
|
|
3064
3336
|
|
|
3065
|
-
var
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
var
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
}).catch(function (e) {
|
|
3086
|
-
console.log(e);
|
|
3087
|
-
});
|
|
3088
|
-
};
|
|
3089
|
-
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(TextArea$1, {
|
|
3090
|
-
placeholder: "\u590D\u5236\u7269\u6D41\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
|
|
3091
|
-
rows: 3,
|
|
3092
|
-
value: value,
|
|
3093
|
-
onChange: function onChange(e) {
|
|
3094
|
-
return setValue(e.target.value);
|
|
3095
|
-
}
|
|
3096
|
-
}), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
3097
|
-
size: "small",
|
|
3098
|
-
type: "primary",
|
|
3099
|
-
onClick: handleIdentify
|
|
3100
|
-
}, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
3101
|
-
size: "small",
|
|
3102
|
-
onClick: function onClick() {
|
|
3103
|
-
return setValue('');
|
|
3104
|
-
}
|
|
3105
|
-
}, "\u6E05\u7A7A")));
|
|
3106
|
-
};
|
|
3107
|
-
|
|
3108
|
-
var IdentifyAddress = function IdentifyAddress(props) {
|
|
3109
|
-
var value = props.value,
|
|
3110
|
-
onChange = props.onChange,
|
|
3111
|
-
_props$disabled = props.disabled,
|
|
3112
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
3113
|
-
var changeHandle = function changeHandle(val, type) {
|
|
3114
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
3115
|
-
};
|
|
3116
|
-
var handleParseLogistics = function handleParseLogistics(val) {
|
|
3117
|
-
var params = {
|
|
3118
|
-
detail: val === null || val === void 0 ? void 0 : val.addressDetail,
|
|
3119
|
-
receiverName: val === null || val === void 0 ? void 0 : val.name,
|
|
3120
|
-
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
3121
|
-
address: []
|
|
3122
|
-
};
|
|
3123
|
-
if (val === null || val === void 0 ? void 0 : val.province) {
|
|
3124
|
-
params.address = [kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.province), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.city), kmkfUtils.AddressData.getInstance().getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
|
|
3125
|
-
}
|
|
3126
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
3127
|
-
};
|
|
3128
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && /*#__PURE__*/React__default['default'].createElement(ParseLogistics, {
|
|
3129
|
-
onChange: handleParseLogistics
|
|
3130
|
-
}), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(Province, {
|
|
3131
|
-
value: value.address,
|
|
3132
|
-
onChange: function onChange(val) {
|
|
3133
|
-
return changeHandle(val, 'address');
|
|
3134
|
-
},
|
|
3135
|
-
options: [],
|
|
3136
|
-
disabled: disabled
|
|
3137
|
-
}), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
3138
|
-
value: value.detail,
|
|
3139
|
-
disabled: disabled,
|
|
3140
|
-
placeholder: "\u8BE6\u7EC6\u5730\u5740",
|
|
3141
|
-
onChange: function onChange(e) {
|
|
3142
|
-
return changeHandle(e.target.value, 'detail');
|
|
3143
|
-
}
|
|
3144
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
3145
|
-
value: value.receiverName,
|
|
3146
|
-
disabled: disabled,
|
|
3147
|
-
placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
|
|
3148
|
-
onChange: function onChange(e) {
|
|
3149
|
-
return changeHandle(e.target.value, 'receiverName');
|
|
3150
|
-
}
|
|
3151
|
-
}), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
3152
|
-
value: value.receiverMobile,
|
|
3153
|
-
disabled: disabled,
|
|
3154
|
-
placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
|
|
3155
|
-
onChange: function onChange(e) {
|
|
3156
|
-
return changeHandle(e.target.value, 'receiverMobile');
|
|
3157
|
-
}
|
|
3158
|
-
})));
|
|
3159
|
-
};
|
|
3160
|
-
|
|
3161
|
-
var css_248z$6 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
3162
|
-
styleInject(css_248z$6);
|
|
3163
|
-
|
|
3164
|
-
var Item = antd.Form.Item;
|
|
3165
|
-
var LogisticsAddress = kmkfUtils.LogisticsAddressData.getInstance();
|
|
3166
|
-
var address$1 = kmkfUtils.AddressData.getInstance();
|
|
3167
|
-
var LogisticsInterception = function LogisticsInterception(props) {
|
|
3168
|
-
var _props$value = props.value,
|
|
3169
|
-
value = _props$value === void 0 ? {} : _props$value,
|
|
3170
|
-
_props$logisticsOptio = props.logisticsOptions,
|
|
3171
|
-
logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
|
|
3172
|
-
_props$expressInterce = props.expressInterceptData,
|
|
3173
|
-
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
3174
|
-
_props$required = props.required,
|
|
3175
|
-
required = _props$required === void 0 ? false : _props$required,
|
|
3176
|
-
onChange = props.onChange,
|
|
3177
|
-
_props$disabled = props.disabled,
|
|
3178
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
3179
|
-
_props$isEditing = props.isEditing,
|
|
3180
|
-
isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
|
|
3337
|
+
var css_248z$7 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
3338
|
+
styleInject(css_248z$7);
|
|
3339
|
+
|
|
3340
|
+
var Item = antd.Form.Item;
|
|
3341
|
+
var LogisticsAddress = kmkfUtils.LogisticsAddressData.getInstance();
|
|
3342
|
+
var address$1 = kmkfUtils.AddressData.getInstance();
|
|
3343
|
+
var LogisticsInterception = function LogisticsInterception(props) {
|
|
3344
|
+
var _props$value = props.value,
|
|
3345
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
3346
|
+
_props$logisticsOptio = props.logisticsOptions,
|
|
3347
|
+
logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
|
|
3348
|
+
_props$expressInterce = props.expressInterceptData,
|
|
3349
|
+
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
3350
|
+
_props$required = props.required,
|
|
3351
|
+
required = _props$required === void 0 ? false : _props$required,
|
|
3352
|
+
onChange = props.onChange,
|
|
3353
|
+
_props$disabled = props.disabled,
|
|
3354
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
3355
|
+
_props$isEditing = props.isEditing,
|
|
3356
|
+
isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
|
|
3181
3357
|
var _useState = React.useState(''),
|
|
3182
3358
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3183
3359
|
initCompany = _useState2[0],
|
|
@@ -3221,12 +3397,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3221
3397
|
return item.value === (value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
3222
3398
|
});
|
|
3223
3399
|
var showAddress = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).some(function (item) {
|
|
3224
|
-
var _item$config;
|
|
3225
|
-
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);
|
|
3400
|
+
var _item$config, _item$config2;
|
|
3401
|
+
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));
|
|
3226
3402
|
});
|
|
3227
3403
|
var showSender = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).some(function (item) {
|
|
3228
|
-
var _item$
|
|
3229
|
-
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$
|
|
3404
|
+
var _item$config3;
|
|
3405
|
+
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);
|
|
3230
3406
|
});
|
|
3231
3407
|
var params = _objectSpread2({}, value);
|
|
3232
3408
|
if (!showAddress) {
|
|
@@ -3299,8 +3475,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3299
3475
|
return item.value === val;
|
|
3300
3476
|
});
|
|
3301
3477
|
var _returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
3302
|
-
var _item$
|
|
3303
|
-
return item === null || item === void 0 ? void 0 : (_item$
|
|
3478
|
+
var _item$config4;
|
|
3479
|
+
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
3304
3480
|
});
|
|
3305
3481
|
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3306
3482
|
interceptCompany: val,
|
|
@@ -3330,7 +3506,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3330
3506
|
//选择退回地址
|
|
3331
3507
|
var changeReturnAddress = function changeReturnAddress(uk) {
|
|
3332
3508
|
var item = LogisticsAddress.getItemByUk(uk);
|
|
3333
|
-
console.log(item);
|
|
3334
3509
|
if (item) {
|
|
3335
3510
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
3336
3511
|
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],
|
|
@@ -3341,7 +3516,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3341
3516
|
}
|
|
3342
3517
|
};
|
|
3343
3518
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3344
|
-
className: css_248z$
|
|
3519
|
+
className: css_248z$7.interceptBox
|
|
3345
3520
|
}, /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
3346
3521
|
label: '物流信息',
|
|
3347
3522
|
required: required,
|
|
@@ -3461,6 +3636,64 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3461
3636
|
})));
|
|
3462
3637
|
};
|
|
3463
3638
|
|
|
3639
|
+
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
3640
|
+
var options = props.options,
|
|
3641
|
+
showField = props.showField,
|
|
3642
|
+
_props$value = props.value,
|
|
3643
|
+
value = _props$value === void 0 ? {} : _props$value,
|
|
3644
|
+
disabled = props.disabled,
|
|
3645
|
+
onChange = props.onChange;
|
|
3646
|
+
var handleInputChange = function handleInputChange(e, type) {
|
|
3647
|
+
var val = e.target.value;
|
|
3648
|
+
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
3649
|
+
};
|
|
3650
|
+
var handelSelectChange = function handelSelectChange(val) {
|
|
3651
|
+
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
3652
|
+
company: val
|
|
3653
|
+
}));
|
|
3654
|
+
};
|
|
3655
|
+
//物流公司
|
|
3656
|
+
var LogisticsCompany = function LogisticsCompany() {
|
|
3657
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
3658
|
+
disabled: disabled,
|
|
3659
|
+
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
3660
|
+
onChange: handelSelectChange,
|
|
3661
|
+
value: (value === null || value === void 0 ? void 0 : value.company) === '' ? undefined : value === null || value === void 0 ? void 0 : value.company,
|
|
3662
|
+
options: options,
|
|
3663
|
+
showSearch: true,
|
|
3664
|
+
style: {
|
|
3665
|
+
width: '100%'
|
|
3666
|
+
},
|
|
3667
|
+
filterOption: function filterOption(input, option) {
|
|
3668
|
+
return option.label.includes(input);
|
|
3669
|
+
}
|
|
3670
|
+
});
|
|
3671
|
+
};
|
|
3672
|
+
//物流单号
|
|
3673
|
+
var LogisticsCode = function LogisticsCode() {
|
|
3674
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
3675
|
+
disabled: disabled,
|
|
3676
|
+
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
3677
|
+
onChange: function onChange(e) {
|
|
3678
|
+
return handleInputChange(e, 'order');
|
|
3679
|
+
},
|
|
3680
|
+
value: value === null || value === void 0 ? void 0 : value.order
|
|
3681
|
+
});
|
|
3682
|
+
};
|
|
3683
|
+
//物流快照
|
|
3684
|
+
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
3685
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
3686
|
+
disabled: true,
|
|
3687
|
+
placeholder: "\u7269\u6D41\u5FEB\u7167",
|
|
3688
|
+
onChange: function onChange(e) {
|
|
3689
|
+
return handleInputChange(e, 'snapshot');
|
|
3690
|
+
},
|
|
3691
|
+
value: value === null || value === void 0 ? void 0 : value.snapshot
|
|
3692
|
+
});
|
|
3693
|
+
};
|
|
3694
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, ['all', 'EXPRESS_COMPANY'].includes(showField) ? LogisticsCompany() : null, LogisticsCode(), ['all', 'EXPRESS_SNAPSHOT'].includes(showField) ? LogisticsSnapshot() : null);
|
|
3695
|
+
};
|
|
3696
|
+
|
|
3464
3697
|
var jstGoods = function jstGoods(props) {
|
|
3465
3698
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6;
|
|
3466
3699
|
var _props$value = props.value,
|
|
@@ -3575,8 +3808,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
3575
3808
|
})) : null) : null);
|
|
3576
3809
|
};
|
|
3577
3810
|
|
|
3578
|
-
var css_248z$
|
|
3579
|
-
styleInject(css_248z$
|
|
3811
|
+
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";
|
|
3812
|
+
styleInject(css_248z$8);
|
|
3580
3813
|
|
|
3581
3814
|
var ItemList = function ItemList(props) {
|
|
3582
3815
|
var _props$value = props.value,
|
|
@@ -3649,13 +3882,638 @@ var ItemList = function ItemList(props) {
|
|
|
3649
3882
|
}, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
|
|
3650
3883
|
};
|
|
3651
3884
|
|
|
3652
|
-
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";
|
|
3653
|
-
styleInject(css_248z$8);
|
|
3654
|
-
|
|
3655
3885
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
3886
|
+
var columns = [{
|
|
3887
|
+
dataIndex: 'picUrl',
|
|
3888
|
+
title: '主图',
|
|
3889
|
+
render: function render(val) {
|
|
3890
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
3891
|
+
width: 60,
|
|
3892
|
+
src: val
|
|
3893
|
+
});
|
|
3894
|
+
}
|
|
3895
|
+
}, {
|
|
3896
|
+
dataIndex: 'outerId',
|
|
3897
|
+
title: '款式编码'
|
|
3898
|
+
}, {
|
|
3899
|
+
dataIndex: 'numIid',
|
|
3900
|
+
title: '商品编码'
|
|
3901
|
+
}, {
|
|
3902
|
+
dataIndex: 'title',
|
|
3903
|
+
title: '商品名称'
|
|
3904
|
+
}, {
|
|
3905
|
+
dataIndex: 'skus',
|
|
3906
|
+
title: '颜色及规格'
|
|
3907
|
+
}];
|
|
3908
|
+
var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
3909
|
+
React.useImperativeHandle(ref, function () {
|
|
3910
|
+
return {
|
|
3911
|
+
open: function open() {
|
|
3912
|
+
setVisible(true);
|
|
3913
|
+
setSelect([]);
|
|
3914
|
+
setSelectIds([]);
|
|
3915
|
+
}
|
|
3916
|
+
};
|
|
3917
|
+
});
|
|
3918
|
+
var onSubmit = props.onSubmit,
|
|
3919
|
+
shopId = props.shopId,
|
|
3920
|
+
shopList = props.shopList,
|
|
3921
|
+
width = props.width;
|
|
3922
|
+
var _useState = React.useState(false),
|
|
3923
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3924
|
+
visible = _useState2[0],
|
|
3925
|
+
setVisible = _useState2[1];
|
|
3926
|
+
var _useState3 = React.useState([]),
|
|
3927
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
3928
|
+
selectList = _useState4[0],
|
|
3929
|
+
setSelect = _useState4[1];
|
|
3930
|
+
var _useState5 = React.useState([]),
|
|
3931
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3932
|
+
selectIds = _useState6[0],
|
|
3933
|
+
setSelectIds = _useState6[1];
|
|
3934
|
+
var _useState7 = React.useState([]),
|
|
3935
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
3936
|
+
goodList = _useState8[0],
|
|
3937
|
+
setGoodList = _useState8[1];
|
|
3938
|
+
var _useState9 = React.useState(false),
|
|
3939
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
3940
|
+
loading = _useState10[0],
|
|
3941
|
+
setLoading = _useState10[1];
|
|
3942
|
+
var _useState11 = React.useState({
|
|
3943
|
+
apiName: 'queryItems',
|
|
3944
|
+
desc: true,
|
|
3945
|
+
numIids: '',
|
|
3946
|
+
orderBy: 'list_time',
|
|
3947
|
+
pageNo: 1,
|
|
3948
|
+
pageSize: 10,
|
|
3949
|
+
shopId: shopId,
|
|
3950
|
+
type: 'onSale',
|
|
3951
|
+
cids: '',
|
|
3952
|
+
title: ''
|
|
3953
|
+
}),
|
|
3954
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
3955
|
+
searchParams = _useState12[0],
|
|
3956
|
+
setSearch = _useState12[1];
|
|
3957
|
+
var _useState13 = React.useState(0),
|
|
3958
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
3959
|
+
total = _useState14[0],
|
|
3960
|
+
setTotal = _useState14[1];
|
|
3961
|
+
var _useState15 = React.useState(''),
|
|
3962
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
3963
|
+
platform = _useState16[0],
|
|
3964
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
3965
|
+
// const [shopInfo, setShopInfo] = useState<any>({}); //店铺信息
|
|
3966
|
+
var _useState17 = React.useState([{
|
|
3967
|
+
tab: '所选商品',
|
|
3968
|
+
key: 'onSale'
|
|
3969
|
+
}
|
|
3970
|
+
// { tab: '已选商品', key: 'select' },
|
|
3971
|
+
]),
|
|
3972
|
+
_useState18 = _slicedToArray(_useState17, 1),
|
|
3973
|
+
tabs = _useState18[0];
|
|
3974
|
+
//选择页码
|
|
3975
|
+
var pageChange = function pageChange(page, pageSize) {
|
|
3976
|
+
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
3977
|
+
pageNo: page,
|
|
3978
|
+
pageSize: pageSize
|
|
3979
|
+
}));
|
|
3980
|
+
};
|
|
3981
|
+
/**
|
|
3982
|
+
* 选择商品
|
|
3983
|
+
* @param good
|
|
3984
|
+
* @returns
|
|
3985
|
+
*/
|
|
3986
|
+
// const changeItem = (good: any) => {
|
|
3987
|
+
// if (searchParams.type === 'select') {
|
|
3988
|
+
// const newSelect = selectList.filter((item: any) => {
|
|
3989
|
+
// return item.numIid !== good.numIid;
|
|
3990
|
+
// });
|
|
3991
|
+
// setSelect([...newSelect]);
|
|
3992
|
+
// const ids = newSelect.map((item) => {
|
|
3993
|
+
// return item.numIid;
|
|
3994
|
+
// });
|
|
3995
|
+
// setSelectIds(ids);
|
|
3996
|
+
// } else {
|
|
3997
|
+
// if (selectList.length >= maxLength) {
|
|
3998
|
+
// message.error(`最多添加${maxLength}张`);
|
|
3999
|
+
// return;
|
|
4000
|
+
// }
|
|
4001
|
+
// const hasGood = selectList.some((t) => {
|
|
4002
|
+
// return t.numIid === good.numIid;
|
|
4003
|
+
// });
|
|
4004
|
+
// if (hasGood) {
|
|
4005
|
+
// const newSelectList = selectList.filter((item) => {
|
|
4006
|
+
// return item.numIid !== good.numIid;
|
|
4007
|
+
// });
|
|
4008
|
+
// setSelect(newSelectList);
|
|
4009
|
+
// const ids = newSelectList.map((item) => {
|
|
4010
|
+
// return item.numIid;
|
|
4011
|
+
// });
|
|
4012
|
+
// setSelectIds(ids);
|
|
4013
|
+
// } else {
|
|
4014
|
+
// setSelect([...selectList, good]);
|
|
4015
|
+
// setSelectIds([...selectIds, good.numIid]);
|
|
4016
|
+
// }
|
|
4017
|
+
// }
|
|
4018
|
+
// };
|
|
4019
|
+
/**
|
|
4020
|
+
*
|
|
4021
|
+
* @returns 获取查询参数
|
|
4022
|
+
*/
|
|
4023
|
+
var queryPd = function queryPd() {
|
|
4024
|
+
var params = {
|
|
4025
|
+
apiName: 'queryItems',
|
|
4026
|
+
desc: searchParams.desc,
|
|
4027
|
+
productIds: searchParams.numIids,
|
|
4028
|
+
orderBy: searchParams.orderBy,
|
|
4029
|
+
pageNo: searchParams.pageNo,
|
|
4030
|
+
pageSize: searchParams.pageSize,
|
|
4031
|
+
shopId: shopId,
|
|
4032
|
+
type: searchParams.type,
|
|
4033
|
+
title: searchParams.title,
|
|
4034
|
+
cids: searchParams.cids
|
|
4035
|
+
};
|
|
4036
|
+
return params;
|
|
4037
|
+
};
|
|
4038
|
+
/**
|
|
4039
|
+
* 查询商品
|
|
4040
|
+
*/
|
|
4041
|
+
var queryItems = /*#__PURE__*/function () {
|
|
4042
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(platform) {
|
|
4043
|
+
var res, _ref2, items, totalCount;
|
|
4044
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4045
|
+
while (1) switch (_context.prev = _context.next) {
|
|
4046
|
+
case 0:
|
|
4047
|
+
_context.prev = 0;
|
|
4048
|
+
setLoading(true);
|
|
4049
|
+
_context.next = 4;
|
|
4050
|
+
return extendRequest('/qy/gdfw/workOrder/queryItems', {
|
|
4051
|
+
method: 'post',
|
|
4052
|
+
data: queryPd()
|
|
4053
|
+
});
|
|
4054
|
+
case 4:
|
|
4055
|
+
res = _context.sent;
|
|
4056
|
+
_ref2 = res.data || {
|
|
4057
|
+
items: [],
|
|
4058
|
+
totalCount: 0
|
|
4059
|
+
}, items = _ref2.items, totalCount = _ref2.totalCount;
|
|
4060
|
+
items.forEach(function (item) {
|
|
4061
|
+
item.platform = platform;
|
|
4062
|
+
item.key = item.numIid;
|
|
4063
|
+
});
|
|
4064
|
+
setGoodList(_toConsumableArray(items));
|
|
4065
|
+
setTotal(totalCount);
|
|
4066
|
+
case 9:
|
|
4067
|
+
_context.prev = 9;
|
|
4068
|
+
setLoading(false);
|
|
4069
|
+
return _context.finish(9);
|
|
4070
|
+
case 12:
|
|
4071
|
+
case "end":
|
|
4072
|
+
return _context.stop();
|
|
4073
|
+
}
|
|
4074
|
+
}, _callee, null, [[0,, 9, 12]]);
|
|
4075
|
+
}));
|
|
4076
|
+
return function queryItems(_x) {
|
|
4077
|
+
return _ref.apply(this, arguments);
|
|
4078
|
+
};
|
|
4079
|
+
}();
|
|
4080
|
+
var getItem = function getItem(searchParams, platform) {
|
|
4081
|
+
if (searchParams.type === 'select') {
|
|
4082
|
+
setTotal(1);
|
|
4083
|
+
return;
|
|
4084
|
+
} else {
|
|
4085
|
+
queryItems(platform);
|
|
4086
|
+
}
|
|
4087
|
+
};
|
|
4088
|
+
React.useEffect(function () {
|
|
4089
|
+
var shopInfo = shopList.find(function (item) {
|
|
4090
|
+
return shopId === item.shopId || shopId === item.shopName;
|
|
4091
|
+
});
|
|
4092
|
+
// setShopInfo(shopInfo);
|
|
4093
|
+
var platform = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopSourceStr.toLowerCase();
|
|
4094
|
+
setPlatform(platform);
|
|
4095
|
+
}, []);
|
|
4096
|
+
React.useEffect(function () {
|
|
4097
|
+
platform && getItem(searchParams, platform);
|
|
4098
|
+
}, [searchParams, platform]);
|
|
4099
|
+
var rowSelection = {
|
|
4100
|
+
selectedRowKeys: selectIds,
|
|
4101
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
4102
|
+
console.log(selectedRowKeys, selectedRows, info);
|
|
4103
|
+
setSelectIds(selectedRowKeys);
|
|
4104
|
+
setSelect(_toConsumableArray(selectedRows));
|
|
4105
|
+
}
|
|
4106
|
+
// getCheckboxProps: (record: any) => {
|
|
4107
|
+
// return {
|
|
4108
|
+
// disabled: record.hasOwnProperty('children'),
|
|
4109
|
+
// };
|
|
4110
|
+
// },
|
|
4111
|
+
};
|
|
4112
|
+
|
|
4113
|
+
var _onCancel = function onCancel() {
|
|
4114
|
+
setVisible(false);
|
|
4115
|
+
};
|
|
4116
|
+
var onOk = function onOk() {
|
|
4117
|
+
onSubmit(selectList);
|
|
4118
|
+
_onCancel();
|
|
4119
|
+
};
|
|
4120
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
4121
|
+
title: '选择商品编码',
|
|
4122
|
+
okText: '确认',
|
|
4123
|
+
cancelText: '取消',
|
|
4124
|
+
visible: visible,
|
|
4125
|
+
width: width || 850,
|
|
4126
|
+
onCancel: function onCancel() {
|
|
4127
|
+
_onCancel();
|
|
4128
|
+
},
|
|
4129
|
+
onOk: onOk,
|
|
4130
|
+
wrapClassName: "goodModal"
|
|
4131
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Tabs, {
|
|
4132
|
+
type: "card",
|
|
4133
|
+
activeKey: searchParams.type,
|
|
4134
|
+
onChange: function onChange(e) {
|
|
4135
|
+
var params = _objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
4136
|
+
type: e,
|
|
4137
|
+
pageNo: 1
|
|
4138
|
+
});
|
|
4139
|
+
setSearch(params);
|
|
4140
|
+
}
|
|
4141
|
+
}, tabs.map(function (tab) {
|
|
4142
|
+
return /*#__PURE__*/React__default['default'].createElement(TabPane$1, {
|
|
4143
|
+
tab: tab.tab + (tab.key === 'select' ? "(".concat(selectList.length, ")") : ''),
|
|
4144
|
+
key: tab.key
|
|
4145
|
+
});
|
|
4146
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4147
|
+
className: "searchBox",
|
|
4148
|
+
style: {
|
|
4149
|
+
display: searchParams.type === 'select' ? 'none' : ''
|
|
4150
|
+
}
|
|
4151
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
4152
|
+
layout: "inline"
|
|
4153
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
4154
|
+
placeholder: "\u6B3E\u5F0F\u7F16\u7801"
|
|
4155
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
4156
|
+
placeholder: "\u5546\u54C1\u7F16\u7801"
|
|
4157
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
4158
|
+
placeholder: "\u5546\u54C1\u540D\u79F0"
|
|
4159
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
4160
|
+
type: "primary",
|
|
4161
|
+
htmlType: "submit"
|
|
4162
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, null, "\u91CD\u7F6E")))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
|
|
4163
|
+
spinning: loading
|
|
4164
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
4165
|
+
rowSelection: rowSelection,
|
|
4166
|
+
columns: columns,
|
|
4167
|
+
dataSource: searchParams.type == 'select' ? selectList : goodList,
|
|
4168
|
+
scroll: {
|
|
4169
|
+
y: 300
|
|
4170
|
+
},
|
|
4171
|
+
pagination: {
|
|
4172
|
+
size: 'small',
|
|
4173
|
+
total: total,
|
|
4174
|
+
current: searchParams.pageNo,
|
|
4175
|
+
pageSize: searchParams.pageSize,
|
|
4176
|
+
onChange: pageChange
|
|
4177
|
+
}
|
|
4178
|
+
})));
|
|
4179
|
+
};
|
|
4180
|
+
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
4181
|
+
|
|
4182
|
+
// interface GoodsItem {
|
|
4183
|
+
// title: string;
|
|
4184
|
+
// pic: string;
|
|
4185
|
+
// platform: string;
|
|
4186
|
+
// skuId: string;
|
|
4187
|
+
// styleId: string;
|
|
4188
|
+
// }
|
|
4189
|
+
var GoodItem = function GoodItem(props) {
|
|
4190
|
+
var _props$value = props.value,
|
|
4191
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
4192
|
+
onChange = props.onChange,
|
|
4193
|
+
disabled = props.disabled,
|
|
4194
|
+
_props$showField = props.showField,
|
|
4195
|
+
showField = _props$showField === void 0 ? [] : _props$showField,
|
|
4196
|
+
width = props.width,
|
|
4197
|
+
_props$shopList = props.shopList,
|
|
4198
|
+
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
4199
|
+
_props$shopId = props.shopId,
|
|
4200
|
+
shopId = _props$shopId === void 0 ? '' : _props$shopId,
|
|
4201
|
+
_props$maxLength = props.maxLength,
|
|
4202
|
+
maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
|
|
4203
|
+
_props$showChangeBtn = props.showChangeBtn,
|
|
4204
|
+
showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
|
|
4205
|
+
_props$tableSelect = props.tableSelect,
|
|
4206
|
+
tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
|
|
4207
|
+
_props$otherOperation = props.otherOperations,
|
|
4208
|
+
otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
|
|
4209
|
+
_props$canUpdateNumbe = props.canUpdateNumber,
|
|
4210
|
+
canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
|
|
4211
|
+
onSelect = props.onSelect;
|
|
4212
|
+
var refModal = React.useRef();
|
|
4213
|
+
var handleDelete = function handleDelete(index) {
|
|
4214
|
+
var newList = value.filter(function (item, i) {
|
|
4215
|
+
return index !== i;
|
|
4216
|
+
});
|
|
4217
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
4218
|
+
};
|
|
4219
|
+
var _useState = React.useState([]),
|
|
4220
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
4221
|
+
selectedRowKeys = _useState2[0],
|
|
4222
|
+
setSelectedRowKeys = _useState2[1];
|
|
4223
|
+
var updateHandle = function updateHandle(val, index, type) {
|
|
4224
|
+
value[index][type] = val;
|
|
4225
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
4226
|
+
};
|
|
4227
|
+
//商品信息
|
|
4228
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
4229
|
+
return [{
|
|
4230
|
+
dataIndex: 'name',
|
|
4231
|
+
title: "bs\u540D\u79F0",
|
|
4232
|
+
width: 200
|
|
4233
|
+
}, {
|
|
4234
|
+
dataIndex: 'code',
|
|
4235
|
+
title: "bs\u7F16\u7801",
|
|
4236
|
+
width: 200
|
|
4237
|
+
}, {
|
|
4238
|
+
dataIndex: 'skuId',
|
|
4239
|
+
title: "bssku\u7F16\u7801",
|
|
4240
|
+
width: 200
|
|
4241
|
+
}, {
|
|
4242
|
+
dataIndex: 'money',
|
|
4243
|
+
title: "bs\u5B9E\u4ED8\u91D1\u989D",
|
|
4244
|
+
width: 200
|
|
4245
|
+
}, {
|
|
4246
|
+
dataIndex: 'number',
|
|
4247
|
+
title: "bs\u6570\u91CF",
|
|
4248
|
+
width: 200,
|
|
4249
|
+
render: function render(val, record, index) {
|
|
4250
|
+
return canUpdateNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
4251
|
+
value: val,
|
|
4252
|
+
onChange: function onChange(num) {
|
|
4253
|
+
return updateHandle(num, index, 'number');
|
|
4254
|
+
}
|
|
4255
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
4256
|
+
}
|
|
4257
|
+
}, {
|
|
4258
|
+
dataIndex: 'share',
|
|
4259
|
+
title: "bs\u5206\u644A\u4EF7",
|
|
4260
|
+
width: 200
|
|
4261
|
+
}, {
|
|
4262
|
+
dataIndex: 'type',
|
|
4263
|
+
title: "bs\u8D60\u54C1\u7C7B\u578B",
|
|
4264
|
+
width: 200
|
|
4265
|
+
}];
|
|
4266
|
+
};
|
|
4267
|
+
var newColumns = React.useMemo(function () {
|
|
4268
|
+
return [{
|
|
4269
|
+
dataIndex: 'pic',
|
|
4270
|
+
title: "bs\u56FE\u7247",
|
|
4271
|
+
width: 200,
|
|
4272
|
+
render: function render(val) {
|
|
4273
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
4274
|
+
width: 60,
|
|
4275
|
+
src: val
|
|
4276
|
+
});
|
|
4277
|
+
}
|
|
4278
|
+
}].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
|
|
4279
|
+
return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
4280
|
+
})), [{
|
|
4281
|
+
dataIndex: '',
|
|
4282
|
+
title: "\u64CD\u4F5C",
|
|
4283
|
+
render: function render(val, record, index) {
|
|
4284
|
+
return record.canDelete ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
4285
|
+
type: "link",
|
|
4286
|
+
onClick: function onClick() {
|
|
4287
|
+
return handleDelete(index);
|
|
4288
|
+
}
|
|
4289
|
+
}, "\u5220\u9664") : null;
|
|
4290
|
+
}
|
|
4291
|
+
}]);
|
|
4292
|
+
}, [showField]);
|
|
4293
|
+
var onSubmit = function onSubmit(list) {
|
|
4294
|
+
var newList = list.map(function (item) {
|
|
4295
|
+
var picUrl = item.picUrl,
|
|
4296
|
+
numIid = item.numIid,
|
|
4297
|
+
outerId = item.outerId,
|
|
4298
|
+
title = item.title,
|
|
4299
|
+
price = item.price,
|
|
4300
|
+
platform = item.platform;
|
|
4301
|
+
return {
|
|
4302
|
+
pic: picUrl,
|
|
4303
|
+
numIid: numIid,
|
|
4304
|
+
outerId: outerId,
|
|
4305
|
+
title: title,
|
|
4306
|
+
price: price,
|
|
4307
|
+
platform: platform,
|
|
4308
|
+
number: 10,
|
|
4309
|
+
canDelete: true
|
|
4310
|
+
};
|
|
4311
|
+
});
|
|
4312
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
4313
|
+
};
|
|
4314
|
+
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
4315
|
+
setSelectedRowKeys(newSelectedRowKeys);
|
|
4316
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
|
|
4317
|
+
return newSelectedRowKeys.includes(t);
|
|
4318
|
+
}));
|
|
4319
|
+
};
|
|
4320
|
+
var handleChangeGoods = function handleChangeGoods() {
|
|
4321
|
+
refModal.current.open();
|
|
4322
|
+
};
|
|
4323
|
+
var rowSelection = {
|
|
4324
|
+
selectedRowKeys: selectedRowKeys,
|
|
4325
|
+
onChange: onSelectChange
|
|
4326
|
+
};
|
|
4327
|
+
var tableConfig = React.useMemo(function () {
|
|
4328
|
+
var params = {
|
|
4329
|
+
columns: newColumns,
|
|
4330
|
+
dataSource: value
|
|
4331
|
+
};
|
|
4332
|
+
if (tableSelect) {
|
|
4333
|
+
params.rowSelection = rowSelection;
|
|
4334
|
+
}
|
|
4335
|
+
return params;
|
|
4336
|
+
}, [tableSelect, newColumns, value]);
|
|
4337
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
4338
|
+
align: "end"
|
|
4339
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
4340
|
+
type: "link",
|
|
4341
|
+
onClick: handleChangeGoods
|
|
4342
|
+
}, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4343
|
+
style: {
|
|
4344
|
+
width: '100%',
|
|
4345
|
+
overflowX: 'auto'
|
|
4346
|
+
}
|
|
4347
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
4348
|
+
pagination: false
|
|
4349
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
4350
|
+
ref: refModal,
|
|
4351
|
+
onSubmit: onSubmit,
|
|
4352
|
+
width: width,
|
|
4353
|
+
shopList: shopList,
|
|
4354
|
+
shopId: shopId,
|
|
4355
|
+
maxLength: maxLength
|
|
4356
|
+
}));
|
|
4357
|
+
};
|
|
4358
|
+
|
|
4359
|
+
var BsGoods = function BsGoods(props) {
|
|
4360
|
+
var value = props.value;
|
|
4361
|
+
var _useState = React.useState(false),
|
|
4362
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
4363
|
+
tableSelect = _useState2[0],
|
|
4364
|
+
setTableSelect = _useState2[1];
|
|
4365
|
+
var ref = React.useRef();
|
|
4366
|
+
React.useEffect(function () {
|
|
4367
|
+
ref.current = pubsub__default['default'].subscribe('type', function (_, val) {
|
|
4368
|
+
setTableSelect(['2', '4'].includes(val));
|
|
4369
|
+
if (['1', '3'].includes(val)) {
|
|
4370
|
+
pubsub__default['default'].publish('selectList', {
|
|
4371
|
+
type: val,
|
|
4372
|
+
list: _toConsumableArray(value).map(function (item) {
|
|
4373
|
+
item.canDelete = false;
|
|
4374
|
+
})
|
|
4375
|
+
});
|
|
4376
|
+
}
|
|
4377
|
+
});
|
|
4378
|
+
return function () {
|
|
4379
|
+
pubsub__default['default'].unsubscribe(ref.current);
|
|
4380
|
+
};
|
|
4381
|
+
}, []);
|
|
4382
|
+
var onSelect = function onSelect(list) {
|
|
4383
|
+
pubsub__default['default'].publish('selectList', list.map(function (item) {
|
|
4384
|
+
item.canDelete = true;
|
|
4385
|
+
}));
|
|
4386
|
+
};
|
|
4387
|
+
return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
4388
|
+
tableSelect: tableSelect,
|
|
4389
|
+
onSelect: onSelect
|
|
4390
|
+
}));
|
|
4391
|
+
};
|
|
4392
|
+
|
|
4393
|
+
var _excluded$b = ["value", "onChange", "reasonList", "disabled"];
|
|
4394
|
+
var BsExchange = function BsExchange(props) {
|
|
4395
|
+
var _value$bsExchangeType2, _value$bsExchangeType3;
|
|
4396
|
+
var value = props.value,
|
|
4397
|
+
onChange = props.onChange,
|
|
4398
|
+
_props$reasonList = props.reasonList,
|
|
4399
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
4400
|
+
disabled = props.disabled,
|
|
4401
|
+
other = _objectWithoutProperties(props, _excluded$b);
|
|
4402
|
+
React.useEffect(function () {
|
|
4403
|
+
pubsub__default['default'].subscribe('selectList', function (_, list) {
|
|
4404
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
4405
|
+
bsExchangeReturnGoods: list
|
|
4406
|
+
}));
|
|
4407
|
+
});
|
|
4408
|
+
}, []);
|
|
4409
|
+
var changeHandle = function changeHandle(val, key) {
|
|
4410
|
+
var newValue = _objectSpread2({}, value);
|
|
4411
|
+
newValue[key] = val;
|
|
4412
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
4413
|
+
if (key === 'bsExchangeType') {
|
|
4414
|
+
console.log(val);
|
|
4415
|
+
pubsub__default['default'].publish('type', val[0]);
|
|
4416
|
+
}
|
|
4417
|
+
};
|
|
4418
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
4419
|
+
var showChangeBtn = React.useMemo(function () {
|
|
4420
|
+
var _value$bsExchangeType;
|
|
4421
|
+
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;
|
|
4422
|
+
}, [value === null || value === void 0 ? void 0 : value.bsExchangeType]);
|
|
4423
|
+
var copyGoods = function copyGoods() {
|
|
4424
|
+
var copyHandle = function copyHandle() {
|
|
4425
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
4426
|
+
bsExchangeSwapOutGoods: [].concat(_toConsumableArray((value === null || value === void 0 ? void 0 : value.bsExchangeSwapOutGoods) || []), _toConsumableArray((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []))
|
|
4427
|
+
}));
|
|
4428
|
+
};
|
|
4429
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
4430
|
+
type: "link",
|
|
4431
|
+
onClick: copyHandle
|
|
4432
|
+
}, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
|
|
4433
|
+
};
|
|
4434
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
4435
|
+
options: reasonList,
|
|
4436
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeType,
|
|
4437
|
+
onChange: function onChange(val) {
|
|
4438
|
+
return changeHandle(val, 'bsExchangeType');
|
|
4439
|
+
}
|
|
4440
|
+
}), /*#__PURE__*/React__default['default'].createElement("p", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
4441
|
+
disabled: disabled,
|
|
4442
|
+
showChangeBtn: showChangeBtn,
|
|
4443
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
|
|
4444
|
+
onChange: function onChange(val) {
|
|
4445
|
+
return changeHandle(val, 'bsExchangeReturnGoods');
|
|
4446
|
+
}
|
|
4447
|
+
})), /*#__PURE__*/React__default['default'].createElement("p", null, "\u6362\u51FA\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
4448
|
+
disabled: disabled,
|
|
4449
|
+
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,
|
|
4450
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeSwapOutGoods,
|
|
4451
|
+
onChange: function onChange(val) {
|
|
4452
|
+
return changeHandle(val, 'bsExchangeSwapOutGoods');
|
|
4453
|
+
}
|
|
4454
|
+
})), ['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__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("p", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
4455
|
+
disabled: disabled
|
|
4456
|
+
}, other), {}, {
|
|
4457
|
+
value: value === null || value === void 0 ? void 0 : value.bsExchangeGiftGoods,
|
|
4458
|
+
onChange: function onChange(val) {
|
|
4459
|
+
return changeHandle(val, 'bsExchangeGiftGoods');
|
|
4460
|
+
}
|
|
4461
|
+
}))) : null);
|
|
4462
|
+
};
|
|
4463
|
+
|
|
4464
|
+
var _excluded$c = ["value", "onChange", "reasonList"];
|
|
4465
|
+
var BsReissue = function BsReissue(props) {
|
|
4466
|
+
var value = props.value,
|
|
4467
|
+
onChange = props.onChange,
|
|
4468
|
+
_props$reasonList = props.reasonList,
|
|
4469
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
4470
|
+
other = _objectWithoutProperties(props, _excluded$c);
|
|
4471
|
+
React.useEffect(function () {
|
|
4472
|
+
pubsub__default['default'].subscribe('selectList', function (_, list) {
|
|
4473
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
4474
|
+
bsReissueGoods: list.map(function (item) {
|
|
4475
|
+
item.money = 0;
|
|
4476
|
+
return item;
|
|
4477
|
+
})
|
|
4478
|
+
}));
|
|
4479
|
+
});
|
|
4480
|
+
}, []);
|
|
4481
|
+
var changeHandle = function changeHandle(val, key) {
|
|
4482
|
+
var newValue = _objectSpread2({}, value);
|
|
4483
|
+
newValue[key] = val;
|
|
4484
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
4485
|
+
if (key === 'bsReissueType') {
|
|
4486
|
+
pubsub__default['default'].publish('type', val);
|
|
4487
|
+
}
|
|
4488
|
+
};
|
|
4489
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
4490
|
+
var showChangeBtn = React.useMemo(function () {
|
|
4491
|
+
var _value$bsReissueType;
|
|
4492
|
+
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]);
|
|
4493
|
+
}, [value === null || value === void 0 ? void 0 : value.bsReissueType]);
|
|
4494
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
4495
|
+
options: reasonList,
|
|
4496
|
+
value: value === null || value === void 0 ? void 0 : value.bsReissueType,
|
|
4497
|
+
onChange: function onChange(val) {
|
|
4498
|
+
return changeHandle(val, 'bsReissueType');
|
|
4499
|
+
}
|
|
4500
|
+
}), /*#__PURE__*/React__default['default'].createElement("p", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
4501
|
+
canUpdateNumber: true,
|
|
4502
|
+
showChangeBtn: showChangeBtn,
|
|
4503
|
+
value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
|
|
4504
|
+
onChange: function onChange(val) {
|
|
4505
|
+
return changeHandle(val, 'bsReissueGoods');
|
|
4506
|
+
}
|
|
4507
|
+
})));
|
|
4508
|
+
};
|
|
4509
|
+
|
|
4510
|
+
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";
|
|
4511
|
+
styleInject(css_248z$9);
|
|
4512
|
+
|
|
4513
|
+
var TabPane$2 = antd.Tabs.TabPane;
|
|
3656
4514
|
var Option$2 = antd.Select.Option;
|
|
3657
4515
|
var Search$1 = antd.Input.Search;
|
|
3658
|
-
var GoodsModal$
|
|
4516
|
+
var GoodsModal$3 = function GoodsModal(props) {
|
|
3659
4517
|
var onSubmit = props.onSubmit,
|
|
3660
4518
|
_onCancel = props.onCancel,
|
|
3661
4519
|
visible = props.visible,
|
|
@@ -3968,7 +4826,7 @@ var GoodsModal$1 = function GoodsModal(props) {
|
|
|
3968
4826
|
}));
|
|
3969
4827
|
}
|
|
3970
4828
|
}, tabs.map(function (tab) {
|
|
3971
|
-
return /*#__PURE__*/React__default['default'].createElement(TabPane$
|
|
4829
|
+
return /*#__PURE__*/React__default['default'].createElement(TabPane$2, {
|
|
3972
4830
|
tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
|
|
3973
4831
|
key: tab.key
|
|
3974
4832
|
});
|
|
@@ -4106,7 +4964,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
4106
4964
|
};
|
|
4107
4965
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4108
4966
|
className: "goodsBox"
|
|
4109
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$
|
|
4967
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$3, {
|
|
4110
4968
|
visible: visible,
|
|
4111
4969
|
onSubmit: onSubmit,
|
|
4112
4970
|
type: type,
|
|
@@ -4135,6 +4993,7 @@ exports.ApaasHoc = withFormItem;
|
|
|
4135
4993
|
exports.ApaasInput = ApaasInput;
|
|
4136
4994
|
exports.ApaasInputNumber = ApaasInputNumber;
|
|
4137
4995
|
exports.ApaasMultipleSelect = ApaasMultipleSelect;
|
|
4996
|
+
exports.ApaasPosting = ApaasPosting;
|
|
4138
4997
|
exports.ApaasRadio = ApaasRadio;
|
|
4139
4998
|
exports.ApaasRate = ApaasRate;
|
|
4140
4999
|
exports.ApaasSelect = ApaasSelect;
|
|
@@ -4142,6 +5001,10 @@ exports.ApaasSlider = ApaasSlider;
|
|
|
4142
5001
|
exports.ApaasTextArea = ApaasTextArea;
|
|
4143
5002
|
exports.ApaasUpload = ApaasUpload;
|
|
4144
5003
|
exports.ApaasUploadAsync = ApaasUploadAsync;
|
|
5004
|
+
exports.ApaasUploadFile = ApaasUploadAsync$1;
|
|
5005
|
+
exports.BsExchange = BsExchange;
|
|
5006
|
+
exports.BsGoods = BsGoods;
|
|
5007
|
+
exports.BsReissue = BsReissue;
|
|
4145
5008
|
exports.BuyerNick = BuyerNick;
|
|
4146
5009
|
exports.ChooseBaby = ChooseBaby;
|
|
4147
5010
|
exports.ExpressLogistics = ExpressLogistics;
|
|
@@ -4152,6 +5015,7 @@ exports.Invoice = Invoice;
|
|
|
4152
5015
|
exports.JstGoods = jstGoods;
|
|
4153
5016
|
exports.JstItemList = ItemList;
|
|
4154
5017
|
exports.LogisticsInterception = LogisticsInterception;
|
|
5018
|
+
exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
4155
5019
|
exports.ParseLogistics = ParseLogistics;
|
|
4156
5020
|
exports.Payment = Payment;
|
|
4157
5021
|
exports.Remark = RemarkInput;
|