Commit c9b3cea7 by T

bug修复

parent 89fd8240
...@@ -32,7 +32,7 @@ module.exports = { ...@@ -32,7 +32,7 @@ module.exports = {
}, },
// Various Dev Server settings // Various Dev Server settings
host: '192.168.2.246', // can be overwritten by process.env.HOST host: '192.168.2.105', // can be overwritten by process.env.HOST
port: 9998, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 9998, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,
......
...@@ -17,6 +17,14 @@ export function getCountOrg(data) { ...@@ -17,6 +17,14 @@ export function getCountOrg(data) {
}) })
} }
export function getCountOrgHZ(data) {
return request({
url: window._CONFIG['serviceURL'] + '/api/View/GetCountOrgHZ',
method: 'post',
data
})
}
// 区域分类在库总量 // 区域分类在库总量
export function getGroupByAreaCount(data) { export function getGroupByAreaCount(data) {
return request({ return request({
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">今年出库数</div> <div class="card-panel-text">今年出库数</div>
<count-to :start-val="0" :end-val="2600" :duration="2600" class="card-panel-num"/> <count-to :start-val="0" :end-val="count.jncksCount" :duration="2600" class="card-panel-num"/>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">今年报废数</div> <div class="card-panel-text">今年报废数</div>
<count-to :start-val="0" :end-val="280" :duration="2600" class="card-panel-num"/> <count-to :start-val="0" :end-val="count.jnbfsCount" :duration="2600" class="card-panel-num"/>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -106,14 +106,16 @@ ...@@ -106,14 +106,16 @@
<script> <script>
import CountTo from 'vue-count-to' import CountTo from 'vue-count-to'
import { getCountOrg, getCount } from '@/api/view' // import { getCountOrg, getCount } from '@/api/view'
import { getCountOrgHZ, getCount } from '@/api/view'
export default { export default {
components: { components: {
CountTo CountTo
}, },
data() { data() {
return { return {
count: { zkTopCount: 0, zkCount: 0, bfCount: 0, lyCount: 0, wxCount:0, useCount: 0, houseCount: 0, jjbfCount: 0 }, count: { zkTopCount: 0, zkCount: 0, bfCount: 0, lyCount: 0, wxCount:0, useCount: 0, houseCount: 0, jjbfCount: 0 ,jncksCount: 0,
jnbfsCount: 0},
orgId: this.$store.state.user.user.baseJpOrganization.id, orgId: this.$store.state.user.user.baseJpOrganization.id,
findCode: this.$store.state.user.user.baseJpOrganization.findCode findCode: this.$store.state.user.user.baseJpOrganization.findCode
} }
...@@ -135,12 +137,13 @@ export default { ...@@ -135,12 +137,13 @@ export default {
this.count.useCount = res.data.zkTopCount - res.data.wxCount - res.data.bfCount this.count.useCount = res.data.zkTopCount - res.data.wxCount - res.data.bfCount
this.count.houseCount = res.data.houseCount // 调拨 this.count.houseCount = res.data.houseCount // 调拨
this.count.jjbfCount = res.data.jjbfCount this.count.jjbfCount = res.data.jjbfCount
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}) })
} else { } else {
getCountOrg({orgId: this.orgId}).then(res => { getCountOrgHZ({orgId: this.orgId}).then(res => {
if (res.code === '10000') { if (res.code === '10000') {
this.count.zkTopCount = res.data.zkTopCount this.count.zkTopCount = res.data.zkTopCount
this.count.zkCount = res.data.zkCount this.count.zkCount = res.data.zkCount
...@@ -150,6 +153,8 @@ export default { ...@@ -150,6 +153,8 @@ export default {
this.count.useCount = res.data.zkTopCount - res.data.wxCount -res.data.bfCount this.count.useCount = res.data.zkTopCount - res.data.wxCount -res.data.bfCount
this.count.houseCount = res.data.houseCount // 调拨 this.count.houseCount = res.data.houseCount // 调拨
this.count.jjbfCount = res.data.jjbfCount this.count.jjbfCount = res.data.jjbfCount
this.count.jncksCount = res.data.jncksCount
this.count.jnbfsCount = res.data.jnbfsCount
eventBus.$emit('fasong', res.data.cqwhCount, res.data.ycqCount) // 超期未还 // 已超期 eventBus.$emit('fasong', res.data.cqwhCount, res.data.ycqCount) // 超期未还 // 已超期
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
......
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" ref="form" :visible.sync="dialog" :title="'查看装备库存状态'" width="1200px">
<!--表格渲染-->
<el-table ref="table" v-loading="loading" :row-key="getRowKeys" :data="data" style="width: 100%;" stripe border>
<el-table-column type="expand" width="50">
<template slot-scope="props">
<detail-form :orgId="props.row.orgId" :warehouseId="props.row.warehouseCode" :equipmentSizeId="props.row.equipmentSizecode"/>
</template>
</el-table-column>
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="warehouseName" label="仓库名称" align="center"/>
<el-table-column prop="equipmentName" label="装备名称" align="center"/>
<el-table-column prop="sizeName" label="装备型号名称" align="center"/>
<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>
<div slot="footer" class="dialog-footer">
<el-button type="info" plain @click="cancel">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import detailForm from '@/views/warehouse/stock/detail'
import { initData, initPdata, initGdata } from '@/api/data'
import { transform } from '@/utils/index'
export default {
components:{
detailForm
},
data() {
return {
dialog:false,
data: [],
loading: true,
url: '',
params: {}
}
},
methods: {
initTable(equipmentId, findCode, orgCode, code) {
this.url = window._CONFIG['serviceURL'] + '/api/Inventory/GetListEquByFindCode'
this.params = { findCode: findCode, equipmentId: equipmentId, orgCode: orgCode.substring(6,8) === '00' ? (orgCode === code ? orgCode: '') : orgCode } // 先判断是不是 派出所还是上级,派出所直接传orgCode,上级会包含本级及下级的,相等的话传本级
this.initPost()
},
getRowKeys(row) {
return row.equipmentCode + row.equipmentSizecode + row.warehouseCode
},
async initPost() {
return new Promise((resolve, reject) => {
this.loading = true
initPdata(this.url, transform(this.params)).then(res => {
if (res.code === '10000') {
this.data = res.data
setTimeout(() => {
this.loading = false
}, this.time)
resolve(res)
} else this.$message.error(res.msg)
}).catch(err => {
this.loading = false
reject(err)
})
})
},
cancel() {
this.resetForm()
},
resetForm() {
this.dialog = false
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-input-number .el-input__inner {
text-align: left;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论