|
|
|
|
<template>
|
|
|
|
|
<el-dialog title="新增" append-to-body :modelValue="openShow" width="70%" @close="closeDialog" fullscreen>
|
|
|
|
|
<div class="test_type">
|
|
|
|
|
<span>审理类型:</span>
|
|
|
|
|
<el-radio-group v-model="testType" @change="changeType" :disabled="type == 'view'">
|
|
|
|
|
<el-radio :value="1">erp审理</el-radio>
|
|
|
|
|
<el-radio :value="2">内部审理</el-radio>
|
|
|
|
|
</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'">
|
|
|
|
|
<el-option v-for="item in historyList" :key="item.woId" :label="item.woInfo" :value="item.woId" />
|
|
|
|
|
</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">
|
|
|
|
|
<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>
|
|
|
|
|
<el-descriptions-item label="批次号:">{{detailInfo.batchNo}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="总数量:">{{detailInfo.totalNum}}</el-descriptions-item>
|
|
|
|
|
<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-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-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">
|
|
|
|
|
<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="3" /> -->
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="不合格数:">
|
|
|
|
|
<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.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>
|
|
|
|
|
<el-radio :value="2">报废</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="返修数量:">
|
|
|
|
|
<el-input v-model="insideInfo.reDoNum" placeholder="请输入" style="width: 400px;" :disabled="type == 'view' || disposalType == 2"/>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="报废数量:">
|
|
|
|
|
<el-input v-model="insideInfo.scrapNum" placeholder="请输入" style="width: 400px;" :disabled="type == 'view' || disposalType == 1"/>
|
|
|
|
|
</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-form :model="form" label-width="auto">
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="历史订单:">
|
|
|
|
|
<el-select v-model="value" placeholder="请选择">
|
|
|
|
|
<el-option label="订单1" value="1" />
|
|
|
|
|
<el-option label="订单2" value="2" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="处置单类型:">
|
|
|
|
|
<el-select v-model="value" placeholder="请选择">
|
|
|
|
|
<el-option label="零件模式" value="1" />
|
|
|
|
|
<el-option label="装配模式" value="2" />
|
|
|
|
|
<el-option label="售后模式" value="3" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="不合格数:">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="比例:">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="上级编码:">
|
|
|
|
|
<el-input v-model="input" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="">
|
|
|
|
|
<el-checkbox-group v-model="checkList">
|
|
|
|
|
<el-checkbox label="批次性问题" value="Value A" />
|
|
|
|
|
<el-checkbox label="典型问题" value="Value B" />
|
|
|
|
|
<el-checkbox label="低级错误" value="Value C" />
|
|
|
|
|
<el-checkbox label="质量问题" value="Value disabled" />
|
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
</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;">
|
|
|
|
|
<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 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 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)">
|
|
|
|
|
<el-option v-for="item in errorTypeArr" :key="item.id" :value="item.id"
|
|
|
|
|
:label="item.name"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<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)" >
|
|
|
|
|
<el-option v-for="item in scope.row.errorBigArr" :key="item.id" :value="item.id"
|
|
|
|
|
:label="item.name"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="问题小类" prop="ngType4Id" align="center">
|
|
|
|
|
<template #header>
|
|
|
|
|
<span><i style="color:red">*</i>问题小类</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-select v-model="scope.row.ngType4Id"
|
|
|
|
|
:disabled="!scope.row.ngType3Id || type == 'view'" >
|
|
|
|
|
<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">
|
|
|
|
|
<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">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-input v-model="scope.row.qty" :disabled="type == 'view'"
|
|
|
|
|
@input="(value) => changeFaultQty(value, scope.$index)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" prop="memo" align="center">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-input v-model="scope.row.memo" :disabled="type == 'view'"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<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 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">
|
|
|
|
|
<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'">
|
|
|
|
|
<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">
|
|
|
|
|
<template #header>
|
|
|
|
|
<span><i style="color:red">*</i>责任批号</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-select v-model="scope.row.dutyBatch" :disabled="type == 'view'">
|
|
|
|
|
<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">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-select v-model="scope.row.relevantPart" :disabled="type == 'view'">
|
|
|
|
|
<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">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-select v-model="scope.row.relevantBatch" :disabled="type == 'view'">
|
|
|
|
|
<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">
|
|
|
|
|
<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">
|
|
|
|
|
<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">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-input v-model="scope.row.memo" :disabled="type == 'view'"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span class="dialog-footer">
|
|
|
|
|
<el-button plain @click="closeDialog">取消</el-button>
|
|
|
|
|
<el-button type="primary" v-if="testType == 1 && type != 'view'" @click="submit(21)">保存</el-button>
|
|
|
|
|
<el-button type="primary" v-if="testType == 2 && type != 'view'" @click="submitInside">提交</el-button>
|
|
|
|
|
<el-button type="primary" v-if="testType == 1 && type != 'view'" plain @click="submit(22)">提交质保</el-button>
|
|
|
|
|
<el-button type="primary" v-if="testType == 1 && type != 'view'" plain @click="submit(23)">提交工艺</el-button>
|
|
|
|
|
<el-button type="primary" v-if="testType == 1 && type != 'view'" plain @click="submit(24)">提交设计</el-button>
|
|
|
|
|
<el-button type="primary" v-if="testType == 1 && type != 'view'" plain @click="submit(25)">提交设计变更</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {getFaultClassList,getQuestionClassList,getQuestionClassList2,getProductionDispositionDetail,
|
|
|
|
|
createProductionDisposition,getHistoryOrderList,setHistoryOrderValue,getDispositionTypeList,getResponsiblePartList,
|
|
|
|
|
getResponsibleBatchList,getRelatedPartList,getRelatedBatchList,getSameLotList} from "@/api/qualityManagement/productionTesting/productionDisposition"
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
showDialog: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
moldAddMore: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
rsId:{
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
},
|
|
|
|
|
type:{
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
openShow: false,
|
|
|
|
|
tableData: [],
|
|
|
|
|
form: {},
|
|
|
|
|
cardNo:"",
|
|
|
|
|
testType: 1,
|
|
|
|
|
disposalType:1, //处置类型
|
|
|
|
|
faultList:[],
|
|
|
|
|
dutyList:[],
|
|
|
|
|
errorTypeArr:[], //故障类别
|
|
|
|
|
errorBigArr:[], //问题大类
|
|
|
|
|
errorSmallArr:[], //问题小类
|
|
|
|
|
detailInfo:{},
|
|
|
|
|
insideInfo:{},
|
|
|
|
|
checkList:[],
|
|
|
|
|
historyList:[],
|
|
|
|
|
checkWoId:'', //已选择的历史订单id
|
|
|
|
|
faultDeleteIds:[], //故障列表删除的id
|
|
|
|
|
dutyDeleteIds:[], //零件列表删除的id
|
|
|
|
|
disposeTypeList:[],
|
|
|
|
|
dutyPartArr:[], //责任零件下拉
|
|
|
|
|
dutyBatchArr:[], //责任批号下拉
|
|
|
|
|
relevantPartArr:[], //相关零件下拉
|
|
|
|
|
relevantBatchArr:[], //相关批号下拉
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.openShow = this.showDialog
|
|
|
|
|
this.getError()
|
|
|
|
|
// this.getQuestionBig()
|
|
|
|
|
this.getDetail()
|
|
|
|
|
// this.getHistory()
|
|
|
|
|
this.getDisposeType()
|
|
|
|
|
this.getResponsiblePart()
|
|
|
|
|
this.getResponsibleBatch()
|
|
|
|
|
this.getRelatedPart()
|
|
|
|
|
this.getRelatedBatch()
|
|
|
|
|
// this.getQuestionSmall()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
changeOrderMode(){
|
|
|
|
|
this.dutyList.map(item =>{
|
|
|
|
|
item.dutyPart = ''
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取责任零件
|
|
|
|
|
getResponsiblePart(){
|
|
|
|
|
getResponsiblePartList({
|
|
|
|
|
id:this.rsId
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.dutyPartArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//获取责任批号
|
|
|
|
|
getResponsibleBatch(){
|
|
|
|
|
getResponsibleBatchList({
|
|
|
|
|
id:this.rsId
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.dutyBatchArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取相关零件
|
|
|
|
|
getRelatedPart(){
|
|
|
|
|
getRelatedPartList({
|
|
|
|
|
id:this.rsId
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.relevantPartArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取相关批号
|
|
|
|
|
getRelatedBatch(){
|
|
|
|
|
getRelatedBatchList({
|
|
|
|
|
id:this.rsId
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.relevantBatchArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getDisposeType(){
|
|
|
|
|
getDispositionTypeList().then(res =>{
|
|
|
|
|
this.disposeTypeList = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取历史订单
|
|
|
|
|
getHistory(){
|
|
|
|
|
getHistoryOrderList({}).then(res =>{
|
|
|
|
|
this.historyList = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleUse(){
|
|
|
|
|
if(!this.cardNo || this.cardNo == ''){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// this.checkWoId = this.detailInfo.refWoId
|
|
|
|
|
getSameLotList({
|
|
|
|
|
id:this.rsId,
|
|
|
|
|
cardNo:this.cardNo
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
console.log('res1----------------',res)
|
|
|
|
|
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 = ''
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// // 修改历史订单
|
|
|
|
|
// changeHistoryOrder(val){
|
|
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
getDetail(){
|
|
|
|
|
getProductionDispositionDetail({
|
|
|
|
|
id:this.rsId
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.detailInfo = res.data.data
|
|
|
|
|
console.log('hace---------------',this.detailInfo.hasSaved)
|
|
|
|
|
if(this.detailInfo.hasSaved == 1){
|
|
|
|
|
this.detailInfo.refWoId = res.data.data.refWoId == 0 ? '' : res.data.data.refWoId
|
|
|
|
|
this.testType = res.data.data.bizType == 3 ? 1 : 2
|
|
|
|
|
this.disposalType = res.data.data.bizType == 3 ? '' : res.data.data.bizType
|
|
|
|
|
this.detailInfo.scrapNum = this.disposalType == 1 ? '' : res.data.data.scrapNum
|
|
|
|
|
this.detailInfo.reDoNum = this.disposalType == 2 ? '' : res.data.data.reDoNum
|
|
|
|
|
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
|
|
|
|
|
}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 = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取故障类别下拉
|
|
|
|
|
getError(){
|
|
|
|
|
getFaultClassList().then(res => {
|
|
|
|
|
this.errorTypeArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取问题大类
|
|
|
|
|
getQuestionBig(){
|
|
|
|
|
getQuestionClassList().then(res => {
|
|
|
|
|
this.errorBigArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
changeGzType(val,index){
|
|
|
|
|
this.faultList[index].ngType3Id = ''
|
|
|
|
|
this.faultList[index].ngType4Id = ''
|
|
|
|
|
getQuestionClassList({
|
|
|
|
|
parentId:val
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.faultList[index].errorBigArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
changeBigQuestion(val,index){
|
|
|
|
|
this.faultList[index].ngType4Id = ''
|
|
|
|
|
this.getQuestionSmall(val,index)
|
|
|
|
|
},
|
|
|
|
|
// 获取问题小类
|
|
|
|
|
getQuestionSmall(val,index){
|
|
|
|
|
console.log('val---------',val)
|
|
|
|
|
console.log('index---------',index)
|
|
|
|
|
getQuestionClassList2({
|
|
|
|
|
parentId:val
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.faultList[index].errorSmallArr = res.data.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
selectChangeData(list, row){
|
|
|
|
|
row._select = !row._select;
|
|
|
|
|
},
|
|
|
|
|
insertFaultEvent(){
|
|
|
|
|
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(){
|
|
|
|
|
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(val) {
|
|
|
|
|
this.openShow = false
|
|
|
|
|
this.$emit('closeDialog',val);
|
|
|
|
|
},
|
|
|
|
|
changeType(val){
|
|
|
|
|
console.log('val---------------------',val)
|
|
|
|
|
if(val == 2){
|
|
|
|
|
this.disposalType = 1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
submit(val){
|
|
|
|
|
this.detailInfo.bizType = this.testType == 1 ? 3 : this.testType == 2 ? this.disposalType == 1 ? 1 : 2 : ''
|
|
|
|
|
this.detailInfo.isBatProblem = this.checkList.includes('isBatProblem') ? 1 : 0
|
|
|
|
|
this.detailInfo.isClassicProblem = this.checkList.includes('isClassicProblem') ? 1 : 0
|
|
|
|
|
this.detailInfo.isLowError = this.checkList.includes('isLowError') ? 1 : 0
|
|
|
|
|
this.detailInfo.isQualityProblem = this.checkList.includes('isQualityProblem') ? 1 : 0
|
|
|
|
|
this.detailInfo.faultList = this.faultList
|
|
|
|
|
this.detailInfo.dutyList = this.dutyList
|
|
|
|
|
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 == '21' ? '保存成功' : '提交成功')
|
|
|
|
|
this.closeDialog(true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 内部审理提交
|
|
|
|
|
submitInside(){
|
|
|
|
|
console.log('inside--------------',this.insideInfo)
|
|
|
|
|
console.log('detail--------------',this.detailInfo)
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
bizType:this.testType == 1 ? 3 : this.testType == 2 ? this.disposalType == 1 ? 1 : 2 : '',
|
|
|
|
|
isBatProblem:this.checkList.includes('isBatProblem') ? 1 : 0,
|
|
|
|
|
isClassicProblem:this.checkList.includes('isClassicProblem') ? 1 : 0,
|
|
|
|
|
isLowError:this.checkList.includes('isLowError') ? 1 : 0,
|
|
|
|
|
isQualityProblem:this.checkList.includes('isQualityProblem') ? 1 : 0,
|
|
|
|
|
submitType:10,
|
|
|
|
|
...this.insideInfo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log('params------------',params)
|
|
|
|
|
|
|
|
|
|
// console.log('check===============',this.checkList.includes('isQualityProblem'))
|
|
|
|
|
// this.detailInfo.bizType = this.testType == 1 ? 3 : this.testType == 2 ? this.disposalType == 1 ? 1 : 2 : ''
|
|
|
|
|
// this.detailInfo.isBatProblem = this.checkList.includes('isBatProblem') ? 1 : 0
|
|
|
|
|
// this.detailInfo.isClassicProblem = this.checkList.includes('isClassicProblem') ? 1 : 0
|
|
|
|
|
// this.detailInfo.isLowError = this.checkList.includes('isLowError') ? 1 : 0
|
|
|
|
|
// this.detailInfo.isQualityProblem = this.checkList.includes('isQualityProblem') ? 1 : 0
|
|
|
|
|
// this.detailInfo.submitType = 10
|
|
|
|
|
// console.log('detailInfo-----------------',this.detailInfo)
|
|
|
|
|
createProductionDisposition(params).then(res =>{
|
|
|
|
|
if(res.data.code == 200){
|
|
|
|
|
this.$message.success('提交成功')
|
|
|
|
|
this.closeDialog(true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.test_type{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|
.margin-top {
|
|
|
|
|
margin-top: 24px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn_box {
|
|
|
|
|
margin-top: 0 !important;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.table_box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|