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({
url: '/device/repairOrder/subInspect',
url: '/device/repairOrder/checkRepairWorkOrder',
method: 'post',
data: data
});

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

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

Loading…
Cancel
Save