Commit 5950fc3d authored by wangqinghua's avatar wangqinghua

配置菜单栏

parent 8ff3197c
......@@ -51,7 +51,9 @@
</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>
<tr>
<th>费用名称</th>
......@@ -60,7 +62,7 @@
<th>总金额</th>
<th>备件采购</th>
<th nzWidth="15%">委外费用</th>
<th>其他费用th>
<th>其他费用</th>
<th>关联事件</th>
<th style="text-align: center">操作</th>
</tr>
......@@ -68,26 +70,17 @@
<tbody>
<tr *ngFor="let data of nzTable.data">
<td class="round-tag tag-form">
{{data.id}}
{{data.name}}
</td>
<td>
{{data.title}}
</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>
{{data.time | date:'yyyy-MM-dd HH:mm:ss'}}
</td>
<td>{{data.people}}</td>
<td>{{data.total}}</td>
<td>{{data.typeName}}</td>
<td>
<span style="margin-right: 5px;" *ngFor="let item of data?.operators">
{{item.username}}
</span>
</td>
<td>
<span *ngIf="data.status == 0">待处理</span>
<span *ngIf="data.status == 1">已结束</span>
</td>
<td>{{data.outsourcingmoney}}</td>
<td>{{data.othermoney}}</td>
<td>{{data.othermoney}}</td>
<td class="handle text-center main-color">
<span *ngIf="data.status == 1" (click)="lookRecord(data)">查看</span>
</td>
......
import { Component, OnInit } from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {pageSize} from '../../app.constants';
import {WorkService} from '../work.service';
@Component({
selector: 'smart-cost-record',
......@@ -11,48 +12,60 @@ export class CostRecordComponent implements OnInit {
recordList = [];
isLoading = false;
totalNum:Number;
pageNum:Number;
pageCount:Number = pageSize;
totalNum: Number;
pageNum: Number = 1;
pageCount: Number = pageSize;
startTime;
endTime;
timeFormat = 'yyyy-MM-dd';
obj = {
startTime:'',
endTime:'',
searchStr:'',
source:''
startTime: '',
endTime: '',
searchStr: '',
source: ''
};
constructor() { }
constructor(private workSer: WorkService) {
}
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(){
search() {
this.pageNum = 1;
this.getList();
}
//翻页
change(e){
change(e) {
this.pageNum = e;
this.getList();
}
//查看
lookRecord(data){
lookRecord(data) {
}
showAddModal(){
showAddModal() {
}
......
......@@ -204,6 +204,31 @@ export class WorkService {
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 参数
......
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