update - 修改质量报表

master
yinq 8 months ago
parent c2ac70c178
commit 9d12ae43a3

@ -1,6 +1,16 @@
<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="100px">
<el-form-item label="产线" prop="productLineCode">
<el-select v-model="queryParams.productLineCode" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="SAP计划编号" prop="orderCode"> <el-form-item label="SAP计划编号" prop="orderCode">
<el-input <el-input
v-model="queryParams.orderCode" v-model="queryParams.orderCode"
@ -33,20 +43,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="实际开始时间"> <el-form-item label="计划开始日期">
<el-date-picker <el-date-picker
v-model="daterangeBeginTime" v-model="daterangeEndTime"
style="width: 340px" style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss" 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 label="实际完成时间"> <el-form-item label="实际开始时间">
<el-date-picker <el-date-picker
v-model="daterangeEndTime" v-model="daterangeBeginTime"
style="width: 340px" style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" type="datetimerange"
@ -127,12 +137,12 @@
<el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[12].visible"/> <el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[12].visible"/>
<el-table-column label="计划开始日期" align="center" prop="planBeginTime" width="100" v-if="columns[20].visible"/> <el-table-column label="计划开始日期" align="center" prop="planBeginTime" width="100" v-if="columns[20].visible"/>
<el-table-column label="计划完成日期" align="center" prop="planEndTime" width="100" v-if="columns[21].visible"/> <el-table-column label="计划完成日期" align="center" prop="planEndTime" width="100" v-if="columns[21].visible"/>
<el-table-column label="实际开始时间" align="center" prop="beginTime" width="100" v-if="columns[13].visible"> <el-table-column label="实际开始时间" align="center" prop="beginTime" width="180" v-if="columns[13].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际完成时间" align="center" prop="endTime" width="100" v-if="columns[14].visible"> <el-table-column label="实际完成时间" align="center" prop="endTime" width="180" v-if="columns[14].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
@ -299,7 +309,7 @@ export default {
saleorderLinenumber: null, saleorderLinenumber: null,
materialCode: null, materialCode: null,
materialName: null, materialName: null,
productLineCode: null, productLineCode: 'CX_02',
planAmount: null, planAmount: null,
completeAmount: null, completeAmount: null,
beginTime: null, beginTime: null,
@ -347,7 +357,7 @@ export default {
this.queryParams.orderCode = this.$route.query.orderCode; this.queryParams.orderCode = this.$route.query.orderCode;
} }
this.getList() this.getList()
findProductLineList().then(response => { findProductLineList({productLineType: 1}).then(response => {
this.productLineList = response.data this.productLineList = response.data
}) })
}, },

@ -1,8 +1,8 @@
<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="100px">
<el-form-item label="产线" prop="productLineCode"> <el-form-item label="SAP订单产线" prop="productLineCode">
<el-select v-model="queryParams.productLineCode" placeholder="请选择产线" clearable> <el-select v-model="queryParams.productLineCode" placeholder="请选择SAP订单产线" clearable>
<el-option <el-option
v-for="item in productLineList" v-for="item in productLineList"
:key="item.productLineCode" :key="item.productLineCode"
@ -35,10 +35,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="箱体码" prop="boxCode"> <el-form-item label="产品型号" prop="productModel">
<el-input <el-input
v-model="queryParams.boxCode" v-model="queryParams.productModel"
placeholder="请输入箱体码" placeholder="请输入产品型号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -257,7 +257,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('report/productOffLine/export', { this.download('report/productionReport/boxTraceabilityReport/export', {
...this.queryParams ...this.queryParams
}, `productOffLine_${new Date().getTime()}.xlsx`) }, `productOffLine_${new Date().getTime()}.xlsx`)
} }

@ -47,16 +47,24 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">--> <el-col :span="1.5">
<!-- <el-button--> <el-button
<!-- type="warning"--> type="info"
<!-- plain--> plain
<!-- icon="el-icon-download"--> size="mini"
<!-- size="mini"--> >合计数量{{ totalSum }}
<!-- @click="handleExport"--> </el-button>
<!-- >导出--> </el-col>
<!-- </el-button>--> <el-col :span="1.5">
<!-- </el-col>--> <el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
@ -121,6 +129,8 @@ export default {
reportList: [], reportList: [],
// //
title: '', title: '',
//
totalSum: 0,
// //
open: false, open: false,
// //
@ -184,6 +194,10 @@ export default {
} }
fewerMistakesReportList(this.queryParams).then(response => { fewerMistakesReportList(this.queryParams).then(response => {
this.reportList = response.data this.reportList = response.data
this.totalSum = 0;
this.reportList.forEach(e => {
this.totalSum += e.DEFECT_NUMBER
})
this.total = response.total this.total = response.total
this.loading = false this.loading = false
}) })
@ -233,9 +247,9 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('/report/productionReport/export', { this.download('/report/qualityReport/fewerMistakesReportList/export', {
...this.queryParams ...this.queryParams
}, `report_${new Date().getTime()}.xlsx`) }, `少错件报表_${new Date().getTime()}.xlsx`)
} }
} }

