emis-frontend/src/views/emis/emisSettleBill/CenterInvoiceRecordDeal.vue

109 lines
3.0 KiB
Vue
Raw Normal View History

2024-07-25 00:48:28 +00:00
<template>
<div class="app-container">
<div class="tab-container">
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleTabsClick" @tab-remove="removeTab">
<el-tab-pane label="开票申请记录" name="billList" >
2024-08-28 10:27:34 +00:00
<CenterInvoiceRecordDealListPanel ref="billList" @onSelect="onSelectApply"> </CenterInvoiceRecordDealListPanel>
2024-07-25 00:48:28 +00:00
</el-tab-pane>
<el-tab-pane label="已开票" name="hasOpenBillList" >
2024-09-18 10:52:20 +00:00
<CenterInvoiceHasOpenPanel ref="hasOpenBillList" :invoiceStatus="2" @onSelect="onSelectApply"> </CenterInvoiceHasOpenPanel>
2024-07-25 00:48:28 +00:00
</el-tab-pane>
<!-- <el-tab-pane label="开票申请记录" name="invoiceApplyList" >
<ChargeBillMoneyPanel @onSelect="onSelectBill"> </ChargeBillMoneyPanel>
</el-tab-pane> -->
<el-tab-pane v-for="(item, index) in billTabs" :key="index" :name="item.applySeqNo" :label="'开票:'+item.applySeqNo" closable >
<InvoiceDetailPanel :id="item.id"></InvoiceDetailPanel>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import CenterInvoiceRecordDealListPanel from '@/views/emis/emisSettleInvoiceRecord/panel/CenterInvoiceRecordDealListPanel.vue';
2024-09-18 10:52:20 +00:00
import CenterInvoiceHasOpenPanel from '@/views/emis/emisSettleInvoiceRecord/panel/CenterInvoiceHasOpenPanel.vue';
2024-08-07 02:34:51 +00:00
2024-07-25 00:48:28 +00:00
import InvoiceDetailPanel from '@/views/emis/emisSettleInvoiceRecord/panel/InvoiceDetailPanel.vue';
export default {
2024-08-02 04:02:18 +00:00
name: "CenterInvoiceRecordDeal",
2024-07-25 00:48:28 +00:00
components: {
CenterInvoiceRecordDealListPanel,
2024-09-18 10:52:20 +00:00
CenterInvoiceHasOpenPanel,
2024-07-25 00:48:28 +00:00
InvoiceDetailPanel
},
dicts: [
],
data() {
return {
activeTab:'billList',
billTabs:[],
};
},
created() {
},
methods: {
2024-08-05 03:54:44 +00:00
handleTabsClick(tab, event) {
// console.log(tab, event);
if (tab.name == 'billList') {
2024-08-28 10:27:34 +00:00
this.$nextTick(() => {
this.$refs.billList.doLayout()
})
}
else if (tab.name == 'hasOpenBillList') {
this.$nextTick(() => {
this.$refs.hasOpenBillList.doLayout()
})
2024-08-05 03:54:44 +00:00
}
else if (tab.name == 'dtlList') {
}
2024-07-25 00:48:28 +00:00
},
onSelectApply(item) {
let old=this.billTabs.find(mItem=>mItem.applySeqNo==item.applySeqNo);
if(old){
this.activeTab=item.applySeqNo;
}else{
this.billTabs.push(item);
this.activeTab=item.applySeqNo;
}
},
removeTab(targetName) {
var self=this;
let tabs = self.billTabs;
2024-08-05 16:01:28 +00:00
self.billTabs = tabs.filter(tab => tab.applySeqNo !== targetName);
2024-07-25 00:48:28 +00:00
if(self.billTabs.length>0){
this.activeTab=self.billTabs[self.billTabs.length-1].applySeqNo;
}else{
this.activeTab="billList";
}
},
}
};
</script>
<style>
.el-descriptions-item__label {
width: 80px;
}
.el-descriptions-item__cell {
font-weight: 500!important;
color: black;
}
.tab-container {
width: 100%;
}
.el-tabs__nav{
display: flex !important;
flex-wrap: wrap !important;
}
</style>