wms-njlm/src/views/fpw/warehouseLocationMonitoring/index.vue

216 lines
4.8 KiB
Vue
Raw Normal View History

2023-09-08 15:38:33 +08:00
<!--
* @Author: zwq
* @Date: 2023-08-21 14:26:23
* @LastEditors: zwq
2023-10-08 15:58:29 +08:00
* @LastEditTime: 2023-10-08 09:20:40
2023-09-08 15:38:33 +08:00
* @Description:
-->
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
2023-10-08 15:58:29 +08:00
<div class="tips">
<el-tag effect="dark"></el-tag>
<el-tag type="success" effect="dark"></el-tag>
<el-tag type="warning" effect="dark"></el-tag>
</div>
<div class="mainbody">
<div v-for="i in listQuery.total" :key="i">
<el-row>
<el-col :span="24">
<el-row>
2023-09-08 15:38:33 +08:00
<div
class="dashboard-layout-item"
2023-10-08 15:58:29 +08:00
v-for="a in wareData.one"
:key="a.id+a.warehouseStorehouseCode"
:style="{background: bgColor[a.warehouseStorehouseState], float: 'left'}">
<!-- <div
2023-09-08 15:38:33 +08:00
class="dashboard-layout-item-cricle"
2023-10-08 15:58:29 +08:00
style="background: #16dc09" /> -->
{{ a.warehouseStorehouseCode }}
2023-09-08 15:38:33 +08:00
</div>
2023-10-08 15:58:29 +08:00
</el-row>
<el-row>
2023-09-08 15:38:33 +08:00
<div
class="dashboard-layout-item"
2023-10-08 15:58:29 +08:00
v-for="b in wareData.two"
:key="b.id+b.warehouseStorehouseCode"
:style="{background: bgColor[b.warehouseStorehouseState], float: 'left'}">
<!-- <div
2023-09-08 15:38:33 +08:00
class="dashboard-layout-item-cricle"
2023-10-08 15:58:29 +08:00
style="background: #16dc09" /> -->
{{ b.warehouseStorehouseCode }}
2023-09-08 15:38:33 +08:00
</div>
2023-10-08 15:58:29 +08:00
</el-row>
</el-col>
</el-row>
<el-divider class="divider"></el-divider>
<el-row>
<el-col :span="24">
<el-row>
2023-09-08 15:38:33 +08:00
<div
class="dashboard-layout-item"
2023-10-08 15:58:29 +08:00
v-for="c in wareData.there"
:key="c.id+c.warehouseStorehouseCode"
:style="{background: bgColor[c.warehouseStorehouseState], float: 'left'}">
<!-- <div
2023-09-08 15:38:33 +08:00
class="dashboard-layout-item-cricle"
2023-10-08 15:58:29 +08:00
style="background: #16dc09" /> -->
{{ c.warehouseStorehouseCode }}
2023-09-08 15:38:33 +08:00
</div>
2023-10-08 15:58:29 +08:00
</el-row>
<el-row>
2023-09-08 15:38:33 +08:00
<div
class="dashboard-layout-item"
2023-10-08 15:58:29 +08:00
v-for="d in wareData.four"
:key="d.id+d.warehouseStorehouseCode"
:style="{background: bgColor[d.warehouseStorehouseState], float: 'left'}">
<!-- <div
2023-09-08 15:38:33 +08:00
class="dashboard-layout-item-cricle"
2023-10-08 15:58:29 +08:00
style="background: #16dc09" /> -->
{{ d.warehouseStorehouseCode }}
2023-09-08 15:38:33 +08:00
</div>
2023-10-08 15:58:29 +08:00
</el-row>
</el-col>
</el-row>
</div>
2023-09-08 15:38:33 +08:00
</div>
</div>
</template>
<script>
import basicPage from '../mixins/basic-page';
2023-10-08 15:58:29 +08:00
import { getWarehouseStorehouseList
} from "@/api/fpw/finishProductWarehouse";
2023-09-08 15:38:33 +08:00
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
2023-10-08 15:58:29 +08:00
getDataListURL: getWarehouseStorehouseList,
2023-09-08 15:38:33 +08:00
},
listQuery: {
wareLayer: 1,
2023-10-08 15:58:29 +08:00
total: 0,
},
wareData: {
one: [],
two: [],
there: [],
four: [],
2023-09-08 15:38:33 +08:00
},
2023-10-08 15:58:29 +08:00
bgColor:['#37d97f','#ffbd02','#0b58ff'],
2023-09-08 15:38:33 +08:00
formConfig: [
{
type: 'select',
label: '选择层',
selectOptions: [
{ id: 1, name: '1' },
{ id: 2, name: '2' },
{ id: 3, name: '3' },
{ id: 4, name: '4' },
],
param: 'value',
filterable: true,
defaultSelect: 1,
clearable: false,
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
],
};
},
components: {},
2023-10-08 15:58:29 +08:00
created() {
},
2023-09-08 15:38:33 +08:00
methods: {
2023-10-08 15:58:29 +08:00
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.wareData= {
one: [],
two: [],
there: [],
four: [],
},
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
response.data.forEach((a, b) => {
if (b % 4 === 0) {
this.wareData.one.push(a);
} else if (b % 4 === 1) {
this.wareData.two.push(a);
} else if (b % 4 === 2) {
this.wareData.there.push(a);
} else if (b % 4 === 3) {
this.wareData.four.push(a);
}
});
this.listQuery.total = Math.ceil(response.data.length / 120);
this.dataListLoading = false;
});
},
2023-09-08 15:38:33 +08:00
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.wareLayer = val.value;
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>
<style lang="scss" scoped>
2023-10-08 15:58:29 +08:00
.mainbody {
2023-09-08 15:38:33 +08:00
display: flex;
2023-10-08 15:58:29 +08:00
gap: 50px;
flex-direction: column;
2023-09-08 15:38:33 +08:00
}
.dashboard-layout-item {
2023-10-08 15:58:29 +08:00
color: white;
width: 3.3%;
2023-09-08 15:38:33 +08:00
text-align: center;
2023-10-08 15:58:29 +08:00
height: 40px;
2023-09-08 15:38:33 +08:00
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
border-radius: 2px 4px 4px 2px;
2023-10-08 15:58:29 +08:00
margin-bottom: 4px;
2023-09-08 15:38:33 +08:00
display: flex;
align-items: center;
justify-content: center;
.dashboard-layout-item-cricle {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 6px;
margin-right: 6px;
}
2023-10-08 15:58:29 +08:00
&:hover {
background-color: rgba(85, 136, 253, 0.8) !important;
color: #ffffff;
cursor: pointer;
transform: scaleY(1.3) translateZ(0);
}
2023-09-08 15:38:33 +08:00
}
.el-divider--horizontal {
margin: 10px 0;
}
2023-10-08 15:58:29 +08:00
.el-divider {
background-color: black;
}
.tips {
position: absolute;
top: 22px;
left: 370px;
2023-09-08 15:38:33 +08:00
}
</style>