Merge branch 'master' of http://gitea.dctpay.com/yuanye/puhui-go-web
commit
de6fa34226
@ -0,0 +1,5 @@ |
||||
export const goodsTypeSearch = [ |
||||
{title: "标题" , formControlName: "title"}, |
||||
{title: "业务类型" , formControlName: "businessType"} , |
||||
]; |
||||
|
@ -0,0 +1,10 @@ |
||||
export interface GoodsTypeData { |
||||
id: number; |
||||
parentId: number; |
||||
title: string; |
||||
businessType: number; |
||||
imgUrl: string; |
||||
createTime: string; |
||||
updateTime: string; |
||||
status: number; |
||||
} |
@ -1,23 +0,0 @@ |
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { SysAccountComponent } from './sys-account.component'; |
||||
|
||||
describe('SysAccountComponent', () => { |
||||
let component: SysAccountComponent; |
||||
let fixture: ComponentFixture<SysAccountComponent>; |
||||
|
||||
beforeEach(async () => { |
||||
await TestBed.configureTestingModule({ |
||||
imports: [SysAccountComponent] |
||||
}) |
||||
.compileComponents(); |
||||
|
||||
fixture = TestBed.createComponent(SysAccountComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -1,23 +0,0 @@ |
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { SysRoleComponent } from './sys-role.component'; |
||||
|
||||
describe('SysRoleComponent', () => { |
||||
let component: SysRoleComponent; |
||||
let fixture: ComponentFixture<SysRoleComponent>; |
||||
|
||||
beforeEach(async () => { |
||||
await TestBed.configureTestingModule({ |
||||
imports: [SysRoleComponent] |
||||
}) |
||||
.compileComponents(); |
||||
|
||||
fixture = TestBed.createComponent(SysRoleComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -0,0 +1,20 @@ |
||||
<form nz-form [formGroup]="searchForm"> |
||||
<div nz-row [nzGutter]="24"> |
||||
<div nz-col [nzSpan]="8" *ngFor="let item of goodsTypeSearch"> |
||||
<nz-form-item> |
||||
<nz-form-label>{{item.title}}</nz-form-label> |
||||
<nz-form-control> |
||||
<input nz-input formControlName="{{item.formControlName}}" /> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
</div> |
||||
|
||||
<div nz-col [nzSpan]="8"> |
||||
<div class="search-area"> |
||||
<button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">搜索</button> |
||||
<button nz-button (click)="searchFormReset()">重置</button> |
||||
<!-- <button nz-button [nzType]="'primary'" (click)="showEdit(true, null)">创建</button>--> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
@ -0,0 +1,6 @@ |
||||
.search-area { |
||||
text-align: center; |
||||
} |
||||
button { |
||||
margin-left: 8px; |
||||
} |
@ -0,0 +1,57 @@ |
||||
import { Component } from '@angular/core'; |
||||
import {FormGroup, FormsModule, NonNullableFormBuilder, ReactiveFormsModule, Validators} from "@angular/forms"; |
||||
import {NzButtonComponent} from "ng-zorro-antd/button"; |
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid"; |
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form"; |
||||
import {NzInputDirective} from "ng-zorro-antd/input"; |
||||
import {RoleService} from "../../../servies/role/role.service"; |
||||
import {MenuService} from "../../../servies/menu/menu.service"; |
||||
import {NzMessageService} from "ng-zorro-antd/message"; |
||||
import {NzModalService} from "ng-zorro-antd/modal"; |
||||
import {NgForOf} from "@angular/common"; |
||||
import {goodsTypeSearch} from "../../../data/goods/goods.namespace"; |
||||
|
||||
@Component({ |
||||
selector: 'app-goods-type', |
||||
standalone: true, |
||||
imports: [ |
||||
FormsModule, |
||||
NzButtonComponent, |
||||
NzColDirective, |
||||
NzFormControlComponent, |
||||
NzFormDirective, |
||||
NzFormItemComponent, |
||||
NzFormLabelComponent, |
||||
NzInputDirective, |
||||
NzRowDirective, |
||||
ReactiveFormsModule, |
||||
NgForOf |
||||
], |
||||
templateUrl: './goods-type.component.html', |
||||
styleUrl: './goods-type.component.less' |
||||
}) |
||||
export class GoodsTypeComponent { |
||||
// 搜索表单
|
||||
searchForm: FormGroup; |
||||
|
||||
constructor(private fb: NonNullableFormBuilder) { |
||||
// 初始化搜索框
|
||||
this.searchForm = this.fb.group({ |
||||
title: [''], |
||||
parentId: [''], |
||||
businessType: [''], |
||||
}); |
||||
|
||||
} |
||||
|
||||
// 搜索表单提交
|
||||
searchFormSubmit(): void { |
||||
} |
||||
|
||||
// 搜索表单重置
|
||||
searchFormReset(): void { |
||||
this.searchForm.reset(); |
||||
} |
||||
|
||||
protected readonly goodsTypeSearch = goodsTypeSearch; |
||||
} |
@ -0,0 +1,12 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
import { CommonModule } from '@angular/common'; |
||||
|
||||
|
||||
|
||||
@NgModule({ |
||||
declarations: [], |
||||
imports: [ |
||||
CommonModule |
||||
] |
||||
}) |
||||
export class GoodsModule { } |
@ -0,0 +1,8 @@ |
||||
import { Routes } from '@angular/router'; |
||||
import {GoodsTypeComponent} from "./goods-type/goods-type.component"; |
||||
|
||||
|
||||
export const GOODS_ROUTES: Routes = [ |
||||
{ path: 'goods_type', component: GoodsTypeComponent}, |
||||
|
||||
]; |
Loading…
Reference in new issue