Merge branch 'refs/heads/master' into dev
This commit is contained in:
52
src/apis/material/materialInfo.ts
Normal file
52
src/apis/material/materialInfo.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
const BASE_URL = '/admin/meterialInfo'
|
||||
|
||||
export interface MeterialInfoResp {
|
||||
materialName: string
|
||||
encoding: string
|
||||
unitWeight: string
|
||||
maxWeight: string
|
||||
photoUrl: string
|
||||
createUser: string
|
||||
createTime: string
|
||||
createUserString: string
|
||||
updateUserString: string
|
||||
disabled: boolean
|
||||
}
|
||||
export interface MaterialInfoQuery {
|
||||
materialName: string | undefined
|
||||
encoding: string | undefined
|
||||
sort: Array<string>
|
||||
}
|
||||
export interface MaterialInfoPageQuery extends MaterialInfoQuery, PageQuery {}
|
||||
|
||||
/** @desc 查询物料信息列表 */
|
||||
export function listMaterialInfo(query: MaterialInfoPageQuery) {
|
||||
return http.get<PageRes<MeterialInfoResp[]>>(`${BASE_URL}`, query)
|
||||
}
|
||||
|
||||
/** @desc 查询物料信息详情 */
|
||||
export function getMaterialInfo(id: string) {
|
||||
return http.get<MeterialInfoDetailResp>(`${BASE_URL}/${id}`)
|
||||
}
|
||||
|
||||
/** @desc 新增物料信息 */
|
||||
export function addMaterialInfo(data: any) {
|
||||
return http.post(`${BASE_URL}`, data)
|
||||
}
|
||||
|
||||
/** @desc 修改物料信息 */
|
||||
export function updateMaterialInfo(data: any, id: string) {
|
||||
return http.put(`${BASE_URL}/${id}`, data)
|
||||
}
|
||||
|
||||
/** @desc 删除物料信息 */
|
||||
export function deleteMaterialInfo(id: string) {
|
||||
return http.del(`${BASE_URL}/${id}`)
|
||||
}
|
||||
|
||||
/** @desc 导出物料信息 */
|
||||
export function exportMaterialInfo(query: MeterialInfoQuery) {
|
||||
return http.download(`${BASE_URL}/export`, query)
|
||||
}
|
||||
Reference in New Issue
Block a user