|
|
@@ -1,52 +1,34 @@
|
|
|
<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 flex_r flex_jb" @click="selected({id:1})">
|
|
|
- <div class="list_item_l flex_c flex_jc">
|
|
|
- <span class="iconfont" v-if="selectedId.includes(1)"></span>
|
|
|
- <span class="iconfont" v-else></span>
|
|
|
- </div>
|
|
|
+ <div class="log_list" :style="{ height: height }">
|
|
|
+ <div class="list_box" v-for="item,index of list" :key="index">
|
|
|
+ <div class="list_item flex_r flex_jb">
|
|
|
+ <checkbox-group
|
|
|
+ class="list_item_l flex_c flex_jc"
|
|
|
+ @change="checkboxChange($event,item)"
|
|
|
+ >
|
|
|
+ <label class="option_box mar_t30">
|
|
|
+ <checkbox
|
|
|
+ :value="item.order_sn"
|
|
|
+ :checked="item.isclick"
|
|
|
+ color="#2DB389"
|
|
|
+ style="transform: scale(0.7)"
|
|
|
+ />
|
|
|
+ </label>
|
|
|
+ </checkbox-group>
|
|
|
<div class="list_item_r">
|
|
|
<div class="p1 flex_r flex_jb c05">
|
|
|
- <span>订单号:jhgsafdjgh</span>
|
|
|
- <span>hagsjdgh</span>
|
|
|
+ <span>订单号:{{ item.order_sn }}</span>
|
|
|
+ <span>{{ $day(item.add_time * 1000).format("YYYY-MM-DD") }}</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 />
|
|
|
+ <img :src="item.original_img" class="odr_img" alt />
|
|
|
<div class="odr_info flex_c flex_jb">
|
|
|
- <div class="tit ellipsis1">霸气草莓</div>
|
|
|
- <div class="num">数量 x3</div>
|
|
|
+ <div class="tit ellipsis1">{{ item.goods_name }}</div>
|
|
|
+ <div class="num">数量 x{{ item.goods_num }}</div>
|
|
|
<div class="money flex_r flex_jb">
|
|
|
- <span>金额1000</span>
|
|
|
- <span>奖励茶宝36</span>
|
|
|
+ <span>金额{{ item.total_amount }}</span>
|
|
|
+ <!-- <span>奖励茶宝36</span> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -54,6 +36,20 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="bottom">
|
|
|
+ <div class="left">
|
|
|
+ <span>共</span>
|
|
|
+ <span class="green">{{total}}</span>
|
|
|
+ <span>笔订单,合计</span>
|
|
|
+ <span class="green">¥{{money}}</span>
|
|
|
+ <span>元</span>
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <div class="button">
|
|
|
+ <span>下一步</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -65,194 +61,88 @@ export default {
|
|
|
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,
|
|
|
- selectedId:[],
|
|
|
- selectedLi:[],
|
|
|
+ rows: 10,
|
|
|
+ selectedId: [],
|
|
|
+ selectedLi: [],
|
|
|
+ height: undefined,
|
|
|
+ total:0,
|
|
|
+ money:0
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- this.getTabs();
|
|
|
+ let that = this;
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: function (res) {
|
|
|
+ that.height = res.windowHeight * 2 - 150 + "rpx";
|
|
|
+ that.getList();
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
onLaunch() {},
|
|
|
- onShow() {
|
|
|
- if (this.active_i && this.active_m) {
|
|
|
- this.list = [];
|
|
|
- this.page = 1;
|
|
|
- this.getList()
|
|
|
- }
|
|
|
- },
|
|
|
+ onShow() {},
|
|
|
onHide() {},
|
|
|
//页面上拉触底事件的处理函数
|
|
|
onReachBottom() {
|
|
|
if (this.page != -1) {
|
|
|
var that = this;
|
|
|
- setTimeout(function() {
|
|
|
+ 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
|
|
|
+ rows: this.rows,
|
|
|
};
|
|
|
- post("getCollateData", data).then(res => {
|
|
|
+ post("invoice/orderList", 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);
|
|
|
+ this.list = this.list.concat(res.data.data);
|
|
|
+ this.total = res.data.total;
|
|
|
if (Math.ceil(this.total / this.rows) <= this.page) {
|
|
|
this.page = -1;
|
|
|
- setTimeout(() => {
|
|
|
- // uni.$u.toast("暂无更多");
|
|
|
- appEv.errTips('暂无更多')
|
|
|
- }, 1000);
|
|
|
-
|
|
|
+ // setTimeout(() => {
|
|
|
+ // appEv.errTips("暂无更多");
|
|
|
+ // }, 1000);
|
|
|
}
|
|
|
- // this.list = res.data.data.data;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- selected(da){
|
|
|
- if(!this.selectedId.includes(da.id)){
|
|
|
- this.selectedId.push(da.id)
|
|
|
- this.selectedLi.push(da)
|
|
|
+ checkboxChange(e,item) {
|
|
|
+ this.total = 0
|
|
|
+ this.money = 0
|
|
|
+ if(item.isclick == true){
|
|
|
+ this.$set(item, "isclick", false);
|
|
|
}else{
|
|
|
- this.selectedId.remove(da.id)
|
|
|
- this.selectedLi.remove(da)
|
|
|
+ this.$set(item, "isclick", true);
|
|
|
}
|
|
|
- }
|
|
|
+ for(let i of this.list){
|
|
|
+ if(i.isclick){
|
|
|
+ this.total++
|
|
|
+ this.money = this.money + i.total_amount * 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
computed: {},
|
|
|
- watch: {}
|
|
|
+ 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;
|
|
|
- }
|
|
|
-
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
.log_list {
|
|
|
- padding: 0 32rpx;
|
|
|
-
|
|
|
+ padding: 32rpx 32rpx;
|
|
|
+ overflow: scroll;
|
|
|
.log_title {
|
|
|
line-height: 40rpx;
|
|
|
margin-bottom: 20rpx;
|
|
|
-
|
|
|
+
|
|
|
.tit {
|
|
|
font-size: 36rpx;
|
|
|
font-weight: bold;
|
|
|
@@ -278,20 +168,21 @@ page {
|
|
|
}
|
|
|
|
|
|
.list_box {
|
|
|
+ margin-top: 20rpx;
|
|
|
.list_item {
|
|
|
background: #fff;
|
|
|
padding: 32rpx;
|
|
|
border-radius: 16rpx;
|
|
|
margin-bottom: 20rpx;
|
|
|
-
|
|
|
- .list_item_l{
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ .list_item_l {
|
|
|
width: 68rpx;
|
|
|
// text-align: center;
|
|
|
- .iconfont{
|
|
|
+ .iconfont {
|
|
|
font-size: 36rpx;
|
|
|
}
|
|
|
}
|
|
|
- .list_item_r{
|
|
|
+ .list_item_r {
|
|
|
width: calc(100% - 68rpx);
|
|
|
}
|
|
|
|
|
|
@@ -324,5 +215,40 @@ page {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .bottom {
|
|
|
+ flex: 0 0 100rpx;
|
|
|
+ // background-color: red;
|
|
|
+ border-top: 1px solid #ddd;
|
|
|
+ height: 100rpx;
|
|
|
+ width: 100%;
|
|
|
+ z-index: 999;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 32rpx;
|
|
|
+ .left{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ .green{
|
|
|
+ color: #2DB389;
|
|
|
+ margin: 0 6rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .button{
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ background-color: #2DB389;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ span{
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|