总保有量-弹框
This commit is contained in:
parent
7247b3679d
commit
392b6d769b
|
|
@ -6,6 +6,7 @@ const URL_RETURN_DETAILS = '/screen/base/largeScreen/home/getMaterialReturnData/
|
|||
const URL_UNIT_LIST = '/screen/material/agreementInfo/getUnitList'
|
||||
const URL_PROJECT_LIST = '/screen/material/agreementInfo/getProjectList'
|
||||
const URL_SCRAP_ANALYSIS = '/screen/base/largeScreen/home/getScrapAnalysisByMonth/details'
|
||||
const URL_TOTAL_OWNERSHIP = '/screen/base/largeScreen/home/getTotalOwnership/details'
|
||||
|
||||
// 设备类型
|
||||
export const getTypeList = params => GET(URL_TYPE_LIST, params)
|
||||
|
|
@ -23,4 +24,7 @@ export const getUnitList = params => GET(URL_UNIT_LIST, params)
|
|||
export const getProjectList = params => GET(URL_PROJECT_LIST, params)
|
||||
|
||||
// 废料分析
|
||||
export const getScrapAnalysis = data => POST(URL_SCRAP_ANALYSIS, data)
|
||||
export const getScrapAnalysis = data => POST(URL_SCRAP_ANALYSIS, data)
|
||||
|
||||
// 总保有量
|
||||
export const getTotalOwnership = data => POST(URL_TOTAL_OWNERSHIP, data)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<div class="box1-item_two">
|
||||
<div>
|
||||
<div class="box_header_div">
|
||||
<div class="box_list" v-for="(item, index) of newArr" :key="index">
|
||||
<div class="box_list" v-for="(item, index) of newArr" :key="index" @click="handleClickItem">
|
||||
<div class="item-value">
|
||||
{{ item.value }}
|
||||
</div>
|
||||
|
|
@ -28,14 +28,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<inventoryDialog ref="inventoryDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GROUP from '../../assets/img/myImage/group.png';
|
||||
import { getTotalOwnershipApi } from "../../api/screen";
|
||||
import inventoryDialog from './inventoryDialog.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
inventoryDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isUp: true,
|
||||
|
|
@ -55,7 +61,8 @@ export default {
|
|||
{ url: GROUP, name: '报废机具', value: 999 },
|
||||
{ url: GROUP, name: '报废机具', value: 999 },
|
||||
{ url: GROUP, name: '报废机具', value: 999 },
|
||||
]
|
||||
],
|
||||
maType: 1
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -103,6 +110,14 @@ export default {
|
|||
this.$refs['box1'].style.height = 0
|
||||
this.$refs['box1'].style.height = height
|
||||
}
|
||||
},
|
||||
handleClick(params) {
|
||||
this.maType = params.maType
|
||||
},
|
||||
handleClickItem() {
|
||||
setTimeout(() => {
|
||||
this.$refs.inventoryDialog.setOpen({ open: true, maType: this.maType })
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ export default {
|
|||
this.open = params.open,
|
||||
this.maType = params.maType,
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
setTimeout(() => {
|
||||
this.$refs.form.resetFields()
|
||||
this.getList()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,187 @@
|
|||
<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, getTotalOwnership } from '../../api/dialog'
|
||||
|
||||
export default {
|
||||
name: 'inventoryDialog',
|
||||
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: 'unitName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '在库数量',
|
||||
prop: 'stockNum',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '在用数量',
|
||||
prop: 'useNum',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '在修数量',
|
||||
prop: 'inRepairNum',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '修饰后待入库',
|
||||
prop: 'inputNum',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '新购待入库',
|
||||
prop: 'purchaseNum',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '总保有量',
|
||||
prop: 'totalOwnershipNum',
|
||||
align: 'center'
|
||||
},
|
||||
],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
maType: 1
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getType()
|
||||
|
||||
},
|
||||
methods: {
|
||||
setOpen(params) {
|
||||
this.open = params.open,
|
||||
this.maType = params.maType,
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
setTimeout(() => {
|
||||
this.$refs.form.resetFields()
|
||||
this.getList()
|
||||
}, 0)
|
||||
},
|
||||
getList() {
|
||||
const params = {
|
||||
pageNum: this.queryParams.pageNum,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
maType: this.maType,
|
||||
typeId: this.formData.materialReqTypeValue
|
||||
}
|
||||
getTotalOwnership(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>
|
||||
|
|
@ -168,6 +168,7 @@ export default {
|
|||
this.open = params.open,
|
||||
this.maType = params.maType,
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
setTimeout(() => {
|
||||
this.$refs.form.resetFields()
|
||||
this.getList()
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ export default {
|
|||
this.open = params.open,
|
||||
this.maType = params.maType,
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
setTimeout(() => {
|
||||
this.$refs.form.resetFields()
|
||||
this.getList()
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
<!-- 中间3D效果展示 -->
|
||||
<div class="centerModuleBox">
|
||||
<div class="homePage-fold">
|
||||
<CenterFold></CenterFold>
|
||||
<div class="homePage-fold" @click="handleClick">
|
||||
<CenterFold ref="centerFold"></CenterFold>
|
||||
</div>
|
||||
<div class="center-top">
|
||||
<CountryMap></CountryMap>
|
||||
|
|
@ -187,6 +187,9 @@ export default {
|
|||
const seconds = date.getSeconds().toString().padStart(2, '0')
|
||||
const dateTimeString = `${year}/${month}/${day} ${weekday} ${hours}:${minutes}:${seconds}`
|
||||
this.dateTimeString = dateTimeString
|
||||
},
|
||||
handleClick() {
|
||||
this.$refs.centerFold.handleClick({maType: this.maType})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue