添加看板跳转

master
夜笙歌 4 months ago
parent 453c590340
commit 36b4cf01ec

@ -1,46 +1,45 @@
import request from '@/utils/request1' import request from '@/utils/request'
import request1 from '@/utils/request2'
// 出入库详情 // 出入库详情
export function inAndOutInfo(query) { export function latestYearInOutStocks(query) {
return request({ return request({
url: '/FourthWmsBorder/inAndOutInfo', url: '/wms/FourthFloorWmsBoard/latestYearInOutStocks',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 原材料库存占比 // 原材料库存占比
export function stockPercentage(query) { export function getFourthFloorTotalProductStocks(query) {
return request({ return request({
url: '/FourthWmsBorder/stockPercentage', url: '/wms/FourthFloorWmsBoard/getFourthFloorTotalProductStocks',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 采购订单 // 采购订单
export function purchaseInfo(query) { export function getFourthFloorProductInOutstockInfo(query) {
return request({ return request({
url: '/FourthWmsBorder/purchaseInfo', url: '/wms/FourthFloorWmsBoard/getFourthFloorProductInOutstockInfo',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 生产订单物料需求 // 生产订单物料需求
export function bomInfo(query) { export function getFourthFloorPlateStockTotals(query) {
return request({ return request({
url: '/FourthWmsBorder/bomInfo', url: '/wms/FourthFloorWmsBoard/getFourthFloorPlateStockTotals',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 成品出入库 // 成品出入库
export function productInAndOutInfo(query) { export function getFourthFloorAccessoriesStockTotals(query) {
return request({ return request({
url: '/FourthWmsBorder/productInAndOutInfo', url: '/wms/FourthFloorWmsBoard/getFourthFloorAccessoriesStockTotals',
method: 'get', method: 'get',
params: query params: query
}) })

@ -4,6 +4,28 @@
<div class="data" id="data">{{ data }}</div> <div class="data" id="data">{{ data }}</div>
<div class="time" id="time">{{ time }}</div> <div class="time" id="time">{{ time }}</div>
<div class="date" id="date">{{ date }}</div> <div class="date" id="date">{{ date }}</div>
<div class="top">
<div class="select">
<el-dropdown @command="handleCommand">
<span class="el-dropdown-link">
下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="/board/firstFloorProduction">一楼生产</el-dropdown-item>
<el-dropdown-item command="/board/firstFloorWarehouse">一楼能源</el-dropdown-item>
<el-dropdown-item command="/board/secondFloorProduction">二楼生产</el-dropdown-item>
<el-dropdown-item command="/board/secondFloorWarehouse">二楼仓储</el-dropdown-item>
<el-dropdown-item command="/board/thirdFloorProduction">三楼生产</el-dropdown-item>
<el-dropdown-item command="/board/thirdFloorWarehouse">三楼仓储</el-dropdown-item>
<el-dropdown-item command="/board/fourthFloorProduction">四楼生产</el-dropdown-item>
<el-dropdown-item command="/board/fourthFloorWarehouse">四楼仓储</el-dropdown-item>
<el-dropdown-item command="/board/fifthFloorProduction">五楼生产</el-dropdown-item>
<el-dropdown-item command="/board/fifthFloorWarehouse">五楼仓储</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div> </div>
</template> </template>
@ -16,7 +38,8 @@ export default {
return { return {
data:'', data:'',
time: '', time: '',
date: '' date: '',
value: ''
} }
}, },
created() { created() {
@ -36,12 +59,41 @@ export default {
getDate() getDate()
getDateIntervalFun = setInterval(getDate, 1000) getDateIntervalFun = setInterval(getDate, 1000)
}, },
methods:{
handleCommand(e){
this.$router.push(e)
}
},
beforeDestroy() { beforeDestroy() {
getDateIntervalFun = null getDateIntervalFun = null
} }
} }
</script> </script>
<style scoped> <style lang='less' scoped>
/deep/ .el-dropdown {
color: #fff;
}
.top{
position:absolute;
top:0;
left:0;
width:100%;
height:10%;
&:hover{
.select{
display:block
}
}
.select{
display:none;
position:absolute;
top:65%;
left:50%;
transform:translate(-50%,-50%);
color:#fff
}
}
.time, .date, .data { .time, .date, .data {
position: absolute; position: absolute;
font-size: 0.8vw; font-size: 0.8vw;

@ -21,19 +21,16 @@
<div class="table1"> <div class="table1">
<div style="background-color: #1077bc19"> <div style="background-color: #1077bc19">
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
任务编号 物料编码
</div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
任务类型
</div> </div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
物料名称 物料名称
</div> </div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
库位编号 物料规格
</div> </div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
时间 库存数量
</div> </div>
</div> </div>
<vue-seamless-scroll <vue-seamless-scroll
@ -50,27 +47,22 @@
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
{{ item.taskCode }} {{ item.materialCode }}
</div>
<div
class="scrollTableItem"
>
入库
</div> </div>
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
{{ item.materialName }} {{item.materialName}}
</div> </div>
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
{{ item.locationCode }} {{ item.materialSpec }}
</div> </div>
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
{{ item.applylate }} {{ item.totalAmount }}
</div> </div>
</div> </div>
</div> </div>
@ -80,19 +72,16 @@
<div class="table2"> <div class="table2">
<div style="background-color: #1077bc19"> <div style="background-color: #1077bc19">
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
订单 物料编码
</div> </div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
物料 物料名称
</div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
物料需求
</div> </div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
Bom分解 物料规格
</div> </div>
<div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;"> <div class="scrollTableItem" style="color:#65c2f3;font-weight: bold;">
时间 库存数量
</div> </div>
</div> </div>
<vue-seamless-scroll <vue-seamless-scroll
@ -102,34 +91,29 @@
style="height: calc(100% - 30px);overflow: hidden;" style="height: calc(100% - 30px);overflow: hidden;"
> >
<div <div
v-for="(item, index) in scrollTableData1" v-for="(item, index) in scrollTableData"
:key="index" :key="index"
> >
<div :style='"background-color:" + ((index % 2 === 0)? "#1077bc19":"#1077bc05") '> <div :style='"background-color:" + ((index % 2 === 0)? "#1077bc19":"#1077bc05") '>
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
{{ item.orderCode }} {{ item.materialCode }}
</div> </div>
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
{{ item.materialName }} {{item.materialName}}
</div> </div>
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
{{ item.saleAmount }} {{ item.materialSpec }}
</div> </div>
<div <div
class="scrollTableItem" class="scrollTableItem"
> >
<!-- {{ item.value4 }}--> {{ item.totalAmount }}
</div>
<div
class="scrollTableItem"
>
{{ item.releaseTime }}
</div> </div>
</div> </div>
</div> </div>
@ -160,7 +144,13 @@ import vueSeamlessScroll from 'vue-seamless-scroll'
import Chart from '@/components/board/Chart' import Chart from '@/components/board/Chart'
import HighChart from '@/components/board/HighChart' import HighChart from '@/components/board/HighChart'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import {} from '@/api/board/fourthFloorWarehouse' import {
latestYearInOutStocks,
getFourthFloorTotalProductStocks,
getFourthFloorProductInOutstockInfo,
getFourthFloorPlateStockTotals,
getFourthFloorAccessoriesStockTotals
} from '@/api/board/fourthFloorWarehouse'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100 const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
@ -236,16 +226,12 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
let e = { latestYearInOutStocks().then(e=>{
data: {
'rawInstockAmount': 28,
'rawOutstockAmount': 14,
'productInstockAmount': 8
}
}
this.topData.num1 = [...[0, 0, 0, 0], ...(e.data.rawInstockAmount || 0).toString().split('')].slice(-4) this.topData.num1 = [...[0, 0, 0, 0], ...(e.data.rawInstockAmount || 0).toString().split('')].slice(-4)
this.topData.num2 = [...[0, 0, 0, 0], ...(e.data.rawOutstockAmount || 0).toString().split('')].slice(-4) this.topData.num2 = [...[0, 0, 0, 0], ...(e.data.rawOutstockAmount || 0).toString().split('')].slice(-4)
this.topData.num3 = [...[0, 0, 0, 0], ...(e.data.productInstockAmount || 0).toString().split('')].slice(-4) this.topData.num3 = [...[0, 0, 0, 0], ...(e.data.productInstockAmount || 0).toString().split('')].slice(-4)
})
getFourthFloorTotalProductStocks().then(e=>{
this.$refs.chart1.setData({ this.$refs.chart1.setData({
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
@ -283,7 +269,7 @@ export default {
width: 2 width: 2
} }
}, },
data: [1, 2, 3] data: e.data.map(v=>v.materialName)
}, },
xAxis: { xAxis: {
type: 'value', type: 'value',
@ -334,7 +320,7 @@ export default {
false false
) )
}, },
data: [11, 22, 3] data: e.data.map(v=>v.totalAmount)
}, },
{ {
name: '', name: '',
@ -348,12 +334,12 @@ export default {
itemStyle: { itemStyle: {
color: '#138dd7' color: '#138dd7'
}, },
data: [11, 22, 3] data: e.data.map(v=>v.totalAmount)
} }
] ]
}) })
this.scrollTableData = [] })
this.scrollTableData1 = [] getFourthFloorProductInOutstockInfo().then(e=>{
this.$refs.chart3.setData({ this.$refs.chart3.setData({
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -381,7 +367,7 @@ export default {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: e.data.map(v => parseTime(v.day, '{m}-{d}')), data: ['出入库信息'],
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: 'white' color: 'white'
@ -431,7 +417,7 @@ export default {
]) ])
} }
}, },
data: e.data.map(v => v.instockAmount) data: [e.data.productInstockAmount]
}, },
{ {
name: '出库', name: '出库',
@ -451,11 +437,19 @@ export default {
]) ])
} }
}, },
data: e.data.map(v => v.outStockAmount) data: [e.data.productOutStockAmount]
} }
] ]
}) })
} })
getFourthFloorPlateStockTotals().then(e=>{
console.log(e)
this.scrollTableData = e.data
})
getFourthFloorAccessoriesStockTotals().then(e=>{
this.scrollTableData1 = e.data
})
},
} }
} }
</script> </script>
@ -564,7 +558,7 @@ export default {
.scrollTableItem { .scrollTableItem {
display: inline-block; display: inline-block;
width: calc(100% / 5); width: calc(100% / 4);
text-align: center; text-align: center;
padding: 14px 0; padding: 14px 0;
color: #4e99c5 color: #4e99c5

Loading…
Cancel
Save