CwFinanceInvoiceService.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import request from '@/common/request';
  2. import { FINANCE_PATH as prefix } from "@/api/AppPath";
  3. export default {
  4. list: function (params) {
  5. return request({
  6. url: prefix + "/cw_finance/invoice/list",
  7. method: "get",
  8. params: params,
  9. });
  10. },
  11. queryById: function (id) {
  12. return request({
  13. url: prefix + "/cw_finance/invoice/queryById",
  14. method: "get",
  15. params: { id: id },
  16. });
  17. },
  18. queryByNumber: function (number, id) {
  19. return request({
  20. url: prefix + "/cw_finance/invoice/queryByNumber",
  21. method: "get",
  22. params: { number: number, id: id },
  23. });
  24. },
  25. save: function (inputForm) {
  26. return request({
  27. url: prefix + `/cw_finance/invoice/save`,
  28. method: "post",
  29. data: inputForm,
  30. });
  31. },
  32. delete: function (ids) {
  33. return request({
  34. url: prefix + "/cw_finance/invoice/delete",
  35. method: "delete",
  36. params: { ids: ids },
  37. });
  38. },
  39. updateStatusById: function (data) {
  40. return request({
  41. url: prefix + "/cw_finance/invoice/updateStatusById",
  42. method: "post",
  43. data: data,
  44. });
  45. },
  46. isReceivables: function (data) {
  47. return request({
  48. url: prefix + "/cw_finance/invoice/isReceivables",
  49. method: "post",
  50. data: data,
  51. });
  52. },
  53. saveForm: function (inputForm) {
  54. return request({
  55. url: prefix + `/cw_finance/invoice/saveForm`,
  56. method: "post",
  57. data: inputForm,
  58. });
  59. },
  60. saveFormInvalid: function (inputForm) {
  61. return request({
  62. url: prefix + `/cw_finance/invoice/saveFormInvalid`,
  63. method: "post",
  64. data: inputForm,
  65. });
  66. },
  67. queryIdByInvalidId: function (id) {
  68. return request({
  69. url: prefix + "/cw_finance/invoice/queryIdByInvalidId",
  70. method: "get",
  71. params: { id: id },
  72. });
  73. },
  74. importDetail: function (data) {
  75. return request({
  76. url: prefix + "/cw_finance/invoice/importDetail",
  77. method: "post",
  78. data: data,
  79. });
  80. },
  81. exportTemplate: function () {
  82. return request({
  83. url: prefix + "/cw_finance/invoice/importDetail/template",
  84. method: "get",
  85. responseType: "blob",
  86. });
  87. },
  88. getByIds: function (projectId, invoiceForm) {
  89. return request({
  90. url: prefix + "/cw_finance/invoice/getByIds",
  91. method: "get",
  92. params: { projectId: projectId, ...invoiceForm },
  93. });
  94. },
  95. getByIds2: function (projectId, invoiceForm) {
  96. return request({
  97. url: prefix + "/cw_finance/invoice/getByIds2",
  98. method: "get",
  99. params: { projectId: projectId, ...invoiceForm },
  100. });
  101. },
  102. getByContractId: function (contractId, invoiceForm) {
  103. return request({
  104. url: prefix + "/cw_finance/invoice/getByContractId",
  105. method: "get",
  106. params: { contractId: contractId, ...invoiceForm },
  107. });
  108. },
  109. getIdByClientId: function (clientId, invoiceForm) {
  110. return request({
  111. url: prefix + "/cw_finance/invoice/getIdByClientId",
  112. method: "get",
  113. params: { clientId: clientId, ...invoiceForm },
  114. });
  115. },
  116. exportFile: function (params) {
  117. return request({
  118. url: prefix + "/cw_finance/invoice/export",
  119. method: "get",
  120. params: params,
  121. responseType: "blob",
  122. });
  123. },
  124. getLabelById:function (param) {
  125. return request({
  126. url: prefix+"/cwProjectRecords/getLabelById",
  127. method:"get",
  128. params: {id: param}
  129. })
  130. },
  131. listByProgramId: function (params) {
  132. return request({
  133. url: prefix + "/cw_finance/invoice/listByProgramId",
  134. method: "get",
  135. params: params,
  136. });
  137. },
  138. };