sellse.service.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. /**
  2. * explain: 这是协销用户业务的服务
  3. * Author: zhjy
  4. * Time: 2020-09-24
  5. */
  6. export default class SellerService {
  7. constructor(AjaxService) {
  8. Object.assign(this, {
  9. AjaxService
  10. })
  11. this.name = 'SellerService'
  12. }
  13. /**
  14. *@下单商品列表
  15. *@param organizeId 组织id
  16. *@param pageNum 页码
  17. *@param pageSize 每页显示多少
  18. *@param productName 商品名称
  19. */
  20. GoodList(data = {}) {
  21. return this.AjaxService.get({
  22. url: '/product/list',
  23. data,
  24. isLoading: true
  25. })
  26. }
  27. /**
  28. *@协销登录
  29. *@param mobile 手机号
  30. *@param password 密码
  31. */
  32. SellerLogin(data = {}) {
  33. return this.AjaxService.post({
  34. url: '/seller/login',
  35. data,
  36. isLoading: true
  37. })
  38. }
  39. /**
  40. *@协销账户中心
  41. *@param userID 协销ID
  42. */
  43. GetSellerHome(data = {}) {
  44. return this.AjaxService.get({
  45. url: '/seller/home',
  46. data,
  47. isLoading: true
  48. })
  49. }
  50. /**
  51. *@协销拉机构上线
  52. *@param userID 协销ID
  53. */
  54. SellerClubRegister(data = {}) {
  55. return this.AjaxService.post({
  56. url: '/seller/club/register',
  57. data,
  58. isLoading: true
  59. })
  60. }
  61. /**
  62. *@协销拉机构上线检测手机号和邮箱
  63. *@param mobileOrEmail 手机号和邮箱
  64. */
  65. SellerClubCheck(data = {}) {
  66. return this.AjaxService.post({
  67. url: '/seller/club/check',
  68. data,
  69. isLoading: true
  70. })
  71. }
  72. /**
  73. *@协销机构列表
  74. *@param name 机构名字关键字(搜索用)
  75. *@param pageNum 页码
  76. *@param pageSize 条数
  77. *@param spId 协销ID
  78. *@param status 机构状态
  79. */
  80. GetSellerClubList(data = {}) {
  81. return this.AjaxService.get({
  82. url: '/product/clubList',
  83. data,
  84. isLoading: true
  85. })
  86. }
  87. /**
  88. *@协销机构列表
  89. *@param name 机构名字关键字(搜索用)
  90. *@param pageNum 页码
  91. *@param pageSize 条数
  92. */
  93. GetFindAllClubList(data = {}) {
  94. return this.AjaxService.get({
  95. url: '/seller/findAllClub',
  96. data,
  97. isLoading: true
  98. })
  99. }
  100. /**
  101. *@协销订单列表(搜索订单)
  102. *@param listType 订单类型
  103. *@param orderNo 订单号
  104. *@param pageNum 页码
  105. *@param pageSize 条数
  106. *@param serviceProviderId 协销ID
  107. */
  108. GetSellerOrderList(data = {}) {
  109. return this.AjaxService.get({
  110. url: '/seller/order/list',
  111. data,
  112. isLoading: true
  113. })
  114. }
  115. /**
  116. *@协销下机构订单列表
  117. *@param clubID 机构ID
  118. *@param pageNum 页码
  119. *@param pageSize 条数
  120. */
  121. GetSellerClubOrderList(data = {}) {
  122. return this.AjaxService.get({
  123. url: '/seller/clubOrder',
  124. data,
  125. isLoading: true
  126. })
  127. }
  128. /**
  129. *@协销帮机构下单组合商品搜索
  130. *@param clubUserId 机构的userID
  131. *@param pageNum 页码
  132. *@param pageSize 条数
  133. *@param searchWord 搜索关键词
  134. */
  135. GetCombinationProduct(data = {}) {
  136. return this.AjaxService.get({
  137. url: '/seller/combinationProduct/search',
  138. data,
  139. isLoading: true
  140. })
  141. }
  142. /**
  143. *@协销-二手下单商品列表
  144. *@param 二手商品分类 secondHandType 1二手仪器,2临期产品,3其他 【必传】
  145. *@param 二手仪器分类的类型 instrumentType 1轻光电、2重光电、3耗材配件【不传默认全部】
  146. *@param 搜索关键词 searchKeyword 【选传】
  147. */
  148. GetOrderSecondHandProductList(data = {}) {
  149. return this.AjaxService.get({
  150. url: '/product/getOrderSecondHandProductList',
  151. data,
  152. isLoading: true
  153. })
  154. }
  155. /**
  156. *@协销-二手去结算接口
  157. *@param productId:商品ID(数字类型,必传)
  158. *@param clubId:机构会所ID(同之前)
  159. *@param serviceProviderId:协销ID(同之前)
  160. *@param productCount:二手购买数量
  161. */
  162. GetSettlementBySencondProduct(data = {}) {
  163. return this.AjaxService.post({
  164. url: '/seller/settlementBySencondProduct',
  165. data,
  166. isLoading: true
  167. })
  168. }
  169. /**
  170. *@协销-二手商品推荐
  171. *@param productId:商品ID(数字类型,必传)
  172. */
  173. ProductRecommend(data = {}) { //相关推荐
  174. return this.AjaxService.get({
  175. url: '/product/getSecondHandProductRecommend',
  176. data,
  177. isLoading: true
  178. })
  179. }
  180. /**
  181. *@协销-关键词搜索订单
  182. *@param userId:商品ID(数字类型,必传)
  183. *@param pageNum:机构会所ID(同之前)
  184. *@param pageSize:协销ID(同之前)
  185. */
  186. getSellerOrderList(data = {}) {
  187. return this.AjaxService.get({
  188. url: '/seller/searchOrder',
  189. data,
  190. isLoading: true
  191. })
  192. }
  193. /*协销下单购物车->api*/
  194. /**
  195. *@单一商品加入购物车
  196. *@param clubId 会所的ID
  197. *@param serviceProviderId 协销ID
  198. */
  199. ShoppingCartAddCart(data = {}) {
  200. return this.AjaxService.post({
  201. url: '/seller/addCart',
  202. data,
  203. isLoading: true
  204. })
  205. }
  206. /**
  207. *@组合商品加入购物车
  208. *@param clubId 会所的ID
  209. *@param serviceProviderId 协销ID
  210. */
  211. ShoppingCartBatchAddCart(data = {}) {
  212. return this.AjaxService.post({
  213. url: '/seller/batchAddCart',
  214. data,
  215. isLoading: true
  216. })
  217. }
  218. /**
  219. *@协销帮机构下单获取购物车数量
  220. *@param clubId 会所的ID
  221. *@param serviceProviderId 协销ID
  222. */
  223. GetSellerProductNum(data = {}) {
  224. return this.AjaxService.get({
  225. url: '/seller/productNum',
  226. data,
  227. isLoading: false
  228. })
  229. }
  230. /**
  231. *@协销帮机构下单购物车商品加减数量
  232. *@param clubId 机构的clubId
  233. *@param serviceProviderId 协销ID
  234. */
  235. SellerAddProductNum(data = {}) {
  236. return this.AjaxService.post({
  237. url: '/seller/addProductNum',
  238. data,
  239. isLoading: true
  240. })
  241. }
  242. /**
  243. *@协销帮机构下单购物车删除商品
  244. *@param sellerCartIds 购物车ID
  245. */
  246. DeleteSellerCart(data = {}) {
  247. return this.AjaxService.post({
  248. url: '/seller/deleteSellerCart',
  249. data,
  250. isLoading: true
  251. })
  252. }
  253. /**
  254. *@协销帮机构下单获取购物车列表
  255. *@param clubId 会所的ID
  256. *@param serviceProviderId 协销ID
  257. */
  258. GetSellerShoppingInfo(data = {}) {
  259. return this.AjaxService.get({
  260. url: '/seller/shoppingInfo',
  261. data,
  262. isLoading: false
  263. })
  264. }
  265. /*协销下单订单->api*/
  266. /**
  267. *@协销帮机构下单去结算初始化
  268. *@param clubId 机构ID
  269. *@param serviceProviderId 协销ID
  270. *@param productIds 商品ID
  271. */
  272. SellerSettlement(data = {}) {
  273. return this.AjaxService.post({
  274. url: '/seller/settlement',
  275. data,
  276. isLoading: true
  277. })
  278. }
  279. /**
  280. *@协销帮机构下单提交订单
  281. *@param orderSource 2,//提交来源
  282. *@param clubUserId//机构UserID
  283. *@param cartType //从购物车提交
  284. *@param serviceProviderId//帮下单协销ID
  285. *@param addressId//地址ID
  286. *@param orderInfo//商品信息
  287. *@param payInfo//订单信息
  288. *@param orderInvoice//发票信息
  289. */
  290. SellerCreateOrderSubmit(data = {}) {
  291. return this.AjaxService.post({
  292. url: '/seller/order/submit',
  293. data,
  294. isLoading: true
  295. })
  296. }
  297. // 协销订单列表/再来一单
  298. SellerCreateOrderAgain(data = {}) {
  299. return this.AjaxService.post({
  300. url: '/seller/order/again',
  301. data,
  302. isLoading: true
  303. })
  304. }
  305. // 协销购物车清空失效列表
  306. SellerCartdelete(data = {}) {
  307. return this.AjaxService.post({
  308. url: '/seller/deleteSellerCart',
  309. data,
  310. isLoading: true
  311. })
  312. }
  313. /**
  314. *@协销邀请运营人员
  315. *@param userID 机构userID
  316. */
  317. SellerBindingOperation(data = {}) {
  318. return this.AjaxService.post({
  319. url: '/seller/bindingOperation',
  320. data,
  321. isLoading: true
  322. })
  323. }
  324. }