chenc 3 سال پیش
والد
کامیت
2e062f7fc7

+ 35 - 16
src/app/routes/fbs-workshop-dispatch-list/add/add.component.html

@@ -81,7 +81,11 @@
     <!-- 按钮 -->
     <div nz-row [nzGutter]="24">
       <div nz-col nzMd="24" nzLg="24">
-        <button (click)="workshopDispatchAddRow()" nz-button nzType="primary">新增</button>
+        <!-- <button (click)="workshopDispatchAddRow()" nz-button nzType="primary">新增</button> -->
+        <button nz-button nzType="primary" (click)="reference()">
+          <i nz-icon nzType="search"></i>
+          选择工单
+        </button>
       </div>
     </div>
     <nz-table style="margin-top: 5px;" class="tableTdPadding" nzSize="small" #editRowTable nzBordered [nzData]="workshopDispatchListList"
@@ -89,11 +93,13 @@
       <thead>
         <tr>
           <th nzWidth="2%">序号</th>
-          <th nzWidth="5%">姓名</th>
-          <th nzWidth="6%">日期</th>
+          <th nzWidth="5%">项目编码</th>
+          <th nzWidth="5%">项目名称</th>
+          <th nzWidth="5%">工作中心</th>
           <th nzWidth="6%">生产订单号</th>
           <th nzWidth="5%">物料编码</th>
           <th nzWidth="5%">物料名称</th>
+          <th nzWidth="7%">日期</th>
           <th nzWidth="5%">计划数量</th>
           <th nzWidth="5%">剩余数量</th>
           <th nzWidth="5%">派工数量</th>
@@ -102,6 +108,7 @@
           <th nzWidth="6%">计划完工时间</th>
           <th nzWidth="6%">是否可扫码</th>
           <th nzWidth="6%">工艺</th>
+          <th nzWidth="5%">姓名</th>
           <th nzWidth="5%">备注</th>
           <th nzWidth="3%">操作</th>
         </tr>
@@ -110,35 +117,38 @@
         <tr *ngFor="let data of editRowTable.data">
           <td>{{data.sort}}</td>
           <td>
-            <nz-select [nzMaxTagCount]="3" nzMode="multiple" [(ngModel)]="data.personnelIds" style="width: 100px" nzShowSearch
-              nzAllowClear nzPlaceHolder="请选择"  [nzDropdownMatchSelectWidth]="false">
-              <ng-container *ngFor="let proper of properList">
-                <nz-option [nzLabel]="proper.personnelName" [nzValue]="proper.personnelCode"> </nz-option>
-              </ng-container>
-            </nz-select>
+            {{data.costItemCode}}
           </td>
           <td>
-            <nz-date-picker [(ngModel)]="data.date" nzPlaceHolder="请选择" >
-            </nz-date-picker>
+            {{data.projectName}}
           </td>
           <td>
-            <nz-select [(ngModel)]="data.productionOrderNumberId" style="width: 150px" nzShowSearch
+            {{data.workCenter}}
+          </td>
+          <td>
+            <!-- <nz-select [(ngModel)]="data.productionOrderNumberId" style="width: 150px" nzShowSearch
               nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="productionOrderNumberChange($event,data)" [nzDropdownMatchSelectWidth]="false">
               <ng-container *ngFor="let productionOrderNumber of productionOrderNumberList">
                 <nz-option nzLabel="{{productionOrderNumber.mocode}}--{{productionOrderNumber.cinvcode}}--{{productionOrderNumber.cinvname}}--{{productionOrderNumber.qty}}" [nzValue]="productionOrderNumber.moid"> </nz-option>
               </ng-container>
-            </nz-select>
+            </nz-select> -->
+            {{data.productionOrderNumberName}}
           </td>
           <td>
             {{data.productId}}
           </td>
           <td>
