优化
This commit is contained in:
@@ -21,6 +21,19 @@ export interface MaterialTypeQuery {
|
||||
}
|
||||
export interface MaterialTypePageQuery extends MaterialTypeQuery, PageQuery {}
|
||||
|
||||
export interface MaterialTypeImportResp {
|
||||
importKey: string
|
||||
totalRows: number
|
||||
validRows: number
|
||||
duplicateNameRows: number
|
||||
}
|
||||
|
||||
export interface MaterialTypeImportResult {
|
||||
insertRows: number
|
||||
updateRows: number
|
||||
totalRows: number
|
||||
}
|
||||
|
||||
/** @desc 查询物料品类列表 */
|
||||
export function listMaterialType(query: MaterialTypePageQuery) {
|
||||
return http.get<PageRes<MaterialTypeResp[]>>(`${BASE_URL}`, query)
|
||||
@@ -50,3 +63,18 @@ export function deleteMaterialType(id: string) {
|
||||
export function exportMaterialType(query: MaterialTypeQuery) {
|
||||
return http.download(`${BASE_URL}/export`, query)
|
||||
}
|
||||
|
||||
/** @desc 下载物料品类导入模板 */
|
||||
export function downloadMaterialTypeImportTemplate() {
|
||||
return http.download(`${BASE_URL}/importTemplate`)
|
||||
}
|
||||
|
||||
/** @desc 解析物料品类导入数据 */
|
||||
export function parseImportMaterialType(data: FormData) {
|
||||
return http.post<MaterialTypeImportResp>(`${BASE_URL}/parseImport`, data)
|
||||
}
|
||||
|
||||
/** @desc 导入物料品类 */
|
||||
export function importMaterialType(data: any) {
|
||||
return http.post<MaterialTypeImportResult>(`${BASE_URL}/import`, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user