2024-3-29 设备模块-管理系统维修+基础信息设备提示

master
A0010407 8 months ago
parent 1125499e3f
commit 74aa7882f1

@ -197,7 +197,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['device: repairOrder:remove']" v-hasPermi="['device:repairOrder:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col>
@ -261,7 +261,7 @@
label="维修单号" label="维修单号"
align="center" align="center"
prop="workCode" prop="workCode"
width="200" width="220"
fixed fixed
/> />
<el-table-column <el-table-column
@ -283,6 +283,12 @@
prop="orderCode" prop="orderCode"
width="200" width="200"
/> />
<el-table-column
label="设备名称"
align="center"
prop="equipmentName"
width="200"
/>
<el-table-column <el-table-column
label="设备编码" label="设备编码"
align="center" align="center"
@ -455,6 +461,17 @@
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment"> <ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment">
</ItemSelect> </ItemSelect>
</el-form-item> </el-form-item>
<el-form-item label="故障开始时间" prop="faultStartTime">
<el-date-picker
clearable
v-model="form.faultStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 280px"
placeholder="请选择故障开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划维修时间" prop="workPlanTime"> <el-form-item label="计划维修时间" prop="workPlanTime">
<el-date-picker <el-date-picker
clearable clearable
@ -527,6 +544,7 @@
<el-select <el-select
v-model="form.workFaultDesc" v-model="form.workFaultDesc"
@change="$forceUpdate()" @change="$forceUpdate()"
@blur="selectBlurworkFaultDesc"
clearable clearable
filterable filterable
style="width: 280px" style="width: 280px"
@ -859,8 +877,8 @@
<el-descriptions-item label="报修来源">{{ <el-descriptions-item label="报修来源">{{
form.orderSource form.orderSource
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="报修时间">{{ <el-descriptions-item label="故障报修时间">{{
form.orderTime form.orderBreakdownTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="报修人名字">{{ <el-descriptions-item label="报修人名字">{{
form.orderRepairmanName form.orderRepairmanName
@ -997,7 +1015,7 @@
<el-tab-pane label="填写维修记录"> <el-tab-pane label="填写维修记录">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修人" prop="workPerson"> <el-form-item label="维修人" prop="workPerson" label-width="120px">
<el-input <el-input
v-model="form.workPerson" v-model="form.workPerson"
placeholder="请选择维修人" placeholder="请选择维修人"
@ -1012,12 +1030,12 @@
<ItemSelectPerson <ItemSelectPerson
ref="itemSelectPerson" ref="itemSelectPerson"
@onSelected="onItemSelectedPerson" @onSelected="onItemSelectedPerson"
> >
</ItemSelectPerson> </ItemSelectPerson>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修状态" prop="workStatus"> <el-form-item label="维修状态" prop="workStatus" label-width="120px">
<el-select <el-select
v-model="form.workStatus" v-model="form.workStatus"
placeholder="请选择维修状态" placeholder="请选择维修状态"
@ -1033,7 +1051,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修费用" prop="workCost"> <el-form-item label="维修费用" prop="workCost" label-width="120px">
<el-input-number <el-input-number
:min="0" :min="0"
:step="1" :step="1"
@ -1046,7 +1064,7 @@
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="开始时间" prop="workStartTime"> <el-form-item label="开始时间" prop="workStartTime" label-width="120px">
<el-date-picker <el-date-picker
clearable clearable
v-model="form.workStartTime" v-model="form.workStartTime"
@ -1059,7 +1077,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="结束时间" prop="workEndTime"> <el-form-item label="结束时间" prop="workEndTime" label-width="120px">
<el-date-picker <el-date-picker
clearable clearable
v-model="form.workEndTime" v-model="form.workEndTime"
@ -1072,7 +1090,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修用时" prop="workCostTime"> <el-form-item label="维修用时" prop="workCostTime" label-width="120px">
<el-input <el-input
v-model="form.workCostTime" v-model="form.workCostTime"
style="width: 250px" style="width: 250px"
@ -1084,7 +1102,41 @@
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否停机" prop="workDownMachine"> <el-form-item label="故障报修时间" prop="orderBreakdownTime" v-if = "form.faultStartTime == null" label-width="120px">
<el-date-picker
clearable
v-model="form.orderBreakdownTime"
type="datetime"
style="width: 250px"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
></el-date-picker>
</el-form-item>
<el-form-item label="故障开始时间" prop="faultStartTime" v-if = "form.faultStartTime != null" label-width="120px">
<el-date-picker
clearable
v-model="form.faultStartTime"
type="datetime"
style="width: 250px"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="故障停机时间" prop="faultDownTime" label-width="120px">
<el-input
v-model="form.faultDownTime"
style="width: 250px"
disabled
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="是否停机" prop="workDownMachine" abel-width="120px">
<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"></el-radio>
@ -1104,7 +1156,7 @@
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="故障原因" prop="workReason"> <el-form-item label="故障原因" prop="workReason" label-width="120px">
<el-select <el-select
v-model="form.workReason" v-model="form.workReason"
placeholder="请选择故障原因" placeholder="请选择故障原因"
@ -1125,7 +1177,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="处理措施" prop="repairMeasures"> <el-form-item label="处理措施" prop="repairMeasures" label-width="120px">
<el-select <el-select
v-model="form.repairMeasures" v-model="form.repairMeasures"
placeholder="请选择处理措施" placeholder="请选择处理措施"
@ -1148,7 +1200,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="故障图片" prop="afterRepairFile"> <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>
@ -1217,8 +1269,8 @@
<el-descriptions-item label="报修来源">{{ <el-descriptions-item label="报修来源">{{
form.orderSource form.orderSource
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="报修时间">{{ <el-descriptions-item label="故障报修时间">{{
form.orderTime form.orderBreakdownTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="报修人名字">{{ <el-descriptions-item label="报修人名字">{{
form.orderRepairmanName form.orderRepairmanName
@ -1371,7 +1423,7 @@
<el-tab-pane label="查看维修记录"> <el-tab-pane label="查看维修记录">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修人" prop="workPerson"> <el-form-item label="维修人" prop="workPerson" label-width="120px">
<el-input <el-input
v-model="form.workPerson" v-model="form.workPerson"
style="width: 195px" style="width: 195px"
@ -1381,7 +1433,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修状态" prop="workStatus"> <el-form-item label="维修状态" prop="workStatus" label-width="120px">
<el-select <el-select
v-model="form.workStatus" v-model="form.workStatus"
disabled disabled
@ -1397,7 +1449,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修费用" prop="workCost"> <el-form-item label="维修费用" prop="workCost" label-width="120px">
<el-input-number <el-input-number
:min="0" :min="0"
:step="1" :step="1"
@ -1411,7 +1463,7 @@
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="开始时间" prop="workStartTime"> <el-form-item label="开始时间" prop="workStartTime" label-width="120px">
<el-date-picker <el-date-picker
clearable clearable
v-model="form.workStartTime" v-model="form.workStartTime"
@ -1424,7 +1476,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="结束时间" prop="workEndTime"> <el-form-item label="结束时间" prop="workEndTime" label-width="120px">
<el-date-picker <el-date-picker
clearable clearable
v-model="form.workEndTime" v-model="form.workEndTime"
@ -1437,7 +1489,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修用时" prop="workCostTime"> <el-form-item label="维修用时" prop="workCostTime" label-width="120px">
<el-input <el-input
v-model="form.workCostTime" v-model="form.workCostTime"
style="width: 195px" style="width: 195px"
@ -1449,7 +1501,41 @@
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否停机" prop="workDownMachine"> <el-form-item label="故障报修时间" prop="orderBreakdownTime" v-if = "form.faultStartTime == null" label-width="120px">
<el-date-picker
clearable
v-model="form.orderBreakdownTime"
type="datetime"
style="width: 195px"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
></el-date-picker>
</el-form-item>
<el-form-item label="故障开始时间" prop="faultStartTime" v-if = "form.faultStartTime != null" label-width="120px">
<el-date-picker
clearable
v-model="form.faultStartTime"
type="datetime"
style="width: 195px"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="故障停机时间" prop="faultDownTime" label-width="120px">
<el-input
v-model="form.faultDownTime"
style="width: 195px"
disabled
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="是否停机" prop="workDownMachine" label-width="120px">
<el-radio-group v-model="form.workDownMachine" disabled> <el-radio-group v-model="form.workDownMachine" disabled>
<el-radio label="1"></el-radio> <el-radio label="1"></el-radio>
<el-radio label="0"></el-radio> <el-radio label="0"></el-radio>
@ -1470,14 +1556,14 @@
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="故障原因" prop="workReason"> <el-form-item label="故障原因" prop="workReason" label-width="120px">
<el-select <el-select
v-model="form.workReason" v-model="form.workReason"
@change="$forceUpdate()" @change="$forceUpdate()"
disabled disabled
clearable clearable
filterable filterable
style="width: 250px" style="width: 195px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
> >
<el-option <el-option
@ -1490,14 +1576,14 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="处理措施" prop="repairMeasures"> <el-form-item label="处理措施" prop="repairMeasures" label-width="120px">
<el-select <el-select
v-model="form.repairMeasures" v-model="form.repairMeasures"
@change="$forceUpdate()" @change="$forceUpdate()"
clearable clearable
filterable filterable
disabled disabled
style="width: 250px" style="width: 195px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
> >
<el-option <el-option
@ -1742,6 +1828,26 @@ export default {
outSourcePerson: [ outSourcePerson: [
{ required: true, message: "委外维修人员不能为空", trigger: "blur" }, { required: true, message: "委外维修人员不能为空", trigger: "blur" },
], ],
//
equipmentCode: [
{ required: true, message: "设备编码不能为空", trigger: "blur" },
],
workPlanDownTime: [
{ required: true, message: "计划维修时间不能为空", trigger: "blur" },
],
faultStartTime: [
{ required: true, message: "故障开始时间不能为空", trigger: "blur" },
],
workDownMachine: [
{ required: true, message: "是否停机维修不能为空", trigger: "blur" },
],
workFaultDesc: [
{ required: true, message: "故障描述不能为空", trigger: "blur" },
],
workTeam: [
{ required: true, message: "故障组不能为空", trigger: "blur" },
],
}, },
}; };
}, },
@ -1758,7 +1864,8 @@ export default {
indexMethod(index) { indexMethod(index) {
return index + 1; return index + 1;
}, },
// -
// -
listeningTime() { listeningTime() {
if (this.form.workEndTime != null && this.form.workStartTime != null) { if (this.form.workEndTime != null && this.form.workStartTime != null) {
var time1 = moment(this.form.workStartTime); var time1 = moment(this.form.workStartTime);
@ -1775,6 +1882,37 @@ export default {
_data.seconds / 3600 _data.seconds / 3600
).toFixed(1) + "小时"; ).toFixed(1) + "小时";
} }
//
if (this.form.orderBreakdownTime != null && this.form.workEndTime != null && this.form.workDownMachine == 1) {
var time1 = moment(this.form.orderBreakdownTime);
var time2 = moment(this.form.workEndTime);
let duration = moment.duration(time2.diff(time1));
let { _data } = duration;
console.log("打印故障停机时间", _data);
//
this.form.faultDownTime =
(
_data.days * 24 +
_data.hours +
_data.minutes / 60 +
_data.seconds / 3600
).toFixed(1) + "小时";
}else if(this.form.faultStartTime != null && this.form.workEndTime != null && this.form.workDownMachine == 1){
var time1 = moment(this.form.faultStartTime);
var time2 = moment(this.form.workEndTime);
let duration = moment.duration(time2.diff(time1));
let { _data } = duration;
console.log("打印故障停机时间", _data);
//
this.form.faultDownTime =
(
_data.days * 24 +
_data.hours +
_data.minutes / 60 +
_data.seconds / 3600
).toFixed(1) + "小时";
}
}, },
// - // -
// listeningTime() { // listeningTime() {
@ -1800,6 +1938,7 @@ export default {
// ""; // "";
// } // }
// }, // },
/** 查询维修工单列表 */ /** 查询维修工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -1826,6 +1965,11 @@ export default {
this.form.repairMeasures = even.target.value; this.form.repairMeasures = even.target.value;
} }
}, },
selectBlurworkFaultDesc(even) {
if (even.target.value) {
this.form.workFaultDesc = even.target.value;
}
},
/** 查询维修原因列表 */ /** 查询维修原因列表 */
getWorkReason() { getWorkReason() {
this.loading = true; this.loading = true;

@ -1711,9 +1711,13 @@ export default {
this.auxiliaryEquipmentRightList; this.auxiliaryEquipmentRightList;
this.form.rightData = this.rightList; this.form.rightData = this.rightList;
addEquipment(this.form).then((response) => { addEquipment(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); if(response.code == 500){
this.open = false; this.$modal.message("新增失败");
this.getList(); }else if(response.code == 200){
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
}); });
} }
} }

Loading…
Cancel
Save