Ver Fonte

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CLIENT

lph há 1 ano atrás
pai
commit
c11f3b7fc3
23 ficheiros alterados com 568 adições e 212 exclusões
  1. 70 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductInventoryController.java
  2. 9 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductInvoiceController.java
  3. 11 1
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleOrderController.java
  4. 11 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductCodeListVO.java
  5. 11 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductInvoiceVO.java
  6. 5 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductOutboundRecordMapper.java
  7. 3 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductionMapper.java
  8. 13 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductInventoryService.java
  9. 8 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductInvoiceService.java
  10. 1 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanServiceImpl.java
  11. 13 15
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java
  12. 16 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java
  13. 13 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInvoiceServiceImpl.java
  14. 2 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleOrderServiceImpl.java
  15. 24 1
      zkqy-custom-business/src/main/resources/mapper/business/ProductInventoryMapper.xml
  16. 22 0
      zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordMapper.xml
  17. 5 0
      zkqy-custom-business/src/main/resources/mapper/business/ProductionMapper.xml
  18. 2 2
      zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml
  19. 1 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/CommonServiceImpl.java
  20. 105 59
      zkqy-ui/src/views/orderMange/planTable/fangsi.vue
  21. 91 48
      zkqy-ui/src/views/orderMange/planTable/fankuang.vue
  22. 41 38
      zkqy-ui/src/views/orderMange/planTable/index.vue
  23. 91 48
      zkqy-ui/src/views/orderMange/planTable/luotong.vue

+ 70 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductInventoryController.java

@@ -1,10 +1,17 @@
 package com.zkqy.business.controller;
 
+import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 import javax.servlet.http.HttpServletResponse;
 
+import com.zkqy.business.domain.Customer;
 import com.zkqy.business.domain.ProductInvoice;
+import com.zkqy.business.domain.Production;
 import com.zkqy.business.domain.vo.ProductCodeListVO;
+import com.zkqy.business.mapper.ProductionMapper;
+import com.zkqy.common.utils.DateUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -25,6 +32,7 @@ import com.zkqy.business.domain.ProductInventory;
 import com.zkqy.business.service.IProductInventoryService;
 import com.zkqy.common.utils.poi.ExcelUtil;
 import com.zkqy.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 产品库存Controller
@@ -39,6 +47,9 @@ public class ProductInventoryController extends BaseController {
     @Autowired
     private IProductInventoryService productInventoryService;
 
+    @Autowired
+    private ProductionMapper productionMapper;
+
     /**
      * 查询产品库存列表
      */
@@ -154,6 +165,65 @@ public class ProductInventoryController extends BaseController {
     }
 
 
+    /**
+     * 综合库存列表
+     */
+    @GetMapping("/comprehensiveInventoryList")
+    public TableDataInfo comprehensiveInventoryList(ProductCodeListVO productCodeListVO) {
+        startPage();
+        List<ProductCodeListVO> list = productInventoryService.comprehensiveInventoryList(productCodeListVO);
+        return getDataTable(list);
+    }
+
+
+//    @Log(title = "库存管理", businessType = BusinessType.IMPORT)
+//    //@PreAuthorize("@ss.hasPermi('system:user:import')")
+//    @PostMapping("/importData")
+//    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
+//        ExcelUtil<ProductInventory> util = new ExcelUtil<ProductInventory>(ProductInventory.class);
+//        //成品库存数据
+//        List<ProductInventory> productInventoryList = util.importExcel(file.getInputStream());
+//
+//        //未成功导入库存
+//        List<ProductInventory> errorList = new ArrayList<>();
+//        // 产品类型
+//        Set<String> productTypeList = new HashSet<>();
+//
+//        //处理excel数据,将产品名称设置为类型+品名+规格
+//        for (ProductInventory productInventory : productInventoryList){
+//            String productName = productInventory.getProductType() + productInventory.getProductName()
+//                    + productInventory.getSpecifications();
+//            Long productId = productionMapper.aaaa(productName);
+//
+//            if(productId == null){
+//                errorList.add(productInventory);
+//                continue;
+//            }
+//            //根据类型判断所属仓库
+//            if(productInventory.getProductType().trim().equals("POY")){
+//                productInventory.setWarehouseId(7L);
+//            }else if(productInventory.getProductType().trim().equals("BTS")){
+//                productInventory.setWarehouseId(6L);
+//            }else {
+//                productInventory.setWarehouseId(1L);
+//            }
+//            productInventory.setProductId(productId);
+////            productTypeList.add(productInventory.getProductType());
+//            productInventory.setCreateBy(getUsername());
+//            productInventory.setCreateById(getUserId());
+//            productInventory.setCreateTime(DateUtils.getNowDate());
+//        }
+//
+//
+//        return success(productInventoryService.batchInsertProductInventory(productInventoryList));
+////        return success(customerService.batchInsertCustomer(userList));
+//    }
+//
+//    @PostMapping("/importTemplate")
+//    public void importTemplate(HttpServletResponse response) {
+//        ExcelUtil<ProductInventory> util = new ExcelUtil<ProductInventory>(ProductInventory.class);
+//        util.importTemplateExcel(response, "库存数据");
+//    }
 
 
 }

