feat(custom): 新增商家订单管理筛选
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -63,3 +63,46 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pull-down {
|
||||
margin: 20px auto;
|
||||
.TriangleDownBox {
|
||||
transform: rotate(180deg);
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.TriangleUpBox {
|
||||
transform: rotate(0deg);
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.menu {
|
||||
|
||||
|
||||
.active {
|
||||
border-radius: 10px;
|
||||
background-color: #de1414;
|
||||
padding: 10px 20px;
|
||||
color: #fff;
|
||||
}
|
||||
.noActive {
|
||||
border-radius: 10px;
|
||||
padding: 10px 20px;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.MenuDownBox {
|
||||
margin-top: 5px;
|
||||
height: 0px;
|
||||
transition: height 0.5s ease;
|
||||
overflow: hidden;
|
||||
}
|
||||
.MenuUpBox {
|
||||
margin-top: 5px;
|
||||
height: 80px;
|
||||
transition: height 0.5s ease;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,27 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pull-down Card" style="background: none; padding: 0">
|
||||
<view
|
||||
class="mr-[5px] flex items-center justify-left"
|
||||
@click="IsTriangleDown = !IsTriangleDown"
|
||||
><text>数据筛选</text>
|
||||
<TriangleDown
|
||||
style="width: auto"
|
||||
:class="[!IsTriangleDown ? 'TriangleDownBox' : 'TriangleUpBox']" />
|
||||
</view>
|
||||
<view
|
||||
class="flex menu justify-between text-[28px]"
|
||||
:class="[!IsTriangleDown ? 'MenuDownBox' : 'MenuUpBox']">
|
||||
<view
|
||||
v-for="(item, index) in menus"
|
||||
:key="index"
|
||||
:class="[menuIndex === index ? 'active' : 'noActive']"
|
||||
@click="tabChange(index)"
|
||||
>{{ item.text }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Card">
|
||||
<view class="top"
|
||||
><text class="iconfont icon-shujutongji icon"></text
|
||||
@@ -97,6 +118,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {h, ref} from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {TriangleDown} from '@nutui/icons-vue-taro';
|
||||
import {orderStatistics} from '../../../api/admin';
|
||||
|
||||
Taro.useLoad(() => {
|
||||
@@ -105,6 +127,30 @@ Taro.useLoad(() => {
|
||||
|
||||
const orderInfo = ref<any>({});
|
||||
|
||||
const IsTriangleDown = ref(false);
|
||||
|
||||
const menuIndex = ref(0);
|
||||
|
||||
const menus = ref([
|
||||
{
|
||||
text: '微信支付',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
text: '平台积分',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
text: '小猪积分',
|
||||
value: 3,
|
||||
},
|
||||
]);
|
||||
|
||||
const tabChange = (value: number) => {
|
||||
menuIndex.value = value;
|
||||
getData();
|
||||
};
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '日期',
|
||||
@@ -138,6 +184,7 @@ const getData = async () => {
|
||||
const user_info = Taro.getStorageSync('userInfo');
|
||||
const res = await orderStatistics({
|
||||
bid: user_info.data.bid,
|
||||
pay_type: menus.value[menuIndex.value].value,
|
||||
});
|
||||
orderInfo.value = res.data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user