index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="collection">
  3. <u-navbar ref="uNavbar" :border-bottom="false" :back-icon-color="setNav.backColor" :is-back="setNav.isdisPlayNavTitle"
  4. :title-size="setNav.size" :title-bold="setNav.bold" :title="setNav.navTitle" :title-color="setNav.color" :background="setNav"></u-navbar>
  5. <view class="contentMain" v-if="data.length">
  6. <view v-for="(item, index) in data" :key="item.id"
  7. class="u-swipe-action">
  8. <view class="item">
  9. <view class="title">{{item.message_title}}</view>
  10. <view class="userInfo">
  11. <view class="user">
  12. <view class="name">拟稿人:{{item.send_user_name}}</view>
  13. <view class="name">发文日期:{{item.message_time}}</view>
  14. <view class="name">流程结束日期:{{item.finish_time == null ? '未结束' : item.finish_time}}</view>
  15. </view>
  16. <!-- <view class="status">发文审核中</view> -->
  17. <view class="statusBtn" @click="approvalProcess(item)">催收文</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="no-data" v-else>暂无数据</view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. setNav: {
  30. backgroundColor: '#fff', //背景色
  31. color: '##343434', //字体颜色
  32. bold: true,
  33. size: '36',
  34. backColor: '##343434',
  35. isdisPlayNavTitle: true, //是否显示返回按钮
  36. navTitle: '催收文' //导航标题
  37. },
  38. data: [],
  39. pageNo: 1,
  40. total: 0,
  41. userInfo: {}
  42. }
  43. },
  44. onLoad() {
  45. this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  46. this.getQueryList()
  47. },
  48. computed: {
  49. },
  50. onReachBottom() {
  51. if (this.data.length >= this.total) {
  52. return
  53. }
  54. this.pageNo += 1
  55. this.getQueryList()
  56. },
  57. methods: {
  58. async getQueryList(message_situation) {
  59. let res = await this.$u.post(`boman-web-core/p/cs/queryList`, {
  60. "table": "boman_message",
  61. "pageNo": this.pageNo,
  62. "isUi": false,
  63. "pageSize": 10,
  64. "orderBy": "create_time desc",
  65. "fixedData": {
  66. "condition": {
  67. "message_situation": "1",
  68. "send_user_id": this.userInfo.id,
  69. "is_del":"N"
  70. }
  71. }
  72. })
  73. if (res.data && res.data.rows) {
  74. res.data.rows = res.data.rows.map(item => {
  75. return Object.assign({}, item, {
  76. show: false
  77. })
  78. })
  79. if (this.pageNo == 1) {
  80. this.data = res.data.rows
  81. this.total = res.data.total
  82. } else {
  83. this.data = this.data.concat(res.data.rows)
  84. }
  85. }
  86. },
  87. approvalProcess (item) {
  88. uni.navigateTo({
  89. url: "/pages/centerView/collection/details?id=" + item.id
  90. })
  91. }
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .collection {
  97. height: 100%;
  98. background: #fff;
  99. .contentMain {
  100. padding: 0 20rpx;
  101. .item {
  102. background: #fff;
  103. .title {
  104. font-size: 28rpx;
  105. font-weight: bold;
  106. color: #343434;
  107. padding: 30rpx 30rpx 0 30rpx;
  108. white-space: break-word;
  109. word-break:break-all;
  110. }
  111. .userInfo {
  112. display: flex;
  113. align-items: flex-end;
  114. border-bottom: solid 1rpx #DADADA;
  115. padding: 30rpx;
  116. .user {
  117. flex: 1;
  118. color: #666;
  119. font-size: 24rpx;
  120. .name {
  121. margin-bottom: 10rpx;
  122. }
  123. }
  124. .status {
  125. color: #009FE8;
  126. font-size: 26rpx;
  127. margin-bottom: 4rpx;
  128. }
  129. .statusBtn {
  130. color: #fff;
  131. font-size: 22rpx;
  132. margin-bottom: 4rpx;
  133. background: #61C320;
  134. padding: 10rpx 20rpx;
  135. border-radius: 40rpx;
  136. }
  137. }
  138. }
  139. }
  140. }
  141. </style>