project.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. import request from '@/utils/request'
  2. // 查询项目列表
  3. export function listProjectApi(query) {
  4. return request({
  5. url: '/ent/data/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. //新增项目
  11. export function addProjectApi(data) {
  12. return request({
  13. url: `/ent/project`,
  14. method: 'post',
  15. data: data
  16. })
  17. }
  18. //获取财务员、科技员
  19. export function listUserListApi(query) {
  20. return request({
  21. url: `/ent/user/list`,
  22. method: 'get',
  23. params: query
  24. })
  25. }
  26. //修改项目
  27. export function editProjectApi(data) {
  28. return request({
  29. url: `/ent/project`,
  30. method: 'put',
  31. data: data
  32. })
  33. }
  34. //获取项目信息 企业
  35. export function getProjectInfoApi(id, query) {
  36. return request({
  37. url: `/ent/project/${id}`,
  38. method: 'get',
  39. params: query
  40. })
  41. }
  42. //获取项目详情信息 科德管理员
  43. export function getProjectInfoAdminApi(id, query) {
  44. return request({
  45. url: `/admin/project/${id}`,
  46. method: 'get',
  47. params: query
  48. })
  49. }
  50. //同步给技术
  51. export function synTechApi(id,data) {
  52. return request({
  53. url: `/ent/project/sync/tech/${id}`,
  54. method: 'put',
  55. data: data
  56. })
  57. }
  58. //同步给财务
  59. export function synFinApi(id, data) {
  60. return request({
  61. url: `/ent/project/sync/finc/${id}`,
  62. method: 'put',
  63. data: data
  64. })
  65. }
  66. //删除项目
  67. export function deleteProjectApi(ids) {
  68. return request({
  69. url: `/ent/data/${ids}`,
  70. method: 'delete'
  71. })
  72. }
  73. //获取项目附件
  74. export function getEnclosureApi(attachType,dataId) {
  75. return request({
  76. url: `/common/attach/attach/${attachType}/${dataId}`,
  77. method: 'get'
  78. })
  79. }
  80. //删除附件信息
  81. export function deleteEnclosureApi(ids) {
  82. return request({
  83. url: `/common/attach/${ids}`,
  84. method: 'delete'
  85. })
  86. }
  87. export function getProjectInfoCommonApi(id, query) {
  88. return request({
  89. url: `/project/${id}`,
  90. method: 'get',
  91. params: query
  92. })
  93. }
  94. //重新提交审核
  95. export function entUserAudit(data) {
  96. return request({
  97. url: `/ent/user/auth`,
  98. method: 'put',
  99. data: data
  100. })
  101. }
  102. //保存草稿
  103. export function draftApi(data) {
  104. return request({
  105. url: `/ent/project/save-draft`,
  106. method: 'post',
  107. data: data
  108. })
  109. }
  110. //保存年度信息
  111. export function yearApi(data) {
  112. return request({
  113. url: `/ent/data/year-project`,
  114. method: 'post',
  115. data: data
  116. })
  117. }
  118. //修改年度信息
  119. export function yearUpdateApi(data) {
  120. return request({
  121. url: `/ent/data/year-project`,
  122. method: 'put',
  123. data: data
  124. })
  125. }
  126. //项目申报
  127. export function declareApi(data) {
  128. return request({
  129. url: `/ent/data/project`,
  130. method: 'post',
  131. data: data
  132. })
  133. }
  134. //获取企业研发项目
  135. export function devProjectApi(projectId, query) {
  136. return request({
  137. url: `/ent/data/project/${projectId}`,
  138. method: 'get',
  139. params: query
  140. })
  141. }
  142. export function declareUpdateApi(data) {
  143. return request({
  144. url: `/ent/data/project`,
  145. method: 'put',
  146. data: data
  147. })
  148. }
  149. //获取企业年度信息
  150. export function getYearDataApi(projectYear, entId, query) {
  151. return request({
  152. url: `/ent/data/year-project/${projectYear}/${entId}`,
  153. method: 'get',
  154. params: query
  155. })
  156. }
  157. //获取附件列表
  158. // export function getEnclosureApi(attachType, dataId) {
  159. // return request({
  160. // url: `/common/attach/attach/${attachType}/${dataId}`,
  161. // method: 'get',
  162. // params: query
  163. // })
  164. // }
  165. //下载
  166. export function downloadApi(id) {
  167. return request({
  168. url: `/common/attach/${id}`,
  169. method: 'get',
  170. responseType: 'blob'
  171. })
  172. }
  173. //年度列表
  174. export function yearListApi() {
  175. return request({
  176. url: `/ent/data/year-list`,
  177. method: 'get'
  178. })
  179. }