Browse Source

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

dev
zhangsiqi 3 weeks ago
parent
commit
ffa55488d7
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java
  2. 27
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeOrder.java
  3. 2
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  4. 5
      ruoyi-admin/src/main/resources/templates/system/customer/add.html
  5. 2
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html
  6. 75
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  7. 4
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html

4
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java

@ -423,8 +423,8 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService
//添加数量合计 //添加数量合计
purchasePlan.setMaterialSum((long) purchasePlanMaterialSum); purchasePlan.setMaterialSum((long) purchasePlanMaterialSum);
purchasePlan.setNoRmbSum(new BigDecimal(sysMakeOrder.getNoRate())); purchasePlan.setNoRmbSum(sysMakeOrder.getNoRate());
purchasePlan.setRmbSum(new BigDecimal(sysMakeOrder.getRate())); purchasePlan.setRmbSum(sysMakeOrder.getRate());
purchasePlan.setApplyUser(sysMakeOrder.getSalesman()); purchasePlan.setApplyUser(sysMakeOrder.getSalesman());
purchasePlan.setCreateBy(ShiroUtils.getLoginName()); purchasePlan.setCreateBy(ShiroUtils.getLoginName());
purchasePlan.setCreateTime(DateUtils.getNowDate()); purchasePlan.setCreateTime(DateUtils.getNowDate());

27
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeOrder.java

