bonus-ui/src/views/material/purchase/goodsBind/index.vue

68 lines
1.8 KiB
Vue
Raw Normal View History

2024-10-29 18:03:15 +08:00
<template>
2024-11-08 17:41:07 +08:00
<!-- 新购验收绑定 -->
<div class="app-container">
<PageHeader
@goBack="goBack"
:pageContent="pageContent"
v-if="isShowComponent != 'Home'"
/>
<keep-alive include="Home">
<component
:queryId="queryId"
:is="isShowComponent"
2024-12-03 10:18:11 +08:00
:isView="isView"
2024-11-08 17:41:07 +08:00
:queryType="queryType"
:queryTaskId="queryTaskId"
@openBindTools="openBindTools"
/>
</keep-alive>
</div>
2024-10-29 18:03:15 +08:00
</template>
2024-11-08 17:41:07 +08:00
2024-10-29 18:03:15 +08:00
<script>
2024-11-08 17:41:07 +08:00
import Home from './component/home.vue' // 主列表
import PageHeader from '@/components/pageHeader'
import BindTools from './component/bindTools.vue' // 编码绑定 查看
2024-10-29 18:03:15 +08:00
export default {
2024-11-08 17:41:07 +08:00
components: {
Home,
BindTools,
PageHeader,
},
data() {
return {
queryType: '', // 二级页面类型
pageContent: '', // 二级页面标题
queryTaskId: '', // 二级页面查询 taskId
queryId: '', // 二级页面查询 id
isShowComponent: 'Home',
2024-12-03 10:18:11 +08:00
isView: false,
2024-11-08 17:41:07 +08:00
}
},
2024-10-29 18:03:15 +08:00
2024-11-08 17:41:07 +08:00
methods: {
// 打开二级页面
openBindTools(taskId, id, type) {
this.queryId = id
this.queryType = type
this.queryTaskId = taskId
if (type === 1) {
2024-12-03 10:18:11 +08:00
this.isView = true
2024-11-08 17:41:07 +08:00
this.pageContent = '查看'
this.isShowComponent = 'BindTools'
}
if (type === 2) {
2024-12-03 10:18:11 +08:00
this.isView = false
2024-11-08 17:41:07 +08:00
this.pageContent = '编码绑定'
this.isShowComponent = 'BindTools'
}
2024-10-29 18:03:15 +08:00
},
2024-11-08 17:41:07 +08:00
// 返回按钮
goBack() {
this.isShowComponent = 'Home'
},
2024-10-29 18:03:15 +08:00
},
2024-11-08 17:41:07 +08:00
}
</script>