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 :span="8">
<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-col>
</el-row>
<el-row :gutter="8">
<el-col :span="16">
<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-col>
<el-col :span="8">
@ -176,7 +176,7 @@
<el-row :gutter="8">
<el-col :span="16">
<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-col>
<el-col :span="8">
@ -188,7 +188,7 @@
<el-row :gutter="8">
<el-col :span="24">
<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-col>
</el-row>
@ -263,7 +263,7 @@
</template>
</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">
<el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
@ -308,26 +308,12 @@
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="16">
<el-form-item label="技术规范要求" prop="quotJsxzStandard">
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="技术确认单号" prop="quotJsxzConfirmCode">
<el-input v-model="form.quotJsxzConfirmCode" placeholder="系统自动生成" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<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-col :span="16">
<el-form-item label="分组" prop="quotJsxzGroup">
<el-select v-model="form.quotJsxzGroup" multiple placeholder="请选择" style="width: 100%">
<el-option
@ -340,13 +326,62 @@
</el-form-item>
</el-col>
</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-row :gutter="8">
<el-col :span="8">
<el-form-item label="特缆协助状态" prop="quotJsxzTlApprovalStatus">
<el-select v-model="form.quotJsxzTlApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -373,7 +408,7 @@
<el-form-item label="低压协助状态" prop="quotJsxzDyApprovalStatus">
<el-select v-model="form.quotJsxzDyApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -400,7 +435,7 @@
<el-form-item label="中压协助状态" prop="quotJsxzZyApprovalStatus">
<el-select v-model="form.quotJsxzZyApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -427,7 +462,7 @@
<el-form-item label="其他协助状态" prop="quotJsxzQtApprovalStatus">
<el-select v-model="form.quotJsxzQtApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
v-for="dict in dict.type.quot_jsxz_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -459,7 +494,7 @@
:on-success="handleAvatarSuccess"
:show-file-list="false"
: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-upload>
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
@ -484,9 +519,9 @@
</el-tabs>
</el-form>
<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>
<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>
<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:save']"><el-button @click="saveForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></span>
<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>
<span v-hasPermi="['quot:quot:assist']"><el-button type="warning" plain @click="commitJsForm" v-if="this.form.quotApprovalStatus == '1'">提交技术协助</el-button></span>
</div>
</el-dialog>
</div>
@ -509,13 +544,13 @@
}
</style>
<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 { checkPermi } from '@/utils/permission' //
export default {
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() {
return {
//
@ -543,6 +578,8 @@ export default {
quotXjFileList: [],
// -
quotFkFileList: [],
// -
quotJsgfFileList: [],
//-
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
//-
@ -630,6 +667,7 @@ export default {
this.quotMaterialList = [];
this.quotXjFileList = [];
this.quotFkFileList = [];
this.quotJsgfFileList = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -668,14 +706,14 @@ export default {
const quotId = row.quotId || this.ids
getQuot(quotId).then(response => {
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.open = true;
this.title = "修改报价";
this.activeName = "quotInfo";
this.getQuotXjFileList();
this.getQuotJsgfFileList();
this.getQuotFkFileList();
});
},
/** 保存按钮 */
@ -683,8 +721,8 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
//-
let quotJsxzGroups = '';
if(this.form.quotJsxzGroup.length>0){
let quotJsxzGroups = null;
if(this.form.quotJsxzGroup){
this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){
quotJsxzGroups+=',';
@ -715,8 +753,8 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
//-
let quotJsxzGroups = '';
if(this.form.quotJsxzGroup.length>0){
let quotJsxzGroups = null;
if(this.form.quotJsxzGroup){
this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){
quotJsxzGroups+=',';
@ -739,11 +777,10 @@ export default {
checkPermi,
/** 报价组提交技术协助按钮 */
commitJsForm() {
this.$refs["form"].validate(valid => {
if (valid) {
//-
let quotJsxzGroups = '';
if(this.form.quotJsxzGroup.length>0){
let quotJsxzGroups = null;
if(this.form.quotJsxzGroup){
this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){
quotJsxzGroups+=',';
@ -753,13 +790,11 @@ export default {
}
this.form.quotJsxzGroup = quotJsxzGroups;
this.form.quotMaterialList = this.quotMaterialList;
commitQuot(this.form).then(response => {
commitJsQuot(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
@ -823,14 +858,27 @@ export default {
this.quotFkFileList = response.rows;
});
},
//-
getQuotJsgfFileList(){
const param = {relationId:this.form.quotId,fileType:'quotJsgfFile'}
quotFileList(param).then(response => {
this.quotJsgfFileList = response.rows;
});
},
//
handleAvatarSuccess(res) {
debugger
let activeName = this.activeName;
//
if (res.code == 200) {
this.$modal.msgSuccess(res.msg);
if(activeName=='quotXjFile'){
this.getQuotXjFileList();
}else if(activeName=='quotJsInfo'){
this.getQuotJsgfFileList();
}else if(activeName=='quotFkFile'){
this.getQuotFkFileList();
}
} else {
this.$modal.msgError(res.msg);
}
@ -844,8 +892,15 @@ export default {
//
deleteFile(fileId){
let activeName = this.activeName;
quotFileDelete(fileId).then(response => {
if(activeName=='quotXjFile'){
this.getQuotXjFileList();
}else if(activeName=='quotJsInfo'){
this.getQuotJsgfFileList();
}else if(activeName=='quotFkFile'){
this.getQuotFkFileList();
}
});
}
/*********************************附件上传*****************************************/