This commit is contained in:
xd 2024-04-17 13:47:56 +08:00
parent 7521b1b76a
commit bf0cadb8d4
13 changed files with 168 additions and 57 deletions

View File

@ -2,6 +2,12 @@ package com.ruoyi.web.controller.priceVerification;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.quot.domain.Quot;
import com.ruoyi.quot.service.IQuotService;
import com.ruoyi.technicalConfirm.domain.QuotJsqr;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -34,6 +40,9 @@ public class QuotHjController extends BaseController
@Autowired
private IQuotHjService quotHjService;
@Autowired
private IQuotService quotService;
/**
* 查询报价单-核价单列表
*/
@ -101,4 +110,42 @@ public class QuotHjController extends BaseController
{
return toAjax(quotHjService.deleteQuotHjByQuotHjIds(quotHjIds));
}
/**
* 报价单-核价单 提交报价组
*/
@PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:commit')")
@Log(title = "报价单-核价单 提交报价组", businessType = BusinessType.UPDATE)
@PostMapping("/commitHj")
public AjaxResult commitHj(@RequestBody QuotHj quotHj) {
quotHj.setUpdateBy(getUsername());
quotHj.setQuotHjPricingDate(DateUtils.getNowDate());//报价单-核价单 核价日期设置为 当前日期
quotHjService.updateQuotHj(quotHj);
String quotHjId = quotHj.getQuotHjId();
Quot quot = quotService.selectQuotByQuotHjId(quotHjId);
quot.setQuotHjApprovalStatus("2");//报价单-核价单 状态设置为 已协助
quotService.updateQuot(quot);
return success();
}
/**
* 报价单-核价单 驳回
*/
@PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:reject')")
@Log(title = "报价单-核价单 驳回", businessType = BusinessType.OTHER)
@PostMapping("/rejectHj")
public AjaxResult rejectHj(@RequestBody QuotHj quotHj)
{
quotHj.setUpdateBy(getUsername());
quotHjService.updateQuotHj(quotHj);
String quotHjId = quotHj.getQuotHjId();
Quot quot = quotService.selectQuotByQuotHjId(quotHjId);
quot.setQuotHjApprovalStatus("3");
quotService.updateQuot(quot);
return success();
}
}

View File

@ -301,6 +301,7 @@ public class QuotController extends BaseController
quot.setQuotHjId(quotHjId);
quot.setQuotHjApprovalStatus("1");//报价单-核价单 状态设置为 协助中
quot.setUpdateBy(getUsername());
quotService.updateQuot(quot);
return success();
@ -326,7 +327,10 @@ public class QuotController extends BaseController
return error("核价还未完成");
}
info.setQuotQuotationDate(DateUtils.getNowDate());//报价单-报价日期设置为 当前日期
info.setQuotApprovalStatus("2");
info.setQuotCheckUserName(getUsername());
quotService.updateQuot(info);
return success();
}

View File

