basic.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. import request from '@/utils/request'
  2. // 获取物料申请单列表
  3. export function getReqList(params) {
  4. return request({
  5. url: `/system/apply/material/list`,
  6. method: 'get',
  7. params: params
  8. })
  9. }
  10. // 物料申请单-新增
  11. export function addReq(data) {
  12. return request({
  13. url: `/system/apply/material`,
  14. method: 'post',
  15. data: data,
  16. })
  17. }
  18. // 获取物料申请单详情
  19. export function getReqDetail(id) {
  20. return request({
  21. url: `/system/apply/material/${id}`,
  22. method: 'get',
  23. })
  24. }
  25. // 物料申请单-修改提交
  26. export function editReq(data) {
  27. return request({
  28. url: `/system/apply/material`,
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 物料申请单-修改提交
  34. export function betchSubmit(data) {
  35. return request({
  36. url: `/system/apply/material/submit`,
  37. method: 'post',
  38. data: data,
  39. })
  40. }
  41. // 物料申请单-删除
  42. export function delReq(id) {
  43. return request({
  44. url: `/system/apply/material/${id}`,
  45. method: 'delete',
  46. })
  47. }
  48. // 参照-计量单位
  49. export function getUnit(data) {
  50. return request({
  51. url: `/system/archival/queryUnit?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  52. method: 'post',
  53. data: data
  54. })
  55. }
  56. // 参照-产地
  57. export function getPlace(data) {
  58. return request({
  59. url: `/system/archival/queryOrigin?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  60. method: 'post',
  61. data: data
  62. })
  63. }
  64. // 参照-税类
  65. export function getTax(data) {
  66. return request({
  67. url: `/system/archival/queryTaxrate?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  68. method: 'post',
  69. data: data
  70. })
  71. }
  72. // 参照-采购员
  73. export function getStaff(data) {
  74. return request({
  75. url: `/system/archival/queryStaffInfo?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  76. method: 'post',
  77. data: data
  78. })
  79. }
  80. // 参照-业务线
  81. export function getLine(data) {
  82. return request({
  83. url: `/system/archival/queryServiceline?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  84. method: 'post',
  85. data: data
  86. })
  87. }
  88. // 参照-剂型-树形
  89. export function getDose(data) {
  90. return request({
  91. url: `/system/archival/queryDosageForm`,
  92. method: 'post',
  93. data: data
  94. })
  95. }
  96. // 参照-采购组织-树形
  97. // 查询部门下拉树结构
  98. export function getOrgs(data) {
  99. return request({
  100. url: '/system/user/deptTree',
  101. method: 'get',
  102. params: data
  103. })
  104. }
  105. // 参照-药品类别(子表)-树形
  106. export function getDrug(data) {
  107. return request({
  108. url: `/system/archival/queryMedcineItemDrug`,
  109. method: 'post',
  110. data: data
  111. })
  112. }
  113. // 参照-中包装单位
  114. export function getMidPack(data) {
  115. return request({
  116. url: `/system/archival/queryMediumPackage?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  117. method: 'post',
  118. data: data
  119. })
  120. }
  121. // 导入
  122. export function importData(data) {
  123. return request({
  124. url: `/system/apply/material/import`,
  125. method: 'post',
  126. data: data
  127. })
  128. }
  129. // 下载失败导入文件数据
  130. export function fileImport(data) {
  131. return request({
  132. url: `/system/apply/material/downloadFailData`,
  133. method: 'post',
  134. data: data,
  135. responseType: 'blob',
  136. })
  137. }
  138. export function toOA(userName, fdId) {
  139. return request({
  140. url: `/oaflow/redirectToOa/${userName}/${fdId}`,
  141. method: 'get',
  142. })
  143. }
  144. //收回
  145. export function oaBack(data) {
  146. return request({
  147. url: `/oaflow/rollback`,
  148. method: "POST",
  149. data: data,
  150. });
  151. }
  152. //收回
  153. export function saveAndToOa(data) {
  154. return request({
  155. url: `/system/apply/material/saveAndToOa`,
  156. method: "POST",
  157. data: data,
  158. });
  159. }
  160. export const REFER = (data, params) => {
  161. return request({
  162. url: "/refer/query",
  163. method: "POST",
  164. data: data,
  165. params: params,
  166. });
  167. }
  168. export function classifyDetails(params) {
  169. return request({
  170. url: `/system/classify/details`,
  171. method: 'get',
  172. params: params,
  173. })
  174. }
  175. export function getDiCode(dicode) {
  176. return request({
  177. url: `/system/apply/material/getDiCode/${dicode}`,
  178. method: 'get',
  179. })
  180. }
  181. export function deleteApplies(data) {
  182. return request({
  183. url: `/system/apply/material/deleteApplies`,
  184. method: "POST",
  185. data: data,
  186. })
  187. }
  188. export function checkDiCode(params) {
  189. return request({
  190. url: `/system/apply/material/checkDiCode`,
  191. method: 'get',
  192. params: params,
  193. })
  194. }