优化
This commit is contained in:
@@ -19,6 +19,15 @@ export interface MaterialInfoQuery {
|
||||
encoding: string | undefined
|
||||
sort: Array<string>
|
||||
}
|
||||
|
||||
/* 物料信息导入结果类型 */
|
||||
export interface MaterialImportResp {
|
||||
importKey: string
|
||||
totalRows: number
|
||||
validRows: number
|
||||
duplicateNameRows: number
|
||||
duplicateCodeRows: number
|
||||
}
|
||||
export interface MaterialInfoPageQuery extends MaterialInfoQuery, PageQuery {}
|
||||
|
||||
/** @desc 查询物料信息列表 */
|
||||
@@ -29,6 +38,11 @@ export function listMaterialInfo(query: MaterialInfoPageQuery) {
|
||||
interface MaterialInfoDetailResp {
|
||||
}
|
||||
|
||||
/** @desc 下载物料信息导入模板 */
|
||||
export function downloadMaterialInfoImportTemplate() {
|
||||
return http.download(`${BASE_URL}/import/template`)
|
||||
}
|
||||
|
||||
/** @desc 查询物料信息详情 */
|
||||
export function getMaterialInfo(id: string) {
|
||||
return http.get<MaterialInfoDetailResp>(`${BASE_URL}/${id}`)
|
||||
@@ -53,3 +67,13 @@ export function deleteMaterialInfo(id: string) {
|
||||
export function exportMaterialInfo(query: MaterialInfoQuery) {
|
||||
return http.download(`${BASE_URL}/export`, query)
|
||||
}
|
||||
|
||||
/** @desc 解析物料信息导入数据 */
|
||||
export function parseImportMaterial(data: FormData) {
|
||||
return http.post(`${BASE_URL}/import/parse`, data)
|
||||
}
|
||||
|
||||
/** @desc 导入物料信息 */
|
||||
export function importMaterial(data: any) {
|
||||
return http.post(`${BASE_URL}/import`, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user