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. <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">库存:{{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">¥{{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" 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" 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:'#1283d4'}" 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" 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" 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" :style="{background: partListData.length==0?'#eee':''}" @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:'#1283d4',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" >库存:{{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">¥{{item.price||0}}</text>
  174. </view>
  175. <view class="item-detail-text">
  176. <u-number-box @change="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. </view>
  187. </template>
  188. <script>
  189. import { getShelfProductList, getShelfProductType, queryPartCodeByVin, getShelfQueryList, saveShelfOrder } from '@/api/shelf'
  190. export default {
  191. data() {
  192. return {
  193. showOther: false,
  194. theme: '',
  195. vinNumber: '',
  196. leve2Data: [], // 二级菜单数据
  197. curLeve2: '', // 当前所选二级菜单
  198. carInfo: null,
  199. status: 'loading',
  200. vinStatus: 'loading',
  201. noDataText: '暂无配件',
  202. pageNo: 1,
  203. pageSize: 10,
  204. total: 0, // 列表总数
  205. noMore: false ,// 没有更多
  206. showCart: false, // 购物车
  207. carList:[], // 车型列表
  208. partList: [], // 配件列表
  209. partListData: [], // 已选配件
  210. vinPartList: [],
  211. isIphoneXup: false,
  212. saveLoading: false
  213. }
  214. },
  215. computed:{
  216. modelLabel(){
  217. return this.carInfo&&this.carInfo.text||''
  218. },
  219. cartNums(){
  220. let ret = 0
  221. this.partListData.map(item => {
  222. ret = ret + item.qty
  223. })
  224. return ret
  225. },
  226. dealerPhone(){
  227. const shelfInfo = this.$store.state.vuex_storeShelf
  228. return shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
  229. }
  230. },
  231. onLoad(opts) {
  232. this.theme = getApp().globalData.theme
  233. this.vinNumber = opts.vinNumber
  234. this.carInfo = opts.carList?JSON.parse(decodeURIComponent(opts.carList)):null
  235. // 获取vin 对应code
  236. this.getCarCodeByVin()
  237. },
  238. onShow() {
  239. this.$store.state.vuex_shelfChoosePart = []
  240. },
  241. methods: {
  242. callPhone() {
  243. if(this.dealerPhone!=''){
  244. uni.makePhoneCall({
  245. phoneNumber: this.dealerPhone
  246. })
  247. }
  248. },
  249. viewImg(item){
  250. uni.previewImage({
  251. urls: [item.images]
  252. })
  253. },
  254. // 复制
  255. copyVin(){
  256. uni.setClipboardData({
  257. data: this.vinNumber||'',
  258. })
  259. },
  260. // 格式化标签数据和配件分类数据一样
  261. labelToPart(data){
  262. let arr = []
  263. data.map(item => {
  264. arr.push({
  265. id: item.id || item.productTypeSn,
  266. label: item.name
  267. })
  268. })
  269. return arr
  270. },
  271. getCarCodeByVin(){
  272. queryPartCodeByVin({vinNumber:this.vinNumber}).then(res => {
  273. console.log(res,'this.vinCode')
  274. this.vinCode = res.data
  275. this.getShelfProductType()
  276. })
  277. },
  278. // 获取数字货架分类作为二级分类
  279. getShelfProductType(){
  280. getShelfProductType({
  281. codeList: this.vinCode,
  282. shelfSn: this.$store.state.vuex_storeShelf.shelfSn
  283. }).then(res => {
  284. console.log(res,'getShelfProductType')
  285. this.leve2Data = this.labelToPart(res.data || [])
  286. // 默认该车适用或全部
  287. this.selLeve2('all')
  288. })
  289. },
  290. // 单击二级菜单
  291. selLeve2 (v) {
  292. this.pageNo = 1
  293. this.partList = []
  294. this.vinPartList = []
  295. this.curLeve2 = v
  296. if(this.vinNumber){
  297. this.getVinShelfPartList()
  298. }
  299. this.getShelfProductList()
  300. },
  301. // 获取数字货架配件列表
  302. getShelfProductList(){
  303. const _this = this
  304. let params = {
  305. pageNo: this.pageNo,
  306. pageSize: this.pageSize,
  307. excludeCodeList: this.vinCode,
  308. productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2
  309. }
  310. _this.status = 'loading'
  311. getShelfProductList(params).then(res => {
  312. console.log(res,'获取数字货架配件列表')
  313. uni.hideLoading()
  314. if(res.status == 200){
  315. let list = res.data.list
  316. if (list && list.length){
  317. // 分页 拼接数据
  318. if (_this.pageNo != 1) {
  319. _this.partList = _this.partList ? _this.partList.concat(this.fiterChecked(list)) : this.fiterChecked(list)
  320. } else {
  321. _this.partList = this.fiterChecked(list)
  322. }
  323. this.total = res.data.count
  324. if (_this.partList.length == res.data.count) {
  325. _this.status = 'nomore'
  326. } else {
  327. _this.status = 'loadmore'
  328. }
  329. } else {
  330. _this.partList = list || []
  331. this.total = 0
  332. _this.status = 'nomore'
  333. }
  334. _this.noDataText = '暂无配件'
  335. }else{
  336. _this.status = 'loadmore'
  337. _this.partList = []
  338. this.total = 0
  339. _this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
  340. }
  341. })
  342. },
  343. // 根据客户vin查询该车可用数字货架中的配件
  344. getVinShelfPartList(){
  345. let params = {
  346. queryWord: this.queryWord,
  347. productTypeSn: this.curLeve2 == 'all' ? '' : this.curLeve2,
  348. codeList: this.vinCode
  349. }
  350. this.vinStatus = 'loading'
  351. getShelfQueryList(params).then(res => {
  352. this.vinPartList = this.fiterChecked(res.data || [])
  353. this.vinStatus = 'nomore'
  354. })
  355. },
  356. // 过滤已选择的
  357. fiterChecked (list){
  358. this.partListData.map(item => {
  359. let p = list.find(k => {
  360. return k.productSn == item.productSn
  361. })
  362. if (p){
  363. p.checked = true
  364. p.qty = item.qty
  365. }
  366. })
  367. return list
  368. },
  369. // 加载更多
  370. onreachBottom () {
  371. if(this.partList.length < this.total ){
  372. this.pageNo++
  373. this.getShelfProductList()
  374. }else{
  375. this.status = "nomore"
  376. }
  377. },
  378. // 添加到购物车
  379. addPart(item){
  380. item.checked = true
  381. item.qty = 1
  382. this.partListData.push({
  383. id: item.id,
  384. productSn: item.productSn,
  385. name: item.name,
  386. unit: item.unit,
  387. price: item.price,
  388. cost: item.cost,
  389. currentInven: item.currentInven,
  390. code: item.code,
  391. qty: item.qty,
  392. images: item.images,
  393. checked: true
  394. })
  395. },
  396. // 更新配件列表数量
  397. updatePartList(data,type){
  398. const prow = this[type].find(item => item.productSn == data.index)
  399. const index = this.partListData.findIndex(item => item.productSn == data.index)
  400. // 删除
  401. if(data.value == 0){
  402. prow.checked = false
  403. if(index>=0){
  404. this.partListData.splice(index,1)
  405. }
  406. if(this.partListData.length==0){
  407. this.showCart = false
  408. }
  409. }else{
  410. this.partListData[index].qty = data.value
  411. this.partListData.splice()
  412. }
  413. },
  414. // 修改适配配件上数量
  415. updateVinNums(data){
  416. this.updatePartList(data,'vinPartList')
  417. },
  418. // 修改其它配件上的数量
  419. updateNums(data){
  420. this.updatePartList(data,'partList')
  421. },
  422. // 点击购物车修改数量
  423. updateCartNums(data){
  424. console.log(data)
  425. if(data.value == 0){
  426. const index = this.partListData.findIndex(item => 'cart_'+item.productSn == data.index)
  427. if(index>=0){
  428. this.partListData.splice(index,1)
  429. }
  430. if(this.partListData.length==0){
  431. this.showCart = false
  432. }
  433. }
  434. // 同步更新Vin适配配件列表上的
  435. const vinprow = this.vinPartList.find(item => 'cart_'+item.productSn == data.index)
  436. if(vinprow){
  437. vinprow.qty = data.value
  438. vinprow.checked = !!data.value
  439. this.vinPartList.splice()
  440. }
  441. // 同步更新其它配件列表上的
  442. const prow = this.partList.find(item => 'cart_'+item.productSn == data.index)
  443. if(prow){
  444. prow.qty = data.value
  445. prow.checked = !!data.value
  446. this.partList.splice()
  447. }
  448. },
  449. // 打开购物车
  450. openCart(){
  451. if(this.partListData.length){
  452. this.showCart=!this.showCart
  453. }else{
  454. uni.showToast({
  455. icon: 'none',
  456. title: '请选择配件'
  457. })
  458. }
  459. },
  460. // 格式化数据
  461. formatData(){
  462. const partList = []
  463. const tempList = []
  464. this.partListData.map(item => {
  465. if(item.currentInven){
  466. partList.push({
  467. "productSn": item.productSn,
  468. "totalQty": item.qty
  469. })
  470. }else{
  471. tempList.push({
  472. "productSn": item.productSn,
  473. "qty": item.qty,
  474. "price": item.cost
  475. })
  476. }
  477. })
  478. return [partList,tempList]
  479. },
  480. // 立即提交
  481. submitForm(){
  482. if(this.partListData.length==0){
  483. uni.showToast({
  484. icon: 'none',
  485. title: '请选择配件'
  486. })
  487. return
  488. }
  489. // 开始提交
  490. const params = {
  491. shelfOrderDetailList: this.formatData()[0],
  492. tempBillDetailList: this.formatData()[1],
  493. vin: this.vinNumber,
  494. vehicleModel: this.modelLabel || '',
  495. vehicleLogo: this.carInfo.icon||'',
  496. }
  497. console.log(params,'立即提交')
  498. this.saveLoading = true
  499. saveShelfOrder(params).then(res => {
  500. console.log(res,'saveShelfOrder')
  501. if(res.status == 200){
  502. // 提交成功
  503. uni.redirectTo({
  504. url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
  505. })
  506. }else{
  507. // 或失败
  508. uni.redirectTo({
  509. url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({remindMessage:res.message}))+"&state=0"
  510. })
  511. }
  512. this.saveLoading = false
  513. })
  514. }
  515. }
  516. }
  517. </script>
  518. <style lang="less">
  519. .choosePartByVin{
  520. height: 100vh;
  521. .cpb_header{
  522. background-color: #FFFFFF;
  523. padding: 10rpx;
  524. align-items: center;
  525. > div{
  526. padding: 10rpx;
  527. align-items: center;
  528. &:first-child{
  529. padding-right: 20rpx;
  530. }
  531. > div{
  532. &:first-child{
  533. padding-right: 20rpx;
  534. flex-grow: 1;
  535. color: #818b94;
  536. font-size: 24rpx;
  537. }
  538. }
  539. }
  540. .copyText{
  541. background-color: #EBEBEB;
  542. border-radius: 100rpx;
  543. padding: 0 20rpx;
  544. color: #033692;
  545. font-size: 20rpx;
  546. display: flex;
  547. align-items: center;
  548. justify-content: center;
  549. margin-left: 20rpx;
  550. }
  551. .carTits{
  552. font-size: 32rpx;
  553. font-weight: bold;
  554. color: #222222;
  555. line-height: normal;
  556. margin-bottom: 10rpx;
  557. flex-grow: 1;
  558. }
  559. .qhbtns{
  560. display: flex;
  561. align-items: center;
  562. justify-content: center;
  563. font-size: 20rpx;
  564. color: #0485F6;
  565. border:2rpx solid #0485F6;
  566. border-radius: 50rpx;
  567. background: rgba(88, 177, 255, 0.2);
  568. width: 200rpx;
  569. height: 36rpx;
  570. margin-left: 10rpx;
  571. }
  572. }
  573. .cpb_middle{
  574. flex-grow: 1;
  575. padding-top: 10rpx;
  576. overflow: auto;
  577. .slider-bar{
  578. width: 25%;
  579. background: #F5F6F7;
  580. height: 100%;
  581. overflow: auto;
  582. .tabs{
  583. > view{
  584. border-left: 6rpx solid #F5F6F7;
  585. padding: 30rpx 10rpx;
  586. font-size: 30rpx;
  587. color: #666E75;
  588. }
  589. .active{
  590. border-color: #0485F6;
  591. color: #0485F6;
  592. background: #fff;
  593. }
  594. }
  595. }
  596. .right-list{
  597. flex-grow: 1;
  598. background: #fff;
  599. height: 100%;
  600. width: 75%;
  601. .right-list-content{
  602. height: 100%;
  603. .nav-right-title{
  604. font-weight: bold;
  605. padding: 5upx 25upx;
  606. > text{
  607. color: #9E9E9E;
  608. font-weight: normal;
  609. }
  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>