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">

View File

@@ -28,9 +28,10 @@
<IconFont name="rect-right" size="15" color="#333333"></IconFont>
</view>
<view class="text-[#9C9C9C] text-[20px]"
>订单剩余<text class="text-[#FF0000]">{{ timeStr }}</text
>过期请尽快核销</view
>
>订单剩余
<text class="text-[#FF0000]">{{ timeStr }} </text>
过期请尽快核销
</view>
</view>
<view v-if="goodInfo.status === 2">
<view class="flex text-[#333333] items-center mb-1">
@@ -99,8 +100,12 @@
<view class="flex flex-col justify-between flex-1">
<view class="title">{{ item.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5">
<view>{{ item.pay_price }}</view>
<view>{{ item.pay_integral }}积分</view>
<view
>{{ item.pay_price }}
<text v-if="item.pay_integral > 0"
>+{{ item.pay_integral }}积分</text
>
</view>
</view>
</view>
<view class="right">
@@ -109,16 +114,16 @@
</view>
<view
class="flex justify-between items-center mt-2 mb-2 text-[25px]">
<view class="text-[#9C9C9C]">{{
`${goodInfo.count}件商品`
}}</view>
<text
>{{ goodInfo.status !== 0 ? '实' : '应' }}付款{{
goodInfo.pay_type === 1 ? '(元): ' : '(积分): '
}}{{
goodInfo.pay_type === 1 ? goodInfo.price : goodInfo.exchange
}}</text
>
<view class="text-[#9C9C9C]"
>{{ `${goodInfo.count}件商品` }}
</view>
<text class="text-[26px]"
>{{ goodInfo.status !== 0 ? '实' : '应' }}付款:
{{ goodInfo.discount_price }}()
<text v-if="goodInfo.exchange > 0"
>积分抵扣: {{ goodInfo.exchange }}</text
>
</text>
</view>
</view>
</template>
@@ -155,16 +160,16 @@
type="primary"
block
@click="openPay()"
>继续付款</nut-button
>
>继续付款
</nut-button>
<nut-button
v-if="goodInfo.status === 1"
shape="square"
type="primary"
block
@click="openCode()"
>出示核销码</nut-button
>
>出示核销码
</nut-button>
</view>
<!-- <view class="btn">
@@ -231,7 +236,6 @@ import {onUnmounted, ref} from 'vue';
import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration';
import Pay from '@/components/Pay.vue';
import {getUserPoint} from '@/api/admin';
import {calculateDistance} from '@/utils';
import {IconFont} from '@nutui/icons-vue-taro';
import {getActiveOrderDetail} from '@/api/goods';