diff --git a/src/apis/material/materialInfo.ts b/src/apis/material/materialInfo.ts index dfea7c7..c8e9289 100644 --- a/src/apis/material/materialInfo.ts +++ b/src/apis/material/materialInfo.ts @@ -13,6 +13,7 @@ export interface MaterialInfoResp { createTime: string createUserString: string updateUserString: string + lightLevel: string disabled: boolean photoLoadError: boolean } @@ -37,9 +38,6 @@ export function listMaterialInfo(query: MaterialInfoPageQuery) { return http.get>(`${BASE_URL}`, query) } -interface MaterialInfoDetailResp { -} - /** @desc 下载物料信息导入模板 */ export function downloadMaterialInfoImportTemplate() { return http.download(`${BASE_URL}/import/template`) @@ -47,7 +45,7 @@ export function downloadMaterialInfoImportTemplate() { /** @desc 查询物料信息详情 */ export function getMaterialInfo(id: string) { - return http.get(`${BASE_URL}/${id}`) + return http.get(`${BASE_URL}/${id}`) } /** @desc 新增物料信息 */ diff --git a/src/views/material/MaterialInfoAddModal.vue b/src/views/material/MaterialInfoAddModal.vue index d0562a8..02d0206 100644 --- a/src/views/material/MaterialInfoAddModal.vue +++ b/src/views/material/MaterialInfoAddModal.vue @@ -21,6 +21,7 @@ import { type ColumnItem, GiForm } from '@/components/GiForm' import { useResetReactive } from '@/hooks' import { materialType } from "@/hooks/app/materialType"; import {materialProcess} from "@/hooks/app/materialProcess"; +import {useDict} from "@/hooks/app"; const emit = defineEmits<{ (e: 'save-success'): void @@ -36,6 +37,7 @@ const formRef = ref>() const { materialTypeList, getMaterialTypeSelect } = materialType() const { materialProcessList, getMaterialProcessSelect } = materialProcess() +const { light_level } = useDict('light_level') @@ -77,6 +79,16 @@ const columns: ColumnItem[] = reactive([ allowSearch: true, }, }, + { + label: '灯光等级', + field: 'lightLevel', + type: 'select', + span: 24, + props: { + options: light_level, + allowClear: true, + }, + }, { label: '物料流程编码', field: 'materialProcessId', @@ -155,10 +167,11 @@ const onUpdate = async (id: string) => { await getMaterialProcessSelect(); } Object.assign(form, data) + form.lightLevel = data.lightLevel ? JSON.stringify(data.lightLevel) : '' visible.value = true } defineExpose({ onAdd, onUpdate }) - + \ No newline at end of file diff --git a/src/views/material/index.vue b/src/views/material/index.vue index be248bd..e31b5ba 100644 --- a/src/views/material/index.vue +++ b/src/views/material/index.vue @@ -54,6 +54,9 @@ :src="record.photoUrl" /> +