index.vue 5.3 KB

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