|
|
|
@ -7,12 +7,69 @@ |
|
|
|
<el-radio :value="2">内部审理</el-radio> |
|
|
|
<el-radio :value="2">内部审理</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <div class="test_type" v-if="testType == 1"> |
|
|
|
<el-descriptions title="订单信息" border :column="4" label-width="110" v-if="testType == 1"> |
|
|
|
<span>流程卡号:</span> |
|
|
|
<template #extra> |
|
|
|
<el-input placeholder="请输入流程卡号" style="width:400px;" v-model="cardNo"></el-input> |
|
|
|
<div class="test_type search" v-if="testType == 1"> |
|
|
|
<el-button @click="handleUse" type="primary" style="margin-left:10px;" :disabled="type == 'view'">应用</el-button> |
|
|
|
<span>流程卡号:</span> |
|
|
|
</div> --> |
|
|
|
<el-input placeholder="请输入流程卡号" style="width:400px;" v-model="cardNo"></el-input> |
|
|
|
<el-descriptions title="订单信息" border :column="4" label-width="110"> |
|
|
|
<el-button @click="handleUse" type="primary" style="margin-left:10px;" :disabled="type == 'view'">应用</el-button> |
|
|
|
|
|
|
|
</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.woCode}}</el-descriptions-item> |
|
|
|
<el-descriptions-item label="发现工序:">{{detailInfo.productionDisposition}}</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.cardNo}}</el-descriptions-item> |
|
|
|
@ -21,55 +78,61 @@ |
|
|
|
<el-descriptions-item label="物料号:">{{detailInfo.materialCode}}</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="物料名称:">{{detailInfo.materialName}}</el-descriptions-item> |
|
|
|
<el-descriptions-item label="不良原因:"> |
|
|
|
<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> |
|
|
|
<el-descriptions-item label="不良描述:"> |
|
|
|
<el-descriptions-item label="不良描述:"> |
|
|
|
<el-input v-model="detailInfo.poorDesc" type="textarea" :rows="3" placeholder="请输入" :disabled="type == 'view'" style="width: 40%;" /> |
|
|
|
<el-input v-model="detailInfo.poorDesc" type="textarea" :rows="3" placeholder="请输入" :disabled="type == 'view'" style="width: 40%;" /> |
|
|
|
</el-descriptions-item> |
|
|
|
</el-descriptions-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-descriptions> |
|
|
|
</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-select v-model="value" placeholder="请选择" style="width: 400px;" :disabled="type == 'view'"> |
|
|
|
<el-option label="订单1" value="1" /> |
|
|
|
<el-option label="订单1" value="1" /> |
|
|
|
<el-option label="订单2" value="2" /> |
|
|
|
<el-option label="订单2" value="2" /> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-descriptions-item> |
|
|
|
</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 label="不合格数:"> |
|
|
|
<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> |
|
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="比例:"> |
|
|
|
<el-descriptions-item label="比例:"> |
|
|
|
<el-input v-model="detailInfo.scale" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/> |
|
|
|
<el-input v-model="detailInfo.scale" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/> |
|
|
|
</el-descriptions-item> |
|
|
|
</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> |
|
|
|
|
|
|
|
|
|
|
|
<el-descriptions v-if="testType == 2" class="margin-top" title="质量信息" border :column="3" label-width="110" style="margin-bottom: 24px;"> |
|
|
|
<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-descriptions-item label="比例:"> |
|
|
|
<el-input v-model="insideInfo.scale" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/> |
|
|
|
<el-input v-model="insideInfo.scale" placeholder="请输入" style="width: 400px;" :disabled="type == 'view'"/> |
|
|
|
</el-descriptions-item> |
|
|
|
</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-descriptions-item label="处置类型"> |
|
|
|
<el-radio-group v-model="disposalType" :disabled="type == 'view'"> |
|
|
|
<el-radio-group v-model="disposalType" :disabled="type == 'view'"> |
|
|
|
<el-radio :value="1">返修</el-radio> |
|
|
|
<el-radio :value="1">返修</el-radio> |
|
|
|
@ -146,36 +209,48 @@ |
|
|
|
</el-form> --> |
|
|
|
</el-form> --> |
|
|
|
<!-- <el-descriptions title="故障信息" border :column="4"></el-descriptions> --> |
|
|
|
<!-- <el-descriptions title="故障信息" border :column="4"></el-descriptions> --> |
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="24" v-if="testType == 1" > |
|
|
|
<el-row :gutter="24" v-if="testType == 1" style="margin-top:24px;"> |
|
|
|
<el-col :span="24" style="margin-bottom: 24px;"> |
|
|
|
<el-col :span="12" style="margin-bottom: 10px;"> |
|
|
|
<div class="btn_box"> |
|
|
|
<div class="title_box"> |
|
|
|
<el-button type="primary" :disabled="type == 'view'" plain @click="insertFaultEvent()">插入一行</el-button> |
|
|
|
<div class="title"> |
|
|
|
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteFaultEvent()">删除选择行</el-button> |
|
|
|
故障原因 |
|
|
|
|
|
|
|
</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> |
|
|
|
|
|
|
|
|
|
|
|
<div class="table_box"> |
|
|
|
<div class="table_box"> |
|
|
|
<el-table ref="faultTable" height="240" :data="faultList" |
|
|
|
<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" align="center"></el-table-column> |
|
|
|
<el-table-column label="故障类别" prop="ngType2Id" align="center"> |
|
|
|
<el-table-column label="故障类别" prop="ngType2Id" align="center"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<span><i style="color:red">*</i>故障类别</span> |
|
|
|
<span><i style="color:red">*</i>故障类别</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.ngType2Id" :disabled="type == 'view'" @change="() => changeGzType(scope.row.ngType2Id,scope.$index)" filterable |
|
|
|
<!-- <el-select v-model="scope.row.ngType2Id" :disabled="type == 'view'" @change="() => changeGzType(scope.row.ngType2Id,scope.$index)" filterable clearable> |
|
|
|
clearable> |
|
|
|
|
|
|
|
<el-option v-for="item in errorTypeArr" :key="item.id" :value="item.id" |
|
|
|
<el-option v-for="item in errorTypeArr" :key="item.id" :value="item.id" |
|
|
|
:label="item.name"></el-option> |
|
|
|
: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> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="问题大类" prop="ngType3Id" align="center"> |
|
|
|
<!-- <el-table-column label="问题大类" prop="ngType3Id" align="center"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<span><i style="color:red">*</i>问题大类</span> |
|
|
|
<span><i style="color:red">*</i>问题大类</span> |
|
|
|
</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="(val) => changeBigQuestion(val,scope.$index)" filterable |
|
|
|
@change="(val) => changeBigQuestion(val,scope.$index)" filterable clearable> |
|
|
|
clearable> |
|
|
|
|
|
|
|
<el-option v-for="item in scope.row.errorBigArr" :key="item.id" :value="item.id" |
|
|
|
<el-option v-for="item in scope.row.errorBigArr" :key="item.id" :value="item.id" |
|
|
|
:label="item.name"></el-option> |
|
|
|
:label="item.name"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
@ -187,23 +262,25 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<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'" filterable |
|
|
|
:disabled="!scope.row.ngType3Id || type == 'view'" filterable clearable> |
|
|
|
clearable> |
|
|
|
|
|
|
|
<el-option v-for="item in scope.row.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> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column label="比例" prop="scale" align="center"> |
|
|
|
<!-- <el-table-column label="比例" prop="scale" align="center"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input v-model="scope.row.scale" :disabled="type == 'view'" |
|
|
|
<el-input v-model="scope.row.scale" :disabled="type == 'view'" |
|
|
|
@input="(value) => changeProportion(value, scope.$index)"></el-input> |
|
|
|
@input="(value) => changeProportion(value, scope.$index)"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column label="数量" prop="qty" align="center"> |
|
|
|
<el-table-column label="数量(比例%)" prop="qty" align="center"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input v-model="scope.row.qty" :disabled="type == 'view'" |
|
|
|
<div style="display: flex;"> |
|
|
|
@input="(value) => changeFaultQty(value, scope.$index)"></el-input> |
|
|
|
<el-input v-model="scope.row.qty" :disabled="type == 'view'" |
|
|
|
|
|
|
|
@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> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" prop="memo" align="center"> |
|
|
|
<el-table-column label="备注" prop="memo" align="center"> |
|
|
|
@ -214,70 +291,71 @@ |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="12"> |
|
|
|
<div class="btn_box"> |
|
|
|
<div class="title_box"> |
|
|
|
<el-button type="primary" :disabled="type == 'view'" plain @click="insertDutyEvent()">插入一行</el-button> |
|
|
|
<div class="title"> |
|
|
|
<el-button type="danger" :disabled="type == 'view'" plain @click="deleteDutyEvent()">删除选择行</el-button> |
|
|
|
责任零件 |
|
|
|
|
|
|
|
</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> |
|
|
|
<div class="table_box"> |
|
|
|
<div class="table_box"> |
|
|
|
<el-table :data="dutyList" height="240" |
|
|
|
<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" align="center"></el-table-column> |
|
|
|
<el-table-column label="责任零件" prop="dutyPart" align="center"> |
|
|
|
<el-table-column label="责任零件" prop="dutyPart" align="center" width="200px"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<span><i style="color:red">*</i>责任零件</span> |
|
|
|
<span><i style="color:red">*</i>责任零件</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input v-model="scope.row.dutyPart" v-if="detailInfo.reviewOrderMode == 1" :disabled="type == 'view'"></el-input> |
|
|
|
<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 |
|
|
|
<el-select v-model="scope.row.dutyPart" v-if="detailInfo.reviewOrderMode == 2" :disabled="type == 'view'" filterable clearable> |
|
|
|
clearable> |
|
|
|
|
|
|
|
<el-option v-for="item in dutyPartArr" :key="item.dutyPart" :value="item.dutyPart" |
|
|
|
<el-option v-for="item in dutyPartArr" :key="item.dutyPart" :value="item.dutyPart" |
|
|
|
:label="item.dutyPart"></el-option> |
|
|
|
:label="item.dutyPart"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="责任批号" prop="dutyBatch" align="center"> |
|
|
|
<el-table-column label="责任批号" prop="dutyBatch" align="center" width="200px"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<span><i style="color:red">*</i>责任批号</span> |
|
|
|
<span><i style="color:red">*</i>责任批号</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.dutyBatch" :disabled="type == 'view'" filterable |
|
|
|
<el-select v-model="scope.row.dutyBatch" :disabled="type == 'view'" filterable clearable> |
|
|
|
clearable> |
|
|
|
|
|
|
|
<el-option v-for="item in dutyBatchArr" :key="item.dutyBatch" :value="item.dutyBatch" |
|
|
|
<el-option v-for="item in dutyBatchArr" :key="item.dutyBatch" :value="item.dutyBatch" |
|
|
|
:label="item.dutyBatch"></el-option> |
|
|
|
:label="item.dutyBatch"></el-option> |
|
|
|
<!-- <el-option v-for="item in dutyBatchArr" :key="item.rstId" :value="item.rstId" :label="item.rstName"></el-option> --> |
|
|
|
<!-- <el-option v-for="item in dutyBatchArr" :key="item.rstId" :value="item.rstId" :label="item.rstName"></el-option> --> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="相关零件" prop="relevantPart" align="center"> |
|
|
|
<el-table-column label="相关零件" prop="relevantPart" align="center" width="200px"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.relevantPart" :disabled="type == 'view'" filterable |
|
|
|
<el-select v-model="scope.row.relevantPart" :disabled="type == 'view'" filterable clearable> |
|
|
|
clearable> |
|
|
|
|
|
|
|
<el-option v-for="item in relevantPartArr" :key="item.relevantPart" :value="item.relevantPart" |
|
|
|
<el-option v-for="item in relevantPartArr" :key="item.relevantPart" :value="item.relevantPart" |
|
|
|
:label="item.relevantPart"></el-option> |
|
|
|
:label="item.relevantPart"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="相关批号" prop="relevantBatch" align="center"> |
|
|
|
<el-table-column label="相关批号" prop="relevantBatch" align="center" width="200px"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.relevantBatch" :disabled="type == 'view'" filterable |
|
|
|
<el-select v-model="scope.row.relevantBatch" :disabled="type == 'view'" filterable clearable> |
|
|
|
clearable> |
|
|
|
|
|
|
|
<el-option v-for="item in relevantBatchArr" :key="item.relevantBatch" :value="item.relevantBatch" |
|
|
|
<el-option v-for="item in relevantBatchArr" :key="item.relevantBatch" :value="item.relevantBatch" |
|
|
|
:label="item.relevantBatch"></el-option> |
|
|
|
:label="item.relevantBatch"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="数量(件)" prop="qty" align="center"> |
|
|
|
<el-table-column label="数量(件)" prop="qty" align="center" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input v-model="scope.row.qty" :disabled="type == 'view'"></el-input> |
|
|
|
<el-input v-model="scope.row.qty" :disabled="type == 'view'"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位" prop="unit"> |
|
|
|
<el-table-column label="单位" prop="unit" align="center" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input v-model="scope.row.unit" :disabled="type == 'view'"></el-input> |
|
|
|
<el-input v-model="scope.row.unit" :disabled="type == 'view'"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" prop="memo"> |
|
|
|
<el-table-column label="备注" prop="memo" align="center" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input v-model="scope.row.memo" :disabled="type == 'view'"></el-input> |
|
|
|
<el-input v-model="scope.row.memo" :disabled="type == 'view'"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -304,6 +382,7 @@ |
|
|
|
import {getFaultClassList,getQuestionClassList,getQuestionClassList2,getProductionDispositionDetail, |
|
|
|
import {getFaultClassList,getQuestionClassList,getQuestionClassList2,getProductionDispositionDetail, |
|
|
|
createProductionDisposition,getHistoryOrderList,setHistoryOrderValue,getDispositionTypeList,getResponsiblePartList, |
|
|
|
createProductionDisposition,getHistoryOrderList,setHistoryOrderValue,getDispositionTypeList,getResponsiblePartList, |
|
|
|
getResponsibleBatchList,getRelatedPartList,getRelatedBatchList,getSameLotList} from "@/api/qualityManagement/productionTesting/productionDisposition" |
|
|
|
getResponsibleBatchList,getRelatedPartList,getRelatedBatchList,getSameLotList} from "@/api/qualityManagement/productionTesting/productionDisposition" |
|
|
|
|
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
showDialog: { |
|
|
|
showDialog: { |
|
|
|
@ -348,6 +427,16 @@ export default { |
|
|
|
dutyBatchArr:[], //责任批号下拉 |
|
|
|
dutyBatchArr:[], //责任批号下拉 |
|
|
|
relevantPartArr:[], //相关零件下拉 |
|
|
|
relevantPartArr:[], //相关零件下拉 |
|
|
|
relevantBatchArr:[], //相关批号下拉 |
|
|
|
relevantBatchArr:[], //相关批号下拉 |
|
|
|
|
|
|
|
poorReasonList:[], |
|
|
|
|
|
|
|
cascaderProps:{ |
|
|
|
|
|
|
|
// 自定义字段名(如果你的接口返回的不是 value 和 label,需要在这里映射) |
|
|
|
|
|
|
|
value: 'id', |
|
|
|
|
|
|
|
label: 'name', |
|
|
|
|
|
|
|
// 开启懒加载 |
|
|
|
|
|
|
|
lazy: true, |
|
|
|
|
|
|
|
// 懒加载方法 |
|
|
|
|
|
|
|
lazyLoad: this.lazyLoadMethod |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
@ -361,9 +450,61 @@ export default { |
|
|
|
this.getResponsibleBatch() |
|
|
|
this.getResponsibleBatch() |
|
|
|
this.getRelatedPart() |
|
|
|
this.getRelatedPart() |
|
|
|
this.getRelatedBatch() |
|
|
|
this.getRelatedBatch() |
|
|
|
|
|
|
|
this.getDictionary() |
|
|
|
// this.getQuestionSmall() |
|
|
|
// this.getQuestionSmall() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
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(){ |
|
|
|
changeOrderMode(){ |
|
|
|
this.dutyList.map(item =>{ |
|
|
|
this.dutyList.map(item =>{ |
|
|
|
item.dutyPart = '' |
|
|
|
item.dutyPart = '' |
|
|
|
@ -480,6 +621,7 @@ export default { |
|
|
|
id:this.rsId |
|
|
|
id:this.rsId |
|
|
|
}).then(res =>{ |
|
|
|
}).then(res =>{ |
|
|
|
this.detailInfo = res.data.data |
|
|
|
this.detailInfo = res.data.data |
|
|
|
|
|
|
|
// this.detailInfo.totalNum = 15 |
|
|
|
this.insideInfo = res.data.data |
|
|
|
this.insideInfo = res.data.data |
|
|
|
console.log('hace---------------',this.detailInfo.hasSaved) |
|
|
|
console.log('hace---------------',this.detailInfo.hasSaved) |
|
|
|
if(this.detailInfo.hasSaved == 1){ |
|
|
|
if(this.detailInfo.hasSaved == 1){ |
|
|
|
@ -497,7 +639,8 @@ export default { |
|
|
|
) |
|
|
|
) |
|
|
|
res.data.data.faultList.map((item,index) =>{ |
|
|
|
res.data.data.faultList.map((item,index) =>{ |
|
|
|
item._select = false |
|
|
|
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 |
|
|
|
this.faultList = res.data.data.faultList |
|
|
|
res.data.data.dutyList.map(item =>{ |
|
|
|
res.data.data.dutyList.map(item =>{ |
|
|
|
@ -506,10 +649,14 @@ export default { |
|
|
|
this.dutyList = res.data.data.dutyList |
|
|
|
this.dutyList = res.data.data.dutyList |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
// this.detailInfo = res.data.data |
|
|
|
// 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.refWoId = '' |
|
|
|
this.detailInfo.poorReason = '' |
|
|
|
this.detailInfo.poorReason = this.detailInfo.poorReason ? this.detailInfo.poorReason : '' |
|
|
|
this.detailInfo.poorDesc = '' |
|
|
|
this.detailInfo.poorDesc = this.detailInfo.poorDesc ? this.detailInfo.poorDesc :'' |
|
|
|
this.detailInfo.reviewOrderMode = '' |
|
|
|
this.detailInfo.reviewOrderMode = '1' |
|
|
|
this.detailInfo.unqualifiedQty = '' |
|
|
|
this.detailInfo.unqualifiedQty = '' |
|
|
|
this.detailInfo.scale = '' |
|
|
|
this.detailInfo.scale = '' |
|
|
|
// this.detailInfo.upCode = '' |
|
|
|
// this.detailInfo.upCode = '' |
|
|
|
@ -612,13 +759,37 @@ export default { |
|
|
|
this.detailInfo.submitType = val |
|
|
|
this.detailInfo.submitType = val |
|
|
|
this.detailInfo.faultDeleteIds = this.faultDeleteIds.join(',') |
|
|
|
this.detailInfo.faultDeleteIds = this.faultDeleteIds.join(',') |
|
|
|
this.detailInfo.dutyDeleteIds = this.dutyDeleteIds.join(',') |
|
|
|
this.detailInfo.dutyDeleteIds = this.dutyDeleteIds.join(',') |
|
|
|
console.log('detail---------------------',this.detailInfo) |
|
|
|
this.detailInfo.faultList.map(item =>{ |
|
|
|
createProductionDisposition(this.detailInfo).then(res =>{ |
|
|
|
if(item.selectedValue) delete item.selectedValue |
|
|
|
if(res.data.code == 200){ |
|
|
|
|
|
|
|
this.$message.success(val == '-1' ? '保存成功' : '提交成功') |
|
|
|
|
|
|
|
this.closeDialog(true) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
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(){ |
|
|
|
submitInside(){ |
|
|
|
@ -661,6 +832,10 @@ export default { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 20px; |
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&.search{ |
|
|
|
|
|
|
|
margin-bottom: 0; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.margin-top { |
|
|
|
.margin-top { |
|
|
|
margin-top: 24px; |
|
|
|
margin-top: 24px; |
|
|
|
@ -674,4 +849,16 @@ export default { |
|
|
|
.table_box { |
|
|
|
.table_box { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.title_box{ |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.title{ |
|
|
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
color: #303133; |
|
|
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |