✨ 正式结算保存草稿与同步入口,项目申请平台公司多选等业务优化

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-14 12:59:27 +08:00
parent 5bc1f69a7f
commit 74780b8777
10 changed files with 219 additions and 75 deletions
@@ -658,9 +658,10 @@
</section-card>
</div>
<template v-if="!pageMode" #footer>
<el-button v-if="editable" @click="handleSyncPlaceholder">同步</el-button>
<el-button @click="visible = false">取消</el-button>
<el-button
v-if="editable && !recordId"
v-if="editable"
type="primary"
plain
:loading="draftSaving"
@@ -673,9 +674,10 @@
>
</template>
<div v-if="pageMode && !publicMode" class="formal-editor__page-actions">
<el-button v-if="editable" @click="handleSyncPlaceholder">同步</el-button>
<el-button @click="visible = false">取消</el-button>
<el-button
v-if="editable && !recordId"
v-if="editable"
type="primary"
plain
:loading="draftSaving"
@@ -2547,7 +2549,11 @@ export default {
remark: this.form.remark,
};
},
handleSyncPlaceholder() {
this.$message.info('开发中');
},
async handleDraftSave() {
// 保存草稿:不做表单校验,直接落草稿并返回列表刷新
this.draftSaving = true;
try {
await save({
@@ -2555,8 +2561,8 @@ export default {
approvalStatus: 'draft',
});
this.$message.success('保存成功');
this.visible = false;
this.$emit('success');
this.visible = false;
} finally {
this.draftSaving = false;
}
@@ -8,6 +8,7 @@
:record-id="recordId"
:readonly="readonly"
:initial-data="editorInitialData"
@success="markListNeedRefresh"
/>
</basic-container>
</template>
@@ -16,6 +17,8 @@
import FormalSettlementEditor from './components/formal-settlement-editor.vue';
import { readSettlementTransfer, removeSettlementTransfer } from '@/utils/settlement-transfer';
const LIST_REFRESH_KEY = 'formal-settlement-list-refresh';
export default {
name: 'FormalSettlementForm',
components: { FormalSettlementEditor },
@@ -54,6 +57,9 @@ export default {
this.syncTagTitle();
},
methods: {
markListNeedRefresh() {
sessionStorage.setItem(LIST_REFRESH_KEY, '1');
},
goBack() {
removeSettlementTransfer(this.$route.query.transferToken);
this.$router.$avueRouter.closeTag();
@@ -262,6 +262,12 @@ export default {
this.mkEnabled = false;
});
},
activated() {
if (sessionStorage.getItem('formal-settlement-list-refresh') === '1') {
sessionStorage.removeItem('formal-settlement-list-refresh');
this.loadTable();
}
},
methods: {
hasPermission(code) {
return this.permission?.[code] !== false;
@@ -2693,6 +2693,10 @@ export default {
return this.formatCell(row?.[prop]);
},
formatFeeDetailCell(row, prop) {
if (prop === 'transportQuantityText' || prop === 'transportQuantity') {
if (this.isBlankTransportQuantity(row)) return '-';
return this.formatDetailCell(row, prop);
}
if (prop !== 'originalAmountText') return this.formatDetailCell(row, prop);
const adjustAmount = Number(row?.adjustAmount || 0);
@@ -2711,6 +2715,17 @@ export default {
formatCell(value) {
return value === null || value === undefined || value === '' ? '-' : value;
},
isBlankTransportQuantity(row = {}) {
const quantity = row.transportQuantity;
if (quantity !== null && quantity !== undefined && quantity !== '') {
const amount = Number(quantity);
return !Number.isFinite(amount) || amount === 0 || amount === -1;
}
const text = String(row.transportQuantityText || '').trim();
if (!text || text === '-') return true;
const amount = Number(text.split(/\s+/)[0]);
return Number.isFinite(amount) && (amount === 0 || amount === -1);
},
parseJson(value) {
if (!value) return [];
try {