votelist.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <view class="listbox">
  3. <view class="fixedt">
  4. <!-- 选择器 -->
  5. <view class="flexc checkbox">
  6. <picker mode="date" @change='bindDateChangea'>
  7. <view class="chekt">
  8. <view>{{shsj|| "上会时间"}}</view>
  9. <image :src="upimg"></image>
  10. </view>
  11. </picker>
  12. <!-- <picker range-key='label' :value="shidx" :range="shlist" @change='bindDateChangeb'>
  13. <view class="chekt">
  14. <view>{{shzt || "申贷次数"}}</view>
  15. <image :src="upimg"></image>
  16. </view>
  17. </picker> -->
  18. <view class="reset" @click="getResetFn">
  19. <image :src="resetimg"></image>
  20. </view>
  21. <view class="topc flexc">
  22. <image :src="secimg"></image>
  23. <input placeholder="请输入企业名称" confirm-type="search" v-model="usename" @confirm="getConfirm"/>
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 列表 -->
  28. <view class="plr18">
  29. <bus-list :datalist="list" :wtdt="wtdt" :type="type" :sdyhlist="sdyhlist" :dblxlist="dblxlist" :shjdlist="shjdlist" @getDetail="getDetail"></bus-list>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import config from '@/config'
  35. const baseUrl = config.baseUrl
  36. const baseName = config.baseName
  37. import busList from "@/work/components/business/list.vue"
  38. import {getVoteList} from "@/api/mine/work.js"
  39. import {getDictionaryFn} from "@/api/mine/register.js"
  40. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  41. export default{
  42. components:{busList},
  43. data(){
  44. return{
  45. secimg:require("@/static/images/home/hsearch.png"),
  46. upimg:require('@/work/static/images/sup.png'),
  47. resetimg:require('@/work/static/images/reset.png'),
  48. scanimg:require('@/work/static/images/scan.png'),
  49. list:[],
  50. sdyhlist:[],
  51. dblxlist:[],
  52. shjdlist:[],
  53. pageSize: 10,
  54. pageNum: 1,
  55. reachflag: true,
  56. wtdt:'',
  57. // limit:''
  58. type:'vote',
  59. shsj:'',
  60. usename:'',
  61. // type:'//file ',
  62. }
  63. },
  64. // 上拉触底加载更多触发事件
  65. onReachBottom() {
  66. if (this.reachflag) {
  67. this.pageNum++
  68. this.getDataFn()
  69. }
  70. },
  71. onLoad() {
  72. uni.$on('refreshywlist',(e) => {
  73. this.getrefreshData()
  74. })
  75. uni.$on('refreshdatalist',(e) => {
  76. this.getrefreshData()
  77. })
  78. this.init()
  79. this.getDataFn()
  80. },
  81. methods:{
  82. checkPermi, checkRole,
  83. init(){
  84. // 申贷银行
  85. getDictionaryFn('shendai_bank').then(res=>{
  86. if(res.code==200){
  87. this.sdyhlist = res.data.map(v => {
  88. return {
  89. label: v.dictLabel,
  90. value: v.dictValue
  91. }
  92. })
  93. }
  94. })
  95. //审核状态
  96. getDictionaryFn('sh_status').then(res=>{
  97. if(res.code==200){
  98. this.shlist = res.data.map(v => {
  99. return {
  100. label: v.dictLabel,
  101. value: v.dictValue
  102. }
  103. })
  104. }
  105. })
  106. //担保类型
  107. getDictionaryFn('guarantee_type').then(res=>{
  108. if(res.code==200){
  109. this.dblxlist = res.data.map(v => {
  110. return {
  111. label: v.dictLabel,
  112. value: v.dictValue
  113. }
  114. })
  115. }
  116. })
  117. //审核进度
  118. getDictionaryFn('audit_schedule').then(res=>{
  119. if(res.code==200){
  120. this.shjdlist = res.data.map(v => {
  121. return {
  122. label: v.dictLabel,
  123. value: v.dictValue
  124. }
  125. })
  126. }
  127. })
  128. },
  129. getDetail(e){
  130. this.$tab.navigateTo("/work/pages/business/details?id="+e+"&from=vote")
  131. },
  132. getConfirm(){
  133. this.getrefreshData()
  134. },
  135. bindDateChangea(e){
  136. var val=e.detail.value;
  137. this.shsj=val;
  138. this.getrefreshData()
  139. },
  140. bindDateChangeb(e){
  141. var val=e.detail.value;
  142. this.shzt=this.shlist[val].label;
  143. this.shztid=this.shlist[val].value;
  144. this.getrefreshData()
  145. },
  146. getResetFn(){
  147. // 重置
  148. this.shsj='';
  149. this.usename='';
  150. this.getrefreshData()
  151. },
  152. getrefreshData(){
  153. this.pageNum=1;
  154. this.list=[];
  155. this.reachflag=true;
  156. this.getDataFn()
  157. },
  158. getDataFn(){
  159. var params={
  160. pageSize:this.pageSize,
  161. pageNum: this.pageNum,
  162. // loanApplicationType:4,
  163. }
  164. if(this.shsj){
  165. params.reviewTime=this.shsj
  166. }
  167. if(this.usename){
  168. params.enterpriseName=this.usename
  169. }
  170. getVoteList(params).then(res=>{
  171. if(res.code==200){
  172. if (res.rows.length < this.pageSize) {
  173. this.reachflag = false
  174. this.wtdt = '到底了~';
  175. } else {
  176. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  177. if (num < res.total) {
  178. this.reachflag = true
  179. this.wtdt = ''
  180. } else {
  181. this.reachflag = false
  182. this.wtdt = '到底了~';
  183. }
  184. }
  185. if (this.pageNum == 1) {
  186. this.list = res.rows;
  187. } else {
  188. this.list = this.list.concat(res.rows)
  189. }
  190. }else{
  191. this.$toast(res.msg)
  192. }
  193. })
  194. },
  195. },
  196. }
  197. </script>
  198. <style lang="scss" scoped>
  199. .fixedt{position: fixed;left: 0;right: 0;top: 0;z-index: 2;}
  200. // .fixedt /deep/ uni-picker{flex: 1;}
  201. .checkbox{padding:16rpx 32rpx;background-color: #efefef;
  202. .chekt{display: flex;align-items: center;margin-right: 12rpx;height:88rpx;
  203. view{text-align: center;
  204. font-weight: bold;font-size: 26rpx;color: #374B61;width: 136rpx;word-break: break-all;text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;white-space: normal;}
  205. image{width: 16rpx;height: 12rpx;flex: 0 0 auto;margin-left: 4rpx;}
  206. }
  207. }
  208. .reset{width:56rpx; height: 88rpx;display: flex;align-items: center;justify-content: center;
  209. image{width: 26rpx;height: 30rpx;}
  210. }
  211. .topc{border-radius: 34rpx;height:68rpx;box-sizing: border-box;padding:0 28rpx;position: relative;flex:1;background-color:rgba(90, 135, 186, 0.2);width: 260rpx;
  212. margin-left: 20rpx;
  213. input{font-weight: 500;font-size: 26rpx;color: #222327;flex: 1;}
  214. image{width: 30rpx;height: 30rpx;margin-right: 16rpx;flex: 0 0 auto;}
  215. }
  216. // .listbox{padding-top: 120rpx;padding-bottom: 100rpx;}
  217. .listbox{padding-top: 120rpx;}
  218. .scanbox{position: fixed;left: 0;right: 0;bottom: 0;height: 100rpx;
  219. background: #00A9F0;font-weight: bold;font-size: 30rpx;color: #FFFFFF;
  220. image{width: 26rpx;height: 26rpx;margin-right: 24rpx;}
  221. }
  222. </style>