|
|
|
@ -143,10 +143,14 @@ |
|
|
|
<!-- 新增巡检记录 --> |
|
|
|
<el-dialog title="新增巡检记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item prop="orderNo" :rules="rules.seqNoType"> |
|
|
|
<el-form-item v-if="this.modalData.specialTaskFlag !== 'Y'" prop="orderNo" :rules="rules.seqNoType"> |
|
|
|
<span slot="label" @click="getBaseList(1052)"><a herf="#">派工单号</a></span> |
|
|
|
<el-input v-model="modalData.seqNo" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" prop="orderNo" :rules="rules.seqNoType"> |
|
|
|
<span slot="label">派工单号</span> |
|
|
|
<el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="工单号" prop="orderNo" :rules="rules.orderNoType"> |
|
|
|
<el-input v-model="modalData.orderNo" style="width: 221px" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -162,7 +166,7 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="机台" prop="resourceId" :rules="rules.resourceIdType"> |
|
|
|
<el-form-item v-if="this.modalData.specialTaskFlag !== 'Y'" label="机台" prop="resourceId" :rules="rules.resourceIdType"> |
|
|
|
<el-select v-model="modalData.resourceId" placeholder="请选择" style="width: 221px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in resourceList" |
|
|
|
@ -172,28 +176,20 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" prop="resourceId" :rules="rules.resourceIdType"> |
|
|
|
<span slot="label" @click="getBaseList(205)"><a herf="#">机台</a></span> |
|
|
|
<el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="物料编码"> |
|
|
|
<!-- <el-select v-model="modalData.partNo" placeholder="请选择" style="width: 221px">--> |
|
|
|
<!-- <el-option--> |
|
|
|
<!-- v-for = "i in partList"--> |
|
|
|
<!-- :key = "i.partNo"--> |
|
|
|
<!-- :label = "i.partDesc"--> |
|
|
|
<!-- :value = "i.partNo">--> |
|
|
|
<!-- </el-option>--> |
|
|
|
<!-- </el-select>--> |
|
|
|
<el-form-item v-if="this.modalData.specialTaskFlag !== 'Y'" label="物料编码"> |
|
|
|
<el-input v-model="modalData.partNo" readonly style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" :model="modalData"> |
|
|
|
<span slot="label" @click="getBaseList(206)"><a herf="#">物料编码</a></span> |
|
|
|
<el-input v-model="modalData.partNo" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料名称"> |
|
|
|
<!-- <el-select v-model="modalData.partDesc" placeholder="请选择" style="width: 221px">--> |
|
|
|
<!-- <el-option--> |
|
|
|
<!-- v-for = "i in partList"--> |
|
|
|
<!-- :key = "i.partNo"--> |
|
|
|
<!-- :label = "i.partDesc"--> |
|
|
|
<!-- :value = "i.partNo">--> |
|
|
|
<!-- </el-option>--> |
|
|
|
<!-- </el-select>--> |
|
|
|
<el-input v-model="modalData.partDesc" readonly style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -219,14 +215,19 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="老卷号"> |
|
|
|
<el-input v-model="modalData.batchRollNo" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<span v-if="this.controlData.baseData === '控制'" slot="label" @click="queryTemplateList()"><a>检验模板</a></span> |
|
|
|
<span v-if="this.controlData.baseData === '未控制'" slot="label">检验模板</span> |
|
|
|
<el-input v-model="modalData.templateName" disabled style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="无工单检验"> |
|
|
|
<input type="checkbox" name="specialTask" v-model="checked" @click="changeSpecialTask()"/> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="老卷号"> |
|
|
|
<el-input v-model="modalData.batchRollNo" style="width: 456px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="特殊要求"> |
|
|
|
@ -341,7 +342,7 @@ |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -352,7 +353,8 @@ |
|
|
|
min-width="80" |
|
|
|
label="子明细"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" @click="subDetailModal(scope.row) ">点击输入</el-button> |
|
|
|
<el-button v-if="scope.row.subDetailRecordNum <= 0" type="primary" @click="subDetailModal(scope.row) ">点击输入</el-button> |
|
|
|
<el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row) ">点击输入</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -523,14 +525,12 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'检验类型'"> |
|
|
|
<el-select v-model="templateData.inspectionTypeNo" style="width: 100px"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="IPQC首检" value="101"></el-option> |
|
|
|
<el-option label="IPQC自检" value="102"></el-option> |
|
|
|
<el-option label="IPQC巡检" value="103"></el-option> |
|
|
|
<el-option label="IPQC末件检" value="104"></el-option> |
|
|
|
<el-option label="IQC检验" value="105"></el-option> |
|
|
|
<el-option label="FAI检验" value="106"></el-option> |
|
|
|
<el-option label="FQC检验" value="107"></el-option> |
|
|
|
<el-option |
|
|
|
v-for = "i in typeOptions" |
|
|
|
:key = "i.inspectionTypeNo" |
|
|
|
:label = "i.inspectionTypeName" |
|
|
|
:value = "i.inspectionTypeNo"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
@ -625,6 +625,9 @@ |
|
|
|
saveOsInspection, // 新增检验记录 |
|
|
|
queryController, // 检查动控 |
|
|
|
queryTemplateList, // 获取检验模板列表 |
|
|
|
getPartInformation, // 获取物料信息 |
|
|
|
getSpecialOperationList, // 获取特殊工序列表 |
|
|
|
InspectionTypeSearch, // 搜索所有检验类型 |
|
|
|
getOrderNoList // 查询工单列表 |
|
|
|
} from "@/api/qc/qc.js"; |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam'; |
|
|
|
@ -712,7 +715,8 @@ |
|
|
|
sku: '', |
|
|
|
specialRequirements: '', |
|
|
|
templateId: '', |
|
|
|
templateName: '' |
|
|
|
templateName: '', |
|
|
|
specialTaskFlag: '' |
|
|
|
}, |
|
|
|
// 展示列集 |
|
|
|
columnList: [ |
|
|
|
@ -1316,6 +1320,8 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
], |
|
|
|
checked: false, |
|
|
|
typeOptions: [] |
|
|
|
// orderNoData:{ |
|
|
|
// limit: 10, |
|
|
|
// page: 1, |
|
|
|
@ -1335,8 +1341,18 @@ |
|
|
|
created () { |
|
|
|
this.getDataList() |
|
|
|
this.favoriteIsOk() |
|
|
|
this.InspectionTypeSearch() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 查询检验类型 |
|
|
|
InspectionTypeSearch(){ |
|
|
|
InspectionTypeSearch().then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.typeOptions = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
selectFlag(){ |
|
|
|
return true; |
|
|
|
}, |
|
|
|
@ -1456,6 +1472,14 @@ |
|
|
|
strVal = this.modalData.seqNo |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
} |
|
|
|
if (val === 205) { |
|
|
|
strVal = this.modalData.resourceDesc |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
} |
|
|
|
if (val === 206) { |
|
|
|
strVal = this.modalData.partNo |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1469,6 +1493,30 @@ |
|
|
|
this.getOperationList() |
|
|
|
this.getPartList() |
|
|
|
} |
|
|
|
if (this.tagNo === 205) { |
|
|
|
this.modalData.resourceId = val.resource_id |
|
|
|
this.modalData.resourceDesc = val.resource_desc |
|
|
|
} |
|
|
|
if (this.tagNo === 206) { |
|
|
|
this.modalData.partNo = val.part_no |
|
|
|
this.modalData.partDesc = val.part_desc |
|
|
|
// 获取物料的其他信息 |
|
|
|
this.getPartInformation() |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取物料其它信息 |
|
|
|
getPartInformation () { |
|
|
|
getPartInformation(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.modalData.spec = data.rows[0].spec |
|
|
|
this.modalData.sku = data.rows[0].sku |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// // 工单号改变事件 |
|
|
|
@ -1547,15 +1595,20 @@ |
|
|
|
|
|
|
|
// 获取机台列表 |
|
|
|
getResourceList(){ |
|
|
|
getResourceList(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.resourceList = data.rows |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 判断是否为特殊任务,特殊任务的机台不随工序改变 |
|
|
|
if (this.modalData.specialTaskFlag === 'Y') { |
|
|
|
return |
|
|
|
} else { |
|
|
|
getResourceList(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.resourceList = data.rows |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取物料列表 |
|
|
|
@ -1618,13 +1671,15 @@ |
|
|
|
sku: '', |
|
|
|
specialRequirements: '', |
|
|
|
templateId: '', |
|
|
|
templateName: '' |
|
|
|
templateName: '', |
|
|
|
specialTaskFlag: '' |
|
|
|
} |
|
|
|
this.operationList = [] |
|
|
|
this.resourceList = [] |
|
|
|
this.partList = [] |
|
|
|
this.modalDisableFlag = false |
|
|
|
this.modalFlag = true |
|
|
|
this.checked = false |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取检验模板列表 |
|
|
|
@ -1649,6 +1704,61 @@ |
|
|
|
this.templateModelFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
// 是否新增特殊任务 |
|
|
|
changeSpecialTask () { |
|
|
|
// 先重置数据 |
|
|
|
this.modalData = { |
|
|
|
flag: '1', |
|
|
|
site: this.$store.state.user.site, |
|
|
|
inspectionNo:'', |
|
|
|
partNo: '', |
|
|
|
partDesc: '', |
|
|
|
inspectionTypeNo:'', |
|
|
|
inspectionTypeName:'', |
|
|
|
inspectorNo:'', |
|
|
|
inspectorName:'', |
|
|
|
submit_flag:'', |
|
|
|
orderNo: '', |
|
|
|
operationDesc: '', |
|
|
|
operationNo: '', |
|
|
|
resourceId: '', |
|
|
|
resourceDesc: '', |
|
|
|
rollQty: '', |
|
|
|
seqNo: '', |
|
|
|
batchRollNo: '', |
|
|
|
spec: '', |
|
|
|
sku: '', |
|
|
|
specialRequirements: '', |
|
|
|
templateId: '', |
|
|
|
templateName: '', |
|
|
|
specialTaskFlag: '' |
|
|
|
} |
|
|
|
// 获取选中框 |
|
|
|
let obj = document.getElementsByName('specialTask') |
|
|
|
// 判断是否打勾 |
|
|
|
if (obj[0].checked) { |
|
|
|
let tempData = { |
|
|
|
site: this.$store.state.user.site |
|
|
|
} |
|
|
|
this.modalData.specialTaskFlag = 'Y' |
|
|
|
// 获取特殊工序列表 |
|
|
|
getSpecialOperationList(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.operationList = data.rows |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 派工单和工单号赋值 |
|
|
|
this.modalData.seqNo = '000#1TSGD' |
|
|
|
this.modalData.orderNo = '000#1' |
|
|
|
} else { |
|
|
|
this.modalData.specialTaskFlag = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增IPQC巡检记录 |
|
|
|
saveData(){ |
|
|
|
if (this.modalData.seqNo === '' || this.modalData.seqNo == null) { |
|
|
|
@ -1847,7 +1957,7 @@ |
|
|
|
|
|
|
|
// 明细记录信息查询 |
|
|
|
detailModal(row){ |
|
|
|
this.detailData.site = this.$store.state.user.site, |
|
|
|
this.detailData.site = this.$store.state.user.site |
|
|
|
this.detailData.inspectionNo = row.inspectionNo |
|
|
|
this.detailData.partNo = row.partNo |
|
|
|
this.detailData.partDesc = row.partDesc |
|
|
|
@ -1867,18 +1977,18 @@ |
|
|
|
ipqcDetailSearch(this.detailData).then(({data}) => { |
|
|
|
this.detailList = data.rows |
|
|
|
}) |
|
|
|
this.inspectorSearch(); |
|
|
|
this.detailInformationFlag = true; |
|
|
|
this.inspectorSearch() |
|
|
|
this.detailInformationFlag = true |
|
|
|
}, |
|
|
|
|
|
|
|
// 子明细记录信息查询 |
|
|
|
subDetailModal(row){ |
|
|
|
this.subDetailData.inspectionNo = row.inspectionNo; |
|
|
|
this.subDetailData.itemNo = row.itemNo; |
|
|
|
this.subDetailData.itemDesc = row.itemDesc; |
|
|
|
this.subDetailData.defaultValue = row.defaultValue; |
|
|
|
this.subDetailData.maxValue = row.maxValue; |
|
|
|
this.subDetailData.minValue = row.minValue; |
|
|
|
this.subDetailData.inspectionNo = row.inspectionNo |
|
|
|
this.subDetailData.itemNo = row.itemNo |
|
|
|
this.subDetailData.itemDesc = row.itemDesc |
|
|
|
this.subDetailData.defaultValue = row.defaultValue |
|
|
|
this.subDetailData.maxValue = row.maxValue |
|
|
|
this.subDetailData.minValue = row.minValue |
|
|
|
selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => { |
|
|
|
this.tableData = data.rows |
|
|
|
}) |
|
|
|
@ -2066,7 +2176,9 @@ |
|
|
|
this.subDetailData.subDetailValues = this.tableData |
|
|
|
saveIPQCSubDetailed(this.subDetailData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
ipqcDetailSearch(this.detailData).then(({data}) => { |
|
|
|
this.detailList = data.rows |
|
|
|
}) |
|
|
|
this.subDetailFlag = false |
|
|
|
this.tableData = [] |
|
|
|
this.$message({ |
|
|
|
|