Commit a1e21668 by T

报表统计bug修复等

parent 3cb1b267
......@@ -347,7 +347,12 @@ export default {
getGroupByCount({warehouseCode:this.warehouseId}).then(res => {
if (res.code == "10000") {
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.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
}
......@@ -423,12 +428,16 @@ export default {
},
radioChange(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 == '装备库存') {
// 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)
},
humidityChange() {
......
......@@ -38,8 +38,8 @@ export default {
formatter: '.0%'
}],
offset: [15, 0],
padding: [0, 70, 0, 0],
containerTplLegend:`<div class="g2-legend"> <table class="g2-legend-list" style="width: 100%"></table> </div>`,
padding: [0, 90, 0, 0],
containerTplLegend:`<div class="g2-legend" > <table class="g2-legend-list" style="width: 100%"></table> </div>`,
guideOpts: {
type: 'text',
position: [ '50%', '40%' ],
......@@ -48,7 +48,7 @@ export default {
lineHeight: '240px',
fontSize: '16',
fill: 'rgba(0,0,0,.45)',
textAlign: 'center'
textAlign: 'center',
}
},
guideOpts1: {
......
......@@ -121,7 +121,7 @@
<span>查看装备出入库</span>
</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">
<template slot-scope="props">
<el-table :data="props.row.child" stripe border style="width: 94%;margin: auto;">
......
......@@ -14,7 +14,10 @@
<el-table-column prop="zsCount" label="装备总数" align="center"/>
<el-table-column prop="zkCount" 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>
<div slot="footer" class="dialog-footer">
<el-button type="info" plain @click="cancel">关闭</el-button>
......@@ -32,6 +35,7 @@ export default {
},
data() {
return {
orgCode: this.$store.state.user.user.baseJpOrganization.code,
dialog:false,
data: [],
loading: true,
......
......@@ -31,7 +31,8 @@
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
......@@ -88,6 +89,7 @@ export default {
mixins: [initData],
data() {
return {
orgCode: this.$store.state.user.user.baseJpOrganization.code,
selection: '',
size: 5
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论