signJkDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. <template>
  2. <view class="box">
  3. <view class="top">
  4. <view class="activityName">{{activity.ActivityName}}</view>
  5. <view class="stateBox">
  6. <view class="jinxing" v-if="activity.state=='进行中'">进行中</view>
  7. <view class="jieshu" v-if="activity.state=='已结束'">已结束</view>
  8. <view class="weiqiyong" v-if="activity.state=='未启用'">未启用</view>
  9. <view class="weiqiyong" v-if="activity.state=='未开始'">未开始</view>
  10. <view class="date" v-if="activity.StartTime">
  11. {{activity.StartTime.slice(0,10)}}-{{activity.EndTime.slice(0,10)}}</view>
  12. </view>
  13. </view>
  14. <!-- 搜索 -->
  15. <view class="searchBoxBg">
  16. <searchBox placeholder="手机号、车牌号、姓名、客户单位" @search='search($event)'></searchBox>
  17. </view>
  18. <view class="boxstate">
  19. <view class="sxBox">
  20. <view class="typeBox">
  21. <view class="type" @click="changeType" v-if="selectTab==0">核销状态</view>
  22. <view class="type" @click="changeType" v-if="selectTab==1">未核销</view>
  23. <view class="type" @click="changeType" v-if="selectTab==3">已核销</view>
  24. <image src="../../static/img/arrow_down.png" mode="" style="width: 24rpx;height: 24rpx;"></image>
  25. </view>
  26. <view>
  27. <picker @change="bindPickerChange" :value="pickerindex" :range-key="'shopName'" :range="pickerarray">
  28. <view class="typeBox">
  29. <view class="shopnamesx">
  30. {{shopName}}
  31. </view>
  32. <image src="../../static/img/arrow_down.png" mode="" style="width: 24rpx;height: 24rpx;"></image>
  33. </view>
  34. </picker>
  35. </view>
  36. </view>
  37. <view class="black" v-if="showSift==true">
  38. <view class="siftBox">
  39. <view class="siftItem" @click="tab(0)">
  40. <view class="item" :class="{blueColor:selectTab==0}">全部</view>
  41. <image v-if="selectTab==0" src="../../static/img/select_icon.png" mode=""
  42. style="width: 40rpx;height: 40rpx;"></image>
  43. </view>
  44. <view class="siftItem" @click="tab(3)">
  45. <view class="item" :class="{blueColor:selectTab==3}">已核销</view>
  46. <image v-if="selectTab==3" src="../../static/img/select_icon.png" mode=""
  47. style="width: 40rpx;height: 40rpx;"></image>
  48. </view>
  49. <view class="siftItem" @click="tab(1)">
  50. <view class="item" :class="{blueColor:selectTab==1}">未核销</view>
  51. <image v-if="selectTab==1" src="../../static/img/select_icon.png" mode=""
  52. style="width: 40rpx;height: 40rpx;"></image>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="contentBox">
  58. <view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="godetail(item)">
  59. <image src="../../static/img/jt.png" mode="" class="itemHistoryJt"></image>
  60. <view class="itemTop">
  61. <image :src="item.HeadImg" mode="" class="icon"></image>
  62. <view class="topRight">
  63. <view class="nickName">{{item.NickName?item.NickName:'微信昵称'}}</view>
  64. <view>
  65. <span class="phone" v-if="item.MobilePhone">{{item.MobilePhone}}</span>
  66. <span class="phone" v-if="item.PlateNumber">/ {{item.PlateNumber}}</span>
  67. <span class="phone" v-if="item.CustomerName">/ {{item.CustomerName}}</span>
  68. <span class="phone" v-if="item.Unit">/ {{item.Unit}}</span>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="timeBox"><span class="leftTitle">报名时间:</span>{{item.CreateTime}}</view>
  73. <view class="timeBox"><span class="leftTitle">报名门店:</span>{{item.ShopName}}</view>
  74. <view class="zhuangtaiBox" v-if="item.WriteoffState==1"><span class="leftTitle">核销状态:</span> 未核销</view>
  75. <view class="zhuangtaiBox" v-if="item.WriteoffState==3"><span class="leftTitle">核销状态:</span> 已核销 {{item.WriteoffTime}}</view>
  76. <view class="timeBox" v-if="item.WriteoffState==3" style="display: flex;"><span class="leftTitle">核销门店:</span> <view style="width: 500rpx;">{{item.WriteoffShopName}}</view> </view>
  77. </view>
  78. <!-- 上拉 加载更多 -->
  79. <view class="noMore" v-if="noMoreShow && (itemData.length!=0)">没有更多数据</view>
  80. <!-- 无数据空白页 -->
  81. <nodata v-if="itemData.length==0"></nodata>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. import searchBox from '@/components/searchBox/searchBox.vue'
  87. import nodata from '../../components/nodata/nodata.vue'
  88. export default {
  89. components: {
  90. nodata,
  91. searchBox
  92. },
  93. data() {
  94. return {
  95. activity: {},
  96. page: 1,
  97. itemData: [],
  98. noMoreShow: false,
  99. searchValue: '',
  100. showSift: false,
  101. selectTab: 0,
  102. pickerindex:0,
  103. pickerarray: [],
  104. shopName:'报名门店',
  105. shopId:'',
  106. }
  107. },
  108. onLoad(opt) {
  109. this.getShopinfo();
  110. this.activity = JSON.parse(opt.activity);
  111. console.log('activity==', this.activity);
  112. this.page = 1
  113. //this.myOrderCoupon()
  114. this.myOrderCoupon()
  115. },
  116. methods: {
  117. godetail(e){
  118. uni.navigateTo({
  119. url: "../myOrder/activityOrderDetail?id=" + e.ID
  120. })
  121. },
  122. bindPickerChange(e){
  123. console.log(e)
  124. this.shopName=this.pickerarray[e.detail.value].shopName
  125. this.shopId=this.pickerarray[e.detail.value].id
  126. this.page = 1
  127. this.myOrderCoupon()
  128. },
  129. getShopinfo(){
  130. this.$http('openH5SetTheGuest/getShopInfo',{},'GET').then(res => {
  131. //this.shopName=res.data.shopName;
  132. /* this.mrshopId=res.data.id;
  133. this.mrshopName=res.data.shopName; */
  134. //this.shopId=res.data.id
  135. this.getShopList();
  136. })
  137. },
  138. getShopList(){
  139. this.$http('openH5SetTheGuest/getShopList', {
  140. },'GET').then(res => {
  141. var kong={id:'',shopName:'报名门店'}
  142. this.pickerarray=res.data;
  143. this.pickerarray.unshift(kong)
  144. /* this.pickerarray.forEach((item,index)=>{
  145. if(this.mrshopId==item.id){
  146. this.pickerindex=index;
  147. }
  148. }) */
  149. //console.log(this.pickerarray[this.pickerindex])
  150. })
  151. },
  152. changeType() {
  153. this.showSift = !this.showSift
  154. // console.log('showSift==', this.showSift);
  155. },
  156. tab(state) {
  157. this.selectTab = state
  158. this.showSift = false
  159. this.page = 1
  160. this.myOrderCoupon()
  161. },
  162. search(val) {
  163. // console.log(val);
  164. this.searchValue = val
  165. this.page = 1
  166. this.myOrderCoupon()
  167. },
  168. myOrderCoupon() {
  169. uni.showLoading({
  170. title: '加载中'
  171. })
  172. this.$http('openH5SetTheGuest/registrationDetails', {
  173. itemId: this.activity.ID,
  174. name: this.searchValue,
  175. writeoffState: this.selectTab ? this.selectTab : '',
  176. page: this.page,
  177. limit: 99,
  178. shopID:this.shopId
  179. }, 'GET').then(res => {
  180. uni.hideLoading();
  181. // var list = res.data.Items
  182. var list = res.data.Items
  183. //str 拼接字符串
  184. list.forEach((item, index) => {
  185. item.str = item.MobilePhone?item.MobilePhone:'' + item.PlateNumber?'/'+item.PlateNumber:'' + item.CustomerName?'/'+item.CustomerName+'/':'' + item.Unit?'/'+item.Unit:''
  186. })
  187. if (this.page == 1) {
  188. this.itemData = list
  189. } else {
  190. this.itemData = this.itemData.concat(list)
  191. }
  192. if (list.length < 10) {
  193. this.noMoreShow = true
  194. } else {
  195. this.noMoreShow = false
  196. }
  197. console.log('itemData--',this.itemData);
  198. })
  199. },
  200. },
  201. // 下拉刷新 上拉加载更多
  202. onPullDownRefresh() {
  203. this.page = 1
  204. this.myOrderCoupon()
  205. setTimeout(function() {
  206. uni.stopPullDownRefresh();
  207. }, 1000);
  208. },
  209. onReachBottom() {
  210. this.page++;
  211. this.myOrderCoupon()
  212. },
  213. }
  214. </script>
  215. <style>
  216. .sxBox{
  217. display: flex;
  218. justify-content: space-between;
  219. background: #FFFFFF;
  220. }
  221. .shopnamesx{
  222. height: 40rpx;
  223. font-size: 28rpx;
  224. font-weight: 400;
  225. color: #666666;
  226. line-height: 40rpx;
  227. width: 300rpx;
  228. overflow: hidden;
  229. text-overflow:ellipsis;
  230. white-space: nowrap;
  231. text-align: right;
  232. }
  233. .box {
  234. min-height: 100vh;
  235. background-color: #F4F5F7;
  236. width: 100vw;
  237. }
  238. .top {
  239. padding: 30rpx 24rpx;
  240. background-color: #FFFFFF;
  241. }
  242. .activityName {
  243. font-size: 30rpx;
  244. font-weight: bold;
  245. color: #333333;
  246. line-height: 42rpx;
  247. }
  248. .stateBox {
  249. margin-top: 4rpx;
  250. display: flex;
  251. align-items: center;
  252. }
  253. .jinxing {
  254. font-size: 22rpx;
  255. color: #00A040;
  256. line-height: 30rpx;
  257. width: 80rpx;
  258. height: 30rpx;
  259. background: #F2FBF6;
  260. border-radius: 4rpx;
  261. }
  262. .jieshu {
  263. font-size: 22rpx;
  264. color: #FF6010;
  265. line-height: 30rpx;
  266. width: 74rpx;
  267. height: 30rpx;
  268. background: #FFECE3;
  269. border-radius: 4rpx;
  270. }
  271. .weiqiyong{
  272. font-size: 22rpx;
  273. color: #3C3C3C;
  274. line-height: 30rpx;
  275. width: 74rpx;
  276. height: 30rpx;
  277. background: #F4F5F7;
  278. border-radius: 4rpx;
  279. }
  280. .date {
  281. height: 30rpx;
  282. font-size: 22rpx;
  283. color: #999999;
  284. line-height: 30rpx;
  285. margin-left: 15rpx;
  286. }
  287. .searchBoxBg {
  288. width: 100%;
  289. background-color: #FFFFFF;
  290. border-top: 1rpx solid #EEEEEE;
  291. border-bottom: 1rpx solid #EEEEEE;
  292. }
  293. .searchBox {
  294. display: flex;
  295. height: 72rpx;
  296. margin: 24rpx;
  297. background-color: #F4F5F7;
  298. border-radius: 36rpx;
  299. padding: 30rpx 24rpx;
  300. }
  301. .boxstate{
  302. position: relative;
  303. width: 100vw;
  304. }
  305. .typeBox {
  306. background-color: #FFFFFF;
  307. padding: 30rpx 24rpx;
  308. display: flex;
  309. align-items: center;
  310. }
  311. .type {
  312. width: 114rpx;
  313. height: 40rpx;
  314. font-size: 28rpx;
  315. font-weight: 400;
  316. color: #666666;
  317. line-height: 40rpx;
  318. }
  319. .contentBox {
  320. padding: 20rpx 24rpx;
  321. height: calc(100vh - 415rpx);
  322. }
  323. .itemHistory {
  324. position: relative;
  325. padding: 24rpx 20rpx;
  326. background-color: #FFFFFF;
  327. border-radius: 10rpx;
  328. margin-bottom: 20rpx;
  329. }
  330. .itemHistoryJt{
  331. position: absolute;
  332. top: 30rpx;
  333. right: 24rpx;
  334. width:24rpx;
  335. height: 24rpx;
  336. }
  337. .itemTop {
  338. display: flex;
  339. padding-bottom: 20rpx;
  340. border-bottom: 1rpx solid #EEEEEE;
  341. }
  342. .icon {
  343. width: 72rpx;
  344. height: 72rpx;
  345. border-radius: 36rpx;
  346. margin-right: 20rpx;
  347. }
  348. .nickName {
  349. height: 42rpx;
  350. font-size: 30rpx;
  351. font-weight: 400;
  352. color: #3C3C3C;
  353. line-height: 42rpx;
  354. }
  355. .phone {
  356. height: 33rpx;
  357. font-size: 24rpx;
  358. font-weight: 400;
  359. color: #666666;
  360. line-height: 33rpx;
  361. margin-right: 10rpx;
  362. }
  363. .timeBox {
  364. /* height: 33rpx; */
  365. font-size: 24rpx;
  366. font-weight: 400;
  367. color: #3C3C3C;
  368. line-height: 33rpx;
  369. margin-top: 24rpx;
  370. }
  371. .leftTitle {
  372. color: #999999;
  373. font-size: 24rpx;
  374. }
  375. .zhuangtaiBox {
  376. height: 33rpx;
  377. font-size: 24rpx;
  378. font-weight: 400;
  379. color: #3C3C3C;
  380. line-height: 33rpx;
  381. margin-top: 24rpx;
  382. }
  383. .black {
  384. width: 100vw;
  385. height: calc(100vh - 414rpx);
  386. background: rgba(0, 0, 0, 0.6000);
  387. z-index: 999;
  388. position: absolute;
  389. }
  390. .siftBox {
  391. width: 100vw;
  392. background-color: #FFFFFF;
  393. }
  394. .siftItem {
  395. padding: 22rpx 24rpx;
  396. border-bottom: 1rpx solid #EEEEEE;
  397. display: flex;
  398. justify-content: space-between;
  399. }
  400. .item {
  401. height: 37rpx;
  402. font-size: 26rpx;
  403. font-weight: 400;
  404. color: #3C3C3C;
  405. line-height: 37rpx;
  406. }
  407. .blueColor {
  408. color: #3F90F7;
  409. }
  410. .noMore {
  411. text-align: center;
  412. line-height: 50rpx;
  413. color: #999999;
  414. font-size: 28rpx;
  415. }
  416. </style>