@ -332,8 +332,10 @@ public class QuotJsqrController extends BaseController
@PostMapping("/commitQuot")
public AjaxResult commitQuot(@RequestBody QuotJsqr quotJsqr)
{
String quotJsqrId = quotJsqr.getQuotJsqrId();
quotJsqr.setUpdateBy(getUsername());
quotJsqrService.updateQuotJsqr(quotJsqr);
String quotJsqrId = quotJsqr.getQuotJsqrId();
QuotJsqr info = quotJsqrService.selectQuotJsqrByQuotJsqrId(quotJsqrId);
Quot quot = quotService.selectQuotByQuotJsqrId(quotJsqrId);

View File

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 报价单-核价单对象 quot_hj
*
@ -27,8 +29,8 @@ public class QuotHj extends BaseEntity
private String quotHjPricingType;
/** 核价日期 */
@Excel(name = "核价日期")
private String quotHjPricingDate;
@Excel(name = "核价日期",dateFormat = "yyyy-MM-dd hh:MM:ss")
private Date quotHjPricingDate;
/** 备注 */
@Excel(name = "备注")
@ -75,12 +77,9 @@ public class QuotHj extends BaseEntity
{
return quotHjPricingType;
}
public void setQuotHjPricingDate(String quotHjPricingDate)
{
this.quotHjPricingDate = quotHjPricingDate;
}
public void setQuotHjPricingDate(Date quotHjPricingDate) { this.quotHjPricingDate = quotHjPricingDate; }
public String getQuotHjPricingDate()
public Date getQuotHjPricingDate()
{
return quotHjPricingDate;
}

View File

@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import com.ruoyi.priceVerification.mapper.QuotHjMapper;
import com.ruoyi.priceVerification.domain.QuotHj;
import com.ruoyi.priceVerification.service.IQuotHjService;
import org.springframework.transaction.annotation.Transactional;
/**
* 报价单-核价单Service业务层处理
@ -50,10 +51,12 @@ public class QuotHjServiceImpl implements IQuotHjService
* @param quotHj 报价单-核价单
* @return 结果
*/
@Transactional
@Override
public int insertQuotHj(QuotHj quotHj)
{
quotHj.setCreateTime(DateUtils.getNowDate());
quotHj.setUpdateTime(DateUtils.getNowDate());
return quotHjMapper.insertQuotHj(quotHj);
}
@ -63,6 +66,7 @@ public class QuotHjServiceImpl implements IQuotHjService
* @param quotHj 报价单-核价单
* @return 结果
*/
@Transactional
@Override
public int updateQuotHj(QuotHj quotHj)
{
@ -76,6 +80,7 @@ public class QuotHjServiceImpl implements IQuotHjService
* @param quotHjIds 需要删除的报价单-核价单主键
* @return 结果
*/
@Transactional
@Override
public int deleteQuotHjByQuotHjIds(String[] quotHjIds)
{
@ -88,6 +93,7 @@ public class QuotHjServiceImpl implements IQuotHjService
* @param quotHjId 报价单-核价单主键
* @return 结果
*/
@Transactional
@Override
public int deleteQuotHjByQuotHjId(String quotHjId)
{

View File

@ -86,9 +86,16 @@ public interface QuotMapper
public int deleteQuotMaterialByQuotId(String quotId);
/**
* 技术确认单Id
* 获取报价单信息
* @param quotJsqrId
* @return
*/
Quot selectQuotByQuotJsqrId(String quotJsqrId);
/**
* 获取报价单信息
* @param quotHjId
* @return
*/
Quot selectQuotByQuotHjId(String quotHjId);
}

View File

@ -60,9 +60,16 @@ public interface IQuotService
public int deleteQuotByQuotId(String quotId);
/**
* 技术确认单Id
* 获取报价单信息
* @param quotJsqrId
* @return
*/
Quot selectQuotByQuotJsqrId(String quotJsqrId);
/**
* 获取报价单信息
* @param quotHjId
* @return
*/
Quot selectQuotByQuotHjId(String quotHjId);
}

View File

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

View File

@ -73,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="quotJoins">
left join sys_user u on u.user_name=a.create_by
left join sys_user u2 on u2.user_name=a.quot_check_user_name
left join sys_dept d on u.dept_id = d.dept_id
left join quot_jsqr q on q.quot_jsqr_id = a.quot_jsxz_confirm_id
left join quot_hj h on h.quot_hj_id = a.quot_ht_id
@ -83,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_customer_name,a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address,
a.quot_phone, a.quot_inquiry_date, 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, a.quot_check_user_nickname, a.quot_approval_status,
a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
@ -119,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.quot_id, a.quot_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_name,
a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_phone, a.quot_inquiry_date,
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, a.quot_check_user_nickname, a.quot_approval_status,
a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
a.create_by, a.create_time, a.update_by, a.update_time,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
@ -165,7 +166,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotQuantity != null">quot_quantity,</if>
<if test="quotTotalPrice != null">quot_total_price,</if>
<if test="quotCheckUserName != null">quot_check_user_name,</if>
<if test="quotCheckUserNickname != null">quot_check_user_nickname,</if>
<if test="quotApprovalStatus != null">quot_approval_status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
@ -202,7 +202,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotQuantity != null">#{quotQuantity},</if>
<if test="quotTotalPrice != null">#{quotTotalPrice},</if>
<if test="quotCheckUserName != null">#{quotCheckUserName},</if>
<if test="quotCheckUserNickname != null">#{quotCheckUserNickname},</if>
<if test="quotApprovalStatus != null">#{quotApprovalStatus},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -242,7 +241,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotQuantity != null">quot_quantity = #{quotQuantity},</if>
<if test="quotTotalPrice != null">quot_total_price = #{quotTotalPrice},</if>
<if test="quotCheckUserName != null">quot_check_user_name = #{quotCheckUserName},</if>
<if test="quotCheckUserNickname != null">quot_check_user_nickname = #{quotCheckUserNickname},</if>
<if test="quotApprovalStatus != null">quot_approval_status = #{quotApprovalStatus},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@ -296,4 +294,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where quot_jsxz_confirm_id = #{quotJsqrId}
</select>
<select id="selectQuotByQuotHjId" parameterType="String" resultMap="QuotResult">
<include refid="selectQuotVo"/>
where quot_ht_id = #{quotHjId}
</select>
</mapper>

View File

@ -42,3 +42,22 @@ export function delPriceVerification(quotHjId) {
method: 'delete'
})
}
//提交报价单-核价单 至报价组
export function commitHj(data) {
return request({
url: '/priceVerification/priceVerification/commitHj',
method: 'post',
data: data
})
}
//驳回报价单-核价单
export function rejectHj(data) {
return request({
url: '/priceVerification/priceVerification/rejectHj',
method: 'post',
data: data
})
}
rejectHj

