fix: 付款申请拦截已调整结算单并过滤候选列表
This commit is contained in:
@@ -2702,7 +2702,8 @@ export default {
|
||||
this.referenceParams('formal')
|
||||
);
|
||||
const data = this.unwrapData(response) || {};
|
||||
const records = data.records || [];
|
||||
// 已调整的结算单为调整重推后的归档原单,金额已作废,不可再发起付款
|
||||
const records = (data.records || []).filter(row => row.adjustStatus !== 'adjusted');
|
||||
this.formalRows = await this.fillReferencePayableAmounts(records, 'settlement_payment');
|
||||
this.formalPage.total = Number(data.total || 0);
|
||||
} finally {
|
||||
|
||||
@@ -486,6 +486,8 @@ export default {
|
||||
const rows = this.selection;
|
||||
if (rows.some(row => row.approvalStatus !== 'approved' || row.settlementType !== 'payable'))
|
||||
return this.$message.warning('仅审批通过的付款结算单允许发起付款申请');
|
||||
if (rows.some(row => row.adjustStatus === 'adjusted'))
|
||||
return this.$message.warning('已调整的结算单不可再发起付款,请使用调整后的新单');
|
||||
const contractIds = new Set(rows.map(row => String(row.contractId || '')));
|
||||
if (contractIds.size !== 1 || contractIds.has(''))
|
||||
return this.$message.warning('付款申请必须选择同一个合同的付款结算单');
|
||||
|
||||
Reference in New Issue
Block a user