fantasy-ngzorro 1.0.42 → 1.0.44

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.
@@ -1750,6 +1750,11 @@
1750
1750
  this.columnsNumber = 0;
1751
1751
  this.totalOptionList = [];
1752
1752
  this.showForm = false;
1753
+ this.storeFormLinesData = []; // 缓存的总的表单数据
1754
+ // 缓存的总的表单数据
1755
+ this.filterStoreFormLinesData = []; // 筛选出来的数据列表
1756
+ // 筛选出来的数据列表
1757
+ this.filterIndexStore = []; // 筛选出来的数据在原始列表中的下标
1753
1758
  }
1754
1759
  /**
1755
1760
  * @return {?}
@@ -1758,6 +1763,8 @@
1758
1763
  * @return {?}
1759
1764
  */
1760
1765
  function () {
1766
+ // 缓存一下总的表单数据
1767
+ this.storeFormLinesData = this.formLinesData;
1761
1768
  this.init();
1762
1769
  };
1763
1770
  Object.defineProperty(HdFormLinesComponent.prototype, "linesFormArray", {
@@ -1780,6 +1787,94 @@
1780
1787
  enumerable: true,
1781
1788
  configurable: true
1782
1789
  });
1790
+ // 暴露的方法,用于获取所有数据的valid状态
1791
+ // 暴露的方法,用于获取所有数据的valid状态
1792
+ /**
1793
+ * @return {?}
1794
+ */
1795
+ HdFormLinesComponent.prototype.getValid =
1796
+ // 暴露的方法,用于获取所有数据的valid状态
1797
+ /**
1798
+ * @return {?}
1799
+ */
1800
+ function () {
1801
+ var _this = this;
1802
+ /** @type {?} */
1803
+ var tmpValidateHdFormLines = this.fb.group({
1804
+ 'lines': this.fb.array([])
1805
+ });
1806
+ this.storeFormLinesData.forEach((/**
1807
+ * @param {?} formLinesDataItem
1808
+ * @return {?}
1809
+ */
1810
+ function (formLinesDataItem) {
1811
+ /** @type {?} */
1812
+ var formGroupObj = {};
1813
+ _this.formLines.forEach((/**
1814
+ * @param {?} item
1815
+ * @return {?}
1816
+ */
1817
+ function (item) {
1818
+ // 新增行 初始数据都为null
1819
+ formGroupObj[item.name] = _this.fb.control({ value: formLinesDataItem[item.name] === 0 ? 0 : (formLinesDataItem[item.name] || item.value || null), disabled: item.disabled }, item.require ? [forms.Validators.required] : []);
1820
+ if (item.selectOption && item.selectOption.label) {
1821
+ formGroupObj[item.selectOption.label] = _this.fb.control(formLinesDataItem[item.selectOption.label] || null, []);
1822
+ }
1823
+ }));
1824
+ formGroupObj.lineIndex = _this.fb.control(((/** @type {?} */ (tmpValidateHdFormLines.get('lines')))).controls.length, []);
1825
+ /** @type {?} */
1826
+ var formGroupTmp = _this.fb.group(formGroupObj);
1827
+ _this.formLines.forEach((/**
1828
+ * @param {?} item
1829
+ * @return {?}
1830
+ */
1831
+ function (item) {
1832
+ if (item.onChangeEvent) {
1833
+ formGroupTmp.get(item.name).valueChanges.subscribe((/**
1834
+ * @param {?} value
1835
+ * @return {?}
1836
+ */
1837
+ function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupTmp); }));
1838
+ }
1839
+ }));
1840
+ ((/** @type {?} */ (tmpValidateHdFormLines.get('lines')))).insert(((/** @type {?} */ (tmpValidateHdFormLines.get('lines')))).controls.length, formGroupTmp);
1841
+ }));
1842
+ return tmpValidateHdFormLines.valid;
1843
+ };
1844
+ // 暴露的方法,用于获取所有数据
1845
+ // 暴露的方法,用于获取所有数据
1846
+ /**
1847
+ * @return {?}
1848
+ */
1849
+ HdFormLinesComponent.prototype.getLines =
1850
+ // 暴露的方法,用于获取所有数据
1851
+ /**
1852
+ * @return {?}
1853
+ */
1854
+ function () {
1855
+ var _this = this;
1856
+ /** @type {?} */
1857
+ var allLines = [];
1858
+ this.storeFormLinesData.forEach((/**
1859
+ * @param {?} formLinesDataItem
1860
+ * @return {?}
1861
+ */
1862
+ function (formLinesDataItem) {
1863
+ /** @type {?} */
1864
+ var formGroupObj = {};
1865
+ _this.formLines.forEach((/**
1866
+ * @param {?} item
1867
+ * @return {?}
1868
+ */
1869
+ function (item) {
1870
+ // 新增行 初始数据都为null
1871
+ formGroupObj[item.name] = formLinesDataItem[item.name];
1872
+ }));
1873
+ formGroupObj.lineIndex = formLinesDataItem.lineIndex;
1874
+ allLines.push(formGroupObj);
1875
+ }));
1876
+ return allLines;
1877
+ };
1783
1878
  // 全局性的搜索(涵盖页面上所有的可视文字)
