lanan-system-vue/src/views/repair/stockOperate/InStock.vue

78 lines
2.0 KiB
Vue
Raw Normal View History

2024-09-11 18:49:43 +08:00
<template>
<div class="app-container">
<el-tabs v-model="activeTab" @tab-click="changeTab">
2024-09-11 18:49:43 +08:00
<el-tab-pane label="采购单据" name="purchase">
<SoIndex :so-by-type="soByType"/>
</el-tab-pane>
<el-tab-pane label="急件单据" name="urgentPurchase">
<SoIndex :so-by-type="soByType" :goods-yes="true"/>
</el-tab-pane>
2024-09-11 18:49:43 +08:00
<el-tab-pane label="作废单据" name="voidPurchase">
<SoVoid :so-by-type="soByType" />
</el-tab-pane>
<el-tab-pane label="采购明细" name="detailPurchase">
<SoiTable :so-by-type="soByType" />
</el-tab-pane>
<el-tab-pane label="采购单" name="purchaseCreate">
<SoInfo :so-by-type="soByType" :so-type="soType"/>
2024-09-11 18:49:43 +08:00
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import SoInfo from "@/views/repair/stockOperate/Components/SoInfo.vue";
import SoIndex from "@/views/repair/stockOperate/Components/SoIndex.vue";
import SoVoid from "@/views/repair/stockOperate/Components/SoVoid.vue";
import SoiTable from "@/views/repair/stockOperate/Components/SoiTable.vue";
export default {
name: "InStock",
components: {
SoiTable,
SoVoid,
SoIndex,
SoInfo
},
data() {
return {
activeTab: "purchase",
soByType: true,
soType: null
2024-09-11 18:49:43 +08:00
}
},
created() {
this.isType()
this.init()
2024-09-11 18:49:43 +08:00
},
methods: {
// 判断是什么单据,决定字段的属性、展示否等
async isType() {
const url = this.$route.path
this.soByType = url.includes("soi")
},
// 判断是点进来的还是跳转过来的
async init(){
const active = this.$route.query.active
if (active){
this.activeTab = active
}
const soType = this.$route.query.soType
if (soType){
this.soType = soType
}
},
changeTab(tab, event){
// if (this.soType){
// this.$router.push("/repair/stock/repair-soi")
// }
}
2024-09-11 18:49:43 +08:00
}
}
</script>
<style scoped lang="scss">
</style>