预算分隔符
parent
5fc40bcb2f
commit
d0f43cb4a1
src/main/resources
|
@ -459,6 +459,8 @@ function bindChangeableInput() {
|
|||
|
||||
$(this).parent().parent().find(".input-changeable-total-tax-include").val(f2Fixed(amount * price));
|
||||
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(amount * price / (1 + taxRate / 100)));
|
||||
$(this).val(f2Fixed(price));
|
||||
console.log("单价:" + $(this).val());
|
||||
});
|
||||
//税率改变
|
||||
$(".input-changeable-tax-rate").change(function () {
|
||||
|
|
|
@ -187,8 +187,8 @@ function appendTrCost() {
|
|||
'</td>'+
|
||||
'<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost"></td>'+
|
||||
'<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost""></td>'+
|
||||
'<td><input type="text" min="0" max="99999999" step="1" maxlength="8" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-amount"></td>'+
|
||||
'<td><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="13" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-price"></td>'+
|
||||
'<td><input type="number" min="0" max="99999999" step="1" maxlength="8" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-amount"></td>'+
|
||||
'<td><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="16" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-price"></td>'+
|
||||
'<td><input type="text" min="0.00" max="99.99" step="0.01" maxlength="5" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate"></td>'+
|
||||
'<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-include" readonly></td>'+
|
||||
'<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-exclude" readonly></td>'+
|
||||
|
|
|
@ -118,8 +118,8 @@ function appendTrCostProjectManage() {
|
|||
' </td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage"></td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage"></td>\n' +
|
||||
' <td><input type="text" min="0" max="99999999" step="1" maxlength="8" class="number am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-amount-project-manage"></td>\n' +
|
||||
' <td><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="13" class="number am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-price-project-manage"></td>\n' +
|
||||
' <td><input type="number" min="0" max="99999999" step="1" maxlength="8" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-amount-project-manage"></td>\n' +
|
||||
' <td><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="16" class="number am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-price-project-manage"></td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-total-project-manage" readonly></td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage"></td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage"></td>\n' +
|
||||
|
|
|
@ -136,8 +136,8 @@ function appendTrIncome() {
|
|||
' </td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income"></td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income"></td>\n' +
|
||||
' <td><input type="text" min="0" max="99999999" step="1" maxlength="8" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount"></td>\n' +
|
||||
' <td><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="13" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-price"></td>\n' +
|
||||
' <td><input type="number" min="0" max="99999999" step="1" maxlength="8" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount"></td>\n' +
|
||||
' <td><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="16" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-price"></td>\n' +
|
||||
' <td><input type="text" min="0.00" max="99.99" step="0.01" maxlength="5" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-tax-rate"></td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-tax-include" readonly></td>\n' +
|
||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-tax-exclude" readonly></td>\n' +
|
||||
|
|
|
@ -70,8 +70,8 @@ function rate(r1,r2) {
|
|||
*/
|
||||
function bindNumberInput() {
|
||||
//所有的数字类型输入框
|
||||
var $numberTypeInputs = $("input[type='number']");
|
||||
inputKeepDigital($numberTypeInputs);
|
||||
// var $numberTypeInputs = $("input[type='number']");
|
||||
// inputKeepDigital($numberTypeInputs);
|
||||
|
||||
//所有的number类的输入框
|
||||
var $numberClassInputs = $("input.number");
|
||||
|
@ -79,10 +79,10 @@ function bindNumberInput() {
|
|||
}
|
||||
|
||||
function inputKeepDigital($inputs) {
|
||||
//键盘键弹起的时候
|
||||
$inputs.keyup(function () {
|
||||
keepDigital($(this));
|
||||
});
|
||||
//键盘键弹起的时候,会在每次输入一位数的时候就格式化,先行去除
|
||||
// $inputs.keyup(function () {
|
||||
// keepDigital($(this));
|
||||
// });
|
||||
//失去焦点时再校验一遍
|
||||
$inputs.blur(function() {
|
||||
keepDigital($(this));
|
||||
|
@ -106,7 +106,7 @@ function keepDigitalVal(value) {
|
|||
value = parseFloat(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
return f2Fixed(f2(value));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -391,7 +391,7 @@
|
|||
</td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income" value="${incomeDetail.name!}"></td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income" value="${incomeDetail.unit!}"></td>
|
||||
<td><input type="text" maxlength="8" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount" value="${incomeDetail.amount!0}" oninput="if(value.length>8)value=value.slice(0,8)" <#--onkeyup="integerNumber(this)"-->></td>
|
||||
<td><input type="number" min="0" max="99999999" step="1" maxlength="8" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount" value="${incomeDetail.amount!0}" oninput="if(value.length>8)value=value.slice(0,8)" <#--onkeyup="integerNumber(this)"-->></td>
|
||||
<td><input type="text" maxlength="16" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-price" value="${Utils.format(incomeDetail.price,'0')}" oninput="if(value.length>16)value=value.slice(0,16)"></td>
|
||||
<td><input type="text" maxlength="5" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-tax-rate" value="${Utils.format(incomeDetail.taxRate,'0')}" oninput="if(value.length>5)value=value.slice(0,5)"></td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-tax-include" value="${Utils.format(incomeDetail.totalTaxInclude,'0')}" readonly></td>
|
||||
|
@ -458,7 +458,7 @@
|
|||
</td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" value="${costDetail.name!}"></td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" value="${costDetail.unit!}"></td>
|
||||
<td><input type="text" maxlength="8" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-amount" value="${costDetail.amount!0}" oninput="if(value.length>8)value=value.slice(0,8)" <#--onkeyup="integerNumber(this)"-->></td>
|
||||
<td><input type="number" min="0" max="99999999" step="1" maxlength="8" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-amount" value="${costDetail.amount!0}" oninput="if(value.length>8)value=value.slice(0,8)" <#--onkeyup="integerNumber(this)"-->></td>
|
||||
<td><input type="text" maxlength="16" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-price" value="${Utils.format(costDetail.price,'0')}" oninput="if(value.length>16)value=value.slice(0,16)"></td>
|
||||
<td><input type="text" maxlength="5" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate" value="${Utils.format(costDetail.taxRate,'0')}" oninput="if(value.length>5)value=value.slice(0,5)"></td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-include" value="${Utils.format(costDetail.totalTaxInclude,'0')}" readonly></td>
|
||||
|
@ -526,7 +526,7 @@
|
|||
</td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage" value="${costProjectManageDetail.detail!}"></td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage" value="${costProjectManageDetail.unit!}"></td>
|
||||
<td><input type="text" maxlength="8" class="number am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-amount-project-manage" value="${costProjectManageDetail.amount!0}" <#--onkeyup="integerNumber(this)"--> oninput="if(value.length>8)value=value.slice(0,8)"></td>
|
||||
<td><input type="number" min="0" max="99999999" step="1" maxlength="8" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-amount-project-manage" value="${costProjectManageDetail.amount!0}" <#--onkeyup="integerNumber(this)"--> oninput="if(value.length>8)value=value.slice(0,8)"></td>
|
||||
<td><input type="text" maxlength="16" class="number am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-price-project-manage" value="${Utils.format(costProjectManageDetail.price,'0')}" oninput="if(value.length>16)value=value.slice(0,16)"></td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-changeable-total-project-manage" value="${Utils.format(costProjectManageDetail.total,'0')}" readonly></td>
|
||||
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage" value="${costProjectManageDetail.predictMethod!}"></td>
|
||||
|
|
Loading…
Reference in New Issue