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

调整

parent dab8f704
......@@ -52,7 +52,6 @@
mixins: [editMixin, editMixin_expand],
methods: {
kcSave(obj){
debugger
let {list}=obj
this.form.ckid=list[0].ckid
......
<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">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<mxakck :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="xzmx(ctx.basePage)" size='mini' type="primary">新增</el-button>
</template>
......@@ -15,6 +16,7 @@
<script>
import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
import mxakck from './mxakck.vue'
export default {
mounted() {
......@@ -27,11 +29,11 @@
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
operateButtons: true,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
......@@ -40,7 +42,7 @@
},
config: {
/* 基本配置*/
url: 'lxyl/ckgl/dbck',
url: 'lxyl/ckgl/cktzqd',
queryUrl: 'lxyl/ckgl/dbck/query/detail',
tableTitle: [
{
......@@ -128,6 +130,21 @@
},
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) {
this.$emit('getRow', val)
},
......@@ -141,7 +158,7 @@
},
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 @@
<!-- 额外数据 -->
</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"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
: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