promoDetail.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829
  1. <template>
  2. <view class="video-pagesCons">
  3. <view class="tab-search">
  4. <u-search placeholder="请输入产品名称/轮胎规格" shape="round" :clearabled="true" show-action v-model="queryWord" @clear="pageInit" @search="pageInit" @custom="pageInit"></u-search>
  5. </view>
  6. <view class="tab-body">
  7. <!-- <scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom"> -->
  8. <view class="product-list" v-if="list.length">
  9. <view
  10. class="check-order-list"
  11. v-for="(item,index) in list"
  12. :key="item.id"
  13. >
  14. <view class="video-item">
  15. <view>
  16. <u-image :src="item.productImage+'?x-oss-process=image/resize,p_50'" height="140px" width="100%"></u-image>
  17. <view class="back-price" v-if="item.promoRuleValue">返<text>{{item.promoRuleValue}}</text>元</view>
  18. <view class="product-code">{{item.productCode}}</view>
  19. </view>
  20. <view>
  21. <view class="product-name">{{item.productName}}</view>
  22. <view class="product-guige ellipsis-two">{{item.productOrigCode}}</view>
  23. <view class="product-button">
  24. <view class="price-txt">¥<text>{{item.cost}}</text></view>
  25. <view @click="chooseProduct(item)">
  26. <!-- <view class="cart-add" :class="!item.checked?'colr-add':'colr-checks'">
  27. <u-icon v-if="!item.checked" color="#fff" name="plus"></u-icon>
  28. <view v-else>
  29. <u-icon name="plus" color="#fff"></u-icon>{{item.qty}}
  30. </view>
  31. </view> -->
  32. <u-button v-if="!item.checked" :throttle-time="50" @click="chooseProduct(item)" size="mini" type="primary" shape="circle"><u-icon name="plus"></u-icon></u-button>
  33. <u-button v-else :throttle-time="50" @click="chooseProduct(item)" size="mini" type="success" shape="circle"><u-icon name="plus"></u-icon>{{item.qty}}</u-button>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view style="padding: 20upx;">
  41. <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
  42. <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
  43. </view>
  44. <!-- </scroll-view> -->
  45. </view>
  46. <!-- 底部栏 -->
  47. <view class="bottom-bar" @click="clearAction" v-if="total>0">
  48. <view class="bottom-bar-left">
  49. <view class="bottom-bar-left-item">
  50. <view class="bottom-bar-left-item-icon" @click="openChoose">
  51. <u-icon name="shopping-cart" size="40"></u-icon>
  52. <u-badge type="error" :count="totalNum" :offset="[-7,-8]"></u-badge>
  53. </view>
  54. </view>
  55. <view class="bottom-bar-left-item" v-if="showChoosePopu">
  56. 合计:<view class="price-txt">¥<text>{{totalAmount}}</text></view>
  57. </view>
  58. </view>
  59. <view :class="'bottom-bar-right bg-'+(showChoosePopu?'1':'0')" @click="submitOrder">
  60. <view class="bottom-bar-right-item">{{showChoosePopu?'确认采购':'去结算'}}</view>
  61. </view>
  62. </view>
  63. <!-- 分页 -->
  64. <view class="pages-box" v-if="showPage">
  65. <uni-pages-nav :totalPages="totalPages" :currentPage="pageNo" @pagechanged="pagechanged"></uni-pages-nav>
  66. </view>
  67. <!-- 已选列表 -->
  68. <page-container
  69. :show="showChoosePopu"
  70. :round="true"
  71. position="bottom"
  72. custom-style="height:90%"
  73. @enter="openRender"
  74. @afterleave="closePopu">
  75. <scroll-view :style="{width:screenWidth + 'px',height:'100%'}" scroll-y="true">
  76. <view class="choose-title">
  77. <view class="flex align_center">
  78. <view>已选<text class="p-nums">{{chooseLength}}</text>款产品 </view>
  79. <u-button @click="claerChoose" size="mini" type="error" plain style="margin: 0 20upx;">清空列表</u-button>
  80. <text class="choose-inf">左滑删除产品</text>
  81. </view>
  82. <view class="choose-close" @click="showChoosePopu=false">
  83. <u-icon name="close" size="30"></u-icon>
  84. </view>
  85. </view>
  86. <view class="choose-product-list" v-if="showSwipeAction">
  87. <u-swipe-action
  88. :show="item.show"
  89. v-for="(item, index) in chooseProductList"
  90. :index="item.id"
  91. :key="item.id"
  92. @click="chooseClick"
  93. @open="chooseOpen"
  94. :options="chooseOptions"
  95. >
  96. <view class="choose-product-item" :style="{width:(screenWidth-20) + 'px'}">
  97. <view>
  98. <view class="choose-product-item-img">
  99. <u-image :src="item.productImage+'?x-oss-process=image/resize,p_50'" height="200rpx" width="100%"></u-image>
  100. <view class="back-price" v-if="item.promoRuleValue">返<text>{{item.promoRuleValue}}</text>元</view>
  101. <view class="choose-product-item-left-info-code">{{item.productCode}}</view>
  102. </view>
  103. <view class="choose-product-item-info">
  104. <view class="choose-product-item-left-info-name">{{item.productName}}</view>
  105. <view class="choose-product-item-left-info-guige ellipsis-two">{{item.productOrigCode}}</view>
  106. <view class="choose-product-item-left-info-price">
  107. <view class="price-txt">¥<text>{{item.cost}}</text></view>
  108. <view>
  109. <u-number-box v-model="item.qty" :index="item.id" :input-width="60" :input-height="60" size="mini" :min="1" @change="changeQty"></u-number-box>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </u-swipe-action>
  116. <!-- 分页 -->
  117. <view class="choose-product-pages" v-if="totalSelPages>1">
  118. <uni-pages-nav :totalPages="totalSelPages" :showShadow="false" :currentPage="choosePageNo" @pagechanged="onreachPopuBottom"></uni-pages-nav>
  119. </view>
  120. </view>
  121. </scroll-view>
  122. </page-container>
  123. </view>
  124. </template>
  125. <script>
  126. import {
  127. mapState,
  128. mapMutations,
  129. } from 'vuex'
  130. import { queryPromoProductByPage } from '@/api/video.js'
  131. import { purchaseSave } from '@/api/purchase.js'
  132. export default {
  133. data() {
  134. return {
  135. status: 'loading',
  136. noDataText: '暂无数据',
  137. queryWord: '',// 关键词查询列表
  138. // 查询条件
  139. pageNo: 1, // 当前页
  140. pageSize: 24,//每页条数
  141. list: [], // 产品列表
  142. total: 0, // 总记录
  143. showChoosePopu: false,//已选列表弹框
  144. chooseList:[], // 已选数据
  145. chooseProductList:[], // 已选弹框中当前数据
  146. chooseOptions:[
  147. {
  148. text: '删除',
  149. style: {
  150. backgroundColor: '#dd524d'
  151. }
  152. }
  153. ], // 左滑删除已选产品
  154. screenWidth: 750, // 屏幕宽度
  155. showSwipeAction: false, // 已选弹框是否一打开
  156. choosePageNo: 1, // 已选产品当前页
  157. choosePageSize: 6, // 已选产品每页数
  158. chooseTotal: 0 ,// 已选产品总记录数
  159. promoActiveSn: null, // 活动sn
  160. submitOk: false,
  161. // 分页
  162. showPage: false,
  163. maxScrollTop: 0
  164. }
  165. },
  166. computed: {
  167. ...mapState(['hasLogin']),
  168. userInfo(){
  169. return this.$store.state.vuex_userInfo
  170. },
  171. // 已选产品总款数
  172. chooseLength(){
  173. return this.chooseList.length
  174. },
  175. // 已选产品总金额
  176. totalAmount(){
  177. let total = 0
  178. this.chooseList.forEach(key => {
  179. total = total + key.cost * key.qty
  180. })
  181. return total.toFixed(2)
  182. },
  183. // 已选产品总数量
  184. totalNum(){
  185. let total = 0
  186. this.chooseList.forEach(key => {
  187. total = total + key.qty
  188. })
  189. return total
  190. },
  191. // 总页数
  192. totalPages(){
  193. return Math.ceil(this.total / this.pageSize)
  194. },
  195. // 已选产品分页总数
  196. totalSelPages(){
  197. return Math.ceil(this.chooseTotal/this.choosePageSize)
  198. }
  199. },
  200. onLoad(opts) {
  201. uni.setNavigationBarTitle({
  202. title: opts.title||'促销活动产品'
  203. })
  204. this.screenWidth = uni.getSystemInfoSync().windowWidth
  205. this.$store.state.vuex_tempData = null
  206. this.promoActiveSn = opts.promoActiveSn
  207. // 购物车是否有缓存
  208. const cacheList = this.$store.state.vuex_cartList.find(k => k.sn == this.promoActiveSn)
  209. this.chooseList = cacheList ? JSON.parse(JSON.stringify(cacheList.list)) : []
  210. // 查询产品列表
  211. this.pageInit()
  212. },
  213. onShow() {
  214. this.showChoosePopu=false
  215. },
  216. onUnload() {
  217. // 存储已选列表值
  218. const hasCache = this.$store.state.vuex_cartList.find(k => k.sn == this.promoActiveSn)
  219. if(hasCache){
  220. hasCache.list = this.chooseList
  221. }else{
  222. this.$store.state.vuex_cartList.push({sn:this.promoActiveSn,list: this.chooseList})
  223. }
  224. this.$u.vuex('vuex_cartList', this.$store.state.vuex_cartList)
  225. // 清空数据
  226. this.chooseList = null
  227. this.list = null
  228. },
  229. // 到底部加载更多
  230. onReachBottom() {
  231. this.showPage = true
  232. if(this.list.length < this.total){
  233. // this.pageNo += 1
  234. // this.getRow()
  235. }else{
  236. this.status = "nomore"
  237. }
  238. },
  239. onPageScroll(e){
  240. if(this.showPage && this.maxScrollTop == 0){
  241. this.maxScrollTop = e.scrollTop
  242. }
  243. // console.log(this.maxScrollTop , e.scrollTop)
  244. if(this.showPage && this.maxScrollTop>0 && (e.scrollTop < (this.maxScrollTop/10)*9)){
  245. this.showPage = false
  246. }
  247. // 最后一页显示
  248. if(this.pageNo >= this.totalPages){
  249. this.showPage = true
  250. }
  251. },
  252. methods: {
  253. pagechanged(page){
  254. this.pageNo = page
  255. this.getRow()
  256. },
  257. // 初始化页面
  258. pageInit(){
  259. // 重置分页
  260. this.total = 0
  261. this.pageNo = 1
  262. this.list = []
  263. // 获取列表数据
  264. this.getRow()
  265. },
  266. // 添加已选产品
  267. chooseProduct(item){
  268. if(!item.checked){
  269. item.checked = true
  270. item.qty = 1
  271. item.show = false
  272. this.chooseList.unshift(this.$u.deepClone(item))
  273. }else{
  274. item.qty = item.qty + 1
  275. // 已添加,则增加数量
  276. const row = this.chooseList.find(key => key.id == item.id)
  277. if(row){
  278. row.qty = row.qty + 1
  279. }
  280. this.chooseList.splice()
  281. }
  282. },
  283. // 渲染已选产品列表
  284. openRender(){
  285. setTimeout(()=>{
  286. this.showSwipeAction = true
  287. },100)
  288. },
  289. // 关闭已选列表弹框
  290. closePopu(){
  291. this.chooseProductList = []
  292. this.showChoosePopu=false
  293. if(this.submitOk){
  294. uni.hideLoading()
  295. const item = this.$store.state.vuex_tempData
  296. uni.navigateTo({
  297. url: "/pagesB/procureOrder?purchaseSn="+item.purchaseSn+"&state="+item.billStatus
  298. })
  299. }
  300. },
  301. // 打开已选产品列表
  302. openChoose(){
  303. this.submitOk = false
  304. if(this.chooseLength){
  305. this.showChoosePopu = !this.showChoosePopu
  306. if(this.showChoosePopu){
  307. console.log(this.chooseList)
  308. // 默认加载第一页数据
  309. this.chooseTotal = this.chooseList.length
  310. this.choosePageNo = 0
  311. // this.onreachPopuBottom()
  312. this.onreachPopuBottom(1)
  313. }
  314. }else{
  315. this.$u.toast(`请选择产品`);
  316. }
  317. },
  318. // 已选产品滚动到底部
  319. onreachPopuBottom(pages){
  320. console.log(pages)
  321. this.chooseProductList = []
  322. console.log(pages,this.totalSelPages)
  323. // if(this.choosePageNo>=this.totalSelPages){
  324. // return
  325. // }
  326. uni.showLoading({
  327. title: '加载中',
  328. mask: true
  329. })
  330. // this.choosePageNo = this.choosePageNo + 1
  331. this.choosePageNo = pages
  332. const start = (this.choosePageNo-1)*this.choosePageSize
  333. const end = this.choosePageNo*this.choosePageSize
  334. const list = this.chooseTotal > this.choosePageSize ? this.chooseList.slice(start,end>this.chooseTotal?this.chooseTotal:end) : this.chooseList
  335. // this.chooseProductList = this.chooseProductList.concat(list)
  336. this.chooseProductList = list
  337. // this.chooseProductList.splice()
  338. this.$nextTick(()=>{
  339. uni.hideLoading()
  340. })
  341. },
  342. // 已选产品变更数量
  343. changeQty(e){
  344. const _this = this
  345. const rowIndex = this.chooseProductList.findIndex(key => key.id == e.index)
  346. if(e.value>0){
  347. this.chooseProductList[rowIndex].qty = e.value
  348. // 更新原始数据
  349. const rindex = this.chooseList.findIndex(key => key.id == e.index)
  350. if(rindex>=0){
  351. this.chooseList[rindex].qty = e.value
  352. this.chooseList.splice()
  353. }
  354. // 更新页面产品数据
  355. const aindex = this.list.findIndex(key => key.id == e.index)
  356. if(aindex>=0){
  357. this.list[aindex].qty = e.value
  358. this.list.splice()
  359. }
  360. }else{
  361. // 数量为0时,删除
  362. // this.chooseClick(e.index,0)
  363. }
  364. },
  365. //已选产品删除
  366. chooseClick(index, btns){
  367. if(btns == 0) {
  368. // 更新列表已选状态
  369. const row = this.list.find(item => item.id == index)
  370. if(row){
  371. row.checked = false
  372. row.qty = 0
  373. }
  374. const rindex = this.chooseProductList.findIndex(item => item.id == index)
  375. if(rindex>=0){
  376. this.chooseProductList.splice(rindex, 1);
  377. // this.chooseList.splice(rindex, 1);
  378. }
  379. const aindex = this.chooseList.findIndex(item => item.id == index)
  380. if(aindex>=0){
  381. this.chooseList.splice(aindex, 1);
  382. }
  383. // 重新计算分页,并更新当前页
  384. this.chooseTotal = this.chooseList.length
  385. this.onreachPopuBottom(this.choosePageNo>this.totalSelPages?this.totalSelPages:this.choosePageNo)
  386. // 如果数量小于每页数量,自动加载下一页
  387. // if(this.chooseProductList.length < this.choosePageSize){
  388. // this.onreachPopuBottom()
  389. // }
  390. // 如果没有数据了
  391. if(this.chooseTotal==0){
  392. this.clearChooseData()
  393. }
  394. this.$u.toast(`删除成功!`);
  395. }
  396. },
  397. // 同时打开一个
  398. chooseOpen(index){
  399. // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
  400. // 原本为'false',再次设置为'false'会无效
  401. const row = this.chooseProductList.find(item => item.id == index)
  402. if(row) {
  403. row.show = true
  404. }
  405. this.chooseProductList.map((item, idx) => {
  406. if(index != item.id) this.chooseProductList[idx].show = false;
  407. })
  408. },
  409. // 清除滑动按钮
  410. clearAction(){
  411. this.chooseProductList.map(item => {
  412. item.show = false
  413. })
  414. this.chooseProductList.splice()
  415. },
  416. // 确定清空已选列表
  417. claerChoose(){
  418. const _this = this
  419. uni.showModal({
  420. title: '提示',
  421. content: '确定清空已选列表?',
  422. confirmText: '确定',
  423. success(res) {
  424. if(res.confirm){
  425. _this.clearChooseData()
  426. }
  427. }
  428. })
  429. },
  430. // 清空已选数据
  431. clearChooseData(){
  432. this.chooseList = []
  433. this.chooseProductList = []
  434. this.showChoosePopu = false
  435. // nav.navigateBack()
  436. // 重置已选状态
  437. this.list.filter(item => item.checked).map(item=>{
  438. item.checked = false
  439. item.qty = 0
  440. })
  441. },
  442. // 查询列表
  443. getRow () {
  444. let _this = this
  445. let params = {
  446. pageNo: this.pageNo,
  447. pageSize: this.pageSize,
  448. queryWord: this.queryWord,
  449. promoActiveSn: this.promoActiveSn
  450. }
  451. this.status = "loading"
  452. uni.showLoading({
  453. title: '加载中',
  454. mask: true
  455. })
  456. queryPromoProductByPage(params).then(res => {
  457. if (res.code == 200 || res.status == 204 || res.status == 200) {
  458. const list = res.data.list||[]
  459. const ret = []
  460. // 更新已选状态
  461. list.map(k => {
  462. // 如果筛选或分页后,更新页面列表产品数量
  463. const hasChecked = this.chooseList.find(s=>s.id == k.id)
  464. ret.push({
  465. id: k.id,
  466. cost: k.cost,
  467. checked: hasChecked,
  468. qty: hasChecked ? hasChecked.qty : 0,
  469. productCode: k.productCode,
  470. productSn: k.productSn,
  471. productImage: k.productImage,
  472. productName: k.productName,
  473. productOrigCode: k.productOrigCode,
  474. promoActiveSn: k.promoActiveSn,
  475. promoRuleSn: k.promoRuleSn,
  476. promoRuleValue: k.promoRuleValue,
  477. promoRuleType: k.promoRuleType,
  478. show: false
  479. })
  480. })
  481. // _this.list = _this.list.concat(ret)
  482. _this.list = ret
  483. _this.total = res.data.count || 0
  484. } else {
  485. _this.list = []
  486. _this.total = 0
  487. _this.noDataText = res.message
  488. }
  489. // 滚动到顶部
  490. _this.$nextTick(()=>{
  491. _this.showPage = false
  492. uni.pageScrollTo({
  493. scrollTop: 0,
  494. duration: 300
  495. });
  496. uni.hideLoading()
  497. })
  498. _this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
  499. })
  500. },
  501. // 提交订单
  502. submitOrder(){
  503. if(this.showChoosePopu){
  504. uni.showLoading({
  505. title: '提交中...',
  506. mask: true
  507. })
  508. const detailList = []
  509. this.chooseList.map(item => {
  510. detailList.push({
  511. promoActiveSn: this.promoActiveSn,
  512. promoRuleSn:item.promoRuleSn,
  513. productSn:item.productSn,
  514. productCode:item.productCode,
  515. qty:item.qty,
  516. price:item.cost,
  517. giveAmount:item.promoRuleValue
  518. })
  519. })
  520. purchaseSave({
  521. promoActiveSn: this.promoActiveSn,
  522. detailList: detailList
  523. }).then(res => {
  524. if(res.status == 200){
  525. res.data.detailList = []
  526. this.$store.state.vuex_tempData = res.data
  527. this.clearChooseData()
  528. this.submitOk = true
  529. }else{
  530. uni.showToast({
  531. title: res.message,
  532. icon: 'none'
  533. })
  534. }
  535. })
  536. }else{
  537. this.openChoose()
  538. }
  539. },
  540. }
  541. }
  542. </script>
  543. <style lang="less">
  544. page{
  545. height: 100vh;
  546. .pages-box{
  547. position: fixed;
  548. left: 10%;
  549. bottom: 150rpx;
  550. z-index: 90;
  551. width: 80%;
  552. display: flex;
  553. justify-content: center;
  554. align-items: center;
  555. }
  556. }
  557. .video-pagesCons{
  558. height: 100vh;
  559. position: relative;
  560. .tab-search{
  561. padding: 15rpx 20rpx;
  562. background: #fff;
  563. position: fixed;
  564. top:0;
  565. left:0;
  566. width:100%;
  567. z-index:20;
  568. }
  569. .tab-body{
  570. display: flex;
  571. flex-direction: column;
  572. flex-grow: 1;
  573. padding: 90rpx 0 170rpx 0;
  574. .product-list{
  575. display: flex;
  576. flex-wrap: wrap;
  577. }
  578. .check-order-list{
  579. width: 50%;
  580. padding: 10upx;
  581. .video-item{
  582. background: #ffffff;
  583. border-radius: 10upx;
  584. box-shadow: 1px 1px 3px #EEEEEE;
  585. height: 100%;
  586. display: flex;
  587. flex-direction: column;
  588. > view{
  589. &:first-child{
  590. position: relative;
  591. overflow: hidden;
  592. border-bottom: 1px solid #eee;
  593. .product-code{
  594. color: #666;
  595. position: absolute;
  596. width: 100%;
  597. left:0;
  598. bottom:0;
  599. background: rgba(255,255,255,0.7);
  600. text-align: center;
  601. }
  602. }
  603. &:last-child{
  604. padding: 20rpx 20rpx 70rpx 20rpx;
  605. position: relative;
  606. flex-grow: 1;
  607. .product-name{
  608. font-size: 28rpx;
  609. }
  610. .product-guige{
  611. margin: 10rpx 0 20rpx 0;
  612. color: #2196F3;
  613. text{
  614. margin-right: 10rpx;
  615. }
  616. }
  617. }
  618. .product-button{
  619. display: flex;
  620. justify-content: space-between;
  621. align-items: center;
  622. position: absolute;
  623. bottom: 20rpx;
  624. left: 0;
  625. width: 100%;
  626. padding: 0 20rpx;
  627. }
  628. .cart-add{
  629. padding: 6rpx 15rpx;
  630. border-radius: 30rpx;
  631. background: #2196F3;
  632. color: #fff;
  633. display: flex;
  634. align-items: center;
  635. justify-content: center;
  636. font-size: 24rpx;
  637. }
  638. .colr-add{
  639. background: #2196F3;
  640. padding: 10rpx 20rpx;
  641. }
  642. .colr-checks{
  643. background: #00aa00;
  644. }
  645. }
  646. }
  647. }
  648. }
  649. .bottom-bar{
  650. height: 130upx;
  651. z-index: 200;
  652. background-color: #fff;
  653. display: flex;
  654. align-items: center;
  655. justify-content: space-between;
  656. font-size: 32upx;
  657. position: fixed;
  658. bottom:0;
  659. left:0;
  660. width:100%;
  661. .bottom-bar-left{
  662. padding: 0 30upx;
  663. flex-grow: 1;
  664. display: flex;
  665. align-items: center;
  666. }
  667. .bottom-bar-left-item{
  668. padding-right: 20rpx;
  669. font-size: 24rpx;
  670. display: flex;
  671. align-items: center;
  672. }
  673. .bottom-bar-left-item-icon{
  674. position: relative;
  675. background: #2196F3;
  676. padding: 20rpx;
  677. border-radius: 100%;
  678. color: #fff;
  679. }
  680. .bottom-bar-right{
  681. padding: 0 50rpx;
  682. height: 100%;
  683. background: #2196F3;
  684. display: flex;
  685. align-items: center;
  686. .bottom-bar-right-item{
  687. color: #fff;
  688. }
  689. }
  690. .bg-0{
  691. background: #2196F3;
  692. }
  693. .bg-1{
  694. background: #f44336;
  695. }
  696. }
  697. .price-txt{
  698. color: red;
  699. text{
  700. font-size: 36rpx;
  701. }
  702. }
  703. .choose-title{
  704. display: flex;
  705. align-items:center;
  706. justify-content: space-between;
  707. padding: 0 25rpx;
  708. position: fixed;
  709. background: #fff;
  710. width: 100%;
  711. z-index: 3;
  712. border-bottom: 1px solid #eee;
  713. border-radius: 40rpx 40rpx 0 0;
  714. > view{
  715. padding: 25rpx 0;
  716. }
  717. .p-nums{
  718. color: #2196F3;
  719. margin: 0 6rpx;
  720. }
  721. .choose-inf{
  722. color: #999;
  723. font-size: 24rpx;
  724. }
  725. .choose-close{
  726. padding: 25rpx 20rpx;
  727. }
  728. }
  729. .choose-product-pages{
  730. padding: 10rpx;
  731. display: flex;
  732. justify-content: center;
  733. position: absolute;
  734. left: 0;
  735. bottom: 150rpx;
  736. z-index: 20;
  737. width: 100%;
  738. }
  739. .choose-product-list{
  740. padding: 100rpx 20rpx 280rpx;
  741. width: 100%;
  742. position: relative;
  743. .choose-product-item{
  744. display: flex;
  745. align-items: center;
  746. justify-content: space-between;
  747. padding: 20rpx 0;
  748. border-bottom: 1px solid #eee;
  749. > view{
  750. display: flex;
  751. align-items: center;
  752. justify-content: space-between;
  753. flex-grow: 1;
  754. width: 100%;
  755. }
  756. .choose-product-item-img{
  757. margin-right: 20rpx;
  758. width: 35%;
  759. position: relative;
  760. overflow: hidden;
  761. border: 1px solid #eee;
  762. padding: 10rpx;
  763. .back-price{
  764. zoom: calc(0.8);
  765. }
  766. .choose-product-item-left-info-code{
  767. color: #666;
  768. position: absolute;
  769. width: 100%;
  770. left:0;
  771. bottom:0;
  772. background: rgba(255,255,255,0.7);
  773. text-align: center;
  774. }
  775. }
  776. .choose-product-item-info{
  777. margin-right: 10rpx;
  778. width: 65%;
  779. flex-grow: 1;
  780. .choose-product-item-left-info-price{
  781. display: flex;
  782. align-items:center;
  783. justify-content: space-between;
  784. >view{
  785. &:last-child{
  786. display: flex;
  787. align-items:center;
  788. }
  789. }
  790. }
  791. .choose-product-item-left-info-name{
  792. font-size: 28rpx;
  793. }
  794. .choose-product-item-left-info-guige{
  795. color: #2196F3;
  796. margin: 10rpx 0;
  797. text{
  798. margin-right: 10rpx;
  799. }
  800. }
  801. }
  802. }
  803. }
  804. .back-price{
  805. padding: 6rpx 65rpx;
  806. background: rgba(255 ,87 ,34 , 1);
  807. position: absolute;
  808. top: 18rpx;
  809. right: -45rpx;
  810. color: #fff;
  811. z-index: 2;
  812. font-size: 20rpx;
  813. text-align: center;
  814. transform: rotate(40deg);
  815. display: flex;
  816. align-items: center;
  817. text{
  818. font-size: 28rpx;
  819. margin: 0 5rpx;
  820. }
  821. }
  822. }
  823. </style>