Parcourir la source

Merge remote-tracking branch 'origin/master'

lucky il y a 1 mois
Parent
commit
d1d63b5a57

+ 36 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlan.java

@@ -96,6 +96,42 @@ public class DetailsOfTheRefuelingPlan extends BaseEntity
     @Excel(name = "色号编码")
     private String  colourNumber;
 
+    public double getTubeweight() {
+        return tubeweight;
+    }
+
+    public void setTubeweight(double tubeweight) {
+        this.tubeweight = tubeweight;
+    }
+
+    /** 打印信息 */
+    @Excel(name = "筒重")
+    private double  tubeweight;
+
+    public double getBoxweight() {
+        return boxweight;
+    }
+
+    public void setBoxweight(double boxweight) {
+        this.boxweight = boxweight;
+    }
+
+    /** 打印信息 */
+    @Excel(name = "箱重")
+    private double  boxweight;
+
+    public String getTubecolor() {
+        return tubecolor;
+    }
+
+    public void setTubecolor(String tubecolor) {
+        this.tubecolor = tubecolor;
+    }
+
+    /** 打印信息 */
+    @Excel(name = "管色")
+    private String  tubecolor;
+
 
     public String getColourNumber() {
         return colourNumber;

+ 33 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanSpinning.java

@@ -93,6 +93,39 @@ public class DetailsOfTheRefuelingPlanSpinning extends BaseEntity
     @Excel(name = "色号编码")
     private String  colourNumber;
 
+    public String getTubeweight() {
+        return tubeweight;
+    }
+
+    public void setTubeweight(String tubeweight) {
+        this.tubeweight = tubeweight;
+    }
+
+    @Excel(name = "筒重")
+    private String  tubeweight;
+
+    public String getBoxweight() {
+        return boxweight;
+    }
+
+    public void setBoxweight(String boxweight) {
+        this.boxweight = boxweight;
+    }
+
+    @Excel(name = "箱重")
+    private String  boxweight;
+
+    public String getTubecolor() {
+        return tubecolor;
+    }
+
+    public void setTubecolor(String tubecolor) {
+        this.tubecolor = tubecolor;
+    }
+
+    @Excel(name = "管色")
+    private String  tubecolor;
+
     public String getColourNumber() {
         return colourNumber;
     }

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

@@ -305,6 +305,16 @@ public class ProductCodeListVO extends BaseEntity {
      */
     private int confirmOut;
 
+    public String getProductionlinedepartment() {
+        return productionlinedepartment;
+    }
+
+    public void setProductionlinedepartment(String productionlinedepartment) {
+        this.productionlinedepartment = productionlinedepartment;
+    }
+
+    private String productionlinedepartment;
+
     public int getConfirmOut() {
         return confirmOut;
     }

+ 6 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductCodeListMapper.java

@@ -87,10 +87,15 @@ public interface ProductCodeListMapper {
     public int deleteProductCodeListByIds(String[] ids);
 
     /**
-     * 查询生产完成的产品
+     * 查询生产完成的产品(加弹)
      */
     List<ProductCodeListVO> selectFinishedProduct(ProductCodeList productCodeList);
 
+    /**
+     * 查询生产完成的产品(翻框、落筒、纺丝)
+     */
+    List<ProductCodeListVO> selectFinishedProductfkltfs(ProductCodeList productCodeList);
+
     /**
      * 查询最大码单号
      */

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

@@ -99,7 +99,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
                 rs2.setCurrentSpecification("停机");
                 rs2.setStartTime("");
                 rs2.setPlannedEndTime("");
-                List<String> collect = detailsOfTheRefuelingPlanSpinnings.stream().filter(plan -> plan.getPlanStatus().equals("0")).map(plan -> plan.getCurrentSpecification()+"-"+plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.toList());
+                List<String> collect = detailsOfTheRefuelingPlanSpinnings.stream().filter(plan -> plan.getPlanStatus().equals("0")).map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.toList());
                 rs2.setPlannedProduction(collect);
                 list.add(rs2);
             }else {
@@ -116,7 +116,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
                         //把第一个元素给拷贝过去
                         BeanUtils.copyProperties(spinning1, rs1);
                         rs1.setMachineName(item.getProductionLineName());
-                        List<String> collect = detailsOfTheRefuelingPlanSpinnings.stream().filter(plan -> plan.getPlanStatus().equals("0")).map(plan -> plan.getCurrentSpecification()+"-"+plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.toList());
+                        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);
 
@@ -126,7 +126,7 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
                         rs1.setMachineId(item.getProductionLineNo());//产线号
                         rs1.setMacId(item.getId().toString());//产线iD
                         rs1.setMachineName(item.getProductionLineName());
-                        List<String> collect = detailsOfTheRefuelingPlanSpinnings.stream().filter(plan -> plan.getPlanStatus().equals("0")).map(plan -> plan.getCurrentSpecification()+"-"+plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.toList());
+                        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);
                     }

