choosePart.vue 21 KB

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