|
|
|
@ -26,6 +26,13 @@ |
|
|
|
<el-option label="不合格" value="不合格"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'检验类型'"> |
|
|
|
<el-select v-model="searchData.checkType" style="width: 100px"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="巡检" value="巡检"></el-option> |
|
|
|
<el-option label="末件检" value="末件检"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工单号'"> |
|
|
|
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -44,6 +51,7 @@ |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="doEmpty()">清空</el-button> |
|
|
|
<el-button type="primary" @click="getDataList()">查询</el-button> |
|
|
|
<el-button type="primary" @click="addModal()">新增</el-button> |
|
|
|
<download-excel |
|
|
|
:fields="fields()" |
|
|
|
:data="exportData" |
|
|
|
@ -109,6 +117,53 @@ |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<!-- 新增巡检记录 --> |
|
|
|
<el-dialog title="新增巡检记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="430px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item > |
|
|
|
<span slot="label" style="" @click="getBaseList(1052)"><a herf="#">工单号</a></span> |
|
|
|
<el-input v-model="modalData.orderNo" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="工序"> |
|
|
|
<el-select v-model="modalData.operationDesc" @change="getResourceList()" placeholder="请选择" style="width: 120px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in operationList" |
|
|
|
:key = "i.operationNo" |
|
|
|
:label = "i.operationDesc" |
|
|
|
:value = "i.operationDesc"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="机台"> |
|
|
|
<el-select v-model="modalData.resourceId" placeholder="请选择" style="width: 120px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in resourceList" |
|
|
|
:key = "i.resourceId" |
|
|
|
:label = "i.resourceDesc" |
|
|
|
:value = "i.resourceId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料"> |
|
|
|
<el-select v-model="modalData.partNo" placeholder="请选择" style="width: 255px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in partList" |
|
|
|
:key = "i.partNo" |
|
|
|
:label = "i.partDesc" |
|
|
|
:value = "i.partNo"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="送检数量:"> |
|
|
|
<el-input v-model="modalData.rollQty" type="number" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveData()">保存</el-button> |
|
|
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 检验单详情页 --> |
|
|
|
<el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1700px"> |
|
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList()"> |
|
|
|
@ -345,9 +400,12 @@ |
|
|
|
saveIPQCSubmitResult, // 审核 |
|
|
|
saveIPQCSubDetailed, // 新增子明细信息 |
|
|
|
selectIPQCSubDetailedRecord, // 子明细记录信息查询 |
|
|
|
|
|
|
|
checkOutIsSubmit, // 检查是否已提交 |
|
|
|
checkSubDetailValue // 检查子明细中的实测值是否在规定范围 |
|
|
|
checkIPQCIsSubmit, // 检查是否已提交 |
|
|
|
checkIPQCSubDetailValue, // 检查子明细中的实测值是否在规定范围 |
|
|
|
getOperationList, // 查询工序列表 |
|
|
|
getResourceList, // 查询机台列表 |
|
|
|
getPartList, // 查询物料列表 |
|
|
|
saveOsInspection, // 新增巡检记录 |
|
|
|
} from "@/api/qc/qc.js"; |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam'; |
|
|
|
import {getFileContentList} from '@/api/eam/eam_object_list.js'; |
|
|
|
@ -373,8 +431,8 @@ |
|
|
|
favorite: false, |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
exportName: "FAI检验录入" + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
exportHeader: ["FAI检验录入"], |
|
|
|
exportName: "IPQC检验录入" + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
exportHeader: ["IPQC检验录入"], |
|
|
|
exportFooter: [], |
|
|
|
exportList:[], |
|
|
|
// 导出 end |
|
|
|
@ -397,6 +455,7 @@ |
|
|
|
operationDesc: '', |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
checkType: '', |
|
|
|
page: 1, |
|
|
|
limit: 10, |
|
|
|
}, |
|
|
|
@ -414,11 +473,17 @@ |
|
|
|
inspectionNo:'', |
|
|
|
partNo: '', |
|
|
|
partDesc: '', |
|
|
|
inspectionTypeNo:'102', |
|
|
|
inspectionTypeName:'FAI', |
|
|
|
inspectionTypeNo:'101', |
|
|
|
inspectionTypeName:'IPQC', |
|
|
|
inspectorNo:'', |
|
|
|
inspectorName:'', |
|
|
|
submit_flag:'', |
|
|
|
orderNo: '', |
|
|
|
operationDesc: '', |
|
|
|
operationNo: '', |
|
|
|
resourceId: '', |
|
|
|
resourceDesc: '', |
|
|
|
rollQty: '', |
|
|
|
}, |
|
|
|
// 展示列集 |
|
|
|
columnList: [ |
|
|
|
@ -458,6 +523,18 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'checkType', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '检验类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'taskDate', |
|
|
|
headerAlign: "center", |
|
|
|
@ -854,6 +931,11 @@ |
|
|
|
subDetailValues:[] |
|
|
|
}, |
|
|
|
options: [], |
|
|
|
modalDisableFlag: false, |
|
|
|
modalFlag: false, |
|
|
|
operationList: [], |
|
|
|
resourceList: [], |
|
|
|
partList: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -967,10 +1049,141 @@ |
|
|
|
operationDesc: '', |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
checkType: '', |
|
|
|
page: 1, |
|
|
|
limit: 10, |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList (val,type) { |
|
|
|
this.tagNo = val |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = '' |
|
|
|
if (val === 1052) { |
|
|
|
strVal = this.modalData.orderNo |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/* 列表方法的回调 */ |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 1052) { |
|
|
|
this.modalData.orderNo = val.orderno |
|
|
|
this.getOperationList() |
|
|
|
this.getPartList() |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取工序列表 |
|
|
|
getOperationList(){ |
|
|
|
getOperationList(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.operationList = data.rows |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取机台列表 |
|
|
|
getResourceList(){ |
|
|
|
getResourceList(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.resourceList = data.rows |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取物料列表 |
|
|
|
getPartList(){ |
|
|
|
getPartList(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.partList = data.rows |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
addModal(){ |
|
|
|
this.modalData={ |
|
|
|
flag: '1', |
|
|
|
site: this.$store.state.user.site, |
|
|
|
inspectionNo:'', |
|
|
|
partNo: '', |
|
|
|
partDesc: '', |
|
|
|
inspectionTypeNo:'101', |
|
|
|
inspectionTypeName:'IPQC', |
|
|
|
inspectorNo:'', |
|
|
|
inspectorName:'', |
|
|
|
submit_flag:'', |
|
|
|
orderNo: '', |
|
|
|
operationDesc: '', |
|
|
|
operationNo: '', |
|
|
|
resourceId: '', |
|
|
|
resourceDesc: '', |
|
|
|
rollQty: '', |
|
|
|
}; |
|
|
|
this.modalDisableFlag = false; |
|
|
|
this.modalFlag = true; |
|
|
|
}, |
|
|
|
// 新增IPQC巡检记录 |
|
|
|
saveData(){ |
|
|
|
if (this.modalData.orderNo == '' || this.modalData.orderNo == null) { |
|
|
|
this.$alert('请选择工单!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if (this.modalData.partNo == '' || this.modalData.partNo == null) { |
|
|
|
this.$alert('请选择物料!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if (this.modalData.operationDesc == '' || this.modalData.operationDesc == null) { |
|
|
|
this.$alert('请选择工序!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if (this.modalData.resourceId == '' || this.modalData.resourceId == null) { |
|
|
|
this.$alert('请选择机台!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if (this.modalData.rollQty == '' || this.modalData.rollQty == null) { |
|
|
|
this.$alert('请填写送检数量!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.modalData.flag=='1'){ |
|
|
|
saveOsInspection(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.modalFlag = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取主信息数据列表 |
|
|
|
getDataList () { |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
@ -1000,6 +1213,7 @@ |
|
|
|
selectionChangeHandle (val) { |
|
|
|
this.dataListSelections = val |
|
|
|
}, |
|
|
|
|
|
|
|
// 删除检验记录 |
|
|
|
deleteModal (row) { |
|
|
|
this.$confirm(`是否删除这条检验记录?`, '提示', { |
|
|
|
@ -1053,7 +1267,7 @@ |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.detailList[i].valueTypeDb == 'N') { |
|
|
|
checkSubDetailValue(this.detailList[i]).then(({data}) => { |
|
|
|
checkIPQCSubDetailValue(this.detailList[i]).then(({data}) => { |
|
|
|
if (data.flag == 2 && this.detailList[i].itemResult == 'Y') { |
|
|
|
this.$confirm(this.detailList[i].itemDesc + ' 中实测值不在合格范围!是否保存为合格?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
@ -1186,7 +1400,7 @@ |
|
|
|
}, |
|
|
|
//点击新增更多 |
|
|
|
handleAddBtn(td) { |
|
|
|
checkOutIsSubmit(td).then(({data}) => { |
|
|
|
checkIPQCIsSubmit(td).then(({data}) => { |
|
|
|
if (data.flag != 1) { |
|
|
|
let obj = {}; |
|
|
|
obj.subDetailValue = ""; |
|
|
|
@ -1201,7 +1415,7 @@ |
|
|
|
}, |
|
|
|
//删除 |
|
|
|
handleDeleteBtn(td) { |
|
|
|
checkOutIsSubmit(td).then(({data}) => { |
|
|
|
checkIPQCIsSubmit(td).then(({data}) => { |
|
|
|
if (data.flag != 1) { |
|
|
|
if (this.checkedDetail.length == 0) { |
|
|
|
this.$alert("请先选择要删除的数据", "提示", { |
|
|
|
|