Merge branch 'main' of http://jialcheerful.club:3000/xd/JNBusiness
This commit is contained in:
commit
3a83940dd5
|
@ -834,20 +834,23 @@ public class QuotController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
//下点超5.2 提醒
|
//下点超5.2 提醒
|
||||||
BigDecimal tpxd = BigDecimal.ZERO;
|
BigDecimal tpxd = BigDecimal.ONE;
|
||||||
List<QuotMaterial> materials = quot.getQuotMaterialList();
|
List<QuotMaterial> materials = quot.getQuotMaterialList();
|
||||||
if(materials!=null&&materials.size()>0){
|
if(materials!=null&&materials.size()>0){
|
||||||
for(QuotMaterial quotMaterial:materials){
|
/*for(QuotMaterial quotMaterial:materials){
|
||||||
BigDecimal matQuotTp = quotMaterial.getMatQuotTp();
|
BigDecimal matQuotTp = quotMaterial.getMatQuotTp();
|
||||||
if(BigDecimal.ZERO.compareTo(matQuotTp)<0){
|
if(BigDecimal.ZERO.compareTo(matQuotTp)<0){
|
||||||
tpxd = matQuotTp;
|
tpxd = matQuotTp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
BigDecimal matQuotTp = materials.get(0).getMatQuotTp();
|
||||||
|
tpxd = matQuotTp;
|
||||||
}
|
}
|
||||||
|
|
||||||
String matQuotTp = configService.selectConfigByKey("quot.allow.matQuotTp");
|
String matQuotTp = configService.selectConfigByKey("quot.allow.matQuotTp");
|
||||||
if(tpxd.compareTo(new BigDecimal(matQuotTp))>0 && "0".equals(quot_oa_approval_status)){
|
BigDecimal matQuotTp2 = BigDecimal.ONE.subtract(new BigDecimal(matQuotTp).divide(new BigDecimal("100")));
|
||||||
|
if(tpxd.compareTo(matQuotTp2) < 0 && "0".equals(quot_oa_approval_status)){
|
||||||
return error("特批下点数超"+matQuotTp+"个点,请走OA审批流程");
|
return error("特批下点数超"+matQuotTp+"个点,请走OA审批流程");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
@ -267,23 +268,52 @@ public class RedBookController extends BaseController
|
||||||
public AjaxResult madeXjQuot(HttpServletResponse response, @RequestBody OAQuot quot)
|
public AjaxResult madeXjQuot(HttpServletResponse response, @RequestBody OAQuot quot)
|
||||||
{
|
{
|
||||||
Quot xjquot = new Quot();
|
Quot xjquot = new Quot();
|
||||||
File excelFile = null;
|
List<QuotMaterial> materials = new ArrayList<QuotMaterial>();
|
||||||
|
QuotMaterial xjquotMaterials = new QuotMaterial();
|
||||||
|
/*File excelFile = null;*/
|
||||||
try{
|
try{
|
||||||
xjquot.setQuotId(UUID.fastUUID().toString());
|
xjquot.setQuotId(UUID.fastUUID().toString());
|
||||||
String quotCode = redBookService.getCode("BJD");
|
String quotCode = redBookService.getCode("BJD");
|
||||||
xjquot.setQuotCode(quotCode);
|
xjquot.setQuotCode(quotCode);
|
||||||
xjquot.setQuotApprovalStatus("0");
|
xjquot.setQuotApprovalStatus("0");//询价单状态设置为 待提交
|
||||||
xjquot.setQuotSalesmanCode(getUsername());
|
xjquot.setQuotSalesmanCode(getUsername());//业务员id
|
||||||
xjquot.setQuotSalesmanBm(getLoginUser().getUser().getSapUserBm());
|
xjquot.setQuotSalesmanBm(getLoginUser().getUser().getSapUserBm());//业务员编码
|
||||||
xjquot.setQuotSalesmanName(getLoginUser().getUser().getNickName());
|
xjquot.setQuotSalesmanName(getLoginUser().getUser().getNickName());//业务员名称
|
||||||
xjquot.setQuotSalesmanDeptId(getLoginUser().getUser().getDept().getDeptId()+"");
|
xjquot.setQuotSalesmanDeptId(getLoginUser().getUser().getDept().getDeptId()+"");//部门id
|
||||||
xjquot.setQuotSalesmanDeptName(getLoginUser().getUser().getDept().getDeptName());
|
xjquot.setQuotSalesmanDeptName(getLoginUser().getUser().getDept().getDeptName());//部门名称
|
||||||
|
xjquot.setQuotRbDateUid(quot.getRbDateUid());//调价日期
|
||||||
xjquot.setCreateBy(getUsername());
|
xjquot.setCreateBy(getUsername());
|
||||||
iQuotService.insertQuot(xjquot);
|
|
||||||
|
|
||||||
List<OAQuotProduct> list = quot.getSelectedResultData();
|
List<OAQuotProduct> list = quot.getSelectedResultData();
|
||||||
|
/** ===================================插入询价单明细表==================================*/
|
||||||
|
int quotMaterialsCount = 0;//明细条数
|
||||||
|
BigDecimal quotTotalPrice = BigDecimal.ZERO;//报价金额小计
|
||||||
|
for(OAQuotProduct op:list){
|
||||||
|
xjquotMaterials = new QuotMaterial();
|
||||||
|
xjquotMaterials.setMatXingh(op.getName_1());//型号
|
||||||
|
xjquotMaterials.setMatGuig(op.getSpec());//规格
|
||||||
|
xjquotMaterials.setMatDiany(op.getVoltage());//电压
|
||||||
|
xjquotMaterials.setMatDanw(op.getStu());//单位
|
||||||
|
xjquotMaterials.setMatSl(op.getCount());//数量
|
||||||
|
xjquotMaterials.setMatPrice(new BigDecimal(op.getPrice()));//红本价
|
||||||
|
xjquotMaterials.setMatPerc(op.getPer());//一次折扣
|
||||||
|
xjquotMaterials.setMatPerc2(op.getPer2());//二次折扣
|
||||||
|
xjquotMaterials.setMatQuotPrice(op.getSetPrice());//报价单价
|
||||||
|
xjquotMaterials.setMatQuotAllPrice(op.getAllPrice());//报价金额
|
||||||
|
|
||||||
File directory = new File("xjQuotFile/");
|
xjquotMaterials.setIndex(op.getIndex());
|
||||||
|
materials.add(xjquotMaterials);
|
||||||
|
quotMaterialsCount++;
|
||||||
|
quotTotalPrice = quotTotalPrice.add(xjquotMaterials.getMatQuotAllPrice());
|
||||||
|
}
|
||||||
|
xjquot.setQuotMaterialsCount(quotMaterialsCount);
|
||||||
|
xjquot.setQuotTotalPrice(String.valueOf(quotTotalPrice.setScale(2, RoundingMode.HALF_UP)));
|
||||||
|
xjquot.setQuotMaterialList(materials);
|
||||||
|
iQuotService.insertQuot(xjquot);
|
||||||
|
|
||||||
|
/** ===================================插入询价单明细表==================================*/
|
||||||
|
/** ===================================产品明细生成附件==================================*/
|
||||||
|
/*File directory = new File("xjQuotFile/");
|
||||||
// 如果文件夹不存在,则创建文件夹
|
// 如果文件夹不存在,则创建文件夹
|
||||||
if (!directory.exists()) {
|
if (!directory.exists()) {
|
||||||
directory.mkdir();
|
directory.mkdir();
|
||||||
|
@ -292,7 +322,7 @@ public class RedBookController extends BaseController
|
||||||
File file = excelUtil.exportXjQuotExcel(response,excelFile,xjquot,list);
|
File file = excelUtil.exportXjQuotExcel(response,excelFile,xjquot,list);
|
||||||
MultipartFile multipartFile = convert(file);
|
MultipartFile multipartFile = convert(file);
|
||||||
|
|
||||||
/** 上传清单附件 **/
|
// 上传清单附件
|
||||||
String relation_id = xjquot.getQuotId();
|
String relation_id = xjquot.getQuotId();
|
||||||
if(!StringUtils.isEmpty(relation_id)){
|
if(!StringUtils.isEmpty(relation_id)){
|
||||||
if (!multipartFile.isEmpty())
|
if (!multipartFile.isEmpty())
|
||||||
|
@ -320,8 +350,9 @@ public class RedBookController extends BaseController
|
||||||
}else{
|
}else{
|
||||||
return error("系统异常,询价单号为空!");
|
return error("系统异常,询价单号为空!");
|
||||||
}
|
}
|
||||||
/** 上传清单附件 **/
|
// 上传清单附件
|
||||||
FileUtils.delete(excelFile);
|
FileUtils.delete(excelFile);*/
|
||||||
|
/** ===================================产品明细生成附件==================================*/
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
return error("系统异常");
|
return error("系统异常");
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -161,8 +163,12 @@ public class quotJswController extends BaseController {
|
||||||
q.setQuotLvPrice(quot.getQuotLvPrice());
|
q.setQuotLvPrice(quot.getQuotLvPrice());
|
||||||
q.setQuotTongPrice(quot.getQuotTongPrice());
|
q.setQuotTongPrice(quot.getQuotTongPrice());
|
||||||
q.setQuotMatpriceDiff(quot.getQuotMatpriceDiff());
|
q.setQuotMatpriceDiff(quot.getQuotMatpriceDiff());
|
||||||
|
q.setQuotJswCheckUserNickname(quot.getQuotJswCheckUserNickname());//金思维审核人
|
||||||
q.setQuotJswApprovalStatus("2");
|
q.setQuotJswApprovalStatus("2");
|
||||||
|
|
||||||
|
|
||||||
|
int quotMaterialsCount = 0;//明细条数
|
||||||
|
BigDecimal quotTotalPrice = BigDecimal.ZERO;//报价金额小计
|
||||||
List<QuotMaterial> qmaterials = new ArrayList<QuotMaterial>();
|
List<QuotMaterial> qmaterials = new ArrayList<QuotMaterial>();
|
||||||
QuotMaterial quotMaterial = new QuotMaterial();
|
QuotMaterial quotMaterial = new QuotMaterial();
|
||||||
for(quotMaterialModel model:materials){
|
for(quotMaterialModel model:materials){
|
||||||
|
@ -183,8 +189,12 @@ public class quotJswController extends BaseController {
|
||||||
quotMaterial.setXh(model.getXh());
|
quotMaterial.setXh(model.getXh());
|
||||||
quotMaterial.setIndex(model.getIndex());
|
quotMaterial.setIndex(model.getIndex());
|
||||||
qmaterials.add(quotMaterial);
|
qmaterials.add(quotMaterial);
|
||||||
}
|
|
||||||
|
|
||||||
|
quotMaterialsCount++;
|
||||||
|
quotTotalPrice = quotTotalPrice.add(quotMaterial.getMatQuotAllPrice());
|
||||||
|
}
|
||||||
|
q.setQuotMaterialsCount(quotMaterialsCount);
|
||||||
|
q.setQuotTotalPrice(String.valueOf(quotTotalPrice.setScale(2, RoundingMode.HALF_UP)));
|
||||||
q.setQuotMaterialList(qmaterials);
|
q.setQuotMaterialList(qmaterials);
|
||||||
quotService.updateQuot(q);
|
quotService.updateQuot(q);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
|
|
@ -21,6 +21,9 @@ public class quotModel {
|
||||||
@ApiModelProperty("整单料价价差率")
|
@ApiModelProperty("整单料价价差率")
|
||||||
private String quotMatpriceDiff;//整单料价价差率
|
private String quotMatpriceDiff;//整单料价价差率
|
||||||
|
|
||||||
|
@ApiModelProperty("金思维审核人")
|
||||||
|
private String quotJswCheckUserNickname;
|
||||||
|
|
||||||
@ApiModelProperty("产品明细")
|
@ApiModelProperty("产品明细")
|
||||||
private List<quotMaterialModel> quotMaterial;//明细
|
private List<quotMaterialModel> quotMaterial;//明细
|
||||||
|
|
||||||
|
@ -64,6 +67,10 @@ public class quotModel {
|
||||||
this.quotMatpriceDiff = quotMatpriceDiff;
|
this.quotMatpriceDiff = quotMatpriceDiff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getQuotJswCheckUserNickname() { return quotJswCheckUserNickname; }
|
||||||
|
|
||||||
|
public void setQuotJswCheckUserNickname(String quotJswCheckUserNickname) { this.quotJswCheckUserNickname = quotJswCheckUserNickname; }
|
||||||
|
|
||||||
public List<quotMaterialModel> getQuotMaterial() {
|
public List<quotMaterialModel> getQuotMaterial() {
|
||||||
return quotMaterial;
|
return quotMaterial;
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,7 +408,12 @@ public class excelUtil {
|
||||||
String QuotXjrq = DateUtils.dateTime(quot.getQuotInquiryDate());//询价日期
|
String QuotXjrq = DateUtils.dateTime(quot.getQuotInquiryDate());//询价日期
|
||||||
String QuotBjrq = DateUtils.dateTime(new Date());//报价日期
|
String QuotBjrq = DateUtils.dateTime(new Date());//报价日期
|
||||||
|
|
||||||
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:","报价日期:"+QuotBjrq,"审 核:"};
|
String QuotBzr = quot.getQuotCheckUserNickname();//编制人
|
||||||
|
QuotBzr = StringUtils.isEmpty(QuotBzr)?"":QuotBzr;
|
||||||
|
String QuotShr = quot.getQuotJswCheckUserNickname();//审核人
|
||||||
|
QuotShr = StringUtils.isEmpty(QuotShr)?"":QuotShr;
|
||||||
|
|
||||||
|
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:"+QuotBzr,"报价日期:"+QuotBjrq,"审 核:"+QuotShr};
|
||||||
int k=0;
|
int k=0;
|
||||||
while(k<bjs.length){
|
while(k<bjs.length){
|
||||||
wsheet.mergeCells(0,i,3,i);
|
wsheet.mergeCells(0,i,3,i);
|
||||||
|
@ -712,7 +717,12 @@ public class excelUtil {
|
||||||
String QuotXjrq = DateUtils.dateTime(quot.getQuotInquiryDate());//询价日期
|
String QuotXjrq = DateUtils.dateTime(quot.getQuotInquiryDate());//询价日期
|
||||||
String QuotBjrq = DateUtils.dateTime(new Date());//报价日期
|
String QuotBjrq = DateUtils.dateTime(new Date());//报价日期
|
||||||
|
|
||||||
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:","报价日期:"+QuotBjrq,"审 核:"};
|
String QuotBzr = quot.getQuotCheckUserNickname();//编制人
|
||||||
|
QuotBzr = StringUtils.isEmpty(QuotBzr)?"":QuotBzr;
|
||||||
|
String QuotShr = quot.getQuotJswCheckUserNickname();//审核人
|
||||||
|
QuotShr = StringUtils.isEmpty(QuotShr)?"":QuotShr;
|
||||||
|
|
||||||
|
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:"+QuotBzr,"报价日期:"+QuotBjrq,"审 核:"+QuotShr};
|
||||||
int k=0;
|
int k=0;
|
||||||
while(k<bjs.length){
|
while(k<bjs.length){
|
||||||
wsheet.mergeCells(0,i,3,i);
|
wsheet.mergeCells(0,i,3,i);
|
||||||
|
|
|
@ -219,10 +219,30 @@ public class FileUploadUtils
|
||||||
if(StringUtils.isNotEmpty(dir)){
|
if(StringUtils.isNotEmpty(dir)){
|
||||||
template = "{}/{}/{}_{}.{}";
|
template = "{}/{}/{}_{}.{}";
|
||||||
return StringUtils.format(template, dir,DateUtils.datePath(),
|
return StringUtils.format(template, dir,DateUtils.datePath(),
|
||||||
FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file));
|
sanitizeFileName(FilenameUtils.getBaseName(file.getOriginalFilename())), Seq.getId(Seq.uploadSeqType), getExtension(file));
|
||||||
}
|
}
|
||||||
return StringUtils.format(template, DateUtils.datePath(),
|
return StringUtils.format(template, DateUtils.datePath(),
|
||||||
FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file));
|
sanitizeFileName(FilenameUtils.getBaseName(file.getOriginalFilename())), Seq.getId(Seq.uploadSeqType), getExtension(file));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名特殊字符处理
|
||||||
|
* @param fileName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String sanitizeFileName(String fileName) {
|
||||||
|
// 替换Windows不允许的文件名字符
|
||||||
|
String sanitized = fileName.replaceAll("[\\\\/:*?\"<>|]", "_");
|
||||||
|
sanitized = sanitized.replaceAll("\\.", "_");
|
||||||
|
sanitized = sanitized.replaceAll("[#%]", "_");
|
||||||
|
// 去除中间的空格
|
||||||
|
sanitized = sanitized.replaceAll("\\s+", "");
|
||||||
|
// 去除开头的空格
|
||||||
|
sanitized = sanitized.replaceAll("^\\s+", "");
|
||||||
|
// 去除结尾的空格
|
||||||
|
sanitized = sanitized.replaceAll("\\s+$", "");
|
||||||
|
// 应用其他特殊字符的替换规则...
|
||||||
|
return sanitized;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File getAbsoluteFile(String uploadDir, String fileName) throws IOException
|
public static File getAbsoluteFile(String uploadDir, String fileName) throws IOException
|
||||||
|
|
|
@ -85,6 +85,9 @@ public class Quot extends BaseEntity
|
||||||
/** 明细条数 */
|
/** 明细条数 */
|
||||||
private Integer quotMaterialsCount;
|
private Integer quotMaterialsCount;
|
||||||
|
|
||||||
|
/** 调价日期 */
|
||||||
|
private String quotRbDateUid;
|
||||||
|
|
||||||
/** 铝价 */
|
/** 铝价 */
|
||||||
private String quotLvPrice;
|
private String quotLvPrice;
|
||||||
|
|
||||||
|
@ -112,6 +115,9 @@ public class Quot extends BaseEntity
|
||||||
/** 审核人 */
|
/** 审核人 */
|
||||||
private String quotCheckUserNickname;
|
private String quotCheckUserNickname;
|
||||||
|
|
||||||
|
/** 金思维审核人 */
|
||||||
|
private String quotJswCheckUserNickname;
|
||||||
|
|
||||||
/** 提交状态 */
|
/** 提交状态 */
|
||||||
@Excel(name = "提交状态",dictType = "quot_approval_status")
|
@Excel(name = "提交状态",dictType = "quot_approval_status")
|
||||||
private String quotApprovalStatus;
|
private String quotApprovalStatus;
|
||||||
|
@ -301,6 +307,9 @@ public class Quot extends BaseEntity
|
||||||
public Integer getQuotMaterialsCount() { return quotMaterialsCount; }
|
public Integer getQuotMaterialsCount() { return quotMaterialsCount; }
|
||||||
|
|
||||||
public void setQuotMaterialsCount(Integer quotMaterialsCount) { this.quotMaterialsCount = quotMaterialsCount; }
|
public void setQuotMaterialsCount(Integer quotMaterialsCount) { this.quotMaterialsCount = quotMaterialsCount; }
|
||||||
|
public String getQuotRbDateUid() { return quotRbDateUid; }
|
||||||
|
|
||||||
|
public void setQuotRbDateUid(String quotRbDateUid) { this.quotRbDateUid = quotRbDateUid; }
|
||||||
public String getQuotLvPrice() { return quotLvPrice; }
|
public String getQuotLvPrice() { return quotLvPrice; }
|
||||||
|
|
||||||
public void setQuotLvPrice(String quotLvPrice) { this.quotLvPrice = quotLvPrice; }
|
public void setQuotLvPrice(String quotLvPrice) { this.quotLvPrice = quotLvPrice; }
|
||||||
|
@ -349,6 +358,9 @@ public class Quot extends BaseEntity
|
||||||
{
|
{
|
||||||
return quotCheckUserName;
|
return quotCheckUserName;
|
||||||
}
|
}
|
||||||
|
public String getQuotJswCheckUserNickname() { return quotJswCheckUserNickname; }
|
||||||
|
|
||||||
|
public void setQuotJswCheckUserNickname(String quotJswCheckUserNickname) { this.quotJswCheckUserNickname = quotJswCheckUserNickname; }
|
||||||
public void setQuotCheckUserNickname(String quotCheckUserNickname) { this.quotCheckUserNickname = quotCheckUserNickname; }
|
public void setQuotCheckUserNickname(String quotCheckUserNickname) { this.quotCheckUserNickname = quotCheckUserNickname; }
|
||||||
|
|
||||||
public String getQuotCheckUserNickname()
|
public String getQuotCheckUserNickname()
|
||||||
|
|
|
@ -53,6 +53,12 @@ public class QuotMaterial extends BaseEntity
|
||||||
/** 红本价 */
|
/** 红本价 */
|
||||||
private BigDecimal matPrice;
|
private BigDecimal matPrice;
|
||||||
|
|
||||||
|
/** 一次折扣 */
|
||||||
|
private BigDecimal matPerc;
|
||||||
|
|
||||||
|
/** 二次折扣 */
|
||||||
|
private BigDecimal matPerc2;
|
||||||
|
|
||||||
/** 报价 */
|
/** 报价 */
|
||||||
private BigDecimal matQuotPrice;
|
private BigDecimal matQuotPrice;
|
||||||
|
|
||||||
|
@ -138,6 +144,12 @@ public class QuotMaterial extends BaseEntity
|
||||||
public void setMatMatprice(BigDecimal matMatprice) { this.matMatprice = matMatprice; }
|
public void setMatMatprice(BigDecimal matMatprice) { this.matMatprice = matMatprice; }
|
||||||
public BigDecimal getMatPrice() { return matPrice; }
|
public BigDecimal getMatPrice() { return matPrice; }
|
||||||
|
|
||||||
|
public BigDecimal getMatPerc() { return matPerc; }
|
||||||
|
public void setMatPerc(BigDecimal matPerc) { this.matPerc = matPerc; }
|
||||||
|
|
||||||
|
public BigDecimal getMatPerc2() { return matPerc2; }
|
||||||
|
public void setMatPerc2(BigDecimal matPerc2) { this.matPerc2 = matPerc2; }
|
||||||
|
|
||||||
public void setMatPrice(BigDecimal matPrice) { this.matPrice = matPrice; }
|
public void setMatPrice(BigDecimal matPrice) { this.matPrice = matPrice; }
|
||||||
public BigDecimal getMatQuotPrice() { return matQuotPrice; }
|
public BigDecimal getMatQuotPrice() { return matQuotPrice; }
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="quotTotalPrice" column="quot_total_price" />
|
<result property="quotTotalPrice" column="quot_total_price" />
|
||||||
<result property="quotCheckUserName" column="quot_check_user_name" />
|
<result property="quotCheckUserName" column="quot_check_user_name" />
|
||||||
<result property="quotCheckUserNickname" column="quot_check_user_nickname" />
|
<result property="quotCheckUserNickname" column="quot_check_user_nickname" />
|
||||||
|
<result property="quotJswCheckUserNickname" column="quot_jsw_check_user_nickname" />
|
||||||
<result property="quotApprovalStatus" column="quot_approval_status" />
|
<result property="quotApprovalStatus" column="quot_approval_status" />
|
||||||
<result property="quotMaterialsCount" column="quot_materials_count" />
|
<result property="quotMaterialsCount" column="quot_materials_count" />
|
||||||
|
<result property="quotRbDateUid" column="quot_rbDateUid" />
|
||||||
<result property="quotLvPrice" column="quot_lv_price" />
|
<result property="quotLvPrice" column="quot_lv_price" />
|
||||||
<result property="quotTongPrice" column="quot_tong_price" />
|
<result property="quotTongPrice" column="quot_tong_price" />
|
||||||
<result property="quotMatpriceDiff" column="quot_matprice_diff" />
|
<result property="quotMatpriceDiff" column="quot_matprice_diff" />
|
||||||
|
@ -90,6 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<result property="matMatprice" column="sub_mat_matprice" />
|
<result property="matMatprice" column="sub_mat_matprice" />
|
||||||
<result property="matPrice" column="sub_mat_price" />
|
<result property="matPrice" column="sub_mat_price" />
|
||||||
|
<result property="matPerc" column="sub_mat_perc" />
|
||||||
|
<result property="matPerc2" column="sub_mat_perc2" />
|
||||||
<result property="matQuotPrice" column="sub_mat_quot_price" />
|
<result property="matQuotPrice" column="sub_mat_quot_price" />
|
||||||
<result property="matQuotTp" column="sub_mat_quot_tp" />
|
<result property="matQuotTp" column="sub_mat_quot_tp" />
|
||||||
<result property="matQuotAllPrice" column="sub_mat_quot_allPrice" />
|
<result property="matQuotAllPrice" column="sub_mat_quot_allPrice" />
|
||||||
|
@ -114,7 +118,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_contacts,
|
a.quot_customer_name,a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts,
|
||||||
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,
|
||||||
a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_materials_count,
|
a.quot_check_user_name, u2.nick_name quot_check_user_nickname,a.quot_jsw_check_user_nickname, a.quot_approval_status,a.quot_materials_count,a.quot_rbDateUid,
|
||||||
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
|
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
|
||||||
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,a.quot_handle,
|
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,a.quot_handle,
|
||||||
|
|
||||||
|
@ -161,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
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,
|
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_contacts, a.quot_phone, a.quot_inquiry_date,
|
a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts, 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_jsw_check_user_nickname,a.quot_approval_status,a.quot_rbDateUid,
|
||||||
a.quot_materials_count,a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
|
a.quot_materials_count,a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
|
||||||
a.create_by, a.create_time, a.update_by, a.update_time,a.quot_handle,
|
a.create_by, a.create_time, a.update_by, a.update_time,a.quot_handle,
|
||||||
|
|
||||||
|
@ -184,6 +188,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
b.mat_remark as sub_mat_remark,
|
b.mat_remark as sub_mat_remark,
|
||||||
b.mat_matprice as sub_mat_matprice,
|
b.mat_matprice as sub_mat_matprice,
|
||||||
b.mat_price as sub_mat_price,
|
b.mat_price as sub_mat_price,
|
||||||
|
b.mat_perc as sub_mat_perc,
|
||||||
|
b.mat_perc2 as sub_mat_perc2,
|
||||||
b.mat_quot_price as sub_mat_quot_price,
|
b.mat_quot_price as sub_mat_quot_price,
|
||||||
|
|
||||||
b.mat_quot_tp as sub_mat_quot_tp,
|
b.mat_quot_tp as sub_mat_quot_tp,
|
||||||
|
@ -201,8 +207,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
order by b.number
|
order by b.number
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectQuotByQuotCode">
|
<select id="selectQuotByQuotCode" resultType="String">
|
||||||
select quot_id from quot where quot_code = #{quotCode}
|
select top 1 quot_id from quot where quot_code = #{quotCode}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,6 +245,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name,</if>
|
<if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name,</if>
|
||||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status,</if>
|
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status,</if>
|
||||||
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count,</if>
|
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count,</if>
|
||||||
|
<if test="quotRbDateUid != null and quotRbDateUid != ''">quot_rbDateUid,</if>
|
||||||
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price,</if>
|
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price,</if>
|
||||||
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price,</if>
|
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price,</if>
|
||||||
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff,</if>
|
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff,</if>
|
||||||
|
@ -288,6 +295,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quotCheckUserName != null and quotCheckUserName != ''">#{quotCheckUserName},</if>
|
<if test="quotCheckUserName != null and quotCheckUserName != ''">#{quotCheckUserName},</if>
|
||||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">#{quotApprovalStatus},</if>
|
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">#{quotApprovalStatus},</if>
|
||||||
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">#{quotMaterialsCount},</if>
|
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">#{quotMaterialsCount},</if>
|
||||||
|
<if test="quotRbDateUid != null and quotRbDateUid != ''">#{quotRbDateUid},</if>
|
||||||
<if test="quotLvPrice != null and quotLvPrice != ''">#{quotLvPrice},</if>
|
<if test="quotLvPrice != null and quotLvPrice != ''">#{quotLvPrice},</if>
|
||||||
<if test="quotTongPrice != null and quotTongPrice != ''">#{quotTongPrice},</if>
|
<if test="quotTongPrice != null and quotTongPrice != ''">#{quotTongPrice},</if>
|
||||||
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">#{quotMatpriceDiff},</if>
|
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">#{quotMatpriceDiff},</if>
|
||||||
|
@ -392,12 +400,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name = #{quotCheckUserName},</if>
|
<if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name = #{quotCheckUserName},</if>
|
||||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status = #{quotApprovalStatus},</if>
|
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status = #{quotApprovalStatus},</if>
|
||||||
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count = #{quotMaterialsCount},</if>
|
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count = #{quotMaterialsCount},</if>
|
||||||
|
<if test="quotRbDateUid != null and quotRbDateUid != ''">quot_rbDateUid = #{quotRbDateUid},</if>
|
||||||
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price = #{quotLvPrice},</if>
|
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price = #{quotLvPrice},</if>
|
||||||
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price = #{quotTongPrice},</if>
|
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price = #{quotTongPrice},</if>
|
||||||
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff = #{quotMatpriceDiff},</if>
|
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff = #{quotMatpriceDiff},</if>
|
||||||
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">quot_matprice_diff2 = #{quotMatpriceDiff2},</if>
|
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">quot_matprice_diff2 = #{quotMatpriceDiff2},</if>
|
||||||
<if test="quotPrint != null and quotPrint != ''">quot_print = #{quotPrint},</if>
|
<if test="quotPrint != null and quotPrint != ''">quot_print = #{quotPrint},</if>
|
||||||
<if test="quotPrintUserName != null and quotPrintUserName != ''">quot_print_user_name = #{quotPrintUserName},</if>
|
<if test="quotPrintUserName != null and quotPrintUserName != ''">quot_print_user_name = #{quotPrintUserName},</if>
|
||||||
|
<if test="quotJswCheckUserNickname != null and quotJswCheckUserNickname != ''">quot_jsw_check_user_nickname = #{quotJswCheckUserNickname},</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
@ -442,9 +452,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,xh,number,mat_matprice,mat_price,mat_quot_price,mat_quot_tp,mat_quot_allPrice,mat_matprice_diff) values
|
insert into quot_material( mat_id, mat_xingh, mat_guig, mat_diany,mat_standard, mat_danw, mat_sl,mat_remark, quot_id,xh,number,mat_matprice,mat_price,mat_perc,mat_perc2,mat_quot_price,mat_quot_tp,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.xh}, #{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.matQuotTp,jdbcType=DECIMAL} as decimal(18,3)),cast(#{item.matQuotAllPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matMatpriceDiff,jdbcType=DECIMAL} as decimal(18,3)))
|
( #{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.xh}, #{item.index}, cast(#{item.matMatprice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matPerc,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.matPerc2,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.matQuotPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matQuotTp,jdbcType=DECIMAL} as decimal(18,4)),cast(#{item.matQuotAllPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matMatpriceDiff,jdbcType=DECIMAL} as decimal(18,3)))
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,9 @@
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!--
|
||||||
<el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
|
<el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
|
||||||
|
-->
|
||||||
<el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
<el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
|
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
|
||||||
|
@ -408,7 +410,7 @@
|
||||||
<el-input v-model="form.quotLvPrice" :disabled="true"/>
|
<el-input v-model="form.quotLvPrice" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])">
|
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])">
|
||||||
<el-form-item label="整单料价价差率" prop="quotMatpriceDiff">
|
<el-form-item label="整单料价价差率" prop="quotMatpriceDiff">
|
||||||
<el-input v-model="form.quotMatpriceDiff" :disabled="true"/>
|
<el-input v-model="form.quotMatpriceDiff" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -516,54 +518,50 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<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="10" class="mb8">
|
<div style="margin-bottom: 10px">
|
||||||
<!--<el-col :span="1.5">
|
<el-button v-if="checkRole(['QUOT','PRICE_VERIFICATION'])" type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial">新增</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">添加</el-button>
|
<el-button v-if="checkRole(['SALES_MAN','QUOT','PRICE_VERIFICATION'])" type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial">删除</el-button>
|
||||||
</el-col>
|
<el-button v-if="checkRole(['QUOT','PRICE_VERIFICATION'])" type="info" plain icon="el-icon-download" size="mini" @click="handleImport">导入</el-button>
|
||||||
<el-col :span="1.5">
|
<el-select style="float: right;width:230px" size="mini" v-model="form.quotRbDateUid" :disabled="true">
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">删除</el-button>
|
<el-option
|
||||||
</el-col>-->
|
v-for="item in versionList"
|
||||||
<!-- <el-col :span="1.5">
|
:key="item.value"
|
||||||
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-if="(this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null) || checkRole(['QUOT','PRICE_VERIFICATION'])">导入</el-button>
|
:label="item.label"
|
||||||
</el-col>-->
|
:value="item.value"/>
|
||||||
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
</el-select>
|
||||||
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
|
</div>
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
|
||||||
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleExportMaterial">导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-table :data="quotMaterialList" height="300px" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
|
<el-table :data="quotMaterialList" height="300px" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
|
||||||
<el-table-column type="selection" width="80" align="center" />
|
<el-table-column type="selection" width="80" align="center" />
|
||||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||||
<el-table-column label="型号" prop="matXingh" width="180">
|
<el-table-column label="型号" prop="matXingh" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matXingh" placeholder="型号" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
<el-input v-model="scope.row.matXingh" placeholder="型号" :disabled="scope.row.matId"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格" prop="matGuig" width="150">
|
<el-table-column label="规格" prop="matGuig" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matGuig" placeholder="规格" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
<el-input v-model="scope.row.matGuig" placeholder="规格" :disabled="scope.row.matId"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="电压" prop="matDiany" width="130">
|
<el-table-column label="电压" prop="matDiany" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matDiany" placeholder="电压" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
<el-input v-model="scope.row.matDiany" placeholder="电压" :disabled="scope.row.matId"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位" prop="matDanw" width="100">
|
<el-table-column label="单位" prop="matDanw" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matDanw" placeholder="单位" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
<el-input v-model="scope.row.matDanw" placeholder="单位" :disabled="scope.row.matId"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="matSl" width="100">
|
<el-table-column label="数量" prop="matSl" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matSl" placeholder="数量" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
<el-input v-model="scope.row.matSl" placeholder="数量" :disabled="scope.row.matId"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" prop="matRemark" width="180">
|
<el-table-column label="备注" prop="matRemark" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matRemark" placeholder="备注" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
<el-input v-model="scope.row.matRemark" placeholder="备注" :disabled="scope.row.matId"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="料单价" prop="matMatprice" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])" width="130">
|
<el-table-column label="料单价" prop="matMatprice" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])" width="130">
|
||||||
|
@ -571,12 +569,22 @@
|
||||||
<el-input v-model="scope.row.matMatprice" :disabled="true"/>
|
<el-input v-model="scope.row.matMatprice" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="红本单价" prop="matPrice" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="130">
|
<el-table-column label="红本单价" prop="matPrice" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matPrice" :disabled="true"/>
|
<el-input v-model="scope.row.matPrice" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="特批下点" prop="matQuotTp" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="100">
|
<el-table-column label="一次折扣" prop="matPerc" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.matPerc" :disabled="true"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="二次折扣" prop="matPerc2" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.matPerc2" :disabled="true"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="特批下点" prop="matQuotTp" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.matQuotTp" :disabled="true"/>
|
<el-input v-model="scope.row.matQuotTp" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1060,6 +1068,8 @@
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { NumberAdd } from '@/utils/number';// 数值计算
|
import { NumberAdd } from '@/utils/number';// 数值计算
|
||||||
|
import { toDecimal,versionList } from "@/api/redBook/redBook";
|
||||||
|
|
||||||
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } from "@/api/quot/quot";
|
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } 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';// 权限判断函数
|
||||||
|
@ -1113,6 +1123,8 @@ export default {
|
||||||
quotList: [],
|
quotList: [],
|
||||||
// 报价单-产品表格数据
|
// 报价单-产品表格数据
|
||||||
quotMaterialList: [],
|
quotMaterialList: [],
|
||||||
|
//调价日期
|
||||||
|
versionList: [], // 调价版本数据列表
|
||||||
// 产品表格数据导入参数
|
// 产品表格数据导入参数
|
||||||
productUpload: {
|
productUpload: {
|
||||||
// 是否显示弹出层(用户导入)
|
// 是否显示弹出层(用户导入)
|
||||||
|
@ -1221,6 +1233,13 @@ export default {
|
||||||
//this.queryParams.quotApprovalStatus = '0';
|
//this.queryParams.quotApprovalStatus = '0';
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
|
// 红本报价生成询价单自动打开详情页
|
||||||
|
const param = this.$route.query;
|
||||||
|
if (param.quotId !== undefined && param.quotId !== null) {
|
||||||
|
const row = {'quotId':param.quotId};
|
||||||
|
this.handleUpdate(row);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 打印状态修改 */
|
/** 打印状态修改 */
|
||||||
|
@ -1271,6 +1290,7 @@ export default {
|
||||||
quotPrintUserName: null,
|
quotPrintUserName: null,
|
||||||
quotPrintUserNickName: null,
|
quotPrintUserNickName: null,
|
||||||
quotMaterialsCount: null,
|
quotMaterialsCount: null,
|
||||||
|
quotRbDateUid: null,
|
||||||
quotTongPrice: null,
|
quotTongPrice: null,
|
||||||
quotLvPrice: null,
|
quotLvPrice: null,
|
||||||
quotMatpriceDiff: null,
|
quotMatpriceDiff: null,
|
||||||
|
@ -1326,6 +1346,13 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//获取调价日期
|
||||||
|
async getVersionList(){
|
||||||
|
await versionList(this.queryParams).then(response => {
|
||||||
|
this.versionList = response.versionList;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
@ -1357,6 +1384,7 @@ export default {
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.getVersionList();
|
||||||
const quotId = row.quotId || this.ids
|
const quotId = row.quotId || this.ids
|
||||||
getQuot(quotId).then(response => {
|
getQuot(quotId).then(response => {
|
||||||
this.setInfo(response);
|
this.setInfo(response);
|
||||||
|
@ -1415,9 +1443,10 @@ export default {
|
||||||
|
|
||||||
//协助中状态不显示产品信息
|
//协助中状态不显示产品信息
|
||||||
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
|
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
|
||||||
if(this.form.quotApprovalStatus!='1'){
|
/*if(this.form.quotApprovalStatus!='1'){
|
||||||
this.quotMaterialList = response.data.quotMaterialList;
|
this.quotMaterialList = response.data.quotMaterialList;
|
||||||
}
|
}*/
|
||||||
|
this.quotMaterialList = response.data.quotMaterialList;
|
||||||
}else{
|
}else{
|
||||||
this.quotMaterialList = response.data.quotMaterialList;
|
this.quotMaterialList = response.data.quotMaterialList;
|
||||||
}
|
}
|
||||||
|
@ -1512,13 +1541,16 @@ export default {
|
||||||
commitForm() {
|
commitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if(this.quotXjFileList == 0){
|
/*if(this.quotXjFileList == 0){
|
||||||
this.$message.warning("未上传询价清单附件!");
|
this.$message.warning("未上传询价清单附件!");
|
||||||
return;
|
return;
|
||||||
|
}*/
|
||||||
|
if(this.quotMaterialList.length == 0 && this.quotXjFileList == 0){
|
||||||
|
this.$message.warning("请上传询价清单附件或录入报价产品明细");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.form.quotMaterialList = this.quotMaterialList;
|
this.form.quotMaterialList = this.quotMaterialList;
|
||||||
console.log(this.form)
|
|
||||||
commitQuot(this.form).then(response => {
|
commitQuot(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("提交成功");
|
this.$modal.msgSuccess("提交成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -1675,6 +1707,10 @@ export default {
|
||||||
this.quotMaterialList = quotMaterialList.filter(function(item) {
|
this.quotMaterialList = quotMaterialList.filter(function(item) {
|
||||||
return checkedQuotMaterial.indexOf(item.index) == -1
|
return checkedQuotMaterial.indexOf(item.index) == -1
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.form.quotQuantity = this.sumMatSl;
|
||||||
|
/**this.form.quotTotalPrice = this.form.quotTotalPrice;
|
||||||
|
this.form.quotMaterialsCount = this.quotMaterialList.length;*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1717,8 +1753,9 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.form.quotQuantity = sums[6];
|
this.form.quotQuantity = sums[6];
|
||||||
this.form.quotTotalPrice = this.form.quotTotalPrice?this.form.quotTotalPrice:checkRole(['QUOT_MAT_PRICE_DIFF'])? sums[12] : sums[11];
|
/**this.form.quotTotalPrice = checkRole(['QUOT_MAT_PRICE_DIFF'])? (sums[14]==0?(this.form.quotTotalPrice?this.form.quotTotalPrice:sums[14]):sums[14]) : (sums[13]==0?(this.form.quotTotalPrice?this.form.quotTotalPrice:sums[13]):sums[13]);
|
||||||
this.form.quotMaterialsCount = this.form.quotMaterialsCount?this.form.quotMaterialsCount:data.length;
|
//this.form.quotTotalPrice = this.form.quotTotalPrice?this.form.quotTotalPrice:checkRole(['QUOT_MAT_PRICE_DIFF'])? sums[14] : sums[13];
|
||||||
|
this.form.quotMaterialsCount = this.form.quotMaterialsCount?this.form.quotMaterialsCount:data.length;*/
|
||||||
return sums;
|
return sums;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1939,6 +1976,17 @@ export default {
|
||||||
const res = new Map();
|
const res = new Map();
|
||||||
return arr.filter((arr) => !res.has(arr.userName) && res.set(arr.userName, 1));
|
return arr.filter((arr) => !res.has(arr.userName) && res.set(arr.userName, 1));
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 已选择结果数据汇总
|
||||||
|
sumMatSl() {
|
||||||
|
const allMatSl = this.quotMaterialList.reduce((sum, row) => sum + parseFloat(row.matSl), 0);
|
||||||
|
return toDecimal(allMatSl);
|
||||||
|
},
|
||||||
|
sumMatQuotAllPrice() {
|
||||||
|
const allMatQuotAllPrice = this.quotMaterialList.reduce((sum, row) => sum + parseFloat(row.matQuotAllPrice), 0);
|
||||||
|
return toDecimal(allMatQuotAllPrice);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -818,6 +818,14 @@
|
||||||
madeXjQuot(this.form).then(response => {
|
madeXjQuot(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("生成询价单成功,单号:"+response.data.quotCode);
|
this.$modal.msgSuccess("生成询价单成功,单号:"+response.data.quotCode);
|
||||||
this.madeQuotDis = false;
|
this.madeQuotDis = false;
|
||||||
|
|
||||||
|
// 跳转至询价单列表页面并打开详情页
|
||||||
|
const info = {quotId : response.data.quotId};
|
||||||
|
this.$router.push({
|
||||||
|
path:'/quot/quot/index',
|
||||||
|
name: 'Quot',
|
||||||
|
query: info
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="报价客户" width="250" align="center" prop="quotCustomer" />
|
<el-table-column label="报价客户" width="250" align="center" prop="quotCustomer" />
|
||||||
<el-table-column label="报价项目" width="250" align="center" prop="quotProject" />
|
<el-table-column label="报价项目" width="250" align="center" prop="quotProject" />
|
||||||
<el-table-column label="总价" width="100" align="center" prop="totalPrice" />
|
<el-table-column label="总价" width="150" align="center" prop="totalPrice" />
|
||||||
<el-table-column label="联系人" align="center" prop="quotLxr" />
|
<el-table-column label="联系人" align="center" prop="quotLxr" />
|
||||||
<el-table-column label="联系人电话" width="100" align="center" prop="quotLxrdh" />
|
<el-table-column label="联系人电话" width="100" align="center" prop="quotLxrdh" />
|
||||||
<el-table-column label="创建人" width="180" align="center" prop="createName" />
|
<el-table-column label="创建人" width="180" align="center" prop="createName" />
|
||||||
|
|
Loading…
Reference in New Issue