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

149 lines
4.3 KiB
Vue
Raw Normal View History

2024-07-24 01:12:18 +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">
2024-08-06 07:41:36 +00:00
<el-tab-pane label="可开票账单" name="waitOpenBillList" >
2024-11-17 01:43:01 +00:00
<SiteWaitOpenBillPanel key="waitOpenBillList" confirmStatus="1" @onApply="onApply" @onSelect="onSelectShowBill"> </SiteWaitOpenBillPanel>
2024-08-06 07:28:02 +00:00
</el-tab-pane>
2024-08-08 11:26:20 +00:00
<el-tab-pane label="开票申请记录" name="billList" >
<InvoiceRecordApplyListPanel key="billList" @onSelect="onSelectApply"> </InvoiceRecordApplyListPanel>
2024-07-24 01:12:18 +00:00
</el-tab-pane>
2024-11-17 01:43:01 +00:00
<el-tab-pane label="发票申请" name="applyPanel" v-if="showApply" closable>
2024-08-20 10:55:06 +00:00
<EmisSettleInvoiceRecordForm :billList="selectBillList" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisSettleInvoiceRecordForm>
</el-tab-pane>
2024-11-17 01:43:01 +00:00
<el-tab-pane label="账单详情" name="billDetail" v-if="showBillDetail" closable>
<SiteConfirmSubBillListPanel :settleBillNo="curSettleBillNo"></SiteConfirmSubBillListPanel>
2024-07-24 01:12:18 +00:00
</el-tab-pane>
2024-11-17 10:27:56 +00:00
<el-tab-pane label="开票详情" name="applyDetail" v-if="showApplyDetail" closable>
<InvoiceDetailPanel :id="currApplyId"></InvoiceDetailPanel>
</el-tab-pane>
2024-11-17 01:43:01 +00:00
<!-- <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> -->
2024-07-24 01:12:18 +00:00
</el-tabs>
</div>
</div>
</template>
<script>
import InvoiceRecordApplyListPanel from '@/views/emis/emisSettleInvoiceRecord/panel/InvoiceRecordApplyListPanel.vue';
import InvoiceDetailPanel from '@/views/emis/emisSettleInvoiceRecord/panel/InvoiceDetailPanel.vue';
2024-08-06 09:15:01 +00:00
import SiteWaitOpenBillPanel from '@/views/emis/emisSettleBill/panel/SiteWaitOpenBillPanel.vue';
2024-08-20 10:55:06 +00:00
import EmisSettleInvoiceRecordForm from '@/views/emis/emisSettleInvoiceRecord/emisSettleInvoiceRecordForm';
2024-11-17 01:43:01 +00:00
import SiteConfirmSubBillListPanel from '@/views/emis/emisSettleBill/panel/SiteConfirmSubBillListPanel.vue';
2024-07-24 01:12:18 +00:00
export default {
name: "SiteInvoiceRecordApply",
components: {
InvoiceRecordApplyListPanel,
2024-08-06 07:41:36 +00:00
InvoiceDetailPanel,
2024-08-20 10:55:06 +00:00
SiteWaitOpenBillPanel,
2024-11-17 01:43:01 +00:00
EmisSettleInvoiceRecordForm,
SiteConfirmSubBillListPanel
2024-07-24 01:12:18 +00:00
},
dicts: [
],
data() {
return {
activeTab:'billList',
billTabs:[],
2024-11-17 01:43:01 +00:00
showApply:false,
2024-08-20 10:55:06 +00:00
selectBillList:null,
2024-11-17 01:43:01 +00:00
curSettleBillNo:null,
2024-11-17 10:27:56 +00:00
showBillDetail:false,
currApplyId:null,
showApplyDetail:false
2024-07-24 01:12:18 +00:00
};
},
created() {
},
methods: {
handleTabsClick(){
2024-11-17 01:43:01 +00:00
},
2024-11-18 09:14:44 +00:00
2024-11-17 01:43:01 +00:00
onSelectShowBill(item) {
this.curSettleBillNo=item.settleBillNo;
this.showBillDetail=true;
this.activeTab="billDetail";
2024-07-24 01:12:18 +00:00
},
onSelectApply(item) {
2024-11-17 10:27:56 +00:00
this.currApplyId=item.id;
this.showApplyDetail=true;
this.activeTab="applyDetail";
// 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;
// }
2024-07-24 01:12:18 +00:00
},
2024-08-20 10:55:06 +00:00
onApply(billList){
2024-11-17 01:43:01 +00:00
this.showApply=true;
2024-08-20 10:55:06 +00:00
this.selectBillList=billList;
this.activeTab="applyPanel";
},
handleFormChanged(){
2024-11-17 01:43:01 +00:00
this.showApply=false;
2024-08-20 10:55:06 +00:00
this.selectBillList=null;
this.activeTab="waitOpenBillList";
},
cancelForm(){
2024-11-17 01:43:01 +00:00
this.showApply=false;
2024-08-20 10:55:06 +00:00
this.selectBillList=null;
this.activeTab="waitOpenBillList";
},
2024-07-24 01:12:18 +00:00
removeTab(targetName) {
2024-11-17 01:43:01 +00:00
if(targetName=='applyPanel'){
this.showApply=false;
this.selectBillList=null;
this.activeTab="waitOpenBillList";
}
else if(targetName=='billDetail'){
this.curSettleBillNo=null;
this.showBillDetail=false;
this.activeTab="waitOpenBillList";
}
2024-11-17 10:27:56 +00:00
else if(targetName=='applyDetail'){
this.currApplyId=null;
this.showApplyDetail=false;
this.activeTab="waitOpenBillList";
}
2024-07-24 01:12:18 +00:00
},
}
};
</script>
2024-08-12 08:02:33 +00:00
<style lang="scss" scoped>
2024-07-24 01:12:18 +00:00
.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;
}
2024-08-09 06:24:07 +00:00
2024-07-24 01:12:18 +00:00
</style>