巡检报告

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