From 27db4819ba665a73b9da31752864017e274b5bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Tue, 22 Aug 2023 18:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/project/materialSeal/index.vue | 307 +++++++-- .../projectMaterialSealDrawer.vue | 586 ++++++++++++++++ .../views/project/projectChecking/index.vue | 16 +- .../projectChecking/projectCheckingDrawer.vue | 6 +- .../views/project/projectMeasure/index.vue | 402 ++++++++--- .../projectMeasure/projectMeasureDrawer.vue | 631 ++++++++++++++++++ .../src/views/project/surProject/index.vue | 27 +- .../surProjectInsurance/insuranceDrawer.vue | 6 +- .../projectUserInfoDrawer.vue | 450 +++++++------ .../src/main/resources/application.yml | 2 +- .../domain/SurProjectMaterialSeal.java | 12 +- .../jh/project/domain/SurProjectUnitInfo.java | 10 + .../SurProjectMaterialSealServiceImpl.java | 5 + .../impl/SurProjectMeasureServiceImpl.java | 5 + .../project/SurProjectMaterialSealMapper.xml | 14 +- .../project/SurProjectMeasureMapper.xml | 2 +- .../project/SurProjectUnitInfoMapper.xml | 6 + 17 files changed, 2107 insertions(+), 380 deletions(-) create mode 100644 ruoyi-ui/src/views/project/materialSeal/projectMaterialSealDrawer.vue create mode 100644 ruoyi-ui/src/views/project/projectMeasure/projectMeasureDrawer.vue diff --git a/ruoyi-ui/src/views/project/materialSeal/index.vue b/ruoyi-ui/src/views/project/materialSeal/index.vue index ba41f49a..ffafb6e6 100644 --- a/ruoyi-ui/src/views/project/materialSeal/index.vue +++ b/ruoyi-ui/src/views/project/materialSeal/index.vue @@ -16,10 +16,10 @@ @keyup.enter.native="handleQuery" /> - + @@ -40,6 +40,17 @@ @keyup.enter.native="handleQuery" /> + + + - - - - - - - - 搜索 - - - + + + - - - - - - - + + + + + + + + + + - - @@ -278,12 +344,17 @@ import { addMaterialSeal, updateMaterialSeal, } from "@/api/project/materialSeal"; +import ElImageViewer from "element-ui/packages/image/src/image-viewer"; export default { name: "MaterialSeal", + components: { + ElImageViewer, + }, dicts: ["sys_common_isdel"], data() { return { + showViewer: false, // 遮罩层 loading: true, // 选中数组 @@ -312,7 +383,7 @@ export default { projectName: null, deptId: null, deptName: null, - imgUrls: null, + imageUrls: null, materialName: null, usePosition: null, contractBrand: null, @@ -323,13 +394,89 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + imageUrls: [{ required: true, message: "请上传封样现场图片", trigger: "blur" }], + materialName: [ + { required: true, message: "请输入封样名称", trigger: "blur" }, + { max: 100, message: "封样名称最多100字符", trigger: "blur" }, + ], + usePosition: [ + { required: true, message: "请输入使用部位", trigger: "blur" }, + { max: 100, message: "使用部位最多100字符", trigger: "blur" }, + ], + contractBrand: [ + { required: true, message: "请输入合同指定品牌", trigger: "blur" }, + { max: 100, message: "合同指定品牌最多100字符", trigger: "blur" }, + ], + useBrand: [ + { required: true, message: "请输入使用品牌", trigger: "blur" }, + { max: 100, message: "使用品牌最多100字符", trigger: "blur" }, + ], + sealDate: [{ required: true, message: "请选择封样时间", trigger: "blur" }], + signFiles: [{ required: true, message: "请上传会签单附件", trigger: "blur" }], + alterationFiles: [ + { required: false, message: "请上传变更单附件", trigger: "blur" }, + ], + }, + previewList: [], + isOnly: false, }; }, created() { this.getList(); }, methods: { + fileInputSign(files) { + let fileUrls = null; + if (files.length > 0) { + fileUrls = ""; + files.forEach((item) => { + fileUrls += "," + item.url; + }); + fileUrls = fileUrls.substring(1); + } + this.form.signFiles = fileUrls; + }, + fileInputAlteration(files) { + let fileUrls = null; + if (files.length > 0) { + fileUrls = ""; + files.forEach((item) => { + fileUrls += "," + item.url; + }); + fileUrls = fileUrls.substring(1); + } + this.form.alterationFiles = fileUrls; + }, + onlyFile() { + if (this.form.contractBrand && this.form.useBrand) { + if (this.form.contractBrand != this.form.useBrand) { + this.isOnly = true; + this.rules.alterationFiles[0].required = true; + } else { + this.isOnly = false; + this.form.alterationFiles = null; + this.rules.alterationFiles[0].required = false; + } + } else { + this.isOnly = false; + this.form.alterationFiles = null; + this.rules.alterationFiles[0].required = false; + } + }, + getImageUrl(url) { + return process.env.VUE_APP_BASE_API + url + ".min.jpg"; + }, + onPreview(urls) { + this.previewList = []; + urls.split(",").forEach((item) => { + this.previewList.push(process.env.VUE_APP_BASE_API + item); + }); + this.showViewer = true; + }, + closeViewer() { + this.showViewer = false; + }, /** 查询材料封样列表 */ getList() { this.loading = true; @@ -354,9 +501,11 @@ export default { this.form = { id: null, projectId: null, + projectName: null, deptId: null, + deptName: null, mainImage: null, - imgUrls: null, + imageUrls: null, materialName: null, usePosition: null, contractBrand: null, @@ -450,6 +599,20 @@ export default { `materialSeal_${new Date().getTime()}.xlsx` ); }, + /** 下载附件 */ + handledownloadSignFiles(row) { + this.files = row.signFiles.split(","); + this.files.forEach((item) => { + this.$download.resource(item); + }); + }, + /** 下载附件 */ + handledownloadAlterationFiles(row) { + this.files = row.alterationFiles.split(","); + this.files.forEach((item) => { + this.$download.resource(item); + }); + }, }, }; diff --git a/ruoyi-ui/src/views/project/materialSeal/projectMaterialSealDrawer.vue b/ruoyi-ui/src/views/project/materialSeal/projectMaterialSealDrawer.vue new file mode 100644 index 00000000..5b4e2111 --- /dev/null +++ b/ruoyi-ui/src/views/project/materialSeal/projectMaterialSealDrawer.vue @@ -0,0 +1,586 @@ + + + + diff --git a/ruoyi-ui/src/views/project/projectChecking/index.vue b/ruoyi-ui/src/views/project/projectChecking/index.vue index 10c6f8ee..44506ccf 100644 --- a/ruoyi-ui/src/views/project/projectChecking/index.vue +++ b/ruoyi-ui/src/views/project/projectChecking/index.vue @@ -147,7 +147,7 @@ show-overflow-tooltip /> { - this.deptUserData = d.data; - }); }); + this.$api.publics + .selectProjectUnitUser({ + projectId: row.projectId, + }) + .then((d) => { + this.deptUserData = d.data; + }); }, /** 提交按钮 */ submitForm() { diff --git a/ruoyi-ui/src/views/project/projectChecking/projectCheckingDrawer.vue b/ruoyi-ui/src/views/project/projectChecking/projectCheckingDrawer.vue index c89a8483..0e26f889 100644 --- a/ruoyi-ui/src/views/project/projectChecking/projectCheckingDrawer.vue +++ b/ruoyi-ui/src/views/project/projectChecking/projectCheckingDrawer.vue @@ -67,7 +67,11 @@ @queryTable="getList" > - + @@ -789,6 +804,8 @@ import attendanceDrawer from "../surProjectAttendance/attendanceDrawer.vue"; import projectDeptWroksDrawer from "../projectDeptWroks/projectDeptWroksDrawer.vue"; import insuranceDrawer from "../surProjectInsurance/insuranceDrawer.vue"; import projectCheckingDrawer from "../projectChecking/projectCheckingDrawer.vue"; +import materialSealDrawer from "../materialSeal/projectMaterialSealDrawer.vue"; +import projectMeasureDrawer from "../projectMeasure/projectMeasureDrawer.vue"; import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数 export default { @@ -806,6 +823,8 @@ export default { projectDeptWroksDrawer, insuranceDrawer, projectCheckingDrawer, + materialSealDrawer, + projectMeasureDrawer, }, dicts: [ "sys_check_state", @@ -1046,6 +1065,12 @@ export default { case "handleProjectChecking": this.$refs.projectChecking.show(row); break; + case "handleProjectMeasure": + this.$refs.projectMeasure.show(row); + break; + case "handleProjectMaterialSeal": + this.$refs.materialSeal.show(row); + break; default: break; } diff --git a/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue b/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue index 2d29d8e9..6d8ba807 100644 --- a/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue +++ b/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue @@ -39,7 +39,11 @@ @queryTable="getList" > - + - - diff --git a/ruoyi-wechat/src/main/resources/application.yml b/ruoyi-wechat/src/main/resources/application.yml index e737a549..422523cf 100644 --- a/ruoyi-wechat/src/main/resources/application.yml +++ b/ruoyi-wechat/src/main/resources/application.yml @@ -61,7 +61,7 @@ spring: servlet: multipart: # 单个文件大小 - max-file-size: 500MB + max-file-size: 100MB # 设置总上传的文件大小 max-request-size: 500MB # 服务模块 diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectMaterialSeal.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectMaterialSeal.java index a7807d99..7c9cacc9 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectMaterialSeal.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectMaterialSeal.java @@ -34,7 +34,7 @@ public class SurProjectMaterialSeal extends BaseEntity /** 图片集合 */ @Excel(name = "图片集合") - private String imgUrls; + private String imageUrls; /** 封样名称 */ @Excel(name = "封样名称") @@ -108,14 +108,14 @@ public class SurProjectMaterialSeal extends BaseEntity { return mainImage; } - public void setImgUrls(String imgUrls) + public void setImageUrls(String imageUrls) { - this.imgUrls = imgUrls; + this.imageUrls = imageUrls; } - public String getImgUrls() + public String getImageUrls() { - return imgUrls; + return imageUrls; } public void setMaterialName(String materialName) { @@ -213,7 +213,7 @@ public class SurProjectMaterialSeal extends BaseEntity .append("projectId", getProjectId()) .append("deptId", getDeptId()) .append("mainImage", getMainImage()) - .append("imgUrls", getImgUrls()) + .append("imageUrls", getImageUrls()) .append("materialName", getMaterialName()) .append("usePosition", getUsePosition()) .append("contractBrand", getContractBrand()) diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectUnitInfo.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectUnitInfo.java index e2cff23a..142dcaa6 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectUnitInfo.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectUnitInfo.java @@ -55,6 +55,8 @@ public class SurProjectUnitInfo extends BaseEntity /** 删除状态(0 未删除 1 已删除) */ private Long delFlag; + private List unitTypes; + private String unitTypeName; private List userinfoList; @@ -172,6 +174,14 @@ public class SurProjectUnitInfo extends BaseEntity this.userinfoList = userinfoList; } + public List getUnitTypes() { + return unitTypes; + } + + public void setUnitTypes(List unitTypes) { + this.unitTypes = unitTypes; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMaterialSealServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMaterialSealServiceImpl.java index aae6e08a..63cb0102 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMaterialSealServiceImpl.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMaterialSealServiceImpl.java @@ -1,6 +1,8 @@ package com.yanzhu.jh.project.service.impl; import java.util.List; + +import com.ruoyi.common.enums.PublicStateEnum; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -53,6 +55,8 @@ public class SurProjectMaterialSealServiceImpl implements ISurProjectMaterialSea @Override public int insertSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal) { + surProjectMaterialSeal.setIsDel(PublicStateEnum.OK.getCode()); + surProjectMaterialSeal.setMainImage(surProjectMaterialSeal.getImageUrls().split(",")[0]); surProjectMaterialSeal.setCreateBy(SecurityUtils.getUsername()); surProjectMaterialSeal.setCreateTime(DateUtils.getNowDate()); return surProjectMaterialSealMapper.insertSurProjectMaterialSeal(surProjectMaterialSeal); @@ -67,6 +71,7 @@ public class SurProjectMaterialSealServiceImpl implements ISurProjectMaterialSea @Override public int updateSurProjectMaterialSeal(SurProjectMaterialSeal surProjectMaterialSeal) { + surProjectMaterialSeal.setMainImage(surProjectMaterialSeal.getImageUrls().split(",")[0]); surProjectMaterialSeal.setUpdateBy(SecurityUtils.getUsername()); surProjectMaterialSeal.setUpdateTime(DateUtils.getNowDate()); return surProjectMaterialSealMapper.updateSurProjectMaterialSeal(surProjectMaterialSeal); diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMeasureServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMeasureServiceImpl.java index bd8c1bcc..b53e4684 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMeasureServiceImpl.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectMeasureServiceImpl.java @@ -1,6 +1,8 @@ package com.yanzhu.jh.project.service.impl; import java.util.List; + +import com.ruoyi.common.enums.PublicStateEnum; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -53,6 +55,8 @@ public class SurProjectMeasureServiceImpl implements ISurProjectMeasureService @Override public int insertSurProjectMeasure(SurProjectMeasure surProjectMeasure) { + surProjectMeasure.setMainImage(surProjectMeasure.getImageUrls().split(",")[0]); + surProjectMeasure.setIsDel(PublicStateEnum.OK.getCode()); surProjectMeasure.setCreateBy(SecurityUtils.getUsername()); surProjectMeasure.setCreateTime(DateUtils.getNowDate()); return surProjectMeasureMapper.insertSurProjectMeasure(surProjectMeasure); @@ -67,6 +71,7 @@ public class SurProjectMeasureServiceImpl implements ISurProjectMeasureService @Override public int updateSurProjectMeasure(SurProjectMeasure surProjectMeasure) { + surProjectMeasure.setMainImage(surProjectMeasure.getImageUrls().split(",")[0]); surProjectMeasure.setUpdateBy(SecurityUtils.getUsername()); surProjectMeasure.setUpdateTime(DateUtils.getNowDate()); return surProjectMeasureMapper.updateSurProjectMeasure(surProjectMeasure); diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMaterialSealMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMaterialSealMapper.xml index 4c995109..95491d4d 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMaterialSealMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMaterialSealMapper.xml @@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select spme.id, spme.project_id, spme.dept_id, spme.main_image, spme.img_urls, spme.material_name, spme.use_position, spme.contract_brand, spme.use_brand, spme.seal_date, spme.sign_files, spme.alteration_files, spme.is_del, spme.create_by, spme.create_time, spme.update_by, spme.update_time, spme.remark, sp.projectName, sd.dept_name from sur_project_material_seal spme + select spme.id, spme.project_id, spme.dept_id, spme.main_image, spme.image_urls, spme.material_name, spme.use_position, spme.contract_brand, spme.use_brand, spme.seal_date, spme.sign_files, spme.alteration_files, spme.is_del, spme.create_by, spme.create_time, spme.update_by, spme.update_time, spme.remark, sp.projectName, sd.dept_name from sur_project_material_seal spme left join sur_project sp on spme.project_id = sp.id left join sys_dept sd on sd.dept_id = spme.dept_id @@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and spme.is_del='0' and spme.project_id = #{projectId} and spme.dept_id = #{deptId} - and spme.img_urls = #{imgUrls} + and spme.image_urls = #{imageUrls} and spme.material_name like concat('%', #{materialName}, '%') and spme.use_position like concat('%', #{usePosition}, '%') and spme.contract_brand like concat('%', #{contractBrand}, '%') @@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" project_id, dept_id, main_image, - img_urls, + image_urls, material_name, use_position, contract_brand, @@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{projectId}, #{deptId}, #{mainImage}, - #{imgUrls}, + #{imageUrls}, #{materialName}, #{usePosition}, #{contractBrand}, @@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" project_id = #{projectId}, dept_id = #{deptId}, main_image = #{mainImage}, - img_urls = #{imgUrls}, + image_urls = #{imageUrls}, material_name = #{materialName}, use_position = #{usePosition}, contract_brand = #{contractBrand}, diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml index 25da54f5..a5c90863 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml @@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select spm.id, spm.project_id, spm.dept_id, spm.main_image, spm.image_urls, spm.measure_type, spm.measure_position, spm.measure_info, spm.measure_time, spm.measure_point_position, spm.measure_result, spm.measure_files, spm.quality_user, spm.quality_user_name, spm.supervise_user, spm.supervise_user_name, spm.is_del, spm.create_by, spm.create_time, spm.update_by, spm.update_time, spm.remark, sp.prijectName, sd.dept_name from sur_project_measure spm + select spm.id, spm.project_id, spm.dept_id, spm.main_image, spm.image_urls, spm.measure_type, spm.measure_position, spm.measure_info, spm.measure_time, spm.measure_point_position, spm.measure_result, spm.measure_files, spm.quality_user, spm.quality_user_name, spm.supervise_user, spm.supervise_user_name, spm.is_del, spm.create_by, spm.create_time, spm.update_by, spm.update_time, spm.remark, sp.projectName, sd.dept_name from sur_project_measure spm left join sur_project sp on spm.project_id = sp.id left join sys_dept sd on sd.dept_id = spm.dept_id diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml index 17f85fae..3bb7261c 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml @@ -38,6 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and spui.createUser = #{createUser} and spui.createTime = #{createTime} and spui.unitId != #{nowDept} + + and spui.unitType in + + #{type} + +