ztxkui 4.2.23-593 → 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';
@@ -84,8 +85,7 @@ function useColumns(tableHandleRef) {
84
85
  title: i18next.t('序号'),
85
86
  width: 62,
86
87
  fixed: 'left',
87
- // key: 'index',
88
- // render: (_text, _record, index) => `${index + 1}`,
88
+ key: 'index',
89
89
  },
90
90
  {
91
91
  title: i18next.t('测试列1'),
@@ -469,6 +469,100 @@ export default function EditTable() {
469
469
  var _e = useState(), iptNum = _e[0], setIptNum = _e[1];
470
470
  var _f = useState(false), open = _f[0], setOpen = _f[1];
471
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
+ ];
472
566
  return (React.createElement("div", null,
473
567
  React.createElement(Button, { onClick: function () {
474
568
  console.log(data, selectedRowKeys);
@@ -503,6 +597,7 @@ export default function EditTable() {
503
597
  }
504
598
  });
505
599
  }); } }, i18next.t('触发验证')),
600
+ num1 > 4 && (React.createElement(Table, { columns: lineColumns, dataSource: lineDataSource, pagination: false, scroll: { x: 1000 }, rowKey: "id", style: { marginBottom: 16 } })),
506
601
  React.createElement(ProEditTable, { rowKey: "idaa", className: "diffTable", columns: columns, dataSource: data,
507
602
  // 调用表格内部提供的方法
508
603
  tableHandleRef: tableHandleRef,
@@ -279,6 +279,7 @@ export function setDynamicKey(dynamicStorageKey, value, options) {
279
279
  }
280
280
  }
281
281
  function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig) {
282
+ var _a, _b, _c, _d;
282
283
  var columns = basicConfig.columns, newColumnsRef = basicConfig.newColumnsRef, showColumnDynamic = basicConfig.showColumnDynamic, showColumnDynamicKey = basicConfig.showColumnDynamicKey, configInfo = basicConfig.configInfo, currentDataSource = basicConfig.currentDataSource, preDataSource = basicConfig.preDataSource, rowKey = basicConfig.rowKey, dataSourceRef = basicConfig.dataSourceRef, expandableChildrenColumnName = basicConfig.expandableChildrenColumnName, upDateColumnsRef = basicConfig.upDateColumnsRef, setUpDateColumnsRef = basicConfig.setUpDateColumnsRef, isUpDateColumnsRef = basicConfig.isUpDateColumnsRef, setIsUpDateColumnsRef = basicConfig.setIsUpDateColumnsRef, isHasFilterRef = basicConfig.isHasFilterRef, diffData = basicConfig.diffData, isDiffDataIncludeEmpty = basicConfig.isDiffDataIncludeEmpty, diffDataColor = basicConfig.diffDataColor;
283
284
  var onEditableSave = editableConfig.onEditableSave, onTableChange = editableConfig.onTableChange, currentPage = editableConfig.currentPage, onFillDownChangeRef = editableConfig.onFillDownChangeRef;
284
285
  var ColumnDynamicCom = dynamicConfig.ColumnDynamicCom, DelAllCom = dynamicConfig.DelAllCom, onAddAndDelHandleMemo = dynamicConfig.onAddAndDelHandleMemo, onAddAndDelHandle = dynamicConfig.onAddAndDelHandle, hideAddIcon = dynamicConfig.hideAddIcon, addIconText = dynamicConfig.addIconText, hideDelIcon = dynamicConfig.hideDelIcon, delIconText = dynamicConfig.delIconText;
@@ -671,8 +672,11 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
671
672
  };
672
673
  }
673
674
  });
674
- // 编辑模式下,给序号列(第0列)注入编辑按钮
675
- if (onEditableSave && !hideIndexColumnEditBtn && _newColumns.length > 0) {
675
+ // 编辑模式下,给序号列(第0列)注入编辑按钮(仅当第一列是序号列时)
676
+ var isFirstColumnIndex = _newColumns.length > 0 &&
677
+ typeof ((_a = _newColumns[0]) === null || _a === void 0 ? void 0 : _a.title) === 'string' &&
678
+ ((_d = (_c = (_b = _newColumns[0]) === null || _b === void 0 ? void 0 : _b.title) === null || _c === void 0 ? void 0 : _c.includes) === null || _d === void 0 ? void 0 : _d.call(_c, i18next.t('序号')));
679
+ if (onEditableSave && !hideIndexColumnEditBtn && isFirstColumnIndex) {
676
680
  var indexColumn = _newColumns[0];
677
681
  var originalRender_1 = indexColumn.render;
678
682
  indexColumn.render = function (text, record, index) {
@@ -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 && item.dataIndex && item.dataIndex !== 'index';
49
+ return (item.key || item.dataIndex) && item.dataIndex !== 'index';
50
50
  })
51
51
  .map(function (item) {
52
- var originItem = originColumns.find(function (originItem) { return originItem.key === item.key; });
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: item.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),
@@ -291,7 +294,9 @@ var TableMenu = forwardRef(function (_a, ref) {
291
294
  React.createElement(Menu, { id: menuId },
292
295
  React.createElement(Item, { data: "detail", onClick: onMenuItemClick }, i18next.t('查看明细')),
293
296
  onEditableSave || !isContextMenuFullscreen ? null : (React.createElement(Item, { data: "fullscreen", onClick: onMenuItemClick }, isFull ? i18next.t('退出全屏') : i18next.t('全屏')))),
294
- React.createElement(Modal, { width: '800px', title: i18next.t('详情'), visible: visible, onCancel: onCancel, stick: true, loading: false, className: className, footer: React.createElement(Button, { type: "primary", onClick: onCancel }, i18next.t('确定')), getContainer: false },
297
+ React.createElement(Modal, { width: "80%", title: i18next.t('详情'), visible: visible, onCancel: onCancel,
298
+ // stick
299
+ mask: false, loading: false, className: className, footer: React.createElement(Button, { type: "primary", onClick: onCancel }, i18next.t('确定')), getContainer: false },
295
300
  React.createElement("div", { style: { maxHeight: '70vh', minWidth: '800px', overflow: 'auto' } },
296
301
  React.createElement("div", { className: "zt-table-detail-grid" }, record && renderItem(items))))));
297
302
  });
@@ -468,10 +468,6 @@ export interface IElectronSignaturesItemPublic {
468
468
  * 盖户用电子章与契约锁脱离关系
469
469
  */
470
470
  isShowOpeningContractSealNotRelyQys?: boolean;
471
- /**
472
- * 允许下载盖章件的流程状态,逗号分隔,如 '50,60,70',默认为 '50'
473
- */
474
- sealDownloadFlowStatus?: string;
475
471
  }
476
472
  export interface IElectronSignaturesProps extends IElectronSignaturesItem, IElectronSignaturesItemPublic {
477
473
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "4.2.23-593",
3
+ "version": "4.2.23-595",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",