This commit is contained in:
xd 2024-04-08 15:56:14 +08:00
parent c561ce2def
commit d492b3f29d
5 changed files with 196 additions and 5 deletions

View File

@ -122,7 +122,7 @@ public class QuotController extends BaseController
/** /**
* 头像上传SysNoticeMapper * 头像上传SysNoticeMapper
*/ */
@PreAuthorize("@ss.hasPermi('quot:quot:list')") @PreAuthorize("@ss.hasAnyPermi('quot:quot:list,jsqr:jsqr:list')")
@Log(title = "上传报价附件", businessType = BusinessType.INSERT) @Log(title = "上传报价附件", businessType = BusinessType.INSERT)
@PostMapping("/quotFile") @PostMapping("/quotFile")
public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("relation_id") String relation_id,@RequestParam("file_type") String file_type) throws Exception public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("relation_id") String relation_id,@RequestParam("file_type") String file_type) throws Exception
@ -170,7 +170,7 @@ public class QuotController extends BaseController
/** /**
* 删除附件列表 * 删除附件列表
*/ */
@PreAuthorize("@ss.hasPermi('quot:quot:list')") @PreAuthorize("@ss.hasAnyPermi('quot:quot:list,jsqr:jsqr:list')")
@PostMapping("/quotFileDelete") @PostMapping("/quotFileDelete")
public AjaxResult quotFileDelete(QuotFile quotFile) { public AjaxResult quotFileDelete(QuotFile quotFile) {
String fileId = quotFile.getFileId(); String fileId = quotFile.getFileId();
@ -230,15 +230,19 @@ public class QuotController extends BaseController
//特缆低压中压其他 协助状态设置 //特缆低压中压其他 协助状态设置
if(quotJsxzGroup.indexOf("TL")!=-1){ if(quotJsxzGroup.indexOf("TL")!=-1){
quotJsqr.setQuotJsqrTlApprovalStatus("1"); quotJsqr.setQuotJsqrTlApprovalStatus("1");
quotJsqr.setQuotJsqrTlOperateStatus("0");
} }
if(quotJsxzGroup.indexOf("DY")!=-1){ if(quotJsxzGroup.indexOf("DY")!=-1){
quotJsqr.setQuotJsqrDyApprovalStatus("1"); quotJsqr.setQuotJsqrDyApprovalStatus("1");
quotJsqr.setQuotJsqrDyOperateStatus("0");
} }
if(quotJsxzGroup.indexOf("ZY")!=-1){ if(quotJsxzGroup.indexOf("ZY")!=-1){
quotJsqr.setQuotJsqrZyApprovalStatus("1"); quotJsqr.setQuotJsqrZyApprovalStatus("1");
quotJsqr.setQuotJsqrZyOperateStatus("0");
} }
if(quotJsxzGroup.indexOf("QT")!=-1){ if(quotJsxzGroup.indexOf("QT")!=-1){
quotJsqr.setQuotJsqrQtApprovalStatus("1"); quotJsqr.setQuotJsqrQtApprovalStatus("1");
quotJsqr.setQuotJsqrQtOperateStatus("0");
} }
quotJsqr.setCreateBy(getUsername()); quotJsqr.setCreateBy(getUsername());

View File

@ -86,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</where> </where>
order by a.update_time desc
</select> </select>
<select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult"> <select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult">

View File

@ -113,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotJsqrZyApprovalStatus != null and quotJsqrZyApprovalStatus != ''"> and quot_jsqr_zy_approval_status = #{quotJsqrZyApprovalStatus}</if> <if test="quotJsqrZyApprovalStatus != null and quotJsqrZyApprovalStatus != ''"> and quot_jsqr_zy_approval_status = #{quotJsqrZyApprovalStatus}</if>
<if test="quotJsqrQtApprovalStatus != null and quotJsqrQtApprovalStatus != ''"> and quot_jsqr_qt_approval_status = #{quotJsqrQtApprovalStatus}</if> <if test="quotJsqrQtApprovalStatus != null and quotJsqrQtApprovalStatus != ''"> and quot_jsqr_qt_approval_status = #{quotJsqrQtApprovalStatus}</if>
</where> </where>
order by a.update_time desc
</select> </select>
<select id="selectQuotJsqrByQuotJsqrId" parameterType="String" resultMap="QuotJsqrResult"> <select id="selectQuotJsqrByQuotJsqrId" parameterType="String" resultMap="QuotJsqrResult">

View File

@ -342,7 +342,7 @@
</el-row> </el-row>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="技术规范要求" prop="quotJsxzStandard"> <el-form-item label="技术规范要求">
<el-upload class="upload-demo" <el-upload class="upload-demo"
ref="upload" ref="upload"
name="quotFile" name="quotFile"

View File

@ -172,6 +172,14 @@
</el-row> </el-row>
<div v-if="showTl"> <div v-if="showTl">
<el-divider content-position="center">特缆协助</el-divider> <el-divider content-position="center">特缆协助</el-divider>
<div style="margin-bottom: 10px;text-align:right">
<el-button size="mini" type="success" plain>操作人提交</el-button>
<el-button size="mini" type="danger" plain>操作人驳回</el-button>
<el-button size="mini" type="success" plain>审核人提交</el-button>
<el-button size="mini" type="danger" plain>审核人驳回</el-button>
<el-button size="mini" type="success" plain>组长提交</el-button>
<el-button size="mini" type="danger" plain>组长驳回</el-button>
</div>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="特缆协助状态" prop="quotJsqrTlApprovalStatus"> <el-form-item label="特缆协助状态" prop="quotJsqrTlApprovalStatus">
@ -185,6 +193,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="特缆反馈附件" prop="quotJsqrTlRemark">
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrTl')">上传文件 ({{this.quotJsqrTlFileNum}})</el-button>
<!--已上传: {{this.quotJsqrTlFileNum}} -->
</el-form-item>
</el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="特缆协助说明" prop="quotJsqrTlRemark"> <el-form-item label="特缆协助说明" prop="quotJsqrTlRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrTlRemark" placeholder="请输入特缆协助说明" /> <el-input type="textarea" autosize v-model="form.quotJsqrTlRemark" placeholder="请输入特缆协助说明" />
@ -260,6 +276,14 @@
<div v-if="showDy"> <div v-if="showDy">
<el-divider content-position="center">低压协助</el-divider> <el-divider content-position="center">低压协助</el-divider>
<div style="margin-bottom: 10px;text-align:right">
<el-button size="mini" type="success" plain>操作人提交</el-button>
<el-button size="mini" type="danger" plain>操作人驳回</el-button>
<el-button size="mini" type="success" plain>审核人提交</el-button>
<el-button size="mini" type="danger" plain>审核人驳回</el-button>
<el-button size="mini" type="success" plain>组长提交</el-button>
<el-button size="mini" type="danger" plain>组长驳回</el-button>
</div>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="低压协助状态" prop="quotJsqrDyApprovalStatus"> <el-form-item label="低压协助状态" prop="quotJsqrDyApprovalStatus">
@ -273,6 +297,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="低压反馈附件" prop="quotJsqrDyRemark">
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrDy')">上传文件 ({{this.quotJsqrDyFileNum}})</el-button>
<!--已上传: {{this.quotJsqrDyFileNum}} -->
</el-form-item>
</el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="低压协助说明" prop="quotJsqrDyRemark"> <el-form-item label="低压协助说明" prop="quotJsqrDyRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrDyRemark" placeholder="请输入低压协助说明" /> <el-input type="textarea" autosize v-model="form.quotJsqrDyRemark" placeholder="请输入低压协助说明" />
@ -348,6 +380,14 @@
<div v-if="showZy"> <div v-if="showZy">
<el-divider content-position="center">中压协助</el-divider> <el-divider content-position="center">中压协助</el-divider>
<div style="margin-bottom: 10px;text-align:right">
<el-button size="mini" type="success" plain>操作人提交</el-button>
<el-button size="mini" type="danger" plain>操作人驳回</el-button>
<el-button size="mini" type="success" plain>审核人提交</el-button>
<el-button size="mini" type="danger" plain>审核人驳回</el-button>
<el-button size="mini" type="success" plain>组长提交</el-button>
<el-button size="mini" type="danger" plain>组长驳回</el-button>
</div>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="中压协助状态" prop="quotJsqrZyApprovalStatus"> <el-form-item label="中压协助状态" prop="quotJsqrZyApprovalStatus">
@ -361,6 +401,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="中压反馈附件" prop="quotJsqrZyRemark">
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrZy')">上传文件 ({{this.quotJsqrZyFileNum}})</el-button>
<!--已上传: {{this.quotJsqrZyFileNum}} -->
</el-form-item>
</el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="中压协助说明" prop="quotJsqrZyRemark"> <el-form-item label="中压协助说明" prop="quotJsqrZyRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrZyRemark" placeholder="请输入中压协助说明" /> <el-input type="textarea" autosize v-model="form.quotJsqrZyRemark" placeholder="请输入中压协助说明" />
@ -436,6 +484,14 @@
<div v-if="showQt"> <div v-if="showQt">
<el-divider content-position="center">其他协助</el-divider> <el-divider content-position="center">其他协助</el-divider>
<div style="margin-bottom: 10px;text-align:right">
<el-button size="mini" type="success" plain v-if="this.form.quotJsqrTlOperateStatus == 0">操作人提交</el-button>
<el-button size="mini" type="danger" plain v-if="this.form.quotJsqrTlOperateStatus == 0">操作人驳回</el-button>
<el-button size="mini" type="success" plain v-if="this.form.quotJsqrTlOperateStatus == 1">审核人提交</el-button>
<el-button size="mini" type="danger" plain v-if="this.form.quotJsqrTlOperateStatus == 1">审核人驳回</el-button>
<el-button size="mini" type="success" plain v-if="this.form.quotJsqrTlCheckState == 1">组长提交</el-button>
<el-button size="mini" type="danger" plain v-if="this.form.quotJsqrTlCheckState == 1">组长驳回</el-button>
</div>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="其他协助状态" prop="quotJsqrQtApprovalStatus"> <el-form-item label="其他协助状态" prop="quotJsqrQtApprovalStatus">
@ -449,6 +505,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="其他反馈附件" prop="quotJsqrQtRemark">
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrQt')">上传文件 ({{this.quotJsqrQtFileNum}})</el-button>
<!--已上传: {{this.quotJsqrQtFileNum}} -->
</el-form-item>
</el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="其他协助说明" prop="quotJsqrQtRemark"> <el-form-item label="其他协助说明" prop="quotJsqrQtRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrQtRemark" placeholder="请输入其他协助说明" /> <el-input type="textarea" autosize v-model="form.quotJsqrQtRemark" placeholder="请输入其他协助说明" />
@ -521,6 +585,41 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<!-- 反馈附件对话框 -->
<el-dialog class="fkfjDialog" :title="addFileTitle" :visible.sync="addFileOpen" width="800px" append-to-body>
<el-upload class="upload-demo"
ref="upload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotJsqrId,file_type: fileType }"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1">
<el-button slot="trigger" size="small" type="primary">上传文件</el-button>
</el-upload>
<el-table class="down" :data="quotJsqrFileList" border stripe style="width: 100%;margin-top: 20px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
</template>
</el-table-column>
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button :key="Math.random()" size="small" type="text">
<a @click="deleteFile(scope.row.fileId)">删除</a>
</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -540,10 +639,21 @@
height: 500px; height: 500px;
max-height: 580px; /* 设置最大高度,根据需要调整 */ max-height: 580px; /* 设置最大高度,根据需要调整 */
} }
.fkfjDialog .el-dialog__body {
padding: 10px 10px;
color: #606266;
font-size: 14px;
word-break: break-all;
overflow-y: auto; /* 自动显示垂直滚动条 */
height: 300px;
max-height: 380px; /* 设置最大高度,根据需要调整 */
}
</style> </style>
<script> <script>
import { listJsqr, getJsqr, delJsqr, addJsqr, updateJsqr } from "@/api/technicalConfirm/technicalConfirm"; import { listJsqr, getJsqr, delJsqr, addJsqr, updateJsqr } from "@/api/technicalConfirm/technicalConfirm";
import { quotFileList } from "@/api/quot/quot"; import { getToken } from "@/utils/auth";
import { quotFileList,quotFileDelete } from "@/api/quot/quot";
export default { export default {
name: "Jsqr", name: "Jsqr",
@ -564,12 +674,28 @@ export default {
total: 0, total: 0,
// - // -
jsqrList: [], jsqrList: [],
// - // --
quotJsgfFileList: [], quotJsgfFileList: [],
//--
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
//--
headers: {Authorization: "Bearer " + getToken()},
// //
title: "", title: "",
// //
open: false, open: false,
//
addFileOpen: false,
//
addFileTitle: "",
//
quotJsqrFileList: [],
quotJsqrTlFileNum: 0,
quotJsqrDyFileNum: 0,
quotJsqrZyFileNum: 0,
quotJsqrQtFileNum: 0,
//
fileType: null,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -698,15 +824,19 @@ export default {
var quotJsxzGroup = this.form.quotJsxzGroup; var quotJsxzGroup = this.form.quotJsxzGroup;
if(quotJsxzGroup.indexOf("TL")!==-1){ if(quotJsxzGroup.indexOf("TL")!==-1){
this.showTl = true; this.showTl = true;
this.getQuotJsqrFileList('quotJsqrTlFkFile');
} }
if(quotJsxzGroup.indexOf("DY")!==-1){ if(quotJsxzGroup.indexOf("DY")!==-1){
this.showDy = true; this.showDy = true;
this.getQuotJsqrFileList('quotJsqrDyFkFile');
} }
if(quotJsxzGroup.indexOf("ZY")!==-1){ if(quotJsxzGroup.indexOf("ZY")!==-1){
this.showZy = true; this.showZy = true;
this.getQuotJsqrFileList('quotJsqrZyFkFile');
} }
if(quotJsxzGroup.indexOf("QT")!==-1){ if(quotJsxzGroup.indexOf("QT")!==-1){
this.showQt = true; this.showQt = true;
this.getQuotJsqrFileList('quotJsqrQtFkFile');
} }
this.open = true; this.open = true;
@ -761,6 +891,61 @@ export default {
downloadFile(fileUrl){ downloadFile(fileUrl){
window.open(fileUrl, "_blank"); window.open(fileUrl, "_blank");
}, },
//--
getQuotJsqrFileList(fileType){
const param = {relationId:this.form.quotJsqrId,fileType:fileType}
quotFileList(param).then(response => {
this.quotJsqrFileList = response.rows;
if('quotJsqrTlFkFile' == fileType){
this.quotJsqrTlFileNum = response.rows.length;
}else if('quotJsqrDyFkFile' == fileType){
this.quotJsqrDyFileNum = response.rows.length;
}else if('quotJsqrZyFkFile' == fileType){
this.quotJsqrZyFileNum = response.rows.length;
}else if('quotJsqrQtFkFile' == fileType){
this.quotJsqrQtFileNum = response.rows.length;
}
});
},
//
handleAddFile(group){
this.addFileOpen = true;
this.quotJsqrFileList = [];
if("quotJsqrTl"==group){
this.addFileTitle = '特缆反馈附件'
this.fileType = 'quotJsqrTlFkFile';
}else if('quotJsqrDy'==group){
this.addFileTitle = '低压反馈附件'
this.fileType = 'quotJsqrDyFkFile';
}else if('quotJsqrZy'==group){
this.addFileTitle = '中压反馈附件'
this.fileType = 'quotJsqrZyFkFile';
}else if('quotJsqrQt'==group){
this.addFileTitle = '其他反馈附件'
this.fileType = 'quotJsqrQtFkFile';
}
//
this.getQuotJsqrFileList(this.fileType);
},
//
handleAvatarSuccess(res) {
//
if (res.code == 200) {
this.$modal.msgSuccess(res.msg);
this.getQuotJsqrFileList(this.fileType);
} else {
this.$modal.msgError(res.msg);
}
this.$refs.upload.clearFiles(); //****
},
//
deleteFile(fileId){
quotFileDelete(fileId).then(response => {
this.getQuotJsqrFileList(this.fileType);
});
}
} }
}; };
</script> </script>