Commit 106be7af authored by 李苏's avatar 李苏 💬

调整为清单

parent 14937597
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
<mxakck :app='ctx.basePage' v-if="ctx.basePage.showDialog" /> <mxakck :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<el-button @click="xzmx(ctx.basePage)" size='mini' type="primary">新增</el-button> <!-- <el-button @click="xzmx(ctx.basePage)" size='mini' type="primary">新增</el-button> -->
</template> </template>
</BasePage> </BasePage>
......
<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来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="xzmx(ctx.basePage)" size='mini' type="primary">新增</el-button>
</template> </template>
...@@ -13,6 +15,7 @@ ...@@ -13,6 +15,7 @@
</template> </template>
<script> <script>
import mxakck from './mxakck.vue'
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'
export default { export default {
...@@ -27,11 +30,11 @@ ...@@ -27,11 +30,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,
/* 表格开启选择,以及记住选择 */ /* 表格开启选择,以及记住选择 */
...@@ -121,6 +124,19 @@ ...@@ -121,6 +124,19 @@
}, },
methods: { methods: {
xzmx(ctx){
if( ctx.queryParams.mid){
ctx.DialogWidth='60vw'
ctx.DialogTitle='新增明细数据'
ctx.showDialog=true
}else{
this.$warning('请选择一条调拨出库单')
}
},
changeDelParams(params){
params.id=params.master.id
delete params.master
},
getRow(val) { getRow(val) {
this.$emit('getRow', val) this.$emit('getRow', val)
}, },
...@@ -134,7 +150,7 @@ ...@@ -134,7 +150,7 @@
}, },
components: { components: {
mxakck
} }
} }
......
...@@ -8,12 +8,13 @@ ...@@ -8,12 +8,13 @@
<div class="bottom flex"> <div class="bottom flex">
<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">
<ckdmx @getRow='ckdmxGetRow' ref="ckdmx" class="full" />
</el-tab-pane>
<el-tab-pane class="full" label="出库清单" name="second"> <el-tab-pane class="full" label="出库清单" name="second">
<ckqd ref="ckqd" class="full" /> <ckqd ref="ckqd" class="full" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane class="full" label="出库明细" name="first">
<ckdmx @getRow='ckdmxGetRow' ref="ckdmx" class="full" />
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
}, },
data(){ data(){
return { return {
activeName: 'first' activeName: 'second'
} }
}, },
methods: { methods: {
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
setFirstCurrent: true setFirstCurrent: true
}) })
this.$refs.ckqd.$refs.basePage.queryParams.mid = mid this.$refs.ckqd.$refs.basePage.queryParams.mid = mid
this.$refs.ckqd.$refs.basePage.dbckd=row
this.$refs.ckqd.$refs.basePage.$refs['TablePager'].pageQuery() this.$refs.ckqd.$refs.basePage.$refs['TablePager'].pageQuery()
}, },
ckdmxGetRow(row){ ckdmxGetRow(row){
......
<template> <template>
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div slot="form" class="editTab"> <div slot="form" style="display: flex;height: 70vh;">
<Kc @save='kcSave' v-if="showDialog" :app='this' /> <BasePage :handleSourceData='handleSourceData' :autoQuery='false' fePage :changeQueryParams='changeQueryParams' :toolButtonConfig="{
<editTableForEdit :AuxButton='false' code='WMSWLXX' :indexApp='app' type='edit' ref="editTableForEdit" showExcel:false,
:editTableTitle='editTableTitle' showPrint:false,
:editTableData="formDetail"> showField:true
}" ref="basePage" :power='power' class="min_full" style="height: 100%;" :config="config"> ref="basePage"
<template #toolbar="ctx"> :power='power' class="min_full" :config="config">
<el-button @click="xzkc()" size='mini' type="primary">选择库存</el-button> <template #dialog="ctx">
<!-- <AuxButton :queryParams="{ <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
ckid:form.ckid
}" rename='选择库存' code='WLKC' @save="savekc" /> -->
</template> </template>
</editTableForEdit> <template slot="tabCustom2">
<el-table-column label="调拨数量" width="120" header-align="center" fixed="right">
<template slot-scope="scope">
<el-input type='number' v-model="scope.row['yfsl']" ></el-input>
</template>
</el-table-column>
</template>
</BasePage>
</div> </div>
<div slot="reFooter" class="refooter" > <div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer" > <span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button> <el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button> <el-button type="primary" @click="save()">保 存</el-button>
</span> </span>
...@@ -23,42 +29,75 @@ ...@@ -23,42 +29,75 @@
</DefaultDialog> </DefaultDialog>
</template> </template>
<script> <script>
import {
toFixed,
} from 'common/src/utils/blur.js'
import Kc from './top/kc.vue'
export default { export default {
props: { props: {
app: { app: {
type: Object, type: Object,
default: ()=>{ default: () => {
return {} return {}
} }
} }
}, },
async mounted() { async mounted() {
this.$nextTick(() => {
this.$refs.basePage.queryParams.ckid = this.app.dbckd.ckid
this.$refs.basePage.refresh()
})
}, },
data() { data() {
return { return {
showDialog:false,
DialogWidth: '70vw', power: {
DialogName: '', add: false,
DialogTitle: '选择库存', copy: false,
formDetail:[], delButton: false,
editTableTitle: [{ editButton: false,
title: "序号", operateButtons: false,
field: "xh", workFlow: false,
width: 50, /* 表格 */
align: "center" showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'lxyl/ckgl/cktz/query/kc',
queryUrl: 'lxyl/ckgl/cktz/query/kc',
tableTitle: [{
title: "仓库编码",
field: "ckCode",
width: 120,
},
{
title: "仓库",
field: "ckName",
width: 120,
},
{
title: "库位",
field: "kwCode",
width: 100,
},
{
title: "容器",
field: "rqCode",
width: 160,
},
{
title: "唯一码",
field: "packCode",
width: 180,
}, },
{ {
title: "物料编码", title: "物料编码",
field: "wlxxCode", field: "wlxxCode",
width: 240, width: 140
}, },
{ {
title: "物料名称", title: "物料名称",
...@@ -73,103 +112,115 @@ ...@@ -73,103 +112,115 @@
{ {
title: "计量单位", title: "计量单位",
field: "jldwName", field: "jldwName",
width: 100, width: 140
allowEdit: false
}, },
{ {
title: "调拨数量", title: "物料批号",
field: "yfsl", field: "wlph",
allowEdit: true, width: 140,
type: 'inputNumber',
width: 200,
blur: toFixed(null),
}, },
{ {
title: "制令号", title: "库位名称",
field: "zlh", field: "wlxxName",
type: 'inputText', width: 120,
width: 180,
allowEdit: false
}, },
/* 不可编辑*/
// {
// title: "出库数量",
// field: "cksl",
// width: 200,
// },
{ {
title: "物料批号", title: "制令号",
field: "wlph", field: "zlh",
type: 'inputText',
allowEdit: false,
width: 180, width: 180,
}, },
{ {
title: "库位", title: "库存数量",
field: "kwCode", field: "kcsl",
width: 240, width: 120,
fieldType: 'float'
}, },
{ {
title: "容器", title: "工厂",
field: "rqCode", field: "hzName",
width: 160, width: 180,
}, },
{
title: "唯一码",
field: "packCode",
width: 160,
],
queryParams: [
[{
label: '物料信息',
prop: 'wlxxInfos',
span: 12,
type: 'input',
value: ''
}, },
] {
label: "容器",
prop: 'rqInfos',
span: 12,
type: 'input',
value: ''
}
],
[{
"label": "仓库",
"prop": "ckid",
"span": 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/jcsj/uck/ck/queryCjckid",
"match": {
"value": "id",
"label": "name"
}
}
}]
],
/* 默认启停用 */
showqt: false,
}
} }
}, },
methods: { methods: {
save(){ handleSourceData(list){
if(this.formDetail.length!=0){ list.forEach(item=>item.yfsl=item.kcsl)
let mid= this.app.queryParams.mid },
this.formDetail.forEach(item=>item.mid=mid) changeQueryParams(queryParams) {
this.$post('lxyl/ckgl/cktzqd/add',this.formDetail).then(res=>{ let str = queryParams.rqInfos
if(res.success){ let trimmedStr = str.replace(/\s/g, ''); // 使用正则表达式去除空格
trimmedStr = trimmedStr.replace(/,/s, ',')
let arr = trimmedStr.split(",");
queryParams.rqInfos = arr
/* */
let str2 = queryParams.wlxxInfos
let trimmedStr2 = str2.replace(/\s/g, ''); // 使用正则表达式去除空格
trimmedStr2 = trimmedStr2.replace(/,/s, ',')
let arr2 = trimmedStr2.split(",");
queryParams.wlxxInfos = arr2
},
save() {
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length == 0) {
this.$warning('请至少勾选一条数据')
} else {
let mid = this.app.queryParams.mid
list.forEach(item => item.mid = mid)
this.$post('lxyl/ckgl/cktzqd/add', list).then(res => {
if (res.success) {
this.app.refresh() this.app.refresh()
this.app.showDialog=false 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> </script>
<style lang="scss" scoped> <style scoped>
@import url("~common/src/assets/styles/editDetail.scss");
</style> </style>
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