settle.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. import { axios } from '@/utils/request'
  2. // 单位收付款 列表 分页
  3. export const settleUnitClientList = (params) => {
  4. const url = `/settle/unit/queryClientUnSettlePage/${params.pageNo}/${params.pageSize}`
  5. delete params.pageNo
  6. delete params.pageSize
  7. return axios({
  8. url: url,
  9. data: params,
  10. method: 'post',
  11. headers: {
  12. 'module': encodeURIComponent('列表查询')
  13. }
  14. })
  15. }
  16. // 单位收付款记录 列表 结算记录 分页
  17. export const settleUnitList = (params) => {
  18. const url = `/settle/unit/queryPage/${params.pageNo}/${params.pageSize}`
  19. delete params.pageNo
  20. delete params.pageSize
  21. return axios({
  22. url: url,
  23. data: params,
  24. method: 'post',
  25. headers: {
  26. 'module': encodeURIComponent('列表查询')
  27. }
  28. })
  29. }
  30. // 单位收付款记录 导出
  31. export const settleUnitListExport = params => {
  32. return axios.request({
  33. url: `/settle/unit/export`,
  34. data: params,
  35. method: 'post',
  36. responseType: 'blob',
  37. headers: {
  38. 'module': encodeURIComponent('单位收付款记录导出')
  39. }
  40. })
  41. }
  42. // 单位应收应付管理列表 导出
  43. export const exportClientUnSettle = params => {
  44. return axios.request({
  45. url: `/settle/unit/exportClientUnSettle`,
  46. data: params,
  47. method: 'post',
  48. responseType: 'blob',
  49. headers: {
  50. 'module': encodeURIComponent('单位应收应付管理列表导出')
  51. }
  52. })
  53. }
  54. // 单位收付款 提交收付款
  55. export const settleUnitSave = (params) => {
  56. return axios({
  57. url: '/settle/unit/save',
  58. data: params,
  59. method: 'post',
  60. headers: {
  61. 'module': encodeURIComponent('提交')
  62. }
  63. })
  64. }
  65. // 单位收付款记录 详情 列表 结算记录 分页
  66. export const settleUnitDetailList = (params) => {
  67. const url = `/settle/unit/detail/queryPage/${params.pageNo}/${params.pageSize}`
  68. delete params.pageNo
  69. delete params.pageSize
  70. return axios({
  71. url: url,
  72. data: params,
  73. method: 'post',
  74. headers: {
  75. 'module': encodeURIComponent('明细列表')
  76. }
  77. })
  78. }
  79. // 单位收付款记录 详情
  80. export const settleUnitDetail = (params) => {
  81. return axios({
  82. url: `/settle/unit/findById/${params.id}`,
  83. method: 'get',
  84. headers: {
  85. 'module': encodeURIComponent('详情信息')
  86. }
  87. })
  88. }
  89. // 单位收付款记录 合计
  90. export const settleUnitQuerySum = (params) => {
  91. return axios({
  92. url: '/settle/unit/querySum',
  93. data: params,
  94. method: 'post'
  95. })
  96. }
  97. //详情 打印
  98. export const settleUnitPrint = params => {
  99. const data = {
  100. url: `/settle/unit/print/${params.type}/${params.remarksFlag}`,
  101. data: params,
  102. method: 'post',
  103. headers: {
  104. 'module': encodeURIComponent(params.type == 'INK' ? '喷墨打印' : '针式打印')
  105. }
  106. }
  107. // 喷墨打印
  108. if (params.type == 'INK') {
  109. data.responseType = 'blob'
  110. }
  111. return axios.request(data)
  112. }
  113. // 详情 导出
  114. export const settleUnitExport = params => {
  115. return axios.request({
  116. url: `/settle/unit/excel`,
  117. data: params,
  118. method: 'post',
  119. responseType: 'blob',
  120. headers: {
  121. 'module': encodeURIComponent('导出Excel')
  122. }
  123. })
  124. }
  125. // 单位首付款记录详情打印
  126. export const settleUnitDetailPrint = params => {
  127. const data = {
  128. url: `/settle/unit/record/print/${params.id}/${params.type}/${params.printDate}/${params.printNo}`,
  129. data: params,
  130. method: 'post',
  131. headers: {
  132. 'module': encodeURIComponent(params.type == 'INK' ? '喷墨打印' : '针式打印')
  133. }
  134. }
  135. // 喷墨打印
  136. if (params.type == 'INK') {
  137. data.responseType = 'blob'
  138. }
  139. return axios.request(data)
  140. }
  141. // 单位首付款记录详情导出
  142. export const settleUnitDetailExport = params => {
  143. return axios.request({
  144. url: `/settle/unit/record/excel/${params.id}`,
  145. data: params,
  146. method: 'post',
  147. responseType: 'blob',
  148. headers: {
  149. 'module': encodeURIComponent('单位首付款记录详情导出')
  150. }
  151. })
  152. }
  153. // 单位收付款 全部单据
  154. export const settleInfoAllList = (params) => {
  155. return axios({
  156. url: '/settle/info/queryList',
  157. data: params,
  158. method: 'post',
  159. headers: {
  160. 'module': encodeURIComponent('单据列表查询')
  161. }
  162. })
  163. }
  164. // 单位收付款 列表 分页
  165. export const settleInfoList = (params) => {
  166. const url = `/settle/info/queryPage/${params.pageNo}/${params.pageSize}`
  167. delete params.pageNo
  168. delete params.pageSize
  169. return axios({
  170. url: url,
  171. data: params,
  172. method: 'post',
  173. headers: {
  174. 'module': encodeURIComponent('明细列表查询')
  175. }
  176. })
  177. }
  178. // 单位收付款 详情 合计
  179. export const settleInfoQueryReceiptOrPaySum = (params) => {
  180. return axios({
  181. url: '/settle/info/queryReceiptOrPaySum',
  182. data: params,
  183. method: 'post'
  184. })
  185. }
  186. // 单位收付款 列表 合计
  187. export const settleInfoQuerySum = (params) => {
  188. return axios({
  189. url: '/settle/unit/queryClientUnSettleSum',
  190. data: params,
  191. method: 'post'
  192. })
  193. }