-            <nz-select [(ngModel)]="data.productId" style="width: 200px" nzShowSearch nzAllowClear
+            <!-- <nz-select [(ngModel)]="data.productId" style="width: 200px" nzShowSearch nzAllowClear
               nzPlaceHolder="请选择" (ngModelChange)="productChange($event,data)" [nzDropdownMatchSelectWidth]="false">
               <ng-container *ngFor="let produc of data.productList">
                 <nz-option nzLabel="{{produc.cinvname}}" [nzValue]="produc.cinvcode"> </nz-option>
               </ng-container>
-            </nz-select>
+            </nz-select> -->
+            {{data.product}}
+          </td>
+          <td>
+            <nz-date-picker [(ngModel)]="data.date" nzPlaceHolder="请选择" >
+            </nz-date-picker>
           </td>
           <td>
             {{data.plannedQuantity}}
@@ -169,11 +179,20 @@
                         </nz-switch>
           </td>
           <td>
-            <nz-select [(ngModel)]="data.fbsTechnologicalProcessId" style="width: 200px" nzShowSearch nzAllowClear
+            <!-- <nz-select [(ngModel)]="data.fbsTechnologicalProcessId" style="width: 200px" nzShowSearch nzAllowClear
               nzPlaceHolder="请选择" (ngModelChange)="fbsTechnologicalProcessChange($event,data)" [nzDropdownMatchSelectWidth]="false">
               <ng-container *ngFor="let fbsTechnologicalProcess of fbsTechnologicalProcessList">
                 <nz-option nzLabel="{{fbsTechnologicalProcess.name}}" [nzValue]="fbsTechnologicalProcess.id"> </nz-option>
               </ng-container>
