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
@@ -200,8 +200,14 @@ export default {
);
},
},
watch: {
'$route.query.detailNo'(detailNo) {
if (detailNo) this.openRouteDetail(detailNo);
},
},
mounted() {
this.loadTable();
this.openRouteDetail();
},
methods: {
hasPermission(code) {
@@ -267,6 +273,19 @@ export default {
openView(row) {
this.editor = { visible: true, id: row.id, readonly: true };
},
async openRouteDetail(detailNo = this.$route.query.detailNo) {
const formalSettlementNo = String(detailNo || '').trim();
if (!formalSettlementNo) return;
const response = await api.getList(1, 10, { formalSettlementNo });
const data = this.unwrapData(response);
const row = (data.records || []).find(item => item.formalSettlementNo === formalSettlementNo);
if (!row) {
this.$message.warning('未找到对应的正式结算单');
return;
}
this.activeSettlementType = row.settlementType || this.activeSettlementType;
this.openView(row);
},
async handleDelete(row) {
await this.$confirm('确认删除该正式结算草稿?', '提示', { type: 'warning' });
await api.remove(row.id);