Commit d605ece0 authored by wangqinghua's avatar wangqinghua

commonService

parent eb3e6c9f
...@@ -67,7 +67,7 @@ export class CommonService implements OnInit { ...@@ -67,7 +67,7 @@ export class CommonService implements OnInit {
deleteThing(title,callback){ deleteThing(title,callback){
this.modalSer.confirm({ this.modalSer.confirm({
nzTitle: '删除', nzTitle: '删除',
nzContent: '<b style="color: red;">title</b>', nzContent: '<b style="color: red;">'+title+'</b>',
nzOkText: '确定', nzOkText: '确定',
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: callback, nzOnOk: callback,
......
...@@ -28,7 +28,16 @@ export class ExamineComponent implements OnInit { ...@@ -28,7 +28,16 @@ export class ExamineComponent implements OnInit {
} }
getList() { getList() {
this.systemSer.approveList().subscribe(
(res)=>{
}
)
this.systemSer.unApproveList().subscribe(
(res)=>{
}
)
} }
} }
...@@ -134,4 +134,12 @@ export class SystemService { ...@@ -134,4 +134,12 @@ export class SystemService {
approvalRemove(data): Observable<any>{ approvalRemove(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/approval/remove', data); return this.http.post(SERVER_API_URL + '/approval/remove', data);
} }
approveList(): Observable<any>{
return this.http.get(SERVER_API_URL + '/approval/approveList');
}
unApproveList(): Observable<any>{
return this.http.get(SERVER_API_URL + '/approval/unApproveList' );
}
} }
...@@ -82,4 +82,5 @@ ...@@ -82,4 +82,5 @@
</tbody> </tbody>
</nz-table> </nz-table>
<smart-type-asets #smartTypeAsets></smart-type-asets> <!--新增分类-->
\ No newline at end of file <smart-type-asets #smartTypeAsets (done)="getList()"></smart-type-asets>
\ No newline at end of file
...@@ -3,6 +3,7 @@ import {WorkService} from '../work.service'; ...@@ -3,6 +3,7 @@ import {WorkService} from '../work.service';
import {pageSize} from '../../app.constants'; import {pageSize} from '../../app.constants';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
import {TypeAsetsComponent} from '../modal/type-asets/type-asets.component'; import {TypeAsetsComponent} from '../modal/type-asets/type-asets.component';
import {NzMessageService} from 'ng-zorro-antd';
@Component({ @Component({
selector: 'smart-asset-part', selector: 'smart-asset-part',
...@@ -31,7 +32,8 @@ export class AssetPartComponent implements OnInit { ...@@ -31,7 +32,8 @@ export class AssetPartComponent implements OnInit {
startTime:'', startTime:'',
endTime:'', endTime:'',
}; };
constructor(private workSer:WorkService,private router:Router) { } constructor(private workSer:WorkService,private router:Router,
private messge:NzMessageService) { }
ngOnInit() { ngOnInit() {
this.getList(); this.getList();
...@@ -43,7 +45,7 @@ export class AssetPartComponent implements OnInit { ...@@ -43,7 +45,7 @@ export class AssetPartComponent implements OnInit {
if(res.errCode == 10000){ if(res.errCode == 10000){
this.parentList = res.data; this.parentList = res.data;
}else{ }else{
this.messge.error(res.errMsg);
} }
} }
) )
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
<div nz-row [nzGutter]="4" class="search-form"> <div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>添加资产</button> <button (click)="showAddModal()" nz-button nzType="default"><i class="anticon anticon-plus"></i>添加资产</button>
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>导入资产</button> <button nz-button nzType="default"><i class="anticon anticon-plus"></i>导入资产</button>
...@@ -78,4 +78,7 @@ ...@@ -78,4 +78,7 @@
</td> </td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
\ No newline at end of file
<!--新增资产-->
<smart-assets #smartAssets (done)="getList()"></smart-assets>
\ No newline at end of file
import {Component, OnInit} from '@angular/core'; import {Component, OnInit, ViewChild} from '@angular/core';
import {WorkService} from '../../work.service'; import {WorkService} from '../../work.service';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {CommonService} from '../../../shared/common/common.service'; import {CommonService} from '../../../shared/common/common.service';
import {NzMessageService} from 'ng-zorro-antd';
import {AssetsComponent} from '../../modal/assets/assets.component';
@Component({ @Component({
selector: 'smart-child-assets', selector: 'smart-child-assets',
...@@ -9,12 +11,13 @@ import {CommonService} from '../../../shared/common/common.service'; ...@@ -9,12 +11,13 @@ import {CommonService} from '../../../shared/common/common.service';
styles: [] styles: []
}) })
export class ChildAssetsComponent implements OnInit { export class ChildAssetsComponent implements OnInit {
@ViewChild('smartAssets') smartAssets:AssetsComponent;
childId; childId;
childrenList; childrenList;
constructor(private workSer: WorkService, private routerInfo: ActivatedRoute, constructor(private workSer: WorkService, private routerInfo: ActivatedRoute,
private conmonSer:CommonService) { private conmonSer:CommonService,private message:NzMessageService) {
this.routerInfo.queryParams.subscribe( this.routerInfo.queryParams.subscribe(
(res) => { (res) => {
this.childId = res.id; this.childId = res.id;
...@@ -35,10 +38,32 @@ export class ChildAssetsComponent implements OnInit { ...@@ -35,10 +38,32 @@ export class ChildAssetsComponent implements OnInit {
} }
//删除资产 //删除资产
deleteInVentory(){ deleteInVentory(item){
const data = {
inventoryIds:[]
};
data.inventoryIds.push(item.id);
this.conmonSer.deleteThing("确定删除该资产?",()=>{ this.conmonSer.deleteThing("确定删除该资产?",()=>{
// this.workSer. this.workSer.deleteInventory(data).subscribe(
(res)=>{
if(res.errCode == 10000){
this.getList();
this.message.success("删除资产成功");
}else{
this.message.error(res.errMsg);
}
}
)
}) })
} }
//添加资产
showAddModal() {
this.smartAssets.showAddModal("添加资产");
}
showEditModal(){
this.smartAssets.showEditModal("编辑资产");
}
} }
<nz-modal [nzWidth]="1080" [nzFooter]="null" [(nzVisible)]="isBasicEdit" nzTitle="{{modalTitle}}" <nz-modal [nzWidth]="1080" [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleEditCancel()" (nzOnOk)="handEditleOk()">
(nzOnCancel)="handleEditCancel()" (nzOnOk)="handEditleOk()">
<form nz-form [formGroup]="validateForm"> <form nz-form [formGroup]="validateForm">
<div nz-form class="ant-advanced-search-form form-select"> <div nz-form class="ant-advanced-search-form form-select">
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="name">资产名称
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产名称" name="name" formControlName="name"> <input nz-input placeholder="资产名称" name="name" formControlName="name">
...@@ -27,7 +26,7 @@ ...@@ -27,7 +26,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="secondLevelType">资产数量 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="secondLevelType">资产数量
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产数量" name="inventorycount" <input nz-input placeholder="资产数量" name="inventorycount"
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired>库存</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">库存</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="库存" name="stock" formControlName="stock"> <input nz-input placeholder="库存" name="stock" formControlName="stock">
</nz-form-control> </nz-form-control>
...@@ -71,7 +70,7 @@ ...@@ -71,7 +70,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired>使用</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">使用</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="使用" name="usedcount" <input nz-input placeholder="使用" name="usedcount"
formControlName="usedcount"> formControlName="usedcount">
...@@ -91,7 +90,7 @@ ...@@ -91,7 +90,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired>借出</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">借出</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="借出" name="lendcount" <input nz-input placeholder="借出" name="lendcount"
formControlName="lendcount"> formControlName="lendcount">
...@@ -113,7 +112,7 @@ ...@@ -113,7 +112,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired>维修</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">维修</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="维修" name="repaircount" <input nz-input placeholder="维修" name="repaircount"
formControlName="repaircount"> formControlName="repaircount">
...@@ -135,7 +134,7 @@ ...@@ -135,7 +134,7 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired>报废</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">报废</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="报废" name="scrapcount" <input nz-input placeholder="报废" name="scrapcount"
formControlName="scrapcount"> formControlName="scrapcount">
...@@ -146,11 +145,10 @@ ...@@ -146,11 +145,10 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired>父分类 <nz-form-label [nzOffset]="4" [nzSpan]="6">父分类
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select name="secondLevelType" nzPlaceHolder="选择父分类" <nz-select name="secondLevelType" nzPlaceHolder="选择父分类" [ngModelOptions]="{standalone: true}" [(ngModel)]="parentId" (ngModelChange)="getTypeByParent($event)">
(nzListOfSelectedValueChange)="getTypeByParent($event)">
<ng-container *ngFor="let item of parentTypeList"> <ng-container *ngFor="let item of parentTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option> <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container> </ng-container>
......
import {Component, OnInit} from '@angular/core'; import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {WorkService} from '../../work.service'; import {WorkService} from '../../work.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({ @Component({
selector: 'smart-assets', selector: 'smart-assets',
...@@ -8,15 +9,18 @@ import {WorkService} from '../../work.service'; ...@@ -8,15 +9,18 @@ import {WorkService} from '../../work.service';
styles: [] styles: []
}) })
export class AssetsComponent implements OnInit { export class AssetsComponent implements OnInit {
@Output() done = new EventEmitter<any>();
isVisible = false; isVisible = false;
title; title;
parentId;
validateForm:FormGroup; validateForm:FormGroup;
parentTypeList; parentTypeList;
typeList; typeList;
constructor(private workSer:WorkService,private fb:FormBuilder) { constructor(private workSer:WorkService,private fb:FormBuilder,
private message:NzMessageService) {
} }
ngOnInit() { ngOnInit() {
...@@ -27,7 +31,7 @@ export class AssetsComponent implements OnInit { ...@@ -27,7 +31,7 @@ export class AssetsComponent implements OnInit {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
serialnoA:[null], serialnoA:[null],
invertoryname:[null], invertoryname:[null],
name:[null], name:[null,[Validators.required]],
hostid:[null], hostid:[null],
person:[null], person:[null],
ip:[null], ip:[null],
...@@ -43,7 +47,7 @@ export class AssetsComponent implements OnInit { ...@@ -43,7 +47,7 @@ export class AssetsComponent implements OnInit {
scrapcount:[null], scrapcount:[null],
storageLocation:[null], storageLocation:[null],
groupid:[null], groupid:[null],
inventoryTypeid:[null], inventoryTypeid:[null,[Validators.required]],
}); });
} }
...@@ -87,10 +91,10 @@ export class AssetsComponent implements OnInit { ...@@ -87,10 +91,10 @@ export class AssetsComponent implements OnInit {
if(this.validateForm.invalid){ if(this.validateForm.invalid){
return false; return false;
} }
if(this.title == ""){ if(this.title == "添加资产"){
this.create(); this.create();
} }
if(this.title == ""){ if(this.title == "编辑资产"){
this.update(); this.update();
} }
} }
...@@ -98,7 +102,13 @@ export class AssetsComponent implements OnInit { ...@@ -98,7 +102,13 @@ export class AssetsComponent implements OnInit {
create(){ create(){
this.workSer.createInventory(this.validateForm.value).subscribe( this.workSer.createInventory(this.validateForm.value).subscribe(
(res)=>{ (res)=>{
this.isVisible = false; if(res.errCode == 10000){
this.message.success("添加资产成功");
this.isVisible = false;
this.done.emit();
}else{
this.message.error(res.errMsg);
}
} }
) )
} }
......
<nz-modal [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"> <nz-modal [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateForm"> <form nz-form [formGroup]="validateForm">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">分类类型</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name">分类类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<nz-tag nzMode="checkable" [nzChecked]="true" (nzCheckedChange)="checkChange($event)">父分类</nz-tag> <nz-tag nzMode="checkable" [nzChecked]="!isChildren" (nzCheckedChange)="checkChange('parent')">父分类</nz-tag>
<nz-tag nzMode="checkable" [nzChecked]="true" (nzCheckedChange)="checkChange($event)">子分类</nz-tag> <nz-tag nzMode="checkable" [nzChecked]="isChildren" (nzCheckedChange)="checkChange('children')">子分类</nz-tag>
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="isChildren">
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="parentid">选择父分类</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select style="width: 100%;" formControlName="parentid" name="parentid" id="parentid" nzPlaceHolder="选择父分类" (ngModelChange)="changeType($event)">
<ng-container *ngFor="let item of parentList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
<nz-form-explain *ngIf="validateForm.get('parentid').dirty && validateForm.get('parentid').errors">请选择父分类!</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
...@@ -15,14 +26,14 @@ ...@@ -15,14 +26,14 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="status">分类编号</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="typeno">分类编号</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<input type="text" nz-input formControlName="name" name="typeno" id="typeno"> <input type="text" nz-input formControlName="typeno" name="typeno" id="typeno">
<nz-form-explain *ngIf="validateForm.get('typeno').dirty && validateForm.get('typeno').errors">请选择分类编号!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('typeno').dirty && validateForm.get('typeno').errors">请选择分类编号!</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="tyoeDescribe">分类描述</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="tyoeDescribe">分类描述</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<textarea id="tyoeDescribe" row="4" nz-input formControlName="tyoeDescribe"></textarea> <textarea id="tyoeDescribe" row="4" nz-input formControlName="tyoeDescribe"></textarea>
<nz-form-explain *ngIf="validateForm.get('tyoeDescribe').dirty && validateForm.get('tyoeDescribe').errors">请输入分类描述!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('tyoeDescribe').dirty && validateForm.get('tyoeDescribe').errors">请输入分类描述!</nz-form-explain>
......
import {Component, OnInit} from '@angular/core'; import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {timeEnd} from '@ngtools/webpack/src/benchmark'; import {timeEnd} from '@ngtools/webpack/src/benchmark';
import {FormBuilder, FormGroup} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {WorkService} from '../../work.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({ @Component({
selector: 'smart-type-asets', selector: 'smart-type-asets',
...@@ -8,28 +10,51 @@ import {FormBuilder, FormGroup} from '@angular/forms'; ...@@ -8,28 +10,51 @@ import {FormBuilder, FormGroup} from '@angular/forms';
styles: [] styles: []
}) })
export class TypeAsetsComponent implements OnInit { export class TypeAsetsComponent implements OnInit {
@Output() done = new EventEmitter<any>();
title; title;
isVisible; isVisible;
parentList;
isChildren = false;
validateForm:FormGroup; validateForm:FormGroup;
constructor(private fb:FormBuilder) { constructor(private fb:FormBuilder,private workSer:WorkService,
private message:NzMessageService) {
} }
checkChange(){ checkChange(e){
if(e == 'parent'){
this.isChildren = false;
this.validateForm.get("parentid").clearValidators();
}
if(e == "children"){
this.isChildren = true;
this.validateForm.get('parentid').setValidators(Validators.required);
}
} }
ngOnInit() { ngOnInit() {
this.initForm(); this.initForm();
} }
getParentList(){
this.workSer.findByParentType().subscribe(
(res)=>{
if(res.errCode == 10000){
this.parentList = res.data;
}else{
this.message.error(res.errMsg);
}
}
)
}
initForm(){ initForm(){
this.validateForm = this.fb.group( this.validateForm = this.fb.group(
{ {
parentid:[null], parentid:[null],
name:[null], name:[null,[Validators.required]],
typeno:[null], typeno:[null,[Validators.required]],
tyoeDescribe:[null], tyoeDescribe:[null],
} }
) )
...@@ -38,14 +63,25 @@ export class TypeAsetsComponent implements OnInit { ...@@ -38,14 +63,25 @@ export class TypeAsetsComponent implements OnInit {
showAddModal(title) { showAddModal(title) {
this.isVisible = true; this.isVisible = true;
this.title = title; this.title = title;
this.getParentList();
} }
showEditModal(title) { showEditModal(title) {
this.isVisible = true; this.isVisible = true;
this.title = title; this.title = title;
this.getParentList();
this.workSer.findType("").subscribe(
(res)=>{
}
)
} }
handleCancel() { handleCancel() {
this.isVisible = false;
}
handleOk() {
for(let i in this.validateForm.controls){ for(let i in this.validateForm.controls){
this.validateForm.controls[i].markAsDirty(); this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity(); this.validateForm.controls[i].updateValueAndValidity();
...@@ -53,9 +89,30 @@ export class TypeAsetsComponent implements OnInit { ...@@ -53,9 +89,30 @@ export class TypeAsetsComponent implements OnInit {
if(this.validateForm.invalid){ if(this.validateForm.invalid){
return false; return false;
} }
if(this.title == "新增分类"){
this.create();
}
if(this.title == "编辑分类分类"){
this.update();
}
} }
handleOk() { create(){
this.isVisible = false; this.workSer.createType(this.validateForm.value).subscribe(
(res)=>{
if(res.errCode == 10000){
this.isVisible = false;
this.done.emit();
this.initForm();
this.message.success("新增分类成功");
}else{
this.message.error(res.errMsg);
}
}
)
}
update(){
} }
} }
...@@ -124,4 +124,9 @@ export class WorkService { ...@@ -124,4 +124,9 @@ export class WorkService {
return this.http.get(SERVER_API_URL + '/inventory/findInventory/' +params); return this.http.get(SERVER_API_URL + '/inventory/findInventory/' +params);
} }
//删除资产(可批量)
deleteInventory(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/inventory/deleteInventory' ,data);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment