| | |
| | | <div class="head"> |
| | | <h1>WMSç³»ç»çæ§ä¸å¿</h1> |
| | | <div class="head-actions"> |
| | | <el-button type="primary" @click="toggleFullScreen" size="small"> |
| | | <el-button type="primary" @click="toggleFullScreen" size="small" round> |
| | | <el-icon><FullScreen /></el-icon> |
| | | {{ isFullScreen ? 'éåºå
¨å±' : 'å
¨å±æ¾ç¤º' }} |
| | | </el-button> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="data-center"> |
| | | <div class="title">åºåæ°æ®</div> |
| | | <div class="center-top-num"> |
| | | <div class="item"> |
| | | <div class="text">æ»è´§ä½æ°é</div> |
| | | <div class="num">{{ totalStock }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">仿¥å
¥åº</div> |
| | | <div class="num">{{ todayInbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">仿¥åºåº</div> |
| | | <div class="num">{{ todayOutbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬å¨å
¥åº</div> |
| | | <div class="num">{{ weekInbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬å¨åºåº</div> |
| | | <div class="num">{{ weekOutbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬æå
¥åº</div> |
| | | <div class="num">{{ monthInbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬æåºåº</div> |
| | | <div class="num">{{ monthOutbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">å¾
å¤ç订å</div> |
| | | <div class="num">{{ pendingOrders }}</div> |
| | | <div class="data-center-item"> |
| | | <div class="title">åºåæ°æ®</div> |
| | | <div class="center-top-num"> |
| | | <div class="item"> |
| | | <div class="text">æ»è´§ä½æ°é</div> |
| | | <div class="num">{{ totalLocations }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">仿¥å
¥åº</div> |
| | | <div class="num">{{ todayInbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">仿¥åºåº</div> |
| | | <div class="num">{{ todayOutbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬å¨å
¥åº</div> |
| | | <div class="num">{{ weekInbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬å¨åºåº</div> |
| | | <div class="num">{{ weekOutbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬æå
¥åº</div> |
| | | <div class="num">{{ monthInbound }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="text">æ¬æåºåº</div> |
| | | <div class="num">{{ monthOutbound }}</div> |
| | | </div> |
| | | <!-- <div class="item"> |
| | | <div class="text">å¾
å¤ç订å</div> |
| | | <div class="num">{{ pendingOrders }}</div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <div class="data-center-item"> |
| | |
| | | |
| | | export default { |
| | | setup() { |
| | | const totalStock = ref('0') |
| | | const totalLocations = ref('0') |
| | | const todayInbound = ref('0') |
| | | const todayOutbound = ref('0') |
| | | const weekInbound = ref('0') |
| | |
| | | const fetchData = async () => { |
| | | try { |
| | | // è·ååºåç»è®¡æ°æ® |
| | | const stockStatistics = await http.post('/api/StockInfo/GetStockStatistics', {}, false) |
| | | const stockStatistics = await http.post('/api/Home/GetDt_TaskHty', {}, false) |
| | | |
| | | console.log('åºåç»è®¡æ°æ®:', stockStatistics) |
| | | |
| | |
| | | if (stockStatistics.status) { |
| | | const data = stockStatistics.data; |
| | | console.log('åºåæ°æ®:', data) |
| | | totalStock.value = data.totalStock ? data.totalStock.toLocaleString() : '0'; |
| | | totalLocations.value = data.totalLocations ? data.totalLocations.toLocaleString() : '0'; |
| | | todayInbound.value = data.todayInbound ? data.todayInbound.toLocaleString() : '0'; |
| | | todayOutbound.value = data.todayOutbound ? data.todayOutbound.toLocaleString() : '0'; |
| | | weekInbound.value = data.weekInbound ? data.weekInbound.toLocaleString() : '0'; |
| | |
| | | { value: stockData.warehouseUtilization?.inStock || 0, name: 'æè´§' }, |
| | | { value: stockData.warehouseUtilization?.free || 0, name: '空é²' }, |
| | | { value: stockData.warehouseUtilization?.inStockLock || 0, name: 'æè´§éå®' }, |
| | | { value: stockData.warehouseUtilization?.lockLocations || 0, name: 'éå®' }, |
| | | { value: stockData.warehouseUtilization?.freeLock || 0, name: '空é²éå®' }, |
| | | { value: stockData.warehouseUtilization?.palletLock || 0, name: '大æçéå®' } |
| | | // { value: stockData.warehouseUtilization?.lockLocations || 0, name: 'éå®' }, |
| | | // { value: stockData.warehouseUtilization?.freeLock || 0, name: '空é²éå®' }, |
| | | // { value: stockData.warehouseUtilization?.palletLock || 0, name: '大æçéå®' } |
| | | ] |
| | | }] |
| | | }) |
| | |
| | | chartDailyInout.setOption({ |
| | | tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, |
| | | grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true }, |
| | | xAxis: { type: 'category', data: ['08æ¶', '09æ¶', '10æ¶', '11æ¶', '12æ¶', '13æ¶', '14æ¶', '15æ¶', '16æ¶', '17æ¶'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | xAxis: { type: 'category', data: ['08æ¶', '09æ¶', '10æ¶', '11æ¶', '12æ¶', '13æ¶', '14æ¶', '15æ¶', '16æ¶', '17æ¶'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | series: [ |
| | | { name: 'å
¥åº', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#2f89cf' } } }, |
| | | { name: 'åºåº', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#46d000' } } } |
| | |
| | | chartWeekInout.setOption({ |
| | | tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, |
| | | grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true }, |
| | | xAxis: { type: 'category', data: ['å¨ä¸', 'å¨äº', 'å¨ä¸', 'å¨å', 'å¨äº', 'å¨å
', '卿¥'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | xAxis: { type: 'category', data: ['å¨ä¸', 'å¨äº', 'å¨ä¸', 'å¨å', 'å¨äº', 'å¨å
', '卿¥'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | series: [ |
| | | { name: 'å
¥åº', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#2f89cf' } } }, |
| | | { name: 'åºåº', type: 'bar', data: [], barWidth: '25%', itemStyle: { normal: { color: '#46d000' } } } |
| | |
| | | chartMonthInout.setOption({ |
| | | tooltip: { trigger: 'axis' }, |
| | | grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true }, |
| | | xAxis: { type: 'category', data: ['01æ¥', '05æ¥', '10æ¥', '15æ¥', '20æ¥', '25æ¥', '30æ¥'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | xAxis: { type: 'category', data: ['01æ¥', '05æ¥', '10æ¥', '15æ¥', '20æ¥', '25æ¥', '30æ¥'], axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | series: [ |
| | | { name: 'å
¥åº', type: 'line', data: [], smooth: true, lineStyle: { color: '#2f89cf' }, areaStyle: { color: 'rgba(47, 137, 207, 0.3)' } }, |
| | | { name: 'åºåº', type: 'line', data: [], smooth: true, lineStyle: { color: '#46d000' }, areaStyle: { color: 'rgba(70, 208, 0, 0.3)' } } |
| | |
| | | chartWarehouseUtilization = echarts.init(document.getElementById('chart-warehouse-utilization')) |
| | | chartWarehouseUtilization.setOption({ |
| | | tooltip: { trigger: 'item' }, |
| | | legend: { orient: 'vertical', left: 'left' }, |
| | | legend: { orient: 'vertical', left: 'left', textStyle: { color: 'rgba(255,255,255,.8)' } }, |
| | | series: [ |
| | | { name: 'è´§ä½ç¶æåå¸', type: 'pie', radius: '60%', data: [], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } |
| | | ] |
| | |
| | | |
| | | // åºåååè¶å¿ |
| | | chartStockTrend = echarts.init(document.getElementById('chart-stock-trend')) |
| | | // çææè¿7天çè¿ç»æ¥æ |
| | | const recentDays = generateRecentDays() |
| | | chartStockTrend.setOption({ |
| | | tooltip: { trigger: 'axis' }, |
| | | grid: { left: '0%', top: '10px', right: '0%', bottom: '4%', containLabel: true }, |
| | | xAxis: { type: 'category', data: recentDays, axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } } }, |
| | | xAxis: { type: 'category', data: recentDays, axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | yAxis: { type: 'value', axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.5)' } }, axisLabel: { color: 'rgba(255,255,255,.8)' } }, |
| | | series: [{ type: 'line', data: [], smooth: true, lineStyle: { color: '#4ecdc4' }, areaStyle: { color: 'rgba(78, 205, 196, 0.3)' } }] |
| | | }) |
| | | } |
| | |
| | | // åå§è·åæ°æ® |
| | | fetchData() |
| | | |
| | | // 宿¶å·æ°æ°æ®ï¼æ¯30ç§æ´æ°ä¸æ¬¡ |
| | | |
| | | dataTimer = setInterval(() => { |
| | | fetchData() |
| | | }, 30000) |
| | | }, 600000)//ååéæ´æ°ä¸æ¬¡ |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | |
| | | }) |
| | | |
| | | return { |
| | | totalStock, |
| | | totalLocations, |
| | | todayInbound, |
| | | todayOutbound, |
| | | weekInbound, |
| | |
| | | .head { |
| | | height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 24px; |
| | | font-weight: bold; |
| | |
| | | padding: 0 20px; |
| | | box-sizing: border-box; |
| | | margin-bottom: 10px; |
| | | position: relative; |
| | | } |
| | | |
| | | |
| | | .head-actions { |
| | | position: absolute; |
| | | right: 20px; |
| | | display: flex; |
| | | gap: 10px; |
| | | } |
| | |
| | | gap: 20px; |
| | | |
| | | .data-left-item { |
| | | height: calc(50% - 10px); |
| | | flex: 1; |
| | | background: rgba(10, 30, 50, 0.6); |
| | | border-radius: 4px; |
| | | border-radius: 12px; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | min-height: 0; |
| | | } |
| | | } |
| | | |
| | |
| | | gap: 20px; |
| | | |
| | | .center-top-num { |
| | | flex: 1; |
| | | display: grid; |
| | | grid-template-columns: repeat(4, 1fr); |
| | | grid-template-rows: repeat(2, 1fr); |
| | | gap: 15px; |
| | | height: calc(50% - 10px); |
| | | background: rgba(10, 30, 50, 0.6); |
| | | border-radius: 4px; |
| | | border-radius: 12px; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | min-height: 0; |
| | | |
| | | .item { |
| | | background: rgba(10, 40, 70, 0.7); |
| | | border-radius: 4px; |
| | | border-radius: 12px; |
| | | padding: 15px; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | |
| | | } |
| | | |
| | | .data-center-item { |
| | | height: calc(50% - 10px); |
| | | flex: 1; |
| | | background: rgba(10, 30, 50, 0.6); |
| | | border-radius: 4px; |
| | | border-radius: 12px; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-height: 0; |
| | | |
| | | > div[id^="chart-"] { |
| | | flex: 1; |
| | |
| | | gap: 20px; |
| | | |
| | | .data-right-item { |
| | | height: calc(50% - 10px); |
| | | flex: 1; |
| | | background: rgba(10, 30, 50, 0.6); |
| | | border-radius: 4px; |
| | | border-radius: 12px; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | min-height: 0; |
| | | } |
| | | } |
| | | } |