|
|
|
@ -286,6 +286,21 @@ |
|
|
|
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="BU"> |
|
|
|
<!-- <el-input :value="returnBU" disabled style="width: 221px;height: 30px"></el-input>--> |
|
|
|
<el-select v-model="modalData.bu" placeholder="请选择" style="width: 221px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in userBuList" |
|
|
|
:key = "i.buNo" |
|
|
|
:label = "i.sitename" |
|
|
|
:value = "i.buNo"> |
|
|
|
<span style="float: left;width: 100px">{{ i.sitename }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px"> |
|
|
|
{{ i.buDesc }} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="工序"> |
|
|
|
<el-select v-model="modalData.operationDesc" @input="operationDescInput" style="width: 221px"> |
|
|
|
<el-option |
|
|
|
@ -296,17 +311,6 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="BU"> |
|
|
|
<el-input :value="returnBU" disabled style="width: 221px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="检验模板编码"> |
|
|
|
<el-input :value="returntemplateId" disabled style="width: 103px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="检验模板名称"> |
|
|
|
<el-input :value="returntemplateDesc" disabled style="width: 340px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'物料编码'"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="queryALLPartList"><a>物料编码</a></span> |
|
|
|
<el-input v-model="modalData.partNo" style="width: 103px;height: 30px"></el-input> |
|
|
|
@ -315,6 +319,14 @@ |
|
|
|
<el-input v-model="modalData.partDesc" disabled style="width: 340px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="检验模板编码"> |
|
|
|
<el-input v-model="modalData.templateId" disabled style="width: 103px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="检验模板名称"> |
|
|
|
<el-input v-model="modalData.templateDesc" disabled style="width: 340px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" clearable style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="设备编号"> |
|
|
|
<el-select v-model="modalData.eamObjectId" @change="eamObjectIdChange" filterable style="width: 103px"> |
|
|
|
@ -331,8 +343,19 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'SOP类型'"> |
|
|
|
<el-select v-model="modalData.sopType" style="width: 221px;height: 30px"> |
|
|
|
<el-option label="SOP-ST" value="SOP-ST"></el-option> |
|
|
|
<el-option label="TPI" value="TPI"></el-option> |
|
|
|
<el-option label="PD" value="PD"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="querySopNum">查询SOP编号</el-button> |
|
|
|
<el-button type="primary" @click="sopPreview">预览SOP</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'SOP编号'"> |
|
|
|
<el-input v-model="modalData.sopNum" style="width: 221px;height: 30px"></el-input> |
|
|
|
<el-input v-model="modalData.sopNum" disabled style="width: 221px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'换线时间'"> |
|
|
|
<el-date-picker style="width: 221px" v-model="modalData.changeLineTime" type="datetime" placeholder="换线时间"></el-date-picker> |
|
|
|
@ -395,6 +418,20 @@ |
|
|
|
<el-button type="primary" @click="partFlag=false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<!-- SOP预览--> |
|
|
|
<el-dialog title="SOP预览" :visible.sync="pdfDialogVisible" width="80%"> |
|
|
|
<!-- <pdf v-if="pdfUrl" :src="pdfUrl" style="width:100%;height:600px"/>--> |
|
|
|
<iframe |
|
|
|
v-if="pdfUrl" |
|
|
|
:src="pdfUrl" |
|
|
|
width="100%" |
|
|
|
height="600px" |
|
|
|
frameborder="0" |
|
|
|
></iframe> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="pdfDialogVisible=false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 检验单详情页 --> |
|
|
|
@ -1025,6 +1062,7 @@ import { |
|
|
|
queryEamObjectlist,//查询机台对应的设备 |
|
|
|
queryUserDefaultOperationListByUsername,//查询用户是否有默认工序设置 |
|
|
|
getHuanXianSysUserList,//获取所有用户列表 |
|
|
|
querySopNum,//查询Sop编码 |
|
|
|
} from "@/api/qc/qc.js" |
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
@ -1041,6 +1079,7 @@ import subDetailUpload from "./sub_detail_upload" |
|
|
|
import QrCode from "../common/QrCode.vue"; |
|
|
|
import IqcFileTable from "./IQCFileTable.vue"; |
|
|
|
import {format} from "nightwatch/lib/util/utils"; |
|
|
|
import {searchPartAttributeDetails} from "../../../api/qc/qc"; |
|
|
|
/*上传文件的組件*/ |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -1060,30 +1099,30 @@ export default { |
|
|
|
} |
|
|
|
return this.tableData.slice(start,end) |
|
|
|
}, |
|
|
|
returntemplateId(){ |
|
|
|
let a = this.modalData.operationDesc |
|
|
|
let list = this.operationList |
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
let data = list[i]; |
|
|
|
if (data.code==a){ |
|
|
|
this.modalData.templateId = data.template |
|
|
|
return data.template |
|
|
|
} |
|
|
|
} |
|
|
|
return '' |
|
|
|
}, |
|
|
|
returntemplateDesc(){ |
|
|
|
let a = this.modalData.operationDesc |
|
|
|
let list = this.operationList |
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
let data = list[i]; |
|
|
|
if (data.code==a){ |
|
|
|
this.modalData.templateDesc = data.templateDesc |
|
|
|
return data.templateDesc |
|
|
|
} |
|
|
|
} |
|
|
|
return '' |
|
|
|
}, |
|
|
|
// returntemplateId(){ |
|
|
|
// let a = this.modalData.operationDesc |
|
|
|
// let list = this.operationList |
|
|
|
// for (let i = 0; i < list.length; i++) { |
|
|
|
// let data = list[i]; |
|
|
|
// if (data.code==a){ |
|
|
|
// this.modalData.templateId = data.template |
|
|
|
// return data.template |
|
|
|
// } |
|
|
|
// } |
|
|
|
// return '' |
|
|
|
// }, |
|
|
|
// returntemplateDesc(){ |
|
|
|
// let a = this.modalData.operationDesc |
|
|
|
// let list = this.operationList |
|
|
|
// for (let i = 0; i < list.length; i++) { |
|
|
|
// let data = list[i]; |
|
|
|
// if (data.code==a){ |
|
|
|
// this.modalData.templateDesc = data.templateDesc |
|
|
|
// return data.templateDesc |
|
|
|
// } |
|
|
|
// } |
|
|
|
// return '' |
|
|
|
// }, |
|
|
|
returnBU(){ |
|
|
|
let a = this.modalData.operationDesc |
|
|
|
let list = this.operationList |
|
|
|
@ -1192,7 +1231,9 @@ export default { |
|
|
|
height: 200, |
|
|
|
dataList: [], |
|
|
|
dataListSelections: [], |
|
|
|
partFlag:false, |
|
|
|
partFlag: false, |
|
|
|
pdfDialogVisible: false, |
|
|
|
pdfUrl: '', |
|
|
|
partModalData:{}, |
|
|
|
modalData: { |
|
|
|
flag: '', |
|
|
|
@ -1225,7 +1266,8 @@ export default { |
|
|
|
rollNo: '', |
|
|
|
umId: '', |
|
|
|
umName: '', |
|
|
|
sjzs: '' |
|
|
|
sjzs: '', |
|
|
|
sopType: 'SOP-ST', |
|
|
|
}, |
|
|
|
partColomn:[ |
|
|
|
{ |
|
|
|
@ -3110,6 +3152,33 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
querySopNum(){ |
|
|
|
let param = { |
|
|
|
partNo: this.modalData.partNo, |
|
|
|
searchFlag: 'Y', |
|
|
|
site: this.modalData.bu.split('_')[0], |
|
|
|
sopStatus: '下达', |
|
|
|
sopType: this.modalData.sopType |
|
|
|
} |
|
|
|
querySopNum(param).then(({data})=>{ |
|
|
|
if (data.code==0){ |
|
|
|
this.modalData.sopNum = data.rows[0].sopName |
|
|
|
this.modalData.sopUrl = data.rows[0].sopUrl |
|
|
|
this.$message.success(this.modalData.sopUrl) |
|
|
|
}else{ |
|
|
|
this.$message.warning("当前的物料和SOP类型没有下达的SOP编码") |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
sopPreview(){ |
|
|
|
if(this.modalData.sopNum == null || this.modalData.sopNum == ''){ |
|
|
|
this.$message.warning("请先查询SOP编码") |
|
|
|
return |
|
|
|
} |
|
|
|
this.$message.success(this.modalData.sopUrl) |
|
|
|
this.pdfUrl = this.modalData.sopUrl |
|
|
|
this.pdfDialogVisible = true |
|
|
|
}, |
|
|
|
queryALLPartList(){ |
|
|
|
queryPartDescByNo(this.partModalData).then(({data})=>{ |
|
|
|
if (data.code==0){ |
|
|
|
@ -3289,6 +3358,10 @@ export default { |
|
|
|
this.$message.warning('请填写物料编码!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.templateId==null ||this.modalData.templateId==''){ |
|
|
|
this.$message.warning('检验模板不能为空!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.eamObjectId==null ||this.modalData.eamObjectId==''){ |
|
|
|
this.$message.warning('请填写设备编码!') |
|
|
|
return |
|
|
|
@ -3383,7 +3456,7 @@ export default { |
|
|
|
}, |
|
|
|
async queryOperationResourceList(){ |
|
|
|
let json = { |
|
|
|
operation:this.modalData.operationDesc |
|
|
|
operation: this.modalData.operationDesc |
|
|
|
} |
|
|
|
await queryOperationResourceList(json).then(({data})=>{ |
|
|
|
if (data.code==0){ |
|
|
|
@ -3408,13 +3481,37 @@ export default { |
|
|
|
} |
|
|
|
}).catch() |
|
|
|
}, |
|
|
|
//工序变更方法:1.根据工序对应机台查询 设备列表 2.根据BU、物料编码和工序查询检验模板 |
|
|
|
async operationDescInput(){ |
|
|
|
this.queryResourceData = '' |
|
|
|
this.eamObjectList = [] |
|
|
|
//查询工序对应的机台 |
|
|
|
await this.queryOperationResourceList() |
|
|
|
//查询机台对应的设备 |
|
|
|
// await this.queryEamObjectlist() |
|
|
|
if (this.modalData.operationDesc != '' && this.modalData.operationDesc != null){ |
|
|
|
this.queryResourceData = '' |
|
|
|
this.eamObjectList = [] |
|
|
|
// 查询工序对应的机台 |
|
|
|
await this.queryOperationResourceList() |
|
|
|
// 查询机台对应的设备 |
|
|
|
// await this.queryEamObjectlist() |
|
|
|
} |
|
|
|
if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null || this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
|
return |
|
|
|
} |
|
|
|
const result = this.operationList.find(item => item.code == this.modalData.operationDesc); |
|
|
|
let param = { |
|
|
|
site: this.modalData.bu.split('_')[0], |
|
|
|
buNo: this.modalData.bu.split('_')[1], |
|
|
|
operation: result.description, |
|
|
|
partNo: this.modalData.partNo, |
|
|
|
attributeNo: this.modalData.partNo, |
|
|
|
attributeType: 'A' |
|
|
|
} |
|
|
|
searchPartAttributeDetails(param).then(({data}) => { |
|
|
|
if (data.rows[0] && data.rows[0]!=null){ |
|
|
|
this.modalData.templateId = data.rows[0].templateId |
|
|
|
this.modalData.templateDesc = data.rows[0].templateName |
|
|
|
} else { |
|
|
|
this.modalData.templateId = '' |
|
|
|
this.modalData.templateDesc = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增 |
|
|
|
addModal () { |
|
|
|
@ -3453,7 +3550,8 @@ export default { |
|
|
|
changeLineTime: new Date(), |
|
|
|
sopNum:'', |
|
|
|
objectID:'', |
|
|
|
changePeople:[this.$store.state.user.name] |
|
|
|
changePeople:[this.$store.state.user.name], |
|
|
|
sopType: 'SOP-ST', |
|
|
|
} |
|
|
|
this.operationList = [] |
|
|
|
this.resourceList = [] |
|
|
|
@ -3462,8 +3560,6 @@ export default { |
|
|
|
this.queytOperationList() |
|
|
|
//查询当前用户默认工序设置 |
|
|
|
this.queryUserDefaultOperationListByUsername() |
|
|
|
//新增 |
|
|
|
this.operationDescInput() |
|
|
|
this.modalFlag = true |
|
|
|
this.checked = false |
|
|
|
}, |
|
|
|
@ -3514,6 +3610,7 @@ export default { |
|
|
|
getRowData3(row){ |
|
|
|
this.modalData.partNo = row.partNo |
|
|
|
this.modalData.partDesc = row.partDesc |
|
|
|
this.operationDescInput() |
|
|
|
this.partFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
|