|
@@ -1,80 +1,87 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <view class="recharge-page">
|
|
|
|
|
|
|
+ <view class="order-page">
|
|
|
<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="change" itemWidth="20%"/>
|
|
<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="change" itemWidth="20%"/>
|
|
|
|
|
|
|
|
- <view style="margin-left:60upx;margin-top:110upx;padding-bottom:30upx;position: relative;">
|
|
|
|
|
- <DateSelect @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
|
|
- <button class="admin-button-com mini-btn blue" style="position: absolute;right:80upx;top:-8upx;" @click="resetSearch()">重置搜索</button>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view style="margin-left:60upx;margin-top:110upx;padding-bottom:30upx;position: relative;">
|
|
|
|
|
+ <DateSelect @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
|
|
+ <button class="admin-button-com mini-btn blue" style="position: absolute;right:300upx;top:-8upx;" @click="selGhs()">{{ hdName==''?'选花店':hdName }}</button>
|
|
|
|
|
+ <button class="admin-button-com mini-btn blue" style="position: absolute;right:80upx;top:-8upx;" @click="resetSearch()">重置搜索</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
- <view class="recharge_list">
|
|
|
|
|
- <RechargeItem v-for="(item, index) in list.data" :key="index" :info="item" @click="goToDetail"></RechargeItem>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="pay_list">
|
|
|
|
|
+ <OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="goToDetail"></OrderItem>
|
|
|
|
|
+ </view>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
- <view>
|
|
|
|
|
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)"/>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)"/>
|
|
|
|
|
+ </view>
|
|
|
</block>
|
|
</block>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import AppTabs from "@/components/plugin/tabs";
|
|
import AppTabs from "@/components/plugin/tabs";
|
|
|
-import RechargeItem from "./rechargeItem";
|
|
|
|
|
|
|
+import OrderItem from "./rechargeItem";
|
|
|
import { list } from "@/mixins";
|
|
import { list } from "@/mixins";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import { getRechargeList } from "@/api/recharge";
|
|
import { getRechargeList } from "@/api/recharge";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
-
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
AppWrapperEmpty,
|
|
AppWrapperEmpty,
|
|
|
- RechargeItem,
|
|
|
|
|
|
|
+ OrderItem,
|
|
|
AppTabs,
|
|
AppTabs,
|
|
|
DateSelect
|
|
DateSelect
|
|
|
},
|
|
},
|
|
|
mixins: [list],
|
|
mixins: [list],
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
- tabs: [
|
|
|
|
|
|
|
+ tabs: [
|
|
|
{
|
|
{
|
|
|
name: "全部",
|
|
name: "全部",
|
|
|
value: 0,
|
|
value: 0,
|
|
|
key: '0'
|
|
key: '0'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- name: "充值中",
|
|
|
|
|
|
|
+ name: "待付款",
|
|
|
value: 0,
|
|
value: 0,
|
|
|
key: '1'
|
|
key: '1'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- name: "充值成功",
|
|
|
|
|
|
|
+ name: "待发货",
|
|
|
value: 0,
|
|
value: 0,
|
|
|
key: '2'
|
|
key: '2'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- name: "充值失败",
|
|
|
|
|
|
|
+ name: "待收货",
|
|
|
value: 0,
|
|
value: 0,
|
|
|
key: '3'
|
|
key: '3'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "已完成",
|
|
|
|
|
+ value: 0,
|
|
|
|
|
+ key: '4'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
list: {
|
|
list: {
|
|
|
data: []
|
|
data: []
|
|
|
},
|
|
},
|
|
|
|
|
+ supplierList: [],
|
|
|
tabIndex: 0,
|
|
tabIndex: 0,
|
|
|
status: '0',
|
|
status: '0',
|
|
|
- refreshPage: 0,
|
|
|
|
|
- searchTime: '',
|
|
|
|
|
- startTime: '',
|
|
|
|
|
- endTime: ''
|
|
|
|
|
|
|
+ refreshPage:0,
|
|
|
|
|
+ searchContent:'',
|
|
|
|
|
+ searchTime:'',
|
|
|
|
|
+ startTime:'',
|
|
|
|
|
+ hdId:0,
|
|
|
|
|
+ hdName:''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onReachBottom () {
|
|
onReachBottom () {
|
|
|
if (!this.list.finished) {
|
|
if (!this.list.finished) {
|
|
|
- this.getRechargeList().then(res => {
|
|
|
|
|
|
|
+ this.getMyRecharge().then(res => {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
@@ -83,61 +90,58 @@ export default {
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh () {
|
|
onPullDownRefresh () {
|
|
|
this.resetList();
|
|
this.resetList();
|
|
|
- this.getRechargeList().then(res => {
|
|
|
|
|
|
|
+ this.getMyRecharge().then(res => {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onShow(){
|
|
onShow(){
|
|
|
if(this.refreshPage == 1){
|
|
if(this.refreshPage == 1){
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this.getRechargeList()
|
|
|
|
|
|
|
+ this.getMyRecharge()
|
|
|
this.refreshPage = 0
|
|
this.refreshPage = 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onLoad() {
|
|
|
|
|
- this.init()
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ selGhs(){
|
|
|
|
|
+ this.$util.pageTo({ url: "/pagesPurchase/selectGhs"})
|
|
|
|
|
+ },
|
|
|
resetSearch(){
|
|
resetSearch(){
|
|
|
|
|
+ this.hdId = 0
|
|
|
|
|
+ this.hdName=''
|
|
|
this.searchTime = ''
|
|
this.searchTime = ''
|
|
|
this.startTime = ''
|
|
this.startTime = ''
|
|
|
this.endTime = ''
|
|
this.endTime = ''
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this.getRechargeList()
|
|
|
|
|
|
|
+ this.getMyRecharge()
|
|
|
},
|
|
},
|
|
|
- selectDateFn(val) {
|
|
|
|
|
- this.searchTime = val.searchTime
|
|
|
|
|
- this.startTime = val.startTime
|
|
|
|
|
- this.endTime = val.endTime
|
|
|
|
|
|
|
+ selectDateFn(val) {
|
|
|
|
|
+ this.searchTime = val.searchTime
|
|
|
|
|
+ this.startTime = val.startTime
|
|
|
|
|
+ this.endTime = val.endTime
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this.getRechargeList()
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.getMyRecharge()
|
|
|
|
|
+ },
|
|
|
change(e) {
|
|
change(e) {
|
|
|
if (this.tabIndex != e.index) {
|
|
if (this.tabIndex != e.index) {
|
|
|
- uni.pageScrollTo({
|
|
|
|
|
- scrollTop: 0,
|
|
|
|
|
- duration: 0
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ uni.pageScrollTo({ scrollTop: 0, duration: 0 })
|
|
|
this.resetList();
|
|
this.resetList();
|
|
|
this.list.finished = true;
|
|
this.list.finished = true;
|
|
|
this.tabIndex = e.index;
|
|
this.tabIndex = e.index;
|
|
|
this.status = e.item.key;
|
|
this.status = e.item.key;
|
|
|
- this.getRechargeList().then(() => {
|
|
|
|
|
|
|
+ this.getMyRecharge().then(() => {
|
|
|
this.list.finished = false;
|
|
this.list.finished = false;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
init() {
|
|
init() {
|
|
|
- this.getRechargeList()
|
|
|
|
|
|
|
+ if(this.option.hdId){
|
|
|
|
|
+ this.hdId = this.option.hdId?this.option.hdId:0
|
|
|
|
|
+ this.hdName = this.option.hdName?this.option.hdName:''
|
|
|
|
|
+ }
|
|
|
|
|
+ this.getMyRecharge()
|
|
|
},
|
|
},
|
|
|
- getRechargeList () {
|
|
|
|
|
- return getRechargeList({
|
|
|
|
|
- status: this.status,
|
|
|
|
|
- page: this.list.page,
|
|
|
|
|
- searchTime: this.searchTime,
|
|
|
|
|
- startTime: this.startTime,
|
|
|
|
|
- endTime: this.endTime
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ getMyRecharge () {
|
|
|
|
|
+ return getRechargeList({ status: this.status,page: this.list.page,searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime,hdId:this.hdId}).then(res => {
|
|
|
this.completes(res)
|
|
this.completes(res)
|
|
|
if (this.$util.isEmpty(res.data)){
|
|
if (this.$util.isEmpty(res.data)){
|
|
|
return false
|
|
return false
|
|
@@ -152,11 +156,12 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-.recharge-page {
|
|
|
|
|
|
|
+.order-page {
|
|
|
.tabs {
|
|
.tabs {
|
|
|
height: 80upx;
|
|
height: 80upx;
|
|
|
line-height: 80upx;
|
|
line-height: 80upx;
|
|
|
& > view {
|
|
& > view {
|
|
|
|
|
+ // padding: 0 80upx;
|
|
|
width: 50%;
|
|
width: 50%;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
font-size: 28upx;
|
|
font-size: 28upx;
|
|
@@ -179,10 +184,63 @@ export default {
|
|
|
background: #3385ff;
|
|
background: #3385ff;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .recharge_list {
|
|
|
|
|
- padding-top: 20upx;
|
|
|
|
|
|
|
+ .order_list {
|
|
|
|
|
+ // height: 200upx;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background: #f0f2f6;
|
|
|
|
|
+ padding: 0 0 20upx;
|
|
|
|
|
+ .list_item {
|
|
|
|
|
+ margin: 20upx 0 0;
|
|
|
|
|
+ // padding-left: 20upx;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ height: 180upx;
|
|
|
|
|
+ width: 100vw;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ & > image {
|
|
|
|
|
+ margin-left: 30upx;
|
|
|
|
|
+ width: 120upx;
|
|
|
|
|
+ height: 120upx;
|
|
|
|
|
+ border-radius: 60upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .store_name {
|
|
|
|
|
+ margin-left: 30upx;
|
|
|
|
|
+ & > .store_title {
|
|
|
|
|
+ margin-bottom: 30upx;
|
|
|
|
|
+ font-size: 32upx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .accumulative {
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .store_btn {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 30upx;
|
|
|
|
|
+ // padding-right: 30upx;
|
|
|
|
|
+ & > .btn_entrance {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ color: #3385ff;
|
|
|
|
|
+ border: 1px solid #3385ff;
|
|
|
|
|
+ border-radius: 8upx;
|
|
|
|
|
+ padding: 15upx 30upx;
|
|
|
|
|
+ margin-left: 30upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .btn_forbid {
|
|
|
|
|
+ border: 1px solid #999;
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .pay_list {
|
|
|
|
|
+ padding-top:20upx;
|
|
|
padding-bottom: 100upx;
|
|
padding-bottom: 100upx;
|
|
|
background-color: #f0f2f6;
|
|
background-color: #f0f2f6;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|