维修细化

yangwl
A0010407 12 months ago
parent c79a9c4d00
commit 15080fa7b2

@ -1055,7 +1055,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="维修用时" prop="workCostTime"> <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-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -1069,7 +1069,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="故障类型" prop="faultType"> <el-form-item label="故障类型" prop="faultType">
<el-cascader <el-cascader
:options="faultTypeOption" :options="faultTypeOption"
@ -1078,7 +1078,7 @@
clearable clearable
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="24"> <el-col :span="24">
@ -1275,6 +1275,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
size="small" size="small"
disabled
v-model="scope.row.repairValue" v-model="scope.row.repairValue"
v-if="scope.row.standardType == 'quantify'" v-if="scope.row.standardType == 'quantify'"
></el-input> ></el-input>
@ -1397,7 +1398,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="故障类型" prop="faultType"> <el-form-item label="故障类型" prop="faultType">
<el-cascader <el-cascader
disabled disabled
@ -1407,7 +1408,7 @@
clearable clearable
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="24"> <el-col :span="24">
@ -1429,6 +1430,7 @@
:optType="optType" :optType="optType"
:workCode="form.workCode" :workCode="form.workCode"
:equipmentCode="form.equipmentCode" :equipmentCode="form.equipmentCode"
:workStatus="form.workStatus"
v-if="form.workCode != null" v-if="form.workCode != null"
></ItemSelectSpareParts> ></ItemSelectSpareParts>
</el-tab-pane> </el-tab-pane>
@ -1991,6 +1993,27 @@ export default {
}, },
/** 提交填写维修记录按钮 */ /** 提交填写维修记录按钮 */
submitWriteForm() { submitWriteForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.workId != null) {
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)) { if (Array.isArray(this.form.afterRepairFile)) {
this.form.afterRepairFile = this.listToString( this.form.afterRepairFile = this.listToString(
this.form.afterRepairFile this.form.afterRepairFile
@ -2001,10 +2024,6 @@ export default {
this.form.faultType = this.form.faultType.join(","); 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 = this.detailList;
// //
this.form.standardList.forEach((item) => { this.form.standardList.forEach((item) => {
@ -2012,7 +2031,6 @@ export default {
item.picturePath = this.listToString(item.picturePath); item.picturePath = this.listToString(item.picturePath);
} }
}); });
console.log(this.form.standardList);
writeRepairOrder(this.form).then((response) => { writeRepairOrder(this.form).then((response) => {
this.openWrite = false; this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!"); this.$modal.msgSuccess("填写维修记录成功!");
@ -2021,6 +2039,7 @@ export default {
}); });
} }
} }
}
}); });
}, },
// //
@ -2139,10 +2158,6 @@ export default {
margin-left: 452px; margin-left: 452px;
} }
.step-body {
margin-top: 30px;
}
.standardUrl_body { .standardUrl_body {
height: 400px; height: 400px;
overflow-y: auto; overflow-y: auto;

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

Loading…
Cancel
Save