fantasy-ngzorro 1.0.39 → 1.0.41
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/bundles/fantasy-ngzorro.umd.js +46 -42
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-form-lines/hd-form-lines.component.js +32 -43
- package/esm5/hd-form-lines/hd-form-lines.component.js +47 -43
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +31 -42
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +47 -43
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form-lines/hd-form-lines.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1791,12 +1791,15 @@
|
|
|
1791
1791
|
* @return {?}
|
|
1792
1792
|
*/
|
|
1793
1793
|
function () {
|
|
1794
|
+
var _this = this;
|
|
1795
|
+
this.tableLoading = true;
|
|
1794
1796
|
/** @type {?} */
|
|
1795
1797
|
var filterValue = this.filterStr.trim().toLowerCase();
|
|
1796
1798
|
// 如果没有输入搜索字符串,则显示所有数据
|
|
1797
1799
|
if (!filterValue) {
|
|
1798
|
-
this.
|
|
1800
|
+
this.hideForm();
|
|
1799
1801
|
this.addExistingFormLines(this.formLinesData);
|
|
1802
|
+
this.tableLoading = false;
|
|
1800
1803
|
return;
|
|
1801
1804
|
}
|
|
1802
1805
|
// 根据搜索字符串过滤数据
|
|
@@ -1806,27 +1809,48 @@
|
|
|
1806
1809
|
* @return {?}
|
|
1807
1810
|
*/
|
|
1808
1811
|
function (data) {
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1812
|
+
var e_1, _a;
|
|
1813
|
+
try {
|
|
1814
|
+
for (var _b = __values(_this.formLines), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1815
|
+
var item = _c.value;
|
|
1816
|
+
/** @type {?} */
|
|
1817
|
+
var value = data[item.name] ? data[item.name].toString().toLowerCase() : '';
|
|
1818
|
+
if (value.includes(filterValue)) {
|
|
1819
|
+
return true;
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1824
|
+
finally {
|
|
1825
|
+
try {
|
|
1826
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1827
|
+
}
|
|
1828
|
+
finally { if (e_1) throw e_1.error; }
|
|
1829
|
+
}
|
|
1830
|
+
return false;
|
|
1820
1831
|
}));
|
|
1821
1832
|
// 如果没有匹配的数据,则显示空白表单行
|
|
1822
1833
|
if (filteredData.length === 0) {
|
|
1823
|
-
this.
|
|
1834
|
+
this.hideForm();
|
|
1824
1835
|
this.addFormLine();
|
|
1825
1836
|
}
|
|
1826
1837
|
else {
|
|
1827
|
-
this.
|
|
1838
|
+
this.hideForm();
|
|
1828
1839
|
this.addExistingFormLines(filteredData);
|
|
1829
1840
|
}
|
|
1841
|
+
this.tableLoading = false;
|
|
1842
|
+
};
|
|
1843
|
+
/**
|
|
1844
|
+
* @return {?}
|
|
1845
|
+
*/
|
|
1846
|
+
HdFormLinesComponent.prototype.hideForm = /**
|
|
1847
|
+
* @return {?}
|
|
1848
|
+
*/
|
|
1849
|
+
function () {
|
|
1850
|
+
// 隐藏所有表单行
|
|
1851
|
+
for (var i = 0; i < this.linesFormArray.controls.length; i++) {
|
|
1852
|
+
this.linesFormArray.controls[i].get('hide').setValue(true);
|
|
1853
|
+
}
|
|
1830
1854
|
};
|
|
1831
1855
|
/**
|
|
1832
1856
|
* @param {?} filteredData
|
|
@@ -1838,42 +1862,20 @@
|
|
|
1838
1862
|
*/
|
|
1839
1863
|
function (filteredData) {
|
|
1840
1864
|
var _this = this;
|
|
1865
|
+
// 显示匹配的数据行
|
|
1841
1866
|
filteredData.forEach((/**
|
|
1842
1867
|
* @param {?} formLinesDataItem
|
|
1843
1868
|
* @return {?}
|
|
1844
1869
|
*/
|
|
1845
1870
|
function (formLinesDataItem) {
|
|
1846
1871
|
/** @type {?} */
|
|
1847
|
-
var
|
|
1848
|
-
|
|
1849
|
-
* @param {?} item
|
|
1850
|
-
* @return {?}
|
|
1851
|
-
*/
|
|
1852
|
-
function (item) {
|
|
1853
|
-
formGroupObj[item.name] = _this.fb.control({ value: formLinesDataItem[item.name], disabled: item.disabled }, item.require ? [forms.Validators.required] : []);
|
|
1854
|
-
if (item.selectOption && item.selectOption.label) {
|
|
1855
|
-
formGroupObj[item.selectOption.label] = _this.fb.control(formLinesDataItem[item.selectOption.label], []);
|
|
1856
|
-
}
|
|
1857
|
-
}));
|
|
1858
|
-
formGroupObj.lineIndex = _this.fb.control(_this.linesFormArray.controls.length, []);
|
|
1859
|
-
/** @type {?} */
|
|
1860
|
-
var formGroupTmp = _this.fb.group(formGroupObj);
|
|
1861
|
-
_this.formLines.forEach((/**
|
|
1862
|
-
* @param {?} item
|
|
1872
|
+
var index = _this.formLinesData.findIndex((/**
|
|
1873
|
+
* @param {?} data
|
|
1863
1874
|
* @return {?}
|
|
1864
1875
|
*/
|
|
1865
|
-
function (
|
|
1866
|
-
|
|
1867
|
-
formGroupTmp.get(item.name).valueChanges.subscribe((/**
|
|
1868
|
-
* @param {?} value
|
|
1869
|
-
* @return {?}
|
|
1870
|
-
*/
|
|
1871
|
-
function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupTmp); }));
|
|
1872
|
-
}
|
|
1873
|
-
}));
|
|
1874
|
-
_this.linesFormArray.insert(_this.linesFormArray.controls.length, formGroupTmp);
|
|
1876
|
+
function (data) { return data === formLinesDataItem; }));
|
|
1877
|
+
_this.linesFormArray.controls[index].get('hide').setValue(false);
|
|
1875
1878
|
}));
|
|
1876
|
-
this.deleteFormLine(1);
|
|
1877
1879
|
};
|
|
1878
1880
|
/**
|
|
1879
1881
|
* @param {?} line
|
|
@@ -2018,6 +2020,7 @@
|
|
|
2018
2020
|
formGroupObj[item.name] = _this.fb.control({ value: item.value, disabled: item.disabled } || null, item.require && !item.hide ? [forms.Validators.required] : []);
|
|
2019
2021
|
}));
|
|
2020
2022
|
formGroupObj.lineIndex = this.fb.control(this.linesFormArray.controls.length, []);
|
|
2023
|
+
formGroupObj.hide = this.fb.control(false, []);
|
|
2021
2024
|
/** @type {?} */
|
|
2022
2025
|
var formGroupSubmit = this.fb.group(formGroupObj);
|
|
2023
2026
|
this.formLines.forEach((/**
|
|
@@ -2087,6 +2090,7 @@
|
|
|
2087
2090
|
}
|
|
2088
2091
|
}));
|
|
2089
2092
|
formGroupObj.lineIndex = _this.fb.control(_this.linesFormArray.controls.length, []);
|
|
2093
|
+
formGroupObj.hide = _this.fb.control(false, []);
|
|
2090
2094
|
/** @type {?} */
|
|
2091
2095
|
var formGroupTmp = _this.fb.group(formGroupObj);
|
|
2092
2096
|
_this.formLines.forEach((/**
|
|
@@ -2303,7 +2307,7 @@
|
|
|
2303
2307
|
HdFormLinesComponent.decorators = [
|
|
2304
2308
|
{ type: core.Component, args: [{
|
|
2305
2309
|
selector: 'hd-form-lines',
|
|
2306
|
-
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 {{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\" [nzTotal]=\"linesFormArray.controls.length\" nzShowSizeChanger\n (nzPageIndexChange)=\"pageIndexChange($event)\" (nzPageSizeChange)=\"pageSizeChange($event)\"></nz-pagination>\n </ng-container>\n</form>",
|
|
2310
|
+
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 {{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>",
|
|
2307
2311
|
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%}"]
|
|
2308
2312
|
}] }
|
|
2309
2313
|
];
|