merchant-incoming.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>首页-进件查询-创业帮</title>
  6. <meta name="keywords" content="首页-进件查询-创业帮">
  7. <meta name="description" content="首页-进件查询-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="首页-进件查询-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="bgc-back ovh pt0" style="padding-top:0;">
  18. <div class="merchant_sign" id="app" ref="container" v-cloak>
  19. <van-nav-bar left-arrow title="进件查询" @click-left="goback" v-if="toptitleisshow">
  20. <template #left>
  21. <van-icon name="arrow-left"> </van-icon>
  22. </template>
  23. </van-nav-bar>
  24. <van-search v-model="searchcontent" shape="round" show-action placeholder="请输入搜索关键词" @search="onSearch">
  25. <template #action>
  26. <div @click="onSearch">搜索</div>
  27. </template>
  28. </van-search>
  29. <div class="merchant-sign-tabs">
  30. <van-tabs v-model="active" swipeable animated line-width="40" line-height="3" :ellipsis="false" sticky @change="chechstatus">
  31. <van-tab v-for="merchant in merchantTypes" :title="merchant.title">
  32. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :class="merchantlist.length === 0 ? 'isnodata':''">
  33. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  34. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
  35. <van-cell-group>
  36. <van-cell v-for="item,index in merchantlist" :key="item.id" @click.stop="godetail(item.Id)">
  37. <template #title>
  38. <div class="df">
  39. <div class="comname f14">{{item.Name}}
  40. <div class="f12 c999">进件时间:{{item.CreateDate}}</div>
  41. </div>
  42. </div>
  43. </template>
  44. <template #default>
  45. <div class="df center" v-if="item.Status === 2"><img src="./static/images/sign-done.png" alt="">
  46. <div>审核中</div>
  47. </div>
  48. <div class="df center" v-if="item.Status === 3"><img src="./static/images/sign-finished.png" alt="">
  49. <div>审核失败</div>
  50. </div>
  51. <div class="df center" v-if="item.Status === 4"><img src="./static/images/sign-wait.png" alt="">
  52. <div>待签约</div>
  53. </div>
  54. <div class="df center" v-if="item.Status === 5"><img src="./static/images/sign-finished.png" alt="">
  55. <div>已签约</div>
  56. </div>
  57. </template>
  58. </van-cell>
  59. </van-cell-group>
  60. </van-list>
  61. </van-pull-refresh>
  62. </van-tab>
  63. </van-tabs>
  64. </div>
  65. </div>
  66. <script src="./static/js/klm-vv.min.js"></script>
  67. <script src="./static/js/appfunc.min.js"></script>
  68. <script src="./static/js/klm-axios-config.js"></script>
  69. <script src="./static/js/publicfn.js"></script>
  70. <script>
  71. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  72. // 可以通过下面的方式手动注册
  73. Vue.use(vant.Lazyload);
  74. Vue.use(vant.Dialog);
  75. // 在 #app 标签下渲染一个按钮组件
  76. let app = new Vue({
  77. el: '#app',
  78. data() {
  79. return {
  80. isnodata:true,
  81. toptitleisshow:false,
  82. active:0,
  83. searchcontent:'',
  84. merchantTypes: [
  85. {
  86. title: '全部',
  87. dot:2,
  88. },
  89. {
  90. title: '审核中',
  91. dot:2,
  92. },
  93. {
  94. title: '审核失败',
  95. dot:2,
  96. },
  97. {
  98. title: '待签约',
  99. dot:200,
  100. },
  101. {
  102. title: '已签约',
  103. dot:900,
  104. },
  105. ],
  106. merchantlist:[
  107. ],
  108. loading: false,
  109. finished: false,
  110. refreshing: false,
  111. pageinfo:{
  112. PageSize:10,
  113. PageNum:1
  114. },
  115. };
  116. },
  117. created(){
  118. this.toptitleisshow = toptitleisshow;
  119. this.getmerchantlist('refresh');
  120. },
  121. mounted() {
  122. },
  123. methods: {
  124. chechstatus(status){
  125. //- this.merchantlist = [];
  126. this.pageinfo.PageNum = 1;
  127. this.searchcontent = '';
  128. this.getmerchantlist('refresh');
  129. },
  130. onSearch(){
  131. if(this.searchcontent === '') {
  132. return tips('请输入搜索关键词!')
  133. };
  134. //- this.merchantlist = [];
  135. this.getmerchantlist('refresh');
  136. },
  137. godetail(id){
  138. PublicLib.putCookieInfo('merchantsignId', id);
  139. PublicLib.Goto({Url:'merchant-sign-detail'});
  140. },
  141. goback(){
  142. PublicLib.GoBack({Level:1});
  143. },
  144. onLoad() {
  145. if (this.refreshing) {
  146. //- this.merchantlist = [];
  147. this.refreshing = false;
  148. this.pageinfo.PageNum = 0;
  149. };
  150. this.pageinfo.PageNum++;
  151. this.getmerchantlist();
  152. },
  153. onRefresh() {
  154. // 清空列表数据
  155. this.finished = false;
  156. // 重新加载数据
  157. // 将 loading 设置为 true,表示处于加载状态
  158. this.loading = true;
  159. this.pageinfo.PageNum = 1;
  160. this.getmerchantlist('refresh');
  161. },
  162. //- 获取商户列表
  163. async getmerchantlist(type = 'onload'){
  164. const UserId = PublicLib.getCookieInfo('userId');
  165. const res = await getRequest('api/v1/merchantinfo/merchantbystatus?t='+Math.random(6),JSON.stringify({...this.pageinfo,UserId,Status:this.active,SearchKey:this.searchcontent}));
  166. if(res.status !== '1') return tips('获取商户进件列表失败,请重试!');
  167. //- PublicLib.HideLoading();
  168. if(res.data.length < this.pageinfo.PageSize) {
  169. this.finished = true;
  170. };
  171. if(type === 'refresh'){
  172. this.merchantlist = res.data
  173. this.refreshing = false;
  174. }else{
  175. this.merchantlist.push(...res.data);
  176. }
  177. this.loading = false;
  178. if(this.merchantlist.length === 0) {this.isnodata = true}else{this.isnodata = false};
  179. },
  180. }
  181. });
  182. </script>
  183. </body>
  184. </html>