维修增加必填项
This commit is contained in:
parent
1bd9b9eabf
commit
c76332c59f
@ -82,7 +82,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3 && index==0">
|
<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">
|
<el-col :span="6" :lg="6" :md="8" :xs="24">
|
||||||
<span class="name">不良现象</span>
|
<span class="name" :class="item.repair_action==1?'required':''">不良现象</span>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<el-input :size="size" v-model="item.confirmed_defects" placeholder="不良现象"></el-input>
|
<el-input :size="size" v-model="item.confirmed_defects" placeholder="不良现象"></el-input>
|
||||||
</div>
|
</div>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3 && index==0">
|
<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">
|
<el-col :span="12" :lg="12" :md="12" :xs="24">
|
||||||
<span class="name">现场步骤分析</span>
|
<span class="name" :class="item.repair_action==1?'required':''">现场步骤分析</span>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<el-input type="textarea" :size="size" v-model="item.analysis_steps"
|
<el-input type="textarea" :size="size" v-model="item.analysis_steps"
|
||||||
placeholder="现场步骤分析"></el-input>
|
placeholder="现场步骤分析"></el-input>
|
||||||
@ -124,11 +124,6 @@
|
|||||||
<el-input :size="size" v-model="scope.row.part_sn" placeholder="部件SN"></el-input>
|
<el-input :size="size" v-model="scope.row.part_sn" placeholder="部件SN"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sla" label="部件SLA" :show-overflow-tooltip="true" width="240">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-input :size="size" v-model="scope.row.sla" placeholder="部件SLA"></el-input>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</sc-table>
|
</sc-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -164,7 +159,6 @@
|
|||||||
m_ascription:1, // 1 旧部件 2 新部件
|
m_ascription:1, // 1 旧部件 2 新部件
|
||||||
part_mpn: "",
|
part_mpn: "",
|
||||||
part_sn: "",
|
part_sn: "",
|
||||||
sla: "",
|
|
||||||
sla_non_compliance_reason: "",
|
sla_non_compliance_reason: "",
|
||||||
confirmed_defects: "",
|
confirmed_defects: "",
|
||||||
analysis_steps: "",
|
analysis_steps: "",
|
||||||
@ -174,7 +168,6 @@
|
|||||||
m_ascription:2,
|
m_ascription:2,
|
||||||
part_mpn: "",
|
part_mpn: "",
|
||||||
part_sn: "",
|
part_sn: "",
|
||||||
sla: "",
|
|
||||||
sla_non_compliance_reason: "",
|
sla_non_compliance_reason: "",
|
||||||
confirmed_defects: "",
|
confirmed_defects: "",
|
||||||
analysis_steps: "",
|
analysis_steps: "",
|
||||||
@ -228,7 +221,6 @@
|
|||||||
m_ascription:2,
|
m_ascription:2,
|
||||||
part_mpn: "",
|
part_mpn: "",
|
||||||
part_sn: "",
|
part_sn: "",
|
||||||
sla: "",
|
|
||||||
sla_non_compliance_reason: "",
|
sla_non_compliance_reason: "",
|
||||||
confirmed_defects: "",
|
confirmed_defects: "",
|
||||||
analysis_steps: "",
|
analysis_steps: "",
|
||||||
@ -258,15 +250,26 @@
|
|||||||
if (item.repair_action === 3) {
|
if (item.repair_action === 3) {
|
||||||
delete item.part_mpn
|
delete item.part_mpn
|
||||||
delete item.part_sn
|
delete item.part_sn
|
||||||
delete item.sla
|
|
||||||
delete item.confirmed_defects
|
delete item.confirmed_defects
|
||||||
delete item.sla_non_compliance_reason
|
delete item.sla_non_compliance_reason
|
||||||
delete item.analysis_steps
|
delete item.analysis_steps
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const row = data.repair_info.find(em=>em.m_ascription === 1);
|
||||||
|
if(row && row.repair_action===1){
|
||||||
|
if(row.confirmed_defects == ''){
|
||||||
|
this.$message.warning('不良现象不能为空');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(row.analysis_steps == ''){
|
||||||
|
this.$message.warning('现场步骤分析不能为空');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
const res = await this.$API.orders.order.repair.submit.post(data);
|
const res = await this.$API.orders.order.repair.submit.post(data);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功');
|
||||||
|
await this.getInfo();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -312,6 +315,17 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
.required{
|
||||||
|
position: relative;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.required:after{
|
||||||
|
content: "*";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
color: var(--el-color-danger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnBox {
|
.btnBox {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user