choosePart.vue 21 KB

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