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