|
|
|
|
@ -11,6 +11,21 @@ |
|
|
|
|
@keyup.enter.native="codeKeyUp" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" :disabled="isDisabled" @click="onSubmit">保存</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12" style="text-align: right"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-checkbox |
|
|
|
|
style="line-height: 24px; height: 24px" |
|
|
|
|
v-model="isThickness" |
|
|
|
|
label="填写厚度检测数据" |
|
|
|
|
size="large" |
|
|
|
|
:disabled="!isSubmit" |
|
|
|
|
@change="changeThickness" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-descriptions |
|
|
|
|
@ -117,8 +132,13 @@ |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template #label> 不良原因 </template> |
|
|
|
|
<!-- <poor-reason v-model="fillInObj.poorReason" placeholder="请选择" @change="prChange" /> --> |
|
|
|
|
<el-select v-model="fillInObj.poorReason" placeholder="请选择" @change="prChange" filterable |
|
|
|
|
clearable> |
|
|
|
|
<el-select |
|
|
|
|
v-model="fillInObj.poorReason" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
@change="prChange" |
|
|
|
|
filterable |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in poorReasonList" |
|
|
|
|
:key="item.dictValue" |
|
|
|
|
@ -138,16 +158,232 @@ |
|
|
|
|
</el-descriptions> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<span style="text-align: center; display: block; margin: 20px 0px 10px 0px"> |
|
|
|
|
<el-button slot="right" type="primary" :disabled="isDisabled" @click="onSubmit" |
|
|
|
|
>保存</el-button |
|
|
|
|
<div v-if="isThickness"> |
|
|
|
|
<div style="font-size: 12px; font-weight: bold; color: #284c89; margin: 10px 0"> |
|
|
|
|
厚度检测 |
|
|
|
|
</div> |
|
|
|
|
<el-table :data="thicknessList"> |
|
|
|
|
<el-table-column type="expand"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-table |
|
|
|
|
:data="thicknessData" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
style="margin: 12px" |
|
|
|
|
:cell-class-name="cellClassName" |
|
|
|
|
> |
|
|
|
|
<el-table-column width="67px"> |
|
|
|
|
<template #header> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<img |
|
|
|
|
src="@/assets/add.png" |
|
|
|
|
style="cursor: pointer" |
|
|
|
|
alt="" |
|
|
|
|
@click="addSpecimen(scope.row)" |
|
|
|
|
/> |
|
|
|
|
<!-- <div style="display: flex; align-items: center"> --> |
|
|
|
|
<img |
|
|
|
|
style="margin-right: 15px; margin-left:10px; cursor: pointer" |
|
|
|
|
v-if="!isStart" |
|
|
|
|
@click="searchThinkData" |
|
|
|
|
src="@/assets/pause.png" |
|
|
|
|
alt="" |
|
|
|
|
/> |
|
|
|
|
<img |
|
|
|
|
style="margin-right: 15px; margin-left:10px; cursor: pointer" |
|
|
|
|
v-if="isStart" |
|
|
|
|
@click="searchThinkData" |
|
|
|
|
src="@/assets/play.png" |
|
|
|
|
alt="" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-button |
|
|
|
|
circle |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="removeSpecimen(subScope.$index, subScope.row, scope.row)" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="序列号" prop="seqNo" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><span style="color:red;margin-right:5px;">*</span>序列号</span> |
|
|
|
|
<!-- </div> --> |
|
|
|
|
</template> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.seqNo" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="程式编号" prop="gaugeValue7" align="center"> |
|
|
|
|
|
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue7" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
@blur="validateCode(subScope.row)" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="名称1" prop="gaugeValue1" align="center"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue1" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="参数1(um)" prop="gaugeValue2" align="center"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue2" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
@blur="validateNum1(subScope.row)" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="名称2" prop="gaugeValue3" align="center"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue3" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="参数2(um)" prop="gaugeValue4" align="center"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue4" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
@blur="validateNum2(subScope.row)" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="名称3" prop="gaugeValue5" align="center"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue5" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="参数3(um)" prop="gaugeValue6" align="center"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue6" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
@blur="validateNum3(subScope.row)" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="设备编码" prop="gaugeValue8" align="center"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="subScope.row.gaugeValue8" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="检测时间" prop="updateTime" align="center" width="260"> |
|
|
|
|
<template #default="subScope"> |
|
|
|
|
<el-date-picker |
|
|
|
|
type="datetime" |
|
|
|
|
style="width: 90%" |
|
|
|
|
v-model="subScope.row.updateTime" |
|
|
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
placeholder="请选择时间" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' |
|
|
|
|
" |
|
|
|
|
></el-date-picker> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="项目编号" prop="itemCode" align="center"> |
|
|
|
|
<template #default="scope"> {{scope.row.item.code}} </template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="项目" prop="itemName" align="center"> |
|
|
|
|
<template #default="scope"> {{scope.row.item.name}} </template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="检验类型" prop="trialType" align="center"> |
|
|
|
|
<template #default="scope"> {{scope.row.item.itemTypeName}} </template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="检验标准" prop="standardName" align="center" width="150px"> |
|
|
|
|
<template #default="scope"> {{scope.row.standard && scope.row.standard.name}} </template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="测试值" prop="coatingType" align="center"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-select v-model="scope.row.coatingType"> |
|
|
|
|
<el-option label="底镀层" value="2"></el-option> |
|
|
|
|
<el-option label="表层" value="1"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="试验数量" prop="testQty" align="center"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input v-model="scope.row.testQty" :disabled=" scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="消耗数量" prop="lossQty" align="center"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input v-model="scope.row.lossQty" :disabled=" scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="检验数量" prop="checkResult" align="center"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input v-model="scope.row.checkQty" :disabled=" scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="检验结果" prop="checkResult" width="220px" align="center"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-radio-group |
|
|
|
|
v-model="scope.row.checkResult" |
|
|
|
|
@change="val => changeQty(val, scope.$index)" |
|
|
|
|
:disabled=" scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' " |
|
|
|
|
> |
|
|
|
|
</span> |
|
|
|
|
<el-radio :label="1">合格</el-radio> |
|
|
|
|
<el-radio :label="2">不合格</el-radio> |
|
|
|
|
<el-radio :label="3">NA</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="检验人" prop="checkUserRealName" align="center"></el-table-column> |
|
|
|
|
<el-table-column label="检验时间" prop="checkDate" align="center"></el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- <span style="text-align: center; display: block; margin: 20px 0px 10px 0px"> |
|
|
|
|
</span> --> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { loadProTest, saveProCheck } from '@/api/workCheck/index.js'; |
|
|
|
|
import {dateFormat} from '@/utils/date' |
|
|
|
|
import { loadProTest, saveProCheck,getInspectionItemList,getInspectionStandardList } from '@/api/workCheck/index.js'; |
|
|
|
|
import {getCodeRemind,getParamRemind,getThicknessList} from '@/api/qualityManagement/productionTesting/productionQuality.js' |
|
|
|
|
// defective_cause |
|
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
|
export default { |
|
|
|
|
@ -172,14 +408,335 @@ export default { |
|
|
|
|
}, |
|
|
|
|
isDisabled: false, |
|
|
|
|
poorReasonList: [], //不良原因 |
|
|
|
|
isThickness: false, |
|
|
|
|
thicknessList: [{ |
|
|
|
|
item:{}, |
|
|
|
|
checkValue:'1' |
|
|
|
|
}], |
|
|
|
|
thicknessData: [], |
|
|
|
|
firstInterval:null, |
|
|
|
|
secondInderval:null, |
|
|
|
|
isStart:false, |
|
|
|
|
thickIndex:0, |
|
|
|
|
getDChyData:[], |
|
|
|
|
isSubmit:false, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted(){ |
|
|
|
|
this.getDictionary() |
|
|
|
|
mounted() { |
|
|
|
|
this.getDictionary(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getDictionary(){ |
|
|
|
|
getDictionary({code:'defective_cause'}).then(res => { |
|
|
|
|
validateCode(row){ |
|
|
|
|
console.log('row----------------',row) |
|
|
|
|
getCodeRemind({ |
|
|
|
|
material:this.tableObj.material, |
|
|
|
|
formula:row.gaugeValue7 ? row.gaugeValue7 : '' |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('res=============',res) |
|
|
|
|
if(res.data.data.checkMaterial == '1'){ |
|
|
|
|
row.codeStatus = true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
validateNum1(row){ |
|
|
|
|
getParamRemind({ |
|
|
|
|
prodIdent:this.tableObj.prodIdent, |
|
|
|
|
platingInfo:this.tableObj.platingInfo, |
|
|
|
|
plateCode:this.tableObj.plateCode, |
|
|
|
|
configCode:this.tableObj.configCode, |
|
|
|
|
param1:row.gaugeValue2 ? row.gaugeValue2 : '', |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('res=============',res) |
|
|
|
|
if(res.data.data.checkParam1 == '1'){ |
|
|
|
|
row.num1Status = true |
|
|
|
|
}else{ |
|
|
|
|
row.num1Status = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
validateNum2(row){ |
|
|
|
|
getParamRemind({ |
|
|
|
|
prodIdent:this.tableObj.prodIdent, |
|
|
|
|
platingInfo:this.tableObj.platingInfo, |
|
|
|
|
plateCode:this.tableObj.plateCode, |
|
|
|
|
configCode:this.tableObj.configCode, |
|
|
|
|
param2:row.gaugeValue4 ? row.gaugeValue4 : '', |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('res=============',res) |
|
|
|
|
if(res.data.data.checkParam2 == '1'){ |
|
|
|
|
row.num2Status = true |
|
|
|
|
}else{ |
|
|
|
|
row.num2Status = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
validateNum3(row){ |
|
|
|
|
getParamRemind({ |
|
|
|
|
prodIdent:this.tableObj.prodIdent, |
|
|
|
|
platingInfo:this.tableObj.platingInfo, |
|
|
|
|
plateCode:this.tableObj.plateCode, |
|
|
|
|
configCode:this.tableObj.configCode, |
|
|
|
|
param3:row.gaugeValue6 ? row.gaugeValue6 : '', |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('res=============',res) |
|
|
|
|
if(res.data.data.checkParam3 == '1'){ |
|
|
|
|
row.num3Status = true |
|
|
|
|
}else{ |
|
|
|
|
row.num3Status = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
async changeThickness(val){ |
|
|
|
|
console.log('val=============',val) |
|
|
|
|
if(val){ |
|
|
|
|
const itemResult = await getInspectionItemList({name: '厚度检测'}) |
|
|
|
|
const standardResult = await getInspectionStandardList({name: '010-02235435《热表分门表处理零件检验规范》'}) |
|
|
|
|
console.log('itemResult-----------',itemResult) |
|
|
|
|
console.log('standardResult-----------',standardResult) |
|
|
|
|
this.thicknessList = [ |
|
|
|
|
{ |
|
|
|
|
item:{ |
|
|
|
|
code:this.tableObj.orders + '-' + '0005', |
|
|
|
|
name:itemResult.data.data.records && itemResult.data.data.records.length > 0 ? itemResult.data.data.records[0].code + ' ' + itemResult.data.data.records[0].name : '', |
|
|
|
|
itemTypeName:itemResult.data.data.records && itemResult.data.data.records.length > 0 ? itemResult.data.data.records[0].itemTypeName : '', |
|
|
|
|
id:itemResult.data.data.records && itemResult.data.data.records.length > 0 ? itemResult.data.data.records[0].id : '', |
|
|
|
|
}, |
|
|
|
|
standard:{ |
|
|
|
|
name:standardResult.data.data.records && standardResult.data.data.records.length > 0 ? standardResult.data.data.records[0].name : '', |
|
|
|
|
id:standardResult.data.data.records && standardResult.data.data.records.length > 0 ? standardResult.data.data.records[0].id : '', |
|
|
|
|
}, |
|
|
|
|
coatingType:'2', |
|
|
|
|
sourceType:'1', |
|
|
|
|
testQty:'', |
|
|
|
|
lossQty:'', |
|
|
|
|
checkResult:'', |
|
|
|
|
checkDate:"", |
|
|
|
|
checkUserRealName:'', |
|
|
|
|
itemCode:this.tableObj.orders + '-' + '0005', |
|
|
|
|
itemId:itemResult.data.data.records && itemResult.data.data.records.length > 0 ? itemResult.data.data.records[0].id : '', |
|
|
|
|
itemName:itemResult.data.data.records && itemResult.data.data.records.length > 0 ? itemResult.data.data.records[0].name : '', |
|
|
|
|
standardName:standardResult.data.data.records && standardResult.data.data.records.length > 0 ? standardResult.data.data.records[0].name : '', |
|
|
|
|
standardId:standardResult.data.data.records && standardResult.data.data.records.length > 0 ? standardResult.data.data.records[0].id : '', |
|
|
|
|
wpItemDetailList:[], |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.thicknessData = [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 点击添加厚度检测数据 |
|
|
|
|
addSpecimen(row){ |
|
|
|
|
if(row.checkUserRealName != null && row.checkUserRealName != ''){ |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.thicknessData.push({seqNo:1}) |
|
|
|
|
}, |
|
|
|
|
removeSpecimen(index,row,val){ |
|
|
|
|
if(val.checkUserRealName != null && val.checkUserRealName != ''){ |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.thicknessData.splice(index,1) |
|
|
|
|
let arr = this.getDChyData.filter(item => JSON.stringify(item) === JSON.stringify(row)) |
|
|
|
|
console.log('arr=============',arr) |
|
|
|
|
this.getDChyData = arr |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getValue(value) { |
|
|
|
|
if (value == '/') { |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
if (value > 0) { |
|
|
|
|
const strList = value.split('.'); |
|
|
|
|
return Number(value).toFixed(3 - strList[0].length); |
|
|
|
|
} else { |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
provingObjIsNull() { |
|
|
|
|
let index = null; |
|
|
|
|
for (var i = 0; i < this.thicknessData.length; i++) { |
|
|
|
|
const item = this.thicknessData[i]; |
|
|
|
|
if ( |
|
|
|
|
item.gaugeValue1 == null && |
|
|
|
|
item.gaugeValue2 == null && |
|
|
|
|
item.gaugeValue3 == null && |
|
|
|
|
item.gaugeValue4 == null && |
|
|
|
|
item.gaugeValue5 == null && |
|
|
|
|
item.gaugeValue6 == null |
|
|
|
|
) { |
|
|
|
|
index = i; |
|
|
|
|
i = this.thicknessData.length; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return index; |
|
|
|
|
}, |
|
|
|
|
searchThinkData(){ |
|
|
|
|
const itemDetail = { |
|
|
|
|
// tools: row.trialItem, |
|
|
|
|
// testType: '镀后测厚', |
|
|
|
|
// ruleSize: row.trialStandard, |
|
|
|
|
// prWorkPlanItem: { wpiId: row.wpiId }, |
|
|
|
|
gaugeValue7: null, |
|
|
|
|
gaugeValue8: null |
|
|
|
|
}; |
|
|
|
|
this.isStart = !this.isStart; |
|
|
|
|
if(this.isStart){ |
|
|
|
|
this.thicknessData = this.thicknessData.length > 0 ? this.thicknessData : [] |
|
|
|
|
this.startTime = dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss') |
|
|
|
|
this.firstInterval = setInterval(() =>{ |
|
|
|
|
this.getThickness(0,true,dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss'),itemDetail) |
|
|
|
|
},10 * 1000) |
|
|
|
|
let i = 1; |
|
|
|
|
this.secondInderval = setInterval(() => { |
|
|
|
|
console.log("i =", i); |
|
|
|
|
this.getThickness(i,false,dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss'),itemDetail) |
|
|
|
|
if (i === 10) { |
|
|
|
|
i = 1; // 重置为1,继续循环 |
|
|
|
|
} else { |
|
|
|
|
i++; |
|
|
|
|
} |
|
|
|
|
}, 2200); // 每2秒执行一次 |
|
|
|
|
}else{ |
|
|
|
|
clearInterval(this.firstInterval) |
|
|
|
|
clearInterval(this.secondInderval) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getThickness(val,allData,endTime,itemDetail){ |
|
|
|
|
|
|
|
|
|
getThicknessList({ |
|
|
|
|
startTime:this.startTime, |
|
|
|
|
endTime:endTime, |
|
|
|
|
allData, |
|
|
|
|
// count:val |
|
|
|
|
}).catch(res =>{ |
|
|
|
|
if (res.data.data != null) { |
|
|
|
|
const resultList = res.data.data; |
|
|
|
|
|
|
|
|
|
// const resultList = val == 2 ? [] : [{ |
|
|
|
|
// IP:"10.15.3.26", |
|
|
|
|
// devCode:"Ni/CuZn59", |
|
|
|
|
// devId:"LG020029", |
|
|
|
|
// // fi1etime: "2025/11/21 16:38:32", |
|
|
|
|
// filetime:this.$dayjs().format('YYYY/MM/DD HH:mm:ss'), |
|
|
|
|
// measurings: [ |
|
|
|
|
// {unit: "um", name: "Ni", value: "8.92142"}, |
|
|
|
|
// {unit: "/", name: "Cu", value: "/"}, |
|
|
|
|
// {unit: "/", name: "Cu", value: "/"} |
|
|
|
|
// ] |
|
|
|
|
// }] |
|
|
|
|
|
|
|
|
|
if (resultList.length > 0) { |
|
|
|
|
this.thickIndex++ |
|
|
|
|
resultList.forEach((item) => { |
|
|
|
|
item.seqNo = this.thickIndex |
|
|
|
|
let isExist = false; |
|
|
|
|
this.getDChyData.forEach((items) => { |
|
|
|
|
if (item.filetime === items.filetime) { |
|
|
|
|
isExist = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (isExist) return; |
|
|
|
|
const { measurings, devId, devCode, filetime,seqNo } = item; |
|
|
|
|
const obj1 = { ...itemDetail }; |
|
|
|
|
// this.devCode = devCode; |
|
|
|
|
obj1.gaugeValue7 = devCode; |
|
|
|
|
obj1.gaugeValue8 = devId; |
|
|
|
|
obj1.seqNo = seqNo |
|
|
|
|
if (measurings.length > 0) { |
|
|
|
|
obj1['gaugeValue1'] = measurings[0].name; |
|
|
|
|
obj1['gaugeValue2'] = this.getValue(measurings[0].value); |
|
|
|
|
} |
|
|
|
|
if (measurings.length > 1) { |
|
|
|
|
obj1['gaugeValue3'] = measurings[1].name; |
|
|
|
|
obj1['gaugeValue4'] = this.getValue(measurings[1].value); |
|
|
|
|
} |
|
|
|
|
if (measurings.length > 2) { |
|
|
|
|
obj1['gaugeValue5'] = measurings[2].name; |
|
|
|
|
obj1['gaugeValue6'] = this.getValue(measurings[2].value); |
|
|
|
|
} |
|
|
|
|
if (item.measurings.length > 0) { |
|
|
|
|
obj1.updateTime = dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss'); |
|
|
|
|
// obj1.updateTime = filetime; |
|
|
|
|
const index = this.provingObjIsNull(); |
|
|
|
|
if (index != null) { |
|
|
|
|
const obj2 = this.thicknessData[index]; |
|
|
|
|
obj2.gaugeValue1 = obj1['gaugeValue1']; |
|
|
|
|
obj2.gaugeValue2 = obj1['gaugeValue2']; |
|
|
|
|
obj2.gaugeValue3 = obj1['gaugeValue3']; |
|
|
|
|
obj2.gaugeValue4 = obj1['gaugeValue4']; |
|
|
|
|
obj2.gaugeValue5 = obj1['gaugeValue5']; |
|
|
|
|
obj2.gaugeValue6 = obj1['gaugeValue6']; |
|
|
|
|
obj2.gaugeValue7 = devCode; |
|
|
|
|
obj2.gaugeValue8 = devId; |
|
|
|
|
obj2.updateTime = obj1.updateTime; |
|
|
|
|
obj2.seqNo = seqNo; |
|
|
|
|
// this.$set(this.thicknessData[index], obj2); |
|
|
|
|
this.thicknessData[index] = obj2; |
|
|
|
|
} else { |
|
|
|
|
this.thicknessData.push(obj1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
console.log('this.thicknessData',this.thicknessData) |
|
|
|
|
console.log('resultList',resultList) |
|
|
|
|
const arr = [...this.getDChyData, ...resultList]; |
|
|
|
|
const obj = {}; |
|
|
|
|
this.getDChyData = arr.reduce((cur, next) => { |
|
|
|
|
obj[next.filetime] |
|
|
|
|
? '' |
|
|
|
|
: (obj[next.filetime] = true && cur.push(next)); |
|
|
|
|
return cur; |
|
|
|
|
}, []); |
|
|
|
|
const map = new Map(); |
|
|
|
|
for (const item of this.getDChyData) { |
|
|
|
|
map.set(item.filetime, item); |
|
|
|
|
} |
|
|
|
|
this.getDChyData = [...map.values()]; |
|
|
|
|
console.log('this.getDChyData',this.getDChyData) |
|
|
|
|
if(this.thicknessData.length>0){ |
|
|
|
|
this.thicknessData.forEach(item =>{ |
|
|
|
|
getCodeRemind({ |
|
|
|
|
material:this.tableObj.material, |
|
|
|
|
formula:item.gaugeValue7 |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.data.checkMaterial == '1'){ |
|
|
|
|
item.codeStatus = true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
getParamRemind({ |
|
|
|
|
prodIdent:this.tableObj.prodIdent, |
|
|
|
|
platingInfo:this.tableObj.platingInfo, |
|
|
|
|
plateCode:this.tableObj.plateCode, |
|
|
|
|
configCode:this.tableObj.configCode, |
|
|
|
|
param1:item.gaugeValue2 ? item.gaugeValue2 : '', |
|
|
|
|
param2:item.gaugeValue4 ? item.gaugeValue4 : '', |
|
|
|
|
param3:item.gaugeValue6 ? item.gaugeValue6 : '', |
|
|
|
|
}).then(res =>{ |
|
|
|
|
item.num3Status = false |
|
|
|
|
item.num2Status = false |
|
|
|
|
item.num1Status = false |
|
|
|
|
if(res.data.data.checkParam3 == '1'){ |
|
|
|
|
item.num3Status = true |
|
|
|
|
} |
|
|
|
|
if(res.data.data.checkParam2 == '1'){ |
|
|
|
|
item.num2Status = true |
|
|
|
|
} |
|
|
|
|
if(res.data.data.checkParam1 == '1'){ |
|
|
|
|
item.num1Status = true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getDictionary() { |
|
|
|
|
getDictionary({ code: 'defective_cause' }).then(res => { |
|
|
|
|
this.poorReasonList = res.data.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
@ -215,6 +772,7 @@ export default { |
|
|
|
|
codeKeyUp() { |
|
|
|
|
if (this.formData.cardNo) { |
|
|
|
|
loadProTest({ cardNo: this.formData.cardNo }).then(res => { |
|
|
|
|
this.isSubmit = true; |
|
|
|
|
this.tableObj = res.data.data; |
|
|
|
|
this.fillInObj = { |
|
|
|
|
checkResult: 1, |
|
|
|
|
@ -227,6 +785,34 @@ export default { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
cellClassName({ row, column, rowIndex, columnIndex }) { |
|
|
|
|
if(column.property == 'gaugeValue7'){ |
|
|
|
|
if(row.codeStatus == true){ |
|
|
|
|
return 'high_td'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(column.property == 'gaugeValue2'){ |
|
|
|
|
if(row.num1Status == true){ |
|
|
|
|
return 'high_td'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(column.property == 'gaugeValue4'){ |
|
|
|
|
if(row.num2Status == true){ |
|
|
|
|
return 'high_td'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(column.property == 'gaugeValue6'){ |
|
|
|
|
if(row.num3Status == true){ |
|
|
|
|
return 'high_td'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ''; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onSubmit() { |
|
|
|
|
this.isDisabled = true; |
|
|
|
|
this.$refs.form.validate(valid => { |
|
|
|
|
@ -248,6 +834,16 @@ export default { |
|
|
|
|
} |
|
|
|
|
this.fillInObj.makeQty = this.tableObj.makeQty; |
|
|
|
|
this.fillInObj.wpId = this.tableObj.wpId; |
|
|
|
|
|
|
|
|
|
if(this.isThickness){ |
|
|
|
|
this.thicknessList[0].wpItemDetailList = this.thicknessData |
|
|
|
|
this.fillInObj.wpItemList = this.thicknessList |
|
|
|
|
}else{ |
|
|
|
|
this.thicknessList = [] |
|
|
|
|
this.thicknessData = [] |
|
|
|
|
this.thicknessList[0].wpItemDetailList = [] |
|
|
|
|
} |
|
|
|
|
console.log('this.fillInObj',this.fillInObj) |
|
|
|
|
saveProCheck(this.fillInObj) |
|
|
|
|
.then(res => { |
|
|
|
|
this.$message.success('检验成功!!!'); |
|
|
|
|
@ -263,9 +859,14 @@ export default { |
|
|
|
|
poorMemo: '', |
|
|
|
|
}; |
|
|
|
|
this.formData.cardNo = ''; |
|
|
|
|
this.thicknessList = [] |
|
|
|
|
this.thicknessData = [] |
|
|
|
|
this.isThickness = false |
|
|
|
|
this.isDisabled = false; |
|
|
|
|
}) |
|
|
|
|
.catch(err => {}); |
|
|
|
|
.catch(err => { |
|
|
|
|
this.isDisabled = false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
@ -273,4 +874,23 @@ export default { |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.fixed-width-item { |
|
|
|
|
width: 120px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.is-bordered-content) { |
|
|
|
|
width: 300px; |
|
|
|
|
} |
|
|
|
|
:deep(.row-expand-cover .el-table__expand-column .el-icon) { |
|
|
|
|
visibility: hidden; |
|
|
|
|
} |
|
|
|
|
:deep .high_td{ |
|
|
|
|
background: yellow; |
|
|
|
|
|
|
|
|
|
.el-input{ |
|
|
|
|
.el-input__wrapper{ |
|
|
|
|
background: yellow !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |