build(custom): 修正提交规范
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '订单详情'
|
||||
})
|
||||
navigationBarTitleText: "订单详情",
|
||||
});
|
||||
|
||||
@@ -1,122 +1,116 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="header">
|
||||
<view>订单号:{{ info.oid }}</view>
|
||||
<view>{{ info.add_time }}</view>
|
||||
</view>
|
||||
<view class="good-info">
|
||||
<view class="top">
|
||||
<image :src="info.BindGoods?.cover" />
|
||||
<view class="title">{{ info.BindGoods?.name }}</view>
|
||||
</view>
|
||||
|
||||
<view class="public-total">
|
||||
共{{ info.count }}件商品,已支付
|
||||
<text class="money">{{ info.number }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<nut-cell-group>
|
||||
<nut-cell title="订单状态:" :desc="orderStatus"></nut-cell>
|
||||
<nut-cell
|
||||
title="下单用户:"
|
||||
:desc="info.BindUser?.nickName"
|
||||
></nut-cell>
|
||||
<nut-cell
|
||||
title="用户手机号:"
|
||||
:desc="info.BindUser?.phone"
|
||||
></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人员:"
|
||||
:desc="info.BindCancelUser?.nickName"
|
||||
></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人手机号:"
|
||||
:desc="info.BindCancelUser?.phone"
|
||||
></nut-cell>
|
||||
</nut-cell-group>
|
||||
<view>
|
||||
<view class="header">
|
||||
<view>订单号:{{ info.oid }}</view>
|
||||
<view>{{ info.add_time }}</view>
|
||||
</view>
|
||||
<view class="good-info">
|
||||
<view class="top">
|
||||
<image :src="info.BindGoods?.cover" />
|
||||
<view class="title">{{ info.BindGoods?.name }}</view>
|
||||
</view>
|
||||
|
||||
<view class="public-total">
|
||||
共{{ info.count }}件商品,已支付
|
||||
<text class="money">{{ info.number }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<nut-cell-group>
|
||||
<nut-cell title="订单状态:" :desc="orderStatus"></nut-cell>
|
||||
<nut-cell title="下单用户:" :desc="info.BindUser?.nickName"></nut-cell>
|
||||
<nut-cell title="用户手机号:" :desc="info.BindUser?.phone"></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人员:"
|
||||
:desc="info.BindCancelUser?.nickName"
|
||||
></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人手机号:"
|
||||
:desc="info.BindCancelUser?.phone"
|
||||
></nut-cell>
|
||||
</nut-cell-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from "@tarojs/taro";
|
||||
import { ref, computed } from "vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const info = ref<any>({});
|
||||
|
||||
Taro.useLoad(() => {
|
||||
info.value = Taro.getStorageSync("ver_order_info");
|
||||
info.value = Taro.getStorageSync("ver_order_info");
|
||||
});
|
||||
|
||||
const orderStatus = computed(() => {
|
||||
switch (info.value.status) {
|
||||
case 1:
|
||||
return "待核销";
|
||||
case 2:
|
||||
return "已核销";
|
||||
case 3:
|
||||
return "已失效";
|
||||
}
|
||||
});
|
||||
const orderStatus = () => {
|
||||
switch (info.value.status) {
|
||||
case 1:
|
||||
return "待核销";
|
||||
case 2:
|
||||
return "已核销";
|
||||
case 3:
|
||||
return "已失效";
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
--nut-cell-desc-color: #000;
|
||||
--nut-cell-desc-color: #000;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(90deg, #2291f8 0, #1cd1dc);
|
||||
padding: 30px;
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
background: linear-gradient(90deg, #2291f8 0, #1cd1dc);
|
||||
padding: 30px;
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.good-info {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
image {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.price {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.public-total {
|
||||
font-size: 28px;
|
||||
color: #282828;
|
||||
border-top: 1px solid #eee;
|
||||
height: 92px;
|
||||
line-height: 92px;
|
||||
text-align: right;
|
||||
padding: 0 30px;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
image {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.price {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.public-total {
|
||||
font-size: 28px;
|
||||
color: #282828;
|
||||
border-top: 1px solid #eee;
|
||||
height: 92px;
|
||||
line-height: 92px;
|
||||
text-align: right;
|
||||
padding: 0 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.public-total .money {
|
||||
color: #ff4c3c;
|
||||
}
|
||||
.public-total .money {
|
||||
color: #ff4c3c;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '订单管理'
|
||||
})
|
||||
|
||||
navigationBarTitleText: "订单管理",
|
||||
});
|
||||
|
||||
@@ -1,114 +1,104 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="Card">
|
||||
<view>全部订单</view>
|
||||
<view class="orderinfo">
|
||||
<view class="info" @click="toListPage(0)">
|
||||
<view class="num">{{ orderInfo?.count?.A || 0 }}</view>
|
||||
<view class="sub">全部</view>
|
||||
</view>
|
||||
<view class="info" @click="toListPage(1)">
|
||||
<view class="num">{{ orderInfo?.count?.B || 0 }}</view>
|
||||
<view class="sub">待付款</view>
|
||||
</view>
|
||||
<view class="info" @click="toListPage(2)">
|
||||
<view class="num">{{ orderInfo?.count?.C || 0 }}</view>
|
||||
<view class="sub">待核销</view>
|
||||
</view>
|
||||
<view class="info" @click="toListPage(3)">
|
||||
<view class="num">{{ orderInfo?.count?.D || 0 }}</view>
|
||||
<view class="sub">已核销</view>
|
||||
</view>
|
||||
<view class="info" @click="toListPage(4)">
|
||||
<view class="num">{{ orderInfo?.count?.F || 0 }}</view>
|
||||
<view class="sub">已过期</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="Card">
|
||||
<view>全部订单</view>
|
||||
<view class="orderinfo">
|
||||
<view class="info" @click="toListPage(0)">
|
||||
<view class="num">{{ orderInfo?.count?.A || 0 }}</view>
|
||||
<view class="sub">全部</view>
|
||||
</view>
|
||||
<view class="Card">
|
||||
<view class="top"
|
||||
><text class="iconfont icon-shujutongji icon"></text
|
||||
><text>数据统计</text></view
|
||||
>
|
||||
<view class="gridBox">
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=price&time=today`"
|
||||
>
|
||||
<view class="title">{{
|
||||
orderInfo?.total?.TodayNumber || 0
|
||||
}}</view>
|
||||
<view class="sub">今日成交额</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=price&time=yesterday`"
|
||||
>
|
||||
<view class="title">{{
|
||||
orderInfo?.total?.YesterdayNumber || 0
|
||||
}}</view>
|
||||
<view class="sub">昨日成交额</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=price&time=month`"
|
||||
>
|
||||
<view class="title">{{
|
||||
orderInfo?.total?.MonthNumber || 0
|
||||
}}</view>
|
||||
<view class="sub">本月成交额</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=order&time=today`"
|
||||
>
|
||||
<view class="title">{{
|
||||
orderInfo?.total?.TodayOrder || 0
|
||||
}}</view>
|
||||
<view class="sub">今日订单数</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=order&time=yesterday`"
|
||||
>
|
||||
<view class="title">{{
|
||||
orderInfo?.total?.YesterdayOrder || 0
|
||||
}}</view>
|
||||
<view class="sub">昨日订单数</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=order&time=month`"
|
||||
>
|
||||
<view class="title">{{
|
||||
orderInfo?.total?.MonthOrder || 0
|
||||
}}</view>
|
||||
<view class="sub">本月订单数</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="info" @click="toListPage(1)">
|
||||
<view class="num">{{ orderInfo?.count?.B || 0 }}</view>
|
||||
<view class="sub">待付款</view>
|
||||
</view>
|
||||
<view class="Card">
|
||||
<view class="top"
|
||||
><text class="iconfont icon-xiangxishuju icon"></text
|
||||
><text>详细数据</text></view
|
||||
>
|
||||
<view v-if="orderInfo?.list?.length > 0">
|
||||
<nut-table
|
||||
:bordered="true"
|
||||
class="table"
|
||||
:columns="columns"
|
||||
:data="orderInfo?.list"
|
||||
></nut-table>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单数据"></nut-empty>
|
||||
<view class="info" @click="toListPage(2)">
|
||||
<view class="num">{{ orderInfo?.count?.C || 0 }}</view>
|
||||
<view class="sub">待核销</view>
|
||||
</view>
|
||||
<view class="info" @click="toListPage(3)">
|
||||
<view class="num">{{ orderInfo?.count?.D || 0 }}</view>
|
||||
<view class="sub">已核销</view>
|
||||
</view>
|
||||
<view class="info" @click="toListPage(4)">
|
||||
<view class="num">{{ orderInfo?.count?.F || 0 }}</view>
|
||||
<view class="sub">已过期</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Card">
|
||||
<view class="top"
|
||||
><text class="iconfont icon-shujutongji icon"></text
|
||||
><text>数据统计</text></view
|
||||
>
|
||||
<view class="gridBox">
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=price&time=today`"
|
||||
>
|
||||
<view class="title">{{ orderInfo?.total?.TodayNumber || 0 }}</view>
|
||||
<view class="sub">今日成交额</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=price&time=yesterday`"
|
||||
>
|
||||
<view class="title">{{
|
||||
orderInfo?.total?.YesterdayNumber || 0
|
||||
}}</view>
|
||||
<view class="sub">昨日成交额</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=price&time=month`"
|
||||
>
|
||||
<view class="title">{{ orderInfo?.total?.MonthNumber || 0 }}</view>
|
||||
<view class="sub">本月成交额</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=order&time=today`"
|
||||
>
|
||||
<view class="title">{{ orderInfo?.total?.TodayOrder || 0 }}</view>
|
||||
<view class="sub">今日订单数</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=order&time=yesterday`"
|
||||
>
|
||||
<view class="title">{{ orderInfo?.total?.YesterdayOrder || 0 }}</view>
|
||||
<view class="sub">昨日订单数</view>
|
||||
</navigator>
|
||||
<navigator
|
||||
class="item"
|
||||
hover-class="none"
|
||||
:url="`/pages/admin/statistics/index?type=order&time=month`"
|
||||
>
|
||||
<view class="title">{{ orderInfo?.total?.MonthOrder || 0 }}</view>
|
||||
<view class="sub">本月订单数</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Card">
|
||||
<view class="top"
|
||||
><text class="iconfont icon-xiangxishuju icon"></text
|
||||
><text>详细数据</text></view
|
||||
>
|
||||
<view v-if="orderInfo?.list?.length > 0">
|
||||
<nut-table
|
||||
:bordered="true"
|
||||
class="table"
|
||||
:columns="columns"
|
||||
:data="orderInfo?.list"
|
||||
></nut-table>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单数据"></nut-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@@ -117,121 +107,121 @@ import Taro from "@tarojs/taro";
|
||||
import { orderStatistics } from "../../../api/admin";
|
||||
|
||||
Taro.useLoad(() => {
|
||||
getData();
|
||||
getData();
|
||||
});
|
||||
|
||||
const orderInfo = ref<any>({});
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: "日期",
|
||||
key: "Date",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "订单数",
|
||||
key: "TotalCount",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "交易额",
|
||||
key: "NumberSum",
|
||||
align: "center",
|
||||
render: (row) => {
|
||||
return h(
|
||||
"view",
|
||||
{
|
||||
style: {
|
||||
color: "red",
|
||||
},
|
||||
},
|
||||
row.NumberSum
|
||||
);
|
||||
{
|
||||
title: "日期",
|
||||
key: "Date",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "订单数",
|
||||
key: "TotalCount",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "交易额",
|
||||
key: "NumberSum",
|
||||
align: "center",
|
||||
render: (row) => {
|
||||
return h(
|
||||
"view",
|
||||
{
|
||||
style: {
|
||||
color: "red",
|
||||
},
|
||||
},
|
||||
row.NumberSum
|
||||
);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const getData = async () => {
|
||||
const mer_type = Taro.getStorageSync("mer_type");
|
||||
const user_info = Taro.getStorageSync("userInfo");
|
||||
const res = await orderStatistics({
|
||||
bid: user_info.bid,
|
||||
type: mer_type,
|
||||
});
|
||||
orderInfo.value = res.data;
|
||||
const mer_type = Taro.getStorageSync("mer_type");
|
||||
const user_info = Taro.getStorageSync("userInfo");
|
||||
const res = await orderStatistics({
|
||||
bid: user_info.bid,
|
||||
type: mer_type,
|
||||
});
|
||||
orderInfo.value = res.data;
|
||||
};
|
||||
|
||||
const toListPage = (index: number) => {
|
||||
Taro.navigateTo({
|
||||
url: `/pages/admin/order_manage/list/index?type=${index}`,
|
||||
});
|
||||
Taro.navigateTo({
|
||||
url: `/pages/admin/order_manage/list/index?type=${index}`,
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.Card {
|
||||
width: 90%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 10px auto;
|
||||
padding: 25px;
|
||||
width: 90%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 10px auto;
|
||||
padding: 25px;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.gridBox {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 33.33%);
|
||||
grid-template-rows: repeat(3, 33.33%);
|
||||
grid-gap: 10px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 33.33%);
|
||||
grid-template-rows: repeat(3, 33.33%);
|
||||
grid-gap: 10px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
|
||||
.item {
|
||||
margin-top: 50px;
|
||||
.title {
|
||||
font-size: 50px;
|
||||
}
|
||||
.sub {
|
||||
font-size: 25px;
|
||||
color: #999;
|
||||
}
|
||||
.item {
|
||||
margin-top: 50px;
|
||||
.title {
|
||||
font-size: 50px;
|
||||
}
|
||||
.sub {
|
||||
font-size: 25px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.orderinfo {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
.info {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
.info {
|
||||
text-align: center;
|
||||
|
||||
.num {
|
||||
font-size: 40px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.sub {
|
||||
font-size: 25px;
|
||||
color: #999;
|
||||
}
|
||||
.num {
|
||||
font-size: 40px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.sub {
|
||||
font-size: 25px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '订单列表'
|
||||
})
|
||||
|
||||
navigationBarTitleText: "订单列表",
|
||||
});
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tabs">
|
||||
<view
|
||||
class="item"
|
||||
v-for="item in opt"
|
||||
:key="item.value"
|
||||
@click="tabChange(item.value)"
|
||||
>
|
||||
<view class="title">{{ item.text }}</view>
|
||||
<view
|
||||
class="line"
|
||||
:style="{
|
||||
backgroundColor: item.value === tabVal ? 'red' : '',
|
||||
}"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="dataList.length > 0">
|
||||
<view
|
||||
class="order-card"
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
@click="toDetailPage(item)"
|
||||
>
|
||||
<view class="top">
|
||||
<view class="name">订单号:{{ item.oid }}</view>
|
||||
<!-- <view class="sub">下单时间:{{ item.add_time }}</view> -->
|
||||
<view class="sub"
|
||||
>核销时间:{{ item.cancel_time || "待核销" }}</view
|
||||
>
|
||||
<!-- <view style="color: red">{{
|
||||
<view>
|
||||
<view class="tabs">
|
||||
<view
|
||||
class="item"
|
||||
v-for="item in opt"
|
||||
:key="item.value"
|
||||
@click="tabChange(item.value)"
|
||||
>
|
||||
<view class="title">{{ item.text }}</view>
|
||||
<view
|
||||
class="line"
|
||||
:style="{
|
||||
backgroundColor: item.value === tabVal ? 'red' : '',
|
||||
}"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="dataList.length > 0">
|
||||
<view
|
||||
class="order-card"
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
@click="toDetailPage(item)"
|
||||
>
|
||||
<view class="top">
|
||||
<view class="name">订单号:{{ item.oid }}</view>
|
||||
<!-- <view class="sub">下单时间:{{ item.add_time }}</view> -->
|
||||
<view class="sub">核销时间:{{ item.cancel_time || "待核销" }}</view>
|
||||
<!-- <view style="color: red">{{
|
||||
item.status === 0
|
||||
? "待付款"
|
||||
: item.status === 1
|
||||
@@ -38,30 +36,30 @@
|
||||
? "已使用"
|
||||
: "已失效"
|
||||
}}</view> -->
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="center">
|
||||
<view class="top">
|
||||
<image :src="item.BindGoods.cover" />
|
||||
<view class="title">{{ item.BindGoods.name }} </view>
|
||||
<view class="right">
|
||||
<view>{{ item.number }}</view>
|
||||
<view>x{{ item.count }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="center">
|
||||
<view class="top">
|
||||
<image :src="item.BindGoods.cover" />
|
||||
<view class="title">{{ item.BindGoods.name }} </view>
|
||||
<view class="right">
|
||||
<view>{{ item.number }}</view>
|
||||
<view>x{{ item.count }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view
|
||||
class="bom"
|
||||
style="text-align: right; font-size: 13px"
|
||||
>
|
||||
共{{ item.count }}件商品,实付积分:
|
||||
<text style="color: red">{{ item.number }}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单数据"></nut-empty>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单数据"></nut-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -70,26 +68,26 @@ import Taro from "@tarojs/taro";
|
||||
import { getJfOrderList, getActiveOrderList } from "../../../../api/admin";
|
||||
|
||||
const opt = ref([
|
||||
{
|
||||
text: "全部",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
text: "待付款",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
text: "待核销",
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
text: "已核销",
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
text: "已失效",
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
text: "全部",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
text: "待付款",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
text: "待核销",
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
text: "已核销",
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
text: "已失效",
|
||||
value: 4,
|
||||
},
|
||||
]);
|
||||
|
||||
const tabVal = ref(0);
|
||||
@@ -97,129 +95,129 @@ const tabVal = ref(0);
|
||||
const dataList = ref<any>([]);
|
||||
|
||||
Taro.useLoad((options) => {
|
||||
tabVal.value = Number(options.type);
|
||||
getData();
|
||||
tabVal.value = Number(options.type);
|
||||
getData();
|
||||
});
|
||||
|
||||
const getData = async () => {
|
||||
try {
|
||||
const mer_type = Taro.getStorageSync("mer_type");
|
||||
const user_info = Taro.getStorageSync("userInfo");
|
||||
let res: any = null;
|
||||
const data = {
|
||||
bid: user_info.bid,
|
||||
status: tabVal.value,
|
||||
};
|
||||
if (mer_type === 1) {
|
||||
res = await getActiveOrderList(data);
|
||||
} else {
|
||||
res = await getJfOrderList(data);
|
||||
}
|
||||
dataList.value = res.data.data;
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
try {
|
||||
const mer_type = Taro.getStorageSync("mer_type");
|
||||
const user_info = Taro.getStorageSync("userInfo");
|
||||
let res: any = null;
|
||||
const data = {
|
||||
bid: user_info.bid,
|
||||
status: tabVal.value,
|
||||
};
|
||||
if (mer_type === 1) {
|
||||
res = await getActiveOrderList(data);
|
||||
} else {
|
||||
res = await getJfOrderList(data);
|
||||
}
|
||||
dataList.value = res.data.data;
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const tabChange = (e: number) => {
|
||||
tabVal.value = e;
|
||||
getData();
|
||||
tabVal.value = e;
|
||||
getData();
|
||||
};
|
||||
|
||||
const toDetailPage = (item: any) => {
|
||||
Taro.setStorageSync("ver_order_info", item);
|
||||
Taro.navigateTo({
|
||||
url: "/pages/admin/order_manage/detail/index",
|
||||
});
|
||||
Taro.setStorageSync("ver_order_info", item);
|
||||
Taro.navigateTo({
|
||||
url: "/pages/admin/order_manage/detail/index",
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.tabs {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.line {
|
||||
margin-top: 10px;
|
||||
width: 50px;
|
||||
height: 5px;
|
||||
}
|
||||
.line {
|
||||
margin-top: 10px;
|
||||
width: 50px;
|
||||
height: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-card {
|
||||
width: 95%;
|
||||
box-sizing: border-box;
|
||||
margin: 15px auto;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
width: 95%;
|
||||
box-sizing: border-box;
|
||||
margin: 15px auto;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 10px;
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.top {
|
||||
// display: flex;
|
||||
// justify-content: space-between;
|
||||
// align-items: center;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sub {
|
||||
color: #999;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
.top {
|
||||
// display: flex;
|
||||
// justify-content: space-between;
|
||||
// align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// align-items: flex-start;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
}
|
||||
image {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.sub {
|
||||
color: #999;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// align-items: flex-start;
|
||||
|
||||
image {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
font-size: 28px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
font-size: 28px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: "订单数据统计",
|
||||
navigationBarTitleText: "订单数据统计",
|
||||
});
|
||||
|
||||
@@ -1,121 +1,117 @@
|
||||
<template>
|
||||
<view class="statistical-page" ref="container">
|
||||
<view class="navs">
|
||||
<view class="list">
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'today' ? 'on' : ''"
|
||||
@click="setTime('today')"
|
||||
>
|
||||
今天
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'yesterday' ? 'on' : ''"
|
||||
@click="setTime('yesterday')"
|
||||
>
|
||||
昨天
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'seven' ? 'on' : ''"
|
||||
@click="setTime('seven')"
|
||||
>
|
||||
最近7天
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'month' ? 'on' : ''"
|
||||
@click="setTime('month')"
|
||||
>
|
||||
本月
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'date' ? 'on' : ''"
|
||||
@click="dateTitle"
|
||||
>
|
||||
自定义
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="title">
|
||||
{{ title }}{{ where.type == 1 ? "营业额" : "订单量" }}
|
||||
</view>
|
||||
<view v-if="where.type == 1" class="money">{{
|
||||
dataObj.all || 0
|
||||
}}</view>
|
||||
<view v-else class="money">{{ dataObj.all || 0 }}</view>
|
||||
<view class="increase">
|
||||
<view>
|
||||
{{ time === "date" ? "" : title }}增长率:<text
|
||||
:class="dataObj.growthRate >= 0 ? 'red' : 'green'"
|
||||
>
|
||||
{{ dataObj.growthRate }}%
|
||||
<text
|
||||
class="iconfont"
|
||||
:class="
|
||||
dataObj.growthRate >= 0
|
||||
? 'icon-xiangshang1'
|
||||
: 'icon-xiangxia2'
|
||||
"
|
||||
></text
|
||||
></text>
|
||||
</view>
|
||||
<view>
|
||||
{{ time === "date" ? "" : title }}增长:<text
|
||||
:class="dataObj.growthNumber >= 0 ? 'red' : 'green'"
|
||||
>{{ dataObj.growthNumber }}
|
||||
<text
|
||||
class="iconfont"
|
||||
:class="
|
||||
dataObj.growthNumber >= 0
|
||||
? 'icon-xiangshang1'
|
||||
: 'icon-xiangxia2'
|
||||
"
|
||||
></text
|
||||
></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chart">
|
||||
<canvas
|
||||
canvas-id="myChart"
|
||||
style="width: 100%; height: 250px"
|
||||
:ontouch="true"
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="touchEnd"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="Card">
|
||||
<view class="top"
|
||||
><text class="iconfont icon-xiangxishuju icon"></text
|
||||
><text>详细数据</text></view
|
||||
>
|
||||
<view v-if="dataObj?.list?.length > 0">
|
||||
<nut-table
|
||||
:bordered="true"
|
||||
class="table"
|
||||
:columns="columns"
|
||||
:data="dataObj?.list"
|
||||
></nut-table>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单数据"></nut-empty>
|
||||
</view>
|
||||
|
||||
<!-- 日期选择 -->
|
||||
<nut-calendar
|
||||
v-model:visible="isVisible"
|
||||
type="range"
|
||||
:start-date="date_start"
|
||||
@close="isVisible = false"
|
||||
@choose="setChooseValue"
|
||||
<view class="statistical-page" ref="container">
|
||||
<view class="navs">
|
||||
<view class="list">
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'today' ? 'on' : ''"
|
||||
@click="setTime('today')"
|
||||
>
|
||||
</nut-calendar>
|
||||
今天
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'yesterday' ? 'on' : ''"
|
||||
@click="setTime('yesterday')"
|
||||
>
|
||||
昨天
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'seven' ? 'on' : ''"
|
||||
@click="setTime('seven')"
|
||||
>
|
||||
最近7天
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'month' ? 'on' : ''"
|
||||
@click="setTime('month')"
|
||||
>
|
||||
本月
|
||||
</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="time == 'date' ? 'on' : ''"
|
||||
@click="dateTitle"
|
||||
>
|
||||
自定义
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="title">
|
||||
{{ title }}{{ where.type == 1 ? "营业额" : "订单量" }}
|
||||
</view>
|
||||
<view v-if="where.type == 1" class="money">{{ dataObj.all || 0 }}</view>
|
||||
<view v-else class="money">{{ dataObj.all || 0 }}</view>
|
||||
<view class="increase">
|
||||
<view>
|
||||
{{ time === "date" ? "" : title }}增长率:<text
|
||||
:class="dataObj.growthRate >= 0 ? 'red' : 'green'"
|
||||
>
|
||||
{{ dataObj.growthRate }}%
|
||||
<text
|
||||
class="iconfont"
|
||||
:class="
|
||||
dataObj.growthRate >= 0 ? 'icon-xiangshang1' : 'icon-xiangxia2'
|
||||
"
|
||||
></text
|
||||
></text>
|
||||
</view>
|
||||
<view>
|
||||
{{ time === "date" ? "" : title }}增长:<text
|
||||
:class="dataObj.growthNumber >= 0 ? 'red' : 'green'"
|
||||
>{{ dataObj.growthNumber }}
|
||||
<text
|
||||
class="iconfont"
|
||||
:class="
|
||||
dataObj.growthNumber >= 0
|
||||
? 'icon-xiangshang1'
|
||||
: 'icon-xiangxia2'
|
||||
"
|
||||
></text
|
||||
></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chart">
|
||||
<canvas
|
||||
canvas-id="myChart"
|
||||
style="width: 100%; height: 250px"
|
||||
:ontouch="true"
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="touchEnd"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="Card">
|
||||
<view class="top"
|
||||
><text class="iconfont icon-xiangxishuju icon"></text
|
||||
><text>详细数据</text></view
|
||||
>
|
||||
<view v-if="dataObj?.list?.length > 0">
|
||||
<nut-table
|
||||
:bordered="true"
|
||||
class="table"
|
||||
:columns="columns"
|
||||
:data="dataObj?.list"
|
||||
></nut-table>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单数据"></nut-empty>
|
||||
</view>
|
||||
|
||||
<!-- 日期选择 -->
|
||||
<nut-calendar
|
||||
v-model:visible="isVisible"
|
||||
type="range"
|
||||
:start-date="date_start"
|
||||
@close="isVisible = false"
|
||||
@choose="setChooseValue"
|
||||
>
|
||||
</nut-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -134,321 +130,321 @@ let canvas_obj;
|
||||
const w = Taro.getSystemInfoSync().windowWidth;
|
||||
|
||||
const chartWH = ref({
|
||||
width: w * 0.9,
|
||||
height: 250,
|
||||
pixelRatio: 1,
|
||||
width: w * 0.9,
|
||||
height: 250,
|
||||
pixelRatio: 1,
|
||||
});
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: "日期",
|
||||
key: "Date",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "订单数",
|
||||
key: "TotalCount",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "交易额",
|
||||
key: "NumberSum",
|
||||
align: "center",
|
||||
render: (row) => {
|
||||
return h(
|
||||
"view",
|
||||
{
|
||||
style: {
|
||||
color: "red",
|
||||
},
|
||||
},
|
||||
row.NumberSum
|
||||
);
|
||||
{
|
||||
title: "日期",
|
||||
key: "Date",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "订单数",
|
||||
key: "TotalCount",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "交易额",
|
||||
key: "NumberSum",
|
||||
align: "center",
|
||||
render: (row) => {
|
||||
return h(
|
||||
"view",
|
||||
{
|
||||
style: {
|
||||
color: "red",
|
||||
},
|
||||
},
|
||||
row.NumberSum
|
||||
);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const date_start = computed(() => {
|
||||
return dayjs().startOf("year").format("YYYY-MM-DD");
|
||||
return dayjs().startOf("year").format("YYYY-MM-DD");
|
||||
});
|
||||
|
||||
const title = ref("");
|
||||
|
||||
const where = ref({
|
||||
type: 1,
|
||||
status: 2,
|
||||
start: "",
|
||||
end: "",
|
||||
type: 1,
|
||||
status: 2,
|
||||
start: "",
|
||||
end: "",
|
||||
});
|
||||
|
||||
const dataObj = ref<any>({});
|
||||
|
||||
const opts = ref<any>({
|
||||
categories: [],
|
||||
series: [
|
||||
{
|
||||
name: "营业额",
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "订单量",
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
categories: [],
|
||||
series: [
|
||||
{
|
||||
name: "营业额",
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "订单量",
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Taro.useLoad((options) => {
|
||||
where.value.type = options.type === "price" ? 1 : 2;
|
||||
time.value = options.time;
|
||||
setTime(options.time);
|
||||
// getData();
|
||||
where.value.type = options.type === "price" ? 1 : 2;
|
||||
time.value = options.time;
|
||||
setTime(options.time);
|
||||
// getData();
|
||||
});
|
||||
|
||||
const setTime = (type: string) => {
|
||||
time.value = type;
|
||||
switch (type) {
|
||||
case "today":
|
||||
title.value = "今日";
|
||||
where.value.status = 2;
|
||||
where.value.start = dayjs().format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().format("YYYY-MM-DD");
|
||||
break;
|
||||
case "yesterday":
|
||||
title.value = "昨日";
|
||||
where.value.status = 2;
|
||||
where.value.start = dayjs().add(-1, "day").format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().add(-1, "day").format("YYYY-MM-DD");
|
||||
break;
|
||||
case "seven":
|
||||
title.value = "7天";
|
||||
where.value.status = 2;
|
||||
where.value.start = dayjs().add(-6, "day").format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().format("YYYY-MM-DD");
|
||||
break;
|
||||
case "month":
|
||||
title.value = "本月";
|
||||
where.value.status = 1;
|
||||
where.value.start = dayjs().startOf("month").format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().format("YYYY-MM-DD");
|
||||
break;
|
||||
}
|
||||
getData();
|
||||
time.value = type;
|
||||
switch (type) {
|
||||
case "today":
|
||||
title.value = "今日";
|
||||
where.value.status = 2;
|
||||
where.value.start = dayjs().format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().format("YYYY-MM-DD");
|
||||
break;
|
||||
case "yesterday":
|
||||
title.value = "昨日";
|
||||
where.value.status = 2;
|
||||
where.value.start = dayjs().add(-1, "day").format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().add(-1, "day").format("YYYY-MM-DD");
|
||||
break;
|
||||
case "seven":
|
||||
title.value = "7天";
|
||||
where.value.status = 2;
|
||||
where.value.start = dayjs().add(-6, "day").format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().format("YYYY-MM-DD");
|
||||
break;
|
||||
case "month":
|
||||
title.value = "本月";
|
||||
where.value.status = 1;
|
||||
where.value.start = dayjs().startOf("month").format("YYYY-MM-DD");
|
||||
where.value.end = dayjs().format("YYYY-MM-DD");
|
||||
break;
|
||||
}
|
||||
getData();
|
||||
};
|
||||
|
||||
const dateTitle = () => {
|
||||
where.value.status = 1;
|
||||
time.value = "date";
|
||||
isVisible.value = true;
|
||||
where.value.status = 1;
|
||||
time.value = "date";
|
||||
isVisible.value = true;
|
||||
};
|
||||
|
||||
const setChooseValue = (ref: any) => {
|
||||
where.value.start = ref[0][3];
|
||||
where.value.end = ref[1][3];
|
||||
title.value = `${where.value.start}-${where.value.end}`;
|
||||
getData();
|
||||
where.value.start = ref[0][3];
|
||||
where.value.end = ref[1][3];
|
||||
title.value = `${where.value.start}-${where.value.end}`;
|
||||
getData();
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
try {
|
||||
const mer_type = Taro.getStorageSync("mer_type");
|
||||
const user_info = Taro.getStorageSync("userInfo");
|
||||
const res = await growthRate({
|
||||
bid: user_info.bid,
|
||||
type: mer_type,
|
||||
status: where.value.status,
|
||||
StartTime: where.value.start,
|
||||
EndTime: where.value.end,
|
||||
});
|
||||
dataObj.value = res.data;
|
||||
opts.value.categories = [];
|
||||
opts.value.series[0].data = [];
|
||||
opts.value.series[1].data = [];
|
||||
res.data.list.forEach((item: any) => {
|
||||
opts.value.categories.push(item.Date);
|
||||
opts.value.series[0].data.push(item.NumberSum);
|
||||
opts.value.series[1].data.push(item.TotalCount);
|
||||
});
|
||||
create_canvas();
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
const mer_type = Taro.getStorageSync("mer_type");
|
||||
const user_info = Taro.getStorageSync("userInfo");
|
||||
const res = await growthRate({
|
||||
bid: user_info.bid,
|
||||
type: mer_type,
|
||||
status: where.value.status,
|
||||
StartTime: where.value.start,
|
||||
EndTime: where.value.end,
|
||||
});
|
||||
dataObj.value = res.data;
|
||||
opts.value.categories = [];
|
||||
opts.value.series[0].data = [];
|
||||
opts.value.series[1].data = [];
|
||||
res.data.list.forEach((item: any) => {
|
||||
opts.value.categories.push(item.Date);
|
||||
opts.value.series[0].data.push(item.NumberSum);
|
||||
opts.value.series[1].data.push(item.TotalCount);
|
||||
});
|
||||
create_canvas();
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
const create_canvas = () => {
|
||||
const ctx = Taro.createCanvasContext("myChart");
|
||||
canvas_obj = new uCharts({
|
||||
type: "column",
|
||||
context: ctx,
|
||||
width: chartWH.value.width,
|
||||
height: chartWH.value.height,
|
||||
categories: opts.value.categories,
|
||||
series: opts.value.series,
|
||||
pixelRatio: chartWH.value.pixelRatio,
|
||||
animation: true,
|
||||
background: "#FFFFFF",
|
||||
color: [
|
||||
"#1890FF",
|
||||
"#91CB74",
|
||||
"#FAC858",
|
||||
"#EE6666",
|
||||
"#73C0DE",
|
||||
"#3CA272",
|
||||
"#FC8452",
|
||||
"#9A60B4",
|
||||
"#ea7ccc",
|
||||
],
|
||||
padding: [15, 15, 0, 15],
|
||||
enableScroll: true,
|
||||
legend: {},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
scrollShow: true,
|
||||
itemCount: 3,
|
||||
const ctx = Taro.createCanvasContext("myChart");
|
||||
canvas_obj = new uCharts({
|
||||
type: "column",
|
||||
context: ctx,
|
||||
width: chartWH.value.width,
|
||||
height: chartWH.value.height,
|
||||
categories: opts.value.categories,
|
||||
series: opts.value.series,
|
||||
pixelRatio: chartWH.value.pixelRatio,
|
||||
animation: true,
|
||||
background: "#FFFFFF",
|
||||
color: [
|
||||
"#1890FF",
|
||||
"#91CB74",
|
||||
"#FAC858",
|
||||
"#EE6666",
|
||||
"#73C0DE",
|
||||
"#3CA272",
|
||||
"#FC8452",
|
||||
"#9A60B4",
|
||||
"#ea7ccc",
|
||||
],
|
||||
padding: [15, 15, 0, 15],
|
||||
enableScroll: true,
|
||||
legend: {},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
scrollShow: true,
|
||||
itemCount: 3,
|
||||
},
|
||||
yAxis: {
|
||||
data: [
|
||||
{
|
||||
min: 0,
|
||||
},
|
||||
yAxis: {
|
||||
data: [
|
||||
{
|
||||
min: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
extra: {
|
||||
column: {
|
||||
type: "group",
|
||||
width: 20,
|
||||
activeBgColor: "#000000",
|
||||
activeBgOpacity: 0.08,
|
||||
},
|
||||
},
|
||||
});
|
||||
],
|
||||
},
|
||||
extra: {
|
||||
column: {
|
||||
type: "group",
|
||||
width: 20,
|
||||
activeBgColor: "#000000",
|
||||
activeBgOpacity: 0.08,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const touchStart = (e: any) => {
|
||||
canvas_obj.showToolTip(e, {
|
||||
format: function (item: any, category: any) {
|
||||
return category + " " + item.name + ":" + item.data;
|
||||
},
|
||||
});
|
||||
canvas_obj.scrollStart(e);
|
||||
canvas_obj.showToolTip(e, {
|
||||
format: function (item: any, category: any) {
|
||||
return category + " " + item.name + ":" + item.data;
|
||||
},
|
||||
});
|
||||
canvas_obj.scrollStart(e);
|
||||
};
|
||||
|
||||
const touchMove = (e: any) => {
|
||||
canvas_obj.scroll(e);
|
||||
canvas_obj.scroll(e);
|
||||
};
|
||||
|
||||
const touchEnd = (e: any) => {
|
||||
canvas_obj.scrollEnd(e);
|
||||
canvas_obj.scrollEnd(e);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.statistical-page {
|
||||
.navs {
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
line-height: 96px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
.navs {
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
line-height: 96px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
|
||||
.list {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
width: 100%;
|
||||
.list {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
width: 100%;
|
||||
|
||||
.item {
|
||||
font-size: 32px;
|
||||
color: #282828;
|
||||
margin-left: 60px;
|
||||
display: inline-block;
|
||||
}
|
||||
.item {
|
||||
font-size: 32px;
|
||||
color: #282828;
|
||||
margin-left: 60px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.on {
|
||||
color: #fa2c19;
|
||||
}
|
||||
}
|
||||
.on {
|
||||
color: #fa2c19;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 95%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 119px auto 0 auto;
|
||||
padding: 50px 60px;
|
||||
|
||||
.title {
|
||||
font-size: 30px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 95%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 119px auto 0 auto;
|
||||
padding: 50px 60px;
|
||||
|
||||
.title {
|
||||
font-size: 30px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.money {
|
||||
font-size: 72px;
|
||||
color: #fba02a;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.increase {
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.red {
|
||||
color: #ff6969;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #1abb1d;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 23px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
.money {
|
||||
font-size: 72px;
|
||||
color: #fba02a;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chart {
|
||||
width: 95%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 23px auto;
|
||||
padding: 10px;
|
||||
.increase {
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.red {
|
||||
color: #ff6969;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #1abb1d;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 23px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Card {
|
||||
width: 95%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 10px auto;
|
||||
padding: 25px;
|
||||
.chart {
|
||||
width: 95%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 23px auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.Card {
|
||||
width: 95%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin: 10px auto;
|
||||
padding: 25px;
|
||||
|
||||
.iconfont {
|
||||
color: #fa2c19;
|
||||
}
|
||||
}
|
||||
.table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #fa2c19;
|
||||
}
|
||||
}
|
||||
.table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: "订单核销",
|
||||
navigationBarTitleText: "订单核销",
|
||||
});
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="card">
|
||||
<nut-button block type="primary" @click="scanCode"
|
||||
>扫码核销</nut-button
|
||||
>
|
||||
</view>
|
||||
<view>
|
||||
<view class="card">
|
||||
<nut-button block type="primary" @click="scanCode">扫码核销</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -28,44 +26,44 @@ import Taro from "@tarojs/taro";
|
||||
// };
|
||||
|
||||
const scanCode = () => {
|
||||
Taro.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ["qrCode"],
|
||||
success: async (res) => {
|
||||
try {
|
||||
const mer_type = JSON.parse(Taro.getStorageSync("mer_type"));
|
||||
Taro.navigateTo({
|
||||
url: `/pages/admin/verify/verify_list/index?oid=${res.result}&mer_type=${mer_type}`,
|
||||
});
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
Taro.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ["qrCode"],
|
||||
success: async (res) => {
|
||||
try {
|
||||
const mer_type = JSON.parse(Taro.getStorageSync("mer_type"));
|
||||
Taro.navigateTo({
|
||||
url: `/pages/admin/verify/verify_list/index?oid=${res.result}&mer_type=${mer_type}`,
|
||||
});
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #f5f5f5;
|
||||
background-image: url("~@/static/admin/cancellation-header.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 30%;
|
||||
background-color: #f5f5f5;
|
||||
background-image: url("~@/static/admin/cancellation-header.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 30%;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 80%;
|
||||
height: 300px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
margin: 300px auto;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 100px;
|
||||
width: 80%;
|
||||
height: 300px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
margin: 300px auto;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: "核销列表",
|
||||
});
|
||||
navigationBarTitleText: "核销列表",
|
||||
});
|
||||
|
||||
@@ -1,146 +1,139 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="card">
|
||||
<view>订单号:{{ goodInfo.oid }}</view>
|
||||
<view class="line"></view>
|
||||
<view class="container">
|
||||
<image
|
||||
class="image"
|
||||
:src="goodInfo.cover"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<view class="info">
|
||||
<view class="title">{{ goodInfo.goods_name }}</view>
|
||||
<view class="num"
|
||||
>数量:
|
||||
<text style="color: red">{{
|
||||
goodInfo.count
|
||||
}}</text></view
|
||||
>
|
||||
</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="cz">
|
||||
<nut-button size="small" type="primary" @click="subVerify"
|
||||
>确定核销</nut-button
|
||||
>
|
||||
</view>
|
||||
<view>
|
||||
<view class="card">
|
||||
<view>订单号:{{ goodInfo.oid }}</view>
|
||||
<view class="line"></view>
|
||||
<view class="container">
|
||||
<image class="image" :src="goodInfo.cover" mode="widthFix"></image>
|
||||
<view class="info">
|
||||
<view class="title">{{ goodInfo.goods_name }}</view>
|
||||
<view class="num"
|
||||
>数量: <text style="color: red">{{ goodInfo.count }}</text></view
|
||||
>
|
||||
</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="cz">
|
||||
<nut-button size="small" type="primary" @click="subVerify"
|
||||
>确定核销</nut-button
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from "@tarojs/taro";
|
||||
import {
|
||||
getJfVerifyList,
|
||||
getActiveVerifyList,
|
||||
activeOrderVerify,
|
||||
orderVerify,
|
||||
getJfVerifyList,
|
||||
getActiveVerifyList,
|
||||
activeOrderVerify,
|
||||
orderVerify,
|
||||
} from "@/api/admin";
|
||||
import { ref } from "vue";
|
||||
|
||||
const opt = ref<any>({});
|
||||
|
||||
Taro.useLoad((options) => {
|
||||
opt.value = options;
|
||||
getData(options);
|
||||
opt.value = options;
|
||||
getData(options);
|
||||
});
|
||||
|
||||
const goodInfo = ref<any>({});
|
||||
|
||||
const getData = async (options: any) => {
|
||||
let res;
|
||||
if (Number(options.mer_type) === 1) {
|
||||
res = await getActiveVerifyList({
|
||||
oid: options.oid,
|
||||
});
|
||||
} else {
|
||||
res = await getJfVerifyList({
|
||||
oid: options.oid,
|
||||
});
|
||||
}
|
||||
if (!res.data.data.oid) {
|
||||
Taro.showToast({
|
||||
title: "没有此订单",
|
||||
icon: "none",
|
||||
});
|
||||
setTimeout(() => {
|
||||
Taro.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
goodInfo.value = res.data.data;
|
||||
let res;
|
||||
if (Number(options.mer_type) === 1) {
|
||||
res = await getActiveVerifyList({
|
||||
oid: options.oid,
|
||||
});
|
||||
} else {
|
||||
res = await getJfVerifyList({
|
||||
oid: options.oid,
|
||||
});
|
||||
}
|
||||
if (!res.data.data.oid) {
|
||||
Taro.showToast({
|
||||
title: "没有此订单",
|
||||
icon: "none",
|
||||
});
|
||||
setTimeout(() => {
|
||||
Taro.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
goodInfo.value = res.data.data;
|
||||
};
|
||||
|
||||
const subVerify = async () => {
|
||||
try {
|
||||
let res;
|
||||
if (Number(opt.value.mer_type) === 1) {
|
||||
res = await activeOrderVerify({
|
||||
oid: goodInfo.value.oid,
|
||||
});
|
||||
} else {
|
||||
res = await orderVerify({
|
||||
oid: goodInfo.value.oid,
|
||||
});
|
||||
}
|
||||
Taro.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
});
|
||||
setTimeout(() => {
|
||||
Taro.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 3000);
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
throw error;
|
||||
try {
|
||||
let res;
|
||||
if (Number(opt.value.mer_type) === 1) {
|
||||
res = await activeOrderVerify({
|
||||
oid: goodInfo.value.oid,
|
||||
});
|
||||
} else {
|
||||
res = await orderVerify({
|
||||
oid: goodInfo.value.oid,
|
||||
});
|
||||
}
|
||||
Taro.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
});
|
||||
setTimeout(() => {
|
||||
Taro.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 3000);
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
margin: 10px auto;
|
||||
width: 90%;
|
||||
border-radius: 7px;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
margin: 10px auto;
|
||||
width: 90%;
|
||||
border-radius: 7px;
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
.container {
|
||||
display: flex;
|
||||
|
||||
image {
|
||||
width: 200px;
|
||||
height: 100%;
|
||||
border-radius: 7px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.info {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
image {
|
||||
width: 200px;
|
||||
height: 100%;
|
||||
border-radius: 7px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 10px 0;
|
||||
.info {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.cz {
|
||||
text-align: right;
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.cz {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: "收益提现",
|
||||
navigationBarTitleText: "收益提现",
|
||||
});
|
||||
|
||||
@@ -1,65 +1,83 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref, h} from 'vue'
|
||||
import Taro from '@tarojs/taro'
|
||||
import {getWithdrawList, addWithdraw} from '@/api/admin'
|
||||
import { ref, h } from "vue";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { getWithdrawList, addWithdraw } from "@/api/admin";
|
||||
|
||||
const user_info = Taro.getStorageSync('userInfo')
|
||||
const user_info = Taro.getStorageSync("userInfo");
|
||||
|
||||
const row = ref(0)
|
||||
const row = ref(0);
|
||||
|
||||
const basicData = ref({
|
||||
num: ''
|
||||
})
|
||||
num: "",
|
||||
});
|
||||
|
||||
const showPreview = ref(false)
|
||||
const showPreview = ref(false);
|
||||
|
||||
const imgData = ref([{
|
||||
src: ''
|
||||
}])
|
||||
const imgData = ref([
|
||||
{
|
||||
src: "",
|
||||
},
|
||||
]);
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '时间',
|
||||
key: 'add_time',
|
||||
align: 'center'
|
||||
}, {
|
||||
title: '提现金额',
|
||||
key: 'integral',
|
||||
align: 'center',
|
||||
render: (row: { integral: number; }) => {
|
||||
return h('view', {}, row.integral / 100)
|
||||
}
|
||||
title: "时间",
|
||||
key: "add_time",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
render: (row: { status: number; }) => {
|
||||
return h('view', {
|
||||
class: `tag ${row.status === 1 ? 'success' : row.status === 2 ? 'danger' : 'warning'}`
|
||||
}, {
|
||||
default: () => row.status === 1 ? '已打款' : row.status === 2 ? '已拒绝' : '待审核'
|
||||
})
|
||||
}
|
||||
title: "提现金额",
|
||||
key: "integral",
|
||||
align: "center",
|
||||
render: (row: { integral: number }) => {
|
||||
return h("view", {}, row.integral / 100);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
key: 'img',
|
||||
align: 'center',
|
||||
render: (row: { status_img: string; }) => {
|
||||
return h('img', {
|
||||
class: 'image',
|
||||
onClick: () => {
|
||||
imgData.value[0].src = row.status_img
|
||||
showPreview.value = true
|
||||
title: "审核状态",
|
||||
key: "status",
|
||||
align: "center",
|
||||
render: (row: { status: number }) => {
|
||||
return h(
|
||||
"view",
|
||||
{
|
||||
class: `tag ${
|
||||
row.status === 1
|
||||
? "success"
|
||||
: row.status === 2
|
||||
? "danger"
|
||||
: "warning"
|
||||
}`,
|
||||
},
|
||||
src: row.status_img
|
||||
})
|
||||
}
|
||||
}
|
||||
])
|
||||
{
|
||||
default: () =>
|
||||
row.status === 1
|
||||
? "已打款"
|
||||
: row.status === 2
|
||||
? "已拒绝"
|
||||
: "待审核",
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
key: "img",
|
||||
align: "center",
|
||||
render: (row: { status_img: string }) => {
|
||||
return h("img", {
|
||||
class: "image",
|
||||
onClick: () => {
|
||||
imgData.value[0].src = row.status_img;
|
||||
showPreview.value = true;
|
||||
},
|
||||
src: row.status_img,
|
||||
});
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const data = ref([])
|
||||
const data = ref([]);
|
||||
|
||||
const pagination = ref({
|
||||
page: 1,
|
||||
@@ -67,61 +85,67 @@ const pagination = ref({
|
||||
showPageSize: 5,
|
||||
totalItems: 0,
|
||||
change: (page: number) => {
|
||||
pagination.value.page = page
|
||||
getData()
|
||||
}
|
||||
})
|
||||
pagination.value.page = page;
|
||||
getData();
|
||||
},
|
||||
});
|
||||
|
||||
const hideFn = () => {
|
||||
showPreview.value = false
|
||||
}
|
||||
showPreview.value = false;
|
||||
};
|
||||
|
||||
Taro.useLoad(() => {
|
||||
getData()
|
||||
})
|
||||
getData();
|
||||
});
|
||||
|
||||
const getData = async () => {
|
||||
try {
|
||||
const res = await getWithdrawList({
|
||||
PageNum: pagination.value.page,
|
||||
PageSize: pagination.value.showPageSize,
|
||||
Bid: user_info.bid
|
||||
})
|
||||
data.value = res.data.data || []
|
||||
pagination.value.totalItems = res.data.total
|
||||
row.value = res.data.integral || 0
|
||||
console.log(res)
|
||||
Bid: user_info.bid,
|
||||
});
|
||||
data.value = res.data.data || [];
|
||||
pagination.value.totalItems = res.data.total;
|
||||
row.value = res.data.integral || 0;
|
||||
console.log(res);
|
||||
} catch (e) {
|
||||
throw e
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const add = async () => {
|
||||
try {
|
||||
if (Number(basicData.value.num) === 0) return Taro.showToast({
|
||||
title: '提现积分需大于0',
|
||||
icon: 'none'
|
||||
})
|
||||
if (Number(basicData.value.num) === 0)
|
||||
return Taro.showToast({
|
||||
title: "提现积分需大于0",
|
||||
icon: "none",
|
||||
});
|
||||
const res = await addWithdraw({
|
||||
Bid: user_info.bid,
|
||||
Number: Number(basicData.value.num)
|
||||
})
|
||||
Number: Number(basicData.value.num),
|
||||
});
|
||||
Taro.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
await getData()
|
||||
icon: "none",
|
||||
});
|
||||
await getData();
|
||||
} catch (e) {
|
||||
throw e
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view>
|
||||
<nut-form>
|
||||
<nut-form-item label="提现积分:">
|
||||
<nut-input v-model="basicData.num" class="nut-input-text" placeholder="请输入提现积分" type="text"/>
|
||||
<nut-input
|
||||
v-model="basicData.num"
|
||||
class="nut-input-text"
|
||||
placeholder="请输入提现积分"
|
||||
type="text"
|
||||
/>
|
||||
</nut-form-item>
|
||||
<nut-form-item>
|
||||
<view>
|
||||
@@ -141,19 +165,24 @@ const add = async () => {
|
||||
<view v-if="data.length > 0">
|
||||
<view class="data">
|
||||
<nut-table :columns="columns" :data="data"></nut-table>
|
||||
<nut-pagination class="pagination" v-model="pagination.page" :total-items="pagination.totalItems"
|
||||
:items-per-page="pagination.itemsPerPage" :show-page-size="pagination.showPageSize"
|
||||
@change="pagination.change" :bordered="false"/>
|
||||
<nut-pagination
|
||||
class="pagination"
|
||||
v-model="pagination.page"
|
||||
:total-items="pagination.totalItems"
|
||||
:items-per-page="pagination.itemsPerPage"
|
||||
:show-page-size="pagination.showPageSize"
|
||||
@change="pagination.change"
|
||||
:bordered="false"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无提现记录"></nut-empty>
|
||||
<!-- 图片预览 -->
|
||||
<nut-image-preview :show="showPreview" :images="imgData" @close="hideFn"/>
|
||||
<nut-image-preview :show="showPreview" :images="imgData" @close="hideFn" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.text-red {
|
||||
color: red;
|
||||
}
|
||||
@@ -194,4 +223,4 @@ const add = async () => {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user