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

调整

parent fb926d50
<template> <template>
<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 class="full" v-model="activeName">
<el-tab-pane class="full" label="汇总" name="first"> <el-tab-pane class="full" label="汇总" name="first">
<Wlxx ref="hz" @getRow='getRow' /> <Wlxx @getRow='getRow' ref="hz" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane class="full" label="明细" name="second"> <el-tab-pane class="full" label="明细" name="second">
<Add ref="add" /> <Add ref="add" />
...@@ -43,46 +42,42 @@ ...@@ -43,46 +42,42 @@
}, },
data() { data() {
return { return {
row:{}, row: {},
activeName: 'first' activeName: 'first'
} }
}, },
watch: {
activeName(val) {
if (val == 'second') {
/* 查询详情*/
}
}
},
methods: { methods: {
save() { save() {
/* hz信息*/ /* 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 => { let list = this.$refs.hz.$refs.basePage.$refs.TablePager.selectedList || []
item.sl=item.kcsl if (list.length != 0) {
item.lydjid=item.id||item.lydjid let params = list.map(item => {
delete item.id return {
ckid: item.ckid,
wlid: item.wlid,
wlph: item.wlph
} }
) })
this.$post('lxyl/zlgl/kccj/save',params ).then(res => {
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 => {
if (res.success) { if (res.success) {
this.$success('操作成功') this.$success('操作成功')
this.app.showDialog = false this.app.showDialog = false
this.app.refresh() this.app.refresh()
} }
}) })
} else {
this.$warning('只能勾选相同仓库的数据进行操作')
} }
} else { else {
this.$warning('请至少勾选一条数据') this.$warning('请至少勾选一条数据')
} }
// if() // if()
......
<template> <template>
<BasePage :toolButtonConfig="{ <BasePage :handleSourceData='handleSourceData' fePage :toolButtonConfig="{
showExcel:false, showExcel:false,
showPrint:false, showPrint:false,
showField:true showField:true
...@@ -9,8 +9,18 @@ ...@@ -9,8 +9,18 @@
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template> </template>
<template #toolbar="ctx"> <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> </template>
</BasePage> </BasePage>
...@@ -29,8 +39,8 @@ ...@@ -29,8 +39,8 @@
operateButtons: false, operateButtons: false,
workFlow: false, workFlow: false,
/* 表格 */ /* 表格 */
showSelection: false, showSelection: true,
saveSelected: false saveSelected: true
}, },
config: { config: {
queryDetail: true, queryDetail: true,
...@@ -122,8 +132,16 @@ ...@@ -122,8 +132,16 @@
}, },
methods: { methods: {
handleSourceData(list){
list.forEach((item,index)=>{
item.id=index
})
},
ckxq(row){
this.$emit('getRow', row)
},
getRow(val) { getRow(val) {
this.$emit('getRow', val) // this.$emit('getRow', val)
} }
}, },
components: { 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