Commit a1e21668 by T

报表统计bug修复等

parent 3cb1b267
...@@ -347,7 +347,12 @@ export default { ...@@ -347,7 +347,12 @@ export default {
getGroupByCount({warehouseCode:this.warehouseId}).then(res => { getGroupByCount({warehouseCode:this.warehouseId}).then(res => {
if (res.code == "10000") { if (res.code == "10000") {
this.pieList = res.data this.pieList = res.data
this.dataSource = res.data.tjList // this.dataSource = res.data.tjList
// this.guideOpts.content = '装备总数'
// this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
// 法2slice:截取需要的部分,取当前的数组
this.newDataSource = res.data.tjList.slice(0,2);
this.dataSource = this.newDataSource
this.guideOpts.content = '装备总数' this.guideOpts.content = '装备总数'
this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num) this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
} }
...@@ -423,12 +428,16 @@ export default { ...@@ -423,12 +428,16 @@ export default {
}, },
radioChange(value) { radioChange(value) {
if (value == '库存状态') { if (value == '库存状态') {
this.dataSource = this.pieList.tjList // this.dataSource = this.pieList.tjList
this.dataSource = this.pieList.tjList.slice(0,2);
this.guideOpts.content = '装备总数'
} }
if (value == '装备库存') { if (value == '装备库存') {
// this.dataSource = this.pieList.typeList
this.dataSource = this.pieList.typeList this.dataSource = this.pieList.typeList
this.guideOpts.content = '在库数量'
} }
this.guideOpts.content = '装备总数' //this.guideOpts.content = '装备总数'
this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num) this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
}, },
humidityChange() { humidityChange() {
......
...@@ -38,8 +38,8 @@ export default { ...@@ -38,8 +38,8 @@ export default {
formatter: '.0%' formatter: '.0%'
}], }],
offset: [15, 0], offset: [15, 0],
padding: [0, 70, 0, 0], padding: [0, 90, 0, 0],
containerTplLegend:`<div class="g2-legend"> <table class="g2-legend-list" style="width: 100%"></table> </div>`, containerTplLegend:`<div class="g2-legend" > <table class="g2-legend-list" style="width: 100%"></table> </div>`,
guideOpts: { guideOpts: {
type: 'text', type: 'text',
position: [ '50%', '40%' ], position: [ '50%', '40%' ],
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
lineHeight: '240px', lineHeight: '240px',
fontSize: '16', fontSize: '16',
fill: 'rgba(0,0,0,.45)', fill: 'rgba(0,0,0,.45)',
textAlign: 'center' textAlign: 'center',
} }
}, },
guideOpts1: { guideOpts1: {
......
<template> <template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" title="查看详情" width="1500px"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" title="查看详情" width="1500px">
<!-- 弹出的图片窗口 --> <!-- 弹出的图片窗口 -->
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialogVisible" title="图片预览" width="50%"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="dialogVisible" title="图片预览" width="50%">
<img :src="picUrl" width="100%"/> <img :src="picUrl" width="100%"/>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-button type="info" plain @click="dialogVisible = false">关闭</el-button> <el-button type="info" plain @click="dialogVisible = false">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-form ref="form" :model="form" :inline="true" size="small" label-width="80px"> <el-form ref="form" :model="form" :inline="true" size="small" label-width="80px">
<el-tabs v-model="activeName" tab-position="left"> <el-tabs v-model="activeName" tab-position="left">
<el-tab-pane name="first" style="margin-left: 20px"> <el-tab-pane name="first" style="margin-left: 20px">
<span slot="label"><i class="el-icon-document"></i>&nbsp;采购信息</span> <span slot="label"><i class="el-icon-document"></i>&nbsp;采购信息</span>
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<span>查看装备出入库</span> <span>查看装备出入库</span>
</div> </div>
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="loading" :data="byOrderCodeInOutdetailList" stripe border style="width: 100%;" @row-click="rowClick"> <el-table ref="table" v-loading="loading" :data="byOrderCodeInOutdetailList" stripe border style="width: 100%;" max-height="520px" @row-click="rowClick">
<el-table-column type="expand" width="50"> <el-table-column type="expand" width="50">
<template slot-scope="props"> <template slot-scope="props">
<el-table :data="props.row.child" stripe border style="width: 94%;margin: auto;"> <el-table :data="props.row.child" stripe border style="width: 94%;margin: auto;">
......
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
<el-table-column prop="zsCount" label="装备总数" align="center"/> <el-table-column prop="zsCount" label="装备总数" align="center"/>
<el-table-column prop="zkCount" label="在库数" align="center"/> <el-table-column prop="zkCount" label="在库数" align="center"/>
<el-table-column prop="ckCount" label="出库数" align="center"/> <el-table-column prop="ckCount" label="出库数" align="center"/>
<el-table-column prop="bfCount" label="报废数" align="center"/> <!-- 总平台 -->
<el-table-column v-if="orgCode != '330200000000'" prop="bfCount" label="报废数" align="center"/>
<!-- 宁波市 -->
<el-table-column v-if="orgCode == '330200000000'" prop="bfCount" label="销毁数" align="center"/>
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="info" plain @click="cancel">关闭</el-button> <el-button type="info" plain @click="cancel">关闭</el-button>
...@@ -32,6 +35,7 @@ export default { ...@@ -32,6 +35,7 @@ export default {
}, },
data() { data() {
return { return {
orgCode: this.$store.state.user.user.baseJpOrganization.code,
dialog:false, dialog:false,
data: [], data: [],
loading: true, loading: true,
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="[0,3].includes(scope.row.currentState)" type="success">在库</el-tag> <el-tag v-if="[0,3].includes(scope.row.currentState)" type="success">在库</el-tag>
<el-tag v-else-if="[6].includes(scope.row.currentState)" type="danger">已报废</el-tag> <el-tag v-else-if="[6].includes(scope.row.currentState)&& orgCode != '330200000000'" type="danger">已报废</el-tag>
<el-tag v-else-if="[6].includes(scope.row.currentState)&& orgCode == '330200000000'" type="danger">已销毁</el-tag>
<el-tag v-else type="warning">出库</el-tag> <el-tag v-else type="warning">出库</el-tag>
</template> </template>
</el-table-column> </el-table-column>
...@@ -88,6 +89,7 @@ export default { ...@@ -88,6 +89,7 @@ export default {
mixins: [initData], mixins: [initData],
data() { data() {
return { return {
orgCode: this.$store.state.user.user.baseJpOrganization.code,
selection: '', selection: '',
size: 5 size: 5
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论