diff --git a/imt-ui/src/views/system/maintenance/maintenanceRecord/index.vue b/imt-ui/src/views/system/maintenance/maintenanceRecord/index.vue
index f4305f1..b98c0a6 100644
--- a/imt-ui/src/views/system/maintenance/maintenanceRecord/index.vue
+++ b/imt-ui/src/views/system/maintenance/maintenanceRecord/index.vue
@@ -110,7 +110,7 @@
label="维修报告:"
prop="diagnoiseReportId"
>
- 维修报告
+ 维修报告
无
@@ -199,6 +199,7 @@
关 闭
+
@@ -207,9 +208,13 @@ import * as RemoteMaintenanceOrderApi from '@/api/system/maintenance/maintenance
import {getEquipCascader} from '@/api/system/equip/equipInfo'
import {getComponentSelection} from '@/api/system/equip/componentInfo'
import {getCustomerSelection} from '@/api/system/baseData/customerInfo'
+import MaintenanceReportDetails from '@/views/system/maintenance/maintenanceReport/MaintenanceReportDetails.vue';
export default {
name: "RemoteMaintenanceOrder",
+ components: {
+ MaintenanceReportDetails,
+ },
data() {
return {
detailOpen: false,
@@ -253,6 +258,10 @@ export default {
this.initSelection();
},
methods: {
+ openReport(maintenanceOrderNo,id){
+ console.log(id)
+ this.$refs["formRef"].open(maintenanceOrderNo,id);
+ },
closeDetails(){
this.detailOpen = false;
this.detailForm = {};
diff --git a/imt-ui/src/views/system/maintenance/maintenanceReport/MaintenanceReportDetails.vue b/imt-ui/src/views/system/maintenance/maintenanceReport/MaintenanceReportDetails.vue
index 0c33841..bbc9179 100644
--- a/imt-ui/src/views/system/maintenance/maintenanceReport/MaintenanceReportDetails.vue
+++ b/imt-ui/src/views/system/maintenance/maintenanceReport/MaintenanceReportDetails.vue
@@ -2,34 +2,34 @@
-
+
-
- {{formData.maintenanceOrderId}}
+
+ {{formData.maintenanceOrderNo}}
-
+
-
+
{{formData.maintenanceContent}}
-
+
{{formData.maintenanceProblem}}
-
+
{{formData.maintenanceEvaluation}}
-
+
{{formData.remark}}
@@ -67,51 +67,25 @@ export default {
},
// 表单校验
formRules: {
- maintenanceOrderId: [{required: true, message: '维修工单id不能为空', trigger: 'change'}],
},
};
},
methods: {
/** 打开弹窗 */
- async open(id) {
- this.dialogVisible = true;
+ open(maintenanceOrderNo,id) {
this.reset();
- // 修改时,设置数据
- if (id) {
- this.formLoading = true;
- 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');
+ MaintenanceReportApi.getMaintenanceReport(id).then(res=>{
+ if (res.data == null){
+ this.$message.error('未查询到数据')
return;
}
- // 添加的提交
- await MaintenanceReportApi.createMaintenanceReport(data);
- this.$modal.msgSuccess("新增成功");
- this.dialogVisible = false;
- this.$emit('success');
- } finally {
+ this.dialogVisible = true;
+ this.formLoading = true;
+ this.formData = res.data;
+ this.formData.maintenanceOrderNo = maintenanceOrderNo;
this.formLoading = false;
- }
+ this.dialogTitle = "维修报告详情";
+ })
},
/** 表单重置 */
reset() {