Browse Source

ly 批量

ly 7 tháng trước cách đây
mục cha
commit
bf31ad9523

+ 14 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialController.java

@@ -8,6 +8,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.pssr.domain.*;
+import com.ruoyi.project.pssr.mapper.TPssrMaterialMapper;
 import com.ruoyi.project.pssr.service.ITPssrApproveService;
 import com.ruoyi.project.pssr.service.ITPssrMaterialService;
 import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import java.util.*;
 
 /**
@@ -44,6 +46,8 @@ public class TPssrMaterialController extends BaseController {
 
     @Autowired
     private HistoryService historyService;
+    @Resource
+    private TPssrMaterialMapper tPssrMaterialMapper;
 
     /**
      * 查询原料列表
@@ -97,6 +101,16 @@ public class TPssrMaterialController extends BaseController {
         return toAjax(tPssrMaterialService.updateTPssrMaterial(tPssrMaterial));
     }
 
+    /**
+     * 修改原料
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:material:edit')")
+    @Log(title = "原料", businessType = BusinessType.UPDATE)
+    @PutMapping("editBatch")
+    public AjaxResult editBatch(@RequestBody TPssrMaterial tPssrMaterial) {
+        return toAjax(tPssrMaterialMapper.updateTPssrMaterialByIds(tPssrMaterial));
+    }
+
     /**
      * 删除原料
      */

+ 14 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialRawController.java

@@ -8,6 +8,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.pssr.domain.*;
+import com.ruoyi.project.pssr.mapper.TPssrMaterialRawMapper;
 import com.ruoyi.project.pssr.service.ITPssrApproveService;
 import com.ruoyi.project.pssr.service.ITPssrMaterialRawService;
 import com.ruoyi.project.pssr.service.ITPssrSubcontentService;
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import java.util.*;
 
 /**
@@ -44,7 +46,8 @@ public class TPssrMaterialRawController extends BaseController {
 
     @Autowired
     private HistoryService historyService;
-
+    @Resource
+    private TPssrMaterialRawMapper tPssrMaterialRawMapper;
     /**
      * 查询原料列表
      */
@@ -97,6 +100,16 @@ public class TPssrMaterialRawController extends BaseController {
         return toAjax(tPssrMaterialRawService.updateTPssrMaterialRaw(tPssrMaterialRaw));
     }
 
+    /**
+     * 修改原料
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:materialRaw:edit')")
+    @Log(title = "原料", businessType = BusinessType.UPDATE)
+    @PutMapping("editBatch")
+    public AjaxResult editBatch(@RequestBody TPssrMaterialRaw tPssrMaterialRaw) {
+        return toAjax(tPssrMaterialRawMapper.updateTPssrMaterialRawByIds(tPssrMaterialRaw));
+    }
+
     /**
      * 删除原料
      */

+ 14 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMeasureController.java

@@ -11,6 +11,7 @@ import com.ruoyi.project.pssr.domain.TPssrApprove;
 import com.ruoyi.project.pssr.domain.TPssrMeasure;
 import com.ruoyi.project.pssr.domain.TPssrProtection;
 import com.ruoyi.project.pssr.domain.TPssrSubcontent;
+import com.ruoyi.project.pssr.mapper.TPssrMeasureMapper;
 import com.ruoyi.project.pssr.service.ITPssrApproveService;
 import com.ruoyi.project.pssr.service.ITPssrMeasureService;
 import com.ruoyi.project.pssr.service.ITPssrProtectionService;
@@ -23,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import java.util.*;
 
 /**
@@ -50,6 +52,8 @@ public class TPssrMeasureController extends BaseController {
 
     @Autowired
     private HistoryService historyService;
+    @Resource
+    private TPssrMeasureMapper tPssrMeasureMapper;
 
 
     /**
@@ -107,6 +111,16 @@ public class TPssrMeasureController extends BaseController {
         return toAjax(tPssrMeasureService.updateTPssrMeasure(tPssrMeasure));
     }
 
+    /**
+     * 修改人身防护
+     */
+    @PreAuthorize("@ss.hasPermi('pssr:measure:edit')")
+    @Log(title = "人身防护", businessType = BusinessType.UPDATE)
+    @PutMapping("editBatch")
+    public AjaxResult editBatch(@RequestBody TPssrMeasure tPssrMeasure) {
+        return toAjax(tPssrMeasureMapper.updateTPssrMeasureByIds(tPssrMeasure));
+    }
+
     /**
      * 删除人身防护
      */

