新购验收入库分析-弹框
This commit is contained in:
parent
392b6d769b
commit
1d5116a05e
|
|
@ -7,6 +7,7 @@ const URL_UNIT_LIST = '/screen/material/agreementInfo/getUnitList'
|
||||||
const URL_PROJECT_LIST = '/screen/material/agreementInfo/getProjectList'
|
const URL_PROJECT_LIST = '/screen/material/agreementInfo/getProjectList'
|
||||||
const URL_SCRAP_ANALYSIS = '/screen/base/largeScreen/home/getScrapAnalysisByMonth/details'
|
const URL_SCRAP_ANALYSIS = '/screen/base/largeScreen/home/getScrapAnalysisByMonth/details'
|
||||||
const URL_TOTAL_OWNERSHIP = '/screen/base/largeScreen/home/getTotalOwnership/details'
|
const URL_TOTAL_OWNERSHIP = '/screen/base/largeScreen/home/getTotalOwnership/details'
|
||||||
|
const URL_ACCEPTANCE_STORAGE = '/screen/base/largeScreen/home/getAcceptanceStorage/details'
|
||||||
|
|
||||||
// 设备类型
|
// 设备类型
|
||||||
export const getTypeList = params => GET(URL_TYPE_LIST, params)
|
export const getTypeList = params => GET(URL_TYPE_LIST, params)
|
||||||
|
|
@ -28,3 +29,6 @@ export const getScrapAnalysis = data => POST(URL_SCRAP_ANALYSIS, data)
|
||||||
|
|
||||||
// 总保有量
|
// 总保有量
|
||||||
export const getTotalOwnership = data => POST(URL_TOTAL_OWNERSHIP, data)
|
export const getTotalOwnership = data => POST(URL_TOTAL_OWNERSHIP, data)
|
||||||
|
|
||||||
|
// 入库分析
|
||||||
|
export const getAcceptanceStorage = data => POST(URL_ACCEPTANCE_STORAGE, data)
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="accessRateEchartsCenterBar"></div>
|
<div id="accessRateEchartsCenterBar"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<inputStoreAnalysisDialog ref="inputStoreAnalysisDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAcceptanceStorageApi } from "../../api/screen";
|
import { getAcceptanceStorageApi } from "../../api/screen";
|
||||||
|
import inputStoreAnalysisDialog from './inputStoreAnalysisDialog.vue'
|
||||||
|
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
export default {
|
export default {
|
||||||
name: 'accessRatePage',
|
name: 'accessRatePage',
|
||||||
|
components: {
|
||||||
|
inputStoreAnalysisDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataObj: {},
|
dataObj: {},
|
||||||
|
|
@ -301,7 +307,18 @@ export default {
|
||||||
}
|
}
|
||||||
let myCharts = echarts.init(document.querySelector('#accessRateEchartsCenterBar'));
|
let myCharts = echarts.init(document.querySelector('#accessRateEchartsCenterBar'));
|
||||||
myCharts.setOption(option)
|
myCharts.setOption(option)
|
||||||
|
myCharts.off('click')
|
||||||
|
myCharts.on('click', (params) => {
|
||||||
|
console.log('🚀 ~ myCharts.on ~ params:', params);
|
||||||
|
const data = {
|
||||||
|
open: true,
|
||||||
|
maType: this.maType,
|
||||||
|
startDate: params.name,
|
||||||
|
type: params.seriesName == '验收数量' ? 1 : 2,
|
||||||
}
|
}
|
||||||
|
this.$refs.inputStoreAnalysisDialog.setOpen(data)
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,12 @@ export default {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.getTotalOwnershipApiPage()
|
this.getTotalOwnershipApiPage()
|
||||||
}, 60 * 1000);
|
}, 60 * 1000);
|
||||||
|
this.$eventBus.$on('maType', (maType) => {
|
||||||
|
this.maType = maType
|
||||||
|
});
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
this.$eventBus.$off('maType');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTotalOwnershipApiPage() {
|
getTotalOwnershipApiPage() {
|
||||||
|
|
@ -111,13 +116,10 @@ export default {
|
||||||
this.$refs['box1'].style.height = height
|
this.$refs['box1'].style.height = height
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClick(params) {
|
|
||||||
this.maType = params.maType
|
|
||||||
},
|
|
||||||
handleClickItem() {
|
handleClickItem() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.inventoryDialog.setOpen({ open: true, maType: this.maType })
|
this.$refs.inventoryDialog.setOpen({ open: true, maType: this.maType })
|
||||||
}, 100)
|
}, 10)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog
|
||||||
|
title=""
|
||||||
|
:visible.sync="open"
|
||||||
|
width="85%"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div class="content">
|
||||||
|
<el-form :model="formData" ref="form" label-width="80px" :inline="false" size="small" inline>
|
||||||
|
<el-form-item label="设备类型" size="small" prop="materialReqTypeValue">
|
||||||
|
<el-select v-model="formData.materialReqTypeValue" placeholder="请选择设备类型" size="small" clearable filterable @change="handleType">
|
||||||
|
<el-option v-for="item in formData.materialReqTypeList"
|
||||||
|
:key="item.typeId"
|
||||||
|
:label="item.typeName"
|
||||||
|
:value="item.typeId">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleSearch">查询</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table :data="tableData" style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
v-for="item in tableColumn"
|
||||||
|
:prop="item.prop"
|
||||||
|
:label="item.label"
|
||||||
|
:width="item.width"
|
||||||
|
:key="item.prop"
|
||||||
|
:align="item.align"
|
||||||
|
:type="item.type"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<Pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="open = false">关 闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Pagination from '../Pagination/index.vue'
|
||||||
|
import { getTypeList, getAcceptanceStorage } from '../../api/dialog'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'inputStoreAnalysisDialog',
|
||||||
|
components: {
|
||||||
|
Pagination
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
open: false,
|
||||||
|
formData: {
|
||||||
|
materialReqTypeValue: '',
|
||||||
|
materialReqTypeList: [],
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: '序号',
|
||||||
|
type: 'index',
|
||||||
|
width: 60,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '设备类型',
|
||||||
|
prop: 'typeName',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '规格型号',
|
||||||
|
prop: 'typeModelName',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '采购数量',
|
||||||
|
prop: 'purchaseNum',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '验收数量',
|
||||||
|
prop: 'checkNum',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '入库数量',
|
||||||
|
prop: 'inputNum',
|
||||||
|
align: 'center'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
maType: 1,
|
||||||
|
startDate: '',
|
||||||
|
type: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getType()
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setOpen(params) {
|
||||||
|
this.open = params.open
|
||||||
|
this.maType = params.maType
|
||||||
|
this.tableData = []
|
||||||
|
this.total = 0
|
||||||
|
this.startDate = params.startDate
|
||||||
|
this.type = params.type
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.form.resetFields()
|
||||||
|
this.getList()
|
||||||
|
}, 10)
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
const params = {
|
||||||
|
pageNum: this.queryParams.pageNum,
|
||||||
|
pageSize: this.queryParams.pageSize,
|
||||||
|
maType: this.maType,
|
||||||
|
typeId: this.formData.materialReqTypeValue,
|
||||||
|
startDate: this.startDate,
|
||||||
|
type: this.type
|
||||||
|
}
|
||||||
|
getAcceptanceStorage(params).then(({data}) => {
|
||||||
|
this.tableData = data.rows
|
||||||
|
this.total = data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getType() {
|
||||||
|
getTypeList({ level: '3' }).then(res => {
|
||||||
|
this.formData.materialReqTypeList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleType(val) {
|
||||||
|
this.formData.materialReqTypeValue = val
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleReset() {
|
||||||
|
this.$refs.form.resetFields()
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content{
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -146,7 +146,7 @@ export default {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.form.resetFields()
|
this.$refs.form.resetFields()
|
||||||
this.getList()
|
this.getList()
|
||||||
}, 0)
|
}, 10)
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
<!-- 中间3D效果展示 -->
|
<!-- 中间3D效果展示 -->
|
||||||
<div class="centerModuleBox">
|
<div class="centerModuleBox">
|
||||||
<div class="homePage-fold" @click="handleClick">
|
<div class="homePage-fold">
|
||||||
<CenterFold ref="centerFold"></CenterFold>
|
<CenterFold></CenterFold>
|
||||||
</div>
|
</div>
|
||||||
<div class="center-top">
|
<div class="center-top">
|
||||||
<CountryMap></CountryMap>
|
<CountryMap></CountryMap>
|
||||||
|
|
@ -188,10 +188,6 @@ export default {
|
||||||
const dateTimeString = `${year}/${month}/${day} ${weekday} ${hours}:${minutes}:${seconds}`
|
const dateTimeString = `${year}/${month}/${day} ${weekday} ${hours}:${minutes}:${seconds}`
|
||||||
this.dateTimeString = dateTimeString
|
this.dateTimeString = dateTimeString
|
||||||
},
|
},
|
||||||
handleClick() {
|
|
||||||
this.$refs.centerFold.handleClick({maType: this.maType})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue