This commit is contained in:
xd 2024-04-10 15:33:50 +08:00
parent 051bd5a55d
commit 545d650d08
7 changed files with 180 additions and 51 deletions

View File

@ -5,6 +5,8 @@ import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.quot.domain.Quot;
import com.ruoyi.quot.service.IQuotService;
import com.ruoyi.technicalConfirm.domain.QuotJsqr;
import com.ruoyi.technicalConfirm.domain.QuotJsqrXzDetail;
import com.ruoyi.technicalConfirm.service.IQuotJsqrService;
@ -39,6 +41,9 @@ public class QuotJsqrController extends BaseController
@Autowired
private IQuotJsqrService quotJsqrService;
@Autowired
private IQuotService quotService;
/**
* 查询报价单-技术确认单列表
*/
@ -260,4 +265,67 @@ public class QuotJsqrController extends BaseController
quotJsqrService.updateQuotJsqr(quotJsqr);
return success(quotJsqr);
}
/**
* 获取报价单-技术确认单详细信息
*/
@PreAuthorize("@ss.hasPermi('jsqr:jsqr:commit')")
@PostMapping("/commitQuot")
public AjaxResult commitQuot(@RequestBody QuotJsqr quotJsqr)
{
String quotJsqrId = quotJsqr.getQuotJsqrId();
QuotJsqr info = quotJsqrService.selectQuotJsqrByQuotJsqrId(quotJsqrId);
Quot quot = quotService.selectQuotByQuotJsqrId(quotJsqrId);
String quot_jsxz_group = quot.getQuotJsxzGroup();
String quotJsxzConfirmId = quot.getQuotJsxzConfirmId();
if(StringUtils.isNotEmpty(quotJsxzConfirmId)){
Boolean tlFlag = true;
if(quot_jsxz_group.indexOf("TL")!=-1) {//校验特缆 操作人审核人组长 通过情况
String quot_jsqr_tl_approval_status = info.getQuotJsqrTlApprovalStatus();
if ("1".equals(quot_jsqr_tl_approval_status)) {
tlFlag = false;
}
}
if(!tlFlag){
return error("特缆协助还未完成");
}
Boolean dyFlag = true;
if(quot_jsxz_group.indexOf("DY")!=-1) {//校验特缆 操作人审核人组长 通过情况
String quot_jsqr_dy_approval_status = info.getQuotJsqrDyApprovalStatus();
if ("1".equals(quot_jsqr_dy_approval_status)) {
dyFlag = false;
}
}
if(!dyFlag){
return error("低压协助还未完成");
}
Boolean zyFlag = true;
if(quot_jsxz_group.indexOf("ZY")!=-1) {//校验特缆 操作人审核人组长 通过情况
String quot_jsqr_zy_approval_status = info.getQuotJsqrZyApprovalStatus();
if ("1".equals(quot_jsqr_zy_approval_status)) {
zyFlag = false;
}
}
if(!zyFlag){
return error("中压协助还未完成");
}
Boolean qtFlag = true;
if(quot_jsxz_group.indexOf("QT")!=-1) {//校验特缆 操作人审核人组长 通过情况
String quot_jsqr_qt_approval_status = info.getQuotJsqrQtApprovalStatus();
if ("1".equals(quot_jsqr_qt_approval_status)) {
qtFlag = false;
}
}
if(!qtFlag){
return error("其他协助还未完成");
}
quot.setQuotJsxzApprovalStatus("2");//报价单-技术协助状态 设置为 已协助
}
return success(quotService.updateQuot(quot));
}
}

View File

