byItem.vue 12 KB

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