update - 少错件报表

master
yinq 10 months ago
parent cb749ff36d
commit abc134c293

@ -1,42 +1,18 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="产线" prop="PRODUCT_LINE_NAME"> <el-form-item label="产线" prop="PRODUCT_LINE_CODE">
<el-select v-model="queryParams.WORK_CENTER_CODE" placeholder="请选择产线"> <el-select v-model="queryParams.PRODUCT_LINE_CODE" placeholder="请选择产线">
<el-option <el-option
v-for="item in productLineList" v-for="item in productLineList"
:key="item.workCenterCode" :key="item.productLineCode"
:label="item.workCenterName" :label="item.productLineName"
:value="item.workCenterCode" :value="item.productLineCode"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </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-form-item label="工位">
<el-select v-model="queryParams.stationCode" placeholder="请选择工位"> <el-select v-model="queryParams.STATION_CODE" placeholder="请选择工位">
<el-option <el-option
v-for="item in findStationList" v-for="item in findStationList"
:key="item.productLineCode" :key="item.productLineCode"
@ -45,15 +21,23 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="起止时间"> <el-form-item label="型号" prop="MATERIAL_MODEL">
<el-input
v-model="queryParams.MATERIAL_MODEL"
placeholder="请输入型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="起止日期">
<el-date-picker <el-date-picker
v-model="daterangeBeginTime" v-model="daterangeBeginTime"
style="width: 340px" style="width: 240px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="datetimerange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始时间" start-placeholder="开始日期"
end-placeholder="结束时间" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -79,17 +63,13 @@
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <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="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="FACTORY_NAME" 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="PRODUCT_LINE_NAME" v-if="columns[2].visible"/>
<el-table-column label="日期" align="center" prop="MATERIAL_CODE" v-if="columns[3].visible"> <el-table-column label="日期" align="center" prop="INSPECTOR_TIME" v-if="columns[3].visible"/>
<template slot-scope="scope"> <el-table-column label="工位" align="center" prop="STATION_NAME" v-if="columns[4].visible"/>
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span> <el-table-column label="型号" align="center" prop="MATERIAL_MODEL" v-if="columns[5].visible"/>
</template> <el-table-column label="问题点" align="center" prop="QUALITY_DEFECT_NAME" v-if="columns[6].visible"/>
</el-table-column> <el-table-column label="数量" align="center" prop="DEFECT_NUMBER" v-if="columns[7].visible"/>
<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="PRODUCT_CODE" v-if="columns[6].visible"/>
<el-table-column label="数量" align="center" prop="PRODUCT_CODE" v-if="columns[7].visible"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">--> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-button--> <!-- <el-button-->
@ -115,11 +95,10 @@
<script> <script>
import { import {
qualityDefectsStatisticalAnalysisList fewerMistakesReportList
} from '@/api/report/reportAPI' } from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine' import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi' import { parseTime } from '@//utils/ruoyi'
import { getPointDnb } from '@//api/report/pointDnb'
export default { export default {
name: 'ReportInfo', name: 'ReportInfo',
@ -144,7 +123,7 @@ export default {
title: '', title: '',
// //
open: false, open: false,
// //
daterangeBeginTime: [], daterangeBeginTime: [],
// //
queryParams: { queryParams: {
@ -153,8 +132,9 @@ export default {
beginBeginTime: null, beginBeginTime: null,
endBeginTime: null, endBeginTime: null,
WORK_CENTER_CODE: null, WORK_CENTER_CODE: null,
PRODUCT_LINE_CODE: 'CX_02',
PRODUCT_LINE_NAME: null, PRODUCT_LINE_NAME: null,
ORDER_CODE: null, MATERIAL_MODEL: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
MATERIAL_NAME: null, MATERIAL_NAME: null,
BEGIN_DATE: null BEGIN_DATE: null
@ -165,13 +145,13 @@ export default {
rules: {}, rules: {},
columns: [ columns: [
{ key: 0, label: `主键标识`, visible: false }, { key: 0, label: `主键标识`, visible: false },
{ key: 1, label: ``, visible: true }, { key: 1, label: ``, visible: true },
{ key: 2, label: `订单编号`, visible: true }, { key: 2, label: `产线`, visible: true },
{ key: 3, label: `物料编码`, visible: true }, { key: 3, label: `日期`, visible: true },
{ key: 4, label: `物料名称`, visible: true }, { key: 4, label: `工位`, visible: true },
{ key: 5, label: `产品编码`, visible: true }, { key: 5, label: `型号`, visible: true },
{ key: 6, label: `产品型号`, visible: true }, { key: 6, label: `问题点`, visible: true },
{ key: 7, label: `数量`, visible: true }, { key: 7, label: `数量`, visible: true }
], ],
// 线 // 线
productLineList: [], productLineList: [],
@ -183,9 +163,9 @@ export default {
findProductLineList({ productLineType: 1 }).then(response => { findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data this.productLineList = response.data
}) })
findProductLineList({productLineType: 2}).then(response => { findProductLineList({ productLineType: 2, stationType: 2 }).then(response => {
this.findStationList = response.data; this.findStationList = response.data
}); })
const nowDate = parseTime(new Date(), '{y}-{m}-{d}') const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate this.daterangeBeginTime[0] = nowDate
this.daterangeBeginTime[1] = nowDate this.daterangeBeginTime[1] = nowDate
@ -202,9 +182,9 @@ export default {
this.queryParams.beginBeginTime = null this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null this.queryParams.endBeginTime = null
} }
qualityDefectsStatisticalAnalysisList(this.queryParams).then(response => { fewerMistakesReportList(this.queryParams).then(response => {
// this.reportList = response.data this.reportList = response.data
// this.total = response.total; this.total = response.total
this.loading = false this.loading = false
}) })
}, },
@ -217,9 +197,12 @@ export default {
reset() { reset() {
this.daterangeBeginTime = [] this.daterangeBeginTime = []
this.form = { this.form = {
beginBeginTime: null,
endBeginTime: null,
WORK_CENTER_CODE: null, WORK_CENTER_CODE: null,
PRODUCT_LINE_CODE: null,
PRODUCT_LINE_NAME: null, PRODUCT_LINE_NAME: null,
ORDER_CODE: null, MATERIAL_MODEL: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
MATERIAL_NAME: null, MATERIAL_NAME: null,
BEGIN_DATE: null BEGIN_DATE: null
@ -238,7 +221,7 @@ export default {
}, },
/** 查看明细 */ /** 查看明细 */
handleOrderDetails(row) { handleOrderDetails(row) {
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE}); this.$tab.openPage('SAP订单信息', '/order/orderInfo', { ORDER_CODE: row.ORDER_CODE })
}, },
// //

@ -11,30 +11,6 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </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-form-item label="工位">
<el-select v-model="queryParams.STATION_CODE" placeholder="请选择工位"> <el-select v-model="queryParams.STATION_CODE" placeholder="请选择工位">
<el-option <el-option

Loading…
Cancel
Save