Browse Source

[fix] 客户报告

客户报价新增页面引入datetimepicker-css样式;
修改是否含税的组件样式;修复初始化选择客户订单号的时候,自动选择是否含税单选按钮;修复当选择不同币种的时候,自动选择是否含税单选按钮;物料子表table去掉多余组件
修改客户报价数据库、实体类、mapper.xml文件的是否含税前后不一致导致前端传递不了值的问题
去掉客户报价新增多余打印控制台代码
dev
liuxiaoxu 3 months ago
parent
commit
f4cd1cc810
  1. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java
  2. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java
  4. 12
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml
  5. 56
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  6. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

1
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java

@ -152,7 +152,6 @@ public class SysCustomerQuoteController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(@RequestBody SysCustomerQuote sysCustomerQuote) public AjaxResult addSave(@RequestBody SysCustomerQuote sysCustomerQuote)
{ {
System.out.println("SysCustomerQuoteController.addSave:" + sysCustomerQuote.toString());
sysCustomerQuote.setAuditStatus("0"); sysCustomerQuote.setAuditStatus("0");
sysCustomerQuote.setUseStatus("0"); sysCustomerQuote.setUseStatus("0");
sysCustomerQuoteService.submitApply(sysCustomerQuote); sysCustomerQuoteService.submitApply(sysCustomerQuote);

13
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java

@ -52,7 +52,7 @@ public class SysCustomerQuote extends BaseEntity
@Excel(name = "报价币种") @Excel(name = "报价币种")
private String commonCurrency; private String commonCurrency;
/*是否含税*/ /*是否含税*/
private String confirmFax; private String confirmTax;
/** 国内汇率 */ /** 国内汇率 */
@Excel(name = "国内汇率") @Excel(name = "国内汇率")
private BigDecimal rmbTax; private BigDecimal rmbTax;
@ -107,12 +107,13 @@ public class SysCustomerQuote extends BaseEntity
private String restoreInstanceId; private String restoreInstanceId;
private List<SysCustomerQuoteChild> sysCustomerQuoteChildList; private List<SysCustomerQuoteChild> sysCustomerQuoteChildList;
public String getConfirmFax() {
return confirmFax; public String getConfirmTax() {
return confirmTax;
} }
public void setConfirmFax(String confirmFax) { public void setConfirmTax(String confirmTax) {
this.confirmFax = confirmFax; this.confirmTax = confirmTax;
} }
public String getAuditStatus() { public String getAuditStatus() {
@ -390,7 +391,7 @@ public class SysCustomerQuote extends BaseEntity
.append("enterpriseSum", getEnterpriseSum()) .append("enterpriseSum", getEnterpriseSum())
.append("commonCurrency", getCommonCurrency()) .append("commonCurrency", getCommonCurrency())
.append("usdTax", getUsdTax()) .append("usdTax", getUsdTax())
.append("confirmFax", getConfirmFax()) .append("confirmTax", getConfirmTax())
.append("noRmbSum", getNoRmbSum()) .append("noRmbSum", getNoRmbSum())
.append("rmbTax", getRmbTax()) .append("rmbTax", getRmbTax())
.append("rmbSum", getRmbSum()) .append("rmbSum", getRmbSum())

1
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java

@ -300,7 +300,6 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
if(sysCustomerQuote.getId()==null){ if(sysCustomerQuote.getId()==null){
insertSysCustomerQuote(sysCustomerQuote); insertSysCustomerQuote(sysCustomerQuote);
} }
System.out.println("sysCustomerQuote:"+sysCustomerQuote);
// 启动流程 // 启动流程
String applyTitle = user.getUserName()+"发起了客户报价信息提交审批-"+DateUtils.dateTimeNow(); String applyTitle = user.getUserName()+"发起了客户报价信息提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit"; String instanceType = "submit";

12
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml

@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="enterprise" column="enterprise" /> <result property="enterprise" column="enterprise" />
<result property="enterpriseSum" column="enterpriseSum" /> <result property="enterpriseSum" column="enterpriseSum" />
<result property="commonCurrency" column="common_currency" /> <result property="commonCurrency" column="common_currency" />
<result property="confirmFax" column="confirm_fax" /> <result property="confirmTax" column="confirm_tax" />
<result property="rmbTax" column="rmbTax" /> <result property="rmbTax" column="rmbTax" />
<result property="usdTax" column="usdTax" /> <result property="usdTax" column="usdTax" />
<result property="noRmb" column="noRmb" /> <result property="noRmb" column="noRmb" />
@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectSysCustomerQuoteVo"> <sql id="selectSysCustomerQuoteVo">
select id,supplierCode,customerCode,customerName,pricingDate,enterprise,enterpriseSum,common_currency, select id,supplierCode,customerCode,customerName,pricingDate,enterprise,enterpriseSum,common_currency,
confirm_fax,rmbTax,usdTax,noRmb,noRmbSum,rmb,rmbSum,noUsd,noUsdSum,usd,usdSum,business_members, confirm_tax,rmbTax,usdTax,noRmb,noRmbSum,rmb,rmbSum,noUsd,noUsdSum,usd,usdSum,business_members,
degin_flag,del_flag,create_by,create_time,update_by,update_time,remark,audit_status,use_status, degin_flag,del_flag,create_by,create_time,update_by,update_time,remark,audit_status,use_status,
instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id,apply_title,apply_user,apply_time,del_flag instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id,apply_title,apply_user,apply_time,del_flag
from sys_customer_quote from sys_customer_quote
@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSysCustomerQuoteList" parameterType="SysCustomerQuoteVo" resultMap="SysCustomerQuoteResult"> <select id="selectSysCustomerQuoteList" parameterType="SysCustomerQuoteVo" resultMap="SysCustomerQuoteResult">
select s.id,s.supplierCode,s.customerCode,s.customerName,s.pricingDate,s.enterprise,s.enterpriseSum,s.common_currency, select s.id,s.supplierCode,s.customerCode,s.customerName,s.pricingDate,s.enterprise,s.enterpriseSum,s.common_currency,
s.confirm_fax,s.rmbTax,s.usdTax,s.noRmb,s.noRmbSum,s.rmb,s.rmbSum,s.noUsd,s.noUsdSum,s.usd,s.usdSum,s.business_members, s.confirm_tax,s.rmbTax,s.usdTax,s.noRmb,s.noRmbSum,s.rmb,s.rmbSum,s.noUsd,s.noUsdSum,s.usd,s.usdSum,s.business_members,
s.degin_flag,s.del_flag,s.create_by,s.create_time,s.update_by,s.update_time,s.remark, s.degin_flag,s.del_flag,s.create_by,s.create_time,s.update_by,s.update_time,s.remark,
s.audit_status,s.use_status,s.instance_id,s.instance_type, s.audit_status,s.use_status,s.instance_id,s.instance_type,
s.submit_instance_id,s.cancel_instance_id,s.restore_instance_id,s.apply_time,s.apply_user,s.apply_title, s.submit_instance_id,s.cancel_instance_id,s.restore_instance_id,s.apply_time,s.apply_user,s.apply_title,
@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterprise != null and enterprise != ''" >enterprise,</if> <if test="enterprise != null and enterprise != ''" >enterprise,</if>
<if test="enterpriseSum != null">enterpriseSum,</if> <if test="enterpriseSum != null">enterpriseSum,</if>
<if test="commonCurrency !=null and commonCurrency != ''" >common_currency,</if> <if test="commonCurrency !=null and commonCurrency != ''" >common_currency,</if>
<if test="confirmFax != null and confirmFax != ''" >confirm_fax,</if> <if test="confirmTax != null and confirmTax != ''" >confirm_tax,</if>
<if test="rmbTax != null" >rmbTax,</if> <if test="rmbTax != null" >rmbTax,</if>
<if test="usdTax != null">usdTax,</if> <if test="usdTax != null">usdTax,</if>
<if test="noRmb != null " >noRmb,</if> <if test="noRmb != null " >noRmb,</if>
@ -154,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterprise != null and enterprise != ''" >#{enterprise},</if> <if test="enterprise != null and enterprise != ''" >#{enterprise},</if>
<if test="enterpriseSum != null">#{enterpriseSum},</if> <if test="enterpriseSum != null">#{enterpriseSum},</if>
<if test="commonCurrency !=null and commonCurrency != ''" >#{commonCurrency},</if> <if test="commonCurrency !=null and commonCurrency != ''" >#{commonCurrency},</if>
<if test="confirmFax != null and confirmFax != ''" >#{confirmFax},</if> <if test="confirmTax != null and confirmTax != ''" >#{confirmTax},</if>
<if test="rmbTax != null" >#{rmbTax},</if> <if test="rmbTax != null" >#{rmbTax},</if>
<if test="usdTax != null ">#{usdTax},</if> <if test="usdTax != null ">#{usdTax},</if>
<if test="noRmb != null" >#{noRmb},</if> <if test="noRmb != null" >#{noRmb},</if>
@ -195,7 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterprise != null and enterprise != ''" >enterprise = #{enterprise},</if> <if test="enterprise != null and enterprise != ''" >enterprise = #{enterprise},</if>
<if test="enterpriseSum != null" >enterpriseSum = #{enterpriseSum},</if> <if test="enterpriseSum != null" >enterpriseSum = #{enterpriseSum},</if>
<if test="commonCurrency !=null and commonCurrency != ''" >common_currency = #{commonCurrency},</if> <if test="commonCurrency !=null and commonCurrency != ''" >common_currency = #{commonCurrency},</if>
<if test="confirmFax != null and confirmFax != ''" >confirm_fax = #{confirmFax},</if> <if test="confirmTax != null and confirmTax != ''" >confirm_tax = #{confirmTax},</if>
<if test="rmbTax != null" >rmbTax = #{rmbTax},</if> <if test="rmbTax != null" >rmbTax = #{rmbTax},</if>
<if test="usdTax != null ">usdTax = #{usdTax},</if> <if test="usdTax != null ">usdTax = #{usdTax},</if>
<if test="noRmb != null " >noRmb = #{noRmb},</if> <if test="noRmb != null " >noRmb = #{noRmb},</if>

56
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -4,6 +4,7 @@
<th:block th:include="include :: header('新增客户报价')" /> <th:block th:include="include :: header('新增客户报价')" />
<th:block th:include="include :: select2-css" /> <th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-css" /> <th:block th:include="include :: bootstrap-editable-css" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> <link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> <link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</head> </head>
@ -40,7 +41,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">报价币种:</label> <label class="col-sm-4 control-label">报价币种:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" id="commonCurrency_add" name="commonCurrency" th:with="dictList=${@dict.getType('sys_common_currency')}" required> <select class="form-control" id="commonCurrency_add" name="commonCurrency" th:with="dictList=${@dict.getType('sys_common_currency')}" required>
@ -55,14 +56,30 @@
<input name="usdTax" id="usdTax_add" class="form-control" type="number" placeholder="美元对人民币汇率" required> <input name="usdTax" id="usdTax_add" class="form-control" type="number" placeholder="美元对人民币汇率" required>
</div> </div>
</div> </div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-4 control-label is-required">是否含税:</label>-->
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">-->
<!-- <input required type="radio" th:id="${'confirmFax_' + dict.dictCode}"-->
<!-- name="confirmFax" th:value="${dict.dictValue}" >-->
<!-- <label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">是否含税:</label> <label class="col-sm-4 control-label is-required">是否含税:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="col-sm-8">
<input required type="radio" th:id="${'confirmFax_' + dict.dictCode}" <!-- 报价币种单选按钮 -->
name="confirmFax" th:value="${dict.dictValue}" > <div class="radio-inline">
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label><input type="radio" name="confirmTax" value="0">不含税</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="confirmTax" value="1">含税</label>
</div>
</div> </div>
</div> </div>
<!-- <div class="form-group">--> <!-- <div class="form-group">-->
<!-- <label class="col-sm-4 control-label is-required">是否含税:</label>--> <!-- <label class="col-sm-4 control-label is-required">是否含税:</label>-->
<!-- <div class="radio-box">--> <!-- <div class="radio-box">-->
@ -198,13 +215,20 @@
$('input[name="customerName"]').val(data.data.customerName); $('input[name="customerName"]').val(data.data.customerName);
$("input[name='rmbTax']").val(data.data.taxRate); $("input[name='rmbTax']").val(data.data.taxRate);
// 根据data.data.confirmTax的值(0或1)来选中对应的单选按钮 // 根据data.data.confirmTax的值(0或1)来选中对应的单选按钮
if(data.data.confirmTax === '0' || data.data.confirmTax === '1') { // if(data.data.confirmTax === '0' || data.data.confirmTax === '1') {
console.log("data.data.confirmTax:",data.data.confirmTax) // console.log("data.data.confirmTax:",data.data.confirmTax)
$('input:radio[name="confirmTax"][value="' + data.data.confirmTax + '"]').attr('checked', "checked"); // $('input:radio[name="confirmTax"][value="' + data.data.confirmTax + '"]').attr('checked', "checked");
} else { // } else {
// 如果返回的值不是预期的0或1,可处理异常情况 // // 如果返回的值不是预期的0或1,可处理异常情况
console.warn("Unexpected confirmTax value:", data.data.confirmTax); // console.warn("Unexpected confirmTax value:", data.data.confirmTax);
// }
if (data.data.commonCurrency == '1'){
$('input:radio[name="confirmTax"][value="1"]').prop('checked', true);
}else {
$('input:radio[name="confirmTax"][value="0"]').prop('checked', true);
} }
$("#commonCurrency_add").val(data.data.commonCurrency).trigger('change'); $("#commonCurrency_add").val(data.data.commonCurrency).trigger('change');
commonCurrency = $("#commonCurrency_add option:selected").val(); commonCurrency = $("#commonCurrency_add option:selected").val();
}, },
@ -281,7 +305,11 @@
var options = { var options = {
id:'bootstrap-sub-table-quoteChild', id:'bootstrap-sub-table-quoteChild',
// url: ctx + "system/quoteChild/list", // url: ctx + "system/quoteChild/list",
showColumns: false,
pagination: false, pagination: false,
showToggle: false,
showRefresh:false,
showSearch:false,
sidePagination: "client", sidePagination: "client",
model: "物料报价信息", model: "物料报价信息",
columns: [ columns: [
@ -554,6 +582,8 @@
// getBusinessMembers(); // getBusinessMembers();
getCustomerCode(); getCustomerCode();
}); });
//监听币种的变化
$(document).ready(function() { $(document).ready(function() {
$("#commonCurrency_add").on('change', function() { $("#commonCurrency_add").on('change', function() {
var selectedValue = $(this).val(); var selectedValue = $(this).val();
@ -563,13 +593,13 @@
if(selectedValue ==="1"){ if(selectedValue ==="1"){
console.log("1:"+selectedValue); console.log("1:"+selectedValue);
$radioNo.removeAttr('checked'); $radioNo.removeAttr('checked');
$radioTax.attr('checked','checked'); $radioTax.prop('checked','checked');
// $("input[name='confirmFax']").val(1); // $("input[name='confirmFax']").val(1);
console.log($radioTax.prop('checked')); console.log($radioTax.prop('checked'));
}else if(selectedValue ==="2"){ }else if(selectedValue ==="2"){
console.log("2:"+selectedValue); console.log("2:"+selectedValue);
$radioTax.prop('checked',false); $radioTax.removeAttr('checked',false);
$radioNo.prop('checked',true); $radioNo.prop('checked',true);
// $radioTax.removeAttr('checked'); // $radioTax.removeAttr('checked');
// $radioNo.attr('checked','checked'); // $radioNo.attr('checked','checked');

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

@ -72,7 +72,7 @@
</a> </a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table" style="white-space:nowrap"></table>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save