This commit is contained in:
commit
88a1f50a6b
|
@ -1,5 +1,9 @@
|
|||
#for tests only !
|
||||
<<<<<<< HEAD
|
||||
#Thu Jun 20 12:02:54 CST 2024
|
||||
=======
|
||||
#Thu Jun 20 11:01:14 CST 2024
|
||||
>>>>>>> e4cb8bad7c55f817ead3e419a33f96f5d3492ee4
|
||||
jco.destination.pool_capacity=10
|
||||
jco.client.lang=ZH
|
||||
jco.client.ashost=172.19.0.125
|
||||
|
@ -7,5 +11,9 @@ jco.client.saprouter=
|
|||
jco.client.user=RFC
|
||||
jco.client.sysnr=00
|
||||
jco.destination.peak_limit=10
|
||||
<<<<<<< HEAD
|
||||
jco.client.passwd=654321
|
||||
=======
|
||||
jco.client.passwd=w7hAeYb,##Zc}g(emH-GJL;?*-*mA;_enm-`{=LFKC[%7:pE
|
||||
>>>>>>> e4cb8bad7c55f817ead3e419a33f96f5d3492ee4
|
||||
jco.client.client=800
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.ruoyi.web.controller.quot;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
@ -375,66 +377,92 @@ public class QuotController extends BaseController
|
|||
@PostMapping("/commitQuot")
|
||||
public AjaxResult commitQuot(@RequestBody Quot quot)
|
||||
{
|
||||
// 获取用户角色 --判断是否是核价组角色
|
||||
Boolean hjRoleFlag = false;
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
for(SysRole sysRole:roles){
|
||||
String roleKey = sysRole.getRoleKey();
|
||||
if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){
|
||||
hjRoleFlag = true;
|
||||
break;
|
||||
try{
|
||||
// 获取用户角色 --判断是否是核价组角色
|
||||
Boolean hjRoleFlag = false;
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
for(SysRole sysRole:roles){
|
||||
String roleKey = sysRole.getRoleKey();
|
||||
if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){
|
||||
hjRoleFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!hjRoleFlag){
|
||||
// 每天限制提交200条
|
||||
String quotCommitCount = configService.selectConfigByKey("quot.commit.count");
|
||||
String count = quotService.selectQuotListCount();
|
||||
if(Integer.valueOf(count)>=Integer.valueOf(quotCommitCount)){
|
||||
return error("当前报价量已达极限,无法继续提供报价单");
|
||||
if(!hjRoleFlag){
|
||||
// 每天限制提交200条
|
||||
String quotCommitCount = configService.selectConfigByKey("quot.commit.count");
|
||||
String count = quotService.selectQuotListCount();
|
||||
if(Integer.valueOf(count)>=Integer.valueOf(quotCommitCount)){
|
||||
return error("当前报价量已达极限,无法继续提供报价单");
|
||||
}
|
||||
|
||||
// 提交报价时间限制
|
||||
String commitQuotTime = configService.selectConfigByKey("quot.allow.commitQuotTime");
|
||||
if(commitQuotTime.indexOf("-")<0){
|
||||
return error("提交报价时间限制系统参数错误-格式不规范,请联系管理员");
|
||||
}
|
||||
String startTime = commitQuotTime.split("-")[0];
|
||||
String endTime = commitQuotTime.split("-")[1];
|
||||
if(!DateUtils.isMatch(startTime) || !DateUtils.isMatch(endTime)){
|
||||
return error("提交报价时间限制系统参数错误-格式不规范,请联系管理员");
|
||||
}
|
||||
|
||||
//当前时间
|
||||
Date date = new Date();
|
||||
String currentTime = new SimpleDateFormat("HH:mm:ss").format(date);
|
||||
Date nowTime = new SimpleDateFormat("HH:mm:ss").parse(currentTime);
|
||||
Date startTimeD = new SimpleDateFormat("HH:mm:ss").parse(startTime);
|
||||
Date endTimeE = new SimpleDateFormat("HH:mm:ss").parse(endTime);
|
||||
Boolean flag = DateUtils.isEffectiveDate(nowTime,startTimeD,endTimeE);
|
||||
if(!flag){
|
||||
return error("已超过提交报价限制时间【"+commitQuotTime+"】,无法继续提交");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String quot_id = quot.getQuotId();
|
||||
String quot_id = quot.getQuotId();
|
||||
|
||||
quot.setUpdateBy(getUsername());
|
||||
quot.setQuotApprovalStatus("1");//报价单 状态设置为 协助中
|
||||
quot.setQuotInquiryDate(DateUtils.getNowDate());//报价单 询价日期设置为 当前日期
|
||||
quot.setUpdateBy(getUsername());
|
||||
quot.setQuotApprovalStatus("1");//报价单 状态设置为 协助中
|
||||
quot.setQuotInquiryDate(DateUtils.getNowDate());//报价单 询价日期设置为 当前日期
|
||||
|
||||
// 校验 是否已有重复报价单(客户+项目名)
|
||||
Boolean flag = false;
|
||||
if(!hjRoleFlag){
|
||||
flag = quotService.checkExistQuot(getUsername(),quot.getQuotCustomerBm(),quot.getQuotProject());
|
||||
}else{
|
||||
flag = quotService.checkExistQuot(quot.getQuotSalesmanCode(),quot.getQuotCustomerBm(),quot.getQuotProject());
|
||||
}
|
||||
if(flag){
|
||||
return error("存在相同客户且项目名称一致的报价单,无法提交");
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(quot_id)){
|
||||
quot.setQuotId(UUID.fastUUID().toString());
|
||||
//quot.setQuotCode(IdUtils.createNo("BJD_",0));
|
||||
String quotCode = quotService.getCode("BJD");
|
||||
quot.setQuotCode(quotCode);
|
||||
|
||||
if(hjRoleFlag){
|
||||
quot.setCreateBy(quot.getQuotSalesmanCode());
|
||||
// 校验 是否已有重复报价单(客户+项目名)
|
||||
Boolean flag = false;
|
||||
if(!hjRoleFlag){
|
||||
flag = quotService.checkExistQuot(getUsername(),quot.getQuotCustomerBm(),quot.getQuotProject());
|
||||
}else{
|
||||
quot.setCreateBy(getUsername());
|
||||
flag = quotService.checkExistQuot(quot.getQuotSalesmanCode(),quot.getQuotCustomerBm(),quot.getQuotProject());
|
||||
}
|
||||
//quot.setQuotSalesmanCode(getUsername());
|
||||
quotService.insertQuot(quot);
|
||||
//sendNoticeToBjz(quot);
|
||||
return success();
|
||||
}else{
|
||||
if(hjRoleFlag){
|
||||
quot.setUpdateBy(quot.getQuotSalesmanCode());
|
||||
if(flag){
|
||||
return error("存在相同客户且项目名称一致的报价单,无法提交");
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(quot_id)){
|
||||
quot.setQuotId(UUID.fastUUID().toString());
|
||||
//quot.setQuotCode(IdUtils.createNo("BJD_",0));
|
||||
String quotCode = quotService.getCode("BJD");
|
||||
quot.setQuotCode(quotCode);
|
||||
|
||||
if(hjRoleFlag){
|
||||
quot.setCreateBy(quot.getQuotSalesmanCode());
|
||||
}else{
|
||||
quot.setCreateBy(getUsername());
|
||||
}
|
||||
//quot.setQuotSalesmanCode(getUsername());
|
||||
quotService.insertQuot(quot);
|
||||
//sendNoticeToBjz(quot);
|
||||
return success();
|
||||
}else{
|
||||
quot.setUpdateBy(getUsername());
|
||||
if(hjRoleFlag){
|
||||
quot.setUpdateBy(quot.getQuotSalesmanCode());
|
||||
}else{
|
||||
quot.setUpdateBy(getUsername());
|
||||
}
|
||||
quotService.updateQuot(quot);
|
||||
//sendNoticeToBjz(quot);
|
||||
return success();
|
||||
}
|
||||
quotService.updateQuot(quot);
|
||||
//sendNoticeToBjz(quot);
|
||||
return success();
|
||||
}catch (Exception e){
|
||||
return error("系统异常");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -609,6 +637,7 @@ public class QuotController extends BaseController
|
|||
quotJswInfo.setKh(quot.getQuotCustomerName());
|
||||
quotJswInfo.setKhid(quot.getQuotCustomerBm());
|
||||
quotJswInfo.setBz(quot.getQuotQuotationRequire());
|
||||
quotJswInfo.setQuotUserId(getUsername());
|
||||
|
||||
List<QuotJswMaterial> quotJswMaterials = new ArrayList<>();
|
||||
QuotJswMaterial quotJswMaterial = null;
|
||||
|
@ -715,6 +744,26 @@ public class QuotController extends BaseController
|
|||
sysOaQuot.setQuotLvPrice(quot.getQuotLvPrice());
|
||||
sysOaQuot.setQuotTongPrice(quot.getQuotTongPrice());
|
||||
sysOaQuot.setQuotMatpriceDiff(quot.getQuotMatpriceDiff());
|
||||
sysOaQuot.setQuotMatpriceDiff2(quot.getQuotMatpriceDiff2());
|
||||
|
||||
// 上传反馈清单
|
||||
QuotFile quotFile = new QuotFile();
|
||||
quotFile.setRelationId(quot.getQuotId());
|
||||
quotFile.setFileType("quotFkFile");
|
||||
List<QuotFile> fileList = quotFileService.selectQuotFileList(quotFile);
|
||||
String fileString = "";
|
||||
if(fileList!=null&&fileList.size()>0){
|
||||
for(QuotFile f:fileList){
|
||||
String fileUrl = f.getFileUrl();
|
||||
if(StringUtils.isEmpty(fileString)){
|
||||
fileString = fileString+fileUrl;
|
||||
}else{
|
||||
fileString = fileString+","+fileUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
sysOaQuot.setQuotFkFile(fileString);
|
||||
|
||||
sysOaQuot.setCreateTime(DateUtils.getNowDate());
|
||||
sysOaQuot.setIsFinish("0");// 报价已提交OA审批中
|
||||
sysOaQuot.setMaterials(quot.getQuotMaterialList());
|
||||
|
|
|
@ -283,6 +283,11 @@ public class RedBookController extends BaseController
|
|||
|
||||
List<OAQuotProduct> list = quot.getSelectedResultData();
|
||||
|
||||
File directory = new File("xjQuotFile/");
|
||||
// 如果文件夹不存在,则创建文件夹
|
||||
if (!directory.exists()) {
|
||||
directory.mkdir();
|
||||
}
|
||||
excelFile = new File("xjQuotFile/"+xjquot.getQuotCode()+".xls");
|
||||
File file = excelUtil.exportXjQuotExcel(response,excelFile,xjquot,list);
|
||||
MultipartFile multipartFile = convert(file);
|
||||
|
|
|
@ -53,14 +53,14 @@ spring:
|
|||
url: jdbc:sqlserver://192.168.9.99:1433;DatabaseName=jn_storage
|
||||
username: sa
|
||||
password: Itcenter110-
|
||||
order:
|
||||
#order:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: true
|
||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
#enabled: true
|
||||
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# 正式数据库
|
||||
url: jdbc:sqlserver://192.168.9.2:1433;DatabaseName=jn_web
|
||||
username: sa
|
||||
password: it12345
|
||||
#url: jdbc:sqlserver://192.168.9.2:1433;DatabaseName=jn_web
|
||||
#username: sa
|
||||
#password: it12345
|
||||
# OA数据库数据源
|
||||
oa:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
@ -5,7 +5,11 @@ import java.text.ParseException;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
|
||||
/**
|
||||
|
@ -204,8 +208,79 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
return Integer.parseInt(String.valueOf(secondsLeft));
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前时间是否在[startTime, endTime]区间,注意时间格式要一致
|
||||
*
|
||||
* @param nowTime 当前时间
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return
|
||||
*/
|
||||
public static boolean isEffectiveDate(Date nowTime, Date startTime, Date endTime) {
|
||||
if (nowTime.getTime() == startTime.getTime()
|
||||
|| nowTime.getTime() == endTime.getTime()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Calendar date = Calendar.getInstance();
|
||||
date.setTime(nowTime);
|
||||
|
||||
Calendar begin = Calendar.getInstance();
|
||||
begin.setTime(startTime);
|
||||
|
||||
Calendar end = Calendar.getInstance();
|
||||
end.setTime(endTime);
|
||||
|
||||
if (date.after(begin) && date.before(end)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否满足时分秒时间格式
|
||||
* @param inputString
|
||||
* @return
|
||||
*/
|
||||
public static boolean isMatch(String inputString) {
|
||||
String timeRegex = "^([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$";
|
||||
Pattern pattern = Pattern.compile(timeRegex);
|
||||
Matcher matcher = pattern.matcher(inputString);
|
||||
return matcher.matches();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(secondsUntilMidnight());
|
||||
|
||||
try{
|
||||
String format = "HH:mm:ss";
|
||||
|
||||
Date date = new Date();
|
||||
String currentTime = new SimpleDateFormat(format).format(date);
|
||||
|
||||
Date nowTime = new SimpleDateFormat(format).parse(currentTime);
|
||||
Date startTime = new SimpleDateFormat(format).parse("7:00:00");
|
||||
Date endTime = new SimpleDateFormat(format).parse("19:00:00");
|
||||
System.out.println(isEffectiveDate(nowTime, startTime, endTime));
|
||||
|
||||
|
||||
String inputString = "7:34:56";
|
||||
String timeRegex = "^([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$";
|
||||
|
||||
Pattern pattern = Pattern.compile(timeRegex);
|
||||
Matcher matcher = pattern.matcher(inputString);
|
||||
|
||||
if (matcher.matches()) {
|
||||
System.out.println("输入的字符串是时分秒格式");
|
||||
} else {
|
||||
System.out.println("输入的字符串不是时分秒格式");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -93,6 +93,8 @@ public class Quot extends BaseEntity
|
|||
|
||||
/** 整单料价价差率 */
|
||||
private String quotMatpriceDiff;
|
||||
/** 整单料价价差率2 */
|
||||
private String quotMatpriceDiff2;
|
||||
|
||||
/** 是否打印 */
|
||||
private String quotPrint;
|
||||
|
@ -305,6 +307,9 @@ public class Quot extends BaseEntity
|
|||
public String getQuotMatpriceDiff() { return quotMatpriceDiff; }
|
||||
|
||||
public void setQuotMatpriceDiff(String quotMatpriceDiff) { this.quotMatpriceDiff = quotMatpriceDiff; }
|
||||
public String getQuotMatpriceDiff2() { return quotMatpriceDiff2; }
|
||||
|
||||
public void setQuotMatpriceDiff2(String quotMatpriceDiff2) { this.quotMatpriceDiff2 = quotMatpriceDiff2; }
|
||||
public String getQuotPrint() { return quotPrint; }
|
||||
|
||||
public void setQuotPrint(String quotPrint) { this.quotPrint = quotPrint; }
|
||||
|
|
|
@ -60,6 +60,11 @@ public class SysOaQuot extends BaseEntity
|
|||
|
||||
/** 整单料价价差率 */
|
||||
private String quotMatpriceDiff;
|
||||
/** 整单料价价差率2 */
|
||||
private String quotMatpriceDiff2;
|
||||
|
||||
/** 询价单-询价清单地址 */
|
||||
private String quotFkFile;
|
||||
|
||||
/** OA审批状态 */
|
||||
private String state;
|
||||
|
@ -191,6 +196,14 @@ public class SysOaQuot extends BaseEntity
|
|||
this.quotMatpriceDiff = quotMatpriceDiff;
|
||||
}
|
||||
|
||||
public String getQuotMatpriceDiff2() { return quotMatpriceDiff2; }
|
||||
|
||||
public void setQuotMatpriceDiff2(String quotMatpriceDiff2) { this.quotMatpriceDiff2 = quotMatpriceDiff2; }
|
||||
|
||||
public String getQuotFkFile() { return quotFkFile; }
|
||||
|
||||
public void setQuotFkFile(String quotFkFile) { this.quotFkFile = quotFkFile; }
|
||||
|
||||
public String getState() { return state; }
|
||||
|
||||
public void setState(String state) { this.state = state; }
|
||||
|
|
|
@ -6,13 +6,14 @@ import java.util.List;
|
|||
* 金思维 上传报价单主体信息
|
||||
*/
|
||||
public class QuotJswInfo {
|
||||
private String quotCode;
|
||||
private String xsy;
|
||||
private String xsyid;
|
||||
private String kh;
|
||||
private String khid;
|
||||
private String xm;
|
||||
private String bz;
|
||||
private String quotCode;//客户报价单号
|
||||
private String xsy;//业务员名称
|
||||
private String xsyid;//业务员编码
|
||||
private String kh;//客户名称
|
||||
private String khid;//客户编码
|
||||
private String xm;//项目名称
|
||||
private String bz;//报价要求
|
||||
private String quotUserId;//报价员账户
|
||||
|
||||
private List<QuotJswMaterial> quotMaterial;
|
||||
|
||||
|
@ -72,6 +73,10 @@ public class QuotJswInfo {
|
|||
this.bz = bz;
|
||||
}
|
||||
|
||||
public String getQuotUserId() { return quotUserId; }
|
||||
|
||||
public void setQuotUserId(String quotUserId) { this.quotUserId = quotUserId; }
|
||||
|
||||
public List<QuotJswMaterial> getQuotMaterial() {
|
||||
return quotMaterial;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="quotLvPrice" column="quot_lv_price" />
|
||||
<result property="quotTongPrice" column="quot_tong_price" />
|
||||
<result property="quotMatpriceDiff" column="quot_matprice_diff" />
|
||||
<result property="quotMatpriceDiff2" column="quot_matprice_diff2" />
|
||||
<result property="quotPrint" column="quot_print" />
|
||||
<result property="quotPrintUserName" column="quot_print_user_name" />
|
||||
<result property="quotPrintUserNickName" column="quot_print_user_nickName" />
|
||||
|
@ -113,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_materials_count,
|
||||
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,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_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
|
||||
|
@ -143,10 +144,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotSalesmanName != null and quotSalesmanName != ''"> and quot_salesman_name like concat('%', #{quotSalesmanName}, '%')</if>
|
||||
<if test="quotPrint != null and quotPrint != ''"> and quot_print = #{quotPrint}</if>
|
||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''"> and quot_approval_status = #{quotApprovalStatus}</if>
|
||||
<if test="quotOAApprovalStatus != null and quotOAApprovalStatus != ''"> and quot_oa_approval_status = #{quotOAApprovalStatus}</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by a.quot_inquiry_date desc
|
||||
<!-- order by a.quot_inquiry_date desc -->
|
||||
</select>
|
||||
|
||||
<select id="selectQuotListCount" resultType="String">
|
||||
|
@ -158,7 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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_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_lv_price,a.quot_tong_price,a.quot_matprice_diff,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_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
|
||||
|
@ -238,6 +240,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price,</if>
|
||||
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price,</if>
|
||||
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff,</if>
|
||||
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">quot_matprice_diff2,</if>
|
||||
<if test="quotPrint != null and quotPrint != ''">quot_print,</if>
|
||||
<if test="quotPrintUserName != null and quotPrintUserName != ''">quot_print_user_name,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
|
@ -286,6 +289,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLvPrice != null and quotLvPrice != ''">#{quotLvPrice},</if>
|
||||
<if test="quotTongPrice != null and quotTongPrice != ''">#{quotTongPrice},</if>
|
||||
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">#{quotMatpriceDiff},</if>
|
||||
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">#{quotMatpriceDiff2},</if>
|
||||
<if test="quotPrint != null and quotPrint != ''">#{quotPrint},</if>
|
||||
<if test="quotPrintUserName != null and quotPrintUserName != ''">#{quotPrintUserName},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
|
@ -330,6 +334,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price,</if>
|
||||
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price,</if>
|
||||
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff,</if>
|
||||
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">quot_matprice_diff2,</if>
|
||||
<if test="quotFkFile != null and quotFkFile != ''">quot_fk_file,</if>
|
||||
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="isFinish != null and isFinish != ''">isFinish,</if>
|
||||
</trim>
|
||||
|
@ -349,6 +356,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLvPrice != null and quotLvPrice != ''">#{quotLvPrice},</if>
|
||||
<if test="quotTongPrice != null and quotTongPrice != ''">#{quotTongPrice},</if>
|
||||
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">#{quotMatpriceDiff},</if>
|
||||
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">#{quotMatpriceDiff2},</if>
|
||||
<if test="quotFkFile != null and quotFkFile != ''">#{quotFkFile},</if>
|
||||
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="isFinish != null and isFinish != ''">#{isFinish},</if>
|
||||
</trim>
|
||||
|
@ -383,6 +393,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price = #{quotLvPrice},</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="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">quot_matprice_diff2 = #{quotMatpriceDiff2},</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="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="询价单号" prop="quotCode">
|
||||
<el-input
|
||||
v-model="queryParams.quotCode"
|
||||
|
@ -53,6 +53,16 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="OA提交状态" prop="quotOAApprovalStatus" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||
<el-select v-model="queryParams.quotOAApprovalStatus" placeholder="请选择提交状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.quot_oa_approval_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
@ -163,15 +173,16 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<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="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||
<el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="OA审批说明" align="center" prop="quotOAApprovalStatusRemark" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])"/>
|
||||
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
||||
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
|
||||
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
|
||||
<el-table-column label="金思维提交状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||
<el-table-column label="金思维提交状态" align="center" prop="quotJswApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>
|
||||
</template>
|
||||
|
@ -389,6 +400,13 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])">
|
||||
<el-form-item label="整单料价价差率2" prop="quotMatpriceDiff2">
|
||||
<el-input v-model="form.quotMatpriceDiff2"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
||||
<el-col :span="24" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
|
||||
<el-form-item label="反馈说明" prop="quotFeedbackExplanation">
|
||||
|
@ -1180,8 +1198,15 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const roles = this.$store.state.user.roles;
|
||||
if(roles && roles.indexOf('QUOT') !== -1 ){//报价组默认查看待审核 单据
|
||||
this.queryParams.quotApprovalStatus = '1';
|
||||
if(roles && (roles.indexOf('QUOT') !== -1 || roles.indexOf('PRICE_VERIFICATION') !== -1)){//报价组默认查看待审核且按询价时间排序 单据
|
||||
this.queryParams.orderByColumn = "a.quot_inquiry_date";//查询字段是表格中字段名字
|
||||
this.queryParams.isAsc = "desc";//动态取值排序顺序
|
||||
this.queryParams.quotApprovalStatus = '1';
|
||||
}
|
||||
if(roles && roles.indexOf('SALES_MAN') !== -1 ){//营销经理默认查看待提交且按创建时间排序 单据
|
||||
this.queryParams.orderByColumn = "a.create_time";//查询字段是表格中字段名字
|
||||
this.queryParams.isAsc = "desc";//动态取值排序顺序
|
||||
this.queryParams.quotApprovalStatus = '0';
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
|
@ -1237,6 +1262,7 @@ export default {
|
|||
quotTongPrice: null,
|
||||
quotLvPrice: null,
|
||||
quotMatpriceDiff: null,
|
||||
quotMatpriceDiff2: null,
|
||||
|
||||
quotJsxzApprovalStatus: null,
|
||||
quotJsxzChapter: null,
|
||||
|
@ -1374,7 +1400,16 @@ export default {
|
|||
setInfo(response){
|
||||
this.form = response.data;
|
||||
this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
|
||||
this.quotMaterialList = response.data.quotMaterialList;
|
||||
|
||||
//协助中状态不显示产品信息
|
||||
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
|
||||
if(this.form.quotApprovalStatus!='1'){
|
||||
this.quotMaterialList = response.data.quotMaterialList;
|
||||
}
|
||||
}else{
|
||||
this.quotMaterialList = response.data.quotMaterialList;
|
||||
}
|
||||
|
||||
this.open = true;
|
||||
this.activeName = "quotInfo";
|
||||
|
||||
|
@ -1679,7 +1714,7 @@ export default {
|
|||
const param = {relationId:this.form.quotId,fileType:'quotFkFile'}
|
||||
|
||||
//协助中状态不显示反馈附件
|
||||
if(checkRole(['SALES_MAN'])){
|
||||
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
|
||||
if(this.form.quotApprovalStatus!='1'){
|
||||
quotFileList(param).then(response => {
|
||||
this.quotFkFileList = response.rows;
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
<el-button style="float: right;" size="mini" type="primary" icon="el-icon-search" @click="handleSearchClick">搜索</el-button>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-button style="float: right;margin-left: 5px;" size="mini" type="primary" icon="el-icon-document" @click="handleMadeXjQuotClick" :disabled="selectedResultData.length==0 || madeQuotDis">生成询价单</el-button>
|
||||
<el-button style="float: right;margin-left: 5px;" size="mini" type="success" icon="el-icon-document" @click="handleMadeQuotClick" :disabled="selectedResultData.length==0 || madeQuotDis">生成报价单</el-button>
|
||||
<el-button style="float: right;margin-left: 5px;" size="mini" type="warning" icon="el-icon-folder" @click="handleSaveClick" :disabled="selectedResultData.length==0">保存</el-button>
|
||||
<el-button style="float: right;margin-left: 5px;" size="mini" icon="el-icon-refresh" @click="handleRefreshClick">清空信息</el-button>
|
||||
<el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleImport">导入</el-button>
|
||||
<el-button style="float: right;margin-left: 5px;" size="mini" type="primary" icon="el-icon-document" @click="handleMadeXjQuotClick" :disabled="selectedResultData.length==0 || madeQuotDis">生成询价单</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
@ -782,9 +782,11 @@
|
|||
|
||||
// 生成询价单
|
||||
handleMadeXjQuotClick() {
|
||||
this.madeQuotDis = true;
|
||||
this.form.selectedResultData = this.selectedResultData;
|
||||
madeXjQuot(this.form).then(response => {
|
||||
this.$modal.msgSuccess("生成询价单成功,单号:"+response.data.quotCode);
|
||||
this.madeQuotDis = false;
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -52,13 +52,15 @@
|
|||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<span>总条数:{{sumQuotMaterialsCount}}</span>
|
||||
总条数:<span style="font-size: 18px">{{sumQuotMaterialsCount}}</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>总价:{{sumQuotTotalPrice}}</span>
|
||||
总价:<span style="font-size: 18px">{{sumQuotTotalPrice}}</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
总单量:<span style="font-size: 18px">{{sumQuotCount}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="quotList" style="width: 100%;margin-top: 10px;" :height="tableHeight">
|
||||
<el-table-column fixed label="报价单号" align="center" prop="quotCode" width="250px"/>
|
||||
<el-table-column fixed label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
||||
|
@ -77,13 +79,13 @@
|
|||
<span>{{ parseTime(scope.row.quotQuotationDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" width="160" />
|
||||
<el-table-column label="创建人" align="center" prop="createName" width="150px"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" width="160" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -107,7 +109,7 @@ export default {
|
|||
// 报价表格数据
|
||||
quotList: [],
|
||||
// 表格高度设置
|
||||
tableHeight: window.innerHeight - 240, //表格动态高度
|
||||
tableHeight: window.innerHeight - 280, //表格动态高度
|
||||
screenHeight: window.innerHeight, //内容区域高度
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
|
@ -151,15 +153,19 @@ export default {
|
|||
},
|
||||
// 总价
|
||||
sumQuotTotalPrice() {
|
||||
const quotTotalPrice = this.quotList.reduce((sum, row) => sum + parseFloat(row.quotTotalPrice==null?0:row.quotTotalPrice), 0);
|
||||
const quotTotalPrice = this.quotList.reduce((sum, row) => sum + parseFloat((isNaN(row.quotTotalPrice)||row.quotTotalPrice==null)?0:row.quotTotalPrice), 0);
|
||||
return toDecimal(quotTotalPrice);
|
||||
},
|
||||
// 总单量
|
||||
sumQuotCount() {
|
||||
return this.quotList.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听screenHeight从而改变table的高度
|
||||
screenHeight(val) {
|
||||
this.screenHeight = val
|
||||
this.tableHeight = this.screenHeight - 260
|
||||
this.tableHeight = this.screenHeight - 280
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
|
|
Loading…
Reference in New Issue