+ 9 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductInvoiceController.java

@@ -128,4 +128,13 @@ public class ProductInvoiceController extends BaseController
         return success(productInvoiceService.saleStorageDetails(id));
     }
 
+    /**
+     * 打印发货单、送货单、财务对账单接口
+     */
+    @GetMapping("/printDocuments")
+    public AjaxResult printDocuments(@RequestParam("id") Long id)
+    {
+        return success(productInvoiceService.printDocuments(id));
+    }
+
 }

+ 11 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleOrderController.java

@@ -183,7 +183,17 @@ public class SaleOrderController extends BaseController {
         return toAjax(saleOrderService.cancelRetailOrder(productInvoice));
     }
 
-
+    /**
+     * 零售单删除
+     */
+    @PreAuthorize("@ss.hasPermi('system:order:remove')")
+    @Log(title = "销售订单", businessType = BusinessType.DELETE)
+    @DeleteMapping("/RetailOrder/{ids}")
+    @ApiOperation(value = "删除销售订单")
+    public AjaxResult removeRetailOrder(@PathVariable List<Long> ids) {
+        saleOrderService.deleteSaleOrderByIds(ids);
+        return AjaxResult.success();
+    }
 
 
 

+ 11 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductCodeListVO.java

@@ -152,6 +152,9 @@ public class ProductCodeListVO extends BaseEntity
     /** 机台号 */
     private String machineToolNo;
 
+    //货品单价
+    private Double productUnitPrice;
+
     public Long getId() {
         return id;
     }
@@ -518,6 +521,14 @@ public class ProductCodeListVO extends BaseEntity
         this.machineToolNo = machineToolNo;
     }
 
+    public Double getProductUnitPrice() {
+        return productUnitPrice;
+    }
+
+    public void setProductUnitPrice(Double productUnitPrice) {
+        this.productUnitPrice = productUnitPrice;
+    }
+
     @Override
     public String toString() {
         return "ProductCodeListVO{" +

+ 11 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductInvoiceVO.java

@@ -108,6 +108,9 @@ public class ProductInvoiceVO extends BaseEntity
     /** 客户编号 */
     private String customerNo;
 
+    private List<ProductCodeListVO> productCodeListVOList;
+
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -363,6 +366,14 @@ public class ProductInvoiceVO extends BaseEntity
         this.customerNo = customerNo;
     }
 
+    public List<ProductCodeListVO> getProductCodeListVOList() {
+        return productCodeListVOList;
+    }
+
+    public void setProductCodeListVOList(List<ProductCodeListVO> productCodeListVOList) {
+        this.productCodeListVOList = productCodeListVOList;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 5 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductOutboundRecordMapper.java

@@ -100,6 +100,11 @@ public interface ProductOutboundRecordMapper
     List<ProductCodeListVO> selectOutboundDetails(String noticeNumber);
 
 
+    /**
+     * 根据通知单号查询出库货品信息
+     */
+    List<ProductCodeListVO> selectOutboundProduct(String noticeNumber);
+
 
     /**
      * 删除成品出库记录信息

+ 3 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductionMapper.java

@@ -67,4 +67,7 @@ public interface ProductionMapper
      * @return 产品集合
      */
     List<Production> selectSaleOrderProductionList(Production production);
+
+
+//    Long aaaa(String productName);
 }

+ 13 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductInventoryService.java

@@ -89,4 +89,17 @@ public interface IProductInventoryService {
      */
     Map<String,Object> getProductInventory(ProductInventory productInventory);
 
+    /**
+     * 综合库存列表
+     */
+    List<ProductCodeListVO> comprehensiveInventoryList(ProductCodeListVO productCodeListVO);
+
+    /**
+     * 批量新增产品库存
+     *
+     * @param productInventoryList 产品库存
+     * @return 结果
+     */
+    int batchInsertProductInventory(List<ProductInventory> productInventoryList);
+
 }

+ 8 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductInvoiceService.java

@@ -85,4 +85,12 @@ public interface IProductInvoiceService
      */
     ProductInvoice selectProductInvoiceBySaleOrderNo(String saleOrderNo);
 
+    /**
+     * 打印发货单、送货单、财务对账单接口
+     * @return
+     */
+    ProductInvoiceVO printDocuments(Long id);
+
+
+
 }

+ 1 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanServiceImpl.java

@@ -134,6 +134,7 @@ public class DetailsOfTheRefuelingPlanServiceImpl implements IDetailsOfTheRefuel
             detailsOfTheRefuelingPlan.setPlanStatus("3");
         }
         saleProducts.setSaleOrderNo(detailsOfTheRefuelingPlan.getSalesmanId());//合同号
+        saleProducts.setId(Long.valueOf(detailsOfTheRefuelingPlan.getProductId()));//产品iD
         saleProducts.setOnBoardState(detailsOfTheRefuelingPlan.getPlanStatus());//更新上机状态
         saleProducts.setProductionLineNo(detailsOfTheRefuelingPlan.getMacId());//产线号
         //修改产品上机状态

+ 13 - 15
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java