+ 2 - 0
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrPipe.java

@@ -1,6 +1,8 @@
 package com.ruoyi.project.pssr.domain;
 
 import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
 import com.ruoyi.framework.web.domain.BaseEntity;

+ 11 - 9
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMaterialMapper.java

@@ -6,15 +6,15 @@ import com.ruoyi.project.pssr.domain.TPssrMaterial;
 
 /**
  * 原料Mapper接口
- * 
+ *
  * @author ssy
  * @date 2024-09-18
  */
-public interface TPssrMaterialMapper 
+public interface TPssrMaterialMapper
 {
     /**
      * 查询原料
-     * 
+     *
      * @param id 原料ID
      * @return 原料
      */
@@ -23,7 +23,7 @@ public interface TPssrMaterialMapper
 
     /**
      * 查询原料列表
-     * 
+     *
      * @param tPssrMaterial 原料
      * @return 原料集合
      */
@@ -32,7 +32,7 @@ public interface TPssrMaterialMapper
 
     /**
      * 新增原料
-     * 
+     *
      * @param tPssrMaterial 原料
      * @return 结果
      */
@@ -40,15 +40,15 @@ public interface TPssrMaterialMapper
 
     /**
      * 修改原料
-     * 
+     *
      * @param tPssrMaterial 原料
      * @return 结果
      */
     public int updateTPssrMaterial(TPssrMaterial tPssrMaterial);
-
+    int updateTPssrMaterialByIds(TPssrMaterial tPssrMaterial);
     /**
      * 删除原料
-     * 
+     *
      * @param id 原料ID
      * @return 结果
      */
@@ -56,9 +56,11 @@ public interface TPssrMaterialMapper
 
     /**
      * 批量删除原料
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
     public int deleteTPssrMaterialByIds(Long[] ids);
+
+
 }

+ 10 - 8
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMaterialRawMapper.java

@@ -7,7 +7,7 @@ import java.util.List;
 
 /**
  * 原料Mapper接口
- * 
+ *
  * @author ssy
  * @date 2024-09-18
  */
@@ -15,16 +15,15 @@ public interface TPssrMaterialRawMapper
 {
     /**
      * 查询原料
-     * 
+     *
      * @param id 原料ID
      * @return 原料
      */
     public TPssrMaterialRaw selectTPssrMaterialRawById(Long id);
     public TPssrMaterialRaw selectAllConfirmedPersonBySubId(TPssrMaterialRaw tpssrMaterialRaw);
-
     /**
      * 查询原料列表
-     * 
+     *
      * @param tPssrMaterialRaw 原料
      * @return 原料集合
      */
@@ -33,7 +32,7 @@ public interface TPssrMaterialRawMapper
 
     /**
      * 新增原料
-     * 
+     *
      * @param tPssrMaterialRaw 原料
      * @return 结果
      */
@@ -41,15 +40,16 @@ public interface TPssrMaterialRawMapper
 
     /**
      * 修改原料
-     * 
+     *
      * @param tPssrMaterialRaw 原料
      * @return 结果
      */
     public int updateTPssrMaterialRaw(TPssrMaterialRaw tPssrMaterialRaw);
+    int updateTPssrMaterialRawByIds(TPssrMaterialRaw tPssrMaterialRaw);
 
     /**
      * 删除原料
-     * 
+     *
      * @param id 原料ID
      * @return 结果
      */
@@ -57,9 +57,11 @@ public interface TPssrMaterialRawMapper
 
     /**
      * 批量删除原料
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
     public int deleteTPssrMaterialRawByIds(Long[] ids);
+
+
 }

+ 11 - 9
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrMeasureMapper.java

@@ -6,15 +6,15 @@ import com.ruoyi.project.pssr.domain.TPssrMeasure;
 
 /**
  * 人身防护Mapper接口
- * 
+ *
  * @author ssy
  * @date 2024-11-04
  */
-public interface TPssrMeasureMapper 
+public interface TPssrMeasureMapper
 {
     /**
      * 查询人身防护
-     * 
+     *
      * @param id 人身防护ID
      * @return 人身防护
      */
@@ -22,7 +22,7 @@ public interface TPssrMeasureMapper
 
     /**
      * 查询人身防护列表
-     * 
+     *
      * @param tPssrMeasure 人身防护
      * @return 人身防护集合
      */
@@ -31,7 +31,7 @@ public interface TPssrMeasureMapper
 
     /**
      * 新增人身防护
-     * 
+     *
      * @param tPssrMeasure 人身防护
      * @return 结果
      */
@@ -39,16 +39,16 @@ public interface TPssrMeasureMapper
 
     /**
      * 修改人身防护
-     * 
+     *
      * @param tPssrMeasure 人身防护
      * @return 结果
      */
     public int updateTPssrMeasure(TPssrMeasure tPssrMeasure);
     public int updateAllBySubId(TPssrMeasure tPssrMeasure);
-
+    int updateTPssrMeasureByIds(TPssrMeasure tPssrMeasure);
     /**
      * 删除人身防护
-     * 
+     *
      * @param id 人身防护ID
      * @return 结果
      */
@@ -56,9 +56,11 @@ public interface TPssrMeasureMapper
 
     /**
      * 批量删除人身防护
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
     public int deleteTPssrMeasureByIds(Long[] ids);
+
+
 }

+ 28 - 6
master/src/main/resources/mybatis/pssr/TPssrMaterialMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.pssr.mapper.TPssrMaterialMapper">
-    
+
     <resultMap type="TPssrMaterial" id="TPssrMaterialResult">
         <result property="id"    column="id"    />
         <result property="subId"    column="sub_id"    />
@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTPssrMaterialList" parameterType="TPssrMaterial" resultMap="TPssrMaterialResult">
         <include refid="selectTPssrMaterialVo"/>
-        <where>  
+        <where>
             <if test="subId != null "> and sub_id = #{subId}</if>
             <if test="approveId != null "> and approve_id = #{approveId}</if>
             <if test="utilityQuantity != null  and utilityQuantity != ''"> and utility_quantity = #{utilityQuantity}</if>
@@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTPssrMaterialById" parameterType="Long" resultMap="TPssrMaterialResult">
         <include refid="selectTPssrMaterialVo"/>
         where id = #{id}
@@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
         )
     </select>
-        
+
     <insert id="insertTPssrMaterial" parameterType="TPssrMaterial">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_pssr_material.NEXTVAL as id FROM DUAL
@@ -146,6 +146,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateTPssrMaterialByIds" parameterType="TPssrMaterial">
+        update t_pssr_material
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="confirm1 != null">confirm1 = #{confirm1},</if>
+            <if test="confirm2 != null">confirm2 = #{confirm2},</if>
+            <if test="confirmationDate != null">confirmation_date = #{confirmationDate},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+        </trim>
+        where id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+
     <update id="deleteTPssrMaterialById" parameterType="Long">
         update t_pssr_material set del_flag = 2 where id = #{id}
     </update>
@@ -156,5 +178,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 28 - 6
master/src/main/resources/mybatis/pssr/TPssrMaterialRawMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.pssr.mapper.TPssrMaterialRawMapper">
-    
+
     <resultMap type="TPssrMaterialRaw" id="TPssrMaterialRawResult">
         <result property="id"    column="id"    />
         <result property="subId"    column="sub_id"    />
@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTPssrMaterialRawList" parameterType="TPssrMaterialRaw" resultMap="TPssrMaterialRawResult">
         <include refid="selectTPssrMaterialRawVo"/>
-        <where>  
+        <where>
             <if test="subId != null "> and sub_id = #{subId}</if>
             <if test="approveId != null "> and approve_id = #{approveId}</if>
             <if test="rawMaterial != null  and rawMaterial != ''"> and raw_material = #{rawMaterial}</if>
@@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTPssrMaterialRawById" parameterType="Long" resultMap="TPssrMaterialRawResult">
         <include refid="selectTPssrMaterialRawVo"/>
         where id = #{id}
@@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="approveStatus != null "> AND approve_status = #{approveStatus}</if>
         )
     </select>
-        
+
     <insert id="insertTPssrMaterialRaw" parameterType="TPssrMaterialRaw">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_pssr_material_raw.NEXTVAL as id FROM DUAL
@@ -146,6 +146,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateTPssrMaterialRawByIds" parameterType="TPssrMaterialRaw">
+        update t_pssr_material_raw
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="confirm1 != null">confirm1 = #{confirm1},</if>
+            <if test="confirm2 != null">confirm2 = #{confirm2},</if>
+            <if test="confirmationDate != null">confirmation_date = #{confirmationDate},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+        </trim>
+        where id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+
     <update id="deleteTPssrMaterialRawById" parameterType="Long">
         update t_pssr_material_raw set del_flag = 2 where id = #{id}
     </update>
@@ -156,5 +178,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 25 - 6
master/src/main/resources/mybatis/pssr/TPssrMeasureMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.pssr.mapper.TPssrMeasureMapper">
-    
+
     <resultMap type="TPssrMeasure" id="TPssrMeasureResult">
         <result property="approveStatus"    column="approve_status"    />
         <result property="devNo"    column="dev_no"    />
@@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTPssrMeasureList" parameterType="TPssrMeasure" resultMap="TPssrMeasureResult">
         <include refid="selectTPssrMeasureVo"/>
-        <where>  
+        <where>
             <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
             <if test="devNo != null  and devNo != ''"> and dev_no = #{devNo}</if>
             <if test="devName != null  and devName != ''"> and dev_name like concat(concat('%', #{devName}), '%')</if>
@@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-    
+
     <select id="selectTPssrMeasureById" parameterType="Long" resultMap="TPssrMeasureResult">
         <include refid="selectTPssrMeasureVo"/>
         where id = #{id}
@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where sub_id= #{subId} and APPROVE_STATUS=0
     </update>
 
-        
+
     <insert id="insertTPssrMeasure" parameterType="TPssrMeasure">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_pssr_measure.NEXTVAL as id FROM DUAL
@@ -153,6 +153,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateTPssrMeasureByIds" parameterType="TPssrMeasure">
+        update t_pssr_measure
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="confirm1 != null and confirm1 != ''">confirm1 = #{confirm1},</if>
+            <if test="confirm2 != null and confirm2 != ''">confirm2 = #{confirm2},</if>
+            <if test="confirmationDate != null">confirmation_date = #{confirmationDate},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+        </trim>
+        where id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+
     <update id="deleteTPssrMeasureById" parameterType="Long">
         update t_pssr_measure set del_flag = 2 where id = #{id}
     </update>
@@ -163,5 +182,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
-    
-</mapper>
+
+</mapper>

+ 10 - 0
ui/src/api/pssr/material.js

@@ -54,6 +54,16 @@ export function updateMaterial(data) {
   })
 }
 
+// 修改原料
+export function updateMaterialBatch(data) {
+  return request({
+    url: '/pssr/material/editBatch',
+    method: 'put',
+    data: data
+  })
+}
+
+
 // 删除原料
 export function delMaterial(id) {
   return request({

+ 10 - 0
ui/src/api/pssr/materialRaw.js

@@ -54,6 +54,16 @@ export function updateMaterialRaw(data) {
   })
 }
 
+// 修改原料
+export function updateMaterialRawBatch(data) {
+  return request({
+    url: '/pssr/materialRaw/editBatch',
+    method: 'put',
+    data: data
+  })
+}
+
+
 // 删除原料
 export function delMaterialRaw(id) {
   return request({

+ 75 - 1
ui/src/views/pssr/material/index.vue

@@ -101,6 +101,16 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="multiple"
+          @click="handleBatch"
+          v-hasPermi="['pssr:material:edit']"
+        >批量操作</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="success"
@@ -234,6 +244,46 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog :close-on-click-modal="false" title="批量修改" :visible.sync="openBatch" width="500px" append-to-body>
+      <el-form ref="form" :model="form"  label-width="80px">
+        <el-form-item>
+          <span>已选择 {{ ids.length }} 条数据</span>
+        </el-form-item>
+        <el-form-item label="确认人1" prop="confirm1">
+          <el-select v-model="form.confirm1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="确认人2" prop="confirm2">
+          <el-select v-model="form.confirm2" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="时间确认" prop="confirmationDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.confirmationDate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormBatch">确 定</el-button>
+        <el-button @click="cancelBatch">取 消</el-button>
+      </div>
+    </el-dialog>
+
     <!-- 用户导入对话框 -->
     <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
                append-to-body>
@@ -277,7 +327,8 @@ import {
   getMaterial, handleConfirmMaterial, handleTurnDownMaterial,
   importTemplate,
   listMaterial,
-  updateMaterial
+  updateMaterial,
+  updateMaterialBatch
 } from "@/api/pssr/material";
 import {treeselect} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
@@ -324,6 +375,7 @@ export default {
       clientHeight: 300,
       // 是否显示弹出层
       open: false,
+      openBatch: false,
       // 用户导入参数
       upload: {
         // 是否显示弹出层(用户导入)
@@ -458,6 +510,28 @@ export default {
       this.open = true;
       this.title = "添加原料";
     },
+    handleBatch(){
+      this.reset();
+      this.openBatch = true
+    },
+    // 取消按钮
+    cancelBatch() {
+      this.openBatch = false;
+      this.reset();
+    },
+    /** 提交按钮 */
+    submitFormBatch() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.form.ids = this.ids
+          updateMaterialBatch(this.form).then(response => {
+            this.msgSuccess("修改成功");
+            this.open = false;
+            this.getList();
+          });
+        }
+      });
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();

