Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling

dev-scheduling
zhangdi 2 days ago
commit be42fd652a
  1. 18
      src/api/workCheck/index.js
  2. 327
      src/views/productionDisposition/hearingDialog.vue
  3. 130
      src/views/productionTesting/productionQuality.vue
  4. 646
      src/views/zhgd-work/workCheck/index.vue

@ -18,3 +18,21 @@ export const saveProCheck = (data) => {
});
};
// 检验项目列表
export const getInspectionItemList = (params) => {
return request({
url: '/api/blade-desk/QA/InspectionItem/list',
method: 'get',
params: params,
});
};
// 检验标准列表
export const getInspectionStandardList = (params) => {
return request({
url: '/api/blade-desk/QA/Standard/list',
method: 'get',
params: params,
});
};

@ -7,12 +7,69 @@
<el-radio :value="2">内部审理</el-radio>
</el-radio-group>
</div>
<!-- <div class="test_type" v-if="testType == 1">
<el-descriptions title="订单信息" border :column="4" label-width="110" v-if="testType == 1">
<template #extra>
<div class="test_type search" v-if="testType == 1">
<span>流程卡号</span>
<el-input placeholder="请输入流程卡号" style="width:400px;" v-model="cardNo"></el-input>
<el-button @click="handleUse" type="primary" style="margin-left:10px;" :disabled="type == 'view'">应用</el-button>
</div> -->
<el-descriptions title="订单信息" border :column="4" label-width="110">
</div>
</template>
<el-descriptions-item :span="1" label="车间订单号:">{{detailInfo.woCode}}</el-descriptions-item>
<el-descriptions-item :span="1" label="发现工序:">{{detailInfo.productionDisposition}}</el-descriptions-item>
<el-descriptions-item :span="1" label="流程卡号:">{{detailInfo.cardNo}}</el-descriptions-item>
<el-descriptions-item :span="1" label="批次号:">{{detailInfo.batchNo}}</el-descriptions-item>
<el-descriptions-item :span="1" label="零件号:">{{detailInfo.partCode}}</el-descriptions-item>
<el-descriptions-item :span="1" label="零件名称:">{{detailInfo.prodName}}</el-descriptions-item>
<el-descriptions-item :span="1" label="生产数量:">{{detailInfo.totalNum}}</el-descriptions-item>
<el-descriptions-item :span="1" label="不合格数量:">
<el-input v-model="detailInfo.unqualifiedQty" placeholder="请输入"
@blur="() => changeUnqualifiedQty(detailInfo.unqualifiedQty,'erp')"
:disabled="type == 'view'" />
</el-descriptions-item>
<el-descriptions-item :span="1" label="比例:">{{detailInfo.scale}}{{detailInfo.scale && detailInfo.scale != '' ? '%' : ''}}</el-descriptions-item>
<el-descriptions-item :span="1" label="上级编号:">
<el-input v-model="detailInfo.upCode" placeholder="请输入" :disabled="type == 'view'"/>
</el-descriptions-item>
<el-descriptions-item :span="1" label="处置单类型:">
<el-select v-model="detailInfo.reviewOrderMode" placeholder="请选择" :disabled="type == 'view'" @change="changeOrderMode" filterable clearable >
<el-option v-for="item in disposeTypeList" :key="item.id" :label="item.dictValue" :value="item.dictKey" />
</el-select>
</el-descriptions-item>
<!-- <el-descriptions-item label="物料号:">{{detailInfo.materialCode}}</el-descriptions-item>
<el-descriptions-item label="物料名称:">{{detailInfo.materialName}}</el-descriptions-item> -->
<el-descriptions-item :span="1" label="不良原因:">
<!-- <el-input v-model="detailInfo.poorReason" placeholder="请输入" :disabled="type == 'view'" /> -->
<el-select
v-model="detailInfo.poorReason"
placeholder="请选择"
@change="prChange"
filterable
clearable
>
<el-option
v-for="item in poorReasonList"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictValue"
></el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="不良描述:" :span="2">
<el-input v-model="detailInfo.poorDesc" type="textarea" :rows="3" placeholder="请输入" :disabled="type == 'view'" style="width: 100%;" />
</el-descriptions-item>
<el-descriptions-item label="问题类型" :span="2">
<el-checkbox-group v-model="checkList" :disabled="type == 'view'">
<el-checkbox label="批次性问题" value="isBatProblem" />
<el-checkbox label="典型问题" value="isClassicProblem" />
<el-checkbox label="低级错误" value="isLowError" />
<el-checkbox label="质量问题" value="isQualityProblem" />
</el-checkbox-group>
</el-descriptions-item>
</el-descriptions>
<el-descriptions title="订单信息" border :column="4" label-width="110" v-if="testType == 2">
<el-descriptions-item label="车间订单号:">{{detailInfo.woCode}}</el-descriptions-item>
<el-descriptions-item label="发现工序:">{{detailInfo.productionDisposition}}</el-descriptions-item>
<el-descriptions-item label="流程卡号:">{{detailInfo.cardNo}}</el-descriptions-item>
@ -21,55 +78,61 @@
<el-descriptions-item label="物料号:">{{detailInfo.materialCode}}</el-descriptions-item>
<el-descriptions-item label="物料名称:">{{detailInfo.materialName}}</el-descriptions-item>
<el-descriptions-item label="不良原因:">
<el-input v-model="detailInfo.poorReason" placeholder="请输入" :disabled="type == 'view'" />
<!-- <el-input v-model="detailInfo.poorReason" placeholder="请输入" :disabled="type == 'view'" /> -->
<el-select
v-model="detailInfo.poorReason"
placeholder="请选择"
@change="prChange"
filterable
clearable
>
<el-option
v-for="item in poorReasonList"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictValue"
></el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="不良描述:">
<el-input v-model="detailInfo.poorDesc" type="textarea" :rows="3" placeholder="请输入" :disabled="type == 'view'" style="width: 40%;" />
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="testType == 1" class="margin-top" title="质量信息" border :column="3" label-width="110" style="margin-bottom: 24px;">
<el-descriptions v-if="testType == 1" class="margin-top" title="质量信息" border :column="3" label-width="110" style="margin-bottom: 24px;display:none;">
<el-descriptions-item label="历史订单:">
<!-- <el-descriptions-item label="历史订单:">
<el-select v-model="value" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'">
<el-option label="订单1" value="1" />
<el-option label="订单2" value="2" />
</el-select>
</el-descriptions-item>
<el-descriptions-item label="处置单类型:">
<el-select v-model="detailInfo.reviewOrderMode" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'" @change="changeOrderMode" filterable clearable >
<el-option v-for="item in disposeTypeList" :key="item.id" :label="item.dictValue" :value="item.dictKey" />
</el-select>
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="不合格数:">
<el-input v-model="detailInfo.unqualifiedQty" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/>
<el-input v-model="detailInfo.unqualifiedQty" placeholder="请输入" style="width: 400px;"
:disabled="type == 'view'"/>
</el-descriptions-item>
<el-descriptions-item label="比例:">
<el-input v-model="detailInfo.scale" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/>
</el-descriptions-item>
<el-descriptions-item label="上级编码:">
<el-input v-model="detailInfo.upCode" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/>
</el-descriptions-item>
<el-descriptions-item label="">
<el-checkbox-group v-model="checkList" :disabled="type == 'view'">
<el-checkbox label="批次性问题" value="isBatProblem" />
<el-checkbox label="典型问题" value="isClassicProblem" />
<el-checkbox label="低级错误" value="isLowError" />
<el-checkbox label="质量问题" value="isQualityProblem" />
</el-checkbox-group>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="testType == 2" class="margin-top" title="质量信息" border :column="3" label-width="110" style="margin-bottom: 24px;">
<el-descriptions-item label="不合格数:">
<el-input v-model="insideInfo.unqualifiedQty" placeholder="请输入" style="width: 400px;"
@blur="() => changeUnqualifiedQty(insideInfo.unqualifiedQty,'inside')"
:disabled="type == 'view'"/>
</el-descriptions-item>
<el-descriptions-item label="比例:">
<el-input v-model="insideInfo.scale" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/>
</el-descriptions-item>
<el-descriptions-item label="不合格数:">
<el-input v-model="insideInfo.unqualifiedQty" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/>
</el-descriptions-item>
<el-descriptions-item label="处置类型">
<el-radio-group v-model="disposalType" :disabled="type == 'view'">
<el-radio :value="1">返修</el-radio>
@ -146,36 +209,48 @@
</el-form> -->
<!-- <el-descriptions title="故障信息" border :column="4"></el-descriptions> -->
<el-row :gutter="24" v-if="testType == 1" >
<el-col :span="24" style="margin-bottom: 24px;">
<el-row :gutter="24" v-if="testType == 1" style="margin-top:24px;">
<el-col :span="12" style="margin-bottom: 10px;">
<div class="title_box">
<div class="title">
故障原因
</div>
<div class="btn_box">
<el-button type="primary" :disabled="type == 'view'" plain @click="insertFaultEvent()">插入一行</el-button>
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteFaultEvent()">删除选择行</el-button>
</div>
</div>
<div class="table_box">
<el-table ref="faultTable" height="240" :data="faultList"
@select="selectChangeData" border>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="故障类别" prop="ngType2Id" align="center">
<template #header>
<span><i style="color:red">*</i>故障类别</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.ngType2Id" :disabled="type == 'view'" @change="() => changeGzType(scope.row.ngType2Id,scope.$index)" filterable
clearable>
<!-- <el-select v-model="scope.row.ngType2Id" :disabled="type == 'view'" @change="() => changeGzType(scope.row.ngType2Id,scope.$index)" filterable clearable>
<el-option v-for="item in errorTypeArr" :key="item.id" :value="item.id"
:label="item.name"></el-option>
</el-select>
</el-select> -->
<el-cascader
v-model="scope.row.selectedValue"
:props="cascaderProps"
placeholder="请选择"
:show-all-levels="false"
@change="(val) => handleCascaderChange(val, scope.row)"
clearable
/>
</template>
</el-table-column>
<el-table-column label="问题大类" prop="ngType3Id" align="center">
<!-- <el-table-column label="问题大类" prop="ngType3Id" align="center">
<template #header>
<span><i style="color:red">*</i>问题大类</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.ngType3Id" :disabled="!scope.row.ngType2Id || type == 'view'"
@change="(val) => changeBigQuestion(val,scope.$index)" filterable
clearable>
@change="(val) => changeBigQuestion(val,scope.$index)" filterable clearable>
<el-option v-for="item in scope.row.errorBigArr" :key="item.id" :value="item.id"
:label="item.name"></el-option>
</el-select>
@ -187,23 +262,25 @@
</template>
<template #default="scope">
<el-select v-model="scope.row.ngType4Id"
:disabled="!scope.row.ngType3Id || type == 'view'" filterable
clearable>
:disabled="!scope.row.ngType3Id || type == 'view'" filterable clearable>
<el-option v-for="item in scope.row.errorSmallArr" :key="item.id" :value="item.id"
:label="item.name"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="比例" prop="scale" align="center">
</el-table-column> -->
<!-- <el-table-column label="比例" prop="scale" align="center">
<template #default="scope">
<el-input v-model="scope.row.scale" :disabled="type == 'view'"
@input="(value) => changeProportion(value, scope.$index)"></el-input>
</template>
</el-table-column>
<el-table-column label="数量" prop="qty" align="center">
</el-table-column> -->
<el-table-column label="数量(比例%)" prop="qty" align="center">
<template #default="scope">
<div style="display: flex;">
<el-input v-model="scope.row.qty" :disabled="type == 'view'"
@input="(value) => changeFaultQty(value, scope.$index)"></el-input>
@blur="(value) => changeFaultQty(value, scope.$index)"></el-input>
<div style="margin-left:10px;">{{scope.row.scale}}{{scope.row.scale && scope.row.scale != '' ? '%' : ''}}</div>
</div>
</template>
</el-table-column>
<el-table-column label="备注" prop="memo" align="center">
@ -214,70 +291,71 @@
</el-table>
</div>
</el-col>
<el-col :span="24">
<el-col :span="12">
<div class="title_box">
<div class="title">
责任零件
</div>
<div class="btn_box">
<el-button type="primary" :disabled="type == 'view'" plain @click="insertDutyEvent()">插入一行</el-button>
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteDutyEvent()">删除选择行</el-button>
</div>
</div>
<div class="table_box">
<el-table :data="dutyList" height="240"
@select="selectChangeDutyData" border>
<el-table-column type="selection" width="55px"></el-table-column>
<el-table-column label="责任零件" prop="dutyPart" align="center">
<el-table-column type="selection" width="55px" align="center"></el-table-column>
<el-table-column label="责任零件" prop="dutyPart" align="center" width="200px">
<template #header>
<span><i style="color:red">*</i>责任零件</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.dutyPart" v-if="detailInfo.reviewOrderMode == 1" :disabled="type == 'view'"></el-input>
<el-select v-model="scope.row.dutyPart" v-if="detailInfo.reviewOrderMode == 2" :disabled="type == 'view'" filterable
clearable>
<el-select v-model="scope.row.dutyPart" v-if="detailInfo.reviewOrderMode == 2" :disabled="type == 'view'" filterable clearable>
<el-option v-for="item in dutyPartArr" :key="item.dutyPart" :value="item.dutyPart"
:label="item.dutyPart"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="责任批号" prop="dutyBatch" align="center">
<el-table-column label="责任批号" prop="dutyBatch" align="center" width="200px">
<template #header>
<span><i style="color:red">*</i>责任批号</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.dutyBatch" :disabled="type == 'view'" filterable
clearable>
<el-select v-model="scope.row.dutyBatch" :disabled="type == 'view'" filterable clearable>
<el-option v-for="item in dutyBatchArr" :key="item.dutyBatch" :value="item.dutyBatch"
:label="item.dutyBatch"></el-option>
<!-- <el-option v-for="item in dutyBatchArr" :key="item.rstId" :value="item.rstId" :label="item.rstName"></el-option> -->
</el-select>
</template>
</el-table-column>
<el-table-column label="相关零件" prop="relevantPart" align="center">
<el-table-column label="相关零件" prop="relevantPart" align="center" width="200px">
<template #default="scope">
<el-select v-model="scope.row.relevantPart" :disabled="type == 'view'" filterable
clearable>
<el-select v-model="scope.row.relevantPart" :disabled="type == 'view'" filterable clearable>
<el-option v-for="item in relevantPartArr" :key="item.relevantPart" :value="item.relevantPart"
:label="item.relevantPart"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="相关批号" prop="relevantBatch" align="center">
<el-table-column label="相关批号" prop="relevantBatch" align="center" width="200px">
<template #default="scope">
<el-select v-model="scope.row.relevantBatch" :disabled="type == 'view'" filterable
clearable>
<el-select v-model="scope.row.relevantBatch" :disabled="type == 'view'" filterable clearable>
<el-option v-for="item in relevantBatchArr" :key="item.relevantBatch" :value="item.relevantBatch"
:label="item.relevantBatch"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="数量(件)" prop="qty" align="center">
<el-table-column label="数量(件)" prop="qty" align="center" width="150px">
<template #default="scope">
<el-input v-model="scope.row.qty" :disabled="type == 'view'"></el-input>
</template>
</el-table-column>
<el-table-column label="单位" prop="unit">
<el-table-column label="单位" prop="unit" align="center" width="150px">
<template #default="scope">
<el-input v-model="scope.row.unit" :disabled="type == 'view'"></el-input>
</template>
</el-table-column>
<el-table-column label="备注" prop="memo">
<el-table-column label="备注" prop="memo" align="center" width="150px">
<template #default="scope">
<el-input v-model="scope.row.memo" :disabled="type == 'view'"></el-input>
</template>
@ -304,6 +382,7 @@
import {getFaultClassList,getQuestionClassList,getQuestionClassList2,getProductionDispositionDetail,
createProductionDisposition,getHistoryOrderList,setHistoryOrderValue,getDispositionTypeList,getResponsiblePartList,
getResponsibleBatchList,getRelatedPartList,getRelatedBatchList,getSameLotList} from "@/api/qualityManagement/productionTesting/productionDisposition"
import { getDictionary } from '@/api/system/dict';
export default {
props: {
showDialog: {
@ -348,6 +427,16 @@ export default {
dutyBatchArr:[], //
relevantPartArr:[], //
relevantBatchArr:[], //
poorReasonList:[],
cascaderProps:{
// value label
value: 'id',
label: 'name',
//
lazy: true,
//
lazyLoad: this.lazyLoadMethod
}
}
},
mounted() {
@ -361,9 +450,61 @@ export default {
this.getResponsibleBatch()
this.getRelatedPart()
this.getRelatedBatch()
this.getDictionary()
// this.getQuestionSmall()
},
methods: {
changeUnqualifiedQty(val,type){
console.log('insideInfo.unqualifiedQty--------',this.insideInfo.unqualifiedQty)
if(type == 'erp'){
if(this.detailInfo.totalNum == 0){
this.detailInfo.scale = 0
return
}
this.detailInfo.scale = (val / this.detailInfo.totalNum * 100).toFixed(2)
}
},
changeFaultQty(val,index){
console.log('val--------',val)
console.log('index--------',index)
if(this.detailInfo.unqualifiedQty == 0){
this.faultList[index].scale = 0
return
}
this.faultList[index].scale = (this.faultList[index].qty / this.detailInfo.unqualifiedQty * 100).toFixed(2)
},
getDictionary() {
getDictionary({ code: 'defective_cause' }).then(res => {
this.poorReasonList = res.data.data;
});
},
async lazyLoadMethod(node, resolve){
console.log('node---------',node)
let firstData = []
if(node.level == 0){
const level0Data = await getFaultClassList()
console.log('level0Data---------',level0Data)
firstData = level0Data.data.data
}else if(node.level == 1){
const level1Data = await getQuestionClassList({parentId:node.value})
console.log('level1Data---------',level1Data)
firstData = level1Data.data.data
}else{
const level2Data = await getQuestionClassList2({parentId:node.value})
level2Data.data.data.map(item => item.leaf = true)
console.log('level2Data---------',level2Data)
firstData = level2Data.data.data
}
console.log('firstData---------',firstData)
resolve(firstData)
},
handleCascaderChange(val,row){
row.ngType2Id = val[0]
row.ngType3Id = val[1]
row.ngType4Id = val[2]
},
changeOrderMode(){
this.dutyList.map(item =>{
item.dutyPart = ''
@ -480,6 +621,7 @@ export default {
id:this.rsId
}).then(res =>{
this.detailInfo = res.data.data
// this.detailInfo.totalNum = 15
this.insideInfo = res.data.data
console.log('hace---------------',this.detailInfo.hasSaved)
if(this.detailInfo.hasSaved == 1){
@ -497,7 +639,8 @@ export default {
)
res.data.data.faultList.map((item,index) =>{
item._select = false
this.getQuestionSmall(item.ngType3Id,index)
item.selectedValue = [item.ngType2Id,item.ngType3Id,item.ngType4Id]
// this.getQuestionSmall(item.ngType3Id,index)
})
this.faultList = res.data.data.faultList
res.data.data.dutyList.map(item =>{
@ -506,10 +649,14 @@ export default {
this.dutyList = res.data.data.dutyList
}else{
// this.detailInfo = res.data.data
// this.detailInfo.productionDisposition = res.data.data.productionDisposition || ''
// this.detailInfo.cardNo = res.data.data.cardNo || '1023452022'
// this.detailInfo.batchNo = res.data.data.batchNo || 'bat001'
// this.detailInfo.partCode = res.data.data.partCode || 'bat001'
this.detailInfo.refWoId = ''
this.detailInfo.poorReason = ''
this.detailInfo.poorDesc = ''
this.detailInfo.reviewOrderMode = ''
this.detailInfo.poorReason = this.detailInfo.poorReason ? this.detailInfo.poorReason : ''
this.detailInfo.poorDesc = this.detailInfo.poorDesc ? this.detailInfo.poorDesc :''
this.detailInfo.reviewOrderMode = '1'
this.detailInfo.unqualifiedQty = ''
this.detailInfo.scale = ''
// this.detailInfo.upCode = ''
@ -612,13 +759,37 @@ export default {
this.detailInfo.submitType = val
this.detailInfo.faultDeleteIds = this.faultDeleteIds.join(',')
this.detailInfo.dutyDeleteIds = this.dutyDeleteIds.join(',')
console.log('detail---------------------',this.detailInfo)
createProductionDisposition(this.detailInfo).then(res =>{
if(res.data.code == 200){
this.$message.success(val == '-1' ? '保存成功' : '提交成功')
this.closeDialog(true)
}
this.detailInfo.faultList.map(item =>{
if(item.selectedValue) delete item.selectedValue
})
if(this.detailInfo.faultList.length > 0){
let tmp = this.detailInfo.faultList.find(item => !item.ngType4Id)
if(tmp){
this.$message.error('故障原因数据请补充完整!')
return
}
let value = this.detailInfo.faultList.reduce((sum, item) => sum + Number(item.qty), 0)
console.log('value---------------------',value)
if(value > this.detailInfo.unqualifiedQty){
this.$message.error('故障原因数量相加之和不可大于不合格数量!')
return
}
}
if(this.detailInfo.dutyList.length > 0){
let tmp = this.detailInfo.dutyList.find(item => !item.dutyPart || !item.dutyBatch)
if(tmp){
this.$message.error('责任零件数据请补充完整!')
return
}
}
console.log('detail---------------------',this.detailInfo)
// createProductionDisposition(this.detailInfo).then(res =>{
// if(res.data.code == 200){
// this.$message.success(val == '-1' ? '' : '')
// this.closeDialog(true)
// }
// })
},
//
submitInside(){
@ -661,6 +832,10 @@ export default {
display: flex;
align-items: center;
margin-bottom: 20px;
&.search{
margin-bottom: 0;
}
}
.margin-top {
margin-top: 24px;
@ -674,4 +849,16 @@ export default {
.table_box {
width: 100%;
}
.title_box{
display: flex;
align-items: center;
justify-content: space-between;
.title{
font-size: 14px;
color: #303133;
font-weight: bold;
}
}
</style>

@ -95,23 +95,34 @@
:column="5"
border
style="margin-top: 24px"
></el-descriptions>
>
<template #extra>
<el-button
@click="gainYDValue"
link
type="primary"
size="large"
v-if="showYD"
:title="'重新获取硬度检测值'"
>获取硬度检测值</el-button>
<el-button
@click="goQuality"
link
type="primary"
size="large"
:title="'外协质量记录'"
>质量记录</el-button>
<el-button @click="goQualified" link type="primary" size="large" :title="'外协合格证'"
>合格证</el-button
>
</template>
</el-descriptions>
<el-form :model="form" label-width="auto">
<el-row>
<!-- <el-row>
<el-col :span="7">
<!-- <el-form-item label="备注:">
<el-input
v-model="textarea"
:rows="3"
type="textarea"
placeholder="请输入"
style="width: 1040px"
/>
</el-form-item> -->
</el-col>
<el-col :span="17">
<div style="float: right;display: flex;align-items: center;">
<!-- <el-checkbox style="color:#284c89;margin-right:10px;font-seze:14px;">同步同炉/同槽</el-checkbox> -->
<el-button
@click="gainYDValue"
link
@ -134,7 +145,7 @@
>
</div>
</el-col>
</el-row>
</el-row> -->
</el-form>
<el-table
:data="vxeTableData"
@ -294,21 +305,14 @@
style="margin: 12px"
:cell-class-name="cellClassName"
>
<el-table-column width="57px">
<el-table-column width="67px">
<template #header>
<div style="display: flex;align-items: center;">
<!-- <el-button
circle
type="primary"
icon="el-icon-plus"
@click="addSpecimen()"
/> -->
<!-- <div> -->
<img src="@/assets/add.png" style="cursor:pointer;" alt="" @click="addSpecimen(scope.row)">
<!-- </div> -->
<!-- <img src="@/assets/apply.png" style="width:" alt=""> -->
<img style="margin-right: 15px;margin-left:10px;cursor:pointer;" v-if="!isStart" @click="searchThinkData(scope.row)" src="@/assets/pause.png" alt="">
<img style="margin-right: 15px;margin-left:10px;cursor:pointer;" v-if="isStart" @click="searchThinkData(scope.row)" src="@/assets/play.png" alt="">
</div>
</template>
<template #default="subScope">
<el-button
@ -319,14 +323,28 @@
/>
</template>
</el-table-column>
<el-table-column label="程式编号" prop="gaugeValue7" align="center">
<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 #header>
<div style="display: flex;align-items: center;">
<img style="margin-right: 15px;cursor:pointer;" v-if="!isStart" @click="searchThinkData" src="@/assets/pause.png" alt="">
<img style="margin-right: 15px;cursor:pointer;" v-if="isStart" @click="searchThinkData" src="@/assets/play.png" alt="">
<span>程式编号</span>
</div>
</template>
</template> -->
<template #default="subScope">
<el-input v-model="subScope.row.gaugeValue7" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "
@blur="validateCode(subScope.row)"></el-input>
@ -424,10 +442,24 @@
>
<template #default="scope">
<div v-if="scope.row.item.name == '厚度检测'">
<el-button @click="testMeasurementData(scope.row, scope.$index)" link type="primary">
<!-- {{!isStart ? '测厚数据' : '结束查询'}} -->
<!-- <el-button @click="testMeasurementData(scope.row, scope.$index)" link type="primary">
测厚数据
</el-button>
</el-button> -->
<span v-if="scope.row.coatingType == 2">
{{scope.row.coatingTypeValue}}/{{scope.row.sourceTypeValue}}
</span>
<span v-if="scope.row.coatingType == 1" style="cursor:pointer;">
<el-tooltip
class="box-item"
effect="dark"
placement="bottom"
>
<template #content>
共享来源{{scope.row.sourcelWoCode}} ({{scope.row.sourceorders}})
</template>
{{scope.row.coatingTypeValue}}/{{scope.row.sourceTypeValue}}
</el-tooltip>
</span>
</div>
<!-- && scope.row.item.wpItemDetailList && scope.row.item.wpItemDetailList.length > 0 -->
<div v-else-if="scope.row.item.name == '尺寸检测'">
@ -490,8 +522,9 @@
:column="5"
border
style="margin-top: 24px"
v-if="vxeTableData2.length > 0"
></el-descriptions>
<el-table :data="vxeTableData2" show-overflow-tooltip>
<el-table :data="vxeTableData2" show-overflow-tooltip v-if="vxeTableData2.length > 0">
<el-table-column label="同槽/同炉编号" prop="sameNo" align="center"></el-table-column>
<el-table-column label="订单编码" prop="woCode" align="center"></el-table-column>
<el-table-column label="零件号" prop="partCode" align="center"></el-table-column>
@ -509,9 +542,9 @@
</el-table-column>
</el-table>
<!-- v-if="dialogData.ppsName == '烧结包装防护'" -->
<el-descriptions title="子件" :column="5" border style="margin-top: 24px"></el-descriptions>
<el-descriptions v-if="vxeTableData1.length > 0" title="子件" :column="5" border style="margin-top: 24px"></el-descriptions>
<!-- v-if="dialogData.ppsName == '烧结包装防护'" -->
<el-table :data="vxeTableData1" show-overflow-tooltip>
<el-table v-if="vxeTableData1.length > 0" :data="vxeTableData1" show-overflow-tooltip>
<el-table-column label="子件号" prop="partCode" align="center"></el-table-column>
<el-table-column label="子件名称" prop="partName" align="center"></el-table-column>
<el-table-column label="数量" prop="quota" align="center"></el-table-column>
@ -538,7 +571,10 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
<el-button type="primary" v-if="vxeTableData.length > 0 &&
(vxeTableData.find(item => item.checkUserRealName) == '' ||
vxeTableData.find(item => item.checkUserRealName) == null)"
@click="submit"> </el-button>
</span>
</template>
</el-dialog>
@ -593,6 +629,7 @@ export default {
thicknessData:[],
measureList:[],
vxeTableData1:[],
thickIndex:0,
option: {
tip: false,
height: 'auto',
@ -1161,15 +1198,6 @@ export default {
}
return '';
// if (column.property === 'score') {
// if (row.score < 60) {
// return 'cell-fail';
// }
// if (row.score > 90) {
// return 'cell-excellent';
// }
// }
// return '';
},
@ -1179,7 +1207,9 @@ export default {
if(row.checkUserRealName != null && row.checkUserRealName != ''){
return
}
this.thicknessData.push({})
this.thicknessData.push({
seqNo:1
})
},
removeSpecimen(index,row,val){
if(val.checkUserRealName != null && val.checkUserRealName != ''){
@ -1267,7 +1297,13 @@ export default {
return
}
},
searchThinkData(){
searchThinkData(row){
console.log('row=============',row)
console.log('checkUserRealName----------',row.checkUserRealName)
if(!row.checkUserRealName || row.checkUserRealName != ''){
console.log('11111111111111111')
return
}
const itemDetail = {
// tools: row.trialItem,
// testType: '',
@ -1353,7 +1389,9 @@ export default {
console.log('resultList--------------',resultList)
console.log('getDChyData--------------',this.getDChyData)
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) {
@ -1665,6 +1703,10 @@ export default {
}else{
this.showYD = false
}
// res.data.data.wpItemList.map(item =>{
// item.item.name = item.itemName
// item.checkUserRealName = ''
// })
this.vxeTableData = res.data.data.wpItemList;
console.log('this.vxeTableData', this.vxeTableData);
this.vxeTableData.map(item => {

@ -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>
Loading…
Cancel
Save