View File

@ -170,9 +170,9 @@
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<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>
</div>
@ -190,9 +190,10 @@
}
</style>
<script>
import { listPriceVerification, getPriceVerification, updatePriceVerification } from "@/api/priceVerification/priceVerification";
import { listPriceVerification, getPriceVerification, commitHj, rejectHj } from "@/api/priceVerification/priceVerification";
import { getToken } from "@/utils/auth";
import { quotFileList, quotFileDelete} from "@/api/quot/quot";
import {parseTime} from "../../../utils/ruoyi";
export default {
name: "PriceVerification",
@ -273,10 +274,7 @@ export default {
this.loading = false;
});
},
//
cancel() {
this.open = false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -300,31 +298,35 @@ export default {
const quotHjId = row.quotHjId || this.ids
getPriceVerification(quotHjId).then(response => {
this.form = response.data;
//this.form.quotHjPricingDate = parseTime(this.form.quotHjPricingDate);
this.open = true;
this.title = "核价单信息";
this.getQuotHjFileList();
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.quotHjId != null) {
updatePriceVerification(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
/** 提交报价按钮 */
commitHj() {
var quotHjFileNum = this.quotHjFileList.length;
if(quotHjFileNum==0){
this.$modal.msgError("核价附件必须上传");
return;
}
//-
commitHj(this.form).then(response => {
this.open = false;
this.getList();
});
} else {
addPriceVerification(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
})
},
/** 核价单驳回按钮 */
rejectHj() {
rejectHj(this.form).then(response => {
this.$modal.msgSuccess("驳回成功");
this.open = false;
this.getList();
});
}
}
});
},
//-

View File

@ -111,7 +111,12 @@
<el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" width="150px"/>
<el-table-column label="技术协助状态" align="center" prop="quotJsxzApprovalStatus" width="150px">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsxz_approval_status" :value="scope.row.quotJsxzApprovalStatus"/>
<dict-tag :options="dict.type.quot_jsxz_approval_status" :value="scope.row.quotJsxzApprovalStatus" v-if="scope.row.quotJsxzApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="核价协助状态" align="center" prop="quotHjApprovalStatus" width="150px">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_hj_approval_status" :value="scope.row.quotHjApprovalStatus" v-if="scope.row.quotHjApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createName" width="150px"/>
@ -673,7 +678,8 @@
<script>
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot";
import { getToken } from "@/utils/auth";
import { checkPermi } from '@/utils/permission' //
import { checkPermi } from '@/utils/permission';//
import {parseTime} from "../../../utils/ruoyi";
export default {
name: "Quot",
@ -860,9 +866,6 @@ export default {
this.form.quotSalesmanBm = this.$store.state.user.sapBm;
this.form.quotSalesmanDeptId = this.$store.state.user.deptId;
this.form.quotSalesmanDeptName = this.$store.state.user.deptName;
this.quotMaterialList = [];
this.quotXjFileList = [];
this.quotFkFileList = [];
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -870,6 +873,9 @@ export default {
const quotId = row.quotId || this.ids
getQuot(quotId).then(response => {
this.form = response.data;
//this.form.quotInquiryDate = parseTime(this.form.quotInquiryDate);
//this.form.quotQuotationDate = parseTime(this.form.quotQuotationDate);
this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
this.quotMaterialList = response.data.quotMaterialList;
this.open = true;
@ -958,7 +964,6 @@ export default {
});
},
/** 报价组报价单提交反馈按钮 */
feedbackQuotForm() {
var quotFkFileNum = this.quotFkFileList.length;

View File

@ -749,7 +749,7 @@
</el-table>
</el-dialog>
</el-form>
<div slot="footer" class="dialog-footer" v-if="this.form.quotJsxzApprovalStatus!=2">
<div slot="footer" class="dialog-footer" v-if="this.form.quotJsxzApprovalStatus==1">
<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>