feat(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-03 22:17:38 +08:00
parent d57f9cc53e
commit 962d7a2b19
16 changed files with 287 additions and 314 deletions

View File

@@ -4,7 +4,6 @@ import Taro from '@tarojs/taro';
import Pay from '@/components/Pay.vue';
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
import {getOrderStatistics} from '@/api/order';
import {getUserPoint} from '@/api/admin';
import UQRCode from 'uqrcodejs';
const tabValue = ref(0);
@@ -58,6 +57,8 @@ interface OrderList {
price: number;
joint_oid: string;
bid: string;
discount_price: number;
discount_integral: number;
}
interface GoodsItem {
@@ -169,35 +170,6 @@ const delOrder = async (oid: string) => {
await getList();
};
const countInfo = ref<{
A?: number;
B?: number;
C?: number;
D?: number;
F?: number;
ExchangeTotal?: number;
PriceTotal?: number;
}>({});
const getTj = async () => {
try {
const res = await getOrderStatistics({
type: 2,
});
countInfo.value = res.data.data;
tabsList.value[0].num = countInfo.value.A || 0;
tabsList.value[1].num = countInfo.value.B || 0;
tabsList.value[2].num = countInfo.value.C || 0;
tabsList.value[3].num = countInfo.value.D || 0;
tabsList.value[4].num = countInfo.value.F || 0;
} catch (error) {
Taro.showToast({
title: error.msg,
icon: 'none',
});
}
};
const t_id = ref();
const openCode = item => {
@@ -272,8 +244,8 @@ const closed = () => {
:style="{
color: tabValue === item.value ? '#000' : '#9C9C9C',
}"
>{{ item.title }}</view
>
>{{ item.title }}
</view>
<!-- <view>{{ item.num }}</view> -->
<view class="line" :class="{lineColor: item.value === tabValue}"></view>
</view>
@@ -315,8 +287,12 @@ const closed = () => {
<view class="flex flex-col justify-between flex-1">
<view class="title">{{ itm.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5">
<view>{{ itm.pay_price }}</view>
<view>{{ itm.pay_integral }}积分</view>
<view
>{{ itm.pay_price }}
<text v-if="itm.pay_integral > 0"
>+{{ itm.pay_integral }}积分</text
>
</view>
</view>
</view>
<view class="right">
@@ -330,13 +306,15 @@ const closed = () => {
v-if="item.status !== 0"
style="text-align: right">
<text class="text-[#9C9C9C] text-[28px]"
>{{ item.count }}件商品</text
>
>{{ item.count }}件商品
</text>
<text class="text-[26px]"
>{{ item.status !== 0 ? '实' : '应' }}付款{{
item.pay_type === 1 ? '(元): ' : '(积分): '
}}{{ item.pay_type === 1 ? item.price : item.exchange }}</text
>
>{{ item.status !== 0 ? '实' : '应' }}付款:
{{ item.discount_price }}()
<text v-if="item.exchange > 0"
>积分抵扣: {{ item.exchange }}</text
>
</text>
<!-- <view class="line"></view> -->
</view>
<view class="btn">