Commit 1e63bf83 authored by 李苏's avatar 李苏 💬

26新增

parent 1144414d
...@@ -35,58 +35,23 @@ ...@@ -35,58 +35,23 @@
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'wms/ckgl/llck', url: 'wms/ckgl/llck',
queryUrl: 'wms/ckgl/llck/query/detail', queryUrl: 'wms/ckgl/jhtz/query/jhtzzy',
tableTitle: [{ tableTitle: [
title: "物料编号", {
field: "wlcode", title: "库位",
fieldType: "upper", field: "kwName",
width: 140 width: 100,
}, },
{ {
title: "物料名称", title: "容器",
field: "wlmc", field: "rqCode",
width: 140 width: 100,
}, },
{ {
title: "物料规格", title: "状态",
field: "gg", field: "zt",
width: 140 width: 100,
}, }
{
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 100,
},
{
title: "库位",
field: "kwName",
width: 100,
},
{
title: "唯一码",
field: "packCode",
width: 100,
},
{
title: "容器",
field: "rqCode",
width: 100,
},
{
title: "数量",
field: "sl",
width: 100,
},
{
title: "状态",
field: "zt",
width: 100,
}
], ],
queryParams: [], queryParams: [],
......
...@@ -52,8 +52,13 @@ ...@@ -52,8 +52,13 @@
topGetRow(row) { topGetRow(row) {
/* dom赋值*/ /* dom赋值*/
let mid = row.id let mid = row.id
let ckid = row.ckid
this.$refs.mx.$ckid=ckid
this.$refs.mx.$id=mid
this.$refs.mx.$refs.basePage.queryParams.mid = mid this.$refs.mx.$refs.basePage.queryParams.mid = mid
this.$refs.mx.$refs.basePage.$refs['TablePager'].pageQuery() this.$refs.mx.$refs.basePage.$refs['TablePager'].pageQuery({
setFirstCurrent:true
})
this.$refs.qd.$refs.basePage.queryParams.mid = mid this.$refs.qd.$refs.basePage.queryParams.mid = mid
this.$refs.qd.$refs.basePage.$refs['TablePager'].pageQuery() this.$refs.qd.$refs.basePage.$refs['TablePager'].pageQuery()
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'wms/ckgl/llck', url: 'wms/ckgl/llck',
queryUrl: 'wms/ckgl/llck/query/detail', queryUrl: 'wms/ckgl/jhtz/query/jhtzjg',
tableTitle: [{ tableTitle: [{
title: "物料编号", title: "物料编号",
field: "wlcode", field: "wlcode",
......
<template> <template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;border-top: 0px;" :autoQuery='false' <BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;border-top: 0px;" :autoQuery='false'
:config="config"> :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tzqd :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<el-button @click="tzqd(ctx.basePage)" size='mini' type="primary">调整清单</el-button>
</template> </template>
</BasePage> </BasePage>
...@@ -13,10 +14,12 @@ ...@@ -13,10 +14,12 @@
<script> <script>
// import wlphsx from 'common/src/mixin/wlphsx.js' // import wlphsx from 'common/src/mixin/wlphsx.js'
import Tzqd from './tzqd.vue'
export default { export default {
// mixins:[wlphsx], // mixins:[wlphsx],
data() { data() {
return { return {
power: { power: {
add: false, add: false,
copy: false, copy: false,
...@@ -35,21 +38,21 @@ ...@@ -35,21 +38,21 @@
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'wms/ckgl/llck', url: 'wms/ckgl/llck',
queryUrl: 'wms/ckgl/llck/query/detail', queryUrl: 'wms/ckgl/jhtz/query/detail',
tableTitle: [{ tableTitle: [{
title: "物料编号", title: "物料编号",
field: "wlcode", field: "wlxxCode",
fieldType: "upper", fieldType: "upper",
width: 140 width: 140
}, },
{ {
title: "物料名称", title: "物料名称",
field: "wlmc", field: "wlxxName",
width: 140 width: 140
}, },
{ {
title: "物料规格", title: "物料规格",
field: "gg", field: "wlxxGg",
width: 140 width: 140
}, },
{ {
...@@ -63,13 +66,13 @@ ...@@ -63,13 +66,13 @@
width: 100, width: 100,
}, },
{ {
title: "应出数量", title: "拣货数量",
field: "yfsl", field: "jhsl",
width: 100, width: 100,
}, },
{ {
title: "已出库数量", title: "拣出数量",
field: "ycksl", field: "jcsl",
width: 100, width: 100,
}, },
{ {
...@@ -81,6 +84,11 @@ ...@@ -81,6 +84,11 @@
title: "状态", title: "状态",
field: "zt", field: "zt",
width: 100, width: 100,
"transform": {
"url": "wms/ckgl/jhtz/init/zt",
"label": "name",
"value": "id"
}
} }
], ],
queryParams: [], queryParams: [],
...@@ -93,9 +101,13 @@ ...@@ -93,9 +101,13 @@
getRow(val){ getRow(val){
this.$emit('getRow',val) this.$emit('getRow',val)
}, },
demo(ctx){ tzqd(ctx){
if(ctx.singleItem&&ctx.singleItem.id){ if(ctx.singleItem&&ctx.singleItem.id){
console.log(ctx.singleItem) ctx.singleItem.$ckid=this.$ckid
ctx.singleItem.$id=this.$id
ctx.DialogWidth='70vw'
ctx.DialogTitle='调整清单'
ctx.showDialog=true
}else{ }else{
this.$warning('请选中一条数据') this.$warning('请选中一条数据')
} }
...@@ -103,7 +115,7 @@ ...@@ -103,7 +115,7 @@
}, },
components: { components: {
Tzqd
} }
} }
......
...@@ -35,23 +35,70 @@ ...@@ -35,23 +35,70 @@
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'wms/ckgl/llck', url: 'wms/ckgl/llck',
queryUrl: 'wms/ckgl/llck/query/detail', queryUrl: 'wms/ckgl/jhtz/query/jhtzqd',
tableTitle: [ tableTitle: [
{
title: "物料编号",
field: "wlxxCode",
fieldType: "upper",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 100,
},
{ {
title: "库位", title: "库位",
field: "kwName", field: "kwName",
width: 100, width: 100,
}, },
{
title: "唯一码",
field: "packCode",
width: 100,
},
{ {
title: "容器", title: "容器",
field: "rqCode", field: "rqCode",
width: 100, width: 100,
}, },
{
title: "拣货数量",
field: "jhsl",
width: 100,
},
{
title: "拣出数量",
field: "jcsl",
width: 100,
},
{ {
title: "状态", title: "状态",
field: "zt", field: "zt",
width: 100, width: 100,
"transform": {
"url": "wms/ckgl/jhtz/init/zt",
"label": "name",
"value": "id"
}
} }
], ],
queryParams: [], queryParams: [],
......
<template>
<BasePage :setFirstCurrent='false' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> -->
</template>
</BasePage>
</template>
<script>
// import Edit from './edit.vue'
export default {
data() {
return {
power:{
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: false,
saveSelected: false
},
config: {
queryDetail: true,
/* 基本配置*/
url: 'wms/ckgl/dbck',
tableTitle: [{
title: "出库单号",
field: "djid",
fieldType: "upper",
width: 140
},
{
title: "出库日期",
field: "ywrq",
fieldType: "ftDateTime"
},
{
title: "部门",
field: "bmName",
width: 140
},
{
title: "仓库",
field: "ckName",
width: 140
},
{
title: "调拨出库仓库",
field: "dfckName",
width: 140
},
{
title: "事务类型",
field: "swlxName",
width: 140
},
{
title: "货主",
field: "hzName",
width: 140
},
{
title: "单据来源",
field: "djly",
width: 140,
"transform": {
"url": "wms/ckgl/dbck/init/djly",
"label": "name",
"value": "id"
}
},
{
title: "状态",
field: "zt",
width: 140,
"transform": {
"url": "wms/ckgl/dbck/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "单据来源",
field: "djly",
width: 140,
"transform": {
"url": "wms/ckgl/dbck/init/djly",
"label": "name",
"value": "id"
}
},
{
title: "来源单据号",
field: "lydjDjid",
width: 140
},
{
title: "备注",
field: "bz",
width: 140
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '日期',
startProp: "llrqb",
endProp: "llrqe",
span: 12,
type: 'RelDaterangeV2',
startValue: new Date().getTime()-1000*60*60*24*30,
endValue:new Date().getTime(),
},
{
"label": "仓库",
"prop": "ckid",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/common/ck/queryCkid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '单据编号',
prop: 'djid',
span: 6,
type: 'input',
value: ''
}
],[
{
label: '状态',
prop: 'zt',
span: 6,
type: 'RelSelect',
typeConfig: {
src: 'wms/ckgl/dbck/init/zt'
}
},
{
label: '事务类型',
prop: 'swlxid',
span: 6,
type: 'RelSelect',
typeConfig: {
src: 'wms/ckgl/dbck/init/swlx'
}
}
]
],
/* 默认启停用 */
}
}
},
methods: {
getRow(val){
this.$emit('getRow',val)
}
},
components: {
// Edit
}
}
</script>
<style>
</style>
<template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;border-top: 0px;" :autoQuery='false'
:config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
</template>
</BasePage>
</template>
<script>
export default {
mounted() {
},
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'wms/ckgl/dbck',
queryUrl: 'wms/ckgl/dbck/query/detail',
tableTitle: [{
title: "物料编号",
field: "wlxxCode",
fieldType: "upper",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 120,
},
{
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "调拨数量",
field: "bcsl",
width: 100,
},
{
title: "已出库数量",
field: "ycksl",
width: 100,
},
{
title: "状态",
field: "zt",
width: 100,
"transform": {
"url": "wms/ckgl/dbck/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "来源单号",
field: "lydjid",
width: 120,
},
{
title: "关闭人",
field: "gbr",
width: 120,
},
{
title: "关闭原因",
field: "gbyy",
width: 200,
},
{
title: "关闭时间",
field: "gbsj",
fieldType: 'ftDateTime'
},
{
title: "备注",
field: "bz",
width: 200
}
],
queryParams: [],
}
}
},
methods: {
getRow(val){
this.$emit('getRow',val)
},
demo(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
console.log(ctx.singleItem)
}else{
this.$warning('请选中一条数据')
}
}
},
components: {
}
}
</script>
<style>
</style>
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
:app='app' :buttonApp='buttonApp'> :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<!-- 操作逻辑类似选择入库单 --> <!-- 操作逻辑类似选择入库单 -->
<xzckd @save='xzckdSave' :app='this' v-if="showDialog" /> <xzckd @save='xzckdSave' :app='this' v-if="showDialog&&DialogTitle=='选择出库单'" />
<xzdbckd @save='xzdbckdSave' :app='this' v-if="showDialog&&DialogTitle=='选择调拨出库单'" />
<el-row :gutter="20" :app="this" class="editRow"> <el-row :gutter="20" :app="this" class="editRow">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " <EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
...@@ -16,8 +17,9 @@ ...@@ -16,8 +17,9 @@
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow' :editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail"> :editTableData="formDetail">
<template v-if="type!='view'" #toolbar="ctx"> <template v-if="type!='view'" #toolbar="ctx">
<el-button @click="xzckd" size="mini" style="display: inline-block;margin-right: 10px;" <el-button @click="xzckd" size="mini" style="display: inline-block;" type="primary">选择出库单</el-button>
type="primary">选择出库单</el-button> <el-button @click="xzdbckd" size="mini" style="display: inline-block;margin-right: 10px;"
type="primary">选择调拨出库单</el-button>
</template> </template>
</editTableForEdit> </editTableForEdit>
</div> </div>
...@@ -39,7 +41,8 @@ ...@@ -39,7 +41,8 @@
</RelDialog> </RelDialog>
</template> </template>
<script> <script>
import xzckd from './xzckd.vue' import xzckd from './xzckd.vue'
import xzdbckd from './xzdbckd.vue'
import { import {
toFixed, toFixed,
digit, digit,
...@@ -52,8 +55,9 @@ ...@@ -52,8 +55,9 @@
export default { export default {
mixins: [editMixin, editMixin_expand], mixins: [editMixin, editMixin_expand],
components:{ components: {
xzckd xzckd,
xzdbckd
}, },
methods: { methods: {
/* 需要整体row时的回调 */ /* 需要整体row时的回调 */
...@@ -61,24 +65,55 @@ ...@@ -61,24 +65,55 @@
// this.$refs.editTableForEdit.$forceUpdate() // this.$refs.editTableForEdit.$forceUpdate()
}, },
/* 选择list时的回调 */ /* 选择list时的回调 */
xzckdSave(obj){ xzckdSave(obj) {
let {list,row}=obj let {
this.form.swlxid=row.swlxid list,
this.form.lydjid=row.id row
this.form.ckid=row.ckid } = obj
this.form.bmid=row.bmid this.form.swlxid = row.swlxid
this.form.ywrq=row.ywrq this.form.lydjid = row.id
this.form.ckid = row.ckid
this.form.bmid = row.bmid
this.form.ywrq = row.ywrq
this.form.djly = 'LLCK'
let length = this.formDetail.length let length = this.formDetail.length
this.formDetail.splice(0, length) this.formDetail.splice(0, length)
list.forEach(item => { list.forEach(item => {
item.lydjid = item.id item.lydjid = item.id
item.jhsl = item.yfsl
delete item.id delete item.id
delete item.zt
this.formDetail.push(_.cloneDeep(item))
})
},
xzdbckdSave(obj) {
let {
list,
row
} = obj
this.form.swlxid = row.swlxid
this.form.lydjid = row.id
this.form.ckid = row.ckid
this.form.bmid = row.bmid
this.form.ywrq = row.ywrq
this.form.djly = 'DBCK'
let length = this.formDetail.length
this.formDetail.splice(0, length)
list.forEach(item => {
item.lydjid = item.id
item.jhsl = item.bcsl
delete item.id
delete item.zt
this.formDetail.push(_.cloneDeep(item)) this.formDetail.push(_.cloneDeep(item))
}) })
}, },
xzckd(){ xzckd() {
this.showDialog=true this.DialogTitle = '选择出库单'
this.showDialog = true
},
xzdbckd() {
this.DialogTitle = '选择调拨出库单'
this.showDialog = true
}, },
/* 选择库存回调 */ /* 选择库存回调 */
savekc(list) { savekc(list) {
...@@ -91,8 +126,8 @@ ...@@ -91,8 +126,8 @@
} }
}, },
mounted() { mounted() {
this.form.jhrName=this.username this.form.jhrName = this.username
this.form.jhrid=this.userid this.form.jhrid = this.userid
}, },
data() { data() {
return { return {
...@@ -217,28 +252,32 @@ ...@@ -217,28 +252,32 @@
}, },
{ {
title: "物料编号", title: "物料编号",
field: "wlcode", field: "wlxxCode",
width: 240, width: 240,
}, },
{ {
title: "物料名称", title: "物料名称",
field: "wlmc", field: "wlxxName",
width: 160 width: 160
}, },
{ {
title: "规格", title: "规格",
field: "gg", field: "wlxxGg",
width: 140 width: 140
}, },
{ {
title: "领料数量", title: "拣货数量",
field: "yfsl", field: "jhsl",
allowEdit: true, allowEdit: true,
type: 'inputNumber', type: 'inputNumber',
width: 200, width: 200,
blur: toFixed(null), blur: toFixed(null),
}, },
{
title: "检出数量",
field: "jcsl",
width: 200,
},
{ {
title: "库存数量", title: "库存数量",
field: "kcsl", field: "kcsl",
...@@ -301,4 +340,4 @@ ...@@ -301,4 +340,4 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("~common/src/assets/styles/editDetail.scss"); @import url("~common/src/assets/styles/editDetail.scss");
</style> </style>
\ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
}, },
{ {
title: "业务日期", title: "业务日期",
field: "llrq", field: "ywrq",
fieldType: 'ftDate' fieldType: 'ftDate'
}, },
{ {
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
} }
}, },
{ {
title: "单据来源", title: "单据来源",
field: "djlyCode", field: "djlyCode",
width: 140 width: 140
}, },
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
/* 是否开启工作流按钮 */ /* 是否开启工作流按钮 */
workFlow: false, workFlow: false,
/* 表格开启选择,以及记住选择 */ /* 表格开启选择,以及记住选择 */
showSelection: false, showSelection: true,
saveSelected: false saveSelected: true
}, },
config: { config: {
/* 基本配置*/ /* 基本配置*/
...@@ -42,18 +42,18 @@ ...@@ -42,18 +42,18 @@
queryUrl: 'wms/ckgl/llck/query/detail', queryUrl: 'wms/ckgl/llck/query/detail',
tableTitle: [{ tableTitle: [{
title: "物料编号", title: "物料编号",
field: "wlcode", field: "wlxxCode",
fieldType: "upper", fieldType: "upper",
width: 140 width: 140
}, },
{ {
title: "物料名称", title: "物料名称",
field: "wlmc", field: "wlxxName",
width: 140 width: 140
}, },
{ {
title: "物料规格", title: "物料规格",
field: "gg", field: "wlxxGg",
width: 140 width: 140
}, },
{ {
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
} }
], ],
queryParams: [], queryParams: [],
} }
} }
......
...@@ -49,11 +49,9 @@ ...@@ -49,11 +49,9 @@
}, },
methods: { methods: {
save() { save() {
let list=this.$refs.rkqd.$refs.basePage.tabData||[] let list=this.$refs.rkqd.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length==0){ if(list.length==0){
this.$warning('请选择存在数据的入库单') this.$warning('请勾选存在数据的入库单')
}else{ }else{
let obj={ let obj={
list:list, list:list,
......
<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">
<Rkd @getRow='getRow' />
</el-tab-pane>
<el-tab-pane class="full" label="调拨出库单明细" name="second">
<Rkqd ref="rkqd" />
</el-tab-pane>
</el-tabs>
</div>
</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 Rkd from './dbckd.vue'
import Rkqd from './dbckqd.vue'
export default {
components: {
Rkd,
Rkqd
},
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
},
data() {
return {
row:{},
activeName: 'first'
}
},
methods: {
save() {
let list=this.$refs.rkqd.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length==0){
this.$warning('请勾选存在数据的入库单')
}else{
let obj={
list:list,
row:this.row
}
this.$emit('save',obj)
this.app.showDialog=false
}
// if()
},
getRow(val) {
this.row=val
this.$refs.rkqd.$refs.basePage.queryParams.mid = val.id
this.$refs.rkqd.$refs.basePage.$refs['TablePager'].pageQuery({
// setFirstCurrent: true
})
this.activeName = 'second'
}
}
}
</script>
<style scoped>
::v-deep .el-tabs__content {
height: calc(100% - 50px);
}
::v-deep .el-tabs__nav-scroll {
padding-left: 10px;
}
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<!-- 左表数据-->
<div class="tzqdLeft">
<BasePage ref="basePage" @getRow='getRow' :autoQuery='false' :power="{
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
}" :toolButton='false' class="min_full" style="height: 100%;width: 100%;" :config="config">
<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="cz(scope.$index,scope,scope.row)"
type="text" size="small">
<i class="el-icon-edit"></i>操作
</el-button>
</template>
</el-table-column>
</template>
</BasePage>
</div>
<div class="tzqdRight">
<EditTable ref="editTable" :app='editTableConfig'>
<template slot="tabCustom">
<el-table-column label="操作" width="90" header-align="center" fixed="right">
<template slot-scope="scope">
<el-button style="text-align: center;color: red;width: 100%;" @click.native.prevent="del(scope.$index)"
type="text" size="small">
<i class="el-icon-delete"></i>删除
</el-button>
</template>
</el-table-column>
</template>
</EditTable>
</div>
</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,
digit,
doRkdChange
} from 'common/src/utils/blur.js'
export default {
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
this.$nextTick(() => {
let ckid = this.app.singleItem.$ckid
let wlid = this.app.singleItem.wlid
this.$refs.basePage.queryParams.ckid = ckid
this.$refs.basePage.queryParams.wlid = wlid
this.$refs.basePage.queryParams.zlh = this.app.singleItem.zlh
this.$refs.basePage.queryParams.wlph = this.app.singleItem.wlph
this.$refs.basePage.refresh()
/* 清单查询*/
let params = {
zlh: this.app.singleItem.zlh,
wlid: wlid,
wlph: this.app.singleItem.wlph,
mid: this.app.singleItem.$id,
ckid: this.app.singleItem.$ckid
}
this.$post('wms/ckgl/jhtz/query/jhtzqd', params).then(res => {
if (res.success) {
res.data.records.forEach(item => {
this.editTableConfig['editTableData'].push(_.cloneDeep(item))
/* 原始数据保留*/
this.original.push(_.cloneDeep(item))
this.sljl[item.packid] = item.jhsl
})
}
})
})
},
data() {
return {
original:[],
/* 数量记录*/
sljl: {
},
editTableConfig: {
editTableTitle: [{
label: '唯一码',
prop: 'packCode',
width: 100,
},
{
label: '名称',
prop: 'wlxxName',
width: 100,
},
{
label: '物料批号',
prop: 'wlph',
width: 100,
},
{
label: '库位',
prop: 'kwName',
width: 100,
},
{
label: '拣货数量',
prop: 'jhsl',
allowEdit: true,
type: 'inputNumber',
width: 100,
blur: toFixed(null),
change: (row) => {
/* row.jhsl=>拣货数量
row.packid=>包装id
*/
this.$refs.basePage.$refs.TablePager.tableData.forEach(item => {
if (item.packid == row.packid) {
/* 判定初始数量*/
if (this.sljl[row.packid]) {
this.jsbc(row.jhsl, this.sljl[row.packid], item)
} else {
this.sljl[row.packid] = row.jhsl
}
}
})
}
}
],
editTableData: []
},
config: {
/* Dialog*/
// queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/ukcjyd',
// url: 'wms/ckgl/jhtz',
queryUrl: 'wms/common/queryZkPackOrRq',
tableTitle: [{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "货主",
field: "hzName",
width: 140
},
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "数量",
field: "packmxSl",
width: 140
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
}
],
queryParams: [
],
/* 默认启停用 */
}
}
},
methods: {
save(){
/* 源数据*/
let originalList=this.original.map(item=>item.packid)
/* 现有数据*/
let nowList=this.editTableConfig.editTableData.map(item=>item.id)
/* 遍历删除的数据*/
let delArr=this.original.filter(item=>{
if(!nowList.includes(item.packid)){
item.flag='D'
return true
/* 存在*/
}else{
return false
}
})
/* 新增的数据*/
let addArr=[]
let editArr=[]
this.editTableConfig.editTableData
},
/* 计算保存
n为新值
o为旧值
item为最后修改的对象
*/
jsbc(n, o, item) {
let slc = o - n
/* 数量记录为新*/
this.sljl[item.packid] = n
item.packmxSl = item.packmxSl + slc
},
getRow(val) {
if (val.detalis) {
/* 初始化过*/
} else {
}
},
del(index) {
/* 修改为0*/
let packid = this.editTableConfig.editTableData[index].packid
this.$refs.basePage.$refs.TablePager.tableData.forEach(item => {
if (item.packid == packid) {
/* 判定初始数量*/
this.jsbc(0, this.sljl[packid], item)
}
})
this.editTableConfig.editTableData.splice(index, 1)
},
cz(a, b, row) {
/* 根据packid判定是否添加清单数据*/
let packid = row.packid
let hasrow = false
this.editTableConfig.editTableData.forEach(item => {
if (item.packid == packid) {
hasrow = true
}
})
if (hasrow) {
this.$warning('已存在该数据')
} else {
this.editTableConfig.editTableData.push(_.cloneDeep({
packid: row.packid,
packCode: row.packCode,
wlph: row.wlph,
wlid: row.wlid,
wlxxCode: row.wlxxCode,
wlxxName: row.wlxxName,
kwid: row.kwid,
kwName: row.kwName,
jhsl: 0
}))
this.sljl[row.packid] = 0
}
}
}
}
</script>
<style scoped>
.tzqdLeft {
width: 50%;
height: 100%;
}
.tzqdRight {
width: 50%;
height: 100%;
border: 5px solid #eee;
border-left: 0px solid;
padding-top: 15px;
padding-left: 5px;
padding-right: 5px;
}
</style>
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
</DefaultDialog> </DefaultDialog>
</template> </template>
<script> <script>
import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default { export default {
props: { props: {
...@@ -26,6 +28,7 @@ ...@@ -26,6 +28,7 @@
}, },
mixins: [wlsx, wlphsx],
data() { data() {
return { return {
power: { power: {
...@@ -87,7 +90,7 @@ ...@@ -87,7 +90,7 @@
}, },
{ {
title: "数量", title: "数量",
field: "sl", field: "packmxSl",
width: 140 width: 140
}, },
{ {
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
</BasePage>
</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>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<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"> <el-tab-pane class="full" label="重检单明细" name="first">
<Mx ref="mx" class="full" /> <Mx ref="mx" class="full" />
</el-tab-pane> </el-tab-pane>
......
<template> <template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;border-top: 0px;" :autoQuery='false' <BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full"
:config="config"> style="height: 100%;border-top: 0px;" :autoQuery='false' :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template> </template>
...@@ -12,11 +12,7 @@ ...@@ -12,11 +12,7 @@
</template> </template>
<script> <script>
import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default { export default {
mixins:[wlsx,wlphsx],
data() { data() {
return { return {
power: { power: {
...@@ -36,94 +32,84 @@ ...@@ -36,94 +32,84 @@
}, },
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'wms/ckgl/llck', url: 'lxyl/zlgl/kccj',
queryUrl: 'wms/ckgl/llck/query/detail', queryUrl: 'lxyl/zlgl/kccj//query/detail',
tableTitle: [{ tableTitle: [{
title: "物料编", title: "物料编",
field: "wlxxCode", field: "wlxxCode",
fieldType: "upper",
width: 140 width: 140
}, },
{ {
title: "物料名称", title: "物料名称",
field: "wlxxName", field: "wlxxName",
width: 140 width: 140
}, },
{ {
title: "物料规格", title: "物料规格",
field: "wlxxGg", field: "wlxxGg",
width: 140 width: 140
}, },
{ {
title: "物料批号", title: "制令号",
field: "wlph", field: "zlh",
width: 140 width: 140
}, },
{ {
title: "计量单位", title: "物料批号",
field: "jldwname", field: "wlph",
width: 100, width: 140
}, },
{ {
title: "应出数量", title: "货主",
field: "yfsl", field: "hzName",
width: 100, width: 140
}, },
{ {
title: "库存数量", title: "唯一码",
field: "kcsl", field: "packCode",
width: 100, width: 140
}, },
{ {
title: "制令号", title: "数量",
field: "zlh", field: "sl",
width: 120, width: 140
}, },
{ {
title: "已出数量", title: "容器",
field: "ycsl", field: "rqCode",
width: 100, width: 140
}, },
{ {
title: "过账数量", title: "重检日期",
field: "gzsl", field: "cjrq",
width: 100, width: 140,
}, fieldType: 'ftDateTime'
{ },
title: "状态", {
field: "zt", title: "生产日期",
width: 100, field: "scrq",
"transform": { width: 140,
"url": "wms/rkgl/sjtz/init/zt", fieldType: 'ftDateTime'
"label": "name", },
"value": "id" {
title: "失效日期",
field: "sxrq",
width: 140,
fieldType: 'ftDateTime'
},
{
title: "合格标志",
field: "hgbz",
formatter(a, b, v) {
let map = {
N: '不合格',
Y: '合格'
} }
return map[v]
}, },
{ width: 140
title: "来源单号", },
field: "lydjid",
width: 120,
},
{
title: "关闭人",
field: "gbr",
width: 120,
},
{
title: "关闭原因",
field: "gbyy",
width: 200,
},
{
title: "关闭时间",
field: "gbsj",
fieldType: 'ftDateTime'
},
{
title: "备注",
field: "bz",
width: 200
}
], ],
queryParams: [], queryParams: [],
...@@ -132,16 +118,10 @@ ...@@ -132,16 +118,10 @@
}, },
methods: { methods: {
getRow(val){ getRow(val) {
this.$emit('getRow',val) this.$emit('getRow', val)
}, },
demo(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
console.log(ctx.singleItem)
}else{
this.$warning('请选中一条数据')
}
}
}, },
components: { components: {
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage ref="basePage" :toolButton='false' :power='power' class="min_full" style="height: 100%;" :config="config" />
</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 {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: true,
saveSelected: true
},
config: {
/* Dialog*/
// queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/ukcjyd',
queryUrl:'wms/common/queryZkPackOrRq',
tableTitle: [{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "货主",
field: "hzName",
width: 140
},
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "数量",
field: "sl",
width: 140
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
}
],
queryParams: [
[{
label: '物料信息',
prop: 'wlxxInfo',
span: 6,
type: 'input',
value: ''
},
{
label: '物料批号',
prop: 'wlphInfo',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
save(){
let list =this.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length!=0){
this.$post('lxyl/zlgl/ukcjyd/add',list).then(res=>{
if(res.success){
this.app.showDialog=false
this.app.refresh()
}
})
}else{
this.$warning('请至少勾选一条数据')
}
}
}
}
</script>
<style scoped>
</style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</el-row> </el-row>
<div class="editTab"> <div class="editTab">
<editTableForEdit :indexApp='app' :type='type' @save='save' ref="editTableForEdit" <editTableForEdit :indexApp='app' :type='type' rename='选择库位明细' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow' :editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail"> :editTableData="formDetail">
<!-- <template v-if="type!='view'" #toolbar="ctx"> <!-- <template v-if="type!='view'" #toolbar="ctx">
......
<template> <template>
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config"> <BasePage :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template> <Add :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
<template #toolbar="ctx"> </template>
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> --> <template #toolbar="ctx">
<ImportButton @success="()=>{ <el-button @click="showAdd(ctx.basePage)" size='mini' type="primary">新增</el-button>
ctx.basePage.refresh()
}" :url="'/wms/ckgl/llck/import'" />
</template>
</BasePage> </template>
</BasePage>
</template> </template>
<script> <script>
import Edit from './edit.vue' // import Edit from './edit.vue'
export default { import Add from './add.vue'
data() { export default {
return { data() {
config: { return {
queryDetail: true, power: {
/* 基本配置*/ add: false,
url: 'wms/ckgl/llck', copy: false,
tableTitle: [{ /* 手动控制删除 */
title: "状态", delButton: true,
field: "zt", /* 手动控制编辑按钮权限 */
fieldType: "ftString", editButton: false,
align: 'center', /* 是否渲染右侧操作按钮 */
width: 80, operateButtons: true,
"transform": { /* 是否开启工作流按钮 */
"url": "wms/ckgl/llck/init/zt", workFlow: false,
"label": "name", /* 表格开启选择,以及记住选择 */
"value": "id" showSelection: false,
} saveSelected: false
},
{ },
title: "出库单号", config: {
field: "djid", /* Dialog*/
width: 140 // queryDetail: true,
}, /* 基本配置*/
{ url: 'lxyl/zlgl/kccj',
title: "出库日期", tableTitle: [{
field: "llrq", title: "重检单号",
fieldType: 'ftDate' field: "code",
}, width: 140
{ },
title: "货主",
field: "hzName",
width: 140
},
{
title: "事务类型",
field: "swlxmc",
width: 100
},
{
title: "仓库",
field: "ckid",
width: 140,
hidden: true
},
{
title: "仓库",
field: "ckmc",
width: 140
},
{
title: "需求日期",
field: "xqrq",
fieldType: 'ftDate'
},
{
title: "领料部门",
field: "bmmc",
width: 140
},
{ {
title: "单据来源", title: "业务日期",
field: "djly", field: "ywrq",
width: 140, width: 140,
"transform": { fieldType: 'ftDateTime'
"url": "wms/ckgl/llck/init/djly",
"label": "name",
"value": "id"
}
}, },
{ {
title: "来源单据号", title: "维护人",
field: "lydjDjid", field: "whr",
width: 140 width: 140,
}, },
{ {
title: "备注", title: "维护时间",
field: "bz", field: "whsj",
width: 240 fieldType: 'ftDateTime'
}, }
{ ],
title: "维护人", queryParams: [
field: "whr" [{
}, label: '重检单号',
{ prop: 'code',
title: "维护时间", span: 5,
field: "whsj", type: 'input',
fieldType: 'ftDateTime' value: ''
}
],
queryParams: [
[{
label: '日期',
startProp: "llrqb",
endProp: "llrqe",
span: 12,
type: 'RelDaterangeV2',
startValue: new Date().getTime()-1000*60*60*24*30,
endValue:new Date().getTime(),
},
{
"label": "仓库",
"prop": "ckid",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/common/ck/queryCkid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '单据编号',
prop: 'djid',
span: 6,
type: 'input',
value: ''
}
],[
{
label: '状态',
prop: 'zt',
span: 6,
type: 'RelSelect',
typeConfig: {
src: 'wms/ckgl/llck/init/zt'
}
},
{
label: '事务类型',
prop: 'swlxid',
span: 6,
type: 'RelSelect',
typeConfig: {
src: 'wms/ckgl/llck/init/swlx'
}
}, },
{ {
label: '货主', label: '业务日期',
prop: 'hzName', startProp: "ywrqb",
span: 6, endProp: "ywrqe",
type: 'input', span: 9,
} type: 'RelDaterangeV2',
] startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
], endValue: new Date().getTime(),
/* 默认启停用 */ },
]
],
/* 默认启停用 */
} }
} }
}, },
methods: { methods: {
getRow(val){ showAdd(ctx) {
this.$emit('getRow',val) ctx.DialogTitle = '新增'
ctx.DialogWidth = '70vw'
ctx.showDialog = true
},
getRow(val) {
this.$emit('getRow', val)
} }
}, },
components: { components: {
Edit Add
} // Edit
}
} }
</script> </script>
<style> <style>
</style> </style>
\ No newline at end of file
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