choosePart.vue 21 KB

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