|
|
@ -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 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">--> |
|
|
|
<!-- <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({ |
|
|
|