index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. <template>
  2. <view class="zxbox">
  3. <view class="zxtop">
  4. <view class="navbox">
  5. <uni-nav-bar color="#ffffff" leftWidth='160rpx' rightWidth="48rpx" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  6. <block slot="left">
  7. <view class="topl flexc">
  8. <image :src="adrimg" ></image>
  9. <view class="over">潜山</view>
  10. </view>
  11. </block>
  12. <view class="topc flexc" v-if="checkPermi(['idcard:idcard:list'])">
  13. <image :src="secimg"></image>
  14. <input placeholder="请输入您要找的客户名称" confirm-type="search" v-model="usename" @confirm="getConfirm"/>
  15. </view>
  16. <block slot="right">
  17. <view class="topr flexcc" @click='getScanFn'>
  18. <image :src="codeimg"></image>
  19. </view>
  20. </block>
  21. </uni-nav-bar>
  22. </view>
  23. <image :src="bgimg" class="bgimg"></image>
  24. <view class="zxmain">
  25. <view class="banbox mb12" v-if="bannerlist.length">
  26. <banner :bannerlist="bannerlist"></banner>
  27. </view>
  28. <view class="grid" v-if="checkPermi(['system:system:user'])">
  29. <view class="grid-item-box" @click="getBusListFn(1)" v-if="checkPermi(['system:application:list'])">
  30. <view class="img"><image :src="topaimg" class="imga"></image></view>
  31. <view>申报审核</view>
  32. </view>
  33. <view class="grid-item-box" @click="getBusListFn(3)" v-if="checkPermi(['system:application:list'])">
  34. <view class="img"><image :src="topbimg" class="imgb"></image></view>
  35. <view>担保初审</view>
  36. </view>
  37. <view class="grid-item-box" >
  38. <view class="img"><image :src="topcimg" class="imgc"></image></view>
  39. <view>外部工具</view>
  40. </view>
  41. <view class="grid-item-box" @click="getBusListFn(4)" v-if="checkPermi(['system:application:list'])">
  42. <view class="img"><image :src="topdimg" class="imgd"></image></view>
  43. <view>尽职调查</view>
  44. </view>
  45. <view class="grid-item-box" @click="getBusListFn(6)" v-if="checkPermi(['system:application:list'])">
  46. <view class="img"><image :src="topeimg" class="imga"></image></view>
  47. <view>评审会</view>
  48. </view>
  49. <view class="grid-item-box" @click="getBusListFn(7)" v-if="checkPermi(['system:application:list'])">
  50. <view class="img"><image :src="topfimg" class="imgc"></image></view>
  51. <view>签署合同</view>
  52. </view>
  53. <view class="grid-item-box" @click="getLedgerFn">
  54. <view class="img"><image :src="topgimg" class="imge"></image></view>
  55. <view>台账表</view>
  56. </view>
  57. <view class="grid-item-box" @click="getFileFn" v-if="checkPermi(['system:application:listOss'])">
  58. <view class="img"><image :src="tophimg" class="imgf"></image></view>
  59. <view>文件管理</view>
  60. </view>
  61. </view>
  62. <!-- v-if="checkPermi(['zxNotice:notice:list'])" -->
  63. <view class="mlrbox">
  64. <view class="mb24">
  65. <h-notice :noticelist="noticelist" :autoplay='autoplay' @getNoticeDet="getNoticeDet"></h-notice>
  66. </view>
  67. <view class="addbox mb26">
  68. <view class="adda bga" v-if="checkPermi(['system:application:add'])&&checkPermi(['system:registered:user'])" @click="getProveFn">
  69. <image :src="haddaimg"></image>
  70. <view class="tit">业务申报</view>
  71. <view class="txt">在线填写</view>
  72. </view>
  73. <view class="adda bgb" @click="getBuszcListFn" v-if="checkPermi(['system:application:list'])&&checkPermi(['system:registered:user'])">
  74. <image :src="haddbimg"></image>
  75. <view class="tit">暂存申报</view>
  76. <view class="txt">继续填报</view>
  77. </view>
  78. <!-- 普通客户 -->
  79. <view class="adda bgc" @click="getBusListFn(0,'my')" v-if="checkPermi(['system:application:list'])&&checkPermi(['system:registered:user'])">
  80. <image :src="haddcimg"></image>
  81. <view class="tit">我的申报</view>
  82. <view class="txt">查看进度</view>
  83. </view>
  84. <view class="adda bgd" @click="getBushszListFn" v-if="checkPermi(['system:system:user'])">
  85. <image :src="hadddimg"></image>
  86. <view class="tit">回收站</view>
  87. <view class="txt">一键找回</view>
  88. </view>
  89. </view>
  90. <view class="flexcj tabt pb12" v-if="checkPermi(['system:remind:list'])">
  91. <view class="left">待办提醒(<text>{{total}}</text>)</view>
  92. <view class="right flexc" @click="getBusListFn(0)" v-if="checkPermi(['system:application:list'])">更多<image :src="rimg"></image></view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <!-- 代办提醒 -->
  98. <view class="hnbox" v-if="checkPermi(['system:remind:list'])">
  99. <view class="hntabs flexc" :class="fixedflag?'tabfix':''" :style="fixedflag?'top:'+nvaHeight+'px;':''">
  100. <block v-for="(ite,idx) in tabList" :key="idx">
  101. <!-- v-if="checkPermi([ite.limit])" -->
  102. <view class="tit" :class="tabval==ite.val?'act':''" @click="getTab(ite.val)">{{ite.tit}}</view>
  103. </block>
  104. </view>
  105. <view style="height:98rpx;" v-if="fixedflag"></view>
  106. <!-- 列表 -->
  107. <view class="mt2 plr12" :style="'min-height: ' + minheight + 'px;'">
  108. <wait-list type='dbtx' :datalist="list" :wtdt="wtdt" @getDetail="getDetail"></wait-list>
  109. </view>
  110. </view>
  111. <pop-up :type="type" :initFace="initFace" @getFaFn="getFaFn" @getClose="getClose" @getXxwsFn="getXxwsFn"></pop-up>
  112. <footers v-if="isfootflag" :footerindex="footerindex" :isHomeIndex="true"></footers>
  113. </view>
  114. </template>
  115. <script>
  116. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  117. import waitList from "@/components/wait/list.vue"
  118. let { calendar } = require("@/components/lunc-calendar/calendar.js");
  119. import {getRemindList,getNoticeList,getbannerList} from "@/api/common.js"
  120. import {getChangeFace} from "@/api/mine/card.js"
  121. import {getDictionaryFn} from "@/api/mine/register.js"
  122. import popUp from "@/components/popup/popup.vue"
  123. import banner from "@/components/toptab/banner.vue"
  124. import hNotice from '@/components/swiper/notice.vue'
  125. import footers from '@/components/footer/footer.vue'
  126. export default {
  127. components:{banner,hNotice,waitList,footers,popUp},
  128. data(){
  129. return{
  130. footerindex:'home',
  131. isfootflag:true,
  132. backgroundColor:'transparent',
  133. bgimg:require("@/static/images/navbg.png"),
  134. adrimg:require("@/static/images/home/adr.png"),
  135. noticeimg:require("@/static/images/home/notice.png"),
  136. secimg:require("@/static/images/home/search.png"),
  137. topaimg:require("@/static/images/home/topa.png"),
  138. topbimg:require("@/static/images/home/topb.png"),
  139. topcimg:require("@/static/images/home/topc.png"),
  140. topdimg:require("@/static/images/home/topd.png"),
  141. topeimg:require("@/static/images/home/tope.png"),
  142. topfimg:require("@/static/images/home/topa.png"),
  143. topgimg:require("@/static/images/home/topg.png"),
  144. tophimg:require("@/static/images/home/toph.png"),
  145. haddaimg:require("@/static/images/home/hadda.png"),
  146. haddbimg:require("@/static/images/home/haddb.png"),
  147. haddcimg:require("@/static/images/home/haddc.png"),
  148. hadddimg:require("@/static/images/home/haddd.png"),
  149. codeimg:require("@/static/images/home/scan.png"),
  150. rimg:require("@/static/images/home/rimg.png"),
  151. noticelist:[],
  152. autoplay:true,
  153. list:[],
  154. pageSize: 10,
  155. pageNum: 1,
  156. reachflag: true,
  157. wtdt:'加载更多',
  158. nvaHeight:44,
  159. minheight:0,
  160. listTop:0,//距离顶部的距离
  161. fixedflag:false,
  162. tabval:0,
  163. total:0,
  164. tabList:[{tit:'全部',val:0},{tit:'申报审核',val:1},{tit:'担保初审',val:2},{tit:'尽职调查',val:3},{tit:'评审会',val:4},{tit:'签署合同',val:5},],
  165. usename:'',
  166. type:'',//zcta 暂存信息
  167. zcid:'',//暂存id
  168. userId:this.$store.state.user.userId,
  169. initFace:'Y',//initFace Y不需要,N需要人脸认证
  170. bannerlist:[],
  171. metaInfo:'',
  172. }
  173. },
  174. onPageScroll(e) {
  175. var scrollTop = Number(e.scrollTop);
  176. var listTop=Number(this.listTop)-Number(this.nvaHeight)
  177. if (scrollTop <=this.nvaHeight) {
  178. const opacity = scrollTop / 100 // 计算透明度值
  179. const color = `rgba(4, 145, 253, ${opacity})`
  180. this.backgroundColor = color // 更新盒子背景颜色
  181. } else {
  182. this.backgroundColor = '#00A9F0'
  183. }
  184. if(scrollTop>listTop){
  185. this.fixedflag=true
  186. }else{
  187. this.fixedflag=false
  188. }
  189. },
  190. onUnload() {
  191. uni.$off('refreshdatalist')
  192. },
  193. onShow() {
  194. if(checkPermi(['system:registered:user'])&&!checkPermi(['system:system:user'])){
  195. this.initFace=this.$store.state.user.initFace;
  196. }
  197. },
  198. onLoad: function() {
  199. // uni.$on('refreshdatalist',(e) => {
  200. // this.reachflag=false;
  201. // this.pageNum=1;
  202. // this.list=[];
  203. // this.getDataFn();
  204. // })
  205. // this.init()
  206. if(checkPermi(['system:remind:list'])){
  207. this.getDataFn()
  208. }
  209. this.getNoticeFn()
  210. this.getbannerList()
  211. uni.getSystemInfo({
  212. success: (e) => {
  213. this.nvaHeight = Number(e.statusBarHeight)+44;
  214. this.minheight = e.screenHeight - Number(this.nvaHeight)- 100;
  215. }
  216. })
  217. },
  218. mounted() {
  219. this.getHeightFn()
  220. },
  221. // 上拉触底加载更多触发事件
  222. onReachBottom() {
  223. // if (this.reachflag) {
  224. // this.pageNum++
  225. // this.getDataFn()
  226. // }
  227. },
  228. methods:{
  229. checkPermi, checkRole,
  230. getClose(){
  231. this.type=''
  232. },
  233. getXxwsFn(){
  234. this.$tab.navigateTo(`/work/pages/prove/index`)
  235. },
  236. getFaFn(type,ptype){
  237. if(ptype=='zcta'){
  238. if(type=='new'){
  239. this.$tab.navigateTo("/work/pages/prove/zctype")
  240. }else{
  241. var obj={
  242. type:'edit',
  243. id:this.zcid,
  244. }
  245. this.$tab.navigateTo('/work/pages/business/add?data='+encodeURIComponent(JSON.stringify(obj)))
  246. }
  247. }
  248. this.type='';
  249. },
  250. getFace(){
  251. var that=this;
  252. var resparams={
  253. userId:that.userId,
  254. initFace:'N'
  255. }
  256. getChangeFace(resparams).then(v=>{
  257. if(v.code==200){
  258. that.$store.dispatch('GetInfo').then(vres => {
  259. // 添加企业
  260. // this.$tab.reLaunch('/pages/index/index')
  261. console.log(vres,2)
  262. })
  263. }
  264. })
  265. return
  266. },
  267. getConfirm(){
  268. // this.$tab.navigateTo("/pages/order/list")
  269. // this.init()
  270. },
  271. getProveFn(){
  272. this.$tab.navigateTo("/work/pages/prove/zctype")
  273. },
  274. getBusListFn(type,from){
  275. // this.$tab.navigateTo("/work/pages/business/list?type="+type)
  276. if(from){
  277. this.$tab.navigateTo("/work/pages/business/list?from=my&type=0")
  278. }else{
  279. this.$tab.navigateTo("/work/pages/business/list?type=0")
  280. }
  281. },
  282. getBuszcListFn(){
  283. this.$tab.navigateTo("/work/pages/business/zclist")
  284. },
  285. getBushszListFn(){
  286. this.$tab.navigateTo("/work/pages/business/hszlist")
  287. },
  288. getScanFn(){
  289. // 扫码识别
  290. // this.$tab.navigateTo("/pages/index/notice")
  291. },
  292. getLedgerFn(){
  293. this.$tab.navigateTo("/work/pages/file/ledgertable")
  294. },
  295. getFileFn(){
  296. this.$tab.navigateTo("/work/pages/file/list")
  297. },
  298. getNoticeDet(e){
  299. this.$tab.navigateTo("/pages/index/noticedetail?type=xttz&id="+e)
  300. },
  301. getDetail(e){
  302. this.$tab.navigateTo("/pages/index/noticedetail?type=dbtz&id="+e)
  303. },
  304. getTab(idx){
  305. this.tabval=idx;
  306. this.getrefreshData()
  307. },
  308. getrefreshData(){
  309. this.pageNum=1;
  310. this.list=[];
  311. this.reachflag=true;
  312. this.getDataFn()
  313. },
  314. getHeightFn(){
  315. let query = uni.createSelectorQuery().in(this);
  316. //需要给黄色区域设置一个id标识,在这里是demo
  317. query.select('.zxtop').boundingClientRect(data => {
  318. var top=data.top<0 ? -data.top : data.top;
  319. this.listTop = data.height//赋值,待会要用
  320. if (top <=this.nvaHeight) {
  321. const opacity = top / 100 // 计算透明度值
  322. const color = `rgba(4, 145, 253, ${opacity})`
  323. this.backgroundColor = color // 更新盒子背景颜色
  324. } else {
  325. this.backgroundColor = '#00A9F0'
  326. }
  327. }).exec();
  328. },
  329. init(){
  330. // 记录来源
  331. getDictionaryFn('jluly').then(res=>{
  332. if(res.code==200){
  333. this.adrlist = res.data.map(v => {
  334. return {
  335. dictLabel: v.dictLabel,
  336. dictValue: v.dictValue
  337. }
  338. })
  339. }
  340. })
  341. },
  342. getMoreFn(){
  343. this.$tab.navigateTo("/pages/order/list")
  344. },
  345. time() {
  346. var date = new Date();
  347. var y = date.getFullYear();
  348. var m = date.getMonth() + 1;
  349. var d = date.getDate();
  350. let lunar = calendar.solar2lunar(y, m, d); //农历
  351. this.lunar=lunar.IMonthCn+lunar.IDayCn;
  352. this.daytime=m+'月'+d+"日";
  353. // var h = date.getHours();
  354. // var min = date.getMinutes();
  355. // var s = date.getSeconds();
  356. // var week = date.getDay(); //获取当前星期X(0-6,0代表星期天)
  357. // var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  358. // var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
  359. // var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
  360. // '0' + s) : s);
  361. // this.kaTime = yearStr + ' ' + timeStr;
  362. },
  363. getNoticeFn(){
  364. var params={
  365. pageSize:10,
  366. pageNum: 1,
  367. }
  368. getNoticeList(params).then(res=>{
  369. if(res.code==200){
  370. this.noticelist = res.rows;
  371. }else{
  372. this.$toast(res.msg)
  373. }
  374. })
  375. },
  376. getbannerList(){
  377. getbannerList().then(res=>{
  378. if(res.code==200){
  379. var data=res.rows;
  380. var newArr=[];
  381. data.forEach(ite=>{
  382. if(ite.imgUrl){
  383. newArr=newArr.concat(ite.imgUrl.split(','))
  384. }
  385. })
  386. this.bannerlist=newArr;
  387. }
  388. })
  389. },
  390. getDataFn(){
  391. var params={
  392. pageSize:this.pageSize,
  393. pageNum: this.pageNum,
  394. }
  395. if(this.tabval&&this.tabval!=0){
  396. params.remindType=this.tabval
  397. }
  398. getRemindList(params).then(res=>{
  399. if(res.code==200){
  400. this.total=res.total||0
  401. if (res.rows.length < this.pageSize) {
  402. this.reachflag = false
  403. this.wtdt = '到底了~';
  404. } else {
  405. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  406. if (num < res.total) {
  407. this.reachflag = true
  408. this.wtdt = '上拉加载更多'
  409. } else {
  410. this.reachflag = false
  411. this.wtdt = '到底了~';
  412. }
  413. }
  414. if (this.pageNum == 1) {
  415. this.list = res.rows;
  416. } else {
  417. this.list = this.list.concat(res.rows)
  418. }
  419. }else{
  420. this.$toast(res.msg)
  421. }
  422. })
  423. },
  424. },
  425. }
  426. </script>
  427. <style>
  428. page{background-color: #FFFFFF;}
  429. </style>
  430. <style lang="scss" scoped>
  431. .navbox /deep/ .uni-navbar__header-container {align-items: center;padding-left: 0;}
  432. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;
  433. .topl{padding-left: 16rpx;overflow: hidden;
  434. image{width: 30rpx;height: 38rpx;margin-right: 18rpx;flex: 0 0 auto;}
  435. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;}
  436. }
  437. .topc{border-radius: 34rpx;height:68rpx;box-sizing: border-box;padding:0 32rpx 0 32rpx ;position: relative;flex:1;background-color: #FFFFFF;
  438. input{font-weight: 500;font-size: 26rpx;color: #222327;}
  439. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;flex: 0 0 auto;}
  440. }
  441. .topr{width: 48rpx;height: 38rpx;position: relative;
  442. image{width: 36rpx;height: 38rpx;margin: 0 auto;}
  443. // .cir{background: #FF4747;font-size: 14rpx;color: #FFFFFF;border-radius: 50%;border: 2rpx solid #FFFFFF;min-width: 20rpx;height: 20rpx;
  444. // position: absolute;right: -5rpx;top: -5rpx;text-align: center;line-height: 16rpx;
  445. // }
  446. // .cir{width: 14rpx;height: 14rpx;background: #DF0024;border-radius: 50%;position: absolute;right: -7rpx;top: -7rpx;}
  447. }
  448. }
  449. .zxbox{
  450. .bgimg{width: 100%;height: 450rpx;}
  451. .zxmain{
  452. margin-top: -270rpx;position: relative;
  453. .banbox{width: 678rpx;height: 246rpx;margin: 0 auto;}
  454. .grid{
  455. display: flex;align-items: center;flex-wrap: wrap;
  456. .grid-item-box {display: flex;flex-direction: column;align-items: center;justify-content: center;padding: 24rpx 0 36rpx;width: 25%;box-sizing: border-box;
  457. .img{width: 46rpx;height: 46rpx;display: flex;align-items: center;justify-content: center;margin-bottom: 22rpx;
  458. .imga{width: 46rpx;height: 46rpx;}
  459. .imgb{width: 46rpx;height: 40rpx;}
  460. .imgc{width: 44rpx;height: 46rpx;}
  461. .imgd{width: 40rpx;height: 46rpx;}
  462. .imge{width: 42rpx;height: 46rpx;}
  463. .imgf{width: 44rpx;height: 40rpx;}
  464. }
  465. view{font-weight: bold;font-size: 26rpx;color: #222327;}
  466. }
  467. }
  468. .mlrbox{margin: 8rpx 36rpx 0;}
  469. .addbox{
  470. display: flex;
  471. .adda{width: 154rpx;height: 190rpx;border-radius: 20rpx;box-sizing: border-box;padding: 28rpx 0 0 20rpx;margin-right: 22rpx;
  472. &.bga{background: #FFF6F5;}
  473. &.bgb{background: #F6F8FF;}
  474. &.bgc{background: #FFF6E7;}
  475. &.bgd{background: #EFF9F6;}
  476. &:nth-child(4n){margin-right: 0;}
  477. image{width: 52rpx;height: 52rpx;margin-bottom: 12rpx;}
  478. .tit{font-weight: bold;font-size: 28rpx;color: #222327;margin-bottom: 4rpx;}
  479. .txt{font-size: 22rpx;color: #AAAAAA;}
  480. }
  481. }
  482. .tabt{
  483. .left{font-weight: bold;font-size: 36rpx;color: #222327;
  484. text{color: #FF6969;font-size: 30rpx;}
  485. }
  486. .right{font-size: 26rpx;color: #AAAAAA;
  487. image{width: 12rpx;height: 18rpx;margin-left: 14rpx;}
  488. }
  489. }
  490. }
  491. .hnbox{background-color: #ffffff;padding-bottom: 32rpx;
  492. .hntabs{padding:20rpx 12rpx 20rpx 34rpx;background-color: #ffffff;overflow: auto;
  493. &.tabfix{position: fixed;left: 0;right: 0;z-index: 4;box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(196,191,191,0.22);}
  494. .tit{font-weight: 500;font-size: 26rpx;color: #252736;position: relative;margin-right: 22rpx;height: 58rpx;text-align: center;padding: 0 26rpx;background: #F6F6F6;
  495. border-radius: 30rpx;flex: 0 0 auto;line-height: 58rpx;
  496. &.act{font-weight: 500;color: #FFFFFF;background: #00A9F0;
  497. }
  498. }
  499. }
  500. }
  501. }
  502. </style>