@ -5,6 +5,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
/** /**
* 生产订单对象 sys_makeorder * 生产订单对象 sys_makeorder
* *
@ -78,11 +80,11 @@ public class SysMakeOrder extends BaseEntity
/** 不含税生产成本(RMB) */ /** 不含税生产成本(RMB) */
@Excel(name = "不含税生产成本(RMB)") @Excel(name = "不含税生产成本(RMB)")
private Long noRate; private BigDecimal noRate;
/** 含税生产成本(RMB) */ /** 含税生产成本(RMB) */
@Excel(name = "含税生产成本(RMB)") @Excel(name = "含税生产成本(RMB)")
private Long rate; private BigDecimal rate;
/** 使用状态 */ /** 使用状态 */
private String delFlag; private String delFlag;
@ -236,24 +238,23 @@ public class SysMakeOrder extends BaseEntity
{ {
return eceiptNum; return eceiptNum;
} }
public void setNoRate(Long noRate)
{
this.noRate = noRate;
}
public Long getNoRate() public BigDecimal getNoRate() {
{
return noRate; return noRate;
} }
public void setRate(Long rate)
{ public void setNoRate(BigDecimal noRate) {
this.rate = rate; this.noRate = noRate;
} }
public Long getRate() public BigDecimal getRate() {
{
return rate; return rate;
} }
public void setRate(BigDecimal rate) {
this.rate = rate;
}
public void setDelFlag(String delFlag) public void setDelFlag(String delFlag)
{ {
this.delFlag = delFlag; this.delFlag = delFlag;

2
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseCode != null and enterpriseCode != ''"> and s.enterprise_code like concat('%', #{enterpriseCode}, '%')</if> <if test="enterpriseCode != null and enterpriseCode != ''"> and s.enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and s.enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''"> and s.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="customerPurser != null and customerPurser != ''"> and s.customer_purser like concat('%', #{customerPurser}, '%')</if> <if test="customerPurser != null and customerPurser != ''"> and s.customer_purser like concat('%', #{customerPurser}, '%')</if>
<if test="customerAbbreviation != null and customerAbbreviation != ''"> and s.customer_abbreviation like concat('%', #{customer_abbreviation}, '%')</if> <if test="customerAbbreviation != null and customerAbbreviation != ''"> and s.customer_abbreviation like concat('%', #{customerAbbreviation}, '%')</if>
<if test="deliveryAddress != null and deliveryAddress != ''"> and s.delivery_address like concat('%', #{deliveryAddress}, '%')</if> <if test="deliveryAddress != null and deliveryAddress != ''"> and s.delivery_address like concat('%', #{deliveryAddress}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="customerSign != null and customerSign != ''"> and s.customer_sign = #{customerSign}</if> <if test="customerSign != null and customerSign != ''"> and s.customer_sign = #{customerSign}</if>

5
ruoyi-admin/src/main/resources/templates/system/customer/add.html

@ -155,7 +155,10 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required" id="taxLable">国内税率:</label> <label class="col-sm-6 control-label is-required" id="taxLable">国内税率:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="taxRate" class="form-control" placeholder="%" type="text" required/> <div class="input-group">
<input name="taxRate" class="form-control" type="text" required/>
<span class="input-group-addon">%<i class="fa fa-percentage"></i></span>
</div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

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

@ -418,6 +418,7 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
modalName: "客户基本信息", modalName: "客户基本信息",
fixedColumns:true, fixedColumns:true,
sortable: true,//开启排序
fixedRightNumber:1, fixedRightNumber:1,
columns: [ columns: [
{checkbox: true}, {checkbox: true},
@ -504,6 +505,7 @@
{title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false}, {title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false},
{title: '客户标识',field:'customerSign'}, {title: '客户标识',field:'customerSign'},
{title: '录入时间',field: 'createTime', {title: '录入时间',field: 'createTime',
sortable: true,
formatter: function (value, row, index) { formatter: function (value, row, index) {
if (value == null) {return " ";} else { return value;} if (value == null) {return " ";} else { return value;}
} }

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

@ -57,13 +57,23 @@
</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="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input type="radio" th:id="${dict.dictCode}" name="confirmFax" th:value="${dict.dictValue}" th:checked="${dict.default}"> <input required type="radio" th:id="${'confirmFax_' + dict.dictCode}"
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label> name="confirmFax" th:value="${dict.dictValue}" >
</div> <label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-4 control-label is-required">是否含税:</label>-->
<!-- <div class="radio-box">-->
<!-- <input required type="radio" id="confirmTax_yes" name="confirmTax" value="0">-->
<!-- <label for="confirmTax_yes">含税</label>-->
<!-- </div>-->
<!-- <div class="radio-box">-->
<!-- <input required type="radio" id="confirmTax_no" name="confirmTax" value="1">-->
<!-- <label for="confirmTax_no">不含税</label>-->
<!-- </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">
@ -190,7 +200,7 @@
// 根据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="confirmFax"][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);
@ -327,20 +337,20 @@
} }
}, },
{ title: '最新报价',field: 'materialSole', { title: '最新报价',field: 'materialSole',align: 'center',
editable: { // editable: {
type: 'number', // type: 'number',
mode: 'inline', // mode: 'inline',
title: '对外售价', // title: '对外售价',
validate: function (value) { // validate: function (value) {
if (!value) { // if (!value) {
return '对外售价不能为空'; // return '对外售价不能为空';
} // }
if (isNaN(value)) { // if (isNaN(value)) {
return '对外售价必须为数字'; // return '对外售价必须为数字';
} // }
} // }
} // }
}, },
{title: '国内税率',field: 'countTax',align: 'center',}, {title: '国内税率',field: 'countTax',align: 'center',},
@ -544,6 +554,29 @@
// getBusinessMembers(); // getBusinessMembers();
getCustomerCode(); getCustomerCode();
}); });
$(document).ready(function() {
$("#commonCurrency_add").on('change', function() {
var selectedValue = $(this).val();
var $radioTax = $('input:radio[name="confirmTax"][value="1"]');
var $radioNo = $('input:radio[name="confirmTax"][value="0"]');
// 设置含税单选按钮选中
if(selectedValue ==="1"){
console.log("1:"+selectedValue);
$radioNo.removeAttr('checked');
$radioTax.attr('checked','checked');
// $("input[name='confirmFax']").val(1);
console.log($radioTax.prop('checked'));
}else if(selectedValue ==="2"){
console.log("2:"+selectedValue);
$radioTax.prop('checked',false);
$radioNo.prop('checked',true);
// $radioTax.removeAttr('checked');
// $radioNo.attr('checked','checked');
console.log($radioNo.prop('checked'));
}
});
});
function getCustomerCode(){ function getCustomerCode(){
//获取单号 //获取单号
$.ajax({ $.ajax({

4
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html

@ -65,7 +65,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>
@ -107,6 +107,8 @@
createUrl: prefix + "/add", createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
fixedColumns:true,
fixedRightNumber:1,
modalName: "仓库入库单", modalName: "仓库入库单",
columns: [{ columns: [{
checkbox: true checkbox: true

Loading…
Cancel
Save