Browse Source

检修,保养工单bug

master
zhang_li 8 months ago
parent
commit
059cb73cc5
  1. 7
      src/views/eam/device/deviceinspectionjob/index.vue
  2. 6
      src/views/eam/device/devicemaintainjob/index.vue
  3. 8
      src/views/eam/mold/moldinspectionjob/index.vue
  4. 8
      src/views/eam/mold/moldmaintainjob/index.vue

7
src/views/eam/device/deviceinspectionjob/index.vue

@ -411,7 +411,8 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => {
chargePeoples: data.chargePeoples.join(','), chargePeoples: data.chargePeoples.join(','),
completionTime: data.completionTime, completionTime: data.completionTime,
engineer: data.engineer, engineer: data.engineer,
uncompleted: data.uncompleted uncompleted: data.uncompleted,
itemNumbers: data.itemNumbers,
} }
console.log('data1',data1) console.log('data1',data1)
if (formType === 'create') { if (formType === 'create') {
@ -424,6 +425,8 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
formRef.dialogVisible = false formRef.dialogVisible = false
await detailRef.value.getList()
// //
detailRef.value.tableObject.tableList.forEach(item => { detailRef.value.tableObject.tableList.forEach(item => {
if (item.itemNumbers?.length > 0) { if (item.itemNumbers?.length > 0) {
@ -434,8 +437,6 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => {
item.itemNumbers1 = str.substring(0, str.length - 1) item.itemNumbers1 = str.substring(0, str.length - 1)
} }
}) })
await detailRef.value.getList()
} finally { } finally {
formRef.formLoading = false formRef.formLoading = false
} }

6
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 { try {
let data1 = { let data1 = {
id:data.id, id:data.id,
@ -475,7 +475,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
} }
formRef.dialogVisible = false formRef.dialogVisible = false
// //
await formRef.getList1 await detailRef.value.getList()
detailRef.value.tableObject.tableList.forEach(item=>{ detailRef.value.tableObject.tableList.forEach(item=>{
if (item.itemNumbers?.length>0) { if (item.itemNumbers?.length>0) {
let str = '' let str = ''
@ -487,7 +487,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
}) })
} finally { } finally {
detailRef.formLoading = false formRef.formLoading = false
} }
} }

8
src/views/eam/mold/moldinspectionjob/index.vue

@ -397,7 +397,8 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => {
chargePeoples: data.chargePeoples.join(','), chargePeoples: data.chargePeoples.join(','),
completionTime: data.completionTime, completionTime: data.completionTime,
engineer: data.engineer, engineer: data.engineer,
uncompleted: data.uncompleted uncompleted: data.uncompleted,
itemNumbers: data.itemNumbers,
} }
console.log('data1',data1) console.log('data1',data1)
if (formType === 'create') { if (formType === 'create') {
@ -412,7 +413,7 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => {
formRef.dialogVisible = false formRef.dialogVisible = false
console.log('before', data1) console.log('before', data1)
// //
await formRef.getList1 await detailRef.value.getList()
console.log('after', data1) console.log('after', data1)
detailRef.value.tableObject.tableList.forEach(item => { detailRef.value.tableObject.tableList.forEach(item => {
if (item.itemNumbers?.length > 0) { if (item.itemNumbers?.length > 0) {
@ -424,7 +425,6 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => {
} }
}) })
await detailRef.value.getList()
} finally { } finally {
formRef.formLoading = false formRef.formLoading = false
} }
@ -500,7 +500,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
MoldInspectionDetailRules.completionTime = [{ required: true ,message: '该项为必填项'}] MoldInspectionDetailRules.completionTime = [{ required: true ,message: '该项为必填项'}]
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0' MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0'
} else { } 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 == 'uncompleted').componentProps.disabled = false
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'completionTime').componentProps.disabled = true MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'completionTime').componentProps.disabled = true
MoldInspectionDetailRules.uncompleted = [{ required: true,message: '该项为必填项' }] MoldInspectionDetailRules.uncompleted = [{ required: true,message: '该项为必填项' }]

8
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 { try {
let data1 = { let data1 = {
id:data.id, id:data.id,
@ -476,7 +476,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
} }
formRef.dialogVisible = false formRef.dialogVisible = false
// //
await formRef.getList1 await detailRef.value.getList()
detailRef.value.tableObject.tableList.forEach(item=>{ detailRef.value.tableObject.tableList.forEach(item=>{
if (item.itemNumbers?.length>0) { if (item.itemNumbers?.length>0) {
let str = '' let str = ''
@ -488,7 +488,7 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
}) })
} finally { } finally {
detailRef.formLoading = false formRef.formLoading = false
} }
} }
@ -538,7 +538,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
MoldMaintainOrderDetailRules.completionTime = [{ required: true ,message: '该项为必填项'}] MoldMaintainOrderDetailRules.completionTime = [{ required: true ,message: '该项为必填项'}]
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0' MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0'
} else { } 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 == 'uncompleted').componentProps.disabled = false
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'completionTime').componentProps.disabled = true MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'completionTime').componentProps.disabled = true
MoldMaintainOrderDetailRules.uncompleted = [{ required: true,message: '该项为必填项' }] MoldMaintainOrderDetailRules.uncompleted = [{ required: true,message: '该项为必填项' }]

Loading…
Cancel
Save