ztxkui 4.2.23-594 → 4.2.23-595
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.
|
@@ -61,6 +61,7 @@ import i18next from 'ztxkutils/dist/i18next';
|
|
|
61
61
|
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
62
62
|
import { data2, data3 } from './data';
|
|
63
63
|
import ProEditTable from 'components/ProTable';
|
|
64
|
+
import Table from 'components/Table';
|
|
64
65
|
import { Button, message, EnhanceSelect, InputNumber, Modal, Input, DatePicker, } from '../../index.build';
|
|
65
66
|
import { InputNumber as AntInputNumber } from 'antd';
|
|
66
67
|
import { toThousand, exactRound } from 'ztxkutils/dist/tools';
|
|
@@ -468,6 +469,100 @@ export default function EditTable() {
|
|
|
468
469
|
var _e = useState(), iptNum = _e[0], setIptNum = _e[1];
|
|
469
470
|
var _f = useState(false), open = _f[0], setOpen = _f[1];
|
|
470
471
|
var _g = useState(3), num1 = _g[0], setNum1 = _g[1];
|
|
472
|
+
var lineColumns = [
|
|
473
|
+
{
|
|
474
|
+
title: i18next.t('线路编号'),
|
|
475
|
+
dataIndex: 'tlNo',
|
|
476
|
+
width: 150,
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
title: i18next.t('承运商'),
|
|
480
|
+
dataIndex: 'carryName',
|
|
481
|
+
width: 150,
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
title: i18next.t('运输方式'),
|
|
485
|
+
dataIndex: 'transportModeName',
|
|
486
|
+
width: 100,
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
title: i18next.t('发货仓库'),
|
|
490
|
+
dataIndex: 'shippingWarehouseName',
|
|
491
|
+
width: 150,
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
title: i18next.t('起运地'),
|
|
495
|
+
dataIndex: 'startArea',
|
|
496
|
+
width: 150,
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
title: i18next.t('详细发货地址'),
|
|
500
|
+
dataIndex: 'detailedShippingAddress',
|
|
501
|
+
width: 150,
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
title: i18next.t('收货仓库'),
|
|
505
|
+
dataIndex: 'receivingWarehouseName',
|
|
506
|
+
width: 150,
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
title: i18next.t('目的地'),
|
|
510
|
+
dataIndex: 'endArea',
|
|
511
|
+
width: 150,
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
title: i18next.t('详细收货地址'),
|
|
515
|
+
dataIndex: 'detailedReceivingAddress',
|
|
516
|
+
width: 200,
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
title: i18next.t('MMSI'),
|
|
520
|
+
dataIndex: 'mmsi',
|
|
521
|
+
width: 150,
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
title: i18next.t('采购合同号'),
|
|
525
|
+
dataIndex: 'pcNo',
|
|
526
|
+
width: 150,
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
title: i18next.t('销售合同号'),
|
|
530
|
+
dataIndex: 'scNo',
|
|
531
|
+
width: 150,
|
|
532
|
+
},
|
|
533
|
+
];
|
|
534
|
+
var lineDataSource = [
|
|
535
|
+
{
|
|
536
|
+
id: '1',
|
|
537
|
+
tlNo: 'TL-2026-001',
|
|
538
|
+
carryName: '中远海运',
|
|
539
|
+
transportModeName: '海运',
|
|
540
|
+
shippingWarehouseName: '上海浦东仓库',
|
|
541
|
+
startArea: '上海',
|
|
542
|
+
detailedShippingAddress: '上海市浦东新区张江高科技园区',
|
|
543
|
+
receivingWarehouseName: '深圳南山仓库',
|
|
544
|
+
endArea: '深圳',
|
|
545
|
+
detailedReceivingAddress: '广东省深圳市南山区科技园',
|
|
546
|
+
mmsi: '412345678',
|
|
547
|
+
pcNo: 'PC-2026-0101',
|
|
548
|
+
scNo: 'SC-2026-0201',
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
id: '2',
|
|
552
|
+
tlNo: 'TL-2026-002',
|
|
553
|
+
carryName: '顺丰速运',
|
|
554
|
+
transportModeName: '公路',
|
|
555
|
+
shippingWarehouseName: '杭州余杭仓库',
|
|
556
|
+
startArea: '杭州',
|
|
557
|
+
detailedShippingAddress: '浙江省杭州市余杭区未来科技城',
|
|
558
|
+
receivingWarehouseName: '南京江宁仓库',
|
|
559
|
+
endArea: '南京',
|
|
560
|
+
detailedReceivingAddress: '江苏省南京市江宁区秣陵街道',
|
|
561
|
+
mmsi: '',
|
|
562
|
+
pcNo: 'PC-2026-0102',
|
|
563
|
+
scNo: 'SC-2026-0202',
|
|
564
|
+
},
|
|
565
|
+
];
|
|
471
566
|
return (React.createElement("div", null,
|
|
472
567
|
React.createElement(Button, { onClick: function () {
|
|
473
568
|
console.log(data, selectedRowKeys);
|
|
@@ -502,6 +597,7 @@ export default function EditTable() {
|
|
|
502
597
|
}
|
|
503
598
|
});
|
|
504
599
|
}); } }, i18next.t('触发验证')),
|
|
600
|
+
num1 > 4 && (React.createElement(Table, { columns: lineColumns, dataSource: lineDataSource, pagination: false, scroll: { x: 1000 }, rowKey: "id", style: { marginBottom: 16 } })),
|
|
505
601
|
React.createElement(ProEditTable, { rowKey: "idaa", className: "diffTable", columns: columns, dataSource: data,
|
|
506
602
|
// 调用表格内部提供的方法
|
|
507
603
|
tableHandleRef: tableHandleRef,
|
|
@@ -46,12 +46,15 @@ var TableMenu = forwardRef(function (_a, ref) {
|
|
|
46
46
|
}); });
|
|
47
47
|
var items = columns
|
|
48
48
|
.filter(function (item) {
|
|
49
|
-
return item.key
|
|
49
|
+
return (item.key || item.dataIndex) && item.dataIndex !== 'index';
|
|
50
50
|
})
|
|
51
51
|
.map(function (item) {
|
|
52
|
-
var
|
|
52
|
+
var fieldKey = item.key || item.dataIndex;
|
|
53
|
+
var originItem = originColumns.find(function (originItem) {
|
|
54
|
+
return originItem.key === fieldKey || originItem.dataIndex === fieldKey;
|
|
55
|
+
});
|
|
53
56
|
return {
|
|
54
|
-
key:
|
|
57
|
+
key: fieldKey,
|
|
55
58
|
label: (originItem === null || originItem === void 0 ? void 0 : originItem.title) || item.title,
|
|
56
59
|
//
|
|
57
60
|
render: (item === null || item === void 0 ? void 0 : item.render) || (originItem === null || originItem === void 0 ? void 0 : originItem.render),
|