This commit is contained in:
2026-08-25 22:35:50 +08:00
parent cb98355715
commit 3da2d428f3
11 changed files with 883 additions and 130 deletions
+23 -1
View File
@@ -118,7 +118,11 @@
>
{{ row[column.prop] }}
</el-link>
<el-tag v-else-if="column.status" :type="statusTagType(row.approvalStatus)" class="status-text">
<el-tag
v-else-if="column.status"
:type="statusTagType(row.approvalStatus)"
class="status-text"
>
{{ row[column.prop] || '-' }}
</el-tag>
<span v-else-if="column.money">
@@ -426,8 +430,14 @@ export default {
);
},
},
watch: {
'$route.query.detailNo'(detailNo) {
if (detailNo) this.openRouteDetail(detailNo);
},
},
created() {
this.loadTable();
this.openRouteDetail();
},
methods: {
hasPermission(code) {
@@ -487,6 +497,18 @@ export default {
openView(row) {
this.editor = { visible: true, id: row.id, readonly: true };
},
async openRouteDetail(detailNo = this.$route.query.detailNo) {
const preSettlementNo = String(detailNo || '').trim();
if (!preSettlementNo) return;
const { data } = await getList(1, 10, { preSettlementNo });
const records = data?.data?.records || [];
const row = records.find(item => item.preSettlementNo === preSettlementNo);
if (!row) {
this.$message.warning('未找到对应的预结算单');
return;
}
this.openView(row);
},
isEditable(row) {
return ['draft', 'returned'].includes(row.approvalStatus);
},