+ 17 - 5
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductCodeListServiceImpl.java

@@ -8,12 +8,12 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
 
-import com.zkqy.business.domain.ProductHandsetOutboundRecord;
-import com.zkqy.business.domain.ProductOutboundRecord;
-import com.zkqy.business.domain.ProductWarehousingRecord;
+import cn.hutool.core.util.ObjectUtil;
+import com.zkqy.business.domain.*;
 import com.zkqy.business.domain.vo.ProductCodeListVO;
 import com.zkqy.business.mapper.ProductCodeListInfoMapper;
 import com.zkqy.business.mapper.ProductWarehousingRecordMapper;
+import com.zkqy.business.mapper.ProductionLineMapper;
 import com.zkqy.business.service.*;
 import com.zkqy.common.core.domain.AjaxResult;
 import com.zkqy.common.core.domain.entity.SysDictData;
@@ -22,12 +22,13 @@ import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.SecurityUtils;
 import com.zkqy.common.utils.StringUtils;
 import com.zkqy.system.mapper.SysDictDataMapper;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.zkqy.business.mapper.ProductCodeListMapper;
-import com.zkqy.business.domain.ProductCodeList;
 import org.springframework.transaction.annotation.Transactional;
+import com.zkqy.business.mapper.ProductionLineMapper;
 
 /**
  * 产品码单Service业务层处理
@@ -39,7 +40,8 @@ import org.springframework.transaction.annotation.Transactional;
 public class ProductCodeListServiceImpl implements IProductCodeListService {
     @Autowired
     private ProductCodeListMapper productCodeListMapper;
-
+    @Autowired
+    private ProductionLineMapper productionLineMapper;
     @Autowired
     private ProductCodeListInfoMapper productCodeListInfoMapper;
 
@@ -301,7 +303,17 @@ public class ProductCodeListServiceImpl implements IProductCodeListService {
 
     @Override
     public List<ProductCodeListVO> selectFinishedProduct(ProductCodeList productCodeList) {
+        ProductionLine pr = new ProductionLine();
+        pr = productionLineMapper.selectProductionLineById(productCodeList.getMachineTool());
+        if(ObjectUtils.isNotEmpty(pr)){
+            if(pr.getProductionLineDepartment() == "加弹部" || pr.getProductionLineDepartment().equals("加弹部")){
+                return productCodeListMapper.selectFinishedProduct(productCodeList);
+            }else{
+                return productCodeListMapper.selectFinishedProductfkltfs(productCodeList);
+            }
+        }
         return productCodeListMapper.selectFinishedProduct(productCodeList);
+
     }
 
     private ReentrantLock reentrantLock = new ReentrantLock();

+ 28 - 7
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanMapper.xml

@@ -22,12 +22,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createById"    column="create_by_id"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime" column="create_time"/>
+        <result property="tubeweight" column="tube_weight"/>
+        <result property="boxweight" column="box_weight"/>
+        <result property="tubecolor" column="tube_color"/>
     </resultMap>
 
     <sql id="selectDetailsOfTheRefuelingPlanVo">
         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,
+               number,productType,product_id,salesman_id,productTypeName,tube_weight,box_weight,tube_color,
                create_by_id,create_by,create_time
         from huaxian.details_of_the_refueling_plan
     </sql>
@@ -108,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createById!=null and createById!=''">create_by_id,</if>
             <if test="createBy!=null and createBy!=''">create_by,</if>
             <if test="createTime!=null and createTime!=''">create_time,</if>
+            <if test="tubeweight!=null and tubeweight!=''">tube_weight,</if>
+            <if test="boxweight!=null and boxweight!=''">box_weight,</if>
+            <if test="tubecolor!=null and tubecolor!=''">tube_color,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -125,6 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createById!=null and createById!=''">#{createById},</if>
             <if test="createBy!=null and createBy!=''">#{createBy},</if>
             <if test="createTime!=null and createTime!=''">#{createTime},</if>
+            <if test="tubeweight!=null and tubeweight!=''">#{tubeweight},</if>
+            <if test="boxweight!=null and boxweight!=''">#{boxweight},</if>
+            <if test="tubecolor!=null and tubecolor!=''">#{tubecolor},</if>
          </trim>
     </insert>
 
@@ -146,9 +155,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         `product_id`,
         `salesman_id`,
         `productTypeName`,
-           create_by_id,
-           create_by,
-           create_time,
+        create_by_id,
+        create_by,
+        create_time,
+        tube_weight,
+        box_weight,
+        tube_color,
     </trim>
         VALUES
         <foreach collection="list" item="item" separator=",">
@@ -168,9 +180,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item.productId},
             #{item.salesmanId},
             #{item.productTypeName},
-                #{item.createById},
-                #{item.createBy},
-                #{item.createTime},
+            #{item.createById},
+            #{item.createBy},
+            #{item.createTime},
+                #{item.tubeweight},
+                #{item.boxweight},
+                #{item.tubecolor},
         </trim>
         </foreach>
     </insert>
@@ -192,6 +207,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productType != null  and productType != ''">`productType`= #{productType},</if>
             <if test="productId != null  and productId != ''">`product_id`= #{productId},</if>
             <if test="salesmanId != null  and salesmanId != ''">`salesman_id`= #{salesmanId},</if>
+            <if test="tubeweight !=null and tubeweight !=''">tube_weight= #{tubeweight},</if>
+            <if test="boxweight !=null and boxweight !=''">box_weight= #{boxweight},</if>
+            <if test="tubecolor !=null and tubecolor !=''">tube_color= #{tubecolor},</if>
         </trim>
         where id = #{id}
     </update>
@@ -212,6 +230,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productType != null  and productType != ''">`productType`= #{productType},</if>
             <if test="productId != null  and productId != ''">`product_id`= #{productId},</if>
             <if test="salesmanId != null  and salesmanId != ''">`salesman_id`= #{salesmanId},</if>
+            <if test="tubeweight !=null and tubeweight !=''">tube_weight= #{tubeweight},</if>
+            <if test="boxweight !=null and boxweight !=''">box_weight= #{boxweight},</if>
+            <if test="tubecolor !=null and tubecolor !=''">tube_color= #{tubecolor},</if>
         </trim>
         where machine_id = #{machineId} and productType=#{productType}
         <if test="planStatusOld != null  and planStatusOld != ''">

+ 21 - 3
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningMapper.xml

@@ -30,11 +30,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createById"    column="create_by_id"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime" column="create_time"/>
+        <result property="tubeweight" column="tube_weight"/>
+        <result property="boxweight" column="box_weight"/>
+        <result property="tubecolor" column="tube_color"/>
     </resultMap>
 
     <sql id="selectDetailsOfTheRefuelingPlanSpinningVo">
         select id, timestamp_random_code, mac_id,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,
+               plan_status, number, remark, create_by_id, create_by, update_by, update_by, create_time, update_time,tube_weight,box_weight,tube_color,
                product_id, salesman_id,productTypeName,create_by_id,create_by,create_time
         from huaxian.details_of_the_refueling_plan_spinning
     </sql>
@@ -137,6 +140,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createById!=null and createById!=''">create_by_id,</if>
             <if test="createBy!=null and createBy!=''">create_by,</if>
             <if test="createTime!=null and createTime!=''">create_time,</if>
+            <if test="tubeweight!=null and tubeweight!=''">tube_weight,</if>
+            <if test="boxweight!=null and boxweight!=''">box_weight,</if>
+            <if test="tubecolor!=null and tubecolor!=''">tube_color,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="timestampRandomCode != null">#{timestampRandomCode},</if>
@@ -161,6 +167,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createById!=null and createById!=''">#{createById},</if>
             <if test="createBy!=null and createBy!=''">#{createBy},</if>
             <if test="createTime!=null and createTime!=''">#{createTime},</if>
+            <if test="tubeweight!=null and tubeweight!=''">#{tubeweight},</if>
+            <if test="boxweight!=null and boxweight!=''">#{boxweight},</if>
+            <if test="tubecolor!=null and tubecolor!=''">#{tubecolor},</if>
          </trim>
     </insert>
 
@@ -186,6 +195,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="productId != null">product_id = #{productId},</if>
             <if test="salesmanId != null">salesman_id = #{salesmanId},</if>
+            <if test="tubeweight !=null and tubeweight !=''">tube_weight= #{tubeweight},</if>
+            <if test="boxweight !=null and boxweight !=''">box_weight= #{boxweight},</if>
+            <if test="tubecolor !=null and tubecolor !=''">tube_color= #{tubecolor},</if>
         </trim>
         where id = #{id}
     </update>
@@ -228,7 +240,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             `plan_type`,
              create_by,
              create_by_id,
-             create_time
+             create_time,
+            tube_weight,
+            box_weight,
+            tube_color,
         </trim>
         VALUES
         <foreach collection="list" item="item" separator=",">
@@ -250,7 +265,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item.planType},
                 #{item.createBy},
                 #{item.createById},
-                #{item.createTime}
+                #{item.createTime},
+                #{item.tubeweight},
+                #{item.boxweight},
+                #{item.tubecolor},
             </trim>
         </foreach>
     </insert>

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

@@ -443,6 +443,7 @@
         </foreach>
     </update>
 
+    <!-- 加弹点击称重打印列表 -->
     <select id="selectFinishedProduct" resultType="com.zkqy.business.domain.vo.ProductCodeListVO">
         SELECT
         sp.id as id,
@@ -452,21 +453,60 @@
         concat(ml.materie_encoding,ml.materie_color_number) AS productColor,
         p.id AS productId,
         sc.direction_of_twist AS directionOfTwist,
-        p.product_no AS productNo
+        p.product_no AS productNo,
+        dp.box_weight AS boxWeight,
+        dp.tube_color AS tubeColor,
+        dp.tube_weight AS canisterWeight,
+        pl.production_line_department AS productionlinedepartment
         FROM
         {DBNAME}.sale_products sp
         LEFT JOIN {DBNAME}.production p ON sp.product_no = p.product_no
         LEFT JOIN {DBNAME}.sale_craft sc ON sp.sale_order_no = sc.sale_order_no
         left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
+        LEFT JOIN {DBNAME}.details_of_the_refueling_plan dp ON sp.sale_order_no = dp.salesman_id
+        LEFT JOIN {DBNAME}.production_line pl ON dp.machine_id = pl.production_line_no AND pl.del_flag = '0'
         WHERE
         sp.del_flag = '0'
         AND p.del_flag = '0'
         AND sc.del_flag = '0'
         and ml.del_flag = '0'
         and sp.status in ('4','6')
-        <if test="machineTool != null">and sp.production_line_no = #{machineTool}</if>
+        <if test="machineTool != null">AND dp.mac_id = #{machineTool} AND FIND_IN_SET(#{machineTool}, sp.products_line_no_arry_id) > 0</if>
     </select>
 
+
+    <!-- 翻框落筒点击称重打印列表 -->
+    <select id="selectFinishedProductfkltfs" resultType="com.zkqy.business.domain.vo.ProductCodeListVO">
+        SELECT
+        sp.id as id,
+        sp.lot_number AS lotNum,
+        p.product_name AS productName,
+        p.product_specifications AS productSpecifications,
+        concat(ml.materie_encoding,ml.materie_color_number) AS productColor,
+        p.id AS productId,
+        sc.direction_of_twist AS directionOfTwist,
+        p.product_no AS productNo,
+        dps.box_weight AS boxWeight,
+        dps.tube_color AS tubeColor,
+        dps.tube_weight AS canisterWeight,
+        pl.production_line_department AS productionlinedepartment
+        FROM
+        {DBNAME}.sale_products sp
+        LEFT JOIN {DBNAME}.production p ON sp.product_no = p.product_no
+        LEFT JOIN {DBNAME}.sale_craft sc ON sp.sale_order_no = sc.sale_order_no
+        left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
+        LEFT JOIN {DBNAME}.details_of_the_refueling_plan_spinning dps ON sp.sale_order_no = dps.salesman_id
+        LEFT JOIN {DBNAME}.production_line pl ON dps.machine_id = pl.production_line_no AND pl.del_flag = '0'
+        WHERE
+        sp.del_flag = '0'
+        AND p.del_flag = '0'
+        AND sc.del_flag = '0'
+        and ml.del_flag = '0'
+        and sp.status in ('4','6')
+        <if test="machineTool != null">AND dps.mac_id = #{machineTool} AND FIND_IN_SET(#{machineTool}, sp.products_line_no_arry_id) > 0</if>
+    </select>
+
+
     <select id="selectMaxCodeList" resultType="string">
         select IFNULL(max(qr_code), 0)
         from {DBNAME}.product_code_list

+ 8 - 0
zkqy-ui/src/api/plan/paln.js

@@ -75,6 +75,14 @@ export function getAllPlanListByMachineId(machineId) {
     ////baseURL: process.env.VUE_APP_BASE_API1
   })
 }
+// 获取下拉数据
+export function getOptionLsit() {
+  return request({
+    url: '/system/productCode/dropDownData',
+    method: 'get',
+    //baseURL: process.env.VUE_APP_BASE_API1
+  })
+}
 
 export function getAllPlanListByProductTypeAndStatus(data) {
   return request({

+ 7 - 0
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -1583,6 +1583,13 @@ export default {
     },
     // 表格点击回调
     async handleCurrentChange(val) {
+      //判断是否为纺丝部如果是则不做处理
+      if( val?.productionlinedepartment && val.productionlinedepartment !== undefined && val.productionlinedepartment !== "纺丝部" && val.productionlinedepartment !== ""){
+        this.form.tubeColor = val.tubeColor;//管色
+        this.form.boxWeight = val.boxWeight;//箱重
+        this.form.canisterWeight = val.canisterWeight;//筒重
+      }
+
       if (!val) return;
       if (this.isStartReadNum || this.excuteType != 1) {
         this.$refs.proTableRef.setCurrentRow(this.currentRow);

+ 226 - 13
zkqy-ui/src/views/orderMange/planTable/fankuang.vue

@@ -45,7 +45,7 @@
       </el-table-column>
     </el-table>
     <!--新增计划弹窗-->
-    <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
+    <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1500px">
       <el-table :data="tableData2" @row-click.self="handleRowClick">
         <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
           <template v-slot:default="scope">
@@ -91,6 +91,80 @@
             <span v-else>{{ scope.row.currentLotNumber }}</span>
           </template>
         </el-table-column>
+        <!-- 新增筒重、箱重、管色字段 -->
+        <el-table-column
+          prop="tubeweight"
+          label="筒重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubeweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.drum_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="boxweight"
+          label="箱重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.boxweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.box_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="tubecolor"
+          label="管色"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubecolor"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.tube_color"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <!-- 新增筒重、箱重、管色字段 -->
 
         <el-table-column prop="number" label="数量" header-align="center" align="center">
           <template v-slot:default="scope">
@@ -135,7 +209,7 @@
            </span>
     </el-dialog>
     <!--修改计划弹窗-->
-    <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1200px">
+    <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1500px">
       <!--查询条件-->
       <el-form ref="form"  :model="formData" label-width="80px" :inline="true">
         <el-form-item label="计划状态:">
@@ -183,6 +257,80 @@
             <span v-else>{{ scope.row.currentLotNumber }}</span>
           </template>
         </el-table-column>
+        <!-- 新增筒重、箱重、管色字段 -->
+        <el-table-column
+          prop="tubeweight"
+          label="筒重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubeweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.drum_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="boxweight"
+          label="箱重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.boxweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.box_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="tubecolor"
+          label="管色"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubecolor"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.tube_color"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </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>
@@ -249,7 +397,10 @@ import {
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne,getCurrentProductionLineSuperior, getIsTheOrderProductProduced
+  updateSpinningInfoPlanOne,
+  getCurrentProductionLineSuperior,
+  getIsTheOrderProductProduced,
+  getOptionLsit
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -262,6 +413,24 @@ export default {
       form: {
         product:"",
       },
+      formzdsj:{machineToolNo: "", //机台编号
+        // 表单参数
+        packaging: "", //包装
+        machineTool: "", //机台
+        workShifts: "", //班次
+        productionDate: "", //生产日期
+        levels: "", //等级
+        foreignTradeNumber: "", //外贸号
+        canisterWeight: "", //筒重
+        boxWeight: "", //箱重-车重
+        canisterNum: "", //筒数
+        tubeColor: "", //管色
+        comPort: "", //端口
+        printFormat: "", //格式
+        grossWeight: 0, //毛重
+        remark: "", //备注
+      },
+      dropDownData: {},
       previousMachineId: undefined,
       currentRowspan: 1,
       prevRow: {},
@@ -305,6 +474,7 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getSpinningPlanList();
+    this.getSelectOptions();
   },
   methods: {
     selectedML(row){
@@ -323,10 +493,10 @@ export default {
     deletePlan($index,row){
       console.log(row)
       getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
-        if(resp.data.length>0){
-          this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
-          return;//证明有在上级的产品--zhi能有一个上级产品
-        }else {
+        //if(resp.data.length>0){
+        //   this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
+        //   return;//证明有在上级的产品--zhi能有一个上级产品
+       // }else {
           //没有开始生产可以删除
           spinningFrameWinding(row.id).then(res=>{
             if(res.code==200){
@@ -338,7 +508,7 @@ export default {
             this.onSubmit();
             this.getSpinningPlanList();
           })
-        }
+       // }
       });
 
     },
@@ -366,6 +536,46 @@ export default {
         });
       })
     },
+    // 获取下拉数据
+    async getSelectOptions() {
+      try {
+        let res = await getOptionLsit();
+        if (res.code == 200) {
+          this.dropDownData = res.data || {};
+          // 初始化默认值
+          if (
+            this.dropDownData.work_shifts?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.workShifts = this.dropDownData.work_shifts[0].codeName;
+          }
+          if (this.dropDownData.level?.length > 0 && this.excuteType == 1) {
+            this.formzdsj.levels = this.dropDownData.level[0].codeName;
+          }
+          if (
+            this.dropDownData.drum_weight?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.canisterWeight =
+              this.dropDownData.drum_weight[0].codeName;
+          }
+          if (
+            this.dropDownData.box_weight?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.boxWeight = this.dropDownData.box_weight[0].codeName;
+          }
+          if (
+            this.dropDownData.tube_color?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.tubeColor = this.dropDownData.tube_color[0].codeName;
+          }
+        } else {
+          this.$message.error("网络异常!");
+        }
+      } catch (error) {}
+    },
     // 下拉框数据改变查询色号批号信息
     selectedChangeDate(row,selectedProduct) {
       //选择的那个销售产品
@@ -506,7 +716,10 @@ export default {
         row.currentLotNumber&&
         row.number&&
         row.startTime &&
-        row.plannedEndTime;
+        row.plannedEndTime &&
+        row.tubecolor &&
+        row.boxweight &&
+        row.tubeweight;
     },
     // 新增一行标记为可编辑
     addEditableRow() {
@@ -702,10 +915,10 @@ export default {
       }
       //判断当前计划是否已经投产
       getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
-        if(resp.data.length>0){
-          this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
-          return;//证明有在上级的产品--zhi能有一个上级产品
-        }
+        //if(resp.data.length>0){
+        //   this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+        //   return;//证明有在上级的产品--zhi能有一个上级产品
+      //  }
         //不等于0待机才去校验是否重复
         if(row.planStatus!=0){
           //先查询计划表中有没有正在上机的或者停机的

+ 374 - 8
zkqy-ui/src/views/orderMange/planTable/index.vue

@@ -147,7 +147,7 @@
         <el-dialog
           title="南车间新增计划"
           :visible.sync="nanInsertDialogTableVisible"
-          width="1200px"
+          width="1500px"
         >
           <el-table :data="tableData2" @row-click.self="handleRowClick">
             <el-table-column
@@ -258,6 +258,87 @@
                 <span v-else>{{ scope.row.currentLotNumber }}</span>
               </template>
             </el-table-column>
+            <!-- 新增筒重、箱重、管色字段 -->
+            <el-table-column
+              prop="tubeweight"
+              label="筒重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubeweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.drum_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="boxweight"
+              label="箱重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.boxweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.box_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+
+
+
+            <el-table-column
+              prop="tubecolor"
+              label="管色"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubecolor"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.tube_color"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+
+
+
+
+            <!-- 新增筒重、箱重、管色字段 -->
             <el-table-column
               prop="currentSpindleCount"
               label="锭数"
@@ -379,7 +460,7 @@
         <el-dialog
           title="修改计划"
           :visible.sync="nanUpdateDialogTableVisible"
-          width="1400px"
+          width="1500px"
         >
           <!--查询条件-->
           <el-form
@@ -514,6 +595,81 @@
               </template>
             </el-table-column>
 
+            <!-- 新增筒重、箱重、管色字段 -->
+            <el-table-column
+              prop="tubeweight"
+              label="筒重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubeweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.drum_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="boxweight"
+              label="箱重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.boxweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.box_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="tubecolor"
+              label="管色"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubecolor"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.tube_color"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <!-- 新增筒重、箱重、管色字段 -->
+
             <el-table-column
               prop="currentSpindleCount"
               label="锭数"
@@ -818,7 +974,7 @@
         <el-dialog
           title="北车间新增计划"
           :visible.sync="beiInsertDialogTableVisible"
-          width="1200px"
+          width="1500px"
         >
           <el-table :data="tableData2" @row-click.self="handleRowClick">
             <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
@@ -937,7 +1093,80 @@
                 <span v-else>{{ scope.row.currentLotNumber }}</span>
               </template>
             </el-table-column>
-
+            <!-- 新增筒重、箱重、管色字段 -->
+            <el-table-column
+              prop="tubeweight"
+              label="筒重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubeweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.drum_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="boxweight"
+              label="箱重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.boxweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.box_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="tubecolor"
+              label="管色"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubecolor"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.tube_color"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <!-- 新增筒重、箱重、管色字段 -->
             <el-table-column
               prop="currentSpindleCount"
               label="锭数"
@@ -1059,7 +1288,7 @@
         <el-dialog
           title="北车间修改计划"
           :visible.sync="beiUpdateDialogTableVisible"
-          width="1200px"
+          width="1500px"
         >
           <!--查询条件-->
           <el-form
@@ -1191,7 +1420,80 @@
                 <span v-else>{{ scope.row.currentLotNumber }}</span>
               </template>
             </el-table-column>
-
+            <!-- 新增筒重、箱重、管色字段 -->
+            <el-table-column
+              prop="tubeweight"
+              label="筒重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubeweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.drum_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="boxweight"
+              label="箱重"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.boxweight"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.box_weight"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="tubecolor"
+              label="管色"
+              header-align="center"
+              align="center"
+            >
+              <template v-slot:default="scope">
+                <el-select
+                  v-model="scope.row.tubecolor"
+                  clearable
+                  filterable
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="item in dropDownData.tube_color"
+                    :key="item.id"
+                    :label="item.codeName"
+                    :value="item.codeName"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <!-- 新增筒重、箱重、管色字段 -->
             <el-table-column
               prop="currentSpindleCount"
               label="锭数"
@@ -1379,6 +1681,7 @@ import {
   getMaterielInfo,
   addMaterielInfo,
   getProductsAll,
+  getOptionLsit,
   getAllPlanListByMachineId,
   getAllPlanListByProductTypeAndStatus,
   updatePlanOne,
@@ -1389,6 +1692,7 @@ import {
   getCurrentProductionLineSuperior,
   updateSpinningInfoPlanOne
 } from '@/api/plan/paln.js'
+
 export default {
   data () {
     return {
@@ -1404,6 +1708,24 @@ export default {
       form: {
         product: ''
       },
+      formzdsj:{machineToolNo: "", //机台编号
+        // 表单参数
+        packaging: "", //包装
+        machineTool: "", //机台
+        workShifts: "", //班次
+        productionDate: "", //生产日期
+        levels: "", //等级
+        foreignTradeNumber: "", //外贸号
+        canisterWeight: "", //筒重
+        boxWeight: "", //箱重-车重
+        canisterNum: "", //筒数
+        tubeColor: "", //管色
+        comPort: "", //端口
+        printFormat: "", //格式
+        grossWeight: 0, //毛重
+        remark: "", //备注
+         },
+      dropDownData: {},
       previousMachineId: undefined,
       currentRowspan: 1,
       prevRow: {},
@@ -1455,6 +1777,7 @@ export default {
   mounted () {
     // 得到排产计划信息
     this.getAmmunitionPlanInfo()
+    this.getSelectOptions()
   },
   methods: {
     tjqx () {
@@ -1534,7 +1857,7 @@ export default {
           })
         } else {
           this.$message({ message: '修改状态成功', type: 'error' })
-          
+
         }
         this.modifyMachineStatus = false
         this.getAmmunitionPlanInfo()
@@ -1966,7 +2289,10 @@ export default {
         row.currentLotNumber &&
         row.number &&
         row.startTime &&
-        row.plannedEndTime
+        row.plannedEndTime &&
+          row.tubecolor &&
+          row.boxweight &&
+          row.tubeweight
       )
     },
     // 新增一行标记为可编辑
@@ -2146,6 +2472,46 @@ export default {
         // });
       })
     },
+    // 获取下拉数据
+    async getSelectOptions() {
+      try {
+        let res = await getOptionLsit();
+        if (res.code == 200) {
+          this.dropDownData = res.data || {};
+          // 初始化默认值
+          if (
+            this.dropDownData.work_shifts?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.workShifts = this.dropDownData.work_shifts[0].codeName;
+          }
+          if (this.dropDownData.level?.length > 0 && this.excuteType == 1) {
+            this.formzdsj.levels = this.dropDownData.level[0].codeName;
+          }
+          if (
+            this.dropDownData.drum_weight?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.canisterWeight =
+              this.dropDownData.drum_weight[0].codeName;
+          }
+          if (
+            this.dropDownData.box_weight?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.boxWeight = this.dropDownData.box_weight[0].codeName;
+          }
+          if (
+            this.dropDownData.tube_color?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.tubeColor = this.dropDownData.tube_color[0].codeName;
+          }
+        } else {
+          this.$message.error("网络异常!");
+        }
+      } catch (error) {}
+    },
     //弹窗里边的点击查询
     onSubmit () {
       this.formData.macId = this.macId

+ 226 - 14
zkqy-ui/src/views/orderMange/planTable/luotong.vue

@@ -45,7 +45,7 @@
       </el-table-column>
     </el-table>
     <!--新增计划弹窗-->
-    <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
+    <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1500px">
       <el-table :data="tableData2" @row-click.self="handleRowClick">
         <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
           <template v-slot:default="scope">
@@ -91,7 +91,80 @@
             <span v-else>{{ scope.row.currentLotNumber }}</span>
           </template>
         </el-table-column>
-
+        <!-- 新增筒重、箱重、管色字段 -->
+        <el-table-column
+          prop="tubeweight"
+          label="筒重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubeweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.drum_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="boxweight"
+          label="箱重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.boxweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.box_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="tubecolor"
+          label="管色"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubecolor"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.tube_color"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </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>
@@ -135,7 +208,7 @@
            </span>
     </el-dialog>
     <!--修改计划弹窗-->
-    <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1200px">
+    <el-dialog title="修改计划"  :visible.sync="nanUpdateDialogTableVisible" width="1500px">
       <!--查询条件-->
       <el-form ref="form"  :model="formData" label-width="80px" :inline="true">
         <el-form-item label="计划状态:">
@@ -183,6 +256,80 @@
             <span v-else>{{ scope.row.currentLotNumber }}</span>
           </template>
         </el-table-column>
+        <!-- 新增筒重、箱重、管色字段 -->
+        <el-table-column
+          prop="tubeweight"
+          label="筒重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubeweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.drum_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="boxweight"
+          label="箱重"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.boxweight"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.box_weight"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="tubecolor"
+          label="管色"
+          header-align="center"
+          align="center"
+        >
+          <template v-slot:default="scope">
+            <el-select
+              v-model="scope.row.tubecolor"
+              clearable
+              filterable
+              allow-create
+              default-first-option
+            >
+              <el-option
+                v-for="item in dropDownData.tube_color"
+                :key="item.id"
+                :label="item.codeName"
+                :value="item.codeName"
+              >
+              </el-option>
+            </el-select>
+          </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>
@@ -249,7 +396,10 @@ import {
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne,getCurrentProductionLineSuperior, getIsTheOrderProductProduced
+  updateSpinningInfoPlanOne,
+  getCurrentProductionLineSuperior,
+  getIsTheOrderProductProduced,
+  getOptionLsit
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -262,6 +412,24 @@ export default {
       form: {
         product:"",
       },
+      formzdsj:{machineToolNo: "", //机台编号
+        // 表单参数
+        packaging: "", //包装
+        machineTool: "", //机台
+        workShifts: "", //班次
+        productionDate: "", //生产日期
+        levels: "", //等级
+        foreignTradeNumber: "", //外贸号
+        canisterWeight: "", //筒重
+        boxWeight: "", //箱重-车重
+        canisterNum: "", //筒数
+        tubeColor: "", //管色
+        comPort: "", //端口
+        printFormat: "", //格式
+        grossWeight: 0, //毛重
+        remark: "", //备注
+      },
+      dropDownData: {},
       previousMachineId: undefined,
       currentRowspan: 1,
       prevRow: {},
@@ -305,6 +473,7 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getSpinningPlanList();
+    this.getSelectOptions();
   },
   methods: {
     selectedML(row){
@@ -323,10 +492,10 @@ export default {
     deletePlan($index,row){
       console.log(row)
       getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
-        if(resp.data.length>0){
-          this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
-          return;//证明有在上级的产品--zhi能有一个上级产品
-        }else {
+        // if(resp.data.length>0){
+        //   this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
+        //   return;//证明有在上级的产品--zhi能有一个上级产品
+        // }else {
           //没有开始生产可以删除
           spinningFrameWinding(row.id).then(res=>{
             if(res.code==200){
@@ -338,7 +507,7 @@ export default {
             this.onSubmit();
             this.getSpinningPlanList();
           })
-        }
+        // }
       });
 
     },
@@ -366,6 +535,46 @@ export default {
         });
       })
     },
+    // 获取下拉数据
+    async getSelectOptions() {
+      try {
+        let res = await getOptionLsit();
+        if (res.code == 200) {
+          this.dropDownData = res.data || {};
+          // 初始化默认值
+          if (
+            this.dropDownData.work_shifts?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.workShifts = this.dropDownData.work_shifts[0].codeName;
+          }
+          if (this.dropDownData.level?.length > 0 && this.excuteType == 1) {
+            this.formzdsj.levels = this.dropDownData.level[0].codeName;
+          }
+          if (
+            this.dropDownData.drum_weight?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.canisterWeight =
+              this.dropDownData.drum_weight[0].codeName;
+          }
+          if (
+            this.dropDownData.box_weight?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.boxWeight = this.dropDownData.box_weight[0].codeName;
+          }
+          if (
+            this.dropDownData.tube_color?.length > 0 &&
+            this.excuteType == 1
+          ) {
+            this.formzdsj.tubeColor = this.dropDownData.tube_color[0].codeName;
+          }
+        } else {
+          this.$message.error("网络异常!");
+        }
+      } catch (error) {}
+    },
     // 下拉框数据改变查询色号批号信息
     selectedChangeDate(row,selectedProduct) {
       //选择的那个销售产品
@@ -502,7 +711,10 @@ export default {
         row.currentLotNumber&&
         row.number&&
         row.startTime &&
-        row.plannedEndTime;
+        row.plannedEndTime &&
+      row.tubecolor &&
+      row.boxweight &&
+      row.tubeweight;
     },
     // 新增一行标记为可编辑
     addEditableRow() {
@@ -698,10 +910,10 @@ export default {
       }
       //判断当前计划是否已经投产
       getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
-        if(resp.data.length>0){
-          this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
-          return;//证明有在上级的产品--zhi能有一个上级产品
-        }
+        // if(resp.data.length>0){
+        //   this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+        //   return;//证明有在上级的产品--zhi能有一个上级产品
+        // }
         //不等于0待机才去校验是否重复
         if(row.planStatus!=0){
           //先查询计划表中有没有正在上机的或者停机的

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

@@ -632,7 +632,7 @@ export default {
         // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)
         console.log("divData.clientHeight + divData.scrollTop",divData.clientHeight + divData.scrollTop)
         console.log("divData.scrollHeight",divData.scrollHeight)
-        if (divData.clientHeight + divData.scrollTop >= divData.scrollHeight) {
+        if (divData.clientHeight + divData.scrollTop+0.3 >= divData.scrollHeight) {
           // 重置table距离顶部距离
           divData.scrollTop = 0;
           console.log("重置了嘛!!!!!")

+ 1 - 1
zkqy-ui/src/views/orderMange/productcodelog/index.vue

@@ -319,7 +319,7 @@
 
     <el-table v-loading="loading" :data="productcodelogList" @selection-change="handleSelectionChange">
 <!--      <el-table-column type="selection" width="55" align="center" />-->
-      <el-table-column label="编号 code" align="center" prop="id" />
+<!--      <el-table-column label="编号 code" align="center" prop="id" />-->
       <el-table-column label="码单号" align="center" prop="qrCode" />
       <el-table-column label="批号" align="center" prop="lotNum" />
       <el-table-column label="货品名称" align="center" prop="productName" />