diff --git a/src/components/DialogForm.vue b/src/components/DialogForm.vue index 80a00294..c3e7eae3 100644 --- a/src/components/DialogForm.vue +++ b/src/components/DialogForm.vue @@ -21,6 +21,7 @@ defineProps<{ edit?: boolean; hideFooter?: boolean; hideDelete?: boolean; + readonly?: boolean; saveAmount?: number; submitLabel?: string; @@ -67,7 +68,7 @@ const currentTab = defineModel('currentTab'); }" >
-
+
('currentTab'); />
-
+
-
+
- (-1); const statusOcr = ref(false); -const props = defineProps<{ - showTitle?: boolean; - ocr?: ( - group: any, - file: File, - ) => void | Promise<{ - status: boolean; - group: string; - meta: { name: string; value: string }[]; - }>; - getFileList?: (group: any) => Promise; - deleteItem?: (obj: any) => void | Promise; - download?: (obj: any) => void; - save?: ( - group: any, - meta: any, - file: File | undefined, - ) => void | Promise; - autoSave?: boolean; - readonly?: boolean; - hideAction?: boolean; - columns: QTableProps['columns']; - menu?: { label: string; value: string; _meta?: Record }[]; -}>(); +const props = withDefaults( + defineProps<{ + readonly?: boolean; + showTitle?: boolean; + ocr?: ( + group: any, + file: File, + ) => void | Promise<{ + status: boolean; + group: string; + meta: { name: string; value: string }[]; + }>; + getFileList?: (group: any) => Promise; + deleteItem?: (obj: any) => void | Promise; + download?: (obj: any) => void; + save?: ( + group: any, + meta: any, + file: File | undefined, + ) => void | Promise; + autoSave?: boolean; + hideAction?: boolean; + columns: QTableProps['columns']; + menu?: { label: string; value: string; _meta?: Record }[]; + }>(), + {}, +); async function triggerDelete(item: any) { dialog({ @@ -272,6 +275,7 @@ defineEmits<{
diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 9cd9a044..a72e30be 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -2655,6 +2655,7 @@ const emptyCreateDialog = ref(false); v-model:current-id="currentFromDataEmployee.id" v-model="currentFromDataEmployee.file" hide-action + :readonly="!employeeFormState.isEmployeeEdit" :group-list="uploadFileListEmployee" :menu="uploadFileListEmployee" :columns="columnsAttachment" @@ -4091,6 +4092,7 @@ const emptyCreateDialog = ref(false); v-model:current-id="currentFromDataEmployee.id" v-model="currentFromDataEmployee.file" hide-action + :readonly="!employeeFormState.isEmployeeEdit" :group-list="uploadFileListEmployee" :menu="uploadFileListEmployee" :columns="columnsAttachment"