维修工单记录详情查看维修报告
This commit is contained in:
parent
d343ed6486
commit
10bd09b8a6
@ -110,7 +110,7 @@
|
|||||||
label="维修报告:"
|
label="维修报告:"
|
||||||
prop="diagnoiseReportId"
|
prop="diagnoiseReportId"
|
||||||
>
|
>
|
||||||
<el-button v-if="detailForm.diagnoiseReportId !== null" size="mini" type="text" @click="">维修报告</el-button>
|
<el-button v-if="detailForm.diagnoiseReportId !== null" size="mini" type="text" @click="openReport(detailForm.maintenanceOrderNo,detailForm.diagnoiseReportId)">维修报告</el-button>
|
||||||
<span v-else>无</span>
|
<span v-else>无</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -199,6 +199,7 @@
|
|||||||
<el-button @click="closeDetails">关 闭</el-button>
|
<el-button @click="closeDetails">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<MaintenanceReportDetails ref="formRef"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -207,9 +208,13 @@ import * as RemoteMaintenanceOrderApi from '@/api/system/maintenance/maintenance
|
|||||||
import {getEquipCascader} from '@/api/system/equip/equipInfo'
|
import {getEquipCascader} from '@/api/system/equip/equipInfo'
|
||||||
import {getComponentSelection} from '@/api/system/equip/componentInfo'
|
import {getComponentSelection} from '@/api/system/equip/componentInfo'
|
||||||
import {getCustomerSelection} from '@/api/system/baseData/customerInfo'
|
import {getCustomerSelection} from '@/api/system/baseData/customerInfo'
|
||||||
|
import MaintenanceReportDetails from '@/views/system/maintenance/maintenanceReport/MaintenanceReportDetails.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RemoteMaintenanceOrder",
|
name: "RemoteMaintenanceOrder",
|
||||||
|
components: {
|
||||||
|
MaintenanceReportDetails,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detailOpen: false,
|
detailOpen: false,
|
||||||
@ -253,6 +258,10 @@ export default {
|
|||||||
this.initSelection();
|
this.initSelection();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
openReport(maintenanceOrderNo,id){
|
||||||
|
console.log(id)
|
||||||
|
this.$refs["formRef"].open(maintenanceOrderNo,id);
|
||||||
|
},
|
||||||
closeDetails(){
|
closeDetails(){
|
||||||
this.detailOpen = false;
|
this.detailOpen = false;
|
||||||
this.detailForm = {};
|
this.detailForm = {};
|
||||||
|
@ -2,34 +2,34 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 对话框(添加 / 修改) -->
|
<!-- 对话框(添加 / 修改) -->
|
||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
|
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="120px">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="维修工单id" prop="maintenanceOrderId">
|
<el-form-item label="维修工单:" prop="maintenanceOrderNo">
|
||||||
{{formData.maintenanceOrderId}}
|
{{formData.maintenanceOrderNo}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="维修结果类型" prop="maintenanceResultType">
|
<el-form-item label="维修结果类型:" prop="maintenanceResultType">
|
||||||
<dict-tag :type="DICT_TYPE.MAINTENANCE_RESULT_TYPE" :value="formData.maintenanceResultType" />
|
<dict-tag :type="DICT_TYPE.MAINTENANCE_RESULT_TYPE" :value="formData.maintenanceResultType" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="维修内容" prop="maintenanceContent">
|
<el-form-item label="维修内容:" prop="maintenanceContent">
|
||||||
{{formData.maintenanceContent}}
|
{{formData.maintenanceContent}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="故障原因" prop="maintenanceProblem">
|
<el-form-item label="故障原因:" prop="maintenanceProblem">
|
||||||
{{formData.maintenanceProblem}}
|
{{formData.maintenanceProblem}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="维修评价" prop="maintenanceEvaluation">
|
<el-form-item label="维修评价:" prop="maintenanceEvaluation">
|
||||||
{{formData.maintenanceEvaluation}}
|
{{formData.maintenanceEvaluation}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注:" prop="remark">
|
||||||
{{formData.remark}}
|
{{formData.remark}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -67,51 +67,25 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
formRules: {
|
formRules: {
|
||||||
maintenanceOrderId: [{required: true, message: '维修工单id不能为空', trigger: 'change'}],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
async open(id) {
|
open(maintenanceOrderNo,id) {
|
||||||
this.dialogVisible = true;
|
|
||||||
this.reset();
|
this.reset();
|
||||||
// 修改时,设置数据
|
MaintenanceReportApi.getMaintenanceReport(id).then(res=>{
|
||||||
if (id) {
|
if (res.data == null){
|
||||||
this.formLoading = true;
|
this.$message.error('未查询到数据')
|
||||||
try {
|
|
||||||
const res = await MaintenanceReportApi.getMaintenanceReport(id);
|
|
||||||
this.formData = res.data;
|
|
||||||
this.title = "修改维修报告";
|
|
||||||
} finally {
|
|
||||||
this.formLoading = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.title = "新增维修报告";
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
async submitForm() {
|
|
||||||
// 校验主表
|
|
||||||
await this.$refs["formRef"].validate();
|
|
||||||
this.formLoading = true;
|
|
||||||
try {
|
|
||||||
const data = this.formData;
|
|
||||||
// 修改的提交
|
|
||||||
if (data.maintenanceReportId) {
|
|
||||||
await MaintenanceReportApi.updateMaintenanceReport(data);
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.dialogVisible = false;
|
|
||||||
this.$emit('success');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
this.dialogVisible = true;
|
||||||
await MaintenanceReportApi.createMaintenanceReport(data);
|
this.formLoading = true;
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.formData = res.data;
|
||||||
this.dialogVisible = false;
|
this.formData.maintenanceOrderNo = maintenanceOrderNo;
|
||||||
this.$emit('success');
|
|
||||||
} finally {
|
|
||||||
this.formLoading = false;
|
this.formLoading = false;
|
||||||
}
|
this.dialogTitle = "维修报告详情";
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/** 表单重置 */
|
/** 表单重置 */
|
||||||
reset() {
|
reset() {
|
||||||
|
Loading…
Reference in New Issue
Block a user