diff --git a/src/components/bottom-detail-panel/main.vue b/src/components/bottom-detail-panel/main.vue new file mode 100644 index 0000000..cf7e1af --- /dev/null +++ b/src/components/bottom-detail-panel/main.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/src/components/invoice-write-off-table/main.vue b/src/components/invoice-write-off-table/main.vue index 4da42c0..f229f45 100644 --- a/src/components/invoice-write-off-table/main.vue +++ b/src/components/invoice-write-off-table/main.vue @@ -43,7 +43,6 @@ -
暂无冲销明细
@@ -134,12 +133,3 @@ export default { }, }; - - diff --git a/src/views/payment/invoice-application-form.vue b/src/views/payment/invoice-application-form.vue index 83b8138..954f466 100644 --- a/src/views/payment/invoice-application-form.vue +++ b/src/views/payment/invoice-application-form.vue @@ -91,7 +91,7 @@ @@ -363,6 +363,11 @@ + - + - + @@ -519,10 +524,12 @@ import * as api from '@/api/payment/invoiceApplication'; import { getAll as getInvoiceItems } from '@/api/base/invoice-item'; import { getList as getWaybillList } from '@/api/business/waybill-manage'; import { getList as getReceivablePayableDetailList } from '@/api/settlement/receivable-payable-detail'; +import { getDetail as getProjectApplyDetail } from '@/api/business/project-apply'; import { getDictionary } from '@/api/system/dictbiz'; import { invoiceApplicationDetailColumns } from '@/option/payment/invoiceApplication'; import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue'; import InvoiceWriteOffTable from '@/components/invoice-write-off-table/main.vue'; +import BottomDetailPanel from '@/components/bottom-detail-panel/main.vue'; import { getMkPublicDetail } from '@/api/mk-process'; import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval'; @@ -579,12 +586,14 @@ export default { components: { VehicleAttachmentTable, InvoiceWriteOffTable, + BottomDetailPanel, }, data() { return { form: emptyForm(), detailRows: [], selectedDetailIds: [], + writeOffPanelVisible: false, receiverInvoiceOptions: [], contactOptions: [], departmentEmailOptions: [], @@ -978,11 +987,27 @@ export default { allocatedInvoiceAmount: 0, })); this.form.projectName = first.projectName; + this.form.projectId = first.projectId; this.form.deptName = first.deptName; this.form.issuerName = first.issuerName; this.form.undertakingDeptName = first.deptName; this.settlementDialog.visible = false; - await Promise.all([this.loadSettlementDetails(), this.loadReceiverInformation()]); + await Promise.all([ + this.loadSettlementDetails(), + this.loadReceiverInformation(), + this.loadProjectProfitRate(), + ]); + }, + // 项目利润率:选结算单后带出项目立项利润率(百分数转小数存 form),已手填时不覆盖 + async loadProjectProfitRate() { + if (!this.form.projectId || Number(this.form.profitRate) > 0) return; + try { + const data = this.unwrapData(await getProjectApplyDetail(this.form.projectId)); + const rate = Number(data?.profitRate); + if (Number.isFinite(rate) && rate > 0) this.form.profitRate = rate / 100; + } catch { + // 带出失败不阻断选单,保存时后端仍会兜底取项目立项利润率 + } }, async loadSettlementDetails(resetSelection = true) { this.detailRows = diff --git a/src/views/payment/payment-application-form.vue b/src/views/payment/payment-application-form.vue index 1cecfd0..5a1b6cc 100644 --- a/src/views/payment/payment-application-form.vue +++ b/src/views/payment/payment-application-form.vue @@ -290,6 +290,11 @@ + @@ -350,9 +355,9 @@ - + - +