领料分析-弹框
This commit is contained in:
parent
7a81252dc1
commit
f7da293b87
|
|
@ -0,0 +1,201 @@
|
||||||
|
<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="materialReqNo">
|
||||||
|
<el-input v-model="formData.materialReqNo" placeholder="请输入领料单号" size="small" clearable filterable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位名称" size="small" prop="materialReqUnitValue">
|
||||||
|
<el-select v-model="formData.materialReqUnitValue" placeholder="请选择单位" size="small" clearable filterable @change="handleUnit">
|
||||||
|
<el-option
|
||||||
|
v-for="item in formData.materialReqUnitList"
|
||||||
|
:key="item.unitId"
|
||||||
|
:label="item.unitName"
|
||||||
|
:value="item.unitId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工程名称" size="small" prop="materialReqProjectValue">
|
||||||
|
<el-select v-model="formData.materialReqProjectValue" placeholder="请选择工程名称" size="small" clearable filterable @change="handleProject">
|
||||||
|
<el-option
|
||||||
|
v-for="item in formData.materialReqProjectList"
|
||||||
|
:key="item.projectId"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.projectId"
|
||||||
|
></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 { getDetails, getUnitList, getProjectList } from '../../api/dialog'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'getMaterialsDialog',
|
||||||
|
components: {
|
||||||
|
Pagination
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
open: false,
|
||||||
|
material: false, // 领料
|
||||||
|
formData: {
|
||||||
|
materialReqNo: '',
|
||||||
|
materialReqUnitValue: '',
|
||||||
|
materialReqProjectValue: '',
|
||||||
|
materialReqUnitList: [],
|
||||||
|
materialReqProjectList: [],
|
||||||
|
materialReqTypeList: [],
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: '序号',
|
||||||
|
type: 'index',
|
||||||
|
width: 60,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '领料单号',
|
||||||
|
prop: 'materialTime',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '领料申请单位',
|
||||||
|
prop: 'typeName',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '领料申请工程',
|
||||||
|
prop: 'typeModelName',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '申请数量',
|
||||||
|
prop: 'num',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '申请时间',
|
||||||
|
prop: 'userName',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '申请状态',
|
||||||
|
prop: 'materialCode',
|
||||||
|
align: 'center'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
maType: 1
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getUnit()
|
||||||
|
this.getProject()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setOpen(params) {
|
||||||
|
this.open = params.open,
|
||||||
|
this.maType = params.maType,
|
||||||
|
this.tableData = []
|
||||||
|
this.total = 0
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.form.resetFields()
|
||||||
|
this.getList()
|
||||||
|
}, 100)
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
const params = {
|
||||||
|
pageNum: this.queryParams.pageNum,
|
||||||
|
pageSize: this.queryParams.pageSize,
|
||||||
|
maType: this.maType,
|
||||||
|
materialCode: this.formData.materialReqNo.trim(),
|
||||||
|
unitId: this.formData.materialReqUnitValue,
|
||||||
|
projectId: this.formData.materialReqProjectValue,
|
||||||
|
}
|
||||||
|
getDetails(params).then(({data}) => {
|
||||||
|
this.tableData = data.rows
|
||||||
|
this.total = data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getUnit() {
|
||||||
|
getUnitList().then(res => {
|
||||||
|
this.formData.materialReqUnitList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleUnit(val) {
|
||||||
|
this.formData.materialReqUnitValue = val
|
||||||
|
},
|
||||||
|
getProject() {
|
||||||
|
getProjectList().then(res => {
|
||||||
|
this.formData.materialReqProjectList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleProject(val) {
|
||||||
|
this.formData.materialReqProjectValue = val
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleReset() {
|
||||||
|
this.$refs.form.resetFields()
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content{
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
<div class="bg"></div>
|
<div class="bg"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<materialAnalysisDialog ref="materialAnalysisDialog"></materialAnalysisDialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -25,7 +26,12 @@
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import 'echarts-gl' // 3d图表库
|
import 'echarts-gl' // 3d图表库
|
||||||
import { getPickingAnalysisByMonthApi } from "../../api/screen";
|
import { getPickingAnalysisByMonthApi } from "../../api/screen";
|
||||||
|
import materialAnalysisDialog from "./materialAnalysisDialog";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
materialAnalysisDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
data: [],
|
data: [],
|
||||||
|
|
@ -421,6 +427,11 @@ export default {
|
||||||
if (option && typeof option === "object") {
|
if (option && typeof option === "object") {
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
}
|
}
|
||||||
|
myChart.off('click');
|
||||||
|
myChart.on('click', (params) => {
|
||||||
|
console.log('🚀 ~ myChart.on ~ params:', params);
|
||||||
|
this.$refs.materialAnalysisDialog.setOpen({open: true, maType: this.maType})
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -428,7 +439,7 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.access-rate-page {
|
.access-rate-page {
|
||||||
margin-bottom: 31px;
|
margin-bottom: 31px;
|
||||||
|
z-index: 2001;
|
||||||
.access-rate-box {
|
.access-rate-box {
|
||||||
.access-rate-box-title-bg {
|
.access-rate-box-title-bg {
|
||||||
width: 433px;
|
width: 433px;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="box_header">
|
<div class="box_header">
|
||||||
<div class="box_header_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="handleClick(item)">
|
||||||
<div :style="{ color: item.color }" class="item-value">
|
<div :style="{ color: item.color }" class="item-value">
|
||||||
{{ item.value }}
|
{{ item.value }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -63,6 +63,9 @@ export default {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
handleClick(item) {
|
||||||
|
console.log('点击', item)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue