财务付款确认 资金预算

master
lion 1 month ago
parent 9b9b7a0409
commit 5723302153

@ -779,23 +779,39 @@ export default {
return return
} }
//
const projectName = this.currentAuditRow.contract_id
? (this.currentAuditRow.contract ? this.currentAuditRow.contract.name : '')
: (this.currentAuditRow.away ? this.currentAuditRow.away.title : this.currentAuditRow.name)
// contract_plan_act_links // contract_plan_act_links
const contract_plan_act_links = [] const contract_plan_act_links = []
for (const fundLog of this.currentAuditRow.fund_logs) { for (const fundLog of this.currentAuditRow.fund_logs) {
//
const fundLogProjectName = fundLog.contract_id
? (fundLog.contract ? fundLog.contract.name : '')
: (fundLog.away ? fundLog.away.title : fundLog.name)
const planLinkData = this.planLinkDataMap[fundLog.id] || [] const planLinkData = this.planLinkDataMap[fundLog.id] || []
const selectedItems = planLinkData.filter(item => item.selected) const selectedItems = planLinkData.filter(item => item.selected)
if (selectedItems.length === 0) { if (selectedItems.length === 0) {
// //
Message({
type: 'warning',
message: `付款登记"${fundLogProjectName}"未选择预算计划`
})
return
}
// 使
const totalUseMoney = selectedItems.reduce((sum, item) => sum + (parseFloat(item.use_money) || 0), 0)
//
const actualMoney = parseFloat(fundLog.act_money) || 0
// 使
if (totalUseMoney !== actualMoney) {
//
Message({ Message({
type: 'warning', type: 'warning',
message: `项目"${projectName}"未选择预算计划` message: `项目"${fundLogProjectName}"的预算计划金额与实际支付金额不相等`
}) })
return return
} }

Loading…
Cancel
Save