Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
f1cfbef49b
|
|
@ -8,6 +8,8 @@ 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'
|
||||
const URL_ACCEPTANCE_STORAGE = '/screen/base/largeScreen/home/getAcceptanceStorage/details'
|
||||
const URL_PICKING_ANALYSIS = '/screen/base/largeScreen/home/getPickingAnalysisByMonth/details'
|
||||
const URL_MATERIAL_RETURN_BY_MONTH = '/screen/base/largeScreen/home/getMaterialReturnByMonth/details'
|
||||
|
||||
// 设备类型
|
||||
export const getTypeList = params => GET(URL_TYPE_LIST, params)
|
||||
|
|
@ -32,3 +34,9 @@ export const getTotalOwnership = data => POST(URL_TOTAL_OWNERSHIP, data)
|
|||
|
||||
// 入库分析
|
||||
export const getAcceptanceStorage = data => POST(URL_ACCEPTANCE_STORAGE, data)
|
||||
|
||||
// 领料分析
|
||||
export const getPickingAnalysis = data => POST(URL_PICKING_ANALYSIS, data)
|
||||
|
||||
// 退料分析
|
||||
export const getMaterialReturnByMonth = data => POST(URL_MATERIAL_RETURN_BY_MONTH, data)
|
||||
|
|
@ -90,7 +90,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
open: false,
|
||||
material: false, // 领料
|
||||
formData: {
|
||||
materialReqNo: '',
|
||||
materialReqUnitValue: '',
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
<script>
|
||||
import Pagination from '../Pagination/index.vue'
|
||||
import { getDetails, getUnitList, getProjectList } from '../../api/dialog'
|
||||
import { getPickingAnalysis, getUnitList, getProjectList } from '../../api/dialog'
|
||||
|
||||
export default {
|
||||
name: 'getMaterialsDialog',
|
||||
|
|
@ -81,14 +81,12 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
open: false,
|
||||
material: false, // 领料
|
||||
formData: {
|
||||
materialReqNo: '',
|
||||
materialReqUnitValue: '',
|
||||
materialReqProjectValue: '',
|
||||
materialReqUnitList: [],
|
||||
materialReqProjectList: [],
|
||||
materialReqTypeList: [],
|
||||
},
|
||||
tableData: [],
|
||||
tableColumn: [
|
||||
|
|
@ -100,17 +98,17 @@ export default {
|
|||
},
|
||||
{
|
||||
label: '领料单号',
|
||||
prop: 'materialTime',
|
||||
prop: 'materialCode',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '领料申请单位',
|
||||
prop: 'typeName',
|
||||
prop: 'unitName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '领料申请工程',
|
||||
prop: 'typeModelName',
|
||||
prop: 'projectName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
|
|
@ -120,12 +118,12 @@ export default {
|
|||
},
|
||||
{
|
||||
label: '申请时间',
|
||||
prop: 'userName',
|
||||
prop: 'materialTime',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '申请状态',
|
||||
prop: 'materialCode',
|
||||
prop: 'statusName',
|
||||
align: 'center'
|
||||
}
|
||||
],
|
||||
|
|
@ -161,7 +159,7 @@ export default {
|
|||
unitId: this.formData.materialReqUnitValue,
|
||||
projectId: this.formData.materialReqProjectValue,
|
||||
}
|
||||
getDetails(params).then(({data}) => {
|
||||
getPickingAnalysis(params).then(({data}) => {
|
||||
this.tableData = data.rows
|
||||
this.total = data.total
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,199 @@
|
|||
<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 { getMaterialReturnByMonth, getUnitList, getProjectList } from '../../api/dialog'
|
||||
|
||||
export default {
|
||||
name: 'getMaterialsDialog',
|
||||
components: {
|
||||
Pagination
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
open: false,
|
||||
formData: {
|
||||
materialReqNo: '',
|
||||
materialReqUnitValue: '',
|
||||
materialReqProjectValue: '',
|
||||
materialReqUnitList: [],
|
||||
materialReqProjectList: [],
|
||||
},
|
||||
tableData: [],
|
||||
tableColumn: [
|
||||
{
|
||||
label: '序号',
|
||||
type: 'index',
|
||||
width: 60,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料单号',
|
||||
prop: 'materialCode',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料单位',
|
||||
prop: 'unitName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料工程',
|
||||
prop: 'projectName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料数量',
|
||||
prop: 'num',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '申请时间',
|
||||
prop: 'materialTime',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '申请状态',
|
||||
prop: 'statusName',
|
||||
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,
|
||||
}
|
||||
getMaterialReturnByMonth(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>
|
||||
|
|
@ -90,7 +90,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
open: false,
|
||||
material: false, // 领料
|
||||
formData: {
|
||||
materialReqNo: '',
|
||||
materialReqUnitValue: '',
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<h5 class="access-rate-box-title">当月领料分析</h5>
|
||||
</div>
|
||||
<div class="chart-container">
|
||||
<div class="chart" ref="chart" id="pieChartMap"></div>
|
||||
<div class="chart" ref="chart" id="pieChartMap" @click="handleClick"></div>
|
||||
<!-- 底座背景 -->
|
||||
<div class="bg"></div>
|
||||
</div>
|
||||
|
|
@ -427,12 +427,10 @@ export default {
|
|||
if (option && typeof option === "object") {
|
||||
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})
|
||||
});
|
||||
},
|
||||
handleClick() {
|
||||
this.$refs.materialAnalysisDialog.setOpen({ open: true, maType: this.maType })
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<returnMaterialAnalysisDialog ref="returnMaterial" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -23,8 +25,11 @@ import ONE from '../../assets/img/myImage/one.png';
|
|||
import TWO from '../../assets/img/myImage/TWO.png';
|
||||
import THREE from '../../assets/img/myImage/THREE.png';
|
||||
import { getMaterialReturnByMonthApi } from "../../api/screen";
|
||||
import returnMaterialAnalysisDialog from './returnMaterialAnalysisDialog';
|
||||
|
||||
export default {
|
||||
name: 'accessRatePage',
|
||||
components: { returnMaterialAnalysisDialog },
|
||||
data() {
|
||||
return {
|
||||
newArr: [
|
||||
|
|
@ -66,6 +71,7 @@ export default {
|
|||
},
|
||||
handleClick(item) {
|
||||
console.log('点击', item)
|
||||
this.$refs.returnMaterial.setOpen({ open: true, maType: this.maType })
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -73,6 +79,7 @@ export default {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.access-rate-page {
|
||||
z-index: 2002;
|
||||
margin-bottom: 31px;
|
||||
.access-rate-box {
|
||||
.access-rate-box-title-bg {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
open: false,
|
||||
material: false, // 领料
|
||||
formData: {
|
||||
scrapCode: '',
|
||||
scrapSource: '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue