This commit is contained in:
JIAL 2024-06-20 14:10:33 +08:00
commit 88a1f50a6b
12 changed files with 297 additions and 83 deletions

View File

@ -1,5 +1,9 @@
#for tests only ! #for tests only !
<<<<<<< HEAD
#Thu Jun 20 12:02:54 CST 2024 #Thu Jun 20 12:02:54 CST 2024
=======
#Thu Jun 20 11:01:14 CST 2024
>>>>>>> e4cb8bad7c55f817ead3e419a33f96f5d3492ee4
jco.destination.pool_capacity=10 jco.destination.pool_capacity=10
jco.client.lang=ZH jco.client.lang=ZH
jco.client.ashost=172.19.0.125 jco.client.ashost=172.19.0.125
@ -7,5 +11,9 @@ jco.client.saprouter=
jco.client.user=RFC jco.client.user=RFC
jco.client.sysnr=00 jco.client.sysnr=00
jco.destination.peak_limit=10 jco.destination.peak_limit=10
<<<<<<< HEAD
jco.client.passwd=654321 jco.client.passwd=654321
=======
jco.client.passwd=w7hAeYb,##Zc}g(emH-GJL;?*-*mA;_enm-`{=LFKC[%7:pE
>>>>>>> e4cb8bad7c55f817ead3e419a33f96f5d3492ee4
jco.client.client=800 jco.client.client=800

View File

