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

View File

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