fantasy-ngzorro 1.2.0 → 1.2.2
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 +78 -2
- 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/fantasy-ngzorro.js +2 -2
- package/esm2015/hd-form-lines/hd-form-lines.component.js +48 -3
- package/esm2015/index.js +2 -2
- package/esm2015/model/colWidth.js +3 -1
- package/esm2015/model/common-type.js +17 -1
- package/esm2015/public-api.js +2 -2
- package/esm5/fantasy-ngzorro.js +2 -2
- package/esm5/hd-form-lines/hd-form-lines.component.js +57 -3
- package/esm5/index.js +2 -2
- package/esm5/model/colWidth.js +3 -1
- package/esm5/model/common-type.js +21 -1
- package/esm5/public-api.js +2 -2
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +66 -3
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +78 -3
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form-lines/hd-form-lines.component.d.ts +3 -0
- package/model/colWidth.d.ts +1 -0
- package/model/common-type.d.ts +8 -0
- package/package.json +1 -1
|
@@ -599,6 +599,25 @@
|
|
|
599
599
|
SelectOption.prototype.hdServerSearch;
|
|
600
600
|
/** @type {?} */
|
|
601
601
|
SelectOption.prototype.hdShowItemCode;
|
|
602
|
+
/** @type {?} */
|
|
603
|
+
SelectOption.prototype.tableColumns;
|
|
604
|
+
}
|
|
605
|
+
var SelectOptionTableColumn = /** @class */ (function () {
|
|
606
|
+
function SelectOptionTableColumn() {
|
|
607
|
+
}
|
|
608
|
+
return SelectOptionTableColumn;
|
|
609
|
+
}());
|
|
610
|
+
if (false) {
|
|
611
|
+
/** @type {?} */
|
|
612
|
+
SelectOptionTableColumn.prototype.width;
|
|
613
|
+
/** @type {?} */
|
|
614
|
+
SelectOptionTableColumn.prototype.label;
|
|
615
|
+
/** @type {?} */
|
|
616
|
+
SelectOptionTableColumn.prototype.name;
|
|
617
|
+
/** @type {?} */
|
|
618
|
+
SelectOptionTableColumn.prototype.pictureName;
|
|
619
|
+
/** @type {?} */
|
|
620
|
+
SelectOptionTableColumn.prototype.render;
|
|
602
621
|
}
|
|
603
622
|
var InputNumber = /** @class */ (function () {
|
|
604
623
|
function InputNumber() {
|
|
@@ -1457,6 +1476,7 @@
|
|
|
1457
1476
|
this.isFilterData = false; // 是否是已经筛选过的数据
|
|
1458
1477
|
// 是否是已经筛选过的数据
|
|
1459
1478
|
this.formValid = false; // 表单当前的状态
|
|
1479
|
+
this.textWidthCache = {};
|
|
1460
1480
|
}
|
|
1461
1481
|
/**
|
|
1462
1482
|
* @return {?}
|
|
@@ -2213,11 +2233,59 @@
|
|
|
2213
2233
|
var inputDom = document.querySelector(id);
|
|
2214
2234
|
inputDom.select();
|
|
2215
2235
|
};
|
|
2236
|
+
/**
|
|
2237
|
+
* @param {?} text
|
|
2238
|
+
* @param {?} maxWidth
|
|
2239
|
+
* @return {?}
|
|
2240
|
+
*/
|
|
2241
|
+
HdFormLinesComponent.prototype.isTextOverflow = /**
|
|
2242
|
+
* @param {?} text
|
|
2243
|
+
* @param {?} maxWidth
|
|
2244
|
+
* @return {?}
|
|
2245
|
+
*/
|
|
2246
|
+
function (text, maxWidth) {
|
|
2247
|
+
/** @type {?} */
|
|
2248
|
+
var cachedWidth = this.textWidthCache[text];
|
|
2249
|
+
if (cachedWidth !== undefined) {
|
|
2250
|
+
return cachedWidth + 15 >= maxWidth;
|
|
2251
|
+
}
|
|
2252
|
+
/** @type {?} */
|
|
2253
|
+
var span = document.createElement('span');
|
|
2254
|
+
span.style.visibility = 'hidden';
|
|
2255
|
+
span.style.position = 'absolute';
|
|
2256
|
+
span.style.whiteSpace = 'nowrap';
|
|
2257
|
+
span.style.fontSize = '12px';
|
|
2258
|
+
span.style.display = 'inline-block'; // 将样式修改为 inline-block
|
|
2259
|
+
span.innerText = text;
|
|
2260
|
+
document.body.appendChild(span);
|
|
2261
|
+
/** @type {?} */
|
|
2262
|
+
var isOverflow = span.offsetWidth + 15 >= maxWidth;
|
|
2263
|
+
this.textWidthCache[text] = span.offsetWidth;
|
|
2264
|
+
span.style.display = 'none';
|
|
2265
|
+
document.body.removeChild(span);
|
|
2266
|
+
return isOverflow;
|
|
2267
|
+
};
|
|
2268
|
+
/**
|
|
2269
|
+
* @param {?} str
|
|
2270
|
+
* @return {?}
|
|
2271
|
+
*/
|
|
2272
|
+
HdFormLinesComponent.prototype.judgeColEmpty = /**
|
|
2273
|
+
* @param {?} str
|
|
2274
|
+
* @return {?}
|
|
2275
|
+
*/
|
|
2276
|
+
function (str) {
|
|
2277
|
+
if (str || str === 0) {
|
|
2278
|
+
return str;
|
|
2279
|
+
}
|
|
2280
|
+
else {
|
|
2281
|
+
return '<空>';
|
|
2282
|
+
}
|
|
2283
|
+
};
|
|
2216
2284
|
HdFormLinesComponent.decorators = [
|
|
2217
2285
|
{ type: core.Component, args: [{
|
|
2218
2286
|
selector: 'hd-form-lines',
|
|
2219
|
-
template: "<hd-button-group *ngIf=\"showForm && 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<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 <nz-list\n *ngIf=\"linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize).length === 0\"\n [nzDataSource]=\"[]\"></nz-list>\n <ng-container>\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]\"\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>",
|
|
2220
|
-
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%}"]
|
|
2287
|
+
template: "<hd-button-group *ngIf=\"showForm && 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<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 nzDropdownClassName=\"hd-select-table\"\n *ngIf=\"formItem.selectOption.tableColumns;else nomarlSelectTemplate\" nzShowSearch\n [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 nzCustomContent nzDisabled>\n <div class=\"hd-option-header\">\n <div *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns\"\n [ngStyle]=\"{'width': selectOptionTableColumn?.width ? selectOptionTableColumn.width + 'px' : 'unset'}\">\n {{selectOptionTableColumn.label}}\n </div>\n </div>\n </nz-option>\n\n <nz-option nzCustomContent\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 <div class=\"hd-option-line\">\n <div *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns\"\n [ngStyle]=\"{'width': selectOptionTableColumn?.width ? selectOptionTableColumn.width + 'px' : 'unset'}\">\n <ng-container *ngIf=\"selectOptionTableColumn.pictureName;else notPictureTemplate\">\n <img\n *ngIf=\"selectOptionTableColumn.pictureName === 'hd-img-star' && (selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name])\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAyhJREFUWEe1ll1o1XYYxp8nPUmUihdCV3bAirvYzUC80Xpy3KwTZNR2CdOhDkTBwe6G32XzwqpjE3Qt4pUKZQqDyQZNTp1uY8yCJG0F2d2+LlWOOkShovQkaV45lcJpTdOTHJubBPI+z/Pj//H+/0TGR66uf8sPoz8A/Kstkp38YORxFitmEVU1vm1cBPlp9ZuQXtX0jmfxygQgvxSWBRWlDECvhgrwQFuqLufG4TAtRCaAwCl+IcDXtWEi2KFb7pUFBxCBEpSMMsDWGWEiNzXLe2/BASp2cTuJH+KCRMJ3dGvsrzQQqafAtw0XpBEfIhc00/tswQD8QWM1FP45d4A8V9XJN9k5Nl4vRKoR8G3jMshdyebRPs0cOftaAaRUbAsRrRRRhuczFsF/lPATNQrL3Hr7/nz1lGvvtkwGUSEC8gLkWfMGkAfQMp9J0n8ByhS5J+QDVr+BshBlUu6q3d5v9G3jIcg3GgnJqp2C853iCIB1WU0a1F2iOO2tPnK3CLQ1aJZKLpCfddPrmtoF8uuqZn9iyfcEzVQumYtlQDO9vS8PsprHd4xvAR7I7FuHUIBvdNP9crr0lT7g24U+UNlfh1f6Esrn2ofeuVphbCPyneJuAN+lT0jokZCduum9cobM2Qn9krEGEa6+hi36jEC3aro34vASW3FoG9si8sdGRoKCY6rlnpjLIxGgYhunSPY0AiAiP+mW93EmAN8ujoJobwgAuKOb7orUAHKjY1EwHjwFkGsEoKpVJ6WVH3n/p1oDwVBhk0TK742GV/UKYOZMt5QKoGIbX5E8mgwg4wCbADQn1c1uPvP2gWqB7xjDADck7OwBVan0QFFyQaj2A9wxV60A13XT7Uw1Ar5TlDiBQP6hRHs0a3Ss9n8wuK4jYtN5Em/H6B5ppht7r4jvhEOFtYiUGQEAnhDoV033ZNJwB45xRAS9IBfX1qnhRD7uhhQLENiFQ0Ll9LSBCM7olnu43gUpTjEfiPSB3D6tUQRbcpZ7bbZHLEBYKnRFogxV505rmjzIrtG/6w2fMS0l430RHAVoULBZtdybdQFkCcuqSXUtzxqSpHsBfmUdgJhaiDQAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n </ng-container>\n <ng-template #notPictureTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name], selectOptionTableColumn.width);else overflowTemplate\">\n <div>{{ judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])}}</div>\n </ng-container>\n <ng-template #overflowTemplate>\n <div class=\"hd-option-overflow\" nz-tooltip\n [nzTooltipTitle]=\"selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name]\">\n {{\n judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])}}</div>\n </ng-template>\n </ng-template>\n </div>\n </div>\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-template #nomarlSelectTemplate>\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-template>\n\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 [nzPrecision]=\"formItem?.inputNumber?.precision || 2\"\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 <nz-list\n *ngIf=\"linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize).length === 0\"\n [nzDataSource]=\"[]\"></nz-list>\n <ng-container>\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]\"\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>",
|
|
2288
|
+
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%}::ng-deep .hd-select-table .ant-select-dropdown-menu{padding-top:33px}::ng-deep .hd-select-table .ant-select-dropdown-menu-item-disabled{background:#f5f8f6!important;border-bottom:1px solid #e8e8e8;position:absolute;top:0;z-index:10}::ng-deep .hd-select-table .ant-select-dropdown-menu-item-disabled:hover{background:#f5f8f6!important}.hd-option-header{display:flex;align-items:center;color:rgba(0,0,0,.85);background:#f5f8f6}.hd-option-line{display:flex;align-items:center}.hd-option-overflow{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"]
|
|
2221
2289
|
}] }
|
|
2222
2290
|
];
|
|
2223
2291
|
/** @nocollapse */
|
|
@@ -2305,6 +2373,11 @@
|
|
|
2305
2373
|
HdFormLinesComponent.prototype.isFilterData;
|
|
2306
2374
|
/** @type {?} */
|
|
2307
2375
|
HdFormLinesComponent.prototype.formValid;
|
|
2376
|
+
/**
|
|
2377
|
+
* @type {?}
|
|
2378
|
+
* @private
|
|
2379
|
+
*/
|
|
2380
|
+
HdFormLinesComponent.prototype.textWidthCache;
|
|
2308
2381
|
/**
|
|
2309
2382
|
* @type {?}
|
|
2310
2383
|
* @private
|
|
@@ -3325,6 +3398,8 @@
|
|
|
3325
3398
|
*/
|
|
3326
3399
|
/** @type {?} */
|
|
3327
3400
|
var ColWidth = {
|
|
3401
|
+
tablerImageColWidth: 25,
|
|
3402
|
+
// 表格小图标宽度
|
|
3328
3403
|
billNumberColWidth: 150,
|
|
3329
3404
|
// 单据单号列宽度
|
|
3330
3405
|
nameColWidth: 150,
|
|
@@ -5287,6 +5362,7 @@
|
|
|
5287
5362
|
exports.OperateBtn = OperateBtn;
|
|
5288
5363
|
exports.Page = Page;
|
|
5289
5364
|
exports.SelectOption = SelectOption;
|
|
5365
|
+
exports.SelectOptionTableColumn = SelectOptionTableColumn;
|
|
5290
5366
|
exports.TableCacheOption = TableCacheOption;
|
|
5291
5367
|
exports.TableColumn = TableColumn;
|
|
5292
5368
|
exports.TableTotalOption = TableTotalOption;
|