OemDetail.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  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. }
  185. },
  186. onLoad(opt) {
  187. this.epc_id = opt.epc_id;
  188. this.partsnum = opt.partsnum;
  189. this.weizhi = opt.weizhi;
  190. this.yongliang = opt.yongliang;
  191. this.getItemData();
  192. },
  193. methods: {
  194. // 配件信息
  195. getItemData() {
  196. uni.showLoading({
  197. title: '加载中'
  198. });
  199. this.$http('advancedEpc/generalEpc/infoPc', {
  200. epc_id:this.epc_id,
  201. partsnum:this.partsnum,
  202. }, 'GET').then(res => {
  203. uni.hideLoading();
  204. this.mesData = res.data.result;
  205. });
  206. },
  207. // 通用件
  208. getTongData() {
  209. uni.showLoading({
  210. title: '加载中'
  211. });
  212. this.$http('advancedEpc/generalEpc/replacePc', {
  213. epc_id:this.epc_id,
  214. partsnum:this.partsnum,
  215. }, 'GET').then(res => {
  216. uni.hideLoading();
  217. this.tongyongList = res.data.result;
  218. });
  219. },
  220. // EPC车型
  221. getCarModelData() {
  222. uni.showLoading({
  223. title: '加载中'
  224. });
  225. this.$http('advancedEpc/findApplicableModelsPc', {
  226. epc_id:this.epc_id,
  227. partnum:this.partsnum
  228. }, 'GET').then(res => {
  229. uni.hideLoading();
  230. this.epcList = res.data.result.list;
  231. this.epc_Count = res.data.result.total_count;
  232. });
  233. },
  234. topClick(index) {
  235. this.tabIndex = index
  236. if (this.tabIndex == 0) {
  237. // 配件信息
  238. this.getItemData();
  239. }
  240. // else if (this.tabIndex == 1) {
  241. // // 维修工时
  242. // // this.getItemData();
  243. // }
  244. else if (this.tabIndex == 1) {
  245. // 通用件
  246. this.getTongData();
  247. }
  248. else if (this.tabIndex == 2) {
  249. // EPC车型
  250. this.getCarModelData();
  251. }
  252. // else if (this.tabIndex == 4) {
  253. // // 4S销售车型
  254. // // this.getItemData();
  255. // }
  256. },
  257. }
  258. }
  259. </script>
  260. <style>
  261. .box {
  262. min-height: 100vh;
  263. background: #F4F5F7;
  264. }
  265. .scroll-Y {
  266. white-space: nowrap;
  267. width: 100%;
  268. height: 90rpx;
  269. background-color: #FFFFFF;
  270. }
  271. .tab {
  272. background: #FFFFFF;
  273. line-height: 87rpx;
  274. height: 87rpx;
  275. display: inline-block;
  276. padding-left: 20rpx;
  277. padding-right: 20rpx;
  278. }
  279. .tabLine {
  280. font-size: 32rpx;
  281. color: #999999;
  282. text-align: center;
  283. }
  284. .tabActive {
  285. color: #3F90F7;
  286. font-weight: bold;
  287. }
  288. .line {
  289. background: #FFFFFF;
  290. height: 4rpx;
  291. }
  292. .lineBlue {
  293. background: #3F90F7;
  294. width: 60rpx;
  295. margin-left: calc((100% - 60rpx)/2);
  296. }
  297. .mainBox {
  298. margin-top: 20rpx;
  299. background: #FFFFFF;
  300. min-height: 90vh;
  301. padding: 20rpx 24rpx;
  302. }
  303. .comtent {
  304. padding-bottom: 30rpx;
  305. display: flex;
  306. align-items: baseline;
  307. font-size: 26rpx;
  308. }
  309. .left {
  310. width: 40%;
  311. color: #999999;
  312. white-space: nowrap;
  313. }
  314. .right {
  315. width: 60%;
  316. color: #333333;
  317. }
  318. .workBox{
  319. background: #FFFFFF;
  320. border-bottom: 1rpx solid #EEEEEE;
  321. padding-bottom: 20rpx;
  322. margin-bottom: 20rpx;
  323. }
  324. .oneBox{
  325. display: flex;
  326. justify-content: space-between;
  327. align-items: center;
  328. font-size: 26rpx;
  329. padding-bottom: 20rpx;
  330. }
  331. .comtent2 {
  332. display: flex;
  333. align-items: baseline;
  334. font-size: 26rpx;
  335. width: 50%;
  336. }
  337. .topTitle{
  338. background-color: #F4F5F7;
  339. padding: 14rpx 24rpx;
  340. color: #666666;
  341. font-size: 24rpx;
  342. }
  343. .workBox2{
  344. background: #FFFFFF;
  345. border-bottom: 1rpx solid #EEEEEE;
  346. padding: 20rpx 24rpx 0rpx;
  347. margin-bottom: 20rpx;
  348. }
  349. .left2 {
  350. width: 20%;
  351. color: #999999;
  352. white-space: nowrap;
  353. }
  354. .right2 {
  355. width: 80%;
  356. color: #333333;
  357. }
  358. .workBox3{
  359. background: #FFFFFF;
  360. border-bottom: 1rpx solid #EEEEEE;
  361. padding: 20rpx 24rpx;
  362. margin-bottom: 20rpx;
  363. }
  364. .carMode{
  365. color: #333333;
  366. font-size: 28rpx;
  367. }
  368. </style>