chenc 4 years ago
parent
commit
fe48991fe8

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

@@ -124,7 +124,7 @@
         <td>{{item.workingHoursEfficiency}}%</td>
         <td>{{item.workingHoursEfficiency}}%</td>
         <td>
         <td>
           <nz-badge nzStatus="red" *ngIf="item.state=='0'" nzText="派工"></nz-badge>
           <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="purple" *ngIf="item.state=='1'" nzText="上岗"></nz-badge>
           <nz-badge nzStatus="yellow" *ngIf="item.state=='2'" nzText="暂停"></nz-badge>
           <nz-badge nzStatus="yellow" *ngIf="item.state=='2'" nzText="暂停"></nz-badge>
           <nz-badge nzStatus="green" *ngIf="item.state=='3'&&item.numberOfTasks==item.latestCompletedQuantity" 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>
           <nz-badge nzStatus="yellow" *ngIf="item.state=='3'&&item.numberOfTasks!=item.latestCompletedQuantity" nzText="进行中"></nz-badge>

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

@@ -114,7 +114,7 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
       this.productList=response.result;
       this.productList=response.result;
       if(this.productList){//自动带出产品选择
       if(this.productList){//自动带出产品选择
         this.fbsWorkshopDispatchList.productId=this.productList[0].cinvcode;
         this.fbsWorkshopDispatchList.productId=this.productList[0].cinvcode;
-        this.productChange(this.fbsWorkshopDispatchList.productId);
+        // this.productChange(this.fbsWorkshopDispatchList.productId);
       }
       }
     })
     })
   }
   }
@@ -141,6 +141,7 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
    /**
    /**
    * 计算总单据剩余派工数量
    * 计算总单据剩余派工数量
    */
    */
+  
   getDispatchNumberByOrderIdProductId(data){
   getDispatchNumberByOrderIdProductId(data){
     let fbsWorkshopDispatchList=new FbsWorkshopDispatchList();
     let fbsWorkshopDispatchList=new FbsWorkshopDispatchList();
     fbsWorkshopDispatchList.productionOrderNumberId=data.productionOrderNumberId;
     fbsWorkshopDispatchList.productionOrderNumberId=data.productionOrderNumberId;
@@ -156,7 +157,7 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
 
 
 
 
   /**
   /**
-   * 派工数量改变触发事件
+   * 派工数量改变
    */
    */
   numberOfTasksChange(event,data){
   numberOfTasksChange(event,data){
     if(data){
     if(data){
@@ -171,11 +172,13 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
   /**
   /**
    * 根据id查询车间派工单
    * 根据id查询车间派工单
    */
    */
+  remainingQuantity=0;
   getById(){
   getById(){
     this.saveLoading=true;
     this.saveLoading=true;
     this.fbsWorkshopDispatchListService.getById(this.id).then((response)=>{
     this.fbsWorkshopDispatchListService.getById(this.id).then((response)=>{
       if(response.success){
       if(response.success){
         this.fbsWorkshopDispatchList=response.result;
         this.fbsWorkshopDispatchList=response.result;
+        this.remainingQuantity=this.fbsWorkshopDispatchList.remainingQuantity;
         this.productionOrderNumberChange(this.fbsWorkshopDispatchList.productionOrderNumberId);
         this.productionOrderNumberChange(this.fbsWorkshopDispatchList.productionOrderNumberId);
         this.saveLoading=false;
         this.saveLoading=false;
       }else{
       }else{
@@ -201,7 +204,7 @@ export class FbsWorkshopDispatchListUpdateComponent implements OnInit {
       this.fbsWorkshopDispatchList.state="3";
       this.fbsWorkshopDispatchList.state="3";
 
 
     }
     }
-    this.fbsWorkshopDispatchListService.edit(this.fbsWorkshopDispatchList).then((response)=>{
+    this.fbsWorkshopDispatchListService.editR(this.fbsWorkshopDispatchList).then((response)=>{
       if(response.success){//保存成功
       if(response.success){//保存成功
         this.nzNotificationService.success("保存成功","");
         this.nzNotificationService.success("保存成功","");
         this.saveLoading=false;//加载效果关闭
         this.saveLoading=false;//加载效果关闭

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

@@ -29,6 +29,11 @@ export class FbsWorkshopDispatchListService {
     return await this.http.put<BaseResponse<FbsWorkshopDispatchList>>('/fbsWorkshopDispatchList/fbsWorkshopDispatchList/edit', body).toPromise();
     return await this.http.put<BaseResponse<FbsWorkshopDispatchList>>('/fbsWorkshopDispatchList/fbsWorkshopDispatchList/edit', body).toPromise();
   }
   }
 
 
+  // 自己写的修改
+  async editR(body: FbsWorkshopDispatchList): Promise<BaseResponse<FbsWorkshopDispatchList>> {
+    return await this.http.put<BaseResponse<FbsWorkshopDispatchList>>('/fbsWorkshopDispatchList/fbsWorkshopDispatchList/editR', body).toPromise();
+  }
+
   // 通过id删除
   // 通过id删除
   async delete(id: string): Promise<BaseResponse<FbsWorkshopDispatchList>> {
   async delete(id: string): Promise<BaseResponse<FbsWorkshopDispatchList>> {
     return await this.http.delete<BaseResponse<FbsWorkshopDispatchList>>('/fbsWorkshopDispatchList/fbsWorkshopDispatchList/delete', { params: { id: id } }).toPromise();
     return await this.http.delete<BaseResponse<FbsWorkshopDispatchList>>('/fbsWorkshopDispatchList/fbsWorkshopDispatchList/delete', { params: { id: id } }).toPromise();