Browse Source

物料库区配置api扩充

master_hella_20240701
chenfang 9 months ago
parent
commit
cfb9d71d7e
  1. 7
      src/api/wms/itemarea/index.ts
  2. 50
      src/api/wms/itemareaDetail/index.ts
  3. 4
      src/components/ImportForm/src/ImportForm.vue
  4. 2
      src/views/wms/basicDataManage/itemarea/itemarea.data.ts

7
src/api/wms/itemarea/index.ts

@ -55,7 +55,12 @@ export const deleteItemarea = async (id: number) => {
// 导出物料库区配置 Excel
export const exportItemarea = async (params) => {
return await request.download({ url: `/wms/itemarea/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/itemarea/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/itemarea/export-excel`, params })
}
}
// 下载用户导入模板

50
src/api/wms/itemareaDetail/index.ts

@ -0,0 +1,50 @@
import request from '@/config/axios'
export interface ItemareaDetailVO {
id: number
masterId: number
remark: string
locationGroup: string
locationCode: string
}
// 查询物料库区配置表子列表
export const getItemareaDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/itemarea-detail/senior', data })
} else {
return await request.get({ url: `/wms/itemarea-detail/page`, params })
}
}
// 查询物料库区配置表子详情
export const getItemareaDetail = async (id: number) => {
return await request.get({ url: `/wms/itemarea-detail/get?id=` + id })
}
// 新增物料库区配置表子
export const createItemareaDetail = async (data: ItemareaDetailVO) => {
return await request.post({ url: `/wms/itemarea-detail/create`, data })
}
// 修改物料库区配置表子
export const updateItemareaDetail = async (data: ItemareaDetailVO) => {
return await request.put({ url: `/wms/itemarea-detail/update`, data })
}
// 删除物料库区配置表子
export const deleteItemareaDetail = async (id: number) => {
return await request.delete({ url: `/wms/itemarea-detail/delete?id=` + id })
}
// 导出物料库区配置表子 Excel
export const exportItemareaDetail = async (params) => {
return await request.download({ url: `/wms/itemarea-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/itemarea-detail/get-import-template' })
}

4
src/components/ImportForm/src/ImportForm.vue

@ -245,7 +245,9 @@ const submitFormSuccess = (response: any) => {
//
// downloadElement.click()
})
} else {
} else if(response.data.errorCount = 0){
message.error('导入数据不能为空')
}else {
message.success('导入成功')
}
}

2
src/views/wms/basicDataManage/itemarea/itemarea.data.ts

@ -151,7 +151,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
},
{
label: '出库后剩余库存自动转换为出库包装规格 出库后剩余库存自动转换为出库包装规格',
label: '出库后剩余库存自动转换为出库包装规格',
field: 'surplusToOutpackunit',
sort: 'custom',
},

Loading…
Cancel
Save