car.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. import request from './request';
  2. // request() 第二个参数若为true则表示不传token
  3. // 生成手机号码
  4. export const getMobileVirtual = (params) => {
  5. return request({
  6. url: `customerVehicle/getMobileVirtual`,
  7. method: 'get',
  8. data: {}
  9. })
  10. }
  11. // 车辆和客户列表
  12. export const getCustomerCarList = params => {
  13. return request({
  14. url: `customerVehicle/findPage/${params.pageNo}/${params.pageSize}`,
  15. method: 'post',
  16. data: {
  17. condition: params.condition
  18. }
  19. })
  20. }
  21. // 车辆和客户列表明细查询
  22. export const getCustomerCarListDetail = params => {
  23. return request({
  24. url: `customerVehicle/findDetail`,
  25. method: 'post',
  26. data: params
  27. })
  28. }
  29. // 门店车辆--根据车牌查询车辆信息
  30. export const getCarData = params => {
  31. return request({
  32. url: `vehicle/findByNumber?number=${params}`,
  33. method: 'get',
  34. data: ''
  35. })
  36. }
  37. // 门店客户--根据电话查询客户信息
  38. export const getPhone = params => {
  39. return request({
  40. url: `customer/findByMobile?mobile=${params}`,
  41. method: 'get',
  42. data: ''
  43. })
  44. }
  45. // 门店客户车辆--保存客户车辆
  46. export const saveCustomerCar = (params) => {
  47. return request({
  48. url: `customerVehicle/save`,
  49. method: 'post',
  50. data: params
  51. })
  52. }
  53. // 精确查询客户车辆列表
  54. export const searchCustomerList = (params) => {
  55. return request({
  56. url: `customerVehicle/findList`,
  57. method: 'post',
  58. data: params
  59. })
  60. }
  61. //车辆列表
  62. export const getCarList = params => {
  63. return request({
  64. url: `vehicle/query/${params.pageNo}/${params.pageSize}`,
  65. method: 'post',
  66. data: {
  67. "source":params.source?params.source:"",
  68. "queryWord":params.queryWord,
  69. "level":params.level,
  70. },
  71. })
  72. }
  73. //删除车辆
  74. export const deletesCar = params => {
  75. return request({
  76. url: `vehicle/del/${params.id}`,
  77. method: 'get',
  78. })
  79. }
  80. //查询省
  81. export const getProvince = () => {
  82. return request({
  83. url: `area/PROVINCE`,
  84. method: 'get'
  85. }, true)
  86. }
  87. //查询市
  88. export const getCityByPro = params => {
  89. return request({
  90. url: `area/CITY/${params.id}`,
  91. method: 'get'
  92. }, true)
  93. }
  94. //查询区
  95. export const getDistrictByCity = params => {
  96. return request({
  97. url: `area/DISTRICT/${params.id}`,
  98. method: 'get'
  99. }, true)
  100. }
  101. //品牌
  102. export const findBrand = params => {
  103. return request({
  104. url: `vehicleModel/findBrand`,
  105. method: 'post',
  106. data: params,
  107. })
  108. }
  109. //车系
  110. export const findSeries = brandId => {
  111. return request({
  112. url: `vehicleModel/findSeries/${brandId}`,
  113. method: 'post',
  114. data: {},
  115. })
  116. }
  117. //排量
  118. export const findDisplacement = (brandId,seriesId) => {
  119. return request({
  120. url: `vehicleModel/findDisplacement/${brandId}/${seriesId}`,
  121. method: 'post',
  122. data: {},
  123. })
  124. }
  125. //生产年份
  126. export const findYear = (brandId,seriesId,displacement) => {
  127. return request({
  128. url: `vehicleModel/findYear/${brandId}/${seriesId}/${displacement}`,
  129. method: 'post',
  130. data: {},
  131. })
  132. }
  133. //车型
  134. export const findModel = (brandId,seriesId,displacement,year) => {
  135. return request({
  136. url: `vehicleModel/findModel/${brandId}/${seriesId}/${displacement}/${year}`,
  137. method: 'post',
  138. data: {},
  139. })
  140. }
  141. //带出车辆分类和厂商指导价
  142. export const findVehicleModel = (id) => {
  143. return request({
  144. url: `vehicleModel/findDetail/${id}`,
  145. method: 'post',
  146. data: {},
  147. })
  148. }
  149. //新增车辆
  150. export const addCar = (params,carId) => {
  151. if(carId != undefined && carId != '') {
  152. params.id = carId
  153. }
  154. return request({
  155. url: `vehicle/save`,
  156. method: 'post',
  157. data: params,
  158. })
  159. }
  160. //查询车辆详情
  161. export const getCarDetails = (id) => {
  162. return request({
  163. url: `vehicle/${id}`,
  164. method: 'get',
  165. })
  166. }
  167. //识别车牌
  168. export const licensePlate = (params) => {
  169. return request({
  170. url: `vehicleIdentify/licensePlate`,
  171. method: 'post',
  172. data: params,
  173. })
  174. }
  175. //识别VIN码
  176. export const vinCode = (params) => {
  177. return request({
  178. url: `vehicleIdentify/vinCode`,
  179. method: 'post',
  180. data: params,
  181. })
  182. }
  183. //拍照识别的车牌号保存
  184. export const saveIdentityVehicle = (params) => {
  185. return request({
  186. url: `index/saveIdentityVehicle`,
  187. method: 'post',
  188. data: params
  189. })
  190. }
  191. // by vin 查询车辆信息
  192. export const getVehicleInfoByVin = (params) => {
  193. return request({
  194. url: `vehicleIdentify/getVehicleInfoByVin?vinCode=${params.vin}`,
  195. method: 'get',
  196. })
  197. }
  198. // by mobile 查询客户车辆信息是否存在
  199. export const findCustomerCarIsOnly = (params) => {
  200. return request({
  201. url: `customerVehicle/findByMobile?mobile=${params}`,
  202. method: 'get',
  203. })
  204. }
  205. // 扫描记录
  206. export const scanVinLog = (params) => {
  207. return request({
  208. url: `scanVinLog/create`,
  209. data: params,
  210. method: 'post'
  211. })
  212. }
  213. export const scanVinLogCopy = (params) => {
  214. return request({
  215. url: `scanVinLog/logCopy/${params.id}`,
  216. method: 'get'
  217. })
  218. }
  219. // 滚动扫描记录
  220. export const scanVinLogQueryRoll = (params) => {
  221. return request({
  222. url: `scanVinLog/queryRoll/${params.pageNo}/${params.pageSize}`,
  223. data: params,
  224. method: 'post'
  225. }, true)
  226. }
  227. // vin查询记录分页
  228. export const getScanVinLogList = (params) => {
  229. return request({
  230. url: `scanVinLog/queryPage/${params.pageNo}/${params.pageSize}`,
  231. data: params,
  232. method: 'post'
  233. })
  234. }
  235. // 游客vin扫描次数
  236. export const getScanVinQty = (params) => {
  237. return request({
  238. url: `scanVinLog/getScanVinQty`,
  239. method: 'get'
  240. })
  241. }
  242. // 扫描最大限制数
  243. export const getScanGetMaxQty = (params) => {
  244. return request({
  245. url: `scanVinLog/getMaxQty`,
  246. method: 'get'
  247. })
  248. }