|
|
|
@ -88,7 +88,7 @@ |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a v-if="!authDetail" type="text" size="small" @click="detailModal(scope.row)">检验模板</a> |
|
|
|
<a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">编辑</a> |
|
|
|
<a v-if="!authUpdate" type="text" size="small" @click="standardDetailModal(scope.row)">检验标准</a> |
|
|
|
<a v-if="!authCheckout" type="text" size="small" @click="standardDetailModal(scope.row)">检验标准</a> |
|
|
|
<a v-if="!authDelete" type="text" size="small" @click="deletePropertiesModel(scope.row)">删除</a> |
|
|
|
<a v-if="!authFile" type="text" size="small" @click="sopFileList(scope.row)">SOP文件</a> |
|
|
|
</template> |
|
|
|
@ -181,9 +181,6 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<el-checkbox v-model="modalData.fqcExempt" true-label="Y" false-label="N">FQC检验</el-checkbox> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-checkbox v-model="modalData.rqcExempt" true-label="Y" false-label="N">RQC检验</el-checkbox> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-checkbox v-model="modalData.sqcExempt" true-label="Y" false-label="N">SQC检验</el-checkbox> |
|
|
|
</el-col> |
|
|
|
@ -224,7 +221,45 @@ |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnDetailList" :key="index" |
|
|
|
v-for="(item,index) in detailColumnsBeforeIpqc" :key="'before-' + index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed===''?false:item.fixed" |
|
|
|
: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.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="ipqcInspectionMethod" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="140" |
|
|
|
label="IPQC检验方式"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select |
|
|
|
v-model="scope.row.ipqcInspectionMethod" |
|
|
|
placeholder="请选择" |
|
|
|
size="mini" |
|
|
|
style="width: 120px" |
|
|
|
:disabled="!isIPQCInspectionType(scope.row)"> |
|
|
|
<el-option |
|
|
|
v-for="opt in ipqcInspectionMethodOptions" |
|
|
|
:key="opt" |
|
|
|
:label="opt" |
|
|
|
:value="opt"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<span v-if="isIPQCInspectionType(scope.row) && !scope.row.ipqcInspectionMethod" style="color:#F56C6C;margin-left:6px">*</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in detailColumnsAfterIpqc" :key="'after-' + index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
@ -1458,6 +1493,7 @@ |
|
|
|
detailList: [], |
|
|
|
dataList: [], |
|
|
|
dataListLoading: false, |
|
|
|
ipqcInspectionMethodOptions: ['首件检', '自检', '巡检', '末件检'], |
|
|
|
// 展示列集 |
|
|
|
columnDetailList: [ |
|
|
|
{ |
|
|
|
@ -1767,11 +1803,27 @@ |
|
|
|
authUpdate: false, |
|
|
|
authDelete: false, |
|
|
|
authDetail: false, |
|
|
|
authCheckout: false, |
|
|
|
authFile: false, |
|
|
|
menuId: this.$route.meta.menuId, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
detailColumnsBeforeIpqc () { |
|
|
|
const list = Array.isArray(this.columnDetailList) ? this.columnDetailList : [] |
|
|
|
const idx = list.findIndex(i => i.columnProp === 'inspectionTypeName') |
|
|
|
if (idx === -1) return list |
|
|
|
return list.slice(0, idx + 1) |
|
|
|
}, |
|
|
|
detailColumnsAfterIpqc () { |
|
|
|
const list = Array.isArray(this.columnDetailList) ? this.columnDetailList : [] |
|
|
|
const idx = list.findIndex(i => i.columnProp === 'inspectionTypeName') |
|
|
|
if (idx === -1) return [] |
|
|
|
return list.slice(idx + 1) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
mounted () { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 180 |
|
|
|
@ -1841,6 +1893,30 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
isIPQCInspectionType (row) { |
|
|
|
const name = (row && row.inspectionTypeName) ? String(row.inspectionTypeName) : '' |
|
|
|
const no = (row && row.inspectionTypeNo) ? String(row.inspectionTypeNo) : '' |
|
|
|
return name.toUpperCase().includes('IPQC') || no.toUpperCase().includes('IPQC') |
|
|
|
}, |
|
|
|
|
|
|
|
normalizeIpqcInspectionMethod (row) { |
|
|
|
if (!row) return |
|
|
|
if (this.isIPQCInspectionType(row)) { |
|
|
|
if (!row.ipqcInspectionMethod) { |
|
|
|
this.$set(row, 'ipqcInspectionMethod', '首件检') |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (row.ipqcInspectionMethod) { |
|
|
|
this.$set(row, 'ipqcInspectionMethod', '') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
normalizeDetailListIpqcInspectionMethod () { |
|
|
|
if (!Array.isArray(this.detailList)) return |
|
|
|
this.detailList.forEach(r => this.normalizeIpqcInspectionMethod(r)) |
|
|
|
}, |
|
|
|
|
|
|
|
chooseLevel (row) { |
|
|
|
this.tempLevelRow = row |
|
|
|
this.getBaseList(208) |
|
|
|
@ -2091,6 +2167,13 @@ |
|
|
|
|
|
|
|
// 保存属性模板 |
|
|
|
saveDetail () { |
|
|
|
// IPQC 的检验方式必填(默认:IPQC首件检) |
|
|
|
this.normalizeDetailListIpqcInspectionMethod() |
|
|
|
const missingIpqc = (this.detailList || []).find(r => this.isIPQCInspectionType(r) && !r.ipqcInspectionMethod) |
|
|
|
if (missingIpqc) { |
|
|
|
this.$message.warning('检验类型为IPQC时,“IPQC检验方式”为必填!') |
|
|
|
return |
|
|
|
} |
|
|
|
for (let i = 0; i < this.detailList.length; i++) { |
|
|
|
this.detailList[i].updateBy = this.$store.state.user.name |
|
|
|
saveAttributeDetailed(this.detailList[i]).then(({data}) => { |
|
|
|
@ -2121,8 +2204,10 @@ |
|
|
|
this.detailData.partNo = row.partNo |
|
|
|
this.detailData.attributeNo = row.partNo |
|
|
|
this.detailData.partDesc = row.partDesc |
|
|
|
this.$set(this.detailData, 'inspectionTypeNo', '') |
|
|
|
searchPartAttributeDetails(this.detailData).then(({data}) => { |
|
|
|
this.detailList = data.rows |
|
|
|
this.normalizeDetailListIpqcInspectionMethod() |
|
|
|
}) |
|
|
|
this.detailModelFlag = true |
|
|
|
}, |
|
|
|
@ -2188,14 +2273,14 @@ |
|
|
|
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.detailData.inspectionTypeNo === '108') && (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 |
|
|
|
} |
|
|
|
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.resourceId == null || this.resourceId === '')) { |
|
|
|
this.$message.warning('请选择机台!') |
|
|
|
return |
|
|
|
} |
|
|
|
} */ |
|
|
|
if ((this.detailData.inspectionTypeNo === '105') && (this.selectionManufacturer == null || this.selectionManufacturer.length === 0)) { |
|
|
|
this.$message.warning('请选择供应商!') |
|
|
|
return |
|
|
|
@ -2261,6 +2346,7 @@ |
|
|
|
refreshDetailList () { |
|
|
|
searchPartAttributeDetails(this.detailData).then(({data}) => { |
|
|
|
this.detailList = data.rows |
|
|
|
this.normalizeDetailListIpqcInspectionMethod() |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -2530,6 +2616,7 @@ |
|
|
|
if (data && data.code === 0) { |
|
|
|
searchPartAttributeDetails(this.detailData).then(({data}) => { |
|
|
|
this.detailList = data.rows |
|
|
|
this.normalizeDetailListIpqcInspectionMethod() |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
@ -2962,6 +3049,7 @@ |
|
|
|
let deleteFlag = this.isAuth(this.menuId+":delete") |
|
|
|
let detailFlag = this.isAuth(this.menuId+":detail") |
|
|
|
let fileFlag = this.isAuth(this.menuId+":file") |
|
|
|
let checkoutFlag = this.isAuth(this.menuId+":checkout") |
|
|
|
//处理页面的权限数据 |
|
|
|
this.authSearch = !searchFlag |
|
|
|
this.authSave = !saveFlag |
|
|
|
@ -2969,6 +3057,7 @@ |
|
|
|
this.authDelete = !deleteFlag |
|
|
|
this.authDetail = !detailFlag |
|
|
|
this.authFile = !fileFlag |
|
|
|
this.authCheckout = !checkoutFlag |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
|