+            </nz-select> -->
+            {{data.processSequence}}
+          </td>
+          <td>
+            <nz-select [nzMaxTagCount]="3" nzMode="multiple" [(ngModel)]="data.personnelIds" style="width: 100px" nzShowSearch
+              nzAllowClear nzPlaceHolder="请选择"  [nzDropdownMatchSelectWidth]="false">
+              <ng-container *ngFor="let proper of properList">
+                <nz-option [nzLabel]="proper.personnelName" [nzValue]="proper.personnelCode"> </nz-option>
+              </ng-container>
             </nz-select>
           </td>
           <td><textarea rows="1" nz-input [(ngModel)]="data.memo"></textarea></td>

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

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { NzModalRef, NzMessageService, NzDrawerRef, NzNotificationService } from 'ng-zorro-antd';
+import { NzModalRef, NzMessageService, NzDrawerRef, NzNotificationService, NzModalService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { FbsWorkshopDispatchList } from 'app/entity/fbs/fbs-workshop-dispatch-list';
 import { FbsWorkshopDispatchListService } from 'app/services/fbs/fbs-workshop-dispatch-list.service';
@@ -8,6 +8,7 @@ import {setHours} from 'date-fns';
 import { FbsPersonnelService } from 'app/services/fbs/fbs-personnel.service';
 import { FbsTechnologicalProcessService } from 'app/services/fbs/fbs-technological-process.service';
 import { FbsTechnologicalProcess } from 'app/entity/fbs/fbs-technological-process';
+import { FbsWorkshopDispatchListAddReferenceComponent } from './reference/reference.component';
 
 @Component({
   selector: 'app-fbs-workshop-dispatch-list-add',
@@ -37,7 +38,8 @@ export class FbsWorkshopDispatchListAddComponent implements OnInit {
     private nzNotificationService: NzNotificationService,
     private datePipe:DatePipe,
     private fbsPersonnelService:FbsPersonnelService,
-    private fbsTechnologicalProcessService:FbsTechnologicalProcessService
+    private fbsTechnologicalProcessService:FbsTechnologicalProcessService,
+    private nzModalService:NzModalService
   ) { 
     this.getProperList();
     this.getProductionOrderNumberList();
@@ -327,6 +329,67 @@ export class FbsWorkshopDispatchListAddComponent implements OnInit {
     this.workshopDispatchListList = this.workshopDispatchListList.filter(d => d.sort !== sort);
   }
 
+  reference(){
+    const modal = this.nzModalService.create({
+      nzTitle: '新增',
+      nzWidth: "80%",
+      nzContent: FbsWorkshopDispatchListAddReferenceComponent,
+      nzFooter: [
+        {
+          //取消
+          label: "取消",
+          type: 'default',
+          onClick: model => {
+            model.close();
+          },
+        },
+        {
+          label: '保存',
+          type: 'primary',
+          onClick: model=> {
+            model.save()
+            
+
+            //获取生产编号
+            model.check.forEach(element => {
+              let data:any={};
+                data.workCenter=element.workCenter
+                data.processSequence=element.processSequence
+                data.productionOrderNumberId=element.moid
+                data.productionOrderNumberName=element.mocode
+                data.projectName=element.define12;
+                data.costItemCode=element.itemCode;
+                data.productId=element.cinvcode;
+                data.product=element.cinvname;
+                data.rowNumber=element.sortseq;
+                data.plannedQuantity=element.qty;
+                data.standardWorkingHoursZ=element.cinvDefine13;
+                data.sapState=element.sapstatus;
+                //计算总单据剩余派工数量
+                this.getDispatchNumberByOrderIdProductId(data);
+                data.fbsTechnologicalProcessId=element.fbsTechnologicalProcessId;
+                data.fbsTechnologicalProcessName=element.fbsTechnologicalProcessName;
+                data.numberOfTasks=element.qty;
+                this.numberOfTasksChange(data.numberOfTasks,data)
+                data.plannedStartTime=element.startDate;
+                data.plannedEndTime=element.dueDate;
+                data.date=new Date().toString();
+                data.isScanCodeSwith=false;
+                data.sort=this.sort;
+                this.workshopDispatchListList = [
+                  ...this.workshopDispatchListList,
+                  data,
+                ];
+                this.sort++;
+                
+            console.log(data)
+            });
+          }
+        }
+      ]
+    });
+  }
+
   close() {
      //抽屉关闭
      this.drawerRef.close();

+ 207 - 0
src/app/routes/fbs-workshop-dispatch-list/add/history

@@ -0,0 +1,207 @@
+<nz-spin [nzSpinning]="saveLoading">
+  <!-- 派工单 -->
+  <!-- <nz-table nzSize="small" [nzNoResult]="' '" nzBordered #basicTable [nzShowPagination]="false">
+    <thead>
+      <tr>
+        
+        <th colspan="4">
+          <h2><strong>派工单</strong></h2>
+        </th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr>
+        <td style="width: 25%;">姓名</td>
+        <td style="width: 25%;">
+          <nz-select [(ngModel)]="fbsWorkshopDispatchList.personnelIdU8" style="width: 100%;" nzShowSearch nzAllowClear
+            nzPlaceHolder="请选择" (ngModelChange)="personnelChange($event)">
+            <ng-container *ngFor="let proper of properList">
+              <nz-option [nzLabel]="proper.cpersonname" [nzValue]="proper.cpersoncode"> </nz-option>
+            </ng-container>
+          </nz-select>
+        </td>
+        <td style="width: 25%;">日期</td>
+        <td style="width: 25%;">
+          <nz-date-picker [(ngModel)]="fbsWorkshopDispatchList.date" nzPlaceHolder="请选择" nzDisabled>
+          </nz-date-picker>
+        </td>
+      </tr>
+      <tr>
+        <td>生产订单号</td>
+        <td>
+          <nz-select [(ngModel)]="fbsWorkshopDispatchList.productionOrderNumberId" style="width: 100%;" nzShowSearch
+            nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="productionOrderNumberChange($event)">
+            <ng-container *ngFor="let productionOrderNumber of productionOrderNumberList">
+              <nz-option [nzLabel]="productionOrderNumber.mocode" [nzValue]="productionOrderNumber.moid"> </nz-option>
+            </ng-container>
+          </nz-select>
+        </td>
+        <td>产品</td>
+        <td>
+          <nz-select [(ngModel)]="fbsWorkshopDispatchList.productId" style="width: 100%;" nzShowSearch nzAllowClear
+            nzPlaceHolder="请选择" (ngModelChange)="productChange($event)">
+            <ng-container *ngFor="let produc of productList">
+              <nz-option [nzLabel]="produc.cinvname" [nzValue]="produc.cinvcode"> </nz-option>
+            </ng-container>
+          </nz-select>
+        </td>
+      </tr>
+      <tr>
+        <td>任务数量</td>
+        <td>
+          <nz-input-number [(ngModel)]="fbsWorkshopDispatchList.numberOfTasks" [nzMin]="0" [nzStep]="1">
+          </nz-input-number>
+        </td>
+        <td>标准工时</td>
+        <td>
+          <nz-input-number [(ngModel)]="fbsWorkshopDispatchList.standardWorkingHours" [nzMin]="0" [nzStep]="1">
+          </nz-input-number>
+        </td>
+      </tr>
+      <tr>
+        <td>计划开工时间</td>
+        <td>
+          <nz-date-picker [(ngModel)]="fbsWorkshopDispatchList.plannedStartTime" nzPlaceHolder="请选择">
+          </nz-date-picker>
+        </td>
+        <td>计划完工时间</td>
+        <td>
+          <nz-date-picker [(ngModel)]="fbsWorkshopDispatchList.plannedEndTime" nzPlaceHolder="请选择">
+          </nz-date-picker>
+        </td>
+      </tr>
+      <tr>
+        <td>备注</td>
+        <td colSpan="3"><textarea rows="2" nz-input [(ngModel)]="fbsWorkshopDispatchList.memo"></textarea></td>
+      </tr>
+    </tbody>
+  </nz-table> -->
+
+  <nz-card nzTitle="派工单">
+    <!-- 按钮 -->
+    <div nz-row [nzGutter]="24">
+      <div nz-col nzMd="24" nzLg="24">
+        <button (click)="workshopDispatchAddRow()" nz-button nzType="primary">新增</button>
+      </div>
+    </div>
+    <nz-table style="margin-top: 5px;" class="tableTdPadding" nzSize="small" #editRowTable nzBordered [nzData]="workshopDispatchListList"
+      [nzShowPagination]="false" [nzFrontPagination]=false [nzScroll]="{x:'123vw'}">
+      <thead>
+        <tr>
+          <th nzWidth="2%">序号</th>
+          <th nzWidth="5%">项目编码</th>
+          <th nzWidth="5%">项目名称</th>
+          <th nzWidth="5%">工作中心</th>
+          <th nzWidth="5%">姓名</th>
+          <th nzWidth="6%">日期</th>
+          <th nzWidth="6%">生产订单号</th>
+          <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>
+          <th nzWidth="6%">计划完工时间</th>
+          <th nzWidth="6%">是否可扫码</th>
+          <th nzWidth="6%">工艺</th>
+          <th nzWidth="5%">备注</th>
+          <th nzWidth="3%">操作</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr *ngFor="let data of editRowTable.data">
+          <td>{{data.sort}}</td>
+          <td>
+            {{data.productId}}
+          </td>
+          <td>
+            {{data.productId}}
+          </td>
+          <td>
+            {{data.productId}}
+          </td>
+          <td>
+            <nz-select [nzMaxTagCount]="3" nzMode="multiple" [(ngModel)]="data.personnelIds" style="width: 100px" nzShowSearch
+              nzAllowClear nzPlaceHolder="请选择"  [nzDropdownMatchSelectWidth]="false">
+              <ng-container *ngFor="let proper of properList">
+                <nz-option [nzLabel]="proper.personnelName" [nzValue]="proper.personnelCode"> </nz-option>
+              </ng-container>
+            </nz-select>
+          </td>
+          <td>
+            <nz-date-picker [(ngModel)]="data.date" nzPlaceHolder="请选择" >
+            </nz-date-picker>
+          </td>
+          <td>
+            <nz-select [(ngModel)]="data.productionOrderNumberId" style="width: 150px" nzShowSearch
+              nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="productionOrderNumberChange($event,data)" [nzDropdownMatchSelectWidth]="false">
+              <ng-container *ngFor="let productionOrderNumber of productionOrderNumberList">
+                <nz-option nzLabel="{{productionOrderNumber.mocode}}--{{productionOrderNumber.cinvcode}}--{{productionOrderNumber.cinvname}}--{{productionOrderNumber.qty}}" [nzValue]="productionOrderNumber.moid"> </nz-option>
+              </ng-container>
+            </nz-select>
+          </td>
+          <td>
+            {{data.productId}}
+          </td>
+          <td>
+            <nz-select [(ngModel)]="data.productId" style="width: 200px" nzShowSearch nzAllowClear
+              nzPlaceHolder="请选择" (ngModelChange)="productChange($event,data)" [nzDropdownMatchSelectWidth]="false">
+              <ng-container *ngFor="let produc of data.productList">
+                <nz-option nzLabel="{{produc.cinvname}}" [nzValue]="produc.cinvcode"> </nz-option>
+              </ng-container>
+            </nz-select>
+          </td>
+          <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>
+          </td>
+          <td>
+            <nz-input-number [(ngModel)]="data.standardWorkingHours" [nzMin]="0" [nzStep]="1">
+            </nz-input-number>
+          </td>
+          <td>
+            <nz-date-picker nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="data.plannedStartTime" nzPlaceHolder="请选择" [nzShowTime]="{ nzDefaultOpenValue: timeDefaultValue }">
+            </nz-date-picker>
+          </td>
+          <td>
+            <nz-date-picker nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="data.plannedEndTime" nzPlaceHolder="请选择" [nzShowTime]="{ nzDefaultOpenValue: timeDefaultValue }">
+            </nz-date-picker>
+          </td>
+          <td>
+            <nz-switch [(ngModel)]="data.isScanCodeSwith" name="isScanCodeSwith"
+                          nzCheckedChildren="是"
+                          nzUnCheckedChildren="否">
+                        </nz-switch>
+          </td>
+          <td>
+            <nz-select [(ngModel)]="data.fbsTechnologicalProcessId" style="width: 200px" nzShowSearch nzAllowClear
+              nzPlaceHolder="请选择" (ngModelChange)="fbsTechnologicalProcessChange($event,data)" [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><textarea rows="1" nz-input [(ngModel)]="data.memo"></textarea></td>
+          <td><a nz-popconfirm nzTitle="是否删除?" (nzOnConfirm)="workshopDispatchDeleteRow(data.sort)">删除</a></td>
+        </tr>
+      </tbody>
+    </nz-table>
+  </nz-card>
+</nz-spin>
+<!-- 底部按钮 -->
+<div class="base">
+  <!-- 底部关闭按钮 -->
+  <a nz-popconfirm style="margin-right: 2%" nzTitle="确认关闭吗(关闭前请确认数据已保存)" (nzOnConfirm)="close()">
+    <button nz-button class="ant-btn buttonDistance"><span>关闭
+      </span></button>
+  </a>
+  <!-- 底部保存按钮 -->
+  <button nzbutton (click)="save()" nz-button nzType="primary" [nzLoading]="saveLoading"><span>保存</span></button>
+</div>

+ 116 - 0
src/app/routes/fbs-workshop-dispatch-list/add/reference/reference.component.html

@@ -0,0 +1,116 @@
+<nz-card>
+  <form nz-form>
+    <!-- 查询条件 -->
+    <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
+      <!-- 项目名称 -->
+      <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)]="fbsMomOrderdetail.costitemname" name="costitemname" nz-input
+              placeholder="请输入" />
+          </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)]="fbsMomOrderdetail.workCenter" name="workCenter" nz-input
+              placeholder="请输入" />
+          </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)]="fbsMomOrderdetail.mocode" name="mocode" nz-input
+              placeholder="请输入" />
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    
+    <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
+      
+      <!-- 物料编码 -->
+      <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)]="fbsMomOrderdetail.cinvcode" name="cinvcode" nz-input
+              placeholder="请输入" />
+          </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)]="fbsMomOrderdetail.cinvname" name="cinvname" nz-input
+              placeholder="请输入" />
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    
+    <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
+      <!-- 按钮 -->
+      <div nz-col nzXs="24" nzSm="4" nzLg="24">
+        <nz-form-item class="nz-form-item">
+          <nz-form-label [nzSpan]="2" [nzNoColon]="true"></nz-form-label>
+          <nz-form-control [nzSpan]="22" style="text-align: right;">
+            <!-- 查询 -->
+            <button nz-button nzType="primary" (click)="getList()">查询</button>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </form>
+  <!-- 数据表 -->
+  <nz-table nzSize="small" class="buttonDistance" [nzData]="dataList" [nzLoading]="isLoading"
+    [nzFrontPagination]="true" #borderedTable 
+    (nzPageIndexChange)="pageIndexChange($event)" nzShowSizeChanger (nzCurrentPageDataChange)="currentPageDataChange($event)"
+    
+    >
+    <thead>
+      <tr>
+        <th nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked" [nzIndeterminate]="isIndeterminate"
+          (nzCheckedChange)="checkAll($event)"></th>
+        <th>项目编码</th>
+        <th>项目名称</th>
+        <th>工作中心</th>
+        <th>生产订单号</th>
+        <th nzAlign="center">物料编码</th>
+        <th nzAlign="center">物料名称</th>
+        <th nzAlign="center">数量</th>
+        <th nzAlign="center">计划工开工时间</th>
+        <th nzAlign="center">计划工完工时间</th>
+        <th nzAlign="center">工艺路线</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr *ngFor="let item of  borderedTable.data">
+        
+        <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[item.mocode]" (nzCheckedChange)="refreshStatus()"></td>
+        <!-- <td >{{item.milestoneCode}}</td> -->
+        <td>{{item.itemCode}}</td>
+        <td>{{item.define12}}</td>
+        <td>{{item.workCenter}}</td>
+        <td >{{item.mocode}}</td>
+        <td  nzAlign="center" >{{item.cinvcode}}</td>
+        <td nzAlign="center">{{item.cinvname}}</td>
+        <td nzAlign="center">{{item.qty}}</td>
+        <td nzAlign="center">{{item.startDate}}</td>
+        <td nzAlign="center">{{item.dueDate}}</td>
+        <td nzAlign="center">{{item.processSequence}}</td>
+        
+      </tr>
+    </tbody>
+  </nz-table>
+</nz-card>

