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

@@ -2,19 +2,9 @@
<view>
<!-- 商品列表 -->
<view class="good-class" v-if="class_list.length > 0">
<nut-tabs
v-model="value"
title-scroll
size="large"
direction="vertical"
title-gutter="5"
animated-time="0"
<nut-tabs v-model="value" title-scroll size="large" direction="vertical" title-gutter="5" animated-time="0"
name="tabName">
<nut-tab-pane
v-for="(itm, index) in good_list"
:key="index"
:title="itm.name"
:pane-key="index">
<nut-tab-pane v-for="(itm, index) in good_list" :key="index" :title="itm.name" :pane-key="index">
<view v-if="itm.Goods.length > 0">
<view class="list" v-for="(item, index) in itm.Goods" :key="index">
<view class="item" @click.stop="toGoodDetails(item.gid, 1)">
@@ -27,16 +17,13 @@
<view class="price">
<text style="font-size: 15px">{{ item.number }}</text>
</view>
<view class="price">
<!-- <view class="price">
<text style="font-size: 15px"
>{{ item.exchange }}积分</text
>
</view>
</view> -->
</view>
<nut-button
size="mini"
type="primary"
@click.stop="add_cart(item)">
<nut-button size="mini" type="primary" @click.stop="add_cart(item)">
<template #icon>
<Cart2 />
</template>
@@ -53,20 +40,16 @@
</view>
<nut-empty v-else description="该商家暂无商品"></nut-empty>
<!-- 购物车 -->
<cart
ref="cartRef"
:mer-info="mer_info"
@update-cart="updateCartNum"
:IsPendingOrder="true" />
<cart ref="cartRef" :mer-info="mer_info" @update-cart="updateCartNum" :IsPendingOrder="true" />
</view>
</template>
<script setup lang="ts">
import {Ref, ref} from 'vue';
import { Ref, ref } from 'vue';
import Taro from '@tarojs/taro';
import Cart from '../../../../components/Cart.vue';
import {Cart2} from '@nutui/icons-vue-taro';
import {getGoodList, getMerCategory} from '../../../../api/goods';
import { Cart2 } from '@nutui/icons-vue-taro';
import { getGoodList, getMerCategory } from '../../../../api/goods';
interface goodList {
ID: number;

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([
{

View File

@@ -3,33 +3,23 @@
<view class="card">
<view class="text-[#7A7A7A]">订单号{{ goodInfo.oid }}</view>
<view class="line"></view>
<view
class="container"
v-for="(item, index) in goodInfo.OrderGoods"
:key="index">
<view class="container" v-for="(item, index) in goodInfo.OrderGoods" :key="index">
<image class="image" :src="item.Goods.cover"></image>
<view class="info">
<view class="title">{{ item.Goods.name }}</view>
<view class="text-[#7A7A7A] text-[22px]">{{
item.Goods.profile || '此商品暂无描述'
}}</view>
}}</view>
</view>
<view class="text-[#9C9C9C]">x{{ item.number }}</view>
</view>
<view class="line"></view>
<view
class="flex justify-between items-center mt-3 mb-2 text-[25px]"
style="text-align: right">
<text class="text-[#9C9C9C] text-left"
>{{ goodInfo.count }}件商品</text
>
<text class="flex-1"
>{{ goodInfo.status !== 0 ? '实' : '应' }}付款{{
goodInfo.pay_type === 1 ? '(元): ' : '(积分): '
}}{{
goodInfo.pay_type === 1 ? goodInfo.price : goodInfo.exchange
}}</text
>
<view class="flex justify-between items-center mt-3 mb-2 text-[25px]" style="text-align: right">
<text class="text-[#9C9C9C] text-left">{{ goodInfo.count }}件商品</text>
<text class="text-[26px] flex-1">实付款:
{{ goodInfo.discount_price }} ()
<text v-if="goodInfo.exchange > 0">积分抵扣: {{ goodInfo.exchange }}</text>
</text>
</view>
<!-- <view class="line"></view> -->
<!-- <view class="cz">
@@ -40,28 +30,22 @@
</view>
<nut-cell-group>
<nut-cell title="订单信息"></nut-cell>
<nut-cell
title="下单时间:"
:desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
<nut-cell title="下单时间:" :desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
<nut-cell title="下单号码:" :desc="goodInfo.User?.phone"></nut-cell>
<nut-cell title="下单用户:" :desc="goodInfo.User?.nickName"></nut-cell>
<nut-cell
title="付款方式:"
:desc="getPayType(goodInfo.pay_type)"></nut-cell>
<nut-cell title="付款方式:" :desc="getPayType(goodInfo.pay_type)"></nut-cell>
</nut-cell-group>
<view class="w-[90%] mt-[40px] m-auto">
<nut-button type="primary" shape="square" block @click="subVerify"
>确定核销</nut-button
>
<nut-button type="primary" shape="square" block @click="subVerify">确定核销</nut-button>
</view>
</view>
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
import {getActiveVerifyList, activeOrderVerify} from '@/api/admin';
import {ref} from 'vue';
import { getActiveVerifyList, activeOrderVerify } from '@/api/admin';
import { ref } from 'vue';
const opt = ref<any>({});

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import {ref} from 'vue';
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import {getWithdrawList, addWithdraw} from '@/api/admin';
import { getWithdrawList, addWithdraw } from '@/api/admin';
const user_info = ref<any>({});
@@ -57,7 +57,7 @@ const getData = async () => {
const add = async () => {
try {
formRef.value?.validate().then(async ({valid}) => {
formRef.value?.validate().then(async ({ valid }) => {
if (valid) {
const res = await addWithdraw({
Bid: user_info.value.data.bid,
@@ -79,19 +79,19 @@ const add = async () => {
const rules = ref({
num: [
{
message: '请填写提现积分',
message: '请填写提现余额',
validator: (value, _) => {
return value;
},
},
{
message: '提现积分最低为100',
message: '提现余额最低为1',
validator: (value, _) => {
return Number(value) >= 100;
return Number(value) >= 1;
},
},
{
message: '提现积分不能大于可提现积分',
message: '提现余额不能大于可提现余额',
validator: (value, _) => {
return Number(value) <= row.value;
},
@@ -162,17 +162,9 @@ Taro.useReachBottom(() => {
</view>
<nut-form ref="formRef" :model-value="basicData" :rules="rules">
<nut-form-item prop="num">
<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">
<template #right>
<text
class="text-[#EC4443] text-[26px]"
@tap="basicData.num = row.toString()"
>全部</text
>
<text class="text-[#EC4443] text-[26px]" @tap="basicData.num = row.toString()">全部</text>
</template>
</nut-input>
</nut-form-item>
@@ -189,67 +181,41 @@ Taro.useReachBottom(() => {
<view class="item" v-for="(item, index) in data" :key="index">
<view class="flex justify-between items-center">
<view class="text-[25px] text-[#9C9C9C]">到账金额</view>
<view
class="text-[27px]"
:class="
item.status === 1
? 'success'
: item.status === 1
<view class="text-[27px]" :class="item.status === 1
? 'success'
: item.status === 1
? 'danger'
: 'warning'
"
>{{
">{{
item.status === 1
? '已打款'
: item.status === 2
? '已拒绝'
: '待审核'
}}</view
>
? '已拒绝'
: '待审核'
}}</view>
</view>
<view>
<view class="mt-3 mb-3 text-[35px]">{{ item.number }}</view>
<view class="text-[25px] mb-1">提现金额{{ item.integral }}</view>
<view class="text-[25px] mb-1"
>信息服务{{ item.commission }}</view
>
<view class="text-[25px] mb-1"
>手续费{{ item.commission_number }}%</view
>
<view class="text-[25px] mb-1">信息服务费{{ item.commission }}</view>
<view class="text-[25px] mb-1">手续{{ item.commission_number }}%</view>
<view class="text-[25px] mb-1">时间{{ item.add_time }}</view>
<view v-if="item.status === 2" class="text-[25px] text-[#9C9C9C]"
>备注</view
>
<view
v-if="item.status === 1"
class="text-[23px] mt-2 text-[#df3526]"
@click="openPreview(item)"
>点我查看回执单</view
>
<view v-if="item.status === 2" class="text-[25px] text-[#9C9C9C]">备注</view>
<view v-if="item.status === 1" class="text-[23px] mt-2 text-[#df3526]" @click="openPreview(item)">点我查看回执单
</view>
</view>
</view>
</view>
<nut-empty v-else description="暂无提现记录"></nut-empty>
<!-- 图片预览 -->
<nut-image-preview
:show="showPreview"
:images="imgData"
@close="closePreview" />
<nut-image-preview :show="showPreview" :images="imgData" @close="closePreview" />
<nut-dialog
title="提现疑问?"
content="这是基础弹框。"
ok-text="我已知晓"
:no-cancel-btn="true"
v-model:visible="visible1">
<nut-dialog title="提现疑问?" content="这是基础弹框。" ok-text="我已知晓" :no-cancel-btn="true" v-model:visible="visible1">
<template #default>
<text>
积分和人民币兑换比例为
<text class="text-[#F83D3D]">100:1</text>
平台收取<text class="text-[#F83D3D]">10%服务费</text><text
class="text-[#F83D3D]"
>0.038%手续费</text
>
平台收取<text class="text-[#F83D3D]">10%服务费</text><text class="text-[#F83D3D]">0.038%手续费</text>
</text>
</template>
</nut-dialog>