소스 검색

开发收益报表

bayi 1 년 전
부모
커밋
850e8a4c52

+ 24 - 57
salesperson/pages/lxDetail/index.js

@@ -1,66 +1,33 @@
-// salesperson/pages/lxDetail/index.js
 Page({
 
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        currentIndex: 1,
+        categoryList: [{
+            id: 1,
+            title: '全部'
+        }, {
+            id: 2,
+            title: '7日'
+        }, {
+            id: 3,
+            title: '月'
+        }, {
+            id: 4,
+            title: '季'
+        }, {
+            id: 5,
+            title: '半年'
+        }]
     },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
     onLoad(options) {
 
     },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
+    setClass({
+        currentTarget
+    }) {
+        this.setData({
+            currentIndex: currentTarget.dataset.index,
+        });
+        // this.resetData();
     },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
-    }
 })

+ 2 - 1
salesperson/pages/lxDetail/index.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
+    "usingComponents": {},
+    "navigationBarTitleText": "收益报表"
 }

+ 72 - 1
salesperson/pages/lxDetail/index.less

@@ -1 +1,72 @@
-/* salesperson/pages/lxDetail/index.wxss */
+.container {
+    padding: 0 20rpx;
+
+    .statistics {
+        width: 100%;
+        padding: 40rpx;
+        display: flex;
+        align-items: center;
+        box-sizing: border-box;
+        background: #FFFFFF;
+        border-radius: 20rpx;
+
+        .col {
+            flex: 1;
+
+            .row {
+                margin-bottom: 60rpx;
+
+                .label {
+                    margin-bottom: 20rpx;
+                    font-size: 28rpx;
+                    color: #666666;
+                }
+
+                .money {
+                    font-size: 32rpx;
+                    font-weight: 500;
+                    color: #000000;
+                }
+            }
+
+            .row:last-child {
+                margin: 0;
+            }
+        }
+
+        .col2 {
+            padding-left: 80rpx;
+        }
+    }
+
+    .detailsBox {
+        margin-top: 40rpx;
+
+        .title {
+            font-size: 25rpx;
+            color: #7B7B7B;
+        }
+
+        .categoryBox {
+            margin-top: 24rpx;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+
+            .category {
+                width: 126rpx;
+                padding: 8rpx 0;
+                font-size: 30rpx;
+                text-align: center;
+                color: #7A7A7A;
+                background: #FFFFFF;
+                border-radius: 29rpx;
+            }
+
+            .currentClass {
+                color: #FEAC57;
+                font-weight: bold;
+            }
+        }
+    }
+}

+ 41 - 2
salesperson/pages/lxDetail/index.wxml

@@ -1,2 +1,41 @@
-<!--salesperson/pages/lxDetail/index.wxml-->
-<text>salesperson/pages/lxDetail/index.wxml</text>
+<view class="container">
+    <view class="statistics">
+        <view class="col">
+            <view class="row">
+                <view class="label">累计收益(元)</view>
+                <view class="money">3400.00</view>
+            </view>
+            <view class="row">
+                <view class="label">累计销售(元)</view>
+                <view class="money">3400.00</view>
+            </view>
+            <view class="row">
+                <view class="label">累计订单(笔)</view>
+                <view class="money">3400</view>
+            </view>
+        </view>
+        <view class="col col2">
+            <view class="row">
+                <view class="label">可提现(元)</view>
+                <view class="money">3400.00</view>
+            </view>
+            <view class="row">
+                <view class="label">待结算(元)</view>
+                <view class="money">3400.00</view>
+            </view>
+            <view class="row">
+                <view class="label">累计邀请(人)</view>
+                <view class="money">3400</view>
+            </view>
+        </view>
+    </view>
+    <view class="detailsBox">
+        <view class="title">展示明细</view>
+        <view class="categoryBox">
+            <view class="category {{currentIndex==item.id?'currentClass':''}}" wx:for="{{categoryList}}" wx:key="id"
+                data-index="{{item.id}}" data-title='{{item.title}}' bindtap="setClass">
+                {{item.title}}
+            </view>
+        </view>
+    </view>
+</view>

+ 60 - 1
salesperson/pages/lxDetail/index.wxss

@@ -1 +1,60 @@
-/* salesperson/pages/lxDetail/index.wxss */
+.container {
+  padding: 0 20rpx;
+}
+.container .statistics {
+  width: 100%;
+  padding: 40rpx;
+  display: flex;
+  align-items: center;
+  box-sizing: border-box;
+  background: #FFFFFF;
+  border-radius: 20rpx;
+}
+.container .statistics .col {
+  flex: 1;
+}
+.container .statistics .col .row {
+  margin-bottom: 60rpx;
+}
+.container .statistics .col .row .label {
+  margin-bottom: 20rpx;
+  font-size: 28rpx;
+  color: #666666;
+}
+.container .statistics .col .row .money {
+  font-size: 32rpx;
+  font-weight: 500;
+  color: #000000;
+}
+.container .statistics .col .row:last-child {
+  margin: 0;
+}
+.container .statistics .col2 {
+  padding-left: 80rpx;
+}
+.container .detailsBox {
+  margin-top: 40rpx;
+}
+.container .detailsBox .title {
+  font-size: 25rpx;
+  color: #7B7B7B;
+}
+.container .detailsBox .categoryBox {
+  margin-top: 24rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.container .detailsBox .categoryBox .category {
+  width: 126rpx;
+  padding: 8rpx 0;
+  font-size: 30rpx;
+  text-align: center;
+  color: #7A7A7A;
+  background: #FFFFFF;
+  border-radius: 29rpx;
+}
+.container .detailsBox .categoryBox .currentClass {
+  color: #FEAC57;
+  font-weight: bold;
+}

+ 1 - 1
salesperson/pages/saleOffice/index.wxml

@@ -40,7 +40,7 @@
             <image src="../../image/b2.png" class="b2" />
             <view class="name">订单管理</view>
         </view>
-        <view class="box">
+        <view class="box" bindtap="jump" data-url="lxDetail">
             <image src="../../image/b3.png" class="b3" />
             <view class="name">收益报表</view>
         </view>