hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/pipeoutplan/service/impl/PipeOutPlanServiceImpl.java
@@ -29,6 +29,8 @@ @Autowired private PipeOutPlanMapper pipeOutPlanMapper; public static final Object LOCK = new Object(); @Override @Transactional(rollbackFor = Exception.class) public BasicResult insert(PipeOutPlanEntity pipeOutPlanEntity) { @@ -60,7 +62,7 @@ @Transactional(rollbackFor = Exception.class) public BasicResult update(PipeOutPlanEntity pipeOutPlanEntity) { PipeOutPlanEntity isExit = pipeOutPlanMapper.selectInfoByProIdAndYear(pipeOutPlanEntity.getProId(), pipeOutPlanEntity.getPlanYear()); if (!pipeOutPlanEntity.getPlanOutId().equals(isExit.getPlanOutId()) && isExit != null){ if (isExit != null && !pipeOutPlanEntity.getPlanOutId().equals(isExit.getPlanOutId()) ){ return BasicResult.faild("500","同一项目、年份有且只有一个计划",null); } pipeOutPlanMapper.update(pipeOutPlanEntity); @@ -97,10 +99,12 @@ String planOutId = obj.getPlanOutId(); List<PipeOutPlanMothEntity> mothListByProIdAndYear = pipeOutPlanMapper.findMothListByProIdAndYear(proId, planYear.toString(), planOutId); Integer completePlanProductNum = 0; synchronized (this.LOCK){ for (PipeOutPlanMothEntity pipeOutPlanMothEntity : mothListByProIdAndYear) { Integer completePlanProduct = pipeOutPlanMothEntity.getCompletePlanProduct(); completePlanProductNum+=completePlanProduct; } } obj.setMonthList(mothListByProIdAndYear); obj.setCompletePipeNum(completePlanProductNum); }); hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/controller/TSteelPrintController.java
@@ -8,6 +8,7 @@ import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.thhy.general.common.BasicResult; import com.thhy.materials.modules.biz.rebarprint.service.TSteelPrintService; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -26,6 +27,21 @@ @Resource private TSteelPrintService steelPrintService; @Value("${pipePrint.baseUrl}") private String baseUrl; @Value("${pipePrint.deviceInfoUrl}") private String deviceInfoUrl; @Value("${pipePrint.pipeHistoryInfoUrl}") private String pipeHistoryInfoUrl; @Value("${pipePrint.modelUrl}") private String modelUrl; @Value("${pipePrint.steelInfoUrl}") private String steelInfoUrl; //钢筋笼打印添加 @PostMapping("/steelPrintInsert") @@ -62,39 +78,16 @@ String content = num; if (type != null){ if(type == 1){ // content = "http://111.30.93.212:8089/pipe/#/scanDetail?num="+num; content = "https://pipe.thhy-tj.com/pipe/#/scanDetail?bigDeviceId="+bigDeviceId; //content = "http://192.168.0.99:8080/#/scanDetail?num="+num; content = baseUrl + deviceInfoUrl + bigDeviceId; }else if (type == 2){ //content = "http://111.30.93.212:8089/pipe/#/ScanBear?num="+num; content = "https://pipe.thhy-tj.com/pipe/#/ScanBear?num="+num; //content = "http://192.168.0.99:8080/#/ScanBear?num="+num; content = baseUrl + pipeHistoryInfoUrl + num; }else if(type == 3){ //content = "http://111.30.93.212:8089/pipe/#/massInfo?mouldId="+mouldId; content = "https://pipe.thhy-tj.com/pipe/#/massInfo?mouldId="+mouldId; //content = "http://192.168.0.99:8080/#/massInfo?mouldId="+mouldId; content = baseUrl + modelUrl + mouldId; }else if(type == 4){ //content = "http://111.30.93.212:8089/pipe/#/reinInfo?num="+num; content = "https://pipe.thhy-tj.com/pipe/#/reinInfo?num="+num; //content = "http://192.168.0.99:8080/#/reinInfo?num="+num; content = baseUrl + steelInfoUrl + num; } } System.out.println("steelProduceId=============="+steelProduceId); // Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>(); // // 指定编码格式 // hints.put(EncodeHintType.CHARACTER_SET, "UTF-8"); // // 指定纠错级别(L--7%,M--15%,Q--25%,H--30%) // hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); // // 编码内容,编码类型(这里指定为二维码),生成图片宽度,生成图片高度,设置参数 // BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, 200, 200, hints); // //设置请求头 // response.setHeader("Content-Type","application/octet-stream"); // response.setHeader("Content-Disposition", "attachment;filename=" + "编码.png"); // OutputStream outputStream = response.getOutputStream(); // MatrixToImageWriter.writeToStream(bitMatrix, "png", outputStream); // outputStream.flush(); // outputStream.close(); BufferedImage bufferedImage = ImageUtils.createQr(content); OutputStream outputStream = null; hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/controller/HiddenDangerController.java
对比新文件 @@ -0,0 +1,92 @@ package com.thhy.secure.modules.biz.hiddenDanger.controller; import com.thhy.general.common.BasicResult; import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; import com.thhy.secure.modules.biz.hiddenDanger.service.HiddenDangerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Map; /** * @Author QiuYuHao * @CreateDate 2023-11-07 14:26:39 * 隐患举报控制层 */ @RestController @RequestMapping(value = "hiddendanger") public class HiddenDangerController { @Autowired private HiddenDangerService hiddenDangerService; /** * 新增 * @param hiddenDangerEntity * @return */ @PostMapping(value = "insert") BasicResult insert(@RequestBody HiddenDangerEntity hiddenDangerEntity){ return hiddenDangerService.insert(hiddenDangerEntity); } /** * 修改接口 * @param hiddenDangerEntity * @return */ @PostMapping(value = "update") BasicResult update(@RequestBody HiddenDangerEntity hiddenDangerEntity){ return hiddenDangerService.update(hiddenDangerEntity); } /** * 删除 * @param id * @return */ @GetMapping(value = "delete") BasicResult delete(@RequestParam String id){ return hiddenDangerService.delete(id); } /** * web端列表 * @param map * @return */ @PostMapping(value = "selectPageList") BasicResult selectPageList(@RequestBody Map<String,Object> map){ return hiddenDangerService.selectPageList(map); } /** * 小程序 * @param map * @return */ @PostMapping(value = "selectNoPageList") BasicResult selectNoPageList(@RequestBody Map<String,Object> map){ return hiddenDangerService.selectNoPageList(map); } /** * web、小程序详情 * @param id * @return */ @GetMapping(value = "selectInfo") BasicResult selectInfo(@RequestParam String id){ return hiddenDangerService.selectInfo(id); } /** * web审核接口 * @param hiddenDangerEntity * @return */ @PostMapping(value = "examine") BasicResult examine(@RequestBody HiddenDangerEntity hiddenDangerEntity){ return hiddenDangerService.examine(hiddenDangerEntity); } } hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java
对比新文件 @@ -0,0 +1,81 @@ package com.thhy.secure.modules.biz.hiddenDanger.entity; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; import java.util.List; /** * @Author QiuYuHao * @CreateDate 2023-11-07 14:27:33 */ @Data @AllArgsConstructor @NoArgsConstructor @Builder public class HiddenDangerEntity implements Serializable { private String id; /** * 隐患地点 */ private String dangerLocation; /** * 隐患标题 */ private String title; /** * 隐患时间 */ private Date createTime; /** * 隐患审核状态 审核状态 0未审核 1审核通过 2审核失败 */ private Integer auditStatus; private String auditStatusName; public String getAuditStatusName() { String name = ""; switch (auditStatus){ case 0: name = "未审核"; break; case 1: name = "已审核"; break; case 2: name = "审核失败"; break; } return name; } /** * 1Y0N */ private Integer isUse; private String createUser; private String updateUser; private Date updateTime; private String companyId; /** * 积分 */ private Double integral; /** * 图片集合 */ private List<HiddenDangerImgEntity> imgEntities; } hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerImgEntity.java
对比新文件 @@ -0,0 +1,37 @@ package com.thhy.secure.modules.biz.hiddenDanger.entity; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * @Author QiuYuHao * @CreateDate 2023-11-07 14:56:00 * 隐患图片实体 */ @Data @NoArgsConstructor @AllArgsConstructor @Builder public class HiddenDangerImgEntity implements Serializable { private String id; /** * 隐患id */ private String hiddenDangerId; /** * 图片名称 */ private String imgName; /** * 图片地址 */ private String imgPath; } hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/mapper/HiddenDangerMapper.java
对比新文件 @@ -0,0 +1,35 @@ package com.thhy.secure.modules.biz.hiddenDanger.mapper; import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerImgEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; import java.util.Map; /** * @Author QiuYuHao * @CreateDate 2023-11-07 14:31:40 * 隐患mapper */ @Mapper public interface HiddenDangerMapper { void insert(HiddenDangerEntity hiddenDangerEntity); void update(HiddenDangerEntity hiddenDangerEntity); void delete(String id); List<HiddenDangerEntity> selectPageList(Map<String,Object> map); HiddenDangerEntity selectInfo(String id); List<HiddenDangerImgEntity> selectImgList(String hiddenDangerId); void deleteImg(String hiddenDangerId); void insertImg(HiddenDangerImgEntity hiddenDangerImgEntity); } hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/HiddenDangerService.java
对比新文件 @@ -0,0 +1,31 @@ package com.thhy.secure.modules.biz.hiddenDanger.service; import com.thhy.general.common.BasicResult; import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; import java.util.List; import java.util.Map; /** * @Author QiuYuHao * @CreateDate 2023-11-07 14:32:02 * 隐患接口 */ public interface HiddenDangerService { BasicResult insert(HiddenDangerEntity hiddenDangerEntity); BasicResult update(HiddenDangerEntity hiddenDangerEntity); BasicResult delete(String id); BasicResult selectPageList(Map<String,Object> map); BasicResult selectNoPageList(Map<String,Object> map); BasicResult selectInfo(String id); BasicResult examine(HiddenDangerEntity hiddenDangerEntity); } hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java
对比新文件 @@ -0,0 +1,120 @@ package com.thhy.secure.modules.biz.hiddenDanger.service.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.thhy.general.common.BasicResult; import com.thhy.general.config.SysUserInfo; import com.thhy.general.utils.UUIDUtils; import com.thhy.general.utils.UserInfoUtils; import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; import com.thhy.secure.modules.biz.hiddenDanger.mapper.HiddenDangerMapper; import com.thhy.secure.modules.biz.hiddenDanger.service.HiddenDangerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; import java.util.Map; /** * @Author QiuYuHao * @CreateDate 2023-11-07 14:32:29 * 隐患逻辑 */ @Service public class HiddenDangerServiceImpl implements HiddenDangerService { @Autowired private HiddenDangerMapper hiddenDangerMapper; private static final Object Lock = new Object(); @Override @Transactional(rollbackFor = Exception.class) public BasicResult insert(HiddenDangerEntity hiddenDangerEntity) { SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); String hiddenDangerId = UUIDUtils.create(); hiddenDangerEntity.setId(hiddenDangerId); hiddenDangerEntity.setCreateUser(sysUserInfo.getUserId()); hiddenDangerEntity.setCompanyId(sysUserInfo.getCompanyId()); synchronized (Lock){ hiddenDangerMapper.insert(hiddenDangerEntity); //图片 hiddenDangerEntity.getImgEntities().forEach(obj->{ obj.setId(UUIDUtils.create()); obj.setHiddenDangerId(hiddenDangerId); hiddenDangerMapper.insertImg(obj); }); } return BasicResult.success(); } @Override @Transactional(rollbackFor = Exception.class) public BasicResult update(HiddenDangerEntity hiddenDangerEntity) { SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); String userId = sysUserInfo.getUserId(); hiddenDangerEntity.setUpdateUser(userId); hiddenDangerEntity.setUpdateTime(new Date()); synchronized (Lock){ hiddenDangerMapper.update(hiddenDangerEntity); //删除图片 hiddenDangerMapper.deleteImg(hiddenDangerEntity.getId()); //图片 hiddenDangerEntity.getImgEntities().forEach(obj->{ obj.setId(UUIDUtils.create()); obj.setHiddenDangerId(hiddenDangerEntity.getId()); hiddenDangerMapper.insertImg(obj); }); } return BasicResult.success(); } @Override @Transactional(rollbackFor = Exception.class) public BasicResult delete(String id) { synchronized (Lock) { hiddenDangerMapper.delete(id); hiddenDangerMapper.deleteImg(id); } return BasicResult.success(); } @Override public BasicResult selectPageList(Map<String, Object> map) { SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); map.put("companyId",sysUserInfo.getCompanyId()); int pageNum = (int) map.get("pageNum"); int pageSize = (int) map.get("pageSize"); PageHelper.startPage(pageNum,pageSize); List<HiddenDangerEntity> hiddenDangerEntities = hiddenDangerMapper.selectPageList(map); hiddenDangerEntities.forEach(obj ->{ String id = obj.getId(); obj.setImgEntities(hiddenDangerMapper.selectImgList(id)); }); return BasicResult.success(new PageInfo<>(hiddenDangerEntities)); } @Override public BasicResult selectNoPageList(Map<String, Object> map) { SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); map.put("companyId",sysUserInfo.getCompanyId()); List<HiddenDangerEntity> hiddenDangerEntities = hiddenDangerMapper.selectPageList(map); hiddenDangerEntities.forEach(obj ->{ String id = obj.getId(); obj.setImgEntities(hiddenDangerMapper.selectImgList(id)); }); return BasicResult.success(hiddenDangerEntities); } @Override public BasicResult selectInfo(String id) { return BasicResult.success(hiddenDangerMapper.selectInfo(id)); } @Override public BasicResult examine(HiddenDangerEntity hiddenDangerEntity) { hiddenDangerMapper.update(hiddenDangerEntity); return BasicResult.success(); } } hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml
对比新文件 @@ -0,0 +1,215 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.thhy.secure.modules.biz.hiddenDanger.mapper.HiddenDangerMapper"> <!--插入操作--> <insert id="insert"> insert into t_hidden_danger <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null"> id, </if> <if test="dangerLocation != null"> dangerLocation, </if> <if test="title != null"> title, </if> <if test="createTime != null"> createTime, </if> <if test="auditStatus != null"> auditStatus, </if> <if test="isUse != null"> isUse, </if> <if test="createUser != null"> createUser, </if> <if test="updateUser != null"> updateUser, </if> <if test="updateTime != null"> updateTime, </if> <if test="companyId != null"> companyId, </if> <if test="integral != null"> integral, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="dangerLocation != null"> #{dangerLocation,jdbcType=VARCHAR}, </if> <if test="title != null"> #{title,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="auditStatus != null"> #{auditStatus,jdbcType=INTEGER}, </if> <if test="isUse != null"> #{isUse,jdbcType=INTEGER}, </if> <if test="createUser != null"> #{createUser,jdbcType=VARCHAR}, </if> <if test="updateUser != null"> #{updateUser,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="companyId != null"> #{companyId,jdbcType=TIMESTAMP}, </if> <if test="integral != null"> #{integral,jdbcType=DOUBLE}, </if> </trim> </insert> <!--更新操作--> <update id="update"> update t_hidden_danger <set> <if test="dangerLocation != null"> dangerLocation = #{dangerLocation,jdbcType=VARCHAR}, </if> <if test="title != null"> title = #{title,jdbcType=VARCHAR}, </if> <if test="createTime != null"> createTime = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="auditStatus != null"> auditStatus = #{auditStatus,jdbcType=INTEGER}, </if> <if test="isUse != null"> isUse = #{isUse,jdbcType=INTEGER}, </if> <if test="createUser != null"> createUser = #{createUser,jdbcType=VARCHAR}, </if> <if test="updateUser != null"> updateUser = #{updateUser,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> updateTime = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="companyId != null"> companyId = #{companyId,jdbcType=VARCHAR}, </if> <if test="integral != null"> integral = #{integral,jdbcType=DOUBLE}, </if> </set> where id=#{id,jdbcType=VARCHAR} </update> <!--逻辑删除--> <update id="delete"> update t_hidden_danger SET isUse = 0 where id=#{id} </update> <select id="selectInfo" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity"> select t.id, t.dangerLocation, t.title, t.createTime, t.auditStatus, t.isUse, t.createUser, t.updateUser, t.updateTime, t.companyId from t_hidden_danger t where t.id=#{id} </select> <!--查询列表--> <select id="selectPageList" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity"> SELECT t.id, t.dangerLocation, t.title, t.createTime, t.auditStatus, t.isUse, t.createUser, t.updateUser, t.updateTime, t.companyId from t_hidden_danger t LEFT JOIN sys_users su ON su.user_id = t.createUser LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser WHERE t.isUse = 1 and t.companyId = #{companyId} <if test="startTime!= null and endTime!=null and startTime != '' and endTime !=''"> and t.createTime BETWEEN #{startTime} and #{endTime} </if> order by t.createUser desc </select> <!--根据ID删除--> <delete id="deleteImg"> delete from t_hidden_danger_img where hiddenDangerId=#{hiddenDangerId} </delete> <select id="selectImgList" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerImgEntity"> SELECT id, hiddenDangerId, imgName, imgPath FROM t_hidden_danger_img WHERE hiddenDangerId = #{hiddenDangerId} </select> <insert id="insertImg"> insert into t_hidden_danger_img <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null"> id, </if> <if test="hiddenDangerId != null"> hiddenDangerId, </if> <if test="imgName != null"> imgName, </if> <if test="imgPath != null"> imgPath, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="hiddenDangerId != null"> #{hiddenDangerId,jdbcType=VARCHAR}, </if> <if test="imgName != null"> #{imgName,jdbcType=VARCHAR}, </if> <if test="imgPath != null"> #{imgPath,jdbcType=VARCHAR}, </if> </trim> </insert> </mapper> web/src/api/modules/ductRaw.js
@@ -62,7 +62,29 @@ //获取管片明细 searchDuctDetails: params => axios.post('/materials/needYear/selectPipeInfo', params), /** * 管片发运计划 */ ductForward: { // 查询管片生产计划信息 searchDuctPlan: params => axios.post('/materials/pipeoutplan/findAll', params), // 添加管片生产计划信息 insertDuctPlan: params => axios.post('/materials/pipeoutplan/insert', params), // 修改管片生产计划信息 updateDuctPlan: params => axios.post('/materials/pipeoutplan/update', params), // 删除管片生产计划信息 deleteDuctPlan: params => axios.get('/materials/pipeoutplan/delete', {params}), //获取月份列表 getMonthsList: params => axios.post('/materials/pipePlan/monthList', params), //获取管片明细 searchDuctDetails: params => axios.post('/m/pipeInfo/findList', params), }, /** * 原料实际放量 */ web/src/components/element/Pagination.vue
@@ -76,7 +76,16 @@ font-weight: 400; } .pagination-container { ::v-deep.pagination-container { margin: 30px 0; .btn-prev { margin-right: 10px; } .el-pager .number { width: 28px; margin-right: 10px; } } </style> web/src/views/DuctpiecePLM/PlanManage/DuctForward.vue
@@ -0,0 +1,551 @@ <template> <div class="main"> <div class="main_header"> <div class="header_item"> <span class="header_label">项目名称:</span> <el-select v-model="search.proId" placeholder="请选择项目名称" clearable filterable> <el-option v-for="item in optionsProject" :key="item.proId" :label="item.proName" :value="item.proId"> </el-option> </el-select> </div> <div class="header_item"> <span class="header_label">年份:</span> <el-date-picker v-model="search.planYear" value-format="yyyy" type="year" placeholder="请选择年份"> </el-date-picker> </div> <div class="header_item"> <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button> <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('insert')" @click="insertProp">新增</el-button> </div> </div> <div class="main_content"> <div style="overflow-y:auto;overflow-x:hidden;height:calc(100% - 5px)"> <div class="plan_main_card" v-for="(item, index) in dataList" :key="index"> <div class="plan_main_header"> <div class="plan_header_left"> <span class="plan_header_one">{{ item.proName }}</span> <span>{{ item.planYear }}年</span> </div> <div class="plan_header_right"> <el-button style="background-image:none;border:1px solid #38B2FA;border-radius:5px;padding:5px 10px;" :size="size" v-if="showButton('update')" class="table_btn" @click="updateProp(item)">修改</el-button> <el-button style="background-image:none;border:1px solid #FD494B;background-color:#434F69;border-radius:5px;padding:5px 10px;" :size="size" class="delete_btn" v-if="showButton('delete')" @click="deleteInfo(item)">删除</el-button> </div> </div> <div class="plan_main_content"> <div class="plan_content_items"> <div class="plan_content_title">月份</div> <div class="plan_content_datas" style="background-color:#052C55;color:#39B5FE" v-for="(item, index) in item.monthList" :key="index">{{ item.month }}</div> <div class="plan_content_datas" style="background-color:#052C55;color:#39B5FE">合计</div> </div> <div class="plan_content_items" style="margin-bottom:0px;border-bottom-color:transparent;"> <div class="plan_content_title">管片计划发运数量(片)</div> <div class="plan_content_datas" v-for="(iten, index) in item.monthList" :key="index"> {{ iten.planProduct }}</div> <div class="plan_content_datas">{{ item.needPipeNum }}</div> </div> <div class="plan_content_items"> <div class="plan_content_title">已发运管片数量(片)</div> <div class="plan_content_datas" v-for="(it, index) in item.monthList" style="cursor:pointer" @click="showDetails(item, index + 1)" :key="index">{{ it.completePlanProduct }}</div> <div class="plan_content_datas">{{ item.completePipeNum }}</div> </div> </div> </div> </div> </div> <div class="main_footer"> <el-pagination background @current-change="changePageNum" @size-change="changePageSize" :current-page="pageNum" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination> </div> <!-- 钢筋笼明细弹框 --> <el-dialog class="prop_dialog" title="管片明细" :visible.sync="asyncBeardetails" width="65%"> <div class="bears_content"> <el-table v-loading="loadingDetails" :data="bearDetails" height="100%"> <el-table-column align="center" label="序号" width="60"> <template #default="scope"> <span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span> </template> </el-table-column> <el-table-column prop="ringNum" label="环号" align="center"></el-table-column> <el-table-column prop="pipeNum" label="管片编号" align="center" width="160"></el-table-column> <el-table-column prop="turnName" label="转向" align="center" width="120"></el-table-column> <el-table-column prop="reinforcementName" label="配筋" align="center"></el-table-column> <el-table-column prop="groutingHolesName" label="注浆孔" align="center"></el-table-column> <el-table-column prop="blockNumName" label="块号" align="center"></el-table-column> <el-table-column prop="mouldNum" label="模具" align="center"></el-table-column> <el-table-column prop="intoModTime" label="入模时间" align="center" width="160"></el-table-column> <el-table-column prop="pouringTime" label="浇筑时间" align="center" width="160"></el-table-column> <el-table-column prop="checkTime" label="质检时间" align="center" width="160"></el-table-column> <el-table-column prop="groupName" label="生产班组" align="center"></el-table-column> <el-table-column prop="proName" label="项目" align="center" width="250" show-overflow-tooltip></el-table-column> <el-table-column prop="checkResult" label="质量标注" align="center"></el-table-column> </el-table> </div> <div class="bear_footer"> <el-pagination background @current-change="changeDetailsPageNum" @size-change="changeDetailsPageSize" :current-page="pageNumDetails" :page-sizes="[10, 20, 50, 100]" :page-size="pageSizeDetails" layout="total, sizes, prev, pager, next, jumper" :total="totalDetails"> </el-pagination> </div> </el-dialog> <el-dialog class="prop_dialog" :title="asyncTitle === true ? '新增' : asyncTitle === false ? '修改' : '查看'" :close-on-click-modal="false" :visible.sync="asyncVisible" width="35%"> <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="auto" class="rule_form"> <el-form-item label="项目名称:" prop="proId"> <el-select v-model="ruleForm.proId" placeholder="请选择项目名称" :disabled="disabled" clearable> <el-option v-for="item in optionsProject" :key="item.proId" :label="item.proName" :value="item.proId"> </el-option> </el-select> </el-form-item> <el-form-item label="年份:" prop="planYear"> <el-date-picker v-model="ruleForm.planYear" value-format="yyyy" :disabled="disabled" type="year" placeholder="请选择年份"> </el-date-picker> </el-form-item> <div class="months_items"> <div v-for="(item, index) in monthLists" :key="index" class="month_index"> <el-input placeholder="请输入" v-model="item.planProduct" type="number" :disabled="disabled"> <template slot="prepend">{{ item.month }}月</template> </el-input> </div> <div class="months_nums"> <span>合计:</span> <span style="color:#18F8F9;font-size:20px;font-weight:600;margin-left:5px">{{ allMonths }}</span> <span>环</span> </div> </div> </el-form> <div slot="footer" v-if="asyncTitle !== 'see'"> <el-button @click="asyncVisible = false">取 消</el-button> <el-button class="submit_btn" @click="asyncTitle ? submitInsert() : submitUpdate()">提 交</el-button> </div> </el-dialog> </div> </template> <script> import {buttonPinia} from '../../../pinia/index'; import {throttle, changeSize} from '../../../plugins/public'; // 导入节流、动态切换组件尺寸方法 export default { data() { return { size: changeSize(), // 组件尺寸 pageNum: 1, pageSize: 10, search: {},//查询条件 total: 0, disabled: false,//是否禁止修改 loading: false, allMonths: null,//计算出来的总数 rowId: '',//某一行id dataList: [], //管片生产计划信息 asyncBeardetails: false, bearDetails: [],//管片明细 pageNumDetails: 1, pageSizeDetails: 10, totalDetails: 0, loadingDetails: true, proId: null, reinforcementId: null, years: null, optionsProject: [],//项目名称 asyncTitle: true, // 对话框title 新增:true 修改:false asyncVisible: false, // 添加 修改对话框 ruleForm: {}, // 按钮表单 rules: { proId: [{ required: true, message: '请选择项目名称', trigger: 'change' }], planYear: [{ required: true, message: '请选择年份', trigger: 'change' }], }, optionsHass: [],//配筋 optionsBlocks: [],//块号 monthLists: [],//弹框中的月 numLists: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, '合计'], } }, mounted() { const that = this; // 根据窗口大小动态修改组件尺寸 window.onresize = () => { that.size = changeSize(); } that.searchButtonInfo(true); that.getAllProjects() }, watch: { 'monthLists': { handler: function (val) { let allNum = 0 val.map(item => { allNum += item.planProduct * 1 }) this.allMonths = allNum return this.allMonths }, deep: true }, asyncVisible(bol) { if (!bol) { this.ruleForm = {}; this.$refs.ruleForm.resetFields(); } } }, methods: { //展示管片明细弹框 showDetails(val, num) { console.log(val) this.asyncBeardetails = true if (num === 13) { this.asyncBeardetails = false return } this.proId = val.proId this.years = num < 10 ? val.planYear + '-0' + num : val.planYear + '-' + num this.searchBearDetails(val.proId, this.years) }, //查询管片明细 searchBearDetails(proId, years) { this.loadingDetails = true; this.bearDetails = []; this.$api.Ducts.ductForward.searchDuctDetails({ proId: proId, goIn: 2, yearMonth: years, pageNum: this.pageNumDetails, pageSize: this.pageSizeDetails }).then((res) => { if (res.statusMsg === 'ok') { this.totalDetails = res.data.total; this.bearDetails = res.data.list; } else { this.$message.warning(res.statusMsg) } this.loadingDetails = false; }).catch(() => { this.loadingDetails = false }); }, // 切换管片明细页数 changeDetailsPageNum(page) { this.pageNumDetails = page; this.searchBearDetails(this.proId, this.years); }, // 切换管片明细每页条数 changeDetailsPageSize(size) { this.pageSizeDetails = size; this.searchBearDetails(this.proId, this.years); }, //获得所有项目名称 getAllProjects() { let obj = { pageNum: 1, pageSize: 100000000 } this.$api.Engineer.searchProjects(obj).then(res => { if (res.statusMsg === 'ok') { this.optionsProject = res.data.list } else { this.$message.warning(res.statusMsg) } }) }, // 查询按钮列表信息 searchButtonInfo(bol) { if (bol) { this.pageNum = 1; } let params = Object.assign({}, this.search, { pageNum: this.pageNum, pageSize: this.pageSize }) this.loading = true; this.$api.Ducts.ductForward.searchDuctPlan(params).then((res) => { if (res.statusMsg === 'ok') { this.total = res.data.total; this.dataList = res.data.list; this.loading = false; } else { this.$message.warning(res.statusMsg) } }) }, // 新增按钮信息 insertProp() { this.asyncTitle = true; this.asyncVisible = true; this.disabled = false this.monthLists = [ {id: null, pipePlanId: null, month: 1, planProduct: 0}, {id: null, pipePlanId: null, month: 2, planProduct: 0}, {id: null, pipePlanId: null, month: 3, planProduct: 0}, {id: null, pipePlanId: null, month: 4, planProduct: 0}, {id: null, pipePlanId: null, month: 5, planProduct: 0}, {id: null, pipePlanId: null, month: 6, planProduct: 0}, {id: null, pipePlanId: null, month: 7, planProduct: 0}, {id: null, pipePlanId: null, month: 8, planProduct: 0}, {id: null, pipePlanId: null, month: 9, planProduct: 0}, {id: null, pipePlanId: null, month: 10, planProduct: 0}, {id: null, pipePlanId: null, month: 11, planProduct: 0}, {id: null, pipePlanId: null, month: 12, planProduct: 0}, ] this.allMonths = 0 }, // 修改按钮信息 updateProp(row) { this.asyncTitle = false; this.asyncVisible = true; this.disabled = false this.ruleForm = row this.monthLists = JSON.parse(JSON.stringify(row.monthList)) this.allMonths = row.needPipeNum this.$set(this.ruleForm, 'planYear', row.planYear + '') this.rowId = row.planId }, // 删除按钮信息 deleteInfo(row) { this.$confirm("该操作将删除该信息,是否继续删除?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }) .then(() => { console.log(row) this.$api.Ducts.ductForward.deleteDuctPlan({planOutId: row.planOutId}) .then(res => { if (res.statusMsg === 'ok') { this.searchButtonInfo(true); this.$message.success("删除成功!"); } else { this.$message.warning(res.statusMsg); } }) }) .catch(() => { this.$message.warning("您已取消"); }) }, // 提交添加按钮信息 submitInsert: throttle(function () { this.$refs.ruleForm.validate((valid) => { if (valid) { const params = Object.assign({}, this.ruleForm); params.monthList = this.monthLists params.needPipeNum = this.allMonths this.$api.Ducts.ductForward.insertDuctPlan(params).then((res) => { if (res.statusMsg === 'ok') { this.asyncVisible = false; this.searchButtonInfo(true); this.$message.success('添加成功!'); } else { this.$message.warning(res.statusMsg); } }) } }) }, 3000), // 提交修改按钮信息 submitUpdate: throttle(function () { this.$refs.ruleForm.validate((valid) => { if (valid) { const params = Object.assign({}, this.ruleForm); params.monthList = this.monthLists params.needPipeNum = this.allMonths this.$api.Ducts.ductForward.updateDuctPlan(params).then((res) => { if (res.statusMsg === 'ok') { this.asyncVisible = false; this.searchButtonInfo(true); this.$message.success('添加成功!'); } else { this.$message.warning(res.statusMsg); } }) } }) }, 3000), // 判断按钮权限信息 showButton(str) { const pinia = buttonPinia(); return pinia.$state.buttonInfo.includes(str); }, // 切换页数 changePageNum(page) { this.pageNum = page; this.searchButtonInfo(); }, // 切换每页条数 changePageSize(size) { this.pageSize = size; this.searchButtonInfo(); } } } </script> <style lang="scss" scoped> @import '../../../style/layout-main.scss'; .bears_content { height: 500px; /deep/ .el-table th.el-table__cell { background: #082F57 !important; color: #18F6F8; border-right: 1px solid #18F6F8 !important; border-bottom: 1px solid #18F6F8 !important; border-top: 1px solid #18F6F8 !important; &:last-child { border-right-color: transparent !important; } } /deep/.el-table .el-table__cell { border-left: 1px solid #18F6F8 !important; border-right: 1px solid #18F6F8 !important; border-bottom: 1px solid #18F6F8 !important; } /deep/.el-table tr:nth-of-type(even) { background: transparent; } } .bear_footer { text-align: right; line-height: 20px; margin: 15px 0 15px; } .months_items { display: flex; flex-wrap: wrap; .month_index { margin-left: 10px; margin-bottom: 10px; max-width: calc(100%/3 - 10px); /deep/.el-input-group__prepend { color: #19F6F8; background-color: #122558; border-color: #1B428F; } } .months_nums { width: 100%; height: 50px; margin-bottom: 24px; border-radius: 3px; background-color: #0B5274; display: flex; align-items: center; span { margin-left: 15px; color: #fff; } } } .plan_main_card { width: calc(100% - 36px); border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; background-color: #031A46; margin: 0px 5px 24px 0px; box-shadow: 0px 0px 8px 0px #0C4F79; .plan_main_header { width: 100%; height: 48px; border-top-left-radius: 6px; border-top-right-radius: 6px; display: flex; align-items: center; justify-content: space-between; background-color: rgba(57, 181, 254, 0.3); .plan_header_left { display: flex; span { flex: none; color: #39B5FE; margin-left: 20px; font-size: 16px; font-weight: 600; } .plan_header_one { margin-left: 40px; position: relative; &::before { position: absolute; left: -14px; top: -1px; content: ''; width: 5px; height: 20px; background-color: #39B5FE; } } } .plan_header_right { margin-right: 15px; } } .plan_main_content { width: 100%; height: calc(100% - 30px); background-color: #031A46; padding-top: 20px; padding-bottom: 10px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; .plan_content_items { display: flex; border: 1px solid #39B5FE; margin: 0px 15px 8px 15px; .plan_content_title { width: 145px; padding: 12px 0px; flex: none; color: #39B5FE; text-align: center; background-color: #052C55; } .plan_content_datas { flex: 1; padding: 12px 0px; color: #fff; text-align: center; border-left: 1px solid #1CB7E0; } } } } </style> web/src/views/MaterialsIndex/components/embedded/Income.vue
@@ -3,7 +3,7 @@ <div class="main_header"> <div class="header_item"> <span class="header_label">预埋件名称:</span> <el-input v-model="search.embedmentName" placeholder="请选择预埋件名称" clearable></el-input> <el-input v-model="search.embedmentName" placeholder="请输入预埋件名称" clearable></el-input> </div> <div class="header_item"> <span class="header_label">规格型号:</span> web/src/views/MaterialsIndex/components/embedded/Type.vue
@@ -3,7 +3,7 @@ <div class="main_header"> <div class="header_item"> <span class="header_label">预埋件名称:</span> <el-input v-model="search.embedmentName" :size="size" clearable placeholder="请输入物品名称"></el-input> <el-input v-model="search.embedmentName" :size="size" clearable placeholder="请输入预埋件名称"></el-input> </div> <div class="header_item"> <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button> @@ -36,7 +36,7 @@ :total="total"> </el-pagination> </div> <el-dialog class="prop_dialog" :title="asyncTitle ? '新增辅材种类' : '修改辅材种类'" :close-on-click-modal="false" <el-dialog class="prop_dialog" :title="asyncTitle ? '新增预埋件种类' : '修改预埋件种类'" :close-on-click-modal="false" :visible.sync="asyncVisible" width="35%"> <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="auto" class="rule_form"> <el-form-item label="预埋件名称:" prop="embedmentName"> web/src/views/ProjectManage/SectionManage.vue
@@ -48,7 +48,7 @@ <el-input v-model="ruleForm.unitProjectName" clearable placeholder="请输入单位工程名称"></el-input> </el-form-item> <el-form-item label="需求负责人:" prop="segmentAdmin"> <el-select v-model="ruleForm.segmentAdmin" placeholder="请选择求负责人"> <el-select v-model="ruleForm.segmentAdmin" placeholder="请选择需求负责人"> <el-option v-for="item in optionsUser" :key="item.userId" :label="item.realName" :value="item.userId"> </el-option> </el-select>