list.vue 6.4 KB

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