Commit 5950fc3d authored by wangqinghua's avatar wangqinghua

配置菜单栏

parent 8ff3197c
...@@ -51,7 +51,9 @@ ...@@ -51,7 +51,9 @@
</div> </div>
</div> </div>
<nz-table #nzTable [nzData]="recordList" [nzLoading]="isLoading" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable [nzData]="recordList" [nzLoading]="isLoading" [nzFrontPagination]="false"
[nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
(nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
<th>费用名称</th> <th>费用名称</th>
...@@ -60,7 +62,7 @@ ...@@ -60,7 +62,7 @@
<th>总金额</th> <th>总金额</th>
<th>备件采购</th> <th>备件采购</th>
<th nzWidth="15%">委外费用</th> <th nzWidth="15%">委外费用</th>
<th>其他费用th> <th>其他费用</th>
<th>关联事件</th> <th>关联事件</th>
<th style="text-align: center">操作</th> <th style="text-align: center">操作</th>
</tr> </tr>
...@@ -68,26 +70,17 @@ ...@@ -68,26 +70,17 @@
<tbody> <tbody>
<tr *ngFor="let data of nzTable.data"> <tr *ngFor="let data of nzTable.data">
<td class="round-tag tag-form"> <td class="round-tag tag-form">
{{data.id}} {{data.name}}
</td> </td>
<td> <td>
{{data.title}} {{data.time | date:'yyyy-MM-dd HH:mm:ss'}}
</td>
<td>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
<td>
<span *ngIf="data.source == 0">系统告警</span>
<span *ngIf="data.source == 1">手动新增</span>
</td> </td>
<td>{{data.people}}</td>
<td>{{data.total}}</td>
<td>{{data.typeName}}</td> <td>{{data.typeName}}</td>
<td> <td>{{data.outsourcingmoney}}</td>
<span style="margin-right: 5px;" *ngFor="let item of data?.operators"> <td>{{data.othermoney}}</td>
{{item.username}} <td>{{data.othermoney}}</td>
</span>
</td>
<td>
<span *ngIf="data.status == 0">待处理</span>
<span *ngIf="data.status == 1">已结束</span>
</td>
<td class="handle text-center main-color"> <td class="handle text-center main-color">
<span *ngIf="data.status == 1" (click)="lookRecord(data)">查看</span> <span *ngIf="data.status == 1" (click)="lookRecord(data)">查看</span>
</td> </td>
......
import { Component, OnInit } from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {pageSize} from '../../app.constants'; import {pageSize} from '../../app.constants';
import {WorkService} from '../work.service';
@Component({ @Component({
selector: 'smart-cost-record', selector: 'smart-cost-record',
templateUrl: './cost-record.component.html', templateUrl: './cost-record.component.html',
styles: [] styles: []
}) })
export class CostRecordComponent implements OnInit { export class CostRecordComponent implements OnInit {
recordList = []; recordList = [];
isLoading = false; isLoading = false;
totalNum:Number; totalNum: Number;
pageNum:Number; pageNum: Number = 1;
pageCount:Number = pageSize; pageCount: Number = pageSize;
startTime; startTime;
endTime; endTime;
timeFormat = 'yyyy-MM-dd'; timeFormat = 'yyyy-MM-dd';
obj = { obj = {
startTime:'', startTime: '',
endTime:'', endTime: '',
searchStr:'', searchStr: '',
source:'' source: ''
}; };
constructor() { } constructor(private workSer: WorkService) {
}
ngOnInit() { ngOnInit() {
} this.getList();
}
//获取列表 //获取列表
getList(){ getList() {
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
obj: this.obj
};
this.workSer.findPage(data).subscribe(
(res) => {
this.recordList = res.data.data;
this.totalNum = res.data.totalNum;
}
);
}
} //搜索
search() {
this.pageNum = 1;
this.getList();
}
//搜索 //翻页
search(){ change(e) {
this.pageNum = 1; this.pageNum = e;
this.getList(); this.getList();
} }
//翻页 //查看
change(e){ lookRecord(data) {
this.pageNum = e;
this.getList();
}
//查看 }
lookRecord(data){
} showAddModal() {
showAddModal(){ }
}
} }
...@@ -204,6 +204,31 @@ export class WorkService { ...@@ -204,6 +204,31 @@ export class WorkService {
return this.http.put(SERVER_API_URL + '/sysevent/updateEventNoPre', data); return this.http.put(SERVER_API_URL + '/sysevent/updateEventNoPre', data);
} }
//修改费用记录
updateCost(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/cost/updateCost' ,data);
}
//分页筛选费用记录
findPage(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/cost/findPage' ,data);
}
//批量删除费用记录
deleteCost(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/cost/deleteCost' ,data);
}
//新增费用记录
addCost(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/cost/addCost' ,data);
}
//根据费用id查询
findById(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/cost/findById' ,data);
}
/** /**
* 附件文件 * 附件文件
* @param pararms 参数 * @param pararms 参数
......
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