优化
This commit is contained in:
@@ -13,6 +13,7 @@ export interface MaterialInfoResp {
|
|||||||
createTime: string
|
createTime: string
|
||||||
createUserString: string
|
createUserString: string
|
||||||
updateUserString: string
|
updateUserString: string
|
||||||
|
lightLevel: string
|
||||||
disabled: boolean
|
disabled: boolean
|
||||||
photoLoadError: boolean
|
photoLoadError: boolean
|
||||||
}
|
}
|
||||||
@@ -37,9 +38,6 @@ export function listMaterialInfo(query: MaterialInfoPageQuery) {
|
|||||||
return http.get<PageRes<MaterialInfoResp[]>>(`${BASE_URL}`, query)
|
return http.get<PageRes<MaterialInfoResp[]>>(`${BASE_URL}`, query)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MaterialInfoDetailResp {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @desc 下载物料信息导入模板 */
|
/** @desc 下载物料信息导入模板 */
|
||||||
export function downloadMaterialInfoImportTemplate() {
|
export function downloadMaterialInfoImportTemplate() {
|
||||||
return http.download(`${BASE_URL}/import/template`)
|
return http.download(`${BASE_URL}/import/template`)
|
||||||
@@ -47,7 +45,7 @@ export function downloadMaterialInfoImportTemplate() {
|
|||||||
|
|
||||||
/** @desc 查询物料信息详情 */
|
/** @desc 查询物料信息详情 */
|
||||||
export function getMaterialInfo(id: string) {
|
export function getMaterialInfo(id: string) {
|
||||||
return http.get<MaterialInfoDetailResp>(`${BASE_URL}/${id}`)
|
return http.get<MaterialInfoResp>(`${BASE_URL}/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 新增物料信息 */
|
/** @desc 新增物料信息 */
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { type ColumnItem, GiForm } from '@/components/GiForm'
|
|||||||
import { useResetReactive } from '@/hooks'
|
import { useResetReactive } from '@/hooks'
|
||||||
import { materialType } from "@/hooks/app/materialType";
|
import { materialType } from "@/hooks/app/materialType";
|
||||||
import {materialProcess} from "@/hooks/app/materialProcess";
|
import {materialProcess} from "@/hooks/app/materialProcess";
|
||||||
|
import {useDict} from "@/hooks/app";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'save-success'): void
|
(e: 'save-success'): void
|
||||||
@@ -36,6 +37,7 @@ const formRef = ref<InstanceType<typeof GiForm>>()
|
|||||||
|
|
||||||
const { materialTypeList, getMaterialTypeSelect } = materialType()
|
const { materialTypeList, getMaterialTypeSelect } = materialType()
|
||||||
const { materialProcessList, getMaterialProcessSelect } = materialProcess()
|
const { materialProcessList, getMaterialProcessSelect } = materialProcess()
|
||||||
|
const { light_level } = useDict('light_level')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -77,6 +79,16 @@ const columns: ColumnItem[] = reactive([
|
|||||||
allowSearch: true,
|
allowSearch: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '灯光等级',
|
||||||
|
field: 'lightLevel',
|
||||||
|
type: 'select',
|
||||||
|
span: 24,
|
||||||
|
props: {
|
||||||
|
options: light_level,
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '物料流程编码',
|
label: '物料流程编码',
|
||||||
field: 'materialProcessId',
|
field: 'materialProcessId',
|
||||||
@@ -155,6 +167,7 @@ const onUpdate = async (id: string) => {
|
|||||||
await getMaterialProcessSelect();
|
await getMaterialProcessSelect();
|
||||||
}
|
}
|
||||||
Object.assign(form, data)
|
Object.assign(form, data)
|
||||||
|
form.lightLevel = data.lightLevel ? JSON.stringify(data.lightLevel) : ''
|
||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,9 @@
|
|||||||
:src="record.photoUrl"
|
:src="record.photoUrl"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #lightLevel="{ record }">
|
||||||
|
<GiCellTag :value="record.lightLevel" :dict="light_level" />
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
@@ -88,9 +91,12 @@ import { useDownload, useTable } from '@/hooks'
|
|||||||
import { isMobile } from '@/utils'
|
import { isMobile } from '@/utils'
|
||||||
import has from '@/utils/has'
|
import has from '@/utils/has'
|
||||||
import {Message} from "@arco-design/web-vue";
|
import {Message} from "@arco-design/web-vue";
|
||||||
|
import {useDict} from "@/hooks/app";
|
||||||
|
|
||||||
defineOptions({ name: 'MaterialInfo' })
|
defineOptions({ name: 'MaterialInfo' })
|
||||||
|
|
||||||
|
const { light_level } = useDict('light_level')
|
||||||
|
|
||||||
interface MaterialInfoRespWithStatus extends MaterialInfoResp {
|
interface MaterialInfoRespWithStatus extends MaterialInfoResp {
|
||||||
photoLoadError?: boolean;
|
photoLoadError?: boolean;
|
||||||
}
|
}
|
||||||
@@ -118,6 +124,7 @@ const columns = ref<TableInstanceColumns[]>([
|
|||||||
{ title: '物料单位重量(g)', dataIndex: 'unitWeight', slotName: 'unitWeight' },
|
{ title: '物料单位重量(g)', dataIndex: 'unitWeight', slotName: 'unitWeight' },
|
||||||
{ title: '物料品类', dataIndex: 'typeName' },
|
{ title: '物料品类', dataIndex: 'typeName' },
|
||||||
{ title: '物料规格', dataIndex: 'materialSpec', slotName: 'materialSpec' },
|
{ title: '物料规格', dataIndex: 'materialSpec', slotName: 'materialSpec' },
|
||||||
|
{ title: '灯光等级', dataIndex: 'lightLevel', slotName: 'lightLevel' },
|
||||||
{ title: '物料照片', dataIndex: 'photoUrl', slotName: 'photoUrl', width: 120, align: 'center' },
|
{ title: '物料照片', dataIndex: 'photoUrl', slotName: 'photoUrl', width: 120, align: 'center' },
|
||||||
{ title: '创建人', dataIndex: 'createUserString', slotName: 'createUser' },
|
{ title: '创建人', dataIndex: 'createUserString', slotName: 'createUser' },
|
||||||
{ title: '创建时间', dataIndex: 'createTime', slotName: 'createTime' },
|
{ title: '创建时间', dataIndex: 'createTime', slotName: 'createTime' },
|
||||||
|
|||||||
Reference in New Issue
Block a user