修改预算中的明细表,添加空间管理总数

master
OathK1per 2022-12-07 11:10:09 +08:00
parent d3d89c2274
commit 51e861db10
10 changed files with 74 additions and 23 deletions

View File

@ -194,8 +194,8 @@ public class ProjectController extends BaseController {
} else {
incomeTaxRates = incomeTaxSb.toString();
}
String[] headers2 = {"序号", "类别", "名称", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)"};
String[] columns2 = {"tempId", "type", "name", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax"};
String[] headers2 = {"序号", "类别", "名称", "规格类型", "参数", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)"};
String[] columns2 = {"tempId", "type", "name", "spec", "param", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax"};
exportExcelUtils.exportIncomeDetailExcel(headers2, columns2, project, budgetBean, budgetIncomeDetail, incomeTotalAmount, "yyyy-MM-dd", 0, "收入明细表", outputStream);
//收入计划
List<ProjectBudgetIncomePlanDetail> budgetIncomePlanDetail = projectBudgetService.getBudgetIncomePlanDetail(project);
@ -224,7 +224,7 @@ public class ProjectController extends BaseController {
} else {
costTaxRates = costTaxSb.toString();
}
String[] headers3 = {"序号", "大类", "类别", "名称", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"};
String[] headers3 = {"序号", "费用项目", "采购类别", "名称", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"};
String[] columns3 = {"tempId", "type", "category", "name", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax", "contractParty", "isUnderwritten", "underwrittenAmount", "payTime", "payAmount", "payWay", "remark"};
exportExcelUtils.exportCostDetailExcel(headers3, columns3, project, budgetBean, budgetCostDetail, costTotalAmount, costUnderwrittenAmountTotal, costPayAmountTotal, procurementMap, "yyyy-MM-dd", 0, "采购成本明细表", outputStream);
//项目管理成本明细
@ -1046,7 +1046,7 @@ public class ProjectController extends BaseController {
@RequestMapping("/incomeTemplate")
public void incomeTemplate(HttpServletResponse response) throws Exception{
String[] headers = new String[]{"类别", "名称", "单位", "数量", "单价", "税率(%)"};
String[] headers = new String[]{"类别", "名称", "规格类型", "参数", "单位", "数量", "单价", "税率(%)"};
downloadHeader(response , Utils.generateExcelName("收入明细表批量导入模板"));
ExportUtils exportUtils = new ExportUtils(headers);
exportUtils.write(response.getOutputStream());
@ -1081,7 +1081,7 @@ public class ProjectController extends BaseController {
@RequestMapping("/costTemplate")
public void costTemplate(HttpServletResponse response) throws Exception{
String[] headers = new String[]{"大类", "类别", "名称", "单位", "数量", "单价", "税率(%)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"};
String[] headers = new String[]{"费用项目", "采购类别", "名称", "单位", "数量", "单价", "税率(%)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"};
downloadHeader(response , Utils.generateExcelName("采购成本明细表批量导入模板"));
ExportUtils exportUtils = new ExportUtils(headers);
exportUtils.write(response.getOutputStream());
@ -1164,8 +1164,8 @@ public class ProjectController extends BaseController {
//收入明细
List<ProjectBudgetIncomeDetail> budgetIncomeDetail = projectBudgetService.getBudgetIncomeDetail(project);
BigDecimal incomeTotalAmount = projectBudgetService.getBudgetIncomeAmount(project);
String[] headers2 = {"序号", "类别", "名称", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)"};
String[] columns2 = {"tempId", "type", "name", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax"};
String[] headers2 = {"序号", "类别", "名称", "规格类型", "参数", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)"};
String[] columns2 = {"tempId", "type", "name", "spec", "param", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax"};
exportExcelUtils.exportIncomeDetailExcel(headers2, columns2, project, budgetBean, budgetIncomeDetail, incomeTotalAmount, "yyyy-MM-dd", 0, "收入明细表", outputStream);
exportExcelUtils.end(outputStream);
@ -1212,7 +1212,7 @@ public class ProjectController extends BaseController {
BigDecimal costPayAmountTotal = projectBudgetService.getBudgetCostPayAmountTotal(project);
List<ProcurementType> procurementTypes = procurementTypeService.allProcurementTypeList();
Map<Integer, String> procurementMap = procurementTypes.stream().collect(Collectors.toMap(ProcurementType::getId, ProcurementType::getName));
String[] headers3 = {"序号", "大类", "类别", "名称", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"};
String[] headers3 = {"序号", "费用项目", "采购类别", "名称", "单位", "数量", "单价", "税率(%)", "含税总金额(元)", "不含税金额(元)", "税金(元)", "签约方", "是否垫资", "预估垫资金额(元)", "支出时间", "支出金额(元)", "付款方式", "备注"};
String[] columns3 = {"tempId", "type", "category", "name", "unit", "amount", "price", "taxRate", "totalTaxInclude", "totalTaxExclude", "totalTax", "contractParty", "isUnderwritten", "underwrittenAmount", "payTime", "payAmount", "payWay", "remark"};
exportExcelUtils.exportCostDetailExcel(headers3, columns3, project, budgetBean, budgetCostDetail, costTotalAmount, costUnderwrittenAmountTotal, costPayAmountTotal, procurementMap, "yyyy-MM-dd", 0, "采购成本明细表", outputStream);

View File

@ -26,6 +26,10 @@ public class ProjectBudgetIncomeDetailBase {
private String name;
private String spec;
private String param;
private String unit;
private BigDecimal amount;
private BigDecimal price;
@ -65,6 +69,22 @@ public class ProjectBudgetIncomeDetailBase {
this.name = name;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
public String getUnit() {
return unit;
}

View File

@ -14,6 +14,8 @@ public class ProjectBudgetIncomeDetailTemp extends ProjectBudgetIncomeDetailBase
projectBudgetIncomeDetail.setProjectId(getProjectId());
projectBudgetIncomeDetail.setName(getName());
projectBudgetIncomeDetail.setType(getType());
projectBudgetIncomeDetail.setSpec(getSpec());
projectBudgetIncomeDetail.setParam(getParam());
projectBudgetIncomeDetail.setUnit(getUnit());
projectBudgetIncomeDetail.setAmount(getAmount());
projectBudgetIncomeDetail.setPrice(getPrice());

View File

@ -1070,6 +1070,12 @@ public class ProjectBudgetService {
key = "名称";
o1 = m.get(key);
temp.setName((String) o1);
key = "规格类型";
o1 = m.get(key);
temp.setName((String) o1);
key = "参数";
o1 = m.get(key);
temp.setName((String) o1);
key = "单位";
o1 = m.get(key);
temp.setUnit((String) o1);
@ -1130,7 +1136,7 @@ public class ProjectBudgetService {
String key;
Object o1;
temp.setProjectId(id);
key = "大类";
key = "费用项目";
o1 = m.get(key);
String type = (String) o1;
if ("设备".equals(type)) {
@ -1142,16 +1148,16 @@ public class ProjectBudgetService {
} else if ("其他".equals(type)) {
temp.setType(4);
} else {
throw new Exception("该大类不存在");
throw new Exception("该费用项目不存在");
}
key = "类别";
key = "采购类别";
o1 = m.get(key);
String category = (String) o1;
ProcurementType procurementType = procurementTypeRepository.findByName(category);
if (procurementType != null && procurementType.getType() == temp.getType()) {
temp.setCategory(procurementType.getId());
} else {
throw new Exception("该类别不存在或者与大类不匹配");
throw new Exception("该采购类别不存在或者与费用项目不匹配");
}
key = "名称";
o1 = m.get(key);

View File

@ -4,8 +4,8 @@
//COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
COST_DETAIL2={
"num":[false,"序号","string"],
"type":[false,"大类","string"],
"category":[false,"类别","string"],
"type":[false,"费用项目","string"],
"category":[false,"采购类别","string"],
"name":[false,"名称","string"],
"unit":[false,"单位","string"],
"amount":[false,"数量","number"],
@ -25,8 +25,8 @@ COST_DETAIL2={
COST_DETAIL={
"num":[false,"序号","string"],
"type":[true,"大类","string"],
"category":[true,"类别","string"],
"type":[true,"费用项目","string"],
"category":[true,"采购类别","string"],
"name":[true,"名称","string"],
"unit":[true,"单位","string"],
"amount":[true,"数量","number"],

View File

@ -6,6 +6,8 @@ INCOME_DETAIL2={
"num":[false,"序号","string"],
"type":[false,"类别","string"],
"name":[false,"名称","string"],
"spec":[false,"规格类型","string"],
"param":[false,"参数","string"],
"unit":[false,"单位","string"],
"amount":[false,"数量","number"],
"price":[false,"单价","price"],
@ -19,6 +21,8 @@ INCOME_DETAIL={
"num":[false,"序号","string"],
"type":[true,"类别","string"],
"name":[true,"名称","string"],
"spec":[true,"规格类型","string"],
"param":[true,"参数","string"],
"unit":[true,"单位","string"],
"amount":[true,"数量","number"],
"price":[true,"单价","price"],
@ -176,6 +180,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" 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" maxlength="8" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount input-changeable-amount-income"></td>\n' +
' <td><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="19" class="price am-modal-prompt-input am-modal-prompt-input-income input-changeable-price input-changeable-price-income"></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 input-changeable-tax-rate-income"></td>\n' +

View File

@ -352,12 +352,12 @@ function verifyBudgetPlan(){
//从采购成本明细中取“设备”大类下的总计---设备支出
if(costPurchaseDeviceTaxInclude != input_total_device_cost_budget_plan){
return "采购成本明细中取“设备”大类下的总计["+costPurchaseDeviceTaxInclude+"]与设备支出["+input_total_device_cost_budget_plan+"]不等";
return "采购成本明细中取“设备”费用项目下的总计["+costPurchaseDeviceTaxInclude+"]与设备支出["+input_total_device_cost_budget_plan+"]不等";
}
//从采购成本明细中取“服务+施工+其他”大类的总计---工程支出
var t = f2(f2(costPurchaseBuildTaxInclude)+f2(costPurchaseServiceTaxInclude)+f2(costPurchaseOtherTaxInclude));
if(t != f2(input_total_engineer_cost_budget_plan)){
return "采购成本明细中取“服务+施工+其他”大类的总计["+t+"]与工程支出["+input_total_engineer_cost_budget_plan+"]不等";
return "采购成本明细中取“服务+施工+其他”费用项目的总计["+t+"]与工程支出["+input_total_engineer_cost_budget_plan+"]不等";
}
//从项目管理成本取总计金额--经营性开支
if(costProjectManageTaxInclude != input_total_project_manage_budget_plan){

View File

@ -435,6 +435,8 @@
<th>序号</th>
<th>类别</th>
<th>名称</th>
<th>规格类型</th>
<th>参数</th>
<th>单位</th>
<th>数量</th>
<th>单价</th>
@ -471,6 +473,12 @@
<td><input type="text" readonly
class="am-modal-prompt-input am-modal-prompt-input-income"
value="${incomeDetail.name!}"></td>
<td><input type="text" readonly
class="am-modal-prompt-input am-modal-prompt-input-income"
value="${incomeDetail.spec!}"></td>
<td><input type="text" readonly
class="am-modal-prompt-input am-modal-prompt-input-income"
value="${incomeDetail.param!}"></td>
<td><input type="text" readonly
class="am-modal-prompt-input am-modal-prompt-input-income"
value="${incomeDetail.unit!}"></td>
@ -508,6 +516,8 @@
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-amount-income" value="${Utils.format(incomeTotalAmount,'0.00')}" readonly <#--onkeyup="integerNumber(this)"-->></td>
<td></td>
<td></td>
@ -596,8 +606,8 @@
<thead>
<tr>
<th>序号</th>
<th>大类</th>
<th>类别</th>
<th>费用项目</th>
<th>采购类别</th>
<th>名称</th>
<th>单位</th>
<th>数量</th>

View File

@ -341,6 +341,8 @@
<th>序号</th>
<th width="100px">类别</th>
<th>名称</th>
<th>规格类型</th>
<th>参数</th>
<th>单位</th>
<th>数量</th>
<th>单价</th>
@ -364,6 +366,8 @@
</select>
</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.spec!}"></td>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income" value="${incomeDetail.param!}"></td>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income" value="${incomeDetail.unit!}"></td>
<td><input type="text" maxlength="14" class="number am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount input-changeable-amount-income" value="${Utils.format(incomeDetail.amount,'0')}" oninput="if(value.length>8)value=value.slice(0,8)" <#--onkeyup="integerNumber(this)"-->></td>
<td><input type="text" maxlength="19" class="price am-modal-prompt-input am-modal-prompt-input-income input-changeable-price input-changeable-price-income" value="${Utils.format2(incomeDetail.price,'0')}" oninput="if(value.length>19)value=value.slice(0,19)"></td>
@ -380,6 +384,8 @@
<td width="100px"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-amount-income" value="${Utils.format(incomeTotalAmount,'0')}" readonly <#--onkeyup="integerNumber(this)"-->></td>
<td></td>
<td></td>
@ -471,8 +477,8 @@
<thead style="display:block;width: 1810px;">
<tr>
<th width="60px">序号</th>
<th width="70px">大类</th>
<th width="150px">类别</th>
<th width="70px">费用项目</th>
<th width="150px">采购类别</th>
<th width="100px">名称</th>
<th width="80px">单位</th>
<th width="100px">数量</th>

View File

@ -48,7 +48,8 @@
});
}
}
});
});
$('#pager').prepend('<li><a style="pointer-events:none;">共${(pager.totalRow)!10}条<\/a><\/li>');
</script>