|
@@ -9,7 +9,7 @@ import { ProjectFileService } from 'app/services/projectFile/project-file.servic
|
|
import { FbsWorkshopDispatchListService } from 'app/services/fbs/fbs-workshop-dispatch-list.service';
|
|
import { FbsWorkshopDispatchListService } from 'app/services/fbs/fbs-workshop-dispatch-list.service';
|
|
import { FbsAbnormalWorkingHoursService } from 'app/services/fbs/fbs-abnormal-working-hours.service';
|
|
import { FbsAbnormalWorkingHoursService } from 'app/services/fbs/fbs-abnormal-working-hours.service';
|
|
import { FbsWorkshopDispatchList } from 'app/entity/fbs/fbs-workshop-dispatch-list';
|
|
import { FbsWorkshopDispatchList } from 'app/entity/fbs/fbs-workshop-dispatch-list';
|
|
-
|
|
|
|
|
|
+import { convertingNumbers } from '@shared/utils/shared';
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-dashboard-analysis',
|
|
selector: 'app-dashboard-analysis',
|
|
templateUrl: './analysis.component.html',
|
|
templateUrl: './analysis.component.html',
|
|
@@ -105,12 +105,14 @@ export class DashboardAnalysisComponent implements OnInit {
|
|
// this.data = res;
|
|
// this.data = res;
|
|
// this.loading = false;
|
|
// this.loading = false;
|
|
// });
|
|
// });
|
|
|
|
+
|
|
this.getCircleChartData();
|
|
this.getCircleChartData();
|
|
this.feeTotal = `¥ ${this.feeData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`;
|
|
this.feeTotal = `¥ ${this.feeData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`;
|
|
this.alertTotal = `¥ ${this.feeData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`;
|
|
this.alertTotal = `¥ ${this.feeData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`;
|
|
|
|
+ this.getNow();
|
|
this.getSumDispatchReport();
|
|
this.getSumDispatchReport();
|
|
this.getAbnormalWorkingHoursReport();
|
|
this.getAbnormalWorkingHoursReport();
|
|
- this.getNow();
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -301,6 +303,7 @@ export class DashboardAnalysisComponent implements OnInit {
|
|
this.fbsWorkshopDispatchListService.getSumDispatchReport(this.fbsWorkshopDispatchList).then((response)=>{
|
|
this.fbsWorkshopDispatchListService.getSumDispatchReport(this.fbsWorkshopDispatchList).then((response)=>{
|
|
this.listOfData=response.result;
|
|
this.listOfData=response.result;
|
|
this.defaultSwitch();
|
|
this.defaultSwitch();
|
|
|
|
+ this.isSwitchChange();
|
|
if(this.listOfDataSelect===null){
|
|
if(this.listOfDataSelect===null){
|
|
this.listOfDataSelect=JSON.parse(JSON.stringify(response.result));
|
|
this.listOfDataSelect=JSON.parse(JSON.stringify(response.result));
|
|
}
|
|
}
|
|
@@ -379,10 +382,10 @@ export class DashboardAnalysisComponent implements OnInit {
|
|
listOfData=[]
|
|
listOfData=[]
|
|
|
|
|
|
isSwitch=false;//是否显示已完成订单
|
|
isSwitch=false;//是否显示已完成订单
|
|
- isSwitchChange(event){
|
|
|
|
|
|
+ isSwitchChange(){
|
|
this.listOfData.forEach(element => {
|
|
this.listOfData.forEach(element => {
|
|
if(element.status===4){
|
|
if(element.status===4){
|
|
- if(event===false){
|
|
|
|
|
|
+ if(this.isSwitch===false){
|
|
element.isSwitch=false;
|
|
element.isSwitch=false;
|
|
}else{
|
|
}else{
|
|
element.isSwitch=true;
|
|
element.isSwitch=true;
|
|
@@ -409,11 +412,11 @@ export class DashboardAnalysisComponent implements OnInit {
|
|
//初始化年月 默认当前年月
|
|
//初始化年月 默认当前年月
|
|
getNow(){
|
|
getNow(){
|
|
let date = new Date();
|
|
let date = new Date();
|
|
- this.year=date.getFullYear()+"";
|
|
|
|
|
|
+ this.fbsWorkshopDispatchList.year=date.getFullYear()+"";
|
|
if(date.getMonth()<10){
|
|
if(date.getMonth()<10){
|
|
- this.month="0"+(date.getMonth()+1)
|
|
|
|
|
|
+ this.fbsWorkshopDispatchList.month="0"+(date.getMonth()+1)
|
|
}else{
|
|
}else{
|
|
- this.month=(date.getMonth()+1)+"";
|
|
|
|
|
|
+ this.fbsWorkshopDispatchList.month=(date.getMonth()+1)+"";
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -444,10 +447,10 @@ export class DashboardAnalysisComponent implements OnInit {
|
|
row.push(element.productionOrderNumberName)
|
|
row.push(element.productionOrderNumberName)
|
|
row.push(element.productId)
|
|
row.push(element.productId)
|
|
row.push(element.product)
|
|
row.push(element.product)
|
|
- row.push(element.numberOfTasksTotal)
|
|
|
|
- row.push(element.standardWorkingHoursTotal)
|
|
|
|
- row.push(element.latestCompletedQuantity)//quantityCompletedTotal
|
|
|
|
- row.push(element.manHoursCompletedTotal)
|
|
|
|
|
|
+ row.push(convertingNumbers(element.numberOfTasksTotal))
|
|
|
|
+ row.push(convertingNumbers(element.standardWorkingHoursTotal))
|
|
|
|
+ row.push(element.quantityCompletedTotal)//quantityCompletedTotal//latestCompletedQuantity
|
|
|
|
+ row.push(convertingNumbers(element.manHoursCompletedTotal))
|
|
data.push(row);
|
|
data.push(row);
|
|
});
|
|
});
|
|
let efficiencyTotal=[
|
|
let efficiencyTotal=[
|