fix bug
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user