浏览代码

客商行业

liangyan0105 3 年之前
父节点
当前提交
6c11b04cf6

+ 18 - 9
src/app/routes/basedata/basedata-routing.module.ts

@@ -16,11 +16,16 @@ import { TestAddComponent } from './test/add/add.component';
 import { BasedataCustomerClassificationComponent } from './customer-classification/customer-classification.component';
 import { BasedataInformationSourcesComponent } from './information-sources/information-sources.component';
 import { BasedataBusinessRelationsComponent } from './business-relations/business-relations.component';
-import { BasedataCustomerGroupingComponent } from './customer-grouping/customer-grouping.component';
-import { BasedataSleepTypeComponent } from './sleep-type/sleep-type.component';
-import { BasedataUnitSizeComponent } from './unit-size/unit-size.component';
-import { BasedataCustomerRelationshipComponent } from './customer-relationship/customer-relationship.component';
+import { BasedataCustomerGroupingComponent } from './customer-grouping/customer-grouping.component';
+import { BasedataSleepTypeComponent } from './sleep-type/sleep-type.component';
+import { BasedataUnitSizeComponent } from './unit-size/unit-size.component';
+import { BasedataCustomerRelationshipComponent } from './customer-relationship/customer-relationship.component';
 import { BasedataValueLevelComponent } from './value-level/value-level.component';
