Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
zhangsiqi 3 months ago
parent
commit
fe5e744240
  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. 54
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  6. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html
  7. 14
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html
  8. 6
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html
  9. 14
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwzgVerify.html
  10. 6
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html

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

@ -152,7 +152,6 @@ public class SysCustomerQuoteController extends BaseController
@ResponseBody
public AjaxResult addSave(@RequestBody SysCustomerQuote sysCustomerQuote)
{
System.out.println("SysCustomerQuoteController.addSave:" + sysCustomerQuote.toString());
sysCustomerQuote.setAuditStatus("0");
sysCustomerQuote.setUseStatus("0");
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 = "报价币种")
private String commonCurrency;
/*是否含税*/
private String confirmFax;
private String confirmTax;
/** 国内汇率 */
@Excel(name = "国内汇率")
private BigDecimal rmbTax;
@ -107,12 +107,13 @@ public class SysCustomerQuote extends BaseEntity
private String restoreInstanceId;
private List<SysCustomerQuoteChild> sysCustomerQuoteChildList;
public String getConfirmFax() {
return confirmFax;
public String getConfirmTax() {
return confirmTax;
}
public void setConfirmFax(String confirmFax) {
this.confirmFax = confirmFax;
public void setConfirmTax(String confirmTax) {
this.confirmTax = confirmTax;
}
public String getAuditStatus() {
@ -390,7 +391,7 @@ public class SysCustomerQuote extends BaseEntity
.append("enterpriseSum", getEnterpriseSum())
.append("commonCurrency", getCommonCurrency())
.append("usdTax", getUsdTax())
.append("confirmFax", getConfirmFax())
.append("confirmTax", getConfirmTax())
.append("noRmbSum", getNoRmbSum())
.append("rmbTax", getRmbTax())
.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){
insertSysCustomerQuote(sysCustomerQuote);
}
System.out.println("sysCustomerQuote:"+sysCustomerQuote);
// 启动流程
String applyTitle = user.getUserName()+"发起了客户报价信息提交审批-"+DateUtils.dateTimeNow();
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="enterpriseSum" column="enterpriseSum" />
<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="usdTax" column="usdTax" />
<result property="noRmb" column="noRmb" />
@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectSysCustomerQuoteVo">
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,
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
@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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,
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.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,
@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterprise != null and enterprise != ''" >enterprise,</if>
<if test="enterpriseSum != null">enterpriseSum,</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="usdTax != null">usdTax,</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="enterpriseSum != null">#{enterpriseSum},</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="usdTax != null ">#{usdTax},</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="enterpriseSum != null" >enterpriseSum = #{enterpriseSum},</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="usdTax != null ">usdTax = #{usdTax},</if>
<if test="noRmb != null " >noRmb = #{noRmb},</if>

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

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

@ -72,7 +72,7 @@
</a>
</div>
<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>

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

@ -88,9 +88,9 @@
<label class="col-sm-4 control-label is-required">是否含税:</label>
<div class="col-sm-8">
<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}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
<input required type="radio" th:id="${'confirmTax_' + dict.dictCode}"
name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
@ -192,11 +192,11 @@
var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val();
var businessMembers = [[${formData.businessMembers}]];
var confirmFax = $("input[name='confirmFax']");
var confirmTax = $("input[name='confirmTax']");
$("#form-customerQuote-modify").validate({ focusCleanup: true});
confirmFax.val([sysCustomerQuote.confirmFax]);
confirmFax.change(function () {
if ($("input[name='confirmFax']").val() == "1") {
confirmTax.val([sysCustomerQuote.confirmTax]);
confirmTax.change(function () {
if ($("input[name='confirmTax']").val() == "1") {
$("input[name='rmbTax']").val(sysCustomerQuote.taxRate);
} else {
$("input[name='rmbTax']").val(0);

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

@ -83,9 +83,9 @@
<label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6">
<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}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
<input required type="radio" th:id="${'confirmTax_' + dict.dictCode}"
name="confirmTax" th:value="${dict.dictValue}" th:field="*{confirmTax}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>

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

@ -84,9 +84,9 @@
<label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6">
<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}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
<input required type="radio" th:id="${'confirmTax_' + dict.dictCode}"
name="confirmTax" th:value="${dict.dictValue}" th:field="*{confirmTax}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
@ -207,11 +207,11 @@
}
}
});
var confirmFax = $("input[name='confirmFax']");
confirmFax.val([sysCustomerQuote.confirmFax]);
var confirmTax = $("input[name='confirmTax']");
confirmTax.val([sysCustomerQuote.confirmTax]);
$("input[name='rmbTax']").val([sysCustomerQuote.taxRate]);
confirmFax.change(function () {
if ($("input[name='confirmFax']").val() == "1") {
confirmTax.change(function () {
if ($("input[name='confirmTax']").val() == "1") {
$("input[name='rmbTax']").val(sysCustomerQuote.taxRate);
} else {
$("input[name='rmbTax']").val(0);

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

@ -86,9 +86,9 @@
<label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmFax_' + dict.dictCode}" th:field="*{confirmFax}"
name="confirmFax" th:value="${dict.dictValue}" required>
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" th:field="*{confirmTax}"
name="confirmTax" th:value="${dict.dictValue}" required>
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>

Loading…
Cancel
Save