|
|
@ -1,7 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="mod-config"> |
|
|
<div class="mod-config"> |
|
|
<!-- 条件查询 --> |
|
|
<!-- 条件查询 --> |
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList"> |
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="searchData"> |
|
|
<el-form-item :label="'BU'"> |
|
|
<el-form-item :label="'BU'"> |
|
|
<el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 75px"> |
|
|
<el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 75px"> |
|
|
<el-option |
|
|
<el-option |
|
|
@ -37,7 +37,7 @@ |
|
|
<el-input v-model="searchData.invdefinetype" clearable style="width: 120px"></el-input> |
|
|
<el-input v-model="searchData.invdefinetype" clearable style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList"> |
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="searchData"> |
|
|
<el-form-item :label="'供应商'"> |
|
|
<el-form-item :label="'供应商'"> |
|
|
<el-input v-model="searchData.supplierDesc" clearable style="width: 200px"></el-input> |
|
|
<el-input v-model="searchData.supplierDesc" clearable style="width: 200px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -89,7 +89,7 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList"> |
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="searchData"> |
|
|
<el-form-item :label="'送检日期'"> |
|
|
<el-form-item :label="'送检日期'"> |
|
|
<el-date-picker style="width: 160px" v-model="searchData.startDate2" type="datetime" value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="开始日期"></el-date-picker> |
|
|
<el-date-picker style="width: 160px" v-model="searchData.startDate2" type="datetime" value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="开始日期"></el-date-picker> |
|
|
- |
|
|
- |
|
|
@ -103,6 +103,7 @@ |
|
|
<el-form-item :label="' '"> |
|
|
<el-form-item :label="' '"> |
|
|
<el-button v-if="!authSearch" type="primary" @click="getDataList">查询</el-button> |
|
|
<el-button v-if="!authSearch" type="primary" @click="getDataList">查询</el-button> |
|
|
<el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button> |
|
|
<el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button> |
|
|
|
|
|
<el-button v-if="!authCheck" type="primary" @click="cancelApproval">取消审核</el-button> |
|
|
<el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button> |
|
|
<el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button> |
|
|
<el-button v-if="!authOverLoad" type="primary" @click="overLoadModal">任务重载</el-button> |
|
|
<el-button v-if="!authOverLoad" type="primary" @click="overLoadModal">任务重载</el-button> |
|
|
<el-button type="primary" @click="printList">打印</el-button> |
|
|
<el-button type="primary" @click="printList">打印</el-button> |
|
|
@ -675,6 +676,7 @@ |
|
|
getResponsibleOperatorList, // 获取责任人列表 |
|
|
getResponsibleOperatorList, // 获取责任人列表 |
|
|
getIQCItemObjectList, // 查询项目设备 |
|
|
getIQCItemObjectList, // 查询项目设备 |
|
|
dataAcquisitionByItem, // 根据项目数据采集 |
|
|
dataAcquisitionByItem, // 根据项目数据采集 |
|
|
|
|
|
cancelApproval, // 取消审核 |
|
|
} from "@/api/qc/qc.js" |
|
|
} from "@/api/qc/qc.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
@ -2542,10 +2544,21 @@ |
|
|
|
|
|
|
|
|
// 删除检验记录 |
|
|
// 删除检验记录 |
|
|
deleteModal () { |
|
|
deleteModal () { |
|
|
|
|
|
let tempData1 = '' // 记录是待审核和已完成状态的单号,不允许删除 |
|
|
if (this.IQCSelections.length === 0) { |
|
|
if (this.IQCSelections.length === 0) { |
|
|
this.$message.warning('请勾选要删除的检验单!') |
|
|
this.$message.warning('请勾选要删除的检验单!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
for (let i = 0; i < this.IQCSelections.length; i++) { |
|
|
|
|
|
if (this.IQCSelections[i].state === '待审核' || this.IQCSelections[i].state === '已完成') { |
|
|
|
|
|
tempData1 = tempData1 + this.IQCSelections[i].inspectionNo + '、' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (tempData1 !== '') { |
|
|
|
|
|
tempData1 = tempData1.substring(0, tempData1.length - 1) |
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData1 + ', 待审核和已完成的单据不允许删除!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.$confirm(`是否删除该 `+ this.IQCSelections.length +` 条检验记录?`, '提示', { |
|
|
this.$confirm(`是否删除该 `+ this.IQCSelections.length +` 条检验记录?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
@ -2607,7 +2620,6 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.$message.warning('检验单必须为待检验状态!') |
|
|
this.$message.warning('检验单必须为待检验状态!') |
|
|
@ -2634,12 +2646,12 @@ |
|
|
} |
|
|
} |
|
|
if (tempData1 !== '') { |
|
|
if (tempData1 !== '') { |
|
|
tempData1 = tempData1.substring(0, tempData1.length - 1) |
|
|
tempData1 = tempData1.substring(0, tempData1.length - 1) |
|
|
this.$message.warning('检验单号 ' + tempData1 + ' 不是待审核状态!') |
|
|
|
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData1 + ', 不是待审核状态!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (tempData2 !== '') { |
|
|
if (tempData2 !== '') { |
|
|
tempData2 = tempData2.substring(0, tempData2.length - 1) |
|
|
tempData2 = tempData2.substring(0, tempData2.length - 1) |
|
|
this.$message.warning('检验单号 ' + tempData2 + ' 的处置措施未选择!') |
|
|
|
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData2 + ', 的处置措施未选择!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// this.submitData.site = row.site |
|
|
// this.submitData.site = row.site |
|
|
@ -2676,6 +2688,57 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 取消审核 |
|
|
|
|
|
cancelApproval () { |
|
|
|
|
|
let tempData1 = '' // 记录不是已完成状态的单号 |
|
|
|
|
|
let tempData2 = '' // 记录免检的单号 |
|
|
|
|
|
if (this.IQCSelections.length === 0) { |
|
|
|
|
|
this.$message.warning('请勾选要取消审核的检验单!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < this.IQCSelections.length; i++) { |
|
|
|
|
|
if (this.IQCSelections[i].state !== '已完成') { |
|
|
|
|
|
tempData1 = tempData1 + this.IQCSelections[i].inspectionNo + '、' |
|
|
|
|
|
} |
|
|
|
|
|
if (this.IQCSelections[i].inspectionResult === '免检') { |
|
|
|
|
|
tempData2 = tempData2 + this.IQCSelections[i].inspectionNo + '、' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (tempData1 !== '') { |
|
|
|
|
|
tempData1 = tempData1.substring(0, tempData1.length - 1) |
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (tempData2 !== '') { |
|
|
|
|
|
tempData2 = tempData2.substring(0, tempData2.length - 1) |
|
|
|
|
|
this.$message.warning('检验单号 ' + tempData2 + ' , 免检的单据不允许取消审核!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.$confirm(`确定取消审核该 ` + this.IQCSelections.length + ` 条记录`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.submitData.submitList = this.IQCSelections |
|
|
|
|
|
cancelApproval(this.submitData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.IQCSelections = [] |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 子明细方法 |
|
|
// 子明细方法 |
|
|
// 表格的新增 |
|
|
// 表格的新增 |
|
|
rowClassName ({ row, rowIndex }) { |
|
|
rowClassName ({ row, rowIndex }) { |
|
|
|