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