This commit is contained in:
xd 2024-06-05 20:39:30 +08:00
parent 84ade83cb6
commit 88aabfb0c9
10 changed files with 92 additions and 33 deletions

View File

@ -487,7 +487,7 @@ public class QuotController extends BaseController
sysOaQuot.setQuotTongPrice(quot.getQuotTongPrice()); sysOaQuot.setQuotTongPrice(quot.getQuotTongPrice());
sysOaQuot.setQuotMatpriceDiff(quot.getQuotMatpriceDiff()); sysOaQuot.setQuotMatpriceDiff(quot.getQuotMatpriceDiff());
sysOaQuot.setCreateTime(DateUtils.getNowDate()); sysOaQuot.setCreateTime(DateUtils.getNowDate());
sysOaQuot.setIsFinish("0");// 报价已提交OA审批中
sysOaQuot.setMaterials(quot.getQuotMaterialList()); sysOaQuot.setMaterials(quot.getQuotMaterialList());
quotService.insertSysOAQuot(sysOaQuot); quotService.insertSysOAQuot(sysOaQuot);

View File

@ -16,6 +16,9 @@ public class OASysQuot
/** 报价单id */ /** 报价单id */
private String quotId; private String quotId;
/** 报价单号 */
private String quotCode;
/** OA审批状态 */ /** OA审批状态 */
private String state; private String state;
@ -30,6 +33,10 @@ public class OASysQuot
this.quotId = quotId; this.quotId = quotId;
} }
public String getQuotCode() {return quotCode;}
public void setQuotCode(String quotCode) {this.quotCode = quotCode;}
public String getState() { public String getState() {
return state; return state;
} }

View File

@ -27,4 +27,11 @@ public interface OAQuotMapper
* @param remark * @param remark
*/ */
void updateQuotOAApprovalStatus(@Param("quotId") String quotId, @Param("state") String state, @Param("remark") String remark); void updateQuotOAApprovalStatus(@Param("quotId") String quotId, @Param("state") String state, @Param("remark") String remark);
/**
* 将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
* @param quotCode
*/
void updateOAQuotByQuotCode(String quotCode);
} }

View File

@ -24,4 +24,10 @@ public interface OAQuotService
* @param quotId * @param quotId
*/ */
void updateQuotOAApprovalStatus(String quotId,String state,String remark); void updateQuotOAApprovalStatus(String quotId,String state,String remark);
/**
* 将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
*/
void updateOAQuotByQuotCode(String quotCode);
} }

View File

@ -33,4 +33,13 @@ public class OAQuotServiceImpl implements OAQuotService
public void updateQuotOAApprovalStatus(String quotId, String state, String remark) { public void updateQuotOAApprovalStatus(String quotId, String state, String remark) {
aAQuotMapper.updateQuotOAApprovalStatus(quotId,state,remark); aAQuotMapper.updateQuotOAApprovalStatus(quotId,state,remark);
} }
/**
* 将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
* @param quotCode
*/
@Override
public void updateOAQuotByQuotCode(String quotCode) {
aAQuotMapper.updateOAQuotByQuotCode(quotCode);
}
} }

View File

