OemDetail.vue 11 KB

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