shopping.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view class="base-container">
  3. <view class="search-wrap">
  4. <v-search class="search" @searchCallback="searchCallback" @clearCallback="clearCallback"></v-search>
  5. <text class="manage">管理</text>
  6. </view>
  7. <view class="shop-list">
  8. <view class="shop-item" v-for="(item,index) in 3" :key="index">
  9. <up-checkbox-group>
  10. <up-checkbox v-model="shopChecked" shape="circle" label="从化荔博园店铺" labelColor="#000"
  11. labelSize="14"></up-checkbox>
  12. <up-icon class="icon" name="arrow-right" color="rgba(137, 137, 137, 0.69)" size="12"></up-icon>
  13. </up-checkbox-group>
  14. <up-swipe-action>
  15. <up-swipe-action-item v-for="(ele,idx) in 3" :key="idx" :options="options1">
  16. <view class="commodity-item">
  17. <up-checkbox-group>
  18. <up-checkbox v-model="commodityChecked" shape="circle"></up-checkbox>
  19. </up-checkbox-group>
  20. <view class="commodity-info">
  21. <image class="commodity-img"
  22. src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></image>
  23. <view class="commodity-cont">
  24. <view class="name">
  25. <text>海南妃子笑荔枝新鲜采摘</text>
  26. <text>x1</text>
  27. </view>
  28. <up-text size="12" color="#717070" text="3斤装规格"></up-text>
  29. <up-text size="12" color="#AFAFAF" text="坏单包退 包邮"></up-text>
  30. <view class="total">
  31. <text class="unit">¥</text>
  32. <text class="sum">108</text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </up-swipe-action-item>
  38. </up-swipe-action>
  39. </view>
  40. </view>
  41. <view class="footer">
  42. <up-checkbox-group>
  43. <up-checkbox v-model="checked" shape="circle" label="全选"></up-checkbox>
  44. </up-checkbox-group>
  45. <view class="footer-right">
  46. <view class="total">
  47. 合计:<text class="unit">¥</text><text class="total-num">0</text>
  48. </view>
  49. <view class="buttom">结算</view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script setup>
  55. import {
  56. ref,
  57. reactive
  58. } from "vue"
  59. const searchCallback = (e) => {
  60. console.log('搜索', e)
  61. }
  62. const clearCallback = () => {
  63. console.log('clear')
  64. }
  65. const options1 = reactive([{
  66. text: '删除',
  67. style: {
  68. backgroundColor: '#f56c6c'
  69. }
  70. }]);
  71. const shopChecked = ref(false)
  72. const commodityChecked = ref(false)
  73. const checked = ref(false)
  74. </script>
  75. <style lang="scss" scoped>
  76. .base-container {
  77. padding: 0;
  78. .search-wrap {
  79. background: #fff;
  80. display: flex;
  81. align-items: center;
  82. padding: 16rpx 24rpx;
  83. box-sizing: border-box;
  84. .search{
  85. width: calc(100% - 64rpx - 30rpx);
  86. }
  87. .manage {
  88. margin-left: 20rpx;
  89. }
  90. }
  91. .shop-list {
  92. height: calc(100vh - 100rpx - 120rpx);
  93. overflow-y: auto;
  94. overflow: auto;
  95. .shop-item {
  96. background: #fff;
  97. margin-top: 20rpx;
  98. padding: 20rpx 24rpx;
  99. .commodity-item {
  100. width: 100%;
  101. padding: 20rpx 0 20rpx 10rpx;
  102. box-sizing: border-box;
  103. display: flex;
  104. align-items: center;
  105. .commodity-info {
  106. width: 100%;
  107. display: flex;
  108. align-items: center;
  109. .commodity-img {
  110. width: 182rpx;
  111. height: 182rpx;
  112. margin-right: 10rpx;
  113. border-radius: 10rpx;
  114. }
  115. .commodity-cont {
  116. width: calc(100% - 182rpx - 10rpx);
  117. .name {
  118. display: flex;
  119. align-items: center;
  120. justify-content: space-between;
  121. font-size: 28rpx;
  122. font-weight: 500;
  123. }
  124. .total {
  125. color: #FF7700;
  126. font-size: 24rpx;
  127. margin-top: 14rpx;
  128. .sum {
  129. font-weight: 500;
  130. font-size: 38rpx;
  131. margin-left: 2rpx;
  132. }
  133. }
  134. }
  135. }
  136. }
  137. }
  138. }
  139. /* #ifdef H5 */
  140. .shop-list {
  141. height: calc(100vh - 100rpx - 120rpx - 188rpx);
  142. }
  143. /* #endif */
  144. .footer {
  145. position: absolute;
  146. bottom: 0;
  147. left: 0;
  148. width: 100%;
  149. box-sizing: border-box;
  150. background: #fff;
  151. padding: 20rpx 24rpx;
  152. border-top: 2rpx solid rgba(0, 0, 0, 0.26);
  153. display: flex;
  154. align-items: center;
  155. justify-content: space-between;
  156. .footer-right {
  157. display: flex;
  158. align-items: center;
  159. .total {
  160. font-size: 24rpx;
  161. .unit {
  162. color: #FF7700;
  163. font-size: 26rpx;
  164. }
  165. .total-num {
  166. font-size: 40rpx;
  167. color: #FF7700;
  168. font-weight: 500;
  169. }
  170. }
  171. .buttom {
  172. padding: 16rpx 78rpx;
  173. border-radius: 8rpx;
  174. background: #FFD95E;
  175. margin-left: 22rpx;
  176. }
  177. }
  178. }
  179. }
  180. </style>