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.setQuotMatpriceDiff(quot.getQuotMatpriceDiff());
sysOaQuot.setCreateTime(DateUtils.getNowDate());
sysOaQuot.setIsFinish("0");// 报价已提交OA审批中
sysOaQuot.setMaterials(quot.getQuotMaterialList());
quotService.insertSysOAQuot(sysOaQuot);

View File

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

View File

@ -27,4 +27,11 @@ public interface OAQuotMapper
* @param 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
*/
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) {
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){
// 批量更新报价单-OA审批状态,备注
quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark());
//将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode());
}
redisCache.deleteObject("OAQuotTask");
}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">
<mapper namespace="com.ruoyi.quartz.mapper.OAQuotMapper">
<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
inner join (
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
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
) sq on q.quot_code = sq.quot_code
where q.quot_oa_approval_status = '2'
where q.quot_oa_approval_status = '1'
</select>
<update id="updateQuotOAApprovalStatus">
update quot set quot_oa_approval_status = #{state},quot_oa_approval_remark = #{remark}
where quot_id = #{quotId}
</update>
<update id="updateOAQuotByQuotCode">
update sys_oa_quot set isFinish = '1' where quot_code = #{quotCode}
</update>
</mapper>

View File

@ -67,6 +67,9 @@ public class SysOaQuot extends BaseEntity
/** OA审批备注 */
private String remark;
/** 报价单状态 1-整个报价流程结束(包括已反馈、已驳回) 0-提交OA待审批*/
private String isFinish;
/** 明细 */
List<QuotMaterial> materials;
@ -162,9 +165,7 @@ public class SysOaQuot extends BaseEntity
return quotQuotationRequire;
}
public void setQuotQuotationRequire(String quotQuotationRequire) {
this.quotQuotationRequire = quotQuotationRequire;
}
public void setQuotQuotationRequire(String quotQuotationRequire) {this.quotQuotationRequire = quotQuotationRequire;}
public String getQuotLvPrice() {
return quotLvPrice;
@ -200,6 +201,10 @@ public class SysOaQuot extends BaseEntity
@Override
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() {
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="quotMatpriceDiff != null">quot_matprice_diff,</if>
<if test="createTime != null">create_time,</if>
<if test="isFinish != null">isFinish,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<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="quotMatpriceDiff != null">#{quotMatpriceDiff},</if>
<if test="createTime != null">#{createTime},</if>
<if test="isFinish != null">#{isFinish},</if>
</trim>
</insert>

View File

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