yangwl
A0010407 10 months ago
parent f8b4e4fb1d
commit 7519b6998a

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

@ -354,6 +354,22 @@
style="width: 270px"
/>
</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>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -425,6 +441,17 @@ export default {
label: "维修委外",
},
],
//
workStatusOption: [
{
workStatus: "1",
label: "完成",
},
{
workStatus: "0",
label: "未完成",
},
],
//
form: {},
//
@ -472,6 +499,7 @@ export default {
updateBy: null,
updateTime: null,
factoryCode: null,
workStatus:null,
};
this.resetForm("form");
},

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

Loading…
Cancel
Save