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">
  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,'my')" 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" @click="getBushszListFn">
  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,from){
  273. // this.$tab.navigateTo("/work/pages/business/list?type="+type)
  274. if(from){
  275. this.$tab.navigateTo("/work/pages/business/list?from=my&type=0")
  276. }else{
  277. this.$tab.navigateTo("/work/pages/business/list?type=0")
  278. }
  279. },
  280. getBuszcListFn(){
  281. this.$tab.navigateTo("/work/pages/business/zclist")
  282. },
  283. getBushszListFn(){
  284. this.$tab.navigateTo("/work/pages/business/hszlist")
  285. },
  286. getScanFn(){
  287. // 扫码识别
  288. // this.$tab.navigateTo("/pages/index/notice")
  289. },
  290. getLedgerFn(){
  291. this.$tab.navigateTo("/work/pages/file/ledgertable")
  292. },
  293. getFileFn(){
  294. this.$tab.navigateTo("/work/pages/file/list")
  295. },
  296. getNoticeDet(e){
  297. this.$tab.navigateTo("/pages/index/noticedetail?type=xttz&id="+e)
  298. },
  299. getDetail(e){
  300. this.$tab.navigateTo("/pages/index/noticedetail?type=dbtz&id="+e)
  301. },
  302. getTab(idx){
  303. this.tabval=idx;
  304. this.getrefreshData()
  305. },
  306. getrefreshData(){
  307. this.pageNum=1;
  308. this.list=[];
  309. this.reachflag=true;
  310. this.getDataFn()
  311. },
  312. getHeightFn(){
  313. let query = uni.createSelectorQuery().in(this);
  314. //需要给黄色区域设置一个id标识,在这里是demo
  315. query.select('.zxtop').boundingClientRect(data => {
  316. var top=data.top<0 ? -data.top : data.top;
  317. this.listTop = data.height//赋值,待会要用
  318. if (top <=this.nvaHeight) {
  319. const opacity = top / 100 // 计算透明度值
  320. const color = `rgba(4, 145, 253, ${opacity})`
  321. this.backgroundColor = color // 更新盒子背景颜色
  322. } else {
  323. this.backgroundColor = '#00A9F0'
  324. }
  325. }).exec();
  326. },
  327. init(){
  328. // 记录来源
  329. getDictionaryFn('jluly').then(res=>{
  330. if(res.code==200){
  331. this.adrlist = res.data.map(v => {
  332. return {
  333. dictLabel: v.dictLabel,
  334. dictValue: v.dictValue
  335. }
  336. })
  337. }
  338. })
  339. },
  340. getMoreFn(){
  341. this.$tab.navigateTo("/pages/order/list")
  342. },
  343. time() {
  344. var date = new Date();
  345. var y = date.getFullYear();
  346. var m = date.getMonth() + 1;
  347. var d = date.getDate();
  348. let lunar = calendar.solar2lunar(y, m, d); //农历
  349. this.lunar=lunar.IMonthCn+lunar.IDayCn;
  350. this.daytime=m+'月'+d+"日";
  351. // var h = date.getHours();
  352. // var min = date.getMinutes();
  353. // var s = date.getSeconds();
  354. // var week = date.getDay(); //获取当前星期X(0-6,0代表星期天)
  355. // var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  356. // var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
  357. // var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
  358. // '0' + s) : s);
  359. // this.kaTime = yearStr + ' ' + timeStr;
  360. },
  361. getNoticeFn(){
  362. var params={
  363. pageSize:10,
  364. pageNum: 1,
  365. }
  366. getNoticeList(params).then(res=>{
  367. if(res.code==200){
  368. this.noticelist = res.rows;
  369. }else{
  370. this.$toast(res.msg)
  371. }
  372. })
  373. },
  374. getbannerList(){
  375. getbannerList().then(res=>{
  376. if(res.code==200){
  377. var data=res.rows;
  378. var newArr=[];
  379. data.forEach(ite=>{
  380. if(ite.imgUrl){
  381. newArr=newArr.concat(ite.imgUrl.split(','))
  382. }
  383. })
  384. this.bannerlist=newArr;
  385. }
  386. })
  387. },
  388. getDataFn(){
  389. var params={
  390. pageSize:this.pageSize,
  391. pageNum: this.pageNum,
  392. }
  393. if(this.tabval){
  394. params.remindType=this.tabval
  395. }
  396. getRemindList(params).then(res=>{
  397. if(res.code==200){
  398. this.total=res.total||0
  399. if (res.rows.length < this.pageSize) {
  400. this.reachflag = false
  401. this.wtdt = '到底了~';
  402. } else {
  403. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  404. if (num < res.total) {
  405. this.reachflag = true
  406. this.wtdt = '上拉加载更多'
  407. } else {
  408. this.reachflag = false
  409. this.wtdt = '到底了~';
  410. }
  411. }
  412. if (this.pageNum == 1) {
  413. this.list = res.rows;
  414. } else {
  415. this.list = this.list.concat(res.rows)
  416. }
  417. }else{
  418. this.$toast(res.msg)
  419. }
  420. })
  421. },
  422. },
  423. }
  424. </script>
  425. <style>
  426. page{background-color: #FFFFFF;}
  427. </style>
  428. <style lang="scss" scoped>
  429. .navbox /deep/ .uni-navbar__header-container {align-items: center;padding-left: 0;}
  430. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;
  431. .topl{padding-left: 16rpx;overflow: hidden;
  432. image{width: 30rpx;height: 38rpx;margin-right: 18rpx;flex: 0 0 auto;}
  433. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;}
  434. }
  435. .topc{border-radius: 34rpx;height:68rpx;box-sizing: border-box;padding:0 32rpx 0 32rpx ;position: relative;flex:1;background-color: #FFFFFF;
  436. input{font-weight: 500;font-size: 26rpx;color: #222327;}
  437. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;flex: 0 0 auto;}
  438. }
  439. .topr{width: 48rpx;height: 38rpx;position: relative;
  440. image{width: 36rpx;height: 38rpx;margin: 0 auto;}
  441. // .cir{background: #FF4747;font-size: 14rpx;color: #FFFFFF;border-radius: 50%;border: 2rpx solid #FFFFFF;min-width: 20rpx;height: 20rpx;
  442. // position: absolute;right: -5rpx;top: -5rpx;text-align: center;line-height: 16rpx;
  443. // }
  444. // .cir{width: 14rpx;height: 14rpx;background: #DF0024;border-radius: 50%;position: absolute;right: -7rpx;top: -7rpx;}
  445. }
  446. }
  447. .zxbox{
  448. .bgimg{width: 100%;height: 450rpx;}
  449. .zxmain{
  450. margin-top: -270rpx;position: relative;
  451. .banbox{width: 678rpx;height: 246rpx;margin: 0 auto;}
  452. .grid{
  453. display: flex;align-items: center;flex-wrap: wrap;
  454. .grid-item-box {display: flex;flex-direction: column;align-items: center;justify-content: center;padding: 24rpx 0 36rpx;width: 25%;box-sizing: border-box;
  455. .img{width: 46rpx;height: 46rpx;display: flex;align-items: center;justify-content: center;margin-bottom: 22rpx;
  456. .imga{width: 46rpx;height: 46rpx;}
  457. .imgb{width: 46rpx;height: 40rpx;}
  458. .imgc{width: 44rpx;height: 46rpx;}
  459. .imgd{width: 40rpx;height: 46rpx;}
  460. .imge{width: 42rpx;height: 46rpx;}
  461. .imgf{width: 44rpx;height: 40rpx;}
  462. }
  463. view{font-weight: bold;font-size: 26rpx;color: #222327;}
  464. }
  465. }
  466. .mlrbox{margin: 8rpx 36rpx 0;}
  467. .addbox{
  468. display: flex;
  469. .adda{width: 154rpx;height: 190rpx;border-radius: 20rpx;box-sizing: border-box;padding: 28rpx 0 0 20rpx;margin-right: 22rpx;
  470. &.bga{background: #FFF6F5;}
  471. &.bgb{background: #F6F8FF;}
  472. &.bgc{background: #FFF6E7;}
  473. &.bgd{background: #EFF9F6;}
  474. &:nth-child(4n){margin-right: 0;}
  475. image{width: 52rpx;height: 52rpx;margin-bottom: 12rpx;}
  476. .tit{font-weight: bold;font-size: 28rpx;color: #222327;margin-bottom: 4rpx;}
  477. .txt{font-size: 22rpx;color: #AAAAAA;}
  478. }
  479. }
  480. .tabt{
  481. .left{font-weight: bold;font-size: 36rpx;color: #222327;
  482. text{color: #FF6969;font-size: 30rpx;}
  483. }
  484. .right{font-size: 26rpx;color: #AAAAAA;
  485. image{width: 12rpx;height: 18rpx;margin-left: 14rpx;}
  486. }
  487. }
  488. }
  489. .hnbox{background-color: #ffffff;padding-bottom: 32rpx;
  490. .hntabs{padding:20rpx 12rpx 20rpx 34rpx;background-color: #ffffff;overflow: auto;
  491. &.tabfix{position: fixed;left: 0;right: 0;z-index: 4;box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(196,191,191,0.22);}
  492. .tit{font-weight: 500;font-size: 26rpx;color: #252736;position: relative;margin-right: 22rpx;height: 58rpx;text-align: center;padding: 0 26rpx;background: #F6F6F6;
  493. border-radius: 30rpx;flex: 0 0 auto;line-height: 58rpx;
  494. &.act{font-weight: 500;color: #FFFFFF;background: #00A9F0;
  495. }
  496. }
  497. }
  498. }
  499. }
  500. </style>