This commit is contained in:
xd 2024-04-19 13:25:03 +08:00
parent 086ed793db
commit 78d08bcf9d
5 changed files with 296 additions and 214 deletions

View File

@ -104,7 +104,7 @@ public class QuotJsqrController extends BaseController
/** /**
* 操作人确认事件 * 操作人确认事件
*/ */
@PreAuthorize("@ss.hasAnyPermi('jsqr:jsqr:operate,jsqr:jsqr:check,jsqr:jsqr:leader')") @PreAuthorize("@ss.hasAnyPermi('jsqr:jsqr:operateTl,jsqr:jsqr:checkTl,jsqr:jsqr:leaderTl,jsqr:jsqr:operateDy,jsqr:jsqr:checkDy,jsqr:jsqr:leaderDy,jsqr:jsqr:operateZy,jsqr:jsqr:checkZy,jsqr:jsqr:leaderZy,jsqr:jsqr:operateQt,jsqr:jsqr:checkQt,jsqr:jsqr:leaderQt')")
@Log(title = "报价单-技术确认单协助操作", businessType = BusinessType.UPDATE) @Log(title = "报价单-技术确认单协助操作", businessType = BusinessType.UPDATE)
@PostMapping("/doOperate") @PostMapping("/doOperate")
public AjaxResult doOperate(HttpServletResponse response, @RequestBody QuotJsqrXzDetail info) public AjaxResult doOperate(HttpServletResponse response, @RequestBody QuotJsqrXzDetail info)

View File

