Commit e8e71ee7 authored by 李苏's avatar 李苏 💬

库内 托/包 Ⅱ

parent 1161dc97
......@@ -634,6 +634,19 @@ export const powerRoutes = [
},
name: 'zt',
path: "zt",
},
{
component: 'ccgl/kngl/bz/index',
hidden: false,
meta: {
"title": "包装",
"icon": "",
"noCache": false,
"link": null,
"mkid": 920070500,
},
name: 'bz',
path: "bz",
}
]
},
......
<template>
<div class="outer">
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
<el-tabs class="full" v-model="activeName" >
<el-tab-pane class="full" label="明细" name="first">
<Mx ref="mx" class="full" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</div>
</template>
<script>
import Top from './top/index.vue'
import Mx from './mx.vue'
export default {
components: {
Top,
Mx
},
data(){
return{
activeName:'first'
}
},
methods: {
topGetRow(row) {
/* dom赋值*/
let mid = row.id
this.$refs.mx.$refs.basePage.queryParams.mid = mid
this.$refs.mx.$refs.basePage.$refs['TablePager'].pageQuery({
setFirstCurrent: true
})
},
}
}
</script>
<style lang="scss" scoped>
.outer {
overflow: auto;
height: calc(100vh - 84px);
width: 100%;
.top {
width: 100%;
height: 45%;
}
.bottom {
width: 100%;
height: 55%;
.left {
width: 50%;
height: 100%;
}
.right {
width: 50%;
height: 100%;
}
}
}
.higher {
height: 140vh;
}
.flex-column {
display: flex;
flex-direction: column;
}
::v-deep .el-tabs__content{
height: calc(100% - 40px);
}
::v-deep .el-tabs__nav-scroll{
padding-left: 10px;
}
</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">
</template>
</BasePage>
</template>
<script>
export default {
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'wms/kcgl/bzdj',
queryUrl: 'wms/kcgl/bzdj/query/detail',
tableTitle: [
// {
// title: "唯一码",
// field: "packCode",
// width: 140
// },
// {
// title: "容器",
// field: "rqCode",
// width: 140
// },
{
title: "货主",
field: "hzName",
width: 140
},
/* 分割*/
{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 140
},
{
title: "装包数量",
field: "zbsl",
width: 140
},
{
title: "包装数量",
field: "bzsl",
width: 140
},
{
title: "拆分数量",
field: "cfsl",
width: 140
}
],
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>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
</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>
<template>
<BasePage :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<zb :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='装包'" />
<cb :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='拆包'" />
</template>
<template #toolbar="ctx">
<el-button @click="zb(ctx.basePage)" size='mini' type="primary">装包</el-button>
<el-button @click="cb(ctx.basePage)" size='mini' type="primary">拆包</el-button>
</template>
</BasePage>
</template>
<script>
import zb from './zb.vue';
import cb from './cb.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/kcgl/bzdj',
tableTitle: [{
title: "类型",
field: "djlx",
width: 80,
"transform": {
"url": "wms/kcgl/bzdj/init/djlx",
"label": "name",
"value": "id"
}
},
{
title: "单据号",
field: "djid",
fieldType: "ftString",
width: 160
},
{
title: "业务日期",
field: "ywrq",
fieldType: "ftDate"
},
{
title: "包号",
field: "packCode",
fieldType: "ftString",
width: 260
},
{
title: "单据来源",
field: "djly",
"transform": {
"url": "wms/kcgl/bzdj/init/djly",
"label": "name",
"value": "id"
},
width: 80
},
{
title: "来源单号",
field: "lydjDjid",
fieldType: "ftString",
width: 140
},
{
title: "状态",
field: "zt",
"transform": {
"url": "wms/kcgl/bzdj/init/zt",
"label": "name",
"value": "id"
},
width: 100
},
{
title: "维护人",
field: "whr",
fieldType: "ftString",
width: 120
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
{
title: "创建人",
field: "cjr",
fieldType: "ftString",
hidden: true
},
{
title: "创建时间",
field: "cjsj",
fieldType: "ftDateTime",
hidden: true
},
],
queryParams: [
[{
label: '日期',
startProp: "start",
endProp: "end",
span: 12,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '唯一码',
prop: 'packCode',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
getRow(val) {
this.$emit('getRow', val)
},
zb(ctx){
ctx.DialogWidth='50vw'
ctx.DialogTitle='装包'
ctx.showDialog=true
},
cb(ctx){
ctx.DialogWidth='50vw'
ctx.DialogTitle='拆包'
ctx.showDialog=true
},
},
components: {
zb,cb
}
}
</script>
<style>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;">
<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>
</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 {
editMixin
} from 'common'
export default {
mixins: [editMixin],
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
},
data() {
return {
readonly:false,
editColItemList: [
{
label: '物料',
prop: 'wlid',
span: 12,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: false,
code: 'WMSWLXX',
label: 'wlxxName',
transform: {
value: 'id',
label: 'name'
},
give:(row)=>{
this.form.wlxxCode=row.code
this.form.wlxxGg=row.gg
}
}
},
{
label: '物料编码',
prop: 'wlxxCode',
span: 12,
type: 'input',
},
{
label: '物料规格',
prop: 'wlxxGg',
span: 12,
type: 'input',
},
{
label: '制令号',
prop: 'zlh',
span: 12,
type: 'input',
required: true,
},
{
label: '批号',
prop: 'wlph',
span: 12,
type: 'input',
// required: true,
},
{
label: '装包数量',
prop: 'zbsl',
span: 12,
type: 'inputNumber',
required: true,
},
{
label: '货主',
prop: 'hzid',
span: 12,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: true,
code: 'HZID',
label: 'hzName',
transform: {
value: 'id',
label: 'name'
}
}
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if (valid) {
let params={
"djly":"M",
"datas":[this.form]
}
this.$post('wms/kcgl/bzdj/install', params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
this.app.refresh()
}
})
}
})
}
}
}
</script>
<style scoped>
</style>
......@@ -77,12 +77,12 @@
},
{
title: "原托盘数量",
field: "ytpsl",
field: "rqsl",
width: 140
},
{
title: "增加数量",
field: "zjsl",
field: "ztsl",
width: 140
}
],
......
<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: 'wms/jcsj/rq/query/detail',
queryUrl: 'wms/jcsj/rq/query/detail',
tableTitle: [{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "容器",
field: "rqCode",
width: 140
},
{
title: "拆分数量",
field: "cfsl",
width: 140
},
{
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: "ztsl",
width: 140
}
],
queryParams: [
[
{
label: '容器',
prop: 'mid',
span: 6,
required: false,
type: 'AuxInput',
typeConfig: {
give:(row)=>{
console.log(row)
},
isRequest: false,
code: 'RQGL',
label: 'rqCode',
transform: {
value: 'id',
label: 'code'
}
}
},
// {
// label: '容器编码',
// prop: 'rqCode',
// span: 6,
// type: 'input',
// value: ''
// }
]
],
/* 默认启停用 */
}
}
},
methods: {
save() {
if(this.$refs.basePage.queryParams.mid){
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length != 0) {
let params={
rqid:this.$refs.basePage.queryParams.mid,
datas:list.map(item=>{
let nitem={
cfsl:1,
packid:item.packid,
rqmxid:item.id
// packCode:item.packCode
}
return nitem
})
}
this.$post('wms/kcgl/rqdj/split', params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
this.app.refresh()
}
})
} else {
this.$warning('请至少勾选一条数据')
}
}else{
this.$warning('请先选择容器再进行保存')
}
}
}
}
</script>
<style scoped>
</style>
......@@ -3,6 +3,7 @@
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<ztDialog :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='组托'" />
<ctDialog :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='拆托'" />
</template>
<template #toolbar="ctx">
<el-button @click="zt(ctx.basePage)" size='mini' type="primary">组托</el-button>
......@@ -14,6 +15,7 @@
<script>
import ztDialog from './ztDialog.vue';
import ctDialog from './ctDialog.vue'
export default {
data() {
return {
......@@ -131,15 +133,18 @@
ctx.DialogTitle='组托'
ctx.showDialog=true
},
ct(){
ct(ctx){
ctx.DialogWidth='70vw'
ctx.DialogTitle='拆托'
ctx.showDialog=true
},
getRow(val) {
this.$emit('getRow', val)
}
},
components: {
ztDialog
ztDialog,
ctDialog
}
}
......
......@@ -95,7 +95,7 @@
queryParams: [
[{
label: '容器',
prop: 'kqid',
prop: 'rqid',
span: 6,
required: false,
type: 'AuxInput',
......@@ -104,11 +104,11 @@
console.log(row)
},
isRequest: false,
code: 'MATERIAL',
label: 'kqName',
code: 'RQGLK',
label: 'rqCode',
transform: {
value: 'id',
label: 'name'
label: 'code'
}
}
},
......@@ -130,10 +130,25 @@
},
methods: {
save() {
if(this.$refs.basePage.queryParams.rqid){
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length != 0) {
this.$post('lxyl/zlgl/kccj/doGenerate', list).then(res => {
let params={
rqid:this.$refs.basePage.queryParams.rqid,
djly:'M',
datas:list.map(item=>{
let nitem={
ztsl:1,
packid:item.packid,
// packCode:item.packCode
}
return nitem
})
}
this.$post('wms/kcgl/rqdj/install', params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
this.app.refresh()
}
......@@ -142,6 +157,10 @@
} else {
this.$warning('请至少勾选一条数据')
}
}else{
this.$warning('请先选择容器再进行保存')
}
}
}
}
......
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