|
|
|
@ -279,7 +279,7 @@ |
|
|
|
<el-input v-model="detailData.templateName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="检验类型"> |
|
|
|
<el-select v-model="detailData.inspectionTypeNo" @change="checkInspectionType()" placeholder="请选择"> |
|
|
|
<el-select v-model="detailData.inspectionTypeNo" :disabled="lineInspectionRoleFlag" @change="checkInspectionType()" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for = "i in options" |
|
|
|
:key = "i.inspectionTypeNo" |
|
|
|
@ -553,8 +553,8 @@ |
|
|
|
<el-button type="primary" @click="uploadSopFile">上传文件</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="检验类型" style="margin-left: 448px"> |
|
|
|
<el-select v-model="sopData.inspectionTypeNo" placeholder="请选择"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-select v-model="sopData.inspectionTypeNo" :disabled="lineInspectionRoleFlag" placeholder="请选择"> |
|
|
|
<el-option v-if="!lineInspectionRoleFlag" label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for = "i in options" |
|
|
|
:key = "i.inspectionTypeNo" |
|
|
|
@ -1326,6 +1326,8 @@ |
|
|
|
authDelete: false, |
|
|
|
authDetail: false, |
|
|
|
authFile: false, |
|
|
|
lineInspectionRoleFlag: false, |
|
|
|
pqcInspectionTypeNo: '108', |
|
|
|
menuId: this.$route.meta.menuId, |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -1339,6 +1341,8 @@ |
|
|
|
created () { |
|
|
|
// 按钮控制 |
|
|
|
this.getButtonAuthData() |
|
|
|
// 当前用户是否包含换线点检角色 |
|
|
|
this.lineInspectionRoleFlag = this.resolveLineInspectionRoleFlag() |
|
|
|
// 获取用户的 site 和 bu |
|
|
|
this.getSiteAndBuByUserName() |
|
|
|
// 校验用户是否收藏 |
|
|
|
@ -1395,6 +1399,12 @@ |
|
|
|
inspectionTypeSearch(tempData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.options = data.rows |
|
|
|
if (this.lineInspectionRoleFlag) { |
|
|
|
const pqcInspectionTypeNo = this.getPqcInspectionTypeNo() |
|
|
|
this.options = this.options.filter(item => item.inspectionTypeNo === pqcInspectionTypeNo) |
|
|
|
this.detailData.inspectionTypeNo = pqcInspectionTypeNo |
|
|
|
this.sopData.inspectionTypeNo = pqcInspectionTypeNo |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -1655,11 +1665,16 @@ |
|
|
|
partNo: this.detailData.partNo, |
|
|
|
attributeNo: this.detailData.attributeNo || this.detailData.partNo, |
|
|
|
attributeType: this.detailData.attributeType || 'A', |
|
|
|
createBy: this.detailData.createBy |
|
|
|
createBy: this.detailData.createBy, |
|
|
|
inspectionTypeNo: this.lineInspectionRoleFlag ? this.getPqcInspectionTypeNo() : '' |
|
|
|
} |
|
|
|
return searchPartAttributeDetails(param).then(({ data }) => { |
|
|
|
if (seq !== this._detailListLoadSeq) return |
|
|
|
const rows = (data && data.rows) ? data.rows : [] |
|
|
|
let rows = (data && data.rows) ? data.rows : [] |
|
|
|
if (this.lineInspectionRoleFlag) { |
|
|
|
const pqcInspectionTypeNo = this.getPqcInspectionTypeNo() |
|
|
|
rows = rows.filter(item => item.inspectionTypeNo === pqcInspectionTypeNo || (item.inspectionTypeName && item.inspectionTypeName==='PQC')) |
|
|
|
} |
|
|
|
this.detailList = rows.slice() |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -1676,6 +1691,9 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
checkInspectionType () { |
|
|
|
if (this.lineInspectionRoleFlag) { |
|
|
|
this.detailData.inspectionTypeNo = this.getPqcInspectionTypeNo() |
|
|
|
} |
|
|
|
this.operationData.inspectionTypeNo = this.detailData.inspectionTypeNo |
|
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
|
this.operation = '' |
|
|
|
@ -1689,11 +1707,20 @@ |
|
|
|
addFastModal () { |
|
|
|
this.itemSelections1 = null |
|
|
|
this.itemSelections2 = null |
|
|
|
if (this.lineInspectionRoleFlag) { |
|
|
|
this.detailData.inspectionTypeNo = this.getPqcInspectionTypeNo() |
|
|
|
} |
|
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
|
this.itemList1 = data.row1 |
|
|
|
this.itemList2 = data.row2 |
|
|
|
}) |
|
|
|
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo |
|
|
|
if (this.lineInspectionRoleFlag) { |
|
|
|
this.detailData.inspectionTypeNo = this.getPqcInspectionTypeNo() |
|
|
|
} else if (this.options.length > 0) { |
|
|
|
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo |
|
|
|
} else { |
|
|
|
this.detailData.inspectionTypeNo = '' |
|
|
|
} |
|
|
|
this.checkInspectionType() |
|
|
|
this.dataListOperationSelections = [] |
|
|
|
this.operation = '' |
|
|
|
@ -2088,12 +2115,15 @@ |
|
|
|
site: row.site, |
|
|
|
buNo: row.buNo, |
|
|
|
partNo: row.partNo, |
|
|
|
inspectionTypeNo: '' |
|
|
|
inspectionTypeNo: this.lineInspectionRoleFlag ? this.getPqcInspectionTypeNo() : '' |
|
|
|
} |
|
|
|
this.getFileContentList() |
|
|
|
}, |
|
|
|
|
|
|
|
getFileContentList () { |
|
|
|
if (this.lineInspectionRoleFlag) { |
|
|
|
this.sopData.inspectionTypeNo = this.getPqcInspectionTypeNo() |
|
|
|
} |
|
|
|
let tempData = { |
|
|
|
orderRef1: this.sopData.site, |
|
|
|
orderRef2: this.sopData.partNo, |
|
|
|
@ -2118,7 +2148,7 @@ |
|
|
|
buNo: this.sopData.buNo, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
partNo: this.sopData.partNo, |
|
|
|
inspectionTypeNo: '', |
|
|
|
inspectionTypeNo: this.lineInspectionRoleFlag ? this.getPqcInspectionTypeNo() : '', |
|
|
|
options: this.options |
|
|
|
} |
|
|
|
//打开组件 去做新增业务 |
|
|
|
@ -2262,6 +2292,20 @@ |
|
|
|
this.authDetail = !detailFlag |
|
|
|
this.authFile = !fileFlag |
|
|
|
}, |
|
|
|
|
|
|
|
// 是否包含换线点检角色 |
|
|
|
resolveLineInspectionRoleFlag () { |
|
|
|
return this.$store.state.user.lineInspectionRoleFlag === true || localStorage.getItem('lineInspectionRoleFlag') === 'Y' |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取PQC对应的检验类型编码 |
|
|
|
getPqcInspectionTypeNo () { |
|
|
|
const pqcData = this.options.find(item => item.inspectionTypeName && item.inspectionTypeName==='PQC') |
|
|
|
if (pqcData) { |
|
|
|
this.pqcInspectionTypeNo = pqcData.inspectionTypeNo |
|
|
|
} |
|
|
|
return this.pqcInspectionTypeNo |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|