Просмотр исходного кода

Merge branch 'master' of http://139.196.39.194:9021/chenc/cd-project-management-web

liangyan0105 3 лет назад
Родитель
Сommit
ae90532f22

+ 26 - 0
src/app/entity/basedata/base-material-file-classification.ts

@@ -0,0 +1,26 @@
+import { Page } from '../page';
+/**
+ * 物料档案分类
+ */
+export class BaseMaterialFileClassification extends Page{
+    /**主键*/
+	id?:string;
+	/**编码*/
+	code?:string;
+	/**名称*/
+	name?:string;
+	/**父级id*/
+	parentId?:string;
+	/**排序*/
+    sort?:number;
+
+    /**用于tree */
+    //id
+    key?:string;
+    //name
+    title?:string;
+    //是否尾端true/false
+    isLeaf?:boolean;
+    //子集
+    children?:any[];
+}

+ 17 - 0
src/app/entity/basedata/base-material-file-modular.ts

@@ -0,0 +1,17 @@
+import { Page } from '../page';
+
+/**
+ * 物料档案模块
+ */
+export class BaseMaterialFileModular extends Page {
+    /**主键*/
+	 id?:string;
+	/**模块编码*/
+	 code?:string;
+	/**模块名称*/
+	 name?:string;
+	/**标准报价*/
+	standardQuotation?:number;
+	/**组织*/
+	 pkOrg?:string;
+}

+ 23 - 0
src/app/entity/basedata/base-material-file-product.ts

@@ -0,0 +1,23 @@
+import { Page } from '../page';
+import { BaseMaterialFileModular } from './base-material-file-modular';
+/**
+ * 物料档案产品
+ */
+export class BaseMaterialFileProduct extends Page{
+    /**主键*/
+	 id?:string;
+	/**产品编码*/
+	 code?:string;
+	/**产品名称*/
+	 name?:string;
+	/**组织*/
+	 pkOrg?:string;
+	/**排序*/
+	sort?:number;
+	/**状态(0:未启用, 1:启用)*/
+	status?:string;
+	/**产品属性(1采购2销售)*/
+	attribute?:string;
+	/**模块子表数据*/
+	baseMaterialFileModularList?:BaseMaterialFileModular[];
+}

+ 11 - 0
src/app/routes/contract-management/contract-management-routing.module.ts

