This commit is contained in:
朱文强 2023-10-13 16:09:30 +08:00
parent 78796203f6
commit d51328c836
49 changed files with 985 additions and 600 deletions

View File

@ -2,7 +2,7 @@
# @Author: zwq # @Author: zwq
# @Date: 2023-08-17 15:10:53 # @Date: 2023-08-17 15:10:53
# @LastEditors: zwq # @LastEditors: zwq
# @LastEditTime: 2023-10-07 13:46:53 # @LastEditTime: 2023-10-11 13:40:44
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
@ -12,8 +12,8 @@ ENV = 'development'
VUE_APP_TITLE = 南京锂膜管理系统 VUE_APP_TITLE = 南京锂膜管理系统
# 南京锂膜管理系统/开发环境 # 南京锂膜管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.1.23:48080' # VUE_APP_BASE_API = 'http://192.168.1.23:48080'
# VUE_APP_BASE_API = 'http://192.168.0.31:48081' VUE_APP_BASE_API = 'http://192.168.0.31:48081'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:31:37 * @Date: 2023-08-22 15:31:37
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-07 16:04:12 * @LastEditTime: 2023-10-11 10:02:27
* @Description: * @Description:
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -77,6 +77,14 @@ export function getWarehouseStorehouseList(query) {
params: query params: query
}) })
} }
// 获得线边库列表
export function getLineList(query) {
return request({
url: '/asrs/line-edge-library/list',
method: 'get',
params: query
})
}
// 导出立库库位 Excel // 导出立库库位 Excel
export function exportWarehouseStorehouseExcel(query) { export function exportWarehouseStorehouseExcel(query) {
return request({ return request({

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-09-06 14:31:37 * @Date: 2023-09-06 14:31:37
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-10 15:09:23 * @LastEditTime: 2023-10-12 14:05:55
* @Description: * @Description:
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -85,7 +85,7 @@ export function getCode() {
// 获得立库库位列表 // 获得立库库位列表
export function getWarehouseStorehouseList(query) { export function getWarehouseStorehouseList(query) {
return request({ return request({
url: '/asrs/finish-product-warehouse/list', url: '/fpw/finish-product-warehouse/list',
method: 'get', method: 'get',
params: query params: query
}) })

BIN
src/assets/images/empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

View File

@ -13,10 +13,19 @@ body {
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
} }
label { // label {
font-weight: 700; // font-weight: 700;
} // }
.searchBarBox .el-form-item--medium .el-form-item__label {
line-height: 40px;
}
.searchBarBox .el-form-item--medium .el-form-item__content {
line-height: 40px;
}
.searchBarBox .el-range-editor--small.el-input__inner {
height: 34px;
}
html { html {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;

View File

@ -94,7 +94,9 @@ export default {
async logout() { async logout() {
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => { this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/index');
this.$router.push({ path: 'login' })
}) })
}).catch(() => {}); }).catch(() => {});
} }

View File

@ -226,7 +226,7 @@ function handleAuthorized() {
).then(() => { ).then(() => {
isRelogin.show = false; isRelogin.show = false;
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
location.href = getPath('/index'); this.$router.push({ path: 'login' })
}) })
}).catch(() => { }).catch(() => {
isRelogin.show = false; isRelogin.show = false;

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-27 10:29:09 * @LastEditTime: 2023-10-11 16:43:41
* @Description: * @Description:
--> -->
<template> <template>
@ -17,7 +17,12 @@
title="柱状图分析" title="柱状图分析"
ref="barChart" ref="barChart"
height="500px" height="500px"
v-if="tableData.length"
:histogram="tableData" /> :histogram="tableData" />
<el-empty
v-else
:image-size="300"
:image="require('../../../assets/images/empty.png')" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -84,14 +89,21 @@ export default {
if (this.listQuery.goodName) { if (this.listQuery.goodName) {
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data; this.tableData = response.data;
if (this.tableData.length) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.barChart.initChart(); this.$refs.barChart.initChart();
}); });
}
}); });
} }
}, },
getArr() { getArr() {
const params = { pageSize: 100, pageNo: 1, total: 1 }; const params = {
pageSize: 100,
pageNo: 1,
total: 1,
warehouseId: this.aId,
};
getGoodSpecificationPage(params).then((response) => { getGoodSpecificationPage(params).then((response) => {
this.formConfig[0].selectOptions = response.data.list; this.formConfig[0].selectOptions = response.data.list;
}); });

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-27 10:29:26 * @LastEditTime: 2023-10-11 16:43:48
* @Description: * @Description:
--> -->
<template> <template>
@ -17,7 +17,12 @@
title="柱状图分析" title="柱状图分析"
ref="barChart" ref="barChart"
height="500px" height="500px"
v-if="tableData.length"
:histogram="tableData" /> :histogram="tableData" />
<el-empty
v-else
:image-size="300"
:image="require('../../../assets/images/empty.png')" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -85,14 +90,21 @@ export default {
if (this.listQuery.goodName) { if (this.listQuery.goodName) {
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data; this.tableData = response.data;
if (this.tableData.length) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.barChart.initChart(); this.$refs.barChart.initChart();
}); });
}
}); });
} }
}, },
getArr() { getArr() {
const params = { pageSize: 100, pageNo: 1, total: 1 }; const params = {
pageSize: 100,
pageNo: 1,
total: 1,
warehouseId: this.bId,
};
getGoodSpecificationPage(params).then((response) => { getGoodSpecificationPage(params).then((response) => {
this.formConfig[0].selectOptions = response.data.list; this.formConfig[0].selectOptions = response.data.list;
}); });

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-27 10:50:43 * @LastEditTime: 2023-10-13 14:45:48
* @Description: * @Description:
--> -->
<template> <template>
@ -16,11 +16,14 @@
<pieChart <pieChart
title="饼状图分析" title="饼状图分析"
ref="pieChart" ref="pieChart"
height="500px" height="600px"
v-if="tableData.totalNumber" v-if="tableData.totalNumber"
:total-number="tableData.totalNumber" :total-number="tableData.totalNumber"
:pie-data="tableData.list" /> :pie-data="tableData.list" />
<el-empty v-else></el-empty> <el-empty
v-else
:image-size="300"
:image="require('../../../assets/images/empty.png')" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-27 10:50:39 * @LastEditTime: 2023-10-13 14:45:55
* @Description: * @Description:
--> -->
<template> <template>
@ -16,11 +16,14 @@
<pieChart <pieChart
title="饼状图分析" title="饼状图分析"
ref="pieChart" ref="pieChart"
height="500px" height="600px"
v-if="tableData.totalNumber" v-if="tableData.totalNumber"
:total-number="tableData.totalNumber" :total-number="tableData.totalNumber"
:pie-data="tableData.list" /> :pie-data="tableData.list" />
<el-empty v-else></el-empty> <el-empty
v-else
:image-size="300"
:image="require('../../../assets/images/empty.png')" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>

View File

@ -78,9 +78,6 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: 'button', type: 'button',
btnName: '重置', btnName: '重置',

View File

@ -68,15 +68,17 @@ export default {
this.chart.setOption({ this.chart.setOption({
title: { title: {
text: '{space|}{tip|}{space|}{value|' + this.title + '}', text: this.title
? '{space|}{tip|}{space|}{value|' + this.title + '}'
: '',
left: '0%', left: '0%',
top: '0%', top: '0%',
textStyle: { textStyle: {
rich: { rich: {
tip: { tip: {
width: 4, width: 4,
height: 16, height: 18,
backgroundColor: '#1FC495', backgroundColor: '#0B58FF',
marginRight: 6, marginRight: 6,
}, },
space: { space: {
@ -85,10 +87,12 @@ export default {
value: { value: {
fontSize: 16, fontSize: 16,
fontWeight: 'bold', fontWeight: 'bold',
color: '#000000',
}, },
}, },
}, },
}, },
color: ['#288AFF', '#8EF0AB', '#FFDC94'],
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
@ -107,6 +111,14 @@ export default {
{ {
type: 'category', type: 'category',
data: nameArr, data: nameArr,
axisLabel: {
color: '#979797',
},
axisLine: {
lineStyle: {
color: '#979797',
},
},
axisTick: { axisTick: {
alignWithLabel: true, alignWithLabel: true,
}, },
@ -118,6 +130,12 @@ export default {
axisTick: { axisTick: {
show: false, show: false,
}, },
splitArea: {
show: false,
},
axisLabel: {
color: '#979797',
},
}, },
], ],
series: [ series: [
@ -125,7 +143,7 @@ export default {
name: '数量', name: '数量',
type: 'bar', type: 'bar',
stack: 'vistors', stack: 'vistors',
barWidth: '60%', barWidth: '20',
data: valueArr, data: valueArr,
animationDuration, animationDuration,
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-06-01 10:47:42 * @Date: 2023-06-01 10:47:42
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-08 15:50:35 * @LastEditTime: 2023-10-12 16:32:00
* @Description: * @Description:
--> -->
<template> <template>
@ -60,8 +60,8 @@ export default {
rich: { rich: {
tip: { tip: {
width: 4, width: 4,
height: 16, height: 18,
backgroundColor: '#1FC495', backgroundColor: '#0B58FF',
marginRight: 6, marginRight: 6,
}, },
space: { space: {
@ -70,6 +70,7 @@ export default {
value: { value: {
fontSize: 16, fontSize: 16,
fontWeight: 'bold', fontWeight: 'bold',
color: '#000000',
}, },
}, },
}, },
@ -81,23 +82,52 @@ export default {
endAngle: 0, endAngle: 0,
min: 0, min: 0,
max: 100, max: 100,
splitNumber: 5, splitNumber: 4,
itemStyle: { itemStyle: {
color: '#47E282', color: '#f37215', //
shadowColor: 'rgba(0,138,255,0.45)', shadowColor: 'rgba(0,138,255,0.45)', //
shadowBlur: 10, shadowBlur: 10, //
shadowOffsetX: 2, shadowOffsetX: 2, //
shadowOffsetY: 2, shadowOffsetY: 2, //
},
progress: {
show: true, //
roundCap: true, //
width: 18, //
itemStyle: {
color: {
type: 'linear',
x: 1,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#58D9F9', // 0%
},
{
offset: 1,
color: '#288AFF', // 100%
},
],
global: false, // false
},
},
}, },
pointer: { pointer: {
icon: 'path://M2090.36389,615.30999 L2090.36389,615.30999 C2091.48372,615.30999 2092.40383,616.194028 2092.44859,617.312956 L2096.90698,728.755929 C2097.05155,732.369577 2094.2393,735.416212 2090.62566,735.56078 C2090.53845,735.564269 2090.45117,735.566014 2090.36389,735.566014 L2090.36389,735.566014 C2086.74736,735.566014 2083.81557,732.63423 2083.81557,729.017692 C2083.81557,728.930412 2083.81732,728.84314 2083.82081,728.755929 L2088.2792,617.312956 C2088.32396,616.194028 2089.24407,615.30999 2090.36389,615.30999 Z',
length: '80%',
itemStyle: { itemStyle: {
color: 'auto', color: '#288AFF',
}, },
width: 26,
}, },
axisLine: { axisLine: {
roundCap: true, roundCap: true,
lineStyle: { lineStyle: {
width: 16, width: 18,
color: [[1, '#E6EBF8']],
}, },
}, },
axisTick: { axisTick: {
@ -120,6 +150,9 @@ export default {
distance: -55, distance: -55,
color: '#999', color: '#999',
fontSize: 15, fontSize: 15,
formatter: function (value) {
return value + '%';
},
}, },
title: { title: {
show: false, show: false,
@ -132,20 +165,20 @@ export default {
offsetCenter: [0, '20%'], offsetCenter: [0, '20%'],
valueAnimation: true, valueAnimation: true,
formatter: function (value) { formatter: function (value) {
return '{side| }{value|' + value + '}{unit|%}{side1| }'; return '{side| }{value|' + value + '%}{side1| }';
}, },
rich: { rich: {
value: { value: {
fontSize: 18, fontSize: 24,
color: '#1FC495', color: '#0B58FF',
padding: [0, 0, 0, 16], padding: [0, 20, 0, 20],
}, },
side: { side: {
width: 35, width: 35,
height: 5, height: 5,
backgroundColor: '#fff', backgroundColor: '#fff',
opacity: 0.5, opacity: 0.5,
shadowColor: '#43E084', shadowColor: '#bcdbff',
shadowOffsetX: 10, shadowOffsetX: 10,
}, },
side1: { side1: {
@ -153,14 +186,9 @@ export default {
height: 5, height: 5,
backgroundColor: '#fff', backgroundColor: '#fff',
opacity: 0.5, opacity: 0.5,
shadowColor: '#43E084', shadowColor: '#bcdbff',
shadowOffsetX: -10, shadowOffsetX: -10,
}, },
unit: {
fontSize: 12,
color: '#999',
padding: [0, 16, 0, 0],
},
}, },
}, },
data: [ data: [

View File

@ -26,7 +26,7 @@ export default {
}, },
height: { height: {
type: String, type: String,
default: '300px', default: '250px',
}, },
pieData: { pieData: {
type: Array, type: Array,
@ -60,7 +60,7 @@ export default {
zlevel: 2, // zlevel: 2, //
text: '总数', text: '总数',
subtext: this.totalNumber, subtext: this.totalNumber,
top: '38%', // top: '42%', //
left: '50%', // left: '50%', //
textAlign: 'center', // textAlign: 'center', //
textStyle: { textStyle: {
@ -73,43 +73,11 @@ export default {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
show: true, // show: true, //
formatter: '产品: {b}<br/>数量: {c}<br/>占比: {d}%',
}, },
legend: { legend: {
orient: 'vartical', bottom: '0%',
top: 'center', left: 'center',
left: 'right',
icon: 'circle',
itemGap: 16, //
textStyle: {
//
fontSize: 24, // legend
color: '#828282',
rich: {
oneone: {
width: 50,
color: '#000000',
fontSize: 12,
fontWeight: 'bolder',
},
twotwo: {
width: 35,
color: '#333',
fontSize: 12,
},
threethree: {
width: 20,
color: '#959595',
fontSize: 12,
},
},
},
formatter: (name) => {
var target = this.pieData.find((item) => {
return item.name === name;
}).number;
var v = ((target / this.totalNumber) * 100).toFixed(2);
return `{oneone|${name}} {twotwo|${target}个} {threethree|${v}%}`;
},
}, },
grid: { grid: {
top: 40, top: 40,
@ -133,7 +101,7 @@ export default {
normal: { normal: {
show: true, show: true,
position: 'outside', // inside position: 'outside', // inside
formatter: '{d}%', // {a}{b}{c}{d}{d}value formatter: '{b}', // {a}{b}{c}{d}{d}value
textStyle: { textStyle: {
// 线 // 线
align: 'right', align: 'right',
@ -154,6 +122,9 @@ export default {
}, },
labelLine: { labelLine: {
show: false, show: false,
show: true,
length: 17,
length2: 57,
}, },
data: this.pieData, data: this.pieData,
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-09 16:01:44 * @LastEditTime: 2023-10-11 16:30:10
* @Description: * @Description:
--> -->
<template> <template>
@ -10,6 +10,7 @@
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
style="margin-right: 50px;"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="120px"> label-width="120px">
<el-row :gutter="20"> <el-row :gutter="20">
@ -53,18 +54,28 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否需要熟化" prop="cure"> <el-form-item label="是否需要熟化" prop="cure">
<el-switch <el-select
v-model="dataForm.cure" v-model="dataForm.cure"
:active-value="1" placeholder="请选择">
:inactive-value="0"></el-switch> <el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否启用" prop="deactivate"> <el-form-item label="是否启用" prop="deactivate">
<el-switch <el-select
v-model="dataForm.deactivate" v-model="dataForm.deactivate"
:active-value="1" placeholder="请选择">
:inactive-value="0"></el-switch> <el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -107,6 +118,16 @@ export default {
label: '卷', label: '卷',
}, },
], ],
options1: [
{
value: 0,
label: '否',
},
{
value: 1,
label: '是',
},
],
dataRule: { dataRule: {
goodSpecificationCode: [ goodSpecificationCode: [
{ required: true, message: '产品编码不能为空', trigger: 'blur' }, { required: true, message: '产品编码不能为空', trigger: 'blur' },

View File

@ -106,9 +106,6 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: 'button', type: 'button',
btnName: '重置', btnName: '重置',

View File

@ -2,27 +2,26 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-27 10:44:49 * @LastEditTime: 2023-10-13 14:30:24
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <el-row :gutter="10" class="chart-container">
<el-row :gutter="20"> <el-col :span="8">
<el-col :span="10"> <div class="chart-card">
<gaugeChart <gaugeChart ref="gaugeChart" title="仓库占用率" height="450px" />
ref="gaugeChart" </div>
title="仓库占用率"
height="500px"/>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="16">
<div class="chart-card">
<barChart <barChart
ref="barChart" ref="barChart"
height="500px" height="500px"
title="库存总览" title="库存总览"
:all-data="allData" /> :all-data="allData" />
</div>
</el-col> </el-col>
</el-row> </el-row>
</div>
</template> </template>
<script> <script>
@ -55,7 +54,7 @@ export default {
getDataList() { getDataList() {
this.urlOptions.occupancyURL(this.aId).then((response) => { this.urlOptions.occupancyURL(this.aId).then((response) => {
this.occupancyData = response.data.toFixed(2); this.occupancyData = response.data.toFixed(2);
const num = mul(this.occupancyData,100) const num = mul(this.occupancyData, 100);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.gaugeChart.initChart(num); this.$refs.gaugeChart.initChart(num);
}); });
@ -70,3 +69,17 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.chart-container {
min-height: calc(100vh - 120px - 8px);
background-color: #f0f2f7;
}
.chart-card {
min-height: calc(100vh - 120px - 8px);
background-color: #fff;
padding: 16px;
border-radius: 8px;
}
</style>

View File

@ -2,27 +2,26 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-08 15:49:40 * @LastEditTime: 2023-10-13 14:32:40
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <el-row :gutter="10" class="chart-container">
<el-row :gutter="20"> <el-col :span="8">
<el-col :span="10"> <div class="chart-card">
<gaugeChart <gaugeChart ref="gaugeChart" title="仓库占用率" height="450px" />
ref="gaugeChart" </div>
title="仓库占用率"
height="500px"/>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="16">
<div class="chart-card">
<barChart <barChart
ref="barChart" ref="barChart"
height="500px" height="500px"
title="库存总览" title="库存总览"
:all-data="allData" /> :all-data="allData" />
</div>
</el-col> </el-col>
</el-row> </el-row>
</div>
</template> </template>
<script> <script>
@ -57,7 +56,7 @@ export default {
getDataList() { getDataList() {
this.urlOptions.occupancyURL(this.bId).then((response) => { this.urlOptions.occupancyURL(this.bId).then((response) => {
this.occupancyData = response.data.toFixed(2); this.occupancyData = response.data.toFixed(2);
const num = mul(this.occupancyData,100) const num = mul(this.occupancyData, 100);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.gaugeChart.initChart(num); this.$refs.gaugeChart.initChart(num);
}); });
@ -72,3 +71,16 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
.chart-container {
min-height: calc(100vh - 120px - 8px);
background-color: #f0f2f7;
}
.chart-card {
min-height: calc(100vh - 120px - 8px);
background-color: #fff;
border-radius: 8px;
padding: 16px;
}
</style>

View File

@ -194,9 +194,6 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: 'button', type: 'button',
btnName: '重置', btnName: '重置',

View File

@ -202,9 +202,6 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: 'button', type: 'button',
btnName: '重置', btnName: '重置',

View File

@ -78,9 +78,6 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: 'button', type: 'button',
btnName: '重置', btnName: '重置',

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2023-08-21 14:26:23
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-10 16:05:52 * @LastEditTime: 2023-10-12 15:12:25
* @Description: * @Description:
--> -->
<template> <template>
@ -12,35 +12,39 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="tips"> <div class="tips">
<el-tag effect="dark" color="#7362F3" style="border:none"></el-tag> <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="#16DC09" style="border: none"></el-tag>
<el-tag effect="dark" color="#FFA08F" style="border:none"></el-tag> <el-tag effect="dark" color="#FFA08F" style="border: none"></el-tag>
</div> </div>
<div class="mainbody"> <div class="mainbody">
<div v-for="a in listQuery.total" :key="a"> <div v-for="i in listQuery.total" :key="i">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="a in wareData.one" v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
:key="a.id+a.warehouseStorehouseCode" :key="a.id + a.warehouseStorehouseCode"
style="background: #FFF8E8; float: left"> style="background: #fff8e8; float: left">
<div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
:style="{background: bgColor[a.warehouseStorehouseState]}" /> :style="{
background: bgColor[a.warehouseStorehouseState],
}" />
{{ a.warehouseStorehouseName }} {{ a.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="b in wareData.two" v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
:key="b.id+b.warehouseStorehouseCode" :key="b.id + b.warehouseStorehouseCode"
style="background: #FFF8E8; float: left"> style="background: #fff8e8; float: left">
<div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
:style="{background: bgColor[b.warehouseStorehouseState]}" /> :style="{
background: bgColor[b.warehouseStorehouseState],
}" />
{{ b.warehouseStorehouseName }} {{ b.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
@ -49,27 +53,31 @@
<el-divider class="divider"></el-divider> <el-divider class="divider"></el-divider>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="c in wareData.there" v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
:key="c.id+c.warehouseStorehouseCode" :key="c.id + c.warehouseStorehouseCode"
style="background: #FFF8E8; float: left"> style="background: #fff8e8; float: left">
<div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
:style="{background: bgColor[c.warehouseStorehouseState]}" /> :style="{
background: bgColor[c.warehouseStorehouseState],
}" />
{{ c.warehouseStorehouseName }} {{ c.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="d in wareData.four" v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
:key="d.id+d.warehouseStorehouseCode" :key="d.id + d.warehouseStorehouseCode"
style="background: #FFF8E8; float: left"> style="background: #fff8e8; float: left">
<div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
:style="{background: bgColor[d.warehouseStorehouseState]}" /> :style="{
background: bgColor[d.warehouseStorehouseState],
}" />
{{ d.warehouseStorehouseName }} {{ d.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
@ -82,7 +90,10 @@
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { getWarehouseStorehouseList,exportWarehouseStorehouseExcel } from '@/api/asrs/warehouseStorehouse'; import {
getWarehouseStorehouseList,
exportWarehouseStorehouseExcel,
} from '@/api/asrs/warehouseStorehouse';
export default { export default {
mixins: [basicPage], mixins: [basicPage],
@ -93,6 +104,7 @@ export default {
exportURL: exportWarehouseStorehouseExcel, exportURL: exportWarehouseStorehouseExcel,
}, },
listQuery: { listQuery: {
stacker: 1,
wareLayer: 1, wareLayer: 1,
total: 0, total: 0,
}, },
@ -102,8 +114,22 @@ export default {
there: [], there: [],
four: [], four: [],
}, },
bgColor:['#16DC09','#FFA08F','#7362F3'], bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
formConfig: [ formConfig: [
{
type: 'select',
label: '选择堆垛机',
selectOptions: [
{ id: 1, name: '一号堆垛机' },
{ id: 2, name: '二号堆垛机' },
{ id: 3, name: '三号堆垛机' },
{ id: 4, name: '四号堆垛机' },
],
param: 'stacker',
filterable: true,
defaultSelect: 1,
clearable: false,
},
{ {
type: 'select', type: 'select',
label: '选择层', label: '选择层',
@ -135,18 +161,17 @@ export default {
}; };
}, },
components: {}, components: {},
created() { created() {},
},
methods: { methods: {
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
this.wareData= { (this.wareData = {
one: [], one: [],
two: [], two: [],
there: [], there: [],
four: [], four: [],
}, }),
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
response.data.forEach((a, b) => { response.data.forEach((a, b) => {
if (b % 4 === 0) { if (b % 4 === 0) {
@ -159,7 +184,7 @@ export default {
this.wareData.four.push(a); this.wareData.four.push(a);
} }
}); });
this.listQuery.total = Math.ceil(response.data.length / 120); this.listQuery.total = Math.ceil(response.data.length / 40);
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },
@ -167,6 +192,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.wareLayer = val.value; this.listQuery.wareLayer = val.value;
this.listQuery.stacker = val.stacker;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
@ -183,32 +209,45 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody { .mainbody {
display: flex; display: flex;
gap: 50px; gap: 70px;
flex-direction: column; flex-direction: column;
} }
.flex-warp {
flex-wrap: nowrap;
}
.dashboard-layout-item { .dashboard-layout-item {
width: 80px; width: 100px;
text-align: center; text-align: center;
height: 32px; height: 32px;
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8); box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
border-radius: 2px 4px 4px 2px; border-radius: 2px 4px 4px 2px;
margin-bottom: 8px; margin: 0 3px 8px 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative;
.dashboard-layout-item-cricle { .dashboard-layout-item-cricle {
display: inline-block; display: inline-block;
width: 12px; width: 12px;
height: 12px; height: 12px;
border-radius: 6px; border-radius: 6px;
margin-right: 6px; position: absolute;
top: 10px;
left: 5px;
} }
&:hover { &:hover {
cursor: pointer; cursor: pointer;
z-index: 10;
transform: scale(1.3) translateZ(0); transform: scale(1.3) translateZ(0);
} }
&:nth-child(2n) { &:nth-child(2n) {
margin-right: 24px; margin-right: 30px;
}
&:first-child {
margin-left: 50px;
}
&:last-child {
margin-right: 30px;
} }
} }
.el-divider--horizontal { .el-divider--horizontal {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2023-08-21 14:26:23
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-10 15:41:01 * @LastEditTime: 2023-10-12 15:11:54
* @Description: * @Description:
--> -->
<template> <template>
@ -12,35 +12,39 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="tips"> <div class="tips">
<el-tag type="info" color="#D8E5FF"></el-tag> <el-tag effect="dark" color="#7362F3" style="border: none"></el-tag>
<el-tag type="info" color="#FFF8E8"></el-tag> <el-tag effect="dark" color="#16DC09" style="border: none"></el-tag>
<el-tag type="info" color="#F6F6F6"></el-tag> <el-tag effect="dark" color="#FFA08F" style="border: none"></el-tag>
</div> </div>
<div class="mainbody"> <div class="mainbody">
<div v-for="a in listQuery.total" :key="a"> <div v-for="i in listQuery.total" :key="i">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="a in wareData.one" v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
:key="a.id+a.warehouseStorehouseCode" :key="a.id + a.warehouseStorehouseCode"
:style="{background: bgColor[a.warehouseStorehouseState], float: 'left'}"> style="background: #fff8e8; float: left">
<!-- <div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> --> :style="{
background: bgColor[a.warehouseStorehouseState],
}" />
{{ a.warehouseStorehouseName }} {{ a.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="b in wareData.two" v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
:key="b.id+b.warehouseStorehouseCode" :key="b.id + b.warehouseStorehouseCode"
:style="{background: bgColor[b.warehouseStorehouseState], float: 'left'}"> style="background: #fff8e8; float: left">
<!-- <div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> --> :style="{
background: bgColor[b.warehouseStorehouseState],
}" />
{{ b.warehouseStorehouseName }} {{ b.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
@ -49,27 +53,31 @@
<el-divider class="divider"></el-divider> <el-divider class="divider"></el-divider>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="c in wareData.there" v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
:key="c.id+c.warehouseStorehouseCode" :key="c.id + c.warehouseStorehouseCode"
:style="{background: bgColor[c.warehouseStorehouseState], float: 'left'}"> style="background: #fff8e8; float: left">
<!-- <div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> --> :style="{
background: bgColor[c.warehouseStorehouseState],
}" />
{{ c.warehouseStorehouseName }} {{ c.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
<el-row> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="d in wareData.four" v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
:key="d.id+d.warehouseStorehouseCode" :key="d.id + d.warehouseStorehouseCode"
:style="{background: bgColor[d.warehouseStorehouseState], float: 'left'}"> style="background: #fff8e8; float: left">
<!-- <div <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> --> :style="{
background: bgColor[d.warehouseStorehouseState],
}" />
{{ d.warehouseStorehouseName }} {{ d.warehouseStorehouseName }}
</div> </div>
</el-row> </el-row>
@ -82,7 +90,10 @@
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { getWarehouseStorehouseList,exportWarehouseStorehouseExcel } from '@/api/asrs/warehouseStorehouse'; import {
getWarehouseStorehouseList,
exportWarehouseStorehouseExcel,
} from '@/api/asrs/warehouseStorehouse';
export default { export default {
mixins: [basicPage], mixins: [basicPage],
@ -93,6 +104,7 @@ export default {
exportURL: exportWarehouseStorehouseExcel, exportURL: exportWarehouseStorehouseExcel,
}, },
listQuery: { listQuery: {
//stacker: 1,
wareLayer: 1, wareLayer: 1,
total: 0, total: 0,
}, },
@ -102,8 +114,22 @@ export default {
there: [], there: [],
four: [], four: [],
}, },
bgColor:['#FFF8E8','#F6F6F6','#D8E5FF'], bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
formConfig: [ formConfig: [
{
type: 'select',
label: '选择堆垛机',
selectOptions: [
{ id: 1, name: '一号堆垛机' },
{ id: 2, name: '二号堆垛机' },
{ id: 3, name: '三号堆垛机' },
{ id: 4, name: '四号堆垛机' },
],
param: 'stacker',
filterable: true,
defaultSelect: 1,
clearable: false,
},
{ {
type: 'select', type: 'select',
label: '选择层', label: '选择层',
@ -142,12 +168,12 @@ export default {
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
this.wareData= { (this.wareData = {
one: [], one: [],
two: [], two: [],
there: [], there: [],
four: [], four: [],
}, }),
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
response.data.forEach((a, b) => { response.data.forEach((a, b) => {
if (b % 4 === 0) { if (b % 4 === 0) {
@ -160,7 +186,7 @@ export default {
this.wareData.four.push(a); this.wareData.four.push(a);
} }
}); });
this.listQuery.total = Math.ceil(response.data.length / 120); this.listQuery.total = Math.ceil(response.data.length / 40);
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },
@ -168,6 +194,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.wareLayer = val.value; this.listQuery.wareLayer = val.value;
this.listQuery.stacker = val.stacker;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
@ -184,30 +211,46 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody { .mainbody {
display: flex; display: flex;
gap: 50px; gap: 70px;
flex-direction: column; flex-direction: column;
} }
.flex-warp {
flex-wrap: nowrap;
}
.dashboard-layout-item { .dashboard-layout-item {
width: 3.3%; width: 100px;
text-align: center; text-align: center;
height: 40px; height: 32px;
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8); box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
border-radius: 2px 4px 4px 2px; border-radius: 2px 4px 4px 2px;
margin-bottom: 4px; margin: 0 3px 8px 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative;
.dashboard-layout-item-cricle { .dashboard-layout-item-cricle {
display: inline-block; display: inline-block;
width: 12px; width: 12px;
height: 12px; height: 12px;
border-radius: 6px; border-radius: 6px;
margin-right: 6px; position: absolute;
top: 10px;
left: 5px;
} }
&:hover { &:hover {
cursor: pointer; cursor: pointer;
z-index: 10;
transform: scale(1.3) translateZ(0); transform: scale(1.3) translateZ(0);
} }
&:nth-child(2n) {
margin-right: 30px;
}
&:first-child {
margin-left: 50px;
}
&:last-child {
margin-right: 30px;
}
} }
.el-divider--horizontal { .el-divider--horizontal {
margin: 10px 0; margin: 10px 0;

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-08 10:34:29 * @LastEditTime: 2023-10-11 16:30:40
* @Description: * @Description:
--> -->
<template> <template>
@ -11,6 +11,7 @@
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
size="medium" size="medium"
style="margin-right: 50px;"
label-width="120px"> label-width="120px">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="仓库" prop="warehouseName"> <el-form-item label="仓库" prop="warehouseName">
@ -68,18 +69,28 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否启用" prop="deactivate"> <el-form-item label="是否启用" prop="deactivate">
<el-switch <el-select
v-model="dataForm.deactivate" v-model="dataForm.deactivate"
:active-value="1" placeholder="请选择">
:inactive-value="0"></el-switch> <el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否缓存库位" prop="cacheLocation"> <el-form-item label="是否缓存库位" prop="cacheLocation">
<el-switch <el-select
v-model="dataForm.cacheLocation" v-model="dataForm.cacheLocation"
:active-value="1" placeholder="请选择">
:inactive-value="0"></el-switch> <el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -130,10 +141,20 @@ export default {
wareRow: undefined, wareRow: undefined,
wareColumn: undefined, wareColumn: undefined,
wareLayer: undefined, wareLayer: undefined,
deactivate: false, deactivate: 1,
cacheLocation: false, cacheLocation: 1,
notes: undefined, notes: undefined,
}, },
options1: [
{
value: 0,
label: '否',
},
{
value: 1,
label: '是',
},
],
dataRule: { dataRule: {
warehouseInfo: [ warehouseInfo: [
{ {

View File

@ -83,7 +83,7 @@ const tableProps = [
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否用', label: '是否用',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
width: 100, width: 100,
}, },

View File

@ -83,7 +83,7 @@ const tableProps = [
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否用', label: '是否用',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
width: 100, width: 100,
}, },

View File

@ -30,7 +30,8 @@
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:label="item.goodSpecificationName" :label="item.goodSpecificationName"
:value="item" /> :value="item"
:disabled="!item.deactivate" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -59,17 +59,17 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item <el-form-item
label="选择入库位置" label="选择起点位置"
prop="inWarehouseStorehouseName"> prop="inWarehouseStorehouseName">
<el-select <el-select
v-model="dataForm.inWarehouseStorehouseName" v-model="dataForm.inWarehouseStorehouseName"
style="width: 100%" style="width: 100%"
@change="$forceUpdate()" @change="$forceUpdate()"
placeholder="请选择入库位置"> placeholder="请选择起点位置">
<el-option <el-option
v-for="item in potArr" v-for="item in potArr"
:key="item.id" :key="item.id"
:label="item.warehouseStorehouseName" :label="item.lineEdgeLibraryCode"
:value="item.id" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -130,7 +130,7 @@ import {
getWarehouseStorehouseGoodsSpecificationPage, getWarehouseStorehouseGoodsSpecificationPage,
deleteWarehouseStorehouseGoodsSpecification, deleteWarehouseStorehouseGoodsSpecification,
} from '@/api/asrs/warehouseStorehouseGoodsSpecification'; } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import { getWarehouseStorehouseList } from '@/api/asrs/warehouseStorehouse'; import { getLineList } from '@/api/asrs/warehouseStorehouse';
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../mixins/inputArea'; import inputArea from '../mixins/inputArea';
import selectQuality from '../mixins/selectQuality'; import selectQuality from '../mixins/selectQuality';
@ -244,7 +244,7 @@ export default {
this.dataForm = val; this.dataForm = val;
this.initData(); this.initData();
this.visible = true; this.visible = true;
getWarehouseStorehouseList().then((response) => { getLineList().then((response) => {
this.potArr = response.data; this.potArr = response.data;
}); });
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -30,7 +30,8 @@
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:label="item.goodSpecificationName" :label="item.goodSpecificationName"
:value="item" /> :value="item"
:disabled="!item.deactivate" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -43,7 +43,10 @@
<span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span> <span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseStorehouseState" label="库位状态" width="100"> <el-table-column
prop="warehouseStorehouseState"
label="库位状态"
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{ {{
@ -57,6 +60,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="scope.row.deactivate === 1">
<el-button <el-button
size="mini" size="mini"
v-if="scope.row.warehouseStorehouseState === 0" v-if="scope.row.warehouseStorehouseState === 0"
@ -81,6 +85,16 @@
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
移库 移库
</el-button> </el-button>
</span>
<span v-else>
<el-button
size="mini"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'restore' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
启用库位
</el-button>
</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -115,7 +129,10 @@ import product from '../product-mini';
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import { getWarehouseStorehousePage } from '@/api/asrs/warehouseStorehouse'; import {
getWarehouseStorehousePage,
updateWarehouseStorehouse,
} from '@/api/asrs/warehouseStorehouse';
const processArr = [ const processArr = [
{ {
@ -238,7 +255,7 @@ export default {
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
warehouseId:'1696803324030865409', warehouseId: '1696803324030865409',
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
@ -276,6 +293,15 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data.id); this.$refs.drawerRef.init(val.data.id);
}); });
} else if (val.type === 'restore') {
const dataForm = {
id: val.data.id.id,
deactivate: 1,
};
updateWarehouseStorehouse(dataForm).then((response) => {
this.$modal.msgSuccess('启用成功');
this.getDataList();
});
} else { } else {
console.log(11); console.log(11);
} }

View File

@ -43,7 +43,10 @@
<span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span> <span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseStorehouseState" label="库位状态" width="100"> <el-table-column
prop="warehouseStorehouseState"
label="库位状态"
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{ {{
@ -57,6 +60,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="scope.row.deactivate === 1">
<el-button <el-button
size="mini" size="mini"
v-if="scope.row.warehouseStorehouseState === 0" v-if="scope.row.warehouseStorehouseState === 0"
@ -81,6 +85,16 @@
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
移库 移库
</el-button> </el-button>
</span>
<span v-else>
<el-button
size="mini"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'restore' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
启用库位
</el-button>
</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -115,7 +129,10 @@ import product from '../product-mini';
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import { getWarehouseStorehousePage } from '@/api/asrs/warehouseStorehouse'; import {
getWarehouseStorehousePage,
updateWarehouseStorehouse,
} from '@/api/asrs/warehouseStorehouse';
const processArr = [ const processArr = [
{ {
@ -278,6 +295,15 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data.id); this.$refs.drawerRef.init(val.data.id);
}); });
} else if (val.type === 'restore') {
const dataForm = {
id: val.data.id.id,
deactivate: 1,
};
updateWarehouseStorehouse(dataForm).then((response) => {
this.$modal.msgSuccess('启用成功');
this.getDataList();
});
} else { } else {
console.log(11); console.log(11);
} }

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-09 15:49:08 * @LastEditTime: 2023-10-11 13:45:45
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,9 @@
ref="dataForm" ref="dataForm"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="150px"> label-width="150px">
<el-form-item :label="type?'选择移库位置':'选择出库到货位置'" prop="targetId"> <el-form-item
:label="type ? '选择移库位置' : '选择出库到货位置'"
prop="targetId">
<el-select <el-select
v-model="dataForm.targetId" v-model="dataForm.targetId"
style="width: 100%" style="width: 100%"
@ -29,14 +31,17 @@
<script> <script>
import basicAdd from '../mixins/basic-add'; import basicAdd from '../mixins/basic-add';
import { getWarehouseStorehouseList,moveStorehouse } from "@/api/asrs/warehouseStorehouse"; import {
getWarehouseStorehouseList,
moveStorehouse,
getLineList,
} from '@/api/asrs/warehouseStorehouse';
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
return { return {
urlOptions: { urlOptions: {},
},
dataForm: { dataForm: {
sourceId: undefined, sourceId: undefined,
targetId: undefined, targetId: undefined,
@ -44,33 +49,46 @@ export default {
potArr: [], potArr: [],
type: 0, type: 0,
dataRule: { dataRule: {
targetId: [{ required: true, message: "位置不能为空", trigger: "blur" }], targetId: [
} { required: true, message: '位置不能为空', trigger: 'blur' },
],
},
}; };
}, },
methods: { methods: {
init(id,type) { init(id, type) {
this.dataForm.sourceId = id || ""; this.dataForm.sourceId = id || '';
this.type = type this.type = type;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs['dataForm'].resetFields();
if (this.type) {
getWarehouseStorehouseList().then((response) => { getWarehouseStorehouseList().then((response) => {
this.potArr = response.data; this.potArr = response.data;
}); });
return;
}
getLineList().then((response) => {
this.potArr = response.data;
});
}); });
}, },
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (!valid) { if (!valid) {
return false; return false;
} }
moveStorehouse(this.dataForm.sourceId,this.dataForm.targetId).then(response => { if (this.type) {
this.$modal.msgSuccess("修改成功"); moveStorehouse(this.dataForm.sourceId, this.dataForm.targetId).then(
(response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false; this.visible = false;
this.$emit("refreshDataList"); this.$emit('refreshDataList');
}); }
);
return;
}
}); });
}, },
}, },

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

View File

@ -18,7 +18,7 @@ export default {
}, },
title: { title: {
type: String, type: String,
default: 'chart', default: '',
}, },
width: { width: {
type: String, type: String,
@ -68,15 +68,15 @@ export default {
this.chart.setOption({ this.chart.setOption({
title: { title: {
text: '{space|}{tip|}{space|}{value|' + this.title + '}', text: this.title?'{space|}{tip|}{space|}{value|' + this.title + '}':'',
left: '0%', left: '0%',
top: '0%', top: '0%',
textStyle: { textStyle: {
rich: { rich: {
tip: { tip: {
width: 4, width: 4,
height: 16, height: 18,
backgroundColor: '#1FC495', backgroundColor: '#0B58FF',
marginRight: 6, marginRight: 6,
}, },
space: { space: {
@ -85,10 +85,12 @@ export default {
value: { value: {
fontSize: 16, fontSize: 16,
fontWeight: 'bold', fontWeight: 'bold',
color: 'black',
}, },
}, },
}, },
}, },
color: ['#288AFF', '#8EF0AB', '#FFDC94',],
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
@ -110,6 +112,14 @@ export default {
axisTick: { axisTick: {
alignWithLabel: true, alignWithLabel: true,
}, },
axisLabel: {
color: '#979797',
},
axisLine: {
lineStyle: {
color: '#979797',
},
}
}, },
], ],
yAxis: [ yAxis: [
@ -118,14 +128,20 @@ export default {
axisTick: { axisTick: {
show: false, show: false,
}, },
splitArea: {
show: false,
},
axisLabel: {
color: '#979797',
},
}, },
], ],
series: [ series: [
{ {
name: 'pageA', name: '数量',
type: 'bar', type: 'bar',
stack: 'vistors', stack: 'vistors',
barWidth: '60%', barWidth: '20',
data: valueArr, data: valueArr,
animationDuration, animationDuration,
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-06-01 10:47:42 * @Date: 2023-06-01 10:47:42
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-08 15:48:49 * @LastEditTime: 2023-10-12 16:31:03
* @Description: * @Description:
--> -->
<template> <template>
@ -60,8 +60,8 @@ export default {
rich: { rich: {
tip: { tip: {
width: 4, width: 4,
height: 16, height: 18,
backgroundColor: '#1FC495', backgroundColor: '#0B58FF',
marginRight: 6, marginRight: 6,
}, },
space: { space: {
@ -70,6 +70,7 @@ export default {
value: { value: {
fontSize: 16, fontSize: 16,
fontWeight: 'bold', fontWeight: 'bold',
color: '#000000',
}, },
}, },
}, },
@ -81,23 +82,52 @@ export default {
endAngle: 0, endAngle: 0,
min: 0, min: 0,
max: 100, max: 100,
splitNumber: 5, splitNumber: 4,
itemStyle: { itemStyle: {
color: '#47E282', color: '#f37215', //
shadowColor: 'rgba(0,138,255,0.45)', shadowColor: 'rgba(0,138,255,0.45)', //
shadowBlur: 10, shadowBlur: 10, //
shadowOffsetX: 2, shadowOffsetX: 2, //
shadowOffsetY: 2, shadowOffsetY: 2, //
},
progress: {
show: true, //
roundCap: true, //
width: 18, //
itemStyle: {
color: {
type: 'linear',
x: 1,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#58D9F9', // 0%
},
{
offset: 1,
color: '#288AFF', // 100%
},
],
global: false, // false
},
},
}, },
pointer: { pointer: {
icon: 'path://M2090.36389,615.30999 L2090.36389,615.30999 C2091.48372,615.30999 2092.40383,616.194028 2092.44859,617.312956 L2096.90698,728.755929 C2097.05155,732.369577 2094.2393,735.416212 2090.62566,735.56078 C2090.53845,735.564269 2090.45117,735.566014 2090.36389,735.566014 L2090.36389,735.566014 C2086.74736,735.566014 2083.81557,732.63423 2083.81557,729.017692 C2083.81557,728.930412 2083.81732,728.84314 2083.82081,728.755929 L2088.2792,617.312956 C2088.32396,616.194028 2089.24407,615.30999 2090.36389,615.30999 Z',
length: '80%',
itemStyle: { itemStyle: {
color: 'auto', color: '#288AFF',
}, },
width: 26,
}, },
axisLine: { axisLine: {
roundCap: true, roundCap: true,
lineStyle: { lineStyle: {
width: 16, width: 18,
color: [[1, '#E6EBF8']]
}, },
}, },
axisTick: { axisTick: {
@ -120,6 +150,9 @@ export default {
distance: -55, distance: -55,
color: '#999', color: '#999',
fontSize: 15, fontSize: 15,
formatter: function (value) {
return value + '%';
},
}, },
title: { title: {
show: false, show: false,
@ -132,20 +165,20 @@ export default {
offsetCenter: [0, '20%'], offsetCenter: [0, '20%'],
valueAnimation: true, valueAnimation: true,
formatter: function (value) { formatter: function (value) {
return '{side| }{value|' + value + '}{unit|%}{side1| }'; return '{side| }{value|' + value + '%}{side1| }';
}, },
rich: { rich: {
value: { value: {
fontSize: 18, fontSize: 24,
color: '#1FC495', color: '#0B58FF',
padding: [0, 0, 0, 16], padding: [0, 20, 0, 20],
}, },
side: { side: {
width: 35, width: 35,
height: 5, height: 5,
backgroundColor: '#fff', backgroundColor: '#fff',
opacity: 0.5, opacity: 0.5,
shadowColor: '#43E084', shadowColor: '#bcdbff',
shadowOffsetX: 10, shadowOffsetX: 10,
}, },
side1: { side1: {
@ -153,14 +186,9 @@ export default {
height: 5, height: 5,
backgroundColor: '#fff', backgroundColor: '#fff',
opacity: 0.5, opacity: 0.5,
shadowColor: '#43E084', shadowColor: '#bcdbff',
shadowOffsetX: -10, shadowOffsetX: -10,
}, },
unit: {
fontSize: 12,
color: '#999',
padding: [0, 16, 0, 0],
},
}, },
}, },
data: [ data: [

View File

@ -26,7 +26,7 @@ export default {
}, },
height: { height: {
type: String, type: String,
default: '300px', default: '250px',
}, },
pieData: { pieData: {
type: Array, type: Array,
@ -60,7 +60,7 @@ export default {
zlevel: 2, // zlevel: 2, //
text: '总数', text: '总数',
subtext: this.totalNumber, subtext: this.totalNumber,
top: '38%', // top: '42%', //
left: '50%', // left: '50%', //
textAlign: 'center', // textAlign: 'center', //
textStyle: { textStyle: {
@ -73,43 +73,49 @@ export default {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
show: true, // show: true, //
formatter: '产品: {b}<br/>数量: {c}<br/>占比: {d}%',
}, },
// legend: {
// orient: 'vartical',
// top: 'center',
// left: 'right',
// icon: 'circle',
// itemGap: 16, //
// textStyle: {
// //
// fontSize: 24, // legend
// color: '#828282',
// rich: {
// oneone: {
// width: 50,
// color: '#000000',
// fontSize: 12,
// fontWeight: 'bolder',
// },
// twotwo: {
// width: 35,
// color: '#333',
// fontSize: 12,
// },
// threethree: {
// width: 20,
// color: '#959595',
// fontSize: 12,
// },
// },
// },
// formatter: (name) => {
// var target = this.pieData.find((item) => {
// return item.name === name;
// }).number;
// var v = ((target / this.totalNumber) * 100).toFixed(2);
// return `{oneone|${name}} {twotwo|${target}} {threethree|${v}%}`;
// },
// },
legend: { legend: {
orient: 'vartical', bottom: '0%',
top: 'center', left: 'center',
left: 'right',
icon: 'circle',
itemGap: 16, //
textStyle: {
//
fontSize: 24, // legend
color: '#828282',
rich: {
oneone: {
width: 50,
color: '#000000',
fontSize: 12,
fontWeight: 'bolder',
},
twotwo: {
width: 35,
color: '#333',
fontSize: 12,
},
threethree: {
width: 20,
color: '#959595',
fontSize: 12,
},
},
},
formatter: (name) => {
var target = this.pieData.find((item) => {
return item.name === name;
}).number;
var v = ((target / this.totalNumber) * 100).toFixed(2);
return `{oneone|${name}} {twotwo|${target}个} {threethree|${v}%}`;
},
}, },
grid: { grid: {
top: 40, top: 40,
@ -133,7 +139,7 @@ export default {
normal: { normal: {
show: true, show: true,
position: 'outside', // inside position: 'outside', // inside
formatter: '{d}%', // {a}{b}{c}{d}{d}value formatter: '{b}', // {a}{b}{c}{d}{d}value
textStyle: { textStyle: {
// 线 // 线
align: 'right', align: 'right',
@ -153,7 +159,9 @@ export default {
}, },
}, },
labelLine: { labelLine: {
show: false, show: true,
length: 17,
length2: 57,
}, },
data: this.pieData, data: this.pieData,
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-09 16:03:51 * @LastEditTime: 2023-10-11 16:31:22
* @Description: * @Description:
--> -->
<template> <template>
@ -10,6 +10,8 @@
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
size="medium"
style="margin-right: 50px;"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="120px"> label-width="120px">
<el-row :gutter="20"> <el-row :gutter="20">
@ -45,10 +47,15 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否启用" prop="deactivate"> <el-form-item label="是否启用" prop="deactivate">
<el-switch <el-select
v-model="dataForm.deactivate" v-model="dataForm.deactivate"
:active-value="1" placeholder="请选择">
:inactive-value="0"></el-switch> <el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -81,7 +88,7 @@ export default {
goodSpecificationCode: undefined, goodSpecificationCode: undefined,
goodSpecificationName: undefined, goodSpecificationName: undefined,
specification: undefined, specification: undefined,
deactivate: undefined, deactivate: 1,
}, },
options: [ options: [
{ {
@ -93,6 +100,16 @@ export default {
label: '箱', label: '箱',
}, },
], ],
options1: [
{
value: 0,
label: '否',
},
{
value: 1,
label: '是',
},
],
dataRule: { dataRule: {
goodSpecificationCode: [ goodSpecificationCode: [
{ required: true, message: '产品编码不能为空', trigger: 'blur' }, { required: true, message: '产品编码不能为空', trigger: 'blur' },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-26 15:07:27 * @LastEditTime: 2023-10-11 16:40:00
* @Description: * @Description:
--> -->
<template> <template>
@ -14,10 +14,14 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="23"> <el-col :span="23">
<barChart <barChart
title="柱状图分析"
ref="barChart" ref="barChart"
height="500px" height="500px"
v-if="tableData.length"
:histogram="tableData" /> :histogram="tableData" />
<el-empty
v-else
:image-size="300"
:image="require('../../../assets/images/empty.png')" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -85,9 +89,11 @@ export default {
if (this.listQuery.goodName) { if (this.listQuery.goodName) {
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data; this.tableData = response.data;
if (this.tableData.length) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.barChart.initChart(); this.$refs.barChart.initChart();
}); });
}
}); });
} }
}, },

View File

@ -2,27 +2,26 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-08 15:47:56 * @LastEditTime: 2023-10-13 14:16:32
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <el-row :gutter="10" class="chart-container">
<el-row :gutter="20"> <el-col :span="8">
<el-col :span="10"> <div class="chart-card">
<gaugeChart <gaugeChart ref="gaugeChart" title="仓库占用率" height="450px" />
ref="gaugeChart" </div>
title="仓库占用率"
height="500px"/>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="16">
<div class="chart-card">
<barChart <barChart
ref="barChart" ref="barChart"
height="500px" height="500px"
title="库存总览" title="库存总览"
:all-data="allData" /> :all-data="allData" />
</div>
</el-col> </el-col>
</el-row> </el-row>
</div>
</template> </template>
<script> <script>
@ -33,7 +32,7 @@ import gaugeChart from '../chart/GaugeChart.vue';
import { import {
getOccupancy, getOccupancy,
getInventoryOverview, getInventoryOverview,
} from "@/api/fpw/finishProductWarehouse"; } from '@/api/fpw/finishProductWarehouse';
export default { export default {
mixins: [basicPage], mixins: [basicPage],
@ -57,7 +56,7 @@ export default {
getDataList() { getDataList() {
this.urlOptions.occupancyURL(this.aId).then((response) => { this.urlOptions.occupancyURL(this.aId).then((response) => {
this.occupancyData = response.data.toFixed(2); this.occupancyData = response.data.toFixed(2);
const num = mul(this.occupancyData,100) const num = mul(this.occupancyData, 100);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.gaugeChart.initChart(num); this.$refs.gaugeChart.initChart(num);
}); });
@ -72,3 +71,16 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
.chart-container {
min-height: calc(100vh - 120px - 8px);
background-color: #f0f2f7;
}
.chart-card {
min-height: calc(100vh - 120px - 8px);
background-color: #fff;
padding: 16px;
border-radius: 8px;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-27 10:52:07 * @LastEditTime: 2023-10-13 14:45:19
* @Description: * @Description:
--> -->
<template> <template>
@ -14,13 +14,15 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="23"> <el-col :span="23">
<pieChart <pieChart
title="饼状图分析"
ref="pieChart" ref="pieChart"
height="500px" height="600px"
v-if="tableData.totalNumber" v-if="tableData.totalNumber"
:total-number="tableData.totalNumber" :total-number="tableData.totalNumber"
:pie-data="tableData.list" /> :pie-data="tableData.list" />
<el-empty v-else></el-empty> <el-empty
v-else
:image-size="300"
:image="require('../../../assets/images/empty.png')" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 15:20:56 * @LastEditTime: 2023-10-13 15:10:45
* @Description: * @Description:
--> -->
<template> <template>
@ -11,6 +11,7 @@
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
size="medium" size="medium"
style="margin-right: 50px;"
label-width="120px"> label-width="120px">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="finishProductName"> <el-form-item label="库位名称" prop="finishProductName">
@ -32,10 +33,15 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否启用" prop="deactivate"> <el-form-item label="是否启用" prop="deactivate">
<el-switch <el-select
v-model="dataForm.deactivate" v-model="dataForm.deactivate"
:active-value="1" placeholder="请选择">
:inactive-value="0"></el-switch> <el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -75,9 +81,20 @@ export default {
id: undefined, id: undefined,
finishProductName: undefined, finishProductName: undefined,
finishProductCode: undefined, finishProductCode: undefined,
deactivate: false, deactivate: 1,
finishProductWarehouseState: 0,
remark: undefined, remark: undefined,
}, },
options1: [
{
value: 0,
label: '否',
},
{
value: 1,
label: '是',
},
],
dataRule: { dataRule: {
finishProductName: [ finishProductName: [
{ {

View File

@ -74,8 +74,8 @@
<div style="position: absolute; bottom: 24px; right: 24px"> <div style="position: absolute; bottom: 24px; right: 24px">
<el-button style="margin-right: 10px" @click="goback()">返回</el-button> <el-button style="margin-right: 10px" @click="goback()">返回</el-button>
<el-button type="primary" @click="dataFormSubmit()">保存</el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="isEdit">保存</el-button>
<el-button type="success" @click="inWare()">入库</el-button> <el-button type="primary" @click="inWare()" v-else>入库</el-button>
</div> </div>
<product-attr-add <product-attr-add
@ -153,6 +153,7 @@ export default {
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', addButtonShow: '新增',
isEdit: false,
dataForm: { dataForm: {
finishProductName: '', finishProductName: '',
finishProductCode: '', finishProductCode: '',
@ -178,8 +179,9 @@ export default {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val) { init(val,isEdit) {
this.dataForm = val; this.dataForm = val;
this.isEdit = isEdit
this.initData(); this.initData();
this.visible = true; this.visible = true;
@ -276,7 +278,7 @@ export default {
// //
if (this.dataForm.id) { if (this.dataForm.id) {
inFinishProductWarehouse(this.dataForm).then((response) => { inFinishProductWarehouse(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('入库成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');
}); });

View File

@ -29,7 +29,8 @@
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:label="item.goodSpecificationName" :label="item.goodSpecificationName"
:value="item" /> :value="item"
:disabled="!item.deactivate" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -41,6 +41,14 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="scope.row.deactivate === 1">
<el-button
size="mini"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'setList' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
编辑
</el-button>
<el-button <el-button
size="mini" size="mini"
v-if="scope.row.finishProductWarehouseState === 0" v-if="scope.row.finishProductWarehouseState === 0"
@ -51,9 +59,13 @@
</el-button> </el-button>
<el-popconfirm <el-popconfirm
@confirm="setShipment(scope.row.id)" @confirm="setShipment(scope.row.id)"
v-if="scope.row.finishProductWarehouseState === 1"
placement="top" placement="top"
:title="'你确定要把 <'+ scope.row.finishProductName +'> 库位出货吗?'"> :title="
'你确定要把 <' + scope.row.finishProductName + '> 库位出货吗?'
">
<el-button <el-button
style="margin-left: 10px"
slot="reference" slot="reference"
size="mini" size="mini"
v-if="scope.row.finishProductWarehouseState === 1" v-if="scope.row.finishProductWarehouseState === 1"
@ -62,6 +74,16 @@
出库 出库
</el-button> </el-button>
</el-popconfirm> </el-popconfirm>
</span>
<span v-else>
<el-button
size="mini"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'restore' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
启用库位
</el-button>
</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -84,7 +106,11 @@ import product from '../product-mini';
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import { getFinishProductWarehousePage,outFinishProductWarehouse } from '@/api/fpw/finishProductWarehouse'; import {
getFinishProductWarehousePage,
outFinishProductWarehouse,
updateFinishProductWarehouse,
} from '@/api/fpw/finishProductWarehouse';
const warehouseStorehouseState = [ const warehouseStorehouseState = [
{ {
@ -212,11 +238,24 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'out') { if (val.type === 'setList') {
this.drawerVisible = true;
this.$nextTick(() => {
this.$refs.drawerRef.init(val.data.id, true);
});
} else if (val.type === 'in') { } else if (val.type === 'in') {
this.drawerVisible = true; this.drawerVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data.id); this.$refs.drawerRef.init(val.data.id, false);
});
} else if (val.type === 'restore') {
const dataForm = {
id: val.data.id.id,
deactivate: 1,
};
updateFinishProductWarehouse(dataForm).then((response) => {
this.$modal.msgSuccess('启用成功');
this.getDataList();
}); });
} else { } else {
console.log(11); console.log(11);

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2023-08-21 14:26:23
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-10 10:39:41 * @LastEditTime: 2023-10-13 15:27:53
* @Description: * @Description:
--> -->
<template> <template>
@ -12,78 +12,36 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="tips"> <div class="tips">
<el-tag effect="dark"></el-tag> <el-tag effect="dark" color="#7362F3" style="border: none"></el-tag>
<el-tag type="success" effect="dark"></el-tag> <el-tag effect="dark" color="#16DC09" style="border: none"></el-tag>
<el-tag type="warning" effect="dark"></el-tag> <el-tag effect="dark" color="#FFA08F" style="border: none"></el-tag>
</div> </div>
<div class="mainbody"> <div class="mainbody">
<div v-for="i in listQuery.total" :key="i"> <div v-for="i in listQuery.total" :key="i" class="div-row">
<el-row> <el-row type="flex" class="flex-warp">
<el-col :span="24">
<el-row>
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="a in wareData.one" v-for="a in wareData.slice((i - 1) * 20, i * 20)"
:key="a.id+a.warehouseStorehouseCode" :key="a.id + a.finishProductCode"
:style="{background: bgColor[a.warehouseStorehouseState], float: 'left'}"> style="background: #fff8e8; float: left">
<!-- <div
class="dashboard-layout-item-cricle"
style="background: #16dc09" /> -->
{{ a.warehouseStorehouseCode }}
</div>
</el-row>
<el-row>
<div <div
class="dashboard-layout-item"
v-for="b in wareData.two"
:key="b.id+b.warehouseStorehouseCode"
:style="{background: bgColor[b.warehouseStorehouseState], float: 'left'}">
<!-- <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> --> :style="{
{{ b.warehouseStorehouseCode }} background: bgColor[a.finishProductWarehouseState],
}" />
{{ a.finishProductName }}
</div> </div>
</el-row> </el-row>
</el-col>
</el-row>
<el-divider class="divider"></el-divider>
<el-row>
<el-col :span="24">
<el-row>
<div
class="dashboard-layout-item"
v-for="c in wareData.there"
:key="c.id+c.warehouseStorehouseCode"
:style="{background: bgColor[c.warehouseStorehouseState], float: 'left'}">
<!-- <div
class="dashboard-layout-item-cricle"
style="background: #16dc09" /> -->
{{ c.warehouseStorehouseCode }}
</div>
</el-row>
<el-row>
<div
class="dashboard-layout-item"
v-for="d in wareData.four"
:key="d.id+d.warehouseStorehouseCode"
:style="{background: bgColor[d.warehouseStorehouseState], float: 'left'}">
<!-- <div
class="dashboard-layout-item-cricle"
style="background: #16dc09" /> -->
{{ d.warehouseStorehouseCode }}
</div>
</el-row>
</el-col>
</el-row>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import basicPage from '../mixins/basic-page'; import { getWarehouseStorehouseList,
import { getWarehouseStorehouseList exportFinishProductWarehouseExcel
} from "@/api/fpw/finishProductWarehouse"; } from "@/api/fpw/finishProductWarehouse";
import basicPage from '../mixins/basic-page';
export default { export default {
mixins: [basicPage], mixins: [basicPage],
@ -91,18 +49,14 @@ export default {
return { return {
urlOptions: { urlOptions: {
getDataListURL: getWarehouseStorehouseList, getDataListURL: getWarehouseStorehouseList,
exportURL: exportFinishProductWarehouseExcel,
}, },
listQuery: { listQuery: {
wareLayer: 1, wareLayer: 1,
total: 0, total: 0,
}, },
wareData: { wareData: [],
one: [], bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
two: [],
there: [],
four: [],
},
bgColor:['#37d97f','#ffbd02','#0b58ff'],
formConfig: [ formConfig: [
{ {
type: 'select', type: 'select',
@ -124,35 +78,31 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'button',
btnName: '下载',
name: 'export',
plain: true,
color: 'primary',
},
], ],
}; };
}, },
components: {}, components: {},
created() { created() {},
},
methods: { methods: {
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
this.wareData= { (this.wareData = {
one: [], one: [],
two: [], two: [],
there: [], there: [],
four: [], four: [],
}, }),
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
response.data.forEach((a, b) => { this.wareData = response.data
if (b % 4 === 0) { this.listQuery.total = Math.ceil(response.data.length / 20);
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; this.dataListLoading = false;
}); });
}, },
@ -162,6 +112,9 @@ export default {
this.listQuery.wareLayer = val.value; this.listQuery.wareLayer = val.value;
this.getDataList(); this.getDataList();
break; break;
case 'export':
this.handleExport(this.aId);
break;
default: default:
console.log(val); console.log(val);
} }
@ -173,41 +126,55 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody { .mainbody {
display: flex; display: flex;
gap: 50px; gap: 10px;
flex-direction: column; flex-direction: column;
} }
.flex-warp {
flex-wrap: nowrap;
}
.div-row{
&:nth-child(2n) {
margin-bottom: 30px;
}
}
.dashboard-layout-item { .dashboard-layout-item {
color: white; width: 60px;
width: 3.3%;
text-align: center; text-align: center;
height: 40px; height: 62px;
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8); box-shadow: 1px 1px 4px 1px rgba(166, 174, 190, 0.8);
border-radius: 2px 4px 4px 2px; border-radius: 4px;
margin-bottom: 4px; margin-bottom: 8px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative;
.dashboard-layout-item-cricle { .dashboard-layout-item-cricle {
display: inline-block; display: inline-block;
width: 12px; width: 12px;
height: 12px; height: 12px;
border-radius: 6px; border-radius: 6px;
margin-right: 6px; position: absolute;
top: 5px;
left: 5px;
} }
&:hover { &:hover {
cursor: pointer; cursor: pointer;
z-index: 10;
transform: scale(1.3) translateZ(0); transform: scale(1.3) translateZ(0);
} }
} &:nth-child(2n) {
.el-divider--horizontal { margin-right: 18px;
margin: 10px 0; }
} &:first-child {
.el-divider { margin-left: 30px;
background-color: black; }
&:last-child {
margin-right: 30px;
}
} }
.tips { .tips {
position: absolute; position: absolute;
top: 22px; top: 22px;
left: 370px; right: 120px;
} }
</style> </style>

View File

@ -249,7 +249,8 @@ export default {
// //
// console.log("", this.loginForm); // console.log("", this.loginForm);
this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => { this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(() => { console.log(this.redirect)
this.$router.push({ path: "/" }).catch(() => {
}); });
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;