@ -6,15 +6,15 @@ import com.ruoyi.quot.domain.QuotMaterial;
/**
* 报价Mapper接口
*
*
* @author ruoyi
* @date 2024-04-01
*/
public interface QuotMapper
public interface QuotMapper
{
/**
* 查询报价
*
*
* @param quotId 报价主键
* @return 报价
*/
@ -22,7 +22,7 @@ public interface QuotMapper
/**
* 查询报价列表
*
*
* @param quot 报价
* @return 报价集合
*/
@ -30,7 +30,7 @@ public interface QuotMapper
/**
* 新增报价
*
*
* @param quot 报价
* @return 结果
*/
@ -38,7 +38,7 @@ public interface QuotMapper
/**
* 修改报价
*
*
* @param quot 报价
* @return 结果
*/
@ -46,7 +46,7 @@ public interface QuotMapper
/**
* 删除报价
*
*
* @param quotId 报价主键
* @return 结果
*/
@ -54,7 +54,7 @@ public interface QuotMapper
/**
* 批量删除报价
*
*
* @param quotIds 需要删除的数据主键集合
* @return 结果
*/
@ -62,26 +62,33 @@ public interface QuotMapper
/**
* 批量删除报价单-产品
*
*
* @param quotIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteQuotMaterialByQuotIds(String[] quotIds);
/**
* 批量新增报价单-产品
*
*
* @param quotMaterialList 报价单-产品列表
* @return 结果
*/
public int batchQuotMaterial(List<QuotMaterial> quotMaterialList);
/**
* 通过报价主键删除报价单-产品信息
*
*
* @param quotId 报价ID
* @return 结果
*/
public int deleteQuotMaterialByQuotId(String quotId);
/**
* 技术确认单Id
* @param quotJsqrId
* @return
*/
Quot selectQuotByQuotJsqrId(String quotJsqrId);
}

View File

@ -5,15 +5,15 @@ import com.ruoyi.quot.domain.Quot;
/**
* 报价Service接口
*
*
* @author ruoyi
* @date 2024-04-01
*/
public interface IQuotService
public interface IQuotService
{
/**
* 查询报价
*
*
* @param quotId 报价主键
* @return 报价
*/
@ -21,7 +21,7 @@ public interface IQuotService
/**
* 查询报价列表
*
*
* @param quot 报价
* @return 报价集合
*/
@ -29,7 +29,7 @@ public interface IQuotService
/**
* 新增报价
*
*
* @param quot 报价
* @return 结果
*/
@ -37,7 +37,7 @@ public interface IQuotService
/**
* 修改报价
*
*
* @param quot 报价
* @return 结果
*/
@ -45,7 +45,7 @@ public interface IQuotService
/**
* 批量删除报价
*
*
* @param quotIds 需要删除的报价主键集合
* @return 结果
*/
@ -53,9 +53,16 @@ public interface IQuotService
/**
* 删除报价信息
*
*
* @param quotId 报价主键
* @return 结果
*/
public int deleteQuotByQuotId(String quotId);
/**
* 技术确认单Id
* @param quotJsqrId
* @return
*/
Quot selectQuotByQuotJsqrId(String quotJsqrId);
}

View File

