优化
This commit is contained in:
@@ -345,6 +345,7 @@ watch(() => createForm.value.supplierId, () => {
|
||||
if (createForm.value.customerId) void refreshCreateDependencies(createForm.value.customerId).catch(reportCreateSourceError)
|
||||
})
|
||||
|
||||
// 待客户确认的对账单生成应收前,提醒操作员确认后再继续。
|
||||
async function submitCreate() {
|
||||
if (createBusy.value) return
|
||||
const customerId = String(createForm.value.customerId || '')
|
||||
@@ -354,6 +355,14 @@ async function submitCreate() {
|
||||
createBusy.value = true
|
||||
error.value = null
|
||||
try {
|
||||
const statement = statementOptions.value.find((item) => item.id === createForm.value.reconciliationStatementId)
|
||||
if (props.kind === 'receivable' && statement?.customerConfirmationStatus === 'PENDING_CONFIRMATION') {
|
||||
const confirmed = await ElMessageBox.confirm('客户暂未确认!', '生成应收结算单', {
|
||||
customClass: 'admin-density-confirm admin-workbench', type: 'warning',
|
||||
confirmButtonText: '继续生成', cancelButtonText: '取消',
|
||||
}).then(() => true).catch(() => false)
|
||||
if (!confirmed) return
|
||||
}
|
||||
if (props.kind === 'receivable') await createReceivableSettlement({ reconciliationStatementId: createForm.value.reconciliationStatementId, currency: 'CNY' })
|
||||
else await createPayableSettlement({ customerId, supplierId: createForm.value.supplierId, feeSourceIds: createForm.value.feeSourceIds, dueDate: createForm.value.dueDate, currency: 'CNY' })
|
||||
createOpen.value = false
|
||||
|
||||
Reference in New Issue
Block a user