index.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import request from '@/config/axios'
  2. // 标本出库回库信息 VO
  3. export interface SpecimenOutboundVO {
  4. id: number // 主键
  5. infoId: string // 关联到总表中的标本ID
  6. chineseName: string // 中文名称
  7. number: string // 申请出库的标本编号
  8. applicantName: string // 申请人或申请单位
  9. applicationDate: Date // 申请日期
  10. applicationUsage: string // 申请出库的用途
  11. attachments: string // 附件上传
  12. status: number // 审批状态
  13. remarks: string // 备注信息
  14. processInstanceId: string // 一审驳回原因
  15. operator: string // 出库员
  16. outgoingTime: Date // 出库时间
  17. returner: string // 退还人
  18. receiver: string // 点收人
  19. returnDate: Date // 退还日期
  20. specimenCondition: string // 标本情况
  21. sampleStatus: number // 标本状态(已出库、已回库、出库审批中)
  22. estimatedReturnTime:Date//预计退还日期
  23. approvalTime?:Date//一审时间
  24. twoApprovalTime:Date//二审时间
  25. expectedCollectionTime:Date//预计领取时间
  26. rejectionReasons?: string//二审驳回原因
  27. approveUsers?:string//一审批者
  28. twoApproveUsers?: string//二审批者
  29. startTime: Date//项目开始时间
  30. }
  31. // 标本出库回库信息 API
  32. export const SpecimenOutboundApi = {
  33. // 查询标本出库回库信息分页
  34. getSpecimenOutboundPage: async (params: any) => {
  35. return await request.get({ url: `/museums/specimen-outbound/page`, params })
  36. },
  37. // 查询标本出库回库信息详情
  38. getSpecimenOutbound: async (id: number) => {
  39. return await request.get({ url: `/museums/specimen-outbound/get?id=` + id })
  40. },
  41. // 新增标本出库回库申请
  42. createSpecimenOutbound: async (data: SpecimenOutboundVO) => {
  43. return await request.post({ url: `/museums/specimen-outbound/create`, data })
  44. },
  45. // 修改标本出库回库信息
  46. updateSpecimenOutbound: async (data: SpecimenOutboundVO) => {
  47. return await request.put({ url: `/museums/specimen-outbound/update`, data })
  48. },
  49. // 删除标本出库回库信息
  50. deleteSpecimenOutbound: async (id: number) => {
  51. return await request.delete({ url: `/museums/specimen-outbound/delete?id=` + id })
  52. },
  53. // 导出标本出库回库信息 Excel
  54. exportSpecimenOutbound: async (params) => {
  55. return await request.download({ url: `/museums/specimen-outbound/export-excel`, params })
  56. },
  57. // 审批通过标本出库回库
  58. // ApprovalPassSpecimenOutbound: async (data: SpecimenOutboundVO) => {
  59. // return await request.post({ url: `/museums/specimen-outbound/approve`, data })
  60. // },
  61. //审批驳回标本出库回库
  62. ApprovalSpecimenOutbound: async (data: SpecimenOutboundVO) => {
  63. return await request.post({ url: `/museums/specimen-outbound/approve`, data })
  64. },
  65. // 确认回标本出库
  66. ConfirmSpecimenOutbound :async (id: number) => {
  67. // 构造请求体
  68. const reqBody = {
  69. id: id
  70. };
  71. // 发送POST请求,包含请求体
  72. return await request.post({
  73. url: `/museums/specimen-outbound/confirmOutbound`,
  74. data: reqBody
  75. });
  76. },
  77. // 查询标本出库回库信息详情页面
  78. getSpecimenOutboundDetails: async (id: number) => {
  79. return await request.get({ url: `/museums/specimen-outbound/specimenInfo?id=` + id })
  80. },
  81. // 查询标本出库回库详情页面分页
  82. getSpecimenOutboundDetailsPage: async (params: any) => {
  83. return await request.get({ url: `/museums/specimen-outbound/specimenInfo`, params })
  84. },
  85. // 修改标本出库申请
  86. alterSpecimenOutbound: async (data: SpecimenOutboundVO) => {
  87. return await request.put({ url: `/museums/specimen-outbound/recompile`, data })
  88. },
  89. }