|
|
|
@ -1,11 +1,34 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-row :gutter="0" v-if="isLinkDisabled" style="margin-top: 15px">
|
|
|
|
|
<el-col :span="24" align="right">
|
|
|
|
|
<div class="inv-hos-title">
|
|
|
|
|
<span
|
|
|
|
|
style="margin: 10px;color: #2d8cf0;font-size: 14px;"
|
|
|
|
|
>部门 : {{ this.userInfo.deptName }}</span>
|
|
|
|
|
|
|
|
|
|
<span style="font-weight: 500;color:rgb(51 48 48); font-size: 14px;">用户 : 
|
|
|
|
|
<!-- {{-->
|
|
|
|
|
<!-- this.userInfo.companyName-->
|
|
|
|
|
<!-- }}-->
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
style="font-weight: 500;color:rgb(51 48 48); font-size: 14px; margin-right: 20px"
|
|
|
|
|
>    (用户 : {{
|
|
|
|
|
this.userInfo.userName
|
|
|
|
|
}})</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row class="tac">
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<!-- <h5>默认颜色</h5>-->
|
|
|
|
|
<el-menu
|
|
|
|
|
:default-active="menuActive"
|
|
|
|
|
class="el-menu-vertical-demo"
|
|
|
|
|
@open="handleOpen">
|
|
|
|
|
@open="handleOpen"
|
|
|
|
|
>
|
|
|
|
|
<el-menu-item :index=0 @click="clickMenuItem(0)">
|
|
|
|
|
<i class="el-icon-menu"></i>
|
|
|
|
|
<span slot="title">处理单据</span>
|
|
|
|
@ -86,17 +109,16 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import DealOrderBlank from "@/views/collect/DealOrderBlank.vue";
|
|
|
|
|
import CollectOrderAllotBlank from "@/views/collect/CollectOrderAllotBlank.vue";
|
|
|
|
|
import CollectOrderEndBlank from "@/views/collect/CollectOrderEndBlank.vue";
|
|
|
|
|
import IoCreateOrderBlankReturn from "@/views/collect/IoCreateOrderBlank.vue";
|
|
|
|
|
import IoCreateOrderBlankOut from "@/views/collect/IoCreateOrderBlank.vue";
|
|
|
|
|
import ioSplitFifoCodeBlank from "@/views/collect/ioSplitFifoCodeBlank.vue";
|
|
|
|
|
|
|
|
|
|
import DealOrderBlank from '@/views/collect/DealOrderBlank.vue'
|
|
|
|
|
import CollectOrderAllotBlank from '@/views/collect/CollectOrderAllotBlank.vue'
|
|
|
|
|
import CollectOrderEndBlank from '@/views/collect/CollectOrderEndBlank.vue'
|
|
|
|
|
import IoCreateOrderBlankReturn from '@/views/collect/IoCreateOrderBlank.vue'
|
|
|
|
|
import IoCreateOrderBlankOut from '@/views/collect/IoCreateOrderBlank.vue'
|
|
|
|
|
import ioSplitFifoCodeBlank from '@/views/collect/ioSplitFifoCodeBlank.vue'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
@ -110,6 +132,13 @@ export default {
|
|
|
|
|
name: 'CollectOrderTabs',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isLinkDisabled: false,
|
|
|
|
|
userInfo: {
|
|
|
|
|
inv: this.$store.getters.locInvName,
|
|
|
|
|
deptName: this.$store.getters.locDeptName,
|
|
|
|
|
userName: this.$store.getters.name,
|
|
|
|
|
companyName: this.$store.getters.companyName
|
|
|
|
|
},
|
|
|
|
|
tabPosition: 'left',
|
|
|
|
|
editableTabsValue: 'DealOrderBlank',
|
|
|
|
|
componentTables: [
|
|
|
|
@ -176,7 +205,7 @@ export default {
|
|
|
|
|
componentProps: {
|
|
|
|
|
title: '这是单据的标题'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
tabIndex: 0,
|
|
|
|
|
menuActive: 0
|
|
|
|
@ -184,20 +213,20 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
upodateMenuActive(tab, event) {
|
|
|
|
|
const foundTab = this.findTabByName(tab.name);
|
|
|
|
|
const foundTab = this.findTabByName(tab.name)
|
|
|
|
|
if (foundTab) {
|
|
|
|
|
// 如果找到了,执行一些操作
|
|
|
|
|
this.menuActive = foundTab.number;
|
|
|
|
|
this.menuActive = foundTab.number
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
clickMenuItem(val) {
|
|
|
|
|
//分两种 一种已存在 一种未存在
|
|
|
|
|
let item = this.componentTables[(val)]
|
|
|
|
|
|
|
|
|
|
const foundTab = this.findTabByName(item.name);
|
|
|
|
|
const foundTab = this.findTabByName(item.name)
|
|
|
|
|
if (foundTab) {
|
|
|
|
|
// 如果找到了,执行一些操作
|
|
|
|
|
this.editableTabsValue = foundTab.name;
|
|
|
|
|
this.editableTabsValue = foundTab.name
|
|
|
|
|
} else {
|
|
|
|
|
// 如果没有找到,执行其他操作
|
|
|
|
|
this.addTab(item)
|
|
|
|
@ -206,33 +235,38 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
findTabByName(name) {
|
|
|
|
|
// 使用find方法找到ID等于tabId的对象
|
|
|
|
|
const tab = this.editableTabs.find(tab => tab.name === name);
|
|
|
|
|
const tab = this.editableTabs.find(tab => tab.name === name)
|
|
|
|
|
// 如果找到了,返回该对象;否则返回undefined
|
|
|
|
|
return tab;
|
|
|
|
|
return tab
|
|
|
|
|
},
|
|
|
|
|
addTab(item) {
|
|
|
|
|
++this.tabIndex;
|
|
|
|
|
this.editableTabs.push(item);
|
|
|
|
|
this.editableTabsValue = item.name;
|
|
|
|
|
++this.tabIndex
|
|
|
|
|
this.editableTabs.push(item)
|
|
|
|
|
this.editableTabsValue = item.name
|
|
|
|
|
},
|
|
|
|
|
removeTab(targetName) {
|
|
|
|
|
let tabs = this.editableTabs;
|
|
|
|
|
let activeName = this.editableTabsValue;
|
|
|
|
|
let tabs = this.editableTabs
|
|
|
|
|
let activeName = this.editableTabsValue
|
|
|
|
|
|
|
|
|
|
if (activeName === targetName) {
|
|
|
|
|
tabs.forEach((tab, index) => {
|
|
|
|
|
if (tab.name === targetName) {
|
|
|
|
|
let nextTab = tabs[index + 1] || tabs[index - 1];
|
|
|
|
|
let nextTab = tabs[index + 1] || tabs[index - 1]
|
|
|
|
|
if (nextTab) {
|
|
|
|
|
activeName = nextTab.name;
|
|
|
|
|
this.menuActive = nextTab.number;
|
|
|
|
|
activeName = nextTab.name
|
|
|
|
|
this.menuActive = nextTab.number
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.editableTabsValue = activeName;
|
|
|
|
|
this.editableTabs = tabs.filter(tab => tab.name !== targetName);
|
|
|
|
|
this.editableTabsValue = activeName
|
|
|
|
|
this.editableTabs = tabs.filter(tab => tab.name !== targetName)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
if (this.$route.query.workplaceId != null) {
|
|
|
|
|
this.isLinkDisabled = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|