index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!-- 称重登记 -->
  2. <template>
  3. <view class="weighingRegistration">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="for-max-box">
  5. <view class="for-max-big-box" v-for="(item,index) in dataList" :key="index">
  6. <view class="for-top-title-box">
  7. <view>{{item.subName}}{{item.roomNum?'('+item.roomNum+')':''}}</view>
  8. <view>{{item.deptName}}{{item.deptName&&item.buildName?'/':''}}{{item.buildName}}{{item.buildName&&item.floorName?'/':''}}{{item.floorName}}</view>
  9. </view>
  10. <view class="for-big-box" @click="goPage(minItem)"
  11. v-for="(minItem,minIndex) in item.wasteOrderSubItemVos" :key="minIndex">
  12. <view class="for-title-box">
  13. <view>报备单编号:</view>
  14. <view>{{minItem.reportNo}}</view>
  15. <view :class="minItem.status==1?'colorA':'colorB'">{{minItem.status==1?'已回收':'已报备待回收'}}</view>
  16. </view>
  17. <view class="for-content-box">
  18. <view>上门回收日期:</view>
  19. <view>{{minItem.expectTime}}({{minItem.expectWeek}})</view>
  20. </view>
  21. <view class="for-content-box">
  22. <view style="width:160rpx;">废物种类:</view>
  23. <view>{{minItem.typeNum}}</view>
  24. </view>
  25. <view class="for-content-box">
  26. <view style="width:160rpx;">报备人:</view>
  27. <view>{{minItem.reportName}}({{minItem.reportAccount}})</view>
  28. </view>
  29. <view class="for-content-box">
  30. <view style="width:160rpx;">报备时间:</view>
  31. <view>{{minItem.reportTime}}</view>
  32. </view>
  33. <view class="fop-position-p" v-if="minItem.status!=1">》</view>
  34. </view>
  35. </view>
  36. <view class="for-null-p"></view>
  37. <view class="get-null-box" v-if="getDataType">暂无更多数据</view>
  38. </scroll-view>
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. parseTime
  44. } from '@/component/public.js'
  45. import {
  46. hwmsAppWasteOrderWasteList,
  47. } from '@/pages_hazardousWasteRecycling/api/index.js'
  48. export default {
  49. data() {
  50. return {
  51. // 查询参数
  52. getDataType: false,
  53. queryParams: {
  54. page: 1,
  55. pageSize: 10,
  56. },
  57. total: 0,
  58. dataList: [],
  59. }
  60. },
  61. onLoad(option) {
  62. },
  63. onShow() {
  64. this.getList();
  65. },
  66. mounted() {
  67. },
  68. methods: {
  69. //点击跳转
  70. goPage(minItem){
  71. if(minItem.listNewData1 != 1){
  72. uni.navigateTo({
  73. url: "/pages_hazardousWasteRecycling/views/weighingRegistration/addPage?id="+minItem.id,
  74. });
  75. }
  76. },
  77. //滚动加载事件
  78. scrollGet() {
  79. let self = this;
  80. if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
  81. this.$set(this, 'getDataType', true);
  82. } else {
  83. this.queryParams.page += 1;
  84. this.$nextTick(() => {
  85. this.getList();
  86. })
  87. }
  88. },
  89. //获取实验室列表
  90. async getList() {
  91. let self = this;
  92. let obj = JSON.parse(JSON.stringify(this.queryParams));
  93. const {
  94. data
  95. } = await hwmsAppWasteOrderWasteList(obj);
  96. if (data.code == 200) {
  97. for(let i=0;i<data.data.records.length;i++){
  98. for(let o=0;o<data.data.records[i].wasteOrderSubItemVos.length;o++){
  99. data.data.records[i].wasteOrderSubItemVos[o].reportTime = parseTime(data.data.records[i].wasteOrderSubItemVos[o].reportTime, "{y}-{m}-{d} {h}:{i}:{s}")
  100. }
  101. }
  102. if(self.queryParams.page == 1){
  103. this.$set(this, 'dataList', data.data.records);
  104. this.$set(this, 'total', data.data.total);
  105. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  106. this.$set(this, 'getDataType', true);
  107. }
  108. }else{
  109. this.$set(this, 'dataList', [...this.dataList, ...data.data.records]);
  110. this.$set(this, 'total', data.data.total);
  111. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  112. this.$set(this, 'getDataType', true);
  113. }
  114. }
  115. }
  116. },
  117. },
  118. }
  119. </script>
  120. <style lang="stylus" scoped>
  121. .weighingRegistration{
  122. height: 100%;
  123. display flex;
  124. flex-direction column;
  125. background-color: #fff;
  126. .get-null-box {
  127. height: 100rpx;
  128. line-height: 100rpx;
  129. color: #999;
  130. text-align center;
  131. }
  132. .for-max-box{
  133. flex: 1;
  134. overflow-y scroll;
  135. .for-null-p{
  136. height:60rpx;
  137. }
  138. .for-max-big-box{
  139. .for-top-title-box{
  140. // height:100rpx;
  141. padding:30rpx 20rpx 0;
  142. // display: flex
  143. view{
  144. flex:1;
  145. }
  146. view:nth-child(1){
  147. color:#0183FA;
  148. font-size:34rpx;
  149. line-height:40rpx;
  150. }
  151. view:nth-child(2){
  152. margin-top:20rpx;
  153. color:#666;
  154. line-height:30rpx;
  155. font-size:28rpx;
  156. }
  157. }
  158. .for-big-box{
  159. width:670rpx;
  160. margin:40rpx 40rpx 0;
  161. box-shadow: 0 0 8rpx 6rpx rgba(0, 0, 0, 0.1);
  162. border-radius: 10rpx;
  163. position: relative;
  164. padding-bottom:30rpx;
  165. .for-title-box{
  166. display: flex;
  167. line-height:40rpx;
  168. padding:30rpx 30rpx 0;
  169. view:nth-child(2){
  170. flex:1;
  171. }
  172. .colorA{
  173. color:#00EE76;
  174. }
  175. .colorB{
  176. color:#FF6A6A;
  177. }
  178. }
  179. .for-content-box{
  180. display: flex;
  181. line-height:40rpx;
  182. padding:20rpx 30rpx 0;
  183. }
  184. .fop-position-p{
  185. position: absolute;
  186. top:150rpx;
  187. right:20rpx;
  188. color:#999;
  189. }
  190. }
  191. }
  192. }
  193. }
  194. </style>