Bladeren bron

派工 首页

chenc 4 jaren geleden
bovenliggende
commit
77ddd10aea

+ 2 - 0
src/app/entity/fbs/fbs-workshop-dispatch-list.ts

@@ -46,6 +46,8 @@ export class FbsWorkshopDispatchList extends Page{
 	plannedQuantity?:number;
 	//U8标准工时
 	standardWorkingHoursZ?:string
+	//剩余数量
+	remainingQuantity?:number;
 
 	latestCompletedQuantity?:string;
   manHoursCompleted?:string;

+ 7 - 3
src/app/routes/fbs-workshop-dispatch-list/add/add.component.html

@@ -95,6 +95,7 @@
           <th nzWidth="5%">物料编码</th>
           <th nzWidth="5%">物料名称</th>
           <th nzWidth="5%">计划数量</th>
+          <th nzWidth="5%">剩余数量</th>
           <th nzWidth="5%">派工数量</th>
           <th nzWidth="5%">标准工时</th>
           <th nzWidth="6%">计划开工时间</th>
@@ -107,7 +108,7 @@
         <tr *ngFor="let data of editRowTable.data">
           <td>{{data.sort}}</td>
           <td>
-            <nz-select [(ngModel)]="data.personnelIdU8" style="width: 100%;" nzShowSearch
+            <nz-select [(ngModel)]="data.personnelIdU8" style="width: 100px" nzShowSearch
               nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="personnelChange($event,data)">
               <ng-container *ngFor="let proper of properList">
                 <nz-option [nzLabel]="proper.personnelName" [nzValue]="proper.personnelCode"> </nz-option>
@@ -119,10 +120,10 @@
             </nz-date-picker>
           </td>
           <td>
-            <nz-select [(ngModel)]="data.productionOrderNumberId" style="width: 100%;" nzShowSearch
+            <nz-select [(ngModel)]="data.productionOrderNumberId" style="width: 200px" nzShowSearch
               nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="productionOrderNumberChange($event,data)" [nzDropdownMatchSelectWidth]="false">
               <ng-container *ngFor="let productionOrderNumber of productionOrderNumberList">
-                <nz-option [nzLabel]="productionOrderNumber.mocode" [nzValue]="productionOrderNumber.moid"> </nz-option>
+                <nz-option nzLabel="{{productionOrderNumber.mocode}}--{{productionOrderNumber.cinvcode}}--{{productionOrderNumber.cinvname}}--{{productionOrderNumber.qty}}" [nzValue]="productionOrderNumber.moid"> </nz-option>
               </ng-container>
             </nz-select>
           </td>
@@ -140,6 +141,9 @@
           <td>
             {{data.plannedQuantity}}
           </td>
+          <td>
+            {{data.remainingQuantity}}
+          </td>
           <td>
             <nz-input-number [(ngModel)]="data.numberOfTasks" [nzMin]="0" [nzStep]="1" (ngModelChange)="numberOfTasksChange($event,data)">
             </nz-input-number>

+ 3 - 2
src/app/routes/fbs-workshop-dispatch-list/add/add.component.ts

@@ -159,9 +159,10 @@ export class FbsWorkshopDispatchListAddComponent implements OnInit {
     fbsWorkshopDispatchList.productId=data.productId;
     this.fbsWorkshopDispatchListService.getDispatchNumberByOrderIdProductId(fbsWorkshopDispatchList).then((response)=>{
       if(response.result){
-        data.numberOfTasks=data.plannedQuantity-response.result;
+        // data.numberOfTasks=data.plannedQuantity-response.result;
+        data.remainingQuantity=data.plannedQuantity-response.result;
         //计算标准工时
-        this.numberOfTasksChange(data.numberOfTasks,data);
+        this.numberOfTasksChange(data.remainingQuantity,data);
       }
     })
   }

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

@@ -53,6 +53,16 @@
           </nz-form-control>
         </nz-form-item>
       </div>
+      <!-- 名称 -->
+      <div nz-col nzXs="24" nzSm="4" nzLg="8">
+        <nz-form-item class="nz-form-item">
+          <nz-form-label [nzSpan]="8">姓名</nz-form-label>
+          <nz-form-control [nzSpan]="16">
+            <input [(ngModel)]="fbsWorkshopDispatchList.name" name="name" nz-input
+              placeholder="请输入" />
+          </nz-form-control>
+        </nz-form-item>
+      </div>
     </div>
   </form>
   <!-- 数据表 -->
@@ -94,7 +104,8 @@
           <nz-badge nzStatus="red" *ngIf="item.state=='0'" nzText="派工"></nz-badge>
           <nz-badge nzStatus="orange" *ngIf="item.state=='1'" nzText="上岗"></nz-badge>
           <nz-badge nzStatus="yellow" *ngIf="item.state=='2'" nzText="暂停"></nz-badge>
-          <nz-badge nzStatus="green" *ngIf="item.state=='3'" nzText="完工"></nz-badge>
+          <nz-badge nzStatus="green" *ngIf="item.state=='3'&&item.numberOfTasks==item.latestCompletedQuantity" nzText="完工"></nz-badge>
+          <nz-badge nzStatus="yellow" *ngIf="item.state=='3'&&item.numberOfTasks!=item.latestCompletedQuantity" nzText="进行中"></nz-badge>
         </td>
         <!-- <td>{{item.plannedStartTime}}</td>
         <td>{{item.plannedEndTime}}</td> -->

+ 2 - 2
src/app/routes/fbs-workshop-dispatch-list/list/list.component.ts

@@ -152,8 +152,8 @@ export class FbsWorkshopDispatchListListComponent implements OnInit {
       } else {
         element.numberEfficiency = 0;
       }
-      if (manHoursCompleted && Number(manHoursCompleted) !== 0) {
-        element.workingHoursEfficiency = ((Number(manHoursCompleted) / Number(standardWorkingHours)) * 100).toFixed(0);
+      if (manHoursCompleted && Number(manHoursCompleted) !== 0&&standardWorkingHours && Number(standardWorkingHours) !== 0) {
+        element.workingHoursEfficiency = (Number(standardWorkingHours) / (Number(manHoursCompleted)) * 100).toFixed(0);
       } else {
         element.workingHoursEfficiency = 0;
       }

+ 9 - 3
src/app/routes/fbs-workshop-dispatch-list/update/update.component.html

@@ -28,10 +28,10 @@
       <tr>
         <td>生产订单号</td>
         <td>
-          <nz-select [(ngModel)]="fbsWorkshopDispatchList.productionOrderNumberId" style="width: 100%;" nzShowSearch
-          nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="productionOrderNumberChange($event)">
+          <nz-select [(ngModel)]="fbsWorkshopDispatchList.productionOrderNumberId" style="width: 200px" nzShowSearch
+          nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="productionOrderNumberChange($event)" [nzDropdownMatchSelectWidth]="false">
           <ng-container *ngFor="let productionOrderNumber of productionOrderNumberList">
-            <nz-option [nzLabel]="productionOrderNumber.mocode" [nzValue]="productionOrderNumber.moid"> </nz-option>
+            <nz-option nzLabel="{{productionOrderNumber.mocode}}--{{productionOrderNumber.cinvcode}}--{{productionOrderNumber.cinvname}}--{{productionOrderNumber.qty}}" [nzValue]="productionOrderNumber.moid"> </nz-option>
           </ng-container>
         </nz-select>
         </td>
@@ -51,6 +51,12 @@
         <td>计划数量</td>
         <td>{{fbsWorkshopDispatchList.plannedQuantity}}</td>
       </tr>
+      <tr>
+        <td>剩余数量</td>
+        <td>{{fbsWorkshopDispatchList.remainingQuantity}}</td>
+        <td></td>
+        <td></td>
+      </tr>
       <tr>
         <td>派工数量</td>
         <td><nz-input-number [(ngModel)]="fbsWorkshopDispatchList.numberOfTasks" [nzMin]="0" [nzStep]="1" (ngModelChange)="numberOfTasksChange($event,fbsWorkshopDispatchList)"></nz-input-number></td>

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

@@ -132,7 +132,7 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
           this.fbsWorkshopDispatchList.plannedQuantity=element.qty;
           this.fbsWorkshopDispatchList.standardWorkingHoursZ=element.cinvdefine13;
           //计算总单据剩余派工数量
-          // this.getDispatchNumberByOrderIdProductId(this.fbsWorkshopDispatchList);
+          this.getDispatchNumberByOrderIdProductId(this.fbsWorkshopDispatchList);
         }
       });
     }
@@ -147,9 +147,9 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
     fbsWorkshopDispatchList.productId=data.productId;
     this.fbsWorkshopDispatchListService.getDispatchNumberByOrderIdProductId(fbsWorkshopDispatchList).then((response)=>{
       if(response.result){
-        data.numberOfTasks=data.plannedQuantity-response.result;
+        data.remainingQuantity=data.plannedQuantity-response.result;
         //计算标准工时
-        this.numberOfTasksChange(data.numberOfTasks,data);
+        this.numberOfTasksChange(data.remainingQuantity,data);
       }
     })
   }