choosePart.vue 23 KB

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