|
|
|
@ -228,10 +228,7 @@
|
|
|
|
|
fixed
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="审核状态"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="orderStatus">
|
|
|
|
|
<el-table-column label="审核状态" align="center" prop="orderStatus">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag
|
|
|
|
|
:options="dict.type.device_audit_status"
|
|
|
|
@ -239,10 +236,7 @@
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="报修来源"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="orderSource" />
|
|
|
|
|
<el-table-column label="报修来源" align="center" prop="orderSource" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="报修去向"
|
|
|
|
|
align="center"
|
|
|
|
@ -491,15 +485,21 @@
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="报修去向" prop="repairDestination">
|
|
|
|
|
<el-radio-group v-model="form.repairDestination">
|
|
|
|
|
<el-radio label="计划性维修" @click.native="timeBackFillingReset">计划性维修</el-radio>
|
|
|
|
|
<el-radio label="立即维修" @click.native="timeBackFilling">立即维修</el-radio>
|
|
|
|
|
<el-radio
|
|
|
|
|
label="计划性维修"
|
|
|
|
|
@click.native="timeBackFillingReset"
|
|
|
|
|
>计划性维修</el-radio
|
|
|
|
|
>
|
|
|
|
|
<el-radio label="立即维修" @click.native="timeBackFilling"
|
|
|
|
|
>立即维修</el-radio
|
|
|
|
|
>
|
|
|
|
|
<el-radio label="不维修">不维修</el-radio>
|
|
|
|
|
<el-radio label="委外维修">委外维修</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8" v-if="form.repairDestination == '计划性维修'">
|
|
|
|
|
<el-form-item prop="workTeam" label="维修组">
|
|
|
|
@ -539,7 +539,9 @@
|
|
|
|
|
<el-form-item label="是否停机维修" prop="workDownMachine">
|
|
|
|
|
<el-radio-group v-model="form.workDownMachine">
|
|
|
|
|
<el-radio label="1">是</el-radio>
|
|
|
|
|
<el-radio label="0" @click.native="monitorRadio">否</el-radio>
|
|
|
|
|
<el-radio label="0" @click.native="monitorRadio"
|
|
|
|
|
>否</el-radio
|
|
|
|
|
>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -617,11 +619,19 @@
|
|
|
|
|
<el-form-item label="是否停机维修" prop="workDownMachine">
|
|
|
|
|
<el-radio-group v-model="form.workDownMachine">
|
|
|
|
|
<el-radio label="1">是</el-radio>
|
|
|
|
|
<el-radio label="0" @click.native="monitorRadio">否</el-radio>
|
|
|
|
|
<el-radio label="0" @click.native="monitorRadio"
|
|
|
|
|
>否</el-radio
|
|
|
|
|
>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if=" form.repairDestination == '立即维修' && form.workDownMachine == '1'">
|
|
|
|
|
<el-col
|
|
|
|
|
:span="8"
|
|
|
|
|
v-if="
|
|
|
|
|
form.repairDestination == '立即维修' &&
|
|
|
|
|
form.workDownMachine == '1'
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item prop="workPlanDownTime" label="计划停机时间">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
clearable
|
|
|
|
@ -633,7 +643,13 @@
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="form.repairDestination == '立即维修' && form.workDownMachine == '0'">
|
|
|
|
|
<el-col
|
|
|
|
|
:span="8"
|
|
|
|
|
v-if="
|
|
|
|
|
form.repairDestination == '立即维修' &&
|
|
|
|
|
form.workDownMachine == '0'
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item prop="workPlanDownTime" label="计划停机时间">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
clearable
|
|
|
|
@ -690,7 +706,7 @@
|
|
|
|
|
v-model="form.auditOpinion"
|
|
|
|
|
placeholder="请填写审核意见"
|
|
|
|
|
type="textarea"
|
|
|
|
|
:autosize="{ minRows: 2, maxRows: 4}"
|
|
|
|
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
|
|
|
style="width: 420px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -947,11 +963,43 @@
|
|
|
|
|
>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode" v-if = "openAdd == true && openUpdate == false">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.equipmentCode"
|
|
|
|
|
placeholder="请选择设备编码"
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
slot="append"
|
|
|
|
|
@click="handleSelectEquipment"
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
<ItemSelect
|
|
|
|
|
ref="itemSelect"
|
|
|
|
|
@onSelected="onItemSelectedEquipment"
|
|
|
|
|
>
|
|
|
|
|
</ItemSelect>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode" v-if = "openAdd == false && openUpdate == true">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.equipmentCode"
|
|
|
|
|
placeholder="请选择设备编码"
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
disabled
|
|
|
|
|
>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="8" v-if = "openUpdate = true">
|
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.equipmentCode"
|
|
|
|
|
placeholder="请选择设备编码"
|
|
|
|
|
disabled
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
@ -966,7 +1014,7 @@
|
|
|
|
|
>
|
|
|
|
|
</ItemSelect>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="故障时间" prop="orderBreakdownTime">
|
|
|
|
|
<el-date-picker
|
|
|
|
@ -1226,7 +1274,13 @@ import { listFaultDescription } from "@/api/device/faultDescription";
|
|
|
|
|
export default {
|
|
|
|
|
name: "FaultReport",
|
|
|
|
|
components: { ItemSelect, ItemSelectPerson },
|
|
|
|
|
dicts: ["device_order_source", "device_reach_standard", "device_audit_status", "device_repair_destination", "device_audit_status"],
|
|
|
|
|
dicts: [
|
|
|
|
|
"device_order_source",
|
|
|
|
|
"device_reach_standard",
|
|
|
|
|
"device_audit_status",
|
|
|
|
|
"device_repair_destination",
|
|
|
|
|
"device_audit_status",
|
|
|
|
|
],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
CS: {
|
|
|
|
@ -1277,6 +1331,8 @@ export default {
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
openAdd: false,
|
|
|
|
|
openUpdate: false,
|
|
|
|
|
//报修显示弹出层
|
|
|
|
|
openView: false,
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
@ -1413,8 +1469,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//监控radio
|
|
|
|
|
monitorRadio(){
|
|
|
|
|
if(this.form.workDownMachine == '0'){
|
|
|
|
|
monitorRadio() {
|
|
|
|
|
if (this.form.workDownMachine == "0") {
|
|
|
|
|
this.form.workPlanDownTime = null;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -1443,14 +1499,14 @@ export default {
|
|
|
|
|
second
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
this.form.workPlanTime = nowDate(time); //当选择为立即维修时候,都是默认值
|
|
|
|
|
this.form.workPlanTime = nowDate(time); //当选择为立即维修时候,都是默认值
|
|
|
|
|
this.form.workPlanDownTime = nowDate(time);
|
|
|
|
|
this.form.workDownMachine = '1';
|
|
|
|
|
this.form.workDownMachine = "1";
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//计划维修 时间回填重置
|
|
|
|
|
timeBackFillingReset() {
|
|
|
|
|
this.form.workPlanTime = null; //当选择为立即维修时候,都是默认值
|
|
|
|
|
this.form.workPlanTime = null; //当选择为立即维修时候,都是默认值
|
|
|
|
|
this.form.workPlanDownTime = null;
|
|
|
|
|
this.form.workDownMachine = null;
|
|
|
|
|
},
|
|
|
|
@ -1559,36 +1615,60 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.form.orderSource = "PC";
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.openUpdate = false;
|
|
|
|
|
this.openAdd = true;
|
|
|
|
|
this.title = "添加故障报修";
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const orderId = row.orderId || this.ids;
|
|
|
|
|
getFaultReport(orderId).then((response) => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
if (response.data.files != null) {
|
|
|
|
|
var newFiles = [];
|
|
|
|
|
response.data.files.forEach((item) => {
|
|
|
|
|
var newFile = {};
|
|
|
|
|
newFile.name = item.fileName;
|
|
|
|
|
newFile.url = item.fileAddress;
|
|
|
|
|
newFiles.push(newFile);
|
|
|
|
|
});
|
|
|
|
|
this.form.fileList = newFiles;
|
|
|
|
|
}
|
|
|
|
|
const orderStatus = row.orderStatus;
|
|
|
|
|
const orderSource = row.orderSource;
|
|
|
|
|
if (orderStatus === "1" || orderStatus === "0") {
|
|
|
|
|
Message.warning("该报修单已经审核过,不可修改!");
|
|
|
|
|
} else if (orderSource === "点检" || orderSource === "巡检") {
|
|
|
|
|
Message.warning("点检、巡检报修信息自动生成,不可修改!");
|
|
|
|
|
} else {
|
|
|
|
|
getFaultReport(orderId).then((response) => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
if (response.data.files != null) {
|
|
|
|
|
var newFiles = [];
|
|
|
|
|
response.data.files.forEach((item) => {
|
|
|
|
|
var newFile = {};
|
|
|
|
|
newFile.name = item.fileName;
|
|
|
|
|
newFile.url = item.fileAddress;
|
|
|
|
|
newFiles.push(newFile);
|
|
|
|
|
});
|
|
|
|
|
this.form.fileList = newFiles;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
this.form.orderSource == "点检" ||
|
|
|
|
|
this.form.orderSource == "巡检"
|
|
|
|
|
) {
|
|
|
|
|
Message.warning("点检、巡检报修信息自动生成,不可修改!");
|
|
|
|
|
} else {
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改故障报修";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.openUpdate = true;
|
|
|
|
|
this.openAdd = false;
|
|
|
|
|
this.title = "修改故障报修";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (
|
|
|
|
|
// this.form.orderSource == "点检" ||
|
|
|
|
|
// this.form.orderSource == "巡检"
|
|
|
|
|
// ) {
|
|
|
|
|
// Message.warning("点检、巡检报修信息自动生成,不可修改!");
|
|
|
|
|
// } else {
|
|
|
|
|
// this.open = true;
|
|
|
|
|
// this.title = "修改故障报修";
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if (this.form.orderStatus != "2" ) {
|
|
|
|
|
// Message.warning("该报修单已经审核过,不可修改!");
|
|
|
|
|
// } else {
|
|
|
|
|
// this.open = true;
|
|
|
|
|
// this.title = "修改故障报修";
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 查看按钮操作 */
|
|
|
|
|
handleView(row) {
|
|
|
|
|
this.reset();
|
|
|
|
@ -1781,7 +1861,11 @@ export default {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.orderId != null) {
|
|
|
|
|
checkFaultReport(this.form).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess("审核成功");
|
|
|
|
|
if(response.code == 200){
|
|
|
|
|
this.$modal.msgSuccess("审核成功");
|
|
|
|
|
}else{
|
|
|
|
|
Message.warning(response.msg);
|
|
|
|
|
}
|
|
|
|
|
this.openCheck = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|