update - 质量缺陷统计分析页面

master
yinq 11 months ago
parent ac2b303c08
commit 28a51fa954

@ -54,6 +54,15 @@ export function qualityDefectsStatisticalAnalysisList(query) {
})
}
// 质量缺陷统计分析明细
export function qualityDefectsDetailList(query) {
return request({
url: '/report/qualityReport/qualityDefectsDetailList',
method: 'get',
params: query
})
}
// 少错件报表
export function fewerMistakesReportList(query) {
return request({

@ -19,6 +19,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料编号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入物料编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单类型" prop="orderType">
<el-select v-model="queryParams.orderType" placeholder="请选择工单类型" clearable>
<el-option

@ -1,42 +1,42 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="产线" prop="PRODUCT_LINE_NAME">
<el-select v-model="queryParams.WORK_CENTER_CODE" placeholder="请选择产线">
<el-form-item label="产线" prop="PRODUCT_LINE_CODE">
<el-select v-model="queryParams.PRODUCT_LINE_CODE" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
:label="item.workCenterName"
:value="item.workCenterCode"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="产品编码" prop="MATERIAL_CODE">-->
<!-- <el-input-->
<!-- v-model="queryParams.MATERIAL_CODE"-->
<!-- placeholder="请输入产品编码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品名称" prop="MATERIAL_NAME">-->
<!-- <el-input-->
<!-- v-model="queryParams.MATERIAL_NAME"-->
<!-- placeholder="请输入产品名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="SAP订单编号" prop="ORDER_CODE">-->
<!-- <el-input-->
<!-- v-model="queryParams.ORDER_CODE"-->
<!-- placeholder="请输入SAP计划编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品编码" prop="MATERIAL_CODE">-->
<!-- <el-input-->
<!-- v-model="queryParams.MATERIAL_CODE"-->
<!-- placeholder="请输入产品编码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品名称" prop="MATERIAL_NAME">-->
<!-- <el-input-->
<!-- v-model="queryParams.MATERIAL_NAME"-->
<!-- placeholder="请输入产品名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="SAP订单编号" prop="ORDER_CODE">-->
<!-- <el-input-->
<!-- v-model="queryParams.ORDER_CODE"-->
<!-- placeholder="请输入SAP计划编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="工位">
<el-select v-model="queryParams.stationCode" placeholder="请选择工位">
<el-select v-model="queryParams.STATION_CODE" placeholder="请选择工位">
<el-option
v-for="item in findStationList"
:key="item.productLineCode"
@ -49,7 +49,7 @@
<el-date-picker
v-model="daterangeBeginTime"
style="width: 340px"
value-format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
@ -79,15 +79,13 @@
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="工厂" align="center" prop="PRODUCT_STATION" v-if="columns[1].visible"/>
<el-table-column label="产线" align="center" prop="ORDER_CODE" v-if="columns[2].visible"/>
<el-table-column label="质检工位" align="center" prop="MATERIAL_CODE" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="检测数不合格数" align="center" prop="MATERIAL_NAME" v-if="columns[4].visible"/>
<el-table-column label="合格率(%)" align="center" prop="PRODUCT_CODE" v-if="columns[5].visible"/>
<el-table-column label="工厂" align="center" prop="FACTORY_NAME" v-if="columns[1].visible"/>
<el-table-column label="产线编号" align="center" prop="PRODUCT_LINE_CODE" v-if="columns[2].visible"/>
<el-table-column label="产线名称" align="center" prop="PRODUCT_LINE_NAME" v-if="columns[3].visible"/>
<el-table-column label="质检工位编号" align="center" prop="STATION_CODE" v-if="columns[4].visible"/>
<el-table-column label="质检工位名称" align="center" prop="STATION_NAME" v-if="columns[5].visible"/>
<el-table-column label="检测数不合格数" align="center" prop="REWORK_NUMBER" v-if="columns[6].visible"/>
<el-table-column label="合格率(%)" align="center" prop="RATE" v-if="columns[7].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -95,8 +93,8 @@
type="text"
icon="el-icon-edit"
@click="handleOrderDetails(scope.row)"
v-hasPermi="['report:pointDnb:edit']"
>查看缺陷明细</el-button>
>查看缺陷明细
</el-button>
</template>
</el-table-column>
</el-table>
@ -108,16 +106,52 @@
<!-- @pagination="getList"-->
<!-- />-->
<!-- 添加或修改记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row gutter="15">
<el-col :span="11">
<el-form-item label="产线" prop="PRODUCT_LINE_NAME">
<el-input v-model="form.PRODUCT_LINE_NAME" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="质检工位" prop="STATION_NAME">
<el-input v-model="form.STATION_NAME" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">工位缺陷明细信息</el-divider>
<el-table :data="qualityDefectstList" ref="detailElectricalinspection"
>
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="序号" prop="SEQ" width="150">
</el-table-column>
<el-table-column label="缺陷名称" prop="QUALITY_DEFECT_NAME" width="150">
</el-table-column>
<el-table-column label="数量" prop="DEFECT_NUMBER" width="150">
</el-table-column>
<el-table-column label="比例" prop="RATE" width="150">
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
qualityDefectsStatisticalAnalysisList
qualityDefectsStatisticalAnalysisList,
qualityDefectsDetailList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
import { getPointDnb } from '@//api/report/pointDnb'
export default {
name: 'ReportInfo',
@ -138,6 +172,8 @@ export default {
total: 0,
//
reportList: [],
//
qualityDefectstList: [],
//
title: '',
//
@ -150,8 +186,8 @@ export default {
// pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
STATION_CODE: null,
PRODUCT_LINE_CODE: 'CX_02',
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
@ -163,13 +199,13 @@ export default {
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: ``, visible: true },
{ key: 2, label: `订单编号`, visible: true },
{ key: 3, label: `物料编码`, visible: true },
{ key: 4, label: `物料名称`, visible: true },
{ key: 5, label: `产品编码`, visible: true },
{ key: 6, label: `产品型号`, visible: true },
{ key: 7, label: `数量`, visible: true },
{ key: 1, label: ``, visible: true },
{ key: 2, label: `产线编号`, visible: false },
{ key: 3, label: `产线名称`, visible: true },
{ key: 4, label: `质检工位编号`, visible: false },
{ key: 5, label: `质检工位名称`, visible: true },
{ key: 6, label: `检测数不合格数`, visible: true },
{ key: 7, label: `合格率(%)`, visible: true }
],
// 线
productLineList: [],
@ -181,12 +217,12 @@ export default {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
})
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
findProductLineList({ productLineType: 2, stationType: 2 }).then(response => {
this.findStationList = response.data
})
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate
this.daterangeBeginTime[1] = nowDate
this.daterangeBeginTime[0] = nowDate + ' 00:00:00'
this.daterangeBeginTime[1] = nowDate + ' 23:59:59'
this.getList()
},
methods: {
@ -201,8 +237,8 @@ export default {
this.queryParams.endBeginTime = null
}
qualityDefectsStatisticalAnalysisList(this.queryParams).then(response => {
// this.reportList = response.data
// this.total = response.total;
this.reportList = response.data
this.total = response.total
this.loading = false
})
},
@ -234,9 +270,23 @@ export default {
this.resetForm('queryForm')
this.handleQuery()
},
/** 查看明细 */
handleOrderDetails(row) {
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE});
this.reset()
const objId = row.objId || this.ids
this.open = true
qualityDefectsDetailList({
stationCode: row.STATION_CODE,
beginBeginTime: this.queryParams.beginBeginTime,
endBeginTime: this.queryParams.endBeginTime
}).then(response => {
this.qualityDefectstList = response.data
this.form.PRODUCT_LINE_NAME = row.PRODUCT_LINE_NAME
this.form.STATION_NAME = row.STATION_NAME
this.open = true
this.title = '缺陷明细'
})
},
//

Loading…
Cancel
Save