1784
1879
  // 全局性的搜索(涵盖页面上所有的可视文字)
1785
1880
  /**
@@ -1793,84 +1888,77 @@
1793
1888
  function () {
1794
1889
  var _this = this;
1795
1890
  this.tableLoading = true;
1796
- setTimeout((/**
1891
+ /** @type {?} */
1892
+ var filterValue = this.filterStr.trim().toLowerCase();
1893
+ // 如果没有输入搜索字符串,则显示缓存内的所有数据
1894
+ if (!filterValue) {
1895
+ this.setStoreData();
1896
+ return;
1897
+ }
1898
+ this.filterIndexStore = [];
1899
+ // 根据搜索字符串过滤数据
1900
+ /** @type {?} */
1901
+ var filteredData = this.storeFormLinesData.filter((/**
1902
+ * @param {?} data
1903
+ * @param {?} index
1797
1904
  * @return {?}
1798
1905
  */
1799
- function () {
1906
+ function (data, index) {
1800
1907
  var e_1, _a;
1801
- /** @type {?} */
1802
- var filterValue = _this.filterStr.trim().toLowerCase();
1803
- // 如果没有输入搜索字符串,则显示所有数据
1804
- if (!filterValue) {
1805
- _this.tableLoading = false;
1806
- return;
1807
- }
1808
- // 根据搜索字符串过滤数据
1809
- /** @type {?} */
1810
- var filteredData = _this.formLinesData.filter((/**
1811
- * @param {?} data
1812
- * @return {?}
1813
- */
1814
- function (data) {
1815
- var e_2, _a;
1816
- try {
1817
- for (var _b = __values(_this.formLines), _c = _b.next(); !_c.done; _c = _b.next()) {
1818
- var item = _c.value;
1819
- /** @type {?} */
1820
- var value = data[item.name] ? data[item.name].toString().toLowerCase() : '';
1821
- if (value.includes(filterValue)) {
1822
- return true;
1823
- }
1824
- }
1825
- }
1826
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1827
- finally {
1828
- try {
1829
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1908
+ try {
1909
+ for (var _b = __values(_this.formLines), _c = _b.next(); !_c.done; _c = _b.next()) {
1910
+ var item = _c.value;
1911
+ /** @type {?} */
1912
+ var value = data[item.name] ? data[item.name].toString().toLowerCase() : '';
1913
+ if (value.includes(filterValue)) {
1914
+ _this.filterIndexStore.push(index);
1915
+ return true;
1830
1916
  }
1831
- finally { if (e_2) throw e_2.error; }
1832
1917
  }
1833
- return false;
1834
- }));
1835
- // 如果没有匹配的数据,则显示空白表单行
1836
- if (filteredData.length === 0) {
1837
- _this.tableLoading = false;
1838
1918
  }
1839
- else {
1840
- _this.validateHdFormLines = _this.fb.group({
1841
- 'lines': _this.fb.array([])
1842
- });
1843
- // 在这里把formlinesData里面匹配到的filteredData数据排序到最前面
1844
- /** @type {?} */
1845
- var sortedData = [];
1919
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1920
+ finally {
1846
1921
  try {
1847
- for (var _b = __values(_this.formLinesData), _c = _b.next(); !_c.done; _c = _b.next()) {
1848
- var item = _c.value;
1849
- if (filteredData.includes(item)) {
1850
- sortedData.unshift(item);
1851
- }
1852
- else {
1853
- sortedData.push(item);
1854
- }
1855
- }
1856
- }
1857
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1858
- finally {
1859
- try {
1860
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1861
- }
1862
- finally { if (e_1) throw e_1.error; }
1922
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1863
1923
  }
1864
- _this.formLinesData = sortedData;
1865
- _this.init();
1866
- setTimeout((/**
1867
- * @return {?}
1868
- */
1869
- function () {
1870
- _this.tableLoading = false;
1871
- }), 0);
1924
+ finally { if (e_1) throw e_1.error; }
1872
1925
  }
1873
- }), 10);
1926
+ return false;
1927
+ }));
1928
+ // 如果没有匹配的数据,则显示空白表单行
1929
+ if (filteredData.length === 0) {
1930
+ this.setStoreData();
1931
+ }
1932
+ else {
1933
+ // 缓存一下筛选后的表单数据
1934
+ this.filterStoreFormLinesData = filteredData;
1935
+ // 处理筛选好的数据 然后重新渲染
1936
+ this.formLinesData = filteredData;
1937
+ this.init();
1938
+ setTimeout((/**
1939
+ * @return {?}
1940
+ */
1941
+ function () {
1942
+ _this.tableLoading = false;
1943
+ }), 0);
1944
+ }
1945
+ };
1946
+ /**
1947
+ * @return {?}
1948
+ */
1949
+ HdFormLinesComponent.prototype.setStoreData = /**
1950
+ * @return {?}
1951
+ */
1952
+ function () {
1953
+ var _this = this;
1954
+ this.formLinesData = this.storeFormLinesData;
1955
+ this.init();
1956
+ setTimeout((/**
1957
+ * @return {?}
1958
+ */
1959
+ function () {
1960
+ _this.tableLoading = false;
1961
+ }), 0);
1874
1962
  };
1875
1963
  /**
1876
1964
  * @param {?} line
@@ -2015,7 +2103,6 @@
2015
2103
  formGroupObj[item.name] = _this.fb.control({ value: item.value, disabled: item.disabled } || null, item.require && !item.hide ? [forms.Validators.required] : []);
2016
2104
  }));
2017
2105
  formGroupObj.lineIndex = this.fb.control(this.linesFormArray.controls.length, []);
2018
- formGroupObj.hide = this.fb.control(false, []);
2019
2106
  /** @type {?} */
2020
2107
  var formGroupSubmit = this.fb.group(formGroupObj);
2021
2108
  this.formLines.forEach((/**
@@ -2085,7 +2172,6 @@
2085
2172
  }
2086
2173
  }));
2087
2174
  formGroupObj.lineIndex = _this.fb.control(_this.linesFormArray.controls.length, []);
2088
- formGroupObj.hide = _this.fb.control(false, []);
2089
2175
  /** @type {?} */
2090
2176
  var formGroupTmp = _this.fb.group(formGroupObj);
2091
2177
  _this.formLines.forEach((/**
@@ -2196,6 +2282,31 @@
2196
2282
  * @return {?}
2197
2283
  */
2198
2284
  function (data) {
2285
+ var _this = this;
2286
+ if (data && data.lines && data.lines.length > 0) {
2287
+ /** @type {?} */
2288
+ var lines_1 = data.lines;
2289
+ if (lines_1.length === this.storeFormLinesData.length) {
2290
+ lines_1.forEach((/**
2291
+ * @param {?} item
2292
+ * @param {?} index
2293
+ * @return {?}
2294
+ */
2295
+ function (item, index) {
2296
+ _this.storeFormLinesData[index] = __assign({}, _this.storeFormLinesData[index], item);
2297
+ }));
2298
+ }
2299
+ else {
2300
+ this.filterIndexStore.forEach((/**
2301
+ * @param {?} item
2302
+ * @param {?} index
2303
+ * @return {?}
2304
+ */
2305
+ function (item, index) {
2306
+ _this.storeFormLinesData[item] = __assign({}, _this.filterStoreFormLinesData[index], lines_1[index]);
2307
+ }));
2308
+ }
2309
+ }
2199
2310
  this.calculateLineNumber();
2200
2311
  this.changeEvent.emit(this.validateHdFormLines);
2201
2312
  };
@@ -2302,7 +2413,7 @@
2302
2413
  HdFormLinesComponent.decorators = [
2303
2414
  { type: core.Component, args: [{
2304
2415
  selector: 'hd-form-lines',
2305
- template: "<hd-button-group *ngIf=\"showForm\">\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<hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n<form *ngIf=\"showForm\" nz-form [formGroup]=\"validateHdFormLines\"\n class=\"ant-advanced-search-form hd-formLines-container\">\n <nz-table nzTemplateMode [nzFrontPagination]=\"false\" [nzLoading]=\"tableLoading\" [nzScroll]=\"scroll\">\n <thead>\n <tr>\n <th nzWidth=\"58px\" nzLeft=\"0px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let item of formLines\">\n <th *ngIf=\"!item.hide\" [nzAlign]=\"item.align ? item.align : 'left'\">\n <span *ngIf=\"item.require\" style=\"color: red;\">*</span>{{item.label}}\n </th>\n </ng-container>\n <th style=\"width: 80px\" nzRight=\"0\">\u64CD\u4F5C</th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let line of linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize);index as dataIndex\"\n formArrayName=\"lines\">\n <tr [formGroup]=\"line\" *ngIf=\"!line.get('hide').value\">\n <td nzWidth=\"58px\" nzLeft=\"0px\">\n {{line.get('lineIndex').value}}\n </td>\n <ng-container *ngFor=\"let formItem of formLines\">\n <td *ngIf=\"!formItem.hide\" [nzAlign]=\"formItem.align ? formItem.align : 'left'\">\n <nz-form-item>\n <nz-form-control [nzErrorTip]=\"formItem.label + '\u4E0D\u80FD\u4E3A\u7A7A'\">\n <ng-container [ngSwitch]=\"formItem.type\">\n <ng-container *ngSwitchCase=\"0\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\">\n <input [ngStyle]=\"getStyle(line, formItem, '100px')\" nz-input\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name ).value : null}\"\n [id]=\"'input-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#input-' + formItem.name + line.get('lineIndex').value) : null\"\n [maxlength]=\"formItem.maxLength || null\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [formControlName]=\"formItem.name\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate>\n <i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"line.get(formItem.name).value && !line.get(formItem.name).disabled\"\n (click)=\"inputClean(formItem ,line)\"></i>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"1\">\n <nz-select nzShowSearch [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n nzAllowClear\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOnSearch)=\"triggerEvent(formItem.onSearchEvent || null, $event, line)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"2\">\n <nz-date-picker *ngIf=\"formItem.showTime\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker *ngIf=\"!formItem.showTime\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"3\">\n <nz-range-picker [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\" [formControlName]=\"formItem.name\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"4\">\n <textarea\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name).value : null}\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [maxlength]=\"formItem.maxLength || null\" rows=\"4\" nz-input\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"5\">\n <div style=\"display: flex;align-items: center;\">\n <nz-input-number [ngStyle]=\"getStyle(line, formItem, '100px')\"\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"\n [nzMin]=\"formItem?.inputNumber?.min || 0\" [nzMax]=\"formItem?.inputNumber?.max || 99999999\"\n [nzStep]=\"formItem?.inputNumber?.step || 1\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [nzId]=\"'inputNumber-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#inputNumber-' + formItem.name + line.get('lineIndex').value) : null\">\n </nz-input-number>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n &nbsp;&nbsp;{{line.get(formItem.explainOptionRight.name).value}}</div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"6\">\n <nz-select nzMode=\"multiple\" [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n nzShowSearch nzAllowClear\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (nzOnSearch)=\"triggerEvent(formItem.onSearchEvent || null, $event, line)\">\n <nz-option *ngFor=\"let selectItem of formItem.selectOption.selectList\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\"></nz-option>\n <ng-container\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\">\n <nz-option *ngFor=\"let option of line.get(formItem.selectOption.value).value;index as i\"\n [nzLabel]=\"line.get(formItem.selectOption.label).value[i]\" [nzValue]=\"option\" nzHide>\n </nz-option>\n </ng-container>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"7\">\n {{(formItem.preserveNumber && line.get(formItem.name).value) ?\n LodashRound(line.get(formItem.name).value,formItem.preserveNumber).toFixed(formItem.preserveNumber)\n : line.get(formItem.name).value}}\n </ng-container>\n <ng-container *ngSwitchCase=\"8\">\n <nz-switch [formControlName]=\"formItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"9\">\n <nz-time-picker [formControlName]=\"formItem.name\"></nz-time-picker>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n <div *ngIf=\"formItem?.explainOption?.show\"\n [style.color]=\"formItem?.explainOption?.color ? formItem.explainOption.color : null\">\n {{line.get(formItem.explainOption.name).value}}</div>\n </td>\n </ng-container>\n <td style=\"width: 80px\" nzRight=\"0\">\n <span class=\"common-btn-group\">\n <a *ngIf=\"operateButtons.includes('add')\" (click)=\"addFormLine(line.get('lineIndex').value)\">\u6DFB\u52A0</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && !showDeleteConfirm\"\n (click)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && showDeleteConfirm\" nz-popconfirm\n nzPopconfirmTitle=\"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u884C\u5417?\" nzPopconfirmPlacement=\"bottom\"\n (nzOnConfirm)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n </span>\n </td>\n </tr>\n </ng-container>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{ (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value,2).toFixed(2)) : '' }} </td>\n </ng-container>\n </tr>\n </tbody>\n </nz-table>\n <ng-container *ngIf=\"linesFormArray.controls.length > 10\">\n <hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n <nz-pagination [nzSize]=\"'small'\" style=\"text-align: right;\" [nzPageIndex]=\"paginationPageIndex\"\n [nzPageSize]=\"paginationPageSize\" [nzPageSizeOptions]=\"[10, 20, 30, 40, 50, 100, 200]\"\n [nzTotal]=\"linesFormArray.controls.length\" nzShowSizeChanger (nzPageIndexChange)=\"pageIndexChange($event)\"\n (nzPageSizeChange)=\"pageSizeChange($event)\" [nzShowTotal]=\"totalTemplate\"></nz-pagination>\n <ng-template #totalTemplate let-total>\u5171 {{linesFormArray.controls.length}} \u6761\u6570\u636E</ng-template>\n </ng-container>\n</form>",
2416
+ template: "<hd-button-group *ngIf=\"showForm\">\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<hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n<form *ngIf=\"showForm\" nz-form [formGroup]=\"validateHdFormLines\"\n class=\"ant-advanced-search-form hd-formLines-container\">\n <nz-table nzTemplateMode [nzFrontPagination]=\"false\" [nzLoading]=\"tableLoading\" [nzScroll]=\"scroll\">\n <thead>\n <tr>\n <th nzWidth=\"58px\" nzLeft=\"0px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let item of formLines\">\n <th *ngIf=\"!item.hide\" [nzAlign]=\"item.align ? item.align : 'left'\">\n <span *ngIf=\"item.require\" style=\"color: red;\">*</span>{{item.label}}\n </th>\n </ng-container>\n <th style=\"width: 80px\" nzRight=\"0\">\u64CD\u4F5C</th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let line of linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize);index as dataIndex\"\n formArrayName=\"lines\">\n <tr [formGroup]=\"line\">\n <td nzWidth=\"58px\" nzLeft=\"0px\">\n {{line.get('lineIndex').value}}\n </td>\n <ng-container *ngFor=\"let formItem of formLines\">\n <td *ngIf=\"!formItem.hide\" [nzAlign]=\"formItem.align ? formItem.align : 'left'\">\n <nz-form-item>\n <nz-form-control [nzErrorTip]=\"formItem.label + '\u4E0D\u80FD\u4E3A\u7A7A'\">\n <ng-container [ngSwitch]=\"formItem.type\">\n <ng-container *ngSwitchCase=\"0\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\">\n <input [ngStyle]=\"getStyle(line, formItem, '100px')\" nz-input\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name ).value : null}\"\n [id]=\"'input-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#input-' + formItem.name + line.get('lineIndex').value) : null\"\n [maxlength]=\"formItem.maxLength || null\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [formControlName]=\"formItem.name\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate>\n <i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"line.get(formItem.name).value && !line.get(formItem.name).disabled\"\n (click)=\"inputClean(formItem ,line)\"></i>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"1\">\n <nz-select nzShowSearch [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n nzAllowClear\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOnSearch)=\"triggerEvent(formItem.onSearchEvent || null, $event, line)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"2\">\n <nz-date-picker *ngIf=\"formItem.showTime\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker *ngIf=\"!formItem.showTime\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"3\">\n <nz-range-picker [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\" [formControlName]=\"formItem.name\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"4\">\n <textarea\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name).value : null}\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [maxlength]=\"formItem.maxLength || null\" rows=\"4\" nz-input\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"5\">\n <div style=\"display: flex;align-items: center;\">\n <nz-input-number [ngStyle]=\"getStyle(line, formItem, '100px')\"\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"\n [nzMin]=\"formItem?.inputNumber?.min || 0\" [nzMax]=\"formItem?.inputNumber?.max || 99999999\"\n [nzStep]=\"formItem?.inputNumber?.step || 1\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [nzId]=\"'inputNumber-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#inputNumber-' + formItem.name + line.get('lineIndex').value) : null\">\n </nz-input-number>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n &nbsp;&nbsp;{{line.get(formItem.explainOptionRight.name).value}}</div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"6\">\n <nz-select nzMode=\"multiple\" [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n nzShowSearch nzAllowClear\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (nzOnSearch)=\"triggerEvent(formItem.onSearchEvent || null, $event, line)\">\n <nz-option *ngFor=\"let selectItem of formItem.selectOption.selectList\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\"></nz-option>\n <ng-container\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\">\n <nz-option *ngFor=\"let option of line.get(formItem.selectOption.value).value;index as i\"\n [nzLabel]=\"line.get(formItem.selectOption.label).value[i]\" [nzValue]=\"option\" nzHide>\n </nz-option>\n </ng-container>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"7\">\n {{(formItem.preserveNumber && line.get(formItem.name).value) ?\n LodashRound(line.get(formItem.name).value,formItem.preserveNumber).toFixed(formItem.preserveNumber)\n : line.get(formItem.name).value}}\n </ng-container>\n <ng-container *ngSwitchCase=\"8\">\n <nz-switch [formControlName]=\"formItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"9\">\n <nz-time-picker [formControlName]=\"formItem.name\"></nz-time-picker>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n <div *ngIf=\"formItem?.explainOption?.show\"\n [style.color]=\"formItem?.explainOption?.color ? formItem.explainOption.color : null\">\n {{line.get(formItem.explainOption.name).value}}</div>\n </td>\n </ng-container>\n <td style=\"width: 80px\" nzRight=\"0\">\n <span class=\"common-btn-group\">\n <a *ngIf=\"operateButtons.includes('add')\" (click)=\"addFormLine(line.get('lineIndex').value)\">\u6DFB\u52A0</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && !showDeleteConfirm\"\n (click)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && showDeleteConfirm\" nz-popconfirm\n nzPopconfirmTitle=\"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u884C\u5417?\" nzPopconfirmPlacement=\"bottom\"\n (nzOnConfirm)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n </span>\n </td>\n </tr>\n </ng-container>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{ (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value,2).toFixed(2)) : '' }} </td>\n </ng-container>\n </tr>\n </tbody>\n </nz-table>\n <ng-container *ngIf=\"linesFormArray.controls.length > 10\">\n <hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n <nz-pagination [nzSize]=\"'small'\" style=\"text-align: right;\" [nzPageIndex]=\"paginationPageIndex\"\n [nzPageSize]=\"paginationPageSize\" [nzPageSizeOptions]=\"[10, 20, 30, 40, 50, 100, 200]\"\n [nzTotal]=\"linesFormArray.controls.length\" nzShowSizeChanger (nzPageIndexChange)=\"pageIndexChange($event)\"\n (nzPageSizeChange)=\"pageSizeChange($event)\" [nzShowTotal]=\"totalTemplate\"></nz-pagination>\n <ng-template #totalTemplate let-total>\u5171 {{linesFormArray.controls.length}} \u6761\u6570\u636E</ng-template>\n </ng-container>\n</form>",
2306
2417
  styles: ["::ng-deep .common-btn-group>a{font-size:12px;font-weight:400;color:#12a34f!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}::ng-deep .ant-input-number-input{height:28px}::ng-deep .ant-input-number{height:28px}textarea.ant-input{height:auto;min-height:28px}::ng-deep .ant-select-selection--multiple{min-height:28px}::ng-deep .ant-select-selection__rendered>ul>li{height:22px!important;margin-top:3px!important;line-height:22px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:28px!important}::ng-deep .ant-input{height:28px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:28px!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}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:12px;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:12px;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-time-picker{width:100%}.hd-formLines-container ::ng-deep td{padding:1.5px 8px!important}.hd-formLines-container .ant-table-tbody>tr>td,.hd-formLines-container ::ng-deep .ant-table-thead>tr>th{padding:16px 8px}.hd-formLines-container ::ng-deep .hd-table-total>td{border:0!important}.hd-formLines-container .ant-input-number{width:100%}"]
2307
2418
  }] }
2308
2419
  ];
@@ -2370,6 +2481,12 @@
2370
2481
  HdFormLinesComponent.prototype.showForm;
2371
2482
  /** @type {?} */
2372
2483
  HdFormLinesComponent.prototype.filterStr;
2484
+ /** @type {?} */
2485
+ HdFormLinesComponent.prototype.storeFormLinesData;
2486
+ /** @type {?} */
2487
+ HdFormLinesComponent.prototype.filterStoreFormLinesData;
2488
+ /** @type {?} */
2489
+ HdFormLinesComponent.prototype.filterIndexStore;
2373
2490
  /**
2374
2491
  * @type {?}
2375
2492
  * @private