Merge branch 'weiyu'
This commit is contained in:
		| @ -2,6 +2,7 @@ | ||||
|  | ||||
| <nz-card> | ||||
|     <div class="filter-wrap"> | ||||
|         <button nz-button nzType="primary" (click)="add()">新增</button> | ||||
|         <button nz-button nzType="primary" (click)="open()"><i nz-icon nzType="plus" nzTheme="outline"></i>筛选</button> | ||||
|     </div> | ||||
|     <st #st [data]="this.service.$api_smsTemplate_page " [columns]="columns" [req]="{ process: beforeReq }" | ||||
| @ -23,7 +24,7 @@ | ||||
|     </ng-template> | ||||
| </nz-drawer> | ||||
|  | ||||
| <nz-modal [(nzVisible)]="isVisible" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"> | ||||
| <nz-modal [(nzVisible)]="isVisible" [nzTitle]="isEdit?'编辑':'新增'" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"> | ||||
|     <ng-container *nzModalContent> | ||||
|         <sf #sfEdit [formData]="tempData" [schema]="editSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true" | ||||
|             [button]="'none'"></sf> | ||||
|  | ||||
| @ -21,6 +21,7 @@ export class SmsTemplateComponent implements OnInit { | ||||
|   visible = false; | ||||
|   isVisible = false; | ||||
|   tempData = {}; | ||||
|   isEdit = false; | ||||
|  | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
| @ -52,7 +53,8 @@ export class SmsTemplateComponent implements OnInit { | ||||
|       templateCode: { | ||||
|         type: 'string', | ||||
|         title: '模板编码', | ||||
|         ui: { placeholder: '请输入模板编码' } | ||||
|         readOnly: this.isEdit ? true : false, | ||||
|         ui: { placeholder: '请输入模板编码', } | ||||
|       }, | ||||
|       templateContent: { | ||||
|         type: 'string', | ||||
| @ -100,6 +102,7 @@ export class SmsTemplateComponent implements OnInit { | ||||
|  | ||||
|   edit(item: any) { | ||||
|     // console.log(item); | ||||
|     this.isEdit = true; | ||||
|     this.tempData = item; | ||||
|     this.isVisible = true; | ||||
|   } | ||||
| @ -117,6 +120,12 @@ export class SmsTemplateComponent implements OnInit { | ||||
|     this.visible = false; | ||||
|   } | ||||
|  | ||||
|   add() { | ||||
|     this.isEdit = false; | ||||
|     this.tempData = {}; | ||||
|     this.isVisible = true; | ||||
|   } | ||||
|  | ||||
|   handleOk(): void { | ||||
|     const value = this.sfEdit.value; | ||||
|     const { id, templateCode, templateName, templateContent } = value | ||||
|  | ||||
| @ -34,12 +34,6 @@ | ||||
|       <span *ngIf="item?.uploadSts == '2'">上传中</span> | ||||
|       <span  *ngIf="item?.uploadSts == '4'" style="color: red;" (click)="unnormal(item)">上传异常</span> | ||||
|     </ng-template> | ||||
|     <ng-template st-row="artoname" let-item let-index="index"> | ||||
|       <a href="/">{{item.artoname}}</a> | ||||
|     </ng-template> | ||||
|     <ng-template st-row="billHCode" let-item let-index="index"> | ||||
|       <a href="/">{{item.billHCode}}</a> | ||||
|     </ng-template> | ||||
|     <ng-template st-row="invoiceType" let-item let-index="index"> | ||||
|       <span>增值税专用发票</span> | ||||
|     </ng-template> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user