@ -0,0 +1,253 @@
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="核价单号" prop="quotHjCode">
<el-input v-model="form.quotHjCode" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报价单号" prop="quotCode">
<el-input v-model="form.quotCode" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="核价日期" prop="quotHjPricingDate">
<div class="el-p" style="width:100%">
<el-date-picker
style="width:100%"
v-model="form.quotHjPricingDate"
type="datetime"
placeholder="系统自动生成"
:disabled="true">
</el-date-picker>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="核价类型" prop="quotHjPricingType">
<el-select v-model="form.quotHjPricingType" style="width: 100%;" :disabled="true">
<el-option
v-for="dict in dict.type.quot_pricing_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务员" prop="quotSalesmanName">
<el-input v-model="form.quotSalesmanName" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="16">
<el-form-item label="客户" prop="quotCustomerName">
<el-input v-model="form.quotCustomerName" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="项目名称" prop="quotProject">
<el-input type="textarea" autosize v-model="form.quotProject" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="备注" prop="quotHjRemark">
<el-input type="textarea" autosize v-model="form.quotHjRemark" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="核价附件">
<el-upload class="upload-demo"
ref="upload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotHjId,file_type: 'quotHjFile' }"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotHjApprovalStatus == '1'">
<el-button 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="quotHjFileList" 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="操作">
<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" v-if="form.quotHjApprovalStatus == '1'">
<a @click="deleteFile(scope.row.fileId)">删除</a>
</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-form>
<div v-if="this._props.isSelfProp">
<div slot="footer" class="dialog-footer" v-if="this.form.quotHjApprovalStatus==1">
<span v-hasPermi="['priceVerification:priceVerification:commit']"><el-button type="primary" @click="commitHj">提交报价</el-button></span>
<span v-hasPermi="['priceVerification:priceVerification:reject']" style="margin-left: 10px"><el-button type="danger" plain @click="rejectHj">驳回</el-button></span>
</div>
</div>
</div>
</template>
<style>
<!-- 日期空间宽度设置 -->
:deep(.el-p .el-input__wrapper){
width: 100% !important;
}
<!-- 弹窗底部内容样式 -->
.dialog-footer {
padding: 20px;
padding-top: 10px;
text-align: right;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
</style>
<script>
import { getPriceVerification, commitHj, rejectHj } from "@/api/priceVerification/priceVerification";
import { getToken } from "@/utils/auth";
import { quotFileList, quotFileDelete} from "@/api/quot/quot";
export default {
name: "hjInfo",
dicts: ['quot_pricing_type','quot_hj_approval_status'],
props: {
quotHjIdProp: String,
isSelfProp: Boolean
},
data() {
return {
// -
quotHjFileList: [],
//-
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
//-
headers: {Authorization: "Bearer " + getToken()},
//
form: {},
//
rules: {}
};
},
watch: {
quotHjIdProp(value,oldvalue){
this.getInfo();
}
},
created() {
this.getInfo();
},
methods: {
/** 清空表单 */
reset(){
this.form = {
quotHjCode: null,
quotCode: null,
quotHjPricingDate: null,
quotHjPricingType: null,
quotSalesmanName: null,
quotCustomerName: null,
quotProject: null,
quotHjRemark: null
};
this.quotHjFileList = [];
this.resetForm("form");
},
/** 修改按钮操作 */
getInfo() {
this.reset();
const quotHjId = this._props.quotHjIdProp;
getPriceVerification(quotHjId).then(response => {
this.form = response.data;
this.open = true;
this.title = "核价单信息";
this.getQuotHjFileList();
});
},
/** 提交报价按钮 */
commitHj() {
var quotHjFileNum = this.quotHjFileList.length;
if(quotHjFileNum==0){
this.$modal.msgError("核价附件必须上传");
return;
}
//-
commitHj(this.form).then(response => {
this.open = false;
this.getList();
})
},
/** 核价单驳回按钮 */
rejectHj() {
rejectHj(this.form).then(response => {
this.$modal.msgSuccess("驳回成功");
this.open = false;
this.getList();
});
},
//-
getQuotHjFileList(){
const param = {relationId:this.form.quotHjId,fileType:'quotHjFile'}
quotFileList(param).then(response => {
this.quotHjFileList = response.rows;
});
},
//
handleAvatarSuccess(res) {
//
if (res.code == 200) {
this.$modal.msgSuccess(res.msg);
this.getQuotHjFileList();
} else {
this.$modal.msgError(res.msg);
}
this.$refs.upload.clearFiles(); //****
},
//
downloadFile(fileUrl){
window.open(fileUrl, "_blank");
},
//
deleteFile(fileId){
let activeName = this.activeName;
quotFileDelete(fileId).then(response => {
this.getQuotHjFileList();
});
}
}
};
</script>

View File

@ -71,117 +71,7 @@
<!-- 添加或修改报价单-核价单对话框 --> <!-- 添加或修改报价单-核价单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <hjDialog :quotHjIdProp="quotHjIdProp" :isSelfProp="true"></hjDialog>
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="核价单号" prop="quotHjCode">
<el-input v-model="form.quotHjCode" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报价单号" prop="quotCode">
<el-input v-model="form.quotCode" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="核价日期" prop="quotHjPricingDate">
<div class="el-p" style="width:100%">
<el-date-picker
style="width:100%"
v-model="form.quotHjPricingDate"
type="datetime"
placeholder="系统自动生成"
:disabled="true">
</el-date-picker>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="核价类型" prop="quotHjPricingType">
<el-select v-model="form.quotHjPricingType" style="width: 100%;" :disabled="true">
<el-option
v-for="dict in dict.type.quot_pricing_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务员" prop="quotSalesmanName">
<el-input v-model="form.quotSalesmanName" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="16">
<el-form-item label="客户" prop="quotCustomerName">
<el-input v-model="form.quotCustomerName" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="项目名称" prop="quotProject">
<el-input type="textarea" autosize v-model="form.quotProject" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="备注" prop="quotHjRemark">
<el-input type="textarea" autosize v-model="form.quotHjRemark" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="核价附件">
<el-upload class="upload-demo"
ref="upload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotHjId,file_type: 'quotHjFile' }"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotHjApprovalStatus == '1'">
<el-button 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="quotHjFileList" 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="操作">
<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" v-if="form.quotHjApprovalStatus == '1'">
<a @click="deleteFile(scope.row.fileId)">删除</a>
</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" v-if="this.form.quotHjApprovalStatus==1">
<span v-hasPermi="['priceVerification:priceVerification:commit']"><el-button type="primary" @click="commitHj">提交报价</el-button></span>
<span v-hasPermi="['priceVerification:priceVerification:reject']" style="margin-left: 10px"><el-button type="danger" plain @click="rejectHj">驳回</el-button></span>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -202,13 +92,16 @@
} }
</style> </style>
<script> <script>
import { listPriceVerification, getPriceVerification, commitHj, rejectHj } from "@/api/priceVerification/priceVerification"; import { listPriceVerification } from "@/api/priceVerification/priceVerification";
import { getToken } from "@/utils/auth"; //
import { quotFileList, quotFileDelete} from "@/api/quot/quot"; import hjDialog from '@/views/priceVerification/priceVerification/hjInfo.vue';
import {parseTime} from "../../../utils/ruoyi";
export default { export default {
name: "PriceVerification", name: "PriceVerification",
components: {
//
'hjDialog': hjDialog
},
dicts: ['quot_pricing_type','quot_hj_approval_status'], dicts: ['quot_pricing_type','quot_hj_approval_status'],
data() { data() {
return { return {
@ -226,12 +119,6 @@ export default {
total: 0, total: 0,
// - // -
priceVerificationList: [], priceVerificationList: [],
// -
quotHjFileList: [],
//-
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
//-
headers: {Authorization: "Bearer " + getToken()},
// //
title: "", title: "",
// //
@ -245,33 +132,14 @@ export default {
quotHjCode: null, quotHjCode: null,
quotHjPricingDate: null, quotHjPricingDate: null,
}, },
// //
form: {}, quotHjIdProp: ""
//
rules: {
}
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
/** 清空表单 */
reset(){
this.form = {
quotHjCode: null,
quotCode: null,
quotHjPricingDate: null,
quotHjPricingType: null,
quotSalesmanName: null,
quotCustomerName: null,
quotProject: null,
quotHjRemark: null
};
this.quotHjFileList = [];
this.resetForm("form");
},
/** 查询报价单-核价单列表 */ /** 查询报价单-核价单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -306,70 +174,10 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); const quotHjId = row.quotJsqrId || this.ids
const quotHjId = row.quotHjId || this.ids
getPriceVerification(quotHjId).then(response => {
this.form = response.data;
this.open = true; this.open = true;
this.title = "核价单信息"; this.title = "报价单-核价单";
this.quotHjIdProp = quotHjId;//
this.getQuotHjFileList();
});
},
/** 提交报价按钮 */
commitHj() {
var quotHjFileNum = this.quotHjFileList.length;
if(quotHjFileNum==0){
this.$modal.msgError("核价附件必须上传");
return;
}
//-
commitHj(this.form).then(response => {
this.open = false;
this.getList();
})
},
/** 核价单驳回按钮 */
rejectHj() {
rejectHj(this.form).then(response => {
this.$modal.msgSuccess("驳回成功");
this.open = false;
this.getList();
});
},
//-
getQuotHjFileList(){
const param = {relationId:this.form.quotHjId,fileType:'quotHjFile'}
quotFileList(param).then(response => {
this.quotHjFileList = response.rows;
});
},
//
handleAvatarSuccess(res) {
//
if (res.code == 200) {
this.$modal.msgSuccess(res.msg);
this.getQuotHjFileList();
} else {
this.$modal.msgError(res.msg);
}
this.$refs.upload.clearFiles(); //****
},
//
downloadFile(fileUrl){
window.open(fileUrl, "_blank");
},
//
deleteFile(fileId){
let activeName = this.activeName;
quotFileDelete(fileId).then(response => {
this.getQuotHjFileList();
});
} }
} }
}; };

View File

@ -531,9 +531,9 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="核价" name="quotHjInfo" style="width:98%" v-if="checkPermi(['quot:quot:assistHj'])"> <el-tab-pane label="核价" name="quotHjInfo" style="width:98%" v-if="checkPermi(['quot:quot:assistHj'])">
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="8"> <el-col :span="10">
<el-form-item label="核价单号" prop="quotHjCode"> <el-form-item label="核价单号" prop="quotHjCode">
<el-input v-model="form.quotHjCode" :disabled="true" /> <el-link :underline="false" type="primary" @click="showHjDialog">{{form.quotHjCode}}</el-link>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -548,7 +548,7 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="6">
<el-form-item label="核价确认状态" prop="quotHjApprovalStatus"> <el-form-item label="核价确认状态" prop="quotHjApprovalStatus">
<el-select v-model="form.quotHjApprovalStatus" :disabled="true"> <el-select v-model="form.quotHjApprovalStatus" :disabled="true">
<el-option <el-option
@ -675,6 +675,11 @@
<el-dialog :title="jsqrTitle" :visible.sync="jsqrDialogOpen" width="1000px" append-to-body> <el-dialog :title="jsqrTitle" :visible.sync="jsqrDialogOpen" width="1000px" append-to-body>
<jsqrDialog :quotJsqrIdProp="quotJsqrIdProp" :isSelfProp="false"></jsqrDialog> <jsqrDialog :quotJsqrIdProp="quotJsqrIdProp" :isSelfProp="false"></jsqrDialog>
</el-dialog> </el-dialog>
<!-- 核价单详情对话框 -->
<el-dialog :title="hjTitle" :visible.sync="hjDialogOpen" width="1000px" append-to-body>
<hjDialog :quotHjIdProp="quotHjIdProp" :isSelfProp="false"></hjDialog>
</el-dialog>
</div> </div>
</template> </template>
<style> <style>
@ -715,12 +720,15 @@ import { checkPermi } from '@/utils/permission';// 权限判断函数
// //
import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue'; import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue';
//
import hjDialog from '@/views/priceVerification/priceVerification/hjInfo.vue';
export default { export default {
name: "Quot", name: "Quot",
components: { components: {
// //
'jsqrDialog': jsqrDialog 'jsqrDialog': jsqrDialog,
'hjDialog': hjDialog
}, },
dicts: ['quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status'], dicts: ['quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status'],
data() { data() {
@ -812,7 +820,12 @@ export default {
// //
jsqrTitle: "", jsqrTitle: "",
jsqrDialogOpen: false, jsqrDialogOpen: false,
quotJsqrIdProp: "" quotJsqrIdProp: "",
//
hjTitle: "",
hjDialogOpen: false,
quotHjIdProp: ""
}; };
}, },
created() { created() {
@ -1192,6 +1205,13 @@ export default {
this.jsqrTitle = "技术确认单信息"; this.jsqrTitle = "技术确认单信息";
this.jsqrDialogOpen = true; this.jsqrDialogOpen = true;
this.quotJsqrIdProp = this.form.quotJsxzConfirmId;// this.quotJsqrIdProp = this.form.quotJsxzConfirmId;//
},
//
showHjDialog(){
this.hjTitle = "核价单信息";
this.hjDialogOpen = true;
this.quotHjIdProp = this.form.quotHjId;//
} }
} }
}; };

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="12"> <el-col :span="12">
@ -665,6 +665,7 @@
</div> </div>
</template> </template>
<style> <style>
<!-- 弹窗底部内容样式 -->
.dialog-footer { .dialog-footer {
padding: 20px; padding: 20px;
padding-top: 10px; padding-top: 10px;