巡检报告

yangwl
zhaoxiaolin 9 months ago
parent 98d72af284
commit 82de7503d3

@ -43,3 +43,13 @@ export function delProduce(recordId) {
}); });
} }
export function getProduceReportXJ(orderNo) {
const data = {
orderNo
}
return request({
url: '/quality/qcProduceReport/getProduceReportXJ',
method: 'post',
data: data
});
}

@ -1,18 +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="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="任务编号" prop="checkNo"> <el-form-item label="订单编码" prop="orderNo">
<el-input <el-input
v-model="queryParams.checkNo" v-model="queryParams.orderNo"
placeholder="请输入检验任务编号" placeholder="请输入物料编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料编码" prop="materialCode">
<el-input <el-input
v-model="queryParams.materialName" v-model="queryParams.materialCode"
placeholder="请输入物料名称" placeholder="请输入物料编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -72,6 +72,7 @@
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="incomeList" @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="recordId" align="center" prop="recordId" v-if="false"/> <el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
<el-table-column label="任务日期" align="center" prop="createTimeStr" width="100"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/> <el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="150"/> <el-table-column label="订单号" align="center" prop="orderNo" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/> <el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
@ -101,7 +102,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -114,7 +115,7 @@
<el-dialog :title="title" :visible.sync="open" width="1370px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1370px" append-to-body>
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<el-button <el-button
class="print-btn" class="print-btn"
size="mini" size="mini"
type="primary" type="primary"
@ -124,8 +125,8 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 打印整个printFrom区域 --> <!-- 打印整个printFrom区域 -->
<div id="printFrom"> <div id="printForm">
<el-form :ref="formRef" :model="form" :rules="validateRules"> <el-form :ref="formRef" :model="form">
<!-- 表头-工单信息 --> <!-- 表头-工单信息 -->
<el-row> <el-row>
<el-col :offset="7" :span="10" class="center-text"> <el-col :offset="7" :span="10" class="center-text">
@ -139,11 +140,11 @@
</el-row> </el-row>
<!-- 导航栏 --> <!-- 导航栏 -->
<el-row class="my-print-nav"> <el-row class="my-print-nav">
<el-col :span="4">生成车间:{{printData.workCenter}}</el-col> <el-col :span="3">生成车间:{{form.supplierName}}</el-col>
<el-col :span="4">生成线体:{{printData.workCenter}}</el-col> <el-col :span="3">生成线体:{{form.lineName}}</el-col>
<el-col :span="4">检查日期:{{printData.productDate}}</el-col> <el-col :span="3">检查日期:{{form.checkTimeStart}}</el-col>
<el-col :span="4">产品名称:{{printData.printDate}}</el-col> <el-col :span="4">产品名称:{{form.materialName}}</el-col>
<el-col :span="4">批次号:{{printData.printDate}}</el-col> <el-col :span="6">批次号:{{form.incomeBatchNo}}</el-col>
<el-col :span="4">生产类型: <el-col :span="4">生产类型:
<el-checkbox-group v-model="checkList"> <el-checkbox-group v-model="checkList">
<el-checkbox label="正常"></el-checkbox> <el-checkbox label="正常"></el-checkbox>
@ -157,7 +158,7 @@
v-if="refreshNewWorkerTable" v-if="refreshNewWorkerTable"
v-loading="newWorkerLoading" v-loading="newWorkerLoading"
class="my-print-table" class="my-print-table"
:data="printData.workTable" :data="form.checkInfos"
border border
style="width: 100%"> style="width: 100%">
<el-table-column label="id" align="center" prop="recordId" v-if="false"/> <el-table-column label="id" align="center" prop="recordId" v-if="false"/>
@ -188,11 +189,11 @@
<el-row class="my-print-foot"> <el-row class="my-print-foot">
<el-col :offset="1" :span="3">检查人:</el-col> <el-col :offset="1" :span="3">检查人:</el-col>
<el-col :offset="2" :span="3">品质主管:</el-col> <el-col :offset="2" :span="3">品质主管:</el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
@ -202,7 +203,7 @@
<el-dialog :title="title" :visible.sync="firstReportOpen" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="firstReportOpen" width="1000px" append-to-body>
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<el-button <el-button
class="print-btn" class="print-btn"
size="mini" size="mini"
type="primary" type="primary"
@ -213,12 +214,9 @@
</el-row> </el-row>
<!-- 打印整个firstReportPrint区域 --> <!-- 打印整个firstReportPrint区域 -->
<div id="firstReportPrint"> <div id="firstReportPrint">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" label-width="100px">
<el-row> <el-row>
<el-col :span="7"> <el-col :offset="7" :span="10" class="center-text">
<img src="@/assets/logo/lanjv.png" class="report-logo"/>
</el-col>
<el-col :span="10" class="center-text">
<h1>中山榄菊日化实业有限公司</h1> <h1>中山榄菊日化实业有限公司</h1>
</el-col> </el-col>
</el-row> </el-row>
@ -254,14 +252,14 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="首检原因" > <el-form-item label="首检原因" >
<el-input disabled/> <el-input disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<!-- 检验项目明细 --> <!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" > <el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
@ -280,7 +278,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.status"/> <dict-tag :options="dict.type.check_result" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
@ -314,7 +312,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleDone"> </el-button> <el-button type="primary" @click="handleDone"> </el-button>
</div> </div>
@ -323,7 +321,7 @@
</template> </template>
<script> <script>
import { listProduce, getProduce, delProduce, addProduce, updateIncome} from "@/api/quality/produceReport"; import { listProduce, getProduce, delProduce, addProduce, updateIncome,getProduceReportXJ} from "@/api/quality/produceReport";
import { getCkeckProjectList} from "@/api/quality/incomeReport"; import { getCkeckProjectList} from "@/api/quality/incomeReport";
import { getCheckTypes } from "@/api/quality/qcProduce"; import { getCheckTypes } from "@/api/quality/qcProduce";
import moment from 'moment'; import moment from 'moment';
@ -351,7 +349,7 @@ export default {
validateRules: [], validateRules: [],
checkList: [], checkList: [],
printData: { printData: {
printable: 'printFrom', printable: 'printForm',
ignore: ['no-print'], ignore: ['no-print'],
workCenter: "暂无数据", workCenter: "暂无数据",
SAPNo: null, SAPNo: null,
@ -360,7 +358,12 @@ export default {
printDate: null, printDate: null,
factory: null, factory: null,
productDate: null, productDate: null,
workTable: [], supplierName:null,
lineName:null,
checkTimeStart:null,
materialName:null,
incomeBatchNo:null,
checkInfos:[]
}, },
printDialogVisible: false, printDialogVisible: false,
// //
@ -432,7 +435,7 @@ export default {
getDate() { getDate() {
let start = this.Fungetdate (0) let start = this.Fungetdate (0)
let end = this.Fungetdate (1) let end = this.Fungetdate (1)
this.queryParams.incomeTimeArray.push(start,end) //this.queryParams.incomeTimeArray.push(start,end)
this.queryParams.checkTimeArray.push(start,end) this.queryParams.checkTimeArray.push(start,end)
}, },
Fungetdate (num) { Fungetdate (num) {
@ -495,7 +498,7 @@ export default {
updateTime: null, updateTime: null,
factoryCode: null, factoryCode: null,
delFlag: null, delFlag: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -525,7 +528,7 @@ export default {
handleLook(row) { handleLook(row) {
this.reset(); this.reset();
const recordId = row.recordId || this.ids const recordId = row.recordId || this.ids
if(row.checkType =='checkTypeSC') { if(row.checkType =='checkTypeSC') {
getProduce(recordId).then(response => { getProduce(recordId).then(response => {
this.form = response.data; this.form = response.data;
@ -538,22 +541,20 @@ export default {
this.queryParams.recordId = recordId; this.queryParams.recordId = recordId;
this.getCheckedProjectList(); this.getCheckedProjectList();
}else { }else {
//
this.form.printable = 'printForm'; //
this.form.ignore = ['no-print'];//
this.open = true;
this.title = "巡检检验报告";
const orderNo = row.orderNo; const orderNo = row.orderNo;
getProduceXJ(orderNo).then(response => { getProduceReportXJ(orderNo).then(response => {
this.form = response.data; this.form = response;
// //
this.form.printable = 'firstReportPrint'; // this.form.printable = 'printForm'; //
this.form.ignore = ['no-print'];// this.form.ignore = ['no-print'];//
this.firstReportOpen = true; this.open = true;
this.title = "首检检验报告"; this.title = "巡检检验报告";
this.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false
}) })
} }
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
@ -602,9 +603,9 @@ export default {
}, },
// - // -
handlePrint(params) { handlePrint(params) {
console.log(this.form);
printJS({ printJS({
printable: params.printable, // 'printFrom', // id printable: params.printable, // id
type: params.type || 'html', type: params.type || 'html',
maxWidth: 1500, // maxWidth: 1500, //
font_size: "",// font_size: "",//
@ -627,16 +628,11 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
margin-left: 10px; margin-left: 10px;
} }
.center-text { .center-text {
text-align: center; text-align: center;
} }
.report-logo {
margin-top: 15px;
margin-left: 15px;
height: 38px;
}
.my-print-nav { .my-print-nav {
margin-top: 15px; margin-top: 15px;
margin-bottom: 15px; margin-bottom: 15px;
} }
</style> </style>
Loading…
Cancel
Save