维修细化

master
A0010407 9 months ago
parent c79a9c4d00
commit 15080fa7b2

@ -1055,7 +1055,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="维修用时" prop="workCostTime">
<el-input v-model="form.workCostTime" style="width: 195px">
<el-input v-model="form.workCostTime" style="width: 195px" disabled>
</el-input>
</el-form-item>
</el-col>
@ -1069,7 +1069,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="故障类型" prop="faultType">
<el-cascader
:options="faultTypeOption"
@ -1078,7 +1078,7 @@
clearable
></el-cascader>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
@ -1275,6 +1275,7 @@
<template slot-scope="scope">
<el-input
size="small"
disabled
v-model="scope.row.repairValue"
v-if="scope.row.standardType == 'quantify'"
></el-input>
@ -1397,7 +1398,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="故障类型" prop="faultType">
<el-cascader
disabled
@ -1407,7 +1408,7 @@
clearable
></el-cascader>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
@ -1429,6 +1430,7 @@
:optType="optType"
:workCode="form.workCode"
:equipmentCode="form.equipmentCode"
:workStatus="form.workStatus"
v-if="form.workCode != null"
></ItemSelectSpareParts>
</el-tab-pane>
@ -1991,34 +1993,51 @@ export default {
},
/** 提交填写维修记录按钮 */
submitWriteForm() {
if (Array.isArray(this.form.afterRepairFile)) {
this.form.afterRepairFile = this.listToString(
this.form.afterRepairFile
);
}
if (this.form.faultType != null) {
this.form.faultType = this.form.faultType.join(",");
}
console.log(this.form.faultType);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.workId != null) {
this.form.standardList = this.detailList;
//
this.form.standardList.forEach((item) => {
if (Array.isArray(item.picturePath)) {
item.picturePath = this.listToString(item.picturePath);
if (this.form.workStatus == null || this.form.workStatus == "") {
Message.warning("维修状态不能为空");
} else if (
this.form.workPerson == null ||
this.form.workPerson == ""
) {
Message.warning("维修人员不能为空");
} else if (
this.form.workStartTime == null ||
this.form.workStartTime == ""
) {
Message.warning("维修开始时间不能为空");
} else if (
this.form.workEndTime == null ||
this.form.workEndTime == ""
) {
Message.warning("维修结束时间不能为空");
} else {
if (Array.isArray(this.form.afterRepairFile)) {
this.form.afterRepairFile = this.listToString(
this.form.afterRepairFile
);
}
});
console.log(this.form.standardList);
writeRepairOrder(this.form).then((response) => {
this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!");
this.queryParams.workStatus = null;
this.getList();
});
if (this.form.faultType != null) {
this.form.faultType = this.form.faultType.join(",");
}
this.form.standardList = this.detailList;
//
this.form.standardList.forEach((item) => {
if (Array.isArray(item.picturePath)) {
item.picturePath = this.listToString(item.picturePath);
}
});
writeRepairOrder(this.form).then((response) => {
this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!");
this.queryParams.workStatus = null;
this.getList();
});
}
}
}
});
@ -2139,10 +2158,6 @@ export default {
margin-left: 452px;
}
.step-body {
margin-top: 30px;
}
.standardUrl_body {
height: 400px;
overflow-y: auto;

@ -8,6 +8,7 @@
icon="el-icon-plus"
size="mini"
@click="handleSelectSparePartsLedger"
v-if = "this.queryParams.workStatus != '1' "
v-hasPermi="['device:sparePartsApplicationRecord:add']"
>新增</el-button
>
@ -24,11 +25,13 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-if = "this.queryParams.workStatus != '1' "
v-hasPermi="['device:sparePartsApplicationRecord:remove']"
>删除</el-button
>
</el-col>
<right-toolbar
v-if = "this.queryParams.workStatus != '1' "
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
@ -169,6 +172,7 @@ export default {
pageSize: 10,
workCode: this.workCode,
equipmentCode: this.equipmentCode,
workStatus:this.workStatus,
applyType: null,
applyCode: null,
spareCode: null,
@ -196,6 +200,7 @@ export default {
equipmentCode: undefined,
workCode: undefined,
optType: undefined,
workStatus: undefined,
},
created() {
this.getList();

Loading…
Cancel
Save