Browse Source

[feat]

销售管理 销售订单
修改添加销售订单页面报价币种字段为币种;
新增选择币种下拉框监听函数,选择美元时将美元汇率模块附加到其后;
修改美元汇率模块附加方法,使其与其他表单元素成为同级关系;
修改选择币种下拉框监听函数,新增rmb汇率联动加载方法;
修改币种标签样式为必填;
dev
王晓迪 4 months ago
parent
commit
d11dcc7783
  1. 61
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

61
ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

@ -172,8 +172,8 @@
<input name="orderReceivingMode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报价币种:</label>
<div class="form-group" id = "commonCurrency">
<label class="col-sm-3 control-label is-required">币种:</label>
<div class="col-sm-8">
<select class="form-control" id="commonCurrency_add" name="commonCurrency" th:with="dictList=${@dict.getType('sys_common_currency')}" required>
<option value="">请选择</option>
@ -181,12 +181,6 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">美元汇率:</label>
<div class="col-sm-8">
<input id="usdTax_add" name="usdTax" class="form-control" type="number" required />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否含税:</label>
<div class="col-sm-8">
@ -197,16 +191,7 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">税率:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="taxRate" id="taxRate_add" class="form-control" type="number" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否开票:</label>
<div class="col-sm-8">
@ -618,6 +603,48 @@
}
});
// 选择币种
$("#commonCurrency_add").on('change', function() {
var selectedValue = $(this).val();
if(selectedValue ==="1"){
if($('#usdTax').length!=0){
$('#usdTax').remove();
}
if($('#rmbTax').length!=0){
$('#rmbTax').remove();
}
var $taxArea = $(
'<div class="form-group" id="rmbTax">\n' +
' <label class="col-sm-3 control-label is-required">税率:</label>\n' +
' <div class="col-sm-8">\n' +
' <div class="input-group">\n' +
' <input name="taxRate" id="taxRate_add" class="form-control" type="number" required>\n' +
' <span class="input-group-addon">%</span>\n' +
' </div>\n' +
' </div>\n' +
'</div>'
);
$('#commonCurrency').after($taxArea);
}else if(selectedValue ==="2"){
if($('#usdTax').length!=0){
$('#usdTax').remove();
}
if($('#rmbTax').length!=0){
$('#rmbTax').remove();
}
var $taxArea = $(
'<div class="form-group" id="usdTax">' +
'<label class="col-sm-3 control-label is-required">美元汇率:</label>' +
'<div class="col-sm-8">' +
'<input id="usdTax_add" name="usdTax" class="form-control" type="number" required/>' +
'</div>' +
'</div>'
);
$('#commonCurrency').after($taxArea);
}
});
$('#enterpriseCode').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='enterpriseName']").val(data.enterpriseName);

Loading…
Cancel
Save