@ -47,6 +47,8 @@ public class OAQuotTask
for(OASysQuot sysoaquot:quots){ for(OASysQuot sysoaquot:quots){
// 批量更新报价单-OA审批状态,备注 // 批量更新报价单-OA审批状态,备注
quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark()); quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark());
//将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode());
} }
redisCache.deleteObject("OAQuotTask"); redisCache.deleteObject("OAQuotTask");
}catch (Exception e) { }catch (Exception e) {

View File

@ -4,20 +4,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.quartz.mapper.OAQuotMapper"> <mapper namespace="com.ruoyi.quartz.mapper.OAQuotMapper">
<select id="selectOAQUOT" resultType="OASysQuot"> <select id="selectOAQUOT" resultType="OASysQuot">
select q.quot_id,sq.state,sq.remark select q.quot_id as quotId,q.quot_code as quotCode,sq.state,sq.remark
from quot q from quot q
inner join ( inner join (
select t.quot_code,t.state,t.remark from ( select t.quot_code,t.state,t.remark from (
select a.quot_code,a.state,a.remark, row_number() over(partition by quot_code order by create_time desc) rw select a.quot_code,a.state,a.remark, row_number() over(partition by quot_code order by create_time desc) rw
from sys_oa_quot a from sys_oa_quot a
where a.triggerflag = '1' and a.state in ('2','3') where a.triggerflag = '1' and a.state in ('2','3') and a.isFinish = '0'
) t where t.rw = 1 ) t where t.rw = 1
) sq on q.quot_code = sq.quot_code ) sq on q.quot_code = sq.quot_code
where q.quot_oa_approval_status = '2' where q.quot_oa_approval_status = '1'
</select> </select>
<update id="updateQuotOAApprovalStatus"> <update id="updateQuotOAApprovalStatus">
update quot set quot_oa_approval_status = #{state},quot_oa_approval_remark = #{remark} update quot set quot_oa_approval_status = #{state},quot_oa_approval_remark = #{remark}
where quot_id = #{quotId} where quot_id = #{quotId}
</update> </update>
<update id="updateOAQuotByQuotCode">
update sys_oa_quot set isFinish = '1' where quot_code = #{quotCode}
</update>
</mapper> </mapper>

View File

@ -67,6 +67,9 @@ public class SysOaQuot extends BaseEntity
/** OA审批备注 */ /** OA审批备注 */
private String remark; private String remark;
/** 报价单状态 1-整个报价流程结束(包括已反馈、已驳回) 0-提交OA待审批*/
private String isFinish;
/** 明细 */ /** 明细 */
List<QuotMaterial> materials; List<QuotMaterial> materials;
@ -162,9 +165,7 @@ public class SysOaQuot extends BaseEntity
return quotQuotationRequire; return quotQuotationRequire;
} }
public void setQuotQuotationRequire(String quotQuotationRequire) { public void setQuotQuotationRequire(String quotQuotationRequire) {this.quotQuotationRequire = quotQuotationRequire;}
this.quotQuotationRequire = quotQuotationRequire;
}
public String getQuotLvPrice() { public String getQuotLvPrice() {
return quotLvPrice; return quotLvPrice;
@ -200,6 +201,10 @@ public class SysOaQuot extends BaseEntity
@Override @Override
public void setRemark(String remark) { this.remark = remark; } public void setRemark(String remark) { this.remark = remark; }
public String getIsFinish() {return isFinish;}
public void setIsFinish(String isFinish) {this.isFinish = isFinish;}
public List<QuotMaterial> getMaterials() { public List<QuotMaterial> getMaterials() {
return materials; return materials;
} }

View File

@ -319,6 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotTongPrice != null">quot_tong_price,</if> <if test="quotTongPrice != null">quot_tong_price,</if>
<if test="quotMatpriceDiff != null">quot_matprice_diff,</if> <if test="quotMatpriceDiff != null">quot_matprice_diff,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="isFinish != null">isFinish,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null and userId != ''">#{userId},</if> <if test="userId != null and userId != ''">#{userId},</if>
@ -337,6 +338,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotTongPrice != null">#{quotTongPrice},</if> <if test="quotTongPrice != null">#{quotTongPrice},</if>
<if test="quotMatpriceDiff != null">#{quotMatpriceDiff},</if> <if test="quotMatpriceDiff != null">#{quotMatpriceDiff},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="isFinish != null">#{isFinish},</if>
</trim> </trim>
</insert> </insert>

View File

@ -365,7 +365,7 @@
<el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="300px"> <el-table class="down" :data="quotFkFileList" 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">
@ -456,7 +456,7 @@
<el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</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: 10px;" height="300px"> <el-table class="down" :data="quotXjFileList" 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">
@ -492,7 +492,7 @@
<el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" :data="quotJsgfFileList" border stripe style="width: 100%;margin-top: 10px;" height="300px"> <el-table class="down" :data="quotJsgfFileList" 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">
@ -513,6 +513,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 技术协助块-->
<div v-if="checkPermi(['quot:quot:jsxzInfo'])"> <div v-if="checkPermi(['quot:quot:jsxzInfo'])">
<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">
@ -740,6 +741,7 @@
</div> </div>
</div> </div>
<!-- 核价协助块-->
<div v-if="checkPermi(['quot:quot:hjxzInfo'])"> <div v-if="checkPermi(['quot:quot:hjxzInfo'])">
<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">
@ -841,20 +843,30 @@
</el-dialog> </el-dialog>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<span v-hasPermi="['quot:quot:save']"><el-button @click="saveForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></span> <div style="height: 25px;">
<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: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="primary" plain @click="commitJsForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus == '0'">提交技术协助</el-button></span> <!-- 报价组提交技术核价协助-->
<span style="margin-left: 10px" v-hasPermi="['quot:quot:assistHj']"><el-button type="primary" plain @click="commitHjForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotHjApprovalStatus == '0'">提交核价审核</el-button></span> <span v-hasPermi="['quot:quot:assist']"><el-button type="primary" plain @click="commitJsForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus == '0'">提交技术协助</el-button></span>
<span style="margin-left: 10px" v-hasPermi="['quot:quot:assistHj']"><el-button type="primary" plain @click="commitHjForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotHjApprovalStatus == '0'">提交核价审核</el-button></span>
<span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:madeQuot']"><el-button type="warning" plain @click="madeQuot" v-if="this.form.quotApprovalStatus == '2'||checkRole(['QUOT'])">生成报价单</el-button></span> <!-- 业务员报价组生成报价单-->
<span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:assistJsw']"><el-button type="warning" plain @click="commitJswForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJswApprovalStatus == '0'">提交金思维</el-button></span> <span style="float:left" v-hasPermi="['quot:quot:madeQuot']"><el-button type="warning" plain @click="madeQuot" v-if="this.form.quotApprovalStatus == '2'||checkRole(['QUOT'])">生成报价单</el-button></span>
<span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:assistOA']"><el-button type="warning" plain @click="commitOAForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotOAApprovalStatus == '0'">提交OA</el-button></span>
<span style="margin-left: 10px" v-hasPermi="['quot:quot:feedback']"><el-button type="primary" plain @click="feedbackQuotForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'&&this.form.quotJswApprovalStatus != '1'">提交反馈</el-button></span> <!-- 报价组提交金思维OA-->
<span style="margin-left: 10px" v-hasPermi="['quot:quot:reject']"><el-button type="danger" plain @click="rejectQuotForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'">驳回</el-button></span> <span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:assistJsw']"><el-button type="warning" plain @click="commitJswForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJswApprovalStatus == '0'">提交金思维</el-button></span>
<span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:assistOA']"><el-button type="warning" plain @click="commitOAForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotOAApprovalStatus == '0'">提交OA</el-button></span>
<!-- 报价组提交反馈驳回报价单-->
<span style="margin-left: 10px" v-hasPermi="['quot:quot:feedback']"><el-button type="primary" plain @click="feedbackQuotForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'&&this.form.quotJswApprovalStatus != '1'">提交反馈</el-button></span>
<span style="margin-left: 10px" v-hasPermi="['quot:quot:reject']"><el-button type="danger" plain @click="rejectQuotForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'">驳回</el-button></span>
</div>
</div> </div>
</el-dialog> </el-dialog>
<!-- 客户选择对话框-->
<CustomerSelect ref="customerSelect" :open="customerOpen" @submit="submitCustomer" @cancel="customerOpen=false"></CustomerSelect> <CustomerSelect ref="customerSelect" :open="customerOpen" @submit="submitCustomer" @cancel="customerOpen=false"></CustomerSelect>
<!-- 技术确认单详情对话框 --> <!-- 技术确认单详情对话框 -->
@ -1066,7 +1078,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
// /** 打印状态修改 */
handleStatusChange(row) { handleStatusChange(row) {
let text = row.quotPrint === "0" ? "打印" : "取消打印"; let text = row.quotPrint === "0" ? "打印" : "取消打印";
this.$modal.confirm('确认要"' + text + '"报价单:"' + row.quotCode + '"吗?').then(function() { this.$modal.confirm('确认要"' + text + '"报价单:"' + row.quotCode + '"吗?').then(function() {
@ -1079,11 +1091,11 @@ export default {
}); });
}, },
// /** 打开客户选择弹窗 */
openCustomer(){ openCustomer(){
this.customerOpen=true; this.customerOpen=true;
}, },
// /** 客户选择确定按钮事件 */
submitCustomer(customer){ submitCustomer(customer){
this.form.quotCustomerBm = customer.value; this.form.quotCustomerBm = customer.value;
this.form.quotCustomerName = customer.label; this.form.quotCustomerName = customer.label;
@ -1170,7 +1182,7 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// /** 多选框选中数据 */
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.quotId) this.ids = selection.map(item => item.quotId)
this.single = selection.length!==1 this.single = selection.length!==1
@ -1244,16 +1256,16 @@ export default {
this.productUpload.title = "产品数据导入"; this.productUpload.title = "产品数据导入";
this.productUpload.open = true; this.productUpload.open = true;
}, },
/** 下载模板操作 */ /** 产品数据下载模板操作 */
importTemplate() { importTemplate() {
this.download('quot/quot/importTemplate', { this.download('quot/quot/importTemplate', {
}, `product_template_${new Date().getTime()}.xlsx`) }, `product_template_${new Date().getTime()}.xlsx`)
}, },
// /** 产品数据文件上传中处理 */
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {
this.productUpload.isUploading = true; this.productUpload.isUploading = true;
}, },
// /** 产品数据文件上传成功处理 */
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
this.productUpload.open = false; this.productUpload.open = false;
this.productUpload.isUploading = false; this.productUpload.isUploading = false;
@ -1261,12 +1273,12 @@ export default {
this.$message.success("产品数据导入成功!"); this.$message.success("产品数据导入成功!");
this.quotMaterialList = this.quotMaterialList.concat(response.data) this.quotMaterialList = this.quotMaterialList.concat(response.data)
}, },
// /** 产品数据提交上传文件 */
submitFileForm() { submitFileForm() {
this.$refs.productUpload.submit(); this.$refs.productUpload.submit();
}, },
/** 保存按钮 */ /** 保存报价单按钮 */
saveForm() { saveForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
@ -1411,10 +1423,12 @@ export default {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
}, },
/** 报价单-产品序号 */
/** 报价单-产品序号 */
rowQuotMaterialIndex({ row, rowIndex }) { rowQuotMaterialIndex({ row, rowIndex }) {
row.index = rowIndex + 1; row.index = rowIndex + 1;
}, },
/** 报价单-产品添加按钮操作 */ /** 报价单-产品添加按钮操作 */
handleAddQuotMaterial() { handleAddQuotMaterial() {
let obj = {}; let obj = {};
@ -1425,6 +1439,7 @@ export default {
obj.matSl = ""; obj.matSl = "";
this.quotMaterialList.push(obj); this.quotMaterialList.push(obj);
}, },
/** 报价单-产品删除按钮操作 */ /** 报价单-产品删除按钮操作 */
handleDeleteQuotMaterial() { handleDeleteQuotMaterial() {
if (this.checkedQuotMaterial.length == 0) { if (this.checkedQuotMaterial.length == 0) {
@ -1437,10 +1452,12 @@ export default {
}); });
} }
}, },
/** 复选框选中数据 */ /** 复选框选中数据 */
handleQuotMaterialSelectionChange(selection) { handleQuotMaterialSelectionChange(selection) {
this.checkedQuotMaterial = selection.map(item => item.index) this.checkedQuotMaterial = selection.map(item => item.index)
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('quot/quot/export', { this.download('quot/quot/export', {
@ -1448,7 +1465,7 @@ export default {
}, `quot_${new Date().getTime()}.xlsx`) }, `quot_${new Date().getTime()}.xlsx`)
}, },
// /** 对产品数据-数量、金额进行合算 */
getSummaries(param) { getSummaries(param) {
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
@ -1479,7 +1496,7 @@ export default {
return sums; return sums;
}, },
/*********************************附件上传*****************************************/ /*********************************附件列表数据展示、上传*****************************************/
//- //-
getQuotXjFileList(){ getQuotXjFileList(){
const param = {relationId:this.form.quotId,fileType:'quotXjFile'} const param = {relationId:this.form.quotId,fileType:'quotXjFile'}
@ -1532,7 +1549,7 @@ export default {
this.quotHjFileList = response.rows; this.quotHjFileList = response.rows;
}); });
}, },
// //
handleAddFile(group){ handleAddFile(group){
this.addFileOpen = true; this.addFileOpen = true;
this.quotJsqrFileList = []; this.quotJsqrFileList = [];
@ -1599,7 +1616,7 @@ export default {
} }
}); });
}, },
/*********************************附件上传*****************************************/ /*********************************附件列表数据展示、上传*****************************************/
// //
showJsqrDialog(){ showJsqrDialog(){