From 059cb73cc5284d78bc141ab037573f56d4edfb0b Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 20 Mar 2024 16:27:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E4=BF=AE=EF=BC=8C=E4=BF=9D=E5=85=BB?= =?UTF-8?q?=E5=B7=A5=E5=8D=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/device/deviceinspectionjob/index.vue | 7 ++++--- src/views/eam/device/devicemaintainjob/index.vue | 6 +++--- src/views/eam/mold/moldinspectionjob/index.vue | 8 ++++---- src/views/eam/mold/moldmaintainjob/index.vue | 8 ++++---- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/views/eam/device/deviceinspectionjob/index.vue b/src/views/eam/device/deviceinspectionjob/index.vue index 4f69b54..44685e7 100644 --- a/src/views/eam/device/deviceinspectionjob/index.vue +++ b/src/views/eam/device/deviceinspectionjob/index.vue @@ -411,7 +411,8 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => { chargePeoples: data.chargePeoples.join(','), completionTime: data.completionTime, engineer: data.engineer, - uncompleted: data.uncompleted + uncompleted: data.uncompleted, + itemNumbers: data.itemNumbers, } console.log('data1',data1) if (formType === 'create') { @@ -424,6 +425,8 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => { message.success(t('common.updateSuccess')) } formRef.dialogVisible = false + + await detailRef.value.getList() // 刷新当前列表 detailRef.value.tableObject.tableList.forEach(item => { if (item.itemNumbers?.length > 0) { @@ -434,8 +437,6 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => { item.itemNumbers1 = str.substring(0, str.length - 1) } }) - - await detailRef.value.getList() } finally { formRef.formLoading = false } diff --git a/src/views/eam/device/devicemaintainjob/index.vue b/src/views/eam/device/devicemaintainjob/index.vue index 92d6b0d..764c78e 100644 --- a/src/views/eam/device/devicemaintainjob/index.vue +++ b/src/views/eam/device/devicemaintainjob/index.vue @@ -448,7 +448,7 @@ const detailValidate = (data) => { } } // 子表提交 -const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => { +const detailSubmitForm= async (formType,data,formRef,tableList) => { try { let data1 = { id:data.id, @@ -475,7 +475,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => { } formRef.dialogVisible = false // 刷新当前列表 - await formRef.getList1 + await detailRef.value.getList() detailRef.value.tableObject.tableList.forEach(item=>{ if (item.itemNumbers?.length>0) { let str = '' @@ -487,7 +487,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => { }) } finally { - detailRef.formLoading = false + formRef.formLoading = false } } diff --git a/src/views/eam/mold/moldinspectionjob/index.vue b/src/views/eam/mold/moldinspectionjob/index.vue index 730ad6a..0ef774b 100644 --- a/src/views/eam/mold/moldinspectionjob/index.vue +++ b/src/views/eam/mold/moldinspectionjob/index.vue @@ -397,7 +397,8 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => { chargePeoples: data.chargePeoples.join(','), completionTime: data.completionTime, engineer: data.engineer, - uncompleted: data.uncompleted + uncompleted: data.uncompleted, + itemNumbers: data.itemNumbers, } console.log('data1',data1) if (formType === 'create') { @@ -412,7 +413,7 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => { formRef.dialogVisible = false console.log('before', data1) // 刷新当前列表 - await formRef.getList1 + await detailRef.value.getList() console.log('after', data1) detailRef.value.tableObject.tableList.forEach(item => { if (item.itemNumbers?.length > 0) { @@ -424,7 +425,6 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => { } }) - await detailRef.value.getList() } finally { formRef.formLoading = false } @@ -500,7 +500,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { MoldInspectionDetailRules.completionTime = [{ required: true ,message: '该项为必填项'}] MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0' } else { - if (cur == '1') { + if (row.status == '1') { MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'completionTime').componentProps.disabled = true MoldInspectionDetailRules.uncompleted = [{ required: true,message: '该项为必填项' }] diff --git a/src/views/eam/mold/moldmaintainjob/index.vue b/src/views/eam/mold/moldmaintainjob/index.vue index 43673f4..4fc0084 100644 --- a/src/views/eam/mold/moldmaintainjob/index.vue +++ b/src/views/eam/mold/moldmaintainjob/index.vue @@ -449,7 +449,7 @@ const detailValidate = (data) => { } } // 子表提交 -const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => { +const detailSubmitForm= async (formType,data,formRef,tableList) => { try { let data1 = { id:data.id, @@ -476,7 +476,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => { } formRef.dialogVisible = false // 刷新当前列表 - await formRef.getList1 + await detailRef.value.getList() detailRef.value.tableObject.tableList.forEach(item=>{ if (item.itemNumbers?.length>0) { let str = '' @@ -488,7 +488,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => { }) } finally { - detailRef.formLoading = false + formRef.formLoading = false } } @@ -538,7 +538,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { MoldMaintainOrderDetailRules.completionTime = [{ required: true ,message: '该项为必填项'}] MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0' } else { - if (cur == '1') { + if (row.status == '1') { MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'completionTime').componentProps.disabled = true MoldMaintainOrderDetailRules.uncompleted = [{ required: true,message: '该项为必填项' }]