This commit is contained in:
xd 2024-06-03 17:14:47 +08:00
parent 16ddb1c7f6
commit 9d6160848e
12 changed files with 219 additions and 62 deletions

View File

@ -1,5 +1,5 @@
#for tests only ! #for tests only !
#Mon Jun 03 10:50:48 CST 2024 #Mon Jun 03 14:49:50 CST 2024
jco.destination.pool_capacity=10 jco.destination.pool_capacity=10
jco.client.lang=ZH jco.client.lang=ZH
jco.client.ashost=172.19.0.120 jco.client.ashost=172.19.0.120

View File

@ -161,7 +161,8 @@ public class QuotController extends BaseController
quot.setCreateBy(getUsername()); quot.setCreateBy(getUsername());
quot.setQuotSalesmanCode(getUsername()); quot.setQuotSalesmanCode(getUsername());
quot.setUpdateBy(getUsername()); quot.setUpdateBy(getUsername());
return toAjax(quotService.insertQuot(quot)); quotService.insertQuot(quot);
return success(quot);
} }
/** /**
@ -416,6 +417,19 @@ public class QuotController extends BaseController
return success(); return success();
} }
/**
* 报价单提交核价协助
*/
@PreAuthorize("@ss.hasPermi('quot:quot:assistJsw')")
@Log(title = "报价单提交金思维协助", businessType = BusinessType.OTHER)
@PostMapping("/commitJswQuot")
public AjaxResult commitJswQuot(@RequestBody Quot quot)
{
// TODO 对接金思维接口
return success();
}
/** /**
* 发送信息-报价组提交核价协助 * 发送信息-报价组提交核价协助
* @param quotHj * @param quotHj
@ -441,11 +455,15 @@ public class QuotController extends BaseController
//Quot info = quotService.selectQuotByQuotId(quot_id); //Quot info = quotService.selectQuotByQuotId(quot_id);
String quot_jsxz_approval_status = quot.getQuotJsxzApprovalStatus(); String quot_jsxz_approval_status = quot.getQuotJsxzApprovalStatus();
String quot_hj_approval_status = quot.getQuotHjApprovalStatus(); String quot_hj_approval_status = quot.getQuotHjApprovalStatus();
String quot_jsw_approval_status = quot.getQuotJswApprovalStatus();
if("1".equals(quot_jsxz_approval_status)){ if("1".equals(quot_jsxz_approval_status)){
return error("技术协助还未完成"); return error("技术协助还未完成");
} }
if("1".equals(quot_hj_approval_status)){ if("1".equals(quot_hj_approval_status)){
return error("核价还未完成"); return error("核价协助还未完成");
}
if("1".equals(quot_jsw_approval_status)){
return error("金思维协助还未完成");
} }
quot.setQuotQuotationDate(DateUtils.getNowDate());//报价单-报价日期设置为 当前日期 quot.setQuotQuotationDate(DateUtils.getNowDate());//报价单-报价日期设置为 当前日期

View File

@ -1,43 +1,95 @@
package com.ruoyi.web.controller.tool.quot; package com.ruoyi.web.controller.tool.quot;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult; import com.ruoyi.quot.domain.Quot;
import com.ruoyi.quot.domain.QuotMaterial;
import com.ruoyi.quot.service.IQuotService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@Api("报价单数据接收") @Api("报价单数据接收")
@RestController @RestController
@RequestMapping("/jsw/jsw") @RequestMapping("/jsw/jsw")
public class quotJswController extends BaseController { public class quotJswController extends BaseController {
@Autowired
private IQuotService quotService;
@ApiOperation("同步报价数据") @ApiOperation("同步报价数据")
@PostMapping("/updateQuot") @PostMapping("/updateQuot")
public R<String> updateQuot(@RequestBody String quotJson) public R<String> updateQuot(@RequestBody String quotJson)
{ {
quotModel quot = JSON.parseObject(quotJson, quotModel.class); try{
/*if(StringUtils.isBlank(quot.getQuotJswCode())){ quotModel quot = JSON.parseObject(quotJson, quotModel.class);
return R.fail("金思维报价单号不能为空"); if(quot==null){
return R.fail("参数异常为空");
}
if(StringUtils.isBlank(quot.getQuotJswCode())){
return R.fail("金思维报价单号不能为空");
}
if(StringUtils.isBlank(quot.getQuotCode())){
return R.fail("客户报价单号不能为空");
}
if(StringUtils.isBlank(quot.getQuotTongPrice())){
return R.fail("铜价不能为空");
}
if(StringUtils.isBlank(quot.getQuotLvPrice())){
return R.fail("铝价不能为空");
}
if(StringUtils.isBlank(quot.getQuotMatpriceDiff())){
return R.fail("整单料价价差率不能为空");
}
List<quotMaterialModel> materials = quot.getQuotMaterial();
if(materials==null || materials.size()==0){
return R.fail("明细不能为空");
}
// 更新报价单
String quotId = quotService.selectQuotByQuotCode(quot.getQuotCode());
Quot q = quotService.selectQuotByQuotId(quotId);
q.setQuotJswCode(quot.getQuotJswCode());
q.setQuotLvPrice(quot.getQuotLvPrice());
q.setQuotTongPrice(quot.getQuotTongPrice());
q.setQuotMatpriceDiff(quot.getQuotMatpriceDiff());
List<QuotMaterial> qmaterials = new ArrayList<QuotMaterial>();
QuotMaterial quotMaterial = new QuotMaterial();
for(quotMaterialModel model:materials){
quotMaterial = new QuotMaterial();
quotMaterial.setMatXingh(model.getMatXingh());
quotMaterial.setMatGuig(model.getMatGuig());
quotMaterial.setMatDiany(model.getMatDiany());
quotMaterial.setMatDanw(model.getMatDanw());
quotMaterial.setMatStandard(model.getMatStandard());
quotMaterial.setMatSl(model.getMatSl());
quotMaterial.setMatRemark(model.getMatRemark());
quotMaterial.setMatMatprice(model.getMatMatprice());
quotMaterial.setMatPrice(model.getMatPrice());
quotMaterial.setMatQuotPrice(model.getMatQuotPrice());
quotMaterial.setMatQuotAllPrice(model.getMatQuotAllPrice());
quotMaterial.setMatMatpriceDiff(model.getMatMatpriceDiff());
quotMaterial.setIndex(model.getIndex());
qmaterials.add(quotMaterial);
}
q.setQuotMaterialList(qmaterials);
quotService.updateQuot(q);
}catch(Exception e){
return R.fail(e.getMessage());
} }
if(StringUtils.isBlank(quot.getQuotCode())){
return R.fail("客户报价单号不能为空");
}
if(StringUtils.isBlank(quot.getQuotTongPrice())){
return R.fail("铜价不能为空");
}
if(StringUtils.isBlank(quot.getQuotLvPrice())){
return R.fail("铝价不能为空");
}
if(StringUtils.isBlank(quot.getQuotMatpriceDiff())){
return R.fail("整单料价价差率不能为空");
}*/
return R.ok(); return R.ok();
} }
} }

