Selaa lähdekoodia

首页 派工单

chenc 4 vuotta sitten
vanhempi
commit
aa056f3a81

+ 5 - 5
src/app/delon.module.ts

@@ -29,11 +29,11 @@ const MOCK_MODULES = !environment.production ? [DelonMockModule.forRoot({ data:
 import { RouteReuseStrategy } from '@angular/router';
 import { ReuseTabService, ReuseTabStrategy } from '@delon/abc/reuse-tab';
 const REUSETAB_PROVIDES = [
-  // {
-  //   provide: RouteReuseStrategy,
-  //   useClass: ReuseTabStrategy,
-  //   deps: [ReuseTabService],
-  // },
+  {
+    provide: RouteReuseStrategy,
+    useClass: ReuseTabStrategy,
+    deps: [ReuseTabService],
+  },
 ];
 // #endregion
 

+ 3 - 1
src/app/entity/fbs/fbs-workshop-dispatch-list.ts

@@ -56,11 +56,13 @@ export class FbsWorkshopDispatchList extends Page{
 	isScanCodeSwith?:boolean;
 	//
 	fbsTechnologicalProcessName?:string;
+	fbsTechnologicalProcessId?:string;//工艺流程主表id
 
 	latestCompletedQuantity?:string;
   manHoursCompleted?:string;
   numberEfficiency?:string;
-  workingHoursEfficiency?:string;
+	workingHoursEfficiency?:string;
+	
 	
 	fbsWorkshopDispatchListList?:FbsWorkshopDispatchList[]
 	stateList?:any[];//多选状态

+ 5 - 1
src/app/layout/default/default.component.html

@@ -1,7 +1,11 @@
 <div class="alain-default__progress-bar" *ngIf="isFetching"></div>
 <layout-header class="alain-default__header"></layout-header>
 <layout-sidebar class="alain-default__aside"></layout-sidebar>
+<!-- <section class="alain-default__content">
+  <router-outlet></router-outlet>
+</section> -->
 <section class="alain-default__content">
+  <reuse-tab></reuse-tab>
   <router-outlet></router-outlet>
 </section>
-<ng-template #settingHost></ng-template>
+<ng-template #settingHost></ng-template>

+ 6 - 6
src/app/routes/dashboard/analysis/analysis.component.html

@@ -432,14 +432,14 @@
       [nzScroll]="{x:columnTable2Width+'px',y:'35vw'}" [nzShowPagination]="false" [nzFrontPagination]="false">
         <thead>
           <tr>
-            <th style="background-color:rgb(223, 223, 219);" nzWidth="30px" nzLeft="0px"><strong>序号</strong></th>
-            <th style="background-color:rgb(223, 223, 219);" nzWidth="90px" nzLeft="30px"><strong>生产订单</strong></th>
-            <th style="background-color:rgb(223, 223, 219);" nzWidth="90px" nzLeft="120px"><strong>物料编码</strong></th>
-            <th style="background-color:rgb(223, 223, 219);" nzWidth="120px" nzLeft="210px"><strong>物料名称</strong></th>
-            <th style="background-color:rgb(223, 223, 219);" nzWidth="30px" nzLeft="310px"><strong>数量</strong></th>
+            <th style="background-color:rgb(223, 223, 219);" nzWidth="30px" nzLeft="0px" nzAlign="center"><strong>序号</strong></th>
+            <th style="background-color:rgb(223, 223, 219);" nzWidth="90px" nzLeft="30px" nzAlign="center"><strong>生产订单</strong></th>
+            <th style="background-color:rgb(223, 223, 219);" nzWidth="90px" nzLeft="120px" nzAlign="center"><strong>物料编码</strong></th>
+            <th style="background-color:rgb(223, 223, 219);" nzWidth="120px" nzLeft="210px" nzAlign="center"><strong>物料名称</strong></th>
+            <th style="background-color:rgb(223, 223, 219);" nzWidth="30px" nzLeft="310px" nzAlign="center"><strong>数量</strong></th>
             <!-- <th style="background-color:rgb(223, 223, 219);" nzWidth="4vw"><strong>{{fbsWorkshopDispatchListPlanningReport.year}}</strong></th> -->
             <ng-container *ngFor="let day of fbsWorkshopDispatchListPlanningReport.dayList">
-              <th style="background-color:rgb(223, 223, 219);padding: 2px;" nzWidth="25px">{{day}}</th>
+              <th style="background-color:rgb(223, 223, 219);padding: 2px;" nzWidth="25px" nzAlign="center">{{day}}</th>
             </ng-container>
 
           </tr>

+ 22 - 10
src/app/routes/dashboard/analysis/analysis.component.ts

@@ -450,10 +450,12 @@ export class DashboardAnalysisComponent implements OnInit {
       ['生产订单号'], // 生产订单号
       ['物料编码'], // 物料编码
       ['物料名称'], // 物料名称
-      ['月度计划'], // 月度计划
+      ['计划数量'], // 月度计划
       ['标准工时'], // 标准工时
-      ['累计完成数量'], // 累计完成数量
-      ['累计完成工时'], // 累计完成工时
+      ['完成数量'], // 累计完成数量
+      ['实际工时'], // 累计完成工时
+      ['计划达成率'], // 计划达成率
+      ['计划生产效率'], // 计划生产效率
     ];
     data.push(title);
     this.listOfData.forEach(element => {
@@ -462,10 +464,20 @@ export class DashboardAnalysisComponent implements OnInit {
       row.push(element.productionOrderNumberName)
       row.push(element.productId)
       row.push(element.product)
-      row.push(convertingNumbers(element.numberOfTasksTotal))
-      row.push(convertingNumbers(element.standardWorkingHoursTotal))
+      row.push(convertingNumbers(element.surplusNumberOfTasksTotal))//numberOfTasksTotal
+      row.push(convertingNumbers(element.surplusStandardWorkingHoursTotal))//standardWorkingHoursTotal
       row.push(element.quantityCompletedTotal)//quantityCompletedTotal//latestCompletedQuantity
       row.push(convertingNumbers(element.manHoursCompletedTotal))
+      if(element.projectName!="统计"){
+        row.push(element.achievementRate+"%")
+        if(element.productionEfficiency){
+          row.push(element.productionEfficiency+"%")
+        }else{
+          row.push("0.0%")
+        }
+      }
+      
+      
       data.push(row);
     });
     let efficiencyTotal=[
@@ -474,15 +486,15 @@ export class DashboardAnalysisComponent implements OnInit {
       ['总生产效率'],
       [this.productivityTotal+'%'],
       ['出勤总工时'],
-      [this.AbnormalWorkingHoursTotal.attendanceHours],
+      [this.abnormalWorkingHours.attendanceHours],
       ['加班总工时'],
-      [this.AbnormalWorkingHoursTotal.overtimeHours],
+      [this.abnormalWorkingHours.overtimeHours],
       ['其他总工时'],
-      [this.AbnormalWorkingHoursTotal.train],
+      [this.abnormalWorkingHours.other],
       ['异常总工时统计'],
-      [this.AbnormalWorkingHoursTotal.abnormalWorkingHours],
+      [this.abnormalWorkingHours.quality],
       ['仓库总工时统计'],
-      [this.AbnormalWorkingHoursTotal.warehouse]
+      [this.abnormalWorkingHours.plan]
     ];
     data.push(efficiencyTotal);
     // 导出

+ 2 - 2
src/app/routes/fbs-abnormal-working-hours/add/add.component.html

@@ -5,8 +5,8 @@
     <thead>
       <tr>
         <!-- 异常工时信息统计单 -->
-        <th colspan="7">
-          <h2><strong>生产异常信息统计单</strong></h2>
+        <th colspan="13">
+          <h2><strong>生产报表</strong></h2>
         </th>
       </tr>
     </thead>

+ 2 - 2
src/app/routes/fbs-abnormal-working-hours/update/update.component.html

@@ -4,8 +4,8 @@
     <thead>
       <tr>
         <!-- 异常工时信息统计单 -->
-        <th colspan="7">
-          <h2><strong>生产异常信息统计单</strong></h2>
+        <th colspan="13">
+          <h2><strong>生产报表</strong></h2>
         </th>
       </tr>
     </thead>

+ 2 - 2
src/app/routes/fbs-abnormal-working-hours/view/view.component.html

@@ -4,8 +4,8 @@
     <thead>
       <tr>
         <!-- 异常工时信息统计单 -->
-        <th colspan="7">
-          <h2><strong>生产异常信息统计单</strong></h2>
+        <th colspan="13">
+          <h2><strong>生产报表</strong></h2>
         </th>
       </tr>
     </thead>

+ 4 - 1
src/app/routes/fbs-workshop-dispatch-list/list/list.component.html

@@ -143,7 +143,10 @@
                           nzUnCheckedChildren="否" (ngModelChange)="isSwitchChange(item)">
                         </nz-switch>
         </td>
-        <td>{{item.fbsTechnologicalProcessItemName}}</td>
+        <td>
+         <div>{{item.fbsTechnologicalProcessItemName}}</div> 
+
+        </td>
         <td>
           <nz-badge nzStatus="yellow" *ngIf="item.state=='0'" nzText="派工"></nz-badge>
           <nz-badge nzStatus="green" *ngIf="item.state=='1'" nzText="上岗"></nz-badge>

+ 8 - 1
src/app/routes/fbs-workshop-dispatch-list/update/update.component.html

@@ -82,7 +82,14 @@
       </tr>
       <tr>
         <td>工艺</td>
-        <td>{{fbsWorkshopDispatchList.fbsTechnologicalProcessName}}</td>
+        <td>
+          <nz-select [(ngModel)]="fbsWorkshopDispatchList.fbsTechnologicalProcessId" style="width: 200px" nzShowSearch nzAllowClear
+          nzPlaceHolder="请选择" (ngModelChange)="fbsTechnologicalProcessChange($event,fbsWorkshopDispatchList)" [nzDropdownMatchSelectWidth]="false">
+          <ng-container *ngFor="let fbsTechnologicalProcess of fbsTechnologicalProcessList">
+            <nz-option nzLabel="{{fbsTechnologicalProcess.name}}" [nzValue]="fbsTechnologicalProcess.id"> </nz-option>
+          </ng-container>
+        </nz-select>
+      </td>
         <td></td>
         <td></td>
       </tr>

+ 29 - 1
src/app/routes/fbs-workshop-dispatch-list/update/update.component.ts

@@ -6,6 +6,8 @@ import { FbsWorkshopDispatchListService } from 'app/services/fbs/fbs-workshop-di
 import { DatePipe } from '@angular/common';
 import { FbsPersonnelService } from 'app/services/fbs/fbs-personnel.service';
 import {setHours} from 'date-fns'
+import { FbsTechnologicalProcess } from 'app/entity/fbs/fbs-technological-process';
+import { FbsTechnologicalProcessService } from 'app/services/fbs/fbs-technological-process.service';
 @Component({
   selector: 'app-fbs-workshop-dispatch-list-update',
   templateUrl: './update.component.html',
@@ -33,7 +35,8 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
     private fbsWorkshopDispatchListService: FbsWorkshopDispatchListService,
     private nzNotificationService: NzNotificationService,
     private datePipe:DatePipe,
-    private fbsPersonnelService:FbsPersonnelService
+    private fbsPersonnelService:FbsPersonnelService,
+    private fbsTechnologicalProcessService:FbsTechnologicalProcessService
   ) { 
     
   }
@@ -42,6 +45,7 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
     this.getProperList();
     this.getProductionOrderNumberList();
     this.getById();
+    this.getTechnologicalProcess();
   }
 
   saveLoading=false;//加载动态
@@ -191,6 +195,30 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
     })
   }
 
+
+  /**
+   * 工艺下拉数据
+   */
+  fbsTechnologicalProcessList=[];
+  getTechnologicalProcess(){
+    let fbsTechnologicalProcess=new FbsTechnologicalProcess();
+    fbsTechnologicalProcess.pageSize=20000;
+    this.fbsTechnologicalProcessService.list(fbsTechnologicalProcess).then((response)=>{
+      this.fbsTechnologicalProcessList=JSON.parse(JSON.stringify(response.result.records))
+    })
+  }
+
+  /**
+   * 工艺下拉选择事件
+   */
+  fbsTechnologicalProcessChange(event,data?:any){
+    this.fbsTechnologicalProcessList.forEach(element => {
+      if(event===element.id){
+        data.fbsTechnologicalProcessName=element.name;
+      }
+    });
+  }
+
 //时间格式可选择时分秒
 timeDefaultValue = setHours(new Date(), 0);
   /**