新增错误修订功能

This commit is contained in:
xd 2024-05-23 20:11:45 +08:00
parent 17310a3150
commit 293ea04c85
3 changed files with 171 additions and 79 deletions

View File

@ -96,6 +96,18 @@ public class QuotController extends BaseController
return success(quotService.selectQuotByQuotId(quotId)); return success(quotService.selectQuotByQuotId(quotId));
} }
/**
* 获取报价详细信息-错误修订
*/
@PreAuthorize("@ss.hasPermi('quot:quot:returnUpdate')")
@GetMapping(value = "/returnUpdate/{quotId}")
public AjaxResult getReturnUpdateInfo(@PathVariable("quotId") String quotId)
{
Quot quot = quotService.selectQuotByQuotId(quotId);
quot.setQuotApprovalStatus("1");// 提交状态设置为 协助中
return success(quot);
}
/** /**
* 导出产品明细模板 * 导出产品明细模板
* @param response * @param response

View File

@ -17,6 +17,14 @@ export function getQuot(quotId) {
}) })
} }
// 查询报价详细-错判修订
export function getReturnUpdateQuot(quotId) {
return request({
url: '/quot/quot/returnUpdate/' + quotId,
method: 'get'
})
}
// 新增报价 // 新增报价
export function addQuot(data) { export function addQuot(data) {
return request({ return request({

View File

@ -84,6 +84,17 @@
v-hasPermi="['quot:quot:export']" v-hasPermi="['quot:quot:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleReturnUpdate"
v-hasPermi="['quot:quot:returnUpdate']"
>错误修订</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -148,6 +159,48 @@
报价单信息<span style="color:red;margin-left:25px">(此报价单数据型号规格电压等如需下单或签订合同引用请再次自行核对责任自负)</span> 报价单信息<span style="color:red;margin-left:25px">(此报价单数据型号规格电压等如需下单或签订合同引用请再次自行核对责任自负)</span>
</template> </template>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-divider content-position="left" class="customer_divider_text">当前协助情况</el-divider>
<el-row>
<el-col :span="8">
<el-form-item label="提交状态" prop="quotApprovalStatus">
<el-select v-model="this.form.quotApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<div v-if="checkPermi(['quot:quot:assist'])">
<el-col :span="8">
<el-form-item label="技术协助状态" prop="quotJsxzApprovalStatus">
<el-select v-model="this.form.quotJsxzApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="核价协助状态" prop="quotHjApprovalStatus">
<el-select v-model="this.form.quotHjApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_hj_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</div>
</el-row>
<el-divider content-position="left" class="customer_divider_text">报价信息</el-divider> <el-divider content-position="left" class="customer_divider_text">报价信息</el-divider>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="10"> <el-col :span="10">
@ -230,13 +283,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
<el-col :span="24">
<el-form-item label="反馈说明" prop="quotFeedbackExplanation">
<el-input type="textarea" autosize v-model="form.quotFeedbackExplanation" placeholder="报价组填写"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"> <el-row :gutter="8" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="总数量" prop="quotQuantity"> <el-form-item label="总数量" prop="quotQuantity">
@ -249,6 +295,46 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
<el-col :span="24">
<el-form-item label="反馈说明" prop="quotFeedbackExplanation">
<el-input type="textarea" autosize v-model="form.quotFeedbackExplanation" placeholder="报价组填写"/>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left" class="customer_divider_text">反馈附件</el-divider>
<div v-hasPermi="['quot:quot:quotFkFile']" >
<el-upload class="upload-demo"
ref="upload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotApprovalStatus == '1'">
<el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button>
</el-upload>
</div>
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="300px">
<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 size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button size="small" type="text" @click="deleteFile(scope.row.fileId,'quotFkFile')" v-if="form.quotApprovalStatus == '1'">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-divider content-position="left" class="customer_divider_text">产品信息</el-divider> <el-divider content-position="left" class="customer_divider_text">产品信息</el-divider>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -304,10 +390,10 @@
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
v-if="this.form.quotApprovalStatus == '0'"> v-if="this.form.quotApprovalStatus == '0'">
<el-button size="small" type="primary">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px"> <el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="300px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column> <el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -322,7 +408,7 @@
<a @click="downloadFile(scope.row.fileUrl)">下载</a> <a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button> </el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'"> <el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
<a @click="deleteFile(scope.row.fileId)">删除</a> <a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -408,12 +494,12 @@
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
v-if="this.form.quotJsxzApprovalStatus == '0'"> v-if="this.form.quotJsxzApprovalStatus == '0'">
<el-button size="small" type="primary">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8"> <el-row :gutter="8" class="mt5">
<el-col :span="24"> <el-col :span="24">
<el-table class="down" :data="quotJsgfFileList" border stripe style="width: 100%;" height="150px"> <el-table class="down" :data="quotJsgfFileList" border stripe style="width: 100%;" height="150px">
<el-table-column prop="fileName" label="文件名称" width="450px"></el-table-column> <el-table-column prop="fileName" label="文件名称" width="450px"></el-table-column>
@ -430,7 +516,7 @@
<a @click="downloadFile(scope.row.fileUrl)">下载</a> <a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button> </el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotJsxzApprovalStatus == '0'"> <el-button :key="Math.random()" size="small" type="text" v-if="form.quotJsxzApprovalStatus == '0'">
<a @click="deleteFile(scope.row.fileId)">删除</a> <a @click="deleteFile(scope.row.fileId,'quotJsgfFile')">删除</a>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -619,39 +705,6 @@
</el-row> </el-row>
</div> </div>
<el-divider content-position="left" class="customer_divider_text">反馈附件</el-divider>
<div v-hasPermi="['quot:quot:quotFkFile']">
<el-upload class="upload-demo"
ref="upload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotApprovalStatus == '1'">
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</div>
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
<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 size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button size="small" type="text" @click="deleteFile(scope.row.fileId)" v-if="form.quotApprovalStatus == '1'">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--<el-tabs v-model="activeName" tab-position="left" style="margin-left: 15px; margin-right: 15px;height: 480px;"> <!--<el-tabs v-model="activeName" tab-position="left" style="margin-left: 15px; margin-right: 15px;height: 480px;">
<el-tab-pane label="报价信息" name="quotInfo"> <el-tab-pane label="报价信息" name="quotInfo">
<el-row :gutter="8"> <el-row :gutter="8">
@ -1166,7 +1219,7 @@
v-if="uploadDis"> v-if="uploadDis">
<el-button size="small" type="primary">上传文件</el-button> <el-button size="small" type="primary">上传文件</el-button>
</el-upload>--> </el-upload>-->
<el-table class="down" :data="quotJsqrFileList" border stripe style="width: 100%;margin-top: 20px;" height="200px"> <el-table class="down" :data="quotJsqrFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column> <el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -1271,7 +1324,7 @@
</style> </style>
<script> <script>
import { NumberAdd } from '@/utils/number';// import { NumberAdd } from '@/utils/number';//
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot"; import { listQuot, getQuot, getReturnUpdateQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { checkPermi } from '@/utils/permission';// import { checkPermi } from '@/utils/permission';//
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
@ -1519,37 +1572,51 @@ export default {
this.reset(); this.reset();
const quotId = row.quotId || this.ids const quotId = row.quotId || this.ids
getQuot(quotId).then(response => { getQuot(quotId).then(response => {
this.form = response.data; this.setInfo(response);
this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
this.quotMaterialList = response.data.quotMaterialList;
this.open = true;
this.activeName = "quotInfo";
const quotJsxzGroup = this.form.quotJsxzGroupValues;
if(quotJsxzGroup){
if(quotJsxzGroup.indexOf("TL")!==-1){
this.showTl = true;
this.getQuotJsqrFileList('quotJsqrTlFkFile');
}
if(quotJsxzGroup.indexOf("DY")!==-1){
this.showDy = true;
this.getQuotJsqrFileList('quotJsqrDyFkFile');
}
if(quotJsxzGroup.indexOf("ZY")!==-1){
this.showZy = true;
this.getQuotJsqrFileList('quotJsqrZyFkFile');
}
if(quotJsxzGroup.indexOf("QT")!==-1){
this.showQt = true;
this.getQuotJsqrFileList('quotJsqrQtFkFile');
}
}
this.getQuotXjFileList();
this.getQuotJsgfFileList();
this.getQuotHjFileList();
this.getQuotFkFileList();
}); });
}, },
/** 错误修订按钮操作 */
handleReturnUpdate(row) {
this.reset();
const quotId = row.quotId || this.ids
getReturnUpdateQuot(quotId).then(response => {
this.setInfo(response);
});
},
/** 修改按钮操作-详细信息设置 */
setInfo(response){
this.form = response.data;
this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
this.quotMaterialList = response.data.quotMaterialList;
this.open = true;
this.activeName = "quotInfo";
const quotJsxzGroup = this.form.quotJsxzGroupValues;
if(quotJsxzGroup){
if(quotJsxzGroup.indexOf("TL")!==-1){
this.showTl = true;
this.getQuotJsqrFileList('quotJsqrTlFkFile');
}
if(quotJsxzGroup.indexOf("DY")!==-1){
this.showDy = true;
this.getQuotJsqrFileList('quotJsqrDyFkFile');
}
if(quotJsxzGroup.indexOf("ZY")!==-1){
this.showZy = true;
this.getQuotJsqrFileList('quotJsqrZyFkFile');
}
if(quotJsxzGroup.indexOf("QT")!==-1){
this.showQt = true;
this.getQuotJsqrFileList('quotJsqrQtFkFile');
}
}
this.getQuotXjFileList();
this.getQuotJsgfFileList();
this.getQuotHjFileList();
this.getQuotFkFileList();
},
/** 产品数据导入按钮操作 */ /** 产品数据导入按钮操作 */
handleImport() { handleImport() {
@ -1811,6 +1878,11 @@ export default {
this.getQuotJsqrFileList(this.fileType); this.getQuotJsqrFileList(this.fileType);
}, },
//
uploadFile(activeName){
this.activeName = activeName
},
// //
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
let activeName = this.activeName; let activeName = this.activeName;
@ -1836,8 +1908,8 @@ export default {
}, },
// //
deleteFile(fileId){ deleteFile(fileId,activeName){
let activeName = this.activeName; //let activeName = this.activeName;
quotFileDelete(fileId).then(response => { quotFileDelete(fileId).then(response => {
if(activeName=='quotXjFile'){ if(activeName=='quotXjFile'){
this.getQuotXjFileList(); this.getQuotXjFileList();