| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <template>
- <view class="app-content">
- <view class="ex-page">
- <!-- <view class="top-bar"><DateSelect class="bar" top="0" @selectDateFn="selectDateFn" /></view> -->
- <view class="top-bar" style="margin-left:100upx;">今天</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-tr>
- <view v-for="(item, index) in profile" :key="index">
- <t-tr>
- <t-td><view>{{item.name}}</view></t-td>
- <t-td><view>{{item.num}}</view></t-td>
- <t-td><view>{{item.amount}}</view></t-td>
- <t-td>
- <view>
- <button class="admin-button-com middel blue" @click="getDetail(item)">明细</button>
- </view>
- </t-td>
- </t-tr>
- </view>
- </t-table>
- </block>
- </view>
- <view class="act-income"></view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import AppWrapperEmpty from "@/components/app-wrapper-empty";
- import SelectList from "@/components/plugin/selectList";
- import { getStatKdProfile } from "@/api/stat/index";
- import { list } from "@/mixins";
- import ShopSelect from "@/components/module/shopSelect";
- import DateSelect from "@/components/module/dateSelect";
- import {mapActions, mapGetters} from "vuex";
- export default {
- components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect},
- mixins: [list],
- computed: {
- ...mapGetters(["getDictionariesInfo","getLoginInfo"])
- },
- data() {
- return {
- isShow:false,
- customizationTime:'',
- menuTimeObj:'',
- menuShopObj:'',
- shopId:'',
- itemId:'',
- nowTime: "",
- showTimeDropdown: false,
- nowShop: "",
- showShopDropdown: false,
- dataList: [],
- params:{
- itemId: '',
- searchTime:'',
- startTime: "",
- endTime: "",
- shopId: "",
- },
- profile:[],
- income:0
- };
- },
- onPullDownRefresh() {
- this.resetList();
- this._list().then(res => {
- uni.stopPullDownRefresh();
- });
- },
- onLoad(e) {
- this.itemId = e.id;
- this.params.itemId = e.id;
- this.shopId = this.getLoginInfo.shopId;
- },
- methods: {
- getDetail(item){
- let str = ''
- if(item.class && !this.$util.isEmpty(item.class)){
- let cl = Object.values(item.class)
- cl.forEach((it,idx,arr) => {
- let num = it.num
- let name = it.name
- let amount = it.amount
- str += name+' '+num+'笔'+' ¥'+amount+', '
- })
- str += ' || '
- }
- if(item.category && !this.$util.isEmpty(item.category)){
- let cat = Object.values(item.category)
- cat.forEach((it,idx,arr) => {
- let num = it.num
- let name = it.name
- let amount = it.amount
- str += name+' '+num+'笔'+' ¥'+amount+', '
- })
- }
- this.$util.confirmModal({title:'明细',content:str},() => { })
- },
- ...mapActions(['setUserShopAll']),
- //选择分店
- selectShopFn(val){
- this.params.shopId = val.id;
- this.init();
- },
- //选择时间
- selectDateFn(val) {
- this.params = {...this.params,...val}
- this.init();
- },
- async init() {
- this._list();
- },
- _list() {
- let that = this
- uni.showLoading()
- getStatKdProfile(this.params).then(res => {
- uni.hideLoading()
- that.profile = res.data.list
- that.income = res.data.income
- });
- }
- }
- };
- </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;
- display: flex;
- width: 100%;
- top:20upx;
- z-index: 20;
- .bar{
- width: 50%;
- height: 100%;
- text-align: center;
- &:nth-child(1){
- border-right: 1upx solid #eeeeec;
- }
- }
- }
- .main-view {
- margin-top: 60upx;
- flex: 1;
- background-color: #f9fbfc;
- .space-view {
- background-color: #fff;
- }
- .act-income{
- margin-top:30upx;
- margin-bottom:30upx;
- font-size:25upx;
- color:rgb(92, 91, 91);
- text-align:center;
- font-weight:bold;
- }
- .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 {
- /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>
|