| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <template>
- <view class="app-content">
- <view class="ex-page">
- <view class="input-wrap_box">
- <view>
- <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
- </view>
- </view>
- <view class="top-bar">
- <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
- </view>
- <view class="main-view">
- <view class="space-view ex-table">
- <block>
- <t-table :headerBackgroundColor="'#F0F2F6'">
- <t-tr header>
- <t-th>客户</t-th>
- <t-th>笔数</t-th>
- <t-th>扎数</t-th>
- <t-th>金额</t-th>
- <t-th>成本</t-th>
- <t-th>利润</t-th>
- </t-tr>
- <block v-if="profile.list && !$util.isEmpty(profile.list)">
- <view v-for="(item, index) in profile.list" :key="index">
- <t-tr>
- <t-td><view style="color:#333333;font-size:28upx;">{{item.customName?item.customName:'-'}}</view></t-td>
- <t-td><view style="color:#333333;font-size:28upx;">{{parseFloat(item.num)}}</view></t-td>
- <t-td><view style="color:#333333;font-size:28upx;">{{item.count?parseFloat(item.count):0}}</view></t-td>
- <t-td><view style="color:#333333;font-size:28upx;">¥{{parseFloat(item.amount)}}</view></t-td>
- <t-td><view style="color:#333333;font-size:28upx;">¥{{parseFloat(item.cost)}}</view></t-td>
- <t-td><view style="color:#333333;font-size:28upx;">¥{{parseFloat(item.profit)}}</view></t-td>
- </t-tr>
- </view>
- </block>
- <t-tr><t-td><view style="color:black;font-weight:bold;font-size:28upx;">{{profile.totalNum||0}}笔¥{{profile.totalAmount||0}} 成本¥{{ profile.totalCost||0 }} 利润¥{{ profile.totalProfit||0 }}</view></t-td></t-tr>
- <t-tr><t-td>
- <view style="color:#1c89e0;font-size:28upx;">
- 从2025年11月20号起是准确数据,之前的数据不准确
- </view>
- </t-td></t-tr>
- <t-tr><t-td>
- <view style="color:#1c89e0;font-size:28upx;">
- 扎数没有减掉售后的数量,只能作为参考数据。金额、成本和利润已经减掉了售后部分,是准确的。
- </view>
- </t-td></t-tr>
- </t-table>
- </block>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import AppWrapperEmpty from "@/components/app-wrapper-empty";
- import SelectList from "@/components/plugin/selectList";
- import { getStatKhCgProfile } from "@/api/stat/index";
- import { list } from "@/mixins";
- import ShopSelect from "@/components/module/shopSelect";
- import DateSelect from "@/components/module/dateSelect";
- import AppSearchModule from "@/components/module/app-search";
- import {mapActions, mapGetters} from "vuex";
- export default {
- components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
- mixins: [list],
- computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
- data() {
- return {
- params:{
- searchTime:'',
- startTime: "",
- endTime: "",
- },
- profile:[],
- searchText:'',
- };
- },
- onPullDownRefresh() {
- this.resetList();
- this.getList().then(res => {
- uni.stopPullDownRefresh();
- });
- },
- methods: {
- ...mapActions(['setUserShopAll']),
- searchFn(e){
- this.searchText = e;
- },
- selectDateFn(val) {
- this.params = {...this.params,...val}
- this.init();
- },
- async init() {
- this.getList();
- },
- getList() {
- let that = this
- uni.showLoading()
- getStatKhCgProfile(this.params).then(res => {
- uni.hideLoading()
- that.profile = res.data
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .ex-page {
- background: white;
- padding-top:20upx;
- height: 100%;
- display: flex;
- flex-direction: column;
- .top-bar {
- position: absolute;
- left: 0;
- top:130upx;
- display: flex;
- width: 100%;
- z-index: 20;
- .bar{
- width: 50%;
- height: 100%;
- text-align: center;
- &:nth-child(1){
- border-right: 1upx solid #eeeeec;
- }
- }
- }
- .main-view {
- margin-top: 90upx;
- flex: 1;
- background-color: #f9fbfc;
- .space-view {
- background-color: #fff;
- .change-level{
- font-size:22upx;
- padding:10upx 15upx;
- }
- }
- .ex-info {
- padding: 30upx;
- .info-cell {
- display: flex;
- align-items: center;
- font-size: 28upx;
- &:not(:first-child) {
- margin-top: 20upx;
- }
- .cell-label {
- width: 110upx;
- color: #666666;
- }
- .cell-value {
- margin-left: 40upx;
- color: #333;
- &.warning {
- color: #ffaf1d;
- }
- &.success {
- color: #27c325;
- }
- }
- }
- }
- .ex-table {
- ::v-deep.icon-info {
- color: #333333;
- }
- }
- }
- .bar-view {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 30upx;
- width: 100%;
- height: 100upx;
- box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
- .info-view {
- font-size: 26upx;
- }
- .btn-view {
- display: flex;
- .admin-button-com {
- margin: 0 10upx;
- }
- }
- }
- }
- </style>
|