|
@@ -1,60 +1,83 @@
|
|
|
<template>
|
|
|
<!-- 奖励明细页面 -->
|
|
|
<view class="header">
|
|
|
-
|
|
|
- <view class="header-one">
|
|
|
+
|
|
|
+ <view class="header-one">
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="content">
|
|
|
+ <view style="width: 100%;">
|
|
|
+ <!-- <u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
|
|
|
+ active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs> -->
|
|
|
+ <view style="width: 340rpx;height: 80rpx;text-align: center;padding-top: 25rpx;padding-left: 20rpx;float: left;margin-top: 0;margin-left: 30rpx;">
|
|
|
+ <view style="float: left;">
|
|
|
+ <text @click="whole">全部</text>
|
|
|
+ <view v-if="bottoma == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
|
|
|
+ <view v-else></view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="content">
|
|
|
- <u-tabs style="width: 500rpx;" bg-color="#0095ff" inactive-color="#FFFFFF" active-color="#fff" :list="list"
|
|
|
- :is-scroll="false" :current="current" @change="change"></u-tabs>
|
|
|
- <u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand" value-name="brandId" label-name="brandName" :list="brandList"></u-select>
|
|
|
- <u-calendar style=" color: #fff;" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
|
|
|
- <view @click="search">
|
|
|
- <u-search placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch" :show-action="false" :animation="true"></u-search>
|
|
|
- </view>
|
|
|
+ <view style="float: left;margin-left: 70rpx;">
|
|
|
+ <text @click="brand">品牌</text>
|
|
|
+ <view v-if="bottomb == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
|
|
|
+ <view v-else></view>
|
|
|
</view>
|
|
|
- <view v-if="count!=0">
|
|
|
- <view class="content-one" v-for="(item,index) in datalist" :key="index">
|
|
|
- <view class="content-one-view">
|
|
|
- </view>
|
|
|
- <view class="content-one-text">获得奖励:{{item.money}}元</view>
|
|
|
- <view class="content-two">
|
|
|
- <view class="">
|
|
|
- 轮胎型号
|
|
|
- </view>
|
|
|
- <view class="">
|
|
|
- {{item.tireModel}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="content-two">
|
|
|
- <view class="">
|
|
|
- 扫码胎号
|
|
|
- </view>
|
|
|
- <view class="">
|
|
|
- {{item.tyreNum}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="content-two">
|
|
|
- <view class="">
|
|
|
- 奖励类型
|
|
|
- </view>
|
|
|
- <view class="">
|
|
|
- {{getWay}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="content-two">
|
|
|
- <view class="">
|
|
|
- 获得时间
|
|
|
- </view>
|
|
|
- <view class="">
|
|
|
- {{item.createTime}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
+ <view style="float: left;margin-left: 70rpx;">
|
|
|
+ <text @click="time_s">时间</text>
|
|
|
+ <view v-if="bottomc == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
|
|
|
+ <view v-else></view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- <u-tabs style="width: 500rpx;" bg-color="#0095ff" inactive-color="#FFFFFF" active-color="#fff" :list="list"
|
|
|
+ :is-scroll="false" :current="current" @change="change"></u-tabs> -->
|
|
|
+ <u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand"
|
|
|
+ value-name="brandId" label-name="brandName" :list="brandList"></u-select>
|
|
|
+ <u-calendar style=" color: #fff;" @click="calendar" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
|
|
|
+ <view>
|
|
|
+ <u-search style="width: 320rpx;" placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch"
|
|
|
+ :show-action="false" :animation="true"></u-search>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-if="count!=0">
|
|
|
+ <view class="content-one" v-for="(item,index) in datalist" :key="index">
|
|
|
+ <view class="content-one-view">
|
|
|
+ </view>
|
|
|
+ <view class="content-one-text">获得奖励:{{item.money}}元</view>
|
|
|
+ <view class="content-two">
|
|
|
+ <view class="">
|
|
|
+ 轮胎型号
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ {{item.tireModel}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="content-two">
|
|
|
+ <view class="">
|
|
|
+ 扫码胎号
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ {{item.tyreNum}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="content-two">
|
|
|
+ <view class="">
|
|
|
+ 奖励类型
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ {{getWay}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="content-two">
|
|
|
+ <view class="">
|
|
|
+ 获得时间
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ {{item.createTime}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
<view v-else style="margin-top: 400rpx;">
|
|
|
<u-empty text="暂无数据" mode="list"></u-empty>
|
|
@@ -75,6 +98,9 @@
|
|
|
status: 'loadmore',
|
|
|
getWay: '',
|
|
|
input: '',
|
|
|
+ bottoma: true,
|
|
|
+ bottomb: false,
|
|
|
+ bottomc: false,
|
|
|
list: [{
|
|
|
name: '全部'
|
|
|
}, {
|
|
@@ -82,7 +108,7 @@
|
|
|
}, {
|
|
|
name: '时间',
|
|
|
}],
|
|
|
- brandList:JSON.parse(JSON.stringify([])),
|
|
|
+ brandList: JSON.parse(JSON.stringify([])),
|
|
|
current: 0,
|
|
|
// 默认页数
|
|
|
current1: 1,
|
|
@@ -94,15 +120,13 @@
|
|
|
// 结束时间
|
|
|
endTime: '',
|
|
|
pages: '',
|
|
|
- count:'',
|
|
|
+ count: '',
|
|
|
datalength: '',
|
|
|
label: '',
|
|
|
-
|
|
|
-
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.data()
|
|
|
+ this.whole()
|
|
|
this.getBrandList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -115,8 +139,8 @@
|
|
|
url: '/myPage/getPageScanRewordList',
|
|
|
method: 'post',
|
|
|
data: {
|
|
|
- storeId:this.$store.state.storeInfo.storeId,
|
|
|
- userId:this.$store.state.storeInfo.userId,
|
|
|
+ storeId: this.$store.state.storeInfo.storeId,
|
|
|
+ userId: this.$store.state.storeInfo.userId,
|
|
|
'searchKey': this.input,
|
|
|
'current': this.current1,
|
|
|
'size': '10'
|
|
@@ -127,7 +151,7 @@
|
|
|
this.count = res.data.count
|
|
|
this.datalength = res.data.data.length
|
|
|
this.datalist = this.datalist.concat(res.data.data)
|
|
|
-
|
|
|
+
|
|
|
// 判断扫码类型
|
|
|
for (var i = 0; i < res.data.data.length; i++) {
|
|
|
if (res.data.data[i].getWay == 0) {
|
|
@@ -147,22 +171,57 @@
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ calendar() {
|
|
|
+ console.log("@@@")
|
|
|
+ },
|
|
|
+ // 全部事件
|
|
|
+ whole() {
|
|
|
+ console.log("@@")
|
|
|
+ this.bottoma = true
|
|
|
+ this.bottomb = false
|
|
|
+ this.bottomc = false
|
|
|
+ this.current1 = 1
|
|
|
+ this.data()
|
|
|
+ this.datalist = []
|
|
|
+
|
|
|
+ },
|
|
|
+ // 品牌事件
|
|
|
+ brand() {
|
|
|
+ this.showBrand = true
|
|
|
+ this.bottomb = true
|
|
|
+ this.bottoma = false
|
|
|
+ this.bottomc = false
|
|
|
+ this.current1 = 1
|
|
|
+ this.datalist = []
|
|
|
+ },
|
|
|
+ // 时间事件
|
|
|
+ time_s() {
|
|
|
+ this.showDate = true
|
|
|
+ this.bottoma = false
|
|
|
+ this.bottomc = true
|
|
|
+ this.bottomb = false
|
|
|
+ this.current1 = 1
|
|
|
+ this.datalist = []
|
|
|
+ },
|
|
|
// 时间选择器获取时间
|
|
|
changetime(e) {
|
|
|
console.log(e)
|
|
|
this.startTime = e.startDate
|
|
|
this.endTime = e.endDate
|
|
|
- this.datalist= []
|
|
|
+ this.datalist = []
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
+ });
|
|
|
request({
|
|
|
url: '/myPage/getPageScanRewordList',
|
|
|
method: 'post',
|
|
|
data: {
|
|
|
- storeId:this.$store.state.storeInfo.storeId,
|
|
|
- userId:this.$store.state.storeInfo.userId,
|
|
|
- 'current': '1',
|
|
|
+ storeId: this.$store.state.storeInfo.storeId,
|
|
|
+ userId: this.$store.state.storeInfo.userId,
|
|
|
+ 'current': '1',
|
|
|
'size': '10',
|
|
|
- 'startTime': this.startTime +' 00:00:00',
|
|
|
- 'endTime': this.endTime +' 23:59:59'
|
|
|
+ 'startTime': this.startTime + ' 00:00:00',
|
|
|
+ 'endTime': this.endTime + ' 23:59:59'
|
|
|
}
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
@@ -185,7 +244,7 @@
|
|
|
uni.hideLoading();
|
|
|
this.loading = false;
|
|
|
}, 1000)
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
// 获取品牌列表
|
|
@@ -194,11 +253,11 @@
|
|
|
url: '/baseReq/getBrandList',
|
|
|
method: 'post',
|
|
|
data: {
|
|
|
- storeId:this.$store.state.storeInfo.storeId,
|
|
|
- userId:this.$store.state.storeInfo.userId
|
|
|
+ storeId: this.$store.state.storeInfo.storeId,
|
|
|
+ userId: this.$store.state.storeInfo.userId
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- this.brandList = JSON.parse(JSON.stringify(res.data.data))
|
|
|
+ this.brandList = JSON.parse(JSON.stringify(res.data.data))
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
})
|
|
@@ -207,29 +266,33 @@
|
|
|
uni.hideLoading();
|
|
|
this.loading = false;
|
|
|
}, 1000)
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
// 搜索框
|
|
|
handleSearch(e) {
|
|
|
console.log(e)
|
|
|
- this.datalist = []
|
|
|
+
|
|
|
this.data()
|
|
|
+ this.datalist = []
|
|
|
},
|
|
|
// 点击获取品牌
|
|
|
confirm(e) {
|
|
|
console.log(e)
|
|
|
console.log(e[0].label)
|
|
|
this.label = e[0].label
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
+ });
|
|
|
request({
|
|
|
url: '/myPage/getPageScanRewordList',
|
|
|
method: 'post',
|
|
|
data: {
|
|
|
- storeId:this.$store.state.storeInfo.storeId,
|
|
|
- userId:this.$store.state.storeInfo.userId,
|
|
|
- 'current': '1',
|
|
|
+ storeId: this.$store.state.storeInfo.storeId,
|
|
|
+ userId: this.$store.state.storeInfo.userId,
|
|
|
+ 'current': '1',
|
|
|
'size': '10',
|
|
|
- 'searchKey': this.label
|
|
|
+ 'brandCode': this.label
|
|
|
}
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
@@ -253,32 +316,27 @@
|
|
|
uni.hideLoading();
|
|
|
this.loading = false;
|
|
|
}, 1000)
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
- },
|
|
|
- // 点击取消按钮
|
|
|
-
|
|
|
-
|
|
|
- clear() {
|
|
|
- this.current = 0
|
|
|
- console.log("@@")
|
|
|
- },
|
|
|
- search() {
|
|
|
- this.$u.route({
|
|
|
- url: 'pages/me/search/index',
|
|
|
- })
|
|
|
+ },
|
|
|
+ // 点击取消按钮
|
|
|
+
|
|
|
+
|
|
|
+ clear() {
|
|
|
+ this.current = 0
|
|
|
+ console.log("@@")
|
|
|
},
|
|
|
change(index) {
|
|
|
this.current = index;
|
|
|
if (this.current == 1) {
|
|
|
this.showBrand = true
|
|
|
- this.datalist= []
|
|
|
+ this.datalist = []
|
|
|
} else if (this.current == 2) {
|
|
|
this.showDate = true
|
|
|
- this.datalist= []
|
|
|
+ this.datalist = []
|
|
|
}
|
|
|
this.current1 = 1
|
|
|
- this.datalist= []
|
|
|
+ this.datalist = []
|
|
|
this.data()
|
|
|
}
|
|
|
},
|
|
@@ -291,16 +349,16 @@
|
|
|
this.current1 = ++this.current1;
|
|
|
this.data()
|
|
|
this.status = 'nomore'
|
|
|
-
|
|
|
+
|
|
|
} else {
|
|
|
-
|
|
|
+
|
|
|
this.status = 'loading';
|
|
|
console.log("@@@")
|
|
|
// this.status = 'nomore'
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}, 1000)
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -332,7 +390,7 @@
|
|
|
|
|
|
.content-one {
|
|
|
width: 690rpx;
|
|
|
- height: 305rpx;
|
|
|
+ height: 315rpx;
|
|
|
background: #FFFFFF;
|
|
|
box-shadow: 0px 0px 24px 0px rgba(101, 176, 249, 0.41);
|
|
|
border-radius: 20rpx;
|