+ 24 - 0
src/app/routes/fbs-workshop-dispatch-list/add/reference/reference.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { FbsWorkshopDispatchListAddReferenceComponent } from './reference.component';
+
+describe('FbsWorkshopDispatchListAddReferenceComponent', () => {
+  let component: FbsWorkshopDispatchListAddReferenceComponent;
+  let fixture: ComponentFixture<FbsWorkshopDispatchListAddReferenceComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ FbsWorkshopDispatchListAddReferenceComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(FbsWorkshopDispatchListAddReferenceComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 99 - 0
src/app/routes/fbs-workshop-dispatch-list/add/reference/reference.component.ts

@@ -0,0 +1,99 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { FbsWorkshopDispatchListService } from 'app/services/fbs/fbs-workshop-dispatch-list.service';
+
+@Component({
+  selector: 'app-fbs-workshop-dispatch-list-add-reference',
+  templateUrl: './reference.component.html',
+})
+export class FbsWorkshopDispatchListAddReferenceComponent implements OnInit {
+  
+
+  constructor(
+    private modal: NzModalRef,
+    private fbsWorkshopDispatchListService:FbsWorkshopDispatchListService,
+    private nzNotificationService:NzNotificationService
+  ) { }
+
+  ngOnInit(): void {
+    this.getList();
+  }
+
+  dataList=[];
+  isLoading=false;
+  //分页参数
+  page = {
+    total: 0,
+    current: 0,
+    size: 0,
+  };
+  // 按页码查询
+  pageIndexChange(event) {
+    // this.fbsWorkshopDispatchList.pageNo = event;
+    // //主数据刷新
+    // this.getList();
+  }
+  fbsMomOrderdetail:any={}
+  getList(){
+    this.isLoading=true;
+    this.fbsWorkshopDispatchListService.getFbsMomOrder(this.fbsMomOrderdetail).then((response)=>{
+      this.dataList=response.result;
+      this.isLoading=false;
+    })
+  }
+  // 元数据
+  listOfAllData = [];
+  // checkbox 是否被选中
+  isAllDisplayDataChecked = false;
+  // checkbox不确定状态
+  isIndeterminate = false;
+  // 显示数据列表
+  listOfDisplayData: any[] = [];
+  // checkbox 是否被选中
+  mapOfCheckedId: { [key: string]: boolean } = {};
+  // 当前页面展示数据改变的回调
+  currentPageDataChange($event: Array<{
+    mocode: number; clientNumber: string, bidParty: string, contractType: string, status: string
+  }>): void {
+    this.listOfDisplayData = $event;
+    this.refreshStatus();
+  }
+  // 选中的回调
+  refreshStatus(): void {
+    this.isAllDisplayDataChecked = this.listOfDisplayData.every(item => this.mapOfCheckedId[item.mocode]);
+    this.isIndeterminate =
+      this.listOfDisplayData.some(item => this.mapOfCheckedId[item.mocode]) && !this.isAllDisplayDataChecked;
+  }
+  // 全选
+  checkAll(value: boolean): void {
+    this.listOfDisplayData.forEach(item => (this.mapOfCheckedId[item.mocode] = value));
+    this.refreshStatus();
+  }
+
+  close() {
+    this.modal.destroy();
+  }
+  check=[]
+  save(){
+    // 所选id
+    const checkId = []
+    // 所选id对应的对象
+    this.check = []
+    // 是否调用接口
+    let isConsistent = true
+    // tslint:disable-next-line:no-shadowed-variable
+    this.dataList.forEach((element) => {
+      if (this.mapOfCheckedId[element.mocode]) {
+        checkId.push(element.mocode)
+        this.check.push(element)
+      }
+    })
+    if(this.check.length<=0){
+      this.nzNotificationService.warning("请选择一条数据","")
+      return;
+    }
+    this.modal.destroy();
+    
+  }
+}

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

@@ -5,13 +5,15 @@ import { FbsWorkshopDispatchListListComponent } from './list/list.component';
 import { FbsWorkshopDispatchListAddComponent } from './add/add.component';
 import { FbsWorkshopDispatchListUpdateComponent } from './update/update.component';
 import { FbsWorkshopDispatchListViewComponent } from './view/view.component';
+import { FbsWorkshopDispatchListAddReferenceComponent } from './add/reference/reference.component';
 
 const COMPONENTS = [
   FbsWorkshopDispatchListListComponent];
 const COMPONENTS_NOROUNT = [
   FbsWorkshopDispatchListAddComponent,
   FbsWorkshopDispatchListUpdateComponent,
-  FbsWorkshopDispatchListViewComponent];
+  FbsWorkshopDispatchListViewComponent,
+  FbsWorkshopDispatchListAddReferenceComponent];
 
 @NgModule({
   imports: [

+ 2 - 2
src/app/services/fbs/fbs-workshop-dispatch-list.service.ts

@@ -55,8 +55,8 @@ export class FbsWorkshopDispatchListService {
   }
 
   // U8生产订单查询
-  async getFbsMomOrder(): Promise<BaseResponse<any>> {
-    return await this.http.get<BaseResponse<any>>('/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getFbsMomOrder').toPromise();
+  async getFbsMomOrder(body:any): Promise<BaseResponse<any>> {
+    return await this.http.get<BaseResponse<any>>('/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getFbsMomOrder',{params:body}).toPromise();
   }
 
   // 根据生产订单id查询产品