byItem.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  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>
  31. <view class="listBox" v-if="MaintainPartList.length!=0">
  32. <view class="jiyouBox" v-if="loading">
  33. <view class="title">前雨刷</view>
  34. <view class="jylineBox">
  35. <view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
  36. <view class="jyimgBox">
  37. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  38. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  39. </view>
  40. <view class="jylineRight">
  41. <view class="jyName">
  42. <span class="jyNametxt">{{item.name}} | {{item.partsCode}} | {{item.factoryNumber}} </span>
  43. </view>
  44. <view class="modelRemark">{{item.modelRemark}}</view>
  45. <view v-for="(exObj,exindex) in item.ExtendDatas" class="exspanBox">
  46. <span class="exspan1" v-for="ex in Object.keys(exObj)" v-if="ex!='partsId'&&exObj[ex]">{{ex}}: <span class="exspan2">{{exObj[ex]}}</span></span>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <nodata v-if="MaintainPartList.length==0"></nodata>
  52. </view>
  53. </view>
  54. <view class="listBox" v-if="afterList.length!=0">
  55. <view class="jiyouBox" v-if="loading">
  56. <view class="title">后雨刷</view>
  57. <view class="jylineBox">
  58. <view class="jyline" v-for="(item,index) in afterList" @click="godetail(item)">
  59. <view class="jyimgBox">
  60. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  61. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  62. </view>
  63. <view class="jyName">
  64. <!-- <span class="best">最佳</span> -->
  65. <span class="jyNametxt">{{item.name}} | {{item.specificationModel}} | {{item.partsCode}} </span>
  66. </view>
  67. <view class="modelRemark">{{item.modelRemark}}</view>
  68. <view v-for="(exObj,exindex) in item.ExtendDatas" class="exspanBox">
  69. <span class="exspan1" v-for="ex in Object.keys(exObj)" v-if="ex!='partsId'&&exObj[ex]">{{ex}}: <span class="exspan2">{{exObj[ex]}}</span></span>
  70. </view>
  71. </view>
  72. </view>
  73. <nodata v-if="afterList.length==0"></nodata>
  74. </view>
  75. </view>
  76. <view v-if="disclaimerShow" class="tiTk">
  77. <view class="disclaimerShowBOx">
  78. <view class="disclaimerTitle">免责声明</view>
  79. <view class="disclaimerTxt">
  80. <view class="disclaimerTxtLIne">1、本系统只作为查询辅助工具,在使用中如有对数据与实车配件产品不匹配疑问时,请务必核实实车配件产品及原车维修保养手册所推荐产品标准</view>
  81. <view class="disclaimerTxtLIne">2、如有系统匹配疑问,无法辅助销售,欢迎进入反馈通道及时反馈</view>
  82. <view class="disclaimerTxtLIne">3、对于使用系统中出现的个别型号不匹配的情况一切解释权归本公司所有</view>
  83. <view class="disclaimerTxtLIne">我司将会不断完善升级系统,力求为客户提供最准确,最完善的配件数据查询服务。</view>
  84. </view>
  85. <view class="disclaimerXc">
  86. <checkbox-group @change="disclaimerChange">
  87. <checkbox style="transform:scale(0.7)" value="1" :checked="disclaimerchecked" />下次不再提醒
  88. </checkbox-group>
  89. </view>
  90. <view class="disclaimerBtnBox" @click="disclaimerBtn">
  91. 我知道了
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </template>
  97. <script>
  98. import homenav from "../../components/homenav/nav.vue"
  99. import nodata from '../../components/nodata/nodata.vue'
  100. export default {
  101. components: {
  102. homenav,nodata
  103. },
  104. data() {
  105. return {
  106. optdata:'',
  107. isVin:'',
  108. vin:'',
  109. scarid:'',
  110. iStatusBarHeight:'',
  111. loading:false,
  112. MaintainPartList:[],
  113. afterList:[],
  114. disclaimerShow:false,
  115. disclaimerchecked:false,
  116. }
  117. },
  118. onLoad(opt) {
  119. var disclaimercheckedck=uni.getStorageSync('disclaimerchecked');
  120. if(disclaimercheckedck!=1){
  121. this.disclaimerShow=true;
  122. }
  123. console.log(opt);
  124. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  125. this.optdata=opt;
  126. this.queryMaintainPartList()
  127. if(opt.scarid){
  128. this.scarid=opt.scarid;
  129. this.queryCarModelGroupInfo()
  130. }else{
  131. if(opt.isVin==1){
  132. this.isVin=1;
  133. this.vin=opt.vin
  134. }
  135. this.saveQueryHistory()
  136. }
  137. },
  138. methods: {
  139. disclaimerChange(e){
  140. console.log(e)
  141. this.disclaimerchecked=e.detail.value[0]
  142. },
  143. disclaimerBtn(){
  144. console.log(this.disclaimerchecked)
  145. this.disclaimerShow=false;
  146. if(this.disclaimerchecked){
  147. uni.setStorageSync('disclaimerchecked', 1);
  148. }
  149. },
  150. queryCarModelGroupInfo(){
  151. uni.showLoading({ title: '加载中'});
  152. this.$http('matchingByOpen/queryCarModelGroupInfo', {
  153. id:this.scarid,
  154. },'POST').then(res => {
  155. uni.hideLoading();
  156. var data={
  157. value:res.data.value,
  158. id:res.data.id,
  159. nLevelID:res.data.carModelInfo.nLevelID,
  160. logo:res.data.carModelInfo.logo,
  161. }
  162. this.optdata=data;
  163. this.saveQueryHistory()
  164. })
  165. },
  166. queryMaintainPartList(){
  167. uni.showLoading({ title: '加载中'});
  168. this.loading=false;
  169. this.$http('partsByOpen/queryMaintainPartList', {
  170. groupId:this.optdata.id,
  171. componentCode:'006001',
  172. },'POST').then(res => {
  173. this.loading=true;
  174. uni.hideLoading();
  175. this.MaintainPartList=res.data;//前雨刷
  176. })
  177. this.$http('partsByOpen/queryMaintainPartList', {
  178. groupId:this.optdata.id,
  179. componentCode:'006003',
  180. },'POST').then(res => {
  181. uni.hideLoading();
  182. this.afterList=res.data;//后雨刷
  183. })
  184. },
  185. saveQueryHistory(){
  186. this.$http2('saveQueryHistory', {
  187. nLevelID:this.optdata.nLevelID,
  188. logo:this.optdata.logo,
  189. title:this.optdata.value,
  190. groupId:this.optdata.id,
  191. isVin:this.isVin,
  192. vin:this.vin
  193. },'POST').then(res => {
  194. })
  195. },
  196. goby(){
  197. uni.navigateTo({
  198. url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID+'&id='+this.optdata.id
  199. })
  200. },
  201. godetail(e){
  202. uni.navigateTo({
  203. url:'/pages/index/goodsDetail?id='+e.id
  204. })
  205. },
  206. gopz(){
  207. uni.navigateTo({
  208. url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
  209. })
  210. }
  211. }
  212. }
  213. </script>
  214. <style scoped>
  215. .disclaimerShowBOx{
  216. width: 600rpx;
  217. background: #FFFFFF;
  218. border-radius: 10rpx;
  219. padding-top: 24rpx;
  220. }
  221. .modelRemark{
  222. font-weight: 400;
  223. color: #F19D01;
  224. font-size: 26rpx;
  225. }
  226. .jylineRight{
  227. width: 450rpx;padding-left: 16rpx;
  228. }
  229. .disclaimerXc{
  230. padding-left: 24rpx;
  231. }
  232. .disclaimerTitle{
  233. text-align: center;font-size: 30rpx;color: #333333;
  234. }
  235. .disclaimerTxt{
  236. color: #333333;font-size: 28rpx;
  237. padding: 30rpx;line-height: 40rpx;
  238. }
  239. .disclaimerBtnBox{
  240. display: flex;justify-content: center;color: #3F90F7;
  241. border-top: 1px solid #EEEEEE;line-height: 90rpx;margin-top: 24rpx;
  242. }
  243. .tiTk{
  244. position: fixed;
  245. left: 0;top: 0;
  246. background: rgba(0, 0, 0, 0.4);
  247. width: 100vw;height: 100vh;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. }
  252. .exspan1{
  253. margin-top: 5rpx;
  254. font-size: 24rpx;
  255. font-family: PingFangSC-Regular, PingFang SC;
  256. font-weight: 400;
  257. color: #999999;
  258. display: block;
  259. }
  260. .exspan2{
  261. font-size: 24rpx;
  262. font-family: PingFangSC-Regular, PingFang SC;
  263. color:#3C3C3C;
  264. font-style: normal;
  265. }
  266. .content{
  267. min-height: 100vh;
  268. background: #F4F5F7;
  269. }
  270. .box{
  271. padding: 0 24rpx;
  272. background: #ffffff;
  273. }
  274. .historylinecarImg{
  275. width: 54rpx;
  276. height: 54rpx;
  277. }
  278. .historyLogoBox{
  279. display: flex;align-items: center;
  280. padding-right: 14rpx;
  281. }
  282. .historylinecar{
  283. font-weight: 500;font-size: 26rpx;
  284. color: #1A1A1A;
  285. line-height: 46rpx;width: 636rpx;
  286. }
  287. .historyLine{
  288. display: flex;
  289. padding: 30rpx 0;
  290. }
  291. .title{
  292. font-weight: 500;font-size: 28rpx;
  293. color: #1A1A1A;border-top-right-radius: 16rpx;
  294. line-height: 40rpx;border-top-left-radius: 16rpx;
  295. padding:20rpx 30rpx;background:#FF4F00;color: #ffffff;
  296. }
  297. .lineBox{
  298. padding: 0 24rpx;
  299. }
  300. .line{
  301. width: 332rpx;
  302. height: 206rpx;
  303. background: #FFFFFF;
  304. border-radius: 16rpx;
  305. }
  306. .lineTitle{
  307. font-weight: 500;font-size: 28rpx;padding-top: 32rpx;
  308. color: #1A1A1A;padding-left: 30rpx;
  309. line-height: 40rpx;
  310. }
  311. .lineEnglish{
  312. font-weight: 400;font-size: 24rpx;
  313. color: #999999;padding-left: 30rpx;
  314. line-height: 34rpx;padding-top: 10rpx;
  315. }
  316. .lineImg1{
  317. width: 82rpx;height: 92rpx;
  318. }
  319. .lineImgbox{
  320. text-align: right;
  321. }
  322. .lineImg2{
  323. width: 106rpx;height: 82rpx; margin-top: 10rpx;
  324. }
  325. .historyLineVin{
  326. display: flex;background: #ffffff;
  327. }
  328. .historyLineCar{
  329. display: flex;justify-content: space-between;
  330. }
  331. .vinNum{
  332. font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
  333. color: #999999;line-height: 30rpx;
  334. }
  335. .vinms{
  336. width: 38rpx;
  337. height: 26rpx;
  338. background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
  339. border-radius: 4rpx;
  340. text-align: center;
  341. line-height: 26rpx;
  342. font-weight: 600;
  343. color: #FFFFFF;
  344. font-size: 18rpx;
  345. margin-top: 2rpx;
  346. }
  347. .cont {
  348. padding: 30rpx 24rpx;
  349. }
  350. .toplineImg{
  351. width: 35rpx;
  352. height: 34rpx;
  353. }
  354. .topName{
  355. line-height: 34rpx;font-weight: 400;
  356. color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
  357. }
  358. .topBox{
  359. width: 702rpx;
  360. height: 98rpx;
  361. background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
  362. border-radius: 16rpx;
  363. display: flex;justify-content: center;
  364. }
  365. .topsx{
  366. width: 2rpx;background: #ffffff;
  367. margin-left: 85rpx;margin-right: 85rpx;
  368. height: 54rpx;margin-top: 22rpx;
  369. }
  370. .topLine{
  371. display: flex;padding-top: 34rpx;
  372. }
  373. .jiyouBox{
  374. border-radius: 16rpx;
  375. background: #ffffff;
  376. }
  377. .jiyoutopTitle{
  378. font-weight: 500;font-size: 28rpx;
  379. color: #1A1A1A;
  380. line-height: 40rpx;
  381. }
  382. .jyzl{
  383. font-weight: 400;line-height: 40rpx;
  384. color: #666666;font-size: 24rpx;
  385. }
  386. .jyimg{
  387. width: 200rpx;
  388. height: 200rpx;
  389. border-radius: 10rpx;
  390. }
  391. .jyline{
  392. width: 302rpx;padding-top: 30rpx;
  393. }
  394. .jyName{
  395. font-weight: 500;font-size: 28rpx;
  396. color: #1A1A1A;
  397. line-height:36rpx ;
  398. overflow: hidden;
  399. text-overflow: ellipsis;
  400. display: -webkit-box;
  401. -webkit-box-orient: vertical;
  402. -webkit-line-clamp: 2;
  403. padding-top: 10rpx;
  404. width: 450rpx;
  405. padding-bottom: 10rpx;
  406. }
  407. .best{
  408. color: #FF4F00;border-radius: 6rpx;
  409. padding: 0 8rpx;border: 1px solid #FF4F00;
  410. }
  411. .jylineBox{
  412. /* display: flex;justify-content: space-between;flex-wrap: wrap; */
  413. padding: 0 24rpx 30rpx 24rpx;
  414. }
  415. .jyline{
  416. display: flex;
  417. }
  418. .historyLineVin{
  419. display: flex;background: #ffffff;
  420. }
  421. .historyLineCar{
  422. display: flex;justify-content: space-between;
  423. }
  424. .vinNum{
  425. font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
  426. color: #999999;line-height: 30rpx;
  427. }
  428. .vinms{
  429. width: 38rpx;
  430. height: 26rpx;
  431. background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
  432. border-radius: 4rpx;
  433. text-align: center;
  434. line-height: 26rpx;
  435. font-weight: 600;
  436. color: #FFFFFF;
  437. font-size: 18rpx;
  438. margin-top: 2rpx;
  439. }
  440. .listBox{
  441. padding: 30rpx 24rpx;
  442. padding-top: 0;
  443. }
  444. .jyimgBox{
  445. border: 1px solid #f3f3f3; width: 200rpx;border-radius: 10rpx;
  446. }
  447. </style>