✨ 新增项目预付核销 UI,并修复常用线路新增不显示与付款提交后刷新
结算单附件增加项目预付核销;常用线路超管默认查全部组织并按筛选归属新增;付款申请提交后关页并刷新列表;平台公司选项 ID 按字符串绑定。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -378,6 +378,16 @@
|
||||
</div>
|
||||
</section-card>
|
||||
|
||||
<project-advance-write-off
|
||||
ref="projectAdvanceWriteOffRef"
|
||||
v-model="projectAdvanceWriteOffs"
|
||||
:editable="editable"
|
||||
:contract-id="form.contractId"
|
||||
:settlement-amount="form.settlementAmount"
|
||||
settlement-type="formal"
|
||||
:settlement-id="form.id"
|
||||
/>
|
||||
|
||||
<section-card title="发票信息">
|
||||
<div class="formal-editor__invoice-claim">
|
||||
<el-form inline label-position="right" label-width="auto" @submit.prevent>
|
||||
@@ -1011,12 +1021,13 @@ import {
|
||||
viewKingdeeInvoiceFile,
|
||||
} from '@/utils/kingdee-attachment';
|
||||
import KingdeeInvoicePoolDialog from '@/components/kingdee-invoice-pool-dialog/main.vue';
|
||||
import ProjectAdvanceWriteOff from './project-advance-write-off.vue';
|
||||
import * as XLSX from 'xlsx';
|
||||
import { isAdministrator } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'FormalSettlementEditor',
|
||||
components: { InfoFilled, KingdeeInvoicePoolDialog },
|
||||
components: { InfoFilled, KingdeeInvoicePoolDialog, ProjectAdvanceWriteOff },
|
||||
props: {
|
||||
modelValue: Boolean,
|
||||
recordId: [String, Number],
|
||||
@@ -1045,6 +1056,7 @@ export default {
|
||||
receiptClaims: [],
|
||||
adjustments: [],
|
||||
changeRecords: [],
|
||||
projectAdvanceWriteOffs: [],
|
||||
attachments: [],
|
||||
selectedAttachmentRows: [],
|
||||
invoices: [],
|
||||
@@ -1275,6 +1287,13 @@ export default {
|
||||
}
|
||||
this.adjustments = data.adjustments || [];
|
||||
this.changeRecords = data.changeRecords || [];
|
||||
this.projectAdvanceWriteOffs = (data.projectAdvanceWriteOffs || []).map(row => ({
|
||||
...row,
|
||||
writeOffAmount: Number(row.writeOffAmount || 0),
|
||||
projectAdvanceAmount: Number(row.projectAdvanceAmount || 0),
|
||||
availableWriteOffAmount: Number(row.availableWriteOffAmount || 0),
|
||||
createTime: row.paymentCreateTime || row.createTime,
|
||||
}));
|
||||
this.attachments = this.parseAttachments(data.attachmentsJson);
|
||||
this.selectedAttachmentRows = [];
|
||||
this.invoices = data.invoices || [];
|
||||
@@ -1305,6 +1324,7 @@ export default {
|
||||
this.receiptClaims = [];
|
||||
this.adjustments = [];
|
||||
this.changeRecords = [];
|
||||
this.projectAdvanceWriteOffs = [];
|
||||
this.attachments = [];
|
||||
this.selectedAttachmentRows = [];
|
||||
this.invoices = [];
|
||||
@@ -2549,6 +2569,7 @@ export default {
|
||||
matchedAmount: Number(row.matchedAmount || 0),
|
||||
attachmentJson: row.attachmentJson || '',
|
||||
})),
|
||||
projectAdvanceWriteOffs: this.$refs.projectAdvanceWriteOffRef?.toSavePayload?.() || [],
|
||||
remark: this.form.remark,
|
||||
};
|
||||
},
|
||||
@@ -2557,6 +2578,9 @@ export default {
|
||||
},
|
||||
async handleDraftSave() {
|
||||
// 保存草稿:不做表单校验,直接落草稿并返回列表刷新
|
||||
if (this.$refs.projectAdvanceWriteOffRef?.validateBeforeSave?.() === false) {
|
||||
return;
|
||||
}
|
||||
this.draftSaving = true;
|
||||
try {
|
||||
await save({
|
||||
@@ -2584,6 +2608,9 @@ export default {
|
||||
return this.$message.warning('请完善手工费用的费用类型和费用项');
|
||||
}
|
||||
if (!this.validateInvoices()) return;
|
||||
if (this.$refs.projectAdvanceWriteOffRef?.validateBeforeSave?.() === false) {
|
||||
return;
|
||||
}
|
||||
// 附件类型仅做提示,不阻断正式结算单新增/保存提交。
|
||||
// this.validateAttachments();
|
||||
this.saving = true;
|
||||
|
||||
Reference in New Issue
Block a user