Browse Source

修复:已知问题

dev
科技小王子 4 months ago
parent
commit
e018dce6f2
  1. 10
      src/layout/index.vue
  2. 90
      src/utils/shop.ts
  3. 50
      src/views/bszx/bszxOrder/components/search.vue
  4. 70
      src/views/bszx/bszxOrder/index.vue
  5. 44
      src/views/shop/shopOrder/components/orderInfo.vue
  6. 50
      src/views/shop/shopOrder/components/search.vue
  7. 70
      src/views/shop/shopOrder/index.vue

10
src/layout/index.vue

@ -20,7 +20,6 @@
:colorful-icon="colorfulIcon"
:side-unique-open="sideUniqueOpen"
:style-responsive="styleResponsive"
:project-name="projectName"
:hide-footers="HIDE_FOOTERS"
:hide-sidebars="HIDE_SIDEBARS"
:repeatable-tabs="REPEATABLE_TABS"
@ -49,7 +48,7 @@
<router-layout />
<!-- logo 图标 -->
<template #logo>
<div class="sys-logo mr-2 flex items-center flex-col">
<a-space class="sys-logo flex items-center justify-center">
<AAvatar
shape="square"
:preview="false"
@ -58,7 +57,10 @@
:src="logoPath"
alt="logo"
/>
</div>
<template v-if="!collapse">
{{ projectName }}
</template>
</a-space>
</template>
<!-- 顶栏右侧区域 -->
<template #right>
@ -133,7 +135,7 @@
const themeStore = useThemeStore();
//
const projectName = t('layout.system');
const projectName = localStorage.getItem('TenantName') || t('layout.system');
// LOGO
const logoPath = '/logo.png';

90
src/utils/shop.ts

@ -0,0 +1,90 @@
// 支付方式
export function getPayType(index?: number): any {
const payType = [
{
value: 0,
label: '余额支付',
},
{
value: 1,
label: '微信支付',
},
{
value: 2,
label: '积分',
},
{
value: 3,
label: '支付宝',
},
{
value: 4,
label: '现金',
},
{
value: 5,
label: 'POS机',
},
{
value: 6,
label: '会员卡',
},
// {
// value: 7,
// label: 'VIP年卡',
// },
// {
// value: 8,
// label: 'VIP次卡',
// },
// {
// value: 9,
// icon: 'IdcardOutlined',
// label: 'IC月卡',
// },
// {
// value: 10,
// icon: 'IdcardOutlined',
// label: 'IC年卡',
// },
// {
// value: 11,
// icon: 'IdcardOutlined',
// label: 'IC次卡',
// },
// {
// value: 12,
// icon: '',
// label: '免费',
// },
// {
// value: 13,
// icon: 'IdcardOutlined',
// label: 'VIP充值卡',
// },
// {
// value: 14,
// icon: 'IdcardOutlined',
// label: 'IC充值卡',
// },
// {
// value: 15,
// icon: '',
// label: '积分支付',
// },
// {
// value: 16,
// icon: 'IdcardOutlined',
// label: 'VIP季卡',
// },
// {
// value: 17,
// icon: 'IdcardOutlined',
// label: 'IC季卡',
// },
];
if(index){
return payType[index].label || '';
}
return payType;
}

50
src/views/bszx/bszxOrder/components/search.vue

