matchList.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <template>
  2. <view>
  3. <view class="top-fixed">
  4. <view class="search-box ddflex">
  5. <view class="search-input ddflex fflex">
  6. <image src="/static/images/ssico.png"></image>
  7. <input @confirm="searchFn" confirm-type="search" @input="searchFn" v-model="searchVal" class="fflex"
  8. placeholder="请输入活动名称" />
  9. </view>
  10. <view class="filter ddflex">
  11. <view class="fflex">
  12. <picker mode="selector" :range="rangeList" range-key="label" v-model="rangeIndex" @change="rangeChange">
  13. <view class="filter-item fflex ddflex f-active" style="text-align: right;justify-content: flex-end;">
  14. <text style="max-width: 150rpx;" class="tover">{{rangeList[rangeIndex].label}}</text>
  15. <image class="filter-item-icon" src="../../static/images/down.png"></image>
  16. </view>
  17. </picker>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view style="height: 130rpx;"></view>
  23. <!-- 订单列表 -->
  24. <view style="position: relative;overflow: hidden;" v-if="dataList.length>0">
  25. <!-- <view class="register-box" v-for="item,index in dataList" :key="index" @click="jumpUrl('/card/index/index?cardId='+item.id)">
  26. <view class="register-title ddflex fflex">
  27. <image class="register-title-icon" :src="item.avatar?item.avatar:'/static/images/userimg.png'" mode="aspectFill"></image>
  28. <view class="flex" style="min-width: 0;">
  29. <view class="ddflex">
  30. <view class="card-name fflex tover">{{item.realName?item.realName:''}}</view>
  31. <view style="font-size: 26rpx;color: var(--main);font-weight: 400;" v-if="item.auditState==1">审核成功</view>
  32. <view class="review-btn" v-else-if="item.auditState==0" @click.stop="review(item,index)">审核</view>
  33. <view style="font-size: 26rpx;color: red;font-weight: 400;" v-else-if="item.auditState==2">审核失败 {{item.auditFailReason}}</view>
  34. </view>
  35. <view class="ddflex" style="margin-top: 4rpx;">
  36. <view class="card-tag">{{ item.jobName }}</view>
  37. <view class="card-tag">入司{{item.inDate?monthDayDiff(item.inDate):'1年'}}</view>
  38. </view>
  39. <view class="card-area ddflex">
  40. <image src="/card/static/images/area.png"></image>
  41. <view class="flex tover">{{item.address}}</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="ddflex" style="margin-top: 41rpx;">
  46. <view class="flex">
  47. <view class="card-data">{{item.cntCust?item.cntCust:0}}</view>
  48. <view class="card-label">服务客户</view>
  49. </view>
  50. <view class="card-line"></view>
  51. <view class="flex">
  52. <view class="card-data">{{item.cntCntr?item.cntCntr:0}}</view>
  53. <view class="card-label">保单件数</view>
  54. </view>
  55. <view class="card-line"></view>
  56. <view class="flex">
  57. <view class="card-data">{{item.thumbs?item.thumbs:0}}</view>
  58. <view class="card-label">用户点赞</view>
  59. </view>
  60. </view>
  61. </view> -->
  62. <view class="act-list" v-if="dataList && dataList.length > 0">
  63. <view class="li" v-for="(item, index) in dataList" :key="index" @click="toActivity(item)">
  64. <view class="imgbox"><image :src="item.pic" mode="aspectFill"></image></view>
  65. <view class="infos fflex">
  66. <view class="act-tit tovers">{{ item.title }}</view>
  67. <view class="stas ddflex">
  68. <view class="fflex">
  69. <view class="tag-box tovers">{{ item.brief }}</view>
  70. <view class="area" v-if="item.time || item.enlistTime">
  71. <view >报名截止时间:{{ item.enlistTime }}</view>
  72. <view >活动结束时间:{{ item.time }}</view>
  73. <view v-if="item.state>0 && item.state!=6">活动状态:{{item.stateName}}</view>
  74. <view style="font-size: 26rpx;color: red;font-weight: 400;" v-else-if="item.state==6">审核失败 {{item.refuse}}</view>
  75. </view>
  76. </view>
  77. <!-- 0待审核 6 审核失败 -->
  78. <view class="act-btn" @click.stop="review(item,index)">审核</view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view v-else class="nodata">
  85. <image src="../../card/static/images/empty.png" mode="widthFix"></image>
  86. <view>暂无数据</view>
  87. </view>
  88. <view class="ceng" v-show="showPop" @click="showPop=false" @touchmove.stop.prevent="moveHandle">
  89. </view>
  90. <view :style="showPop?'bottom:0;':'bottom:-100%;'"
  91. class="pop">
  92. <view class="pop-scroll">
  93. <view class="pop-title ddflex">审核活动 <view class="tover" style="max-width: 300rpx;margin-left: 20rpx;">{{clickItem.title}}</view></view>
  94. <view class="pop-textarea">
  95. <textarea v-model="tempData" placeholder="如审核不通过请填写不通过原因"></textarea>
  96. </view>
  97. <view style="font-size: 24rpx;color: #999;padding:0 30rpx 30rpx;">注:通过审核可直接点击通过,不通过审核请填写原因</view>
  98. </view>
  99. <view class="ddflex">
  100. <view class="pop-item fflex" style="background-color: red;color: #fff;" @click="unpass">不通过</view>
  101. <view class="pop-item fflex" style="background-color: var(--main);color: #fff;" @click="pass">通过</view>
  102. </view>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. const app = getApp();
  108. const req = require("../../utils/request.js");
  109. const util = require('../../utils/util.js');
  110. export default {
  111. components: {
  112. },
  113. props: {},
  114. data() {
  115. return {
  116. statusBarHeight:0,
  117. page: 1,
  118. limit: 10,
  119. isLoad: true,
  120. searchVal: '',
  121. dataList: [],
  122. isReference:false,
  123. clickItem:{},
  124. clickIndex:-1,
  125. showPop:false,
  126. tempData:'',
  127. rangeIndex:1,
  128. rangeList:[{
  129. label:'全部',
  130. value:-1
  131. },{
  132. label:'待审核',
  133. value:0
  134. },{
  135. label:'审核失败',
  136. value:6
  137. },{
  138. label:'报名中',
  139. value:2
  140. },{
  141. label:'报名结束',
  142. value:3
  143. },{
  144. label:'活动中',
  145. value:4
  146. },{
  147. label:'活动结束',
  148. value:5
  149. }]
  150. }
  151. },
  152. onLoad(options) {
  153. this.getDataList()
  154. },
  155. onShow() {
  156. if(this.isReference){
  157. this.isReference = false
  158. this.page=1;
  159. this.isLoad = true
  160. this.getDataList()
  161. }
  162. },
  163. onReachBottom() {
  164. this.page++;
  165. this.getDataList();
  166. },
  167. methods: {
  168. jumpUrl(url) {
  169. uni.navigateTo({
  170. url: url
  171. })
  172. },
  173. toActivity(item){
  174. if(item.type==2){
  175. req.msg("pac活动暂不支持预览,详情请到国寿活动中查看")
  176. }else{
  177. uni.navigateTo({
  178. url: '/match/activityDetail/activityDetail?id=' + item.id
  179. });
  180. }
  181. },
  182. // 分页查询
  183. getDataList() {
  184. if (!this.isLoad) return false;
  185. this.isLoad = false;
  186. let queryParams = {
  187. page: this.page,
  188. limit: this.limit
  189. }
  190. if (this.searchVal) {
  191. queryParams.title = this.searchVal
  192. }
  193. queryParams.state = this.rangeList[this.rangeIndex].value
  194. if(queryParams.state==-1) delete queryParams.state
  195. req.getRequest('/api/match/yzlPage', queryParams, data => {
  196. data = data.list
  197. if (data != null && data.length == this.limit) {
  198. this.isLoad = true;
  199. }
  200. if (this.page == 1) {
  201. this.dataList = [];
  202. }
  203. if (this.page > 0) {
  204. data = this.dataList.concat(data);
  205. }
  206. this.dataList = data;
  207. console.log('列表数据>>>', this.dataList);
  208. })
  209. },
  210. // 搜索
  211. searchFn() {
  212. this.page = 1;
  213. this.isLoad = true;
  214. this.getDataList();
  215. },
  216. monthDayDiff(date) {
  217. return util.monthDayDiff(date)
  218. },
  219. review(item,index){
  220. this.clickItem = item
  221. this.clickIndex = index
  222. this.tempData = item.refuse?item.refuse:''
  223. this.showPop = true
  224. },
  225. pass(){
  226. uni.showModal({
  227. title:'提示',
  228. content:"是否确定通过该活动审核",
  229. success: (res) => {
  230. if(res.confirm){
  231. req.postRequest('/api/match/examine',{id:this.clickItem.id,state:1},data=>{
  232. req.msg("活动已通过审核")
  233. this.dataList[this.clickIndex].state = 2
  234. this.dataList[this.clickIndex].stateName = '报名中'
  235. this.clickIndex = -1
  236. this.clickItem = {}
  237. this.tempData = ''
  238. this.showPop = false
  239. })
  240. }
  241. }
  242. })
  243. },
  244. unpass(){
  245. if(!this.tempData){
  246. return req.msg("请填写活动不通过原因")
  247. }
  248. uni.showModal({
  249. title:'提示',
  250. content:"是否确定不通过该活动审核",
  251. success: (res) => {
  252. if(res.confirm){
  253. req.postRequest('/api/match/examine',{id:this.clickItem.id,state:6,refuse:this.tempData},data=>{
  254. req.msg("活动未通过审核")
  255. this.dataList[this.clickIndex].state = 6
  256. this.dataList[this.clickIndex].stateName = '审核失败'
  257. this.dataList[this.clickIndex].refuse = this.tempData
  258. this.clickIndex = -1
  259. this.clickItem = {}
  260. this.tempData = ''
  261. this.showPop = false
  262. })
  263. }
  264. }
  265. })
  266. },
  267. rangeChange(e){
  268. this.rangeIndex = e.detail.value
  269. this.page = 1;
  270. this.isLoad = true;
  271. this.getDataList();
  272. }
  273. }
  274. }
  275. </script>
  276. <style>
  277. @import "./matchList.css";
  278. </style>