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.setNoRmbSum(new BigDecimal(sysMakeOrder.getNoRate()));
purchasePlan.setRmbSum(new BigDecimal(sysMakeOrder.getRate()));
purchasePlan.setNoRmbSum(sysMakeOrder.getNoRate());
purchasePlan.setRmbSum(sysMakeOrder.getRate());
purchasePlan.setApplyUser(sysMakeOrder.getSalesman());
purchasePlan.setCreateBy(ShiroUtils.getLoginName());
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.ToStringStyle;
import java.math.BigDecimal;
/**
* 生产订单对象 sys_makeorder
*
@ -78,11 +80,11 @@ public class SysMakeOrder extends BaseEntity
/** 不含税生产成本(RMB) */
@Excel(name = "不含税生产成本(RMB)")
private Long noRate;
private BigDecimal noRate;
/** 含税生产成本(RMB) */
@Excel(name = "含税生产成本(RMB)")
private Long rate;
private BigDecimal rate;
/** 使用状态 */
private String delFlag;
@ -236,24 +238,23 @@ public class SysMakeOrder extends BaseEntity
{
return eceiptNum;
}
public void setNoRate(Long noRate)
{
this.noRate = noRate;
}
public Long getNoRate()
{
public BigDecimal getNoRate() {
return noRate;
}
public void setRate(Long rate)
{
this.rate = rate;
public void setNoRate(BigDecimal noRate) {
this.noRate = noRate;
}
public Long getRate()
{
public BigDecimal getRate() {
return rate;
}
public void setRate(BigDecimal rate) {
this.rate = rate;
}
public void setDelFlag(String 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="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="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="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>

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

@ -155,7 +155,10 @@
<div class="form-group">
<label class="col-sm-6 control-label is-required" id="taxLable">国内税率:</label>
<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 class="form-group">

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

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

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

@ -57,13 +57,23 @@
</div>
<div class="form-group">
<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 type="radio" th:id="${dict.dictCode}" name="confirmFax" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<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">-->
<!-- <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">
<label class="col-sm-4 control-label">国内税率:</label>
<div class="col-sm-8">
@ -190,7 +200,7 @@
// 根据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="confirmFax"][value="' + data.data.confirmTax + '"]').attr('checked', 'checked');
$('input:radio[name="confirmTax"][value="' + data.data.confirmTax + '"]').attr('checked', "checked");
} else {
// 如果返回的值不是预期的0或1,可处理异常情况
console.warn("Unexpected confirmTax value:", data.data.confirmTax);
@ -327,20 +337,20 @@
}
},
{ title: '最新报价',field: 'materialSole',
editable: {
type: 'number',
mode: 'inline',
title: '对外售价',
validate: function (value) {
if (!value) {
return '对外售价不能为空';
}
if (isNaN(value)) {
return '对外售价必须为数字';
}
}
}
{ title: '最新报价',field: 'materialSole',align: 'center',
// editable: {
// type: 'number',
// mode: 'inline',
// title: '对外售价',
// validate: function (value) {
// if (!value) {
// return '对外售价不能为空';
// }
// if (isNaN(value)) {
// return '对外售价必须为数字';
// }
// }
// }
},
{title: '国内税率',field: 'countTax',align: 'center',},
@ -544,6 +554,29 @@
// getBusinessMembers();
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(){
//获取单号
$.ajax({

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

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

Loading…
Cancel
Save