Commit 3f295e2b authored by 李苏's avatar 李苏 💬

备料选择清单多选

parent 2687ab9f
<template> <template>
<BasePage :setFirstCurrent='false' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" <BasePage ref="basePage" :setFirstCurrent='false' :power='power' @getRow='getRow' class="min_full" style="height: 100%;"
:config="config"> :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
export default { export default {
data() { data() {
return { return {
power: { power:{
add: false, add: false,
copy: false, copy: false,
delButton: false, delButton: false,
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
operateButtons: false, operateButtons: false,
workFlow: false, workFlow: false,
/* 表格 */ /* 表格 */
showSelection: false, showSelection: true,
saveSelected: false saveSelected: true
}, },
config: { config: {
queryDetail: true, queryDetail: true,
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;"> <div slot="form" style="display: flex;height: 70vh;">
<div class="full"> <div class="full">
<el-tabs class="full" v-model="activeName"> <el-tabs @tab-click='tabclick' class="full" v-model="activeName">
<el-tab-pane class="full" label="拣货单" name="first"> <el-tab-pane class="full" label="拣货单" name="first">
<Rkd @getRow='getRow' /> <Rkd ref="rkd" @getRow='getRow' />
</el-tab-pane> </el-tab-pane>
<el-tab-pane class="full" label="拣货单明细" name="second"> <el-tab-pane class="full" label="拣货单明细" name="second">
<Rkqd ref="rkqd" /> <Rkqd ref="rkqd" />
...@@ -48,6 +48,26 @@ ...@@ -48,6 +48,26 @@
} }
}, },
methods: { methods: {
tabclick(val){
this.$nextTick(()=>{
if(val.index==1){
/* 查询明细*/
let list =this.$refs.rkd.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length==0){
this.$warning('请至少勾选一条入库单查询')
}else{
this.row=list[0]
this.$refs.rkqd.$refs.basePage.queryParams.mids = list.map(item=>item.id)
this.$refs.rkqd.$refs.basePage.$refs['TablePager'].pageQuery({
})
}
// this.activeName = 'second'
}
})
},
save() { save() {
let list=this.$refs.rkqd.$refs.basePage.$refs.TablePager.selectedList||[] let list=this.$refs.rkqd.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length==0){ if(list.length==0){
...@@ -63,12 +83,7 @@ ...@@ -63,12 +83,7 @@
// if() // if()
}, },
getRow(val) { getRow(val) {
this.row=val
this.$refs.rkqd.$refs.basePage.queryParams.mid = val.id
this.$refs.rkqd.$refs.basePage.$refs['TablePager'].pageQuery({
// setFirstCurrent: true
})
this.activeName = 'second'
} }
} }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
/* 查询明细*/ /* 查询明细*/
let list =this.$refs.rkd.$refs.basePage.$refs.TablePager.selectedList||[] let list =this.$refs.rkd.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length==0){ if(list.length==0){
this.$warning('请只是勾选一条入库单查询') this.$warning('请至少勾选一条入库单查询')
}else{ }else{
this.row=list[0] this.row=list[0]
this.$refs.rkqd.$refs.basePage.queryParams.mids = list.map(item=>item.id) this.$refs.rkqd.$refs.basePage.queryParams.mids = list.map(item=>item.id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment