|
|
|
@ -9,11 +9,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="test_type" v-if="testType == 1"> |
|
|
|
<div class="test_type" v-if="testType == 1"> |
|
|
|
<span>历史订单:</span> |
|
|
|
<span>历史订单:</span> |
|
|
|
<el-select v-model="detailInfo.refWoId" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'" |
|
|
|
<el-select v-model="detailInfo.refWoId" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'"> |
|
|
|
@change="changeHistoryOrder"> |
|
|
|
|
|
|
|
<el-option v-for="item in historyList" :key="item.woId" :label="item.woInfo" :value="item.woId" /> |
|
|
|
<el-option v-for="item in historyList" :key="item.woId" :label="item.woInfo" :value="item.woId" /> |
|
|
|
<!-- <el-option label="订单2" value="2" /> --> |
|
|
|
<!-- <el-option label="订单2" value="2" /> --> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<el-button @click="handleUse" type="primary" style="margin-left:10px;">应用</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-descriptions title="订单信息" border :column="4" label-width="110"> |
|
|
|
<el-descriptions title="订单信息" border :column="4" label-width="110"> |
|
|
|
<el-descriptions-item label="车间订单号:">{{detailInfo.woCode}}</el-descriptions-item> |
|
|
|
<el-descriptions-item label="车间订单号:">{{detailInfo.woCode}}</el-descriptions-item> |
|
|
|
@ -42,8 +42,8 @@ |
|
|
|
</el-descriptions-item> --> |
|
|
|
</el-descriptions-item> --> |
|
|
|
<el-descriptions-item label="处置单类型:"> |
|
|
|
<el-descriptions-item label="处置单类型:"> |
|
|
|
<el-select v-model="detailInfo.reviewOrderMode" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'"> |
|
|
|
<el-select v-model="detailInfo.reviewOrderMode" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'"> |
|
|
|
<el-option label="零件模式" value="1" /> |
|
|
|
<el-option v-for="item in disposeTypeList" :key="item.id" :label="item.dictValue" :value="item.dictKey" /> |
|
|
|
<el-option label="装配模式" value="2" /> |
|
|
|
<!-- <el-option label="装配模式" value="2" /> --> |
|
|
|
<!-- <el-option label="售后模式" value="3" /> --> |
|
|
|
<!-- <el-option label="售后模式" value="3" /> --> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-descriptions-item> |
|
|
|
</el-descriptions-item> |
|
|
|
@ -158,7 +158,7 @@ |
|
|
|
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteFaultEvent()">删除选择行</el-button> |
|
|
|
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteFaultEvent()">删除选择行</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="table_box"> |
|
|
|
<div class="table_box"> |
|
|
|
<el-table ref="faultTable" height="240" :data="faultList" @selection-change="handleSelectionChange" |
|
|
|
<el-table ref="faultTable" height="240" :data="faultList" |
|
|
|
@select="selectChangeData" border> |
|
|
|
@select="selectChangeData" border> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column label="故障类别" prop="ngType2Id" align="center"> |
|
|
|
<el-table-column label="故障类别" prop="ngType2Id" align="center"> |
|
|
|
@ -178,7 +178,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.ngType3Id" :disabled="!scope.row.ngType2Id || type == 'view'" |
|
|
|
<el-select v-model="scope.row.ngType3Id" :disabled="!scope.row.ngType2Id || type == 'view'" |
|
|
|
@change="changeBigQuestion" > |
|
|
|
@change="(val) => changeBigQuestion(val,scope.$index)" > |
|
|
|
<el-option v-for="item in errorBigArr" :key="item.id" :value="item.id" |
|
|
|
<el-option v-for="item in errorBigArr" :key="item.id" :value="item.id" |
|
|
|
:label="item.name"></el-option> |
|
|
|
:label="item.name"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
@ -191,7 +191,7 @@ |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.ngType4Id" |
|
|
|
<el-select v-model="scope.row.ngType4Id" |
|
|
|
:disabled="!scope.row.ngType3Id || type == 'view'" > |
|
|
|
:disabled="!scope.row.ngType3Id || type == 'view'" > |
|
|
|
<el-option v-for="item in errorSmallArr" :key="item.id" :value="item.id" |
|
|
|
<el-option v-for="item in scope.row.errorSmallArr" :key="item.id" :value="item.id" |
|
|
|
:label="item.name"></el-option> |
|
|
|
:label="item.name"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -222,7 +222,7 @@ |
|
|
|
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteDutyEvent()">删除选择行</el-button> |
|
|
|
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteDutyEvent()">删除选择行</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="table_box"> |
|
|
|
<div class="table_box"> |
|
|
|
<el-table :data="dutyList" height="240" @selection-change="handleDutyChange" |
|
|
|
<el-table :data="dutyList" height="240" |
|
|
|
@select="selectChangeDutyData" border> |
|
|
|
@select="selectChangeDutyData" border> |
|
|
|
<el-table-column type="selection" width="55px"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55px"></el-table-column> |
|
|
|
<el-table-column label="责任零件" prop="dutyPart" align="center"> |
|
|
|
<el-table-column label="责任零件" prop="dutyPart" align="center"> |
|
|
|
@ -300,7 +300,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import {getFaultClassList,getQuestionClassList,getQuestionClassList2,getProductionDispositionDetail, |
|
|
|
import {getFaultClassList,getQuestionClassList,getQuestionClassList2,getProductionDispositionDetail, |
|
|
|
createProductionDisposition,getHistoryOrderList,setHistoryOrderValue} from "@/api/qualityManagement/productionTesting/productionDisposition" |
|
|
|
createProductionDisposition,getHistoryOrderList,setHistoryOrderValue,getDispositionTypeList} from "@/api/qualityManagement/productionTesting/productionDisposition" |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
showDialog: { |
|
|
|
showDialog: { |
|
|
|
@ -335,6 +335,10 @@ export default { |
|
|
|
detailInfo:{}, |
|
|
|
detailInfo:{}, |
|
|
|
checkList:[], |
|
|
|
checkList:[], |
|
|
|
historyList:[], |
|
|
|
historyList:[], |
|
|
|
|
|
|
|
checkWoId:'', //已选择的历史订单id |
|
|
|
|
|
|
|
faultDeleteIds:[], //故障列表删除的id |
|
|
|
|
|
|
|
dutyDeleteIds:[], //零件列表删除的id |
|
|
|
|
|
|
|
disposeTypeList:[], |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
@ -343,43 +347,106 @@ export default { |
|
|
|
this.getQuestionBig() |
|
|
|
this.getQuestionBig() |
|
|
|
this.getDetail() |
|
|
|
this.getDetail() |
|
|
|
this.getHistory() |
|
|
|
this.getHistory() |
|
|
|
|
|
|
|
this.getDisposeType() |
|
|
|
// this.getQuestionSmall() |
|
|
|
// this.getQuestionSmall() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
getDisposeType(){ |
|
|
|
|
|
|
|
getDispositionTypeList().then(res =>{ |
|
|
|
|
|
|
|
this.disposeTypeList = res.data.data |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取历史订单 |
|
|
|
// 获取历史订单 |
|
|
|
getHistory(){ |
|
|
|
getHistory(){ |
|
|
|
getHistoryOrderList({}).then(res =>{ |
|
|
|
getHistoryOrderList({}).then(res =>{ |
|
|
|
this.historyList = res.data.data |
|
|
|
this.historyList = res.data.data |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 修改历史订单 |
|
|
|
handleUse(){ |
|
|
|
changeHistoryOrder(val){ |
|
|
|
if(!this.detailInfo.refWoId || this.detailInfo.refWoId == ''){ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// this.checkWoId = this.detailInfo.refWoId |
|
|
|
setHistoryOrderValue({ |
|
|
|
setHistoryOrderValue({ |
|
|
|
id:this.rsId, |
|
|
|
id:this.rsId, |
|
|
|
woId:val |
|
|
|
woId:this.detailInfo.refWoId |
|
|
|
}).then(res =>{ |
|
|
|
}).then(res =>{ |
|
|
|
console.log('res1----------------',res) |
|
|
|
console.log('res1----------------',res) |
|
|
|
getProductionDispositionDetail({ |
|
|
|
getProductionDispositionDetail({ |
|
|
|
woId:val |
|
|
|
// woId:this.detailInfo.refWoId |
|
|
|
|
|
|
|
id:this.rsId |
|
|
|
}).then(res =>{ |
|
|
|
}).then(res =>{ |
|
|
|
console.log('res2--------------------------------',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 = '' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// // 修改历史订单 |
|
|
|
|
|
|
|
// changeHistoryOrder(val){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }, |
|
|
|
getDetail(){ |
|
|
|
getDetail(){ |
|
|
|
getProductionDispositionDetail({ |
|
|
|
getProductionDispositionDetail({ |
|
|
|
id:this.rsId |
|
|
|
id:this.rsId |
|
|
|
}).then(res =>{ |
|
|
|
}).then(res =>{ |
|
|
|
this.detailInfo = res.data.data |
|
|
|
this.detailInfo = res.data.data |
|
|
|
this.testType = res.data.data.bizType == 3 ? 1 : 2 |
|
|
|
console.log('hace---------------',this.detailInfo.hasSaved) |
|
|
|
this.disposalType = res.data.data.bizType == 3 ? '' : res.data.data.bizType |
|
|
|
if(this.detailInfo.hasSaved == 1){ |
|
|
|
this.checkList = [] |
|
|
|
this.testType = res.data.data.bizType == 3 ? 1 : 2 |
|
|
|
this.checkList.push( |
|
|
|
this.disposalType = res.data.data.bizType == 3 ? '' : res.data.data.bizType |
|
|
|
res.data.data.isBatProblem == 1 ? 'isBatProblem' : null, |
|
|
|
this.checkList = [] |
|
|
|
res.data.data.isClassicProblem == 1 ? 'isClassicProblem' : null, |
|
|
|
this.checkList.push( |
|
|
|
res.data.data.isLowError == 1 ? 'isLowError' : null, |
|
|
|
res.data.data.isBatProblem == 1 ? 'isBatProblem' : null, |
|
|
|
res.data.data.isQualityProblem == 1 ? 'isQualityProblem' : 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 |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
// this.detailInfo = res.data.data |
|
|
|
|
|
|
|
this.detailInfo.refWoId = '' |
|
|
|
|
|
|
|
this.detailInfo.poorReason = '' |
|
|
|
|
|
|
|
this.detailInfo.poorDesc = '' |
|
|
|
|
|
|
|
this.detailInfo.reviewOrderMode = '' |
|
|
|
|
|
|
|
this.detailInfo.unqualifiedQty = '' |
|
|
|
|
|
|
|
this.detailInfo.scale = '' |
|
|
|
|
|
|
|
this.detailInfo.upCode = '' |
|
|
|
|
|
|
|
this.detailInfo.scrapNum = '' |
|
|
|
|
|
|
|
this.detailInfo.reDoNum = '' |
|
|
|
|
|
|
|
this.checkList = [] |
|
|
|
|
|
|
|
this.faultList = [] |
|
|
|
|
|
|
|
this.dutyList = [] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取故障类别下拉 |
|
|
|
// 获取故障类别下拉 |
|
|
|
@ -394,23 +461,54 @@ export default { |
|
|
|
this.errorBigArr = res.data.data |
|
|
|
this.errorBigArr = res.data.data |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
changeBigQuestion(val){ |
|
|
|
changeBigQuestion(val,index){ |
|
|
|
this.getQuestionSmall(val) |
|
|
|
this.faultList[index].ngType4Id = '' |
|
|
|
|
|
|
|
this.getQuestionSmall(val,index) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取问题小类 |
|
|
|
// 获取问题小类 |
|
|
|
getQuestionSmall(val){ |
|
|
|
getQuestionSmall(val,index){ |
|
|
|
|
|
|
|
console.log('val---------',val) |
|
|
|
|
|
|
|
console.log('index---------',index) |
|
|
|
getQuestionClassList2({ |
|
|
|
getQuestionClassList2({ |
|
|
|
parentId:val |
|
|
|
parentId:val |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
this.errorSmallArr = res.data.data |
|
|
|
this.faultList[index].errorSmallArr = res.data.data |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
selectChangeData(list, row){ |
|
|
|
|
|
|
|
row._select = !row._select; |
|
|
|
|
|
|
|
}, |
|
|
|
insertFaultEvent(){ |
|
|
|
insertFaultEvent(){ |
|
|
|
this.faultList.push({_select:false}) |
|
|
|
this.faultList.push({_select:false}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
deleteFaultEvent(){ |
|
|
|
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
let tmp = this.faultList.filter(item => item._select) |
|
|
|
|
|
|
|
this.faultDeleteIds = tmp.filter(item => item.id).map(item => item.id); |
|
|
|
|
|
|
|
this.faultList = this.faultList.filter(row => !row._select); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
selectChangeDutyData(list, row){ |
|
|
|
|
|
|
|
row._select = !row._select; |
|
|
|
|
|
|
|
}, |
|
|
|
insertDutyEvent(){ |
|
|
|
insertDutyEvent(){ |
|
|
|
this.dutyList.push({_select:false}) |
|
|
|
this.dutyList.push({_select:false}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
deleteDutyEvent(){ |
|
|
|
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
let tmp = this.dutyList.filter(item => item._select) |
|
|
|
|
|
|
|
this.dutyDeleteIds = tmp.filter(item => item.id).map(item => item.id); |
|
|
|
|
|
|
|
this.dutyList = this.dutyList.filter(row => !row._select); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
closeDialog() { |
|
|
|
closeDialog() { |
|
|
|
this.openShow = false |
|
|
|
this.openShow = false |
|
|
|
this.$emit('closeDialog'); |
|
|
|
this.$emit('closeDialog'); |
|
|
|
@ -427,7 +525,15 @@ export default { |
|
|
|
this.detailInfo.faultList = this.faultList |
|
|
|
this.detailInfo.faultList = this.faultList |
|
|
|
this.detailInfo.dutyList = this.dutyList |
|
|
|
this.detailInfo.dutyList = this.dutyList |
|
|
|
this.detailInfo.submitType = val |
|
|
|
this.detailInfo.submitType = val |
|
|
|
|
|
|
|
this.detailInfo.faultDeleteIds = this.faultDeleteIds.join(',') |
|
|
|
|
|
|
|
this.detailInfo.dutyDeleteIds = this.dutyDeleteIds.join(',') |
|
|
|
console.log('detail---------------------',this.detailInfo) |
|
|
|
console.log('detail---------------------',this.detailInfo) |
|
|
|
|
|
|
|
createProductionDisposition(this.detailInfo).then(res =>{ |
|
|
|
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
|
|
|
this.$message.success(val == '21' ? '保存成功' : '提交成功') |
|
|
|
|
|
|
|
this.closeDialog(true) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 内部审理提交 |
|
|
|
// 内部审理提交 |
|
|
|
submitInside(){ |
|
|
|
submitInside(){ |
|
|
|
|