This commit is contained in:
JIAL 2024-06-24 10:49:36 +08:00
commit 1c7ba447b1
18 changed files with 178 additions and 36 deletions

View File

@ -103,7 +103,7 @@ public class CustomerController extends BaseController
* 导出客户管理列表
*/
@PreAuthorize("@ss.hasPermi('customer:customer:export')")
@Log(title = "客户信息导出", businessType = BusinessType.EXPORT)
@Log(title = "导出客户列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Customer customer)
{

View File

@ -66,7 +66,7 @@ public class QuotHjController extends BaseController
* 导出报价单-核价单列表
*/
@PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:export')")
@Log(title = "报价单-核价单", businessType = BusinessType.EXPORT)
@Log(title = "报价单-核价单导出列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QuotHj quotHj)
{
@ -89,7 +89,7 @@ public class QuotHjController extends BaseController
* 新增报价单-核价单
*/
@PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:add')")
@Log(title = "报价单-核价单", businessType = BusinessType.INSERT)
@Log(title = "报价单-核价单新增", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QuotHj quotHj)
{
@ -100,7 +100,7 @@ public class QuotHjController extends BaseController
* 修改报价单-核价单
*/
@PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:edit')")
@Log(title = "报价单-核价单", businessType = BusinessType.UPDATE)
@Log(title = "报价单-核价单修改", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody QuotHj quotHj)
{
@ -111,7 +111,7 @@ public class QuotHjController extends BaseController
* 删除报价单-核价单
*/
@PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:remove')")
@Log(title = "报价单-核价单", businessType = BusinessType.DELETE)
@Log(title = "报价单-核价单删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{quotHjIds}")
public AjaxResult remove(@PathVariable String[] quotHjIds)
{
@ -160,6 +160,7 @@ public class QuotHjController extends BaseController
public AjaxResult rejectHj(@RequestBody QuotHj quotHj)
{
quotHj.setUpdateBy(getUsername());
quotHj.setQuotHjPricingDate(DateUtils.getNowDate());//报价单-核价单 核价日期设置为 当前日期
quotHjService.updateQuotHj(quotHj);
String quotHjId = quotHj.getQuotHjId();

View File

@ -93,7 +93,7 @@ public class QuotController extends BaseController
* 导出报价列表
*/
@PreAuthorize("@ss.hasPermi('quot:quot:export')")
@Log(title = "报价", businessType = BusinessType.EXPORT)
@Log(title = "导出报价列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Quot quot)
{
@ -106,6 +106,7 @@ public class QuotController extends BaseController
* 导出报价明细列表
*/
@PostMapping("/exportMaterial")
@Log(title = "导出报价明细列表", businessType = BusinessType.EXPORT)
public void exportMaterial(HttpServletResponse response, Quot quot)
{
Quot q = quotService.selectQuotByQuotId(quot.getQuotId());
@ -356,6 +357,7 @@ public class QuotController extends BaseController
* 删除附件列表
*/
@PreAuthorize("@ss.hasAnyPermi('quot:quot:quotXjFile,quot:quot:quotFkFile,quot:quot:quotJsgfFile,jsqr:jsqr:operateTlUploadFile,jsqr:jsqr:operateDyUploadFile,jsqr:jsqr:operateZyUploadFile,jsqr:jsqr:operateQtUploadFile,priceVerification:priceVerification:uploadFile')")
@Log(title = "删除附件列表", businessType = BusinessType.DELETE)
@PostMapping("/quotFileDelete")
public AjaxResult quotFileDelete(QuotFile quotFile) {
String fileId = quotFile.getFileId();
@ -721,6 +723,12 @@ public class QuotController extends BaseController
@PostMapping("/commitOAQuot")
public AjaxResult commitOAQuot(@RequestBody Quot quot)
{
//金思维协助中不允许提交OA
String quot_jsw_approval_status = quot.getQuotJswApprovalStatus();
if("1".equals(quot_jsw_approval_status)){
return error("金思维协助还未完成");
}
// 报价单提交OA,插入中间表 sys_oa_quot sys_oa_quot_material
SysOaQuot sysOaQuot = new SysOaQuot();
SysOaQuot oauser = quotService.selectOAUserByUserName(getUsername());// 查询OA用户
@ -881,6 +889,22 @@ public class QuotController extends BaseController
return success();
}
/**
* 下载反馈附件-更新报价单状态为已处理
*/
@Log(title = "报价单处理", businessType = BusinessType.OTHER)
@PostMapping("/setHandle")
public AjaxResult setHandle(Quot quot) {
String quotId = quot.getQuotId();
try {
quotService.setHandle(quotId);
}catch(Exception e){
return error("系统异常!");
}
return success();
}
/**
* 统计有效报价单模块-获取报价单数据
*/

View File

@ -1,10 +1,6 @@
package com.ruoyi.common.utils.http;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.*;
import java.net.*;
import java.nio.charset.StandardCharsets;
import java.security.cert.X509Certificate;
@ -217,6 +213,7 @@ public class HttpUtils
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("Charset", "UTF-8");
conn.setRequestProperty("contentType", "application/json; charset=utf-8");
conn.setRequestProperty("Content-Type", "application/json; charset=utf-8");
// 设置Cookie头部
@ -246,7 +243,7 @@ public class HttpUtils
conn.setDoOutput(true);
conn.setDoInput(true);
out = new PrintWriter(conn.getOutputStream());
out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream(),"utf-8"));
out.print(param);
out.flush();
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));

View File

@ -119,6 +119,9 @@ public class Quot extends BaseEntity
/** 创建人 */
private String createName;
/** 营销经理下载反馈附件情况 */
private String quotHandle;
/** 技术协助 */
@ -364,6 +367,9 @@ public class Quot extends BaseEntity
public String getCreateName() {return createName;}
public void setCreateName(String createName) {this.createName = createName;}
public String getQuotHandle() { return quotHandle; }
public void setQuotHandle(String quotHandle) { this.quotHandle = quotHandle; }
public List<QuotMaterial> getQuotMaterialList() { return quotMaterialList; }
public void setQuotMaterialList(List<QuotMaterial> quotMaterialList)

View File

@ -148,6 +148,11 @@ public interface QuotMapper
*/
String getCode(String type);
/**
* 下载反馈附件-更新报价单状态为已处理
* @param quotId
*/
void setHandle(String quotId);
/**
* 统计有效报价单模块-获取报价单数据
@ -155,4 +160,5 @@ public interface QuotMapper
* @return
*/
List<Quot> selectStatisticsQuotList(Quot quot);
}

View File

@ -131,6 +131,11 @@ public interface IQuotService
*/
void updateQuotAllPassInfo(Quot quot);
/**
* 下载反馈附件-更新报价单状态为已处理
* @param quotId
*/
void setHandle(String quotId);
/**
* 统计有效报价单模块-获取报价单数据

View File

@ -279,6 +279,14 @@ public class QuotServiceImpl implements IQuotService
quotMapper.updateQuot(quot);
}
/**
* 下载反馈附件-更新报价单状态为已处理
* @param quotId
*/
@Override
public void setHandle(String quotId) {
quotMapper.setHandle(quotId);
}
/**
* 统计有效报价单模块-获取报价单数据

View File

@ -64,6 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotHjCode != null and quotHjCode != ''"> and quot_hj_code like concat('%', #{quotHjCode}, '%')</if>
<if test="params.beginQuotHjPricingDate != null and params.beginQuotHjPricingDate != '' and params.endQuotHjPricingDate != null and params.endQuotHjPricingDate != ''"> and quot_hj_pricing_date between #{params.beginQuotHjPricingDate} and #{params.endQuotHjPricingDate}</if>
<if test="quotHjApprovalStatus != null and quotHjApprovalStatus != ''"> and q.quot_hj_approval_status = #{quotHjApprovalStatus}</if>
<if test="quotSalesmanName != null and quotSalesmanName != ''"> and q.quot_salesman_name like concat('%', #{quotSalesmanName}, '%')</if>
<if test="quotCustomerName != null and quotCustomerName != ''"> and q.quot_customer_name like concat('%', #{quotCustomerName}, '%')</if>
<if test="quotProject != null and quotProject != ''"> and q.quot_project like concat('%', #{quotProject}, '%')</if>
<!-- 数据范围过滤 -->
<!--${params.dataScope}-->
</where>

View File

@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="quotHandle" column="quot_handle" />
<result property="quotJsxzStandard" column="quot_jsxz_standard" />
<result property="quotJsxzApprovalStatus" column="quot_jsxz_approval_status" />
@ -115,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_materials_count,
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,a.quot_handle,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
a.quot_jsxz_technical_requirement,a.quot_jsxz_group_values,a.quot_jsxz_confirm_id,
@ -161,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation,
a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
a.quot_materials_count,a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
a.create_by, a.create_time, a.update_by, a.update_time,
a.create_by, a.create_time, a.update_by, a.update_time,a.quot_handle,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
a.quot_jsxz_technical_requirement,a.quot_jsxz_group_values,a.quot_jsxz_confirm_id,
@ -513,7 +514,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
{call GetSerialNo(#{type,mode=IN,jdbcType=VARCHAR})}
</select>
<update id="setHandle" parameterType="String">
update quot set quot_handle = '1' where quot_id = #{quotId}
</update>

View File

@ -111,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotJsqrCode != null and quotJsqrCode != ''"> and quot_jsqr_code like concat('%', #{quotJsqrCode}, '%')</if>
<if test="quotJsxzApprovalStatus != null and quotJsxzApprovalStatus != ''"> and q.quot_jsxz_approval_status = #{quotJsxzApprovalStatus}</if>
<if test="quotCode != null and quotCode != ''"> and q.quot_code like concat('%', #{quotCode}, '%')</if>
<if test="quotSalesmanName != null and quotSalesmanName != ''"> and q.quot_salesman_name like concat('%', #{quotSalesmanName}, '%')</if>
<if test="quotCustomerName != null and quotCustomerName != ''"> and q.quot_customer_name like concat('%', #{quotCustomerName}, '%')</if>
<if test="quotProject != null and quotProject != ''"> and q.quot_project like concat('%', #{quotProject}, '%')</if>
<!-- 数据范围过滤 -->
<!--${params.dataScope}-->
</where>

View File

@ -176,6 +176,15 @@ export function rejectQuot(data) {
})
}
//下载反馈附件-更新报价单状态为已处理
export function setHandle(quotId) {
return request({
url: '/quot/quot/setHandle',
method: 'post',
params: {quotId:quotId}
})
}
//统计有效报价单模块-获取报价单数据

View File

@ -10,7 +10,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="价单号" prop="quotCode">
<el-form-item label="价单号" prop="quotCode">
<el-input v-model="form.quotCode" :disabled="true"/>
</el-form-item>
</el-col>

View File

@ -30,6 +30,30 @@
/>
</el-select>
</el-form-item>
<el-form-item label="业务员" prop="quotSalesmanName">
<el-input
v-model="queryParams.quotSalesmanName"
placeholder="请输入业务员"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户" prop="quotCustomerName">
<el-input
v-model="queryParams.quotCustomerName"
placeholder="请输入客户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目" prop="quotProject">
<el-input
v-model="queryParams.quotProject"
placeholder="请输入项目"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>

View File

@ -33,7 +33,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否打印" prop="quotPrint">
<el-form-item label="是否打印" prop="quotPrint" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
<el-select v-model="queryParams.quotPrint" placeholder="请选择打印状态" clearable>
<el-option
v-for="dict in dict.type.quot_print"
@ -161,6 +161,11 @@
<dict-tag :options="dict.type.quot_approval_status" :value="scope.row.quotApprovalStatus"/>
</template>
</el-table-column>
<el-table-column label="处理状态" align="center" prop="quotHandle" v-if="checkRole(['SALES_MAN'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_fkfile_handle" :value="scope.row.quotHandle"/>
</template>
</el-table-column>
<el-table-column label="是否打印" align="center" prop="quotPrint" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')">
<template slot-scope="scope">
<el-switch
@ -614,7 +619,7 @@
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
<a @click="downloadFkFile(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>
@ -1048,7 +1053,7 @@
</style>
<script>
import { NumberAdd } from '@/utils/number';//
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot } from "@/api/quot/quot";
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } from "@/api/quot/quot";
import { getToken } from "@/utils/auth";
import { checkPermi,checkRole } from '@/utils/permission';//
import { getDicts } from "@/api/system/dict/data";
@ -1077,7 +1082,7 @@ export default {
'hjDialog': hjDialog,
'PeopleSelect': PeopleSelect
},
dicts: ['quot_print', 'quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status','quot_jsw_approval_status','quot_oa_approval_status'],
dicts: ['quot_fkfile_handle','quot_print', 'quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status','quot_jsw_approval_status','quot_oa_approval_status'],
data() {
return {
//
@ -1198,12 +1203,12 @@ export default {
},
created() {
const roles = this.$store.state.user.roles;
if(roles && (roles.indexOf('QUOT') !== -1 || roles.indexOf('PRICE_VERIFICATION') !== -1)){//
if(roles && (roles.indexOf('QUOT') !== -1 || roles.indexOf('PRICE_VERIFICATION') !== -1) && roles.indexOf('admin') == -1){//
this.queryParams.orderByColumn = "a.quot_inquiry_date";//
this.queryParams.isAsc = "desc";//
this.queryParams.quotApprovalStatus = '1';
}
if(roles && roles.indexOf('SALES_MAN') !== -1 ){//
if(roles && (roles.indexOf('SALES_MAN') !== -1 || roles.indexOf('ITZX') !== -1 || roles.indexOf('admin') !== -1)){//
this.queryParams.orderByColumn = "a.create_time";//
this.queryParams.isAsc = "desc";//
//this.queryParams.quotApprovalStatus = '0';
@ -1500,8 +1505,8 @@ export default {
commitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if(this.quotMaterialList.length == 0 && this.quotXjFileList == 0){
this.$message.warning("无报价产品 或 未提交询价附件!");
if(this.quotXjFileList == 0){
this.$message.warning("未上传询价清单附件!");
return;
}
@ -1582,6 +1587,17 @@ export default {
/** 报价组生成报价单按钮 */
madeQuot(){
const roles = this.$store.state.user.roles;
if(roles && roles.indexOf('SALES_MAN') !== -1){//1-
//
setHandle(this.form.quotId).then(response => {
this.madeQuotFile();
})
}else{
this.madeQuotFile();
}
},
madeQuotFile(){
this.form.quotMaterialList = this.quotMaterialList;
madeQuot(this.form).then(response => {
this.$modal.msgSuccess("生成报价单成功");
@ -1851,6 +1867,18 @@ export default {
downloadFile(fileUrl){
window.open(fileUrl, "_blank");
},
//
downloadFkFile(fileUrl){
const roles = this.$store.state.user.roles;
if(roles && roles.indexOf('SALES_MAN') !== -1){//1-
//
setHandle(this.form.quotId).then(response => {
window.open(fileUrl, "_blank");
})
}else{
window.open(fileUrl, "_blank");
}
},
//
deleteFile(fileId,activeName){

View File

@ -62,10 +62,10 @@
</el-col>
</el-row>
<el-table v-loading="loading" :data="quotList" style="width: 100%;margin-top: 10px;" :height="tableHeight">
<el-table-column fixed label="报价单号" align="center" prop="quotCode" width="250px"/>
<el-table-column fixed label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
<el-table-column fixed label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
<el-table-column fixed label="项目名称" align="center" prop="quotProject" width="250px"/>
<el-table-column label="报价单号" align="center" prop="quotCode" width="250px"/>
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
<el-table-column label="明细条数" align="center" prop="quotMaterialsCount" width="100"/>
<el-table-column label="总价" align="center" prop="quotTotalPrice" width="100"/>
<!--<el-table-column label="金思维报价单号" align="center" prop="quotJswCode" width="280px"/>-->

View File

@ -19,10 +19,34 @@
/>
</el-select>
</el-form-item>
<el-form-item label="价单号" prop="quotCode">
<el-form-item label="价单号" prop="quotCode">
<el-input
v-model="queryParams.quotCode"
placeholder="请输入报价单号"
placeholder="请输入询价单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="业务员" prop="quotSalesmanName">
<el-input
v-model="queryParams.quotSalesmanName"
placeholder="请输入业务员"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户" prop="quotCustomerName">
<el-input
v-model="queryParams.quotCustomerName"
placeholder="请输入客户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目" prop="quotProject">
<el-input
v-model="queryParams.quotProject"
placeholder="请输入项目"
clearable
@keyup.enter.native="handleQuery"
/>
@ -46,11 +70,7 @@
<dict-tag :options="dict.type.quot_jsxz_approval_status" :value="scope.row.quotJsxzApprovalStatus"/>
</template>
</el-table-column>
<el-table-column label="报价单号" align="center" prop="quotCode" width="250px"/>
<el-table-column label="客户" align="center" prop="quotCustomerName" width="250px"/>
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
<el-table-column label="技术协助分组" align="center" prop="quotJsxzGroup" width="150px">
<el-table-column label="技术协助分组" align="center" prop="quotJsxzGroup" width="180px">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsxz_group" :value="scope.row.quotJsxzGroupValues"/>
</template>
@ -75,6 +95,10 @@
<dict-tag :options="dict.type.quot_jsxz_approval_status" :value="scope.row.quotJsqrQtApprovalStatus" v-if="scope.row.quotJsqrQtApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="询价单号" align="center" prop="quotCode" width="250px"/>
<el-table-column label="客户" align="center" prop="quotCustomerName" width="250px"/>
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
<el-table-column label="创建人" align="center" prop="createName" width="150px"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
<template slot-scope="scope">

View File

@ -10,7 +10,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="价单号" prop="quotCode">
<el-form-item label="价单号" prop="quotCode">
<el-input v-model="form.quotCode" :disabled="true"/>
</el-form-item>
</el-col>