Browse Source

1.物料属性增加pqc类型检验模板时,要求选择工序

2.修改PQC任务功能
java8
赵宏斌 5 months ago
parent
commit
10038707f8
  1. 1
      src/api/qc/qc.js
  2. 193
      src/views/modules/qc/PQCResultEntry.vue
  3. 6
      src/views/modules/qc/qcPartAttribute.vue

1
src/api/qc/qc.js

@ -148,6 +148,7 @@ export const deleteUserDefaultOperation = data => createAPI(`/pms/pqc/deleteUser
export const getHuanXianSysUserList = data => createAPI(`/pms/pqc/getHuanXianSysUserList`,'post',data)
export const getAllUserList = data => createAPI(`/pms/pqc/getAllUserList`,'post',data)
export const queryResourceList2 = data => createAPI(`/pms/pqc/queryResourceList2`,'post',data)
export const querySopNum = data => createAPI(`/pms/pqc/querySopNum`,'post',data)
// ===================================== IPQC检验 =====================================
export const qcIPQCInspectionSearch = data => createAPI(`/pms/qc/qcIPQCInspectionSearch`,'post',data)

193
src/views/modules/qc/PQCResultEntry.vue

@ -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
},

6
src/views/modules/qc/qcPartAttribute.vue

@ -292,7 +292,7 @@
<el-button type="primary" @click="checkInspectionType()">查询</el-button>
</el-form-item>
<el-form-item style="margin-left: 117px" :label="' '">
<el-button type="primary" @click="getOperationList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107'">工序</el-button>
<el-button type="primary" @click="getOperationList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107' || this.detailData.inspectionTypeNo === '108'">工序</el-button>
<el-button type="primary" @click="getManufacturerList()" v-if="this.detailData.inspectionTypeNo === '105'" style="width: 63px">供应商</el-button>
</el-form-item>
<el-form-item :label="' '">
@ -1657,6 +1657,7 @@
},
checkInspectionType () {
this.operationData.inspectionTypeNo = this.detailData.inspectionTypeNo
getPartTemplateLists(this.detailData).then(({data}) => {
this.operation = ''
this.resourceId = ''
@ -1716,7 +1717,7 @@
this.$message.warning('请选择可选模板!')
return
}
if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')) {
if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107' || this.detailData.inspectionTypeNo === '108') && (this.operation == null || this.operation === '')) {
this.$message.warning('请选择工序!')
return
}
@ -1898,6 +1899,7 @@
//
getOperationList () {
this.$message.success(this.operationData)
getOperationDescList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows

Loading…
Cancel
Save