|
|
|
@ -742,6 +742,53 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 委外申请查看页面 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="title"
|
|
|
|
|
:visible.sync="openApplyView"
|
|
|
|
|
width="1000px"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
<el-descriptions :column="2" border>
|
|
|
|
|
<el-descriptions-item label="设备编号">{{
|
|
|
|
|
form.equipmentCode
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="设备名称">{{
|
|
|
|
|
form.equipmentName
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="设备类型">{{
|
|
|
|
|
form.equipmentTypeName
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="设备位置">{{
|
|
|
|
|
form.equipmentLocation
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="工作中心编码">{{
|
|
|
|
|
form.workshopCode
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="工作中心名称">{{
|
|
|
|
|
form.workshopName
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="委外单位">{{
|
|
|
|
|
form.workOutsourcingUnit
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="委外维修人员">{{
|
|
|
|
|
form.outSourcePerson
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="委外联系方式">{{
|
|
|
|
|
form.workConnection
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="委外原因">{{
|
|
|
|
|
form.outSourceReason
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="cancelApplyViewForm">返 回</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 填写维修记录对话框 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="title"
|
|
|
|
@ -749,7 +796,7 @@
|
|
|
|
|
width="1000px"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
<el-tabs type="border-card">
|
|
|
|
|
<el-tab-pane label="维修基本信息">
|
|
|
|
|
<el-descriptions :column="2" border>
|
|
|
|
@ -822,23 +869,64 @@
|
|
|
|
|
:src="item"
|
|
|
|
|
></el-image
|
|
|
|
|
></el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-descriptions :column="1" border>
|
|
|
|
|
<el-descriptions-item label="维修后故障图片">
|
|
|
|
|
<el-image
|
|
|
|
|
v-for="(item, index) in urlAfterLists"
|
|
|
|
|
:key="index"
|
|
|
|
|
:src="item"
|
|
|
|
|
></el-image
|
|
|
|
|
></el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane label="检查项信息">
|
|
|
|
|
<el-table :data="detailList" border style="width: 100%">
|
|
|
|
|
<el-table-column prop="itemName" label="检查项名称" width="150">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="standardName" label="标准名称" width="180">
|
|
|
|
|
<el-table-column prop="itemMethod" label="检查项方法" width="150">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="standardType" label="标准类型" width="100">
|
|
|
|
|
<el-table-column prop="standardName" label="标准名称" width="150">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="detailReach" label="是否达标" width="50">
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="detailReach"
|
|
|
|
|
label="维修前是否达标"
|
|
|
|
|
width="67"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.detailReach == "1" ? "达标" : "不达标" }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="actualValue" label="实际值" width="50">
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="repairReach"
|
|
|
|
|
label="维修后是否达标"
|
|
|
|
|
width="110"
|
|
|
|
|
>
|
|
|
|
|
<template scope="scope">
|
|
|
|
|
<el-radio-group v-model="scope.row.repairReach">
|
|
|
|
|
<el-radio label="1">达标</el-radio>
|
|
|
|
|
<el-radio label="0">不达标</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="actualValue"
|
|
|
|
|
label="维修前实际值"
|
|
|
|
|
width="50"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="repairValue"
|
|
|
|
|
label="维修后实际值"
|
|
|
|
|
width="100"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input
|
|
|
|
|
size="small"
|
|
|
|
|
v-model="scope.row.repairValue"
|
|
|
|
|
v-if="scope.row.standardType == 'quantify'"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="detailUpLimit" label="上限" width="50">
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -846,8 +934,6 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="detailUnit" label="单位" width="50">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="detailUnit" label="故障图片">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
@ -876,7 +962,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="维修状态" prop="workStatus">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.workStatus"
|
|
|
|
|
v-model="form.workStatus"
|
|
|
|
|
placeholder="请选择维修状态"
|
|
|
|
|
style="width: 195px"
|
|
|
|
|
>
|
|
|
|
@ -922,7 +1008,7 @@
|
|
|
|
|
v-model="form.workEndTime"
|
|
|
|
|
type="datetime"
|
|
|
|
|
style="width: 195px"
|
|
|
|
|
@change="listening"
|
|
|
|
|
@change="listeningTime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
placeholder="请选择结束维修时间"
|
|
|
|
|
></el-date-picker>
|
|
|
|
@ -944,14 +1030,6 @@
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="停机时长" prop="orderBreakdownTime">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.orderBreakdownTime"
|
|
|
|
|
style="width: 195px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
@ -966,6 +1044,13 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="故障图片" prop="afterRepairFile">
|
|
|
|
|
<FileUpload v-model="form.afterRepairFile" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane label="填写备件申领记录">
|
|
|
|
|
<!-- 使用备件领用记录 -->
|
|
|
|
@ -980,11 +1065,7 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="submitWriteForm"
|
|
|
|
|
>提 交</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" @click="submitWriteForm">提 交</el-button>
|
|
|
|
|
<el-button @click="cancelWriteForm">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
@ -1006,7 +1087,7 @@ import ItemSelect from "./selectSingleEquipment.vue";
|
|
|
|
|
import ItemSelectPerson from "./selectSinglePerson.vue";
|
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
|
import ItemSelectSpareParts from "./selectSpareParts.vue";
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: " RepairOrder",
|
|
|
|
@ -1014,6 +1095,10 @@ export default {
|
|
|
|
|
dicts: ["device_repair_status"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
//维修前照片
|
|
|
|
|
urlBeforeLists: [],
|
|
|
|
|
//维修后照片
|
|
|
|
|
urlAfterLists: [],
|
|
|
|
|
//选择设备维修班组
|
|
|
|
|
teamOption: [],
|
|
|
|
|
optType: undefined,
|
|
|
|
@ -1039,6 +1124,8 @@ export default {
|
|
|
|
|
openUpdate: false,
|
|
|
|
|
// 是否显示委外申请弹出层
|
|
|
|
|
openApply: false,
|
|
|
|
|
// 是否显示委外申请查询弹出层
|
|
|
|
|
openApplyView: false,
|
|
|
|
|
// 是否显示填写维修记录弹出层
|
|
|
|
|
openWrite: false,
|
|
|
|
|
// 查询参数
|
|
|
|
@ -1128,7 +1215,21 @@ export default {
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {},
|
|
|
|
|
rules: {
|
|
|
|
|
//委外申请校验
|
|
|
|
|
workOutsourcingUnit: [
|
|
|
|
|
{ required: true, message: "委外单位不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
outSourceReason: [
|
|
|
|
|
{ required: true, message: "委外原因不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
workConnection: [
|
|
|
|
|
{ required: true, message: "委外联系方式不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
outSourcePerson: [
|
|
|
|
|
{ required: true, message: "委外维修人员不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -1137,7 +1238,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//计算时间 结束维修时间-开始维修时间
|
|
|
|
|
listening() {
|
|
|
|
|
listeningTime() {
|
|
|
|
|
if (this.form.workEndTime != null && this.form.workStartTime != null) {
|
|
|
|
|
var time1 = moment(this.form.workStartTime);
|
|
|
|
|
var time2 = moment(this.form.workEndTime);
|
|
|
|
@ -1145,9 +1246,45 @@ export default {
|
|
|
|
|
let { _data } = duration;
|
|
|
|
|
console.log("打印维修时间", _data);
|
|
|
|
|
//拼接
|
|
|
|
|
this.form.workCostTime = _data.years + "年" + _data.months + "月" + _data.days + "日" + _data.hours + "小时" + _data.minutes + "分" + _data.seconds + "秒";
|
|
|
|
|
this.form.workCostTime =
|
|
|
|
|
_data.years +
|
|
|
|
|
"年" +
|
|
|
|
|
_data.months +
|
|
|
|
|
"月" +
|
|
|
|
|
_data.days +
|
|
|
|
|
"日" +
|
|
|
|
|
_data.hours +
|
|
|
|
|
"小时" +
|
|
|
|
|
_data.minutes +
|
|
|
|
|
"分" +
|
|
|
|
|
_data.seconds +
|
|
|
|
|
"秒";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//计算时间 结束停机时间-开始停机时间
|
|
|
|
|
// listeningDownTime() {
|
|
|
|
|
// if (this.form.actualDownEndTime != null && this.form.actualDownStartTime != null) {
|
|
|
|
|
// var time1 = moment(this.form.actualDownStartTime);
|
|
|
|
|
// var time2 = moment(this.form.actualDownEndTime);
|
|
|
|
|
// let duration = moment.duration(time2.diff(time1));
|
|
|
|
|
// let { _data } = duration;
|
|
|
|
|
// console.log("打印维修时间", _data);
|
|
|
|
|
// //拼接
|
|
|
|
|
// this.form.workCostTime =
|
|
|
|
|
// _data.years +
|
|
|
|
|
// "年" +
|
|
|
|
|
// _data.months +
|
|
|
|
|
// "月" +
|
|
|
|
|
// _data.days +
|
|
|
|
|
// "日" +
|
|
|
|
|
// _data.hours +
|
|
|
|
|
// "小时" +
|
|
|
|
|
// _data.minutes +
|
|
|
|
|
// "分" +
|
|
|
|
|
// _data.seconds +
|
|
|
|
|
// "秒";
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
/** 查询维修工单列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -1165,7 +1302,10 @@ export default {
|
|
|
|
|
this.teamOption = response.rows;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 委外申请查看页面-取消按钮
|
|
|
|
|
cancelApplyViewForm() {
|
|
|
|
|
this.openApplyView = false;
|
|
|
|
|
},
|
|
|
|
|
// 新增-取消按钮
|
|
|
|
|
cancelAddForm() {
|
|
|
|
|
this.openAdd = false;
|
|
|
|
@ -1257,6 +1397,66 @@ export default {
|
|
|
|
|
const workId = row.workId || this.ids;
|
|
|
|
|
getRepairOrder(workId).then((response) => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
|
|
|
|
|
//遍历response.data.beforeRepairFiles
|
|
|
|
|
if (response.data.beforeRepairFiles != null) {
|
|
|
|
|
var beforeNewFiles = [];
|
|
|
|
|
response.data.beforeRepairFiles.forEach((item) => {
|
|
|
|
|
var beforeNewFile = {};
|
|
|
|
|
beforeNewFile.name = item.fileName;
|
|
|
|
|
beforeNewFile.url = item.fileAddress;
|
|
|
|
|
beforeNewFiles.push(beforeNewFile);
|
|
|
|
|
});
|
|
|
|
|
this.form.beforeRepairFiles = beforeNewFiles;
|
|
|
|
|
|
|
|
|
|
//维修前照片
|
|
|
|
|
var urlBeforeLists = [];
|
|
|
|
|
beforeNewFiles.forEach((item) => {
|
|
|
|
|
urlBeforeLists.push(item.url);
|
|
|
|
|
});
|
|
|
|
|
this.urlBeforeLists = urlBeforeLists;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//遍历response.data.afterRepairFiles
|
|
|
|
|
if (response.data.afterRepairFiles != null) {
|
|
|
|
|
var afterNewFiles = [];
|
|
|
|
|
response.data.afterRepairFiles.forEach((item) => {
|
|
|
|
|
var afterNewFile = {};
|
|
|
|
|
afterNewFile.name = item.fileName;
|
|
|
|
|
afterNewFile.url = item.fileAddress;
|
|
|
|
|
afterNewFiles.push(afterNewFile);
|
|
|
|
|
});
|
|
|
|
|
this.form.afterRepairFiles = afterNewFiles;
|
|
|
|
|
//维修后照片
|
|
|
|
|
var urlAfterLists = [];
|
|
|
|
|
afterNewFiles.forEach((item) => {
|
|
|
|
|
urlAfterLists.push(item.url);
|
|
|
|
|
});
|
|
|
|
|
this.urlAfterLists = urlAfterLists;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.detailList = response.data.detailList;
|
|
|
|
|
//检查项遍历
|
|
|
|
|
var standards = [];
|
|
|
|
|
this.detailList.forEach((item1) => {
|
|
|
|
|
//检查项名字
|
|
|
|
|
item1.standardList.forEach((item) => {
|
|
|
|
|
var standard = {};
|
|
|
|
|
standard.id = item.id;
|
|
|
|
|
standard.itemName = item1.itemName;
|
|
|
|
|
standard.itemMethod = item1.itemMethod;
|
|
|
|
|
standard.standardName = item.standardName;
|
|
|
|
|
standard.detailUpLimit = item.detailUpLimit;
|
|
|
|
|
standard.detailDownLimit = item.detailDownLimit;
|
|
|
|
|
standard.detailUnit = item.detailUnit;
|
|
|
|
|
standard.detailReach = item.detailReach;
|
|
|
|
|
standard.actualValue = item.actualValue;
|
|
|
|
|
standard.standardType = item.standardType;
|
|
|
|
|
standards.push(standard);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
this.detailList = standards;
|
|
|
|
|
|
|
|
|
|
this.openWrite = true;
|
|
|
|
|
this.title = "填写维修记录";
|
|
|
|
|
});
|
|
|
|
@ -1267,8 +1467,17 @@ export default {
|
|
|
|
|
const workId = row.workId || this.ids;
|
|
|
|
|
getRepairOrder(workId).then((response) => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
console.log("打印委外信息", this.form.workOutsourcingUnit);
|
|
|
|
|
if (
|
|
|
|
|
this.form.workOutsourcingUnit == null ||
|
|
|
|
|
this.form.workOutsourcingUnit == ""
|
|
|
|
|
) {
|
|
|
|
|
this.openApply = true;
|
|
|
|
|
this.title = "委外申请";
|
|
|
|
|
} else {
|
|
|
|
|
this.openApplyView = true;
|
|
|
|
|
this.title = "查看委外申请";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
@ -1311,9 +1520,15 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 提交填写维修记录按钮 */
|
|
|
|
|
submitWriteForm() {
|
|
|
|
|
if (Array.isArray(this.form.afterRepairFile)) {
|
|
|
|
|
this.form.afterRepairFile = this.listToString(
|
|
|
|
|
this.form.afterRepairFile
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.workId != null) {
|
|
|
|
|
this.form.standardList = this.detailList;
|
|
|
|
|
writeRepairOrder(this.form).then((response) => {
|
|
|
|
|
this.openWrite = false;
|
|
|
|
|
this.$modal.msgSuccess("填写维修记录成功!");
|
|
|
|
@ -1383,3 +1598,4 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|