diff --git a/src/views/mes/zjproduct/components/ZjProductPreList.vue b/src/views/mes/zjproduct/components/ZjProductPreList.vue index 9e3ef2c1..99fd13ba 100644 --- a/src/views/mes/zjproduct/components/ZjProductPreList.vue +++ b/src/views/mes/zjproduct/components/ZjProductPreList.vue @@ -39,14 +39,12 @@ @@ -100,9 +98,21 @@ const getList = async () => { } } +const isInspected = (row: ZjTaskListRow) => { + const result = (row as any)?.result + if (result === 1 || result === '1' || result === 2 || result === '2') return true + const status = (row as any)?.status + return String(status ?? '') !== '0' +} + const handleRowClick = (row: ZjTaskListRow) => { if (!row?.id) return - resultDialogRef.value?.open({ id: row.id, status: row.status, cancelReason: (row as any).cancelReason }) + resultDialogRef.value?.open({ + id: row.id, + status: row.status, + cancelReason: (row as any).cancelReason, + readOnly: isInspected(row), + }) } watch(