dealer.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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 exportJiaXianV2(data, name) {
  17. return postBlob({
  18. url: '/customer/user/export/jiaXianV2',
  19. data,
  20. name
  21. })
  22. }
  23. export function getDealerStockListV2(params) {
  24. return request({
  25. url: `/customer/pt/list/v2?moduleId=${params.moduleId}`,
  26. method: 'post',
  27. data: params
  28. })
  29. }
  30. export function exportDealerStockListV2(data, name) {
  31. return postBlob({
  32. url: '/customer/pt/user/export/v2',
  33. data,
  34. name
  35. })
  36. }
  37. export function getStagecustomerListV2(params) {
  38. return request({
  39. url: `/StageCustomer/list/v2?moduleId=${params.moduleId}`,
  40. method: 'post',
  41. data: params
  42. })
  43. }
  44. export function exportStagecustomerV2(data, name) {
  45. return postBlob({
  46. url: '/StageCustomer/user/export/v2',
  47. data,
  48. name
  49. })
  50. }
  51. export function addStagecustomer(data) {
  52. return request({
  53. url: '/StageCustomer/add',
  54. method: 'post',
  55. data
  56. })
  57. }
  58. export function examineStagecustomer(params) {
  59. return request({
  60. url: '/StageCustomer/examine',
  61. method: 'post',
  62. params
  63. })
  64. }
  65. export function updateStagecustomer(data) {
  66. return request({
  67. url: '/StageCustomer/update',
  68. method: 'post',
  69. data
  70. })
  71. }
  72. export function getStageCustomerDetail(params) {
  73. return request({
  74. url: '/StageCustomer/detail',
  75. method: 'get',
  76. params
  77. })
  78. }
  79. export function importCustomerV2(data) {
  80. return handleImport('customer/import', data.formdata, data.id || '')
  81. }
  82. export function importCustomerPtV2(data) {
  83. return handleImport('customer/pt/importData', data.formdata, data.id || '')
  84. }
  85. export function downloadCustomerPtV2(data, name) {
  86. return getBlob({
  87. url: 'customer/pt/download',
  88. data,
  89. name
  90. })
  91. }
  92. //获取经销商列表
  93. export function getDealerList(params) {
  94. return request({
  95. url: '/customer/list',
  96. method: 'get',
  97. params
  98. })
  99. }
  100. //经销商详情
  101. export function getDealerInfo(params) {
  102. return request({
  103. url: '/customer/detail',
  104. method: 'get',
  105. params
  106. })
  107. }
  108. // 基础上设置前置仓或商家仓
  109. export function updateCustomer(params) {
  110. return request({
  111. url: '/customer/update',
  112. method: 'post',
  113. params
  114. })
  115. }
  116. //经销商客户存货分类列表
  117. export function getDealerStockList(params) {
  118. return request({
  119. url: '/customer/pt/list',
  120. method: 'get',
  121. params
  122. })
  123. }
  124. //新增经销商客户存货分类
  125. export function getDealerStockAdd(data) {
  126. return request({
  127. url: '/customer/pt/add',
  128. method: 'post',
  129. data
  130. })
  131. }
  132. //删除经销商客户存货分类
  133. export function deleDealerStockList(params) {
  134. return request({
  135. url: '/customer/pt/delete',
  136. method: 'post',
  137. params
  138. })
  139. }
  140. //经销商工程机配置列表
  141. export function getDealerDepositList(params) {
  142. return request({
  143. url: '/customer/deposit/list',
  144. method: 'get',
  145. params
  146. })
  147. }
  148. //新增经销商工程机配置
  149. export function getDealerDepositAdd(data) {
  150. return request({
  151. url: '/customer/deposit/add',
  152. method: 'post',
  153. data
  154. })
  155. }
  156. //删除经销商工程机配置
  157. export function deleDealerDeposit(params) {
  158. return request({
  159. url: '/customer/deposit/delete',
  160. method: 'post',
  161. params
  162. })
  163. }
  164. //修改经销商工程机配置
  165. export function editDealerDeposit(data) {
  166. return request({
  167. url: '/customer/deposit/update',
  168. method: 'post',
  169. data
  170. })
  171. }
  172. //经销商工程机配置详情
  173. export function infoDealerDeposit(params) {
  174. return request({
  175. url: '/customer/deposit/detail',
  176. method: 'get',
  177. params
  178. })
  179. }
  180. //经销商申请列表
  181. export function getDealerApplyList(params) {
  182. return request({
  183. url: '/customer/apply/list',
  184. method: 'get',
  185. params
  186. })
  187. }
  188. //字典
  189. export function getDictionaries(params) {
  190. return request({
  191. url: '/common/dict/list',
  192. method: 'get',
  193. params
  194. })
  195. }
  196. //产品类别列表
  197. export function getProductCategoryList(params) {
  198. return request({
  199. url: '/product-category/list',
  200. method: 'get',
  201. params
  202. })
  203. }
  204. //根据父级查询部门
  205. export function getAdminWebsitByparent(params) {
  206. return request({
  207. url: '/admin/websit/byparent',
  208. method: 'get',
  209. params
  210. })
  211. }
  212. //帐号列表
  213. export function getAdminUserList(params) {
  214. return request({
  215. url: '/admin/user/list',
  216. method: 'get',
  217. params
  218. })
  219. }
  220. //经销商客户存货分类-详情
  221. export function getCustomerPtDetail(params) {
  222. return request({
  223. url: '/customer/pt/detail',
  224. method: 'get',
  225. params
  226. })
  227. }
  228. //修改经销商客户存货分类
  229. export function getCustomerPtUpdate(data) {
  230. return request({
  231. url: '/customer/pt/update',
  232. method: 'post',
  233. data
  234. })
  235. }
  236. //经销商钱包列表
  237. export function getWalletCustomerList(params) {
  238. return request({
  239. url: '/wallet/customer/list',
  240. method: 'get',
  241. params
  242. })
  243. }
  244. //经销商工程机配置详情列表
  245. export function getCustomerDepositDetailList(params) {
  246. return request({
  247. url: '/customer/deposit/detailList',
  248. method: 'get',
  249. params
  250. })
  251. }
  252. //获取经销商
  253. export function getListCustomer(params) {
  254. return request({
  255. url: '/pick/listCustomer',
  256. method: 'get',
  257. params
  258. })
  259. }
  260. //获取经销商
  261. export function getK3DepartmentList(params) {
  262. return request({
  263. url: '/k3/department/list',
  264. method: 'get',
  265. params
  266. })
  267. }
  268. // 客户销售单导出
  269. export function importCustomer(data, name) {
  270. return handleImport({
  271. url: '/customer/import',
  272. data,
  273. name
  274. })
  275. }
  276. //基础上设置自提和物流
  277. export function updatePick(params) {
  278. return request({
  279. url: '/customer/updatePick',
  280. method: 'post',
  281. params
  282. })
  283. }
  284. // 经销商绑定售后系统
  285. export function updateSystem(params) {
  286. return request({
  287. url: '/customer/updateSystem',
  288. method: 'post',
  289. params
  290. })
  291. }