[update]-添加标协会员项目在财务管理合并开票的限制

This commit is contained in:
zhaoxiao
2021-10-25 14:42:36 +08:00
parent 50cb28eb21
commit 32dff804d1
2 changed files with 14 additions and 1 deletions
@@ -334,10 +334,12 @@ export default {
arr = this.dataSource.filter(tt => selectedKeys.indexOf(tt.id) > -1)
// 开票
if (operateType === 'invoic') {
// 是否存在不需要发票的项目
if (arr.some(item => item.needInvoice === 0 || Number(item.receivableAmount) === 0)) {
reject('存在不需要发票的项目!')
}
// 是否存在企业不同的项目
let companyArr = []
arr.forEach(item => {
@@ -347,9 +349,20 @@ export default {
if (!isAllEqual(companyArr)) {
reject('请选择来款单位为同一企业的项目合并开票!')
}
// 是否存在已完成开票的项目
if (arr.some(item => item.makeInvoice === 1)) {
reject('存在已完成开票的项目!')
}
// 是否选中了标协会员项目,标协会员项目只能到账一次、开票一次,前端进行是否完全到账的限制
if (arr.some(item => item.projectType === 5)) {
// 标协会员项目是否完全到账
if (arr.some(item => item.inAccount !== 1)) {
reject('存在未全部到账的标协会员项目!')
}
}
this.selectedCompany = {
id: arr[0].chargeCompanyId,
companyName: arr[0].chargeCompanyTemporaryName
@@ -184,7 +184,7 @@ export default {
title: '打包项目名称',
align: 'center',
dataIndex: 'chargeProject',
scopedSlots: { customRender: 'projectName' }
scopedSlots: { customRender: 'text' }
}, {
title: '应收金额',
align: 'center',