Commit 6d48a037 authored by 李苏's avatar 李苏 💬

托盘入库

parent cb457a2a
......@@ -843,7 +843,20 @@ export const powerRoutes = [
},
name: 'tpck',
path: "tpck",
}
},
{
component: 'ccgl/kngl/tprk/index',
hidden: false,
meta: {
"title": "托盘入库",
"icon": "",
"noCache": false,
"link": null,
"mkid":920070900,
},
name: 'tprk',
path: "tprk",
}
]
......
<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-tab-pane class="full" label="入库清单" name="second">
<Rkqd ref="rkqd" class="full" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</div>
</template>
<script>
import Top from './top/index.vue'
import Mx from './mx.vue'
import Rkqd from './rkqd.vue'
export default {
components: {
Top,
Mx,
Rkqd
},
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
})
this.$refs.rkqd.$refs.basePage.queryParams.mid = mid
this.$refs.rkqd.$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>
import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default {
mixins:[wlphsx,wlsx],
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'lxyl/rkgl/tprk',
queryUrl: 'lxyl/rkgl/tprk/query/detail',
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: "jldwName",
width: 100,
},
{
title: "应收数量",
field: "yssl",
width: 100,
},
{
title: "码盘数量",
field: "ztsl",
width: 120,
},
{
title: "包装数量",
field: "bzsl",
width: 120,
},
{
title: "入库数量",
field: "rksl",
width: 100,
},
{
title: "过账数量",
field: "gzsl",
width: 120,
},
{
title: "制令号",
field: "zlh",
width: 180,
},
{
title: "状态",
field: "zt",
width: 120,
"transform": {
"url": "lxyl/rkgl/tprk/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>
<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: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'lxyl/rkgl/tprk',
queryUrl: 'lxyl/rkgl/tprk/query/rkqd',
tableTitle: [{
title: "物料编码",
field: "wlxxCode",
fieldType: "upper",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 180,
},
{
title: "物料批号",
field: "wlph",
width: 180
},
{
title: "应收数量",
field: "yssl",
width: 100,
},
{
title: "唯一码",
field: "packCode",
width: 240,
},
{
title: "容器",
field: "rqCode",
width: 100,
},
{
title: "状态",
field: "zt",
width: 100,
"transform": {
"url": "wms/rkgl/dbrk/init/zt",
"label": "name",
"value": "id"
}
}
],
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>
This diff is collapsed.
<template>
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Shd v-if="ctx.basePage.showDialog" :app='ctx.basePage' />
</template>
<template #toolbar="ctx">
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'/lxyl/rkgl/tprk/import'" /> -->
<el-button style="margin-left: 10px;" @click="qr(ctx.basePage)" size='mini' type="primary">确认</el-button>
<el-button @click="qxqr(ctx.basePage)" size='mini' type="primary">取消确认</el-button>
<!-- <el-button @click="sapgz(ctx.basePage)" size='mini' type="primary">SAP过账</el-button>
<el-button @click="tbshd(ctx.basePage)" size='mini' type="primary">同步送货单</el-button> -->
<!-- <el-button @click="qktjkw(ctx.basePage)" size='mini' type="primary">清空推荐库位</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
import Shd from './shd.vue'
export default {
data() {
return {
config: {
queryDetail: true,
/* 基本配置*/
url: 'lxyl/rkgl/tprk',
tableTitle: [{
title: "状态",
field: "zt",
fieldType: "ftString",
align: 'center',
width: 80,
"transform": {
"url": "lxyl/rkgl/tprk/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "入库单号",
field: "djid",
width: 140
},
{
title: "业务日期",
field: "ywrq",
fieldType: 'ftDate'
},
// {
// title: "入库人",
// field: "rkr",
// width: 140
// },
{
title: "货主",
field: "hzName",
width: 140
},
{
title: "事务类型",
field: "swlxName",
width: 100
},
{
title: "入库人",
field: "rkrName",
width: 100
},
{
title: "仓库",
field: "ckid",
width: 140,
hidden: true
},
{
title: "仓库",
field: "ckName",
width: 140
},
{
title: "码盘状态",
field: "mpzt",
width: 100,
"transform": {
"url": "wms/rkgl/rktz/init/mpzt",
"label": "name",
"value": "id"
}
},
{
title: "包装状态",
field: "bzzt",
width: 100,
"transform": {
"url": "wms/rkgl/rktz/init/bzzt",
"label": "name",
"value": "id"
}
},
{
title: "过账状态",
field: "gzzt",
width: 100,
"transform": {
"url": "lxyl/common/init/gzzt",
"label": "name",
"value": "id"
}
},
{
title: "部门",
field: "bmName",
width: 140
},
{
title: "单据来源",
field: "djly",
width: 140,
"transform": {
"url": "lxyl/rkgl/tprk/init/djly",
"label": "name",
"value": "id"
}
},
// {
// title: "来源单据号",
// field: "lydjDjid",
// width: 140
// },
{
title: "备注",
field: "bz",
width: 240
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
}
],
queryParams: [
[{
label: '日期',
startProp: "start",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime()-1000*60*60*24*30,
endValue:new Date().getTime(),
},
{
"label": "仓库",
"prop": "ckid",
"span": 8,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/common/ck/queryCkid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '单据编号',
prop: 'djid',
span: 8,
type: 'input',
value: ''
},
],[
{
label: '状态',
prop: 'zt',
span: 8,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/rkgl/tprk/init/zt'
}
},
{
label: '事务类型',
prop: 'swlxid',
span: 8,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/rkgl/tprk/init/swlx'
}
},
{
label: '来源单号',
prop: 'lydh',
span: 8,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
tbshd(ctx){
ctx.DialogWidth='35vw'
ctx.DialogTitle='同步送货单'
ctx.showDialog=true
},
qktjkw(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$confirm('是否继续该操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res=>{
this.$post('lxyl/rkgl/sjtz/cleanKw ',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
this.$success('操作成功')
ctx.refresh()
}
})
})
}else{
this.$warning('请选中一条数据')
}
},
sapgz(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$confirm('是否继续该操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res=>{
this.$post('lxyl/rkgl/tprk/sap/gz',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
this.$success('操作成功')
ctx.refresh()
}
})
})
}else{
this.$warning('请选中一条数据')
}
},
getRow(val){
this.$emit('getRow',val)
},
qr(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$confirm('是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res=>{
this.$post('lxyl/rkgl/tprk/confirm',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
this.$success('操作成功')
ctx.refresh()
}
})
})
}else{
this.$warning('请选中一条数据进行操作')
}
},
qxqr(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$confirm('是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res=>{
this.$post('lxyl/rkgl/tprk/unconfirm',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
this.$success('操作成功')
ctx.refresh()
}
})
})
}else{
this.$warning('请选中一条数据进行操作')
}
}
},
components: {
Edit,
Shd
}
}
</script>
<style>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage :auxInput="false" ref="basePage" :power='power' class="min_full" style="height: 100%;" :config="config"> ref="basePage"
:power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</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 {
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'wms/rkgl/cskc/query/packinfo',
queryUrl: 'wms/rkgl/cskc/query/packinfo',
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: "hzName",
width: 140
},
{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 180
},
{
title: "制令号",
field: "zlh",
width: 180
},
{
title: "原包装数量",
field: "bzsl",
width: 140
},
{
title: "装包数量",
field: "zbsl",
width: 140
},
],
queryParams: [
[{
label: '日期',
startProp: "start",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '唯一码',
prop: 'packCode',
span: 6,
type: 'input',
value: ''
},
],
],
/* 默认启停用 */
showqt: false,
}
}
},
methods: {
save() {
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length == 0) {
this.$warning('请至少勾选一条数据')
} else {
let obj = {
list: list
}
this.$emit('save', obj)
this.app.showDialog = false
}
}
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage :auxInput="false" ref="basePage" :power='power' class="min_full" style="height: 100%;" :config="config"> ref="basePage"
:power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</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 {
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'lxyl/ckgl/dbck/query/ukcjyqd',
queryUrl: 'lxyl/ckgl/dbck/query/ukcjyqd',
tableTitle: [
{
title: "容器",
field: "rqCode",
width: 140
},
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "物料编码",
field: "wlxxCode",
width: 140,
},
{
title: "物料名称",
field: "wlxxName",
width: 140,
},
{
title: "物料批号",
field: "wlph",
width: 180,
},
{
title: "制令号",
field: "zlh",
width: 180,
},
{
title: "数量",
field: "packmxSl",
width: 80,
},
{
title: "装拖数量",
field: "ztsl",
width: 80,
}
],
queryParams: [
[{
label: '托盘编号',
prop: 'code',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
showqt: false,
}
}
},
methods: {
save() {
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length == 0) {
this.$warning('请至少勾选一条数据')
} else {
let obj = {
list: list
}
/* 判定wlxx rqCode packid 是否一致全部一致的判定为重复*/
/* */
this.$emit('save', obj)
this.app.showDialog = false
}
}
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row v-if="loading" :gutter="20" :app="this" class="editRow">
<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-if="(item.show==false)?false:true"
: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,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
/* 初始化数据 */
this.$post('common/datetime',{}).then(res=>{
let nowTime=res.data.data||new Date().getTime()
/* 初始赋值*/
this.nowTime=nowTime
this.editColItemList[0].value=nowTime-120*60*1000
this.editColItemList[1].value=nowTime
this.loading=true
})
},
data() {
return {
isLoading:false,
text:'正在请求中...',
readonly:false,
loading:false,
editColItemList:[
{
label: '开始日期',
prop: 'start',
span: 24,
type: 'datetime',
value: '',
"required": true,
},
{
label: '结束日期',
prop: 'end',
span: 24,
type: 'datetime',
value: '',
"required": true,
},
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
/* 判定开始参数不能大于30天*/
if(this.form.start<this.nowTime-30*24*60*60*1000){
this.$warning('最早开始时间不得超过30天')
return
}
/* 开始时间和结束时间不能大于120分钟*/
if(this.form.end-this.form.start>120*60*1000){
this.$warning('开始时间与结束时间间隔不能大于120分钟')
return
}
if(this.form.start>this.form.end){
this.$warning('开始时间不得晚于结束时间')
return
}
/* 构建参数*/
let params={
start:this.form.start,
end:this.form.end
}
this.isLoading=true
this.$post('lxyl/rkgl/tprk/scm/sync',params).then(res=>{
if(res.success){
this.isLoading=false
this.$success('操作成功')
this.app.showDialog=false
this.app.refresh()
}
}).finally(res=>{
this.isLoading=false
})
}
})
}
}
}
</script>
<style scoped>
</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