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

134 lines
3.1 KiB

  1. <template>
  2. <view>
  3. <view class="tabs">
  4. <u-tabs :list="tab_list" :is-scroll="false" :current="current" bg-color="#f6f6f6" active-color="#1833F2" @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 tabItem.list" :key="item.id" @click="$url('/pages/supply/order/detail?q_sn='+ item.q_sn)">
  11. <view class="lf-row-between upper">
  12. <view class="lf-font-28 lf-color-333">订单状态</view>
  13. <!-- TODO 状态颜色 -->
  14. <view class="order-btn quoted-price">{{ item.state }}</view>
  15. </view>
  16. <view class="lf-row-between lower">
  17. <view>报价单号 {{ item.q_sn }}</view>
  18. <view>{{ item.deadline }}</view>
  19. </view>
  20. </view>
  21. <view class="loading-more">
  22. <text v-if="tabItem.list.length" :class="{'loading-more-text': tabItem.loading_class}">{{ tabItem.loading_text }}</text>
  23. <lf-nocontent v-else class="lf-m-t-50"></lf-nocontent>
  24. </view>
  25. </scroll-view>
  26. </swiper-item>
  27. </swiper>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data(){
  33. return {
  34. current: 0,
  35. tab_list: [{
  36. name: '全部',
  37. loading_class: true,
  38. loading_text: '正在加载中...',
  39. page: 1,
  40. isPage: true,
  41. list: []
  42. },{
  43. name: '审核中',
  44. loading_class: true,
  45. loading_text: '正在加载中...',
  46. page: 1,
  47. isPage: true,
  48. list: []
  49. },{
  50. name: '已完成',
  51. loading_class: true,
  52. loading_text: '正在加载中...',
  53. page: 1,
  54. isPage: true,
  55. list: []
  56. }],
  57. page_size: 10,
  58. windowHeight: 0
  59. }
  60. },
  61. onLoad(){
  62. this.windowHeight = uni.getSystemInfoSync().windowHeight;
  63. this.getData();
  64. },
  65. methods: {
  66. getData(){
  67. this.$http(this.API.API_SUPPLIER_QUOTATIONORDERLIST).then(res => {
  68. console.log("ssss", res);
  69. this.tab_list[this.current].list = res.data.list;
  70. })
  71. },
  72. tabsChange(current){
  73. this.current = current;
  74. },
  75. swiperChange(event){
  76. this.current = event.detail.current;
  77. }
  78. }
  79. }
  80. </script>
  81. <style>
  82. page{
  83. background-color: #f6f6f6;
  84. }
  85. </style>
  86. <style lang="scss" scoped="scoped">
  87. .card{
  88. width: 100%;
  89. height: max-content;
  90. background-color: #FFFFFF;
  91. border-radius: 20rpx;
  92. padding: 0 20rpx;
  93. box-sizing: border-box;
  94. margin-bottom: 30rpx;
  95. .upper{
  96. width: 100%;
  97. padding: 20rpx 0;
  98. border-bottom: 1rpx solid #e5e5e5;
  99. box-sizing: border-box;
  100. .order-btn{
  101. width: max-content;
  102. height: 62rpx;
  103. border-radius: 32rpx;
  104. // border: 2rpx solid #777777;
  105. // padding: 0 20rpx;
  106. line-height: 60rpx;
  107. font-size: 28rpx;
  108. }
  109. // 已报价,等待审核
  110. .quoted-price{
  111. color: #777777;
  112. }
  113. // 等待报价
  114. .wait{
  115. color: #1833F2;
  116. }
  117. // 已通过审核
  118. .passed{
  119. color: #0BCE5F;
  120. }
  121. // 报价被拒绝
  122. .refuse{
  123. color: #FF0000;
  124. }
  125. }
  126. .lower{
  127. padding: 20rpx 0;
  128. font-size: 24rpx;
  129. color: #777777;
  130. }
  131. }
  132. </style>