2024-08-13 设备-报修维修审核

yangwl
A0010407 3 months ago
parent de4ed98e6c
commit abbdf13057

@ -80,9 +80,9 @@ export function queryEquFaultTypeTree(query) {
} }
// 维修工单检验 // 维修工单检验
export function subInspect(data) { export function checkRepairWorkOrder(data) {
return request({ return request({
url: '/device/repairOrder/subInspect', url: '/device/repairOrder/checkRepairWorkOrder',
method: 'post', method: 'post',
data: data data: data
}); });

@ -6,7 +6,7 @@
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch" v-show="showSearch"
label-width="88px" label-width="100px"
> >
<el-form-item label="报修单号" prop="orderCode"> <el-form-item label="报修单号" prop="orderCode">
<el-input <el-input
@ -17,6 +17,48 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="审核状态" prop="orderStatus">
<el-select
v-model="queryParams.orderStatus"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_audit_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报修来源" prop="orderSource">
<el-select
v-model="queryParams.orderSource"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_order_source"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报修去向" prop="repairDestination">
<el-select
v-model="queryParams.repairDestination"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_repair_destination"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode"> <el-form-item label="设备编码" prop="equipmentCode">
<el-input <el-input
v-model="queryParams.equipmentCode" v-model="queryParams.equipmentCode"
@ -29,6 +71,7 @@
<el-form-item label="故障时间" prop="orderBreakdownTime"> <el-form-item label="故障时间" prop="orderBreakdownTime">
<el-date-picker <el-date-picker
v-model="queryParams.orderBreakdownTimeArray" v-model="queryParams.orderBreakdownTimeArray"
style="width: 510px"
type="daterange" type="daterange"
align="right" align="right"
unlink-panels unlink-panels
@ -40,24 +83,20 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="报修来源" prop="orderSource">
<el-select <el-form-item label="报修人工号" prop="orderRepairmanCode">
v-model="queryParams.orderSource" <el-input
style="width: 150px" v-model="queryParams.orderRepairmanCode"
placeholder="请输入报修人工号"
style="width: 200px"
clearable clearable
> @keyup.enter.native="handleQuery"
<el-option />
v-for="dict in dict.type.device_order_source"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="报修人编号" prop="orderRepairmanCode"> <el-form-item label="报修人名称" prop="orderRepairmanName">
<el-input <el-input
v-model="queryParams.orderRepairmanCode" v-model="queryParams.orderRepairmanName"
placeholder="请输入报修人编号" placeholder="请输入报修人名称"
style="width: 200px" style="width: 200px"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -184,7 +223,8 @@
label="报修单号" label="报修单号"
align="center" align="center"
prop="orderCode" prop="orderCode"
width="200" width="220"
:show-overflow-tooltip="true"
fixed fixed
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -196,11 +236,19 @@
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="处理状态" label="审核状态"
align="center" align="center"
prop="orderStatus" /> prop="orderStatus">
<el-table-column <template slot-scope="scope">
<dict-tag
:options="dict.type.device_audit_status"
:value="scope.row.orderStatus"
/>
</template>
</el-table-column>
<el-table-column
label="报修来源" label="报修来源"
align="center" align="center"
prop="orderSource" /> prop="orderSource" />
@ -214,7 +262,8 @@
label="设备编码" label="设备编码"
align="center" align="center"
prop="equipmentCode" prop="equipmentCode"
width="100" :show-overflow-tooltip="true"
width="120"
/> />
<el-table-column <el-table-column
label="故障描述" label="故障描述"
@ -330,7 +379,7 @@
append-to-body append-to-body
v-if="openCheck" v-if="openCheck"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions <el-descriptions
@ -443,16 +492,15 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="报修去向" prop="repairDestination"> <el-form-item label="报修去向" prop="repairDestination">
<el-radio-group v-model="form.repairDestination"> <el-radio-group v-model="form.repairDestination">
<el-radio label="计划性维修">计划性维修</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 label="委外维修">委外维修</el-radio> <el-radio label="委外维修">委外维修</el-radio>
<el-radio label="立即维修" @click.native="timeBackFilling"
>立即维修</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'"> <el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item prop="workTeam" label="维修组"> <el-form-item prop="workTeam" label="维修组">
@ -486,12 +534,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'"> <el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item label="是否停机维修" prop="workDownMachine"> <el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine"> <el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio> <el-radio label="1"></el-radio>
<el-radio label="0"></el-radio> <el-radio label="0" @click.native="monitorRadio"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -569,17 +618,11 @@
<el-form-item label="是否停机维修" prop="workDownMachine"> <el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine"> <el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio> <el-radio label="1"></el-radio>
<el-radio label="0"></el-radio> <el-radio label="0" @click.native="monitorRadio"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col :span="8" v-if=" form.repairDestination == '立即维修' && form.workDownMachine == '1'">
:span="8"
v-if="
form.repairDestination == '立即维修' &&
form.workDownMachine == '1'
"
>
<el-form-item prop="workPlanDownTime" label="计划停机时间"> <el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker <el-date-picker
clearable clearable
@ -591,13 +634,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col :span="8" v-if="form.repairDestination == '立即维修' && form.workDownMachine == '0'">
:span="8"
v-if="
form.repairDestination == '立即维修' &&
form.workDownMachine == '0'
"
>
<el-form-item prop="workPlanDownTime" label="计划停机时间"> <el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker <el-date-picker
clearable clearable
@ -609,6 +646,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8" v-if="form.repairDestination == '委外维修'"> <el-col :span="8" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="workOutsourcingUnit" label="委外单位"> <el-form-item prop="workOutsourcingUnit" label="委外单位">
@ -634,8 +672,6 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="24" v-if="form.repairDestination == '委外维修'"> <el-col :span="24" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="outSourceReason" label="委外原因"> <el-form-item prop="outSourceReason" label="委外原因">
<el-input <el-input
@ -647,6 +683,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '不维修'">
<el-form-item prop="auditOpinion" label="审核意见">
<el-input
v-model="form.auditOpinion"
placeholder="请填写审核意见"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
style="width: 420px"
/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
@ -1174,7 +1224,7 @@ import { listFaultDescription } from "@/api/device/faultDescription";
export default { export default {
name: "FaultReport", name: "FaultReport",
components: { ItemSelect, ItemSelectPerson }, components: { ItemSelect, ItemSelectPerson },
dicts: ["device_order_source", "device_reach_standard"], dicts: ["device_order_source", "device_reach_standard", "device_audit_status", "device_repair_destination", "device_audit_status"],
data() { data() {
return { return {
CS: { CS: {
@ -1337,6 +1387,16 @@ export default {
orderRepairmanCode: [ orderRepairmanCode: [
{ required: true, message: "报修人工号不能为空", trigger: "blur" }, { required: true, message: "报修人工号不能为空", trigger: "blur" },
], ],
//
workPlanTime: [
{ required: true, message: "计划维修时间", trigger: "blur" },
],
// workPlanDownTime: [
// { required: true, message: "", trigger: "blur" },
// ],
workDownMachine: [
{ required: true, message: "是否停机维修", trigger: "blur" },
],
}, },
}; };
}, },
@ -1349,6 +1409,14 @@ export default {
indexMethod(index) { indexMethod(index) {
return index + 1; return index + 1;
}, },
//radio
monitorRadio(){
if(this.form.workDownMachine == '0'){
this.form.workPlanDownTime = null;
}
},
timeBackFilling() { timeBackFilling() {
var getTime = new Date().getTime(); // var getTime = new Date().getTime(); //
var time = new Date(getTime); // var time = new Date(getTime); //
@ -1373,8 +1441,18 @@ export default {
second second
); );
} }
this.form.workPlanTime = nowDate(time); this.form.workPlanTime = nowDate(time); //
this.form.workPlanDownTime = nowDate(time);
this.form.workDownMachine = '1';
}, },
//
timeBackFillingReset() {
this.form.workPlanTime = null; //
this.form.workPlanDownTime = null;
this.form.workDownMachine = null;
},
/** 查询维修措施列表 */ /** 查询维修措施列表 */
getOrderDesc() { getOrderDesc() {
this.loading = true; this.loading = true;
@ -1655,8 +1733,8 @@ export default {
} }
if ( if (
response.data.orderStatus == "审核通过" || response.data.orderStatus == "1" ||
response.data.orderStatus == "驳回" response.data.orderStatus == "2"
) { ) {
Message.warning("该报修记录已审核!"); Message.warning("该报修记录已审核!");
this.form = response.data; this.form = response.data;

@ -17,6 +17,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="审核状态" prop="resultInspect">
<el-select
v-model="queryParams.resultInspect"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_audit_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报修单号" prop="orderCode"> <el-form-item label="报修单号" prop="orderCode">
<el-input <el-input
v-model="queryParams.orderCode" v-model="queryParams.orderCode"
@ -35,7 +49,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否停机维修" prop="workDownMachine"> <!-- <el-form-item label="是否停机维修" prop="workDownMachine">
<el-select <el-select
v-model="queryParams.workDownMachine" v-model="queryParams.workDownMachine"
placeholder="请选择是否停机" placeholder="请选择是否停机"
@ -51,7 +65,7 @@
:value="item.workDownMachine" :value="item.workDownMachine"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="维修人员姓名" prop="workPersonName"> <el-form-item label="维修人员姓名" prop="workPersonName">
<el-input <el-input
v-model="queryParams.workPersonName" v-model="queryParams.workPersonName"
@ -232,7 +246,7 @@
size="mini" size="mini"
@click="clickInspect" @click="clickInspect"
v-hasPermi="['device:repairOrder:inspect']" v-hasPermi="['device:repairOrder:inspect']"
>结果检验 >维修结果审核
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -289,13 +303,15 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="检验结果" label="审核状态"
align="center" align="center"
prop="resultInspect" prop="resultInspect"
width="100" width="100">
> <template slot-scope="scope">
<template slot-scope="scope"> <dict-tag
{{ scope.row.resultInspect == '1' ? "通过" :scope.row.resultInspect == '0' ? "不通过" :"待检验" }} :options="dict.type.device_audit_status"
:value="scope.row.resultInspect"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -1248,7 +1264,20 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="故障图片" prop="afterRepairFile" label-width="120px"> <el-form-item prop="remark" label="备注" label-width="120px">
<el-input
v-model="form.remark"
placeholder="请填写备注"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
style="width: 725px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="维修后图片" prop="afterRepairFile" label-width="120px">
<FileUpload v-model="form.afterRepairFile" /> <FileUpload v-model="form.afterRepairFile" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -1273,14 +1302,22 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 结果检验 --> <!-- 维修结果审核 -->
<el-dialog title="维修结果检验" :visible.sync="inspectDialog" width="30%"> <el-dialog title="维修结果审核" :visible.sync="inspectDialog" width="30%">
<el-radio v-model="inspect" label="2"></el-radio> <el-radio v-model="inspect" label="2"></el-radio>
<el-radio v-model="inspect" label="0"></el-radio> <el-radio v-model="inspect" label="1"></el-radio>
<el-radio v-model="inspect" label="1"></el-radio> <el-radio v-model="inspect" label="0"></el-radio>
<row></row>
<el-input
v-model="auditOpinion"
placeholder="请填写审核意见"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
style="width: 350px"
/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="inspectDialog = false"> </el-button> <el-button @click="inspectDialog = false"> </el-button>
<el-button type="primary" @click="subInspect"> </el-button> <el-button type="primary" @click="checkRepairWorkOrder"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -1693,7 +1730,7 @@ import {
applyOutsource, applyOutsource,
writeRepairOrder, writeRepairOrder,
queryEquFaultTypeTree, queryEquFaultTypeTree,
subInspect, checkRepairWorkOrder,
} from "@/api/device/repairOrder"; } from "@/api/device/repairOrder";
import { listFaultReason } from "@/api/device/faultReason"; import { listFaultReason } from "@/api/device/faultReason";
import { listFaultMeasures } from "@/api/device/faultMeasures"; import { listFaultMeasures } from "@/api/device/faultMeasures";
@ -1704,11 +1741,10 @@ import ItemSelectPerson from "./selectSinglePerson.vue";
import { Message } from "element-ui"; import { Message } from "element-ui";
import ItemSelectSpareParts from "./selectSpareParts.vue"; import ItemSelectSpareParts from "./selectSpareParts.vue";
import moment from "moment"; import moment from "moment";
export default { export default {
name: " RepairOrder", name: " RepairOrder",
components: { ItemSelect, ItemSelectPerson, ItemSelectSpareParts }, components: { ItemSelect, ItemSelectPerson, ItemSelectSpareParts },
dicts: ["device_repair_status"], dicts: ["device_repair_status","device_audit_status"],
data() { data() {
return { return {
// //
@ -1795,6 +1831,8 @@ export default {
inspectDialog: false, inspectDialog: false,
// //
inspect: null, inspect: null,
//
auditOpinion: null,
// //
orderCodes: [], orderCodes: [],
// //
@ -1827,6 +1865,7 @@ export default {
// //
workPlanTimeArray: [], workPlanTimeArray: [],
workPlanDownTimeArray: [], workPlanDownTimeArray: [],
resultInspect: null,
}, },
auxiliaryQueryParams: { auxiliaryQueryParams: {
pageNum: 1, pageNum: 1,
@ -2140,6 +2179,7 @@ export default {
updateBy: null, updateBy: null,
delFlag: null, delFlag: null,
factoryCode: null, factoryCode: null,
auditOpinion: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -2395,7 +2435,9 @@ export default {
writeRepairOrder(this.form).then((response) => { writeRepairOrder(this.form).then((response) => {
this.openWrite = false; this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!"); if(response.code == 200){
this.$modal.msgSuccess(response.msg);
}
this.queryParams.workStatus = null; this.queryParams.workStatus = null;
this.getList(); this.getList();
}); });
@ -2419,14 +2461,15 @@ export default {
}, },
// //
subInspect() { checkRepairWorkOrder() {
const data = { const data = {
ids: this.ids, ids: this.ids,
inspect: this.inspect, inspect: this.inspect,
orderCodes: this.orderCodes, orderCodes: this.orderCodes,
auditOpinion: this.auditOpinion,
}; };
subInspect(data).then((response) => { checkRepairWorkOrder(data).then((response) => {
this.getList(); this.getList();
this.inspectDialog = false; this.inspectDialog = false;
this.$message({ this.$message({

Loading…
Cancel
Save