choosePart.vue 22 KB

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