differential.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <template>
  2. <view class="content">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'分动箱差速器'"></homenav>
  4. <view class="box">
  5. <view class="historyLine">
  6. <view class="historyLogoBox">
  7. <image :src="optdata.logo" mode="" class="historylinecarImg"></image>
  8. </view>
  9. <view>
  10. <view class="historylinecar">{{optdata.value}}</view>
  11. <view class="historyLineVin" v-if="optdata.isVin==1">
  12. <view class="vinms">VIN</view>
  13. <view class="vinNum">{{optdata.vin}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="cont">
  19. <view class="topBox">
  20. <view class="topLine" @click="goby">
  21. <image src="../../static/img/icon_baoyang.png" mode="" class="toplineImg"></image>
  22. <view class="topName">保养周期</view>
  23. </view>
  24. <view class="topsx"></view>
  25. <view class="topLine" @click="gopz">
  26. <image src="../../static/img/icon_cheliang.png" mode="" class="toplineImg"></image>
  27. <view class="topName">车辆配置</view>
  28. </view>
  29. </view>
  30. <view class="jiyouBox" v-if="loading">
  31. <view class="modelRemarkBox">
  32. <view class="modelRemarkLine" v-for="(item,index) in brandArr"
  33. @click="modelRemarkTab(item.id)" :class="{activeMr:modelRemarkNum==item.id}">{{item.name}}</view>
  34. </view>
  35. <view class="jiyouTop">
  36. <view class="jiyoutopTitle">分动箱油</view>
  37. <!-- <view class="jyzl">机油加注量:<span style="color: #FF4F00;">{{oilusage}}</span> </view> -->
  38. </view>
  39. <view class="jylineBox">
  40. <view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
  41. <view class="jyimgBox">
  42. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  43. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  44. </view>
  45. <view class="jylineRight">
  46. <view class="jyName">
  47. {{item.specificationModel}}
  48. </view>
  49. <view class="ruleList">
  50. <view class="ruleListSpan">{{item.modelRemark}}</view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <nodata v-if="MaintainPartList.length==0"></nodata>
  56. <view class="jiyouTop" style="padding: 20rpx 0;">
  57. <view class="jiyoutopTitle">前差速器油</view>
  58. </view>
  59. <view class="jylineBox">
  60. <view class="jyline" v-for="(item,index) in MaintainPartList2" @click="godetail(item)">
  61. <view class="jyimgBox">
  62. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  63. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  64. </view>
  65. <view class="jylineRight">
  66. <view class="jyName">
  67. {{item.specificationModel}}
  68. </view>
  69. <view class="ruleList">
  70. <view class="ruleListSpan">{{item.modelRemark}}</view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <nodata v-if="MaintainPartList2.length==0"></nodata>
  76. <view class="jiyouTop" style="padding: 20rpx 0;">
  77. <view class="jiyoutopTitle">后差速器油</view>
  78. </view>
  79. <view class="jylineBox">
  80. <view class="jyline" v-for="(item,index) in MaintainPartList3" @click="godetail(item)">
  81. <view class="jyimgBox">
  82. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  83. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  84. </view>
  85. <view class="jylineRight">
  86. <view class="jyName">
  87. {{item.specificationModel}}
  88. </view>
  89. <view class="ruleList">
  90. <view class="ruleListSpan">{{item.modelRemark}}</view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <nodata v-if="MaintainPartList3.length==0"></nodata>
  96. </view>
  97. <!-- <view class="jiyouBox" v-if="loading">
  98. <view class="jiyouTop">
  99. <view class="jiyoutopTitle">原厂售后推荐</view>
  100. </view>
  101. <view class="salesLine">
  102. <view class="salesLeft">建议加注量</view>
  103. <view class="salesRight">{{oilusage}}</view>
  104. </view>
  105. <view class="salesLine">
  106. <view class="salesLeft">规格型号</view>
  107. <view class="salesRight">{{spec}}</view>
  108. </view>
  109. </view>
  110. -->
  111. </view>
  112. </view>
  113. </template>
  114. <script>
  115. import nodata from '../../components/nodata/nodata.vue'
  116. import homenav from "../../components/homenav/nav.vue"
  117. export default {
  118. components: {
  119. nodata,homenav
  120. },
  121. data() {
  122. return {
  123. optdata:'',
  124. MaintainPartList:[],
  125. oilusage:'',
  126. iStatusBarHeight:'',
  127. loading:false,
  128. spec:'',
  129. modelRemarkNum:"3e7395a1-c10a-4df4-8639-34de044fd9cc",
  130. oldMaintainPartList:'',
  131. oldMaintainPartList2:'',
  132. oldMaintainPartList3:'',
  133. brandArr:[
  134. // {name:'漠驼',id:'283915b2-ae34-4238-90aa-7be4be9815c8'},
  135. {name:'领航',id:'3e7395a1-c10a-4df4-8639-34de044fd9cc'},
  136. /* {name:'领航100',id:'0ef3e44c-59c7-4911-bc68-8723a1d05c31'},
  137. {name:'领航氢洁',id:'e653bf0a-9885-4c25-a96d-986e4e285819'}, */
  138. ]
  139. }
  140. },
  141. onLoad(opt) {
  142. console.log(opt)
  143. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  144. this.optdata=opt;
  145. this.queryMaintainPartList()
  146. this.queryOilInfoByGroupID()
  147. },
  148. methods: {
  149. modelRemarkTab(id){
  150. this.modelRemarkNum=id
  151. this.queryMaintainPartList()
  152. /*
  153. var arr=[]
  154. this.oldMaintainPartList.forEach(item=>{
  155. var state=false
  156. if(item.brandId == id){
  157. state=true
  158. }
  159. if(state){
  160. arr.push(item)
  161. }
  162. })
  163. this.MaintainPartList=arr */
  164. //this.MaintainPartList= this.oldMaintainPartList.filter(item => item.modelRemark.includes(name))
  165. },
  166. queryMaintainPartList(){
  167. this.loading=false;
  168. uni.showLoading({ title: '加载中'});
  169. this.$http('partsByOpen/queryMaintainPartList', {
  170. groupId:this.optdata.id,
  171. //componentCode:'015008,015010,015011',
  172. componentCode:'015008',
  173. brandId:this.modelRemarkNum
  174. },'POST').then(res => {
  175. this.loading=true;
  176. uni.hideLoading();
  177. this.MaintainPartList=res.data
  178. //this.oldMaintainPartList=res.data
  179. //this.modelRemarkTab("283915b2-ae34-4238-90aa-7be4be9815c8")
  180. })
  181. this.$http('partsByOpen/queryMaintainPartList', {
  182. groupId:this.optdata.id,
  183. //componentCode:'015008,015010,015011',
  184. componentCode:'015010',
  185. brandId:this.modelRemarkNum
  186. },'POST').then(res => {
  187. uni.hideLoading();
  188. this.MaintainPartList2=res.data
  189. })
  190. this.$http('partsByOpen/queryMaintainPartList', {
  191. groupId:this.optdata.id,
  192. //componentCode:'015008,015010,015011',
  193. componentCode:'015011',
  194. brandId:this.modelRemarkNum
  195. },'POST').then(res => {
  196. uni.hideLoading();
  197. this.MaintainPartList3=res.data
  198. })
  199. },
  200. queryOilInfoByGroupID(){
  201. var that=this;
  202. this.$http('matchingByOpen/queryOilInfoByGroupID', {
  203. // mileage:'30000',
  204. groupId:this.optdata.id,
  205. },'POST').then(res => {
  206. var arr = res.data
  207. arr.forEach(item=>{
  208. if(item[0]=='机油'){
  209. that.oilusage=item[2]
  210. that.spec=item[1]
  211. }
  212. })
  213. console.log(that.oilusage)
  214. })
  215. },
  216. goby(){
  217. uni.navigateTo({
  218. url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID+'&id='+this.optdata.id
  219. })
  220. },
  221. godetail(e){
  222. uni.navigateTo({
  223. url:'/pages/index/goodsDetail?id='+e.id
  224. })
  225. },
  226. gopz(){
  227. uni.navigateTo({
  228. url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
  229. })
  230. }
  231. }
  232. }
  233. </script>
  234. <style scoped>
  235. .salesLine{
  236. display: flex;
  237. font-size: 26rpx;
  238. line-height: 30rpx;
  239. padding: 20rpx 0;
  240. }
  241. .salesLeft{
  242. width: 200rpx;
  243. color: #999999;
  244. }
  245. .content {
  246. min-height: 100vh;
  247. background: #F4F5F7;
  248. }
  249. .jyimgBox{
  250. border-radius: 10rpx;
  251. }
  252. .box {
  253. padding: 0 24rpx;
  254. background: #ffffff;
  255. }
  256. .historylinecarImg{
  257. width: 54rpx;
  258. height: 54rpx;
  259. }
  260. .historyLogoBox{
  261. display: flex;align-items: center;
  262. padding-right: 14rpx;
  263. }
  264. .historylinecar {
  265. font-weight: 500;
  266. font-size: 26rpx;
  267. color: #1A1A1A;
  268. line-height: 46rpx;
  269. width: 636rpx;
  270. }
  271. .historyLine {
  272. display: flex;
  273. padding: 30rpx 0;
  274. /* border-top: 1rpx solid #EEEEEE; */
  275. }
  276. .cont {
  277. padding: 30rpx 24rpx;
  278. }
  279. .toplineImg{
  280. width: 35rpx;
  281. height: 34rpx;
  282. }
  283. .topName{
  284. line-height: 34rpx;font-weight: 400;
  285. color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
  286. }
  287. .topBox{
  288. width: 702rpx;
  289. height: 98rpx;
  290. background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
  291. border-radius: 16rpx;
  292. display: flex;justify-content: center;
  293. }
  294. .topsx{
  295. width: 2rpx;background: #ffffff;
  296. margin-left: 85rpx;margin-right: 85rpx;
  297. height: 54rpx;margin-top: 22rpx;
  298. }
  299. .topLine{
  300. display: flex;padding-top: 34rpx;
  301. }
  302. .jiyouTop{
  303. display: flex;justify-content: space-between;
  304. }
  305. .jiyouBox{
  306. margin-top: 30rpx;border-radius: 16rpx;
  307. background: #ffffff;padding: 30rpx;
  308. }
  309. .jiyoutopTitle{
  310. font-weight: 500;font-size: 28rpx;
  311. color: #1A1A1A;
  312. line-height: 40rpx;
  313. }
  314. .jyzl{
  315. font-weight: 400;line-height: 40rpx;
  316. color: #666666;font-size: 24rpx;
  317. }
  318. .jyimg{
  319. width: 130rpx;
  320. height: 130rpx;
  321. border-radius: 10rpx;
  322. }
  323. .jyline{
  324. /* width: 302rpx; */
  325. padding-top: 30rpx;
  326. display: flex;
  327. border-bottom: 1px solid #EEEEEE;
  328. padding-bottom: 20rpx;
  329. }
  330. .jyName{
  331. font-weight: 400;font-size: 26rpx;
  332. color: #1A1A1A;
  333. line-height:36rpx ;
  334. /* overflow: hidden;
  335. text-overflow: ellipsis;
  336. display: -webkit-box;
  337. -webkit-box-orient: vertical;
  338. -webkit-line-clamp: 2; */
  339. padding-top: 10rpx;
  340. }
  341. .jylineRight{
  342. padding-left: 20rpx;
  343. width: 500rpx;
  344. }
  345. .best{
  346. color: #FF4F00;border-radius: 6rpx;
  347. padding: 0 8rpx;border: 1px solid #FF4F00;
  348. }
  349. .jylineBox{
  350. }
  351. .historyLineVin{
  352. display: flex;background: #ffffff;
  353. }
  354. .historyLineCar{
  355. display: flex;justify-content: space-between;
  356. }
  357. .vinNum{
  358. font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
  359. color: #999999;line-height: 30rpx;
  360. }
  361. .vinms{
  362. width: 38rpx;
  363. height: 26rpx;
  364. background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
  365. border-radius: 4rpx;
  366. text-align: center;
  367. line-height: 26rpx;
  368. font-weight: 600;
  369. color: #FFFFFF;
  370. font-size: 18rpx;
  371. margin-top: 2rpx;
  372. }
  373. .ruleListSpan{
  374. font-weight: 400;
  375. font-size: 24rpx;
  376. color: #999999;
  377. line-height: 36rpx;
  378. padding-right: 6rpx;
  379. padding-top: 4rpx;
  380. }
  381. .modelRemarkBox{
  382. display: flex;padding-bottom: 20rpx;
  383. }
  384. .modelRemarkLine{
  385. background: #eee;
  386. padding: 6rpx 20rpx;
  387. border-radius: 6rpx;
  388. margin-right: 20rpx;
  389. font-size: 26rpx;
  390. }
  391. .activeMr{
  392. background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
  393. color: #FFF;
  394. }
  395. </style>