partner.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. import request from '@/utils/request';
  2. // 获取当前用户的伙伴商信息
  3. export function getCurrentPartnerInfo() {
  4. return request({
  5. url: '/customer/partnerInfo/current',
  6. method: 'get'
  7. });
  8. }
  9. // 修改伙伴商基本信息
  10. export function updatePartnerInfo(data: any) {
  11. return request({
  12. url: '/customer/partnerInfo',
  13. method: 'put',
  14. data
  15. });
  16. }
  17. // 获取伙伴商银行列表
  18. export function getPartnerBankList(partnerId: number) {
  19. return request({
  20. url: '/customer/partnerBank/list',
  21. method: 'get',
  22. params: { partnerId }
  23. });
  24. }
  25. // 获取伙伴商联系人列表
  26. export function getPartnerContactsList(partnerId: number) {
  27. return request({
  28. url: '/customer/partnerContacts/list',
  29. method: 'get',
  30. params: { partnerId }
  31. });
  32. }
  33. // 获取伙伴商合同列表
  34. export function getPartnerContractList(partnerId: number) {
  35. return request({
  36. url: '/customer/partnerContract/list',
  37. method: 'get',
  38. params: { partnerId }
  39. });
  40. }
  41. // 获取伙伴商仓库列表
  42. export function getPartnerWarehouseList(partnerId: number) {
  43. return request({
  44. url: '/customer/partnerWarehouse/list',
  45. method: 'get',
  46. params: { partnerId }
  47. });
  48. }
  49. // 获取伙伴商资质列表
  50. export function getPartnerQualificationList(partnerId: number) {
  51. return request({
  52. url: '/customer/partnerQualification/list',
  53. method: 'get',
  54. params: { partnerId }
  55. });
  56. }
  57. // 新增伙伴商银行账户
  58. export function addPartnerBank(data: any) {
  59. return request({
  60. url: '/customer/partnerBank',
  61. method: 'post',
  62. data
  63. });
  64. }
  65. // 修改伙伴商银行账户
  66. export function updatePartnerBank(data: any) {
  67. return request({
  68. url: '/customer/partnerBank',
  69. method: 'put',
  70. data
  71. });
  72. }
  73. // 删除伙伴商银行账户
  74. export function deletePartnerBank(ids: number[]) {
  75. return request({
  76. url: `/customer/partnerBank/${ids.join(',')}`,
  77. method: 'delete'
  78. });
  79. }
  80. // 新增伙伴商联系人
  81. export function addPartnerContacts(data: any) {
  82. return request({
  83. url: '/customer/partnerContacts',
  84. method: 'post',
  85. data
  86. });
  87. }
  88. // 修改伙伴商联系人
  89. export function updatePartnerContacts(data: any) {
  90. return request({
  91. url: '/customer/partnerContacts',
  92. method: 'put',
  93. data
  94. });
  95. }
  96. // 删除伙伴商联系人
  97. export function deletePartnerContacts(ids: number[]) {
  98. return request({
  99. url: `/customer/partnerContacts/${ids.join(',')}`,
  100. method: 'delete'
  101. });
  102. }
  103. // 新增伙伴商合同
  104. export function addPartnerContract(data: any) {
  105. return request({
  106. url: '/customer/partnerContract',
  107. method: 'post',
  108. data
  109. });
  110. }
  111. // 修改伙伴商合同
  112. export function updatePartnerContract(data: any) {
  113. return request({
  114. url: '/customer/partnerContract',
  115. method: 'put',
  116. data
  117. });
  118. }
  119. // 删除伙伴商合同
  120. export function deletePartnerContract(ids: number[]) {
  121. return request({
  122. url: `/customer/partnerContract/${ids.join(',')}`,
  123. method: 'delete'
  124. });
  125. }
  126. // 新增伙伴商仓库
  127. export function addPartnerWarehouse(data: any) {
  128. return request({
  129. url: '/customer/partnerWarehouse',
  130. method: 'post',
  131. data
  132. });
  133. }
  134. // 修改伙伴商仓库
  135. export function updatePartnerWarehouse(data: any) {
  136. return request({
  137. url: '/customer/partnerWarehouse',
  138. method: 'put',
  139. data
  140. });
  141. }
  142. // 删除伙伴商仓库
  143. export function deletePartnerWarehouse(ids: number[]) {
  144. return request({
  145. url: `/customer/partnerWarehouse/${ids.join(',')}`,
  146. method: 'delete'
  147. });
  148. }
  149. // 新增伙伴商资质
  150. export function addPartnerQualification(data: any) {
  151. return request({
  152. url: '/customer/partnerQualification',
  153. method: 'post',
  154. data
  155. });
  156. }
  157. // 修改伙伴商资质
  158. export function updatePartnerQualification(data: any) {
  159. return request({
  160. url: '/customer/partnerQualification',
  161. method: 'put',
  162. data
  163. });
  164. }
  165. // 删除伙伴商资质
  166. export function deletePartnerQualification(ids: number[]) {
  167. return request({
  168. url: `/customer/partnerQualification/${ids.join(',')}`,
  169. method: 'delete'
  170. });
  171. }