巡检报告

yangwl
zhaoxiaolin 10 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"/>
@ -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"/>
@ -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>
@ -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) {
@ -538,19 +541,17 @@ export default {
this.queryParams.recordId = recordId; this.queryParams.recordId = recordId;
this.getCheckedProjectList(); this.getCheckedProjectList();
}else { }else {
const orderNo = row.orderNo;
getProduceReportXJ(orderNo).then(response => {
this.form = response;
// //
this.form.printable = 'printForm'; // this.form.printable = 'printForm'; //
this.form.ignore = ['no-print'];// this.form.ignore = ['no-print'];//
this.open = true; this.open = true;
this.title = "巡检检验报告"; this.title = "巡检检验报告";
const orderNo = row.orderNo; this.refreshNewWorkerTable = true // refreshProTabletrue
getProduceXJ(orderNo).then(response => { this.newWorkerLoading = false // false
this.form = response.data;
//
this.form.printable = 'firstReportPrint'; //
this.form.ignore = ['no-print'];//
this.firstReportOpen = true;
this.title = "首检检验报告";
}) })
} }
@ -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: "",//
@ -630,11 +631,6 @@ export default {
.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;

Loading…
Cancel
Save