This commit is contained in:
xd 2024-04-07 14:36:31 +08:00
parent f7808ef72f
commit 1ca13b5f12
3 changed files with 140 additions and 59 deletions

View File

@ -205,4 +205,21 @@ public class QuotController extends BaseController
} }
} }
/**
* 报价单提交技术协助
*/
@PreAuthorize("@ss.hasPermi('quot:quot:assist')")
@Log(title = "报价单提交技术协助", businessType = BusinessType.OTHER)
@PostMapping("/commitJsQuot")
public AjaxResult commitJsQuot(@RequestBody Quot quot)
{
String quotJsxzGroup = quot.getQuotJsxzGroup();
if(StringUtils.isEmpty(quotJsxzGroup)){
return error("请先选择分组");
}else{
}
return success();
}
} }

View File

@ -70,3 +70,12 @@ export function commitQuot(data) {
}) })
} }
//提交技术协助
export function commitJsQuot(data) {
return request({
url: '/quot/quot/commitJsQuot',
method: 'post',
data: data
})
}

View File

@ -157,14 +157,14 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="联系电话" prop="quotPhone"> <el-form-item label="联系电话" prop="quotPhone">
<el-input v-model="form.quotPhone" placeholder="请输入联系电话" :disabled="this.form.quotApprovalStatus != '0'"/> <el-input v-model="form.quotPhone" placeholder="请输入联系电话" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="16"> <el-col :span="16">
<el-form-item label="地址" prop="quotAddress"> <el-form-item label="地址" prop="quotAddress">
<el-input v-model="form.quotAddress" placeholder="请输入地址" :disabled="this.form.quotApprovalStatus != '0'"/> <el-input v-model="form.quotAddress" placeholder="请输入地址" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -176,7 +176,7 @@
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="16"> <el-col :span="16">
<el-form-item label="项目名称" prop="quotProject"> <el-form-item label="项目名称" prop="quotProject">
<el-input type="textarea" autosize v-model="form.quotProject" placeholder="请输入项目名称" :disabled="this.form.quotApprovalStatus != '0'"/> <el-input type="textarea" autosize v-model="form.quotProject" placeholder="请输入项目名称" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -188,7 +188,7 @@
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="报价要求" prop="quotQuotationRequire"> <el-form-item label="报价要求" prop="quotQuotationRequire">
<el-input type="textarea" autosize v-model="form.quotQuotationRequire" placeholder="请输入报价要求" :disabled="this.form.quotApprovalStatus != '0'"/> <el-input type="textarea" autosize v-model="form.quotQuotationRequire" placeholder="请输入报价要求" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -263,7 +263,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="fileTime" label="上传时间"></el-table-column> <el-table-column prop="fileTime" label="上传时间"></el-table-column>
<el-table-column width="150px" label="操作" v-hasPermi="['quot:quot:add']" v-if="form.quotApprovalStatus == '0'"> <el-table-column width="150px" label="操作" v-if="form.quotApprovalStatus == '0'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text"> <el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a> <a @click="downloadFile(scope.row.fileUrl)">下载</a>
@ -308,26 +308,12 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="16">
<el-form-item label="技术规范要求" prop="quotJsxzStandard">
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="技术确认单号" prop="quotJsxzConfirmCode"> <el-form-item label="技术确认单号" prop="quotJsxzConfirmCode">
<el-input v-model="form.quotJsxzConfirmCode" placeholder="系统自动生成" :disabled="true" /> <el-input v-model="form.quotJsxzConfirmCode" placeholder="系统自动生成" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="16">
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="技术要求" prop="quotJsxzTechnicalRequirement">
<el-input v-model="form.quotJsxzTechnicalRequirement" placeholder="请输入技术要求"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="分组" prop="quotJsxzGroup"> <el-form-item label="分组" prop="quotJsxzGroup">
<el-select v-model="form.quotJsxzGroup" multiple placeholder="请选择" style="width: 100%"> <el-select v-model="form.quotJsxzGroup" multiple placeholder="请选择" style="width: 100%">
<el-option <el-option
@ -340,13 +326,62 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="技术要求" prop="quotJsxzTechnicalRequirement">
<el-input type="textarea" autosize v-model="form.quotJsxzTechnicalRequirement" placeholder="请输入技术要求"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="技术规范要求" prop="quotJsxzStandard">
<el-upload class="upload-demo"
ref="upload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotJsgfFile' }"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotJsxzApprovalStatus == '0'">
<el-button slot="trigger" size="small" type="primary">上传文件</el-button>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<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="fileSize" label="文件大小" width="100px">
<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="上传时间"></el-table-column>
<el-table-column width="150px" label="操作" v-if="form.quotJsxzApprovalStatus == '0'">
<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-col>
</el-row>
<el-divider content-position="center">特缆协助</el-divider> <el-divider content-position="center">特缆协助</el-divider>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="特缆协助状态" prop="quotJsxzTlApprovalStatus"> <el-form-item label="特缆协助状态" prop="quotJsxzTlApprovalStatus">
<el-select v-model="form.quotJsxzTlApprovalStatus" :disabled="true"> <el-select v-model="form.quotJsxzTlApprovalStatus" :disabled="true">
<el-option <el-option
v-for="dict in dict.type.quot_approval_status" v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -373,7 +408,7 @@
<el-form-item label="低压协助状态" prop="quotJsxzDyApprovalStatus"> <el-form-item label="低压协助状态" prop="quotJsxzDyApprovalStatus">
<el-select v-model="form.quotJsxzDyApprovalStatus" :disabled="true"> <el-select v-model="form.quotJsxzDyApprovalStatus" :disabled="true">
<el-option <el-option
v-for="dict in dict.type.quot_approval_status" v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -400,7 +435,7 @@
<el-form-item label="中压协助状态" prop="quotJsxzZyApprovalStatus"> <el-form-item label="中压协助状态" prop="quotJsxzZyApprovalStatus">
<el-select v-model="form.quotJsxzZyApprovalStatus" :disabled="true"> <el-select v-model="form.quotJsxzZyApprovalStatus" :disabled="true">
<el-option <el-option
v-for="dict in dict.type.quot_approval_status" v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -427,7 +462,7 @@
<el-form-item label="其他协助状态" prop="quotJsxzQtApprovalStatus"> <el-form-item label="其他协助状态" prop="quotJsxzQtApprovalStatus">
<el-select v-model="form.quotJsxzQtApprovalStatus" :disabled="true"> <el-select v-model="form.quotJsxzQtApprovalStatus" :disabled="true">
<el-option <el-option
v-for="dict in dict.type.quot_approval_status" v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -459,7 +494,7 @@
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
v-if="this.form.quotApprovalStatus == '1'"> v-if="this.form.quotApprovalStatus == '2'">
<el-button slot="trigger" size="small" type="primary">上传文件</el-button> <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
</el-upload> </el-upload>
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px"> <el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
@ -484,9 +519,9 @@
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<div v-hasPermi="['quot:quot:save']"><el-button @click="saveForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></div> <span v-hasPermi="['quot:quot:save']"><el-button @click="saveForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></span>
<div v-hasPermi="['quot:quot:commit']"><el-button type="primary" plain @click="commitForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></div> <span style="margin-left: 10px" v-hasPermi="['quot:quot:commit']"><el-button type="primary" plain @click="commitForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></span>
<div v-hasPermi="['quot:quot:assist']"><el-button type="warning" plain @click="commitJsForm" v-if="this.form.quotApprovalStatus == '1'">提交技术协助</el-button></div> <span v-hasPermi="['quot:quot:assist']"><el-button type="warning" plain @click="commitJsForm" v-if="this.form.quotApprovalStatus == '1'">提交技术协助</el-button></span>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -509,13 +544,13 @@
} }
</style> </style>
<script> <script>
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot } from "@/api/quot/quot"; import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot } from "@/api/quot/quot";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { checkPermi } from '@/utils/permission' // import { checkPermi } from '@/utils/permission' //
export default { export default {
name: "Quot", name: "Quot",
dicts: ['quot_approval_status','quot_jsxz_group','quot_jsxz_chapter'], dicts: ['quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status'],
data() { data() {
return { return {
// //
@ -543,6 +578,8 @@ export default {
quotXjFileList: [], quotXjFileList: [],
// - // -
quotFkFileList: [], quotFkFileList: [],
// -
quotJsgfFileList: [],
//- //-
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile", uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
//- //-
@ -630,6 +667,7 @@ export default {
this.quotMaterialList = []; this.quotMaterialList = [];
this.quotXjFileList = []; this.quotXjFileList = [];
this.quotFkFileList = []; this.quotFkFileList = [];
this.quotJsgfFileList = [];
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -668,14 +706,14 @@ export default {
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.form = response.data;
this.$set(this.form, "quotJsxzGroup", this.form.quotJsxzGroup.split(',')); this.$set(this.form, "quotJsxzGroup", this.form.quotJsxzGroup==null?[]:this.form.quotJsxzGroup.split(','));
this.quotMaterialList = response.data.quotMaterialList; this.quotMaterialList = response.data.quotMaterialList;
this.open = true; this.open = true;
this.title = "修改报价"; this.title = "修改报价";
this.activeName = "quotInfo"; this.activeName = "quotInfo";
this.getQuotXjFileList(); this.getQuotXjFileList();
this.getQuotJsgfFileList();
this.getQuotFkFileList(); this.getQuotFkFileList();
}); });
}, },
/** 保存按钮 */ /** 保存按钮 */
@ -683,8 +721,8 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
//- //-
let quotJsxzGroups = ''; let quotJsxzGroups = null;
if(this.form.quotJsxzGroup.length>0){ if(this.form.quotJsxzGroup){
this.form.quotJsxzGroup.forEach(function (item,index) { this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){ if(index !== 0){
quotJsxzGroups+=','; quotJsxzGroups+=',';
@ -715,8 +753,8 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
//- //-
let quotJsxzGroups = ''; let quotJsxzGroups = null;
if(this.form.quotJsxzGroup.length>0){ if(this.form.quotJsxzGroup){
this.form.quotJsxzGroup.forEach(function (item,index) { this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){ if(index !== 0){
quotJsxzGroups+=','; quotJsxzGroups+=',';
@ -739,27 +777,24 @@ export default {
checkPermi, checkPermi,
/** 报价组提交技术协助按钮 */ /** 报价组提交技术协助按钮 */
commitJsForm() { commitJsForm() {
this.$refs["form"].validate(valid => {
if (valid) { //-
//- let quotJsxzGroups = null;
let quotJsxzGroups = ''; if(this.form.quotJsxzGroup){
if(this.form.quotJsxzGroup.length>0){ this.form.quotJsxzGroup.forEach(function (item,index) {
this.form.quotJsxzGroup.forEach(function (item,index) { if(index !== 0){
if(index !== 0){ quotJsxzGroups+=',';
quotJsxzGroups+=','; }
} quotJsxzGroups+=item;
quotJsxzGroups+=item; })
})
}
this.form.quotJsxzGroup = quotJsxzGroups;
this.form.quotMaterialList = this.quotMaterialList;
commitQuot(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
} }
}); this.form.quotJsxzGroup = quotJsxzGroups;
this.form.quotMaterialList = this.quotMaterialList;
commitJsQuot(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
@ -823,14 +858,27 @@ export default {
this.quotFkFileList = response.rows; this.quotFkFileList = response.rows;
}); });
}, },
//-
getQuotJsgfFileList(){
const param = {relationId:this.form.quotId,fileType:'quotJsgfFile'}
quotFileList(param).then(response => {
this.quotJsgfFileList = response.rows;
});
},
// //
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
debugger let activeName = this.activeName;
// //
if (res.code == 200) { if (res.code == 200) {
this.$modal.msgSuccess(res.msg); this.$modal.msgSuccess(res.msg);
this.getQuotXjFileList(); if(activeName=='quotXjFile'){
this.getQuotXjFileList();
}else if(activeName=='quotJsInfo'){
this.getQuotJsgfFileList();
}else if(activeName=='quotFkFile'){
this.getQuotFkFileList();
}
} else { } else {
this.$modal.msgError(res.msg); this.$modal.msgError(res.msg);
} }
@ -844,8 +892,15 @@ export default {
// //
deleteFile(fileId){ deleteFile(fileId){
let activeName = this.activeName;
quotFileDelete(fileId).then(response => { quotFileDelete(fileId).then(response => {
this.getQuotXjFileList(); if(activeName=='quotXjFile'){
this.getQuotXjFileList();
}else if(activeName=='quotJsInfo'){
this.getQuotJsgfFileList();
}else if(activeName=='quotFkFile'){
this.getQuotFkFileList();
}
}); });
} }
/*********************************附件上传*****************************************/ /*********************************附件上传*****************************************/