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

This commit is contained in:
2024-09-05 16:41:26 +08:00
parent 962d7a2b19
commit 94b6a9da10
23 changed files with 311 additions and 721 deletions

View File

@@ -5,30 +5,26 @@
<nut-cell>
<template #default>
<view class="center-box">
<view
class="top"
v-for="(item, index) in info.OrderGoods"
:key="index">
<view class="top" v-for="(item, index) in info.OrderGoods" :key="index">
<image class="mr-10" :src="item.Goods?.cover" />
<view class="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">
<view>x{{ item.number }}</view>
</view>
</view>
<view
class="flex justify-between items-center mt-2 mb-2 text-[25px]">
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]">
<view class="text-[#9C9C9C]">{{ `${info.count}件商品` }}</view>
<view
>{{ info.status !== 0 ? '实' : '应' }}付款{{
info.pay_type === 1 ? '(元): ' : '(积分): '
}}{{ info.pay_type === 1 ? info.price : info.exchange }}</view
>
<text class="text-[26px] flex-1 text-right">{{ info.status !== 0 ? '实' : '应' }}付款:
{{ info.discount_price }} ()
<text v-if="info.exchange > 0">积分抵扣: {{ info.exchange }}</text>
</text>
</view>
</view>
</template>
@@ -36,14 +32,11 @@
</nut-cell-group>
<nut-cell-group>
<nut-cell title="订单号:" :desc="info.oid"></nut-cell>
<nut-cell
title="订单状态:"
:desc="
info.status === 0
? '待付款'
: info.status === 1
? '待使用'
: info.status === 2
<nut-cell title="订单状态:" :desc="info.status === 0
? '待付款'
: info.status === 1
? '待使用'
: info.status === 2
? '已使用'
: '已失效'
">
@@ -51,25 +44,16 @@
<nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell>
<nut-cell title="用户手机号:" :desc="info.User?.phone"></nut-cell>
<nut-cell title="下单时间:" :desc="info.add_time"></nut-cell>
<nut-cell
v-if="info.status === 2"
title="核销时间:"
:desc="info.cancel_time"></nut-cell>
<nut-cell
v-if="info.status === 2"
title="核销人员:"
:desc="info.CancelUser?.nickName"></nut-cell>
<nut-cell
v-if="info.status === 2"
title="核销人手机号:"
:desc="info.CancelUser?.phone"></nut-cell>
<nut-cell v-if="info.status === 2" title="核销时间:" :desc="info.cancel_time"></nut-cell>
<nut-cell v-if="info.status === 2" title="核销人员:" :desc="info.CancelUser?.nickName"></nut-cell>
<nut-cell v-if="info.status === 2" title="核销人手机号:" :desc="info.CancelUser?.phone"></nut-cell>
</nut-cell-group>
</view>
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
import {ref} from 'vue';
import { ref } from 'vue';
const info = ref<any>({});

View File

@@ -1,52 +1,37 @@
<template>
<view>
<view class="tabs-1">
<view
class="item"
v-for="(item, index) in opt"
:key="index"
@click="tabChange(item.value)">
<view
:style="{
color: item.value === tabVal ? '#333333' : '#9C9C9C',
}"
>{{ item.text }}</view
>
<view
class="line"
:style="{
backgroundColor: item.value === tabVal ? '#FFD940' : '',
}"></view>
<view class="item" v-for="(item, index) in opt" :key="index" @click="tabChange(item.value)">
<view :style="{
color: item.value === tabVal ? '#333333' : '#9C9C9C',
}">{{ item.text }}</view>
<view class="line" :style="{
backgroundColor: item.value === tabVal ? '#FFD940' : '',
}"></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="order-card" v-for="(item, index) in dataList" :key="index" @click="toDetailPage(item)">
<view class="top">
<view class="text-[#9C9C9C] text-[25px]">订单号{{ item.oid }}</view>
<view
:style="{
color:
item.status === 0
? '#FF850A'
: item.status === 1
<view :style="{
color:
item.status === 0
? '#FF850A'
: item.status === 1
? '#F83D3D'
: item.status === 2
? '#333333'
: '#9C9C9C',
}"
>{{
item.status === 0
? '待付款'
: item.status === 1
? '#333333'
: '#9C9C9C',
}">{{
item.status === 0
? '待付款'
: item.status === 1
? '待使用'
: item.status === 2
? '已使用'
: '已失效'
}}
? '已使用'
: '已失效'
}}
</view>
</view>
<view class="line"></view>
@@ -56,8 +41,9 @@
<view class="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">
@@ -65,15 +51,12 @@
</view>
</view>
</view>
<view
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
v-if="item.status !== 0">
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]" v-if="item.status !== 0">
<text class="text-[#9C9C9C]">{{ item.count }}件商品</text>
<view
>{{ item.status !== 0 ? '实' : '应' }}付款{{
item.pay_type === 1 ? '(元): ' : '(积分): '
}}{{ item.pay_type === 1 ? item.price : item.exchange }}</view
>
<text class="text-[26px] flex-1 text-right">{{ item.status !== 0 ? '实' : '应' }}付款:
{{ item.discount_price }} ()
<text v-if="item.exchange > 0">积分抵扣: {{ item.exchange }}</text>
</text>
</view>
</view>
</view>
@@ -82,9 +65,9 @@
</template>
<script setup lang="ts">
import {ref} from 'vue';
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import {getActiveOrderList} from '../../../../api/admin';
import { getActiveOrderList } from '../../../../api/admin';
const opt = ref([
{