@ -112,6 +112,16 @@ public class QuotServiceImpl implements IQuotService
return quotMapper.deleteQuotByQuotId(quotId);
}
/**
* 技术确认单Id
* @param quotJsqrId
* @return
*/
@Override
public Quot selectQuotByQuotJsqrId(String quotJsqrId) {
return quotMapper.selectQuotByQuotJsqrId(quotJsqrId);
}
/**
* 新增报价单-产品信息
*

View File

@ -245,4 +245,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matDanw}, #{item.matSl}, #{item.quotId})
</foreach>
</insert>
<select id="selectQuotByQuotJsqrId" parameterType="String" resultMap="QuotResult">
<include refid="selectQuotVo"/>
where quot_jsxz_confirm_id = #{quotJsqrId}
</select>
</mapper>

View File

@ -51,3 +51,12 @@ export function doOperate(param) {
data: param
})
}
//提交报价技术确认单
export function commitQuot(data) {
return request({
url: '/jsqr/jsqr/commitQuot',
method: 'post',
data: data
})
}

View File

@ -399,7 +399,7 @@
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="低压审核意见" prop="quotJsqrDyCheckRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrDyCheckRemark" placeholder="请输入低压审核意见" />
<el-input type="textarea" autosize v-model="form.quotJsqrDyCheckRemark" placeholder="请输入低压审核意见" :disabled="quotJsqrDyCheckRemarkDis"/>
</el-form-item>
</el-col>
</el-row>
@ -430,7 +430,7 @@
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="低压组长确认意见" prop="quotJsqrDyLeaderRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrDyLeaderRemark" placeholder="请输入低压组长确认意见" />
<el-input type="textarea" autosize v-model="form.quotJsqrDyLeaderRemark" placeholder="请输入低压组长确认意见" :disabled="quotJsqrDyLeaderRemarkDis"/>
</el-form-item>
</el-col>
</el-row>
@ -530,7 +530,7 @@
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="中压审核意见" prop="quotJsqrZyCheckRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrZyCheckRemark" placeholder="请输入中压审核意见" />
<el-input type="textarea" autosize v-model="form.quotJsqrZyCheckRemark" placeholder="请输入中压审核意见" :disabled="quotJsqrZyCheckRemarkDis"/>
</el-form-item>
</el-col>
</el-row>
@ -561,7 +561,7 @@
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="中压组长确认意见" prop="quotJsqrZyLeaderRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrZyLeaderRemark" placeholder="请输入中压组长确认意见" />
<el-input type="textarea" autosize v-model="form.quotJsqrZyLeaderRemark" placeholder="请输入中压组长确认意见" :disabled="quotJsqrZyLeaderRemarkDis"/>
</el-form-item>
</el-col>
</el-row>
@ -661,7 +661,7 @@
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="其他审核意见" prop="quotJsqrQtCheckRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrQtCheckRemark" placeholder="请输入其他审核意见" />
<el-input type="textarea" autosize v-model="form.quotJsqrQtCheckRemark" placeholder="请输入其他审核意见" :disabled="quotJsqrQtCheckRemarkDis"/>
</el-form-item>
</el-col>
</el-row>
@ -692,7 +692,7 @@
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="其他组长确认意见" prop="quotJsqrQtLeaderRemark">
<el-input type="textarea" autosize v-model="form.quotJsqrQtLeaderRemark" placeholder="请输入其他组长确认意见" />
<el-input type="textarea" autosize v-model="form.quotJsqrQtLeaderRemark" placeholder="请输入其他组长确认意见" :disabled="quotJsqrQtLeaderRemarkDis"/>
</el-form-item>
</el-col>
</el-row>
@ -735,8 +735,8 @@
</el-dialog>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<span v-hasPermi="['jsqr:jsqr:commit']"><el-button type="primary" @click="commitQuot">提交报价</el-button></span>
<span style="margin-left: 10px"><el-button @click="cancel"> </el-button></span>
</div>
</el-dialog>
</div>
@ -764,7 +764,7 @@
}
</style>
<script>
import { listJsqr, getJsqr, delJsqr, addJsqr, updateJsqr, doOperate } from "@/api/technicalConfirm/technicalConfirm";
import { listJsqr, getJsqr, delJsqr, addJsqr, updateJsqr, doOperate, commitQuot } from "@/api/technicalConfirm/technicalConfirm";
import { getToken } from "@/utils/auth";
import { quotFileList,quotFileDelete } from "@/api/quot/quot";
@ -918,24 +918,22 @@ export default {
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.quotJsqrId != null) {
updateJsqr(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addJsqr(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
commitQuot() {
//-
let quotJsxzGroups = '';
if(this.form.quotJsxzGroup){
this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){
quotJsxzGroups+=',';
}
}
});
quotJsxzGroups+=item;
})
}
this.form.quotJsxzGroup = quotJsxzGroups;
//
commitQuot(this.form).then(response => {
this.open = false;
})
},
/** 删除按钮操作 */
handleDelete(row) {
@ -989,19 +987,19 @@ export default {
if("quotJsqrTl"==group){
this.addFileTitle = '特缆反馈附件'
this.fileType = 'quotJsqrTlFkFile';
this.uploadDis = (this.form.quotJsqrTlOperateState = 0);
this.uploadDis = (this.form.quotJsqrTlOperateState == 0 ? true : false);
}else if('quotJsqrDy'==group){
this.addFileTitle = '低压反馈附件'
this.fileType = 'quotJsqrDyFkFile';
this.uploadDis = (this.form.quotJsqrDyOperateState = 0);
this.uploadDis = (this.form.quotJsqrDyOperateState == 0 ? true : false);
}else if('quotJsqrZy'==group){
this.addFileTitle = '中压反馈附件'
this.fileType = 'quotJsqrZyFkFile';
this.uploadDis = (this.form.quotJsqrZyOperateState = 0);
this.uploadDis = (this.form.quotJsqrZyOperateState == 0 ? true : false);
}else if('quotJsqrQt'==group){
this.addFileTitle = '其他反馈附件'
this.fileType = 'quotJsqrQtFkFile';
this.uploadDis = (this.form.quotJsqrQtOperateState = 0);
this.uploadDis = (this.form.quotJsqrQtOperateState == 0 ? true : false);
}
//
this.getQuotJsqrFileList(this.fileType);
@ -1192,6 +1190,7 @@ export default {
//
//
//
//
if(quotJsqrTlOperateState == '0'&&quotJsqrTlCheckState == '0'&&quotJsqrTlLeaderState == '0'){
this.quotJsqrTlCheckRemarkDis=true;
@ -1205,6 +1204,8 @@ export default {
this.quotJsqrTlCheckRemarkDis=true;
}else if(quotJsqrTlOperateState == '2'&&quotJsqrTlCheckState == '2'&&quotJsqrTlLeaderState == '3'){
this.quotJsqrTlCheckRemarkDis=true;
}else if(quotJsqrTlOperateState == '3'){
this.quotJsqrTlCheckRemarkDis=true;
}else{
this.quotJsqrTlCheckRemarkDis=false;
}
@ -1214,6 +1215,7 @@ export default {
//
//
//
//
if(quotJsqrTlOperateState == '0'&&quotJsqrTlCheckState == '0'&&quotJsqrTlLeaderState == '0'){
this.quotJsqrTlLeaderRemarkDis=true;
@ -1223,6 +1225,8 @@ export default {
this.quotJsqrTlLeaderRemarkDis=true;
}else if(quotJsqrTlOperateState == '2'&&quotJsqrTlCheckState == '2'&&quotJsqrTlLeaderState == '2'){
this.quotJsqrTlLeaderRemarkDis=true;
}else if(quotJsqrTlOperateState == '3'){
this.quotJsqrTlLeaderRemarkDis=true;
}else{
this.quotJsqrTlLeaderRemarkDis=false;
}
@ -1240,6 +1244,7 @@ export default {
//
//
//
//
if(quotJsqrDyOperateState == '0'&&quotJsqrDyCheckState == '0'&&quotJsqrDyLeaderState == '0'){
this.quotJsqrDyCheckRemarkDis=true;
@ -1253,6 +1258,8 @@ export default {
this.quotJsqrDyCheckRemarkDis=true;
}else if(quotJsqrDyOperateState == '2'&&quotJsqrDyCheckState == '2'&&quotJsqrDyLeaderState == '3'){
this.quotJsqrDyCheckRemarkDis=true;
}else if(quotJsqrDyOperateState == '3'){
this.quotJsqrDyCheckRemarkDis=true;
}else{
this.quotJsqrDyCheckRemarkDis=false;
}
@ -1262,6 +1269,7 @@ export default {
//
//
//
//
if(quotJsqrDyOperateState == '0'&&quotJsqrDyCheckState == '0'&&quotJsqrDyLeaderState == '0'){
this.quotJsqrDyLeaderRemarkDis=true;
@ -1271,6 +1279,8 @@ export default {
this.quotJsqrDyLeaderRemarkDis=true;
}else if(quotJsqrDyOperateState == '2'&&quotJsqrDyCheckState == '2'&&quotJsqrDyLeaderState == '2'){
this.quotJsqrDyLeaderRemarkDis=true;
}else if(quotJsqrDyOperateState == '3'){
this.quotJsqrDyLeaderRemarkDis=true;
}else{
this.quotJsqrDyLeaderRemarkDis=false;
}
@ -1288,6 +1298,7 @@ export default {
//
//
//
//
if(quotJsqrZyOperateState == '0'&&quotJsqrZyCheckState == '0'&&quotJsqrZyLeaderState == '0'){
this.quotJsqrZyCheckRemarkDis=true;
@ -1301,6 +1312,8 @@ export default {
this.quotJsqrZyCheckRemarkDis=true;
}else if(quotJsqrZyOperateState == '2'&&quotJsqrZyCheckState == '2'&&quotJsqrZyLeaderState == '3'){
this.quotJsqrZyCheckRemarkDis=true;
}else if(quotJsqrZyOperateState == '3'){
this.quotJsqrZyCheckRemarkDis=true;
}else{
this.quotJsqrZyCheckRemarkDis=false;
}
@ -1310,6 +1323,7 @@ export default {
//
//
//
//
if(quotJsqrZyOperateState == '0'&&quotJsqrZyCheckState == '0'&&quotJsqrZyLeaderState == '0'){
this.quotJsqrZyLeaderRemarkDis=true;
@ -1319,6 +1333,8 @@ export default {
this.quotJsqrZyLeaderRemarkDis=true;
}else if(quotJsqrZyOperateState == '2'&&quotJsqrZyCheckState == '2'&&quotJsqrZyLeaderState == '2'){
this.quotJsqrZyLeaderRemarkDis=true;
}else if(quotJsqrZyOperateState == '3'){
this.quotJsqrZyLeaderRemarkDis=true;
}else{
this.quotJsqrZyLeaderRemarkDis=false;
}
@ -1336,6 +1352,7 @@ export default {
//
//
//
//
if(quotJsqrQtOperateState == '0'&&quotJsqrQtCheckState == '0'&&quotJsqrQtLeaderState == '0'){
this.quotJsqrQtCheckRemarkDis=true;
@ -1349,6 +1366,8 @@ export default {
this.quotJsqrQtCheckRemarkDis=true;
}else if(quotJsqrQtOperateState == '2'&&quotJsqrQtCheckState == '2'&&quotJsqrQtLeaderState == '3'){
this.quotJsqrQtCheckRemarkDis=true;
}else if(quotJsqrQtOperateState == '3'){
this.quotJsqrQtCheckRemarkDis=true;
}else{
this.quotJsqrQtCheckRemarkDis=false;
}
@ -1358,6 +1377,7 @@ export default {
//
//
//
//
if(quotJsqrQtOperateState == '0'&&quotJsqrQtCheckState == '0'&&quotJsqrQtLeaderState == '0'){
this.quotJsqrQtLeaderRemarkDis=true;
@ -1367,6 +1387,8 @@ export default {
this.quotJsqrQtLeaderRemarkDis=true;
}else if(quotJsqrQtOperateState == '2'&&quotJsqrQtCheckState == '2'&&quotJsqrQtLeaderState == '2'){
this.quotJsqrQtLeaderRemarkDis=true;
}else if(quotJsqrQtOperateState == '3'){
this.quotJsqrQtLeaderRemarkDis=true;
}else{
this.quotJsqrQtLeaderRemarkDis=false;
}