@@ -208,6 +208,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
             detailsOfTheRefuelingPlanSpinning.setPlanStatus("3");
         }
         saleProducts.setSaleOrderNo(detailsOfTheRefuelingPlanSpinning.getSalesmanId());//合同号
+        saleProducts.setId(Long.valueOf(detailsOfTheRefuelingPlanSpinning.getProductId()));//产品id
         saleProducts.setOnBoardState(detailsOfTheRefuelingPlanSpinning.getPlanStatus());//更新上机状态
         saleProducts.setProductNumber(Double.valueOf(detailsOfTheRefuelingPlanSpinning.getNumber()));//数量
         //插入日志信息
@@ -284,24 +285,20 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
             saleProducts.setId(Long.valueOf(item.getProductId()));
             saleProducts.setProductionLineNo(item.getMacId());//产线iD
             saleProducts.setLotNumber(item.getCurrentLotNumber().toString());//批号
-            if(item.getPlanStatus().equals("待机")){
-                item.setPlanStatus("0");
-            }
-            if(item.getPlanStatus().equals("上机")){
-                item.setPlanStatus("1");
-            }
-            if(item.getPlanStatus().equals("停机")){
-                item.setPlanStatus("2");
-            }
-            if(item.getPlanStatus().equals("完成")){
-                item.setPlanStatus("3");
+            if(item.getPlanStatus().equals("1")){
+                //产品对应的信息
+                SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
+                item.setProductTypeName(saleProducts1.getProductName());
+                saleProductsList.add(saleProducts);
             }
             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);
+            if(saleProductsList.size()<=0){
+                //产品对应的信息
+                SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
+                item.setProductTypeName(saleProducts1.getProductName());
+                saleProductsList.add(saleProducts);
+            }
             DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs=new DetailsOfTheRefuelingPlanSpinningLogs();
             BeanUtils.copyProperties(item,detailsOfTheRefuelingPlanSpinningLogs);
             detailsOfTheRefuelingPlanSpinningLogs.setCreateBy(SecurityUtils.getUsername());
@@ -311,6 +308,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
             detailsOfTheRefuelingPlanSpinningLogs.setOrderId(item.getSalesmanId());//订单
             detailsOfTheRefuelingPlanSpinningLogs.setOperation("0");
             detailsOfTheRefuelingPlanSpinningLogsMapper.insertDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs);
+
         });
         //更新产线
         int i2 = saleProductsMapper.updateSaleProductBatch(saleProductsList);

+ 16 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java

@@ -358,6 +358,22 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
         return map;
     }
 
+    @Override
+    public List<ProductCodeListVO> comprehensiveInventoryList(ProductCodeListVO productCodeListVO) {
+        return productInventoryMapper.selectComprehensiveInventoryList(productCodeListVO);
+    }
+
+    @Override
+    public int batchInsertProductInventory(List<ProductInventory> productInventoryList) {
+        return productInventoryMapper.batchInsertProductInventory(productInventoryList);
+    }
+
+
+
+
+
+
+
     //保留两位小数
     public Double handlingWeight(Double weight) {
         DecimalFormat df = new DecimalFormat("0.00");

+ 13 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInvoiceServiceImpl.java

@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.zkqy.business.domain.*;
+import com.zkqy.business.domain.vo.ProductCodeListVO;
 import com.zkqy.business.domain.vo.ProductInvoiceVO;
 import com.zkqy.business.mapper.*;
 import com.zkqy.common.utils.DateUtils;
@@ -350,6 +351,18 @@ public class ProductInvoiceServiceImpl implements IProductInvoiceService
         return productInvoiceMapper.selectProductInvoiceBySaleOrderNo(saleOrderNo);
     }
 
