This commit is contained in:
朱文强 2024-02-22 15:41:26 +08:00
parent 49bbd6fcda
commit f2e8952030
11 changed files with 816 additions and 177 deletions

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-22 15:31:37
* @LastEditors: zwq
* @LastEditTime: 2023-10-31 09:48:35
* @LastEditTime: 2024-01-29 16:59:17
* @Description:
*/
import request from '@/utils/request'
@ -84,6 +84,15 @@ export function getWarehouseStorehousePage(query) {
params: query
})
}
// 获得立库库位分页
export function getWarehouseStorehouseMonitoring(query) {
return request({
url: '/asrs/warehouse-storehouse/monitoring',
method: 'get',
params: query
})
}
// 获得立库库位列表
export function getWarehouseStorehouseList(query) {
return request({

View File

@ -0,0 +1,147 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData">
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
</div>
</template>
<script>
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import { getHeavenlyEyeLogPage } from '@/api/oth/heavenlyEyeLog';
const tableProps = [
{
prop: 'reqInterface',
label: '请求接口',
},
{
prop: 'reqParameter',
label: '请求参数',
},
{
prop: 'errorCode',
label: '返回编码',
},
{
prop: 'cmd',
label: '返回请求接口',
},
{
prop: 'msgId',
label: '返回msgId',
},
{
prop: 'retStatus',
label: '返回状态',
},
{
prop: 'fastName',
label: '返回指定区域',
},
{
prop: 'areaName',
label: '返回复合区域',
},
{
prop: 'list',
label: '返回集合',
},
{
prop: 'createTime',
label: '时间',
filter: parseTime,
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getHeavenlyEyeLogPage,
},
tableProps,
tableData: [],
formConfig: [
{
type: 'input',
label: '请求接口',
placeholder: '请求接口',
param: 'code',
},
{
type: 'input',
label: '请求参数',
placeholder: '请求参数',
param: 'name',
},
{
type: 'datePicker',
label: '订单出货日期',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
],
};
},
components: {},
created() {},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.reqInterface = val.code;
this.listQuery.reqParameter = val.name;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -0,0 +1,147 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData">
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
</div>
</template>
<script>
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import { getHeavenlyEyeLogPage } from '@/api/oth/heavenlyEyeLog';
const tableProps = [
{
prop: 'reqInterface',
label: '请求接口',
},
{
prop: 'reqParameter',
label: '请求参数',
},
{
prop: 'errorCode',
label: '返回编码',
},
{
prop: 'cmd',
label: '返回请求接口',
},
{
prop: 'msgId',
label: '返回msgId',
},
{
prop: 'retStatus',
label: '返回状态',
},
{
prop: 'fastName',
label: '返回指定区域',
},
{
prop: 'areaName',
label: '返回复合区域',
},
{
prop: 'list',
label: '返回集合',
},
{
prop: 'createTime',
label: '时间',
filter: parseTime,
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getHeavenlyEyeLogPage,
},
tableProps,
tableData: [],
formConfig: [
{
type: 'input',
label: '部件编号',
placeholder: '部件编号',
param: 'code',
},
{
type: 'input',
label: '部件名称',
placeholder: '部件名称',
param: 'name',
},
{
type: 'datePicker',
label: '日期',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
],
};
},
components: {},
created() {},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.reqInterface = val.code;
this.listQuery.reqParameter = val.name;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-01-17 09:58:41
* @LastEditors: zwq
* @LastEditTime: 2024-01-23 10:02:15
* @LastEditTime: 2024-02-22 14:07:03
* @Description:
-->
<template>
@ -12,13 +12,20 @@
ref="searchBarForm"
@headBtnClick="buttonClick" />
<div class="tips">
<el-tag effect="dark" color="#16DC09" style="border: none"></el-tag>
<el-tag
effect="dark"
color="#16DC09"
style="border: none">
</el-tag>
<el-tag effect="dark" color="#d3d3d3" style="border: none"></el-tag>
<el-tag effect="dark" color="#7362F3" style="border: none"></el-tag>
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
</div>
<div class="mainbody">
<!-- @click="showDia()" -->
<div v-for="i in listQuery.total" :key="i">
<el-row>
<el-row style="margin-bottom: 10px">
<el-col :span="24">
<el-row type="flex" class="flex-warp">
<div
@ -27,10 +34,7 @@
(item) => item.wareRow === (i - 1) * 4 + 1
)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="x-coordinate coordinate" v-if="j.wareRow === 1">
{{ j.wareColumn }}
</div>
@ -41,9 +45,31 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
@ -54,10 +80,7 @@
(item) => item.wareRow === (i - 1) * 4 + 2
)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
{{ j.wareRow }}
</div>
@ -65,15 +88,36 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
</el-col>
</el-row>
<el-divider class="divider"></el-divider>
<el-row>
<el-col :span="24">
<el-row type="flex" class="flex-warp">
@ -83,10 +127,7 @@
(item) => item.wareRow === (i - 1) * 4 + 3
)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
{{ j.wareRow }}
</div>
@ -94,9 +135,31 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
@ -105,10 +168,7 @@
class="dashboard-layout-item"
v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
{{ j.wareRow }}
</div>
@ -116,38 +176,66 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
</el-col>
</el-row>
<el-divider class="divider" v-if="i < listQuery.total"></el-divider>
</div>
</div>
<pot-dialog
ref="dialogRef"
v-if="diaVisible"
@refreshDataList="getDataList"></pot-dialog>
</div>
</template>
<script>
import basicPage from '../mixins/basic-page';
import {
getWarehouseStorehouseList,
getWarehouseStorehouseMonitoring,
exportWarehouseStorehouseExcel,
} from '@/api/asrs/warehouseStorehouse';
import potDialog from './potDialog';
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getWarehouseStorehouseList,
getDataListURL: getWarehouseStorehouseMonitoring,
exportURL: exportWarehouseStorehouseExcel,
},
listQuery: {
wareLayer: 1,
total: 0,
},
diaVisible: false,
wareData: [],
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //
formConfig: [
@ -181,7 +269,9 @@ export default {
],
};
},
components: {},
components: {
potDialog,
},
created() {},
methods: {
buttonClick(val) {
@ -201,11 +291,17 @@ export default {
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.wareData = response.data;
this.listQuery.total = Math.ceil(response.data.length / 120);
this.wareData = response.data.list;
this.listQuery.total = Math.ceil(response.data.list.length / 120);
this.dataListLoading = false;
});
},
showDia() {
this.diaVisible = true;
this.$nextTick(() => {
this.$refs.dialogRef.init();
});
},
},
};
</script>
@ -222,22 +318,12 @@ export default {
.flex-warp {
flex-wrap: nowrap;
}
.hoverDiv {
cursor: pointer;
width: 100%;
height: 30px;
&:hover {
background-color: #ff0000;
z-index: 10;
transform: scale(1.3) translateZ(0);
}
}
.dashboard-layout-item {
width: 30px;
height: 30px;
background-color: #d3d3d3;
border-radius: 2px;
margin: 0 3px 8px 0;
margin: 0 6px 8px 0;
position: relative;
&:nth-child(2n) {
margin-right: 30px;
@ -248,7 +334,7 @@ export default {
&:last-child {
margin-right: 30px;
}
.coordinate{
.coordinate {
font-weight: bold;
font-size: 18px;
}
@ -267,8 +353,16 @@ export default {
left: -25px;
}
}
.hoverDiv {
width: 100%;
height: 30px;
&:hover {
border: 1px #000000 dashed;
transform: scale(1.3);
}
}
.el-divider--horizontal {
margin: 10px 0;
margin: 0 0 8px 0;
}
.el-divider {
background-color: black;

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-01-17 09:58:41
* @LastEditors: zwq
* @LastEditTime: 2024-01-23 10:02:53
* @LastEditTime: 2024-02-22 14:08:47
* @Description:
-->
<template>
@ -12,13 +12,20 @@
ref="searchBarForm"
@headBtnClick="buttonClick" />
<div class="tips">
<el-tag effect="dark" color="#16DC09" style="border: none"></el-tag>
<el-tag
effect="dark"
color="#16DC09"
style="border: none">
</el-tag>
<el-tag effect="dark" color="#d3d3d3" style="border: none"></el-tag>
<el-tag effect="dark" color="#7362F3" style="border: none"></el-tag>
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
</div>
<div class="mainbody">
<!-- @click="showDia()" -->
<div v-for="i in listQuery.total" :key="i">
<el-row>
<el-row style="margin-bottom: 10px">
<el-col :span="24">
<el-row type="flex" class="flex-warp">
<div
@ -27,10 +34,7 @@
(item) => item.wareRow === (i - 1) * 4 + 1
)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="x-coordinate coordinate" v-if="j.wareRow === 1">
{{ j.wareColumn }}
</div>
@ -41,9 +45,31 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
@ -54,10 +80,7 @@
(item) => item.wareRow === (i - 1) * 4 + 2
)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
{{ j.wareRow }}
</div>
@ -65,15 +88,36 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
</el-col>
</el-row>
<el-divider class="divider"></el-divider>
<el-row>
<el-col :span="24">
<el-row type="flex" class="flex-warp">
@ -83,10 +127,7 @@
(item) => item.wareRow === (i - 1) * 4 + 3
)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
{{ j.wareRow }}
</div>
@ -94,9 +135,31 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
@ -105,10 +168,7 @@
class="dashboard-layout-item"
v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
:key="j.id + j.warehouseStorehouseName"
:title="j.warehouseStorehouseName"
:style="{
background: bgColor[j.warehouseStorehouseState],
}">
:title="j.warehouseStorehouseName">
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
{{ j.wareRow }}
</div>
@ -116,38 +176,66 @@
placement="top-start"
:title="j.warehouseStorehouseName"
width="200"
trigger="hover"
:content="j.warehouseStorehouseName">
<div slot="reference" class="hoverDiv" />
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '锁', '满'][j.warehouseStorehouseState]
: '不可用'
}}
<div v-for="(k, index) in j.productList" :key="index">
产品名称: {{ k.goodSpecificationName }}
<br />
产品数量: {{ k.number }}
</div>
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
</el-col>
</el-row>
<el-divider class="divider" v-if="i < listQuery.total"></el-divider>
</div>
</div>
<pot-dialog
ref="dialogRef"
v-if="diaVisible"
@refreshDataList="getDataList"></pot-dialog>
</div>
</template>
<script>
import basicPage from '../mixins/basic-page';
import {
getWarehouseStorehouseList,
getWarehouseStorehouseMonitoring,
exportWarehouseStorehouseExcel,
} from '@/api/asrs/warehouseStorehouse';
import potDialog from './potDialog';
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getWarehouseStorehouseList,
getDataListURL: getWarehouseStorehouseMonitoring,
exportURL: exportWarehouseStorehouseExcel,
},
listQuery: {
wareLayer: 1,
total: 0,
},
diaVisible: false,
wareData: [],
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //
formConfig: [
@ -181,10 +269,12 @@ export default {
],
};
},
components: {},
components: {
potDialog,
},
created() {
this.listQuery.warehouseId = this.bId;
},
},
methods: {
buttonClick(val) {
switch (val.btnName) {
@ -203,11 +293,17 @@ export default {
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.wareData = response.data;
this.listQuery.total = Math.ceil(response.data.length / 120);
this.wareData = response.data.list;
this.listQuery.total = Math.ceil(response.data.list.length / 120);
this.dataListLoading = false;
});
},
showDia() {
this.diaVisible = true;
this.$nextTick(() => {
this.$refs.dialogRef.init();
});
},
},
};
</script>
@ -224,22 +320,12 @@ export default {
.flex-warp {
flex-wrap: nowrap;
}
.hoverDiv {
cursor: pointer;
width: 100%;
height: 30px;
&:hover {
background-color: #ff0000;
z-index: 10;
transform: scale(1.3) translateZ(0);
}
}
.dashboard-layout-item {
width: 30px;
height: 30px;
background-color: #d3d3d3;
border-radius: 2px;
margin: 0 3px 8px 0;
margin: 0 6px 8px 0;
position: relative;
&:nth-child(2n) {
margin-right: 30px;
@ -250,7 +336,7 @@ export default {
&:last-child {
margin-right: 30px;
}
.coordinate{
.coordinate {
font-weight: bold;
font-size: 18px;
}
@ -269,8 +355,16 @@ export default {
left: -25px;
}
}
.hoverDiv {
width: 100%;
height: 30px;
&:hover {
border: 1px #000000 dashed;
transform: scale(1.3);
}
}
.el-divider--horizontal {
margin: 10px 0;
margin: 0 0 8px 0;
}
.el-divider {
background-color: black;

View File

@ -0,0 +1,39 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-01-29 16:55:39
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
},
}
},
methods: {
init (id) {
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
})
},
}
}
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-22 15:01:55
* @LastEditors: zwq
* @LastEditTime: 2023-10-10 10:43:39
* @LastEditTime: 2024-02-22 11:20:04
* @Description:
-->
<template>
@ -86,7 +86,7 @@
:table-data="productAttributeList">
<method-btn
slot="handleBtn"
:width="70"
:width="60"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
@ -139,25 +139,29 @@ const tableProps = [
prop: 'specification',
label: '产品规格',
filter: codeFilter('specification'),
width:90
width:80
},
{
prop: 'rollCode',
label: '膜卷编码',
subcomponent: inputArea,
width: 100,
},
{
prop: 'number',
label: '数量',
subcomponent: inputArea,
width:100
width: 55,
},
{
prop: 'quality',
label: '品质',
filter: codeFilter('quality'),
subcomponent: selectQuality,
width:110
width: 55,
},
{
prop: 'cureTime',
label: '需要熟化时间(小时)',
width:150
width: 140
},
];
@ -307,7 +311,11 @@ export default {
});
},
addList(data) {
this.productAttributeList.push(data.productInfo);
data.productInfo.number = 1;
data.productInfo.quality = data.quality;
for (let i = 0; i < data.number; i++) {
this.productAttributeList.push(JSON.parse(JSON.stringify(data.productInfo)));
}
},
goback() {
this.$emit('refreshDataList');

View File

@ -31,9 +31,30 @@
:key="item.id"
:label="item.goodSpecificationName"
:value="item"
:disabled="!item.deactivate" />
:disabled="!item.deactivate" />
</el-select>
</el-form-item>
<el-form-item label="品质" prop="quality">
<el-select
v-model="dataForm.quality"
style="width: 100%"
filterable
value-key="id"
placeholder="请选择品质">
<el-option
v-for="item in qualityArr"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="数量" prop="number">
<el-input-number
v-model="dataForm.number"
:step="1"
:min="1"
:max="12"></el-input-number>
</el-form-item>
</el-form>
<el-row style="text-align: right">
@ -58,12 +79,32 @@ export default {
visible: false,
dataForm: {
index: -1,
productInfo: '',
productInfo: null,
number: 1,
quality: null,
},
productArr: [],
qualityArr: [
{
name: 'C',
id: 2,
},
{
name: 'B',
id: 1,
},
{
name: 'A',
id: 0,
},
],
dataRule: {
productId: [
{ required: true, message: '产品不能为空', trigger: 'blur' },
productInfo: [
{ required: true, message: '产品不能为空', trigger: 'change' },
],
number: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
quality: [
{ required: true, message: '品质不能为空', trigger: 'change' },
],
},
};

View File

@ -101,7 +101,7 @@
:table-data="productAttributeList">
<method-btn
slot="handleBtn"
:width="70"
:width="60"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
@ -162,25 +162,29 @@ const tableProps = [
prop: 'specification',
label: '产品规格',
filter: codeFilter('specification'),
width: 90,
width: 80,
},
{
prop: 'rollCode',
label: '膜卷编码',
subcomponent: inputArea,
width: 100,
},
{
prop: 'number',
label: '数量',
subcomponent: inputArea,
width: 100,
width: 55,
},
{
prop: 'quality',
label: '品质',
filter: codeFilter('quality'),
subcomponent: selectQuality,
width: 110,
width: 55,
},
{
prop: 'cureTime',
label: '需要熟化时间(小时)',
width: 150,
width: 140,
},
];
@ -375,7 +379,11 @@ export default {
});
},
addList(data) {
this.productAttributeList.push(data.productInfo);
data.productInfo.number = 1;
data.productInfo.quality = data.quality;
for (let i = 0; i < data.number; i++) {
this.productAttributeList.push(JSON.parse(JSON.stringify(data.productInfo)));
}
},
goback() {
this.$emit('refreshDataList');

View File

@ -23,17 +23,34 @@
<el-select
v-model="dataForm.productInfo"
style="width: 100%"
filterable
value-key="id"
filterable
value-key="id"
placeholder="请选择产品">
<el-option
v-for="item in productArr"
:key="item.id"
:label="item.goodSpecificationName"
:value="item"
:disabled="!item.deactivate" />
:disabled="!item.deactivate" />
</el-select>
</el-form-item>
<el-form-item label="品质" prop="quality">
<el-select
v-model="dataForm.quality"
style="width: 100%"
filterable
value-key="id"
placeholder="请选择品质">
<el-option
v-for="item in qualityArr"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="数量" prop="number">
<el-input-number v-model="dataForm.number" :step="1" :min="1" :max="12"></el-input-number>
</el-form-item>
</el-form>
<el-row style="text-align: right">
@ -58,11 +75,35 @@ export default {
visible: false,
dataForm: {
index: -1,
productInfo: '',
productInfo: null,
number: 1,
quality: null,
},
productArr: [],
qualityArr: [
{
name: 'C',
id: 2,
},
{
name: 'B',
id: 1,
},
{
name: 'A',
id: 0,
},
],
dataRule: {
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }],
productInfo: [
{ required: true, message: '产品不能为空', trigger: 'change' },
],
number: [
{ required: true, message: '数量不能为空', trigger: 'blur' },
],
quality: [
{ required: true, message: '品质不能为空', trigger: 'change' },
],
},
};
},
@ -88,7 +129,8 @@ export default {
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.dataForm.productInfo.goodSpecificationId = this.dataForm.productInfo.id
this.dataForm.productInfo.goodSpecificationId =
this.dataForm.productInfo.id;
//
if (this.dataForm.index >= 0) {
this.$modal.msgSuccess('修改成功');

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-21 14:26:23
* @LastEditors: zwq
* @LastEditTime: 2023-10-20 16:36:31
* @LastEditTime: 2024-02-22 14:23:55
* @Description:
-->
<template>
@ -12,25 +12,48 @@
ref="searchBarForm"
@headBtnClick="buttonClick" />
<div class="tips">
<el-tag effect="dark" color="#7362F3" style="border: none"></el-tag>
<el-tag effect="dark" color="#16DC09" style="border: none"></el-tag>
<el-tag effect="dark" color="#FFA08F" style="border: none"></el-tag>
<el-tag
effect="dark"
color="#16DC09"
style="border: none">
</el-tag>
<el-tag effect="dark" color="#d3d3d3" style="border: none"></el-tag>
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
</div>
<div class="mainbody">
<div v-for="i in listQuery.total" :key="i" class="div-row">
<el-row type="flex" class="flex-warp">
<div
class="dashboard-layout-item"
v-for="a in wareData.slice((i - 1) * 20, i * 20)"
:key="a.id + a.finishProductCode"
:title="a.finishProductName"
style="background: #fff8e8; float: left">
<div
class="dashboard-layout-item-cricle"
:style="{
background: bgColor[a.finishProductWarehouseState],
}" />
<p class="p-name">{{ a.finishProductName }}</p>
v-for="j in wareData.slice((i - 1) * 30, i * 30)"
:key="j.id + j.finishProductCode"
:title="j.finishProductName">
<el-popover
placement="top-start"
:title="j.finishProductName"
width="200"
trigger="hover">
库位状态:
{{
j.deactivate === 1
? ['空', '满'][j.finishProductWarehouseState]
: '不可用'
}}
<div
slot="reference"
class="hoverDiv"
:style="{
cursor:
j.deactivate === 0 || j.finishProductWarehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.finishProductWarehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
</el-row>
</div>
@ -57,7 +80,7 @@ export default {
total: 0,
},
wareData: [],
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
bgColor: ['#d3d3d3', '#16DC09'], //
formConfig: [
{
type: 'select',
@ -98,7 +121,7 @@ export default {
this.wareData = [],
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.wareData = response.data
this.listQuery.total = Math.ceil(response.data.length / 20);
this.listQuery.total = Math.ceil(response.data.length / 30);
this.dataListLoading = false;
});
},
@ -122,8 +145,11 @@ export default {
<style lang="scss" scoped>
.mainbody {
display: flex;
gap: 10px;
flex-direction: column;
justify-content: space-around;
min-width: 80vw;
border-radius: 5px;
padding-top: 25px;
}
.flex-warp {
flex-wrap: nowrap;
@ -134,36 +160,12 @@ export default {
}
}
.dashboard-layout-item {
width: 60px;
text-align: center;
height: 40px;
box-shadow: 1px 1px 4px 1px rgba(166, 174, 190, 0.8);
border-radius: 4px;
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
background-color: #d3d3d3;
border-radius: 2px;
margin: 0 6px 8px 0;
position: relative;
.dashboard-layout-item-cricle {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 6px;
position: absolute;
top: 3px;
left: 24px;
}
.p-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-bottom: 5px;
}
&:hover {
cursor: pointer;
z-index: 10;
transform: scale(1.3) translateZ(0);
}
&:nth-child(2n) {
margin-right: 18px;
}
@ -174,6 +176,14 @@ export default {
margin-right: 30px;
}
}
.hoverDiv {
width: 100%;
height: 30px;
&:hover {
border: 1px #000000 dashed;
transform: scale(1.3);
}
}
.tips {
position: absolute;
top: 22px;