+ 110 - 1
ui/src/views/pssr/materialRaw/index.vue

@@ -101,6 +101,17 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="multiple"
+          @click="handleBatch"
+          v-hasPermi="['pssr:materialRaw:edit']"
+        >批量操作</el-button>
+      </el-col>
+
       <el-col :span="1.5">
         <el-button
           type="success"
@@ -245,6 +256,80 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 添加或修改原料对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="Quantity" prop="quantity">
+          <el-input v-model="form.quantity" placeholder="请输入Quantity"/>
+        </el-form-item>
+        <el-form-item label="Note" prop="note">
+          <el-input v-model="form.note" placeholder="请输入Note"/>
+        </el-form-item>
+        <el-form-item label="确认人1" prop="confirm1">
+          <el-select v-model="form.confirm1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="确认人2" prop="confirm2">
+          <el-select v-model="form.confirm2" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :close-on-click-modal="false" title="批量修改" :visible.sync="openBatch" width="500px" append-to-body>
+      <el-form ref="form" :model="form"  label-width="80px">
+        <el-form-item>
+          <span>已选择 {{ ids.length }} 条数据</span>
+        </el-form-item>
+        <el-form-item label="确认人1" prop="confirm1">
+          <el-select v-model="form.confirm1" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="确认人2" prop="confirm2">
+          <el-select v-model="form.confirm2" filterable placeholder="请选择确认人1">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="时间确认" prop="confirmationDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.confirmationDate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormBatch">确 定</el-button>
+        <el-button @click="cancelBatch">取 消</el-button>
+      </div>
+    </el-dialog>
     <!-- 用户导入对话框 -->
     <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
                append-to-body>
