Commit 52273ccd authored by 李苏's avatar 李苏 💬

调整

parent dab8f704
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
mixins: [editMixin, editMixin_expand], mixins: [editMixin, editMixin_expand],
methods: { methods: {
kcSave(obj){ kcSave(obj){
debugger
let {list}=obj let {list}=obj
this.form.ckid=list[0].ckid this.form.ckid=list[0].ckid
......
<template> <template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full" <BasePage :changeDelParams='changeDelParams' @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full"
style="height: 100%;" :autoQuery='false' :config="config"> style="height: 100%;" :autoQuery='false' :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<mxakck :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <el-button @click="xzmx(ctx.basePage)" size='mini' type="primary">新增</el-button>
</template> </template>
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
<script> <script>
import wlsx from 'common/src/mixin/wlsx.js' import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js' import wlphsx from 'common/src/mixin/wlphsx.js'
import mxakck from './mxakck.vue'
export default { export default {
mounted() { mounted() {
...@@ -27,11 +29,11 @@ ...@@ -27,11 +29,11 @@
add: false, add: false,
copy: false, copy: false,
/* 手动控制删除 */ /* 手动控制删除 */
delButton: false, delButton: true,
/* 手动控制编辑按钮权限 */ /* 手动控制编辑按钮权限 */
editButton: false, editButton: false,
/* 是否渲染右侧操作按钮 */ /* 是否渲染右侧操作按钮 */
operateButtons: false, operateButtons: true,
/* 是否开启工作流按钮 */ /* 是否开启工作流按钮 */
workFlow: false, workFlow: false,
/* 表格开启选择,以及记住选择 */ /* 表格开启选择,以及记住选择 */
...@@ -40,7 +42,7 @@ ...@@ -40,7 +42,7 @@
}, },
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'lxyl/ckgl/dbck', url: 'lxyl/ckgl/cktzqd',
queryUrl: 'lxyl/ckgl/dbck/query/detail', queryUrl: 'lxyl/ckgl/dbck/query/detail',
tableTitle: [ tableTitle: [
{ {
...@@ -128,6 +130,21 @@ ...@@ -128,6 +130,21 @@
}, },
methods: { methods: {
changeDelParams(params){
params.id=params.master.id
delete params.master
},
xzmx(ctx){
if( ctx.queryParams.mid){
ctx.DialogWidth='60vw'
ctx.DialogTitle='新增明细数据'
ctx.showDialog=true
}else{
this.$warning('请选择一条调拨出库单')
}
},
getRow(val) { getRow(val) {
this.$emit('getRow', val) this.$emit('getRow', val)
}, },
...@@ -141,7 +158,7 @@ ...@@ -141,7 +158,7 @@
}, },
components: { components: {
mxakck
} }
} }
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" class="editTab">
<Kc @save='kcSave' v-if="showDialog" :app='this' />
<editTableForEdit :AuxButton='false' code='WMSWLXX' :indexApp='app' type='edit' ref="editTableForEdit"
:editTableTitle='editTableTitle'
:editTableData="formDetail">
<template #toolbar="ctx">
<el-button @click="xzkc()" size='mini' type="primary">选择库存</el-button>
<!-- <AuxButton :queryParams="{
ckid:form.ckid
}" rename='选择库存' code='WLKC' @save="savekc" /> -->
</template>
</editTableForEdit>
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import {
toFixed,
} from 'common/src/utils/blur.js'
import Kc from './top/kc.vue'
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
showDialog:false,
DialogWidth: '70vw',
DialogName: '',
DialogTitle: '选择库存',
formDetail:[],
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物料编码",
field: "wlxxCode",
width: 240,
},
{
title: "物料名称",
field: "wlxxName",
width: 160
},
{
title: "规格",
field: "wlxxGg",
width: 140
},
{
title: "计量单位",
field: "jldwName",
width: 100,
allowEdit: false
},
{
title: "调拨数量",
field: "yfsl",
allowEdit: true,
type: 'inputNumber',
width: 200,
blur: toFixed(null),
},
{
title: "制令号",
field: "zlh",
type: 'inputText',
width: 180,
allowEdit: false
},
/* 不可编辑*/
// {
// title: "出库数量",
// field: "cksl",
// width: 200,
// },
{
title: "物料批号",
field: "wlph",
type: 'inputText',
allowEdit: false,
width: 180,
},
{
title: "库位",
field: "kwCode",
width: 240,
},
{
title: "容器",
field: "rqCode",
width: 160,
},
{
title: "唯一码",
field: "packCode",
width: 160,
},
]
}
},
methods: {
save(){
if(this.formDetail.length!=0){
let mid= this.app.queryParams.mid
this.formDetail.forEach(item=>item.mid=mid)
this.$post('lxyl/ckgl/cktzqd/add',this.formDetail).then(res=>{
if(res.success){
this.app.refresh()
this.app.showDialog=false
}
})
}else{
this.$warning('请至少选择一条数据')
}
},
kcSave(obj){
let {list}=obj
// this.form.ckid=list[0].ckid
// this.form.hzid=list[0].hzid
// this.form.hzName=list[0].hzName
// this.form.ywrq=row.ywrq
let length = this.formDetail.length
this.formDetail.splice(0, length)
list.forEach(item => {
item.yfsl=item.kcsl
item.lydjid = item.id
delete item.id
this.formDetail.push(_.cloneDeep(item))
})
},
xzkc(){
this.showDialog=true
},
},
components:{
Kc
}
}
</script>
<style lang="scss" scoped>
@import url("~common/src/assets/styles/editDetail.scss");
</style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<!-- 额外数据 --> <!-- 额外数据 -->
</el-row> </el-row>
<div class="editTab"> <div v-show="type!='edit'" class="editTab">
<editTableForEdit :AuxButton='false' code='WMSWLXX' :indexApp='app' :type='type' @save='save' ref="editTableForEdit" <editTableForEdit :AuxButton='false' code='WMSWLXX' :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow' :editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail"> :editTableData="formDetail">
......
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