|
@@ -0,0 +1,301 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="iApp">
|
|
|
|
|
+ <div class="headbar">
|
|
|
|
|
+ <div class="tabs clearfix">
|
|
|
|
|
+ <div class="tabs_item" v-for="(i, s) in tabs" :key="s" :class="{ active: active_i == i.inx }" @click="changeActive(i.inx)">{{ i.txt }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="monthTabs flex_r flex_jb">
|
|
|
|
|
+ <div class="tabs_item" v-for="(i, s) in monthTab" :key="s" :class="{ active: active_m == i.inx }" @click="changeMactive(i.inx)">{{ i.txt }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <div class="money_info flex_r flex_jb flex_jc">
|
|
|
|
|
+ <div class="money_item">
|
|
|
|
|
+ <text class="money_num">{{ money | NumberFormat }}</text>
|
|
|
|
|
+ <div class="money_msg">当月核销金额</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="money_item flex_c flex_jc">
|
|
|
|
|
+ <div class="money_msg"> 待结算:{{ '468522' | NumberFormat }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="log_list">
|
|
|
|
|
+ <!-- <div class="log_title flex_r flex_jb">
|
|
|
|
|
+ <div class="tit">
|
|
|
|
|
+ <span class="active">核销记录</span>
|
|
|
|
|
+ <span class="log_num">{{ total }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mor">
|
|
|
|
|
+ <span>更多</span>
|
|
|
|
|
+ <span class="icofont"></span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ <div class="list_box">
|
|
|
|
|
+ <div class="list_item">
|
|
|
|
|
+ <div class="p1 flex_r flex_jb c05">
|
|
|
|
|
+ <span>订单号:jhgsafdjgh</span>
|
|
|
|
|
+ <span>hagsjdgh</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="p2 flex_r flex_jb">
|
|
|
|
|
+ <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/89f5ba1b225b813fd48d2128f757f99c43fd2f34png" class="odr_img" alt />
|
|
|
|
|
+ <div class="odr_info flex_c flex_jb">
|
|
|
|
|
+ <div class="tit ellipsis1">霸气草莓</div>
|
|
|
|
|
+ <div class="num">数量 x3</div>
|
|
|
|
|
+ <div class="money flex_r flex_jb">
|
|
|
|
|
+ <span>金额1000</span>
|
|
|
|
|
+ <span>奖励茶宝36</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+import { get, post } from "@/request/api.js";
|
|
|
|
|
+var app = getApp();
|
|
|
|
|
+var appEv = app.$vm.$options;
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "iApp",
|
|
|
|
|
+ components: {},
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ active_i: 1,
|
|
|
|
|
+ active_m: undefined,
|
|
|
|
|
+ // sameMonth: this.dayjs().format("YYYY-MM"),
|
|
|
|
|
+ // lastMonth: this.dayjs().subtract(1, "M").format("YYYY-MM"),
|
|
|
|
|
+ tabs: [],
|
|
|
|
|
+ monthTab: [],
|
|
|
|
|
+ money: 0,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ rows: 5
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad(option) {
|
|
|
|
|
+ this.getTabs();
|
|
|
|
|
+ },
|
|
|
|
|
+ onLaunch() {},
|
|
|
|
|
+ onShow() {
|
|
|
|
|
+ if (this.active_i && this.active_m) {
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onHide() {},
|
|
|
|
|
+ //页面上拉触底事件的处理函数
|
|
|
|
|
+ onReachBottom() {
|
|
|
|
|
+ if (this.page != -1) {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ setTimeout(function() {
|
|
|
|
|
+ that.page++;
|
|
|
|
|
+ that.getList();
|
|
|
|
|
+ }, 800);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ // beforeMonth(n){
|
|
|
|
|
+ // for(let a = 0; a < n; a++){
|
|
|
|
|
+ // let ym = this.dayjs().subtract(a,"M").format("YYYY-MM")
|
|
|
|
|
+ // this.monthTab.push(ym)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ getTabs() {
|
|
|
|
|
+ post("getDataTitle").then(res => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ this.tabs = res.data;
|
|
|
|
|
+ this.getMouth(this.tabs[0].inx);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getMouth() {
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ type: this.active_i
|
|
|
|
|
+ };
|
|
|
|
|
+ post("getDataTable", data).then(res => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ this.monthTab = res.data;
|
|
|
|
|
+ this.active_m = res.data[0].inx;
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ changeActive(i) {
|
|
|
|
|
+ this.active_i = i;
|
|
|
|
|
+ this.getMouth();
|
|
|
|
|
+ },
|
|
|
|
|
+ changeMactive(i) {
|
|
|
|
|
+ this.active_m = i;
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ getList() {
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ type: this.active_i,
|
|
|
|
|
+ number: this.active_m,
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ rows: this.rows
|
|
|
|
|
+ };
|
|
|
|
|
+ post("getCollateData", data).then(res => {
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
|
+ this.money = res.data.money;
|
|
|
|
|
+ this.total = res.data.data.total;
|
|
|
|
|
+ this.list = this.list.concat(res.data.data.data);
|
|
|
|
|
+ if (Math.ceil(this.total / this.rows) <= this.page) {
|
|
|
|
|
+ this.page = -1;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ // uni.$u.toast("暂无更多");
|
|
|
|
|
+ appEv.errTips('暂无更多')
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.list = res.data.data.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {},
|
|
|
|
|
+ watch: {}
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style scoped lang='scss'>
|
|
|
|
|
+
|
|
|
|
|
+page {
|
|
|
|
|
+ background-color: #F6F6F6;
|
|
|
|
|
+}
|
|
|
|
|
+.iApp {
|
|
|
|
|
+
|
|
|
|
|
+ .headbar {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ // height: 320rpx;
|
|
|
|
|
+ // background-image: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/89f5ba1b225b813fd48d2128f757f99c43fd2f34png");
|
|
|
|
|
+ // background-size: 100% 100%;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ padding: 46rpx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ .tabs {
|
|
|
|
|
+ margin-bottom: 26rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .tabs_item {
|
|
|
|
|
+ float: left;
|
|
|
|
|
+ margin-right: 60rpx;
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ margin-right: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .monthTabs {
|
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .tabs_item {
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .tabs_item {
|
|
|
|
|
+ padding: 6rpx 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .active {
|
|
|
|
|
+ border-bottom: 1px solid #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .money_info {
|
|
|
|
|
+ color: #5d32fb;
|
|
|
|
|
+ background-color: #eaebff;
|
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
|
+ padding: 38rpx 46rpx;
|
|
|
|
|
+
|
|
|
|
|
+ // .money_item{
|
|
|
|
|
+ // height: 100%;
|
|
|
|
|
+ // }
|
|
|
|
|
+ .money_num {
|
|
|
|
|
+ font-size: 60rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .money_msg {
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ margin-bottom: 40rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .log_list {
|
|
|
|
|
+ padding: 0 32rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .log_title {
|
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .tit {
|
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+
|
|
|
|
|
+ .log_num {
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ margin-left: 10rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .active {
|
|
|
|
|
+ border-bottom: 4rpx solid #3a88ff;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .mor {
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: rgba($color: #000, $alpha: 0.5);
|
|
|
|
|
+
|
|
|
|
|
+ .icofont {
|
|
|
|
|
+ font-size: 22rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .list_box {
|
|
|
|
|
+ .list_item {
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ padding: 32rpx;
|
|
|
|
|
+ border-radius: 16rpx;
|
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
|
+
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .p1 {
|
|
|
|
|
+ font-size: 25rpx;
|
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .p2 {
|
|
|
|
|
+ .odr_img {
|
|
|
|
|
+ object-fit: cover;
|
|
|
|
|
+ width: 120rpx;
|
|
|
|
|
+ height: 112rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .odr_info {
|
|
|
|
|
+ width: calc(100% - 120rpx - 20rpx);
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: rgba($color: #000, $alpha: 0.5);
|
|
|
|
|
+
|
|
|
|
|
+ .tit {
|
|
|
|
|
+ color: rgba($color: #000, $alpha: 0.9);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|