diff --git a/src/views/quality/produceReport/index.vue b/src/views/quality/produceReport/index.vue
index 0f6376d..242d540 100644
--- a/src/views/quality/produceReport/index.vue
+++ b/src/views/quality/produceReport/index.vue
@@ -105,8 +105,19 @@
size="mini"
@click="handleSCXJReportExport"
v-hasPermi="['quality:produceReport:export']"
+ v-if="showSCXJ"
>巡检报告Excel下载
+
+ 批次成品检验报告Excel下载
+
@@ -743,6 +754,150 @@
+
+
+
+
+
+ 打印
+
+
+
+
+
+
+
+
+
+
+ 中山榄菊日化实业有限公司
+
+
+
+
+ 批次检验确认表
+
+
+
+
+
+ {{ form.fileNo }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ √合格
+ ×不合格
+
+
+ 备注:判定合格打“√”,不合格打“×”
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -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 = '';
+
+ },
}
};