✨ 新增项目预付核销 UI,并修复常用线路新增不显示与付款提交后刷新
结算单附件增加项目预付核销;常用线路超管默认查全部组织并按筛选归属新增;付款申请提交后关页并刷新列表;平台公司选项 ID 按字符串绑定。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -421,6 +421,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="pre"
|
||||
:settlement-id="form.id"
|
||||
/>
|
||||
|
||||
<section-card v-if="form.id && readonly" title="预付信息">
|
||||
<el-table :data="advances" border>
|
||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||
@@ -939,6 +949,7 @@ import { h } from 'vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { InfoFilled } from '@element-plus/icons-vue';
|
||||
import ChangeRecordDetailDialog from '@/components/change-record-detail-dialog/main.vue';
|
||||
import ProjectAdvanceWriteOff from './project-advance-write-off.vue';
|
||||
import { getMkPublicDetail } from '@/api/mk-process';
|
||||
import {
|
||||
adjustDetail,
|
||||
@@ -981,7 +992,7 @@ import { isAdministrator } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'PreSettlementEditor',
|
||||
components: { InfoFilled, ChangeRecordDetailDialog },
|
||||
components: { InfoFilled, ChangeRecordDetailDialog, ProjectAdvanceWriteOff },
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
@@ -1084,6 +1095,7 @@ export default {
|
||||
size: 10,
|
||||
},
|
||||
advances: [],
|
||||
projectAdvanceWriteOffs: [],
|
||||
changeRecords: [],
|
||||
attachments: [],
|
||||
attachmentTypeOptions: [],
|
||||
@@ -1396,6 +1408,7 @@ export default {
|
||||
this.appliedDetailQuery = { ...this.detailQuery };
|
||||
this.detailPage = { current: 1, size: 10 };
|
||||
this.advances = [];
|
||||
this.projectAdvanceWriteOffs = [];
|
||||
this.changeRecords = [];
|
||||
this.attachments = [];
|
||||
this.selectedAttachmentRows = [];
|
||||
@@ -1435,6 +1448,13 @@ export default {
|
||||
createUserName: row.createUserName || detail.createUserName,
|
||||
createTime: row.createTime || detail.createTime,
|
||||
}));
|
||||
this.projectAdvanceWriteOffs = (detail.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.changeRecords = detail.changeRecords || [];
|
||||
this.attachments = this.parseAttachments(detail.attachmentsJson);
|
||||
this.sortAttachments();
|
||||
@@ -1579,6 +1599,7 @@ export default {
|
||||
this.form.payerName = '';
|
||||
this.form.payeeName = '';
|
||||
this.summaryFees = [];
|
||||
this.projectAdvanceWriteOffs = [];
|
||||
return;
|
||||
}
|
||||
this.form.contractId = contract.id;
|
||||
@@ -1593,6 +1614,7 @@ export default {
|
||||
this.form.payeeName = contract.partyB;
|
||||
this.form.currency = contract.settlementCurrency || 'RMB';
|
||||
this.summaryFees = [];
|
||||
this.projectAdvanceWriteOffs = [];
|
||||
if (this.form.currency !== 'RMB') {
|
||||
this.form.exchangeRateDate = this.$dayjs().format('YYYY-MM-DD');
|
||||
this.fetchBfiExchangeRate();
|
||||
@@ -1613,6 +1635,9 @@ export default {
|
||||
this.$message.warning(`请完善结算合计第${invalidManualFeeIndex + 1}行的费用类型和费用项`);
|
||||
return;
|
||||
}
|
||||
if (this.$refs.projectAdvanceWriteOffRef?.validateBeforeSave?.() === false) {
|
||||
return;
|
||||
}
|
||||
const stateKey = shouldSubmit ? 'submitting' : 'saving';
|
||||
this[stateKey] = true;
|
||||
try {
|
||||
@@ -1660,6 +1685,7 @@ export default {
|
||||
remark: row.remark,
|
||||
manualFlag: row.manualFlag || 0,
|
||||
})),
|
||||
projectAdvanceWriteOffs: this.$refs.projectAdvanceWriteOffRef?.toSavePayload?.() || [],
|
||||
};
|
||||
},
|
||||
addSummaryFee() {
|
||||
|
||||
Reference in New Issue
Block a user