diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js
index 52e0dba..6f39674 100644
--- a/src/main/resources/static/assets/js/project_budget.js
+++ b/src/main/resources/static/assets/js/project_budget.js
@@ -62,6 +62,7 @@ var check = 0;
$(function () {
+ generateFileupload('icon')
generateFileupload2('icon');
$("input[name='costCompanyManageTaxExclude']").change(function () {
diff --git a/src/main/resources/static/assets/js/project_budget_cost.js b/src/main/resources/static/assets/js/project_budget_cost.js
index aaeaa4b..ad8e672 100644
--- a/src/main/resources/static/assets/js/project_budget_cost.js
+++ b/src/main/resources/static/assets/js/project_budget_cost.js
@@ -2,35 +2,35 @@
* 一个采购成本详情的字段
*/
//COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
-COST_DETAIL2={
- "num":[false,"序号","string"],
- "type":[false,"采购成本项目","string"],
- "category":[false,"产品大类","string"],
- "taxRate":[false,"税率","number"],
- "totalTaxInclude":[false,"含税总金额","number"],
- "totalTaxExclude":[false,"不含税金额","number"],
- "totalTax":[false,"税金","number"],
- "contractParty":[false,"供应商","string"],
- "remark":[false,"备注","string"]
+COST_DETAIL2 = {
+ "num": [false, "序号", "string"],
+ "type": [false, "采购成本项目", "string"],
+ "category": [false, "产品大类", "string"],
+ "taxRate": [false, "税率", "number"],
+ "totalTaxInclude": [false, "含税总金额", "number"],
+ "totalTaxExclude": [false, "不含税金额", "number"],
+ "totalTax": [false, "税金", "number"],
+ "contractParty": [false, "供应商", "string"],
+ "remark": [false, "备注", "string"]
};
-COST_DETAIL={
- "num":[false,"序号","string"],
- "type":[false,"采购成本项目","string"],
- "category":[false,"产品大类","string"],
- "taxRate":[false,"税率","number"],
- "totalTaxInclude":[false,"含税总金额","number"],
- "totalTaxExclude":[false,"不含税金额","number"],
- "totalTax":[false,"税金","number"],
- "contractParty":[false,"供应商","string"],
- "remark":[false,"备注","string"]
+COST_DETAIL = {
+ "num": [false, "序号", "string"],
+ "type": [false, "采购成本项目", "string"],
+ "category": [false, "产品大类", "string"],
+ "taxRate": [false, "税率", "number"],
+ "totalTaxInclude": [false, "含税总金额", "number"],
+ "totalTaxExclude": [false, "不含税金额", "number"],
+ "totalTax": [false, "税金", "number"],
+ "contractParty": [false, "供应商", "string"],
+ "remark": [false, "备注", "string"]
};
/*
[
{"id":"1","name":"xxx1"},{"id":"2","name":"xxx2"}
]
*/
-SELECT_TYPE_CATEGORY_DATA=[];
+SELECT_TYPE_CATEGORY_DATA = [];
/*{
"1":[
{
@@ -73,7 +73,7 @@ SELECT_TYPE_CATEGORY_DATA=[];
}
]
};*/
-SELECT_TYPE_CATEGORY_MAP_DATA={};
+SELECT_TYPE_CATEGORY_MAP_DATA = {};
/*{
"1":"1",
"2":"1",
@@ -85,7 +85,7 @@ SELECT_TYPE_CATEGORY_MAP_DATA={};
"8":"4"
};
*/
-SELECT_CATEGORY_TYPE_MAP_DATA={};
+SELECT_CATEGORY_TYPE_MAP_DATA = {};
/*$(function () {
$("#cost-detail").click(function () {
@@ -122,17 +122,17 @@ $(function () {
$("#cost-detail").click(function () {
$('#my-prompt-cost-detail').modal({
relatedTarget: this,
- closeOnConfirm:false,
- onConfirm: function(e) {
+ closeOnConfirm: false,
+ onConfirm: function (e) {
//不能使用e.data,因为无法获取动态添加的
var data = collectData("am-modal-prompt-input-cost");
//data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false);
data = prepareAjaxDataVerify(data, COST_DETAIL2, $("#id").val());
- if(data){
- postAjax(base+"/project/budgetEditSaveCostDetail", data, updateCostData);
+ if (data) {
+ postAjax(base + "/project/budgetEditSaveCostDetail", data, updateCostData);
}
},
- onCancel: function(e) {
+ onCancel: function (e) {
}
});
});
@@ -145,8 +145,8 @@ $(function () {
var data = collectData("am-modal-prompt-input-cost");
//data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false);
data = prepareAjaxDataVerify(data, COST_DETAIL2, $("#id").val());
- if(data){
- postAjax(base+"/project/budgetEditSaveCostDetail", data, updateCostData);
+ if (data) {
+ postAjax(base + "/project/budgetEditSaveCostDetail", data, updateCostData);
}
});
@@ -163,7 +163,7 @@ $(function () {
bindDeleteBtnCost();
//初始化大类和类别的数据
- getAjax(base+"/procurement/type/map", null, initTypeCategory);
+ getAjax(base + "/procurement/type/map", null, initTypeCategory);
});
/**
@@ -173,57 +173,32 @@ function appendTrCost() {
//console.log(SELECT_TYPE_CATEGORY_DATA);
var options = '\r\n';
SELECT_TYPE_CATEGORY_DATA.forEach(function (e) {
- options+='\r\n';
+ options += '\r\n';
});
var template = '
' +
' | ' +
- ''+
- ' | '+
- ''+
- ''+
- ' | '+
- // ' | '+
- // ' | '+
- // ' | '+
- // ' | '+
- ' | '+
- ' | '+
- ' | '+
- ' | '+
+ '' +
+ ' | ' +
+ '' +
+ '' +
+ ' | ' +
+ ' | ' +
+ ' | ' +
+ ' | ' +
+ ' | ' +
+ ' | \n' +
' | \n' +
- // '\n' +
- // ' \n' +
- // ' | \n' +
- // ' | \n' +
- // ' | \n' +
- // ' | \n' +
- // ' | \n' +
- ' | \n' +
- ' | '+
+ ' | ' +
'
';
$("#costTotal").before(template);
@@ -328,22 +303,22 @@ function updateCostData(data, returnData) {
var costTaxRates = "";
var set = new Set();
details.forEach(function (t, number, ts) {
- if(t["type"] == "1"){
+ if (t["type"] == "1") {
//设备类
deviceTaxInclude += f2(t["totalTaxInclude"]);
deviceTaxExclude += f2(t["totalTaxExclude"]);
deviceTax += f2(t["totalTax"]);
- }else if(t["type"] == "2"){
+ } else if (t["type"] == "2") {
//施工类
buildTaxInclude += f2(t["totalTaxInclude"]);
buildTaxExclude += f2(t["totalTaxExclude"]);
buildTax += f2(t["totalTax"]);
- }else if(t["type"] == "3"){
+ } else if (t["type"] == "3") {
//服务类
serviceTaxInclude += f2(t["totalTaxInclude"]);
serviceTaxExclude += f2(t["totalTaxExclude"]);
serviceTax += f2(t["totalTax"]);
- }else if(t["type"] == "4"){
+ } else if (t["type"] == "4") {
//其他类
otherTaxInclude += f2(t["totalTaxInclude"]);
otherTaxExclude += f2(t["totalTaxExclude"]);
@@ -370,19 +345,19 @@ function updateCostData(data, returnData) {
//资金计划表中的
$(".input-total-title-device-cost-budget-plan").val(f2Fixed(deviceTaxInclude));
- $(".input-total-title-engineer-cost-budget-plan").val(f2Fixed(f2(serviceTaxInclude)+f2(buildTaxInclude)+f2(otherTaxInclude)));
- $(".input-total-title-total-cost-budget-plan").val(f2Fixed(f2(deviceTaxInclude)+f2(buildTaxInclude)+f2(serviceTaxInclude)+f2(otherTaxInclude)
- +f2($(".input-total-title-project-manage-cost-budget-plan").val())
- +f2($(".input-total-title-earnest-money-cost-budget-plan").val())));
+ $(".input-total-title-engineer-cost-budget-plan").val(f2Fixed(f2(serviceTaxInclude) + f2(buildTaxInclude) + f2(otherTaxInclude)));
+ $(".input-total-title-total-cost-budget-plan").val(f2Fixed(f2(deviceTaxInclude) + f2(buildTaxInclude) + f2(serviceTaxInclude) + f2(otherTaxInclude)
+ + f2($(".input-total-title-project-manage-cost-budget-plan").val())
+ + f2($(".input-total-title-earnest-money-cost-budget-plan").val())));
-/* var costOtherOtherTaxInclude = f2($("input[name='costOtherOtherTaxInclude']").val());
- var costOtherOtherTaxExclude = f2($("input[name='costOtherOtherTaxExclude']").val());
+ /* var costOtherOtherTaxInclude = f2($("input[name='costOtherOtherTaxInclude']").val());
+ var costOtherOtherTaxExclude = f2($("input[name='costOtherOtherTaxExclude']").val());
- var costProjectManageTaxInclude = f2($("input[name='costProjectManageTaxInclude']").val());
- var costProjectManageTaxExclude = f2($("input[name='costProjectManageTaxExclude']").val());
+ var costProjectManageTaxInclude = f2($("input[name='costProjectManageTaxInclude']").val());
+ var costProjectManageTaxExclude = f2($("input[name='costProjectManageTaxExclude']").val());
- $("input[name='costTotalTaxInclude']").val(f2(deviceTaxInclude+buildTaxInclude+serviceTaxInclude+otherTaxInclude+costOtherOtherTaxInclude+costProjectManageTaxInclude));
- $("input[name='costTotalTaxExclude']").val(f2(deviceTaxExclude+buildTaxExclude+serviceTaxExclude+otherTaxExclude+costOtherOtherTaxExclude+costProjectManageTaxExclude));*/
+ $("input[name='costTotalTaxInclude']").val(f2(deviceTaxInclude+buildTaxInclude+serviceTaxInclude+otherTaxInclude+costOtherOtherTaxInclude+costProjectManageTaxInclude));
+ $("input[name='costTotalTaxExclude']").val(f2(deviceTaxExclude+buildTaxExclude+serviceTaxExclude+otherTaxExclude+costOtherOtherTaxExclude+costProjectManageTaxExclude));*/
calCostExclude();
calCostInclude();
@@ -445,19 +420,27 @@ function bindOtherOtherChangeable() {
*/
function bindTypeSelectChange() {
//大类变化联动类别
- $(".input-changeable-tax-rate-cost-select").on('change',function () {
+ $(".input-changeable-tax-rate-cost-select").on('change', function () {
var nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-cost-select");
var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-cost-name");
var type = $(this).val();
- if(type == '自定义') {
+ if (type == '自定义') {
nameSelect.attr("style", "display:none");
nameInput.attr("type", "text");
- } else{
+ } else {
nameSelect.attr("style", "display:block");
nameInput.attr("type", "hidden");
}
});
+ $('.am-modal-prompt-input-cost-type').on('change', function () {
+ var nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-cost-select");
+ var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-cost-name");
+ nameSelect.attr("style", "display:block");
+ nameInput.attr("type", "hidden");
+ })
+
}
+
/**
* 初始化数据
* SELECT_TYPE_CATEGORY_MAP_DATA
@@ -472,20 +455,20 @@ function initTypeCategory(params, data) {
var temp = [];
map[t].forEach(function (g) {
temp.push({
- name:g.name,
- id:g.id+""
+ name: g.name,
+ id: g.id + ""
});
});
- SELECT_TYPE_CATEGORY_MAP_DATA[t]= temp;
+ SELECT_TYPE_CATEGORY_MAP_DATA[t] = temp;
});
var procurementTypes = d.procurementTypes;
procurementTypes.forEach(function (e) {
SELECT_TYPE_CATEGORY_DATA.push({
- id:e.id+"",
- name:e.name
+ id: e.id + "",
+ name: e.name
});
- SELECT_CATEGORY_TYPE_MAP_DATA[e.id]=e.type;
+ SELECT_CATEGORY_TYPE_MAP_DATA[e.id] = e.type;
});
//--请选择--的映射
//SELECT_CATEGORY_TYPE_MAP_DATA["xxxx"]="xxxx";
diff --git a/src/main/resources/static/assets/js/project_budget_income.js b/src/main/resources/static/assets/js/project_budget_income.js
index 0e8601b..881b4e2 100644
--- a/src/main/resources/static/assets/js/project_budget_income.js
+++ b/src/main/resources/static/assets/js/project_budget_income.js
@@ -2,24 +2,24 @@
* 一个收入详情的字段
*/
//INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
-INCOME_DETAIL2={
- "num":[false,"序号","string"],
- "type":[false,"类别","string"],
- "name":[false,"产品大类","string"],
- "taxRate":[false,"税率","number"],
- "totalTaxInclude":[false,"含税总金额","number"],
- "totalTaxExclude":[false,"不含税金额","number"],
- "totalTax":[false,"税金","number"]
+INCOME_DETAIL2 = {
+ "num": [false, "序号", "string"],
+ "type": [false, "类别", "string"],
+ "name": [false, "产品大类", "string"],
+ "taxRate": [false, "税率", "number"],
+ "totalTaxInclude": [false, "含税总金额", "number"],
+ "totalTaxExclude": [false, "不含税金额", "number"],
+ "totalTax": [false, "税金", "number"]
};
-INCOME_DETAIL={
- "num":[false,"序号","string"],
- "type":[false,"类别","string"],
- "name":[false,"产品大类","string"],
- "taxRate":[false,"税率","number"],
- "totalTaxInclude":[false,"含税总金额","number"],
- "totalTaxExclude":[false,"不含税金额","number"],
- "totalTax":[false,"税金","number"]
+INCOME_DETAIL = {
+ "num": [false, "序号", "string"],
+ "type": [false, "类别", "string"],
+ "name": [false, "产品大类", "string"],
+ "taxRate": [false, "税率", "number"],
+ "totalTaxInclude": [false, "含税总金额", "number"],
+ "totalTaxExclude": [false, "不含税金额", "number"],
+ "totalTax": [false, "税金", "number"]
};
/*$(function () {
@@ -49,17 +49,17 @@ $(function () {
$("#income-detail").click(function () {
$('#my-prompt-income-detail').modal({
relatedTarget: this,
- closeOnConfirm:false,
- onConfirm: function(e) {
+ closeOnConfirm: false,
+ onConfirm: function (e) {
//不能使用e.data,因为无法获取动态添加的
var data = collectData("am-modal-prompt-input-income");
//data = prepareAjaxData(data, INCOME_DETAIL_ARR, $("#id").val(),false);
data = prepareAjaxDataVerify(data, INCOME_DETAIL2, $("#id").val());
- if(data.details){
- postAjax(base+"/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
+ if (data.details) {
+ postAjax(base + "/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
}
},
- onCancel: function(e) {
+ onCancel: function (e) {
}
});
});
@@ -70,8 +70,8 @@ $(function () {
$("#incomeTableSave").click(function () {
var data = collectData("am-modal-prompt-input-income");
data = prepareAjaxDataVerify(data, INCOME_DETAIL2, $("#id").val());
- if(data.details){
- postAjax(base+"/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
+ if (data.details) {
+ postAjax(base + "/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
}
});
$("#incomeAddBtn").click(function () {
@@ -85,7 +85,7 @@ $(function () {
/**
* 更新页面收入的数据【累加】
*/
-function updateIncomeData(data,returnData) {
+function updateIncomeData(data, returnData) {
var incomeDetails = data.details;
var deviceTaxInclude = 0;
var deviceTaxExclude = 0;
@@ -101,17 +101,17 @@ function updateIncomeData(data,returnData) {
incomeDetails.forEach(function (t, number, ts) {
console.log("income income " + t["type"] + ", " + t["taxRate"] + ", " + t["totalTaxInclude"] + ", " + t["totalTaxExclude"]);
- if(t["type"] == "1"){
+ if (t["type"] == "1") {
//设备类
deviceTaxInclude += f2(t["totalTaxInclude"]);
deviceTaxExclude += f2(t["totalTaxExclude"]);
deviceTax += f2(t["totalTax"]);
- }else if(t["type"] == "2"){
+ } else if (t["type"] == "2") {
//工程类
engineerTaxInclude += f2(t["totalTaxInclude"]);
engineerTaxExclude += f2(t["totalTaxExclude"]);
engineerTax += f2(t["totalTax"]);
- }else if(t["type"] == "3"){
+ } else if (t["type"] == "3") {
//服务类
serviceTaxInclude += f2(t["totalTaxInclude"]);
serviceTaxExclude += f2(t["totalTaxExclude"]);
@@ -133,15 +133,15 @@ function updateIncomeData(data,returnData) {
$("input[name='incomeServiceTaxExclude']").val(f2Fixed(serviceTaxExclude));
$("input[name='incomeServiceTax']").val(f2Fixed(serviceTax));
- $("input[name='incomeTotalTaxInclude']").val(f2Fixed(deviceTaxInclude+engineerTaxInclude+serviceTaxInclude));
- $("input[name='incomeTotalTaxExclude']").val(f2Fixed(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude));
- $("input[name='incomeTotalTax']").val(f2Fixed(deviceTax+engineerTax+serviceTax));
- $("input[name='costCompanyManageTaxExclude']").val(f2Fixed(0.028*(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude)));
+ $("input[name='incomeTotalTaxInclude']").val(f2Fixed(deviceTaxInclude + engineerTaxInclude + serviceTaxInclude));
+ $("input[name='incomeTotalTaxExclude']").val(f2Fixed(deviceTaxExclude + engineerTaxExclude + serviceTaxExclude));
+ $("input[name='incomeTotalTax']").val(f2Fixed(deviceTax + engineerTax + serviceTax));
+ $("input[name='costCompanyManageTaxExclude']").val(f2Fixed(0.028 * (deviceTaxExclude + engineerTaxExclude + serviceTaxExclude)));
$(".input-total-title-sale-income-budget-plan").val($("input[name='incomeTotalTaxInclude']").val());
$(".input-total-title-total-income-budget-plan").val(f2Fixed(f2($("input[name='incomeTotalTaxInclude']").val())
- +f2($(".input-total-title-earnest-money-income-budget-plan").val())));
+ + f2($(".input-total-title-earnest-money-income-budget-plan").val())));
updateProjectContributionProfitRate();
@@ -154,8 +154,6 @@ function updateIncomeData(data,returnData) {
}
-
-
/**
* 收入明细增加一行
*/
@@ -163,18 +161,18 @@ function appendTrIncome() {
var template = '\n' +
' | \n' +
' \n' +
- ' | \n' +
- ' | \n' +
- // ' | \n' +
- // ' | \n' +
- // ' | \n' +
- // ' | \n' +
- // ' | \n' +
+ ' ' +
+ '' +
+ '' +
+ ' ' +
+ '' +
+ '' +
+ ' | ' +
' | \n' +
' | \n' +
' | \n' +
@@ -242,19 +240,27 @@ function bindIncomeTotal() {
});
}
+
function bindTypeSelectChangeIncome() {
//大类变化联动类别
- $(".input-changeable-tax-rate-income-select").on('change',function () {
+ $(".input-changeable-tax-rate-income-select").on('change', function () {
var nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-income-select");
var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-income-name");
var type = $(this).val();
- if(type == '自定义') {
+ if (type == '自定义') {
nameSelect.attr("style", "display:none");
nameInput.attr("type", "text");
- } else{
+ } else {
nameSelect.attr("style", "display:block");
nameInput.attr("type", "hidden");
}
});
+ $(".am-modal-prompt-input-income-type").on('change', function () {
+ var nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-income-select");
+ var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-income-name");
+ nameSelect.attr("style", "display:block");
+ nameInput.attr("type", "hidden");
+ })
+
}
\ No newline at end of file
diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl
index 6add9bd..d975ae7 100644
--- a/src/main/resources/templates/admin/project_approve.ftl
+++ b/src/main/resources/templates/admin/project_approve.ftl
@@ -232,11 +232,12 @@
项目名称: |
- |
+ |
+
|
项目类型: |
-
+ |
<#if project.type??>
<#if (project.type) =1>
@@ -249,6 +250,7 @@
#if>
|
+
|
垫资模式: |
@@ -599,7 +601,7 @@
垫资模式: |
-
+ |
<#if projectBudget.underwrittenModeBudget??>
<#if (projectBudget.underwrittenModeBudget) =1>
@@ -613,7 +615,7 @@
#if>
|
- hidden#if>> |
|
项目毛利: |
+ style="font-size: 15px">项目毛利B:
|
项目毛利率: |
+ style="font-size: 15px">项目毛利B利率:
diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl
index fda2f75..bd00634 100644
--- a/src/main/resources/templates/admin/project_budget_edit.ftl
+++ b/src/main/resources/templates/admin/project_budget_edit.ftl
@@ -143,11 +143,12 @@
|
项目名称: |
- |
+ |
+
|
项目类型: |
-
+ |
<#if project.type??>
<#if (project.type) =1>
@@ -160,6 +161,7 @@
#if>
|
+
|
垫资模式: |
@@ -424,6 +426,11 @@
+
+
+
@@ -443,12 +450,13 @@
*项目名称: |
-
+ |
|
+
|
<#if project.approveStatusBudget == 2>
@@ -467,7 +475,7 @@
*项目类型: |
-
+ |
|
+
|
*垫资模式: |
-
+ |
@@ -496,7 +505,7 @@
|
- hidden#if>> |
|
*项目毛利: |
+ style="font-size: 15px">项目毛利B:
|
*项目毛利率: |
+ style="font-size: 15px">项目毛利B利率:
导入模板下载
- 销售合同配置清单
-
-
+
-
+
+
+
+ ${projectBudget.incomeDetailAttr?projectBudget.incomeDetailAttr.split('/')[projectBudget.incomeDetailAttr.split('/').length-1]:''}
+
+
@@ -886,11 +902,6 @@
序号 |
类别 |
产品大类 |
- <#-- 规格类型 | -->
- <#-- 参数 | -->
- <#-- 单位 | -->
- <#-- 数量 | -->
- <#-- 单价 | -->
税率(%) |
含税总金额(元) |
不含税金额(元) |
@@ -907,7 +918,7 @@
value="${(incomeDetail_index+1)!}" readonly>
+ class="am-modal-prompt-input am-modal-prompt-input-income am-modal-prompt-input-income-type">
@@ -1094,7 +1105,16 @@
- | |