@@ -0,0 +1,11 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+const routes: Routes = [
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class ContractManagementRoutingModule { }

+ 19 - 0
src/app/routes/contract-management/contract-management.module.ts

@@ -0,0 +1,19 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { ContractManagementRoutingModule } from './contract-management-routing.module';
+
+const COMPONENTS = [];
+const COMPONENTS_NOROUNT = [];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    ContractManagementRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class ContractManagementModule { }

+ 41 - 0
src/app/services/basedata/base-material-file-classification.service.ts

@@ -0,0 +1,41 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+import { Result } from 'app/entity/Result';
+import { BaseMaterialFileClassification } from 'app/entity/basedata/base-material-file-classification';
+
+@Injectable({
+  providedIn: 'root'
+})
+/**
+ * 物料档案分类
+ */
+export class BaseMaterialFileClassificationService {
+
+  constructor(private http:HttpClient) { }
+  //查詢Tree
+  async getTreeList(body: any): Promise<BaseResponse<Result<any>>> {
+    return await this.http.get<BaseResponse<Result<any>>>('/basedata/baseMaterialFileClassification/getTreeList', { params: body }).toPromise();
+  }
+
+   //新增
+   async add(body: BaseMaterialFileClassification): Promise<BaseResponse<any>> {
+    return await this.http.post<BaseResponse<any>>('basedata/baseMaterialFileClassification/add', body).toPromise();
+  }
+
+  //修改
+  async update(body: BaseMaterialFileClassification): Promise<BaseResponse<any>> {
+    return await this.http.put<BaseResponse<any>>('basedata/baseMaterialFileClassification/edit', body).toPromise();
+  }
+
+  //根据id查询
+  async getById(id: string): Promise<BaseResponse<BaseMaterialFileClassification>> {
+    return await this.http.get<BaseResponse<BaseMaterialFileClassification>>("basedata/baseMaterialFileClassification/queryById", { params: { id: id } }).toPromise();
+  }
+
+  //删除
+  async delete(id:any):Promise<BaseResponse<any>>{
+    return await this.http.delete<BaseResponse<any>>('basedata/baseMaterialFileClassification/delete',{ params: { id: id } }).toPromise();
+  }
+
+}

+ 42 - 0
src/app/services/basedata/base-material-file-modular.service.ts

@@ -0,0 +1,42 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+import { Result } from 'app/entity/Result';
+import { BaseMaterialFileModular } from 'app/entity/basedata/base-material-file-modular';
+
+@Injectable({
+  providedIn: 'root'
+})
+/**
+ * 物料产品模块
+ */
+export class BaseMaterialFileModularService {
+
+  constructor(private http:HttpClient) { }
+
+  //查詢列表数据
+  async list(body: any): Promise<BaseResponse<Result<any>>> {
+    return await this.http.get<BaseResponse<Result<any>>>('/basedata/baseMaterialFileModular/list', { params: body }).toPromise();
+  }
+
+   //新增
+   async add(body: BaseMaterialFileModular): Promise<BaseResponse<any>> {
+    return await this.http.post<BaseResponse<any>>('basedata/baseMaterialFileModular/add', body).toPromise();
+  }
+
+  //修改
+  async update(body: BaseMaterialFileModular): Promise<BaseResponse<any>> {
+    return await this.http.put<BaseResponse<any>>('basedata/baseMaterialFileModular/edit', body).toPromise();
+  }
+
+  //根据id查询
+  async getById(id: string): Promise<BaseResponse<BaseMaterialFileModular>> {
+    return await this.http.get<BaseResponse<BaseMaterialFileModular>>("basedata/baseMaterialFileModular/queryById", { params: { id: id } }).toPromise();
+  }
+
+  //删除
+  async delete(id:any):Promise<BaseResponse<any>>{
+    return await this.http.delete<BaseResponse<any>>('basedata/baseMaterialFileModular/delete',{ params: { id: id } }).toPromise();
+  }
+
+}

+ 62 - 0
src/app/services/basedata/base-material-file-product.service.ts

@@ -0,0 +1,62 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+import { Result } from 'app/entity/Result';
+import { BaseMaterialFileProduct } from 'app/entity/basedata/base-material-file-product';
+
+@Injectable({
+  providedIn: 'root'
+})
+/**
+ * 物料档案产品
+ */
+export class BaseMaterialFileProductService {
+
+  constructor(private http:HttpClient) { }
+
+  //查詢列表数据
+  async list(body: any): Promise<BaseResponse<Result<any>>> {
+    return await this.http.get<BaseResponse<Result<any>>>('/basedata/baseMaterialFileProduct/list', { params: body }).toPromise();
+  }
+
+  //新增
+  async add(body: BaseMaterialFileProduct): Promise<BaseResponse<any>> {
+    return await this.http.post<BaseResponse<any>>('basedata/baseMaterialFileProduct/add', body).toPromise();
+  }
+
+  //主表子表一起新增
+  async saveMainAndChild(body: BaseMaterialFileProduct): Promise<BaseResponse<any>> {
+    return await this.http.post<BaseResponse<any>>('basedata/baseMaterialFileProduct/saveMainAndChild', body).toPromise();
+  }
+
+  //修改
+  async update(body: BaseMaterialFileProduct): Promise<BaseResponse<any>> {
+    return await this.http.put<BaseResponse<any>>('basedata/baseMaterialFileProduct/edit', body).toPromise();
+  }
+
+  //主表与子表一起修改
+  async updateMainAndChild(body: BaseMaterialFileProduct): Promise<BaseResponse<any>> {
+    return await this.http.put<BaseResponse<any>>('basedata/baseMaterialFileProduct/updateMainAndChild', body).toPromise();
+  }
+
+  //根据id查询
+  async getById(id: string): Promise<BaseResponse<BaseMaterialFileProduct>> {
+    return await this.http.get<BaseResponse<BaseMaterialFileProduct>>("basedata/baseMaterialFileProduct/queryById", { params: { id: id } }).toPromise();
+  }
+
+  //根据id查询主子表数据
+  async queryMainAndChildById(id: string): Promise<BaseResponse<BaseMaterialFileProduct>> {
+    return await this.http.get<BaseResponse<BaseMaterialFileProduct>>("basedata/baseMaterialFileProduct/queryMainAndChildById", { params: { id: id } }).toPromise();
+  }
+
+  //删除
+  async delete(id:any):Promise<BaseResponse<any>>{
+    return await this.http.delete<BaseResponse<any>>('basedata/baseMaterialFileProduct/delete',{ params: { id: id } }).toPromise();
+  }
+
+  //主表和子表一起删除
+  async deleteMainAndChild(id:any):Promise<BaseResponse<any>>{
+    return await this.http.delete<BaseResponse<any>>('basedata/baseMaterialFileProduct/deleteMainAndChild',{ params: { id: id } }).toPromise();
+  }
+
+}