expenseManagement.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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 updateBatchExpenseAcctDetail = (params) => {
  167. return axios({
  168. url: `/expenseAcctDetail/updateDetailByAccount`,
  169. data: params,
  170. method: 'post',
  171. headers: {
  172. 'module': encodeURIComponent('批量修改记账名称')
  173. }
  174. })
  175. }
  176. // 费用类型
  177. export const expenseTypeList = (params) => {
  178. return axios({
  179. url: `/expenseType/queryTreeList`,
  180. data: params,
  181. method: 'post'
  182. })
  183. }
  184. // 导入费用报销明细
  185. export const expenseImportDetail = (params) => {
  186. return axios({
  187. url: '/expenseAcctDetail/importDetail',
  188. data: params,
  189. method: 'post',
  190. headers: {
  191. 'module': encodeURIComponent('导入费用报销明细')
  192. }
  193. })
  194. }
  195. // 确认导入明细
  196. export const expenseInsertImport = (params) => {
  197. return axios({
  198. url: '/expenseAcctDetail/insertImport',
  199. data: params,
  200. method: 'post',
  201. headers: {
  202. 'module': encodeURIComponent('导入明细')
  203. }
  204. })
  205. }
  206. // 报销明细错误导出
  207. export const expenseFailExcel = (params) => {
  208. return axios({
  209. url: '/expenseAcctDetail/exportImportDetailError',
  210. data: params,
  211. method: 'post',
  212. responseType: 'blob',
  213. headers: {
  214. 'module': encodeURIComponent('导出报销明细错误项')
  215. }
  216. })
  217. }
  218. // 保存费用明细产品
  219. export const expenseAcctDetailSaveProducts = (params) => {
  220. return axios({
  221. url: `/expenseAcctDetail/saveDetailProducts`,
  222. data: params,
  223. method: 'post',
  224. headers: {
  225. 'module': encodeURIComponent('保存费用明细产品')
  226. }
  227. })
  228. }
  229. // 费用报销明细单列表
  230. export const expenseAccountDetailList = (params) => {
  231. const url = `/report/expenseAcctDetailReport/queryDetailReport/${params.pageNo}/${params.pageSize}`
  232. delete params.pageNo
  233. delete params.pageSize
  234. return axios({
  235. url: url,
  236. data: params,
  237. method: 'post',
  238. headers: {
  239. 'module': encodeURIComponent('费用报销明细列表查询')
  240. }
  241. })
  242. }
  243. // 费用报销明细统计
  244. export const expenseAccountDetailCount = (params) => {
  245. const url = `/report/expenseAcctDetailReport/queryDetailReport/count`
  246. return axios({
  247. url: url,
  248. data: params,
  249. method: 'post'
  250. })
  251. }
  252. // 费用报销明细单 导出
  253. export const expenseAcctDetailReport = (params) => {
  254. return axios({
  255. url: '/report/expenseAcctDetailReport/exportDetailReport',
  256. data: params,
  257. method: 'post',
  258. responseType: 'blob',
  259. headers: {
  260. 'module': encodeURIComponent('费用报销明细导出')
  261. }
  262. })
  263. }
  264. export const getProcessInstance = (params) => {
  265. return axios({
  266. url: `/dingTalk/queryList`,
  267. data: params,
  268. method: 'post',
  269. headers: {
  270. 'module': encodeURIComponent('审核进度')
  271. }
  272. })
  273. }
  274. // 审核进度历史查看
  275. export const getProcessInstanceList = (params) => {
  276. return axios({
  277. url: `/dingTalk/getProcessInstanceList/${params.businessType}/${params.businessSn}`,
  278. method: 'get',
  279. headers: {
  280. 'module': encodeURIComponent('审核进度列表')
  281. }
  282. })
  283. }
  284. // 钉钉部门
  285. export const getDingTalkDepartmentList = (params) => {
  286. return axios({
  287. url: `/dingTalk/getDingTalkDepartmentList/${params.deptId}`,
  288. data: params,
  289. method: 'post',
  290. headers: {
  291. 'module': encodeURIComponent('钉钉部门列表')
  292. }
  293. })
  294. }
  295. // 钉钉人员
  296. export const queryDingTalkDeptUser = (params) => {
  297. return axios({
  298. url: `/dingTalk/queryDingTalkDeptUser/${params.deptId}/${params.pageNo}/${params.pageSize}`,
  299. data: params,
  300. method: 'post',
  301. headers: {
  302. 'module': encodeURIComponent('钉钉人员列表')
  303. }
  304. })
  305. }
  306. // 同步钉钉部门人员
  307. export const refashDingTalkAllDeptUser = (params) => {
  308. return axios({
  309. url: `/dingTalk/syncAllDeptUser `,
  310. data: params,
  311. method: 'post',
  312. headers: {
  313. 'module': encodeURIComponent('刷新部门人员数据')
  314. }
  315. })
  316. }
  317. // 获取所以部门人员
  318. export const getDingTalkAllDeptUser = (params) => {
  319. return axios({
  320. url: `/dingTalk/getAllDeptUser`,
  321. data: params,
  322. method: 'post',
  323. headers: {
  324. 'module': encodeURIComponent('部门人员数据')
  325. }
  326. })
  327. }