This commit is contained in:
linfso 2025-01-02 07:51:11 +08:00
parent cf3bed37a3
commit 13dd1cfc46

View File

@ -4,13 +4,17 @@
<div class="tab-container">
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleTabsClick" @tab-remove="removeTab">
<el-tab-pane label="进仓单" name="billList" >
<WarehouseInPanel @onSelect="onSelectBill" @onStockIn="onStockIn"> </WarehouseInPanel>
<WarehouseInPanel @onSelect="onSelectBill" @onStockIn="onStockIn" > </WarehouseInPanel>
</el-tab-pane>
<el-tab-pane label="收货入仓" name="wsInPanel" v-if="showWsInPanel" closable>
<WarehouseStockIn :key="selectInNo" :inNo="selectInNo"></WarehouseStockIn>
</el-tab-pane>
<el-tab-pane v-for="(item, index) in billTabs" :key="index" :name="item.inNo" :label="'进仓单:'+item.inNo" closable >
<!-- <el-tab-pane v-for="(item, index) in billTabs" :key="index" :name="item.inNo" :label="'进仓单:'+item.inNo" closable >
<WarehouseInBatchPanel :inNo="item.inNo"></WarehouseInBatchPanel>
</el-tab-pane> -->
<el-tab-pane label="查看进仓详情" name="wsInView" v-if="openViewForm" closable >
<WarehouseInBatchPanel :key="'batchView_'+selectInNo" :inNo="selectInNo"></WarehouseInBatchPanel>
</el-tab-pane>
</el-tabs>
@ -38,6 +42,8 @@ export default {
billTabs:[],
showWsInPanel:false,
selectInNo:null,
openViewForm:false,
};
},
created() {
@ -51,20 +57,30 @@ export default {
this.showWsInPanel=true;
this.activeTab='wsInPanel';
},
onSelectBill(item) {
let old=this.billTabs.find(mItem=>mItem.inNo==item.inNo);
if(old){
this.activeTab=item.inNo;
}else{
this.billTabs.push(item);
this.activeTab=item.inNo;
}
// let old=this.billTabs.find(mItem=>mItem.inNo==item.inNo);
// if(old){
// this.activeTab=item.inNo;
// }else{
// this.billTabs.push(item);
// this.activeTab=item.inNo;
// }
this.selectInNo=item.inNo;
this.openViewForm=true;
this.activeTab='wsInView';
},
removeTab(targetName) {
if(targetName=='wsInPanel'){
this.showWsInPanel=false;
this.activeTab="billList";
}else{
}
else if(targetName=='wsInView'){
this.openViewForm=false;
this.activeTab="billList";
}
else{
var self=this;
let tabs = self.billTabs;
self.billTabs = tabs.filter(tab => tab.inNo !== targetName);