质量模块修改

dev-scheduling
jinna 3 weeks ago
parent 595eec2650
commit 27c64b2956
  1. 78
      src/views/productionTesting/productionQuality.vue

@ -136,27 +136,53 @@
@expand-change="handleExpandChange"
:default-expand-all="false"
>
<!-- && vxeTableData.find(item => item.item.name == '尺寸检测').wpItemDetailList &&
vxeTableData.find(item => item.item.name == '尺寸检测').wpItemDetailList.length > 0 -->
<el-table-column type="expand"
v-if="dialogData.ppsName != '烧结包装防护' &&
(
(
vxeTableData.find(item => item.item.name == '尺寸检测') && vxeTableData.find(item => item.item.name == '尺寸检测').wpItemDetailList &&
vxeTableData.find(item => item.item.name == '尺寸检测').wpItemDetailList.length > 0
vxeTableData.find(item => item.item.name == '尺寸检测')
) ||
vxeTableData.find(item => item.item.name == '厚度检测')
)">
<!-- && scope.row.wpItemDetailList && scope.row.wpItemDetailList.length > 0 -->
<template #default="scope">
<el-table
:data="scope.row.wpItemDetailList"
show-overflow-tooltip
v-if="scope.row.item.name == '尺寸检测' && scope.row.wpItemDetailList && scope.row.wpItemDetailList.length > 0"
v-if="scope.row.item.name == '尺寸检测'"
style="margin: 12px"
>
<el-table-column label="镀前镀后" prop="testType" align="center"></el-table-column>
<el-table-column label="尺寸" prop="ruleSize" align="center"></el-table-column>
<el-table-column width="57px">
<template #header>
<div style="display: flex;align-items: center;">
<img src="@/assets/add.png" style="cursor:pointer;" alt="" @click="addRules(scope.row.wpItemDetailList)">
</div>
</template>
<template #default="subScope">
<el-button
circle
type="danger"
icon="el-icon-delete"
@click="removeRules(scope.row.wpItemDetailList,subScope.$index, subScope.row)"
/>
</template>
</el-table-column>
<el-table-column label="镀前镀后" prop="testType" align="center">
<template #default="scope">
<el-input v-model="scope.row.testType" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input>
</template>
</el-table-column>
<el-table-column label="尺寸" prop="ruleSize" align="center">
<template #default="scope">
<el-input v-model="scope.row.ruleSize" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input>
</template>
</el-table-column>
<el-table-column label="量具" prop="tools" align="center">
<template #default="scope">
{{scope.row.mtName}}
<!-- {{scope.row.mtName}} -->
<el-input v-model="scope.row.mtName" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input>
</template>
</el-table-column>
<el-table-column label="量具编号" prop="trialNo" align="center">
@ -345,7 +371,8 @@
测厚数据
</el-button>
</div>
<div v-else-if="scope.row.item.name == '尺寸检测' && scope.row.item.wpItemDetailList && scope.row.item.wpItemDetailList.length > 0">
<!-- && scope.row.item.wpItemDetailList && scope.row.item.wpItemDetailList.length > 0 -->
<div v-else-if="scope.row.item.name == '尺寸检测'">
<el-button @click="testValue(scope.row, scope.$index)" link type="primary"
>测试值填写</el-button
>
@ -951,6 +978,20 @@ export default {
console.log('arr=============',arr)
this.getDChyData = arr
},
addRules(data){
console.log('data=============',data)
data.push({
isDel:2
})
},
removeRules(data,index,row){
if(row.isDel != 1){
data.splice(index,1)
}else{
this.$message.error('该数据不可删除')
return
}
},
handleCreate(){
createInspection({}).then(res => {
if(res.data.code == 200){
@ -978,12 +1019,13 @@ export default {
let res = [];
if (row.row.item.name != '尺寸检测' && row.row.item.name != '厚度检测'){
return 'row-expand-cover';
}else if(
row.row.item.name == '尺寸检测' &&
(!row.row.wpItemDetailList || row.row.wpItemDetailList.length === 0)
){
return 'row-expand-cover';
}
// else if(
// row.row.item.name == '' &&
// (!row.row.wpItemDetailList || row.row.wpItemDetailList.length === 0)
// ){
// return 'row-expand-cover';
// }
return '';
},
@ -1366,6 +1408,18 @@ export default {
console.log('item------------------',item)
this.thicknessData = item.wpItemDetailList ? item.wpItemDetailList : []
}
if(item.item.name == '尺寸检测'){
if(item.wpItemDetailList && item.wpItemDetailList.length > 0){
let tmp = item.wpItemDetailList.find(item => item.isDel)
if(!tmp){
item.wpItemDetailList.map(item =>{
item.isDel = 1
})
}
}else{
item.wpItemDetailList = []
}
}
})
}

Loading…
Cancel
Save