11/6 货架1.0

20240912_adapter
wangwei 5 months ago
parent 4889e7ce26
commit 2d4f82abc2

@ -0,0 +1,303 @@
<template>
<div>
<!--<el-card class="el-card">-->
<div style="display: flex;margin-top: 20px;width: 100%;height: 100%">
<!--<div style="display: flex;width: 20%;height: 130%">-->
<div style="width: 45%;height: 340px;margin-bottom: 10px">
<el-card style="width: 100%;height: 100%">
<div slot="header" class="clearfix" style="margin-bottom: 10px;">
<span style="font-weight: 700;">取货架列表</span>
</div>
<el-button style="float: right; margin-bottom: 5px" @click="onAddFreight" type="primary">新增取货架
</el-button>
<el-table
:data="freightList"
:row-style="{ height: '32px' }"
highlight-current-row
@row-click="handChangeFreight"
>
<el-table-column type="index" label="序号">
</el-table-column>
<el-table-column
width="100"
prop="code"
label="取货架编码"
>
</el-table-column>
<el-table-column
width="140"
prop="remark"
label="取货架说明"
>
</el-table-column>
<el-table-column
width="140"
prop="layerCount"
label="摆货层数量"
>
</el-table-column>
<!--<el-table-column-->
<!-- width="140"-->
<!-- prop="name"-->
<!-- label="摆货层数量">-->
<!--</el-table-column>-->
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleEdit(scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="handleDel(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<!--<pagination-->
<!-- :total="total"-->
<!-- :limit.sync="query.limit"-->
<!-- :page.sync="query.page"-->
<!-- @pagination="getList"-->
<!--&gt;-->
<!--</pagination>-->
<el-pagination
layout="prev, pager, next"
style="float: right"
small
:total="queueTotal"
>
</el-pagination>
</el-card>
</div>
<div style="width: 322px;height: 340px;margin-bottom: 10px">
<el-card style="width: 100%;height: 100%">
<div slot="header" class="clearfix" style="margin-bottom: 10px;">
<span style="font-weight: 700;">摆货层列表</span>
</div>
<el-table
:data="layerList"
:row-style="{ height: '32px' }"
highlight-current-row
@row-click="handChangeLayer"
>
<el-table-column
width="100"
prop="code"
label="摆货层编码"
>
</el-table-column>
<el-table-column
width="120"
prop="queueNum"
label="出货槽数量"
>
</el-table-column>
<el-table-column label="操作" width="60">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleEdit(scope.row)"
>打印
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
layout="prev, pager, next"
style="float: right"
small
:total="LayerTotal"
>
</el-pagination>
<!--<pagination-->
<!-- :total="LayerTotal"-->
<!-- :limit.sync="LayerQuery.limit"-->
<!-- :page.sync="LayerQuery.page"-->
<!-- @pagination="getLayers()"-->
<!-- style="float: right; width: 100px">-->
<!--&gt;-->
<!--</pagination>-->
</el-card>
</div>
<div style="width: 260px;height: 340px;margin-bottom: 10px">
<el-card style="width: 100%;height: 100%">
<div slot="header" class="clearfix" style="margin-bottom: 10px;">
<span style="font-weight: 700;">出货槽列表</span>
</div>
<el-table
:data="queueList"
:row-style="{ height: '32px' }"
highlight-current-row
@row-click="loadLinkData"
>
<el-table-column
prop="code"
label="出货槽编号"
>
</el-table-column>
</el-table>
<el-pagination
layout="prev, pager, next"
style="float: right"
small
:total="queueTotal"
>
</el-pagination>
</el-card>
</div>
</div>
<!--</el-card>-->
<el-dialog
title="取货架管理"
:visible.sync="WorkplaceFreightDialogVisible"
width="60%"
v-if="WorkplaceFreightDialogVisible"
:close-on-press-escape="false"
:close-on-click-modal="false"
@close=""
>
<addWorkplaceFreightDialog
:closeDialog="closeDialog"
:rowData="rowData"
>
</addWorkplaceFreightDialog>
</el-dialog>
</div>
</template>
<script>
import { getWorkplaceFreightList } from '@/api/basic/workPlace/SysWorkplaceFreight'
import addWorkplaceFreightDialog from './addWorkplaceFreightDialog'
import { getLayerList } from '@/api/basic/workPlace/SysWorkplaceLayer'
import { getQueueListPage } from '@/api/basic/workPlace/SysWorkplaceQueue'
export default {
props: {
workplaceId: {
type: Object,
required: true
},
},
components: { addWorkplaceFreightDialog },
data() {
return {
query: {
page: 1,
limit: 4,
workPlaceIdFk: '',
key: ''
// code: null,
// workplaceStatus: 1,
// workPlaceClass: 2,
// deptCode: this.$store.getters.locDeptCode
},
total: 0,
LayerQuery: {
page: 1,
limit: 5,
freightCode: ''
},
LayerTotal: 0,
queueQuery: {
page: 1,
limit: 5,
layerCode: ''
},
rowData: null,
freightList: [],
layerList: [],
queueList: [],
queueTotal: 0,
WorkplaceFreightDialogVisible: false
}
},
methods: {
getList() {
getWorkplaceFreightList(this.query).then(res => {
if (res.code == 20000) {
this.freightList = res.data.list || []
this.total = res.data.total || 0
} else {
this.total = 0
this.freightList = []
}
})
},
getLayers() {
getLayerList(this.LayerQuery).then(res => {
if (res.code == 20000) {
this.layerList = res.data.list || []
if (this.layerList.length == 0) {
this.queueList = []
}
} else {
this.layerList = []
}
})
},
getQueues() {
getQueueListPage(this.queueQuery).then(res => {
if (res.code == 20000) {
this.queueList = res.data.list || []
this.queueTotal = res.data.total
} else {
this.queueTotal = 0
this.queueList = []
}
})
},
handChangeFreight(row) {
this.LayerQuery.freightCode = row.code
this.getLayers()
// this.getQueues()
},
handChangeLayer(row) {
this.queueQuery.layerCode = row.code
this.getQueues()
},
handleEdit(row) {
this.rowData = row
this.WorkplaceFreightDialogVisible = true
},
onAddFreight() {
if (this.workplaceId == null){
return this.$message.error("请选择工位")
}
this.rowData = null
this.WorkplaceFreightDialogVisible = true
},
closeDialog() {
this.getList()
this.getLayers()
this.getQueues()
this.WorkplaceFreightDialogVisible = false
},
getAllList(workPlaceIdFk) {
this.query.workPlaceIdFk = workPlaceIdFk
this.LayerQuery.freightCode = ""
this.getList()
this.getLayers()
this.getQueues()
}
},
created() {
this.getList()
this.getLayers()
this.getQueues()
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save