Commit 9dd0c936 authored by 李苏's avatar 李苏 💬

调整

parent fb926d50
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<div class="full">
<el-tabs class="full" v-model="activeName">
<el-tab-pane class="full" label="汇总" name="first">
<Wlxx ref="hz" @getRow='getRow' />
<Wlxx @getRow='getRow' ref="hz" />
</el-tab-pane>
<el-tab-pane class="full" label="明细" name="second">
<Add ref="add" />
<Add ref="add" />
</el-tab-pane>
</el-tabs>
</div>
......@@ -43,46 +42,42 @@
},
data() {
return {
row:{},
row: {},
activeName: 'first'
}
},
watch: {
activeName(val) {
if (val == 'second') {
/* 查询详情*/
}
}
},
methods: {
save() {
/* hz信息*/
let hzInfo =this.$refs.hz.$refs.basePage.singleItem
console.log(hzInfo,'hzInfo')
let list = this.$refs.add.$refs.basePage.tabData || []
if (list.length != 0) {
let ckList = list.map(item => item.ckid)
list.forEach(item => {
item.sl=item.kcsl
item.lydjid=item.id||item.lydjid
delete item.id
}
)
ckList = [...new Set(ckList)]
if (ckList.length == 1) {
this.$post('lxyl/zlgl/kccj/save', {
ckid:hzInfo.ckid,
wlid:hzInfo.wlid,
wlph:hzInfo.wlph,
datas:[...list]
}).then(res => {
let list = this.$refs.hz.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length != 0) {
let params = list.map(item => {
return {
ckid: item.ckid,
wlid: item.wlid,
wlph: item.wlph
}
})
this.$post('lxyl/zlgl/kccj/save',params ).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
this.app.refresh()
}
})
} else {
this.$warning('只能勾选相同仓库的数据进行操作')
}
} else {
else {
this.$warning('请至少勾选一条数据')
}
// if()
......
<template>
<BasePage :toolButtonConfig="{
<BasePage :handleSourceData='handleSourceData' fePage :toolButtonConfig="{
showExcel:false,
showPrint:false,
showField:true
......@@ -9,9 +9,19 @@
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> -->
</template>
<template slot="tabCustom2">
<el-table-column label="查看" width="90" header-align="center" fixed="right">
<template slot-scope="scope">
<el-button style="text-align: center;color: cornflowerblue;width: 100%;"
@click.native.prevent="ckxq(scope.row)" type="text" size="small">
查看详情
</el-button>
</template>
</el-table-column>
</template>
</BasePage>
</template>
......@@ -29,8 +39,8 @@
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: false,
saveSelected: false
showSelection: true,
saveSelected: true
},
config: {
queryDetail: true,
......@@ -122,8 +132,16 @@
},
methods: {
handleSourceData(list){
list.forEach((item,index)=>{
item.id=index
})
},
ckxq(row){
this.$emit('getRow', row)
},
getRow(val) {
this.$emit('getRow', val)
// this.$emit('getRow', val)
}
},
components: {
......
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