Compare commits

...

3 Commits

Author SHA1 Message Date
‘wangjiuyun dc5d86227c bug问题 2024-10-29 11:40:07 +08:00
‘wangjiuyun f7b15273b2 Merge branch 'dev_1.0.0' of http://git.unissense.tech/mula/fourcal into Branch_dev_1.0.0 2024-10-29 11:14:46 +08:00
‘wangjiuyun 380affd9cc bug修改 2024-10-29 11:14:36 +08:00
4 changed files with 130 additions and 89 deletions

View File

@ -146,6 +146,14 @@ $(function () {
} }
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL2, $("#id").val()); 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){ if(dataManage){
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage); postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage);
} }
@ -269,6 +277,14 @@ $(function () {
} }
dataManage = prepareAjaxDataVerify(dataManage, COST_PROJECT_MANAGE_DETAIL, $("#id").val()); 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){ if(dataManage){
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage); postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", dataManage);
} }

View File

@ -36,33 +36,6 @@ SELECT_TYPE_CATEGORY_MAP_DATA_MANAGER={};
SELECT_CATEGORY_TYPE_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 () { $(function () {
$("#cost-project-manage-detail").click(function () { $("#cost-project-manage-detail").click(function () {
@ -74,6 +47,14 @@ $(function () {
var data = collectData("am-modal-prompt-input-cost-project-manage"); var data = collectData("am-modal-prompt-input-cost-project-manage");
//data = prepareAjaxData(data, COST_PROJECT_MANAGE_DETAIL_ARR, $("#id").val(),true); //data = prepareAjaxData(data, COST_PROJECT_MANAGE_DETAIL_ARR, $("#id").val(),true);
data = prepareAjaxDataVerify(data, COST_PROJECT_MANAGE_DETAIL2, $("#id").val()); 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){ if(data){
postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", data, updateCostProjectManageData); postAjax(base+"/project/budgetEditSaveCostProjectManageDetail", data, updateCostProjectManageData);
} }

View File

@ -798,18 +798,12 @@
<thead> <thead>
<tr> <tr>
<th>序号</th> <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> <th>含税总金额(元)</th>
<th>不含税金额(元)</th> <th>不含税金额(元)</th>
<th>税金(元)</th> <th>税金(元)</th>
<#--<td>操作</td>-->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -818,15 +812,6 @@
<tr> <tr>
<td>${(incomeDetail_index+1)!}</td> <td>${(incomeDetail_index+1)!}</td>
<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 > <#if incomeDetail.type ==1 >
设备类 设备类
<#elseif incomeDetail.type ==2> <#elseif incomeDetail.type ==2>
@ -838,22 +823,7 @@
<td><input type="text" readonly <td><input type="text" readonly
class="am-modal-prompt-input am-modal-prompt-input-income" class="am-modal-prompt-input am-modal-prompt-input-income"
value="${incomeDetail.name!}"></td> value="${incomeDetail.name!}"></td>
<#-- <td><input type="text" readonly--> <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-->
class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-tax-rate" class="am-modal-prompt-input am-modal-prompt-input-income input-changeable-tax-rate"
value="${Utils.format(incomeDetail.taxRate,'0.00')}"></td> value="${Utils.format(incomeDetail.taxRate,'0.00')}"></td>
<td><input type="text" <td><input type="text"
@ -897,6 +867,74 @@
</div> </div>
</div> </div>
</div> </div>
<div class="am-tab-panel am-fade am-in" id="tabPay">
<div class="fixed-section">
<div class="am-modal-bd">
<div class="fixed-actions">
<#-- <div class="am-btn-toolbar">-->
<#-- <div class="am-btn-group am-btn-group-xs">-->
<#-- <div class="am-btn-group am-btn-group-xs am-form-file">-->
<#-- <button type="button" id="bt_import" class="am-btn am-btn-default">-->
<#-- <span class="am-icon-archive"></span>-->
<#-- 批量导入-->
<#-- </button>-->
<#-- <input id="doc-form-file2" type="file" name="file" onChange="ajaxUploadFile2('doc-form-file2','${base}/project/batchCostImport?id=' + ${project.id})">-->
<#-- </div>-->
<#-- <button type="button" class="am-btn am-btn-default" onclick="location.href='${base}/project/costTemplate'">-->
<#-- <span class="am-icon-archive"></span> 导入模板下载-->
<#-- </button>-->
<#-- </div>-->
<#-- </div>-->
</div>
<div class="fixed-table has-actions is-vertical-scroll">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;" id="payTable">
<thead style="display:block;">
<tr>
<th width="60px">序号</th>
<th width="100px">付款节点</th>
<th width="100px">付款时间</th>
<th width="100px">采购成本项目</th>
<th width="100px">付款金额</th>
<th width="100px">供应商</th>
</tr>
</thead>
<tbody>
<#if budgetPayPlan??>
<#list budgetPayPlan as payDetail>
<tr>
<td width="60px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-budget-num" value="${(payDetail_index+1)!}" readonly></td>
<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-point" value="${payDetail.payPoint}" readonly></td>
<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 readonly></td>
<td width="100px">
<#if payDetail.payProject='1'>设备成本</#if>
<#if payDetail.payProject='2'>工程成本</#if>
<#if payDetail.payProject='3'>服务成本</#if>
<#if payDetail.payProject='4'>其他成本</#if>
</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')}" readonly></td>
<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-supplier" value="${payDetail.supplier}" readonly></td>
</tr>
</#list>
</#if>
<tr class="total-new" id="payTotal">
<td width="60px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay" value="总计" readonly></td>
<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(budgetPayPlanTotal,'0')}" readonly></td>
<td width="100px"></td>
<td width="60px"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="am-tab-panel am-fade am-in" id="tab36"> <div class="am-tab-panel am-fade am-in" id="tab36">
<#--<span class="am-text-lg">收入明细表</span>--> <#--<span class="am-text-lg">收入明细表</span>-->
@ -1511,7 +1549,7 @@
</tbody> </tbody>
(备注:本表所用税率为:<span class="incomeTaxRates">${incomeTaxRates!}</span>) (备注:本表所用税率为:<span class="incomeTaxRates">${incomeTaxRates!}</span>)
</table> </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-detail">采购成本明细表</a></span>
<span class="am-text-primary"><a style="cursor: pointer" id="cost-project-manage-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" <table class="am-table am-table-bordered am-table-radius table-main"
@ -1542,7 +1580,7 @@
<tr> <tr>
<td>成本</td> <td>成本</td>
<td>采购成本</td> <td>采购成本</td>
<td>工</td> <td>工</td>
<td><input type="text" class="number" name="costPurchaseBuildTaxInclude" <td><input type="text" class="number" name="costPurchaseBuildTaxInclude"
value="${Utils.format(budgetBean.costPurchaseBuildTaxInclude,'0.00')}" value="${Utils.format(budgetBean.costPurchaseBuildTaxInclude,'0.00')}"
readonly required title="购买施工含税总额"></td> readonly required title="购买施工含税总额"></td>
@ -1581,20 +1619,20 @@
value="${Utils.format(budgetBean.costPurchaseOtherTax,'0.00')}" value="${Utils.format(budgetBean.costPurchaseOtherTax,'0.00')}"
readonly required title="购买其他税金"></td> readonly required title="购买其他税金"></td>
</tr> </tr>
<tr> <#-- <tr>-->
<td>成本</td> <#-- <td>成本</td>-->
<td>项目管理成本</td> <#-- <td>项目管理成本</td>-->
<td>项目管理成本</td> <#-- <td>项目管理成本</td>-->
<td><input type="text" class="number" name="costProjectManageTaxInclude" <#-- <td><input type="text" class="number" name="costProjectManageTaxInclude"-->
value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}" <#-- value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}"-->
readonly required title="项目管理成本总额"></td> <#-- readonly required title="项目管理成本总额"></td>-->
<td><input type="text" class="number" name="costProjectManageTaxExclude" <#-- <td><input type="text" class="number" name="costProjectManageTaxExclude"-->
value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}" <#-- value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0.00')}"-->
readonly required title="项目管理成本总额"></td> <#-- readonly required title="项目管理成本总额"></td>-->
<td width="210px"><input type="text" class="number" name="costProjectManageTax" <#-- <td width="210px"><input type="text" class="number" name="costProjectManageTax"-->
value="财务计取以不含税方式核算" <#-- value="财务计取以不含税方式核算"-->
readonly required title=""></td> <#-- readonly required title=""></td>-->
</tr> <#-- </tr>-->
<tr> <tr>
<td>成本</td> <td>成本</td>
<td>其他</td> <td>其他</td>
@ -1644,12 +1682,17 @@
required readonly title="资金占用成本不含税总额"></td> required readonly title="资金占用成本不含税总额"></td>
</tr> </tr>
<tr> <tr>
<td>公司管理费用</td> <td>成本</td>
<td></td> <td>项目管理费用</td>
<td><input type="text" class="number" name="costCompanyManageTaxExclude" <td><input type="text" class="number" name="costProjectManageTaxExclude" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly title="项目管理成本总额不含税"></td>
value="${Utils.format(budgetBean.costCompanyManageTaxExclude,'0.00')}"
required readonly title="公司管理费用不含税总额"></td>
</tr> </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> </tbody>
(备注:财务计取以不含税方式核算) (备注:财务计取以不含税方式核算)
</table> </table>

View File

@ -762,8 +762,8 @@
<thead> <thead>
<tr> <tr>
<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>-->
@ -1344,7 +1344,7 @@
</tr> </tr>
<tr> <tr>
<td>成本</td> <td>成本</td>
<td>项目管理成本</td> <td>项目管理费用</td>
<td><input type="text" class="number" name="costProjectManageTaxExclude" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly title="项目管理成本总额不含税"></td> <td><input type="text" class="number" name="costProjectManageTaxExclude" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly title="项目管理成本总额不含税"></td>
</tr> </tr>
<tr> <tr>
@ -1519,11 +1519,12 @@
<td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-point" value="${payDetail.payPoint}" ></td> <td width="100px"><input type="text" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-point" value="${payDetail.payPoint}" ></td>
<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"><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"> <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> <select style="float: left;" class="am-modal-prompt-input am-modal-prompt-input-pay input-changeable-pay-project" name="payProject">
<option value="2" <#if payDetail.type == 2>selected</#if>>工程成本</option> <option value="1" <#if payDetail.payProject='1'>selected</#if>>设备成本</option>
<option value="3" <#if payDetail.type == 3>selected</#if>>服务成本</option> <option value="2" <#if payDetail.payProject='2'>selected</#if>>工程成本</option>
<option value="4" <#if payDetail.type == 4>selected</#if>>其他成本</option> <option value="3" <#if payDetail.payProject='3'>selected</#if>>服务成本</option>
<option value="4" <#if payDetail.payProject='4'>selected</#if>>其他成本</option>
</select> </select>
</td> </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> <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 +1538,7 @@
<td width="100px"></td> <td width="100px"></td>
<td width="100px"></td> <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(budgetPayPlanTotal,'0')}" readonly></td>
<td width="100px"></td> <td width="100px"></td>
<td width="60px"></td> <td width="60px"></td>
</tr> </tr>