@ -1,7 +1,9 @@
package com.ruoyi.web.controller.quot; package com.ruoyi.web.controller.quot;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -375,6 +377,7 @@ public class QuotController extends BaseController
@PostMapping("/commitQuot") @PostMapping("/commitQuot")
public AjaxResult commitQuot(@RequestBody Quot quot) public AjaxResult commitQuot(@RequestBody Quot quot)
{ {
try{
// 获取用户角色 --判断是否是核价组角色 // 获取用户角色 --判断是否是核价组角色
Boolean hjRoleFlag = false; Boolean hjRoleFlag = false;
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
@ -392,6 +395,28 @@ public class QuotController extends BaseController
if(Integer.valueOf(count)>=Integer.valueOf(quotCommitCount)){ if(Integer.valueOf(count)>=Integer.valueOf(quotCommitCount)){
return error("当前报价量已达极限,无法继续提供报价单"); 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();
@ -436,6 +461,9 @@ public class QuotController extends BaseController
//sendNoticeToBjz(quot); //sendNoticeToBjz(quot);
return success(); return success();
} }
}catch (Exception e){
return error("系统异常");
}
} }
/** /**
@ -609,6 +637,7 @@ public class QuotController extends BaseController
quotJswInfo.setKh(quot.getQuotCustomerName()); quotJswInfo.setKh(quot.getQuotCustomerName());
quotJswInfo.setKhid(quot.getQuotCustomerBm()); quotJswInfo.setKhid(quot.getQuotCustomerBm());
quotJswInfo.setBz(quot.getQuotQuotationRequire()); quotJswInfo.setBz(quot.getQuotQuotationRequire());
quotJswInfo.setQuotUserId(getUsername());
List<QuotJswMaterial> quotJswMaterials = new ArrayList<>(); List<QuotJswMaterial> quotJswMaterials = new ArrayList<>();
QuotJswMaterial quotJswMaterial = null; QuotJswMaterial quotJswMaterial = null;
@ -715,6 +744,26 @@ public class QuotController extends BaseController
sysOaQuot.setQuotLvPrice(quot.getQuotLvPrice()); sysOaQuot.setQuotLvPrice(quot.getQuotLvPrice());
sysOaQuot.setQuotTongPrice(quot.getQuotTongPrice()); sysOaQuot.setQuotTongPrice(quot.getQuotTongPrice());
sysOaQuot.setQuotMatpriceDiff(quot.getQuotMatpriceDiff()); 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.setCreateTime(DateUtils.getNowDate());
sysOaQuot.setIsFinish("0");// 报价已提交OA审批中 sysOaQuot.setIsFinish("0");// 报价已提交OA审批中
sysOaQuot.setMaterials(quot.getQuotMaterialList()); sysOaQuot.setMaterials(quot.getQuotMaterialList());

View File

@ -283,6 +283,11 @@ public class RedBookController extends BaseController
List<OAQuotProduct> list = quot.getSelectedResultData(); List<OAQuotProduct> list = quot.getSelectedResultData();
File directory = new File("xjQuotFile/");
// 如果文件夹不存在则创建文件夹
if (!directory.exists()) {
directory.mkdir();
}
excelFile = new File("xjQuotFile/"+xjquot.getQuotCode()+".xls"); excelFile = new File("xjQuotFile/"+xjquot.getQuotCode()+".xls");
File file = excelUtil.exportXjQuotExcel(response,excelFile,xjquot,list); File file = excelUtil.exportXjQuotExcel(response,excelFile,xjquot,list);
MultipartFile multipartFile = convert(file); MultipartFile multipartFile = convert(file);

View File

@ -53,14 +53,14 @@ spring:
url: jdbc:sqlserver://192.168.9.99:1433;DatabaseName=jn_storage url: jdbc:sqlserver://192.168.9.99:1433;DatabaseName=jn_storage
username: sa username: sa
password: Itcenter110- password: Itcenter110-
order: #order:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: true #enabled: true
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver #driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# 正式数据库 # 正式数据库
url: jdbc:sqlserver://192.168.9.2:1433;DatabaseName=jn_web #url: jdbc:sqlserver://192.168.9.2:1433;DatabaseName=jn_web
username: sa #username: sa
password: it12345 #password: it12345
# OA数据库数据源 # OA数据库数据源
oa: oa:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -5,7 +5,11 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.*; import java.time.*;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.time.DateFormatUtils; 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)); 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) { 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();
}
} }
} }

View File

@ -93,6 +93,8 @@ public class Quot extends BaseEntity
/** 整单料价价差率 */ /** 整单料价价差率 */
private String quotMatpriceDiff; private String quotMatpriceDiff;
/** 整单料价价差率2 */
private String quotMatpriceDiff2;
/** 是否打印 */ /** 是否打印 */
private String quotPrint; private String quotPrint;
@ -305,6 +307,9 @@ public class Quot extends BaseEntity
public String getQuotMatpriceDiff() { return quotMatpriceDiff; } public String getQuotMatpriceDiff() { return quotMatpriceDiff; }
public void setQuotMatpriceDiff(String quotMatpriceDiff) { this.quotMatpriceDiff = 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 String getQuotPrint() { return quotPrint; }
public void setQuotPrint(String quotPrint) { this.quotPrint = quotPrint; } public void setQuotPrint(String quotPrint) { this.quotPrint = quotPrint; }

View File

@ -60,6 +60,11 @@ public class SysOaQuot extends BaseEntity
/** 整单料价价差率 */ /** 整单料价价差率 */
private String quotMatpriceDiff; private String quotMatpriceDiff;
/** 整单料价价差率2 */
private String quotMatpriceDiff2;
/** 询价单-询价清单地址 */
private String quotFkFile;
/** OA审批状态 */ /** OA审批状态 */
private String state; private String state;
@ -191,6 +196,14 @@ public class SysOaQuot extends BaseEntity
this.quotMatpriceDiff = quotMatpriceDiff; 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 String getState() { return state; }
public void setState(String state) { this.state = state; } public void setState(String state) { this.state = state; }

View File

@ -6,13 +6,14 @@ import java.util.List;
* 金思维 上传报价单主体信息 * 金思维 上传报价单主体信息
*/ */
public class QuotJswInfo { public class QuotJswInfo {
private String quotCode; private String quotCode;//客户报价单号
private String xsy; private String xsy;//业务员名称
private String xsyid; private String xsyid;//业务员编码
private String kh; private String kh;//客户名称
private String khid; private String khid;//客户编码
private String xm; private String xm;//项目名称
private String bz; private String bz;//报价要求
private String quotUserId;//报价员账户
private List<QuotJswMaterial> quotMaterial; private List<QuotJswMaterial> quotMaterial;
@ -72,6 +73,10 @@ public class QuotJswInfo {
this.bz = bz; this.bz = bz;
} }
public String getQuotUserId() { return quotUserId; }
public void setQuotUserId(String quotUserId) { this.quotUserId = quotUserId; }
public List<QuotJswMaterial> getQuotMaterial() { public List<QuotJswMaterial> getQuotMaterial() {
return quotMaterial; return quotMaterial;
} }

View File

@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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" />
<result property="quotMatpriceDiff2" column="quot_matprice_diff2" />
<result property="quotPrint" column="quot_print" /> <result property="quotPrint" column="quot_print" />
<result property="quotPrintUserName" column="quot_print_user_name" /> <result property="quotPrintUserName" column="quot_print_user_name" />
<result property="quotPrintUserNickName" column="quot_print_user_nickName" /> <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_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_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.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, 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="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="quotPrint != null and quotPrint != ''"> and quot_print = #{quotPrint}</if>
<if test="quotApprovalStatus != null and quotApprovalStatus != ''"> and quot_approval_status = #{quotApprovalStatus}</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} ${params.dataScope}
</where> </where>
order by a.quot_inquiry_date desc <!-- order by a.quot_inquiry_date desc -->
</select> </select>
<select id="selectQuotListCount" resultType="String"> <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_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_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.create_by, a.create_time, a.update_by, a.update_time,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, 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="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>
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">quot_matprice_diff2,</if>
<if test="quotPrint != null and quotPrint != ''">quot_print,</if> <if test="quotPrint != null and quotPrint != ''">quot_print,</if>
<if test="quotPrintUserName != null and quotPrintUserName != ''">quot_print_user_name,</if> <if test="quotPrintUserName != null and quotPrintUserName != ''">quot_print_user_name,</if>
<if test="createBy != null and createBy != ''">create_by,</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="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>
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">#{quotMatpriceDiff2},</if>
<if test="quotPrint != null and quotPrint != ''">#{quotPrint},</if> <if test="quotPrint != null and quotPrint != ''">#{quotPrint},</if>
<if test="quotPrintUserName != null and quotPrintUserName != ''">#{quotPrintUserName},</if> <if test="quotPrintUserName != null and quotPrintUserName != ''">#{quotPrintUserName},</if>
<if test="createBy != null and createBy != ''">#{createBy},</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="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>
<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="createTime != null">create_time,</if>
<if test="isFinish != null and isFinish != ''">isFinish,</if> <if test="isFinish != null and isFinish != ''">isFinish,</if>
</trim> </trim>
@ -349,6 +356,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="quotMatpriceDiff2 != null and quotMatpriceDiff2 != ''">#{quotMatpriceDiff2},</if>
<if test="quotFkFile != null and quotFkFile != ''">#{quotFkFile},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="isFinish != null and isFinish != ''">#{isFinish},</if> <if test="isFinish != null and isFinish != ''">#{isFinish},</if>
</trim> </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="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="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="createBy != null and createBy != ''">create_by = #{createBy},</if> <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <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-form-item label="询价单号" prop="quotCode">
<el-input <el-input
v-model="queryParams.quotCode" v-model="queryParams.quotCode"
@ -53,6 +53,16 @@
/> />
</el-select> </el-select>
</el-form-item> </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-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -163,15 +173,16 @@
</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="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"> <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"/>
</template> </template>
</el-table-column> </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="quotSalesmanName" width="150px"/>
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/> <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="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"> <template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/> <dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>
</template> </template>
@ -389,6 +400,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-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-col :span="24" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
<el-form-item label="反馈说明" prop="quotFeedbackExplanation"> <el-form-item label="反馈说明" prop="quotFeedbackExplanation">
@ -1180,9 +1198,16 @@ export default {
}, },
created() { created() {
const roles = this.$store.state.user.roles; const roles = this.$store.state.user.roles;
if(roles && roles.indexOf('QUOT') !== -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'; 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(); this.getList();
}, },
methods: { methods: {
@ -1237,6 +1262,7 @@ export default {
quotTongPrice: null, quotTongPrice: null,
quotLvPrice: null, quotLvPrice: null,
quotMatpriceDiff: null, quotMatpriceDiff: null,
quotMatpriceDiff2: null,
quotJsxzApprovalStatus: null, quotJsxzApprovalStatus: null,
quotJsxzChapter: null, quotJsxzChapter: null,
@ -1374,7 +1400,16 @@ export default {
setInfo(response){ setInfo(response){
this.form = response.data; this.form = response.data;
this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(',')); this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
//
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
if(this.form.quotApprovalStatus!='1'){
this.quotMaterialList = response.data.quotMaterialList; this.quotMaterialList = response.data.quotMaterialList;
}
}else{
this.quotMaterialList = response.data.quotMaterialList;
}
this.open = true; this.open = true;
this.activeName = "quotInfo"; this.activeName = "quotInfo";
@ -1679,7 +1714,7 @@ export default {
const param = {relationId:this.form.quotId,fileType:'quotFkFile'} const param = {relationId:this.form.quotId,fileType:'quotFkFile'}
// //
if(checkRole(['SALES_MAN'])){ if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
if(this.form.quotApprovalStatus!='1'){ if(this.form.quotApprovalStatus!='1'){
quotFileList(param).then(response => { quotFileList(param).then(response => {
this.quotFkFileList = response.rows; this.quotFkFileList = response.rows;

View File

@ -8,11 +8,11 @@
<el-button style="float: right;" size="mini" type="primary" icon="el-icon-search" @click="handleSearchClick">搜索</el-button> <el-button style="float: right;" size="mini" type="primary" icon="el-icon-search" @click="handleSearchClick">搜索</el-button>
</el-col> </el-col>
<el-col :span="14"> <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="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" 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;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;" 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-col>
</el-row> </el-row>
@ -782,9 +782,11 @@
// //
handleMadeXjQuotClick() { handleMadeXjQuotClick() {
this.madeQuotDis = true;
this.form.selectedResultData = this.selectedResultData; this.form.selectedResultData = this.selectedResultData;
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;
}); });
}, },

View File

@ -52,13 +52,15 @@
</el-form> </el-form>
<el-row> <el-row>
<el-col :span="4"> <el-col :span="4">
<span>总条数:{{sumQuotMaterialsCount}}</span> 总条数:<span style="font-size: 18px">{{sumQuotMaterialsCount}}</span>
</el-col> </el-col>
<el-col :span="4"> <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-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="quotList" style="width: 100%;margin-top: 10px;" :height="tableHeight"> <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="quotCode" width="250px"/>
<el-table-column fixed label="业务员" align="center" prop="quotSalesmanName" width="150px"/> <el-table-column fixed label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
@ -77,13 +79,13 @@
<span>{{ parseTime(scope.row.quotQuotationDate) }}</span> <span>{{ parseTime(scope.row.quotQuotationDate) }}</span>
</template> </template>
</el-table-column> </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="createName" width="150px"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="160"> <el-table-column label="创建时间" align="center" prop="createTime" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" width="160" />
</el-table> </el-table>
</div> </div>
</template> </template>
@ -107,7 +109,7 @@ export default {
// //
quotList: [], quotList: [],
// //
tableHeight: window.innerHeight - 240, // tableHeight: window.innerHeight - 280, //
screenHeight: window.innerHeight, // screenHeight: window.innerHeight, //
// //
queryParams: { queryParams: {
@ -151,15 +153,19 @@ export default {
}, },
// //
sumQuotTotalPrice() { 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); return toDecimal(quotTotalPrice);
}, },
//
sumQuotCount() {
return this.quotList.length;
}
}, },
watch: { watch: {
// screenHeighttable // screenHeighttable
screenHeight(val) { screenHeight(val) {
this.screenHeight = val this.screenHeight = val
this.tableHeight = this.screenHeight - 260 this.tableHeight = this.screenHeight - 280
} }
}, },
mounted: function() { mounted: function() {