list.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <template>
  2. <view class="content">
  3. <!-- 不同条件筛选 -->
  4. <view class="select">
  5. <view class="select_k" :class="selected==0? 'selected':''" @click="selece(0)">全部</view>
  6. <view class="select_k" :class="selected==1? 'selected':''" @click="selece(1)">已支付</view>
  7. <view class="select_k" :class="selected==2? 'selected':''" @click="selece(2)">使用中</view>
  8. <view class="select_k" :class="selected==3? 'selected':''" @click="selece(3)">已使用</view>
  9. <view class="select_k" :class="selected==4? 'selected':''" @click="selece(4)">已过期</view>
  10. </view>
  11. <!-- 订单列表 -->
  12. <view class="order">
  13. <view class="order_l1">
  14. <view>已支付</view>
  15. <view style="font-size: 24rpx;font-weight: 400;">2025-08-11 12:21:21</view>
  16. </view>
  17. <view class="order_line"></view>
  18. <view class="title title2" style="margin-top: 23rpx;">
  19. <view class="cicle"></view>
  20. <view style="margin-left: 16rpx;">创海便利店(二食堂1楼) 13267827921</view>
  21. </view>
  22. <view class="xiangnei" v-for="(item,index) in 2" :key="index">
  23. 例假期每天一杯红糖姜茶
  24. </view>
  25. <!-- 订单数据 -->
  26. <view class="order_list">
  27. <view v-for="(item,index) in 7" :key="index" class="list_time">
  28. 2025-08-11 10:21:21
  29. <view style="margin-top: 5rpx;font-size: 24rpx;">64874983774848987484</view>
  30. </view>
  31. </view>
  32. <!-- 按钮 -->
  33. <view class="button">
  34. <view class="button1">退款</view>
  35. <view class="button2" @click="bianji">编辑</view>
  36. </view>
  37. </view>
  38. <!-- 编辑时间弹框 -->
  39. <u-popup v-model="changeShow" mode="center" :closeable="true" border-radius="20">
  40. <view style="width: 700rpx">
  41. <view class="text-center text-lg text-bold padding-tb">编辑</view>
  42. <view class="popup-list">
  43. <view style="padding-top: 20rpx;">第1笔</view>
  44. <view class="popup-yell">2025-08-11 10:21:21</view>
  45. <view style="padding-top: 20rpx;">第2笔</view>
  46. <view class="popup-red">2025-08-11 10:21:21</view>
  47. <view style="padding-top: 20rpx;">第3笔</view>
  48. <view class="custom-item">
  49. <view class="item-label">
  50. <uni-datetime-picker
  51. v-model="datetimerange" :border="false"
  52. type="datetimerange"
  53. rangeSeparator="~" />
  54. </view>
  55. <view class="item-value">
  56. <!-- 箭头图标,可使用 uni-app 内置图标或自定义图片 -->
  57. <uni-icons type="calendar" color="#000000" />
  58. </view>
  59. </view>
  60. <view style="padding-top: 20rpx;">第4笔</view>
  61. <view class="custom-item">
  62. <view class="item-label">
  63. <uni-datetime-picker
  64. v-model="datetimerange" :border="false"
  65. type="datetimerange"
  66. rangeSeparator="~" />
  67. </view>
  68. <view class="item-value">
  69. <!-- 箭头图标,可使用 uni-app 内置图标或自定义图片 -->
  70. <uni-icons type="calendar" color="#000000" />
  71. </view>
  72. </view>
  73. <!-- 按钮 -->
  74. <view class="popup_butt">
  75. <view class="button3">取消</view>
  76. <view class="button4" @click="bianji">确定</view>
  77. </view>
  78. </view>
  79. </view>
  80. </u-popup>
  81. </view>
  82. </template>
  83. <script>
  84. export default {
  85. data() {
  86. return {
  87. selected:0,//0全部,1已支付,2使用中,3已使用,4已过期
  88. changeShow: false,
  89. datetimerange:[],
  90. }
  91. },
  92. onLoad() {
  93. },
  94. methods:{
  95. // 选择条件
  96. selece(e){
  97. this.selected=e
  98. },
  99. //编辑时间
  100. bianji(){
  101. this.changeShow=true
  102. },
  103. },
  104. }
  105. </script>
  106. <style>
  107. .content{
  108. width: 100%;
  109. height: 100%;
  110. background-color: #F2F2F2;
  111. }
  112. /* 不同条件筛选 */
  113. .select{
  114. display: flex;
  115. width: 100%;
  116. height: 100%;
  117. }
  118. .select_k{
  119. margin: 20rpx 0 0 15rpx;
  120. width: 140rpx;
  121. height: 60rpx;
  122. opacity: 1;
  123. border-radius: 9rpx;
  124. background: #FFFFFF;
  125. font-size: 28rpx;
  126. line-height: 60rpx;
  127. color: rgba(128, 128, 128, 1);
  128. text-align: center;
  129. }
  130. .selected{
  131. font-weight: 700;
  132. color: rgba(255, 141, 26, 1);
  133. }
  134. /* 订单列表 */
  135. .order{
  136. margin: 30rpx 0 0 20rpx;
  137. width: 710rpx;
  138. height: 100%;
  139. opacity: 1;
  140. border-radius: 9rpx;
  141. background: #FFFFFF;
  142. }
  143. .order_l1{
  144. display: flex;
  145. padding: 19rpx 19rpx 0 19rpx;
  146. /* 让子元素两端对齐,价格居左,按钮居右 */
  147. justify-content: space-between;
  148. /* 垂直方向居中(可选,根据需求调整) */
  149. align-items: center;
  150. font-size: 32rpx;
  151. font-weight: 500;
  152. color: rgba(0, 0, 0, 1);
  153. }
  154. .order_line{
  155. margin-top: 31rpx;
  156. width: 100%;
  157. height: 1rpx;
  158. opacity: 1;
  159. background-color: rgba(230, 230, 230, 1);
  160. }
  161. .title{
  162. margin: 13rpx 0 0 23rpx;
  163. font-size: 28rpx;
  164. font-weight: 500;
  165. color: rgba(0, 0, 0, 1);
  166. }
  167. .cicle{
  168. margin: 12rpx 0 0 0;
  169. width: 10rpx;
  170. height: 10rpx;
  171. background: #CCCCCC;
  172. border-radius: 50%;
  173. }
  174. .title2{
  175. display: flex;
  176. }
  177. .xiangnei{
  178. width: 633rpx;
  179. display: flex;
  180. /* 让子元素两端对齐,价格居左,按钮居右 */
  181. justify-content: space-between;
  182. /* 垂直方向居中(可选,根据需求调整) */
  183. margin: 0 0 0 45rpx;
  184. padding-top: 10rpx;
  185. font-size: 24rpx;
  186. color: rgba(102, 102, 102, 1);
  187. }
  188. .order_list{
  189. display: flex;
  190. flex-wrap: wrap;
  191. width: 583rpx;
  192. height: 100%;
  193. /* 让子元素两端对齐,价格居左,按钮居右 */
  194. justify-content: space-between;
  195. /* 垂直方向居中(可选,根据需求调整) */
  196. margin: 10rpx 0 0 41rpx;
  197. font-size: 28rpx;
  198. font-weight: 400;
  199. color: rgba(0, 0, 0, 1);
  200. word-wrap: break-word;
  201. word-break: break-all;
  202. }
  203. .list_time{
  204. margin-top: 10rpx;
  205. width: 260rpx;
  206. height: 71rpx;
  207. /* 核心属性:强制文字在一行显示,不自动换行 */
  208. white-space: nowrap;
  209. }
  210. /* 按钮 */
  211. .button{
  212. display: flex;
  213. margin: 39rpx 0 0 278rpx;
  214. height: 100rpx;
  215. font-size: 28rpx;
  216. font-weight: 500;
  217. line-height: 75rpx;
  218. }
  219. .button1{
  220. width: 190rpx;
  221. height: 75rpx;
  222. opacity: 1;
  223. border-radius: 105rpx;
  224. background: rgba(242, 242, 242, 1);
  225. color: rgba(0, 0, 0, 1);
  226. text-align: center;
  227. }
  228. .button2{
  229. margin: 0 0 0 29rpx;
  230. width: 190rpx;
  231. height: 75rpx;
  232. opacity: 1;
  233. border-radius: 105rpx;
  234. background: rgba(255, 141, 26, 1);
  235. color: rgba(255, 255, 255, 1);
  236. text-align: center;
  237. }
  238. /* 编辑时间弹框 */
  239. .popup-list{
  240. margin: 25rpx 0 0 41rpx;
  241. font-size: 28rpx;
  242. color: rgba(0, 0, 0, 1);
  243. }
  244. .popup-yell{
  245. color: rgba(255, 141, 26, 1);
  246. font-size: 32rpx;
  247. font-weight: 500;
  248. padding-top: 20rpx;
  249. }
  250. .popup-red{
  251. color: rgba(212, 48, 48, 1);
  252. font-size: 32rpx;
  253. font-weight: 500;
  254. padding-top: 20rpx;
  255. }
  256. .custom-item {
  257. margin: 17rpx 0 0 0;
  258. display: flex;
  259. align-items: center;
  260. justify-content: space-between;
  261. padding: 12rpx 16rpx;
  262. width: 651rpx;
  263. height: 83rpx;
  264. opacity: 1;
  265. border-radius: 130rpx;
  266. background: rgba(242, 242, 242, 1);
  267. }
  268. .item-label {
  269. font-size: 28rpx;
  270. color: rgba(0, 0, 0, 1);
  271. }
  272. .item-value {
  273. display: flex;
  274. font-size: 28rpx;
  275. color: rgba(0, 0, 0, 1);
  276. }
  277. /* 按钮 */
  278. .popup_butt{
  279. display: flex;
  280. align-items: center;
  281. justify-content: space-between;
  282. margin: 54rpx 0 0 0;
  283. height: 200rpx;
  284. font-size: 28rpx;
  285. font-weight: 500;
  286. line-height: 99rpx;
  287. }
  288. .button3{
  289. width: 250rpx;
  290. height: 99rpx;
  291. opacity: 1;
  292. border-radius: 138rpx;
  293. border: 1px solid rgba(255, 141, 26, 1);
  294. color: rgba(255, 141, 26, 1);
  295. text-align: center;
  296. }
  297. .button4{
  298. width: 250rpx;
  299. height: 99rpx;
  300. opacity: 1;
  301. border-radius: 105rpx;
  302. background: rgba(255, 141, 26, 1);
  303. color: rgba(255, 255, 255, 1);
  304. text-align: center;
  305. }
  306. </style>