yangwl
A0010407 12 months ago
parent f8b4e4fb1d
commit 7519b6998a

@ -352,7 +352,7 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="200"> <el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="200"> <el-table-column prop="itemMethod" label="检查项方法" width="200">
@ -918,7 +918,12 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions :column="3" border> <el-descriptions
:column="3"
border
:contentStyle="CS"
:label-style="LS"
>
<el-descriptions-item label="设备编码">{{ <el-descriptions-item label="设备编码">{{
form.equipmentCode form.equipmentCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -942,7 +947,11 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="故障图片"> <el-descriptions-item
label="故障图片"
:contentStyle="CS"
:label-style="LS"
>
<el-image <el-image
v-for="(item, index) in urlLists" v-for="(item, index) in urlLists"
:key="index" :key="index"
@ -959,9 +968,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100"> <el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column prop="detailReach" label="是否达标" width="65">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.device_reach_standard" :options="dict.type.device_reach_standard"
@ -975,7 +984,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="45"> <el-table-column prop="detailUnit" label="单位" width="47">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -1009,7 +1018,25 @@ export default {
dicts: ["device_order_source", "device_reach_standard"], dicts: ["device_order_source", "device_reach_standard"],
data() { data() {
return { return {
// CS: {
"text-align": "center", //
"min-width": "100px", //
"word-break": "break-all", //
},
LS: {
color: "#000",
"text-align": "center",
"font-weight": "600",
height: "40px",
"min-width": "110px",
"word-break": "keep-all",
},
teamOption: [], teamOption: [],
// //
fileList: [], fileList: [],
@ -1315,34 +1342,51 @@ export default {
newFiles.push(newFile); newFiles.push(newFile);
}); });
this.form.fileList = newFiles; this.form.fileList = newFiles;
var urlLists = []; var urlLists = [];
this.form.fileList.forEach((item) => { this.form.fileList.forEach((item) => {
urlLists.push(item.url); urlLists.push(item.url);
}); });
this.urlLists = urlLists; this.urlLists = urlLists;
console.log("2222222222", this.urlLists); console.log("2222222222", this.urlLists);
} else if (response.data.files == null) {
this.urlLists = null;
} }
this.checkList = null;
this.checkList = response.data.checkList; this.checkList = response.data.checkList;
// if (this.checkList != null) {
var standards = []; //
this.checkList.forEach((item1) => { var standards = [];
// this.checkList.forEach((item1) => {
item1.standardList.forEach((item) => { //
var standard = {}; if (item1 != null) {
standard.itemName = item1.itemName; item1.standardList.forEach((item) => {
standard.itemMethod = item1.itemMethod; var standard = {};
standard.standardName = item.standardName; standard.itemName = item1.itemName;
standard.detailUpLimit = item.detailUpLimit; standard.itemMethod = item1.itemMethod;
standard.detailDownLimit = item.detailDownLimit; standard.standardName = item.standardName;
standard.detailUnit = item.detailUnit; standard.detailUpLimit = item.detailUpLimit;
standard.detailReach = item.detailReach; standard.detailDownLimit = item.detailDownLimit;
standard.actualValue = item.actualValue; standard.detailUnit = item.detailUnit;
standard.standardType = item.standardType; standard.detailReach = item.detailReach;
standards.push(standard); standard.actualValue = item.actualValue;
standard.standardType = item.standardType;
var standardUrlLists = [];
item.picturePaths.forEach((item2) => {
standardUrlLists.push(item2.fileAddress);
});
standard.standardUrlLists = standardUrlLists;
standards.push(standard);
});
}
}); });
});
this.checkList = standards; this.checkList = standards;
console.log("1111111111", this.checkList); console.log("1111111111", this.checkList);
}
this.openView = true; this.openView = true;
this.title = "查看故障报修"; this.title = "查看故障报修";
}); });
@ -1356,6 +1400,7 @@ export default {
this.teamOption = response.rows; this.teamOption = response.rows;
}); });
getFaultReport(orderId).then((response) => { getFaultReport(orderId).then((response) => {
this.form = response.data;
if (response.data.files != null) { if (response.data.files != null) {
var newFiles = []; var newFiles = [];
response.data.files.forEach((item) => { response.data.files.forEach((item) => {
@ -1365,7 +1410,51 @@ export default {
newFiles.push(newFile); newFiles.push(newFile);
}); });
this.form.fileList = newFiles; this.form.fileList = newFiles;
var urlLists = [];
this.form.fileList.forEach((item) => {
urlLists.push(item.url);
});
this.urlLists = urlLists;
console.log("2222222222", this.urlLists);
} else if (response.data.files == null) {
this.urlLists = null;
} }
this.checkList = null;
this.checkList = response.data.checkList;
if (this.checkList != null) {
//
var standards = [];
this.checkList.forEach((item1) => {
//
if (item1 != null) {
item1.standardList.forEach((item) => {
var standard = {};
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;
var standardUrlLists = [];
item.picturePaths.forEach((item2) => {
standardUrlLists.push(item2.fileAddress);
});
standard.standardUrlLists = standardUrlLists;
standards.push(standard);
});
}
});
this.checkList = standards;
console.log("1111111111", this.checkList);
}
if ( if (
response.data.orderStatus == "审核通过" || response.data.orderStatus == "审核通过" ||
response.data.orderStatus == "驳回" response.data.orderStatus == "驳回"
@ -1406,6 +1495,10 @@ export default {
}, },
/** 审核提交按钮 */ /** 审核提交按钮 */
submitCheckForm() { submitCheckForm() {
if (Array.isArray(this.form.fileList)) {
this.form.fileList = this.listToString(this.form.fileList);
}
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.orderId != null) { if (this.form.orderId != null) {

@ -354,6 +354,22 @@
style="width: 270px" style="width: 270px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否完成维修" prop="workStatus">
<el-select
v-model="form.workStatus"
placeholder="请选择是否完成维修"
@change="$forceUpdate()"
clearable
style="width: 270px"
>
<el-option
v-for="item in workStatusOption"
:key="item.workStatus"
:label="item.label"
:value="item.workStatus"
></el-option>
</el-select>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -425,6 +441,17 @@ export default {
label: "维修委外", label: "维修委外",
}, },
], ],
//
workStatusOption: [
{
workStatus: "1",
label: "完成",
},
{
workStatus: "0",
label: "未完成",
},
],
// //
form: {}, form: {},
// //
@ -472,6 +499,7 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
factoryCode: null, factoryCode: null,
workStatus:null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },

@ -1434,8 +1434,9 @@ export default {
}); });
this.urlAfterLists = urlAfterLists; this.urlAfterLists = urlAfterLists;
} }
this.detailList = null;
this.detailList = response.data.detailList; this.detailList = response.data.detailList;
if (this.checkList != null) {
// //
var standards = []; var standards = [];
this.detailList.forEach((item1) => { this.detailList.forEach((item1) => {
@ -1456,7 +1457,7 @@ export default {
}); });
}); });
this.detailList = standards; this.detailList = standards;
}
this.openWrite = true; this.openWrite = true;
this.title = "填写维修记录"; this.title = "填写维修记录";
}); });

Loading…
Cancel
Save