votelist.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. onUnload() {
  72. uni.$off('refreshywlist')
  73. uni.$off('refreshdatalist')
  74. },
  75. onLoad() {
  76. uni.$on('refreshywlist',(e) => {
  77. this.getrefreshData()
  78. })
  79. uni.$on('refreshdatalist',(e) => {
  80. this.getrefreshData()
  81. })
  82. this.init()
  83. this.getDataFn()
  84. },
  85. methods:{
  86. checkPermi, checkRole,
  87. init(){
  88. // 申贷银行
  89. getDictionaryFn('shendai_bank').then(res=>{
  90. if(res.code==200){
  91. this.sdyhlist = res.data.map(v => {
  92. return {
  93. label: v.dictLabel,
  94. value: v.dictValue
  95. }
  96. })
  97. }
  98. })
  99. //审核状态
  100. getDictionaryFn('sh_status').then(res=>{
  101. if(res.code==200){
  102. this.shlist = res.data.map(v => {
  103. return {
  104. label: v.dictLabel,
  105. value: v.dictValue
  106. }
  107. })
  108. }
  109. })
  110. //担保类型
  111. getDictionaryFn('guarantee_type').then(res=>{
  112. if(res.code==200){
  113. this.dblxlist = res.data.map(v => {
  114. return {
  115. label: v.dictLabel,
  116. value: v.dictValue
  117. }
  118. })
  119. }
  120. })
  121. //审核进度
  122. getDictionaryFn('audit_schedule').then(res=>{
  123. if(res.code==200){
  124. this.shjdlist = res.data.map(v => {
  125. return {
  126. label: v.dictLabel,
  127. value: v.dictValue
  128. }
  129. })
  130. }
  131. })
  132. },
  133. getDetail(e){
  134. this.$tab.navigateTo("/work/pages/business/details?id="+e+"&from=vote")
  135. },
  136. getConfirm(){
  137. this.getrefreshData()
  138. },
  139. bindDateChangea(e){
  140. var val=e.detail.value;
  141. this.shsj=val;
  142. this.getrefreshData()
  143. },
  144. bindDateChangeb(e){
  145. var val=e.detail.value;
  146. this.shzt=this.shlist[val].label;
  147. this.shztid=this.shlist[val].value;
  148. this.getrefreshData()
  149. },
  150. getResetFn(){
  151. // 重置
  152. this.shsj='';
  153. this.usename='';
  154. this.getrefreshData()
  155. },
  156. getrefreshData(){
  157. this.pageNum=1;
  158. this.list=[];
  159. this.reachflag=true;
  160. this.getDataFn()
  161. },
  162. getDataFn(){
  163. var params={
  164. pageSize:this.pageSize,
  165. pageNum: this.pageNum,
  166. // loanApplicationType:4,
  167. }
  168. if(this.shsj){
  169. params.reviewTime=this.shsj
  170. }
  171. if(this.usename){
  172. params.enterpriseName=this.usename
  173. }
  174. getVoteList(params).then(res=>{
  175. if(res.code==200){
  176. if (res.rows.length < this.pageSize) {
  177. this.reachflag = false
  178. this.wtdt = '到底了~';
  179. } else {
  180. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  181. if (num < res.total) {
  182. this.reachflag = true
  183. this.wtdt = ''
  184. } else {
  185. this.reachflag = false
  186. this.wtdt = '到底了~';
  187. }
  188. }
  189. if (this.pageNum == 1) {
  190. this.list = res.rows;
  191. } else {
  192. this.list = this.list.concat(res.rows)
  193. }
  194. }else{
  195. this.$toast(res.msg)
  196. }
  197. })
  198. },
  199. },
  200. }
  201. </script>
  202. <style lang="scss" scoped>
  203. .fixedt{position: fixed;left: 0;right: 0;top: 0;z-index: 2;}
  204. // .fixedt /deep/ uni-picker{flex: 1;}
  205. .checkbox{padding:16rpx 32rpx;background-color: #efefef;
  206. .chekt{display: flex;align-items: center;margin-right: 12rpx;height:88rpx;
  207. view{text-align: center;
  208. 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;}
  209. image{width: 16rpx;height: 12rpx;flex: 0 0 auto;margin-left: 4rpx;}
  210. }
  211. }
  212. .reset{width:56rpx; height: 88rpx;display: flex;align-items: center;justify-content: center;
  213. image{width: 26rpx;height: 30rpx;}
  214. }
  215. .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;
  216. margin-left: 20rpx;
  217. input{font-weight: 500;font-size: 26rpx;color: #222327;flex: 1;}
  218. image{width: 30rpx;height: 30rpx;margin-right: 16rpx;flex: 0 0 auto;}
  219. }
  220. // .listbox{padding-top: 120rpx;padding-bottom: 100rpx;}
  221. .listbox{padding-top: 120rpx;}
  222. .scanbox{position: fixed;left: 0;right: 0;bottom: 0;height: 100rpx;
  223. background: #00A9F0;font-weight: bold;font-size: 30rpx;color: #FFFFFF;
  224. image{width: 26rpx;height: 26rpx;margin-right: 24rpx;}
  225. }
  226. </style>