index.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import request from '@/config/axios'
  2. // ERP 其它入库单 VO
  3. export interface StockInVO {
  4. id: number // 入库编号
  5. no: string // 入库单号
  6. supplierId: number // 供应商编号
  7. inTime: Date // 入库时间
  8. totalCount: number // 合计数量
  9. totalPrice: number // 合计金额,单位:元
  10. status: number // 状态
  11. remark: string // 备注
  12. }
  13. // ERP 其它入库单 API
  14. export const StockInApi = {
  15. // 查询其它入库单分页
  16. getStockInPage: async (params: any) => {
  17. return await request.get({ url: `/erp/stock-in/page`, params })
  18. },
  19. // 查询其它入库单详情
  20. getStockIn: async (id: number) => {
  21. return await request.get({ url: `/erp/stock-in/get?id=` + id })
  22. },
  23. // 新增其它入库单
  24. createStockIn: async (data: StockInVO) => {
  25. return await request.post({ url: `/erp/stock-in/create`, data })
  26. },
  27. // 修改其它入库单
  28. updateStockIn: async (data: StockInVO) => {
  29. return await request.put({ url: `/erp/stock-in/update`, data })
  30. },
  31. // 更新其它入库单的状态
  32. updateStockInStatus: async (id: number, status: number) => {
  33. return await request.put({
  34. url: `/erp/stock-in/update-status`,
  35. params: {
  36. id,
  37. status
  38. }
  39. })
  40. },
  41. // 删除其它入库单
  42. deleteStockIn: async (ids: number[]) => {
  43. return await request.delete({
  44. url: `/erp/stock-in/delete`,
  45. params: {
  46. ids: ids.join(',')
  47. }
  48. })
  49. },
  50. // 导出其它入库单 Excel
  51. exportStockIn: async (params) => {
  52. return await request.download({ url: `/erp/stock-in/export-excel`, params })
  53. }
  54. }