收入明细完全ok了
parent
2459429a75
commit
199d44e23d
|
@ -179,4 +179,28 @@ function bindIncomeChangeableInput() {
|
||||||
|
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(amount*price/(1+taxRate/100));
|
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(amount*price/(1+taxRate/100));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收入明细增加一行
|
||||||
|
*/
|
||||||
|
function appendTrIncome() {
|
||||||
|
var template = '<tr>\n' +
|
||||||
|
' <td>\n' +
|
||||||
|
' <select style="width: auto" class="am-modal-prompt-input am-modal-prompt-input-income">\n' +
|
||||||
|
' <option value="1">设备类</option>\n' +
|
||||||
|
' <option value="2">工程类</option>\n' +
|
||||||
|
' <option value="3">服务类</option>\n' +
|
||||||
|
' </select>\n' +
|
||||||
|
' </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" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount"></td>\n' +
|
||||||
|
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-price"></td>\n' +
|
||||||
|
' <td><input type="text" class="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' +
|
||||||
|
' <td><button type="button" class="am-btn am-btn-warning am-btn-xs am-modal-line-delete"><span class="am-icon-minus"></span></button></td>\n' +
|
||||||
|
' </tr>';
|
||||||
|
$("#incomeTable").append(template);
|
||||||
}
|
}
|
|
@ -495,24 +495,7 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$("#incomeAddBtn").click(function () {
|
$("#incomeAddBtn").click(function () {
|
||||||
var template = '<tr>\n' +
|
appendTrIncome();
|
||||||
' <td>\n' +
|
|
||||||
' <select style="width: auto" class="am-modal-prompt-input am-modal-prompt-input-income">\n' +
|
|
||||||
' <option value="1">设备类</option>\n' +
|
|
||||||
' <option value="2">工程类</option>\n' +
|
|
||||||
' <option value="3">服务类</option>\n' +
|
|
||||||
' </select>\n' +
|
|
||||||
' </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" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount"></td>\n' +
|
|
||||||
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-price"></td>\n' +
|
|
||||||
' <td><input type="text" class="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' +
|
|
||||||
' <td><button type="button" class="am-btn am-btn-warning am-btn-xs am-modal-line-delete"><span class="am-icon-minus"></span></button></td>\n' +
|
|
||||||
' </tr>';
|
|
||||||
$("#incomeTable").append(template);
|
|
||||||
bindDeleteBtn();
|
bindDeleteBtn();
|
||||||
bindIncomeChangeableInput();
|
bindIncomeChangeableInput();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue