gasApply.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <!--气瓶申请-->
  2. <template>
  3. <view id="transportPerson">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  5. <view class="list">
  6. <view class="list_li" v-for="(item,index) in dataList" @click="goInfo(item)">
  7. <view class="list_li_t">
  8. <img class="for-back-img" src="@/pages_student/images/icon_ysclgl_cl.png">
  9. <text>申请时间:{{item.createTime}}</text>
  10. <text v-if="item.applyNum==item.storageNum">已全部入库</text>
  11. </view>
  12. <view class="list_li_b">
  13. <view>申请:<text>{{item.applyNum}}</text></view>
  14. <view>入库:<text>{{item.storageNum}}</text></view>
  15. </view>
  16. </view>
  17. </view>
  18. </scroll-view>
  19. <view class="empty" v-if="pageType==4">
  20. <img class="for-back-img" src="@/pages_student/images/img_ysrygl_zwsj.png">
  21. <view>暂无数据</view>
  22. </view>
  23. <view class="sub_btn" @click="subBtn()">提交申请</view>
  24. </view>
  25. </template>
  26. <script>
  27. import { gasApplyList } from '@/api/apiDemo/index.js'
  28. export default {
  29. name: "transportPerson",
  30. data() {
  31. return {
  32. pageType:0,
  33. //列表请求参数
  34. getData:{
  35. pageNum:1,
  36. pageSize:20,
  37. },
  38. pageType:0,
  39. dataList:[],
  40. }
  41. },
  42. onLoad() {
  43. },
  44. onShow() {
  45. },
  46. methods: {
  47. //滚动加载事件
  48. scrollGet(){
  49. this.getData.pageNum += 1;
  50. this.getList();
  51. },
  52. subBtn(){
  53. uni.redirectTo({
  54. url:'/pages_student/gasApply/gasApplyAdd?status=0'
  55. });
  56. },
  57. goInfo(d){
  58. uni.redirectTo({
  59. url:'/pages_student/gasApply/gasApplyList?item='+encodeURIComponent(JSON.stringify(d))
  60. });
  61. },
  62. //获取列表数据
  63. async getList(){
  64. let _this=this;
  65. const {data} = await gasApplyList(this.getData);
  66. if(data.code==200){
  67. let res=data.rows;
  68. if(_this.getData.pageNum==1){
  69. _this.dataList=res;
  70. if(res.length>0){
  71. _this.pageType=0;
  72. }else{
  73. _this.pageType=4;
  74. }
  75. }else{
  76. _this.dataList=_this.dataList.concat(res);
  77. }
  78. }
  79. },
  80. },
  81. mounted(){
  82. this.getList()
  83. },
  84. }
  85. </script>
  86. <style lang="stylus" scoped>
  87. #transportPerson {
  88. height: 100%;
  89. width: 100%;
  90. flex :1;
  91. display flex;
  92. flex-direction column
  93. overflow hidden;
  94. margin-top: 20rpx;
  95. .scroll-box{
  96. // flex:1;
  97. overflow-y scroll;
  98. padding-bottom: 220rpx;
  99. .list{
  100. background: #FFFFFF;
  101. border-radius: 20rpx;
  102. margin: 0 20rpx;
  103. padding: 0 20rpx;
  104. box-sizing: border-box;
  105. .list_li{
  106. border-bottom:1px solid #f5f5f5;
  107. padding: 30rpx 0 20rpx 0;
  108. box-sizing: border-box;
  109. .list_li_t{
  110. display: flex;
  111. align-items: center;
  112. >img{
  113. width: 30rpx;
  114. height: 30rpx;
  115. margin-right: 16rpx;
  116. }
  117. >text:nth-of-type(1){
  118. font-size: 28rpx;
  119. font-family: PingFang SC;
  120. font-weight: 500;
  121. color: #333333;
  122. line-height: 28rpx;
  123. }
  124. >text:nth-of-type(2){
  125. width: 220rpx;
  126. display: inline-block;
  127. font-size: 24rpx;
  128. font-family: PingFang SC;
  129. font-weight: 500;
  130. color: #00CC26;
  131. line-height: 24rpx;
  132. text-align: right;
  133. }
  134. }
  135. .list_li_b{
  136. display: flex;
  137. margin-top: 42rpx;
  138. >view{
  139. width: 150rpx;
  140. font-size: 26rpx;
  141. font-family: PingFang SC;
  142. font-weight: 500;
  143. color: #333333;
  144. line-height: 26rpx;
  145. >text{
  146. font-size: 26rpx;
  147. color: #0183FA;
  148. }
  149. }
  150. >view:nth-of-type(2){
  151. >text{
  152. font-size: 26rpx;
  153. color: #00CC26;
  154. }
  155. }
  156. }
  157. }
  158. }
  159. }
  160. .empty{
  161. text-align: center;
  162. margin-top: 316rpx;
  163. >img{
  164. width: 336rpx;
  165. height: 222rpx;
  166. margin-left: 208rpx;
  167. }
  168. >view{
  169. font-size: 30rpx;
  170. font-family: PingFang SC;
  171. font-weight: 500;
  172. color: #E0E0E0;
  173. line-height: 30rpx;
  174. margin-top: 48rpx;
  175. }
  176. }
  177. /* 按钮 */
  178. .sub_btn{
  179. width: 650rpx;
  180. height: 100rpx;
  181. background: #0183FA;
  182. border-radius: 20rpx;
  183. font-size: 28rpx;
  184. font-family: PingFang SC;
  185. font-weight: 500;
  186. color: #FFFFFF;
  187. line-height: 100rpx;
  188. text-align: center;
  189. margin-left: 50rpx;
  190. position: fixed;
  191. bottom:30rpx;
  192. }
  193. }
  194. </style>