소스 검색

feat:修复排产计划bug

hmc 1 년 전
부모
커밋
3e6bb5ee92
18개의 변경된 파일810개의 추가작업 그리고 678개의 파일을 삭제
  1. 23 11
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanController.java
  2. 12 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/AmmunitionPlanInformationIntermediateTable.java
  3. 28 7
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlan.java
  4. 24 1
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanSpinning.java
  5. 21 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/AmmunitionPlanInformationIntermediateTableRVo.java
  6. 27 9
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/AmmunitionPlanInformationIntermediateTableServiceImpl.java
  7. 10 2
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java
  8. 9 1
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanMapper.xml
  9. 7 1
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningMapper.xml
  10. 12 5
      zkqy-ui/src/views/orderMange/planTable/fangsi.vue
  11. 309 316
      zkqy-ui/src/views/orderMange/planTable/fankuang.vue
  12. 12 10
      zkqy-ui/src/views/orderMange/planTable/index.vue
  13. 311 315
      zkqy-ui/src/views/orderMange/planTable/luotong.vue
  14. 1 0
      zkqy-ui/src/views/orderMange/planTable/show/fangsi.vue
  15. 1 0
      zkqy-ui/src/views/orderMange/planTable/show/fankuang.vue
  16. 1 0
      zkqy-ui/src/views/orderMange/planTable/show/luotong.vue
  17. 1 0
      zkqy-ui/src/views/orderMange/planTable/show/northWorkshop.vue
  18. 1 0
      zkqy-ui/src/views/orderMange/planTable/show/southWorkshop.vue

+ 23 - 11
zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanController.java

@@ -66,12 +66,14 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
         DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan1=new DetailsOfTheRefuelingPlan();
         detailsOfTheRefuelingPlan1.setTimestampRandomCode("停机");
         detailsOfTheRefuelingPlan1.setProductType("A面");
-        detailsOfTheRefuelingPlan1.setMachineId(id);
+//        detailsOfTheRefuelingPlan1.setMachineId(id);
+        detailsOfTheRefuelingPlan1.setMacId(id);
         List<DetailsOfTheRefuelingPlan> list1 = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan1);
 
         DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan2=new DetailsOfTheRefuelingPlan();
         detailsOfTheRefuelingPlan2.setTimestampRandomCode("停机");
         detailsOfTheRefuelingPlan2.setProductType("B面");
+//        detailsOfTheRefuelingPlan2.setMachineId(id);
         detailsOfTheRefuelingPlan2.setMachineId(id);
         List<DetailsOfTheRefuelingPlan> list2 = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan2);
         List<String> listArray=new ArrayList<>();
@@ -92,14 +94,16 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
         int i = detailsOfTheRefuelingPlanService.deleteDetailsOfTheRefuelingPlanByMachineId(id);
         if(ids.indexOf("1")!=-1){
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlan.setMachineId(id);
+//            detailsOfTheRefuelingPlan.setMachineId(id);
+            detailsOfTheRefuelingPlan.setMacId(id);
             detailsOfTheRefuelingPlan.setPlanStatus("2");
             detailsOfTheRefuelingPlan.setProductType("A面");
             detailsOfTheRefuelingPlan.setTimestampRandomCode("停机");
             detailsOfTheRefuelingPlan.setCurrentColorCode("1");
             detailsOfTheRefuelingPlanService.insertDetailsOfTheRefuelingPlan(detailsOfTheRefuelingPlan);
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanSelect=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlanSelect.setMachineId(id);
+//            detailsOfTheRefuelingPlanSelect.setMachineId(id);
+            detailsOfTheRefuelingPlanSelect.setMacId(id);
             detailsOfTheRefuelingPlanSelect.setProductType("A面");
             detailsOfTheRefuelingPlanSelect.setPlanStatus("1");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlanSelect);
@@ -107,7 +111,8 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
             if(detailsOfTheRefuelingPlans.size()>0){
                 DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanUpdate=new DetailsOfTheRefuelingPlan();
                 detailsOfTheRefuelingPlanUpdate.setPlanStatus("2");
-                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
+//                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
+                detailsOfTheRefuelingPlan.setMacId(id);
                 detailsOfTheRefuelingPlanUpdate.setProductType("A面");
                 detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("1");
                 detailsOfTheRefuelingPlanMapper.updateDetailsOfTheRefuelingPlanByMachineIdAndProductType(detailsOfTheRefuelingPlanUpdate);
@@ -115,12 +120,14 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
         }else {
             //就是把所有停机的变成待上机
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanConditions=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlanConditions.setMachineId(id);
+//            detailsOfTheRefuelingPlanConditions.setMachineId(id);
+            detailsOfTheRefuelingPlanConditions.setMacId(id);
             detailsOfTheRefuelingPlanConditions.setPlanStatus("2");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlanConditions);
             if(detailsOfTheRefuelingPlans.size()>0){//如果有真实的计划停产了,就让他上机
                 DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanUpdate=new DetailsOfTheRefuelingPlan();
-                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
+//                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
+                detailsOfTheRefuelingPlanUpdate.setMacId(id);
                 detailsOfTheRefuelingPlanUpdate.setPlanStatus("1");
                 detailsOfTheRefuelingPlanUpdate.setProductType("A面");
                 detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("2");
@@ -129,7 +136,8 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
         }
         if(ids.indexOf("2")!=-1){
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlan.setMachineId(id);
+            //                detailsOfTheRefuelingPlan.setMachineId(id);
+            detailsOfTheRefuelingPlan.setMacId(id);
             detailsOfTheRefuelingPlan.setPlanStatus("2");
             detailsOfTheRefuelingPlan.setProductType("B面");
             detailsOfTheRefuelingPlan.setTimestampRandomCode("停机");
@@ -137,26 +145,30 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
             detailsOfTheRefuelingPlanService.insertDetailsOfTheRefuelingPlan(detailsOfTheRefuelingPlan);
             //有真实的计划数据,改成停产
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanSelect=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlanSelect.setMachineId(id);
+//            detailsOfTheRefuelingPlanSelect.setMachineId(id);
+            detailsOfTheRefuelingPlanSelect.setMacId(id);
             detailsOfTheRefuelingPlanSelect.setProductType("B面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlanSelect);
             List<DetailsOfTheRefuelingPlan> collect = detailsOfTheRefuelingPlans.stream().filter(item -> item.getPlanStatus().equals("1")).collect(Collectors.toList());
             if(collect.size()>0){
                 DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanUpdate=new DetailsOfTheRefuelingPlan();
                 detailsOfTheRefuelingPlanUpdate.setPlanStatus("2");
-                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
+                detailsOfTheRefuelingPlanUpdate.setMacId(id);
+//                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
                 detailsOfTheRefuelingPlanUpdate.setProductType("B面");
                 detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("1");
                 detailsOfTheRefuelingPlanMapper.updateDetailsOfTheRefuelingPlanByMachineIdAndProductType(detailsOfTheRefuelingPlanUpdate);
             }
         }else {
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanConditions=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlanConditions.setMachineId(id);
+//            detailsOfTheRefuelingPlanConditions.setMachineId(id);
+            detailsOfTheRefuelingPlanConditions.setMacId(id);
             detailsOfTheRefuelingPlanConditions.setPlanStatus("2");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlanConditions);
             if(detailsOfTheRefuelingPlans.size()>0){//如果有真实的计划停产了,就让他上机
                 DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlanUpdate=new DetailsOfTheRefuelingPlan();
-                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
+//                detailsOfTheRefuelingPlanUpdate.setMachineId(id);
+                detailsOfTheRefuelingPlanUpdate.setMacId(id);
                 detailsOfTheRefuelingPlanUpdate.setPlanStatus("1");
                 detailsOfTheRefuelingPlanUpdate.setProductType("B面");
                 detailsOfTheRefuelingPlanUpdate.setPlanStatusOld("2");

+ 12 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/AmmunitionPlanInformationIntermediateTable.java

@@ -20,6 +20,18 @@ public class AmmunitionPlanInformationIntermediateTable extends BaseEntity
     /** 主键自增 */
     private Long id;
 
+    public String getMacId() {
+        return macId;
+    }
+
+    public void setMacId(String macId) {
+        this.macId = macId;
+    }
+
+    /** 机台号 */
+    @Excel(name = "机台id")
+    private String macId;
+
     /** 机台号 */
     @Excel(name = "机台号")
     private String machineId;

+ 28 - 7
zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlan.java

@@ -18,6 +18,10 @@ public class DetailsOfTheRefuelingPlan extends BaseEntity
     /** 主键 */
     private Long id;
 
+
+    @Excel(name = "机台id")
+    private  String  macId;
+
     /**
      * 产品id
      */
@@ -28,13 +32,6 @@ public class DetailsOfTheRefuelingPlan extends BaseEntity
      */
     private  String salesmanId;
 
-    public String getSalesmanId() {
-        return salesmanId;
-    }
-
-    public void setSalesmanId(String salesmanId) {
-        this.salesmanId = salesmanId;
-    }
 
     /** 时间戳唯一码 */
     @Excel(name = "时间戳唯一码")
@@ -75,7 +72,16 @@ public class DetailsOfTheRefuelingPlan extends BaseEntity
     @Excel(name = "计划状态")
     private String planStatusOld;
 
+    @Excel(name="产品类型名")
+    private  String  productTypeName;
 
+    public String getProductTypeName() {
+        return productTypeName;
+    }
+
+    public void setProductTypeName(String productTypeName) {
+        this.productTypeName = productTypeName;
+    }
 
     /** 计划状态 */
     @Excel(name = "数量")
@@ -204,6 +210,21 @@ public class DetailsOfTheRefuelingPlan extends BaseEntity
         return planStatus;
     }
 
+    public String getMacId() {
+        return macId;
+    }
+
+    public void setMacId(String macId) {
+        this.macId = macId;
+    }
+
+    public String getSalesmanId() {
+        return salesmanId;
+    }
+
+    public void setSalesmanId(String salesmanId) {
+        this.salesmanId = salesmanId;
+    }
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 24 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanSpinning.java

@@ -19,6 +19,11 @@ public class DetailsOfTheRefuelingPlanSpinning extends BaseEntity
     /** 主键 */
     private Long id;
 
+    @Excel(name = "机台id")
+    private  String  macId;
+
+
+
     /** 时间戳唯一码 */
     @Excel(name = "时间戳唯一码")
     private String timestampRandomCode;
@@ -83,7 +88,18 @@ public class DetailsOfTheRefuelingPlanSpinning extends BaseEntity
     @Excel(name = "业务员id")
     private String salesmanId;
 
-    public void setId(Long id) 
+    @Excel(name = "产品名称")
+    private  String  productTypeName;
+
+    public String getProductTypeName() {
+        return productTypeName;
+    }
+
+    public void setProductTypeName(String productTypeName) {
+        this.productTypeName = productTypeName;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }
@@ -133,6 +149,13 @@ public class DetailsOfTheRefuelingPlanSpinning extends BaseEntity
         this.currentSpecification = currentSpecification;
     }
 
