|
|
@ -26,15 +26,14 @@ |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-4 control-label">客户编号:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<select class="form-control" name="customerCode" required> |
|
|
|
<select class="form-control" name="customerCode" id="customerCode" required> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-4 control-label">客户名称:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="customerName" class="form-control m-b" type="text" readonly /> |
|
|
|
|
|
|
|
<input name="customerName" id="customerName" class="form-control m-b" type="text"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
@ -163,6 +162,7 @@ |
|
|
|
var prefix = ctx + "sales/salesEstimate" |
|
|
|
var userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|
|
|
$("#form-salesEstimate-add").validate({focusCleanup: true}); |
|
|
|
var customerList =[[${customerList}]]; |
|
|
|
//获取客户信息 |
|
|
|
$(function(){ |
|
|
|
$("select[name='customerCode']").select2({ |
|
|
@ -177,8 +177,8 @@ |
|
|
|
cache:true, |
|
|
|
processResults: function (res, params) { |
|
|
|
var resultList = res.rows; |
|
|
|
console.log("传输的数值"); |
|
|
|
console.log(resultList); |
|
|
|
// console.log("传输的数值"); |
|
|
|
// console.log(resultList); |
|
|
|
var options = []; |
|
|
|
for(var i= 0, len=resultList.length;i<len;i++){ |
|
|
|
var option = resultList[i]; |
|
|
@ -199,6 +199,7 @@ |
|
|
|
}) |
|
|
|
$('#customerCode').on('select2:select', function (e) { |
|
|
|
var data = e.params.data; |
|
|
|
// console.log(data); |
|
|
|
$("input[name='customerName']").val(data.enterpriseName); |
|
|
|
$("select[name='commonCurrency']").val(data.commonCurrency).trigger('change'); |
|
|
|
$("input[name='rmbTax']").val(data.taxRate); |
|
|
|