You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

762 lines
20 KiB

6 months ago
  1. <template>
  2. <view>
  3. <!-- 占位 -->
  4. <!-- <view class="place"></view> -->
  5. <!-- 商品列表 -->
  6. <view class="goods-list">
  7. <!-- 空白页 -->
  8. <empty v-if="goodsList.length === 0" tip='购物车是空的哦'></empty>
  9. <view class="row" v-for="(row,index) in goodsList" :key="index">
  10. <!-- 删除按钮 -->
  11. <view class="menu" @tap.stop="deleteGoods(row.id)">
  12. <view class="icon shanchu"></view>
  13. </view>
  14. <!-- 商品 -->
  15. <view class="carrier" :class="[theIndex==index?'open':oldIndex==index?'close':'']" @touchstart="touchStart(index,$event)" @touchmove="touchMove(index,$event)" @touchend="touchEnd(index,$event)">
  16. <!-- checkbox -->
  17. <view class="checkbox-box" @tap="selected(index)" v-if="row.kucun">
  18. <view class="checkbox">
  19. <view :class="[row.selected?'on':'']"></view>
  20. </view>
  21. </view>
  22. <view class="checkbox-box" v-if="!row.kucun">
  23. <view class="sellq">售空</view>
  24. </view>
  25. <!-- 商品信息 -->
  26. <view class="goods-info" @tap="toGoods(row)">
  27. <view class="img">
  28. <image :src="row.img"></image>
  29. </view>
  30. <view class="info">
  31. <view class="title">{{row.mc}}{{row.gg}}{{row.dw}}</view>
  32. <!-- <view class="spec">{{row.gg}}</view> -->
  33. <view class="spbz" style="width: 100%;">
  34. <input style="font-size: 28upx; color: #41A863; height: 40upx; line-height: 40upx; min-height: 40upx;" type="text" :value="row.bz" @input="inputchangeBz($event,row.bz,row.id,index)" placeholder="输入备注">
  35. <input style="font-size: 28upx; color: #41A863; height: 40upx; line-height: 40upx; min-height: 40upx;" type="text" :value="row.fudw" @input="inputchangeFudw($event,row.fudw,row.id,index)" placeholder="输入副单位">
  36. </view>
  37. <view class="price-number" v-if="row.kucun">
  38. <view class="price" v-if="row.price>0">{{row.price}}</view>
  39. <view class="price" v-else></view>
  40. <!-- <view class="kucun">库存&nbsp;{{row.kucun}}</view> -->
  41. <view class="number">
  42. <view class="sub" @tap.stop="sub(index)">
  43. <view class="icon jian"></view>
  44. </view>
  45. <view class="input" @tap.stop="discard">
  46. <input type="digit" v-model="row.num" @input="sum($event,index)" />
  47. </view>
  48. <view class="add" @tap.stop="add(index)">
  49. <view class="icon jia"></view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="price-number" v-if="!row.kucun">
  54. <view class="deltip">左滑可删除</view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 脚部菜单 -->
  62. <view class="footer" :style="{bottom:footerbottom}">
  63. <view class="checkbox-box" @tap="allSelect">
  64. <view class="checkbox">
  65. <view :class="[isAllselected?'on':'']"></view>
  66. </view>
  67. <view class="text">全选</view>
  68. </view>
  69. <view class="delBtn" @tap="deleteList" v-if="selectedList.length>0">删除</view>
  70. <view class="settlement">
  71. <view class="sum">合计:<view class="money">{{sumPrice}}</view></view>
  72. <view class="btn" @tap="toConfirmation">结算({{selectedList.length}})</view>
  73. <!-- <view class="btn btn_gray" v-else> -->
  74. <!-- <text v-if="startingPrice>=0">{{-(sumPrice-startingPrice)|toFixed}}起送</text> -->
  75. <!-- </view> -->
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import empty from "@/components/empty";
  82. export default {
  83. components: {
  84. empty
  85. },
  86. data() {
  87. return {
  88. sumPrice:'0.00',
  89. headerPosition:"fixed",
  90. headerTop:null,
  91. statusTop:null,
  92. selectedList:[],
  93. isAllselected:false,
  94. goodsList:[],
  95. //控制滑动效果
  96. theIndex:null,
  97. oldIndex:null,
  98. isStop:false,
  99. //配送起步价
  100. startingPrice:0,
  101. }
  102. },
  103. onShow() {
  104. this.selectedList=[];
  105. this.goodsList=uni.getStorageSync('cartlist');
  106. let len = this.goodsList.length;
  107. let arr = [];
  108. if(len<=0){
  109. //this.$set('isAllselected',false);
  110. this.isAllselected=false;
  111. this.sumPrice=0;
  112. }else{
  113. //要删除的商品数组
  114. let delarrid=[];
  115. for(let i=0;i<len;i++){
  116. if(this.goodsList[i].num<=0){
  117. //数量num为0的商品放入到删除数组中
  118. delarrid.push(this.goodsList[i].id);
  119. }else{
  120. if(this.goodsList[i].selected==true){
  121. arr.push(this.goodsList[i].id);
  122. }
  123. }
  124. }
  125. //删除num为0的商品
  126. if(delarrid.length>0){
  127. for(let i=0;i<delarrid.length;i++){
  128. this.deleteGoods(delarrid[i])
  129. }
  130. if(this.goodsList.length<=0){
  131. this.isAllselected=false;
  132. }
  133. }else{
  134. this.selectedList = arr;
  135. this.isAllselected = this.selectedList.length == this.goodsList.length;
  136. }
  137. }
  138. this.sum();
  139. // this.selectedList=[]; //这里为什么要清空数据? 20231114
  140. },
  141. onPageScroll(e){
  142. //兼容iOS端下拉时顶部漂移
  143. this.headerPosition = e.scrollTop>=0?"fixed":"absolute";
  144. this.headerTop = e.scrollTop>=0?null:0;
  145. this.statusTop = e.scrollTop>=0?null:-this.statusHeight+'px';
  146. },
  147. //下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true
  148. onPullDownRefresh() {
  149. setTimeout(function () {
  150. uni.stopPullDownRefresh();
  151. }, 1000);
  152. },
  153. filters: {
  154. toFixed:function(x) {
  155. return parseFloat(x).toFixed(2);
  156. }
  157. },
  158. onLoad() {
  159. //兼容H5下结算条位置
  160. // #ifdef H5
  161. this.footerbottom = document.getElementsByTagName('uni-tabbar')[0].offsetHeight+'px';
  162. // #endif
  163. // #ifdef APP-PLUS
  164. this.statusHeight = plus.navigator.getStatusbarHeight();
  165. // #endif
  166. },
  167. methods: {
  168. async checkkc(gids) {
  169. let userinfo=uni.getStorageSync('userinfo')
  170. let reinfo=await this.$api.checkkc({action:'checkkc',gids:gids,uid:userinfo.uid});
  171. let getcheckarr=reinfo.data;
  172. let thisgoodlist=this.goodsList;
  173. if(getcheckarr){
  174. for(let i=0;i<getcheckarr.length;i++){
  175. for(let j=0;j<thisgoodlist.length;j++){
  176. if(getcheckarr[i].id==thisgoodlist[j].id){
  177. this.$set(this.goodsList[j],'kucun',getcheckarr[i].kucun);
  178. this.$set(this.goodsList[j], 'price', getcheckarr[i].price)
  179. }
  180. }
  181. }
  182. }
  183. },
  184. //加入商品 参数 goods:商品数据
  185. joinGoods(goods){
  186. /*
  187. * 这里只是展示一种添加逻辑模板并没有做从其他页面加入商品到购物车的具体动作
  188. * 在实际应用上前端并不会直接插入记录到goodsList这一个动作一般是更新列表和本地列表缓存
  189. * 一般商城购物车的增删改动作是由后端来完成的,
  190. * 后端记录后返回前端更新前端缓存
  191. */
  192. let len = this.goodsList.length;
  193. let isFind = false;//是否找到ID一样的商品
  194. for(let i=0;i<len;i++){
  195. let row = this.goodsList[i];
  196. if(row.id==goods.id )
  197. { //找到商品一样的商品
  198. this.goodsList[i].num++;//数量自增
  199. isFind = true;//找到一样的商品
  200. break;//跳出循环
  201. }
  202. }
  203. if(!isFind){
  204. //没有找到一样的商品,新增一行到购物车商品列表头部
  205. this.goodsList[i].unshift(goods);
  206. }
  207. },
  208. //控制左滑删除效果-begin
  209. touchStart(index,event){
  210. //多点触控不触发
  211. if(event.touches.length>1){
  212. this.isStop = true;
  213. return ;
  214. }
  215. this.oldIndex = this.theIndex;
  216. this.theIndex = null;
  217. //初始坐标
  218. this.initXY = [event.touches[0].pageX,event.touches[0].pageY];
  219. },
  220. touchMove(index,event){
  221. //多点触控不触发
  222. if(event.touches.length>1){
  223. this.isStop = true;
  224. return ;
  225. }
  226. let moveX = event.touches[0].pageX - this.initXY[0];
  227. let moveY = event.touches[0].pageY - this.initXY[1];
  228. if(this.isStop||Math.abs(moveX)<5){
  229. return ;
  230. }
  231. if (Math.abs(moveY) > Math.abs(moveX)){
  232. // 竖向滑动-不触发左滑效果
  233. this.isStop = true;
  234. return;
  235. }
  236. if(moveX<0){
  237. this.theIndex = index;
  238. this.isStop = true;
  239. }else if(moveX>0){
  240. if(this.theIndex!=null&&this.oldIndex==this.theIndex){
  241. this.oldIndex = index;
  242. this.theIndex = null;
  243. this.isStop = true;
  244. setTimeout(()=>{
  245. this.oldIndex = null;
  246. },150)
  247. }
  248. }
  249. },
  250. touchEnd(index,$event){
  251. //结束禁止触发效果
  252. this.isStop = false;
  253. },
  254. //控制左滑删除效果-end
  255. //商品跳转
  256. toGoods(e){
  257. // uni.showToast({title: '商品'+e.id,icon:"none"});
  258. // uni.navigateTo({
  259. // url: '../goods/goods'
  260. // });
  261. },
  262. //跳转确认订单页面
  263. toConfirmation(){
  264. let userinfo=uni.getStorageSync('userinfo')
  265. if(userinfo.uid==''||userinfo.uid==undefined){
  266. uni.showModal({
  267. title: '温馨提示',
  268. content: '您还没登录,请登录',
  269. success: function (res) {
  270. if (res.confirm) {
  271. uni.navigateTo({
  272. url:'/pages/user/login'
  273. })
  274. } else if (res.cancel) {
  275. //console.log('用户点击取消');
  276. }
  277. }
  278. });
  279. }else{
  280. let tmpList=[];
  281. let len = this.goodsList.length;
  282. for(let i=0;i<len;i++){
  283. if(this.goodsList[i].selected&&this.goodsList[i].kucun) {
  284. tmpList.push(this.goodsList[i]);
  285. }
  286. }
  287. if(tmpList.length<1){
  288. uni.showToast({
  289. title:'请选择商品结算',
  290. icon:'none'
  291. });
  292. return ;
  293. }
  294. uni.setStorage({
  295. key:'buylist',
  296. data:tmpList,
  297. success: () => {
  298. uni.navigateTo({
  299. url:'../orderconfirmation/orderconfirmation'
  300. })
  301. }
  302. })
  303. }
  304. },
  305. //删除商品
  306. deleteGoods(id){
  307. let len = this.goodsList.length;
  308. for(let i=0;i<len;i++){
  309. if(id==this.goodsList[i].id){
  310. this.goodsList.splice(i, 1);
  311. break;
  312. }
  313. }
  314. this.selectedList.splice(this.selectedList.indexOf(id), 1);
  315. //更新本地储存
  316. uni.setStorageSync('cartlist',this.goodsList);
  317. this.sum();
  318. this.oldIndex = null;
  319. this.theIndex = null;
  320. },
  321. // 删除商品s
  322. deleteList(){
  323. while (this.selectedList.length>0)
  324. {
  325. this.deleteGoods(this.selectedList[0]);
  326. }
  327. this.selectedList = [];
  328. this.isAllselected = this.selectedList.length == this.goodsList.length && this.goodsList.length>0;
  329. this.sum();
  330. },
  331. // 选中商品
  332. selected(index){
  333. this.goodsList[index].selected = this.goodsList[index].selected?false:true;
  334. let i = this.selectedList.indexOf(this.goodsList[index].id);
  335. i>-1?this.selectedList.splice(i, 1):this.selectedList.push(this.goodsList[index].id);
  336. this.isAllselected = this.selectedList.length == this.goodsList.length;
  337. this.sum();
  338. },
  339. //全选
  340. allSelect(){
  341. let len = this.goodsList.length;
  342. let arr = [];
  343. for(let i=0;i<len;i++){
  344. this.goodsList[i].selected = this.isAllselected? false : true;
  345. if(this.goodsList[i].kucun>0){
  346. arr.push(this.goodsList[i].id);
  347. }
  348. }
  349. this.selectedList = this.isAllselected?[]:arr;
  350. this.isAllselected = this.isAllselected||this.goodsList.length==0?false : true;
  351. this.sum();
  352. },
  353. // 减少数量
  354. sub(index){
  355. if(this.goodsList[index].num<=1){
  356. return;
  357. }
  358. this.goodsList[index].num--;
  359. this.goodsList[index].total=this.goodsList[index].num*this.goodsList[index].price
  360. //更新本地储存
  361. uni.setStorageSync('cartlist',this.goodsList);
  362. this.sum();
  363. },
  364. // 增加数量
  365. add(index){
  366. if(this.goodsList[index].kucun>this.goodsList[index].num){
  367. this.goodsList[index].num++;
  368. this.goodsList[index].total=this.goodsList[index].num*this.goodsList[index].price
  369. //更新本地储存
  370. uni.setStorageSync('cartlist',this.goodsList);
  371. this.sum();
  372. }else{
  373. uni.showToast({
  374. title:'库存不足!',
  375. icon:'none'
  376. });
  377. return ;
  378. }
  379. },
  380. // 合计
  381. sum(e,index){
  382. this.sumPrice=0;
  383. let len = this.goodsList.length;
  384. let gids='';
  385. for(let i=0;i<len;i++){
  386. gids=gids+','+this.goodsList[i].id;
  387. if(this.goodsList[i].selected&&this.goodsList[i].kucun>0) {
  388. if(e && i==index){
  389. this.sumPrice = this.sumPrice + (e.detail.value*this.goodsList[i].price);
  390. this.goodsList[i].num=e.detail.value;
  391. }else{
  392. this.sumPrice = this.sumPrice + (this.goodsList[i].num*this.goodsList[i].price);
  393. }
  394. }
  395. }
  396. uni.setStorageSync('cartlist',this.goodsList);
  397. gids=gids.substr(1);
  398. this.checkkc(gids);
  399. this.sumPrice = this.sumPrice.toFixed(2);
  400. },
  401. inputchangeBz(inputsl,inputnum, id, index) {
  402. inputnum=inputsl.detail.value;
  403. this.goodsList[index].bz=inputnum;
  404. //更新本地储存
  405. uni.setStorageSync('cartlist',this.goodsList);
  406. },
  407. inputchangeFudw(inputsl,inputnum, id, index) {
  408. inputnum=inputsl.detail.value;
  409. this.goodsList[index].fudw=inputnum;
  410. //更新本地储存
  411. uni.setStorageSync('cartlist',this.goodsList);
  412. },
  413. discard() {
  414. //丢弃
  415. }
  416. }
  417. }
  418. </script>
  419. <style lang="scss">
  420. page{position: relative;}
  421. @font-face {font-family:"HMfont-home";src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAOEAAsAAAAAB7wAAAM1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDHAqDAIJNATYCJAMQCwoABCAFhG0HPhu1BsiOw7jha84s8T+CgOyq6unevTlAeAkRhAhQBjj8eJfmMg/oB5whSgaFspy7AqbpwE3Py3/j9j+X07uGyFHr21lua9HYi9rUCzDeGtBYmw4o0AJJ0BvGLmiJxyEAC3yIQhSVPL9BF4U5TgBi7ChtQzfjQKFYWEdgrFiqEBsxoGurtMfAhuD74g8JQgcNg8ScWjf8xoPz7/nfD8iFpoV0eQi86XQAWwUSiAIUiJGVhgEaUSAKiYXau0kKoKOjwVRthd8PmExIBRvmWH95INCQIIyYqVYAJKGghO/5Dg4B3wtxaPD9QAoS4IOM1gEzYBbAMkT16iIQGPxsopS5ScAcK23LiaBDpzyk1aGLHtsvhVrL7adDD55016wPXnDfcr7T3lcE2TVcP2fNhZM7WeiEhVp44vx9C5vVD6+eEgaLTZvEot3HL1lawlnXLK3XnISDllbWwmrmGjlRLdxq2bpme1RAeqXtzWh6g0F//wCCnRiN2diwr2+Yse3iEs20g05Q5tT0BikOXwKf79vsoEvb6p6xjVhHP92nwDJmX+9hwsf26dXbPiNvZ/98x67/+5T+ev0aWxbXCwOX41zLxia+O73B6Y57fN1u6GvN+Zmbc8XITigTAcB0Rl6X8QB4hDgEpoXypZz2q37D5FVnVa9t1n/dUgHw8uKMq9BmWqjoJoP3zevM+zG8jmVKE5hKpRShw9WTFZW04D7TscAC+B0RcOD9FHLnzqkg0HFOQMMMb5DoBKGKGgUGLEkCIzq5YEEkpastcWQyDYQyByJYBkBgx2nQsOEaSOx4girqOzDgwj8wYickWNAiHLe0JESMsiicTLaQh84PBm6WKlst/TD9hXQV25wWBLQP4jJw435MXD58RynxFDPKT30golBxluAtOI3iOMOcs5Bc2fFF8sPd2OFVBO24WQJ9CmEIG4HwQAb4ARmFS0aK8qoL/cLnXyA0FTE23FBSZf+AYEqCzpF4YojrgN5J004lt/LKFD7RHDAVQYEMh8lIQErAICImJgOZWD0ohHARdhg5wJdzSKxVaXhX6c7y8uQN1wAWmLOU0IQUShiQo0fZTceadqaMdP2uXwEAAAAA') format('woff2');}
  422. .icon {
  423. font-family:"HMfont-home" !important;
  424. font-size:60upx;
  425. font-style:normal;
  426. color:#000000;
  427. &.jia {
  428. &:before{content:"\e641";}
  429. }
  430. &.jian {
  431. &:before{content:"\e643";}
  432. }
  433. &.shanchu {
  434. &:before{content:"\e6a4";}
  435. }
  436. }
  437. .checkbox-box{
  438. display: flex;
  439. align-items: center;
  440. .sellq{
  441. font-size: 28upx;
  442. color: #ffffff;
  443. background-color: #C4C4C4;
  444. padding: 5upx 20upx;
  445. text-align: center;
  446. border-radius: 25upx;
  447. }
  448. .checkbox{
  449. width: 35upx;
  450. height: 35upx;
  451. border-radius: 100%;
  452. border: solid 2upx #f06c7a;
  453. display: flex;
  454. justify-content: center;
  455. align-items: center;
  456. .on{
  457. width: 25upx;
  458. height: 25upx;
  459. border-radius: 100%;
  460. background-color: #f06c7a;
  461. }
  462. }
  463. .text{
  464. font-size: 28upx;
  465. margin-left: 10upx;
  466. }
  467. }
  468. .status {
  469. width: 100%;
  470. height: 0;
  471. position: fixed;
  472. z-index: 10;
  473. background-color: #fff;
  474. top: 0;
  475. /* #ifdef APP-PLUS */
  476. height: var(--status-bar-height);//覆盖样式
  477. /* #endif */
  478. }
  479. .header{
  480. width: 92%;
  481. padding: 0 4%;
  482. height: 100upx;
  483. display: flex;
  484. align-items: center;
  485. position: fixed;
  486. top: 0;
  487. z-index: 10;
  488. background-color: #fff;
  489. /* #ifdef APP-PLUS */
  490. top: var(--status-bar-height);
  491. /* #endif */
  492. .title{
  493. font-size: 36upx;
  494. }
  495. }
  496. .place{
  497. background-color: #ffffff;
  498. height: 100upx;
  499. /* #ifdef APP-PLUS */
  500. margin-top: var(--status-bar-height);
  501. /* #endif */
  502. }
  503. .goods-list{
  504. width: 100%;
  505. padding: 20upx 0 120upx 0;
  506. .tis{
  507. width: 100%;
  508. height: 60upx;
  509. display: flex;
  510. justify-content: center;
  511. align-items: center;
  512. font-size: 32upx;
  513. }
  514. .row{
  515. width: calc(92%);
  516. height: calc(25vw + 40upx);
  517. margin: 20upx auto;
  518. border-radius: 15upx;
  519. box-shadow: 0upx 5upx 20upx rgba(0,0,0,0.1);
  520. display: flex;
  521. align-items: center;
  522. position: relative;
  523. overflow: hidden;
  524. z-index: 4;
  525. border: 0;
  526. .menu{
  527. .icon{
  528. color: #fff;
  529. // font-size: 25upx;
  530. }
  531. position: absolute;
  532. width: 30%;
  533. height: 100%;
  534. right: 0;
  535. display: flex;
  536. justify-content: center;
  537. align-items: center;
  538. background-color: red;
  539. color: #fff;
  540. z-index: 2;
  541. }
  542. .carrier{
  543. @keyframes showMenu {
  544. 0% {transform: translateX(0);}100% {transform: translateX(-30%);}
  545. }
  546. @keyframes closeMenu {
  547. 0% {transform: translateX(-30%);}100% {transform: translateX(0);}
  548. }
  549. &.open{
  550. animation: showMenu 0.25s linear both;
  551. }
  552. &.close{
  553. animation: closeMenu 0.15s linear both;
  554. }
  555. background-color: #fff;
  556. .checkbox-box{
  557. padding-left: 20upx;
  558. flex-shrink: 0;
  559. height: 22vw;
  560. margin-right: 20upx;
  561. }
  562. position: absolute;
  563. width: 100%;
  564. padding: 0 0;
  565. height: 100%;
  566. z-index: 3;
  567. display: flex;
  568. align-items: center;
  569. .goods-info{
  570. width: 100%;
  571. display: flex;
  572. padding-right: 20upx;
  573. .img{
  574. width: 22vw;
  575. height: 25vw;
  576. border-radius: 10upx;
  577. overflow: hidden;
  578. flex-shrink: 0;
  579. margin-right: 10upx;
  580. image{
  581. width: 22vw;
  582. height: 22vw;
  583. }
  584. }
  585. .info{
  586. width: 100%;
  587. height: 25vw;
  588. overflow: hidden;
  589. display: flex;
  590. flex-wrap: wrap;
  591. position: relative;
  592. .title{
  593. width: 100%;
  594. font-size: 28upx;
  595. display: -webkit-box;
  596. -webkit-box-orient: vertical;
  597. -webkit-line-clamp: 2;
  598. // text-align: justify;
  599. overflow: hidden;
  600. }
  601. .spec{
  602. font-size: 25upx;
  603. background-color: #f3f3f3;
  604. color: #a7a7a7;
  605. height: 30upx;
  606. display: flex;
  607. align-items: center;
  608. padding: 0 10upx;
  609. border-radius: 15upx;
  610. margin-bottom: 10vw;
  611. }
  612. .spbz{
  613. font-size: 25upx;
  614. display: flex;
  615. flex-direction:column;
  616. padding: 0 10upx;
  617. height: 80upx;
  618. }
  619. .kucun{
  620. font-size: 25upx;
  621. // position: absolute;
  622. width: 100%;
  623. // top: 120upx;
  624. // padding: 0 10upx;
  625. border-radius: 15upx;
  626. text-align: center;
  627. // margin-bottom: 10vw;
  628. }
  629. .price-number{
  630. position: absolute;
  631. width: 100%;
  632. bottom: 0upx;
  633. display: flex;
  634. justify-content: space-between;
  635. align-items: flex-end;
  636. font-size: 28upx;
  637. height: 60upx;
  638. .price{
  639. }
  640. .deltip{
  641. position: absolute;
  642. right: 0;
  643. top: -53rpx;
  644. color: #B4B4B4;
  645. margin-right: 8rpx;
  646. }
  647. .number{
  648. display: flex;
  649. justify-content: center;
  650. align-items: flex-end;
  651. .input{
  652. width: 60upx;
  653. height: 60upx;
  654. margin: 0 10upx;
  655. background-color: #f3f3f3;
  656. input{
  657. width: 60upx;
  658. height: 60upx;
  659. display: flex;
  660. justify-content: center;
  661. align-items: center;
  662. text-align: center;
  663. font-size: 26upx;
  664. }
  665. }
  666. .sub ,.add{
  667. width: 45upx;
  668. height: 45upx;
  669. background-color: #f3f3f3;
  670. border-radius: 5upx;
  671. .icon{
  672. font-size: 22upx;
  673. width: 45upx;
  674. height: 45upx;
  675. display: flex;
  676. justify-content: center;
  677. align-items: center;
  678. }
  679. }
  680. }
  681. }
  682. }
  683. }
  684. }
  685. }
  686. }
  687. .footer{
  688. width: 100%;
  689. padding: 0 4%;
  690. background-color: #fbfbfb;
  691. height: 100upx;
  692. display: flex;
  693. justify-content: space-between;
  694. align-items: center;
  695. font-size: 28upx;
  696. position: fixed;
  697. bottom: 0upx;
  698. z-index: 5;
  699. .delBtn{
  700. border: solid 1upx #f06c7a;
  701. color: #f06c7a;
  702. padding: 0 30upx;
  703. height: 50upx;
  704. border-radius: 30upx;
  705. display: flex;
  706. justify-content: center;
  707. align-items: center;
  708. }
  709. .settlement{
  710. width: 64%;
  711. display: flex;
  712. justify-content: flex-end;
  713. align-items: center;
  714. .sum{
  715. width: 50%;
  716. font-size: 28upx;
  717. margin-right: 10upx;
  718. display: flex;
  719. justify-content: flex-end;
  720. .money{
  721. font-weight: 600;
  722. }
  723. }
  724. .btn{
  725. padding: 0 20upx;
  726. height: 50upx;
  727. background-color: #f06c7a;
  728. color: #fff;
  729. display: flex;
  730. justify-content: center;
  731. align-items: center;
  732. border-radius: 30upx;
  733. }
  734. .btn_gray{
  735. padding: 0 20upx;
  736. height: 50upx;
  737. background-color: #C4C4C4;
  738. color: #fff;
  739. display: flex;
  740. justify-content: center;
  741. align-items: center;
  742. width: 240upx;
  743. border-radius: 30upx;
  744. }
  745. }
  746. }
  747. </style>