+    public String getMacId() {
+        return macId;
+    }
+
+    public void setMacId(String macId) {
+        this.macId = macId;
+    }
     public String getCurrentSpecification() 
     {
         return currentSpecification;

+ 21 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/AmmunitionPlanInformationIntermediateTableRVo.java

@@ -7,6 +7,17 @@ public class AmmunitionPlanInformationIntermediateTableRVo {
     //机台号-就是产线号
     private  String machineId;
 
+    //机台id
+    private  String macId;
+
+    public String getMacId() {
+        return macId;
+    }
+
+    public void setMacId(String macId) {
+        this.macId = macId;
+    }
+
     //色号
     private  String currentColorCode;
 
@@ -46,6 +57,16 @@ public class AmmunitionPlanInformationIntermediateTableRVo {
     /*产品类别A面B面*/
     private  String productType;
 
+    /*产品类型*/
+    private  String  productTypeName;
+
+    public String getProductTypeName() {
+        return productTypeName;
+    }
+
+    public void setProductTypeName(String productTypeName) {
+        this.productTypeName = productTypeName;
+    }
 
     //待生产列表
     private String listOfPendingProduction;

+ 27 - 9
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/AmmunitionPlanInformationIntermediateTableServiceImpl.java

@@ -59,8 +59,9 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
         ammunitionPlanInformationIntermediateTable.getDetailsOfTheRefuelingPlans().forEach(item->{
             //改产品的线号
             SaleProducts saleProducts=new SaleProducts();
-            saleProducts.setId(Long.valueOf(item.getProductId()));
-            saleProducts.setProductionLineNo(item.getMachineId());
+            item.setMacId(ammunitionPlanInformationIntermediateTable.getMacId());//机台id
+            saleProducts.setId(Long.valueOf(item.getProductId())); //
+            saleProducts.setProductionLineNo(item.getMacId()); //机台号
             if(item.getPlanStatus().equals("待机")){
                item.setPlanStatus("0");
             }
@@ -77,6 +78,9 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             saleProducts.setLotNumber(item.getCurrentLotNumber());//批号
             saleProducts.setProductNumber(Double.valueOf(item.getNumber()));//数量
             saleProductsList.add(saleProducts);
+            //产品对应的信息
+            SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
+            item.setProductTypeName(saleProducts1.getProductName());
         });
         //更新产线
         int i2 = saleProductsMapper.updateSaleProductBatch(saleProductsList);
@@ -128,23 +132,25 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
         sortedList.stream().forEach(item -> {
             //A面待生产
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan2=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlan2.setMachineId(item.getProductionLineNo());//产线号
+//            detailsOfTheRefuelingPlan2.setMachineId(item.getProductionLineNo());//产线号
+            detailsOfTheRefuelingPlan2.setMacId(item.getId().toString()); //产线id
             detailsOfTheRefuelingPlan2.setPlanStatus("0");
             detailsOfTheRefuelingPlan2.setProductType("A面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans2 = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan2);
             //B面的待生产
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan3=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlan3.setMachineId(item.getProductionLineNo());//产线号
+//            detailsOfTheRefuelingPlan3.setMachineId(item.getProductionLineNo());//产线号
+            detailsOfTheRefuelingPlan2.setMacId(item.getId().toString()); //产线id
             detailsOfTheRefuelingPlan3.setPlanStatus("0");
             detailsOfTheRefuelingPlan3.setProductType("B面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans3 = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan3);
             //查询产线A面上机的
             DetailsOfTheRefuelingPlan Asj=new DetailsOfTheRefuelingPlan();
-            Asj.setMachineId(item.getProductionLineNo());//产线号
+//            Asj.setMachineId(item.getProductionLineNo());//产线号
+            Asj.setMacId(item.getId().toString());//产线id
             Asj.setPlanStatus("1");
             Asj.setProductType("A面");
             List<DetailsOfTheRefuelingPlan> AList = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(Asj);
-
             //A上机数据
             if(AList.size()>0){
                 //A面上机产品
@@ -152,6 +158,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                     //拿到了某个车间的所有产线
                     AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                     rs1.setMachineId(item.getProductionLineNo());//产线号
+                    rs1.setMacId(item.getId().toString());//产线id
                     AmmunitionPlanInformationIntermediateTableRVo ammunitionPlanInformationIntermediateTableRVo=new AmmunitionPlanInformationIntermediateTableRVo();
                     BeanUtils.copyProperties(item1,ammunitionPlanInformationIntermediateTableRVo);
                     BeanUtils.copyProperties(item1,rs1);
@@ -164,7 +171,8 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             }
             //A面有没有停机的
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan4=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlan4.setMachineId(item.getProductionLineNo());//产线号
+//            detailsOfTheRefuelingPlan4.setMachineId(item.getProductionLineNo());//产线号
+            detailsOfTheRefuelingPlan4.setMacId(item.getId().toString());
             detailsOfTheRefuelingPlan4.setPlanStatus("2");
             detailsOfTheRefuelingPlan4.setProductType("A面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans4 = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan4);
@@ -177,6 +185,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                         //拿到了某个车间的所有产线
                         AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                         rs1.setMachineId(item.getProductionLineNo());//产线号
+                        rs1.setMacId(item.getId().toString());//产线iD
                         rs1.setProductType("A面");
                         BeanUtils.copyProperties(item1,rs1);
                         rs1.setPlannedEndTime(rs1.getPlannedEndTime()+"停机");
@@ -194,6 +203,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                         //拿到了某个车间的所有产线
                         AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                         rs1.setMachineId(item.getProductionLineNo());//产线号
+                        rs1.setMacId(item.getId().toString());//产线iD
                         rs1.setProductType("A面");
                         rs1.setPlannedEndTime("停机");
                         //当前产线A面待生产
@@ -207,6 +217,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             if(detailsOfTheRefuelingPlans2.size()>0&&AList.size()<=0&&detailsOfTheRefuelingPlans4.size()<=0){
                 AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                 rs1.setMachineId(item.getProductionLineNo());//产线号
+                rs1.setMacId(item.getId().toString());//产线iD
                 String collect = detailsOfTheRefuelingPlans2.stream().map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.joining(","));
                 rs1.setListOfPendingProduction(collect);
                 rs1.setProductType("A面");
@@ -216,13 +227,15 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             if(detailsOfTheRefuelingPlans2.size()<=0&&detailsOfTheRefuelingPlans4.size()<=0&&AList.size()<=0){
                     AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                     rs1.setMachineId(item.getProductionLineNo());//产线号
+                    rs1.setMacId(item.getId().toString());//产线iD
                     rs1.setProductType("A面");
                     list.add(rs1);
             }
 
             //查询B面上机的
             DetailsOfTheRefuelingPlan Bsj=new DetailsOfTheRefuelingPlan();
-            Bsj.setMachineId(item.getProductionLineNo());//产线号
+//            Bsj.setMachineId(item.getProductionLineNo());//产线号
+            Bsj.setMacId(item.getId().toString());
             Bsj.setPlanStatus("1");
             Bsj.setProductType("B面");
             List<DetailsOfTheRefuelingPlan> BList = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(Bsj);
@@ -232,6 +245,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                     //拿到了某个车间的所有产线
                     AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                     rs1.setMachineId(item.getProductionLineNo());//产线号
+                    rs1.setMacId(item.getId().toString()); //产线id
                     AmmunitionPlanInformationIntermediateTableRVo ammunitionPlanInformationIntermediateTableRVo=new AmmunitionPlanInformationIntermediateTableRVo();
                     BeanUtils.copyProperties(item1,ammunitionPlanInformationIntermediateTableRVo);
                     BeanUtils.copyProperties(item1,rs1);
@@ -244,7 +258,8 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             }
             //B停机的
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan5=new DetailsOfTheRefuelingPlan();
-            detailsOfTheRefuelingPlan5.setMachineId(item.getProductionLineNo());//产线号
+//            detailsOfTheRefuelingPlan5.setMachineId(item.getProductionLineNo());//产线号
+            detailsOfTheRefuelingPlan5.setMacId(item.getId().toString());
             detailsOfTheRefuelingPlan5.setPlanStatus("2");
             detailsOfTheRefuelingPlan5.setProductType("B面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans5 = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan5);
@@ -253,6 +268,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                         //拿到了某个车间的所有产线
                         AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                         rs1.setMachineId(item.getProductionLineNo());//产线号
+                        rs1.setMacId(item.getId().toString());//产线id
                         rs1.setProductType("B面");
                         rs1.setPlannedEndTime("停机");
                         //当前产线b面待生产
@@ -265,6 +281,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             if(detailsOfTheRefuelingPlans3.size()>0&&BList.size()<=0&&detailsOfTheRefuelingPlans5.size()<=0){
                 AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                 rs1.setMachineId(item.getProductionLineNo());//产线号
+                rs1.setMacId(item.getId().toString());//产线iD
                 String collect = detailsOfTheRefuelingPlans3.stream().map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.joining(","));
                 rs1.setListOfPendingProduction(collect);
                 rs1.setProductType("B面");
@@ -274,6 +291,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             if(detailsOfTheRefuelingPlans3.size()<=0&&detailsOfTheRefuelingPlans5.size()<=0&&BList.size()<=0){
                 AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                 rs1.setMachineId(item.getProductionLineNo());//产线号
+                rs1.setMacId(item.getId().toString());//产线iD
                 rs1.setProductType("B面");
                 list.add(rs1);
             }

+ 10 - 2
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java

@@ -75,7 +75,8 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
         sortedList.stream().forEach(item -> {
             //先根据产线号去查询计划信息
             DetailsOfTheRefuelingPlanSpinning spinning = new DetailsOfTheRefuelingPlanSpinning();
-            spinning.setMachineId(item.getProductionLineNo());
+//            spinning.setMachineId(item.getProductionLineNo());
+            spinning.setMacId(item.getId().toString());
             //直接根据产线号拿计划,
             List<DetailsOfTheRefuelingPlanSpinning> detailsOfTheRefuelingPlanSpinnings = detailsOfTheRefuelingPlanSpinningMapper.selectDetailsOfTheRefuelingPlanSpinningList(spinning);
             List<DetailsOfTheRefuelingPlanSpinning>  tj= detailsOfTheRefuelingPlanSpinnings.stream().filter(plan -> plan.getPlanStatus().equals("2")).collect(Collectors.toList());
@@ -84,6 +85,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
                 //拿到了某个车间的所有产线
                 DetailsOfTheRefuelingPlanSpinningRVo rs2 = new DetailsOfTheRefuelingPlanSpinningRVo();
                 rs2.setMachineId(item.getProductionLineNo());//产线号
+                rs2.setMacId(item.getId().toString());//产线id
                 //把第一个元素给拷贝过去
                 BeanUtils.copyProperties(tj1, rs2);
                 rs2.setCurrentLotNumber("");
@@ -102,6 +104,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
                         //拿到了某个车间的所有产线
                         DetailsOfTheRefuelingPlanSpinningRVo rs1 = new DetailsOfTheRefuelingPlanSpinningRVo();
                         rs1.setMachineId(item.getProductionLineNo());//产线号
+                        rs1.setMacId(item.getId().toString());
                         //把第一个元素给拷贝过去
                         BeanUtils.copyProperties(spinning1, rs1);
                         List<String> collect = detailsOfTheRefuelingPlanSpinnings.stream().filter(plan -> plan.getPlanStatus().equals("0")).map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.toList());
@@ -112,6 +115,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
                         //拿到了某个车间的所有产线
                         DetailsOfTheRefuelingPlanSpinningRVo rs1 = new DetailsOfTheRefuelingPlanSpinningRVo();
                         rs1.setMachineId(item.getProductionLineNo());//产线号
+                        rs1.setMacId(item.getId().toString());//产线iD
                         List<String> collect = detailsOfTheRefuelingPlanSpinnings.stream().filter(plan -> plan.getPlanStatus().equals("0")).map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.toList());
                         rs1.setPlannedProduction(collect);
                         list.add(rs1);
@@ -120,6 +124,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
                     //拿到了某个车间的所有产线
                     DetailsOfTheRefuelingPlanSpinningRVo rs1 = new DetailsOfTheRefuelingPlanSpinningRVo();
                     rs1.setMachineId(item.getProductionLineNo());//产线号
+                    rs1.setMacId(item.getId().toString());
                     list.add(rs1);
                 }
             }
@@ -238,7 +243,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
             //改产品的线号,批号
             SaleProducts saleProducts=new SaleProducts();
             saleProducts.setId(Long.valueOf(item.getProductId()));
-            saleProducts.setProductionLineNo(item.getMachineId());
+            saleProducts.setProductionLineNo(item.getMacId());//产线iD
             saleProducts.setLotNumber(item.getCurrentLotNumber().toString());//批号
             if(item.getPlanStatus().equals("待机")){
                 item.setPlanStatus("0");
@@ -254,6 +259,9 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
             }
             saleProducts.setOnBoardState(item.getPlanStatus());//状态信息
             saleProducts.setProductNumber(Double.valueOf(item.getNumber()));//数量
+            //产品对应的信息
+            SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
+            item.setProductTypeName(saleProducts1.getProductName());
             saleProductsList.add(saleProducts);
         });
         //更新产线

+ 9 - 1
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanMapper.xml

@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="com.zkqy.business.domain.DetailsOfTheRefuelingPlan" id="DetailsOfTheRefuelingPlanResult">
         <result property="id"    column="id"    />
         <result property="timestampRandomCode"    column="timestamp_random_code"    />
+        <result property="macId"    column="mac_id"    />
         <result property="machineId"    column="machine_id"    />
         <result property="currentColorCode"    column="current_color_code"    />
         <result property="currentSpecification"    column="current_specification"    />
@@ -17,16 +18,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="planStatus"    column="plan_status"    />
         <result property="number"    column="number"    />
         <result property="productType"    column="productType"    />
+        <result property="productTypeName" column="productTypeName"/>
     </resultMap>
 
     <sql id="selectDetailsOfTheRefuelingPlanVo">
-        select id, timestamp_random_code, machine_id, current_color_code, current_specification, current_lot_number, current_spindle_count, start_time, planned_end_time,plan_status,number,productType,product_id,salesman_id from {DBNAME}.details_of_the_refueling_plan
+        select id, timestamp_random_code, mac_id,machine_id, current_color_code, current_specification, current_lot_number, current_spindle_count, start_time, planned_end_time,plan_status,number,productType,product_id,salesman_id,productTypeName from {DBNAME}.details_of_the_refueling_plan
     </sql>
 
     <select id="selectDetailsOfTheRefuelingPlanList" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlan" resultMap="DetailsOfTheRefuelingPlanResult">
         <include refid="selectDetailsOfTheRefuelingPlanVo"/>
         <where>  
             <if test="timestampRandomCode != null  and timestampRandomCode != ''"> and timestamp_random_code = #{timestampRandomCode}</if>
+            <if test="macId != null "> and mac_id = #{macId}</if>
             <if test="machineId != null "> and machine_id = #{machineId}</if>
             <if test="currentColorCode != null  and currentColorCode != ''"> and current_color_code = #{currentColorCode}</if>
             <if test="currentSpecification != null  and currentSpecification != ''"> and current_specification = #{currentSpecification}</if>
@@ -47,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectDetailsOfTheRefuelingPlanVo"/>
         <where>
             <if test="timestampRandomCode != null  and timestampRandomCode != ''"> and timestamp_random_code = #{timestampRandomCode}</if>
+            <if test="macId != null "> and mac_id = #{macId}</if>
             <if test="machineId != null "> and machine_id = #{machineId}</if>
             <if test="currentColorCode != null  and currentColorCode != ''"> and current_color_code = #{currentColorCode}</if>
             <if test="currentSpecification != null  and currentSpecification != ''"> and current_specification = #{currentSpecification}</if>
@@ -106,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         INSERT INTO {DBNAME}.details_of_the_refueling_plan
         <trim prefix="(" suffix=")" suffixOverrides=",">
         timestamp_random_code,
+        mac_id,
         machine_id,
         current_color_code,
         current_specification,
@@ -118,11 +123,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         `productType`,
         `product_id`,
             `salesman_id`,
+        `productTypeName`
     </trim>
         VALUES
         <foreach collection="list" item="item" separator=",">
             <trim prefix="(" suffix=")" suffixOverrides=",">
             #{item.timestampRandomCode},
+            #{item.macId},
             #{item.machineId},
             #{item.currentColorCode},
             #{item.currentSpecification},
@@ -135,6 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item.productType},
             #{item.productId},
             #{item.salesmanId},
+            #{item.productTypeName}
         </trim>
         </foreach>
     </insert>

+ 7 - 1
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningMapper.xml

@@ -25,16 +25,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
         <result property="productId"    column="product_id"    />
         <result property="salesmanId"    column="salesman_id"    />
+        <result property="productTypeName" column="productTypeName"/>
     </resultMap>
 
     <sql id="selectDetailsOfTheRefuelingPlanSpinningVo">
-        select id, timestamp_random_code, machine_id, production_digit, current_color_code, current_specification, current_lot_number, start_time, planned_end_time, plan_status, number, remark, create_by_id, create_by, update_by, update_by, create_time, update_time, product_id, salesman_id from {DBNAME}.details_of_the_refueling_plan_spinning
+        select id, timestamp_random_code, machine_id, production_digit, current_color_code, current_specification, current_lot_number, start_time, planned_end_time, plan_status, number, remark, create_by_id, create_by, update_by, update_by, create_time, update_time, product_id, salesman_id,productTypeName from {DBNAME}.details_of_the_refueling_plan_spinning
     </sql>
 
     <select id="selectDetailsOfTheRefuelingPlanSpinningList" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" resultMap="DetailsOfTheRefuelingPlanSpinningResult">
         <include refid="selectDetailsOfTheRefuelingPlanSpinningVo"/>
         <where>  
             <if test="timestampRandomCode != null  and timestampRandomCode != ''"> and timestamp_random_code = #{timestampRandomCode}</if>
+            <if test="macId != null  and machineId != ''"> and mac_id = #{macId}</if>
             <if test="machineId != null  and machineId != ''"> and machine_id = #{machineId}</if>
             <if test="productionDigit != null  and productionDigit != ''"> and production_digit = #{productionDigit}</if>
             <if test="currentColorCode != null  and currentColorCode != ''"> and current_color_code = #{currentColorCode}</if>
@@ -152,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         INSERT INTO {DBNAME}.details_of_the_refueling_plan_spinning
         <trim prefix="(" suffix=")" suffixOverrides=",">
             timestamp_random_code,
+            mac_id,
             machine_id,
             current_color_code,
             current_specification,
@@ -163,11 +166,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             `number`,
             `product_id`,
             `salesman_id`,
+            `productTypeName`
         </trim>
         VALUES
         <foreach collection="list" item="item" separator=",">
             <trim prefix="(" suffix=")" suffixOverrides=",">
                 #{item.timestampRandomCode},
+                #{item.macId},
                 #{item.machineId},
                 #{item.currentColorCode},
                 #{item.currentSpecification},
@@ -179,6 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item.number},
                 #{item.productId},
                 #{item.salesmanId},
+                #{item.productTypeName}
             </trim>
         </foreach>
     </insert>

+ 12 - 5
zkqy-ui/src/views/orderMange/planTable/fangsi.vue

@@ -7,6 +7,7 @@
           <el-table-column prop="machineId" fixed label="线号" header-align="center" align="center" width="111px" ></el-table-column>
           <el-table-column prop="productionDigit" fixed label="生产位数" header-align="center" align="center" width="111.2px"></el-table-column>
           <el-table-column label="在机产品" header-align="center" >
+            <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
             <el-table-column prop="currentColorCode" label="色号" header-align="center" width="90px" align="center"></el-table-column>
             <el-table-column prop="currentSpecification" label="规格" header-align="center" width="90px" align="center"></el-table-column>
             <el-table-column prop="currentLotNumber" label="批号" header-align="center"  width="90px" align="center"></el-table-column>
@@ -289,6 +290,7 @@ export default {
       materiel:{},
       //机台号
       machineId:"",
+      macId:"",
       // 待机/上机/停产
       stateList0:[
         {"id":0,"name":"待机"},
@@ -422,6 +424,8 @@ export default {
       this.machineId=""
       //当前操作机台号
       this.machineId=row.machineId;
+      //机台id
+        this.macId=row.macId;
     },
     // 删除行
     handleDelete(index, row) {
@@ -515,11 +519,12 @@ export default {
     addPlanInfo(){
       const datatime=Date.now()+this.machineId;
       //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"machineId":this.machineId,"planStatus":1}).then(response => {
+      getPlanSpinningInfo({"machineId":this.machineId,"macId":this.macId,"planStatus":1}).then(response => {
           let i=0
           //处理表格数据
           this.tableData2.forEach(item=>{
             item.timestampRandomCode=datatime;
+            item.macId=this.macId;
             item.machineId=this.machineId;
             if(item.planStatus==1){
               i++
@@ -559,10 +564,12 @@ export default {
       this.getProductsInfo();
       //当前操作机台号
       this.machineId=row.machineId;
+      //机台id
+      this.macId=row.macId;
       this.tableData2=[];
       //弹窗
       this.nanUpdateDialogTableVisible = true
-      getPlanSpinningInfo({"machineId":row.machineId}).then((response) => {
+      getPlanSpinningInfo({"macId":row.macId}).then((response) => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
           item.isEditing=false;
@@ -592,7 +599,7 @@ export default {
     },
     //弹窗里边的点击查询
     onSubmit(){
-      this.formData.machineId=this.machineId;
+      this.formData.macId=this.macId;
       getPlanSpinningInfo(this.formData).then(response => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
@@ -604,7 +611,7 @@ export default {
     },
     //重置
     reset(){
-      getPlanSpinningInfo({"machineId":this.machineId}).then(response => {
+      getPlanSpinningInfo({"macId":this.macId}).then(response => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
           item.isEditing=false;
@@ -616,7 +623,7 @@ export default {
     //更新状态
     updateStatus(ind, row,planStatus){
       //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"machineId":this.machineId,"planStatus":planStatus}).then(response => {
+      getPlanSpinningInfo({"macId":this.macId,"planStatus":planStatus}).then(response => {
         let i=0
         //处理表格数据
         this.tableData2.forEach(item=>{

+ 309 - 316
zkqy-ui/src/views/orderMange/planTable/fankuang.vue

@@ -1,259 +1,254 @@
 <template>
   <div class="app-container" style="width: 100%;">
-        <!--表格-->
-        <el-table
-          :data="tableData"
-          ref="tableRef">
-          <el-table-column prop="machineId" fixed label="机台号" header-align="center" align="center" width="111px" ></el-table-column>
-          <el-table-column prop="productionDigit" fixed label="生产位数" header-align="center" align="center" width="111.2px"></el-table-column>
-          <el-table-column label="在机产品" header-align="center" >
-            <el-table-column prop="currentColorCode" label="色号" header-align="center" width="90px" align="center"></el-table-column>
-            <el-table-column prop="currentSpecification" label="规格" header-align="center" width="90px" align="center"></el-table-column>
-            <el-table-column prop="currentLotNumber" label="批号" header-align="center"  width="90px" align="center"></el-table-column>
-            <el-table-column prop="startTime" label="上机时间" header-align="center" width="90px" align="center"></el-table-column>
-            <el-table-column prop="plannedEndTime" label="下机时间" header-align="center" width="90px" align="center"></el-table-column>
-          </el-table-column>
-          <el-table-column prop="plannedProduction" label="待生产产品列表" header-align="center" align="center"  >
-            <template v-slot:default="scope">
-              <div v-if="scope.row.plannedProduction && scope.row.plannedProduction.length > 0">
-                <div v-for="(chunk, chunkIndex) in splitList(scope.row.plannedProduction, 5)" :key="`chunk-${chunkIndex}`">
+    <!--表格-->
+    <el-table
+      :data="tableData"
+      ref="tableRef">
+      <el-table-column prop="machineId" fixed label="线号" header-align="center" align="center" width="111px" ></el-table-column>
+      <el-table-column prop="productionDigit" fixed label="生产位数" header-align="center" align="center" width="111.2px"></el-table-column>
+      <el-table-column label="在机产品" header-align="center" >
+        <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
+        <el-table-column prop="currentColorCode" label="色号" header-align="center" width="90px" align="center"></el-table-column>
+        <el-table-column prop="currentSpecification" label="规格" header-align="center" width="90px" align="center"></el-table-column>
+        <el-table-column prop="currentLotNumber" label="批号" header-align="center"  width="90px" align="center"></el-table-column>
+        <el-table-column prop="startTime" label="上机时间" header-align="center" width="90px" align="center"></el-table-column>
+        <el-table-column prop="plannedEndTime" label="下机时间" header-align="center" width="90px" align="center"></el-table-column>
+      </el-table-column>
+      <el-table-column prop="plannedProduction" label="待生产产品列表" header-align="center" align="center"  >
+        <template v-slot:default="scope">
+          <div v-if="scope.row.plannedProduction && scope.row.plannedProduction.length > 0">
+            <div v-for="(chunk, chunkIndex) in splitList(scope.row.plannedProduction, 5)" :key="`chunk-${chunkIndex}`">
                   <span v-for="(item, index) in chunk" :key="`item-${chunkIndex}-${index}`">
                     {{ item }}, <!-- 替换为实际显示每个产品的代码 -->
                   </span>
-                </div>
-              </div>
-              <div v-else>
+            </div>
+          </div>
+          <div v-else>
 
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column   fixed="right" label="操作" header-align="center" align="center" width="150px" >
-            <template v-slot:default="scope">
-              <el-dropdown>
-                <el-button type="primary">
-                  操作
-                  <i class="el-icon-arrow-down el-icon--right"></i>
-                </el-button>
-                <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item @click.native.prevent="handleAddPlan(scope.row)">新增计划</el-dropdown-item>
-                  <el-dropdown-item @click.native.prevent="handleEditPlan(scope.row)">修改计划</el-dropdown-item>
-                </el-dropdown-menu>
-              </el-dropdown>
-            </template>
-          </el-table-column>
-        </el-table>
-        <!--新增计划弹窗-->
-        <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
-          <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-            <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-                <template v-slot:default="scope">
-                     <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-                           <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-                     </el-select>
-                </template>
-            </el-table-column>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column   fixed="right" label="操作" header-align="center" align="center" width="150px" >
+        <template v-slot:default="scope">
+          <el-dropdown>
+            <el-button type="primary">
+              操作
+              <i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item @click.native.prevent="handleAddPlan(scope.row)">新增计划</el-dropdown-item>
+              <el-dropdown-item @click.native.prevent="handleEditPlan(scope.row)">修改计划</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!--新增计划弹窗-->
+    <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
+      <el-table :data="tableData2" @row-click.self="handleRowClick">
+        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
+        <!--              <template v-slot:default="scope">-->
+        <!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
+        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
+        <!--                </el-select>-->
+        <!--              </template>-->
+        <!--            </el-table-column>-->
+        <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
+          <template v-slot:default="scope">
+            <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
+              <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentColorCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.productionDigit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentSpecification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" :disabled="isDisabled" v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.currentLotNumber }}</span>
-              </template>
-            </el-table-column>
+        <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing"  disabled="disabled"   v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentColorCode }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.productionDigit }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentSpecification }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" :disabled="isDisabled"  v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.currentLotNumber }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="number" label="数量" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.number }}</span>
-              </template>
-            </el-table-column>
+        <el-table-column prop="number" label="数量" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.number }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.startTime }}</span>
-              </template>
-            </el-table-column>
+        <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.startTime }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.plannedEndTime }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
-              <template v-slot:default="scope">
-                <el-select  v-model="scope.row.planStatus" placeholder="请选择计划状态">
-                  <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center">
-              <template slot-scope="scope">
-                <el-button
-                  size="mini"
-                  type="danger"
-                  @click.stop.prevent="handleDelete(scope.$index, scope.row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-button type="primary" style="width: 100%;margin-top: 30px"  @click="addEditableRow">新增计划产品</el-button>
-          <span slot="footer" class="dialog-footer">
+        <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.plannedEndTime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
+          <template v-slot:default="scope">
+            <el-select  v-model="scope.row.planStatus" placeholder="计划状态" >
+              <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="danger"
+              @click.stop.prevent="handleDelete(scope.$index, scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-button type="primary" style="width: 100%;margin-top: 30px"  @click="addEditableRow">新增计划产品</el-button>
+      <span slot="footer" class="dialog-footer">
             <el-button @click="nanInsertDialogTableVisible = false">取 消</el-button>
             <el-button type="primary" @click="addPlanInfo">确 定</el-button>
            </span>
-        </el-dialog>
-        <!--修改计划弹窗-->
-        <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1200px">
-           <!--查询条件-->
-          <el-form ref="form"  :model="formData" label-width="80px" :inline="true">
-              <el-form-item label="计划状态:">
-                <el-select v-model="formData.planStatus" placeholder="请选择计划状态">
-                  <el-option v-for="stateListItem in stateList2" :key="product.id" :label="stateListItem.name" :value="stateListItem.id" ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" @click="onSubmit">查询</el-button>
-                <el-button @click="reset">重置</el-button>
-              </el-form-item>
-          </el-form>
-          <!--表格-->
-          <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-            <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-              <template v-slot:default="scope">
-                <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-                  <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.productionDigit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentColorCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="weishu" label="位数" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing"   v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentColorCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentSpecification"  label="规格" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing"  disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentSpecification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.currentLotNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="number" label="数量" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.number }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.startTime }}</span>
-              </template>
-            </el-table-column>
+    </el-dialog>
+    <!--修改计划弹窗-->
+    <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1200px">
+      <!--查询条件-->
+      <el-form ref="form"  :model="formData" label-width="80px" :inline="true">
+        <el-form-item label="计划状态:">
+          <el-select v-model="formData.planStatus" placeholder="请选择计划状态">
+            <el-option v-for="stateListItem in stateList2" :key="product.id" :label="stateListItem.name" :value="stateListItem.id" ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="onSubmit">查询</el-button>
+          <el-button @click="reset">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <!--表格-->
+      <el-table :data="tableData2" @row-click.self="handleRowClick">
+        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
+        <!--              <template v-slot:default="scope">-->
+        <!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
+        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
+        <!--                </el-select>-->
+        <!--              </template>-->
+        <!--            </el-table-column>-->
+        <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
+          <template v-slot:default="scope">
+            <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
+              <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.productionDigit }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentColorCode }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing" :disabled="false" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentSpecification }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing"   v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.currentLotNumber }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="number" label="数量" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.number }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.startTime }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.plannedEndTime }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
-              <template v-slot:default="scope">
-                <!--上机变停机待机-->
-                <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" >
-                  <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-                <!--待机可以上机-->
-                <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" >
-                  <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-                <!--停机变上机-->
-                <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态">
-                  <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-                <!--已完成-->
-                <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态" >
-                  <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="200px">
-              <template v-slot:default="scope">
-                <el-button
-                  size="mini"
-                  type="danger"
-                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态</el-button>
-                <el-button
-                  size="mini"
-                  type="danger"
-                  @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <span slot="footer" class="dialog-footer">
+        <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.plannedEndTime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
+          <template v-slot:default="scope">
+            <!--上机变停机待机-->
+            <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+            <!--待机可以上机-->
+            <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+            <!--停机变上机-->
+            <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+            <!--已完成-->
+            <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="200px">
+          <template v-slot:default="scope">
+            <el-button
+              size="mini"
+              type="danger"
+              @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态</el-button>
+            <el-button
+              size="mini"
+              type="danger"
+              @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
+          </template>
+
+        </el-table-column>
+      </el-table>
+      <!--按钮信息-->
+      <span slot="footer" class="dialog-footer">
             <el-button @click="nanUpdateDialogTableVisible = false">取 消</el-button>
             <el-button type="primary" @click="nanUpdateDialogTableVisible = false">确 定</el-button>
            </span>
-        </el-dialog>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -261,10 +256,11 @@ import {
   getProductsInfo,
   getMaterielInfo,
   getSalesman,
+  spinningFrameWinding,
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne, spinningFrameWinding
+  updateSpinningInfoPlanOne, removeBombLoadingPlan
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -294,6 +290,7 @@ export default {
       materiel:{},
       //机台号
       machineId:"",
+      macId:"",
       // 待机/上机/停产
       stateList0:[
         {"id":0,"name":"待机"},
@@ -301,8 +298,8 @@ export default {
       ],
       stateList1:[
         {"id":0,"name":"待机"},
-        {"id":1,"name":"上机"},
         {"id":2,"name":"停机"},
+        {"id":1,"name":"上机"},
         {"id":3,"name":"已完成"},
       ],
       stateList2:[
@@ -322,8 +319,10 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getSpinningPlanList();
+    //业务员信息
     // this.getSalesman();
-    this.getProductsInfo();
+    //得到排产产品信息
+
   },
   methods: {
     deletePlan($index,row){
@@ -363,7 +362,6 @@ export default {
     // },
     // //业务员下拉框切换调用的函数
     // selectedSalesmanItem(row,saleNo,index){
-    //   console.log("ccc",index)
     //   this.getProductsInfo(saleNo,index);
     // },
     // //待投产的产品数据
@@ -376,9 +374,9 @@ export default {
     //   })
     // },
     getProductsInfo() {
-      console.log("ddddddddddddddddddddddd")
       getProductsInfo().then((response) => {
         this.productsInfo = response.data;
+        console.log(this.productsInfo,"产品信息")
         this.productsInfo.forEach(item => {
           item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
         });
@@ -387,11 +385,9 @@ export default {
     // 下拉框数据改变查询色号批号信息
     selectedChangeDate(row,selectedProduct) {
       //选择的那个销售产品
-      console.log(this.productsInfo,"hhhhhh")
       this.product = this.productsInfo.find(product => product.id === selectedProduct);
-      //选择的那个产
+      //得到选择的商
       this.form.product=selectedProduct;
-
       //通过母粒编码查询到对应的母粒信息
       let queryParams = {
         "materielCode": this.product.colourNumber
@@ -400,6 +396,7 @@ export default {
       getMaterielInfo(queryParams).then((response) => {
         if (response.data!=null) {
           this.materiel = response.data;
+          console.log(response.data,"规格")
           //色号 母粒编码+色号
           row.currentColorCode = this.materiel.materieEncoding+"("+this.materiel.materieColorNumber+")";
         }
@@ -427,6 +424,8 @@ export default {
       this.machineId=""
       //当前操作机台号
       this.machineId=row.machineId;
+      //机台id
+      this.macId=row.macId;
     },
     // 删除行
     handleDelete(index, row) {
@@ -441,6 +440,7 @@ export default {
       this.isEditLine = true;
       //找到当前行的编辑索引
       var rowIndex = this.tableData2.indexOf(row);
+      console.log(rowIndex)
       if (this.lastEditLine != 0 &&
         this.editingRowIndex !== rowIndex &&
         this.editingRowIndex !== -1 &&
@@ -484,6 +484,7 @@ export default {
     },
     // 新增一行标记为可编辑
     addEditableRow() {
+      this.getProductsInfo();
       // 检查当前编辑行是否已填写完毕
       if(this.tableData2.length!=0){
         if (this.editingRowIndex !== -1 && !this.isRowFilled(this.tableData2[this.editingRowIndex])) {
@@ -503,6 +504,7 @@ export default {
         currentSpecification: '',
         currentLotNumber: '',
         productionDigit: '',
+        number:'',
         startTime: '',
         plannedEndTime:'',
         planStatus:0,
@@ -517,53 +519,57 @@ export default {
     addPlanInfo(){
       const datatime=Date.now()+this.machineId;
       //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"machineId":this.machineId,"planStatus":1}).then(response => {
-          let i=0
-          //处理表格数据
-          this.tableData2.forEach(item=>{
-            item.timestampRandomCode=datatime;
-            item.machineId=this.machineId;
-            if(item.planStatus==1){
-              i++
-            }
-          })
-          if(i>=1&&response.data.length>0){
-            this.$message({
-              message: '只能有一个产品的状态为上机',
-              type: 'warning'
-            });
-            return;
-          }else {
-            //添加计划信息
-            addSpinningPlanList(this.tableData2).then(response => {
-              if (response.code == 200) {
-                this.$message({
-                  message: '添加成功',
-                  type: 'success'
-                });
-                this.getSpinningPlanList();
-                //最后把弹窗关掉
-                this.nanInsertDialogTableVisible=false
-              } else {
-                this.$message({
-                  message: '添加失败',
-                  type: 'error'
-                });
-                //最后把弹窗关掉
-                this.nanInsertDialogTableVisible=false
-              }
-            });
+      getPlanSpinningInfo({"machineId":this.machineId,"macId":this.macId,"planStatus":1}).then(response => {
+        let i=0
+        //处理表格数据
+        this.tableData2.forEach(item=>{
+          item.timestampRandomCode=datatime;
+          item.macId=this.macId;
+          item.machineId=this.machineId;
+          if(item.planStatus==1){
+            i++
           }
+        })
+        if(i>=1&&response.data.length>0){
+          this.$message({
+            message: '只能有一个产品的状态为上机',
+            type: 'warning'
+          });
+          return;
+        }else {
+          //添加计划信息
+          addSpinningPlanList(this.tableData2).then(response => {
+            if (response.code == 200) {
+              this.$message({
+                message: '添加成功',
+                type: 'success'
+              });
+              this.getSpinningPlanList();
+              //最后把弹窗关掉
+              this.nanInsertDialogTableVisible=false
+            } else {
+              this.$message({
+                message: '添加失败',
+                type: 'error'
+              });
+              //最后把弹窗关掉
+              this.nanInsertDialogTableVisible=false
+            }
+          });
+        }
       });
     },
     // 修改产品计划
     handleEditPlan(row) {
+      this.getProductsInfo();
       //当前操作机台号
       this.machineId=row.machineId;
+      //机台id
+      this.macId=row.macId;
       this.tableData2=[];
       //弹窗
       this.nanUpdateDialogTableVisible = true
-      getPlanSpinningInfo({"machineId":row.machineId}).then((response) => {
+      getPlanSpinningInfo({"macId":row.macId}).then((response) => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
           item.isEditing=false;
@@ -573,27 +579,27 @@ export default {
         this.tableData2=response.data;
         console.log( this.tableData2)
         // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
-        this.$nextTick(() => {
-          // 获取第一个业务员选择框(假设表格只有一行)
-          this.tableDataStatus=[];
-          for (let i = 0; i < this.tableData2.length; i++) {
-            const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-            this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
-            // console.log(firstSalesmanSelect,11111111)
-            // 触发 change 事件
-            if (firstSalesmanSelect) {
-              firstSalesmanSelect.$emit('change', {
-                target: {value: "ddd"},
-              });
-            }
-          }
-
-        });
+        // this.$nextTick(() => {
+        //   // 获取第一个业务员选择框(假设表格只有一行)
+        //   this.tableDataStatus=[];
+        //   for (let i = 0; i < this.tableData2.length; i++) {
+        //     const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
+        //     this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
+        //     // console.log(firstSalesmanSelect,11111111)
+        //     // 触发 change 事件
+        //     if (firstSalesmanSelect) {
+        //       firstSalesmanSelect.$emit('change', {
+        //         target: {value: "ddd"},
+        //       });
+        //     }
+        //   }
+        //
+        // });
       })
     },
     //弹窗里边的点击查询
     onSubmit(){
-      this.formData.machineId=this.machineId;
+      this.formData.macId=this.macId;
       getPlanSpinningInfo(this.formData).then(response => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
@@ -605,7 +611,7 @@ export default {
     },
     //重置
     reset(){
-      getPlanSpinningInfo({"machineId":this.machineId}).then(response => {
+      getPlanSpinningInfo({"macId":this.macId}).then(response => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
           item.isEditing=false;
@@ -616,17 +622,8 @@ export default {
     },
     //更新状态
     updateStatus(ind, row,planStatus){
-      const a=planStatus;
-      console.log( row.planStatus,this.tableDataStatus[ind].planStatus)
-      if(planStatus==this.tableDataStatus[ind].planStatus){
-        this.$message({
-          message: '并未更改状态,不会发送请求',
-          type: 'warning'
-        });
-        return;
-      }
       //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"machineId":this.machineId,"planStatus":planStatus}).then(response => {
+      getPlanSpinningInfo({"macId":this.macId,"planStatus":planStatus}).then(response => {
         let i=0
         //处理表格数据
         this.tableData2.forEach(item=>{
@@ -650,10 +647,6 @@ export default {
                 type: 'success'
               });
               this.getSpinningPlanList();
-              this.tableDataStatus=[]
-              for (let i = 0; i < this.tableData2.length; i++) {
-                this.tableDataStatus.push({"index": i, "planStatus": this.tableData2[i].planStatus})
-              }
               //最后把弹窗关掉
               this.nanInsertDialogTableVisible=false
             } else {

+ 12 - 10
zkqy-ui/src/views/orderMange/planTable/index.vue

@@ -12,6 +12,7 @@
           <el-table-column prop="machineId" fixed label="机台号" header-align="center" align="center" width="111px" ></el-table-column>
           <el-table-column prop="productType" fixed label="产品类别" header-align="center" align="center" width="111.2px"></el-table-column>
           <el-table-column label="在机产品" header-align="center" >
+            <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
             <el-table-column prop="currentColorCode" label="色号" header-align="center" width="90px" align="center"></el-table-column>
             <el-table-column prop="currentSpecification" label="规格" header-align="center" width="90px" align="center"></el-table-column>
             <el-table-column prop="currentLotNumber" label="批号" header-align="center"  width="90px" align="center"></el-table-column>
@@ -286,6 +287,7 @@
           <el-table-column prop="machineId" fixed label="机台号" header-align="center" align="center" width="111px" ></el-table-column>
           <el-table-column prop="productType" fixed label="产品类别" header-align="center" align="center" width="111.2px"></el-table-column>
           <el-table-column label="在机产品" header-align="center" >
+            <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
             <el-table-column prop="currentColorCode" label="色号" header-align="center" width="90px" align="center"></el-table-column>
             <el-table-column prop="currentSpecification" label="规格" header-align="center" width="90px" align="center"></el-table-column>
             <el-table-column prop="currentLotNumber" label="批号" header-align="center"  width="90px" align="center"></el-table-column>
@@ -616,6 +618,7 @@ export default {
       materiel:{},
       // 机台号
       machineId:"",
+      macId:"",//机台id
       // 待机/上机/停产
       stateList0:[
         {"id":0,"name":"待机"},
@@ -669,24 +672,20 @@ export default {
       this.modifyMachineStatus=true;
       console.log("停机");
       this.machineId=row.machineId;
-      // this.modifyMachineStatusFrom.type=[];
-      // this.modifyMachineStatusFrom.type.push("1")
-      // this.modifyMachineStatusFrom.type.push("2")
-      //当前操作机台号
-      this.machineId=row.machineId;
+      this.macId=row.macId;//机台id
       //查询当前机台A、面B面的状态
-      whetherTheFeederIsShutDown(this.machineId).then(res=>{
+      whetherTheFeederIsShutDown(this.macId).then(res=>{
         this.modifyMachineStatusFrom.type=res.data;
       })
     },
     //确认修改产线信息
     confirmStopProductionLine(){
-      console.log(this.modifyMachineStatusFrom.type);
+      // console.log(this.modifyMachineStatusFrom.type);
       if(this.modifyMachineStatusFrom.type.length==0){
         this.modifyMachineStatusFrom.type.push("3")
       }
       //更改状态
-      updateLineStates(this.machineId,this.modifyMachineStatusFrom.type.join(",")).then(res=>{
+      updateLineStates(this.macId,this.modifyMachineStatusFrom.type.join(",")).then(res=>{
         if(res.code==200){
           this.$message({
             message: '修改状态成功',
@@ -998,8 +997,8 @@ export default {
     },
     // 新增计划产品信息
     handleAddPlan(row) {
-      //查询当前机台A、面B面的状态
-      whetherTheFeederIsShutDown(row.machineId).then(res=>{
+      //查询当前机台A、面B面的状态(这个不用改,因为这个是唯一的)
+      whetherTheFeederIsShutDown(row.macId).then(res=>{
         this.modifyMachineStatusFrom.type=res.data;
         if(this.modifyMachineStatusFrom.type.includes("2")&&this.modifyMachineStatusFrom.type.includes("1")){
           this.$message({
@@ -1032,6 +1031,7 @@ export default {
           this.machineId=""
           //当前操作机台号
           this.machineId=row.machineId;
+          this.macId=row.macId;
         }
       })
 
@@ -1129,6 +1129,7 @@ export default {
         productId:'',
         salesmanId:'',
         isEditing: true // 标记为正在编辑状态
+
       });
       this.editingRowIndex = this.tableData2.length - 1; // 更新当前编辑的行索引
       this.lastEditLine = this.tableData2.length - 1
@@ -1152,6 +1153,7 @@ export default {
       let data={
         //机台号
         machineId: this.machineId,
+        macId:this.macId,
         timestampRandomCode:datatime,
         //计划信息
         detailsOfTheRefuelingPlans: this.tableData2

+ 311 - 315
zkqy-ui/src/views/orderMange/planTable/luotong.vue

@@ -1,259 +1,254 @@
 <template>
   <div class="app-container" style="width: 100%;">
-        <!--表格-->
-        <el-table
-          :data="tableData"
-          ref="tableRef">
-          <el-table-column prop="machineId" fixed label="机台号" header-align="center" align="center" width="111px" ></el-table-column>
-          <el-table-column prop="productionDigit" fixed label="生产位数" header-align="center" align="center" width="111.2px"></el-table-column>
-          <el-table-column label="在机产品" header-align="center" >
-            <el-table-column prop="currentColorCode" label="色号" header-align="center" width="90px" align="center"></el-table-column>
-            <el-table-column prop="currentSpecification" label="规格" header-align="center" width="90px" align="center"></el-table-column>
-            <el-table-column prop="currentLotNumber" label="批号" header-align="center"  width="90px" align="center"></el-table-column>
-            <el-table-column prop="startTime" label="上机时间" header-align="center" width="90px" align="center"></el-table-column>
-            <el-table-column prop="plannedEndTime" label="下机时间" header-align="center" width="90px" align="center"></el-table-column>
-          </el-table-column>
-          <el-table-column prop="plannedProduction" label="待生产产品列表" header-align="center" align="center"  >
-            <template v-slot:default="scope">
-              <div v-if="scope.row.plannedProduction && scope.row.plannedProduction.length > 0">
-                <div v-for="(chunk, chunkIndex) in splitList(scope.row.plannedProduction, 5)" :key="`chunk-${chunkIndex}`">
+    <!--表格-->
+    <el-table
+      :data="tableData"
+      ref="tableRef">
+      <el-table-column prop="machineId" fixed label="线号" header-align="center" align="center" width="111px" ></el-table-column>
+      <el-table-column prop="productionDigit" fixed label="生产位数" header-align="center" align="center" width="111.2px"></el-table-column>
+      <el-table-column label="在机产品" header-align="center" >
+        <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
+        <el-table-column prop="currentColorCode" label="色号" header-align="center" width="90px" align="center"></el-table-column>
+        <el-table-column prop="currentSpecification" label="规格" header-align="center" width="90px" align="center"></el-table-column>
+        <el-table-column prop="currentLotNumber" label="批号" header-align="center"  width="90px" align="center"></el-table-column>
+        <el-table-column prop="startTime" label="上机时间" header-align="center" width="90px" align="center"></el-table-column>
+        <el-table-column prop="plannedEndTime" label="下机时间" header-align="center" width="90px" align="center"></el-table-column>
+      </el-table-column>
+      <el-table-column prop="plannedProduction" label="待生产产品列表" header-align="center" align="center"  >
+        <template v-slot:default="scope">
+          <div v-if="scope.row.plannedProduction && scope.row.plannedProduction.length > 0">
+            <div v-for="(chunk, chunkIndex) in splitList(scope.row.plannedProduction, 5)" :key="`chunk-${chunkIndex}`">
                   <span v-for="(item, index) in chunk" :key="`item-${chunkIndex}-${index}`">
                     {{ item }}, <!-- 替换为实际显示每个产品的代码 -->
                   </span>
-                </div>
-              </div>
-              <div v-else>
+            </div>
+          </div>
+          <div v-else>
 
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column   fixed="right" label="操作" header-align="center" align="center" width="150px" >
-            <template v-slot:default="scope">
-              <el-dropdown>
-                <el-button type="primary">
-                  操作
-                  <i class="el-icon-arrow-down el-icon--right"></i>
-                </el-button>
-                <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item @click.native.prevent="handleAddPlan(scope.row)">新增计划</el-dropdown-item>
-                  <el-dropdown-item @click.native.prevent="handleEditPlan(scope.row)">修改计划</el-dropdown-item>
-                </el-dropdown-menu>
-              </el-dropdown>
-            </template>
-          </el-table-column>
-        </el-table>
-        <!--新增计划弹窗-->
-        <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
-          <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-            <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-                <template v-slot:default="scope">
-                     <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-                           <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-                     </el-select>
-                </template>
-            </el-table-column>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column   fixed="right" label="操作" header-align="center" align="center" width="150px" >
+        <template v-slot:default="scope">
+          <el-dropdown>
+            <el-button type="primary">
+              操作
+              <i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item @click.native.prevent="handleAddPlan(scope.row)">新增计划</el-dropdown-item>
+              <el-dropdown-item @click.native.prevent="handleEditPlan(scope.row)">修改计划</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!--新增计划弹窗-->
+    <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
+      <el-table :data="tableData2" @row-click.self="handleRowClick">
+        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
+        <!--              <template v-slot:default="scope">-->
+        <!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
+        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
+        <!--                </el-select>-->
+        <!--              </template>-->
+        <!--            </el-table-column>-->
+        <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
+          <template v-slot:default="scope">
+            <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
+              <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentColorCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.productionDigit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentSpecification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.currentLotNumber }}</span>
-              </template>
-            </el-table-column>
+        <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing"  disabled="disabled"   v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentColorCode }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.productionDigit }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentSpecification }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" :disabled="isDisabled"  v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.currentLotNumber }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="number" label="数量" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.number }}</span>
-              </template>
-            </el-table-column>
+        <el-table-column prop="number" label="数量" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.number }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.startTime }}</span>
-              </template>
-            </el-table-column>
+        <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.startTime }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.plannedEndTime }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
-              <template v-slot:default="scope">
-                <el-select  v-model="scope.row.planStatus" placeholder="请选择计划状态" >
-                  <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center">
-              <template slot-scope="scope">
-                <el-button
-                  size="mini"
-                  type="danger"
-                  @click.stop.prevent="handleDelete(scope.$index, scope.row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-button type="primary" style="width: 100%;margin-top: 30px"  @click="addEditableRow">新增计划产品</el-button>
-          <span slot="footer" class="dialog-footer">
+        <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.plannedEndTime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
+          <template v-slot:default="scope">
+            <el-select  v-model="scope.row.planStatus" placeholder="计划状态" >
+              <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="danger"
+              @click.stop.prevent="handleDelete(scope.$index, scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-button type="primary" style="width: 100%;margin-top: 30px"  @click="addEditableRow">新增计划产品</el-button>
+      <span slot="footer" class="dialog-footer">
             <el-button @click="nanInsertDialogTableVisible = false">取 消</el-button>
             <el-button type="primary" @click="addPlanInfo">确 定</el-button>
            </span>
-        </el-dialog>
-        <!--修改计划弹窗-->
-        <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1200px">
-           <!--查询条件-->
-          <el-form ref="form"  :model="formData" label-width="80px" :inline="true">
-              <el-form-item label="计划状态:">
-                <el-select v-model="formData.planStatus" placeholder="请选择计划状态">
-                  <el-option v-for="stateListItem in stateList2" :key="product.id" :label="stateListItem.name" :value="stateListItem.id" ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" @click="onSubmit">查询</el-button>
-                <el-button @click="reset">重置</el-button>
-              </el-form-item>
-          </el-form>
-          <!--表格-->
-          <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-            <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-              <template v-slot:default="scope">
-                <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-                  <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.productionDigit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentColorCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="weishu" label="位数" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentColorCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentSpecification" disabled="disabled" label="规格" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <!-- 否则显示普通文本 -->
-                <span v-else>{{ scope.row.currentSpecification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" :disabled="isDisabled"  v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.currentLotNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="number" label="数量" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.number }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.startTime }}</span>
-              </template>
-            </el-table-column>
+    </el-dialog>
+    <!--修改计划弹窗-->
+    <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1200px">
+      <!--查询条件-->
+      <el-form ref="form"  :model="formData" label-width="80px" :inline="true">
+        <el-form-item label="计划状态:">
+          <el-select v-model="formData.planStatus" placeholder="请选择计划状态">
+            <el-option v-for="stateListItem in stateList2" :key="product.id" :label="stateListItem.name" :value="stateListItem.id" ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="onSubmit">查询</el-button>
+          <el-button @click="reset">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <!--表格-->
+      <el-table :data="tableData2" @row-click.self="handleRowClick">
+        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
+        <!--              <template v-slot:default="scope">-->
+        <!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
+        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
+        <!--                </el-select>-->
+        <!--              </template>-->
+        <!--            </el-table-column>-->
+        <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
+          <template v-slot:default="scope">
+            <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
+              <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.productionDigit" placeholder="请输入生产位数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.productionDigit }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentColorCode" placeholder="请输入色号" @blur.stop.prevent="handleInputBlur(scope.row)" ></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentColorCode }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <!-- 如果当前行正在编辑,则显示输入框 -->
+            <el-input v-if="scope.row.isEditing" :disabled="false" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <!-- 否则显示普通文本 -->
+            <span v-else>{{ scope.row.currentSpecification }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="currentLotNumber" label="批号" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing"   v-model="scope.row.currentLotNumber" placeholder="请输入批号" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.currentLotNumber }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="number" label="数量" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.number }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="startTime" label="上机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" v-model="scope.row.startTime" placeholder="请输入上机时间" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.startTime }}</span>
+          </template>
+        </el-table-column>
 
-            <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
-              <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
-                <span v-else>{{ scope.row.plannedEndTime }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
-              <template v-slot:default="scope">
-                <!--上机变停机待机-->
-                <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
-                  <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-                <!--待机可以上机-->
-                <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态">
-                  <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-                <!--停机变上机-->
-                <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" >
-                  <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-                <!--已完成-->
-                <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态">
-                  <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="200px">
-              <template v-slot:default="scope">
-                <el-button
-                  size="mini"
-                  type="danger"
-                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态</el-button>
-                <el-button
-                  size="mini"
-                  type="danger"
-                  @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <span slot="footer" class="dialog-footer">
+        <el-table-column prop="plannedEndTime" label="计划下机时间" header-align="center" align="center">
+          <template v-slot:default="scope">
+            <el-input v-if="scope.row.isEditing" :ref="'input'+scope.$index" v-model="scope.row.plannedEndTime" placeholder="请输入计划下机时间" @blur="handleInputBlur(scope.row)">></el-input>
+            <span v-else>{{ scope.row.plannedEndTime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
+          <template v-slot:default="scope">
+            <!--上机变停机待机-->
+            <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+            <!--待机可以上机-->
+            <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+            <!--停机变上机-->
+            <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+            <!--已完成-->
+            <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态">
+              <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="200px">
+          <template v-slot:default="scope">
+            <el-button
+              size="mini"
+              type="danger"
+              @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态</el-button>
+            <el-button
+              size="mini"
+              type="danger"
+              @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
+          </template>
+
+        </el-table-column>
+      </el-table>
+      <!--按钮信息-->
+      <span slot="footer" class="dialog-footer">
             <el-button @click="nanUpdateDialogTableVisible = false">取 消</el-button>
             <el-button type="primary" @click="nanUpdateDialogTableVisible = false">确 定</el-button>
            </span>
-        </el-dialog>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -261,18 +256,19 @@ import {
   getProductsInfo,
   getMaterielInfo,
   getSalesman,
+  spinningFrameWinding,
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne, spinningFrameWinding
+  updateSpinningInfoPlanOne, removeBombLoadingPlan
 } from "@/api/plan/paln.js";
 export default {
   data() {
     return {
+      //
+      isDisabled:true,
       //选中的是那个车间
       tableData:[],
-      //默认是禁用
-      isDisabled:true,
       form: {
         product:"",
       },
@@ -294,6 +290,7 @@ export default {
       materiel:{},
       //机台号
       machineId:"",
+      macId:"",
       // 待机/上机/停产
       stateList0:[
         {"id":0,"name":"待机"},
@@ -322,9 +319,10 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getSpinningPlanList();
-    // //
+    //业务员信息
     // this.getSalesman();
-    this.getProductsInfo();
+    //得到排产产品信息
+
   },
   methods: {
     deletePlan($index,row){
@@ -364,7 +362,6 @@ export default {
     // },
     // //业务员下拉框切换调用的函数
     // selectedSalesmanItem(row,saleNo,index){
-    //   console.log("ccc",index)
     //   this.getProductsInfo(saleNo,index);
     // },
     // //待投产的产品数据
@@ -376,10 +373,10 @@ export default {
     //     });
     //   })
     // },
-    //待投产的产品数据
     getProductsInfo() {
       getProductsInfo().then((response) => {
         this.productsInfo = response.data;
+        console.log(this.productsInfo,"产品信息")
         this.productsInfo.forEach(item => {
           item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
         });
@@ -389,6 +386,7 @@ export default {
     selectedChangeDate(row,selectedProduct) {
       //选择的那个销售产品
       this.product = this.productsInfo.find(product => product.id === selectedProduct);
+      //得到选择的商品
       this.form.product=selectedProduct;
       //通过母粒编码查询到对应的母粒信息
       let queryParams = {
@@ -398,6 +396,7 @@ export default {
       getMaterielInfo(queryParams).then((response) => {
         if (response.data!=null) {
           this.materiel = response.data;
+          console.log(response.data,"规格")
           //色号 母粒编码+色号
           row.currentColorCode = this.materiel.materieEncoding+"("+this.materiel.materieColorNumber+")";
         }
@@ -418,12 +417,15 @@ export default {
     },
     // 新增计划产品信息
     handleAddPlan(row) {
+      this.getProductsInfo();
       this.nanInsertDialogTableVisible = true
       this.tableData2=[]
       //先清空
       this.machineId=""
       //当前操作机台号
       this.machineId=row.machineId;
+      //机台id
+      this.macId=row.macId;
     },
     // 删除行
     handleDelete(index, row) {
@@ -438,6 +440,7 @@ export default {
       this.isEditLine = true;
       //找到当前行的编辑索引
       var rowIndex = this.tableData2.indexOf(row);
+      console.log(rowIndex)
       if (this.lastEditLine != 0 &&
         this.editingRowIndex !== rowIndex &&
         this.editingRowIndex !== -1 &&
@@ -481,6 +484,7 @@ export default {
     },
     // 新增一行标记为可编辑
     addEditableRow() {
+      this.getProductsInfo();
       // 检查当前编辑行是否已填写完毕
       if(this.tableData2.length!=0){
         if (this.editingRowIndex !== -1 && !this.isRowFilled(this.tableData2[this.editingRowIndex])) {
@@ -500,6 +504,7 @@ export default {
         currentSpecification: '',
         currentLotNumber: '',
         productionDigit: '',
+        number:'',
         startTime: '',
         plannedEndTime:'',
         planStatus:0,
@@ -514,53 +519,57 @@ export default {
     addPlanInfo(){
       const datatime=Date.now()+this.machineId;
       //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"machineId":this.machineId,"planStatus":1}).then(response => {
-          let i=0
-          //处理表格数据
-          this.tableData2.forEach(item=>{
-            item.timestampRandomCode=datatime;
-            item.machineId=this.machineId;
-            if(item.planStatus==1){
-              i++
-            }
-          })
-          if(i>=1&&response.data.length>0){
-            this.$message({
-              message: '只能有一个产品的状态为上机',
-              type: 'warning'
-            });
-            return;
-          }else {
-            //添加计划信息
-            addSpinningPlanList(this.tableData2).then(response => {
-              if (response.code == 200) {
-                this.$message({
-                  message: '添加成功',
-                  type: 'success'
-                });
-                this.getSpinningPlanList();
-                //最后把弹窗关掉
-                this.nanInsertDialogTableVisible=false
-              } else {
-                this.$message({
-                  message: '添加失败',
-                  type: 'error'
-                });
-                //最后把弹窗关掉
-                this.nanInsertDialogTableVisible=false
-              }
-            });
+      getPlanSpinningInfo({"machineId":this.machineId,"macId":this.macId,"planStatus":1}).then(response => {
+        let i=0
+        //处理表格数据
+        this.tableData2.forEach(item=>{
+          item.timestampRandomCode=datatime;
+          item.macId=this.macId;
+          item.machineId=this.machineId;
+          if(item.planStatus==1){
+            i++
           }
+        })
+        if(i>=1&&response.data.length>0){
+          this.$message({
+            message: '只能有一个产品的状态为上机',
+            type: 'warning'
+          });
+          return;
+        }else {
+          //添加计划信息
+          addSpinningPlanList(this.tableData2).then(response => {
+            if (response.code == 200) {
+              this.$message({
+                message: '添加成功',
+                type: 'success'
+              });
+              this.getSpinningPlanList();
+              //最后把弹窗关掉
+              this.nanInsertDialogTableVisible=false
+            } else {
+              this.$message({
+                message: '添加失败',
+                type: 'error'
+              });
+              //最后把弹窗关掉
+              this.nanInsertDialogTableVisible=false
+            }
+          });
+        }
       });
     },
     // 修改产品计划
     handleEditPlan(row) {
+      this.getProductsInfo();
       //当前操作机台号
       this.machineId=row.machineId;
+      //机台id
+      this.macId=row.macId;
       this.tableData2=[];
       //弹窗
       this.nanUpdateDialogTableVisible = true
-      getPlanSpinningInfo({"machineId":row.machineId}).then((response) => {
+      getPlanSpinningInfo({"macId":row.macId}).then((response) => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
           item.isEditing=false;
@@ -570,27 +579,27 @@ export default {
         this.tableData2=response.data;
         console.log( this.tableData2)
         // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
-        this.$nextTick(() => {
-          // 获取第一个业务员选择框(假设表格只有一行)
-          this.tableDataStatus=[];
-          for (let i = 0; i < this.tableData2.length; i++) {
-            const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-            this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
-            // console.log(firstSalesmanSelect,11111111)
-            // 触发 change 事件
-            if (firstSalesmanSelect) {
-              firstSalesmanSelect.$emit('change', {
-                target: {value: "ddd"},
-              });
-            }
-          }
-
-        });
+        // this.$nextTick(() => {
+        //   // 获取第一个业务员选择框(假设表格只有一行)
+        //   this.tableDataStatus=[];
+        //   for (let i = 0; i < this.tableData2.length; i++) {
+        //     const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
+        //     this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
+        //     // console.log(firstSalesmanSelect,11111111)
+        //     // 触发 change 事件
+        //     if (firstSalesmanSelect) {
+        //       firstSalesmanSelect.$emit('change', {
+        //         target: {value: "ddd"},
+        //       });
+        //     }
+        //   }
+        //
+        // });
       })
     },
     //弹窗里边的点击查询
     onSubmit(){
-      this.formData.machineId=this.machineId;
+      this.formData.macId=this.macId;
       getPlanSpinningInfo(this.formData).then(response => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
@@ -602,7 +611,7 @@ export default {
     },
     //重置
     reset(){
-      getPlanSpinningInfo({"machineId":this.machineId}).then(response => {
+      getPlanSpinningInfo({"macId":this.macId}).then(response => {
         //得到生产中,停产的,待产的
         response.data.forEach(item => {
           item.isEditing=false;
@@ -613,17 +622,8 @@ export default {
     },
     //更新状态
     updateStatus(ind, row,planStatus){
-      const a=planStatus;
-      console.log( row.planStatus,this.tableDataStatus[ind].planStatus)
-      if(planStatus==this.tableDataStatus[ind].planStatus){
-        this.$message({
-          message: '并未更改状态,不会发送请求',
-          type: 'warning'
-        });
-        return;
-      }
       //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"machineId":this.machineId,"planStatus":planStatus}).then(response => {
+      getPlanSpinningInfo({"macId":this.macId,"planStatus":planStatus}).then(response => {
         let i=0
         //处理表格数据
         this.tableData2.forEach(item=>{
@@ -647,10 +647,6 @@ export default {
                 type: 'success'
               });
               this.getSpinningPlanList();
-              this.tableDataStatus=[]
-              for (let i = 0; i < this.tableData2.length; i++) {
-                this.tableDataStatus.push({"index": i, "planStatus": this.tableData2[i].planStatus})
-              }
               //最后把弹窗关掉
               this.nanInsertDialogTableVisible=false
             } else {

+ 1 - 0
zkqy-ui/src/views/orderMange/planTable/show/fangsi.vue

@@ -19,6 +19,7 @@
         width="111.2px"
       ></el-table-column>
       <el-table-column label="在机产品" header-align="center">
+        <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
         <el-table-column
           prop="currentColorCode"
           label="色号"

+ 1 - 0
zkqy-ui/src/views/orderMange/planTable/show/fankuang.vue

@@ -19,6 +19,7 @@
         width="111.2px"
       ></el-table-column>
       <el-table-column label="在机产品" header-align="center">
+        <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
         <el-table-column
           prop="currentColorCode"
           label="色号"

+ 1 - 0
zkqy-ui/src/views/orderMange/planTable/show/luotong.vue

@@ -19,6 +19,7 @@
         width="111.2px"
       ></el-table-column>
       <el-table-column label="在机产品" header-align="center">
+        <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
         <el-table-column
           prop="currentColorCode"
           label="色号"

+ 1 - 0
zkqy-ui/src/views/orderMange/planTable/show/northWorkshop.vue

@@ -24,6 +24,7 @@
         width="111.2px"
       ></el-table-column>
       <el-table-column label="在机产品" header-align="center">
+        <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
         <el-table-column
           prop="currentColorCode"
           label="色号"

+ 1 - 0
zkqy-ui/src/views/orderMange/planTable/show/southWorkshop.vue

@@ -24,6 +24,7 @@
         width="111.2px"
       ></el-table-column>
       <el-table-column label="在机产品" header-align="center">
+        <el-table-column prop="productTypeName" fixed label="产品类型" header-align="center" align="center" width="111.2px"></el-table-column>
         <el-table-column
           prop="currentColorCode"
           label="色号"