@ -74,6 +74,8 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="info" type="info"
plain
size="mini"
>合计数量{{ totalSum }} >合计数量{{ totalSum }}
</el-button> </el-button>
<!-- <el-button--> <!-- <el-button-->

@ -12,7 +12,7 @@
</el-select> </el-select>
</el-form-item> </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="请选择工位" multiple clearable>
<el-option <el-option
v-for="item in findStationList" v-for="item in findStationList"
:key="item.productLineCode" :key="item.productLineCode"
@ -39,16 +39,24 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">--> <el-col :span="1.5">
<!-- <el-button--> <el-button
<!-- type="warning"--> type="info"
<!-- plain--> plain
<!-- icon="el-icon-download"--> size="mini"
<!-- size="mini"--> >合计数量{{ totalSum }}
<!-- @click="handleExport"--> </el-button>
<!-- >导出--> </el-col>
<!-- </el-button>--> <el-col :span="1.5">
<!-- </el-col>--> <el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
@ -146,6 +154,8 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
//
totalSum: 0,
// //
reportList: [], reportList: [],
// //
@ -162,7 +172,8 @@ export default {
// pageSize: 10, // pageSize: 10,
beginBeginTime: null, beginBeginTime: null,
endBeginTime: null, endBeginTime: null,
STATION_CODE: null, STATION_CODE: [],
stationCodeList: null,
PRODUCT_LINE_CODE: 'CX_02', PRODUCT_LINE_CODE: 'CX_02',
ORDER_CODE: null, ORDER_CODE: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
@ -212,8 +223,15 @@ export default {
this.queryParams.beginBeginTime = null this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null this.queryParams.endBeginTime = null
} }
if (this.queryParams.STATION_CODE.length > 0) {
this.queryParams.stationCodeList = this.queryParams.STATION_CODE.join(',')
}
qualityDefectsStatisticalAnalysisList(this.queryParams).then(response => { qualityDefectsStatisticalAnalysisList(this.queryParams).then(response => {
this.reportList = response.data this.reportList = response.data
this.totalSum = 0;
this.reportList.forEach(e => {
this.totalSum += e.REWORK_NUMBER
})
this.total = response.total this.total = response.total
this.loading = false this.loading = false
}) })
@ -230,6 +248,8 @@ export default {
WORK_CENTER_CODE: null, WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null, PRODUCT_LINE_NAME: null,
ORDER_CODE: null, ORDER_CODE: null,
STATION_CODE: [],
stationCodeList: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
MATERIAL_NAME: null, MATERIAL_NAME: null,
BEGIN_DATE: null BEGIN_DATE: null
@ -277,9 +297,9 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('/report/productionReport/export', { this.download('/report/qualityReport/qualityDefectsStatisticalAnalysisList/export', {
...this.queryParams ...this.queryParams
}, `report_${new Date().getTime()}.xlsx`) }, `质量缺陷统计分析_${new Date().getTime()}.xlsx`)
} }
} }

