This commit is contained in:
linfso 2024-11-15 14:49:12 +08:00
parent 7b6ddd6417
commit 88ac25d974
2 changed files with 15 additions and 10 deletions

View File

@ -4,10 +4,10 @@
<div class="tab-container"> <div class="tab-container">
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleTabsClick" @tab-remove="removeTab"> <el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleTabsClick" @tab-remove="removeTab">
<el-tab-pane label="海陆空批次列表" name="billList" > <el-tab-pane label="海陆空批次列表" name="billList" >
<BigBatchPanel @onCreate="onCreateBatch"> </BigBatchPanel> <BigBatchPanel @onCreate="onCreateBatch" @onUpdate="onUpdateBatch"> </BigBatchPanel>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="批次编辑" name="batchEdit" v-if="openCreateNew" > <el-tab-pane label="批次编辑" name="batchEdit" v-if="openEditForm" >
<BigBatchEditForm @on-changed="handleFormChanged" @on-cancel="cancelForm"></BigBatchEditForm> <BigBatchEditForm :batchId="batchId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></BigBatchEditForm>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-for="(item, index) in billTabs" :key="index" :name="item.settleBillNo" :label="'账单:'+item.settleBillNo" closable > <el-tab-pane v-for="(item, index) in billTabs" :key="index" :name="item.settleBillNo" :label="'账单:'+item.settleBillNo" closable >
<BillDetailPanel :settleBillNo="item.settleBillNo"></BillDetailPanel> <BillDetailPanel :settleBillNo="item.settleBillNo"></BillDetailPanel>
@ -38,7 +38,8 @@ export default {
return { return {
activeTab:'billList', activeTab:'billList',
billTabs:[], billTabs:[],
openCreateNew:false, openEditForm:false,
batchId:null,
}; };
}, },
created() { created() {
@ -48,7 +49,12 @@ export default {
}, },
onCreateBatch(){ onCreateBatch(){
this.openCreateNew=true; this.openEditForm=true;
this.activeTab='batchEdit';
},
onUpdateBatch(batchId){
this.batchId=batchId;
this.openEditForm=true;
this.activeTab='batchEdit'; this.activeTab='batchEdit';
}, },
@ -62,11 +68,11 @@ export default {
} }
}, },
handleFormChanged(){ handleFormChanged(){
this.openCreateNew=false; this.openEditForm=false;
this.activeTab="billList"; this.activeTab="billList";
}, },
cancelForm(){ cancelForm(){
this.openCreateNew=false; this.openEditForm=false;
this.activeTab="billList"; this.activeTab="billList";
}, },
removeTab(targetName) { removeTab(targetName) {

View File

@ -417,14 +417,13 @@ export default {
this.$modal.msgSuccess('操作成功'); this.$modal.msgSuccess('操作成功');
this.getList(); this.getList();
}, },
handleDown(){ handleDown(){
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate() { handleUpdate() {
let id = this.ids[0] // let id = this.ids[0]
this.$emit("onUpdate",id); this.$emit("onUpdate",this.ids);
}, },
handleFormChanged(){ handleFormChanged(){