Commit 0185e789 authored by 李苏's avatar 李苏 💬

库位批量操作

parent ebde24eb
......@@ -161,7 +161,6 @@
list.forEach(item => {
this.ztMap[item.id] = item.name
})
console.log(this.ztMap)
}
})
this.$post('wms/jcsj/kw/init/kczt').then(res => {
......@@ -170,7 +169,6 @@
list.forEach(item => {
this.ccztMap[item.id] = item.name
})
console.log(this.ccztMap)
}
})
/* 测试时间*/
......
......@@ -4,6 +4,7 @@
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Detail :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='查看详情'" />
<Kwbg :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='库位变更'" />
<Plcz :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='批量操作'" />
</template>
<template #toolbar="ctx">
......@@ -16,6 +17,7 @@
<el-button style="margin-left: 10px;" @click="freeze(ctx.basePage)" size='mini' type="primary">冻结</el-button>
<el-button style="margin-left: 10px;" @click="unfreeze(ctx.basePage)" size='mini' type="primary">解冻</el-button>
<el-button style="margin-left: 10px;" @click="ckxq(ctx.basePage)" size='mini' type="primary">查看详情</el-button>
<el-button style="margin-left: 10px;" @click="plxz(ctx.basePage)" size='mini' type="primary">批量操作</el-button>
<!-- <el-button style="margin-left: 10px;" @click="kwbg(ctx.basePage)" size='mini'
type="primary">库位变更</el-button> -->
</template>
......@@ -26,7 +28,8 @@
<script>
import Edit from './edit.vue'
import Detail from './detail.vue'
import Kwbg from './kwbg.vue'
import Plcz from './plcz.vue'
// import Kwbg from './kwbg.vue'
export default {
data() {
return {
......@@ -175,27 +178,27 @@
],
[
{
"label": "状态",
"prop": "zt",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "wms/jcsj/kw/init/zt",
}
},
[{
"label": "状态",
"prop": "zt",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "wms/jcsj/kw/init/zt",
}
},
{
"label": "存储状态",
"prop": "kczt",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "wms/jcsj/kw/init/kczt",
}
}, ]
"label": "存储状态",
"prop": "kczt",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "wms/jcsj/kw/init/kczt",
}
},
]
],
/* 默认启停用 */
//showqt: true,
......@@ -204,6 +207,11 @@
},
methods: {
plxz(ctx) {
ctx.DialogWidth = '70vw'
ctx.DialogTitle = '批量操作'
ctx.showDialog = true
},
kwbg(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
ctx.DialogWidth = '30vw'
......@@ -291,7 +299,7 @@
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refreshId(ctx.singleItem.id)
ctx.refreshId(ctx.singleItem.id)
}
})
})
......@@ -340,6 +348,7 @@
components: {
Edit,
Detail,
Plcz
// Kwbg
}
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage fePage ref="basePage" :toolButton='false' :power='power' class="min_full" style="height: 100%;"
:config="config" >
<template #toolbar="ctx">
<el-button style="margin-left: 10px;" @click="freeze(ctx.basePage)" size='mini' type="primary">冻结</el-button>
<el-button style="margin-left: 10px;" @click="unfreeze(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>
import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default {
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
this.$nextTick(()=>{
const tbp= this.$refs.basePage.$refs.TablePager
tbp.selectAll=function(data){
console.log(data,'selectAll')
/* 重写*/
if(data.length>0){
tbp.selectedList=tbp.fePageData
}else{
tbp.selectedList=[]
}
}
})
},
mixins: [wlsx, wlphsx],
data() {
return {
tbp:null,
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: true,
saveSelected: true
},
config: {
/* Dialog*/
// queryDetail: true,
/* 基本配置*/
url: 'wms/jcsj/kw',
tableTitle: [{
title: "状态",
field: "zt",
width: 80,
"transform": {
"url": "wms/jcsj/kw/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "存储状态",
field: "kczt",
width: 80,
"transform": {
"url": "wms/jcsj/kw/init/kczt",
"label": "name",
"value": "id"
}
},
{
title: "库位编码",
field: "code",
width: 120
},
{
title: "库位",
field: "name",
width: 120
},
{
title: "仓库",
field: "ckName",
width: 120,
},
{
title: "库区",
field: "kqName",
width: 140,
},
{
title: "货架",
field: "hjName",
width: 140,
},
{
title: "排",
field: "kwx",
width: 80,
}, {
title: "列",
field: "kwy",
width: 80,
}, {
title: "层",
field: "kwz",
width: 80,
},
{
title: "外侧库位",
field: "wcKwCode",
width: 120,
},
{
title: "ABC",
field: "abc",
width: 170
},
{
title: "备注",
field: "bz",
width: 240
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
},
{
title: "创建人",
field: "cjr",
hidden: true
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [
[{
"label": "仓库",
"prop": "ckid",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/jcsj/uck/ck/queryCjckid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
"label": "货架",
"prop": "hjid",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "wms/jcsj/kw/init/hj",
}
}
],
[{
label: '排',
prop: 'kwx',
span: 6,
type: 'input',
value: ''
},
{
label: '列',
prop: 'kwy',
span: 6,
type: 'input',
value: ''
},
{
label: '层',
prop: 'kwz',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
}
}
},
methods: {
freeze(ctx) {
if (ctx.$refs.TablePager.selectedList.length>0) {
this.$confirm('是否继续操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('wms/jcsj/kw/freeze', {
ids:ctx.$refs.TablePager.selectedList.map(item=>item.id)
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refreshId(ctx.singleItem.id)
}
})
})
} else {
this.$warning('请选中一条数据')
}
},
unfreeze(ctx) {
if (ctx.$refs.TablePager.selectedList.length>0) {
this.$confirm('是否继续操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('wms/jcsj/kw/unfreeze', {
ids:ctx.$refs.TablePager.selectedList.map(item=>item.id)
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refreshId(ctx.singleItem.id)
}
})
})
} else {
this.$warning('请选中一条数据')
}
},
}
}
</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