This commit is contained in:
2025-01-08 09:59:37 +08:00
parent bb0ca75b42
commit 026e45e9c1
76 changed files with 10046 additions and 3620 deletions
@@ -0,0 +1,306 @@
<!-- 编辑弹窗 -->
<template>
<ele-modal
:width="800"
:visible="visible"
:maskClosable="false"
:maxable="maxable"
:title="isUpdate ? '开具发票2' : '开具发票'"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
@ok="save"
>
<a-form
ref="formRef"
:model="form"
:rules="rules"
:label-col="styleResponsive ? { md: 4, sm: 5, xs: 24 } : { flex: '90px' }"
:wrapper-col="
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
"
>
<!-- <a-form-item label="订单编号" name="incoiveNum">-->
<!-- <a-input-->
<!-- allow-clear-->
<!-- placeholder="请输入发票的订单"-->
<!-- v-model:value="form.incoiveNum"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- <a-form-item label="纳税人识别号" name="incoiveCode">-->
<!-- <a-input-->
<!-- allow-clear-->
<!-- placeholder="请输入纳税人识别号"-->
<!-- v-model:value="form.incoiveCode"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- <a-form-item label="订单号" name="orderNum">-->
<!-- <a-input-->
<!-- allow-clear-->
<!-- placeholder="请输入订单号"-->
<!-- v-model:value="form.orderNum"-->
<!-- />-->
<!-- </a-form-item>-->
<a-form-item label="发票金额" name="price">
<a-input
allow-clear
placeholder="请输入发票金额"
v-model:value="form.price"
/>
</a-form-item>
<a-form-item label="单位名称" name="name">
<a-input
allow-clear
placeholder="请输入单位名称"
v-model:value="form.name"
/>
</a-form-item>
<a-form-item label="税号" name="code">
<a-input
allow-clear
placeholder="请输入税号"
v-model:value="form.code"
/>
</a-form-item>
<a-form-item label="开户行" name="bank">
<a-input
allow-clear
placeholder="请输入开户行"
v-model:value="form.bank"
/>
</a-form-item>
<a-form-item label="开户账号" name="account">
<a-input
allow-clear
placeholder="请输入开户账号"
v-model:value="form.account"
/>
</a-form-item>
<a-form-item label="单位地址" name="address">
<a-input
allow-clear
placeholder="请输入单位地址"
v-model:value="form.address"
/>
</a-form-item>
<a-form-item label="公司电话" name="tel">
<a-input
allow-clear
placeholder="请输入公司电话"
v-model:value="form.tel"
/>
</a-form-item>
<a-form-item label="手机号码" name="phone">
<a-input
allow-clear
placeholder="请输入手机号码"
v-model:value="form.phone"
/>
</a-form-item>
<a-form-item label="电子邮箱" name="email">
<a-input
allow-clear
placeholder="请输入电子邮箱"
v-model:value="form.email"
/>
</a-form-item>
<a-form-item label="备注信息" name="info">
<a-textarea
:rows="4"
:maxlength="200"
placeholder="请输入备注信息"
v-model:value="form.info"
/>
</a-form-item>
<a-form-item label="发票类型" name="type">
<a-radio-group v-model:value="form.type">
<a-radio :value="1">纸质发票</a-radio>
<a-radio :value="2">电子发票</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="发票类型" name="itype">
<a-radio-group v-model:value="form.itype" :disabled="true">
<a-radio :value="1">场地发票</a-radio>
<a-radio :value="2">vip卡发票</a-radio>
<a-radio :value="2">ic卡发票</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="发票类型" name="invoicetype">
<a-radio-group v-model:value="form.invoicetype">
<a-radio :value="1">普票</a-radio>
<a-radio :value="2">专票</a-radio>
</a-radio-group>
</a-form-item>
</a-form>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import {
addThinkInvoice,
doInvoice,
pageThinkInvoice,
updateThinkInvoice
} from '@/api/think/thinkInvoice';
import { ThinkInvoice } from '@/api/think/thinkInvoice/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
import { FormInstance } from 'ant-design-vue/es/form';
import { ThinkOrder } from '@/api/think/thinkOrder/model';
// 是否是修改
const isUpdate = ref(false);
const useForm = Form.useForm;
// 是否开启响应式布局
const themeStore = useThemeStore();
const { styleResponsive } = storeToRefs(themeStore);
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: ThinkOrder | null;
}>();
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 提交状态
const loading = ref(false);
// 是否显示最大化切换按钮
const maxable = ref(true);
// 表格选中数据
const formRef = ref<FormInstance | null>(null);
// 用户信息
const form = reactive<ThinkInvoice>({
id: undefined,
incoiveNum: undefined,
incoiveCode: undefined,
orderNum: undefined,
oid: undefined,
uid: undefined,
price: undefined,
name: undefined,
tel: undefined,
address: undefined,
bank: undefined,
account: undefined,
code: undefined,
phone: undefined,
email: undefined,
info: undefined,
isOpen: undefined,
type: 2,
itype: 1,
invoicetype: 1,
createTime: undefined,
updateTime: undefined
});
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 表单验证规则
const rules = reactive({
price: [
{
required: true,
type: 'number',
message: '请填写发票金额',
trigger: 'blur'
}
],
name: [
{
required: true,
type: 'string',
message: '请填写单位名称',
trigger: 'blur'
}
],
code: [
{
required: true,
type: 'string',
message: '请填写税号',
trigger: 'blur'
}
]
});
const onChangeInvoice = (data: ThinkInvoice) => {
console.log(data);
console.log(form);
};
const { resetFields } = useForm(form, rules);
/* 保存编辑 */
const save = () => {
if (!formRef.value) {
return;
}
formRef.value
.validate()
.then(() => {
loading.value = true;
const formData = {
...form
};
// const saveOrUpdate = isUpdate.value
// ? updateThinkInvoice
// : addThinkInvoice;
doInvoice(formData)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
watch(
() => props.visible,
(visible) => {
if (visible) {
// 第一次开票
isUpdate.value = false;
form.oid = props.data?.id;
form.price = props.data?.totalPrice;
form.incoiveNum = props.data?.orderNum;
form.orderNum = props.data?.orderNum;
form.vid = props.data?.vid;
form.phone = props.data?.phone;
// 开过票
pageThinkInvoice({ uid: props.data?.uid, limit: 1 }).then((res) => {
if (res && res.list.length > 0) {
assignObject(form, res?.list[0]);
isUpdate.value = true;
form.oid = props.data?.id;
form.price = props.data?.payPrice;
form.incoiveNum = props.data?.orderNum;
form.vid = props.data?.vid;
form.phone = props.data?.phone;
}
});
} else {
resetFields();
}
},
{ immediate: true }
);
</script>
@@ -0,0 +1,429 @@
<!-- 用户编辑弹窗 -->
<template>
<ele-modal
:width="`80%`"
:visible="visible"
:confirm-loading="loading"
:maxable="maxAble"
:title="isUpdate ? '编辑订单' : '订单详情'"
:body-style="{ paddingBottom: '8px', background: '#f3f3f3' }"
@update:visible="updateVisible"
:maskClosable="false"
:footer="null"
@ok="save"
>
<a-card class="order-card" :bordered="false">
<a-descriptions title="基本信息" :column="3">
<a-descriptions-item
label="订单号"
:labelStyle="{ width: '90px', color: '#808080' }"
>
{{ form.id }}
</a-descriptions-item>
<a-descriptions-item
label="订单编号"
:labelStyle="{ width: '90px', color: '#808080' }"
>
{{ form.orderNum }}
</a-descriptions-item>
<a-descriptions-item
label="订单状态"
:labelStyle="{ width: '90px', color: '#808080' }"
>
<a-tag v-if="form.orderStatus == 1">已完成</a-tag>
<a-tag v-if="form.orderStatus == 2">未使用</a-tag>
<a-tag v-if="form.orderStatus == 3">已取消</a-tag>
<a-tag v-if="form.orderStatus == 4">退款申请中</a-tag>
<a-tag v-if="form.orderStatus == 5">退款被拒绝</a-tag>
<a-tag v-if="form.orderStatus == 6">退款成功</a-tag>
<a-tag v-if="form.orderStatus == 7">客户端申请退款</a-tag>
</a-descriptions-item>
<a-descriptions-item
label="买家信息"
:labelStyle="{ width: '90px', color: '#808080' }"
>
{{ form.name }}
</a-descriptions-item>
<a-descriptions-item
label="手机号码"
:labelStyle="{ width: '90px', color: '#808080' }"
>
{{ form.phone }}
</a-descriptions-item>
<a-descriptions-item
label="交易流水号"
:labelStyle="{ width: '90px', color: '#808080' }"
>
{{ form.wechatOrder }}
</a-descriptions-item>
<a-descriptions-item
label="订单总金额"
:labelStyle="{ width: '90px', color: '#808080' }"
>
¥{{ form.totalPrice }}
</a-descriptions-item>
<a-descriptions-item
label="实付金额"
:labelStyle="{ width: '90px', color: '#808080' }"
>
¥{{ form.payPrice }}
</a-descriptions-item>
<a-descriptions-item
label="减少的金额"
:labelStyle="{ width: '90px', color: '#808080' }"
>
¥{{ form.reducePrice }}
</a-descriptions-item>
<a-descriptions-item
label="支付方式"
:labelStyle="{ width: '90px', color: '#808080' }"
>
<template v-if="form.payStatus == 1">
<a-tag v-if="form.payType == 0">余额支付</a-tag>
<a-tag v-if="form.payType == 1">微信支付</a-tag>
<a-tag v-if="form.payType == 2">积分</a-tag>
<a-tag v-if="form.payType == 3">支付宝</a-tag>
<a-tag v-if="form.payType == 4">现金</a-tag>
<a-tag v-if="form.payType == 5">POS机</a-tag>
<a-tag v-if="form.payType == 6">VIP月卡</a-tag>
<a-tag v-if="form.payType == 7">formVIP年卡</a-tag>
<a-tag v-if="form.payType == 8">formVIP次卡</a-tag>
<a-tag v-if="form.payType == 9">formIC月卡</a-tag>
<a-tag v-if="form.payType == 10">formIC年卡</a-tag>
<a-tag v-if="form.payType == 11">formIC次卡</a-tag>
<a-tag v-if="form.payType == 12">form免费</a-tag>
<a-tag v-if="form.payType == 13">formVIP充值卡</a-tag>
<a-tag v-if="form.payType == 14">formIC充值卡</a-tag>
<a-tag v-if="form.payType == 15">form积分支付</a-tag>
<a-tag v-if="form.payType == 16">formVIP季卡</a-tag>
<a-tag v-if="form.payType == 17">formIC季卡</a-tag>
</template>
<template v-else>
<span></span>
</template>
</a-descriptions-item>
<a-descriptions-item
label="支付状态"
:labelStyle="{ width: '90px', color: '#808080' }"
>
<a-tag v-if="form.payStatus == 1" color="green"
><CheckOutlined class="tag-icon" />已付款</a-tag
>
<a-tag v-if="form.payStatus == 0" color="error"
><CloseOutlined class="tag-icon" />未付款</a-tag
>
<a-tag v-if="form.payStatus == 3" color="cyan"
><CoffeeOutlined class="tag-icon" />未付款,占场中</a-tag
>
</a-descriptions-item>
<a-descriptions-item
label="付款时间"
:labelStyle="{ width: '90px', color: '#808080' }"
>
{{ toDateString(form.payTime, 'yyyy-MM-dd HH:mm') }}
</a-descriptions-item>
<a-descriptions-item
label="下单时间"
:labelStyle="{ width: '90px', color: '#808080' }"
>
{{ toDateString(form.createTime, 'yyyy-MM-dd HH:mm') }}
</a-descriptions-item>
<a-descriptions-item
label="信息备注"
:labelStyle="{ width: '90px', color: '#808080' }"
>
<div
>{{ form.siteName }} {{ form.dateTime }} ¥{{
form.totalPrice
}}元</div
>
</a-descriptions-item>
</a-descriptions>
</a-card>
<a-card class="order-card" :bordered="false">
<a-spin :spinning="loading">
<a-table
:data-source="orderInfo"
:columns="columns"
:pagination="false"
/>
</a-spin>
</a-card>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form } from 'ant-design-vue';
import { assignObject } from 'ele-admin-pro';
import { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
import {
CheckOutlined,
CloseOutlined,
CoffeeOutlined
} from '@ant-design/icons-vue';
import { ThinkOrder } from '@/api/think/thinkOrder/model';
import { ThinkOrderInfo } from '@/api/think/thinkOrderInfo/model';
import { pageThinkOrderInfo } from '@/api/think/thinkOrderInfo';
import { toDateString } from 'ele-admin-pro';
const useForm = Form.useForm;
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: ThinkOrder | null;
}>();
export interface step {
title?: String | undefined;
subTitle?: String | undefined;
description?: String | undefined;
}
// 是否是修改
const isUpdate = ref(false);
// 是否显示最大化切换按钮
const maxAble = ref(true);
// 订单信息
const orderInfo = ref<ThinkOrderInfo[]>([]);
// 步骤条
const steps = ref<step[]>([
{
title: '报餐',
description: undefined
},
{
title: '付款',
description: undefined
},
{
title: '发餐',
description: undefined
},
{
title: '取餐',
description: undefined
},
{
title: '完成',
description: undefined
}
]);
const active = ref(2);
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 订单信息
const form = reactive<ThinkOrder>({
id: undefined,
orderNum: undefined,
wechatOrder: undefined,
refundOrder: undefined,
sid: undefined,
uid: undefined,
cid: undefined,
vid: undefined,
aid: undefined,
adminId: undefined,
code: undefined,
name: undefined,
phone: undefined,
totalPrice: undefined,
reducePrice: undefined,
payPrice: undefined,
price: undefined,
money: undefined,
dateTime: undefined,
refundMoney: undefined,
coachPrice: undefined,
coachId: undefined,
payType: undefined,
payStatus: undefined,
orderStatus: undefined,
type: undefined,
qrcode: undefined,
desc2: undefined,
returnNum: undefined,
returnMoney: undefined,
startTime: undefined,
isInvoice: undefined,
createTime: undefined,
updateTime: undefined,
payTime: undefined,
refundTime: undefined,
refundApplyTime: undefined,
checkBill: undefined,
siteName: undefined
});
// 请求状态
const loading = ref(true);
const { resetFields } = useForm(form);
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
const columns = ref<ColumnItem[]>([
{
title: '场馆名称',
dataIndex: 'siteName',
key: 'siteName',
align: 'center'
},
{
title: '场地',
dataIndex: 'fieldName',
align: 'center'
},
{
title: '价格',
dataIndex: 'price',
align: 'center'
},
{
title: '儿童价',
dataIndex: 'childrenPrice',
align: 'center'
},
{
title: '成人数',
dataIndex: 'adultNum',
align: 'center'
},
{
title: '儿童数',
dataIndex: 'childrenNum',
align: 'center'
},
{
title: '预定信息',
dataIndex: 'dateTime',
key: 'dateTime',
align: 'center'
},
{
title: '是否免费',
dataIndex: 'isFree',
align: 'center',
customRender: ({ text }) => ['', '免费', '付费'][text]
}
]);
/* 制作步骤条 */
const loadSteps = (order) => {
steps.value = [];
steps.value.push({
title: '下单'
});
steps.value.push({
title: '付款'
});
steps.value.push({
title: '发货'
});
steps.value.push({
title: '收货'
});
steps.value.push({
title: '完成'
});
// 下单
if (order.payStatus == 10) {
active.value = 0;
steps.value[0].description = order.createTime;
}
// 付款
if (order.payStatus == 20) {
active.value = 1;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
}
// 发货
if (order.payStatus == 20 && order.deliveryStatus == 20) {
active.value = 2;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
steps.value[2].description = order.deliveryTime;
}
// 收货
if (order.payStatus == 20 && order.receiptStatus == 20) {
active.value = 3;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
steps.value[2].description = order.deliveryTime;
steps.value[3].description = order.receiptTime;
}
// 完成
if (order.payStatus == 20 && order.orderStatus == 30) {
active.value = 4;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
steps.value[2].description = order.deliveryTime;
steps.value[3].description = order.receiptTime;
}
// 已取消
if (order.orderStatus == 20) {
active.value = 4;
}
};
// const getOrderInfo = () => {
// const orderId = props.data?.orderId;
// listOrderInfo({ orderId }).then((data) => {
// orderInfo.value = data.filter((d) => d.totalNum > 0);
// });
// };
/* 保存编辑 */
const save = () => {};
watch(
() => props.visible,
(visible) => {
if (visible) {
if (props.data) {
loading.value = true;
assignObject(form, props.data);
pageThinkOrderInfo({ oid: form.id }).then((res) => {
if (res?.list) {
orderInfo.value = res?.list;
}
loading.value = false;
});
loadSteps(props.data);
}
} else {
resetFields();
}
}
);
</script>
<style lang="less" scoped>
.order-card {
margin-bottom: 20px;
}
.ant-form-item {
margin-bottom: 5px;
}
.order-info {
display: flex;
.info {
padding-left: 5px;
display: flex;
flex-direction: column;
}
}
.tag-icon {
padding-right: 6px;
}
</style>
@@ -0,0 +1,112 @@
<!-- 用户编辑弹窗 -->
<template>
<ele-modal
:width="`60%`"
:visible="visible"
:confirm-loading="loading"
title="退款"
:body-style="{ paddingBottom: '8px' }"
@update:visible="updateVisible"
:maskClosable="false"
@ok="save"
>
<a-form>
<a-form-item label="订单金额">
<span>{{ data.totalPrice }}元</span>
</a-form-item>
<a-form-item label="支付金额">
<span>{{ data.payPrice }}元</span>
</a-form-item>
<a-form-item label="退款金额">
<a-input-number placeholder="请输入退款金额" style="width: 300px" v-model:value="form.refundAmount"
:max="data.payPrice" />
</a-form-item>
</a-form>
</ele-modal>
</template>
<script lang="ts" setup>
import { reactive, ref, watch } from "vue";
import { ThinkOrder } from "@/api/think/thinkOrder/model";
import { ThinkOrderRefundLog } from "@/api/think/thinkOrderRefundLog/model";
import { message } from "ant-design-vue";
import { addThinkOrderRefundLog } from "@/api/think/thinkOrderRefundLog";
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data: ThinkOrder;
}>();
const emit = defineEmits<{
(e: "done"): void;
(e: "update:visible", visible: boolean): void;
}>();
const form = reactive<ThinkOrderRefundLog>({
int: undefined,
uid: undefined,
refundAmount: undefined,
sid: undefined,
oid: undefined,
status: 1,
type: 0
});
// 请求状态
const loading = ref(false);
/* 更新visible */
const updateVisible = (value: boolean) => {
emit("update:visible", value);
};
const save = async () => {
if (!form.refundAmount) return message.error("请输入退款金额");
loading.value = true;
await addThinkOrderRefundLog(form);
loading.value = false;
message.success("已提交");
updateVisible(false);
emit("done");
};
watch(
() => props.visible,
(visible) => {
if (visible) {
loading.value = false;
if (props.data) {
form.uid = props.data.uid;
form.oid = props.data.id;
form.sid = props.data.sid;
form.refundAmount = 0;
}
}
}
);
</script>
<style lang="less" scoped>
.order-card {
margin-bottom: 20px;
}
.ant-form-item {
margin-bottom: 5px;
}
.order-info {
display: flex;
.info {
padding-left: 5px;
display: flex;
flex-direction: column;
}
}
.tag-icon {
padding-right: 6px;
}
</style>
@@ -0,0 +1,166 @@
<!-- 搜索表单 -->
<template>
<div class="search">
<a-space class="flex items-center" :size="10" style="flex-wrap: wrap">
<span class="text-gray-400">付款状态</span>
<a-select v-model:value="where.payStatus" 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>
<span class="text-gray-400">订单状态</span>
<a-select v-model:value="where.orderStatus" 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">退款被拒</a-select-option>
<a-select-option :value="6">退款成功</a-select-option>
</a-select>
<span class="text-gray-400">付款方式</span>
<a-select 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>
<span class="text-gray-400">开票状态</span>
<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>
<ThinkSelectSite
:placeholder="`选择场馆`"
class="input-item"
v-model:value="where.siteName"
@done="chooseSiteId"
/>
<a-range-picker
v-model:value="dateRange"
@change="search"
value-format="YYYY-MM-DD"
class="ele-fluid"
/>
<a-input-search
allow-clear
placeholder="请输入订单号|编号|手机号"
v-model:value="where.keywords"
@pressEnter="search"
@search="search"
style="width: 380px"
/>
<a-button @click="reset">重置</a-button>
<a-button class="ele-btn-icon" :disabled="loading" @click="handleExport">
<template #icon>
<download-outlined />
</template>
<span>导出报表</span>
</a-button>
</a-space>
</div>
</template>
<script lang="ts" setup>
import useSearch from "@/utils/use-search";
import { ref, watch } from "vue";
import { ThinkOrderInfoParam } from "@/api/think/thinkOrderInfo/model";
import { utils, writeFile } from "xlsx";
import { message } from "ant-design-vue";
import { messageLoading, toDateString } from "ele-admin-pro";
import dayjs from "dayjs";
import { listThinkOrder, thinkOrderExport } from "@/api/think/thinkOrder";
import { ThinkOrder, ThinkOrderParam } from "@/api/think/thinkOrder/model";
import { ThinkSite } from "@/api/think/thinkSite/model";
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
const emit = defineEmits<{
(e: "search", where?: ThinkOrderInfoParam): void;
(e: "add"): void;
(e: "remove"): void;
(e: "advanced"): void;
}>();
// 表单数据
const { where, resetFields } = useSearch<ThinkOrderParam>({
sid: undefined,
siteName: undefined,
createTimeStart: undefined,
createTimeEnd: undefined,
timeStart: undefined,
timeEnd: undefined,
categoryId: undefined,
payStatus: undefined,
orderStatus: undefined,
payType: undefined,
isInvoice: undefined,
keywords: undefined
});
// 请求状态
const loading = ref(false);
// 日期范围选择
const dateRange = ref<[string, string]>(["", ""]);
const orders = ref<ThinkOrder[] | any[]>();
const xlsFileName = ref<string>();
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
xlsFileName.value = `${d1}至${d2}`;
where.timeStart = d1 ? dayjs(d1).valueOf() / 1000 : undefined;
where.timeEnd = d2 ? dayjs(d2).valueOf() / 1000 : undefined;
// where.createTimeStart = d1 ? d1 + ' 00:00:00' : undefined;
// where.createTimeEnd = d2 ? d2 + ' 00:00:00' : undefined;
emit("search", {
...where
});
};
const chooseSiteId = (data: ThinkSite) => {
where.sid = data.id;
where.siteName = data.name;
search();
};
/* 重置 */
const reset = () => {
resetFields();
search();
};
// 导出
const handleExport = async () => {
const hide = messageLoading("导出中...", 0);
const res = await thinkOrderExport(where);
hide();
window.open(res.url);
};
watch(
() => props.selection,
() => {
}
);
</script>
@@ -0,0 +1,465 @@
<!-- 编辑弹窗 -->
<template>
<ele-modal
:width="800"
:visible="visible"
:maskClosable="false"
:maxable="maxable"
:title="isUpdate ? '编辑' : '添加'"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
@ok="save"
>
<a-form
ref="formRef"
:model="form"
:rules="rules"
:label-col="styleResponsive ? { md: 4, sm: 5, xs: 24 } : { flex: '90px' }"
:wrapper-col="
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
"
>
<a-form-item label="订单号" name="orderNum">
<a-input
allow-clear
placeholder="请输入订单号"
v-model:value="form.orderNum"
/>
</a-form-item>
<a-form-item label="微信支付订单号" name="wechatOrder">
<a-input
allow-clear
placeholder="请输入微信支付订单号"
v-model:value="form.wechatOrder"
/>
</a-form-item>
<a-form-item label="微信退款订单号" name="refundOrder">
<a-input
allow-clear
placeholder="请输入微信退款订单号"
v-model:value="form.refundOrder"
/>
</a-form-item>
<a-form-item label="场馆id用于权限判断" name="sid">
<a-input
allow-clear
placeholder="请输入场馆id用于权限判断"
v-model:value="form.sid"
/>
</a-form-item>
<a-form-item label="用户id" name="uid">
<a-input
allow-clear
placeholder="请输入用户id"
v-model:value="form.uid"
/>
</a-form-item>
<a-form-item label="使用的优惠券id" name="cid">
<a-input
allow-clear
placeholder="请输入使用的优惠券id"
v-model:value="form.cid"
/>
</a-form-item>
<a-form-item label="使用的会员卡id" name="vid">
<a-input
allow-clear
placeholder="请输入使用的会员卡id"
v-model:value="form.vid"
/>
</a-form-item>
<a-form-item label="关联管理员id" name="aid">
<a-input
allow-clear
placeholder="请输入关联管理员id"
v-model:value="form.aid"
/>
</a-form-item>
<a-form-item label="核销管理员id" name="adminId">
<a-input
allow-clear
placeholder="请输入核销管理员id"
v-model:value="form.adminId"
/>
</a-form-item>
<a-form-item label="IC卡号" name="code">
<a-input
allow-clear
placeholder="请输入IC卡号"
v-model:value="form.code"
/>
</a-form-item>
<a-form-item label="真实姓名" name="name">
<a-input
allow-clear
placeholder="请输入真实姓名"
v-model:value="form.name"
/>
</a-form-item>
<a-form-item label="手机号码" name="phone">
<a-input
allow-clear
placeholder="请输入手机号码"
v-model:value="form.phone"
/>
</a-form-item>
<a-form-item label="订单总额" name="totalPrice">
<a-input
allow-clear
placeholder="请输入订单总额"
v-model:value="form.totalPrice"
/>
</a-form-item>
<a-form-item
label="减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格"
name="reducePrice"
>
<a-input
allow-clear
placeholder="请输入减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格"
v-model:value="form.reducePrice"
/>
</a-form-item>
<a-form-item label="实际付款" name="payPrice">
<a-input
allow-clear
placeholder="请输入实际付款"
v-model:value="form.payPrice"
/>
</a-form-item>
<a-form-item label="用于统计" name="price">
<a-input
allow-clear
placeholder="请输入用于统计"
v-model:value="form.price"
/>
</a-form-item>
<a-form-item label="价钱,用于积分赠送" name="money">
<a-input
allow-clear
placeholder="请输入价钱,用于积分赠送"
v-model:value="form.money"
/>
</a-form-item>
<a-form-item label="退款金额" name="refundMoney">
<a-input
allow-clear
placeholder="请输入退款金额"
v-model:value="form.refundMoney"
/>
</a-form-item>
<a-form-item label="教练价格" name="coachPrice">
<a-input
allow-clear
placeholder="请输入教练价格"
v-model:value="form.coachPrice"
/>
</a-form-item>
<a-form-item label="教练id" name="coachId">
<a-input
allow-clear
placeholder="请输入教练id"
v-model:value="form.coachId"
/>
</a-form-item>
<a-form-item
label="1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡"
name="payType"
>
<a-input
allow-clear
placeholder="请输入1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡"
v-model:value="form.payType"
/>
</a-form-item>
<a-form-item label="1已付款,2未付款" name="payStatus">
<a-input
allow-clear
placeholder="请输入1已付款,2未付款"
v-model:value="form.payStatus"
/>
</a-form-item>
<a-form-item
label="1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款"
name="orderStatus"
>
<a-input
allow-clear
placeholder="请输入1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款"
v-model:value="form.orderStatus"
/>
</a-form-item>
<a-form-item
label="优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡"
name="type"
>
<a-input
allow-clear
placeholder="请输入优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡"
v-model:value="form.type"
/>
</a-form-item>
<a-form-item
label="二维码地址,保存订单号,支付成功后才生成"
name="qrcode"
>
<a-input
allow-clear
placeholder="请输入二维码地址,保存订单号,支付成功后才生成"
v-model:value="form.qrcode"
/>
</a-form-item>
<a-form-item label="优惠说明" name="desc2">
<a-input
allow-clear
placeholder="请输入优惠说明"
v-model:value="form.desc2"
/>
</a-form-item>
<a-form-item label="vip月卡年卡、ic月卡年卡回退次数" name="returnNum">
<a-input
allow-clear
placeholder="请输入vip月卡年卡、ic月卡年卡回退次数"
v-model:value="form.returnNum"
/>
</a-form-item>
<a-form-item label="vip充值回退金额" name="returnMoney">
<a-input
allow-clear
placeholder="请输入vip充值回退金额"
v-model:value="form.returnMoney"
/>
</a-form-item>
<a-form-item label="预约详情开始时间数组" name="startTime">
<a-input
allow-clear
placeholder="请输入预约详情开始时间数组"
v-model:value="form.startTime"
/>
</a-form-item>
<a-form-item
label="是否已开具发票:1已开发票,2未开发票,3不能开具发票"
name="isInvoice"
>
<a-input
allow-clear
placeholder="请输入是否已开具发票:1已开发票,2未开发票,3不能开具发票"
v-model:value="form.isInvoice"
/>
</a-form-item>
<a-form-item label="" name="updateTime">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.updateTime"
/>
</a-form-item>
<a-form-item label="付款时间" name="payTime">
<a-input
allow-clear
placeholder="请输入付款时间"
v-model:value="form.payTime"
/>
</a-form-item>
<a-form-item label="退款时间" name="refundTime">
<a-input
allow-clear
placeholder="请输入退款时间"
v-model:value="form.refundTime"
/>
</a-form-item>
<a-form-item label="申请退款时间" name="refundApplyTime">
<a-input
allow-clear
placeholder="请输入申请退款时间"
v-model:value="form.refundApplyTime"
/>
</a-form-item>
<a-form-item
label="对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单"
name="checkBill"
>
<a-input
allow-clear
placeholder="请输入对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单"
v-model:value="form.checkBill"
/>
</a-form-item>
<a-form-item label="备注" name="comments">
<a-textarea
:rows="4"
:maxlength="200"
placeholder="请输入描述"
v-model:value="form.comments"
/>
</a-form-item>
</a-form>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addThinkOrder, updateThinkOrder } from '@/api/think/thinkOrder';
import { ThinkOrder } from '@/api/think/thinkOrder/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model';
// 是否是修改
const isUpdate = ref(false);
const useForm = Form.useForm;
// 是否开启响应式布局
const themeStore = useThemeStore();
const { styleResponsive } = storeToRefs(themeStore);
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: ThinkOrder | null;
}>();
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 提交状态
const loading = ref(false);
// 是否显示最大化切换按钮
const maxable = ref(true);
// 表格选中数据
const formRef = ref<FormInstance | null>(null);
const images = ref<ItemType[]>([]);
// 用户信息
const form = reactive<ThinkOrder>({
id: undefined,
orderNum: undefined,
wechatOrder: undefined,
refundOrder: undefined,
sid: undefined,
uid: undefined,
cid: undefined,
vid: undefined,
aid: undefined,
adminId: undefined,
code: undefined,
name: undefined,
phone: undefined,
totalPrice: undefined,
reducePrice: undefined,
payPrice: undefined,
price: undefined,
money: undefined,
refundMoney: undefined,
coachPrice: undefined,
coachId: undefined,
payType: undefined,
payStatus: undefined,
orderStatus: undefined,
type: undefined,
qrcode: undefined,
desc2: undefined,
returnNum: undefined,
returnMoney: undefined,
startTime: undefined,
isInvoice: undefined,
createTime: undefined,
updateTime: undefined,
payTime: undefined,
refundTime: undefined,
refundApplyTime: undefined,
checkBill: undefined
});
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 表单验证规则
const rules = reactive({
name: [
{
required: true,
type: 'string',
message: '请填写名称',
trigger: 'blur'
}
]
});
const chooseImage = (data: FileRecord) => {
images.value.push({
uid: data.id,
url: data.path,
status: 'done'
});
form.image = data.path;
};
const onDeleteItem = (index: number) => {
images.value.splice(index, 1);
form.image = '';
};
const { resetFields } = useForm(form, rules);
/* 保存编辑 */
const save = () => {
if (!formRef.value) {
return;
}
formRef.value
.validate()
.then(() => {
loading.value = true;
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateThinkOrder : addThinkOrder;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
watch(
() => props.visible,
(visible) => {
if (visible) {
images.value = [];
if (props.data) {
assignObject(form, props.data);
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
});
}
isUpdate.value = true;
} else {
isUpdate.value = false;
}
} else {
resetFields();
}
},
{ immediate: true }
);
</script>
+412
View File
@@ -0,0 +1,412 @@
<template>
<div class="page">
<div class="ele-body">
<a-card :bordered="false" :body-style="{ padding: '16px' }">
<ele-pro-table
ref="tableRef"
row-key="id"
:columns="columns"
:datasource="datasource"
:customRow="customRow"
:scroll="{ x: 800 }"
tool-class="ele-toolbar-form"
class="sys-org-table"
>
<template #toolbar>
<search
@search="reload"
:selection="selection"
@add="openEdit"
@remove="removeBatch"
@batchMove="openMove"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'image'">
<a-image :src="record.image" :width="50" />
</template>
<template v-if="column.key === 'dateTime'">
<div>{{ record.siteName }}</div>
<div>{{ record.dateTime }} ¥{{ record.totalPrice }}元</div>
</template>
<template v-if="column.key === 'payType'">
<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>
</template>
<template v-else>
<span></span>
</template>
</template>
<template v-if="column.key === 'payStatus'">
<a-tag v-if="record.payStatus == 2" color="error">
<CloseOutlined class="tag-icon" />
未付款
</a-tag>
<a-tag v-if="record.payStatus == 1" color="green">
<CheckOutlined class="tag-icon" />
已付款
</a-tag>
<a-tag
v-if="record.payStatus == 3 || record.payStatus == 0"
color="cyan">
<CoffeeOutlined class="tag-icon" />
未付款,占场中
</a-tag>
</template>
<template v-if="column.key === 'orderInfo'">
{{ record.orderInfoList }}
</template>
<template v-if="column.key === 'status'">
<a-tag v-if="record.status === 0" color="green">显示</a-tag>
<a-tag v-if="record.status === 1" color="red">隐藏</a-tag>
</template>
<template v-if="column.key === 'code'">
<span v-if="record.card">{{ record.card.code }}</span>
<span v-if="record.thinkVip">{{ record.thinkVip.code }}</span>
</template>
<template v-if="column.key === 'expiredTime'">
<span v-if="record.card">{{ dayjs(record.card.expireTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span>
<span v-if="record.thinkVip">{{ dayjs(record.thinkVip.expireTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}</span>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a @click="openEdit(record)">详情</a>
<a-divider type="vertical" />
<a @click="openRefund(record)"
v-if="record.payStatus === 1 && [1, 3].includes(record.payType) && [1, 2].includes(record.orderStatus)">退款</a>
</a-space>
</template>
</template>
</ele-pro-table>
</a-card>
<!-- 编辑弹窗 -->
<OrderInfo v-model:visible="showEdit" :data="current" @done="reload" />
<!-- 开具发票 -->
<Invoice v-model:visible="showInvoice" :data="current" @done="reload" />
<Refund v-model:visible="showRefund" :data="refundOrder" @done="reload" />
</div>
</div>
</template>
<script lang="ts" setup>
import { createVNode, ref } from "vue";
import { message, Modal } from "ant-design-vue";
import {
ExclamationCircleOutlined,
CheckOutlined,
CloseOutlined,
AlipayCircleOutlined
} from "@ant-design/icons-vue";
import { EleProTable, toDateString } from "ele-admin-pro";
import type {
DatasourceFunction,
ColumnItem
} from "ele-admin-pro/es/ele-pro-table/types";
import Search from "./components/search.vue";
import OrderInfo from "./components/orderInfo.vue";
import Invoice from "./components/invoice.vue";
import {
pageThinkOrder,
removeThinkOrder,
removeBatchThinkOrder
} from "@/api/think/thinkOrder";
import * as InvoiceApi from "@/api/think/thinkInvoice";
import type {
ThinkOrder,
ThinkOrderParam
} from "@/api/think/thinkOrder/model";
import { formatNumber } from "ele-admin-pro/es";
import type { ThinkInvoice } from "@/api/think/thinkInvoice/model";
import Refund from "@/views/think/thinkOrder/components/refund.vue";
import dayjs from "dayjs";
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格选中数据
const selection = ref<ThinkOrder[]>([]);
// 当前编辑数据
const current = ref<ThinkOrder | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 开具发票弹窗
const showInvoice = ref(false);
// 是否显示批量移动弹窗
const showMove = ref(false);
// 加载状态
const loading = ref(true);
// 表格数据源
const datasource: DatasourceFunction = ({
page,
limit,
where,
orders,
filters
}) => {
if (filters) {
where.status = filters.status;
}
where.forAdmin = true;
return pageThinkOrder({
...where,
...orders,
page,
limit
});
};
// 表格列配置
const columns = ref<ColumnItem[]>([
{
title: "场馆名称",
dataIndex: "siteName",
key: "iod",
width: 90
},
{
title: "下单时间",
dataIndex: "createTime",
align: "center",
customRender: ({ text }) => toDateString(text, "yyyy-MM-dd HH:mm:ss")
},
{
title: "单位",
dataIndex: "name",
key: "name",
align: "center"
},
{
title: "手机号",
dataIndex: "phone",
key: "phone",
width: 120,
align: "center"
},
{
title: "实际转账单位/个人",
dataIndex: "name",
key: "name",
align: "center"
},
{
title: "价格",
dataIndex: "totalPrice",
key: "totalPrice",
align: "center",
sorter: true,
customRender: ({ text }) => `¥${formatNumber(text)}`
},
{
title: "积分",
dataIndex: "totalPrice",
key: "totalPrice",
align: "center",
sorter: true,
customRender: ({ text }) => `¥${formatNumber(text)}`
},
{
title: "支付方式",
dataIndex: "payType",
key: "payType",
align: "center"
},
{
title: "预付卡号",
key: "code",
align: "center"
},
{
title: "预付卡到期时间",
key: "expiredTime",
align: "center",
sorter: true
}
]);
/* 搜索 */
const reload = (where?: ThinkOrderParam) => {
selection.value = [];
tableRef?.value?.reload({ where: where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: ThinkOrder) => {
current.value = row ?? null;
showEdit.value = true;
};
const showRefund = ref(false);
const refundOrder = ref<ThinkOrder>();
const openRefund = (row: ThinkOrder) => {
refundOrder.value = row;
showRefund.value = true;
};
/* 打开批量移动弹窗 */
const openMove = () => {
showMove.value = true;
};
/* 删除单个 */
const remove = (row: ThinkOrder) => {
const hide = message.loading("请求中..", 0);
removeThinkOrder(row.id)
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
};
/* 批量删除 */
const removeBatch = () => {
if (!selection.value.length) {
message.error("请至少选择一条数据");
return;
}
Modal.confirm({
title: "提示",
content: "确定要删除选中的记录吗?",
icon: createVNode(ExclamationCircleOutlined),
maskClosable: true,
onOk: () => {
const hide = message.loading("请求中..", 0);
removeBatchThinkOrder(selection.value.map((d) => d.id))
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
}
});
};
/* 开具发票 */
const onInvoice = (row?: ThinkOrder) => {
console.log(row?.payStatus);
if (row?.payStatus != 1) {
return false;
}
current.value = row ?? null;
showInvoice.value = true;
};
const openInvoicePdf = (row?: ThinkInvoice) => {
if (row?.id) {
InvoiceApi.showInvoice(row?.id).then((res) => {
const parse = JSON.parse(res);
const pdfUrl = parse[0].pdfUrl;
window.open(pdfUrl);
});
}
};
/* 查询 */
const query = () => {
loading.value = true;
};
/* 自定义行属性 */
const customRow = (record: ThinkOrder) => {
return {
// 行点击事件
onClick: () => {
// console.log(record);
},
// 行双击事件
onDblclick: () => {
openEdit(record);
}
};
};
query();
</script>
<script lang="ts">
import * as MenuIcons from "@/layout/menu-icons";
export default {
name: "ThinkOrder",
components: MenuIcons
};
</script>
<style lang="less" scoped>
.tag-icon {
padding-right: 6px;
}
</style>