index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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">
  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">
  74. <image :src="haddbimg"></image>
  75. <view class="tit">暂存申报</view>
  76. <view class="txt">继续填报</view>
  77. </view>
  78. <view class="adda bgc">
  79. <image :src="haddcimg"></image>
  80. <view class="tit">我的申报</view>
  81. <view class="txt">查看进度</view>
  82. </view>
  83. <view class="adda bgd">
  84. <image :src="hadddimg"></image>
  85. <view class="tit">回收站</view>
  86. <view class="txt">一键找回</view>
  87. </view>
  88. </view>
  89. <view class="flexcj tabt pb12">
  90. <view class="left" @click="getFace">待办提醒(<text>8</text>)</view>
  91. <view class="right flexc" @click="getBusListFn(0)" v-if="checkPermi(['system:application:list'])">更多<image :src="rimg"></image></view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 代办提醒 -->
  97. <view class="hnbox">
  98. <view class="hntabs flexc" :class="fixedflag?'tabfix':''" :style="fixedflag?'top:'+nvaHeight+'px;':''">
  99. <block v-for="(ite,idx) in tabList" :key="idx">
  100. <!-- v-if="checkPermi([ite.limit])" -->
  101. <view class="tit" :class="tabval==ite.val?'act':''" @click="getTab(ite.val)">{{ite.tit}}</view>
  102. </block>
  103. </view>
  104. <view style="height:98rpx;" v-if="fixedflag"></view>
  105. <!-- 列表 -->
  106. <view class="mt2 plr12" :style="'min-height: ' + minheight + 'px;'">
  107. <wait-list :datalist="list" :wtdt="wtdt" @getDetail="getDetail"></wait-list>
  108. </view>
  109. </view>
  110. <footers v-if="isfootflag" :footerindex="footerindex" :isHomeIndex="true"></footers>
  111. </view>
  112. </template>
  113. <script>
  114. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  115. import waitList from "@/components/wait/list.vue"
  116. let { calendar } = require("@/components/lunc-calendar/calendar.js");
  117. // import {getReservatcountl,getReservatList,getReservatDel,getReservatSh} from "@/api/mine/order.js"
  118. import {getDictionaryFn} from "@/api/mine/register.js"
  119. import banner from "@/components/toptab/banner.vue"
  120. import hNotice from '@/components/swiper/notice.vue'
  121. import footers from '@/components/footer/footer.vue'
  122. const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
  123. export default {
  124. components:{banner,hNotice,waitList,footers},
  125. data(){
  126. return{
  127. footerindex:'home',
  128. isfootflag:true,
  129. backgroundColor:'transparent',
  130. bgimg:require("@/static/images/navbg.png"),
  131. adrimg:require("@/static/images/home/adr.png"),
  132. noticeimg:require("@/static/images/home/notice.png"),
  133. secimg:require("@/static/images/home/search.png"),
  134. topaimg:require("@/static/images/home/topa.png"),
  135. topbimg:require("@/static/images/home/topb.png"),
  136. topcimg:require("@/static/images/home/topc.png"),
  137. topdimg:require("@/static/images/home/topd.png"),
  138. topeimg:require("@/static/images/home/tope.png"),
  139. topfimg:require("@/static/images/home/topa.png"),
  140. topgimg:require("@/static/images/home/topg.png"),
  141. tophimg:require("@/static/images/home/toph.png"),
  142. haddaimg:require("@/static/images/home/hadda.png"),
  143. haddbimg:require("@/static/images/home/haddb.png"),
  144. haddcimg:require("@/static/images/home/haddc.png"),
  145. hadddimg:require("@/static/images/home/haddd.png"),
  146. codeimg:require("@/static/images/home/scan.png"),
  147. rimg:require("@/static/images/home/rimg.png"),
  148. noticelist:[{noticeTitle:'安徽嘉欣医疗用品有限公司项目评…',issuerTime:'04-07'},{noticeTitle:'2安徽嘉欣医疗用品有限公司项目评…',issuerTime:'04-07'},],
  149. autoplay:false,
  150. list:[{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},
  151. {tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},
  152. {tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},{tit:'【申报审核】— 潜山弘立新型建材有限公司…',time:'04-07'},
  153. ],
  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. tabList:[{tit:'全部',val:0},{tit:'申报审核',val:1},{tit:'担保初审',val:2},{tit:'尽职调查',val:3},{tit:'评审会',val:4},{tit:'签署合同',val:5},],
  164. usename:'',
  165. bannerlist:[{path:require("@/static/images/home/banner.png"),},{path:require("@/static/images/navbg.png"),}],
  166. }
  167. },
  168. onPageScroll(e) {
  169. var scrollTop = Number(e.scrollTop);
  170. var listTop=Number(this.listTop)-Number(this.nvaHeight)
  171. if (scrollTop <=this.nvaHeight) {
  172. const opacity = scrollTop / 100 // 计算透明度值
  173. const color = `rgba(4, 145, 253, ${opacity})`
  174. this.backgroundColor = color // 更新盒子背景颜色
  175. } else {
  176. this.backgroundColor = '#00A9F0'
  177. }
  178. if(scrollTop>listTop){
  179. this.fixedflag=true
  180. }else{
  181. this.fixedflag=false
  182. }
  183. },
  184. onLoad: function() {
  185. // uni.$on('refreshdatalist',(e) => {
  186. // this.reachflag=false;
  187. // this.pageNum=1;
  188. // this.list=[];
  189. // this.getDataFn();
  190. // })
  191. // this.init()
  192. // this.getDataFn()
  193. uni.getSystemInfo({
  194. success: (e) => {
  195. this.nvaHeight = Number(e.statusBarHeight)+44;
  196. this.minheight = e.screenHeight - Number(this.nvaHeight)- 100;
  197. }
  198. })
  199. // var metaInfo = aliyunVerify.getMetaInfo();
  200. // let p = uni.getSystemInfoSync().platform;
  201. // if (p === "ios") {
  202. // t = JSON.stringify(t);
  203. // }
  204. // console.log(metaInfo)
  205. },
  206. onUnload() {
  207. uni.$off('refreshdatalist')
  208. },
  209. onShow() {
  210. // var that=this;
  211. // this.time();
  212. },
  213. mounted() {
  214. this.getHeightFn()
  215. },
  216. // 上拉触底加载更多触发事件
  217. onReachBottom() {
  218. // if (this.reachflag) {
  219. // this.pageNum++
  220. // this.getDataFn()
  221. // }
  222. },
  223. methods:{
  224. checkPermi, checkRole,
  225. getFace(){
  226. aliyunVerify.verify({
  227. "certifyId":"sha3e385f6c273f2c11cf806ed95894b", // 填写从服务端获取的certifyId
  228. },
  229. function(response){
  230. console.log(response)
  231. }
  232. );
  233. // response返回格式
  234. // {
  235. // code:1000, // 错误码
  236. // message:"CODE_VERIFY_SUCCESS" // 错误码描述
  237. // }
  238. },
  239. getConfirm(){
  240. // this.$tab.navigateTo("/pages/order/list")
  241. // this.init()
  242. },
  243. getProveFn(){
  244. // this.$tab.navigateTo("/work/pages/prove/index")
  245. this.$tab.navigateTo("/work/pages/prove/zctype")
  246. },
  247. getBusListFn(type){
  248. this.$tab.navigateTo("/work/pages/business/list?type="+type)
  249. },
  250. getScanFn(){
  251. // 扫码识别
  252. // this.$tab.navigateTo("/pages/index/notice")
  253. },
  254. getLedgerFn(){
  255. this.$tab.navigateTo("/work/pages/file/ledgertable")
  256. },
  257. getFileFn(){
  258. this.$tab.navigateTo("/work/pages/file/list")
  259. },
  260. getNoticeDet(){
  261. },
  262. getTab(idx){
  263. this.tabval=idx;
  264. },
  265. getHeightFn(){
  266. let query = uni.createSelectorQuery().in(this);
  267. //需要给黄色区域设置一个id标识,在这里是demo
  268. query.select('.zxtop').boundingClientRect(data => {
  269. var top=data.top<0 ? -data.top : data.top;
  270. this.listTop = data.height//赋值,待会要用
  271. if (top <=this.nvaHeight) {
  272. const opacity = top / 100 // 计算透明度值
  273. const color = `rgba(4, 145, 253, ${opacity})`
  274. this.backgroundColor = color // 更新盒子背景颜色
  275. } else {
  276. this.backgroundColor = '#00A9F0'
  277. }
  278. }).exec();
  279. },
  280. init(){
  281. // 记录来源
  282. getDictionaryFn('jluly').then(res=>{
  283. if(res.code==200){
  284. this.adrlist = res.data.map(v => {
  285. return {
  286. dictLabel: v.dictLabel,
  287. dictValue: v.dictValue
  288. }
  289. })
  290. }
  291. })
  292. },
  293. getMoreFn(){
  294. this.$tab.navigateTo("/pages/order/list")
  295. },
  296. time() {
  297. var date = new Date();
  298. var y = date.getFullYear();
  299. var m = date.getMonth() + 1;
  300. var d = date.getDate();
  301. let lunar = calendar.solar2lunar(y, m, d); //农历
  302. this.lunar=lunar.IMonthCn+lunar.IDayCn;
  303. this.daytime=m+'月'+d+"日";
  304. // var h = date.getHours();
  305. // var min = date.getMinutes();
  306. // var s = date.getSeconds();
  307. // var week = date.getDay(); //获取当前星期X(0-6,0代表星期天)
  308. // var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  309. // var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
  310. // var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
  311. // '0' + s) : s);
  312. // this.kaTime = yearStr + ' ' + timeStr;
  313. },
  314. getDetail(data){
  315. // this.$tab.navigateTo('/pages/order/staffcode?type=look&id='+data)
  316. },
  317. getDataFn(){
  318. var params={
  319. pageSize:this.pageSize,
  320. pageNum: this.pageNum,
  321. // visitType:3
  322. }
  323. getReservatList(params).then(res=>{
  324. if(res.code==200){
  325. if (res.rows.length < this.pageSize) {
  326. this.reachflag = false
  327. this.wtdt = '到底了~';
  328. } else {
  329. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  330. if (num < res.total) {
  331. this.reachflag = true
  332. this.wtdt = '上拉加载更多'
  333. } else {
  334. this.reachflag = false
  335. this.wtdt = '到底了~';
  336. }
  337. }
  338. if (this.pageNum == 1) {
  339. this.list = res.rows;
  340. } else {
  341. this.list = this.list.concat(res.rows)
  342. }
  343. }else{
  344. this.$toast(res.msg)
  345. }
  346. })
  347. },
  348. },
  349. }
  350. </script>
  351. <style>
  352. page{background-color: #FFFFFF;}
  353. </style>
  354. <style lang="scss" scoped>
  355. .navbox /deep/ .uni-navbar__header-container {align-items: center;padding-left: 0;}
  356. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;
  357. .topl{padding-left: 16rpx;overflow: hidden;
  358. image{width: 30rpx;height: 38rpx;margin-right: 18rpx;flex: 0 0 auto;}
  359. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;}
  360. }
  361. .topc{border-radius: 34rpx;height:68rpx;box-sizing: border-box;padding:0 32rpx 0 32rpx ;position: relative;flex:1;background-color: #FFFFFF;
  362. input{font-weight: 500;font-size: 26rpx;color: #222327;}
  363. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;flex: 0 0 auto;}
  364. }
  365. .topr{width: 48rpx;height: 38rpx;position: relative;
  366. image{width: 36rpx;height: 38rpx;margin: 0 auto;}
  367. // .cir{background: #FF4747;font-size: 14rpx;color: #FFFFFF;border-radius: 50%;border: 2rpx solid #FFFFFF;min-width: 20rpx;height: 20rpx;
  368. // position: absolute;right: -5rpx;top: -5rpx;text-align: center;line-height: 16rpx;
  369. // }
  370. // .cir{width: 14rpx;height: 14rpx;background: #DF0024;border-radius: 50%;position: absolute;right: -7rpx;top: -7rpx;}
  371. }
  372. }
  373. .zxbox{
  374. .bgimg{width: 100%;height: 450rpx;}
  375. .zxmain{
  376. margin-top: -270rpx;
  377. .banbox{width: 678rpx;height: 246rpx;margin: 0 auto;}
  378. .grid{
  379. display: flex;align-items: center;flex-wrap: wrap;
  380. .grid-item-box {display: flex;flex-direction: column;align-items: center;justify-content: center;padding: 24rpx 0 36rpx;width: 25%;box-sizing: border-box;
  381. .img{width: 46rpx;height: 46rpx;display: flex;align-items: center;justify-content: center;margin-bottom: 22rpx;
  382. .imga{width: 46rpx;height: 46rpx;}
  383. .imgb{width: 46rpx;height: 40rpx;}
  384. .imgc{width: 44rpx;height: 46rpx;}
  385. .imgd{width: 40rpx;height: 46rpx;}
  386. .imge{width: 42rpx;height: 46rpx;}
  387. .imgf{width: 44rpx;height: 40rpx;}
  388. }
  389. view{font-weight: bold;font-size: 26rpx;color: #222327;}
  390. }
  391. }
  392. .mlrbox{margin: 8rpx 36rpx 0;}
  393. .addbox{
  394. display: flex;
  395. .adda{width: 154rpx;height: 190rpx;border-radius: 20rpx;box-sizing: border-box;padding: 28rpx 0 0 20rpx;margin-right: 22rpx;
  396. &.bga{background: #FFF6F5;}
  397. &.bgb{background: #F6F8FF;}
  398. &.bgc{background: #FFF6E7;}
  399. &.bgd{background: #EFF9F6;}
  400. &:nth-child(4n){margin-right: 0;}
  401. image{width: 52rpx;height: 52rpx;margin-bottom: 12rpx;}
  402. .tit{font-weight: bold;font-size: 28rpx;color: #222327;margin-bottom: 4rpx;}
  403. .txt{font-size: 22rpx;color: #AAAAAA;}
  404. }
  405. }
  406. .tabt{
  407. .left{font-weight: bold;font-size: 36rpx;color: #222327;
  408. text{color: #FF6969;font-size: 30rpx;}
  409. }
  410. .right{font-size: 26rpx;color: #AAAAAA;
  411. image{width: 12rpx;height: 18rpx;margin-left: 14rpx;}
  412. }
  413. }
  414. }
  415. .hnbox{background-color: #ffffff;padding-bottom: 32rpx;
  416. .hntabs{padding:20rpx 12rpx 20rpx 34rpx;background-color: #ffffff;overflow: auto;
  417. &.tabfix{position: fixed;left: 0;right: 0;z-index: 4;box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(196,191,191,0.22);}
  418. .tit{font-weight: 500;font-size: 26rpx;color: #252736;position: relative;margin-right: 22rpx;height: 58rpx;text-align: center;padding: 0 26rpx;background: #F6F6F6;
  419. border-radius: 30rpx;flex: 0 0 auto;line-height: 58rpx;
  420. &.act{font-weight: 500;color: #FFFFFF;background: #00A9F0;
  421. }
  422. }
  423. }
  424. }
  425. }
  426. </style>