123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490 |
- <template>
- <view class="box">
- <view class="top">
- <view class="activityName">{{activity.ActivityName}}</view>
- <view class="stateBox">
- <view class="jinxing" v-if="activity.state=='进行中'">进行中</view>
- <view class="jieshu" v-if="activity.state=='已结束'">已结束</view>
- <view class="weiqiyong" v-if="activity.state=='未启用'">未启用</view>
- <view class="weiqiyong" v-if="activity.state=='未开始'">未开始</view>
- <view class="date" v-if="activity.StartTime">
- {{activity.StartTime.slice(0,10)}}-{{activity.EndTime.slice(0,10)}}</view>
- </view>
- </view>
- <!-- 搜索 -->
- <view class="searchBoxBg">
- <searchBox placeholder="手机号、车牌号、姓名、客户单位" @search='search($event)'></searchBox>
- </view>
- <view class="boxstate">
- <view class="sxBox">
- <view class="typeBox">
- <view class="type" @click="changeType" v-if="selectTab==0">核销状态</view>
- <view class="type" @click="changeType" v-if="selectTab==1">未核销</view>
- <view class="type" @click="changeType" v-if="selectTab==3">已核销</view>
- <image src="../../static/img/arrow_down.png" mode="" style="width: 24rpx;height: 24rpx;"></image>
- </view>
- <view>
- <picker @change="bindPickerChange" :value="pickerindex" :range-key="'shopName'" :range="pickerarray">
- <view class="typeBox">
- <view class="shopnamesx">
- {{shopName}}
- </view>
- <image src="../../static/img/arrow_down.png" mode="" style="width: 24rpx;height: 24rpx;"></image>
- </view>
- </picker>
- </view>
- </view>
-
- <view class="black" v-if="showSift==true">
- <view class="siftBox">
- <view class="siftItem" @click="tab(0)">
- <view class="item" :class="{blueColor:selectTab==0}">全部</view>
- <image v-if="selectTab==0" src="../../static/img/select_icon.png" mode=""
- style="width: 40rpx;height: 40rpx;"></image>
- </view>
- <view class="siftItem" @click="tab(3)">
- <view class="item" :class="{blueColor:selectTab==3}">已核销</view>
- <image v-if="selectTab==3" src="../../static/img/select_icon.png" mode=""
- style="width: 40rpx;height: 40rpx;"></image>
- </view>
- <view class="siftItem" @click="tab(1)">
- <view class="item" :class="{blueColor:selectTab==1}">未核销</view>
- <image v-if="selectTab==1" src="../../static/img/select_icon.png" mode=""
- style="width: 40rpx;height: 40rpx;"></image>
- </view>
- </view>
-
- </view>
- </view>
- <view class="contentBox">
- <view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="godetail(item)">
- <image src="../../static/img/jt.png" mode="" class="itemHistoryJt"></image>
- <view class="itemTop">
- <image :src="item.HeadImg" mode="" class="icon"></image>
- <view class="topRight">
- <view class="nickName">{{item.NickName?item.NickName:'微信昵称'}}</view>
- <view>
- <span class="phone" v-if="item.MobilePhone">{{item.MobilePhone}}</span>
- <span class="phone" v-if="item.PlateNumber">/ {{item.PlateNumber}}</span>
- <span class="phone" v-if="item.CustomerName">/ {{item.CustomerName}}</span>
- <span class="phone" v-if="item.Unit">/ {{item.Unit}}</span>
- </view>
-
- </view>
- </view>
- <view class="timeBox"><span class="leftTitle">报名时间:</span>{{item.CreateTime}}</view>
- <view class="timeBox"><span class="leftTitle">报名门店:</span>{{item.ShopName}}</view>
- <view class="zhuangtaiBox" v-if="item.WriteoffState==1"><span class="leftTitle">核销状态:</span> 未核销</view>
- <view class="zhuangtaiBox" v-if="item.WriteoffState==3"><span class="leftTitle">核销状态:</span> 已核销 {{item.WriteoffTime}}</view>
-
- <view class="timeBox" v-if="item.WriteoffState==3" style="display: flex;"><span class="leftTitle">核销门店:</span> <view style="width: 500rpx;">{{item.WriteoffShopName}}</view> </view>
- </view>
- <!-- 上拉 加载更多 -->
- <view class="noMore" v-if="noMoreShow && (itemData.length!=0)">没有更多数据</view>
- <!-- 无数据空白页 -->
- <nodata v-if="itemData.length==0"></nodata>
- </view>
-
- </view>
- </template>
- <script>
- import searchBox from '@/components/searchBox/searchBox.vue'
- import nodata from '../../components/nodata/nodata.vue'
- export default {
- components: {
- nodata,
- searchBox
- },
- data() {
- return {
- activity: {},
- page: 1,
- itemData: [],
- noMoreShow: false,
- searchValue: '',
- showSift: false,
- selectTab: 0,
- pickerindex:0,
- pickerarray: [],
- shopName:'报名门店',
- shopId:'',
- }
- },
- onLoad(opt) {
- this.getShopinfo();
- this.activity = JSON.parse(opt.activity);
- console.log('activity==', this.activity);
- this.page = 1
- //this.myOrderCoupon()
- this.myOrderCoupon()
- },
- methods: {
- godetail(e){
- uni.navigateTo({
- url: "../myOrder/activityOrderDetail?id=" + e.ID
- })
- },
- bindPickerChange(e){
- console.log(e)
- this.shopName=this.pickerarray[e.detail.value].shopName
- this.shopId=this.pickerarray[e.detail.value].id
- this.page = 1
- this.myOrderCoupon()
- },
- getShopinfo(){
- this.$http('openH5SetTheGuest/getShopInfo',{},'GET').then(res => {
- //this.shopName=res.data.shopName;
- /* this.mrshopId=res.data.id;
- this.mrshopName=res.data.shopName; */
- //this.shopId=res.data.id
- this.getShopList();
-
-
- })
- },
- getShopList(){
-
- this.$http('openH5SetTheGuest/getShopList', {
-
- },'GET').then(res => {
- var kong={id:'',shopName:'报名门店'}
-
- this.pickerarray=res.data;
- this.pickerarray.unshift(kong)
- /* this.pickerarray.forEach((item,index)=>{
-
- if(this.mrshopId==item.id){
- this.pickerindex=index;
-
- }
- }) */
- //console.log(this.pickerarray[this.pickerindex])
- })
- },
- changeType() {
- this.showSift = !this.showSift
- // console.log('showSift==', this.showSift);
- },
- tab(state) {
- this.selectTab = state
- this.showSift = false
- this.page = 1
- this.myOrderCoupon()
- },
- search(val) {
- // console.log(val);
- this.searchValue = val
- this.page = 1
- this.myOrderCoupon()
- },
- myOrderCoupon() {
- uni.showLoading({
- title: '加载中'
- })
- this.$http('openH5SetTheGuest/registrationDetails', {
- itemId: this.activity.ID,
- name: this.searchValue,
- writeoffState: this.selectTab ? this.selectTab : '',
- page: this.page,
- limit: 99,
- shopID:this.shopId
- }, 'GET').then(res => {
- uni.hideLoading();
- // var list = res.data.Items
- var list = res.data.Items
-
- //str 拼接字符串
- list.forEach((item, index) => {
-
- item.str = item.MobilePhone?item.MobilePhone:'' + item.PlateNumber?'/'+item.PlateNumber:'' + item.CustomerName?'/'+item.CustomerName+'/':'' + item.Unit?'/'+item.Unit:''
-
- })
-
-
- if (this.page == 1) {
- this.itemData = list
- } else {
- this.itemData = this.itemData.concat(list)
- }
- if (list.length < 10) {
- this.noMoreShow = true
- } else {
- this.noMoreShow = false
- }
- console.log('itemData--',this.itemData);
- })
- },
- },
- // 下拉刷新 上拉加载更多
- onPullDownRefresh() {
- this.page = 1
- this.myOrderCoupon()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- onReachBottom() {
- this.page++;
- this.myOrderCoupon()
- },
- }
- </script>
- <style>
- .sxBox{
- display: flex;
- justify-content: space-between;
- background: #FFFFFF;
- }
- .shopnamesx{
- height: 40rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #666666;
- line-height: 40rpx;
- width: 300rpx;
- overflow: hidden;
- text-overflow:ellipsis;
- white-space: nowrap;
- text-align: right;
- }
- .box {
- min-height: 100vh;
- background-color: #F4F5F7;
- width: 100vw;
- }
- .top {
- padding: 30rpx 24rpx;
- background-color: #FFFFFF;
- }
- .activityName {
- font-size: 30rpx;
- font-weight: bold;
- color: #333333;
- line-height: 42rpx;
- }
- .stateBox {
- margin-top: 4rpx;
- display: flex;
- align-items: center;
- }
- .jinxing {
- font-size: 22rpx;
- color: #00A040;
- line-height: 30rpx;
- width: 80rpx;
- height: 30rpx;
- background: #F2FBF6;
- border-radius: 4rpx;
- }
- .jieshu {
- font-size: 22rpx;
- color: #FF6010;
- line-height: 30rpx;
- width: 74rpx;
- height: 30rpx;
- background: #FFECE3;
- border-radius: 4rpx;
- }
- .weiqiyong{
- font-size: 22rpx;
- color: #3C3C3C;
- line-height: 30rpx;
- width: 74rpx;
- height: 30rpx;
- background: #F4F5F7;
- border-radius: 4rpx;
- }
- .date {
- height: 30rpx;
- font-size: 22rpx;
- color: #999999;
- line-height: 30rpx;
- margin-left: 15rpx;
- }
- .searchBoxBg {
- width: 100%;
- background-color: #FFFFFF;
- border-top: 1rpx solid #EEEEEE;
- border-bottom: 1rpx solid #EEEEEE;
- }
- .searchBox {
- display: flex;
- height: 72rpx;
- margin: 24rpx;
- background-color: #F4F5F7;
- border-radius: 36rpx;
- padding: 30rpx 24rpx;
- }
- .boxstate{
- position: relative;
- width: 100vw;
- }
- .typeBox {
- background-color: #FFFFFF;
- padding: 30rpx 24rpx;
- display: flex;
- align-items: center;
- }
- .type {
- width: 114rpx;
- height: 40rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #666666;
- line-height: 40rpx;
- }
- .contentBox {
- padding: 20rpx 24rpx;
- height: calc(100vh - 415rpx);
- }
- .itemHistory {
- position: relative;
- padding: 24rpx 20rpx;
- background-color: #FFFFFF;
- border-radius: 10rpx;
- margin-bottom: 20rpx;
- }
- .itemHistoryJt{
- position: absolute;
- top: 30rpx;
- right: 24rpx;
- width:24rpx;
- height: 24rpx;
- }
- .itemTop {
- display: flex;
- padding-bottom: 20rpx;
- border-bottom: 1rpx solid #EEEEEE;
- }
- .icon {
- width: 72rpx;
- height: 72rpx;
- border-radius: 36rpx;
- margin-right: 20rpx;
- }
- .nickName {
- height: 42rpx;
- font-size: 30rpx;
- font-weight: 400;
- color: #3C3C3C;
- line-height: 42rpx;
-
- }
- .phone {
- height: 33rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #666666;
- line-height: 33rpx;
- margin-right: 10rpx;
- }
- .timeBox {
- /* height: 33rpx; */
- font-size: 24rpx;
- font-weight: 400;
- color: #3C3C3C;
- line-height: 33rpx;
- margin-top: 24rpx;
- }
- .leftTitle {
- color: #999999;
- font-size: 24rpx;
- }
- .zhuangtaiBox {
- height: 33rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #3C3C3C;
- line-height: 33rpx;
- margin-top: 24rpx;
- }
- .black {
- width: 100vw;
- height: calc(100vh - 414rpx);
- background: rgba(0, 0, 0, 0.6000);
- z-index: 999;
- position: absolute;
- }
- .siftBox {
- width: 100vw;
- background-color: #FFFFFF;
-
- }
- .siftItem {
- padding: 22rpx 24rpx;
- border-bottom: 1rpx solid #EEEEEE;
- display: flex;
- justify-content: space-between;
- }
- .item {
- height: 37rpx;
- font-size: 26rpx;
- font-weight: 400;
- color: #3C3C3C;
- line-height: 37rpx;
- }
- .blueColor {
- color: #3F90F7;
- }
- .noMore {
- text-align: center;
- line-height: 50rpx;
- color: #999999;
- font-size: 28rpx;
- }
- </style>
|