Browse Source

物料库区配置api扩充

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

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

@ -55,8 +55,13 @@ export const deleteItemarea = async (id: number) => {
// 导出物料库区配置 Excel // 导出物料库区配置 Excel
export const exportItemarea = async (params) => { export const exportItemarea = async (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 }) return await request.download({ url: `/wms/itemarea/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

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' })
}

2
src/components/ImportForm/src/ImportForm.vue

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

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

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

Loading…
Cancel
Save