调试文件上传

dev_1.0.0
‘wangjiuyun 2024-10-30 19:22:22 +08:00
parent fd43f2f71f
commit b04d88c0e2
7 changed files with 214 additions and 187 deletions

View File

@ -62,6 +62,7 @@ var check = 0;
$(function () { $(function () {
generateFileupload('icon')
generateFileupload2('icon'); generateFileupload2('icon');
$("input[name='costCompanyManageTaxExclude']").change(function () { $("input[name='costCompanyManageTaxExclude']").change(function () {

View File

@ -2,35 +2,35 @@
* 一个采购成本详情的字段 * 一个采购成本详情的字段
*/ */
//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_DETAIL2={ COST_DETAIL2 = {
"num":[false,"序号","string"], "num": [false, "序号", "string"],
"type":[false,"采购成本项目","string"], "type": [false, "采购成本项目", "string"],
"category":[false,"产品大类","string"], "category": [false, "产品大类", "string"],
"taxRate":[false,"税率","number"], "taxRate": [false, "税率", "number"],
"totalTaxInclude":[false,"含税总金额","number"], "totalTaxInclude": [false, "含税总金额", "number"],
"totalTaxExclude":[false,"不含税金额","number"], "totalTaxExclude": [false, "不含税金额", "number"],
"totalTax":[false,"税金","number"], "totalTax": [false, "税金", "number"],
"contractParty":[false,"供应商","string"], "contractParty": [false, "供应商", "string"],
"remark":[false,"备注","string"] "remark": [false, "备注", "string"]
}; };
COST_DETAIL={ COST_DETAIL = {
"num":[false,"序号","string"], "num": [false, "序号", "string"],
"type":[false,"采购成本项目","string"], "type": [false, "采购成本项目", "string"],
"category":[false,"产品大类","string"], "category": [false, "产品大类", "string"],
"taxRate":[false,"税率","number"], "taxRate": [false, "税率", "number"],
"totalTaxInclude":[false,"含税总金额","number"], "totalTaxInclude": [false, "含税总金额", "number"],
"totalTaxExclude":[false,"不含税金额","number"], "totalTaxExclude": [false, "不含税金额", "number"],
"totalTax":[false,"税金","number"], "totalTax": [false, "税金", "number"],
"contractParty":[false,"供应商","string"], "contractParty": [false, "供应商", "string"],
"remark":[false,"备注","string"] "remark": [false, "备注", "string"]
}; };
/* /*
[ [
{"id":"1","name":"xxx1"},{"id":"2","name":"xxx2"} {"id":"1","name":"xxx1"},{"id":"2","name":"xxx2"}
] ]
*/ */
SELECT_TYPE_CATEGORY_DATA=[]; SELECT_TYPE_CATEGORY_DATA = [];
/*{ /*{
"1":[ "1":[
{ {
@ -73,7 +73,7 @@ SELECT_TYPE_CATEGORY_DATA=[];
} }
] ]
};*/ };*/
SELECT_TYPE_CATEGORY_MAP_DATA={}; SELECT_TYPE_CATEGORY_MAP_DATA = {};
/*{ /*{
"1":"1", "1":"1",
"2":"1", "2":"1",
@ -85,7 +85,7 @@ SELECT_TYPE_CATEGORY_MAP_DATA={};
"8":"4" "8":"4"
}; };
*/ */
SELECT_CATEGORY_TYPE_MAP_DATA={}; SELECT_CATEGORY_TYPE_MAP_DATA = {};
/*$(function () { /*$(function () {
$("#cost-detail").click(function () { $("#cost-detail").click(function () {
@ -122,17 +122,17 @@ $(function () {
$("#cost-detail").click(function () { $("#cost-detail").click(function () {
$('#my-prompt-cost-detail').modal({ $('#my-prompt-cost-detail').modal({
relatedTarget: this, relatedTarget: this,
closeOnConfirm:false, closeOnConfirm: false,
onConfirm: function(e) { onConfirm: function (e) {
//不能使用e.data因为无法获取动态添加的 //不能使用e.data因为无法获取动态添加的
var data = collectData("am-modal-prompt-input-cost"); var data = collectData("am-modal-prompt-input-cost");
//data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false); //data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false);
data = prepareAjaxDataVerify(data, COST_DETAIL2, $("#id").val()); data = prepareAjaxDataVerify(data, COST_DETAIL2, $("#id").val());
if(data){ if (data) {
postAjax(base+"/project/budgetEditSaveCostDetail", data, updateCostData); 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"); var data = collectData("am-modal-prompt-input-cost");
//data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false); //data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val(),false);
data = prepareAjaxDataVerify(data, COST_DETAIL2, $("#id").val()); data = prepareAjaxDataVerify(data, COST_DETAIL2, $("#id").val());
if(data){ if (data) {
postAjax(base+"/project/budgetEditSaveCostDetail", data, updateCostData); postAjax(base + "/project/budgetEditSaveCostDetail", data, updateCostData);
} }
}); });
@ -163,7 +163,7 @@ $(function () {
bindDeleteBtnCost(); 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); //console.log(SELECT_TYPE_CATEGORY_DATA);
var options = '<option value="xxxx" disabled selected>--请选择--</option>\r\n'; var options = '<option value="xxxx" disabled selected>--请选择--</option>\r\n';
SELECT_TYPE_CATEGORY_DATA.forEach(function (e) { SELECT_TYPE_CATEGORY_DATA.forEach(function (e) {
options+='<option value="'+e.id+'">'+e.name+'</option>\r\n'; options += '<option value="' + e.id + '">' + e.name + '</option>\r\n';
}); });
var template = '<tr>' + var template = '<tr>' +
'<td width="60px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-budget-num" readonly></td>' + '<td width="60px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-budget-num" readonly></td>' +
'<td width="70px"><select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type">'+ '<td width="70px"><select style="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>' +
'<option value="3">服务</option>'+ '<option value="3">服务</option>' +
'<option value="4">其他</option>'+ '<option value="4">其他</option>' +
'</select>'+ '</select>' +
'</td>'+ '</td>' +
'<td width="150px">'+ '<td width="150px">' +
'<select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-category">'+ '<select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-category input-changeable-tax-rate-cost-select">' +
'<option value="华智产品">华智产品 </option> <option value="华三产品">华三产品 </option><option value="汇智产品"> 汇智产品</option><option value="自定义">自定义</option>'+
/*'<option value="1"></option>'+ '<input type="hidden" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate-cost-name">' +
'<option value="2">紫光其他产品</option>'+ '</select>' +
'<option value="3">外购产品</option>'+ '</td>' +
'<option value="4">外购工程</option>'+ '<td width="100px"><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 input-changeable-tax-rate-cost"></td>' +
'<option value="5">华智服务</option>'+ '<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-include input-changeable-total-tax-include-cost"></td>' +
'<option value="6">紫光其他服务</option>'+ '<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-exclude input-changeable-total-tax-exclude-cost" readonly></td>' +
'<option value="7">外购服务</option>'+ '<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax input-changeable-total-tax-cost" readonly></td>' +
'<option value="8">其他</option>'+*/ '<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" ></td>\n' +
options+
'</select>'+
'</td>'+
// '<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost"></td>'+
// '<td width="80px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost""></td>'+
// '<td width="100px"><input type="text" maxlength="14" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-amount input-changeable-amount-cost"></td>'+
// '<td width="100px"><input type="text" min="0.00" max="9999999999.99" step="0.01" maxlength="19" class="price am-modal-prompt-input am-modal-prompt-input-cost input-changeable-price input-changeable-price-cost"></td>'+
'<td width="100px"><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 input-changeable-tax-rate-cost"></td>'+
'<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-include input-changeable-total-tax-include-cost"></td>'+
'<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-exclude input-changeable-total-tax-exclude-cost" readonly></td>'+
'<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax input-changeable-total-tax-cost" readonly></td>'+
'<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" ></td>\n' + '<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" ></td>\n' +
// '<td width="60px">\n' + '<td width="60px"><button type="button" style="margin-top: 10px" class="am-btn am-btn-danger am-btn-xs am-round am-modal-line-delete"><span class="am-icon-minus"></span></button></td>' +
// ' <select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-underwritten">\n' +
// ' <option value="0" ></option>\n' +
// ' <option value="1" >是</option>\n' +
// ' <option value="2" >否</option>\n' +
// ' </select>\n' +
// '</td>\n' +
// '<td width="100px"><input type="text" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-underwritten-amount-cost" ></td>\n' +
// '<td width="130px"><input style="float: left;" type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" data-am-datepicker></td>\n' +
// '<td width="100px"><input type="text" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-pay-amount-cost" ></td>\n' +
// '<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" ></td>\n' +
'<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost" ></td>\n' +
'<td width="60px"><button type="button" style="margin-top: 10px" class="am-btn am-btn-danger am-btn-xs am-round am-modal-line-delete"><span class="am-icon-minus"></span></button></td>'+
'</tr>'; '</tr>';
$("#costTotal").before(template); $("#costTotal").before(template);
@ -328,22 +303,22 @@ function updateCostData(data, returnData) {
var costTaxRates = ""; var costTaxRates = "";
var set = new Set(); var set = new Set();
details.forEach(function (t, number, ts) { details.forEach(function (t, number, ts) {
if(t["type"] == "1"){ if (t["type"] == "1") {
//设备类 //设备类
deviceTaxInclude += f2(t["totalTaxInclude"]); deviceTaxInclude += f2(t["totalTaxInclude"]);
deviceTaxExclude += f2(t["totalTaxExclude"]); deviceTaxExclude += f2(t["totalTaxExclude"]);
deviceTax += f2(t["totalTax"]); deviceTax += f2(t["totalTax"]);
}else if(t["type"] == "2"){ } else if (t["type"] == "2") {
//施工类 //施工类
buildTaxInclude += f2(t["totalTaxInclude"]); buildTaxInclude += f2(t["totalTaxInclude"]);
buildTaxExclude += f2(t["totalTaxExclude"]); buildTaxExclude += f2(t["totalTaxExclude"]);
buildTax += f2(t["totalTax"]); buildTax += f2(t["totalTax"]);
}else if(t["type"] == "3"){ } else if (t["type"] == "3") {
//服务类 //服务类
serviceTaxInclude += f2(t["totalTaxInclude"]); serviceTaxInclude += f2(t["totalTaxInclude"]);
serviceTaxExclude += f2(t["totalTaxExclude"]); serviceTaxExclude += f2(t["totalTaxExclude"]);
serviceTax += f2(t["totalTax"]); serviceTax += f2(t["totalTax"]);
}else if(t["type"] == "4"){ } else if (t["type"] == "4") {
//其他类 //其他类
otherTaxInclude += f2(t["totalTaxInclude"]); otherTaxInclude += f2(t["totalTaxInclude"]);
otherTaxExclude += f2(t["totalTaxExclude"]); 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-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-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) $(".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-project-manage-cost-budget-plan").val())
+f2($(".input-total-title-earnest-money-cost-budget-plan").val()))); + f2($(".input-total-title-earnest-money-cost-budget-plan").val())));
/* var costOtherOtherTaxInclude = f2($("input[name='costOtherOtherTaxInclude']").val()); /* var costOtherOtherTaxInclude = f2($("input[name='costOtherOtherTaxInclude']").val());
var costOtherOtherTaxExclude = f2($("input[name='costOtherOtherTaxExclude']").val()); var costOtherOtherTaxExclude = f2($("input[name='costOtherOtherTaxExclude']").val());
var costProjectManageTaxInclude = f2($("input[name='costProjectManageTaxInclude']").val()); var costProjectManageTaxInclude = f2($("input[name='costProjectManageTaxInclude']").val());
var costProjectManageTaxExclude = f2($("input[name='costProjectManageTaxExclude']").val()); var costProjectManageTaxExclude = f2($("input[name='costProjectManageTaxExclude']").val());
$("input[name='costTotalTaxInclude']").val(f2(deviceTaxInclude+buildTaxInclude+serviceTaxInclude+otherTaxInclude+costOtherOtherTaxInclude+costProjectManageTaxInclude)); $("input[name='costTotalTaxInclude']").val(f2(deviceTaxInclude+buildTaxInclude+serviceTaxInclude+otherTaxInclude+costOtherOtherTaxInclude+costProjectManageTaxInclude));
$("input[name='costTotalTaxExclude']").val(f2(deviceTaxExclude+buildTaxExclude+serviceTaxExclude+otherTaxExclude+costOtherOtherTaxExclude+costProjectManageTaxExclude));*/ $("input[name='costTotalTaxExclude']").val(f2(deviceTaxExclude+buildTaxExclude+serviceTaxExclude+otherTaxExclude+costOtherOtherTaxExclude+costProjectManageTaxExclude));*/
calCostExclude(); calCostExclude();
calCostInclude(); calCostInclude();
@ -445,19 +420,27 @@ function bindOtherOtherChangeable() {
*/ */
function bindTypeSelectChange() { 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 nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-cost-select");
var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-cost-name"); var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-cost-name");
var type = $(this).val(); var type = $(this).val();
if(type == '自定义') { if (type == '自定义') {
nameSelect.attr("style", "display:none"); nameSelect.attr("style", "display:none");
nameInput.attr("type", "text"); nameInput.attr("type", "text");
} else{ } else {
nameSelect.attr("style", "display:block"); nameSelect.attr("style", "display:block");
nameInput.attr("type", "hidden"); 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 * SELECT_TYPE_CATEGORY_MAP_DATA
@ -472,20 +455,20 @@ function initTypeCategory(params, data) {
var temp = []; var temp = [];
map[t].forEach(function (g) { map[t].forEach(function (g) {
temp.push({ temp.push({
name:g.name, name: g.name,
id:g.id+"" id: g.id + ""
}); });
}); });
SELECT_TYPE_CATEGORY_MAP_DATA[t]= temp; SELECT_TYPE_CATEGORY_MAP_DATA[t] = temp;
}); });
var procurementTypes = d.procurementTypes; var procurementTypes = d.procurementTypes;
procurementTypes.forEach(function (e) { procurementTypes.forEach(function (e) {
SELECT_TYPE_CATEGORY_DATA.push({ SELECT_TYPE_CATEGORY_DATA.push({
id:e.id+"", id: e.id + "",
name:e.name 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"; //SELECT_CATEGORY_TYPE_MAP_DATA["xxxx"]="xxxx";

View File

@ -2,24 +2,24 @@
* 一个收入详情的字段 * 一个收入详情的字段
*/ */
//INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"]; //INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
INCOME_DETAIL2={ INCOME_DETAIL2 = {
"num":[false,"序号","string"], "num": [false, "序号", "string"],
"type":[false,"类别","string"], "type": [false, "类别", "string"],
"name":[false,"产品大类","string"], "name": [false, "产品大类", "string"],
"taxRate":[false,"税率","number"], "taxRate": [false, "税率", "number"],
"totalTaxInclude":[false,"含税总金额","number"], "totalTaxInclude": [false, "含税总金额", "number"],
"totalTaxExclude":[false,"不含税金额","number"], "totalTaxExclude": [false, "不含税金额", "number"],
"totalTax":[false,"税金","number"] "totalTax": [false, "税金", "number"]
}; };
INCOME_DETAIL={ INCOME_DETAIL = {
"num":[false,"序号","string"], "num": [false, "序号", "string"],
"type":[false,"类别","string"], "type": [false, "类别", "string"],
"name":[false,"产品大类","string"], "name": [false, "产品大类", "string"],
"taxRate":[false,"税率","number"], "taxRate": [false, "税率", "number"],
"totalTaxInclude":[false,"含税总金额","number"], "totalTaxInclude": [false, "含税总金额", "number"],
"totalTaxExclude":[false,"不含税金额","number"], "totalTaxExclude": [false, "不含税金额", "number"],
"totalTax":[false,"税金","number"] "totalTax": [false, "税金", "number"]
}; };
/*$(function () { /*$(function () {
@ -49,17 +49,17 @@ $(function () {
$("#income-detail").click(function () { $("#income-detail").click(function () {
$('#my-prompt-income-detail').modal({ $('#my-prompt-income-detail').modal({
relatedTarget: this, relatedTarget: this,
closeOnConfirm:false, closeOnConfirm: false,
onConfirm: function(e) { onConfirm: function (e) {
//不能使用e.data因为无法获取动态添加的 //不能使用e.data因为无法获取动态添加的
var data = collectData("am-modal-prompt-input-income"); var data = collectData("am-modal-prompt-input-income");
//data = prepareAjaxData(data, INCOME_DETAIL_ARR, $("#id").val(),false); //data = prepareAjaxData(data, INCOME_DETAIL_ARR, $("#id").val(),false);
data = prepareAjaxDataVerify(data, INCOME_DETAIL2, $("#id").val()); data = prepareAjaxDataVerify(data, INCOME_DETAIL2, $("#id").val());
if(data.details){ if (data.details) {
postAjax(base+"/project/budgetEditSaveIncomeDetail", data, updateIncomeData); postAjax(base + "/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
} }
}, },
onCancel: function(e) { onCancel: function (e) {
} }
}); });
}); });
@ -70,8 +70,8 @@ $(function () {
$("#incomeTableSave").click(function () { $("#incomeTableSave").click(function () {
var data = collectData("am-modal-prompt-input-income"); var data = collectData("am-modal-prompt-input-income");
data = prepareAjaxDataVerify(data, INCOME_DETAIL2, $("#id").val()); data = prepareAjaxDataVerify(data, INCOME_DETAIL2, $("#id").val());
if(data.details){ if (data.details) {
postAjax(base+"/project/budgetEditSaveIncomeDetail", data, updateIncomeData); postAjax(base + "/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
} }
}); });
$("#incomeAddBtn").click(function () { $("#incomeAddBtn").click(function () {
@ -85,7 +85,7 @@ $(function () {
/** /**
* 更新页面收入的数据累加 * 更新页面收入的数据累加
*/ */
function updateIncomeData(data,returnData) { function updateIncomeData(data, returnData) {
var incomeDetails = data.details; var incomeDetails = data.details;
var deviceTaxInclude = 0; var deviceTaxInclude = 0;
var deviceTaxExclude = 0; var deviceTaxExclude = 0;
@ -101,17 +101,17 @@ function updateIncomeData(data,returnData) {
incomeDetails.forEach(function (t, number, ts) { incomeDetails.forEach(function (t, number, ts) {
console.log("income income " + t["type"] + ", " + t["taxRate"] + ", " + t["totalTaxInclude"] + ", " + t["totalTaxExclude"]); console.log("income income " + t["type"] + ", " + t["taxRate"] + ", " + t["totalTaxInclude"] + ", " + t["totalTaxExclude"]);
if(t["type"] == "1"){ if (t["type"] == "1") {
//设备类 //设备类
deviceTaxInclude += f2(t["totalTaxInclude"]); deviceTaxInclude += f2(t["totalTaxInclude"]);
deviceTaxExclude += f2(t["totalTaxExclude"]); deviceTaxExclude += f2(t["totalTaxExclude"]);
deviceTax += f2(t["totalTax"]); deviceTax += f2(t["totalTax"]);
}else if(t["type"] == "2"){ } else if (t["type"] == "2") {
//工程类 //工程类
engineerTaxInclude += f2(t["totalTaxInclude"]); engineerTaxInclude += f2(t["totalTaxInclude"]);
engineerTaxExclude += f2(t["totalTaxExclude"]); engineerTaxExclude += f2(t["totalTaxExclude"]);
engineerTax += f2(t["totalTax"]); engineerTax += f2(t["totalTax"]);
}else if(t["type"] == "3"){ } else if (t["type"] == "3") {
//服务类 //服务类
serviceTaxInclude += f2(t["totalTaxInclude"]); serviceTaxInclude += f2(t["totalTaxInclude"]);
serviceTaxExclude += f2(t["totalTaxExclude"]); serviceTaxExclude += f2(t["totalTaxExclude"]);
@ -133,15 +133,15 @@ function updateIncomeData(data,returnData) {
$("input[name='incomeServiceTaxExclude']").val(f2Fixed(serviceTaxExclude)); $("input[name='incomeServiceTaxExclude']").val(f2Fixed(serviceTaxExclude));
$("input[name='incomeServiceTax']").val(f2Fixed(serviceTax)); $("input[name='incomeServiceTax']").val(f2Fixed(serviceTax));
$("input[name='incomeTotalTaxInclude']").val(f2Fixed(deviceTaxInclude+engineerTaxInclude+serviceTaxInclude)); $("input[name='incomeTotalTaxInclude']").val(f2Fixed(deviceTaxInclude + engineerTaxInclude + serviceTaxInclude));
$("input[name='incomeTotalTaxExclude']").val(f2Fixed(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude)); $("input[name='incomeTotalTaxExclude']").val(f2Fixed(deviceTaxExclude + engineerTaxExclude + serviceTaxExclude));
$("input[name='incomeTotalTax']").val(f2Fixed(deviceTax+engineerTax+serviceTax)); $("input[name='incomeTotalTax']").val(f2Fixed(deviceTax + engineerTax + serviceTax));
$("input[name='costCompanyManageTaxExclude']").val(f2Fixed(0.028*(deviceTaxExclude+engineerTaxExclude+serviceTaxExclude))); $("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-sale-income-budget-plan").val($("input[name='incomeTotalTaxInclude']").val());
$(".input-total-title-total-income-budget-plan").val(f2Fixed(f2($("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(); updateProjectContributionProfitRate();
@ -154,8 +154,6 @@ function updateIncomeData(data,returnData) {
} }
/** /**
* 收入明细增加一行 * 收入明细增加一行
*/ */
@ -163,18 +161,18 @@ 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><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-budget-num" readonly></td>\n' +
' <td width="100px">\n' + ' <td width="100px">\n' +
' <select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-income">\n' + ' <select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-income am-modal-prompt-input-income-type">\n' +
' <option value="1">设备类</option>\n' + ' <option value="1">设备类</option>\n' +
' <option value="2">工程类</option>\n' + ' <option value="2">工程类</option>\n' +
' <option value="3">服务类</option>\n' + ' <option value="3">服务类</option>\n' +
' </select>\n' + ' </select>\n' +
' </td>\n' + ' </td>' +
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income"></td>\n' + '<td>' +
// ' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income"></td>\n' + '<select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-category input-changeable-tax-rate-income-select">' +
// ' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income"></td>\n' + '<option value="华智产品">华智产品 </option> <option value="华三产品">华三产品 </option><option value="汇智产品"> 汇智产品</option><option value="自定义">自定义</option>' +
// ' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income"></td>\n' + '<input type="hidden" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate-income-name">' +
// ' <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' + '</select>' +
// ' <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>' +
' <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' + ' <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' +
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-tax-include input-changeable-total-tax-include-income"></td>\n' + ' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-tax-include input-changeable-total-tax-include-income"></td>\n' +
' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-tax-exclude input-changeable-total-tax-exclude-income" readonly></td>\n' + ' <td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-total-tax-exclude input-changeable-total-tax-exclude-income" readonly></td>\n' +
@ -242,19 +240,27 @@ function bindIncomeTotal() {
}); });
} }
function bindTypeSelectChangeIncome() { 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 nameSelect = $(this).parent().parent().find(".input-changeable-tax-rate-income-select");
var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-income-name"); var nameInput = $(this).parent().parent().find(".input-changeable-tax-rate-income-name");
var type = $(this).val(); var type = $(this).val();
if(type == '自定义') { if (type == '自定义') {
nameSelect.attr("style", "display:none"); nameSelect.attr("style", "display:none");
nameInput.attr("type", "text"); nameInput.attr("type", "text");
} else{ } else {
nameSelect.attr("style", "display:block"); nameSelect.attr("style", "display:block");
nameInput.attr("type", "hidden"); 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");
})
} }

View File

@ -232,11 +232,12 @@
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="font-size: 15px">项目名称:</span></th> <th class="table-title" colspan="1"><span style="font-size: 15px">项目名称:</span></th>
<td class="table-title" colspan="5"><input readonly value="${project.name!}"/></td> <td class="table-title" colspan="2"><input readonly value="${project.name!}"/></td>
<td class="table-title" colspan="3" >
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="font-size: 15px">项目类型:</span></th> <th class="table-title" colspan="1"><span style="font-size: 15px">项目类型:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="2">
<#if project.type??> <#if project.type??>
<#if (project.type) =1> <#if (project.type) =1>
<input readonly value="工程集成类"/> <input readonly value="工程集成类"/>
@ -249,6 +250,7 @@
<input readonly value=""/> <input readonly value=""/>
</#if> </#if>
</td> </td>
<td class="table-title" colspan="3" >
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="font-size: 15px">垫资模式:</span></th> <th class="table-title" colspan="1"><span style="font-size: 15px">垫资模式:</span></th>
@ -599,7 +601,7 @@
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span <th class="table-title" colspan="1"><span
style="font-size: 15px">垫资模式:</span></th> style="font-size: 15px">垫资模式:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="2">
<#if projectBudget.underwrittenModeBudget??> <#if projectBudget.underwrittenModeBudget??>
<#if (projectBudget.underwrittenModeBudget) =1> <#if (projectBudget.underwrittenModeBudget) =1>
<input readonly value="不垫资"/> <input readonly value="不垫资"/>
@ -613,7 +615,7 @@
</#if> </#if>
</td> </td>
<th class="table-title" colspan="4" id="noUnder0b" <th class="table-title" colspan="3" id="noUnder0b"
<#if projectBudget.underwrittenModeBudget! gt 2>hidden</#if>></th> <#if projectBudget.underwrittenModeBudget! gt 2>hidden</#if>></th>
<th class="table-title" colspan="1" id="noUnder1b" <th class="table-title" colspan="1" id="noUnder1b"
@ -656,12 +658,12 @@
<th class="table-title" colspan="2"></th> <th class="table-title" colspan="2"></th>
<th class="table-title" colspan="1"><span <th class="table-title" colspan="1"><span
style="font-size: 15px">项目毛利:</span></th> style="font-size: 15px">项目毛利B:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="1">
<input readonly value="${Utils.format(projectBudget.grossProfitBudget)}"/> <input readonly value="${Utils.format(projectBudget.grossProfitBudget)}"/>
</td> </td>
<th class="table-title" colspan="1"><span <th class="table-title" colspan="1"><span
style="font-size: 15px">项目毛利率:</span></th> style="font-size: 15px">项目毛利B利率:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="1">
<input readonly <input readonly
value="${Utils.format(projectBudget.grossProfitMarginBudget)}"/> value="${Utils.format(projectBudget.grossProfitMarginBudget)}"/>

View File

@ -143,11 +143,12 @@
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="font-size: 15px">项目名称:</span></th> <th class="table-title" colspan="1"><span style="font-size: 15px">项目名称:</span></th>
<td class="table-title" colspan="5"><input readonly value="${project.name!}"/></td> <td class="table-title" colspan="2"><input readonly value="${project.name!}"/></td>
<td class="table-title" colspan="3">
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="font-size: 15px">项目类型:</span></th> <th class="table-title" colspan="1"><span style="font-size: 15px">项目类型:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="2">
<#if project.type??> <#if project.type??>
<#if (project.type) =1> <#if (project.type) =1>
<input readonly value="工程集成类"/> <input readonly value="工程集成类"/>
@ -160,6 +161,7 @@
<input readonly value=""/> <input readonly value=""/>
</#if> </#if>
</td> </td>
<td class="table-title" colspan="3">
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="font-size: 15px">垫资模式:</span></th> <th class="table-title" colspan="1"><span style="font-size: 15px">垫资模式:</span></th>
@ -424,6 +426,11 @@
</div> </div>
<div class="am-tab-panel am-fade am-in am-active" id="tab2"> <div class="am-tab-panel am-fade am-in am-active" id="tab2">
<input name="projectId" id="projectId" type="hidden" value="${projectBudget.projectId}"/> <input name="projectId" id="projectId" type="hidden" value="${projectBudget.projectId}"/>
<input name="incomeDetailAttr" id="incomeDetailAttr" type="hidden"
value="${projectBudget.costDetailAttr}"/>
<input name="costDetailAttr" id="costDetailAttr" type="hidden"
value="${projectBudget.costDetailAttr}"/>
<!--验证表单元素validate) begin--> <!--验证表单元素validate) begin-->
<table id="myTable" class="am-table am-table-bordered"> <table id="myTable" class="am-table am-table-bordered">
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
@ -443,12 +450,13 @@
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="color: red;">*</span><span <th class="table-title" colspan="1"><span style="color: red;">*</span><span
style="font-size: 15px">项目名称:</span></th> style="font-size: 15px">项目名称:</span></th>
<td class="table-title" colspan="5"> <td class="table-title" colspan="2">
<input type="text" id="nameBudget" style="border-style:none;" data-validate-async <input type="text" id="nameBudget" style="border-style:none;" data-validate-async
data-validation-message="请输入项目名称1000字符以内" data-validation-message="请输入项目名称1000字符以内"
name="nameBudget" placeholder="请输入项目名称1000字符以内" maxlength="1000" name="nameBudget" placeholder="请输入项目名称1000字符以内" maxlength="1000"
value="${projectBudget.nameBudget!}"/> value="${projectBudget.nameBudget!}"/>
</td> </td>
<td class="table-title" colspan="3">
</tr> </tr>
<#if project.approveStatusBudget == 2> <#if project.approveStatusBudget == 2>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
@ -467,7 +475,7 @@
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="color: red;">*</span><span <th class="table-title" colspan="1"><span style="color: red;">*</span><span
style="font-size: 15px">项目类型:</span></th> style="font-size: 15px">项目类型:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="2">
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" <select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}"
id="typeBudget" name="typeBudget"> id="typeBudget" name="typeBudget">
<option value="1" <#if projectBudget.typeBudget=1>selected</#if>>工程集成类 <option value="1" <#if projectBudget.typeBudget=1>selected</#if>>工程集成类
@ -476,11 +484,12 @@
</option> </option>
</select> </select>
</td> </td>
<td class="table-title" colspan="3">
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1"><span style="color: red;">*</span><span <th class="table-title" colspan="1"><span style="color: red;">*</span><span
style="font-size: 15px">垫资模式:</span></th> style="font-size: 15px">垫资模式:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="2">
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" <select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}"
id="underwrittenModeBudget" name="underwrittenModeBudget" id="underwrittenModeBudget" name="underwrittenModeBudget"
onchange="changeCheckB()"> onchange="changeCheckB()">
@ -496,7 +505,7 @@
</select> </select>
</td> </td>
<th class="table-title" colspan="4" id="noUnder0b" <th class="table-title" colspan="3" id="noUnder0b"
<#if projectBudget.underwrittenModeBudget! gt 2>hidden</#if>></th> <#if projectBudget.underwrittenModeBudget! gt 2>hidden</#if>></th>
<th class="table-title" colspan="1" id="noUnder1b" <th class="table-title" colspan="1" id="noUnder1b"
@ -558,7 +567,7 @@
<th class="table-title" colspan="2"></th> <th class="table-title" colspan="2"></th>
<th class="table-title" colspan="1"><span style="color: red;">*</span><span <th class="table-title" colspan="1"><span style="color: red;">*</span><span
style="font-size: 15px">项目毛利:</span></th> style="font-size: 15px">项目毛利B:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="1">
<input type="text" class="number am-input" style="border-style:none;" <input type="text" class="number am-input" style="border-style:none;"
data-validate-async data-validation-message="请输入项目毛利" data-validate-async data-validation-message="请输入项目毛利"
@ -567,7 +576,7 @@
value="${Utils.format(projectBudget.grossProfitBudget)}"/> value="${Utils.format(projectBudget.grossProfitBudget)}"/>
</td> </td>
<th class="table-title" colspan="1"><span style="color: red;">*</span><span <th class="table-title" colspan="1"><span style="color: red;">*</span><span
style="font-size: 15px">项目毛利率:</span></th> style="font-size: 15px">项目毛利B利率:</span></th>
<td class="table-title" colspan="1"> <td class="table-title" colspan="1">
<input type="text" class="number am-input" style="border-style:none;" <input type="text" class="number am-input" style="border-style:none;"
data-validate-async data-validation-message="请输入项目毛利率" data-validate-async data-validation-message="请输入项目毛利率"
@ -872,13 +881,20 @@
onclick="location.href='${base}/project/incomeTemplate'"> onclick="location.href='${base}/project/incomeTemplate'">
<span class="am-icon-archive"></span> 导入模板下载 <span class="am-icon-archive"></span> 导入模板下载
</button> </button>
<span>销售合同配置清单</span>
<input id="file_upload_icon" type="file" name="files[]" accept=".xls,.xlsx">
<span id="collaboratorUrl"></span>
</div> </div>
</div> </div>
</div> </div>
<div class="fixed-table has-actions"> <div>
<button type="button" class="am-btn am-btn-default">
<label class="file-label" for="file_upload_icon"
style="margin: 0;cursor: pointer"><span class="am-icon-upload"></span>销售合同配置清单</label>
</button>
<input id="file_upload_icon" type="file" accept=".xls,.xlsx" style="display:none;">
<span id="collaboratorUrl_check" style="margin-left: 5px;cursor: pointer"
onclick="downFile()" fileUrl="${projectBudget.incomeDetailAttr}">${projectBudget.incomeDetailAttr?projectBudget.incomeDetailAttr.split('/')[projectBudget.incomeDetailAttr.split('/').length-1]:''}</span>
</div>
<div class="fixed-table has-actions" style="max-height: calc(100% - 110px)">
<table class="am-table am-table-bordered am-table-radius table-main" <table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;" id="incomeTable"> style="padding:0;" id="incomeTable">
<thead> <thead>
@ -886,11 +902,6 @@
<th>序号</th> <th>序号</th>
<th width="100px">类别</th> <th width="100px">类别</th>
<th>产品大类</th> <th>产品大类</th>
<#-- <th>规格类型</th>-->
<#-- <th>参数</th>-->
<#-- <th>单位</th>-->
<#-- <th>数量</th>-->
<#-- <th>单价</th>-->
<th>税率(%</th> <th>税率(%</th>
<th>含税总金额(元)</th> <th>含税总金额(元)</th>
<th>不含税金额(元)</th> <th>不含税金额(元)</th>
@ -907,7 +918,7 @@
value="${(incomeDetail_index+1)!}" readonly></td> value="${(incomeDetail_index+1)!}" readonly></td>
<td width="100px"> <td width="100px">
<select <select
class="am-modal-prompt-input am-modal-prompt-input-income"> class="am-modal-prompt-input am-modal-prompt-input-income am-modal-prompt-input-income-type">
<option value="1" <option value="1"
<#if incomeDetail.type == 1>selected</#if>>设备类 <#if incomeDetail.type == 1>selected</#if>>设备类
</option> </option>
@ -1094,7 +1105,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="fixed-table has-actions is-vertical-scroll"> <div>
<button type="button" class="am-btn am-btn-default">
<label class="file-label" for="file_upload_icon"
style="margin: 0;cursor: pointer"><span class="am-icon-upload"></span>销售合同配置清单</label>
</button>
<input id="file_upload_icon2" type="file" accept=".xls,.xlsx" style="display:none;">
<span id="collaboratorUrl_check" style="margin-left: 5px;cursor: pointer"
onclick="downFile()" fileUrl="${projectBudget.costDetailAttr}">${projectBudget.costDetailAttr?projectBudget.costDetailAttr.split('/')[projectBudget.costDetailAttr.split('/').length-1]:''}</span>
</div>
<div class="fixed-table has-actions is-vertical-scroll" style="max-height: calc(100% - 110px)">
<table class="am-table am-table-bordered am-table-radius table-main" <table class="am-table am-table-bordered am-table-radius table-main"
style="padding:0;" id="costTable"> style="padding:0;" id="costTable">
<thead style="display:block;width: 1810px;"> <thead style="display:block;width: 1810px;">
@ -1520,7 +1540,8 @@
readonly/></td> readonly/></td>
<td style="display: block;"><input type="text" <td style="display: block;"><input type="text"
class="number am-modal-prompt-input input-total-title-device-cost-budget-plan" class="number am-modal-prompt-input input-total-title-device-cost-budget-plan"
value="${Utils.format(projectBudgetPlanDetailTotalTitle.deviceCost)}" readonly/> value="${Utils.format(projectBudgetPlanDetailTotalTitle.deviceCost)}"
readonly/>
</td> </td>
<td style="display: block;"><input type="text" <td style="display: block;"><input type="text"
@ -1663,7 +1684,8 @@
oninput="if(value.length>16)value=value.slice(0,16)" oninput="if(value.length>16)value=value.slice(0,16)"
maxlength="16" maxlength="16"
class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-device-cost-budget-plan" class="number am-modal-prompt-input am-modal-prompt-input-budget-plan-detail input-changeable-device-cost-budget-plan"
value="${Utils.format(projectBudgetPlanDetail.deviceCost)}" readonly> value="${Utils.format(projectBudgetPlanDetail.deviceCost)}"
readonly>
</td> </td>
<td style="display: block;"><input type="text" <td style="display: block;"><input type="text"
oninput="if(value.length>16)value=value.slice(0,16)" oninput="if(value.length>16)value=value.slice(0,16)"
@ -1926,8 +1948,8 @@
<#-- </tr>--> <#-- </tr>-->
<tr> <tr>
<td>合计</td> <td>合计</td>
<#-- <td></td>--> <#-- <td></td>-->
<#-- <td></td>--> <#-- <td></td>-->
<td><input type="text" class="number" name="costTotalTaxInclude" <td><input type="text" class="number" name="costTotalTaxInclude"
value="${Utils.format(budgetBean.costTotalTaxInclude,'0')}" readonly value="${Utils.format(budgetBean.costTotalTaxInclude,'0')}" readonly
title="此列累计"></td> title="此列累计"></td>
@ -2426,7 +2448,7 @@
var progressText = $("#progress-text-" + name);//进度条提示 var progressText = $("#progress-text-" + name);//进度条提示
var progressBar = $(".am-progress-bar");//进度条 var progressBar = $(".am-progress-bar");//进度条
$("#file_upload_icon").fileupload({ $("#file_upload_icon2").fileupload({
url: "${base}/file/upload", url: "${base}/file/upload",
dataType: 'json', dataType: 'json',
maxFileSize: 50 * 1024 * 1024, maxFileSize: 50 * 1024 * 1024,
@ -2440,8 +2462,9 @@
done: function (e, data) { done: function (e, data) {
console.log(data); console.log(data);
//设置服务器返回的url //设置服务器返回的url
$("#collaboratorUrlBudget").val(data.result.data.url); $("#collaboratorUrl_check").text(data.result.data.newName).attr('fileUrl', data.result.data.url);
$("#collaboratorUrl_check").text(data.result.data.newName); $("#costDetailAttr").val(data.result.data.url)
// console.log("collboratorUrl: " + $("#collaboratorUrl").val()); // console.log("collboratorUrl: " + $("#collaboratorUrl").val());
setTimeout(function () { setTimeout(function () {
progressArea.addClass("am-hide"); progressArea.addClass("am-hide");
@ -2449,7 +2472,6 @@
}, },
progressall: function (e, data) { progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10); var progress = parseInt(data.loaded / data.total * 100, 10);
console.log(progress);
progressBar.css("width", progress + "%"); progressBar.css("width", progress + "%");
progressText.html(progress + "%"); progressText.html(progress + "%");
}, },
@ -2500,8 +2522,10 @@
console.log(data); console.log(data);
//设置服务器返回的url //设置服务器返回的url
$("#collaboratorUrl").val(data.result.data.url); $("#collaboratorUrl").val(data.result.data.url);
$("#collaboratorUrl_check").text(data.result.newName); $("#collaboratorUrl_check").text(data.result.data.newName).attr('fileUrl', data.result.data.url);
// console.log("collboratorUrl: " + $("#collaboratorUrl").val()); // console.log("collboratorUrl: " + $("#collaboratorUrl").val());
$("#incomeDetailAttr").val(data.result.data.url)
setTimeout(function () { setTimeout(function () {
progressArea.addClass("am-hide"); progressArea.addClass("am-hide");
}, 1500); }, 1500);
@ -2538,6 +2562,12 @@
} }
}); });
}; };
function downFile() {
var url = $('#collaboratorUrl_check').attr('fileUrl')
if (url)
location.href = url
}
</script> </script>
</@defaultLayout.layout> </@defaultLayout.layout>

View File

@ -60,23 +60,26 @@
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目名称:</span></th> <th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目名称:</span></th>
<td class="table-title" colspan="5" > <td class="table-title" colspan="2" >
<input type="text" id="name" style="border-style:none;" data-validate-async data-validation-message="请输入项目名称1000字符以内" <input type="text" id="name" style="border-style:none;" data-validate-async data-validation-message="请输入项目名称1000字符以内"
name="name" placeholder="请输入项目名称1000字符以内" maxlength="1000" value="" /> name="name" placeholder="请输入项目名称1000字符以内" maxlength="1000" value="" />
</td> </td>
<td class="table-title" colspan="3" >
</td>
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目类型:</span></th> <th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目类型:</span></th>
<td class="table-title" colspan="1" > <td class="table-title" colspan="2" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="type" name="type" > <select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="type" name="type" >
<option value="1" >工程集成类</option> <option value="1" >工程集成类</option>
<option value="2" >设备集成类</option> <option value="2" >设备集成类</option>
</select> </select>
</td> </td>
<td class="table-title" colspan="3" >
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">垫资模式:</span></th> <th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">垫资模式:</span></th>
<td class="table-title" colspan="1" id="spanMode" > <td class="table-title" colspan="2" id="spanMode" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="underwrittenMode" name="underwrittenMode" onchange="changeCheck()"> <select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="underwrittenMode" name="underwrittenMode" onchange="changeCheck()">
<option value="1" >不垫资</option> <option value="1" >不垫资</option>
<option value="3" >垫资(账期覆盖)</option> <option value="3" >垫资(账期覆盖)</option>
@ -84,7 +87,7 @@
</select> </select>
</td> </td>
<th class="table-title" colspan="4" id="noUnder0"></th> <th class="table-title" colspan="3" id="noUnder0"></th>
<th class="table-title" colspan="1" id="noUnder1" hidden><span style="color: red;">*</span><span style="font-size: 15px">垫资利息:</span></th> <th class="table-title" colspan="1" id="noUnder1" hidden><span style="color: red;">*</span><span style="font-size: 15px">垫资利息:</span></th>
<td class="table-title" colspan="1" id="noUnder2" hidden> <td class="table-title" colspan="1" id="noUnder2" hidden>

View File

@ -64,23 +64,25 @@
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目名称:</span></th> <th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目名称:</span></th>
<td class="table-title" colspan="5" > <td class="table-title" colspan="2" >
<input type="text" id="name" style="border-style:none;" data-validate-async data-validation-message="请输入项目名称1000字符以内" <input type="text" id="name" style="border-style:none;" data-validate-async data-validation-message="请输入项目名称1000字符以内"
name="name" placeholder="请输入项目名称1000字符以内" maxlength="1000" value="${project.name!}" /> name="name" placeholder="请输入项目名称1000字符以内" maxlength="1000" value="${project.name!}" />
</td> </td>
<td class="table-title" colspan="3" >
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目类型:</span></th> <th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">项目类型:</span></th>
<td class="table-title" colspan="1" > <td class="table-title" colspan="2" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="type" name="type" > <select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="type" name="type" >
<option value="1" <#if project.type=1>selected</#if>>工程集成类</option> <option value="1" <#if project.type=1>selected</#if>>工程集成类</option>
<option value="2" <#if project.type=2>selected</#if>>设备集成类</option> <option value="2" <#if project.type=2>selected</#if>>设备集成类</option>
</select> </select>
</td> </td>
<td class="table-title" colspan="3" >
</tr> </tr>
<tr class="am-text-nowrap"> <tr class="am-text-nowrap">
<th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">垫资模式:</span></th> <th class="table-title" colspan="1" ><span style="color: red;">*</span><span style="font-size: 15px">垫资模式:</span></th>
<td class="table-title" colspan="1" > <td class="table-title" colspan="2" >
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="underwrittenMode" name="underwrittenMode" onchange="changeCheck()"> <select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}" id="underwrittenMode" name="underwrittenMode" onchange="changeCheck()">
<option value="1" <#if project.underwrittenMode=1>selected</#if>>不垫资</option> <option value="1" <#if project.underwrittenMode=1>selected</#if>>不垫资</option>
<option value="3" <#if project.underwrittenMode=3>selected</#if>>垫资(账期覆盖)</option> <option value="3" <#if project.underwrittenMode=3>selected</#if>>垫资(账期覆盖)</option>
@ -88,7 +90,7 @@
</select> </select>
</td> </td>
<th class="table-title" colspan="4" id="noUnder0" <#if project.underwrittenMode! gt 2>hidden</#if>></th> <th class="table-title" colspan="3" id="noUnder0" <#if project.underwrittenMode! gt 2>hidden</#if>></th>
<th class="table-title" colspan="1" id="noUnder1" <#if project.underwrittenMode! <= 2>hidden</#if>><span style="color: red;">*</span><span style="font-size: 15px">垫资利息:</span></th> <th class="table-title" colspan="1" id="noUnder1" <#if project.underwrittenMode! <= 2>hidden</#if>><span style="color: red;">*</span><span style="font-size: 15px">垫资利息:</span></th>
<td class="table-title" colspan="1" id="noUnder2" <#if project.underwrittenMode! <= 2>hidden</#if>> <td class="table-title" colspan="1" id="noUnder2" <#if project.underwrittenMode! <= 2>hidden</#if>>