修改批量检索
This commit is contained in:
parent
6163b2fb44
commit
ff1562b373
@ -44,7 +44,7 @@ export default {
|
||||
}
|
||||
this.fieldsList = list;
|
||||
if(this.fieldsList && this.fieldsList.length>0){
|
||||
this.params.type = this.fieldsList[0].prop;
|
||||
this.params.type = this.params.type===""?this.fieldsList[0].prop:this.params.type;
|
||||
}
|
||||
},
|
||||
immediate:true,
|
||||
@ -87,9 +87,12 @@ export default {
|
||||
reset(){
|
||||
this.params.message = "";
|
||||
if(this.fieldsList && this.fieldsList.length>0){
|
||||
this.fieldsList.forEach(item=>{
|
||||
this.fieldsList.forEach((item,index)=>{
|
||||
if(index===0){
|
||||
this.params.type = item.prop;
|
||||
}
|
||||
if(this.fieldsData[item.prop]){
|
||||
this.fieldsData[item.prop].value = []
|
||||
this.fieldsData[item.prop].value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -73,8 +73,8 @@
|
||||
<span class="name">维修动作</span>
|
||||
<span class="text">
|
||||
<el-radio-group v-model="item.repair_action" @change="repairAction" :size="size" :disabled="info.repair_order && info.repair_order.repair_status=== 4">
|
||||
<el-radio :value="1" :label="1">更换</el-radio>
|
||||
<el-radio :value="2" :label="2">修复</el-radio>
|
||||
<el-radio :value="1" :label="1">修复</el-radio>
|
||||
<el-radio :value="2" :label="2">更换</el-radio>
|
||||
<el-radio :value="3" :label="3">无需修复</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
@ -82,14 +82,14 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3 && index==0">
|
||||
<el-col :span="6" :lg="6" :md="8" :xs="24">
|
||||
<span class="name" :class="item.repair_action==1?'required':''">不良现象</span>
|
||||
<span class="name" :class="item.repair_action==2?'required':''">不良现象</span>
|
||||
<div class="text">
|
||||
<el-input :size="size" v-model="item.confirmed_defects" placeholder="不良现象"></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6" :lg="6" :md="8" :xs="24">
|
||||
<span class="name">SLA不达标原因</span>
|
||||
<span class="name" :class="item.repair_action==2?'required':''">SLA不达标原因</span>
|
||||
<div class="text">
|
||||
<el-input :size="size" v-model="params.sla_reason"
|
||||
placeholder="SLA不达标原因"></el-input>
|
||||
@ -98,7 +98,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3 && index==0">
|
||||
<el-col :span="12" :lg="12" :md="12" :xs="24">
|
||||
<span class="name" :class="item.repair_action==1?'required':''">现场步骤分析</span>
|
||||
<span class="name" :class="item.repair_action==2?'required':''">现场步骤分析</span>
|
||||
<div class="text">
|
||||
<el-input type="textarea" :size="size" v-model="item.analysis_steps"
|
||||
placeholder="现场步骤分析"></el-input>
|
||||
@ -117,7 +117,7 @@
|
||||
<el-table-column prop="part_mpn" label="部件MPN" :show-overflow-tooltip="false" width="250">
|
||||
<template #default="scope">
|
||||
<div class="flexBox">
|
||||
<span class="requiredText" v-if="item.repair_action==1">*</span>
|
||||
<span class="requiredText" v-if="item.repair_action==2">*</span>
|
||||
<el-input :size="size" v-model="scope.row.part_mpn" placeholder="部件MPN" style="width: 230px;"></el-input>
|
||||
</div>
|
||||
</template>
|
||||
@ -125,7 +125,7 @@
|
||||
<el-table-column prop="part_sn" label="部件SN" :show-overflow-tooltip="false" width="250">
|
||||
<template #default="scope">
|
||||
<div class="flexBox">
|
||||
<span class="requiredText" v-if="item.repair_action==1">*</span>
|
||||
<span class="requiredText" v-if="item.repair_action==2">*</span>
|
||||
<el-input :size="size" v-model="scope.row.part_sn" placeholder="部件SN" style="width: 230px;"></el-input>
|
||||
</div>
|
||||
</template>
|
||||
@ -221,7 +221,7 @@
|
||||
await this.$API.orders.order.repair.repairing.post(params);
|
||||
},
|
||||
repairAction(e){
|
||||
if(e===1){
|
||||
if(e===2){
|
||||
const un_repair_action = this.params.repair_info.find(em=>em.m_ascription===2);
|
||||
if(!un_repair_action){
|
||||
this.params.repair_info.push({
|
||||
@ -234,7 +234,7 @@
|
||||
repair_action: 3
|
||||
})
|
||||
}
|
||||
}else if(e===2){
|
||||
}else if(e===1){
|
||||
this.params.repair_info = this.params.repair_info.filter(em=>em.m_ascription===1);
|
||||
}
|
||||
},
|
||||
@ -251,7 +251,7 @@
|
||||
})
|
||||
const repair_action_num = data.repair_info[0].repair_action;
|
||||
data.repair_info.forEach((item,index) => {
|
||||
if(repair_action_num!=1 && index!==0){
|
||||
if(repair_action_num===1 && index===0){
|
||||
data.repair_info.splice(index,1);
|
||||
}
|
||||
if (item.repair_action === 3) {
|
||||
@ -263,7 +263,7 @@
|
||||
}
|
||||
});
|
||||
const row = data.repair_info.find(em=>em.m_ascription === 1);
|
||||
if(row && row.repair_action===1){
|
||||
if(row && row.repair_action===2){
|
||||
if(row.confirmed_defects == ''){
|
||||
this.$message.warning('不良现象不能为空');
|
||||
return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user