@ -11,40 +11,40 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="产品编码" prop="MATERIAL_CODE">--> <!-- <el-form-item label="产品编码" prop="MATERIAL_CODE">-->
<!-- <el-input--> <!-- <el-input-->
<!-- v-model="queryParams.MATERIAL_CODE"--> <!-- v-model="queryParams.MATERIAL_CODE"-->
<!-- placeholder="请输入产品编码"--> <!-- placeholder="请输入产品编码"-->
<!-- clearable--> <!-- clearable-->
<!-- @keyup.enter.native="handleQuery"--> <!-- @keyup.enter.native="handleQuery"-->
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-form-item label="产品名称" prop="MATERIAL_NAME">--> <el-form-item label="型号" prop="MATERIAL_MODEL">
<!-- <el-input--> <el-input
<!-- v-model="queryParams.MATERIAL_NAME"--> v-model="queryParams.MATERIAL_MODEL"
<!-- placeholder="请输入产品名称"--> placeholder="请输入型号"
<!-- clearable--> clearable
<!-- @keyup.enter.native="handleQuery"--> @keyup.enter.native="handleQuery"
<!-- />--> />
<!-- </el-form-item>--> </el-form-item>
<!-- <el-form-item label="SAP订单编号" prop="ORDER_CODE">--> <!-- <el-form-item label="SAP订单编号" prop="ORDER_CODE">-->
<!-- <el-input--> <!-- <el-input-->
<!-- v-model="queryParams.ORDER_CODE"--> <!-- v-model="queryParams.ORDER_CODE"-->
<!-- placeholder="请输入SAP计划编号"--> <!-- placeholder="请输入SAP计划编号"-->
<!-- clearable--> <!-- clearable-->
<!-- @keyup.enter.native="handleQuery"--> <!-- @keyup.enter.native="handleQuery"-->
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-form-item label="工位">--> <!-- <el-form-item label="工位">-->
<!-- <el-select v-model="queryParams.stationCode" placeholder="请选择工位">--> <!-- <el-select v-model="queryParams.stationCode" placeholder="请选择工位">-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="item in findStationList"--> <!-- v-for="item in findStationList"-->
<!-- :key="item.productLineCode"--> <!-- :key="item.productLineCode"-->
<!-- :label="item.productLineName"--> <!-- :label="item.productLineName"-->
<!-- :value="item.productLineCode"--> <!-- :value="item.productLineCode"-->
<!-- ></el-option>--> <!-- ></el-option>-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="起止时间"> <el-form-item label="起止时间">
<el-date-picker <el-date-picker
v-model="daterangeBeginTime" v-model="daterangeBeginTime"
@ -63,16 +63,24 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">--> <el-col :span="1.5">
<!-- <el-button--> <el-button
<!-- type="warning"--> type="info"
<!-- plain--> plain
<!-- icon="el-icon-download"--> size="mini"
<!-- size="mini"--> >合计数量{{ totalSum }}
<!-- @click="handleExport"--> </el-button>
<!-- >导出--> </el-col>
<!-- </el-button>--> <el-col :span="1.5">
<!-- </el-col>--> <el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
@ -81,21 +89,20 @@
<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="FACTORY_NAME" 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="PRODUCT_LINE_NAME" 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="QUALITY_DEFECT_NAME" v-if="columns[3].visible"> <el-table-column label="型号" align="center" prop="MATERIAL_MODEL" v-if="columns[6].visible"/>
<el-table-column label="缺陷名称" align="center" prop="QUALITY_DEFECT_NAME" v-if="columns[3].visible"/>
</el-table-column>
<el-table-column label="数量" align="center" prop="Q_SUM" v-if="columns[4].visible"/> <el-table-column label="数量" align="center" prop="Q_SUM" v-if="columns[4].visible"/>
<el-table-column label="缺陷占比" align="center" prop="OFFLINE_NUM" v-if="columns[5].visible"/> <el-table-column label="缺陷占比" align="center" prop="OFFLINE_NUM" v-if="columns[5].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-->
<!-- size="mini"--> <!-- size="mini"-->
<!-- type="text"--> <!-- type="text"-->
<!-- icon="el-icon-edit"--> <!-- icon="el-icon-edit"-->
<!-- @click="handleOrderDetails(scope.row)"--> <!-- @click="handleOrderDetails(scope.row)"-->
<!-- >查看订单明细</el-button>--> <!-- >查看订单明细</el-button>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
<!-- <pagination--> <!-- <pagination-->
<!-- v-show="total>0"--> <!-- v-show="total>0"-->
@ -136,6 +143,8 @@ export default {
reportList: [], reportList: [],
// //
title: '', title: '',
//
totalSum: 0,
// //
open: false, open: false,
// //
@ -151,6 +160,7 @@ export default {
ORDER_CODE: null, ORDER_CODE: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
MATERIAL_NAME: null, MATERIAL_NAME: null,
MATERIAL_MODEL: null,
BEGIN_DATE: null BEGIN_DATE: null
}, },
// //
@ -164,6 +174,7 @@ export default {
{ 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 }
], ],
// 线 // 线
productLineList: [], productLineList: [],
@ -175,9 +186,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 }).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 + ' 00:00:00' this.daterangeBeginTime[0] = nowDate + ' 00:00:00'
this.daterangeBeginTime[1] = nowDate + ' 23:59:59' this.daterangeBeginTime[1] = nowDate + ' 23:59:59'
@ -196,7 +207,11 @@ export default {
} }
qualityIssuesReportList(this.queryParams).then(response => { qualityIssuesReportList(this.queryParams).then(response => {
this.reportList = response.data this.reportList = response.data
this.total = response.total; this.totalSum = 0;
this.reportList.forEach(e => {
this.totalSum += e.Q_SUM
})
this.total = response.total
this.loading = false this.loading = false
}) })
}, },
@ -230,7 +245,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 })
}, },
// //
@ -242,9 +257,9 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('/report/productionReport/export', { this.download('/report/qualityReport/qualityIssuesReportList/export', {
...this.queryParams ...this.queryParams
}, `report_${new Date().getTime()}.xlsx`) }, `质量问题前80报表_${new Date().getTime()}.xlsx`)
} }
} }

Loading…
Cancel
Save