choosePart.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  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. getShelfProductType({
  309. codeList: this.vinCode,
  310. shelfSn: this.$store.state.vuex_storeShelf.shelfSn
  311. }).then(res => {
  312. console.log(res,'getShelfProductType')
  313. this.leve2Data = this.labelToPart(res.data || [])
  314. // 默认该车适用或全部
  315. this.selLeve2('all')
  316. })
  317. },
  318. // 单击二级菜单
  319. selLeve2 (v) {
  320. this.pageNo = 1
  321. this.partList = []
  322. this.vinPartList = []
  323. this.curLeve2 = v
  324. if(this.vinNumber){
  325. this.getVinShelfPartList()
  326. }
  327. this.getShelfProductList()
  328. },
  329. // 获取数字货架配件列表
  330. getShelfProductList(){
  331. const _this = this
  332. let params = {
  333. pageNo: this.pageNo,
  334. pageSize: this.pageSize,
  335. excludeCodeList: this.vinCode,
  336. productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2
  337. }
  338. _this.status = 'loading'
  339. getShelfProductList(params).then(res => {
  340. console.log(res,'获取数字货架配件列表')
  341. uni.hideLoading()
  342. if(res.status == 200){
  343. let list = res.data.list
  344. if (list && list.length){
  345. // 分页 拼接数据
  346. if (_this.pageNo != 1) {
  347. _this.partList = _this.partList ? _this.partList.concat(this.fiterChecked(list)) : this.fiterChecked(list)
  348. } else {
  349. _this.partList = this.fiterChecked(list)
  350. }
  351. this.total = res.data.count
  352. if (_this.partList.length == res.data.count) {
  353. _this.status = 'nomore'
  354. } else {
  355. _this.status = 'loadmore'
  356. }
  357. } else {
  358. _this.partList = list || []
  359. this.total = 0
  360. _this.status = 'nomore'
  361. }
  362. _this.noDataText = '暂无配件'
  363. }else{
  364. _this.status = 'loadmore'
  365. _this.partList = []
  366. this.total = 0
  367. _this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
  368. }
  369. })
  370. },
  371. // 根据客户vin查询该车可用数字货架中的配件
  372. getVinShelfPartList(){
  373. let params = {
  374. queryWord: this.queryWord,
  375. productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2,
  376. codeList: this.vinCode
  377. }
  378. this.vinStatus = 'loading'
  379. getShelfQueryList(params).then(res => {
  380. this.vinPartList = this.fiterChecked(res.data || [])
  381. this.vinStatus = 'nomore'
  382. })
  383. },
  384. // 过滤已选择的
  385. fiterChecked (list){
  386. this.partListData.map(item => {
  387. let p = list.find(k => {
  388. return k.productSn == item.productSn
  389. })
  390. if (p){
  391. p.checked = true
  392. p.qty = item.qty
  393. }
  394. })
  395. return list
  396. },
  397. // 加载更多
  398. onreachBottom () {
  399. if(this.partList.length < this.total ){
  400. this.pageNo++
  401. this.getShelfProductList()
  402. }else{
  403. this.status = "nomore"
  404. }
  405. },
  406. // 添加到购物车
  407. addPart(item){
  408. item.checked = true
  409. item.qty = 1
  410. this.partListData.unshift({
  411. id: item.id,
  412. productSn: item.productSn,
  413. name: item.name,
  414. unit: item.unit,
  415. price: item.price,
  416. cost: item.cost,
  417. currentInven: item.currentInven,
  418. code: item.code,
  419. qty: item.qty,
  420. images: item.images,
  421. checked: true,
  422. affiliation: item.affiliation
  423. })
  424. },
  425. // 更新配件列表数量
  426. updatePartList(data,type){
  427. const prow = this[type].find(item => item.productSn == data.index)
  428. const index = this.partListData.findIndex(item => item.productSn == data.index)
  429. // 删除
  430. if(!data.value){
  431. prow.checked = false
  432. if(index>=0){
  433. this.partListData.splice(index,1)
  434. }
  435. if(this.partListData.length==0){
  436. this.showCart = false
  437. }
  438. }else{
  439. this.partListData[index].qty = data.value
  440. this.partListData.splice()
  441. }
  442. },
  443. // 修改适配配件上数量
  444. updateVinNums(data){
  445. this.updatePartList(data,'vinPartList')
  446. },
  447. // 修改其它配件上的数量
  448. updateNums(data){
  449. this.updatePartList(data,'partList')
  450. },
  451. // 点击购物车修改数量
  452. updateCartNums(data){
  453. console.log(data)
  454. if(!data.value){
  455. const index = this.partListData.findIndex(item => 'cart_'+item.productSn == data.index)
  456. if(index>=0){
  457. this.partListData.splice(index,1)
  458. }
  459. if(this.partListData.length==0){
  460. this.showCart = false
  461. }
  462. }
  463. // 同步更新Vin适配配件列表上的
  464. const vinprow = this.vinPartList.find(item => 'cart_'+item.productSn == data.index)
  465. if(vinprow){
  466. vinprow.qty = data.value
  467. vinprow.checked = !!data.value
  468. this.vinPartList.splice()
  469. }
  470. // 同步更新其它配件列表上的
  471. const prow = this.partList.find(item => 'cart_'+item.productSn == data.index)
  472. if(prow){
  473. prow.qty = data.value
  474. prow.checked = !!data.value
  475. this.partList.splice()
  476. }
  477. },
  478. // 打开购物车
  479. openCart(){
  480. if(this.partListData.length){
  481. this.showCart=!this.showCart
  482. }else{
  483. uni.showToast({
  484. icon: 'none',
  485. title: '请选择配件'
  486. })
  487. }
  488. },
  489. // 格式化数据
  490. formatData(){
  491. const partList = []
  492. const tempList = []
  493. this.partListData.map(item => {
  494. if(item.currentInven){
  495. partList.push({
  496. "productSn": item.productSn,
  497. "totalQty": item.qty
  498. })
  499. }else{
  500. tempList.push({
  501. "productSn": item.productSn,
  502. "qty": item.qty,
  503. "price": item.cost
  504. })
  505. }
  506. })
  507. return [partList,tempList]
  508. },
  509. // 立即提交
  510. submitForm(){
  511. // 游客去认证
  512. if(this.userInfo.sysUserFlag == '0'){
  513. this.showPopup = true
  514. return
  515. }
  516. if(this.partListData.length==0){
  517. uni.showToast({
  518. icon: 'none',
  519. title: '请选择配件'
  520. })
  521. return
  522. }
  523. // 开始提交
  524. const params = {
  525. shelfOrderDetailList: this.formatData()[0],
  526. tempBillDetailList: this.formatData()[1],
  527. vin: this.vinNumber,
  528. vehicleModel: this.modelLabel || '',
  529. vehicleLogo: this.carInfo.icon||'',
  530. }
  531. console.log(params,'立即提交')
  532. this.saveLoading = true
  533. saveShelfOrder(params).then(res => {
  534. console.log(res,'saveShelfOrder')
  535. if(res.status == 200){
  536. // 提交成功
  537. uni.redirectTo({
  538. url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
  539. })
  540. }else{
  541. // 或失败
  542. uni.redirectTo({
  543. url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:{remindMessage:res.message}}))+"&state=0"
  544. })
  545. }
  546. this.saveLoading = false
  547. })
  548. }
  549. }
  550. }
  551. </script>
  552. <style lang="less">
  553. .choosePartByVin{
  554. height: 100vh;
  555. .cpb_header{
  556. background-color: #FFFFFF;
  557. padding: 10rpx;
  558. align-items: center;
  559. > div{
  560. padding: 10rpx;
  561. align-items: center;
  562. &:first-child{
  563. padding-right: 20rpx;
  564. }
  565. > div{
  566. &:first-child{
  567. padding-right: 20rpx;
  568. flex-grow: 1;
  569. color: #818b94;
  570. font-size: 24rpx;
  571. }
  572. }
  573. }
  574. .copyText{
  575. background-color: #EBEBEB;
  576. border-radius: 100rpx;
  577. padding: 0 20rpx;
  578. color: #033692;
  579. font-size: 20rpx;
  580. display: flex;
  581. align-items: center;
  582. justify-content: center;
  583. margin-left: 20rpx;
  584. }
  585. .carTits{
  586. font-size: 32rpx;
  587. font-weight: bold;
  588. color: #222222;
  589. line-height: normal;
  590. margin-bottom: 10rpx;
  591. flex-grow: 1;
  592. }
  593. .qhbtns{
  594. display: flex;
  595. align-items: center;
  596. justify-content: center;
  597. font-size: 20rpx;
  598. color: #0485F6;
  599. border:2rpx solid #0485F6;
  600. border-radius: 50rpx;
  601. background: rgba(88, 177, 255, 0.2);
  602. width: 200rpx;
  603. height: 36rpx;
  604. margin-left: 10rpx;
  605. }
  606. }
  607. .cpb_middle{
  608. flex-grow: 1;
  609. padding-top: 10rpx;
  610. overflow: auto;
  611. .slider-bar{
  612. width: 25%;
  613. background: #F5F6F7;
  614. height: 100%;
  615. overflow: auto;
  616. .tabs{
  617. > view{
  618. border-left: 6rpx solid #F5F6F7;
  619. padding: 30rpx 10rpx;
  620. font-size: 30rpx;
  621. color: #666E75;
  622. }
  623. .active{
  624. border-color: #0485F6;
  625. color: #0485F6;
  626. background: #fff;
  627. }
  628. }
  629. }
  630. .right-list{
  631. flex-grow: 1;
  632. background: #fff;
  633. height: 100%;
  634. width: 75%;
  635. .right-list-content{
  636. height: 100%;
  637. .nav-right-title{
  638. font-weight: bold;
  639. padding: 5upx 25upx;
  640. > text{
  641. color: #9E9E9E;
  642. font-weight: normal;
  643. }
  644. }
  645. .nav-right-item{
  646. padding: 15upx 25upx;
  647. border-bottom: 2rpx solid #f5f5f5;
  648. .item-info{
  649. padding-left: 20upx;
  650. flex-grow: 1;
  651. .item-name{
  652. font-size: 32upx;
  653. color: #191919;
  654. display: flex;
  655. align-items: center;
  656. >image{
  657. width: 38rpx;
  658. height: 38rpx;
  659. margin-right: 10rpx;
  660. }
  661. >text{
  662. flex: 1;
  663. word-break: break-all;
  664. }
  665. }
  666. .item-detail{
  667. .item-detail-info{
  668. padding: 10upx 0 4upx;
  669. > view{
  670. padding-bottom: 10rpx;
  671. align-items: center;
  672. .item-detail-text{
  673. color: #999;
  674. .phtxt{
  675. color: #0485F6;
  676. font-size: 28upx;
  677. }
  678. .item-price{
  679. color: #FB1E1E;
  680. font-size: 28upx;
  681. }
  682. }
  683. }
  684. }
  685. }
  686. }
  687. }
  688. }
  689. }
  690. }
  691. .cpb_footer{
  692. padding: 20rpx;
  693. background-color: #fff;
  694. align-items: center;
  695. justify-content: space-between;
  696. .cpb_cart{
  697. width: 84rpx;
  698. height: 84rpx;
  699. background-color: #0485F6;
  700. border-radius: 200rpx;
  701. display: flex;
  702. align-items: center;
  703. justify-content: center;
  704. position: relative;
  705. }
  706. > div{
  707. &:last-child{
  708. width: 40%;
  709. }
  710. }
  711. }
  712. .cpb_cart-mask{
  713. position: fixed;
  714. width: 100%;
  715. background: rgba(0,0,0,0.5);
  716. z-index: 900;
  717. bottom: 120rpx;
  718. top: 0;
  719. }
  720. .cpb_cart-box{
  721. background-color: #fff;
  722. position: absolute;
  723. width: 100%;
  724. z-index: 1000;
  725. bottom: 0;
  726. padding: 20rpx 0;
  727. border-radius: 30rpx 30rpx 0 0;
  728. max-height: 70vh;
  729. display: flex;
  730. flex-direction: column;
  731. .cpb_close{
  732. position: absolute;
  733. top: 20rpx;
  734. right: 20rpx;
  735. width: 70rpx;
  736. height: 70rpx;
  737. font-size: 32rpx;
  738. color: #999;
  739. }
  740. .cpb_cart-tit{
  741. text-align: center;
  742. padding: 20rpx;
  743. font-size: 36rpx;
  744. }
  745. .cpb_cart-list{
  746. padding: 20rpx 30rpx;
  747. overflow: auto;
  748. flex-grow: 1;
  749. > view{
  750. margin-bottom: 30rpx;
  751. }
  752. .item-name{
  753. font-size: 32rpx;
  754. .item-tempPart{
  755. background: #0055ff;
  756. color: #fff;
  757. border-radius: 1em;
  758. font-size: 0.8em;
  759. padding: 0 0.5em;
  760. }
  761. }
  762. .item-info{
  763. border-bottom:2rpx solid #f8f8f8;
  764. flex-grow: 1;
  765. padding-left: 0.8em;
  766. }
  767. .item-detail{
  768. .item-detail-info{
  769. padding: 10upx 0 4upx;
  770. > view{
  771. padding-bottom: 30rpx;
  772. align-items: center;
  773. .item-detail-text{
  774. color: #999;
  775. .phtxt{
  776. color: #0485F6;
  777. font-size: 28upx;
  778. }
  779. .item-price{
  780. color: #FB1E1E;
  781. font-size: 28upx;
  782. }
  783. }
  784. }
  785. }
  786. }
  787. }
  788. }
  789. }
  790. </style>