bug修改

dev_1.0.0
‘wangjiuyun 2024-10-29 11:14:36 +08:00
parent 9a6d9d8911
commit 380affd9cc
4 changed files with 60 additions and 88 deletions

View File

@ -146,6 +146,14 @@ $(function () {
}
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL2, $("#id").val());
var totalTotal=dataManage.details.reduce((total,now)=>{
return now.total+total
},0)
var projectGrossProfitA=$('[name="projectGrossProfitA"]').val()
if(Number(totalTotal)> (Number(projectGrossProfitA)*0.1) ){
layuiAlert(`总金额合计不能超过毛利A(${projectGrossProfitA})的10%`);
return
}
if(dataManage){
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage);
}
@ -269,6 +277,14 @@ $(function () {
}
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL, $("#id").val());
var totalTotal=dataManage.details.reduce((total,now)=>{
return now.total+total
},0)
var projectGrossProfitA=$('[name="projectGrossProfitA"]').val()
if(Number(totalTotal)> (Number(projectGrossProfitA)*0.1) ){
layuiAlert(`总金额合计不能超过毛利A(${projectGrossProfitA})的10%`);
return
}
if(dataManage){
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage);
}

View File

@ -36,33 +36,6 @@ SELECT_TYPE_CATEGORY_MAP_DATA_MANAGER={};
SELECT_CATEGORY_TYPE_MAP_DATA_MANAGER={};
/*$(function () {
$("#cost-project-manage-detail").click(function () {
$('#my-prompt-cost-project-manage-detail').modal({
relatedTarget: this,
closeOnConfirm:false,
onConfirm: function(e) {
//不能使用e.data因为无法获取动态添加的
var data = collectData("am-modal-prompt-input-cost-project-manage");
//data = prepareAjaxData(data, COST_PROJECT_MANAGE_DETAIL_ARR, $("#id").val(),true);
data = prepareAjaxDataVerify(data, COST_PROJECT_MANAGE_DETAIL, $("#id").val());
if(data){
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", data, updateCostProjectManageData);
}
},
onCancel: function(e) {
}
});
});
$("#costProjectManageAddBtn").click(function () {
appendTrCostProjectManage();
});
bindTypeSelectChangeManager();
//绑定项目管理明细输入框
bindChangeableInputProjectManage();
initTypeCategoryManage();
});*/
$(function () {
$("#cost-project-manage-detail").click(function () {
@ -74,6 +47,14 @@ $(function () {
var data = collectData("am-modal-prompt-input-cost-project-manage");
//data = prepareAjaxData(data, COST_PROJECT_MANAGE_DETAIL_ARR, $("#id").val(),true);
data = prepareAjaxDataVerify(data, COST_PROJECT_MANAGE_DETAIL2, $("#id").val());
var totalTotal=data.details.reduce((total,now)=>{
return now.total+total
},0)
var projectGrossProfitA=$('[name="projectGrossProfitA"]').val()
if(Number(totalTotal)> (Number(projectGrossProfitA)*0.1) ){
layuiAlert(`总金额合计不能超过毛利A(${projectGrossProfitA})的10%`);
return
}
if(data){
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", data, updateCostProjectManageData);
}

View File

@ -798,18 +798,12 @@
<thead>
<tr>
<th>序号</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>
<#--<td>操作</td>-->
</tr>
</thead>
<tbody>
@ -818,15 +812,6 @@
<tr>
<td>${(incomeDetail_index+1)!}</td>
<td>
<#--<select style="width: auto" readonly
class="am-modal-prompt-input am-modal-prompt-input-income">
<option value="1" <#if incomeDetail.type == 1>selected</#if>>设备类
</option>
<option value="2" <#if incomeDetail.type == 2>selected</#if>>工程类
</option>
<option value="3" <#if incomeDetail.type == 3>selected</#if>>服务类
</option>
</select>-->
<#if incomeDetail.type ==1 >
设备类
<#elseif incomeDetail.type ==2>
@ -838,22 +823,7 @@
<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>-->
<#-- <td><input type="text" readonly-->
<#-- class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-amount"-->
<#-- value="${Utils.format(incomeDetail.amount,'0.00')}"></td>-->
<#-- <td><input type="text" readonly-->
<#-- class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-price"-->
<#-- value="${Utils.format2(incomeDetail.price,'0.00')}"></td>-->
<#-- <td> <input type="text" readonly-->
<td> <input type="text" readonly
class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-tax-rate"
value="${Utils.format(incomeDetail.taxRate,'0.00')}"></td>
<td><input type="text"
@ -1511,7 +1481,7 @@
</tbody>
(备注:本表所用税率为:<span class="incomeTaxRates">${incomeTaxRates!}</span>)
</table>
<span class="am-text-lg">成本</span>
<span class="am-text-lg">采购成本</span>
<#-- <span class="am-text-primary"><a style="cursor: pointer" id="cost-detail">采购成本明细表</a></span>
<span class="am-text-primary"><a style="cursor: pointer" id="cost-project-manage-detail">项目管理成本表</a></span>-->
<table class="am-table am-table-bordered am-table-radius table-main"
@ -1542,7 +1512,7 @@
<tr>
<td>成本</td>
<td>采购成本</td>
<td>工</td>
<td>工</td>
<td><input type="text" class="number" name="costPurchaseBuildTaxInclude"
value="${Utils.format(budgetBean.costPurchaseBuildTaxInclude,'0.00')}"
readonly required title="购买施工含税总额"></td>
@ -1581,20 +1551,20 @@
value="${Utils.format(budgetBean.costPurchaseOtherTax,'0.00')}"
readonly required title="购买其他税金"></td>
</tr>
<tr>
<td>成本</td>
<td>项目管理成本</td>
<td>项目管理成本</td>
<td><input type="text" class="number" name="costProjectManageTaxInclude"
value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}"
readonly required title="项目管理成本总额"></td>
<td><input type="text" class="number" name="costProjectManageTaxExclude"
value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}"
readonly required title="项目管理成本总额"></td>
<td width="210px"><input type="text" class="number" name="costProjectManageTax"
value="财务计取以不含税方式核算"
readonly required title=""></td>
</tr>
<#-- <tr>-->
<#-- <td>成本</td>-->
<#-- <td>项目管理成本</td>-->
<#-- <td>项目管理成本</td>-->
<#-- <td><input type="text" class="number" name="costProjectManageTaxInclude"-->
<#-- value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}"-->
<#-- readonly required title="项目管理成本总额"></td>-->
<#-- <td><input type="text" class="number" name="costProjectManageTaxExclude"-->
<#-- value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}"-->
<#-- readonly required title="项目管理成本总额"></td>-->
<#-- <td width="210px"><input type="text" class="number" name="costProjectManageTax"-->
<#-- value="财务计取以不含税方式核算"-->
<#-- readonly required title=""></td>-->
<#-- </tr>-->
<tr>
<td>成本</td>
<td>其他</td>
@ -1644,12 +1614,17 @@
required readonly title="资金占用成本不含税总额"></td>
</tr>
<tr>
<td>公司管理费用</td>
<td></td>
<td><input type="text" class="number" name="costCompanyManageTaxExclude"
value="${Utils.format(budgetBean.costCompanyManageTaxExclude,'0.00')}"
required readonly title="公司管理费用不含税总额"></td>
<td>成本</td>
<td>项目管理费用</td>
<td><input type="text" class="number" name="costProjectManageTaxExclude" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly title="项目管理成本总额不含税"></td>
</tr>
<#-- <tr>-->
<#-- <td>公司管理费用</td>-->
<#-- <td></td>-->
<#-- <td><input type="text" class="number" name="costCompanyManageTaxExclude"-->
<#-- value="${Utils.format(budgetBean.costCompanyManageTaxExclude,'0.00')}"-->
<#-- required readonly title="公司管理费用不含税总额"></td>-->
<#-- </tr>-->
</tbody>
(备注:财务计取以不含税方式核算)
</table>

View File

@ -762,8 +762,8 @@
<thead>
<tr>
<th>序号</th>
<th width="100px">产品大类</th>
<th>名称</th>
<th width="100px">类</th>
<th>产品大类</th>
<#-- <th>规格类型</th>-->
<#-- <th>参数</th>-->
<#-- <th>单位</th>-->
@ -1344,7 +1344,7 @@
</tr>
<tr>
<td>成本</td>
<td>项目管理成本</td>
<td>项目管理费用</td>
<td><input type="text" class="number" name="costProjectManageTaxExclude" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly title="项目管理成本总额不含税"></td>
</tr>
<tr>
@ -1520,10 +1520,10 @@
<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-time" value="${(payDetail.payTime?string("yyyy-MM-dd"))!}" data-am-datepicker ></td>
<td width="100px">
<select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-project">
<option value="1" <#if payDetail.type == 1>selected</#if>>设备成本</option>
<option value="2" <#if payDetail.type == 2>selected</#if>>工程成本</option>
<option value="3" <#if payDetail.type == 3>selected</#if>>服务成本</option>
<option value="4" <#if payDetail.type == 4>selected</#if>>其他成本</option>
<option value="1" <#if payDetail.payProject == 1>selected</#if>>设备成本</option>
<option value="2" <#if payDetail.payProject == 2>selected</#if>>工程成本</option>
<option value="3" <#if payDetail.payProject == 3>selected</#if>>服务成本</option>
<option value="4" <#if payDetail.payProject == 4>selected</#if>>其他成本</option>
</select>
</td>
<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-amount" value="${Utils.format(payDetail.payAmount,'0')}"></td>
@ -1537,7 +1537,7 @@
<td width="100px"></td>
<td width="100px"></td>
<td width="100px"></td>
<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-amount-total" value="${Utils.format(costDetail.payPurchaseTotalTax,'0')}" readonly></td>
<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-amount-total" value="${Utils.format(budgetBean.budgetPayPlanTotal,'0')}" readonly></td>
<td width="100px"></td>
<td width="60px"></td>
</tr>