OemDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <template>
  2. <view class="box">
  3. <scroll-view scroll-x="true" class="scroll-Y">
  4. <view class="tab" v-for="(item,index) in tabList" @click="topClick(index)">
  5. <view class="tabLine" :class="{tabActive:tabIndex==index}">{{item}}
  6. <view class="line" :class="{lineBlue:tabIndex==index}"></view>
  7. </view>
  8. </view>
  9. </scroll-view>
  10. <!-- 配件信息 -->
  11. <view class="mainBox" v-if="tabIndex==0">
  12. <view class="pei">
  13. <view class="comtent">
  14. <view class="left">零件编号</view>
  15. <view class="right">{{mesData.partsnum}}</view>
  16. </view>
  17. <view class="comtent">
  18. <view class="left">名称</view>
  19. <view class="right">{{mesData.caption}}</view>
  20. </view>
  21. <view class="comtent">
  22. <view class="left">位置</view>
  23. <view class="right">{{weizhi}}</view>
  24. </view>
  25. <view class="comtent">
  26. <view class="left">用量</view>
  27. <view class="right">{{yongliang}}</view>
  28. </view>
  29. <view class="comtent">
  30. <view class="left">备注</view>
  31. <view class="right">{{mesData.remark}}</view>
  32. </view>
  33. <view class="comtent">
  34. <view class="left">英文名称</view>
  35. <view class="right">{{mesData.remark}}</view>
  36. </view>
  37. <view class="comtent">
  38. <view class="left">适用车型代码</view>
  39. <view class="right"></view>
  40. </view>
  41. <view class="comtent">
  42. <view class="left">是否颜色配件</view>
  43. <view class="right">否</view>
  44. </view>
  45. <view class="comtent">
  46. <view class="left">4S价格</view>
  47. <view class="right" style="color: #FF4F00; font-weight: bold;">¥{{mesData.price}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 维修工时 -->
  52. <!-- <view class="mainBox" v-if="tabIndex==1">
  53. <view class="workBox" v-for="(item,index) in workHourseList" :key="index">
  54. <view class="oneBox">
  55. <view class="comtent2">
  56. <view class="left">工时代号:</view>
  57. <view class="right">1201D0</view>
  58. </view>
  59. <view class="comtent2">
  60. <view class="left">工时:</view>z
  61. <view class="right">12</view>
  62. </view>
  63. </view>
  64. <view class="oneBox">
  65. <view class="comtent2">
  66. <view class="left">相关参考号:</view>
  67. <view class="right">1201D0</view>
  68. </view>
  69. <view class="comtent2">
  70. <view class="left">工时包含:</view>
  71. <view class="right">12</view>
  72. </view>
  73. </view>
  74. <view class="comtent2" style="width: 100%;">
  75. <view class="left" style="width: 10%;" >说明:</view>
  76. <view class="right" style="width: 90%;" >净化控制电磁阀 - 更换净化控制电磁阀 - 更换净化控制电磁阀 - 更换</view>
  77. </view>
  78. </view>
  79. </view>
  80. -->
  81. <!-- 通用件 -->
  82. <view class="mainBox" v-if="tabIndex==1">
  83. <view class="tong">
  84. <view class="topTitle"><span style="color: #FF3B30;">*</span>通用件数据仅供参考,采购前请谨慎核对是否为相同配件</view>
  85. <view class="workBox2" v-for="(item,index) in tongyongList" :key="index">
  86. <view class="oneBox">
  87. <view class="comtent2">
  88. <view class="left2">品牌:</view>
  89. <view class="right2">{{item.brand}}</view>
  90. </view>
  91. <view class="comtent2">
  92. <view class="left2" style="width: 26%;">零件号:</view>z
  93. <view class="right2">{{item.partsnum}}</view>
  94. </view>
  95. </view>
  96. <view class="oneBox">
  97. <view class="comtent2">
  98. <view class="left2">名称:</view>
  99. <view class="right2">{{item.description}}</view>
  100. </view>
  101. <view class="comtent2">
  102. <view class="left2">价格:</view>
  103. <view class="right2">{{item.price}}</view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <!-- EPC车型 -->
  110. <view class="mainBox" v-if="tabIndex==2">
  111. <view class="epc">
  112. <view class="topTitle">共<span style="color: #FF3B30;">{{epc_Count}}</span>条</view>
  113. <view class="workBox2" v-for="(item,index) in epcList" :key="index">
  114. <view class="oneBox">
  115. <view class="comtent2">
  116. <view class="left2">名称:</view>
  117. <view class="right2">{{item.caption}}</view>
  118. </view>
  119. <view class="comtent2">
  120. <view class="left2">车型:</view>
  121. <view class="right2">{{item.vin_11}}</view>
  122. </view>
  123. </view>
  124. <view class="oneBox">
  125. <view class="comtent2">
  126. <view class="left2">年份:</view>
  127. <view class="right2">{{item.year}}</view>
  128. </view>
  129. <view class="comtent2">
  130. <view class="left2" style="width: 28%;">发动机:</view>
  131. <view class="right2">{{item.engine_prefix}}</view>
  132. </view>
  133. </view>
  134. <view class="oneBox">
  135. <view class="comtent2">
  136. <view class="left2" style="width: 28%;">变速箱:</view>
  137. <view class="right2">{{item.trans}}</view>
  138. </view>
  139. <view class="comtent2">
  140. <view class="left2">地区:</view>
  141. <view class="right2">{{item.area}}</view>
  142. </view>
  143. </view>
  144. <view class="oneBox">
  145. <view class="comtent2">
  146. <view class="left2">配置:</view>
  147. <view class="right2">{{item.equips}}</view>
  148. </view>
  149. <view class="comtent2">
  150. <view class="left2">级别:</view>
  151. <view class="right2">{{item.grade}}</view>
  152. </view>
  153. </view>
  154. <view class="oneBox">
  155. <view class="comtent2">
  156. <view class="left2" style="width: 35%;">模型代码:</view>
  157. <view class="right2">{{item.model_code}}</view>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 4S销售车型 -->
  164. <!-- <view class="mainBox" v-if="tabIndex==4" style="margin-top: 0rpx; padding: 0rpx">
  165. <view class="topTitle">共<span style="color: #FF3B30;">999</span>条</view>
  166. <view class="workBox3" v-for="(item,index) in xiaoshouList" :key="index">
  167. <view class="carMode">2009 手自一体变速器(MT)模拟7档 前置四驱 S5 </view>
  168. </view>
  169. </view>
  170. -->
  171. </view>
  172. </template>
  173. <script>
  174. export default {
  175. data() {
  176. return {
  177. epc_id: '',
  178. partsnum: '',
  179. tabIndex: 0,
  180. // tabList: ['配件信息', '维修工时', '通用件', 'EPC车型', '4S销售车型'],
  181. tabList: ['配件信息', '通用件', 'EPC车型'],
  182. mesData: {},
  183. weizhi: '',
  184. yongliang: '',
  185. workHourseList: [],
  186. tongyongList: [],
  187. epcList: [],
  188. epc_Count: '',
  189. xiaoshouList: [],
  190. page: 1,
  191. total_page: 1
  192. }
  193. },
  194. onLoad(opt) {
  195. console.log('opt+',opt);
  196. this.epc_id = opt.epc_id;
  197. this.partsnum = opt.partsnum;
  198. this.weizhi = opt.weizhi;
  199. this.yongliang = opt.yongliang;
  200. this.getItemData();
  201. },
  202. methods: {
  203. // 配件信息
  204. getItemData() {
  205. uni.showLoading({
  206. title: '加载中'
  207. });
  208. this.$http('advancedEpc/generalEpc/info', {
  209. epc_id: this.epc_id,
  210. partsnum: this.partsnum,
  211. }, 'GET').then(res => {
  212. uni.hideLoading();
  213. this.mesData = res.data.result;
  214. });
  215. },
  216. // 通用件
  217. getTongData() {
  218. uni.showLoading({
  219. title: '加载中'
  220. });
  221. this.$http('advancedEpc/generalEpc/replace', {
  222. epc_id: this.epc_id,
  223. partsnum: this.partsnum,
  224. }, 'GET').then(res => {
  225. uni.hideLoading();
  226. this.tongyongList = res.data.result;
  227. });
  228. },
  229. // EPC车型
  230. getCarModelData() {
  231. uni.showLoading({
  232. title: '加载中'
  233. });
  234. this.$http('advancedEpc/findApplicableModels', {
  235. epc_id: this.epc_id,
  236. partnum: this.partsnum,
  237. page: this.page,
  238. }, 'GET').then(res => {
  239. uni.hideLoading();
  240. this.epc_Count = res.data.result.total_count;
  241. this.total_page = res.data.result.total_page;
  242. var list = res.data.result.list;
  243. if (list.length != 0) {
  244. this.epcList = this.epcList.concat(list)
  245. }
  246. });
  247. },
  248. topClick(index) {
  249. this.tabIndex = index
  250. this.page = 1;
  251. if (this.tabIndex == 0) {
  252. // 配件信息
  253. this.getItemData();
  254. }
  255. // else if (this.tabIndex == 1) {
  256. // // 维修工时
  257. // // this.getItemData();
  258. // }
  259. else if (this.tabIndex == 1) {
  260. // 通用件
  261. this.getTongData();
  262. } else if (this.tabIndex == 2) {
  263. // EPC车型
  264. this.getCarModelData();
  265. }
  266. // else if (this.tabIndex == 4) {
  267. // // 4S销售车型
  268. // // this.getItemData();
  269. // }
  270. },
  271. },
  272. onReachBottom() {
  273. // if (this.tabIndex == 0) {
  274. // // 配件信息
  275. // this.getItemData();
  276. // }
  277. // // else if (this.tabIndex == 1) {
  278. // // // 维修工时
  279. // // // this.getItemData();
  280. // // }
  281. // else if (this.tabIndex == 1) {
  282. // // 通用件
  283. // // this.getTongData();
  284. // }
  285. // else
  286. if (this.tabIndex == 2) {
  287. // EPC车型
  288. if (this.page <= this.total_page) {
  289. this.page++;
  290. this.getCarModelData()()
  291. }
  292. }
  293. // else if (this.tabIndex == 4) {
  294. // // 4S销售车型
  295. // // this.getItemData();
  296. // }
  297. }
  298. }
  299. </script>
  300. <style>
  301. .box {
  302. min-height: 100vh;
  303. background: #F4F5F7;
  304. padding-bottom: constant(safe-area-inset-bottom);
  305. padding-bottom: env(safe-area-inset-bottom);
  306. }
  307. .scroll-Y {
  308. white-space: nowrap;
  309. width: 100%;
  310. height: 90rpx;
  311. background-color: #FFFFFF;
  312. position: fixed;
  313. z-index: 111;
  314. }
  315. .tab {
  316. background: #FFFFFF;
  317. line-height: 87rpx;
  318. height: 87rpx;
  319. display: inline-block;
  320. padding-left: 20rpx;
  321. padding-right: 20rpx;
  322. }
  323. .tabLine {
  324. font-size: 32rpx;
  325. color: #999999;
  326. text-align: center;
  327. }
  328. .tabActive {
  329. color: #3F90F7;
  330. font-weight: bold;
  331. }
  332. .line {
  333. background: #FFFFFF;
  334. height: 4rpx;
  335. }
  336. .lineBlue {
  337. background: #3F90F7;
  338. width: 60rpx;
  339. margin-left: calc((100% - 60rpx)/2);
  340. }
  341. .mainBox {
  342. background: #F4F5F7;
  343. min-height: 90vh;
  344. width: 100%;
  345. padding-top: 90rpx;
  346. }
  347. .pei{
  348. background: #FFFFFF;
  349. padding: 20rpx 24rpx;
  350. margin-top: 20rpx;
  351. }
  352. .tong{
  353. background: #FFFFFF;
  354. }
  355. .epc{
  356. background: #FFFFFF;
  357. }
  358. .comtent {
  359. padding-bottom: 30rpx;
  360. display: flex;
  361. align-items: baseline;
  362. font-size: 26rpx;
  363. }
  364. .left {
  365. width: 40%;
  366. color: #999999;
  367. white-space: nowrap;
  368. }
  369. .right {
  370. width: 60%;
  371. color: #333333;
  372. }
  373. .workBox {
  374. background: #FFFFFF;
  375. border-bottom: 1rpx solid #EEEEEE;
  376. padding-bottom: 20rpx;
  377. margin-bottom: 20rpx;
  378. }
  379. .oneBox {
  380. display: flex;
  381. justify-content: space-between;
  382. align-items: baseline;
  383. font-size: 26rpx;
  384. padding-bottom: 20rpx;
  385. }
  386. .comtent2 {
  387. display: flex;
  388. align-items: baseline;
  389. font-size: 26rpx;
  390. width: 50%;
  391. }
  392. .topTitle {
  393. background-color: #F4F5F7;
  394. padding: 14rpx 24rpx;
  395. color: #666666;
  396. font-size: 24rpx;
  397. }
  398. .workBox2 {
  399. background: #FFFFFF;
  400. border-bottom: 1rpx solid #EEEEEE;
  401. padding: 20rpx 24rpx 0rpx;
  402. margin-bottom: 20rpx;
  403. }
  404. .left2 {
  405. width: 20%;
  406. color: #999999;
  407. white-space: nowrap;
  408. }
  409. .right2 {
  410. width: 80%;
  411. color: #333333;
  412. margin-right: 20rpx;
  413. }
  414. .workBox3 {
  415. background: #FFFFFF;
  416. border-bottom: 1rpx solid #EEEEEE;
  417. padding: 20rpx 24rpx;
  418. margin-bottom: 20rpx;
  419. }
  420. .carMode {
  421. color: #333333;
  422. font-size: 28rpx;
  423. }
  424. </style>