@@ -290,7 +375,8 @@ import {
   handleTurnDownMaterialRaw,
   importTemplate,
   listMaterialRaw,
-  updateMaterialRaw
+  updateMaterialRaw,
+  updateMaterialRawBatch
 } from "@/api/pssr/materialRaw";
 import {treeselect} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
@@ -337,6 +423,7 @@ export default {
       clientHeight: 300,
       // 是否显示弹出层
       open: false,
+      openBatch: false,
       // 用户导入参数
       upload: {
         // 是否显示弹出层(用户导入)
@@ -472,6 +559,28 @@ export default {
       this.open = true;
       this.title = "添加原料";
     },
+    handleBatch(){
+      this.reset();
+      this.openBatch = true
+    },
+    // 取消按钮
+    cancelBatch() {
+      this.openBatch = false;
+      this.reset();
+    },
+    /** 提交按钮 */
+    submitFormBatch() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.form.ids = this.ids
+          updateMaterialRawBatch(this.form).then(response => {
+            this.msgSuccess("修改成功");
+            this.open = false;
+            this.getList();
+          });
+        }
+      });
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();

+ 0 - 1
ui/src/views/pssr/pipe/index.vue

@@ -279,7 +279,6 @@
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitFormBatch">确 定</el-button>
         <el-button @click="cancelBatch">取 消</el-button>
-
       </div>
     </el-dialog>
       <!-- 用户导入对话框 -->