预算增加序号

master
OathK1per 2022-01-13 15:33:01 +08:00
parent c435f0778c
commit a0eb41ea6a
7 changed files with 39 additions and 3 deletions

View File

@ -1,4 +1,5 @@
INCOME_DETAIL={ INCOME_DETAIL={
"num":[false,"序号","string"],
"type":[true,"类别","string"], "type":[true,"类别","string"],
"name":[true,"名称","string"], "name":[true,"名称","string"],
"unit":[true,"单位","string"], "unit":[true,"单位","string"],
@ -10,6 +11,7 @@ INCOME_DETAIL={
}; };
COST_DETAIL={ COST_DETAIL={
"num":[false,"序号","string"],
"type":[true,"大类","string"], "type":[true,"大类","string"],
"category":[true,"类别","string"], "category":[true,"类别","string"],
"name":[true,"名称","string"], "name":[true,"名称","string"],
@ -22,6 +24,7 @@ COST_DETAIL={
}; };
COST_PROJECT_MANAGE_DETAIL={ COST_PROJECT_MANAGE_DETAIL={
"num":[false,"序号","string"],
"type":[true,"财务费用类别","string"], "type":[true,"财务费用类别","string"],
"name1":[false,"业务项目","string"], "name1":[false,"业务项目","string"],
"name2":[false,"业务项目","string"], "name2":[false,"业务项目","string"],
@ -476,6 +479,16 @@ function bindChangeableInput() {
}); });
} }
/**
* 绑定序号
*/
function bindNum() {
$(".input-budget-num").each(function(t) {
var prevIndex = $(this).parent().parent().prev("tr").find(".input-budget-num").val();
$(this).val(f2(prevIndex) + 1);
});
}
/** /**
* 校验项目贡献利润率必须大于阀值 * 校验项目贡献利润率必须大于阀值
* 低于阀值就返回提示信息否则返回"" * 低于阀值就返回提示信息否则返回""

View File

@ -3,6 +3,7 @@
*/ */
//COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; //COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
COST_DETAIL={ COST_DETAIL={
"num":[false,"序号","string"],
"type":[true,"大类","string"], "type":[true,"大类","string"],
"category":[true,"类别","string"], "category":[true,"类别","string"],
"name":[true,"名称","string"], "name":[true,"名称","string"],
@ -161,7 +162,9 @@ function appendTrCost() {
options+='<option value="'+e.id+'">'+e.name+'</option>\r\n'; options+='<option value="'+e.id+'">'+e.name+'</option>\r\n';
}); });
var template = '<tr><td><select style="width: 82px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type">'+ var template = '<tr>' +
'<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-budget-num" readonly></td>' +
'<td><select style="width: 82px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type">'+
'<option value="xxxx" disabled selected>--请选择--</option>'+ '<option value="xxxx" disabled selected>--请选择--</option>'+
'<option value="1">设备</option>'+ '<option value="1">设备</option>'+
'<option value="2">施工</option>'+ '<option value="2">施工</option>'+
@ -198,6 +201,8 @@ function appendTrCost() {
$("#costTable").append(template); $("#costTable").append(template);
//重新绑定删除事件和input修改事件 //重新绑定删除事件和input修改事件
bindDeleteBtn(); bindDeleteBtn();
//绑定序号
bindNum();
//重新绑定 //重新绑定
bindChangeableInput(); bindChangeableInput();
//绑定采购明细中select联动事件 //绑定采购明细中select联动事件

View File

@ -3,6 +3,7 @@
*/ */
//COST_PROJECT_MANAGE_DETAIL_ARR=["type","name","detail","unit","amount","price","total","predictMethod","predictWhy","remark","deletable"]; //COST_PROJECT_MANAGE_DETAIL_ARR=["type","name","detail","unit","amount","price","total","predictMethod","predictWhy","remark","deletable"];
COST_PROJECT_MANAGE_DETAIL={ COST_PROJECT_MANAGE_DETAIL={
"num":[false,"序号","string"],
"type":[true,"财务费用类别","string"], "type":[true,"财务费用类别","string"],
"name1":[false,"业务项目","string"], "name1":[false,"业务项目","string"],
"name2":[false,"业务项目","string"], "name2":[false,"业务项目","string"],
@ -96,6 +97,7 @@ $(function () {
*/ */
function appendTrCostProjectManage() { function appendTrCostProjectManage() {
var template = '<tr>\n' + var template = '<tr>\n' +
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-budget-num" readonly></td>\n' +
' <td>\n' + ' <td>\n' +
' <select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage am-modal-prompt-input-cost-project-manage-type">\n' + ' <select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage am-modal-prompt-input-cost-project-manage-type">\n' +
' <option value="xxxx" disabled selected>--请选择--</option>\n' + ' <option value="xxxx" disabled selected>--请选择--</option>\n' +
@ -130,6 +132,8 @@ function appendTrCostProjectManage() {
$("#costProjectManageTable").append(template); $("#costProjectManageTable").append(template);
//重新绑定删除事件和input修改事件 //重新绑定删除事件和input修改事件
bindDeleteBtn(); bindDeleteBtn();
//绑定序号
bindNum();
bindChangeableInputProjectManage(); bindChangeableInputProjectManage();
bindTypeSelectChangeManager(); bindTypeSelectChangeManager();
//绑定数字输入框保留两位小数 //绑定数字输入框保留两位小数

View File

@ -3,6 +3,7 @@
*/ */
//INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; //INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
INCOME_DETAIL={ INCOME_DETAIL={
"num":[false,"序号","string"],
"type":[true,"类别","string"], "type":[true,"类别","string"],
"name":[true,"名称","string"], "name":[true,"名称","string"],
"unit":[true,"单位","string"], "unit":[true,"单位","string"],
@ -127,6 +128,7 @@ function updateIncomeData(data,returnData) {
*/ */
function appendTrIncome() { function appendTrIncome() {
var template = '<tr>\n' + var template = '<tr>\n' +
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-budget-num" readonly></td>\n' +
' <td>\n' + ' <td>\n' +
' <select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-income">\n' + ' <select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-income">\n' +
' <option value="1">设备类</option>\n' + ' <option value="1">设备类</option>\n' +
@ -146,6 +148,7 @@ function appendTrIncome() {
$("#incomeTable").append(template); $("#incomeTable").append(template);
//重新绑定删除事件和input修改事件 //重新绑定删除事件和input修改事件
bindDeleteBtn(); bindDeleteBtn();
bindNum();
bindChangeableInput(); bindChangeableInput();
//绑定数字输入框保留两位小数 //绑定数字输入框保留两位小数
bindNumberInput(); bindNumberInput();

View File

@ -515,7 +515,6 @@ function calUnderwrittenPlan(income, cost, prevFundBalance) {
*/ */
function updateEachRepaymentPlan() { function updateEachRepaymentPlan() {
var total = 0; var total = 0;
console.log("total: " + total);
//找到每个月的回款计划输入框 //找到每个月的回款计划输入框
$(".input-changeable-repayment-plan-budget-plan").each(function (t) { $(".input-changeable-repayment-plan-budget-plan").each(function (t) {
//找到当前月的收入和支出 //找到当前月的收入和支出

View File

@ -434,6 +434,7 @@
id="incomeTable"> id="incomeTable">
<tbody> <tbody>
<tr> <tr>
<td>序号</td>
<td>类别</td> <td>类别</td>
<td>名称</td> <td>名称</td>
<td>单位</td> <td>单位</td>
@ -448,6 +449,7 @@
<#if incomeDetails??> <#if incomeDetails??>
<#list incomeDetails as incomeDetail> <#list incomeDetails as incomeDetail>
<tr> <tr>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-budget-num" value="${(incomeDetail_index+1)!}" readonly></td>
<td> <td>
<#--<select style="width: auto" readonly <#--<select style="width: auto" readonly
class="am-modal-prompt-input am-modal-prompt-input-income"> class="am-modal-prompt-input am-modal-prompt-input-income">
@ -505,6 +507,7 @@
id="costTable"> id="costTable">
<tbody> <tbody>
<tr> <tr>
<td>序号</td>
<td>大类</td> <td>大类</td>
<td>类别</td> <td>类别</td>
<td>名称</td> <td>名称</td>
@ -520,6 +523,7 @@
<#if costDetails??> <#if costDetails??>
<#list costDetails as costDetail> <#list costDetails as costDetail>
<tr> <tr>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-budget-num" value="${(costDetail_index+1)!}" readonly></td>
<td> <td>
<#--<select style="width: auto" readonly <#--<select style="width: auto" readonly
class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type"> class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type">
@ -586,6 +590,7 @@
id="costProjectManageTable"> id="costProjectManageTable">
<tbody> <tbody>
<tr> <tr>
<td>序号</td>
<td>财务费用类别</td> <td>财务费用类别</td>
<td>业务项目</td> <td>业务项目</td>
<td>项目明细</td> <td>项目明细</td>
@ -602,6 +607,7 @@
<#if costProjectManageDetails??> <#if costProjectManageDetails??>
<#list costProjectManageDetails as costProjectManageDetail> <#list costProjectManageDetails as costProjectManageDetail>
<tr> <tr>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-budget-num" value="${(costProjectManageDetail_index+1)!}" readonly></td>
<td> <td>
<#--<select style="width: auto" <#--<select style="width: auto"
class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage"

View File

@ -368,6 +368,7 @@
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;" id="incomeTable"> <table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;" id="incomeTable">
<tbody> <tbody>
<tr> <tr>
<td>序号</td>
<td>类别</td> <td>类别</td>
<td>名称</td> <td>名称</td>
<td>单位</td> <td>单位</td>
@ -380,8 +381,9 @@
</tr> </tr>
<#if incomeDetails??> <#if incomeDetails??>
<#list incomeDetails as incomeDetail>+ <#list incomeDetails as incomeDetail>
<tr> <tr>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-budget-num" value="${(incomeDetail_index+1)!}" readonly></td>
<td> <td>
<select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-income"> <select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-income">
<option value="1" <#if incomeDetail.type == 1>selected</#if>>设备类</option> <option value="1" <#if incomeDetail.type == 1>selected</#if>>设备类</option>
@ -418,6 +420,7 @@
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;" id="costTable"> <table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;" id="costTable">
<tbody> <tbody>
<tr> <tr>
<td>序号</td>
<td>大类</td> <td>大类</td>
<td>类别</td> <td>类别</td>
<td>名称</td> <td>名称</td>
@ -433,6 +436,7 @@
<#if costDetails??> <#if costDetails??>
<#list costDetails as costDetail> <#list costDetails as costDetail>
<tr> <tr>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-budget-num" value="${(costDetail_index+1)!}" readonly></td>
<td> <td>
<select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type"> <select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type">
<option value="1" <#if costDetail.type == 1>selected</#if>>设备</option> <option value="1" <#if costDetail.type == 1>selected</#if>>设备</option>
@ -485,6 +489,7 @@
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;" id="costProjectManageTable"> <table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;" id="costProjectManageTable">
<tbody> <tbody>
<tr> <tr>
<td>序号</td>
<td>财务费用类别</td> <td>财务费用类别</td>
<td>业务项目</td> <td>业务项目</td>
<td>项目明细</td> <td>项目明细</td>
@ -500,6 +505,7 @@
<#if costProjectManageDetails??> <#if costProjectManageDetails??>
<#list costProjectManageDetails as costProjectManageDetail> <#list costProjectManageDetails as costProjectManageDetail>
<tr> <tr>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage input-budget-num" value="${(costProjectManageDetail_index+1)!}" readonly></td>
<td> <td>
<select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage am-modal-prompt-input-cost-project-manage-type"> <select style="width: 80px;float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage am-modal-prompt-input-cost-project-manage-type">
<option value="1" <#if costProjectManageDetail.type == 1>selected</#if>>人工成本</option> <option value="1" <#if costProjectManageDetail.type == 1>selected</#if>>人工成本</option>