View File

@ -7,6 +7,9 @@ import java.math.BigDecimal;
@ApiModel(value = "quotMaterialModel", description = "报价单产品明细") @ApiModel(value = "quotMaterialModel", description = "报价单产品明细")
public class quotMaterialModel { public class quotMaterialModel {
@ApiModelProperty("行号")
private Integer index;//行号
@ApiModelProperty("型号") @ApiModelProperty("型号")
private String matXingh;//型号 private String matXingh;//型号
@ -41,12 +44,14 @@ public class quotMaterialModel {
private BigDecimal matQuotAllPrice;//报价金额 private BigDecimal matQuotAllPrice;//报价金额
@ApiModelProperty("料价价差率") @ApiModelProperty("料价价差率")
private String matMatpriceDiff;//料价价差率 private BigDecimal matMatpriceDiff;//料价价差率
public Integer getIndex() { return index; }
public void setIndex(Integer index) { this.index = index; }
public String getMatXingh() { public String getMatXingh() {
return matXingh; return matXingh;
} }
public void setMatXingh(String matXingh) { public void setMatXingh(String matXingh) {
this.matXingh = matXingh; this.matXingh = matXingh;
} }
@ -54,7 +59,6 @@ public class quotMaterialModel {
public String getMatGuig() { public String getMatGuig() {
return matGuig; return matGuig;
} }
public void setMatGuig(String matGuig) { public void setMatGuig(String matGuig) {
this.matGuig = matGuig; this.matGuig = matGuig;
} }
@ -62,7 +66,6 @@ public class quotMaterialModel {
public String getMatDiany() { public String getMatDiany() {
return matDiany; return matDiany;
} }
public void setMatDiany(String matDiany) { public void setMatDiany(String matDiany) {
this.matDiany = matDiany; this.matDiany = matDiany;
} }
@ -70,7 +73,6 @@ public class quotMaterialModel {
public String getMatStandard() { public String getMatStandard() {
return matStandard; return matStandard;
} }
public void setMatStandard(String matStandard) { public void setMatStandard(String matStandard) {
this.matStandard = matStandard; this.matStandard = matStandard;
} }
@ -78,7 +80,6 @@ public class quotMaterialModel {
public BigDecimal getMatSl() { public BigDecimal getMatSl() {
return matSl; return matSl;
} }
public void setMatSl(BigDecimal matSl) { public void setMatSl(BigDecimal matSl) {
this.matSl = matSl; this.matSl = matSl;
} }
@ -86,7 +87,6 @@ public class quotMaterialModel {
public String getMatDanw() { public String getMatDanw() {
return matDanw; return matDanw;
} }
public void setMatDanw(String matDanw) { public void setMatDanw(String matDanw) {
this.matDanw = matDanw; this.matDanw = matDanw;
} }
@ -94,7 +94,6 @@ public class quotMaterialModel {
public String getMatRemark() { public String getMatRemark() {
return matRemark; return matRemark;
} }
public void setMatRemark(String matRemark) { public void setMatRemark(String matRemark) {
this.matRemark = matRemark; this.matRemark = matRemark;
} }
@ -102,7 +101,6 @@ public class quotMaterialModel {
public BigDecimal getMatMatprice() { public BigDecimal getMatMatprice() {
return matMatprice; return matMatprice;
} }
public void setMatMatprice(BigDecimal matMatprice) { public void setMatMatprice(BigDecimal matMatprice) {
this.matMatprice = matMatprice; this.matMatprice = matMatprice;
} }
@ -110,7 +108,6 @@ public class quotMaterialModel {
public BigDecimal getMatPrice() { public BigDecimal getMatPrice() {
return matPrice; return matPrice;
} }
public void setMatPrice(BigDecimal matPrice) { public void setMatPrice(BigDecimal matPrice) {
this.matPrice = matPrice; this.matPrice = matPrice;
} }
@ -118,7 +115,6 @@ public class quotMaterialModel {
public BigDecimal getMatQuotPrice() { public BigDecimal getMatQuotPrice() {
return matQuotPrice; return matQuotPrice;
} }
public void setMatQuotPrice(BigDecimal matQuotPrice) { public void setMatQuotPrice(BigDecimal matQuotPrice) {
this.matQuotPrice = matQuotPrice; this.matQuotPrice = matQuotPrice;
} }
@ -126,16 +122,12 @@ public class quotMaterialModel {
public BigDecimal getMatQuotAllPrice() { public BigDecimal getMatQuotAllPrice() {
return matQuotAllPrice; return matQuotAllPrice;
} }
public void setMatQuotAllPrice(BigDecimal matQuotAllPrice) { public void setMatQuotAllPrice(BigDecimal matQuotAllPrice) {
this.matQuotAllPrice = matQuotAllPrice; this.matQuotAllPrice = matQuotAllPrice;
} }
public String getMatMatpriceDiff() { public BigDecimal getMatMatpriceDiff() { return matMatpriceDiff; }
return matMatpriceDiff; public void setMatMatpriceDiff(BigDecimal matMatpriceDiff) {
}
public void setMatMatpriceDiff(String matMatpriceDiff) {
this.matMatpriceDiff = matMatpriceDiff; this.matMatpriceDiff = matMatpriceDiff;
} }
} }

View File

@ -24,6 +24,9 @@ public class Quot extends BaseEntity
@Excel(name = "报价单号") @Excel(name = "报价单号")
private String quotCode; private String quotCode;
/** 金思维报价单号 */
private String quotJswCode;
/** 业务员账号 */ /** 业务员账号 */
private String quotSalesmanCode; private String quotSalesmanCode;
@ -143,6 +146,10 @@ public class Quot extends BaseEntity
private String quotHjPricingDate;//核价日期 private String quotHjPricingDate;//核价日期
private String quotHjRemark;//核价备注 private String quotHjRemark;//核价备注
/** 金思维 **/
private String quotJswApprovalStatus;
/** 报价单-产品信息 */ /** 报价单-产品信息 */
private List<QuotMaterial> quotMaterialList; private List<QuotMaterial> quotMaterialList;
@ -164,6 +171,9 @@ public class Quot extends BaseEntity
{ {
return quotCode; return quotCode;
} }
public String getQuotJswCode() { return quotJswCode; }
public void setQuotJswCode(String quotJswCode) { this.quotJswCode = quotJswCode; }
public String getQuotSalesmanCode() { return quotSalesmanCode; } public String getQuotSalesmanCode() { return quotSalesmanCode; }
public void setQuotSalesmanCode(String quotSalesmanCode) { this.quotSalesmanCode = quotSalesmanCode; } public void setQuotSalesmanCode(String quotSalesmanCode) { this.quotSalesmanCode = quotSalesmanCode; }
@ -338,10 +348,7 @@ public class Quot extends BaseEntity
public String getCreateName() {return createName;} public String getCreateName() {return createName;}
public void setCreateName(String createName) {this.createName = createName;} public void setCreateName(String createName) {this.createName = createName;}
public List<QuotMaterial> getQuotMaterialList() public List<QuotMaterial> getQuotMaterialList() { return quotMaterialList; }
{
return quotMaterialList;
}
public void setQuotMaterialList(List<QuotMaterial> quotMaterialList) public void setQuotMaterialList(List<QuotMaterial> quotMaterialList)
{ {
@ -412,4 +419,7 @@ public class Quot extends BaseEntity
public String getQuotHjRemark() { return quotHjRemark; } public String getQuotHjRemark() { return quotHjRemark; }
public void setQuotHjRemark(String quotHjRemark) { this.quotHjRemark = quotHjRemark; } public void setQuotHjRemark(String quotHjRemark) { this.quotHjRemark = quotHjRemark; }
public String getQuotJswApprovalStatus() { return quotJswApprovalStatus; }
public void setQuotJswApprovalStatus(String quotJswApprovalStatus) { this.quotJswApprovalStatus = quotJswApprovalStatus; }
} }

View File

@ -60,7 +60,7 @@ public class QuotMaterial extends BaseEntity
private BigDecimal matQuotAllPrice; private BigDecimal matQuotAllPrice;
/** 料价价差率 */ /** 料价价差率 */
private String matMatpriceDiff; private BigDecimal matMatpriceDiff;
/** 排序 */ /** 排序 */
private Integer index;//序号 private Integer index;//序号
@ -140,9 +140,9 @@ public class QuotMaterial extends BaseEntity
public BigDecimal getMatQuotAllPrice() { return matQuotAllPrice; } public BigDecimal getMatQuotAllPrice() { return matQuotAllPrice; }
public void setMatQuotAllPrice(BigDecimal matQuotAllPrice) { this.matQuotAllPrice = matQuotAllPrice; } public void setMatQuotAllPrice(BigDecimal matQuotAllPrice) { this.matQuotAllPrice = matQuotAllPrice; }
public String getMatMatpriceDiff() { return matMatpriceDiff; } public BigDecimal getMatMatpriceDiff() { return matMatpriceDiff; }
public void setMatMatpriceDiff(String matMatpriceDiff) { this.matMatpriceDiff = matMatpriceDiff; } public void setMatMatpriceDiff(BigDecimal matMatpriceDiff) { this.matMatpriceDiff = matMatpriceDiff; }
public Integer getIndex() { return index; } public Integer getIndex() { return index; }
public void setIndex(Integer index) { this.index = index; } public void setIndex(Integer index) { this.index = index; }

View File

@ -21,6 +21,13 @@ public interface QuotMapper
*/ */
public Quot selectQuotByQuotId(String quotId); public Quot selectQuotByQuotId(String quotId);
/**
* 根据报价单号获取信息
* @param quotCode
* @return
*/
String selectQuotByQuotCode(String quotCode);
/** /**
* 查询报价列表 * 查询报价列表
* *

View File

@ -21,6 +21,14 @@ public interface IQuotService
*/ */
public Quot selectQuotByQuotId(String quotId); public Quot selectQuotByQuotId(String quotId);
/**
* 根据报价单号获取信息
* @param quotCode
* @return
*/
String selectQuotByQuotCode(String quotCode);
/** /**
* 查询报价列表 * 查询报价列表
* *
@ -90,4 +98,5 @@ public interface IQuotService
* @return * @return
*/ */
Boolean checkExistQuot(String username, String quotCustomerBm, String quotProject); Boolean checkExistQuot(String username, String quotCustomerBm, String quotProject);
} }

View File

@ -40,6 +40,16 @@ public class QuotServiceImpl implements IQuotService
return quotMapper.selectQuotByQuotId(quotId); return quotMapper.selectQuotByQuotId(quotId);
} }
/**
* 根据报价单号获取信息
* @param quotCode
* @return
*/
@Override
public String selectQuotByQuotCode(String quotCode) {
return quotMapper.selectQuotByQuotCode(quotCode);
}
/** /**
* 查询报价列表 * 查询报价列表
* *

View File

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="Quot" id="QuotResult"> <resultMap type="Quot" id="QuotResult">
<result property="quotId" column="quot_id" /> <result property="quotId" column="quot_id" />
<result property="quotCode" column="quot_code" /> <result property="quotCode" column="quot_code" />
<result property="quotJswCode" column="quot_jsw_code" />
<result property="quotSalesmanCode" column="quot_salesman_code" /> <result property="quotSalesmanCode" column="quot_salesman_code" />
<result property="quotSalesmanBm" column="quot_salesman_bm" /> <result property="quotSalesmanBm" column="quot_salesman_bm" />
<result property="quotSalesmanName" column="quot_salesman_name" /> <result property="quotSalesmanName" column="quot_salesman_name" />
@ -61,6 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="quotHjPricingDate" column="quot_hj_pricing_date" /> <result property="quotHjPricingDate" column="quot_hj_pricing_date" />
<result property="quotHjRemark" column="quot_hj_remark" /> <result property="quotHjRemark" column="quot_hj_remark" />
<result property="quotJswApprovalStatus" column="quot_jsw_approval_status" />
</resultMap> </resultMap>
<resultMap id="QuotQuotMaterialResult" type="Quot" extends="QuotResult"> <resultMap id="QuotQuotMaterialResult" type="Quot" extends="QuotResult">
@ -89,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<sql id="selectQuotVo"> <sql id="selectQuotVo">
select a.quot_id, a.quot_code, a.quot_salesman_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_bm, select a.quot_id, a.quot_code,a.quot_jsw_code, a.quot_salesman_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_bm,
a.quot_customer_name,a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, 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_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_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
@ -107,7 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_hj_id,a.quot_hj_approval_status, a.quot_hj_id,a.quot_hj_approval_status,
h.quot_hj_code,h.quot_hj_pricing_date, h.quot_hj_code,h.quot_hj_pricing_date,
h.quot_hj_remark h.quot_hj_remark,
a.quot_jsw_approval_status
from quot a from quot a
<include refid="quotJoins"/> <include refid="quotJoins"/>
@ -128,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult"> <select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult">
select a.quot_id, a.quot_code, a.quot_salesman_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_bm,a.quot_customer_name, select a.quot_id, a.quot_code,a.quot_jsw_code, a.quot_salesman_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_bm,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_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_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_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
@ -147,7 +152,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
h.quot_hj_code,h.quot_hj_pricing_date, h.quot_hj_code,h.quot_hj_pricing_date,
h.quot_hj_remark, h.quot_hj_remark,
b.mat_id as sub_mat_id, b.mat_xingh as sub_mat_xingh, b.mat_guig as sub_mat_guig, a.quot_jsw_approval_status,
b.mat_id as sub_mat_id, b.mat_xingh as sub_mat_xingh, b.mat_guig as sub_mat_guig,
b.mat_diany as sub_mat_diany, b.mat_standard as sub_mat_standard, b.mat_danw as sub_mat_danw, b.mat_sl as sub_mat_sl, b.mat_diany as sub_mat_diany, b.mat_standard as sub_mat_standard, b.mat_danw as sub_mat_danw, b.mat_sl as sub_mat_sl,
b.mat_remark as sub_mat_remark,b.quot_id as sub_quot_id b.mat_remark as sub_mat_remark,b.quot_id as sub_quot_id
from quot a from quot a
@ -157,6 +164,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by b.number order by b.number
</select> </select>
<select id="selectQuotByQuotCode">
select quot_id from quot where quot_code = #{quotCode}
</select>
<select id="checkExistQuot" parameterType="String" resultType="String"> <select id="checkExistQuot" parameterType="String" resultType="String">
select count(1) from quot where quot_salesman_code != #{quotSalesmanCode} select count(1) from quot where quot_salesman_code != #{quotSalesmanCode}
and quot_customer_bm = #{quotCustomerBm} and quot_project = #{quotProject} and quot_customer_bm = #{quotCustomerBm} and quot_project = #{quotProject}
@ -168,6 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quotId != null and quotId != ''">quot_id,</if> <if test="quotId != null and quotId != ''">quot_id,</if>
<if test="quotCode != null and quotCode != ''">quot_code,</if> <if test="quotCode != null and quotCode != ''">quot_code,</if>
<if test="quotJswCode != null and quotJswCode != ''">quot_jsw_code,</if>
<if test="quotSalesmanCode != null and quotSalesmanCode != ''">quot_salesman_code,</if> <if test="quotSalesmanCode != null and quotSalesmanCode != ''">quot_salesman_code,</if>
<if test="quotSalesmanBm != null and quotSalesmanBm != ''">quot_salesman_bm,</if> <if test="quotSalesmanBm != null and quotSalesmanBm != ''">quot_salesman_bm,</if>
<if test="quotSalesmanName != null and quotSalesmanName != ''">quot_salesman_name,</if> <if test="quotSalesmanName != null and quotSalesmanName != ''">quot_salesman_name,</if>
@ -206,10 +219,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotHjId != null">quot_hj_id,</if> <if test="quotHjId != null">quot_hj_id,</if>
<if test="quotHjApprovalStatus != null">quot_hj_approval_status,</if> <if test="quotHjApprovalStatus != null">quot_hj_approval_status,</if>
<if test="quotJswApprovalStatus != null">quot_jsw_approval_status,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quotId != null and quotId != ''">#{quotId},</if> <if test="quotId != null and quotId != ''">#{quotId},</if>
<if test="quotCode != null and quotCode != ''">#{quotCode},</if> <if test="quotCode != null and quotCode != ''">#{quotCode},</if>
<if test="quotJswCode != null and quotJswCode != ''">#{quotJswCode},</if>
<if test="quotSalesmanCode != null and quotSalesmanCode != ''">#{quotSalesmanCode},</if> <if test="quotSalesmanCode != null and quotSalesmanCode != ''">#{quotSalesmanCode},</if>
<if test="quotSalesmanBm != null and quotSalesmanBm != ''">#{quotSalesmanBm},</if> <if test="quotSalesmanBm != null and quotSalesmanBm != ''">#{quotSalesmanBm},</if>
<if test="quotSalesmanName != null and quotSalesmanName != ''">#{quotSalesmanName},</if> <if test="quotSalesmanName != null and quotSalesmanName != ''">#{quotSalesmanName},</if>
@ -248,6 +264,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotHjId != null">#{quotHjId},</if> <if test="quotHjId != null">#{quotHjId},</if>
<if test="quotHjApprovalStatus != null">#{quotHjApprovalStatus},</if> <if test="quotHjApprovalStatus != null">#{quotHjApprovalStatus},</if>
<if test="quotJswApprovalStatus != null">#{quotJswApprovalStatus},</if>
</trim> </trim>
</insert> </insert>
@ -255,6 +273,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update quot update quot
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="quotCode != null and quotCode != ''">quot_code = #{quotCode},</if> <if test="quotCode != null and quotCode != ''">quot_code = #{quotCode},</if>
<if test="quotJswCode != null and quotJswCode != ''">quot_jsw_code = #{quotJswCode},</if>
<if test="quotSalesmanCode != null and quotSalesmanCode != ''">quot_salesman_code = #{quotSalesmanCode},</if> <if test="quotSalesmanCode != null and quotSalesmanCode != ''">quot_salesman_code = #{quotSalesmanCode},</if>
<if test="quotSalesmanBm != null and quotSalesmanBm != ''">quot_salesman_bm = #{quotSalesmanBm},</if> <if test="quotSalesmanBm != null and quotSalesmanBm != ''">quot_salesman_bm = #{quotSalesmanBm},</if>
<if test="quotSalesmanName != null and quotSalesmanName != ''">quot_salesman_name = #{quotSalesmanName},</if> <if test="quotSalesmanName != null and quotSalesmanName != ''">quot_salesman_name = #{quotSalesmanName},</if>
@ -293,6 +312,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotHjId != null">quot_hj_id = #{quotHjId},</if> <if test="quotHjId != null">quot_hj_id = #{quotHjId},</if>
<if test="quotHjApprovalStatus != null">quot_hj_approval_status = #{quotHjApprovalStatus},</if> <if test="quotHjApprovalStatus != null">quot_hj_approval_status = #{quotHjApprovalStatus},</if>
<if test="quotJswApprovalStatus != null">quot_jsw_approval_status = #{quotJswApprovalStatus},</if>
</trim> </trim>
where quot_id = #{quotId} where quot_id = #{quotId}
</update> </update>
@ -320,9 +341,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<insert id="batchQuotMaterial"> <insert id="batchQuotMaterial">
insert into quot_material( mat_id, mat_xingh, mat_guig, mat_diany,mat_standard, mat_danw, mat_sl,mat_remark, quot_id,number) values insert into quot_material( mat_id, mat_xingh, mat_guig, mat_diany,mat_standard, mat_danw, mat_sl,mat_remark, quot_id,number,mat_matprice,mat_price,mat_quot_price,mat_quot_allPrice,mat_matprice_diff) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matStandard}, #{item.matDanw}, cast(#{item.matSl,jdbcType=DECIMAL} as decimal(18,3)),#{item.matRemark}, #{item.quotId}, #{item.index}) ( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matStandard}, #{item.matDanw}, cast(#{item.matSl,jdbcType=DECIMAL} as decimal(18,3)),#{item.matRemark}, #{item.quotId}, #{item.index}, cast(#{item.matMatprice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matQuotPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matQuotAllPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matMatpriceDiff,jdbcType=DECIMAL} as decimal(18,3)))
</foreach> </foreach>
</insert> </insert>

View File

@ -110,6 +110,15 @@ export function commitHjQuot(data) {
}) })
} }
//提交金思维协助
export function commitJswQuot(data) {
return request({
url: '/quot/quot/commitJswQuot',
method: 'post',
data: data
})
}
//提交反馈按钮 //提交反馈按钮
export function feedbackQuot(data) { export function feedbackQuot(data) {
return request({ return request({

View File

@ -182,7 +182,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-divider content-position="left" class="customer_divider_text">当前协助情况</el-divider> <el-divider content-position="left" class="customer_divider_text">当前协助情况</el-divider>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="6">
<el-form-item label="提交状态" prop="quotApprovalStatus"> <el-form-item label="提交状态" prop="quotApprovalStatus">
<el-select v-model="this.form.quotApprovalStatus" :disabled="true"> <el-select v-model="this.form.quotApprovalStatus" :disabled="true">
<el-option <el-option
@ -195,8 +195,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<div v-if="checkPermi(['quot:quot:xzInfo'])"> <div v-if="checkPermi(['quot:quot:xzInfo'])">
<el-col :span="8"> <el-col :span="6">
<el-form-item label="技术协助状态" prop="quotJsxzApprovalStatus"> <el-form-item label="技术协助" prop="quotJsxzApprovalStatus">
<el-select v-model="this.form.quotJsxzApprovalStatus" :disabled="true"> <el-select v-model="this.form.quotJsxzApprovalStatus" :disabled="true">
<el-option <el-option
v-for="dict in dict.type.quot_jsxz_approval_status" v-for="dict in dict.type.quot_jsxz_approval_status"
@ -207,8 +207,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="6">
<el-form-item label="核价协助状态" prop="quotHjApprovalStatus"> <el-form-item label="核价协助" prop="quotHjApprovalStatus">
<el-select v-model="this.form.quotHjApprovalStatus" :disabled="true"> <el-select v-model="this.form.quotHjApprovalStatus" :disabled="true">
<el-option <el-option
v-for="dict in dict.type.quot_hj_approval_status" v-for="dict in dict.type.quot_hj_approval_status"
@ -219,6 +219,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="金思维协助" prop="quotJswApprovalStatus">
<el-select v-model="this.form.quotJswApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_jsw_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</div> </div>
</el-row> </el-row>
@ -1295,8 +1307,9 @@
<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 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" 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 == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'">生成报价单</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" 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'">提交反馈</el-button></span> <span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:madeQuot']"><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" 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> <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> </el-dialog>
@ -1372,7 +1385,7 @@
</style> </style>
<script> <script>
import { NumberAdd } from '@/utils/number';// import { NumberAdd } from '@/utils/number';//
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, madeQuot, rejectQuot } from "@/api/quot/quot"; import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, feedbackQuot, madeQuot, rejectQuot } from "@/api/quot/quot";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { checkPermi,checkRole } from '@/utils/permission';// import { checkPermi,checkRole } from '@/utils/permission';//
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
@ -1398,7 +1411,7 @@ export default {
'jsqrDialog': jsqrDialog, 'jsqrDialog': jsqrDialog,
'hjDialog': hjDialog 'hjDialog': hjDialog
}, },
dicts: ['quot_print', 'quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status'], 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'],
data() { data() {
return { return {
// //
@ -1553,6 +1566,7 @@ export default {
quotQuotationDate: null, quotQuotationDate: null,
quotQuotationRequire: null, quotQuotationRequire: null,
quotFeedbackExplanation: null, quotFeedbackExplanation: null,
quotApprovalStatus: null,
quotJsxzApprovalStatus: null, quotJsxzApprovalStatus: null,
quotJsxzChapter: null, quotJsxzChapter: null,
@ -1574,7 +1588,9 @@ export default {
quotHjCode: null, quotHjCode: null,
quotHjPricingDate: null, quotHjPricingDate: null,
quotHjApprovalStatus: null quotHjApprovalStatus: null,
quotJswApprovalStatus: null
}; };
this.quotMaterialList = []; this.quotMaterialList = [];
@ -1721,8 +1737,11 @@ export default {
} else { } else {
addQuot(this.form).then(response => { addQuot(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList(); const row = {'quotId':response.data.quotId}
this.handleUpdate(row);
//this.open = false;
//this.getList();
}); });
} }
} }
@ -1770,6 +1789,16 @@ export default {
}); });
}, },
/** 报价组提交金思维协助按钮 */
commitJswForm() {
this.form.quotMaterialList = this.quotMaterialList;
commitJswQuot(this.form).then(response => {
this.$modal.msgSuccess("提交金思维协助成功");
this.open = false;
this.getList();
});
},
/** 报价组报价单提交反馈按钮 */ /** 报价组报价单提交反馈按钮 */
feedbackQuotForm() { feedbackQuotForm() {
var quotFkFileNum = this.quotFkFileList.length; var quotFkFileNum = this.quotFkFileList.length;