dealer.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. import request, { postBlob, handleImport, getBlob } from '@/utils/request'
  2. export function getDealerListV2(params) {
  3. return request({
  4. url: `/customer/list/v2?moduleId=${params.moduleId}`,
  5. method: 'post',
  6. data: params
  7. })
  8. }
  9. export function exportDealerListV2(data, name) {
  10. return postBlob({
  11. url: '/customer/user/export/v2',
  12. data,
  13. name
  14. })
  15. }
  16. export function getDealerStockListV2(params) {
  17. return request({
  18. url: `/customer/pt/list/v2?moduleId=${params.moduleId}`,
  19. method: 'post',
  20. data: params
  21. })
  22. }
  23. export function exportDealerStockListV2(data, name) {
  24. return postBlob({
  25. url: '/customer/pt/user/export/v2',
  26. data,
  27. name
  28. })
  29. }
  30. export function importCustomerV2(data) {
  31. return handleImport('customer/import', data.formdata, data.id || '')
  32. }
  33. export function importCustomerPtV2(data) {
  34. return handleImport('customer/pt/importData', data.formdata, data.id || '')
  35. }
  36. export function downloadCustomerPtV2(data, name) {
  37. return getBlob({
  38. url: 'customer/pt/download',
  39. data,
  40. name
  41. })
  42. }
  43. //获取经销商列表
  44. export function getDealerList(params) {
  45. return request({
  46. url: '/customer/list',
  47. method: 'get',
  48. params
  49. })
  50. }
  51. //经销商详情
  52. export function getDealerInfo(params) {
  53. return request({
  54. url: '/customer/detail',
  55. method: 'get',
  56. params
  57. })
  58. }
  59. // 基础上设置前置仓或商家仓
  60. export function updateCustomer(params) {
  61. return request({
  62. url: '/customer/update',
  63. method: 'post',
  64. params
  65. })
  66. }
  67. //经销商客户存货分类列表
  68. export function getDealerStockList(params) {
  69. return request({
  70. url: '/customer/pt/list',
  71. method: 'get',
  72. params
  73. })
  74. }
  75. //新增经销商客户存货分类
  76. export function getDealerStockAdd(data) {
  77. return request({
  78. url: '/customer/pt/add',
  79. method: 'post',
  80. data
  81. })
  82. }
  83. //删除经销商客户存货分类
  84. export function deleDealerStockList(params) {
  85. return request({
  86. url: '/customer/pt/delete',
  87. method: 'post',
  88. params
  89. })
  90. }
  91. //经销商工程机配置列表
  92. export function getDealerDepositList(params) {
  93. return request({
  94. url: '/customer/deposit/list',
  95. method: 'get',
  96. params
  97. })
  98. }
  99. //新增经销商工程机配置
  100. export function getDealerDepositAdd(data) {
  101. return request({
  102. url: '/customer/deposit/add',
  103. method: 'post',
  104. data
  105. })
  106. }
  107. //删除经销商工程机配置
  108. export function deleDealerDeposit(params) {
  109. return request({
  110. url: '/customer/deposit/delete',
  111. method: 'post',
  112. params
  113. })
  114. }
  115. //修改经销商工程机配置
  116. export function editDealerDeposit(data) {
  117. return request({
  118. url: '/customer/deposit/update',
  119. method: 'post',
  120. data
  121. })
  122. }
  123. //经销商工程机配置详情
  124. export function infoDealerDeposit(params) {
  125. return request({
  126. url: '/customer/deposit/detail',
  127. method: 'get',
  128. params
  129. })
  130. }
  131. //经销商申请列表
  132. export function getDealerApplyList(params) {
  133. return request({
  134. url: '/customer/apply/list',
  135. method: 'get',
  136. params
  137. })
  138. }
  139. //字典
  140. export function getDictionaries(params) {
  141. return request({
  142. url: '/common/dict/list',
  143. method: 'get',
  144. params
  145. })
  146. }
  147. //产品类别列表
  148. export function getProductCategoryList(params) {
  149. return request({
  150. url: '/product-category/list',
  151. method: 'get',
  152. params
  153. })
  154. }
  155. //根据父级查询部门
  156. export function getAdminWebsitByparent(params) {
  157. return request({
  158. url: '/admin/websit/byparent',
  159. method: 'get',
  160. params
  161. })
  162. }
  163. //帐号列表
  164. export function getAdminUserList(params) {
  165. return request({
  166. url: '/admin/user/list',
  167. method: 'get',
  168. params
  169. })
  170. }
  171. //经销商客户存货分类-详情
  172. export function getCustomerPtDetail(params) {
  173. return request({
  174. url: '/customer/pt/detail',
  175. method: 'get',
  176. params
  177. })
  178. }
  179. //修改经销商客户存货分类
  180. export function getCustomerPtUpdate(data) {
  181. return request({
  182. url: '/customer/pt/update',
  183. method: 'post',
  184. data
  185. })
  186. }
  187. //经销商钱包列表
  188. export function getWalletCustomerList(params) {
  189. return request({
  190. url: '/wallet/customer/list',
  191. method: 'get',
  192. params
  193. })
  194. }
  195. //经销商工程机配置详情列表
  196. export function getCustomerDepositDetailList(params) {
  197. return request({
  198. url: '/customer/deposit/detailList',
  199. method: 'get',
  200. params
  201. })
  202. }
  203. //获取经销商
  204. export function getListCustomer(params) {
  205. return request({
  206. url: '/pick/listCustomer',
  207. method: 'get',
  208. params
  209. })
  210. }
  211. //获取经销商
  212. export function getK3DepartmentList(params) {
  213. return request({
  214. url: '/k3/department/list',
  215. method: 'get',
  216. params
  217. })
  218. }
  219. // 客户销售单导出
  220. export function importCustomer(data, name) {
  221. return handleImport({
  222. url: '/customer/import',
  223. data,
  224. name
  225. })
  226. }
  227. //基础上设置自提和物流
  228. export function updatePick(params) {
  229. return request({
  230. url: '/customer/updatePick',
  231. method: 'post',
  232. params
  233. })
  234. }