@ -9,7 +9,7 @@
>
<a-select-option value="">全部</a-select-option>
<a-select-option :value="1">已付款</a-select-option>
<a-select-option :value="2">未付款</a-select-option>
<a-select-option :value="0">未付款</a-select-option>
</a-select>
<a-select
v-model:value="where.orderStatus"
@ -19,6 +19,7 @@
>
<a-select-option value="">全部</a-select-option>
<a-select-option :value="1">已完成</a-select-option>
<a-select-option :value="0">未完成</a-select-option>
<a-select-option :value="2">未使用</a-select-option>
<a-select-option :value="3">已取消</a-select-option>
<a-select-option :value="4">退款中</a-select-option>
@ -26,39 +27,21 @@
<a-select-option :value="6">退款成功</a-select-option>
</a-select>
<a-select
:options="getPayType()"
v-model:value="where.payType"
style="width: 150px"
placeholder="付款方式"
@change="search"
>
<a-select-option value="">全部</a-select-option>
<a-select-option :value="1">微信支付</a-select-option>
<a-select-option :value="2">余额支付</a-select-option>
<a-select-option :value="3">支付宝</a-select-option>
<a-select-option :value="4">现金</a-select-option>
<a-select-option :value="5">POS机</a-select-option>
<!-- <a-select-option :value="6">VIP月卡</a-select-option>-->
<!-- <a-select-option :value="7">VIP年卡</a-select-option>-->
<!-- <a-select-option :value="8">VIP次卡</a-select-option>-->
<!-- <a-select-option :value="9">IC月卡</a-select-option>-->
<!-- <a-select-option :value="10">IC年卡</a-select-option>-->
<!-- <a-select-option :value="11">IC次卡</a-select-option>-->
<a-select-option :value="12">免费</a-select-option>
<!-- <a-select-option :value="13">VIP充值卡</a-select-option>-->
<!-- <a-select-option :value="14">IC充值卡</a-select-option>-->
<!-- <a-select-option :value="15">积分支付</a-select-option>-->
<!-- <a-select-option :value="16">VIP季卡</a-select-option>-->
<!-- <a-select-option :value="17">IC季卡</a-select-option>-->
</a-select>
/>
<a-select
v-model:value="where.isInvoice"
style="width: 150px"
placeholder="开票状态"
@change="search"
>
<a-select-option value="1">已开票</a-select-option>
<a-select-option :value="2">未开票</a-select-option>
<a-select-option :value="3">不能开票</a-select-option>
<a-select-option :value="1">已开票</a-select-option>
<a-select-option :value="0">未开票</a-select-option>
<a-select-option :value="2">不能开票</a-select-option>
</a-select>
<a-range-picker
v-model:value="dateRange"
@ -80,11 +63,11 @@
<script lang="ts" setup>
import { ref, watch } from 'vue';
import { utils, writeFile } from 'xlsx';
import dayjs from 'dayjs';
import { message } from 'ant-design-vue';
import useSearch from "@/utils/use-search";
import {listBszxPay} from "@/api/bszx/bszxPay";
import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
import {listShopOrder} from "@/api/shop/shopOrder";
import {getPayType} from "@/utils/shop";
const props = withDefaults(
defineProps<{
@ -123,6 +106,7 @@
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
xlsFileName.value = `${d1}${d2}`;
where.createTimeStart = d1 ? d1 + ' 00:00:00' : undefined;
where.createTimeEnd = d2 ? d2 + ' 23:59:59' : undefined;
emit('search', {
@ -149,18 +133,16 @@
[
'订单编号',
'订单标题',
'客户姓名',
'买家姓名',
'手机号码',
'实付金额',
'实付金额(元)',
'支付方式',
'付款时间',
'下单时间'
]
];
//
where.sceneType = 'Content';
await listBszxPay(where)
await listShopOrder(where)
.then((list) => {
orders.value = list;
list?.forEach((d: ShopOrder) => {
@ -170,12 +152,12 @@
`${d.realName}`,
`${d.phone}`,
`${d.payPrice}`,
`${d.payType}`,
`${d.payTime}`,
`${getPayType(d.payType)}`,
`${d.payTime || ''}`,
`${d.createTime}`
]);
});
const sheetName = `导出订单记录${dayjs(new Date()).format('YYYYMMDD')}`;
const sheetName = `订单数据`;
const workbook = {
SheetNames: [sheetName],
Sheets: {}

70
src/views/bszx/bszxOrder/index.vue

@ -31,78 +31,15 @@
<div v-else class="text-gray-600">{{ record.phone }}</div>
</template>
<template v-if="column.key === 'payType'">
<template v-for="item in getPayType()">
<template v-if="record.payStatus == 1">
<a-tag v-if="record.payType == 0">余额支付</a-tag>
<a-tag v-if="record.payType == 1">
<WechatOutlined class="tag-icon" />
微信支付
</a-tag>
<a-tag v-if="record.payType == 2">积分</a-tag>
<a-tag v-if="record.payType == 3">
<AlipayCircleOutlined class="tag-icon" />
支付宝
</a-tag>
<a-tag v-if="record.payType == 4">
<IdcardOutlined class="tag-icon" />
现金
</a-tag>
<a-tag v-if="record.payType == 5">
<IdcardOutlined class="tag-icon" />
POS机
</a-tag>
<a-tag v-if="record.payType == 6">
<IdcardOutlined class="tag-icon" />
VIP月卡
</a-tag>
<a-tag v-if="record.payType == 7">
<IdcardOutlined class="tag-icon" />
VIP年卡
</a-tag>
<a-tag v-if="record.payType == 8">
<IdcardOutlined class="tag-icon" />
VIP次卡
</a-tag>
<a-tag v-if="record.payType == 9">
<IdcardOutlined class="tag-icon" />
IC月卡
</a-tag>
<a-tag v-if="record.payType == 10">
<IdcardOutlined class="tag-icon" />
IC年卡
</a-tag>
<a-tag v-if="record.payType == 11">
<IdcardOutlined class="tag-icon" />
IC次卡
</a-tag>
<a-tag v-if="record.payType == 12">
<IdcardOutlined class="tag-icon" />
免费
</a-tag>
<a-tag v-if="record.payType == 13">
<IdcardOutlined class="tag-icon" />
VIP充值卡
</a-tag>
<a-tag v-if="record.payType == 14">
<IdcardOutlined class="tag-icon" />
IC充值卡
</a-tag>
<a-tag v-if="record.payType == 15">
<IdcardOutlined class="tag-icon" />
积分支付
</a-tag>
<a-tag v-if="record.payType == 16">
<IdcardOutlined class="tag-icon" />
VIP季卡
</a-tag>
<a-tag v-if="record.payType == 17">
<IdcardOutlined class="tag-icon" />
IC季卡
</a-tag>
<span v-if="item.value == record.payType">{{ item.label }}</span>
</template>
<template v-else>
<span></span>
</template>
</template>
</template>
<template v-if="column.key === 'payStatus'">
<a-tag v-if="record.payStatus == 1" color="green" @click="updatePayStatus(record)">已付款</a-tag>
<a-tag v-if="record.payStatus == 0" @click="updatePayStatus(record)">未付款</a-tag>
@ -176,6 +113,7 @@ import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
import {updateShopOrder} from "@/api/shop/shopOrder";
import {message} from "ant-design-vue";
import {updateUser} from "@/api/system/user";
import {getPayType} from '@/utils/shop';
//
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);

44
src/views/shop/shopOrder/components/orderInfo.vue

@ -440,47 +440,27 @@ const updateVisible = (value: boolean) => {
const columns = ref<ColumnItem[]>([
{
title: '场馆名称',
dataIndex: 'siteName',
key: 'siteName',
align: 'center'
},
{
title: '场地',
dataIndex: 'fieldName',
align: 'center'
title: '商品名称',
dataIndex: 'formName',
key: 'formName',
align: 'center',
width: 280
},
{
title: '价格',
title: '金额',
dataIndex: 'price',
align: 'center'
},
{
title: '儿童价',
dataIndex: 'childrenPrice',
align: 'center'
},
{
title: '成人数',
dataIndex: 'adultNum',
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center'
},
{
title: '儿童数',
dataIndex: 'childrenNum',
align: 'center'
},
{
title: '预定信息',
dataIndex: 'dateTime',
key: 'dateTime',
align: 'center'
},
{
title: '是否免费',
title: '操作',
dataIndex: 'isFree',
align: 'center',
customRender: ({text}) => ['', '免费', '付费'][text]
align: 'center'
}
]);
@ -561,7 +541,7 @@ watch(
if (props.data) {
loading.value = true;
assignObject(form, props.data);
pageBszxPay({orderId: form.orderId}).then((res) => {
pageBszxPay({orderNo: form.orderNo}).then((res) => {
if (res?.list) {
orderInfo.value = res?.list;
}

50
src/views/shop/shopOrder/components/search.vue

@ -9,7 +9,7 @@
>
<a-select-option value="">全部</a-select-option>
<a-select-option :value="1">已付款</a-select-option>
<a-select-option :value="2">未付款</a-select-option>
<a-select-option :value="0">未付款</a-select-option>
</a-select>
<a-select
v-model:value="where.orderStatus"
@ -19,6 +19,7 @@
>
<a-select-option value="">全部</a-select-option>
<a-select-option :value="1">已完成</a-select-option>
<a-select-option :value="0">未完成</a-select-option>
<a-select-option :value="2">未使用</a-select-option>
<a-select-option :value="3">已取消</a-select-option>
<a-select-option :value="4">退款中</a-select-option>
@ -26,39 +27,21 @@
<a-select-option :value="6">退款成功</a-select-option>
</a-select>
<a-select
:options="getPayType()"
v-model:value="where.payType"
style="width: 150px"
placeholder="付款方式"
@change="search"
>
<a-select-option value="">全部</a-select-option>
<a-select-option :value="1">微信支付</a-select-option>
<a-select-option :value="2">余额支付</a-select-option>
<a-select-option :value="3">支付宝</a-select-option>
<a-select-option :value="4">现金</a-select-option>
<a-select-option :value="5">POS机</a-select-option>
<!-- <a-select-option :value="6">VIP月卡</a-select-option>-->
<!-- <a-select-option :value="7">VIP年卡</a-select-option>-->
<!-- <a-select-option :value="8">VIP次卡</a-select-option>-->
<!-- <a-select-option :value="9">IC月卡</a-select-option>-->
<!-- <a-select-option :value="10">IC年卡</a-select-option>-->
<!-- <a-select-option :value="11">IC次卡</a-select-option>-->
<a-select-option :value="12">免费</a-select-option>
<!-- <a-select-option :value="13">VIP充值卡</a-select-option>-->
<!-- <a-select-option :value="14">IC充值卡</a-select-option>-->
<!-- <a-select-option :value="15">积分支付</a-select-option>-->
<!-- <a-select-option :value="16">VIP季卡</a-select-option>-->
<!-- <a-select-option :value="17">IC季卡</a-select-option>-->
</a-select>
/>
<a-select
v-model:value="where.isInvoice"
style="width: 150px"
placeholder="开票状态"
@change="search"
>
<a-select-option value="1">已开票</a-select-option>
<a-select-option :value="2">未开票</a-select-option>
<a-select-option :value="3">不能开票</a-select-option>
<a-select-option :value="1">已开票</a-select-option>
<a-select-option :value="0">未开票</a-select-option>
<a-select-option :value="2">不能开票</a-select-option>
</a-select>
<a-range-picker
v-model:value="dateRange"
@ -80,11 +63,11 @@
<script lang="ts" setup>
import { ref, watch } from 'vue';
import { utils, writeFile } from 'xlsx';
import dayjs from 'dayjs';
import { message } from 'ant-design-vue';
import useSearch from "@/utils/use-search";
import {listBszxPay} from "@/api/bszx/bszxPay";
import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
import {listShopOrder} from "@/api/shop/shopOrder";
import {getPayType} from "@/utils/shop";
const props = withDefaults(
defineProps<{
@ -123,6 +106,7 @@
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
xlsFileName.value = `${d1}${d2}`;
where.createTimeStart = d1 ? d1 + ' 00:00:00' : undefined;
where.createTimeEnd = d2 ? d2 + ' 23:59:59' : undefined;
emit('search', {
@ -149,18 +133,16 @@
[
'订单编号',
'订单标题',
'客户姓名',
'买家姓名',
'手机号码',
'实付金额',
'实付金额(元)',
'支付方式',
'付款时间',
'下单时间'
]
];
//
where.sceneType = 'Content';
await listBszxPay(where)
await listShopOrder(where)
.then((list) => {
orders.value = list;
list?.forEach((d: ShopOrder) => {
@ -170,12 +152,12 @@
`${d.realName}`,
`${d.phone}`,
`${d.payPrice}`,
`${d.payType}`,
`${d.payTime}`,
`${getPayType(d.payType)}`,
`${d.payTime || ''}`,
`${d.createTime}`
]);
});
const sheetName = `导出订单记录${dayjs(new Date()).format('YYYYMMDD')}`;
const sheetName = `订单数据`;
const workbook = {
SheetNames: [sheetName],
Sheets: {}

70
src/views/shop/shopOrder/index.vue

@ -31,78 +31,15 @@
<div v-else class="text-gray-600">{{ record.phone }}</div>
</template>
<template v-if="column.key === 'payType'">
<template v-for="item in getPayType()">
<template v-if="record.payStatus == 1">
<a-tag v-if="record.payType == 0">余额支付</a-tag>
<a-tag v-if="record.payType == 1">
<WechatOutlined class="tag-icon" />
微信支付
</a-tag>
<a-tag v-if="record.payType == 2">积分</a-tag>
<a-tag v-if="record.payType == 3">
<AlipayCircleOutlined class="tag-icon" />
支付宝
</a-tag>
<a-tag v-if="record.payType == 4">
<IdcardOutlined class="tag-icon" />
现金
</a-tag>
<a-tag v-if="record.payType == 5">
<IdcardOutlined class="tag-icon" />
POS机
</a-tag>
<a-tag v-if="record.payType == 6">
<IdcardOutlined class="tag-icon" />
VIP月卡
</a-tag>
<a-tag v-if="record.payType == 7">
<IdcardOutlined class="tag-icon" />
VIP年卡
</a-tag>
<a-tag v-if="record.payType == 8">
<IdcardOutlined class="tag-icon" />
VIP次卡
</a-tag>
<a-tag v-if="record.payType == 9">
<IdcardOutlined class="tag-icon" />
IC月卡
</a-tag>
<a-tag v-if="record.payType == 10">
<IdcardOutlined class="tag-icon" />
IC年卡
</a-tag>
<a-tag v-if="record.payType == 11">
<IdcardOutlined class="tag-icon" />
IC次卡
</a-tag>
<a-tag v-if="record.payType == 12">
<IdcardOutlined class="tag-icon" />
免费
</a-tag>
<a-tag v-if="record.payType == 13">
<IdcardOutlined class="tag-icon" />
VIP充值卡
</a-tag>
<a-tag v-if="record.payType == 14">
<IdcardOutlined class="tag-icon" />
IC充值卡
</a-tag>
<a-tag v-if="record.payType == 15">
<IdcardOutlined class="tag-icon" />
积分支付
</a-tag>
<a-tag v-if="record.payType == 16">
<IdcardOutlined class="tag-icon" />
VIP季卡
</a-tag>
<a-tag v-if="record.payType == 17">
<IdcardOutlined class="tag-icon" />
IC季卡
</a-tag>
<span v-if="item.value == record.payType">{{ item.label }}</span>
</template>
<template v-else>
<span></span>
</template>
</template>
</template>
<template v-if="column.key === 'payStatus'">
<a-tag v-if="record.payStatus == 1" color="green" @click="updatePayStatus(record)">已付款</a-tag>
<a-tag v-if="record.payStatus == 0" @click="updatePayStatus(record)">未付款</a-tag>
@ -176,6 +113,7 @@ import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
import {updateShopOrder} from "@/api/shop/shopOrder";
import {message} from "ant-design-vue";
import {updateUser} from "@/api/system/user";
import {getPayType} from '@/utils/shop';
//
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);

Loading…
Cancel
Save