fantasy-ngzorro 2.1.64 → 2.1.66
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/README.md +2 -0
- package/bundles/fantasy-ngzorro.umd.js +292 -15
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +2 -2
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-detail-lines/hd-detail-lines.component.js +105 -11
- package/esm2015/hd-detail-lines-page/hd-detail-lines-page.component.js +71 -9
- package/esm2015/utils/hd-table-scroll.util.js +82 -1
- package/esm5/hd-detail-lines/hd-detail-lines.component.js +128 -10
- package/esm5/hd-detail-lines-page/hd-detail-lines-page.component.js +87 -9
- package/esm5/utils/hd-table-scroll.util.js +82 -1
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +253 -16
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +292 -15
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-detail-lines/hd-detail-lines.component.d.ts +11 -2
- package/hd-detail-lines-page/hd-detail-lines-page.component.d.ts +7 -2
- package/package.json +2 -2
- package/utils/hd-table-scroll.util.d.ts +12 -0
package/README.md
CHANGED
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
| — | 2026-9-22 | `hd-tip` 支持右侧展开/收起(`showCollapse` / `[(expanded)]`),暴露 `expand` / `collapse` / `toggle` 供父组件控制其它区块 |
|
|
43
43
|
| — | 2026-9-22 | `hd-form-lines` 勾选提示改为 `tableTotal` 插槽(同 hd-table),组件内不再默认渲染已选中块 |
|
|
44
44
|
| — | 2026-9-22 | `hd-table` / `hd-detail-form` 字段值后支持编辑笔图标(`editable` + `edit` 回调,图标对齐 Figma) |
|
|
45
|
+
| — | 2026-9-24 | `hd-detail-lines` / `hd-detail-lines-page`:横滚时加固表头/表体 `scrollLeft` 同步与 `table-layout: fixed`,修复列名与列值不对齐 |
|
|
46
|
+
| — | 2026-9-24 | `hd-detail-lines`:补 `scroll.y` 后重建表格并同步表头横滚,修复列头不跟随左右滚动 |
|
|
45
47
|
| — | 2026-9-24 | `hd-detail-lines` / `hd-detail-lines-page`:自动或仅传 `scroll.x` 时补 `scroll.y`,修复窄屏下无法纵向滚动 |
|
|
46
48
|
| — | 2026-9-22 | `hd-table` 支持 `pagination` / `frontPagination`:全量 `content` 可「不分页展示」或「前端切片分页」,列表默认仍为服务端分页 |
|
|
47
49
|
| — | 2026-9-21 | hd-table 列 `color` 支持函数,按行给某一个字段标红 |
|
|
@@ -1505,6 +1505,87 @@
|
|
|
1505
1505
|
return { x: Math.ceil(width) + "px" };
|
|
1506
1506
|
}
|
|
1507
1507
|
return null;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* 取 ng-zorro 分体表头 / 表体滚动容器(含虚拟滚动)
|
|
1511
|
+
* @param {?} nzTable
|
|
1512
|
+
* @return {?}
|
|
1513
|
+
*/
|
|
1514
|
+
function getNzTableScrollElements(nzTable) {
|
|
1515
|
+
if (!nzTable) {
|
|
1516
|
+
return { header: null, body: null };
|
|
1517
|
+
}
|
|
1518
|
+
/** @type {?} */
|
|
1519
|
+
var nz = (/** @type {?} */ (nzTable));
|
|
1520
|
+
/** @type {?} */
|
|
1521
|
+
var header = ((/** @type {?} */ (nz.tableHeaderNativeElement))) || null;
|
|
1522
|
+
/** @type {?} */
|
|
1523
|
+
var body = ((/** @type {?} */ (nz.mixTableBodyNativeElement))) ||
|
|
1524
|
+
((/** @type {?} */ (nz.tableBodyNativeElement))) ||
|
|
1525
|
+
null;
|
|
1526
|
+
/** @type {?} */
|
|
1527
|
+
var main = nz.tableMainElement &&
|
|
1528
|
+
((/** @type {?} */ (nz.tableMainElement.nativeElement)));
|
|
1529
|
+
if (main) {
|
|
1530
|
+
if (!header) {
|
|
1531
|
+
header = (/** @type {?} */ (main.querySelector(".ant-table-header")));
|
|
1532
|
+
}
|
|
1533
|
+
if (!body) {
|
|
1534
|
+
body =
|
|
1535
|
+
((/** @type {?} */ (main.querySelector("cdk-virtual-scroll-viewport.ant-table-body")))) ||
|
|
1536
|
+
((/** @type {?} */ (main.querySelector(".ant-table-body"))));
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
return { header: header, body: body };
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
* 一次性把表体 scrollLeft 同步到表头
|
|
1543
|
+
* @param {?} nzTable
|
|
1544
|
+
* @return {?}
|
|
1545
|
+
*/
|
|
1546
|
+
function syncNzTableHeaderBodyScrollLeft(nzTable) {
|
|
1547
|
+
/** @type {?} */
|
|
1548
|
+
var els = getNzTableScrollElements(nzTable);
|
|
1549
|
+
if (!els.header || !els.body) {
|
|
1550
|
+
return;
|
|
1551
|
+
}
|
|
1552
|
+
if (els.header.scrollLeft !== els.body.scrollLeft) {
|
|
1553
|
+
els.header.scrollLeft = els.body.scrollLeft;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
/**
|
|
1557
|
+
* 监听表体横向滚动并同步表头。
|
|
1558
|
+
* 返回 unbind;DOM 未就绪时返回 null(调用方可重试)。
|
|
1559
|
+
* @param {?} nzTable
|
|
1560
|
+
* @return {?}
|
|
1561
|
+
*/
|
|
1562
|
+
function bindNzTableHeaderBodyScrollSync(nzTable) {
|
|
1563
|
+
/** @type {?} */
|
|
1564
|
+
var els = getNzTableScrollElements(nzTable);
|
|
1565
|
+
if (!els.header || !els.body) {
|
|
1566
|
+
return null;
|
|
1567
|
+
}
|
|
1568
|
+
/** @type {?} */
|
|
1569
|
+
var header = els.header;
|
|
1570
|
+
/** @type {?} */
|
|
1571
|
+
var body = els.body;
|
|
1572
|
+
/** @type {?} */
|
|
1573
|
+
var onScroll = (/**
|
|
1574
|
+
* @return {?}
|
|
1575
|
+
*/
|
|
1576
|
+
function () {
|
|
1577
|
+
if (header.scrollLeft !== body.scrollLeft) {
|
|
1578
|
+
header.scrollLeft = body.scrollLeft;
|
|
1579
|
+
}
|
|
1580
|
+
});
|
|
1581
|
+
body.addEventListener("scroll", onScroll);
|
|
1582
|
+
onScroll();
|
|
1583
|
+
return (/**
|
|
1584
|
+
* @return {?}
|
|
1585
|
+
*/
|
|
1586
|
+
function () {
|
|
1587
|
+
body.removeEventListener("scroll", onScroll);
|
|
1588
|
+
});
|
|
1508
1589
|
}
|
|
1509
1590
|
|
|
1510
1591
|
/**
|
|
@@ -1553,6 +1634,12 @@
|
|
|
1553
1634
|
*/
|
|
1554
1635
|
this.isFilterData = false;
|
|
1555
1636
|
this.storeFormLinesData = []; // 缓存的总的列表数据
|
|
1637
|
+
// 缓存的总的列表数据
|
|
1638
|
+
/**
|
|
1639
|
+
* 控制 nz-table 重建:scroll.y 从无到有时必须重建,否则表头不跟横滚
|
|
1640
|
+
*/
|
|
1641
|
+
this.showTable = true;
|
|
1642
|
+
this.unbindBodyScroll = null;
|
|
1556
1643
|
}
|
|
1557
1644
|
Object.defineProperty(HdDetailLinesComponent.prototype, "effectiveScroll", {
|
|
1558
1645
|
get: /**
|
|
@@ -1594,6 +1681,15 @@
|
|
|
1594
1681
|
function () {
|
|
1595
1682
|
this.scheduleSyncHorizontalScroll();
|
|
1596
1683
|
};
|
|
1684
|
+
/**
|
|
1685
|
+
* @return {?}
|
|
1686
|
+
*/
|
|
1687
|
+
HdDetailLinesComponent.prototype.ngOnDestroy = /**
|
|
1688
|
+
* @return {?}
|
|
1689
|
+
*/
|
|
1690
|
+
function () {
|
|
1691
|
+
this.unbindHeaderBodyScrollSync();
|
|
1692
|
+
};
|
|
1597
1693
|
/**
|
|
1598
1694
|
* @param {?} changes
|
|
1599
1695
|
* @return {?}
|
|
@@ -1632,19 +1728,21 @@
|
|
|
1632
1728
|
function (retry) {
|
|
1633
1729
|
var _this = this;
|
|
1634
1730
|
if (retry === void 0) { retry = 0; }
|
|
1635
|
-
if (this.scroll != null) {
|
|
1636
|
-
return;
|
|
1637
|
-
}
|
|
1638
1731
|
/** @type {?} */
|
|
1639
1732
|
var delay = retry === 0 ? 0 : 50;
|
|
1640
1733
|
setTimeout((/**
|
|
1641
1734
|
* @return {?}
|
|
1642
1735
|
*/
|
|
1643
1736
|
function () {
|
|
1644
|
-
_this.
|
|
1737
|
+
if (_this.scroll == null) {
|
|
1738
|
+
_this.syncHorizontalScroll();
|
|
1739
|
+
}
|
|
1740
|
+
_this.bindHeaderBodyScrollSync(0);
|
|
1645
1741
|
/** @type {?} */
|
|
1646
|
-
var afterX = _this.
|
|
1647
|
-
|
|
1742
|
+
var afterX = (_this.effectiveScroll && _this.effectiveScroll.x) ||
|
|
1743
|
+
(_this.tableScroll && _this.tableScroll.x);
|
|
1744
|
+
if (_this.scroll == null &&
|
|
1745
|
+
retry < 5 &&
|
|
1648
1746
|
_this.displayLines &&
|
|
1649
1747
|
_this.displayLines.length > 0 &&
|
|
1650
1748
|
!afterX &&
|
|
@@ -1695,6 +1793,10 @@
|
|
|
1695
1793
|
// 有横向滚动时必须带 y,否则窄屏下无法纵向滚动
|
|
1696
1794
|
/** @type {?} */
|
|
1697
1795
|
var nextY = nextX ? this.getAutoScrollY() : null;
|
|
1796
|
+
/** @type {?} */
|
|
1797
|
+
var prevHasY = !!(this.tableScroll && this.tableScroll.y);
|
|
1798
|
+
/** @type {?} */
|
|
1799
|
+
var nextHasY = !!nextY;
|
|
1698
1800
|
if (this.tableScroll &&
|
|
1699
1801
|
this.tableScroll.x === nextX &&
|
|
1700
1802
|
this.tableScroll.y === nextY) {
|
|
@@ -1703,7 +1805,94 @@
|
|
|
1703
1805
|
this.tableScroll = nextX
|
|
1704
1806
|
? { x: nextX, y: nextY }
|
|
1705
1807
|
: null;
|
|
1808
|
+
// ng-zorro 只在 AfterViewInit 绑一次 header/body 横滚同步;
|
|
1809
|
+
// 运行中从无 y 变为有 y 会丢监听,表现为列头不跟着横滚 → 必须重建表格
|
|
1810
|
+
if (prevHasY !== nextHasY) {
|
|
1811
|
+
this.remountTable();
|
|
1812
|
+
return;
|
|
1813
|
+
}
|
|
1706
1814
|
this.cdr.markForCheck();
|
|
1815
|
+
this.bindHeaderBodyScrollSync(0);
|
|
1816
|
+
};
|
|
1817
|
+
/** 重建 nz-table,让 header/body 滚动同步在 AfterViewInit 重新绑定 */
|
|
1818
|
+
/**
|
|
1819
|
+
* 重建 nz-table,让 header/body 滚动同步在 AfterViewInit 重新绑定
|
|
1820
|
+
* @private
|
|
1821
|
+
* @return {?}
|
|
1822
|
+
*/
|
|
1823
|
+
HdDetailLinesComponent.prototype.remountTable = /**
|
|
1824
|
+
* 重建 nz-table,让 header/body 滚动同步在 AfterViewInit 重新绑定
|
|
1825
|
+
* @private
|
|
1826
|
+
* @return {?}
|
|
1827
|
+
*/
|
|
1828
|
+
function () {
|
|
1829
|
+
var _this = this;
|
|
1830
|
+
this.unbindHeaderBodyScrollSync();
|
|
1831
|
+
setTimeout((/**
|
|
1832
|
+
* @return {?}
|
|
1833
|
+
*/
|
|
1834
|
+
function () {
|
|
1835
|
+
_this.showTable = false;
|
|
1836
|
+
_this.cdr.markForCheck();
|
|
1837
|
+
setTimeout((/**
|
|
1838
|
+
* @return {?}
|
|
1839
|
+
*/
|
|
1840
|
+
function () {
|
|
1841
|
+
_this.showTable = true;
|
|
1842
|
+
_this.cdr.markForCheck();
|
|
1843
|
+
setTimeout((/**
|
|
1844
|
+
* @return {?}
|
|
1845
|
+
*/
|
|
1846
|
+
function () { return _this.bindHeaderBodyScrollSync(0); }));
|
|
1847
|
+
}));
|
|
1848
|
+
}));
|
|
1849
|
+
};
|
|
1850
|
+
/** 表体横滚时同步表头(兜底 ng-zorro 监听丢失);DOM 未就绪时重试 */
|
|
1851
|
+
/**
|
|
1852
|
+
* 表体横滚时同步表头(兜底 ng-zorro 监听丢失);DOM 未就绪时重试
|
|
1853
|
+
* @private
|
|
1854
|
+
* @param {?=} retry
|
|
1855
|
+
* @return {?}
|
|
1856
|
+
*/
|
|
1857
|
+
HdDetailLinesComponent.prototype.bindHeaderBodyScrollSync = /**
|
|
1858
|
+
* 表体横滚时同步表头(兜底 ng-zorro 监听丢失);DOM 未就绪时重试
|
|
1859
|
+
* @private
|
|
1860
|
+
* @param {?=} retry
|
|
1861
|
+
* @return {?}
|
|
1862
|
+
*/
|
|
1863
|
+
function (retry) {
|
|
1864
|
+
var _this = this;
|
|
1865
|
+
if (retry === void 0) { retry = 0; }
|
|
1866
|
+
this.unbindHeaderBodyScrollSync();
|
|
1867
|
+
if (!this.nzTableComponent || !(this.effectiveScroll && this.effectiveScroll.x)) {
|
|
1868
|
+
return;
|
|
1869
|
+
}
|
|
1870
|
+
/** @type {?} */
|
|
1871
|
+
var unbind = bindNzTableHeaderBodyScrollSync(this.nzTableComponent);
|
|
1872
|
+
if (unbind) {
|
|
1873
|
+
this.unbindBodyScroll = unbind;
|
|
1874
|
+
return;
|
|
1875
|
+
}
|
|
1876
|
+
if (retry < 8) {
|
|
1877
|
+
setTimeout((/**
|
|
1878
|
+
* @return {?}
|
|
1879
|
+
*/
|
|
1880
|
+
function () { return _this.bindHeaderBodyScrollSync(retry + 1); }), 50);
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
/**
|
|
1884
|
+
* @private
|
|
1885
|
+
* @return {?}
|
|
1886
|
+
*/
|
|
1887
|
+
HdDetailLinesComponent.prototype.unbindHeaderBodyScrollSync = /**
|
|
1888
|
+
* @private
|
|
1889
|
+
* @return {?}
|
|
1890
|
+
*/
|
|
1891
|
+
function () {
|
|
1892
|
+
if (this.unbindBodyScroll) {
|
|
1893
|
+
this.unbindBodyScroll();
|
|
1894
|
+
this.unbindBodyScroll = null;
|
|
1895
|
+
}
|
|
1707
1896
|
};
|
|
1708
1897
|
/**
|
|
1709
1898
|
* @private
|
|
@@ -2064,8 +2253,8 @@
|
|
|
2064
2253
|
HdDetailLinesComponent.decorators = [
|
|
2065
2254
|
{ type: core.Component, args: [{
|
|
2066
2255
|
selector: "hd-detail-lines",
|
|
2067
|
-
template: "<ng-container>\n <hd-button-group *ngIf=\"showSearch\">\n <ng-template #buttonGroupLeft>\n <nz-input-group [nzSuffix]=\"suffixIconSearch\">\n <input type=\"text\" nz-input (keyup.enter)=\"searchLines()\" placeholder=\"\u8BF7\u8F93\u5165\u5185\u5BB9\u641C\u7D22\" style=\"width: 300px;\"\n [(ngModel)]=\"filterStr\" />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <i nz-icon nzType=\"search\" (click)=\"searchLines()\"></i>\n </ng-template>\n </ng-template>\n </hd-button-group>\n\n <hd-space *ngIf=\"showSearch\" background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n\n <nz-table #hdTable [
|
|
2068
|
-
styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset}::ng-deep .ant-form-item-label>label{color:#4b504e;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}::ng-deep .hd-table-container .ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-th-right-sticky{z-index:2;transform:translateZ(0)}::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-right-sticky{background:#f5f8f6!important}::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-right-sticky{background:#fff}::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-right-sticky{background:#ecf8f1!important}::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-th-right-sticky{box-shadow:none!important}::ng-deep .hd-table-container .ant-table-fixed-right{right:0!important}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:14px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-pagination-options .ant-select,::ng-deep .ant-pagination-options .ant-select-selection--single{min-width:100px}::ng-deep .ant-pagination-options-size-changer.ant-select{min-width:100px}::ng-deep .ant-time-picker{width:100%}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child{width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;min-width:var(--hd-cascader-menu-min-width,auto);max-width:560px}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child .ant-cascader-menu-item{white-space:nowrap}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-right-sticky{background:#f7f8fa!important;color:#868a9c!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a{color:#20b95d!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a:hover{color:#20bd62!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group .common-danger-btn:hover{color:#f05b24!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-table-cell-value>a,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td>a{color:#20b95d}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-billNumber>a{color:#3b77e3}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-status-text{color:#868a9c!important}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}"]
|
|
2256
|
+
template: "<ng-container>\n <hd-button-group *ngIf=\"showSearch\">\n <ng-template #buttonGroupLeft>\n <nz-input-group [nzSuffix]=\"suffixIconSearch\">\n <input type=\"text\" nz-input (keyup.enter)=\"searchLines()\" placeholder=\"\u8BF7\u8F93\u5165\u5185\u5BB9\u641C\u7D22\" style=\"width: 300px;\"\n [(ngModel)]=\"filterStr\" />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <i nz-icon nzType=\"search\" (click)=\"searchLines()\"></i>\n </ng-template>\n </ng-template>\n </hd-button-group>\n\n <hd-space *ngIf=\"showSearch\" background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n\n <nz-table *ngIf=\"showTable\" #hdTable class=\"hd-table-container\"\n [class.hd-detail-lines--scroll-y]=\"!!(effectiveScroll && effectiveScroll.y)\"\n [class.hd-detail-lines--scroll-x]=\"!!(effectiveScroll && effectiveScroll.x)\"\n [nzScroll]=\"effectiveScroll\" nzShowSizeChanger\n [nzFrontPagination]=\"hdFrontPagination\" [nzShowQuickJumper]=\"hdFrontPagination\" [nzShowTotal]=\"tableTotalTemplate\"\n nzSize=\"middle\" [nzData]=\"displayLines\" [nzLoading]=\"tableLoading\" [(nzPageSize)]=\"tablePageSize\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200, 500, 1000 ]\"\n (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\">\n <thead>\n <tr>\n <th *ngIf=\"showSelected\" nzWidth=\"40px\" nzLeft=\"0px\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngTemplateOutlet=\"detailLineHead\"></ng-container>\n </tr>\n </thead>\n <tbody *ngIf=\"!allowDrop;else allowDropTemplate\">\n <tr *ngFor=\"let data of hdTable.data;index as i\" [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\n <td *ngIf=\"showSelected\" nzWidth=\"40px\" nzLeft=\"0px\" nzShowCheckbox\n [nzChecked]=\"mapOfCheckedId[data[selectField]]\" [nzDisabled]=\"isSelectDisabled(data)\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngTemplateOutlet=\"detailLineBody;context:{$implicit: data, index: i}\"></ng-container>\n </tr>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td *ngIf=\"showSelected\"></td>\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td *ngIf=\"!totalOption.isHide\" [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{\n (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value, totalOption.preserveNumber).toFixed(totalOption.preserveNumber)) : '' }} </td>\n </ng-container>\n </tr>\n </tbody>\n <ng-template #allowDropTemplate>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <tr *ngFor=\"let data of hdTable.data;index as i\" cdkDrag [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\n <td *ngIf=\"showSelected\" nzWidth=\"40px\" nzLeft=\"0px\" nzShowCheckbox\n [nzChecked]=\"mapOfCheckedId[data[selectField]]\" [nzDisabled]=\"isSelectDisabled(data)\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngTemplateOutlet=\"detailLineBody;context:{$implicit: data, index: i}\"></ng-container>\n </tr>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td *ngIf=\"showSelected\"></td>\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td *ngIf=\"!totalOption.isHide\" [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{\n (totalOption.value || totalOption.value\n === 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value, totalOption.preserveNumber).toFixed(totalOption.preserveNumber)) : '' }} </td>\n </ng-container>\n </tr>\n </tbody>\n </ng-template>\n <ng-template #tableTotalTemplate>\n \u5171 {{displayLines.length}} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n",
|
|
2257
|
+
styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset}::ng-deep .ant-form-item-label>label{color:#4b504e;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}::ng-deep .hd-table-container .ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-th-right-sticky{z-index:2;transform:translateZ(0)}::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-right-sticky{background:#f5f8f6!important}::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-right-sticky{background:#fff}::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-right-sticky{background:#ecf8f1!important}::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-th-right-sticky{box-shadow:none!important}::ng-deep .hd-table-container .ant-table-fixed-right{right:0!important}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:14px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-pagination-options .ant-select,::ng-deep .ant-pagination-options .ant-select-selection--single{min-width:100px}::ng-deep .ant-pagination-options-size-changer.ant-select{min-width:100px}::ng-deep .ant-time-picker{width:100%}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child{width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;min-width:var(--hd-cascader-menu-min-width,auto);max-width:560px}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child .ant-cascader-menu-item{white-space:nowrap}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-right-sticky{background:#f7f8fa!important;color:#868a9c!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a{color:#20b95d!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a:hover{color:#20bd62!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group .common-danger-btn:hover{color:#f05b24!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-table-cell-value>a,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td>a{color:#20b95d}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-billNumber>a{color:#3b77e3}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-status-text{color:#868a9c!important}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}.hd-table-container.hd-detail-lines--scroll-x ::ng-deep .ant-table-body table,.hd-table-container.hd-detail-lines--scroll-x ::ng-deep .ant-table-header table{table-layout:fixed}.hd-table-container.hd-detail-lines--scroll-x ::ng-deep .ant-table-tbody>tr>td,.hd-table-container.hd-detail-lines--scroll-x ::ng-deep .ant-table-thead>tr>th{box-sizing:border-box}.hd-table-container:not(.hd-detail-lines--scroll-y):not(.hd-detail-lines--scroll-x) ::ng-deep .ant-table-body{max-height:none!important;overflow-y:visible!important}"]
|
|
2069
2258
|
}] }
|
|
2070
2259
|
];
|
|
2071
2260
|
/** @nocollapse */
|
|
@@ -2199,6 +2388,16 @@
|
|
|
2199
2388
|
HdDetailLinesComponent.prototype.isFilterData;
|
|
2200
2389
|
/** @type {?} */
|
|
2201
2390
|
HdDetailLinesComponent.prototype.storeFormLinesData;
|
|
2391
|
+
/**
|
|
2392
|
+
* 控制 nz-table 重建:scroll.y 从无到有时必须重建,否则表头不跟横滚
|
|
2393
|
+
* @type {?}
|
|
2394
|
+
*/
|
|
2395
|
+
HdDetailLinesComponent.prototype.showTable;
|
|
2396
|
+
/**
|
|
2397
|
+
* @type {?}
|
|
2398
|
+
* @private
|
|
2399
|
+
*/
|
|
2400
|
+
HdDetailLinesComponent.prototype.unbindBodyScroll;
|
|
2202
2401
|
/**
|
|
2203
2402
|
* @type {?}
|
|
2204
2403
|
* @private
|
|
@@ -2280,6 +2479,7 @@
|
|
|
2280
2479
|
*/
|
|
2281
2480
|
this.measuredVirtualItemSize = 47;
|
|
2282
2481
|
this.virtualScrollActive = null;
|
|
2482
|
+
this.unbindBodyScroll = null;
|
|
2283
2483
|
/**
|
|
2284
2484
|
* 虚拟滚动按数组下标追踪,避免业务主键 trackBy 导致 CDK 行复用错位
|
|
2285
2485
|
*/
|
|
@@ -2395,6 +2595,15 @@
|
|
|
2395
2595
|
this.scheduleSyncHorizontalScroll();
|
|
2396
2596
|
this.applyTableScrollMode(true);
|
|
2397
2597
|
};
|
|
2598
|
+
/**
|
|
2599
|
+
* @return {?}
|
|
2600
|
+
*/
|
|
2601
|
+
HdDetailLinesPageComponent.prototype.ngOnDestroy = /**
|
|
2602
|
+
* @return {?}
|
|
2603
|
+
*/
|
|
2604
|
+
function () {
|
|
2605
|
+
this.unbindHeaderBodyScrollSync();
|
|
2606
|
+
};
|
|
2398
2607
|
/**
|
|
2399
2608
|
* @param {?} changes
|
|
2400
2609
|
* @return {?}
|
|
@@ -2454,6 +2663,7 @@
|
|
|
2454
2663
|
this.virtualScrollActive !== useVirtual;
|
|
2455
2664
|
this.virtualScrollActive = useVirtual;
|
|
2456
2665
|
if (forceRemount || modeChanged) {
|
|
2666
|
+
this.unbindHeaderBodyScrollSync();
|
|
2457
2667
|
// 延后销毁/重建,避免当前 CD 周期内 ngIf 变更触发 ExpressionChanged
|
|
2458
2668
|
setTimeout((/**
|
|
2459
2669
|
* @return {?}
|
|
@@ -2492,6 +2702,7 @@
|
|
|
2492
2702
|
*/
|
|
2493
2703
|
function (useVirtual) {
|
|
2494
2704
|
this.scheduleSyncHorizontalScroll();
|
|
2705
|
+
this.bindHeaderBodyScrollSync(0);
|
|
2495
2706
|
if (useVirtual) {
|
|
2496
2707
|
this.refreshVirtualScrollViewport(true);
|
|
2497
2708
|
}
|
|
@@ -2508,6 +2719,7 @@
|
|
|
2508
2719
|
var _this = this;
|
|
2509
2720
|
if (forceMeasure === void 0) { forceMeasure = false; }
|
|
2510
2721
|
if (!this.useVirtualScroll) {
|
|
2722
|
+
this.bindHeaderBodyScrollSync(0);
|
|
2511
2723
|
return;
|
|
2512
2724
|
}
|
|
2513
2725
|
setTimeout((/**
|
|
@@ -2520,6 +2732,7 @@
|
|
|
2520
2732
|
if (viewport) {
|
|
2521
2733
|
viewport.checkViewportSize();
|
|
2522
2734
|
}
|
|
2735
|
+
_this.bindHeaderBodyScrollSync(0);
|
|
2523
2736
|
_this.cdr.markForCheck();
|
|
2524
2737
|
}));
|
|
2525
2738
|
};
|
|
@@ -2562,19 +2775,21 @@
|
|
|
2562
2775
|
function (retry) {
|
|
2563
2776
|
var _this = this;
|
|
2564
2777
|
if (retry === void 0) { retry = 0; }
|
|
2565
|
-
if (this.scroll != null) {
|
|
2566
|
-
return;
|
|
2567
|
-
}
|
|
2568
2778
|
/** @type {?} */
|
|
2569
2779
|
var delay = retry === 0 ? 0 : 50;
|
|
2570
2780
|
setTimeout((/**
|
|
2571
2781
|
* @return {?}
|
|
2572
2782
|
*/
|
|
2573
2783
|
function () {
|
|
2574
|
-
_this.
|
|
2784
|
+
if (_this.scroll == null) {
|
|
2785
|
+
_this.syncHorizontalScroll();
|
|
2786
|
+
}
|
|
2787
|
+
_this.bindHeaderBodyScrollSync(0);
|
|
2575
2788
|
/** @type {?} */
|
|
2576
|
-
var afterX = _this.
|
|
2577
|
-
|
|
2789
|
+
var afterX = (_this.resolvedScroll && _this.resolvedScroll.x) ||
|
|
2790
|
+
(_this.tableScroll && _this.tableScroll.x);
|
|
2791
|
+
if (_this.scroll == null &&
|
|
2792
|
+
retry < 5 &&
|
|
2578
2793
|
_this.displayLines &&
|
|
2579
2794
|
_this.displayLines.length > 0 &&
|
|
2580
2795
|
!afterX &&
|
|
@@ -2625,6 +2840,10 @@
|
|
|
2625
2840
|
var currentY = this.tableScroll ? this.tableScroll.y : null;
|
|
2626
2841
|
/** @type {?} */
|
|
2627
2842
|
var nextY = currentY || (nextX ? this.getAutoScrollY() : null);
|
|
2843
|
+
/** @type {?} */
|
|
2844
|
+
var prevHasY = !!(this.tableScroll && this.tableScroll.y);
|
|
2845
|
+
/** @type {?} */
|
|
2846
|
+
var nextHasY = !!nextY;
|
|
2628
2847
|
if (this.tableScroll &&
|
|
2629
2848
|
this.tableScroll.x === nextX &&
|
|
2630
2849
|
this.tableScroll.y === nextY) {
|
|
@@ -2633,7 +2852,60 @@
|
|
|
2633
2852
|
this.tableScroll = nextX || nextY
|
|
2634
2853
|
? { x: nextX, y: nextY }
|
|
2635
2854
|
: null;
|
|
2855
|
+
// y 从无到有必须重建,否则表头不跟横滚
|
|
2856
|
+
if (prevHasY !== nextHasY) {
|
|
2857
|
+
this.applyTableScrollMode(true);
|
|
2858
|
+
return;
|
|
2859
|
+
}
|
|
2636
2860
|
this.cdr.markForCheck();
|
|
2861
|
+
this.bindHeaderBodyScrollSync(0);
|
|
2862
|
+
};
|
|
2863
|
+
/** 表体横滚时同步表头;DOM 未就绪时重试 */
|
|
2864
|
+
/**
|
|
2865
|
+
* 表体横滚时同步表头;DOM 未就绪时重试
|
|
2866
|
+
* @private
|
|
2867
|
+
* @param {?=} retry
|
|
2868
|
+
* @return {?}
|
|
2869
|
+
*/
|
|
2870
|
+
HdDetailLinesPageComponent.prototype.bindHeaderBodyScrollSync = /**
|
|
2871
|
+
* 表体横滚时同步表头;DOM 未就绪时重试
|
|
2872
|
+
* @private
|
|
2873
|
+
* @param {?=} retry
|
|
2874
|
+
* @return {?}
|
|
2875
|
+
*/
|
|
2876
|
+
function (retry) {
|
|
2877
|
+
var _this = this;
|
|
2878
|
+
if (retry === void 0) { retry = 0; }
|
|
2879
|
+
this.unbindHeaderBodyScrollSync();
|
|
2880
|
+
if (!this.nzTableComponent || !(this.resolvedScroll && this.resolvedScroll.x)) {
|
|
2881
|
+
return;
|
|
2882
|
+
}
|
|
2883
|
+
/** @type {?} */
|
|
2884
|
+
var unbind = bindNzTableHeaderBodyScrollSync(this.nzTableComponent);
|
|
2885
|
+
if (unbind) {
|
|
2886
|
+
this.unbindBodyScroll = unbind;
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2889
|
+
if (retry < 8) {
|
|
2890
|
+
setTimeout((/**
|
|
2891
|
+
* @return {?}
|
|
2892
|
+
*/
|
|
2893
|
+
function () { return _this.bindHeaderBodyScrollSync(retry + 1); }), 50);
|
|
2894
|
+
}
|
|
2895
|
+
};
|
|
2896
|
+
/**
|
|
2897
|
+
* @private
|
|
2898
|
+
* @return {?}
|
|
2899
|
+
*/
|
|
2900
|
+
HdDetailLinesPageComponent.prototype.unbindHeaderBodyScrollSync = /**
|
|
2901
|
+
* @private
|
|
2902
|
+
* @return {?}
|
|
2903
|
+
*/
|
|
2904
|
+
function () {
|
|
2905
|
+
if (this.unbindBodyScroll) {
|
|
2906
|
+
this.unbindBodyScroll();
|
|
2907
|
+
this.unbindBodyScroll = null;
|
|
2908
|
+
}
|
|
2637
2909
|
};
|
|
2638
2910
|
Object.defineProperty(HdDetailLinesPageComponent.prototype, "displayLines", {
|
|
2639
2911
|
get: /**
|
|
@@ -2939,7 +3211,7 @@
|
|
|
2939
3211
|
{ type: core.Component, args: [{
|
|
2940
3212
|
selector: "hd-detail-lines-page",
|
|
2941
3213
|
template: "<ng-container>\n <nz-table\n *ngIf=\"showTable\"\n #hdTable\n class=\"hd-table-container\"\n [class.hd-detail-lines-page--virtual]=\"useVirtualScroll\"\n [class.hd-detail-lines-page--scroll-y]=\"!!(resolvedScroll && resolvedScroll.y)\"\n [class.hd-detail-lines-page--scroll-x]=\"!!(resolvedScroll && resolvedScroll.x)\"\n [nzScroll]=\"resolvedScroll\"\n nzShowSizeChanger\n nzShowQuickJumper\n nzFrontPagination=\"false\"\n nzSize=\"middle\"\n [nzData]=\"displayLines\"\n [nzTotal]=\"totalCount\"\n [(nzPageIndex)]=\"tablePageIndex\"\n [(nzPageSize)]=\"tablePageSize\"\n [nzLoading]=\"tableLoading\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200, 500, 1000 ]\"\n (nzPageIndexChange)=\"onPageIndexChange($event)\"\n (nzPageSizeChange)=\"onPageSizeChange($event)\"\n [nzShowTotal]=\"tableTotalTemplate\"\n (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\"\n [nzVirtualScroll]=\"useVirtualScroll\"\n [nzVirtualItemSize]=\"useVirtualScroll ? effectiveVirtualItemSize : 0\"\n [nzVirtualForTrackBy]=\"virtualTrackByRow\"\n >\n <thead>\n <tr>\n <th *ngIf=\"showSelected\" nzWidth=\"40px\" nzLeft=\"0px\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngTemplateOutlet=\"detailLineHead\"></ng-container>\n </tr>\n </thead>\n <tbody *ngIf=\"!allowDrop;else allowDropTemplate\">\n <ng-template *ngIf=\"useVirtualScroll\" nz-virtual-scroll let-data let-index=\"index\">\n <tr class=\"hd-detail-lines-page-virtual-row\" [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\n <td *ngIf=\"showSelected\" nzWidth=\"40px\" nzLeft=\"0px\" nzShowCheckbox\n [nzChecked]=\"mapOfCheckedId[data[selectField]]\" [nzDisabled]=\"isSelectDisabled(data)\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container\n *ngTemplateOutlet=\"detailLineBody;context:{$implicit: data, index: getRowIndex(index)}\"></ng-container>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!useVirtualScroll\">\n <tr *ngFor=\"let data of hdTable.data;index as i\" [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\n <td *ngIf=\"showSelected\" nzWidth=\"40px\" nzLeft=\"0px\" nzShowCheckbox\n [nzChecked]=\"mapOfCheckedId[data[selectField]]\" [nzDisabled]=\"isSelectDisabled(data)\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container\n *ngTemplateOutlet=\"detailLineBody;context:{$implicit: data, index: getRowIndex(i)}\"></ng-container>\n </tr>\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td *ngIf=\"showSelected\"></td>\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td *ngIf=\"!totalOption.isHide\" [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{\n (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value, totalOption.preserveNumber).toFixed(totalOption.preserveNumber)) : '' }} </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n <tfoot *ngIf=\"useVirtualScroll && showTotal\">\n <tr class=\"hd-table-total\">\n <td *ngIf=\"showSelected\"></td>\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td *ngIf=\"!totalOption.isHide\" [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{\n (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value, totalOption.preserveNumber).toFixed(totalOption.preserveNumber)) : '' }} </td>\n </ng-container>\n </tr>\n </tfoot>\n <ng-template #allowDropTemplate>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <tr *ngFor=\"let data of hdTable.data;index as i\" cdkDrag [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\n <td *ngIf=\"showSelected\" nzWidth=\"40px\" nzLeft=\"0px\" nzShowCheckbox\n [nzChecked]=\"mapOfCheckedId[data[selectField]]\" [nzDisabled]=\"isSelectDisabled(data)\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container\n *ngTemplateOutlet=\"detailLineBody;context:{$implicit: data, index: getRowIndex(i)}\"></ng-container>\n </tr>\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td *ngIf=\"showSelected\"></td>\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td *ngIf=\"!totalOption.isHide\" [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{\n (totalOption.value || totalOption.value\n === 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value, totalOption.preserveNumber).toFixed(totalOption.preserveNumber)) : '' }} </td>\n </ng-container>\n </tr>\n </tbody>\n </ng-template>\n <ng-template #tableTotalTemplate>\n \u5171 {{totalCount}} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n",
|
|
2942
|
-
styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset}::ng-deep .ant-form-item-label>label{color:#4b504e;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}::ng-deep .hd-table-container .ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-th-right-sticky{z-index:2;transform:translateZ(0)}::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-right-sticky{background:#f5f8f6!important}::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-right-sticky{background:#fff}::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-right-sticky{background:#ecf8f1!important}::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-th-right-sticky{box-shadow:none!important}::ng-deep .hd-table-container .ant-table-fixed-right{right:0!important}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:14px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-pagination-options .ant-select,::ng-deep .ant-pagination-options .ant-select-selection--single{min-width:100px}::ng-deep .ant-pagination-options-size-changer.ant-select{min-width:100px}::ng-deep .ant-time-picker{width:100%}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child{width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;min-width:var(--hd-cascader-menu-min-width,auto);max-width:560px}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child .ant-cascader-menu-item{white-space:nowrap}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-right-sticky{background:#f7f8fa!important;color:#868a9c!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a{color:#20b95d!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a:hover{color:#20bd62!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group .common-danger-btn:hover{color:#f05b24!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-table-cell-value>a,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td>a{color:#20b95d}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-billNumber>a{color:#3b77e3}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-status-text{color:#868a9c!important}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}.hd-table-container ::ng-deep cdk-virtual-scroll-viewport.ant-table-body .hd-detail-lines-page-virtual-row>td{box-sizing:border-box}.hd-table-container:not(.hd-detail-lines-page--scroll-y):not(.hd-detail-lines-page--scroll-x) ::ng-deep .ant-table-body{max-height:none!important;overflow-y:visible!important}"]
|
|
3214
|
+
styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset}::ng-deep .ant-form-item-label>label{color:#4b504e;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}::ng-deep .hd-table-container .ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-th-right-sticky{z-index:2;transform:translateZ(0)}::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-right-sticky{background:#f5f8f6!important}::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-right-sticky{background:#fff}::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-right-sticky{background:#ecf8f1!important}::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-th-right-sticky{box-shadow:none!important}::ng-deep .hd-table-container .ant-table-fixed-right{right:0!important}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:14px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-pagination-options .ant-select,::ng-deep .ant-pagination-options .ant-select-selection--single{min-width:100px}::ng-deep .ant-pagination-options-size-changer.ant-select{min-width:100px}::ng-deep .ant-time-picker{width:100%}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child{width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;min-width:var(--hd-cascader-menu-min-width,auto);max-width:560px}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child .ant-cascader-menu-item{white-space:nowrap}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-right-sticky{background:#f7f8fa!important;color:#868a9c!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a{color:#20b95d!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a:hover{color:#20bd62!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group .common-danger-btn:hover{color:#f05b24!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-table-cell-value>a,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td>a{color:#20b95d}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-billNumber>a{color:#3b77e3}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-status-text{color:#868a9c!important}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}.hd-table-container ::ng-deep cdk-virtual-scroll-viewport.ant-table-body .hd-detail-lines-page-virtual-row>td{box-sizing:border-box}.hd-table-container.hd-detail-lines-page--scroll-x ::ng-deep .ant-table-body table,.hd-table-container.hd-detail-lines-page--scroll-x ::ng-deep .ant-table-header table,.hd-table-container.hd-detail-lines-page--scroll-x ::ng-deep cdk-virtual-scroll-viewport.ant-table-body table{table-layout:fixed}.hd-table-container.hd-detail-lines-page--scroll-x ::ng-deep .ant-table-tbody>tr>td,.hd-table-container.hd-detail-lines-page--scroll-x ::ng-deep .ant-table-thead>tr>th{box-sizing:border-box}.hd-table-container:not(.hd-detail-lines-page--scroll-y):not(.hd-detail-lines-page--scroll-x) ::ng-deep .ant-table-body{max-height:none!important;overflow-y:visible!important}"]
|
|
2943
3215
|
}] }
|
|
2944
3216
|
];
|
|
2945
3217
|
/** @nocollapse */
|
|
@@ -3090,6 +3362,11 @@
|
|
|
3090
3362
|
* @private
|
|
3091
3363
|
*/
|
|
3092
3364
|
HdDetailLinesPageComponent.prototype.virtualScrollActive;
|
|
3365
|
+
/**
|
|
3366
|
+
* @type {?}
|
|
3367
|
+
* @private
|
|
3368
|
+
*/
|
|
3369
|
+
HdDetailLinesPageComponent.prototype.unbindBodyScroll;
|
|
3093
3370
|
/**
|
|
3094
3371
|
* 虚拟滚动按数组下标追踪,避免业务主键 trackBy 导致 CDK 行复用错位
|
|
3095
3372
|
* @type {?}
|