index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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">
  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">
  29. <view class="grid-item-box" @click="getBusListFn(2)" 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'])" @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'])">
  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)" v-if="checkPermi(['system:application:list'])">
  80. <image :src="haddcimg"></image>
  81. <view class="tit">我的申报</view>
  82. <view class="txt">查看进度</view>
  83. </view>
  84. <view class="adda bgd">
  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">
  91. <view class="left" @click="getFace">待办提醒(<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">
  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" @getFaFn="getFaFn" @getClose="getClose"></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 {getDictionaryFn} from "@/api/mine/register.js"
  121. import popUp from "@/components/popup/popup.vue"
  122. import banner from "@/components/toptab/banner.vue"
  123. import hNotice from '@/components/swiper/notice.vue'
  124. import footers from '@/components/footer/footer.vue'
  125. const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
  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:[{noticeTitle:'安徽嘉欣医疗用品有限公司项目评…',issuerTime:'04-07'},{noticeTitle:'2安徽嘉欣医疗用品有限公司项目评…',issuerTime:'04-07'},],
  152. autoplay:true,
  153. list:[{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},
  154. {tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},
  155. {tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},
  156. ],
  157. pageSize: 10,
  158. pageNum: 1,
  159. reachflag: true,
  160. wtdt:'加载更多',
  161. nvaHeight:44,
  162. minheight:0,
  163. listTop:0,//距离顶部的距离
  164. fixedflag:false,
  165. tabval:0,
  166. total:0,
  167. tabList:[{tit:'全部',val:0},{tit:'申报审核',val:1},{tit:'担保初审',val:2},{tit:'尽职调查',val:3},{tit:'评审会',val:4},{tit:'签署合同',val:5},],
  168. usename:'',
  169. type:'',//zcta 暂存信息
  170. zcid:'',//暂存id
  171. userId:this.$store.state.user.userId,
  172. bannerlist:[],
  173. }
  174. },
  175. onPageScroll(e) {
  176. var scrollTop = Number(e.scrollTop);
  177. var listTop=Number(this.listTop)-Number(this.nvaHeight)
  178. if (scrollTop <=this.nvaHeight) {
  179. const opacity = scrollTop / 100 // 计算透明度值
  180. const color = `rgba(4, 145, 253, ${opacity})`
  181. this.backgroundColor = color // 更新盒子背景颜色
  182. } else {
  183. this.backgroundColor = '#00A9F0'
  184. }
  185. if(scrollTop>listTop){
  186. this.fixedflag=true
  187. }else{
  188. this.fixedflag=false
  189. }
  190. },
  191. onUnload() {
  192. uni.$off('refreshdatalist')
  193. },
  194. onLoad: function() {
  195. // uni.$on('refreshdatalist',(e) => {
  196. // this.reachflag=false;
  197. // this.pageNum=1;
  198. // this.list=[];
  199. // this.getDataFn();
  200. // })
  201. // this.init()
  202. this.getDataFn()
  203. this.getNoticeFn()
  204. this.getbannerList()
  205. uni.getSystemInfo({
  206. success: (e) => {
  207. this.nvaHeight = Number(e.statusBarHeight)+44;
  208. this.minheight = e.screenHeight - Number(this.nvaHeight)- 100;
  209. }
  210. })
  211. // var metaInfo = aliyunVerify.getMetaInfo();
  212. // let p = uni.getSystemInfoSync().platform;
  213. // if (p === "ios") {
  214. // t = JSON.stringify(t);
  215. // }
  216. // console.log(metaInfo)
  217. },
  218. onShow() {
  219. // var that=this;
  220. // this.time();
  221. },
  222. mounted() {
  223. this.getHeightFn()
  224. },
  225. // 上拉触底加载更多触发事件
  226. onReachBottom() {
  227. // if (this.reachflag) {
  228. // this.pageNum++
  229. // this.getDataFn()
  230. // }
  231. },
  232. methods:{
  233. checkPermi, checkRole,
  234. getClose(){
  235. this.type=''
  236. },
  237. getFaFn(type,ptype){
  238. if(ptype=='zcta'){
  239. if(type=='new'){
  240. this.$tab.navigateTo("/work/pages/prove/zctype")
  241. }else{
  242. var obj={
  243. type:'edit',
  244. id:this.zcid,
  245. }
  246. this.$tab.navigateTo('/work/pages/business/add?data='+encodeURIComponent(JSON.stringify(obj)))
  247. }
  248. }
  249. this.type='';
  250. },
  251. getFace(){
  252. aliyunVerify.verify({
  253. "certifyId":"sha3e385f6c273f2c11cf806ed95894b", // 填写从服务端获取的certifyId
  254. },
  255. function(response){
  256. console.log(response)
  257. }
  258. );
  259. // response返回格式
  260. // {
  261. // code:1000, // 错误码
  262. // message:"CODE_VERIFY_SUCCESS" // 错误码描述
  263. // }
  264. },
  265. getConfirm(){
  266. // this.$tab.navigateTo("/pages/order/list")
  267. // this.init()
  268. },
  269. getProveFn(){
  270. this.$tab.navigateTo("/work/pages/prove/zctype")
  271. },
  272. getBusListFn(type){
  273. // this.$tab.navigateTo("/work/pages/business/list?type="+type)
  274. this.$tab.navigateTo("/work/pages/business/list?type=0")
  275. },
  276. getBuszcListFn(){
  277. this.$tab.navigateTo("/work/pages/business/zclist")
  278. },
  279. getScanFn(){
  280. // 扫码识别
  281. // this.$tab.navigateTo("/pages/index/notice")
  282. },
  283. getLedgerFn(){
  284. this.$tab.navigateTo("/work/pages/file/ledgertable")
  285. },
  286. getFileFn(){
  287. this.$tab.navigateTo("/work/pages/file/list")
  288. },
  289. getNoticeDet(e){
  290. this.$tab.navigateTo("/pages/index/noticedetail?type=xttz&id="+e)
  291. },
  292. getDetail(e){
  293. this.$tab.navigateTo("/pages/index/noticedetail?type=dbtz&id="+e)
  294. },
  295. getTab(idx){
  296. this.tabval=idx;
  297. this.getrefreshData()
  298. },
  299. getrefreshData(){
  300. this.pageNum=1;
  301. this.list=[];
  302. this.reachflag=true;
  303. this.getDataFn()
  304. },
  305. getHeightFn(){
  306. let query = uni.createSelectorQuery().in(this);
  307. //需要给黄色区域设置一个id标识,在这里是demo
  308. query.select('.zxtop').boundingClientRect(data => {
  309. var top=data.top<0 ? -data.top : data.top;
  310. this.listTop = data.height//赋值,待会要用
  311. if (top <=this.nvaHeight) {
  312. const opacity = top / 100 // 计算透明度值
  313. const color = `rgba(4, 145, 253, ${opacity})`
  314. this.backgroundColor = color // 更新盒子背景颜色
  315. } else {
  316. this.backgroundColor = '#00A9F0'
  317. }
  318. }).exec();
  319. },
  320. init(){
  321. // 记录来源
  322. getDictionaryFn('jluly').then(res=>{
  323. if(res.code==200){
  324. this.adrlist = res.data.map(v => {
  325. return {
  326. dictLabel: v.dictLabel,
  327. dictValue: v.dictValue
  328. }
  329. })
  330. }
  331. })
  332. },
  333. getMoreFn(){
  334. this.$tab.navigateTo("/pages/order/list")
  335. },
  336. time() {
  337. var date = new Date();
  338. var y = date.getFullYear();
  339. var m = date.getMonth() + 1;
  340. var d = date.getDate();
  341. let lunar = calendar.solar2lunar(y, m, d); //农历
  342. this.lunar=lunar.IMonthCn+lunar.IDayCn;
  343. this.daytime=m+'月'+d+"日";
  344. // var h = date.getHours();
  345. // var min = date.getMinutes();
  346. // var s = date.getSeconds();
  347. // var week = date.getDay(); //获取当前星期X(0-6,0代表星期天)
  348. // var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  349. // var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
  350. // var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
  351. // '0' + s) : s);
  352. // this.kaTime = yearStr + ' ' + timeStr;
  353. },
  354. getNoticeFn(){
  355. var params={
  356. pageSize:10,
  357. pageNum: 1,
  358. }
  359. getNoticeList(params).then(res=>{
  360. if(res.code==200){
  361. this.noticelist = res.rows;
  362. }else{
  363. this.$toast(res.msg)
  364. }
  365. })
  366. },
  367. getbannerList(){
  368. getbannerList().then(res=>{
  369. if(res.code==200){
  370. var data=res.rows;
  371. var newArr=[];
  372. data.forEach(ite=>{
  373. if(ite.imgUrl){
  374. newArr=newArr.concat(ite.imgUrl.split(','))
  375. }
  376. })
  377. this.bannerlist=newArr;
  378. }
  379. })
  380. },
  381. getDataFn(){
  382. var params={
  383. pageSize:this.pageSize,
  384. pageNum: this.pageNum,
  385. }
  386. if(this.tabval){
  387. params.remindType=this.tabval
  388. }
  389. getRemindList(params).then(res=>{
  390. if(res.code==200){
  391. this.total=res.total||0
  392. if (res.rows.length < this.pageSize) {
  393. this.reachflag = false
  394. this.wtdt = '到底了~';
  395. } else {
  396. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  397. if (num < res.total) {
  398. this.reachflag = true
  399. this.wtdt = '上拉加载更多'
  400. } else {
  401. this.reachflag = false
  402. this.wtdt = '到底了~';
  403. }
  404. }
  405. if (this.pageNum == 1) {
  406. this.list = res.rows;
  407. } else {
  408. this.list = this.list.concat(res.rows)
  409. }
  410. }else{
  411. this.$toast(res.msg)
  412. }
  413. })
  414. },
  415. },
  416. }
  417. </script>
  418. <style>
  419. page{background-color: #FFFFFF;}
  420. </style>
  421. <style lang="scss" scoped>
  422. .navbox /deep/ .uni-navbar__header-container {align-items: center;padding-left: 0;}
  423. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;
  424. .topl{padding-left: 16rpx;overflow: hidden;
  425. image{width: 30rpx;height: 38rpx;margin-right: 18rpx;flex: 0 0 auto;}
  426. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;}
  427. }
  428. .topc{border-radius: 34rpx;height:68rpx;box-sizing: border-box;padding:0 32rpx 0 32rpx ;position: relative;flex:1;background-color: #FFFFFF;
  429. input{font-weight: 500;font-size: 26rpx;color: #222327;}
  430. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;flex: 0 0 auto;}
  431. }
  432. .topr{width: 48rpx;height: 38rpx;position: relative;
  433. image{width: 36rpx;height: 38rpx;margin: 0 auto;}
  434. // .cir{background: #FF4747;font-size: 14rpx;color: #FFFFFF;border-radius: 50%;border: 2rpx solid #FFFFFF;min-width: 20rpx;height: 20rpx;
  435. // position: absolute;right: -5rpx;top: -5rpx;text-align: center;line-height: 16rpx;
  436. // }
  437. // .cir{width: 14rpx;height: 14rpx;background: #DF0024;border-radius: 50%;position: absolute;right: -7rpx;top: -7rpx;}
  438. }
  439. }
  440. .zxbox{
  441. .bgimg{width: 100%;height: 450rpx;}
  442. .zxmain{
  443. margin-top: -270rpx;position: relative;
  444. .banbox{width: 678rpx;height: 246rpx;margin: 0 auto;}
  445. .grid{
  446. display: flex;align-items: center;flex-wrap: wrap;
  447. .grid-item-box {display: flex;flex-direction: column;align-items: center;justify-content: center;padding: 24rpx 0 36rpx;width: 25%;box-sizing: border-box;
  448. .img{width: 46rpx;height: 46rpx;display: flex;align-items: center;justify-content: center;margin-bottom: 22rpx;
  449. .imga{width: 46rpx;height: 46rpx;}
  450. .imgb{width: 46rpx;height: 40rpx;}
  451. .imgc{width: 44rpx;height: 46rpx;}
  452. .imgd{width: 40rpx;height: 46rpx;}
  453. .imge{width: 42rpx;height: 46rpx;}
  454. .imgf{width: 44rpx;height: 40rpx;}
  455. }
  456. view{font-weight: bold;font-size: 26rpx;color: #222327;}
  457. }
  458. }
  459. .mlrbox{margin: 8rpx 36rpx 0;}
  460. .addbox{
  461. display: flex;
  462. .adda{width: 154rpx;height: 190rpx;border-radius: 20rpx;box-sizing: border-box;padding: 28rpx 0 0 20rpx;margin-right: 22rpx;
  463. &.bga{background: #FFF6F5;}
  464. &.bgb{background: #F6F8FF;}
  465. &.bgc{background: #FFF6E7;}
  466. &.bgd{background: #EFF9F6;}
  467. &:nth-child(4n){margin-right: 0;}
  468. image{width: 52rpx;height: 52rpx;margin-bottom: 12rpx;}
  469. .tit{font-weight: bold;font-size: 28rpx;color: #222327;margin-bottom: 4rpx;}
  470. .txt{font-size: 22rpx;color: #AAAAAA;}
  471. }
  472. }
  473. .tabt{
  474. .left{font-weight: bold;font-size: 36rpx;color: #222327;
  475. text{color: #FF6969;font-size: 30rpx;}
  476. }
  477. .right{font-size: 26rpx;color: #AAAAAA;
  478. image{width: 12rpx;height: 18rpx;margin-left: 14rpx;}
  479. }
  480. }
  481. }
  482. .hnbox{background-color: #ffffff;padding-bottom: 32rpx;
  483. .hntabs{padding:20rpx 12rpx 20rpx 34rpx;background-color: #ffffff;overflow: auto;
  484. &.tabfix{position: fixed;left: 0;right: 0;z-index: 4;box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(196,191,191,0.22);}
  485. .tit{font-weight: 500;font-size: 26rpx;color: #252736;position: relative;margin-right: 22rpx;height: 58rpx;text-align: center;padding: 0 26rpx;background: #F6F6F6;
  486. border-radius: 30rpx;flex: 0 0 auto;line-height: 58rpx;
  487. &.act{font-weight: 500;color: #FFFFFF;background: #00A9F0;
  488. }
  489. }
  490. }
  491. }
  492. }
  493. </style>