生产质量检验模块修改

dev-scheduling
jinna 1 month ago
parent 0ba6f9af20
commit 3d5ce5ee0b
  1. 9
      src/api/qualityManagement/productionTesting/productionDisposition.js
  2. 24
      src/api/qualityManagement/productionTesting/productionQuality.js
  3. 88
      src/views/productionDisposition/hearingDialog.vue
  4. 75
      src/views/productionTesting/productionQuality.vue

@ -117,4 +117,13 @@ export const getRelatedBatchList = (params) => {
method: 'get',
params
});
};
// 查询流程卡号相同数据
export const getSameLotList = (params) => {
return request({
url: '/api/blade-desk/QA/ReviewSheet/getByCardNo',
method: 'get',
params
});
};

@ -64,14 +64,14 @@ export const applySameLot = (params) => {
});
};
// 获取硬度数据列表
export const getHardnessList = (params) => {
return request({
url: '/api/blade-desk/QA/IotHardness/getDataFirst',
method: 'get',
params
});
};
// // 获取硬度数据列表
// export const getHardnessList = (params) => {
// return request({
// url: '/api/blade-desk/QA/IotHardness/getDataFirst',
// method: 'get',
// params
// });
// };
// 刷新硬度数据
export const refreshHardness = (params) => {
@ -83,11 +83,11 @@ export const refreshHardness = (params) => {
};
// 获取测厚数据
export const getThicknessList = (params) => {
export const getThicknessList = (data) => {
return request({
url: '/api/blade-desk/QA/IotThickness/getData',
method: 'get',
params
url: '/api/blade-desk/QA/IotThickness/queryChyData',
method: 'post',
data
});
};

@ -8,11 +8,11 @@
</el-radio-group>
</div>
<div class="test_type" v-if="testType == 1">
<span>历史订单</span>
<el-select v-model="detailInfo.refWoId" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'">
<span>流程卡号</span>
<!-- <el-select v-model="detailInfo.refWoId" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'">
<el-option v-for="item in historyList" :key="item.woId" :label="item.woInfo" :value="item.woId" />
<!-- <el-option label="订单2" value="2" /> -->
</el-select>
</el-select> -->
<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">
@ -301,7 +301,7 @@
<script>
import {getFaultClassList,getQuestionClassList,getQuestionClassList2,getProductionDispositionDetail,
createProductionDisposition,getHistoryOrderList,setHistoryOrderValue,getDispositionTypeList,getResponsiblePartList,
getResponsibleBatchList,getRelatedPartList,getRelatedBatchList} from "@/api/qualityManagement/productionTesting/productionDisposition"
getResponsibleBatchList,getRelatedPartList,getRelatedBatchList,getSameLotList} from "@/api/qualityManagement/productionTesting/productionDisposition"
export default {
props: {
showDialog: {
@ -326,6 +326,7 @@ export default {
openShow: false,
tableData: [],
form: {},
cardNo:"",
testType: 1,
disposalType:1, //
faultList:[],
@ -351,7 +352,7 @@ export default {
this.getError()
this.getQuestionBig()
this.getDetail()
this.getHistory()
// this.getHistory()
this.getDisposeType()
this.getResponsiblePart()
this.getResponsibleBatch()
@ -409,41 +410,60 @@ export default {
})
},
handleUse(){
if(!this.detailInfo.refWoId || this.detailInfo.refWoId == ''){
if(!this.cardNo || this.cardNo == ''){
return
}
// this.checkWoId = this.detailInfo.refWoId
setHistoryOrderValue({
getSameLotList({
id:this.rsId,
woId:this.detailInfo.refWoId
cardNo:this.cardNo
}).then(res =>{
console.log('res1----------------',res)
getProductionDispositionDetail({
// woId:this.detailInfo.refWoId
id:this.rsId
}).then(res =>{
console.log('res2--------------------------------',res)
// this.getQuestionSmall()
this.checkList = []
this.checkList.push(
res.data.data.isBatProblem == 1 ? 'isBatProblem' : null,
res.data.data.isClassicProblem == 1 ? 'isClassicProblem' : null,
res.data.data.isLowError == 1 ? 'isLowError' : null,
res.data.data.isQualityProblem == 1 ? 'isQualityProblem' : null,
)
this.detailInfo = res.data.data
res.data.data.faultList.map((item,index) =>{
item._select = false
this.getQuestionSmall(item.ngType3Id,index)
})
this.faultList = res.data.data.faultList
res.data.data.dutyList.map(item =>{
item._select = false
})
this.dutyList = res.data.data.dutyList
}).catch(err =>{
this.detailInfo.refWoId = ''
this.detailInfo = res.data.data
this.checkList = []
this.checkList.push(
res.data.data.isBatProblem == 1 ? 'isBatProblem' : null,
res.data.data.isClassicProblem == 1 ? 'isClassicProblem' : null,
res.data.data.isLowError == 1 ? 'isLowError' : null,
res.data.data.isQualityProblem == 1 ? 'isQualityProblem' : null,
)
res.data.data.faultList.map((item,index) =>{
item._select = false
this.getQuestionSmall(item.ngType3Id,index)
})
this.faultList = res.data.data.faultList
res.data.data.dutyList.map(item =>{
item._select = false
})
this.dutyList = res.data.data.dutyList
// getProductionDispositionDetail({
// // woId:this.detailInfo.refWoId
// id:this.rsId
// }).then(res =>{
// console.log('res2--------------------------------',res)
// // this.getQuestionSmall()
// this.checkList = []
// this.checkList.push(
// res.data.data.isBatProblem == 1 ? 'isBatProblem' : null,
// res.data.data.isClassicProblem == 1 ? 'isClassicProblem' : null,
// res.data.data.isLowError == 1 ? 'isLowError' : null,
// res.data.data.isQualityProblem == 1 ? 'isQualityProblem' : null,
// )
// this.detailInfo = res.data.data
// res.data.data.faultList.map((item,index) =>{
// item._select = false
// this.getQuestionSmall(item.ngType3Id,index)
// })
// this.faultList = res.data.data.faultList
// res.data.data.dutyList.map(item =>{
// item._select = false
// })
// this.dutyList = res.data.data.dutyList
// }).catch(err =>{
// this.detailInfo.refWoId = ''
// })
}).catch(err =>{
this.detailInfo.refWoId = ''
})

@ -43,7 +43,7 @@
</template>
</avue-crud>
<el-dialog append-to-body title="检验结果" width="90%" v-model="showDialog" fullscreen>
<el-dialog append-to-body title="检验结果" width="90%" v-model="showDialog" fullscreen @close="handleClose">
<div style="display: flex; align-items: center; justify-content: space-between">
<el-descriptions title="订单信息" :column="5" border style="width: 100%" :label-width="110">
<el-descriptions-item label="车间订单号" class="fixed-width-item">{{
@ -136,7 +136,7 @@
@expand-change="handleExpandChange"
:default-expand-all="false"
>
<el-table-column type="expand">
<el-table-column type="expand" v-if="dialogData.ppsName != '烧结包装防护'">
<template #default="scope">
<el-table
:data="scope.row.wpItemDetailList"
@ -405,7 +405,7 @@
<script>
import {dateFormat} from '@/utils/date'
import {createInspection,getInspectionList,getInspectionDetail,fillInspection,getSameLotList,applySameLot,getHardnessList,
import {createInspection,getInspectionList,getInspectionDetail,fillInspection,getSameLotList,applySameLot,
refreshHardness,getThicknessList,goQualityRecord,goCertificate,getSubPackageList, getSupplierList,getMeasurement} from '@/api/qualityManagement/productionTesting/productionQuality.js'
import sametankView from './components/sametankView.vue';
export default {
@ -885,9 +885,7 @@ export default {
};
},
mounted() {
getMeasurement().then(res =>{
this.measureList = res.data.data
})
},
methods: {
handleCreate(){
@ -938,9 +936,13 @@ export default {
if (!tmp) {
this.expandedRowKeys = [...this.expandedRowKeys, row.id];
}
if((row.checkUserId != -1 || row.checkUserRealName != '')){
this.thicknessData = row.wpItemDetailList
return
}
this.isStart = !this.isStart;
if(this.isStart){
this.thicknessData = []
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)
@ -993,14 +995,26 @@ export default {
getThickness(val,allData,endTime,itemDetail){
getThicknessList({
startTime:this.startTime,
endTime:endTime,
// startTime:this.startTime,
// endTime:endTime,
allData,
count:val
// count:val
}).then(res =>{
console.log('res111111111111',res)
if (res.data.data != null) {
const resultList = res.data.data;
// const resultList = [{
// IP:"10.15.3.26",
// devCode:"Ni/CuZn59",
// devId:"LG020029",
// fi1etime: "2025/11/21 16:38:32",
// measurings: [
// {unit: "um", name: "Ni", value: "8.92142"},
// {unit: "/", name: "Cu", value: "/"},
// {unit: "/", name: "Cu", value: "/"}
// ]
// }]
console.log('resultList--------------',resultList)
if (resultList.length > 0) {
resultList.forEach((item) => {
@ -1012,7 +1026,7 @@ export default {
});
if (isExist) return;
console.log('item------------',item)
const { measurings, devId, devCode, filetime } = JSON.parse(item.data);
const { measurings, devId, devCode, filetime } = item;
const obj1 = { ...itemDetail };
// this.devCode = devCode;
obj1.gaugeValue7 = devCode;
@ -1029,7 +1043,8 @@ export default {
obj1['gaugeValue5'] = measurings[2].name;
obj1['gaugeValue6'] = this.getValue(measurings[2].value);
}
if (JSON.parse(item.data).measurings.length > 0) {
console.log('obj1------------',obj1)
if (item.measurings.length > 0) {
obj1.updateTime = dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss');
// obj1.updateTime = filetime;
const index = this.provingObjIsNull();
@ -1053,6 +1068,7 @@ export default {
})
}
console.log('this.thicknessData',this.thicknessData)
console.log('resultList',resultList)
const arr = [...this.getDChyData, ...resultList];
const obj = {};
this.getDChyData = arr.reduce((cur, next) => {
@ -1236,6 +1252,9 @@ export default {
handleResult(row) {
console.log('row------------------',row)
this.checkedId = row.id
getMeasurement().then(res =>{
this.measureList = res.data.data
})
getInspectionDetail({
id: row.id,
}).then(res => {
@ -1246,19 +1265,23 @@ export default {
this.remindMsgList = res.data.data.remindMsgList;
this.vxeTableData = res.data.data.wpItemList;
this.getSameList(row.id)
this.vxeTableData.forEach(item =>{
if(item.item.specialType == '2'){
this.ydInterval = setInterval(() =>{
getHardnessList().then(res =>{
console.log('res2--------------------------',res)
if (res.data.data.length > 0) {
item.checkValue = JSON.parse(res.data.data[0].data).formatted_hardness
clearInterval(this.ydInterval)
}
})
},window.YINGDU_Trigger)
}
})
if(this.dialogData.ppsName != '烧结包装防护'){
this.vxeTableData.forEach(item =>{
console.log('item--------------',item)
if(item.item.specialType == '2' && (item.checkUserId == -1 || item.checkUserRealName == '')){
this.ydInterval = setInterval(() =>{
refreshHardness().then(res =>{
console.log('res2--------------------------',res)
if (res.data.data.length > 0) {
item.checkValue = res.data.data[0].formatted_hardness
clearInterval(this.ydInterval)
}
})
},window.YINGDU_Trigger)
}
})
}
if(this.dialogData.ppsName === '烧结包装防护'){
getSubPackageList({
@ -1275,6 +1298,7 @@ export default {
},
onLoad() {
console.log('query----------------',this.query)
this.loading = true
if(this.query.receiveDate){
delete this.query.receiveDate
}
@ -1288,6 +1312,7 @@ export default {
})
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
},
},

Loading…
Cancel
Save