diff --git a/hw-ui/src/views/board/warehouse/fourthFloor.vue b/hw-ui/src/views/board/warehouse/fourthFloor.vue index 9745e34e..78f3d253 100644 --- a/hw-ui/src/views/board/warehouse/fourthFloor.vue +++ b/hw-ui/src/views/board/warehouse/fourthFloor.vue @@ -232,6 +232,100 @@ export default { this.topData.num3 = [...[0, 0, 0, 0], ...(e.data.productInstockAmount || 0).toString().split('')].slice(-4) }) getFourthFloorTotalProductStocks().then(e=>{ + this.$refs.chart3.setData({ + tooltip: { + trigger: 'axis', + axisPointer: { + // 坐标轴指示器,坐标轴触发有效 + type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' + } + }, + grid: { + left: '2%', + right: '4%', + bottom: '14%', + top: '16%', + containLabel: true + }, + legend: { + x: 'center', + top: 12, + textStyle: { + color: '#fff' + }, + itemWidth: 12, + itemHeight: 10 + // itemGap: 35 + }, + dataZoom:[{ + type:'slider', + endValue:6, + }], + xAxis: { + type: 'category', + data: e.data.map(v=>v.materialName), + axisLine: { + lineStyle: { + color: 'white' + } + }, + axisLabel: { + interval: 0, + // rotate: 40, + textStyle: { + fontFamily: 'Microsoft YaHei' + } + } + }, + + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: 'white' + } + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(255,255,255,0.3)' + } + }, + axisLabel: {} + }, + series: [ + { + name: '', + type: 'bar', + barMaxWidth: '40px', + barWidth: '40%', + itemStyle: { + + color: new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, + [ + { + offset: 0, + color: '#0a2ad7' + }, + { + offset: 1, + color: '#138dd7' + } + ], + false + ) + }, + data: e.data.map(v=>v.totalAmount) + } + ] + }) + }) + getFourthFloorProductInOutstockInfo().then(e=>{ this.$refs.chart1.setData({ tooltip: { trigger: 'item' @@ -269,7 +363,7 @@ export default { width: 2 } }, - data: e.data.map(v=>v.materialName) + data: ['出库','入库'] }, xAxis: { type: 'value', @@ -320,7 +414,7 @@ export default { false ) }, - data: e.data.map(v=>v.totalAmount) + data: [e.data.productInstockAmount,e.data.productInstockAmount] }, { name: '', @@ -334,110 +428,7 @@ export default { itemStyle: { color: '#138dd7' }, - data: e.data.map(v=>v.totalAmount) - } - ] - }) - }) - getFourthFloorProductInOutstockInfo().then(e=>{ - this.$refs.chart3.setData({ - tooltip: { - trigger: 'axis', - axisPointer: { - // 坐标轴指示器,坐标轴触发有效 - type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' - } - }, - grid: { - left: '2%', - right: '4%', - bottom: '14%', - top: '16%', - containLabel: true - }, - legend: { - x: 'center', - top: 12, - textStyle: { - color: '#fff' - }, - itemWidth: 12, - itemHeight: 10 - // itemGap: 35 - }, - xAxis: { - type: 'category', - data: ['出入库信息'], - axisLine: { - lineStyle: { - color: 'white' - } - }, - axisLabel: { - // interval: 0, - // rotate: 40, - textStyle: { - fontFamily: 'Microsoft YaHei' - } - } - }, - - yAxis: { - type: 'value', - axisLine: { - show: false, - lineStyle: { - color: 'white' - } - }, - splitLine: { - show: true, - lineStyle: { - color: 'rgba(255,255,255,0.3)' - } - }, - axisLabel: {} - }, - series: [ - { - name: '入库', - type: 'bar', - barWidth: '15%', - itemStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: '#fccb05' - }, - { - offset: 1, - color: '#f5804d' - } - ]) - } - }, - data: [e.data.productInstockAmount] - }, - { - name: '出库', - type: 'bar', - barWidth: '15%', - itemStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: '#8bd46e' - }, - { - offset: 1, - color: '#09bcb7' - } - ]) - } - }, - data: [e.data.productOutStockAmount] + data: [e.data.productInstockAmount,e.data.productInstockAmount] } ] })