+    @Override
+    public ProductInvoiceVO printDocuments(Long id) {
+        ProductInvoiceVO vo = new ProductInvoiceVO();
+        // 查询发货通知单详情
+        ProductInvoice productInvoice = productInvoiceMapper.selectProductInvoiceById(id);
+        BeanUtils.copyProperties(productInvoice,vo);
+        //查询发货货品详情
+        List<ProductCodeListVO> productCodeListVOS = productOutboundRecordMapper.selectOutboundProduct(productInvoice.getNoticeNumber());
+        vo.setProductCodeListVOList(productCodeListVOS);
+        return vo;
+    }
+
     //保留两位小数
     public Double handlingWeight(Double weight){
         DecimalFormat df = new DecimalFormat("0.00");

+ 2 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleOrderServiceImpl.java

@@ -111,6 +111,7 @@ public class SaleOrderServiceImpl implements ISaleOrderService
         ids.forEach(id -> {
             //查询销售单编号
             SaleOrder saleOrder = saleOrderMapper.selectSaleOrderById(id);
+            saleOrderNos.add(saleOrder.getSaleNo());
             //删除货品明细
             List<Long> saleProductsIds = saleProductsMapper.selectSaleProductsIds(saleOrder.getSaleNo());
             if(saleProductsIds.size() > 0){
@@ -242,6 +243,7 @@ public class SaleOrderServiceImpl implements ISaleOrderService
                 saleOrder.setUpdateBy(SecurityUtils.getUsername());
                 updateSaleProductsList.add(saleProducts);
             }else {
+                saleProducts.setSaleOrderNo(saleOrder.getSaleNo());
                 saleProducts.setCreateById(SecurityUtils.getUserId());
                 saleProducts.setCreateBy(SecurityUtils.getUsername());
                 saleProducts.setCreateTime(DateUtils.getNowDate());

+ 24 - 1
zkqy-custom-business/src/main/resources/mapper/business/ProductInventoryMapper.xml

@@ -218,7 +218,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectComprehensiveInventoryList" resultType="com.zkqy.business.domain.vo.ProductCodeListVO">
-
+        SELECT
+            pi.product_id as productId,
+            p.product_name as productName,
+            p.product_specifications as productSpecifications,
+            p.product_type productType,
+            pi.product_colour productColor,
+            TRUNCATE ( SUM( pi.total_suttle ), 2 ) AS totalSuttle,
+            SUM( pi.total_box_num ) as totalBoxNum,
+            SUM( pi.total_canister_num ) as totalCanisterNum,
+            pi.levels,
+            GROUP_CONCAT( DISTINCT pi.lot_num SEPARATOR '、' ) AS lotNum
+        FROM
+            {DBNAME}.product_inventory pi
+                LEFT JOIN {DBNAME}.production p ON pi.product_id = p.id
+        WHERE
+            pi.del_flag = '0'
+            <if test="productColor != null and productColor != ''">and pi.product_colour like concat('%', #{productColor}, '%')</if>
+            <if test="productId != null">and pi.product_id = #{productId}</if>
+            <if test="levels != null and levels != ''">and pi.levels = #{levels}</if>
+        GROUP BY
+            pi.product_id,
+            pi.product_colour,
+            pi.levels
+        <if test="lotNum != null and lotNum != ''">HAVING GROUP_CONCAT( DISTINCT pi.lot_num SEPARATOR '、' ) like concat('%', #{lotNum}, '%')</if>
     </select>
 
 

+ 22 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordMapper.xml

@@ -86,6 +86,7 @@
         <result property="warehouseId" column="warehouse_id"/>
         <result property="productColour" column="product_colour"/>
         <result property="customName" column="custom_name"/>
+        <result property="productUnitPrice" column="product_unit_price"/>
     </resultMap>
 
     <sql id="selectProductOutboundRecordVo">
@@ -366,4 +367,25 @@
         where r.del_flag = '0' and r.notice_number = #{noticeNumber}
     </select>
 
+    <select id="selectOutboundProduct" parameterType="com.zkqy.business.domain.vo.ProductCodeListVO" resultMap="ProductCodeListResultVO">
+        SELECT
+            r.*,
+            p.product_name,
+            p.product_specifications,
+            r.product_colour AS product_color,
+            c.custom_name,
+            TRUNCATE ( SUM( r.suttle ), 2 ) AS totalSuttle,
+            count(r.id) AS totalBoxNum,
+            sp.product_unit_price as productUnitPrice
+        FROM
+            {DBNAME}.product_outbound_record r
+                LEFT JOIN {DBNAME}.production p ON r.product_id = p.id
+            LEFT JOIN {DBNAME}.product_invoice pi ON r.notice_number = pi.notice_number
+            AND pi.del_flag = '0'
+            LEFT JOIN {DBNAME}.customer c ON pi.customer_id = c.id
+            left join {DBNAME}.sale_products sp on p.product_no = sp.product_no and pi.sale_order_no = sp.sale_order_no and sp.del_flag = '0'
+        where r.del_flag = '0' and r.notice_number = #{noticeNumber}
+        group by r.product_id,r.product_colour,r.levels,r.lot_num
+    </select>
+
 </mapper>

+ 5 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductionMapper.xml

@@ -143,4 +143,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
              order by product_name asc
     </select>
 
+
+<!--    <select id="aaaa" resultType="long">-->
+<!--        select id from {DBNAME}.production where CONCAT(product_type,product_name,product_specifications) = #{productName}-->
+<!--    </select>-->
+
 </mapper>

+ 2 - 2
zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml

@@ -284,7 +284,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="lotNumber != null">lot_number = #{lotNumber},</if>
             <if test="onBoardState != null">on_board_state = #{onBoardState},</if>
         </trim>
-        where sale_order_no = #{saleOrderNo}
+        where sale_order_no = #{saleOrderNo} and id=#{id}
     </update>
 
     <delete id="deleteSaleProductsById" parameterType="Long">
@@ -446,7 +446,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
         <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</if>
         <if test="status != null  and status != ''"> and sp.status = #{status}</if>
-        <if test="productionLineNo != null  and productionLineNo != ''"> AND sp.production_line_no=#{productionLineNo}</if>
+<!--        <if test="productionLineNo != null  and productionLineNo != ''"> AND sp.production_line_no=#{productionLineNo}</if>-->
         <if test="sliceType != null  and sliceType != ''"> and slice_type = #{sliceType}</if>
         <if test="colourNumber != null  and colourNumber != ''"> and colour_number = #{colourNumber}</if>
         <if test="lotNumber != null  and lotNumber != ''"> and lot_number = #{lotNumber}</if>

+ 1 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/CommonServiceImpl.java

@@ -456,6 +456,7 @@ public class CommonServiceImpl implements ICommonService {
             String columnValue1 = commonEntity.getConditionMap().get("columnValue1").toString();
             sqlString = sqlString + " and sale_order." + columnName1 + " " + columnValue1;
         }
+        sqlString += " and sale_order.sale_order_technology_no != 'retailOrder' ";
         List<CommonEntity> commonEntities = commonMapper.queryTableList(sqlString);
         //根据sqlKey查询表格数据
         commonEntities.forEach(item -> {

+ 105 - 59
zkqy-ui/src/views/orderMange/planTable/fangsi.vue

@@ -402,48 +402,48 @@ export default {
     },
     // 点击编辑行
     handleRowClick(row) {
-      this.isEditLine = true;
-      //找到当前行的编辑索引
-      var rowIndex = this.tableData2.indexOf(row);
-      console.log(rowIndex)
-      if (this.lastEditLine != 0 &&
-        this.editingRowIndex !== rowIndex &&
-        this.editingRowIndex !== -1 &&
-        !this.isRowFilled(this.tableData2[this.lastEditLine])) {
-        this.$message({
-          message: '请先完成上一条数据的填写',
-          type: 'warning'
-        });
-        return;
-      }
-      //编辑索引不等于当前编辑行索引
-      if (this.editingRowIndex !== rowIndex) {
-        // alert(this.editingRowIndex);
-        if (this.editingRowIndex !== -1) {
-          //把当前行变成不可编辑的
-          this.tableData2[this.editingRowIndex].isEditing = false;
-        }
-        //把当前行变成可编辑的
-        row.isEditing = true;
-        this.editingRowIndex = rowIndex;
-      }else {
-        //把当前行变成可编辑的
-        row.isEditing = true;
-        this.editingRowIndex = rowIndex;
-      }
+      // this.isEditLine = true;
+      // //找到当前行的编辑索引
+      // var rowIndex = this.tableData2.indexOf(row);
+      // console.log(rowIndex)
+      // if (this.lastEditLine != 0 &&
+      //   this.editingRowIndex !== rowIndex &&
+      //   this.editingRowIndex !== -1 &&
+      //   !this.isRowFilled(this.tableData2[this.lastEditLine])) {
+      //   this.$message({
+      //     message: '请先完成上一条数据的填写',
+      //     type: 'warning'
+      //   });
+      //   return;
+      // }
+      // //编辑索引不等于当前编辑行索引
+      // if (this.editingRowIndex !== rowIndex) {
+      //   // alert(this.editingRowIndex);
+      //   if (this.editingRowIndex !== -1) {
+      //     //把当前行变成不可编辑的
+      //     this.tableData2[this.editingRowIndex].isEditing = false;
+      //   }
+      //   //把当前行变成可编辑的
+      //   row.isEditing = true;
+      //   this.editingRowIndex = rowIndex;
+      // }else {
+      //   //把当前行变成可编辑的
+      //   row.isEditing = true;
+      //   this.editingRowIndex = rowIndex;
+      // }
 
     },
     // 光标失去焦点变成不可编辑
     handleInputBlur(row) {
-      let rowIndex = this.tableData2.indexOf(row);
-      //编辑索引不等于当前编辑行索引
-      if(row.isEditing="true"){
-        row.isEditing = false;
-        //对于整个表格来说
-        this.isEditLine = false;
-        //当前编辑行置为-1
-        this.editingRowIndex = -1;
-      }
+      // let rowIndex = this.tableData2.indexOf(row);
+      // //编辑索引不等于当前编辑行索引
+      // if(row.isEditing="true"){
+      //   row.isEditing = false;
+      //   //对于整个表格来说
+      //   this.isEditLine = false;
+      //   //当前编辑行置为-1
+      //   this.editingRowIndex = -1;
+      // }
       // if (this.editingRowIndex !== rowIndex) {
       //   if (this.isRowFilled(row)) {
       //     row.isEditing = false;
@@ -476,10 +476,10 @@ export default {
           });
           return;
         }
-        //新增行之前先让以前的行不能编辑
-        this.tableData2.forEach(item => {
-          item.isEditing = false;
-        })
+        // //新增行之前先让以前的行不能编辑
+        // this.tableData2.forEach(item => {
+        //   item.isEditing = false;
+        // })
       }
       this.tableData2.push({
         currentColorCode: '',
@@ -514,21 +514,28 @@ export default {
         return ;
       }
       const datatime=Date.now()+this.machineId;
+      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>=2){
+        this.$message({
+          message: '不能同时添加俩上机计划',
+          type: 'warning'
+        });
+        return;
+      }
       //先查询计划表中有没有正在上机的
       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: '只能有一个产品的状态为上机',
+              message: '当前产线已有上机产品',
               type: 'warning'
             });
             return;
@@ -607,20 +614,60 @@ export default {
     // 更新状态
     updateStatus(ind, row){
       row.planType="纺丝计划"
-      console.log(row,"当前行数据---------------------------")
       if(!this.isRowFilled(row)){
         this.$message({message: '请完善当前行数据', type: 'warning'});
         return;
       }
-      // if(row.planType="")
+      if(row.planStatus=="2"){
+        //如果说我要去停机一个产品我只需要去鉴别你这个产线上有没有停机或者上其他上机的产品
+        getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":row.planStatus}).then(response => {
+          if(response.data.length>0) {
+            this.$message({message: '已有停机产品不能在停机', type: 'warning'});
+            return;//证明有在上级的产品--zhi能有一个上级产品
+          }else {
+            getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"1"}).then(response => {
+              if(response.data.length>0){
+                this.$message({message: '已有一个其他产品正在上机,不能在停机,如需要停机,请停机在机产品', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }else {
+                updateSpinningInfoPlanOne(row).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
+                  }
+                })
+              }
+            })
+          }
+        });
+        return;
+      }
+
       //判断当前计划是否已经投产
       getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
         if(resp.data.length>0){
           this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+
           return;//证明有在上级的产品--zhi能有一个上级产品
         }
         //不等于0待机才去校验是否重复
-        if(row.planStatus!=0){
+        if(row.planStatus!=0){//上机/停机校验是否重复
+          if(resp.data.length>0){
+            this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+            return;//证明有在上级的产品--zhi能有一个上级产品
+          }
           //先查询计划表中有没有正在上机的或者停机的
           getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":row.planStatus}).then(response => {
             if(response.data.length>0){
@@ -628,7 +675,7 @@ export default {
                 this.$message({message: '只能有一个产品的状态为上机', type: 'warning'});
                 return;//证明有在上级的产品--zhi能有一个上级产品
               }else {
-                this.$message({message: '已停机不能在停机', type: 'warning'});
+                this.$message({message: '已停机产品不能在停机', type: 'warning'});
                 return;//证明有在上级的产品--zhi能有一个上级产品
               }
             }else {
@@ -638,7 +685,6 @@ export default {
                     this.$message({message: '已停机,请先处理停机产品,然后上机', type: 'warning'});
                     return;//证明有在上级的产品--zhi能有一个上级产品
                   }else {
-                      row.playType="纺丝计划"
                       updateSpinningInfoPlanOne(row).then(response=>{
                         if (response.code == 200) {
                           this.$message({
@@ -710,8 +756,8 @@ export default {
             }
           })
         }
-
       })
+
     }
   }
 }

+ 91 - 48
zkqy-ui/src/views/orderMange/planTable/fankuang.vue

@@ -402,48 +402,48 @@ export default {
     },
     // 点击编辑行
     handleRowClick(row) {
-      this.isEditLine = true;
-      //找到当前行的编辑索引
-      var rowIndex = this.tableData2.indexOf(row);
-      console.log(rowIndex)
-      if (this.lastEditLine != 0 &&
-        this.editingRowIndex !== rowIndex &&
-        this.editingRowIndex !== -1 &&
-        !this.isRowFilled(this.tableData2[this.lastEditLine])) {
-        this.$message({
-          message: '请先完成上一条数据的填写',
-          type: 'warning'
-        });
-        return;
-      }
-      //编辑索引不等于当前编辑行索引
-      if (this.editingRowIndex !== rowIndex) {
-        // alert(this.editingRowIndex);
-        if (this.editingRowIndex !== -1) {
-          //把当前行变成不可编辑的
-          this.tableData2[this.editingRowIndex].isEditing = false;
-        }
-        //把当前行变成可编辑的
-        row.isEditing = true;
-        this.editingRowIndex = rowIndex;
-      }else {
-        //把当前行变成可编辑的
-        row.isEditing = true;
-        this.editingRowIndex = rowIndex;
-      }
+      // this.isEditLine = true;
+      // //找到当前行的编辑索引
+      // var rowIndex = this.tableData2.indexOf(row);
+      // console.log(rowIndex)
+      // if (this.lastEditLine != 0 &&
+      //   this.editingRowIndex !== rowIndex &&
+      //   this.editingRowIndex !== -1 &&
+      //   !this.isRowFilled(this.tableData2[this.lastEditLine])) {
+      //   this.$message({
+      //     message: '请先完成上一条数据的填写',
+      //     type: 'warning'
+      //   });
+      //   return;
+      // }
+      // //编辑索引不等于当前编辑行索引
+      // if (this.editingRowIndex !== rowIndex) {
+      //   // alert(this.editingRowIndex);
+      //   if (this.editingRowIndex !== -1) {
+      //     //把当前行变成不可编辑的
+      //     this.tableData2[this.editingRowIndex].isEditing = false;
+      //   }
+      //   //把当前行变成可编辑的
+      //   row.isEditing = true;
+      //   this.editingRowIndex = rowIndex;
+      // }else {
+      //   //把当前行变成可编辑的
+      //   row.isEditing = true;
+      //   this.editingRowIndex = rowIndex;
+      // }
 
     },
     // 光标失去焦点变成不可编辑
     handleInputBlur(row) {
-      let rowIndex = this.tableData2.indexOf(row);
-      //编辑索引不等于当前编辑行索引
-      if(row.isEditing="true"){
-        row.isEditing = false;
-        //对于整个表格来说
-        this.isEditLine = false;
-        //当前编辑行置为-1
-        this.editingRowIndex = -1;
-      }
+      // let rowIndex = this.tableData2.indexOf(row);
+      // //编辑索引不等于当前编辑行索引
+      // if(row.isEditing="true"){
+      //   row.isEditing = false;
+      //   //对于整个表格来说
+      //   this.isEditLine = false;
+      //   //当前编辑行置为-1
+      //   this.editingRowIndex = -1;
+      // }
       //编辑索引不等于当前编辑行索引
       // if (this.editingRowIndex !== rowIndex) {
       //   if (this.isRowFilled(row)) {
@@ -515,18 +515,25 @@ export default {
         return ;
       }
       const datatime=Date.now()+this.machineId;
+      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>=2){
+        this.$message({
+          message: '不能同时添加俩上机计划',
+          type: 'warning'
+        });
+        return;
+      }
       //先查询计划表中有没有正在上机的
       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: '只能有一个产品的状态为上机',
@@ -612,6 +619,42 @@ export default {
         this.$message({message: '请完善当前行数据', type: 'warning'});
         return;
       }
+      if(row.planStatus=="2"){
+        //如果说我要去停机一个产品我只需要去鉴别你这个产线上有没有停机或者上其他上机的产品
+        getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":row.planStatus}).then(response => {
+          if(response.data.length>0) {
+            this.$message({message: '已有停机产品不能在停机', type: 'warning'});
+            return;//证明有在上级的产品--只能有一个上级或者停机的产品
+          }else {
+            getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"1"}).then(response => {
+              if(response.data.length>0){
+                this.$message({message: '已有一个其他产品正在上机,不能在停机,如需要停机,请停机在机产品', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }else {
+                updateSpinningInfoPlanOne(row).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
+                  }
+                })
+              }
+            })
+          }
+        });
+        return;
+      }
       //判断当前计划是否已经投产
       getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
         if(resp.data.length>0){

+ 41 - 38
zkqy-ui/src/views/orderMange/planTable/index.vue

@@ -563,7 +563,10 @@ import {
   updatePlanOne,
   whetherTheFeederIsShutDown,
   updateLineStates,
-  getIsTheOrderProductProduced, getJtIsTheOrderProductProduced
+  getIsTheOrderProductProduced,
+  getJtIsTheOrderProductProduced,
+  getCurrentProductionLineSuperior,
+  updateSpinningInfoPlanOne
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -1022,47 +1025,47 @@ export default {
     },
     // 点击编辑行
     handleRowClick(row) {
-      this.isEditLine = true;
-      // alert(this.lastEditLine+"编辑行")
-      //找到当前行的编辑索引
-      var rowIndex = this.tableData2.indexOf(row);
-
-      if (this.lastEditLine != 0 &&
-        this.editingRowIndex !== rowIndex &&
-        this.editingRowIndex !== -1 &&
-        !this.isRowFilled(this.tableData2[this.lastEditLine])) {
-        this.$message({
-          message: '请先完成上一条数据的填写',
-          type: 'warning'
-        });
-        return;
-      }
-      //编辑索引不等于当前编辑行索引
-      if (this.editingRowIndex !== rowIndex) {
-        // alert(this.editingRowIndex);
-        if (this.editingRowIndex !== -1) {
-          //把当前行变成不可编辑的
-          this.tableData2[this.editingRowIndex].isEditing = false;
-        }
-        //把当前行变成可编辑的
-        row.isEditing = true;
-        this.editingRowIndex = rowIndex;
-      }
+      // this.isEditLine = true;
+      // // alert(this.lastEditLine+"编辑行")
+      // //找到当前行的编辑索引
+      // var rowIndex = this.tableData2.indexOf(row);
+      //
+      // if (this.lastEditLine != 0 &&
+      //   this.editingRowIndex !== rowIndex &&
+      //   this.editingRowIndex !== -1 &&
+      //   !this.isRowFilled(this.tableData2[this.lastEditLine])) {
+      //   this.$message({
+      //     message: '请先完成上一条数据的填写',
+      //     type: 'warning'
+      //   });
+      //   return;
+      // }
+      // //编辑索引不等于当前编辑行索引
+      // if (this.editingRowIndex !== rowIndex) {
+      //   // alert(this.editingRowIndex);
+      //   if (this.editingRowIndex !== -1) {
+      //     //把当前行变成不可编辑的
+      //     this.tableData2[this.editingRowIndex].isEditing = false;
+      //   }
+      //   //把当前行变成可编辑的
+      //   row.isEditing = true;
+      //   this.editingRowIndex = rowIndex;
+      // }
 
     },
     // 光标失去焦点变成不可编辑
     handleInputBlur(row) {
-      let rowIndex = this.tableData2.indexOf(row);
-      //编辑索引不等于当前编辑行索引
-      if (this.editingRowIndex !== rowIndex) {
-        if (this.isRowFilled(row)) {
-          row.isEditing = false;
-          //对于整个表格来说
-          this.isEditLine = false;
-          //当前编辑行置为-1
-          this.editingRowIndex = -1;
-        }
-      }
+      // let rowIndex = this.tableData2.indexOf(row);
+      // //编辑索引不等于当前编辑行索引
+      // if (this.editingRowIndex !== rowIndex) {
+      //   if (this.isRowFilled(row)) {
+      //     row.isEditing = false;
+      //     //对于整个表格来说
+      //     this.isEditLine = false;
+      //     //当前编辑行置为-1
+      //     this.editingRowIndex = -1;
+      //   }
+      // }
     },
     // 检查行是否填写完毕的示例方法
     isRowFilled(row) {

+ 91 - 48
zkqy-ui/src/views/orderMange/planTable/luotong.vue

@@ -402,48 +402,48 @@ export default {
     },
     // 点击编辑行
     handleRowClick(row) {
-      this.isEditLine = true;
-      //找到当前行的编辑索引
-      var rowIndex = this.tableData2.indexOf(row);
-      console.log(rowIndex)
-      if (this.lastEditLine != 0 &&
-        this.editingRowIndex !== rowIndex &&
-        this.editingRowIndex !== -1 &&
-        !this.isRowFilled(this.tableData2[this.lastEditLine])) {
-        this.$message({
-          message: '请先完成上一条数据的填写',
-          type: 'warning'
-        });
-        return;
-      }
-      //编辑索引不等于当前编辑行索引
-      if (this.editingRowIndex !== rowIndex) {
-        // alert(this.editingRowIndex);
-        if (this.editingRowIndex !== -1) {
-          //把当前行变成不可编辑的
-          this.tableData2[this.editingRowIndex].isEditing = false;
-        }
-        //把当前行变成可编辑的
-        row.isEditing = true;
-        this.editingRowIndex = rowIndex;
-      }else {
-        //把当前行变成可编辑的
-        row.isEditing = true;
-        this.editingRowIndex = rowIndex;
-      }
+      // this.isEditLine = true;
+      // //找到当前行的编辑索引
+      // var rowIndex = this.tableData2.indexOf(row);
+      // console.log(rowIndex)
+      // if (this.lastEditLine != 0 &&
+      //   this.editingRowIndex !== rowIndex &&
+      //   this.editingRowIndex !== -1 &&
+      //   !this.isRowFilled(this.tableData2[this.lastEditLine])) {
+      //   this.$message({
+      //     message: '请先完成上一条数据的填写',
+      //     type: 'warning'
+      //   });
+      //   return;
+      // }
+      // //编辑索引不等于当前编辑行索引
+      // if (this.editingRowIndex !== rowIndex) {
+      //   // alert(this.editingRowIndex);
+      //   if (this.editingRowIndex !== -1) {
+      //     //把当前行变成不可编辑的
+      //     this.tableData2[this.editingRowIndex].isEditing = false;
+      //   }
+      //   //把当前行变成可编辑的
+      //   row.isEditing = true;
+      //   this.editingRowIndex = rowIndex;
+      // }else {
+      //   //把当前行变成可编辑的
+      //   row.isEditing = true;
+      //   this.editingRowIndex = rowIndex;
+      // }
 
     },
     // 光标失去焦点变成不可编辑
     handleInputBlur(row) {
-      let rowIndex = this.tableData2.indexOf(row);
-      //编辑索引不等于当前编辑行索引
-      if(row.isEditing="true"){
-        row.isEditing = false;
-        //对于整个表格来说
-        this.isEditLine = false;
-        //当前编辑行置为-1
-        this.editingRowIndex = -1;
-      }
+      // let rowIndex = this.tableData2.indexOf(row);
+      // //编辑索引不等于当前编辑行索引
+      // if(row.isEditing="true"){
+      //   row.isEditing = false;
+      //   //对于整个表格来说
+      //   this.isEditLine = false;
+      //   //当前编辑行置为-1
+      //   this.editingRowIndex = -1;
+      // }
       //编辑索引不等于当前编辑行索引
       // if (this.editingRowIndex !== rowIndex) {
       //   if (this.isRowFilled(row)) {
@@ -515,18 +515,25 @@ export default {
         return ;
       }
       const datatime=Date.now()+this.machineId;
+      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>=2){
+        this.$message({
+          message: '不能同时添加俩上机计划',
+          type: 'warning'
+        });
+        return;
+      }
       //先查询计划表中有没有正在上机的
       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: '只能有一个产品的状态为上机',
@@ -612,6 +619,42 @@ export default {
         this.$message({message: '请完善当前行数据', type: 'warning'});
         return;
       }
+      if(row.planStatus=="2"){
+        //如果说我要去停机一个产品我只需要去鉴别你这个产线上有没有停机或者上其他上机的产品
+        getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":row.planStatus}).then(response => {
+          if(response.data.length>0) {
+            this.$message({message: '已有停机产品不能在停机', type: 'warning'});
+            return;//证明有在上级的产品--只能有一个上级或者停机的产品
+          }else {
+            getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"1"}).then(response => {
+              if(response.data.length>0){
+                this.$message({message: '已有一个其他产品正在上机,不能在停机,如需要停机,请停机在机产品', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }else {
+                updateSpinningInfoPlanOne(row).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
+                  }
+                })
+              }
+            })
+          }
+        });
+        return;
+      }
       //判断当前计划是否已经投产
       getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
         if(resp.data.length>0){