md
This commit is contained in:
parent
aee4332d90
commit
746d2b2b0e
@ -76,7 +76,7 @@ export default {
|
||||
handleFormChanged(){
|
||||
this.openEditForm=false;
|
||||
this.activeTab="billList";
|
||||
this.$ref.refBatchList.handleQuery();
|
||||
this.$refs.refBatchList.handleQuery();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openEditForm=false;
|
||||
|
||||
@ -4,26 +4,31 @@
|
||||
<div class="tab-container">
|
||||
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleTabsClick" @tab-remove="removeTab">
|
||||
<el-tab-pane label="快递批次列表" name="billList" >
|
||||
<ExpressPanel @onSelect="onSelectBill"> </ExpressPanel>
|
||||
<ExpressBatchListPanel ref="refBatchList" @onCreate="onCreateBatch" @onUpdate="onUpdateBatch" @onView="onViewBatch"> </ExpressBatchListPanel>
|
||||
</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>
|
||||
<el-tab-pane label="批次编辑" name="batchEdit" v-if="openEditForm" closable="" >
|
||||
<ExpressBatchEditForm :batchId="batchId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></ExpressBatchEditForm>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="批次查看" name="batchView" v-if="openViewForm" closable >
|
||||
<ExpressBatchEditForm :batchId="batchId" disabled ></ExpressBatchEditForm>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ExpressPanel from '@/views/emis/emisTmsSiteBatch/panel/ExpressPanel.vue';
|
||||
import BillDetailPanel from '@/views/emis/emisSettleBill/panel/BillDetailPanel.vue';
|
||||
|
||||
import ExpressBatchListPanel from '@/views/emis/emisTmsSiteBatch/panel/ExpressBatchListPanel.vue';
|
||||
import ExpressBatchEditForm from '@/views/emis/emisTmsSiteBatch/panel/ExpressBatchEditForm.vue';
|
||||
import ExpressBatchViewOnly from '@/views/emis/emisTmsSiteBatch/panel/ExpressBatchViewOnly.vue';
|
||||
|
||||
export default {
|
||||
name: "ChargeBillMonthList",
|
||||
name: "ExpressBatchMgnt",
|
||||
components: {
|
||||
ExpressPanel,
|
||||
BillDetailPanel
|
||||
ExpressBatchListPanel,
|
||||
ExpressBatchEditForm,
|
||||
ExpressBatchViewOnly
|
||||
},
|
||||
dicts: [
|
||||
],
|
||||
@ -31,6 +36,9 @@ export default {
|
||||
return {
|
||||
activeTab:'billList',
|
||||
billTabs:[],
|
||||
openEditForm:false,
|
||||
openViewForm:false,
|
||||
batchId:null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -38,6 +46,23 @@ export default {
|
||||
methods: {
|
||||
handleTabsClick(){
|
||||
|
||||
},
|
||||
onCreateBatch(){
|
||||
this.batchId=null;
|
||||
this.openEditForm=true;
|
||||
this.activeTab='batchEdit';
|
||||
},
|
||||
onUpdateBatch(batchId){
|
||||
this.batchId=batchId;
|
||||
this.openEditForm=true;
|
||||
this.activeTab='batchEdit';
|
||||
|
||||
},
|
||||
onViewBatch(batchId){
|
||||
this.batchId=batchId;
|
||||
this.openViewForm=true;
|
||||
this.activeTab='batchView';
|
||||
|
||||
},
|
||||
onSelectBill(item) {
|
||||
let old=this.billTabs.find(mItem=>mItem.settleBillNo==item.settleBillNo);
|
||||
@ -48,17 +73,25 @@ export default {
|
||||
this.activeTab=item.settleBillNo;
|
||||
}
|
||||
},
|
||||
handleFormChanged(){
|
||||
this.openEditForm=false;
|
||||
this.activeTab="billList";
|
||||
this.$refs.refBatchList.handleQuery();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openEditForm=false;
|
||||
this.activeTab="billList";
|
||||
},
|
||||
removeTab(targetName) {
|
||||
|
||||
var self=this;
|
||||
let tabs = self.billTabs;
|
||||
self.billTabs = tabs.filter(tab => tab.settleBillNo !== targetName);
|
||||
if(self.billTabs.length>0){
|
||||
this.activeTab=self.billTabs[self.billTabs.length-1].settleBillNo;
|
||||
}else{
|
||||
this.activeTab="billList";
|
||||
}
|
||||
|
||||
console.log("===>",targetName);
|
||||
if(targetName=='batchEdit'){
|
||||
this.openEditForm=false;
|
||||
this.activeTab="billList";
|
||||
}
|
||||
else if(targetName=='batchView'){
|
||||
this.openViewForm=false;
|
||||
this.activeTab='billList';
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@ -724,10 +724,12 @@ export default {
|
||||
|
||||
if(this.batchId !=null) {
|
||||
this.showBatchInfo(this.batchId);
|
||||
this.coPackType = "edit";
|
||||
}else{
|
||||
this.reset();
|
||||
this.coData.startSiteCode=this.$store.getters.ownerSiteCode;
|
||||
this.coData.batchType='1';
|
||||
this.coPackType = "add";
|
||||
}
|
||||
},
|
||||
// 表单重置
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user