choosePart.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. <template>
  2. <view class="flex flex_column choosePartByVin">
  3. <!-- 头部车辆信息 -->
  4. <div class="flex align-center cpb_header" v-if="carInfo">
  5. <div>
  6. <u-image border-radius="30" :src="carInfo.icon" width="100" height="100" bg-color="#EBEBEB" ></u-image>
  7. </div>
  8. <div>
  9. <div class="flex align-center">
  10. <div class="carTits ellipsis-two">{{modelLabel||''}}</div>
  11. </div>
  12. <div class="flex align-center">
  13. <div>VIN码:{{vinNumber}}</div>
  14. <div class="copyText" @click="copyVin"><span>复制</span></div>
  15. </div>
  16. <view style="font-size: 0.8em;color: dodgerblue;margin-top: 0.5em;" v-if="dealerPhone" @click="callPhone()">
  17. <u-icon size="30" name="phone" color="dodgerblue"></u-icon><text>联系汽配商</text>
  18. </view>
  19. </div>
  20. </div>
  21. <!-- 配件列表 -->
  22. <div class="cpb_middle flex">
  23. <div class="slider-bar">
  24. <div class="tabs">
  25. <view :class="[curLeve2 == 'all' ? 'active' : '']" @click="selLeve2('all')">
  26. 全部
  27. </view>
  28. <view :class="[curLeve2 == item.id ? 'active' : '']" v-for="(item, index) in leve2Data" :key="index" @click="selLeve2(item.id)">
  29. {{item.label}}
  30. </view>
  31. </div>
  32. </div>
  33. <div class="right-list">
  34. <scroll-view
  35. class="right-list-content"
  36. scroll-y
  37. @scrolltolower="onreachBottom">
  38. <!-- vin适配配件 -->
  39. <view>
  40. <view class="nav-right-title">适配推荐</view>
  41. <view class="nav-right-item flex" v-for="(item, index) in vinPartList" :key="item.productSn">
  42. <view class="uni-col-2">
  43. <u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
  44. </view>
  45. <view class="item-info uni-col-10">
  46. <view class="item-name">
  47. <text>{{item.name}}</text>
  48. </view>
  49. <view class="item-detail">
  50. <view class="item-detail-info">
  51. <view class="flex justify_between">
  52. <text class="item-detail-text flex_1">{{item.code}}</text>
  53. <text class="item-detail-text" v-if="item.affiliation=='SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
  54. </view>
  55. <view class="flex justify_between">
  56. <view class="item-detail-text flex_1" v-if="item.affiliation=='SHELF'">
  57. <text class="item-price" v-if="showJhPrice">¥{{item.cost||0}}</text>
  58. <text class="item-price" v-else>¥{{item.price||0}}</text>
  59. </view>
  60. <view class="item-detail-text flex_1" v-if="item.affiliation=='SUPER_CATALOGUE'">
  61. <text class="item-price" v-if="!showJhPrice">¥{{item.price||0}}</text>
  62. </view>
  63. <view class="item-detail-text" v-if="item.currentInven">
  64. <u-button shape="circle" @click="addPart(item)" v-if="!item.checked" :custom-style="{width:'48upx',height:'48upx'}" type="primary" size="mini">
  65. <u-icon name="plus" color="#fff" size="28"></u-icon>
  66. </u-button>
  67. <u-number-box v-else @change="updateVinNums" @blur="updateVinNums" v-model="item.qty" :index="item.productSn" :min="0" :max="item.currentInven"></u-number-box>
  68. </view>
  69. <view class="item-detail-text" v-if="item.affiliation=='SUPER_CATALOGUE'||!item.currentInven">
  70. <text v-if="!item.checked" @click="addPart(item)" class="phtxt">我要临配</text>
  71. <u-number-box v-else @change="updateVinNums" @blur="updateVinNums" v-model="item.qty" :index="item.productSn" :min="0"></u-number-box>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="nav-right-item-btns flex align_center justify_between">
  76. <view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view v-if="vinPartList&&vinPartList.length==0">
  83. <u-empty v-if="vinStatus!='loading'" :src="`/static/nodata.png`" icon-size="180" text="暂无适配推荐" mode="list" :margin-top="30"></u-empty>
  84. </view>
  85. <view style="padding: 20upx;">
  86. <u-loadmore v-if="vinStatus=='loading'" :status="vinStatus" />
  87. </view>
  88. </view>
  89. <!-- 其它配件 -->
  90. <view class="nav-right-title flex align_center justify_between" @click="showOther=!showOther" style="margin-top: 20rpx;">
  91. 其它配件
  92. <text>{{showOther?'隐藏':'展开'}}</text>
  93. </view>
  94. <view class="nav-right-item flex" v-if="showOther" v-for="(item, index) in partList" :key="item.productSn">
  95. <view class="uni-col-2">
  96. <u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
  97. </view>
  98. <view class="item-info uni-col-10">
  99. <view class="item-name">
  100. <text>{{item.name}}</text>
  101. </view>
  102. <view class="item-detail">
  103. <view class="item-detail-info">
  104. <view class="flex justify_between">
  105. <text class="item-detail-text flex_1">{{item.code}}</text>
  106. <text class="item-detail-text">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
  107. </view>
  108. <view class="flex justify_between">
  109. <view class="item-detail-text flex_1">
  110. <text class="item-price" v-if="showJhPrice">¥{{item.cost||0}}</text>
  111. <text class="item-price" v-else>¥{{item.price||0}}</text>
  112. </view>
  113. <view class="item-detail-text" v-if="item.currentInven">
  114. <u-button shape="circle" @click="addPart(item)" v-if="!item.checked" :custom-style="{width:'48upx',height:'48upx',background:'#066cff'}" type="primary" size="mini">
  115. <u-icon name="plus" color="#fff" size="28"></u-icon>
  116. </u-button>
  117. <u-number-box v-else @change="updateNums" @blur="updateNums" v-model="item.qty" :index="item.productSn" :min="0" :max="item.currentInven"></u-number-box>
  118. </view>
  119. <view class="item-detail-text" v-else>
  120. <text @click="addPart(item)" v-if="!item.checked" class="phtxt">我要临配</text>
  121. <u-number-box v-else @change="updateNums" @blur="updateNums" v-model="item.qty" :index="item.productSn" :min="0"></u-number-box>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="nav-right-item-btns flex align_center justify_between">
  126. <view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view v-if="partList&&partList.length==0">
  133. <u-empty v-if="status!='loading'" :src="`/static/nodata.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="150"></u-empty>
  134. </view>
  135. <view style="padding: 20upx;">
  136. <u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
  137. </view>
  138. </scroll-view>
  139. </div>
  140. </div>
  141. <!-- 底部提交按钮 -->
  142. <div class="cpb_footer flex align-center" :class="isIphoneXup?'isIPXup':''">
  143. <div>
  144. <div class="cpb_cart" @click="openCart">
  145. <u-badge type="error" :count="cartNums" :offset="[-4,-4]" bgColor="#FF5200"></u-badge>
  146. <u-image width="44" height="44" :src="`/static/icon_shopping@3x.png`"></u-image>
  147. </div>
  148. </div>
  149. <div>
  150. <u-button type="primary" :loading="saveLoading" @click="submitForm" :custom-style="{background:'#066cff',fontSize:'32rpx'}" shape="circle">立即提交</u-button>
  151. </div>
  152. </div>
  153. <!-- 已选配件 购物车 -->
  154. <div class="cpb_cart-mask" v-if="showCart">
  155. <div class="cpb_cart-box">
  156. <div class="cpb_close flex align-center justify_center" @click="showCart=false"><u-icon name="close"></u-icon></div>
  157. <div class="cpb_cart-tit">
  158. 已选配件
  159. </div>
  160. <div class="cpb_cart-list">
  161. <view class="nav-right-item flex" v-for="(item, index) in partListData" :key="item.productSn">
  162. <view class="uni-col-2">
  163. <u-image border-radius="30" :src="item.images" width="100" height="100" bg-color="#EBEBEB" ></u-image>
  164. </view>
  165. <view class="item-info uni-col-10">
  166. <view class="item-name">
  167. <text class="item-tempPart" v-if="!item.currentInven">临配</text>
  168. <text>{{item.name}}</text>
  169. </view>
  170. <view class="item-detail">
  171. <view class="item-detail-info">
  172. <view class="flex justify_between">
  173. <text class="item-detail-text flex_1">{{item.code}}</text>
  174. <text class="item-detail-text" v-if="item.affiliation!='SUPER_CATALOGUE'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
  175. </view>
  176. <view class="flex justify_between">
  177. <view class="item-detail-text flex_1" v-if="item.affiliation&&item.affiliation=='SHELF'">
  178. <text class="item-price" v-if="showJhPrice">¥{{item.cost||0}}</text>
  179. <text class="item-price" v-else>¥{{item.price||0}}</text>
  180. </view>
  181. <view class="item-detail-text flex_1" v-else>
  182. <text class="item-price" v-if="!showJhPrice">¥{{item.price||0}}</text>
  183. </view>
  184. <view class="item-detail-text">
  185. <u-number-box @change="updateCartNums" @blur="updateCartNums" v-model="item.qty" :index="'cart_'+item.productSn" :min="0" :max="item.currentInven||999999"></u-number-box>
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </div>
  193. </div>
  194. </div>
  195. <!-- 去认证 -->
  196. <u-popup v-model="showPopup" mode="center" :border-radius="20" closeable>
  197. <view style="background-color: #fff;padding:1rem;">
  198. <u-image width="533" height="415" src="/static/authimg.jpg"></u-image>
  199. <view style="padding-top:1rem;" class="flex justify_center">
  200. <u-button @click="toAuthStore()" shape="circle" :custom-style="{background:'#066cff',color:'#fff',width:'350rpx'}">开始认证</u-button>
  201. </view>
  202. </view>
  203. </u-popup>
  204. </view>
  205. </template>
  206. <script>
  207. import { getShelfProductList, getShelfProductType, queryPartCodeByVin, getShelfQueryList, saveShelfOrder } from '@/api/shelf'
  208. export default {
  209. data() {
  210. return {
  211. showOther: false,
  212. theme: '',
  213. vinNumber: '',
  214. leve2Data: [], // 二级菜单数据
  215. curLeve2: '', // 当前所选二级菜单
  216. carInfo: null,
  217. status: 'loading',
  218. vinStatus: 'loading',
  219. noDataText: '暂无配件',
  220. pageNo: 1,
  221. pageSize: 10,
  222. total: 0, // 列表总数
  223. noMore: false ,// 没有更多
  224. showCart: false, // 购物车
  225. carList:[], // 车型列表
  226. partList: [], // 配件列表
  227. partListData: [], // 已选配件
  228. vinPartList: [],
  229. isIphoneXup: false,
  230. saveLoading: false,
  231. showPopup: false
  232. }
  233. },
  234. computed:{
  235. modelLabel(){
  236. return this.carInfo&&this.carInfo.text||''
  237. },
  238. cartNums(){
  239. let ret = 0
  240. this.partListData.map(item => {
  241. ret = ret + item.qty
  242. })
  243. return ret
  244. },
  245. dealerPhone(){
  246. const shelfInfo = this.$store.state.vuex_storeShelf
  247. return shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
  248. },
  249. userInfo(){
  250. return this.$store.state.vuex_userInfo
  251. },
  252. storeApply(){
  253. return this.$store.state.vuex_storeAuthInfo || null
  254. },
  255. showJhPrice(){
  256. const showPrice = this.$store.state.vuex_showPrice
  257. const isAdmin = this.userInfo.superAdmin == 1
  258. const isJhPrice = showPrice[0] && showPrice[1] == 'PURCHASES_PRICE'
  259. // 是管理员
  260. if(isAdmin){
  261. // 是否进货价
  262. return isJhPrice
  263. }else{
  264. // 员工且是否可见进货价
  265. return isJhPrice && showPrice[2]
  266. }
  267. }
  268. },
  269. onLoad(opts) {
  270. this.theme = getApp().globalData.theme
  271. this.vinNumber = opts.vinNumber
  272. this.carInfo = opts.carList?JSON.parse(decodeURIComponent(opts.carList)):null
  273. // 获取vin 对应code
  274. this.getCarCodeByVin()
  275. console.log(this.$store.state.vuex_showPrice)
  276. // 游客
  277. if(this.userInfo.sysUserFlag == '0'){
  278. // 未认证
  279. if(!this.storeApply || this.storeApply&&!this.storeApply.auditStatus){
  280. this.showPopup = true
  281. }
  282. }
  283. },
  284. onShow() {
  285. this.$store.state.vuex_shelfChoosePart = []
  286. },
  287. methods: {
  288. toAuthStore(){
  289. this.showPopup = false
  290. uni.redirectTo({
  291. url: '/pages/storeManage/storeAuth'
  292. })
  293. },
  294. callPhone() {
  295. if(this.dealerPhone!=''){
  296. uni.makePhoneCall({
  297. phoneNumber: this.dealerPhone
  298. })
  299. }
  300. },
  301. viewImg(item){
  302. uni.previewImage({
  303. urls: [item.images]
  304. })
  305. },
  306. // 复制
  307. copyVin(){
  308. uni.setClipboardData({
  309. data: this.vinNumber||'',
  310. })
  311. },
  312. // 格式化标签数据和配件分类数据一样
  313. labelToPart(data){
  314. let arr = []
  315. data.map(item => {
  316. arr.push({
  317. id: item.id || item.productTypeSn,
  318. label: item.name
  319. })
  320. })
  321. return arr
  322. },
  323. getCarCodeByVin(){
  324. queryPartCodeByVin({vinNumber:this.vinNumber}).then(res => {
  325. console.log(res,'this.vinCode')
  326. this.vinCode = res.data
  327. this.getShelfProductType()
  328. })
  329. },
  330. // 获取数字货架分类作为二级分类
  331. getShelfProductType(){
  332. const storeShelf = this.$store.state.vuex_storeShelf
  333. getShelfProductType({
  334. codeList: this.vinCode,
  335. shelfSn: storeShelf?storeShelf.shelfSn:''
  336. }).then(res => {
  337. console.log(res,'getShelfProductType')
  338. this.leve2Data = this.labelToPart(res.data || [])
  339. // 默认该车适用或全部
  340. this.selLeve2('all')
  341. })
  342. },
  343. // 单击二级菜单
  344. selLeve2 (v) {
  345. this.pageNo = 1
  346. this.partList = []
  347. this.vinPartList = []
  348. this.curLeve2 = v
  349. if(this.vinNumber){
  350. this.getVinShelfPartList()
  351. }
  352. this.getShelfProductList()
  353. },
  354. // 获取数字货架配件列表
  355. getShelfProductList(){
  356. const _this = this
  357. let params = {
  358. pageNo: this.pageNo,
  359. pageSize: this.pageSize,
  360. excludeCodeList: this.vinCode,
  361. productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2
  362. }
  363. _this.status = 'loading'
  364. getShelfProductList(params).then(res => {
  365. console.log(res,'获取数字货架配件列表')
  366. uni.hideLoading()
  367. if(res.status == 200){
  368. let list = res.data.list
  369. if (list && list.length){
  370. // 分页 拼接数据
  371. if (_this.pageNo != 1) {
  372. _this.partList = _this.partList ? _this.partList.concat(this.fiterChecked(list)) : this.fiterChecked(list)
  373. } else {
  374. _this.partList = this.fiterChecked(list)
  375. }
  376. this.total = res.data.count
  377. if (_this.partList.length == res.data.count) {
  378. _this.status = 'nomore'
  379. } else {
  380. _this.status = 'loadmore'
  381. }
  382. } else {
  383. _this.partList = list || []
  384. this.total = 0
  385. _this.status = 'nomore'
  386. }
  387. _this.noDataText = '暂无配件'
  388. }else{
  389. _this.status = 'loadmore'
  390. _this.partList = []
  391. this.total = 0
  392. _this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
  393. }
  394. })
  395. },
  396. // 根据客户vin查询该车可用数字货架中的配件
  397. getVinShelfPartList(){
  398. let params = {
  399. queryWord: this.queryWord,
  400. productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2,
  401. codeList: this.vinCode
  402. }
  403. this.vinStatus = 'loading'
  404. getShelfQueryList(params).then(res => {
  405. this.vinPartList = this.fiterChecked(res.data || [])
  406. this.vinStatus = 'nomore'
  407. })
  408. },
  409. // 过滤已选择的
  410. fiterChecked (list){
  411. this.partListData.map(item => {
  412. let p = list.find(k => {
  413. return k.productSn == item.productSn
  414. })
  415. if (p){
  416. p.checked = true
  417. p.qty = item.qty
  418. }
  419. })
  420. return list
  421. },
  422. // 加载更多
  423. onreachBottom () {
  424. if(this.partList.length < this.total ){
  425. this.pageNo++
  426. this.getShelfProductList()
  427. }else{
  428. this.status = "nomore"
  429. }
  430. },
  431. // 添加到购物车
  432. addPart(item){
  433. item.checked = true
  434. item.qty = 1
  435. this.partListData.unshift({
  436. id: item.id,
  437. productSn: item.productSn,
  438. name: item.name,
  439. unit: item.unit,
  440. price: item.price,
  441. cost: item.cost,
  442. currentInven: item.currentInven,
  443. code: item.code,
  444. qty: item.qty,
  445. images: item.images,
  446. checked: true,
  447. affiliation: item.affiliation
  448. })
  449. },
  450. // 更新配件列表数量
  451. updatePartList(data,type){
  452. const prow = this[type].find(item => item.productSn == data.index)
  453. const index = this.partListData.findIndex(item => item.productSn == data.index)
  454. // 删除
  455. if(!data.value){
  456. prow.checked = false
  457. if(index>=0){
  458. this.partListData.splice(index,1)
  459. }
  460. if(this.partListData.length==0){
  461. this.showCart = false
  462. }
  463. }else{
  464. this.partListData[index].qty = data.value
  465. this.partListData.splice()
  466. }
  467. },
  468. // 修改适配配件上数量
  469. updateVinNums(data){
  470. this.updatePartList(data,'vinPartList')
  471. },
  472. // 修改其它配件上的数量
  473. updateNums(data){
  474. this.updatePartList(data,'partList')
  475. },
  476. // 点击购物车修改数量
  477. updateCartNums(data){
  478. console.log(data)
  479. if(!data.value){
  480. const index = this.partListData.findIndex(item => 'cart_'+item.productSn == data.index)
  481. if(index>=0){
  482. this.partListData.splice(index,1)
  483. }
  484. if(this.partListData.length==0){
  485. this.showCart = false
  486. }
  487. }
  488. // 同步更新Vin适配配件列表上的
  489. const vinprow = this.vinPartList.find(item => 'cart_'+item.productSn == data.index)
  490. if(vinprow){
  491. vinprow.qty = data.value
  492. vinprow.checked = !!data.value
  493. this.vinPartList.splice()
  494. }
  495. // 同步更新其它配件列表上的
  496. const prow = this.partList.find(item => 'cart_'+item.productSn == data.index)
  497. if(prow){
  498. prow.qty = data.value
  499. prow.checked = !!data.value
  500. this.partList.splice()
  501. }
  502. },
  503. // 打开购物车
  504. openCart(){
  505. if(this.partListData.length){
  506. this.showCart=!this.showCart
  507. }else{
  508. uni.showToast({
  509. icon: 'none',
  510. title: '请选择配件'
  511. })
  512. }
  513. },
  514. // 格式化数据
  515. formatData(){
  516. const partList = []
  517. const tempList = []
  518. this.partListData.map(item => {
  519. if(item.currentInven){
  520. partList.push({
  521. "productSn": item.productSn,
  522. "totalQty": item.qty
  523. })
  524. }else{
  525. tempList.push({
  526. "productSn": item.productSn,
  527. "qty": item.qty,
  528. "price": item.cost
  529. })
  530. }
  531. })
  532. return [partList,tempList]
  533. },
  534. // 立即提交
  535. submitForm(){
  536. // 游客去认证
  537. if(this.userInfo.sysUserFlag == '0'){
  538. // 未认证
  539. if(!this.storeApply || this.storeApply&&(!this.storeApply.auditStatus || this.storeApply.auditStatus == 'REFUSE')){
  540. this.showPopup = true
  541. }
  542. // 认证通过
  543. if(this.storeApply&&this.storeApply.auditStatus=='WAIT'){
  544. uni.showModal({
  545. title: '提示',
  546. content: '门店认证资料审核中,请耐心等待!',
  547. confirmText: '好的',
  548. showCancel: false
  549. })
  550. }
  551. }else{
  552. // 已认证用户
  553. if(this.partListData.length==0){
  554. uni.showToast({
  555. icon: 'none',
  556. title: '请选择配件'
  557. })
  558. return
  559. }
  560. // 开始提交
  561. const params = {
  562. shelfOrderDetailList: this.formatData()[0],
  563. tempBillDetailList: this.formatData()[1],
  564. vin: this.vinNumber,
  565. vehicleModel: this.modelLabel || '',
  566. vehicleLogo: this.carInfo.icon||'',
  567. }
  568. console.log(params,'立即提交')
  569. this.saveLoading = true
  570. saveShelfOrder(params).then(res => {
  571. console.log(res,'saveShelfOrder')
  572. if(res.status == 200){
  573. // 提交成功
  574. uni.redirectTo({
  575. url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
  576. })
  577. }else{
  578. // 或失败
  579. uni.redirectTo({
  580. url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:{remindMessage:res.message}}))+"&state=0"
  581. })
  582. }
  583. this.saveLoading = false
  584. })
  585. }
  586. }
  587. }
  588. }
  589. </script>
  590. <style lang="less">
  591. .choosePartByVin{
  592. height: 100vh;
  593. .cpb_header{
  594. background-color: #FFFFFF;
  595. padding: 10rpx;
  596. align-items: center;
  597. > div{
  598. padding: 10rpx;
  599. align-items: center;
  600. &:first-child{
  601. padding-right: 20rpx;
  602. }
  603. > div{
  604. &:first-child{
  605. padding-right: 20rpx;
  606. flex-grow: 1;
  607. color: #818b94;
  608. font-size: 24rpx;
  609. }
  610. }
  611. }
  612. .copyText{
  613. background-color: #EBEBEB;
  614. border-radius: 100rpx;
  615. padding: 0 20rpx;
  616. color: #033692;
  617. font-size: 20rpx;
  618. display: flex;
  619. align-items: center;
  620. justify-content: center;
  621. margin-left: 20rpx;
  622. }
  623. .carTits{
  624. font-size: 32rpx;
  625. font-weight: bold;
  626. color: #222222;
  627. line-height: normal;
  628. margin-bottom: 10rpx;
  629. flex-grow: 1;
  630. }
  631. .qhbtns{
  632. display: flex;
  633. align-items: center;
  634. justify-content: center;
  635. font-size: 20rpx;
  636. color: #0485F6;
  637. border:2rpx solid #0485F6;
  638. border-radius: 50rpx;
  639. background: rgba(88, 177, 255, 0.2);
  640. width: 200rpx;
  641. height: 36rpx;
  642. margin-left: 10rpx;
  643. }
  644. }
  645. .cpb_middle{
  646. flex-grow: 1;
  647. padding-top: 10rpx;
  648. overflow: auto;
  649. .slider-bar{
  650. width: 25%;
  651. background: #F5F6F7;
  652. height: 100%;
  653. overflow: auto;
  654. .tabs{
  655. > view{
  656. border-left: 6rpx solid #F5F6F7;
  657. padding: 30rpx 10rpx;
  658. font-size: 30rpx;
  659. color: #666E75;
  660. }
  661. .active{
  662. border-color: #0485F6;
  663. color: #0485F6;
  664. background: #fff;
  665. }
  666. }
  667. }
  668. .right-list{
  669. flex-grow: 1;
  670. background: #fff;
  671. height: 100%;
  672. width: 75%;
  673. .right-list-content{
  674. height: 100%;
  675. .nav-right-title{
  676. font-weight: bold;
  677. padding: 5upx 25upx;
  678. > text{
  679. color: #9E9E9E;
  680. font-weight: normal;
  681. }
  682. }
  683. .nav-right-item{
  684. padding: 15upx 25upx;
  685. border-bottom: 2rpx solid #f5f5f5;
  686. .item-info{
  687. padding-left: 20upx;
  688. flex-grow: 1;
  689. .item-name{
  690. font-size: 32upx;
  691. color: #191919;
  692. display: flex;
  693. align-items: center;
  694. >image{
  695. width: 38rpx;
  696. height: 38rpx;
  697. margin-right: 10rpx;
  698. }
  699. >text{
  700. flex: 1;
  701. word-break: break-all;
  702. }
  703. }
  704. .item-detail{
  705. .item-detail-info{
  706. padding: 10upx 0 4upx;
  707. > view{
  708. padding-bottom: 10rpx;
  709. align-items: center;
  710. .item-detail-text{
  711. color: #999;
  712. .phtxt{
  713. color: #0485F6;
  714. font-size: 28upx;
  715. }
  716. .item-price{
  717. color: #FB1E1E;
  718. font-size: 28upx;
  719. }
  720. }
  721. }
  722. }
  723. }
  724. }
  725. }
  726. }
  727. }
  728. }
  729. .cpb_footer{
  730. padding: 20rpx;
  731. background-color: #fff;
  732. align-items: center;
  733. justify-content: space-between;
  734. .cpb_cart{
  735. width: 84rpx;
  736. height: 84rpx;
  737. background-color: #0485F6;
  738. border-radius: 200rpx;
  739. display: flex;
  740. align-items: center;
  741. justify-content: center;
  742. position: relative;
  743. }
  744. > div{
  745. &:last-child{
  746. width: 40%;
  747. }
  748. }
  749. }
  750. .cpb_cart-mask{
  751. position: fixed;
  752. width: 100%;
  753. background: rgba(0,0,0,0.5);
  754. z-index: 900;
  755. bottom: 120rpx;
  756. top: 0;
  757. }
  758. .cpb_cart-box{
  759. background-color: #fff;
  760. position: absolute;
  761. width: 100%;
  762. z-index: 1000;
  763. bottom: 0;
  764. padding: 20rpx 0;
  765. border-radius: 30rpx 30rpx 0 0;
  766. max-height: 70vh;
  767. display: flex;
  768. flex-direction: column;
  769. .cpb_close{
  770. position: absolute;
  771. top: 20rpx;
  772. right: 20rpx;
  773. width: 70rpx;
  774. height: 70rpx;
  775. font-size: 32rpx;
  776. color: #999;
  777. }
  778. .cpb_cart-tit{
  779. text-align: center;
  780. padding: 20rpx;
  781. font-size: 36rpx;
  782. }
  783. .cpb_cart-list{
  784. padding: 20rpx 30rpx;
  785. overflow: auto;
  786. flex-grow: 1;
  787. > view{
  788. margin-bottom: 30rpx;
  789. }
  790. .item-name{
  791. font-size: 32rpx;
  792. .item-tempPart{
  793. background: #0055ff;
  794. color: #fff;
  795. border-radius: 1em;
  796. font-size: 0.8em;
  797. padding: 0 0.5em;
  798. }
  799. }
  800. .item-info{
  801. border-bottom:2rpx solid #f8f8f8;
  802. flex-grow: 1;
  803. padding-left: 0.8em;
  804. }
  805. .item-detail{
  806. .item-detail-info{
  807. padding: 10upx 0 4upx;
  808. > view{
  809. padding-bottom: 30rpx;
  810. align-items: center;
  811. .item-detail-text{
  812. color: #999;
  813. .phtxt{
  814. color: #0485F6;
  815. font-size: 28upx;
  816. }
  817. .item-price{
  818. color: #FB1E1E;
  819. font-size: 28upx;
  820. }
  821. }
  822. }
  823. }
  824. }
  825. }
  826. }
  827. }
  828. </style>