自主项目,食堂系统,前端uniapp
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.

149 lines
3.6 KiB

  1. <template>
  2. <view>
  3. <view class="tabs">
  4. <u-tabs :list="tab_list" :is-scroll="true" :current="current" bg-color="#f6f6f6" active-color="#11D189" @change="tabsChange"></u-tabs>
  5. </view>
  6. <swiper :style="{height: 'calc('+ windowHeight +'px - 110rpx)', width: '750rpx'}"
  7. :current="current" @change="swiperChange">
  8. <swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
  9. <scroll-view class="lf-w-100 lf-h-100 lf-p-l-32 lf-p-r-32 lf-border-box" :scroll-y="true">
  10. <view class="card" v-for="(item, index) in 10" :key="index" @click="$url('/pages/canteen/purchase/detail')">
  11. <view class="lf-row-between item">
  12. <view class="lf-color-gray">采购方</view>
  13. <view class="lf-color-black">广西美味生活食堂有限公司</view>
  14. </view>
  15. <view class="lf-row-between item">
  16. <view class="lf-color-gray">发单时间</view>
  17. <view class="lf-color-black">2021-07-23 17:24:23</view>
  18. </view>
  19. <view class="lf-row-between item">
  20. <view class="lf-color-gray">送达时间</view>
  21. <view class="lf-color-black">2021-07-23 17:24:23</view>
  22. </view>
  23. <view class="lf-row-between item">
  24. <view class="lf-color-gray">商品种类</view>
  25. <view class="lf-color-black">8</view>
  26. </view>
  27. <view class="lf-row-between item">
  28. <view class="lf-color-gray">订单状态</view>
  29. <view class="quoted-price">等待接单</view>
  30. </view>
  31. </view>
  32. <view class="loading-more">
  33. <text :class="{'loading-more-text': tabItem.loading_class}">{{ tabItem.loading_text }}</text>
  34. <!-- <lf-nocontent></lf-nocontent> -->
  35. </view>
  36. </scroll-view>
  37. </swiper-item>
  38. </swiper>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data(){
  44. return {
  45. current: 0,
  46. tab_list: [{
  47. name: '全部',
  48. loading_class: true,
  49. loading_text: '正在加载中...',
  50. page: 1,
  51. isPage: true,
  52. list: []
  53. },{
  54. name: '未发单',
  55. loading_class: true,
  56. loading_text: '正在加载中...',
  57. page: 1,
  58. isPage: true,
  59. list: []
  60. },{
  61. name: '待接单',
  62. loading_class: true,
  63. loading_text: '正在加载中...',
  64. page: 1,
  65. isPage: true,
  66. list: []
  67. },{
  68. name: '备货中',
  69. loading_class: true,
  70. loading_text: '正在加载中...',
  71. page: 1,
  72. isPage: true,
  73. list: []
  74. },{
  75. name: '已发货',
  76. loading_class: true,
  77. loading_text: '正在加载中...',
  78. page: 1,
  79. isPage: true,
  80. list: []
  81. },{
  82. name: '已入库',
  83. loading_class: true,
  84. loading_text: '正在加载中...',
  85. page: 1,
  86. isPage: true,
  87. list: []
  88. }],
  89. page_size: 10,
  90. windowHeight: 0
  91. }
  92. },
  93. onLoad(){
  94. this.windowHeight = uni.getSystemInfoSync().windowHeight;
  95. },
  96. methods: {
  97. tabsChange(current){
  98. this.current = current;
  99. },
  100. swiperChange(event){
  101. this.current = event.detail.current;
  102. }
  103. }
  104. }
  105. </script>
  106. <style>
  107. page{
  108. background-color: #f6f6f6;
  109. }
  110. </style>
  111. <style lang="scss" scoped="scoped">
  112. .card{
  113. width: 100%;
  114. height: max-content;
  115. background-color: #FFFFFF;
  116. border-radius: 20rpx;
  117. padding: 0 20rpx;
  118. box-sizing: border-box;
  119. margin-bottom: 30rpx;
  120. .item{
  121. padding: 20rpx 0;
  122. box-sizing: border-box;
  123. width: 100%;
  124. border-bottom: 1rpx solid #E5E5E5;
  125. font-size: 28rpx;
  126. &:last-child{
  127. border-bottom: none;
  128. }
  129. }
  130. // 已报价,等待审核
  131. .quoted-price{
  132. color: #777777;
  133. }
  134. // 等待报价
  135. .wait{
  136. color: #1833F2;
  137. }
  138. // 已通过审核
  139. .passed{
  140. color: #0BCE5F;
  141. }
  142. // 报价被拒绝
  143. .refuse{
  144. color: #FF0000;
  145. }
  146. }
  147. </style>