signJkDetail.vue 11 KB

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