+import { BasedataMerchantsIndustryComponent } from './merchants-industry/merchants-industry.component';
+import { BasedataMerchantsIndustryAddComponent } from './merchants-industry/add/add.component';
+import { BasedataPersonnelSizeComponent } from './personnel-size/personnel-size.component';
+import { BasedataRegisteredCapitalComponent } from './registered-capital/registered-capital.component';
+
 
 const routes: Routes = [
   { path: 'customer', component: BasedataCustomerComponent },
@@ -37,11 +42,15 @@ const routes: Routes = [
   { path: 'customer-classification', component: BasedataCustomerClassificationComponent },
   { path: 'information-sources', component: BasedataInformationSourcesComponent },
   { path: 'business-relations', component: BasedataBusinessRelationsComponent },
-  { path: 'customer-grouping', component: BasedataCustomerGroupingComponent },
-  { path: 'sleep-type', component: BasedataSleepTypeComponent },
-  { path: 'unit-size', component: BasedataUnitSizeComponent },
-  { path: 'customer-relationship', component: BasedataCustomerRelationshipComponent },
-  { path: 'value-level', component: BasedataValueLevelComponent }];
+  { path: 'customer-grouping', component: BasedataCustomerGroupingComponent },
+  { path: 'sleep-type', component: BasedataSleepTypeComponent },
+  { path: 'unit-size', component: BasedataUnitSizeComponent },
+  { path: 'customer-relationship', component: BasedataCustomerRelationshipComponent },
+  { path: 'value-level', component: BasedataValueLevelComponent },
+  { path: 'merchants-industry', component: BasedataMerchantsIndustryComponent },
+  { path: 'add', component: BasedataMerchantsIndustryAddComponent },
+  { path: 'personnel-size', component: BasedataPersonnelSizeComponent },
+  { path: 'registered-capital', component: BasedataRegisteredCapitalComponent }];
 @NgModule({
   imports: [RouterModule.forChild(routes)],
   exports: [RouterModule]

+ 18 - 9
src/app/routes/basedata/basedata.module.ts

@@ -28,11 +28,16 @@ import { TestAddComponent } from './test/add/add.component';
 import { BasedataCustomerClassificationComponent } from './customer-classification/customer-classification.component';
 import { BasedataInformationSourcesComponent } from './information-sources/information-sources.component';
 import { BasedataBusinessRelationsComponent } from './business-relations/business-relations.component';
-import { BasedataCustomerGroupingComponent } from './customer-grouping/customer-grouping.component';
-import { BasedataSleepTypeComponent } from './sleep-type/sleep-type.component';
-import { BasedataUnitSizeComponent } from './unit-size/unit-size.component';
-import { BasedataCustomerRelationshipComponent } from './customer-relationship/customer-relationship.component';
+import { BasedataCustomerGroupingComponent } from './customer-grouping/customer-grouping.component';
+import { BasedataSleepTypeComponent } from './sleep-type/sleep-type.component';
+import { BasedataUnitSizeComponent } from './unit-size/unit-size.component';
+import { BasedataCustomerRelationshipComponent } from './customer-relationship/customer-relationship.component';
 import { BasedataValueLevelComponent } from './value-level/value-level.component';
+import { BasedataMerchantsIndustryComponent } from './merchants-industry/merchants-industry.component';
+import { BasedataMerchantsIndustryAddComponent } from './merchants-industry/add/add.component';
+import { BasedataPersonnelSizeComponent } from './personnel-size/personnel-size.component';
+import { BasedataRegisteredCapitalComponent } from './registered-capital/registered-capital.component';
+
 
 const COMPONENTS = [
   BasedataCustomerComponent,
@@ -50,11 +55,15 @@ const COMPONENTS = [
   BasedataCustomerClassificationComponent,
   BasedataInformationSourcesComponent,
   BasedataBusinessRelationsComponent,
-  BasedataCustomerGroupingComponent,
-  BasedataSleepTypeComponent,
-  BasedataUnitSizeComponent,
-  BasedataCustomerRelationshipComponent,
-  BasedataValueLevelComponent];
+  BasedataCustomerGroupingComponent,
+  BasedataSleepTypeComponent,
+  BasedataUnitSizeComponent,
+  BasedataCustomerRelationshipComponent,
+  BasedataValueLevelComponent,
+  BasedataMerchantsIndustryComponent,
+  BasedataMerchantsIndustryAddComponent,
+  BasedataPersonnelSizeComponent,
+  BasedataRegisteredCapitalComponent];
 const COMPONENTS_NOROUNT = [BasedataCustomerEditComponent,
   BasedataCustomerIsAbbreviationComponent,
   BasedataPostAddComponent,

+ 27 - 0
src/app/routes/basedata/merchants-industry/add/add.component.html

@@ -0,0 +1,27 @@
+<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
+  <nz-form-item>
+    <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="code">项目编码</nz-form-label>
+    <nz-form-control [nzSm]="14" [nzXs]="24" >
+      <input placeholder="自动生成" nz-input formControlName="code" id="code" [(ngModel)]="baseArchivesProjectApproval.code"/>
+      <!-- <nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">
+        请输入项目编码
+      </nz-form-explain> -->
+    </nz-form-control>
+  </nz-form-item>
+  <nz-form-item>
+    <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">项目名称</nz-form-label>
+    <nz-form-control [nzSm]="14" [nzXs]="24" >
+      <input nz-input formControlName="name" id="name" [(ngModel)]="baseArchivesProjectApproval.name" maxlength=20/>
+      <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
+        请输入项目名称
+      </nz-form-explain>
+    </nz-form-control>
+  </nz-form-item>
+  <nz-form-item>
+    <nz-form-label nzRequired [nzSm]="6" [nzXs]="24">是否启用
+    </nz-form-label>
+    <nz-form-control [nzSm]="14" [nzXs]="24">
+      <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="status" name="status" nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
+    </nz-form-control>
+  </nz-form-item>
+</form>

+ 24 - 0
src/app/routes/basedata/merchants-industry/add/add.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { BasedataMerchantsIndustryAddComponent } from './add.component';
+
+describe('BasedataMerchantsIndustryAddComponent', () => {
+  let component: BasedataMerchantsIndustryAddComponent;
+  let fixture: ComponentFixture<BasedataMerchantsIndustryAddComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ BasedataMerchantsIndustryAddComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BasedataMerchantsIndustryAddComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 37 - 0
src/app/routes/basedata/merchants-industry/add/add.component.ts

@@ -0,0 +1,37 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+import { NzModalRef, NzMessageService, NzNotificationService, NzI18nService } from 'ng-zorro-antd';
+import { FormBuilder, Validators, FormGroup } from '@angular/forms';
+@Component({
+  selector: 'app-basedata-merchants-industry-add',
+  templateUrl: './add.component.html',
+})
+export class BasedataMerchantsIndustryAddComponent implements OnInit {
+  constructor(private modal: NzModalRef) {}
+
+  ngOnInit() {
+    //初始化表单
+    // this.validateForm = this.fb.group({
+    //   code: [{ value: '', disabled: true }, []],
+    //   name: [null, [Validators.required]],
+    //   status: [null],
+    // });
+    //新增子集获取父节点id
+    // if(this.parentId&&this.parentId!=="0"){
+    // this.baseArchivesProjectApproval.parentId = this.parentId;
+    // }
+  }
+  validateForm!: FormGroup;
+  parentId = '0'; //父级id
+  status = true;
+  //实体
+  // baseArchivesProjectApproval: BaseArchivesProjectApproval = {};
+
+  //关闭
+  close() {
+    this.modal.destroy();
+  }
+}

+ 127 - 0
src/app/routes/basedata/merchants-industry/merchants-industry.component.html

@@ -0,0 +1,127 @@
+<!-- 头部面包屑导航 -->
+<page-header [action]="phActionTpl">
+  <ng-template #phActionTpl> </ng-template>
+</page-header>
+
+<nz-card>
+  <div nz-row [nzGutter]="24">
+    <!-- 左边 card -->
+    <div nz-col nzMd="24" nzLg="12">
+      <nz-card>
+        <!-- 添加一级 -->
+        <div nz-row [nzGutter]="24" style="margin-bottom: 10px;">
+          <div nz-col nzMd="24" nzLg="24">
+            <button (click)="add()" nz-button acl [acl-ability]="'base-archives-project-approval:add'" nzType="primary">
+              添加一级
+            </button>
+          </div>
+        </div>
+
+        <!-- 搜索框 -->
+        <div nz-row [nzGutter]="24">
+          <div nz-col nzMd="24" nzLg="24">
+            <nz-input-group [nzSuffix]="suffixIcon" style="width:100%">
+              <input type="text" nz-input placeholder="请输入" [(ngModel)]="searchValue" />
+            </nz-input-group>
+            <ng-template #suffixIcon>
+              <i nz-icon type="search"></i>
+            </ng-template>
+          </div>
+        </div>
+
+        <!-- tree -->
+        <div nz-row [nzGutter]="24">
+          <div nz-col nzMd="24" nzLg="24">
+            <!-- <nz-tree
+              [nzData]="nodes"
+              [nzSearchValue]="searchValue"
+              (nzClick)="treeClick($event)"
+              (nzDblClick)="openFolder($event)"
+            >
+              <ng-template #contextTemplate>
+                <ul nz-menu nzInDropDown>
+                  <li nz-menu-item (click)="addChild()" acl [acl-ability]="'base-archives-project-approval:add'">
+                    {{ 'button.add' | translate }}
+                  </li>
+                  <li nz-menu-item (click)="delete()" acl [acl-ability]="'base-archives-project-approval:delete'">
+                    {{ 'table.delete' | translate }}
+                  </li>
+                  <li nz-menu-item (click)="cancel()">{{ 'button.cancel' | translate }}</li>
+                </ul>
+              </ng-template>
+              <ng-template #nzTreeTemplate let-node>
+                <span class="custom-node">
+                  <span *ngIf="!node.isLeaf" (contextmenu)="contextMenu(node.key, $event, contextTemplate)">
+                    <span class="folder-name">{{ node.title }}</span>
+                  </span>
+                  <span *ngIf="node.isLeaf" (contextmenu)="contextMenu(node.key, $event, contextTemplate)">
+                    <span class="file-name">{{ node.title }}</span>
+                  </span>
+                </span>
+              </ng-template>
+            </nz-tree> -->
+          </div>
+        </div>
+      </nz-card>
+    </div>
+
+    <!-- 右边 card -->
+    <div nz-col nzMd="24" nzLg="12">
+      <nz-card>
+        <!-- <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
+          <nz-form-item>
+            <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">项目编码</nz-form-label>
+            <nz-form-control [nzSm]="14" [nzXs]="24">
+              <input
+                formControlName="code"
+                id="code"
+                [(ngModel)]="baseArchivesProjectApproval.code"
+                name="code"
+                nz-input
+                placeholder="自动生成"
+              />
+            </nz-form-control>
+          </nz-form-item>
+          <nz-form-item>
+            <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">项目名称</nz-form-label>
+            <nz-form-control [nzSm]="14" [nzXs]="24">
+              <input
+                formControlName="name"
+                id="name"
+                [(ngModel)]="baseArchivesProjectApproval.name"
+                name="name"
+                nz-input
+                placeholder="{{ 'placeholder' | translate }}项目名称"
+                maxlength="20"
+              />
+              <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
+                请输入项目名称
+              </nz-form-explain>
+            </nz-form-control>
+          </nz-form-item>
+          <nz-form-item>
+            <nz-form-label nzRequired [nzSm]="8" [nzXs]="24">是否启用 </nz-form-label>
+            <nz-form-control [nzSm]="14" [nzXs]="24">
+              <nz-switch
+                [ngModelOptions]="{ standalone: true }"
+                [(ngModel)]="status"
+                name="status"
+                nzCheckedChildren="是"
+                nzUnCheckedChildren="否"
+              ></nz-switch>
+            </nz-form-control>
+          </nz-form-item>
+          <nz-form-item>
+            <nz-form-label [nzSm]="8" [nzXs]="24" [nzNoColon]="true"> </nz-form-label>
+            <nz-form-control [nzSm]="14" [nzXs]="24">
+              <button nzType="primary" (click)="reset()" nz-button>
+                <span>{{ 'button.reset' | translate }}</span>
+              </button>
+              <button nz-button nzType="primary">保存</button>
+            </nz-form-control>
+          </nz-form-item>
+        </form> -->
+      </nz-card>
+    </div>
+  </div>
+</nz-card>

+ 24 - 0
src/app/routes/basedata/merchants-industry/merchants-industry.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { BasedataMerchantsIndustryComponent } from './merchants-industry.component';
+
+describe('BasedataMerchantsIndustryComponent', () => {
+  let component: BasedataMerchantsIndustryComponent;
+  let fixture: ComponentFixture<BasedataMerchantsIndustryComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ BasedataMerchantsIndustryComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BasedataMerchantsIndustryComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 50 - 0
src/app/routes/basedata/merchants-industry/merchants-industry.component.ts

@@ -0,0 +1,50 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+import { BasedataMerchantsIndustryAddComponent } from './add/add.component';
+import { NzModalService, NzTreeNode,NzDropdownContextComponent } from 'ng-zorro-antd';
+
+@Component({
+  selector: 'app-basedata-merchants-industry',
+  templateUrl: './merchants-industry.component.html',
+})
+export class BasedataMerchantsIndustryComponent implements OnInit {
+  constructor(private modalService: NzModalService) {}
+
+  ngOnInit() {}
+  dropdown: NzDropdownContextComponent;
+
+  //右键取消
+  cancel() {
+    this.dropdown.close();
+  }
+
+  add() {
+    const modalRef = this.modalService.create({
+      nzTitle: '新增',
+      nzContent: BasedataMerchantsIndustryAddComponent,
+      nzWidth: 600,
+      nzFooter: [
+        {
+          label: '关闭',
+          type: 'default',
+          onClick: addModel => {
+            // addModel.close();
+          },
+        },
+        {
+          label: '确定',
+          type: 'primary',
+          // loading:this.modelSaveLoading,
+          onClick: addModel => {
+            // addModel.submitForm().then(() => {
+            //   // this.getListContractTree();
+            // });
+          },
+        },
+      ],
+    });
+  }
+}

+ 9 - 0
src/app/routes/basedata/personnel-size/personnel-size.component.html

@@ -0,0 +1,9 @@
+<page-header [action]="phActionTpl">
+  <ng-template #phActionTpl>
+    <button (click)="add()" nz-button nzType="primary">新建</button>
+  </ng-template>
+</page-header>
+<nz-card>
+  <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
+  <st #st [data]="url" [columns]="columns"></st>
+</nz-card>

+ 24 - 0
src/app/routes/basedata/personnel-size/personnel-size.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { BasedataPersonnelSizeComponent } from './personnel-size.component';
+
+describe('BasedataPersonnelSizeComponent', () => {
+  let component: BasedataPersonnelSizeComponent;
+  let fixture: ComponentFixture<BasedataPersonnelSizeComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ BasedataPersonnelSizeComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BasedataPersonnelSizeComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 45 - 0
src/app/routes/basedata/personnel-size/personnel-size.component.ts

@@ -0,0 +1,45 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-personnel-size',
+  templateUrl: './personnel-size.component.html',
+})
+export class BasedataPersonnelSizeComponent implements OnInit {
+  url = `/user`;
+  searchSchema: SFSchema = {
+    properties: {
+      no: {
+        type: 'string',
+        title: '编号'
+      }
+    }
+  };
+  @ViewChild('st') st: STComponent;
+  columns: STColumn[] = [
+    { title: '编号', index: 'no' },
+    { title: '调用次数', type: 'number', index: 'callNo' },
+    { title: '头像', type: 'img', width: '50px', index: 'avatar' },
+    { title: '时间', type: 'date', index: 'updatedAt' },
+    {
+      title: '',
+      buttons: [
+        // { text: '查看', click: (item: any) => `/form/${item.id}` },
+        // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
+      ]
+    }
+  ];
+
+  constructor(private http: _HttpClient, private modal: ModalHelper) { }
+
+  ngOnInit() { }
+
+  add() {
+    // this.modal
+    //   .createStatic(FormEditComponent, { i: { id: 0 } })
+    //   .subscribe(() => this.st.reload());
+  }
+
+}

+ 9 - 0
src/app/routes/basedata/registered-capital/registered-capital.component.html

@@ -0,0 +1,9 @@
+<page-header [action]="phActionTpl">
+  <ng-template #phActionTpl>
+    <button (click)="add()" nz-button nzType="primary">新建</button>
+  </ng-template>
+</page-header>
+<nz-card>
+  <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
+  <st #st [data]="url" [columns]="columns"></st>
+</nz-card>

+ 24 - 0
src/app/routes/basedata/registered-capital/registered-capital.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { BasedataRegisteredCapitalComponent } from './registered-capital.component';
+
+describe('BasedataRegisteredCapitalComponent', () => {
+  let component: BasedataRegisteredCapitalComponent;
+  let fixture: ComponentFixture<BasedataRegisteredCapitalComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ BasedataRegisteredCapitalComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BasedataRegisteredCapitalComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 45 - 0
src/app/routes/basedata/registered-capital/registered-capital.component.ts

@@ -0,0 +1,45 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+
+@Component({
+  selector: 'app-basedata-registered-capital',
+  templateUrl: './registered-capital.component.html',
+})
+export class BasedataRegisteredCapitalComponent implements OnInit {
+  url = `/user`;
+  searchSchema: SFSchema = {
+    properties: {
+      no: {
+        type: 'string',
+        title: '编号'
+      }
+    }
+  };
+  @ViewChild('st') st: STComponent;
+  columns: STColumn[] = [
+    { title: '编号', index: 'no' },
+    { title: '调用次数', type: 'number', index: 'callNo' },
+    { title: '头像', type: 'img', width: '50px', index: 'avatar' },
+    { title: '时间', type: 'date', index: 'updatedAt' },
+    {
+      title: '',
+      buttons: [
+        // { text: '查看', click: (item: any) => `/form/${item.id}` },
+        // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
+      ]
+    }
+  ];
+
+  constructor(private http: _HttpClient, private modal: ModalHelper) { }
+
+  ngOnInit() { }
+
+  add() {
+    // this.modal
+    //   .createStatic(FormEditComponent, { i: { id: 0 } })
+    //   .subscribe(() => this.st.reload());
+  }
+
+}