生产过程检报告新增批次成品检节点

master
FCD 19 hours ago
parent 555339ab82
commit 98c46a16c3

@ -105,8 +105,19 @@
size="mini"
@click="handleSCXJReportExport"
v-hasPermi="['quality:produceReport:export']"
v-if="showSCXJ"
>巡检报告Excel下载</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-document-checked"
size="mini"
@click="handleCPPCReportExport"
v-hasPermi="['quality:produceReport:export']"
>批次成品检验报告Excel下载</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -743,6 +754,150 @@
<ItemCheckProjects ref="itemCheckProjects"></ItemCheckProjects>
<!--检验项目确认弹窗巡检-->
<ItemCheckProjectsXJ ref="itemCheckProjectsXJ"></ItemCheckProjectsXJ>
<!-- 打印首检对话框 -->
<el-dialog :title="title" :visible.sync="cppcReportOpen" width="1000px" append-to-body>
<el-row>
<el-col :span="20">
<el-button
class="print-btn"
size="mini"
type="primary"
icon="el-icon-edit"
@click="handlePrint(form)"
>打印</el-button>
</el-col>
</el-row>
<!-- 打印整个firstReportPrint区域 -->
<div id="firstReportPrint">
<el-form ref="form" :model="form" label-width="130px">
<el-row>
<el-col :span="7">
<img src="@/assets/logo/lanjv.png" class="report-logo"/>
</el-col>
<el-col :span="10" class="center-text">
<h1>中山榄菊日化实业有限公司</h1>
</el-col>
</el-row>
<el-row>
<el-col :offset="8" :span="8" class="center-text">
<h2>批次检验确认表</h2>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="8">
<el-form-item label="编码" :prop="form.fileNo">
<span>{{ form.fileNo }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="产品名称/生产组" prop="materialName">
<el-input v-model="form.materialName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品编码" prop="materialCode">
<el-input v-model="form.materialCode" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检验时间" prop="checkTime">
<el-input v-model="form.checkTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="生产批次" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" >
<el-input v-model="form.reason" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" border :span-method="objectSpanMethod" ><!---->
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="left" prop="projectRuleName" />
<el-table-column label="内容" align="left" prop="ruleName" width="300"/>
<el-table-column label="判定" align="center" prop="status" width="50"
:formatter="checkStatusFormate"
/>
<el-table-column label="附件" align="center" prop="files" width="200">
<template slot-scope="scope">
<el-image v-for="(item,index) in scope.row.files" :key="index"
:src="item.fileAddress"
style="width: 100px; height: 100px"
:fit="fit" />
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="综合结论:" label-width="160px">
<el-col :span="6">
<span v-if="this.checkResult=='Y'"></span>
<span label="N" v-else>×</span>
</el-col>
<el-col :span="8">
备注:判定合格打不合格打×
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="车间组长/机管员签名" label-width="160px">
<template >
<el-image
:src="form.cxzz"
style="width: 260px; height: 100px"
:preview-src-list="form.cxzz"
fit="fill" />
<el-image
:src="form.jgy"
style="width: 260px; height: 100px"
:preview-src-list="form.jgy"
fit="fill" />
</template>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="质量管理部品管员签名" label-width="160px">
<template >
<el-image
:src="form.pgy"
style="width: 260px; height: 100px"
:preview-src-list="form.pgy"
fit="fill" />
</template>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleClose"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -753,6 +908,7 @@ import { getCheckTypes } from "@/api/quality/qcProduce";
import ItemCheckProjects from "./ItemCheckProjects.vue";
import ItemCheckProjectsXJ from "./ItemCheckProjectsXJ.vue";
import moment from 'moment';
import {parseTime} from "../../../utils/ruoyi";
export default {
name: "ProduceReport",
components: {ItemCheckProjects,ItemCheckProjectsXJ},
@ -808,6 +964,7 @@ export default {
//
open: false,
firstReportOpen: false,
cppcReportOpen: false,
//
queryParams: {
checkTimeArray: [],
@ -852,15 +1009,27 @@ export default {
},
spanArr: [],
position: 0,
excelFlag:''
excelFlag:'',
showSCXJ:false,
};
},
created() {
this.getDate();
//
const routeCheckType = this.$route.query.checkType
if (routeCheckType){
this.queryParams.checkType = routeCheckType
this.showSCXJ = true
}else {
//
this.queryParams.checkType = 'checkTypeSC'
this.showSCXJ = false
}
this.getList();
this.getCheckTypes();
},
methods: {
parseTime,
//
productCodeFormate(row, column, cellValue){
if(cellValue !=null){
@ -882,14 +1051,6 @@ export default {
return '✘'
}
},
//
checkStatusFormate(row, column, cellValue){
if(cellValue == 'Y'){
return '✓'
}else if(cellValue == 'N'){
return '✘'
}
},
//
indexMethod(index) {
return index + 1;
@ -897,9 +1058,19 @@ export default {
/****/
//
getCheckTypes() {
getCheckTypes('produce').then(response => {
this.checkTypes = response;
});
// getCheckTypes('produce').then(response => {
// this.checkTypes = response;
// });
this.checkTypes = [
{id:"checkTypeSC", checkName:"首件检验"},
{id:"checkTypeCPPC", checkName:"批次成品检验"},
]
if (this.showSCXJ){
this.checkTypes.push(
{id:"checkTypeSCXJ", checkName:"过程巡检"}
)
}
},
/**获取默认查询时间段**/
getDate() {
@ -929,11 +1100,6 @@ export default {
this.queryParams.checkTimeEnd = null;
}
const routeCheckType = this.$route.query.checkType
if (routeCheckType){
this.queryParams.checkType = routeCheckType
}
listProduce(this.queryParams).then(response => {
this.incomeList = response.rows;
this.total = response.total;
@ -1012,7 +1178,7 @@ export default {
handleLook(row) {
this.reset();
const recordId = row.recordId || this.ids
console.log(row.checkType)
if(row.checkType =='checkTypeSC') {
getProduce(recordId).then(response => {
this.form = response.data;
@ -1026,7 +1192,21 @@ export default {
})
this.queryParams.recordId = recordId;
this.getCheckedProjectList();
}else {
}else if (row.checkType === 'checkTypeCPPC'){
getProduce(recordId).then(response => {
this.form = response.data;
this.form.materialName = response.data.materialName+'/'+response.data.checkLoc;
//
this.form.printable = 'firstReportPrint'; //
this.form.ignore = ['no-print'];//
this.cppcReportOpen = true;
this.title = "批次检验报告";
this.checkResult = response.data.checkResult;
})
this.queryParams.recordId = recordId;
this.getCheckedProjectList();
} else {
const orderNo = row.orderNo;
if(row.shiftId == '5'){
getProduceReportXJ(orderNo,row.shiftId).then(response => {
@ -1207,6 +1387,24 @@ export default {
};
}
},
handleClose() {
this.cppcReportOpen = false;
this.reset();
},
/** 导出报告按钮操作 */
handleCPPCReportExport() {
if(this.excelFlag!='批次成品检验'){
this.$modal.msgSuccess("请选择批次成品检验任务");
return
}
const recordId =this.ids[0];
this.queryParams.recordId = recordId;
this.download('quality/qcProduceReport/cppcReportExport', {
...this.queryParams
}, `SCReportExport_${new Date().getTime()}.xlsx`);
this.queryParams.recordId = '';
},
}
};
</script>

Loading…
Cancel
Save