expenseManagement.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. import { axios } from '@/utils/request'
  2. // 申请部门
  3. export const departmentQueryList = (params) => {
  4. return axios({
  5. url: `/department/queryList`,
  6. data: params,
  7. method: 'post',
  8. headers:{
  9. 'module': encodeURIComponent('申请部门查询')
  10. }
  11. })
  12. }
  13. // 申请人
  14. export const employeeQueryList = (params) => {
  15. return axios({
  16. url: `/employee/queryList`,
  17. data: params,
  18. method: 'post',
  19. headers:{
  20. 'module': encodeURIComponent('申请人查询')
  21. }
  22. })
  23. }
  24. // 其它往来人员
  25. export const otherOrgQuery = (params) => {
  26. return axios({
  27. url: `/otherorg/queryAll`,
  28. method: 'get',
  29. headers:{
  30. 'module': encodeURIComponent('其它往来人员')
  31. }
  32. })
  33. }
  34. // 费用报销单列表
  35. export const expenseAccountList = (params) => {
  36. const url = `/expenseAccount/queryPage/${params.pageNo}/${params.pageSize}`
  37. delete params.pageNo
  38. delete params.pageSize
  39. return axios({
  40. url: url,
  41. data: params,
  42. method: 'post',
  43. headers:{
  44. 'module': encodeURIComponent('列表查询')
  45. }
  46. })
  47. }
  48. // 批量更新打印状态
  49. export const expenseAccountUpdateBatch = (params) => {
  50. const url = `/expenseAccount/updateBatch`
  51. return axios({
  52. url: url,
  53. data: params,
  54. method: 'post',
  55. headers:{
  56. 'module': encodeURIComponent('批量更新打印状态')
  57. }
  58. })
  59. }
  60. // 新增再次编辑
  61. export const expenseAccountAgainEdit = (params) => {
  62. const url = `/expenseAccount/againEdit/${params.expenseAccountSn} `
  63. return axios({
  64. url: url,
  65. data: params,
  66. method: 'post',
  67. headers:{
  68. 'module': encodeURIComponent('再次编辑')
  69. }
  70. })
  71. }
  72. // 报销单详情
  73. export const expenseAccountDetail = (params) => {
  74. return axios({
  75. url: `/expenseAccount/queryBySn/${params.expenseAccountSn}`,
  76. data: params,
  77. method: 'get'
  78. })
  79. }
  80. // 保存
  81. export const expenseAccountSave = (params) => {
  82. return axios({
  83. url: `/expenseAccount/save`,
  84. data: params,
  85. method: 'post',
  86. headers:{
  87. 'module': encodeURIComponent('新增')
  88. }
  89. })
  90. }
  91. // 删除
  92. export const expenseAccountDelete = (params) => {
  93. return axios({
  94. url: `/expenseAccount/deleteBySn/${params.expenseAccountSn}`,
  95. data: params,
  96. method: 'post',
  97. headers:{
  98. 'module': encodeURIComponent('删除')
  99. }
  100. })
  101. }
  102. // 提交
  103. export const expenseAccountSubmit = (params) => {
  104. return axios({
  105. url: `/expenseAccount/submit`,
  106. data: params,
  107. method: 'post',
  108. headers:{
  109. 'module': encodeURIComponent('提交')
  110. }
  111. })
  112. }
  113. // 删除费用明细
  114. export const expenseAcctDetailDelete = (params) => {
  115. return axios({
  116. url: `/expenseAcctDetail/deleteDetail/${params.detailSn}`,
  117. method: 'get',
  118. headers:{
  119. 'module': encodeURIComponent('删除')
  120. }
  121. })
  122. }
  123. // 根据sn查询费用明细
  124. export const expenseAcctDetailFindBySn = (params) => {
  125. return axios({
  126. url: `/expenseAcctDetail/findBySn/${params.detailSn}`,
  127. method: 'get',
  128. headers:{
  129. 'module': encodeURIComponent('费用明细')
  130. }
  131. })
  132. }
  133. // 根据sn查询费用明细产品
  134. export const expenseAcctDetailFindProductsBySn = (params) => {
  135. return axios({
  136. url: `/expenseAcctDetail/findDetailProductsBySn/${params.detailSn}`,
  137. method: 'get',
  138. headers:{
  139. 'module': encodeURIComponent('费用明细产品')
  140. }
  141. })
  142. }
  143. // 根据sn查询费用明细列表
  144. export const expenseAcctDetailFindList = (params) => {
  145. return axios({
  146. url: `/expenseAcctDetail/findList`,
  147. data: params,
  148. method: 'post',
  149. headers:{
  150. 'module': encodeURIComponent('费用明细列表')
  151. }
  152. })
  153. }
  154. // 保存费用明细
  155. export const expenseAcctDetailSave = (params) => {
  156. return axios({
  157. url: `/expenseAcctDetail/saveDetail`,
  158. data: params,
  159. method: 'post',
  160. headers:{
  161. 'module': encodeURIComponent('保存费用明细')
  162. }
  163. })
  164. }
  165. // 费用类型
  166. export const expenseTypeList = (params) => {
  167. return axios({
  168. url: `/expenseType/queryTreeList`,
  169. data: params,
  170. method: 'post'
  171. })
  172. }
  173. // 导入费用报销明细
  174. export const expenseImportDetail = (params) => {
  175. return axios({
  176. url: '/expenseAcctDetail/importDetail',
  177. data: params,
  178. method: 'post',
  179. headers:{
  180. 'module': encodeURIComponent('导入费用报销明细')
  181. }
  182. })
  183. }
  184. // 确认导入明细
  185. export const expenseInsertImport = (params) => {
  186. return axios({
  187. url: '/expenseAcctDetail/insertImport',
  188. data: params,
  189. method: 'post',
  190. headers:{
  191. 'module': encodeURIComponent('导入明细')
  192. }
  193. })
  194. }
  195. // 报销明细错误导出
  196. export const expenseFailExcel = (params) => {
  197. return axios({
  198. url: '/expenseAcctDetail/exportImportDetailError',
  199. data: params,
  200. method: 'post',
  201. responseType: 'blob',
  202. headers:{
  203. 'module': encodeURIComponent('导出报销明细错误项')
  204. }
  205. })
  206. }
  207. // 保存费用明细产品
  208. export const expenseAcctDetailSaveProducts = (params) => {
  209. return axios({
  210. url: `/expenseAcctDetail/saveDetailProducts`,
  211. data: params,
  212. method: 'post',
  213. headers:{
  214. 'module': encodeURIComponent('保存费用明细产品')
  215. }
  216. })
  217. }
  218. // 费用报销明细单列表
  219. export const expenseAccountDetailList = (params) => {
  220. const url = `/report/expenseAcctDetailReport/queryDetailReport/${params.pageNo}/${params.pageSize}`
  221. delete params.pageNo
  222. delete params.pageSize
  223. return axios({
  224. url: url,
  225. data: params,
  226. method: 'post',
  227. headers:{
  228. 'module': encodeURIComponent('费用报销明细列表查询')
  229. }
  230. })
  231. }
  232. // 费用报销明细统计
  233. export const expenseAccountDetailCount = (params) => {
  234. const url = `/report/expenseAcctDetailReport/queryDetailReport/count`
  235. return axios({
  236. url: url,
  237. data: params,
  238. method: 'post'
  239. })
  240. }
  241. // 费用报销明细单 导出
  242. export const expenseAcctDetailReport = (params) => {
  243. return axios({
  244. url: '/report/expenseAcctDetailReport/exportDetailReport',
  245. data: params,
  246. method: 'post',
  247. responseType: 'blob',
  248. headers:{
  249. 'module': encodeURIComponent('费用报销明细导出')
  250. }
  251. })
  252. }
  253. // 费用报销单审批进度
  254. export const getProcessInstance = (params) => {
  255. return axios({
  256. url: `/dingTalk/getProcessInstance/${params.businessType}/${params.businessSn}`,
  257. data: params,
  258. method: 'post',
  259. headers:{
  260. 'module': encodeURIComponent('审核进度')
  261. }
  262. })
  263. }
  264. // 审核进度历史查看
  265. export const getProcessInstanceList = (params) => {
  266. return axios({
  267. url: `/dingTalk/getProcessInstanceList/${params.businessType}/${params.businessSn}`,
  268. method: 'get',
  269. headers:{
  270. 'module': encodeURIComponent('审核进度列表')
  271. }
  272. })
  273. }
  274. // 钉钉部门
  275. export const getDingTalkDepartmentList = (params) => {
  276. return axios({
  277. url: `/dingTalk/getDingTalkDepartmentList/${params.deptId}`,
  278. data: params,
  279. method: 'post',
  280. headers:{
  281. 'module': encodeURIComponent('钉钉部门列表')
  282. }
  283. })
  284. }
  285. // 钉钉人员
  286. export const queryDingTalkDeptUser = (params) => {
  287. return axios({
  288. url: `/dingTalk/queryDingTalkDeptUser/${params.deptId}/${params.pageNo}/${params.pageSize}`,
  289. data: params,
  290. method: 'post',
  291. headers:{
  292. 'module': encodeURIComponent('钉钉人员列表')
  293. }
  294. })
  295. }
  296. // 同步钉钉部门人员
  297. export const refashDingTalkAllDeptUser = (params) => {
  298. return axios({
  299. url: `/dingTalk/syncAllDeptUser `,
  300. data: params,
  301. method: 'post',
  302. headers:{
  303. 'module': encodeURIComponent('刷新部门人员数据')
  304. }
  305. })
  306. }
  307. // 获取所以部门人员
  308. export const getDingTalkAllDeptUser = (params) => {
  309. return axios({
  310. url: `/dingTalk/getAllDeptUser`,
  311. data: params,
  312. method: 'post',
  313. headers:{
  314. 'module': encodeURIComponent('部门人员数据')
  315. }
  316. })
  317. }