feat: 流程类型筛选改从后端字典接口加载(保留静态兜底)

This commit is contained in:
weicw
2026-10-31 07:43:17 +08:00
parent 7ae4319102
commit 3f62712ecb
664 changed files with 12766 additions and 9498 deletions
+24 -11
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingCardPlanEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingCardPlanEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingCardPlanEdit from './components/bookingCardPlanEdit.vue';
import { pageBookingCardPlan, removeBookingCardPlan, removeBatchBookingCardPlan } from '@/api/booking/bookingCardPlan';
import type { BookingCardPlan, BookingCardPlanParam } from '@/api/booking/bookingCardPlan/model';
import {
pageBookingCardPlan,
removeBookingCardPlan,
removeBatchBookingCardPlan
} from '@/api/booking/bookingCardPlan';
import type {
BookingCardPlan,
BookingCardPlanParam
} from '@/api/booking/bookingCardPlan/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,37 +116,37 @@
dataIndex: 'cardPlanId',
key: 'cardPlanId',
align: 'center',
width: 90,
width: 90
},
{
title: '会员卡名称',
dataIndex: 'name',
key: 'name',
align: 'center',
align: 'center'
},
{
title: '标识',
dataIndex: 'code',
key: 'code',
align: 'center',
align: 'center'
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
align: 'center'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '排序号',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -150,7 +161,7 @@
title: '修改时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
align: 'center'
},
{
title: '操作',
@@ -207,7 +218,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingCardPlan(selection.value.map((d) => d.bookingCardPlanId))
removeBatchBookingCardPlan(
selection.value.map((d) => d.bookingCardPlanId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -107,9 +107,7 @@
import { listMerchant } from '@/api/shop/merchant';
import { getNext7day, getServerTime } from '@/api/layout';
import { getWeek } from '@/utils/common';
import {
listBookingPeriod
} from '@/api/booking/bookingPeriod';
import { listBookingPeriod } from '@/api/booking/bookingPeriod';
import {
BookingPeriod,
BookingPeriodParam
@@ -33,17 +33,15 @@
v-model:value="form.phone"
/>
</a-form-item>
<a-form-item
label="图片"
name="image">
<SelectFile
:placeholder="`请选择图片`"
:limit="1"
:data="images"
@done="chooseImage"
@del="onDeleteItem"
/>
</a-form-item>
<a-form-item label="图片" name="image">
<SelectFile
:placeholder="`请选择图片`"
:limit="1"
:data="images"
@done="chooseImage"
@del="onDeleteItem"
/>
</a-form-item>
<a-form-item label="备注" name="comments">
<a-textarea
:rows="4"
@@ -75,7 +73,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingCooperate, updateBookingCooperate } from '@/api/booking/bookingCooperate';
import {
addBookingCooperate,
updateBookingCooperate
} from '@/api/booking/bookingCooperate';
import { BookingCooperate } from '@/api/booking/bookingCooperate/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -168,7 +169,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingCooperate : addBookingCooperate;
const saveOrUpdate = isUpdate.value
? updateBookingCooperate
: addBookingCooperate;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -191,12 +194,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+24 -11
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingCooperateEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingCooperateEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingCooperateEdit from './components/bookingCooperateEdit.vue';
import { pageBookingCooperate, removeBookingCooperate, removeBatchBookingCooperate } from '@/api/booking/bookingCooperate';
import type { BookingCooperate, BookingCooperateParam } from '@/api/booking/bookingCooperate/model';
import {
pageBookingCooperate,
removeBookingCooperate,
removeBatchBookingCooperate
} from '@/api/booking/bookingCooperate';
import type {
BookingCooperate,
BookingCooperateParam
} from '@/api/booking/bookingCooperate/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,43 +116,43 @@
dataIndex: 'cooperateId',
key: 'cooperateId',
align: 'center',
width: 90,
width: 90
},
{
title: '部门名称',
dataIndex: 'name',
key: 'name',
align: 'center',
align: 'center'
},
{
title: '咨询电话',
dataIndex: 'phone',
key: 'phone',
align: 'center',
align: 'center'
},
{
title: '图片',
dataIndex: 'image',
key: 'image',
align: 'center',
align: 'center'
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
align: 'center'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '排序号',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -207,7 +218,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingCooperate(selection.value.map((d) => d.bookingCooperateId))
removeBatchBookingCooperate(
selection.value.map((d) => d.bookingCooperateId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -40,17 +40,15 @@
v-model:value="form.phone"
/>
</a-form-item>
<a-form-item
label="图片"
name="image">
<SelectFile
:placeholder="`请选择图片`"
:limit="1"
:data="images"
@done="chooseImage"
@del="onDeleteItem"
/>
</a-form-item>
<a-form-item label="图片" name="image">
<SelectFile
:placeholder="`请选择图片`"
:limit="1"
:data="images"
@done="chooseImage"
@del="onDeleteItem"
/>
</a-form-item>
<a-form-item label="备注" name="comments">
<a-textarea
:rows="4"
@@ -82,7 +80,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingCooperateLog, updateBookingCooperateLog } from '@/api/booking/bookingCooperateLog';
import {
addBookingCooperateLog,
updateBookingCooperateLog
} from '@/api/booking/bookingCooperateLog';
import { BookingCooperateLog } from '@/api/booking/bookingCooperateLog/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -181,7 +182,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingCooperateLog : addBookingCooperateLog;
const saveOrUpdate = isUpdate.value
? updateBookingCooperateLog
: addBookingCooperateLog;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -204,12 +207,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+25 -12
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingCooperateLogEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingCooperateLogEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingCooperateLogEdit from './components/bookingCooperateLogEdit.vue';
import { pageBookingCooperateLog, removeBookingCooperateLog, removeBatchBookingCooperateLog } from '@/api/booking/bookingCooperateLog';
import type { BookingCooperateLog, BookingCooperateLogParam } from '@/api/booking/bookingCooperateLog/model';
import {
pageBookingCooperateLog,
removeBookingCooperateLog,
removeBatchBookingCooperateLog
} from '@/api/booking/bookingCooperateLog';
import type {
BookingCooperateLog,
BookingCooperateLogParam
} from '@/api/booking/bookingCooperateLog/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,49 +116,49 @@
dataIndex: 'logId',
key: 'logId',
align: 'center',
width: 90,
width: 90
},
{
title: '关联ID',
dataIndex: 'cooperateId',
key: 'cooperateId',
align: 'center',
align: 'center'
},
{
title: '部门名称',
dataIndex: 'name',
key: 'name',
align: 'center',
align: 'center'
},
{
title: '咨询电话',
dataIndex: 'phone',
key: 'phone',
align: 'center',
align: 'center'
},
{
title: '图片',
dataIndex: 'image',
key: 'image',
align: 'center',
align: 'center'
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
align: 'center'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '排序号',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -213,7 +224,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingCooperateLog(selection.value.map((d) => d.bookingCooperateLogId))
removeBatchBookingCooperateLog(
selection.value.map((d) => d.bookingCooperateLogId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -147,7 +147,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingCoupon, updateBookingCoupon } from '@/api/booking/bookingCoupon';
import {
addBookingCoupon,
updateBookingCoupon
} from '@/api/booking/bookingCoupon';
import { BookingCoupon } from '@/api/booking/bookingCoupon/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -256,7 +259,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingCoupon : addBookingCoupon;
const saveOrUpdate = isUpdate.value
? updateBookingCoupon
: addBookingCoupon;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -279,12 +284,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+32 -21
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingCouponEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingCouponEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingCouponEdit from './components/bookingCouponEdit.vue';
import { pageBookingCoupon, removeBookingCoupon, removeBatchBookingCoupon } from '@/api/booking/bookingCoupon';
import type { BookingCoupon, BookingCouponParam } from '@/api/booking/bookingCoupon/model';
import {
pageBookingCoupon,
removeBookingCoupon,
removeBatchBookingCoupon
} from '@/api/booking/bookingCoupon';
import type {
BookingCoupon,
BookingCouponParam
} from '@/api/booking/bookingCoupon/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,103 +116,103 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '优惠券名称',
dataIndex: 'name',
key: 'name',
align: 'center',
align: 'center'
},
{
title: '优惠券类型(10满减券 20折扣券)',
dataIndex: 'type',
key: 'type',
align: 'center',
align: 'center'
},
{
title: '满减券-减免金额',
dataIndex: 'reducePrice',
key: 'reducePrice',
align: 'center',
align: 'center'
},
{
title: '折扣券-折扣率(0-100)',
dataIndex: 'discount',
key: 'discount',
align: 'center',
align: 'center'
},
{
title: '最低消费金额',
dataIndex: 'minPrice',
key: 'minPrice',
align: 'center',
align: 'center'
},
{
title: '到期类型(10领取后生效 20固定时间)',
dataIndex: 'expireType',
key: 'expireType',
align: 'center',
align: 'center'
},
{
title: '领取后生效-有效天数',
dataIndex: 'expireDay',
key: 'expireDay',
align: 'center',
align: 'center'
},
{
title: '有效期开始时间',
dataIndex: 'startTime',
key: 'startTime',
align: 'center',
align: 'center'
},
{
title: '有效期结束时间',
dataIndex: 'endTime',
key: 'endTime',
align: 'center',
align: 'center'
},
{
title: '适用范围(10全部商品 20指定商品)',
dataIndex: 'applyRange',
key: 'applyRange',
align: 'center',
align: 'center'
},
{
title: '适用范围配置(json格式)',
dataIndex: 'applyRangeConfig',
key: 'applyRangeConfig',
align: 'center',
align: 'center'
},
{
title: '是否过期(0未过期 1已过期)',
dataIndex: 'isExpire',
key: 'isExpire',
align: 'center',
align: 'center'
},
{
title: '排序(数字越小越靠前)',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '状态, 0待使用, 1已使用, 2已失效',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '是否删除, 0否, 1是',
dataIndex: 'deleted',
key: 'deleted',
align: 'center',
align: 'center'
},
{
title: '用户ID',
dataIndex: 'userId',
key: 'userId',
align: 'center',
align: 'center'
},
{
title: '注册时间',
@@ -216,7 +227,7 @@
title: '修改时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
align: 'center'
},
{
title: '操作',
@@ -78,7 +78,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingEmergency, updateBookingEmergency } from '@/api/booking/bookingEmergency';
import {
addBookingEmergency,
updateBookingEmergency
} from '@/api/booking/bookingEmergency';
import { BookingEmergency } from '@/api/booking/bookingEmergency/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -177,7 +180,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingEmergency : addBookingEmergency;
const saveOrUpdate = isUpdate.value
? updateBookingEmergency
: addBookingEmergency;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -200,12 +205,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+25 -12
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingEmergencyEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingEmergencyEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingEmergencyEdit from './components/bookingEmergencyEdit.vue';
import { pageBookingEmergency, removeBookingEmergency, removeBatchBookingEmergency } from '@/api/booking/bookingEmergency';
import type { BookingEmergency, BookingEmergencyParam } from '@/api/booking/bookingEmergency/model';
import {
pageBookingEmergency,
removeBookingEmergency,
removeBatchBookingEmergency
} from '@/api/booking/bookingEmergency';
import type {
BookingEmergency,
BookingEmergencyParam
} from '@/api/booking/bookingEmergency/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,49 +116,49 @@
dataIndex: 'emergencyId',
key: 'emergencyId',
align: 'center',
width: 90,
width: 90
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
align: 'center',
align: 'center'
},
{
title: '手机号',
dataIndex: 'phone',
key: 'phone',
align: 'center',
align: 'center'
},
{
title: '关联用户',
dataIndex: 'userId',
key: 'userId',
align: 'center',
align: 'center'
},
{
title: '商户ID',
dataIndex: 'merchantId',
key: 'merchantId',
align: 'center',
align: 'center'
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
align: 'center'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '排序号',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -213,7 +224,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingEmergency(selection.value.map((d) => d.bookingEmergencyId))
removeBatchBookingEmergency(
selection.value.map((d) => d.bookingEmergencyId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -106,7 +106,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingField, updateBookingField } from '@/api/booking/bookingField';
import {
addBookingField,
updateBookingField
} from '@/api/booking/bookingField';
import { BookingField } from '@/api/booking/bookingField/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -209,7 +212,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingField : addBookingField;
const saveOrUpdate = isUpdate.value
? updateBookingField
: addBookingField;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -232,12 +237,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -55,11 +55,7 @@
/>
</a-form-item>
<a-form-item label="天" name="day">
<a-input
allow-clear
placeholder="请输入天"
v-model:value="form.day"
/>
<a-input allow-clear placeholder="请输入天" v-model:value="form.day" />
</a-form-item>
</a-form>
</ele-modal>
@@ -69,7 +65,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingIntegral, updateBookingIntegral } from '@/api/booking/bookingIntegral';
import {
addBookingIntegral,
updateBookingIntegral
} from '@/api/booking/bookingIntegral';
import { BookingIntegral } from '@/api/booking/bookingIntegral/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -167,7 +166,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingIntegral : addBookingIntegral;
const saveOrUpdate = isUpdate.value
? updateBookingIntegral
: addBookingIntegral;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -190,12 +191,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -90,7 +90,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingIntegralLog, updateBookingIntegralLog } from '@/api/booking/bookingIntegralLog';
import {
addBookingIntegralLog,
updateBookingIntegralLog
} from '@/api/booking/bookingIntegralLog';
import { BookingIntegralLog } from '@/api/booking/bookingIntegralLog/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -191,7 +194,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingIntegralLog : addBookingIntegralLog;
const saveOrUpdate = isUpdate.value
? updateBookingIntegralLog
: addBookingIntegralLog;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -214,12 +219,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+27 -14
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingIntegralLogEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingIntegralLogEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingIntegralLogEdit from './components/bookingIntegralLogEdit.vue';
import { pageBookingIntegralLog, removeBookingIntegralLog, removeBatchBookingIntegralLog } from '@/api/booking/bookingIntegralLog';
import type { BookingIntegralLog, BookingIntegralLogParam } from '@/api/booking/bookingIntegralLog/model';
import {
pageBookingIntegralLog,
removeBookingIntegralLog,
removeBatchBookingIntegralLog
} from '@/api/booking/bookingIntegralLog';
import type {
BookingIntegralLog,
BookingIntegralLogParam
} from '@/api/booking/bookingIntegralLog/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,61 +116,61 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '场馆订单号',
dataIndex: 'orderNum',
key: 'orderNum',
align: 'center',
align: 'center'
},
{
title: '订单id',
dataIndex: 'oid',
key: 'oid',
align: 'center',
align: 'center'
},
{
title: '场馆名称',
dataIndex: 'siteName',
key: 'siteName',
align: 'center',
align: 'center'
},
{
title: '微信昵称',
dataIndex: 'username',
key: 'username',
align: 'center',
align: 'center'
},
{
title: '手机号码',
dataIndex: 'phone',
key: 'phone',
align: 'center',
align: 'center'
},
{
title: '获得积分',
dataIndex: 'integral',
key: 'integral',
align: 'center',
align: 'center'
},
{
title: '变化前积分',
dataIndex: 'oldMoney',
key: 'oldMoney',
align: 'center',
align: 'center'
},
{
title: '变化后积分',
dataIndex: 'newMoney',
key: 'newMoney',
align: 'center',
align: 'center'
},
{
title: '描述',
dataIndex: 'info',
key: 'info',
align: 'center',
align: 'center'
},
{
title: '记录时间',
@@ -225,7 +236,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingIntegralLog(selection.value.map((d) => d.bookingIntegralLogId))
removeBatchBookingIntegralLog(
selection.value.map((d) => d.bookingIntegralLogId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -26,17 +26,15 @@
v-model:value="form.name"
/>
</a-form-item>
<a-form-item
label="项目图标"
name="image">
<SelectFile
:placeholder="`请选择图片`"
:limit="1"
:data="images"
@done="chooseImage"
@del="onDeleteItem"
/>
</a-form-item>
<a-form-item label="项目图标" name="image">
<SelectFile
:placeholder="`请选择图片`"
:limit="1"
:data="images"
@done="chooseImage"
@del="onDeleteItem"
/>
</a-form-item>
<a-form-item label="项目备注" name="comments">
<a-textarea
:rows="4"
@@ -165,7 +163,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingItem : addBookingItem;
const saveOrUpdate = isUpdate.value
? updateBookingItem
: addBookingItem;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -188,12 +188,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -110,7 +110,10 @@
v-model:value="form.totalPrice"
/>
</a-form-item>
<a-form-item label="减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格" name="reducePrice">
<a-form-item
label="减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格"
name="reducePrice"
>
<a-input
allow-clear
placeholder="请输入减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格"
@@ -159,7 +162,10 @@
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-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季卡"
@@ -173,21 +179,30 @@
v-model:value="form.payStatus"
/>
</a-form-item>
<a-form-item label="1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款" name="orderStatus">
<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-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-form-item
label="二维码地址,保存订单号,支付成功后才生成"
name="qrcode"
>
<a-input
allow-clear
placeholder="请输入二维码地址,保存订单号,支付成功后才生成"
@@ -222,7 +237,10 @@
v-model:value="form.startTime"
/>
</a-form-item>
<a-form-item label="是否已开具发票:1已开发票,2未开发票,3不能开具发票" name="isInvoice">
<a-form-item
label="是否已开具发票:1已开发票,2未开发票,3不能开具发票"
name="isInvoice"
>
<a-input
allow-clear
placeholder="请输入是否已开具发票:1已开发票,2未开发票,3不能开具发票"
@@ -257,7 +275,10 @@
v-model:value="form.refundApplyTime"
/>
</a-form-item>
<a-form-item label="对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单" name="checkBill">
<a-form-item
label="对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单"
name="checkBill"
>
<a-input
allow-clear
placeholder="请输入对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单"
@@ -280,7 +301,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingOrder, updateBookingOrder } from '@/api/booking/bookingOrder';
import {
addBookingOrder,
updateBookingOrder
} from '@/api/booking/bookingOrder';
import { BookingOrder } from '@/api/booking/bookingOrder/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -403,7 +427,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingOrder : addBookingOrder;
const saveOrUpdate = isUpdate.value
? updateBookingOrder
: addBookingOrder;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -426,12 +452,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -89,7 +89,10 @@
v-model:value="form.childrenNum"
/>
</a-form-item>
<a-form-item label="1已付款,2未付款,3无需付款或占用状态" name="payStatus">
<a-form-item
label="1已付款,2未付款,3无需付款或占用状态"
name="payStatus"
>
<a-input
allow-clear
placeholder="请输入1已付款,2未付款,3无需付款或占用状态"
@@ -153,7 +156,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingOrderInfo, updateBookingOrderInfo } from '@/api/booking/bookingOrderInfo';
import {
addBookingOrderInfo,
updateBookingOrderInfo
} from '@/api/booking/bookingOrderInfo';
import { BookingOrderInfo } from '@/api/booking/bookingOrderInfo/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -257,7 +263,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingOrderInfo : addBookingOrderInfo;
const saveOrUpdate = isUpdate.value
? updateBookingOrderInfo
: addBookingOrderInfo;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -280,12 +288,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+36 -23
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingOrderInfoEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingOrderInfoEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingOrderInfoEdit from './components/bookingOrderInfoEdit.vue';
import { pageBookingOrderInfo, removeBookingOrderInfo, removeBatchBookingOrderInfo } from '@/api/booking/bookingOrderInfo';
import type { BookingOrderInfo, BookingOrderInfoParam } from '@/api/booking/bookingOrderInfo/model';
import {
pageBookingOrderInfo,
removeBookingOrderInfo,
removeBatchBookingOrderInfo
} from '@/api/booking/bookingOrderInfo';
import type {
BookingOrderInfo,
BookingOrderInfoParam
} from '@/api/booking/bookingOrderInfo/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,115 +116,115 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '关联订单表id',
dataIndex: 'oid',
key: 'oid',
align: 'center',
align: 'center'
},
{
title: '关联场馆id',
dataIndex: 'sid',
key: 'sid',
align: 'center',
align: 'center'
},
{
title: '关联场地id',
dataIndex: 'fid',
key: 'fid',
align: 'center',
align: 'center'
},
{
title: '场馆',
dataIndex: 'siteName',
key: 'siteName',
align: 'center',
align: 'center'
},
{
title: '场地',
dataIndex: 'fieldName',
key: 'fieldName',
align: 'center',
align: 'center'
},
{
title: '预约时间段',
dataIndex: 'dateTime',
key: 'dateTime',
align: 'center',
align: 'center'
},
{
title: '单价',
dataIndex: 'price',
key: 'price',
align: 'center',
align: 'center'
},
{
title: '儿童价',
dataIndex: 'childrenPrice',
key: 'childrenPrice',
align: 'center',
align: 'center'
},
{
title: '成人人数',
dataIndex: 'adultNum',
key: 'adultNum',
align: 'center',
align: 'center'
},
{
title: '儿童人数',
dataIndex: 'childrenNum',
key: 'childrenNum',
align: 'center',
align: 'center'
},
{
title: '1已付款,2未付款,3无需付款或占用状态',
dataIndex: 'payStatus',
key: 'payStatus',
align: 'center',
align: 'center'
},
{
title: '是否免费:1免费、2收费',
dataIndex: 'isFree',
key: 'isFree',
align: 'center',
align: 'center'
},
{
title: '是否支持儿童票:1支持,2不支持',
dataIndex: 'isChildren',
key: 'isChildren',
align: 'center',
align: 'center'
},
{
title: '预订类型:1全场,2半场',
dataIndex: 'type',
key: 'type',
align: 'center',
align: 'center'
},
{
title: '组合数据:日期+时间段+场馆id+场地id',
dataIndex: 'mergeData',
key: 'mergeData',
align: 'center',
align: 'center'
},
{
title: '开场时间',
dataIndex: 'startTime',
key: 'startTime',
align: 'center',
align: 'center'
},
{
title: '下单时间',
dataIndex: 'orderTime',
key: 'orderTime',
align: 'center',
align: 'center'
},
{
title: '毫秒时间戳',
dataIndex: 'timeFlag',
key: 'timeFlag',
align: 'center',
align: 'center'
},
{
title: '操作',
@@ -270,7 +281,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingOrderInfo(selection.value.map((d) => d.bookingOrderInfoId))
removeBatchBookingOrderInfo(
selection.value.map((d) => d.bookingOrderInfoId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -120,7 +120,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingPeriod, updateBookingPeriod } from '@/api/booking/bookingPeriod';
import {
addBookingPeriod,
updateBookingPeriod
} from '@/api/booking/bookingPeriod';
import { BookingPeriod } from '@/api/booking/bookingPeriod/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -225,7 +228,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingPeriod : addBookingPeriod;
const saveOrUpdate = isUpdate.value
? updateBookingPeriod
: addBookingPeriod;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -248,12 +253,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -350,7 +350,7 @@
status: 'done'
});
}
console.log(images.value)
console.log(images.value);
if (props.data.files) {
const arr = JSON.parse(props.data.files);
arr.map((item) => {
@@ -97,11 +97,7 @@
/>
</a-form-item>
<a-form-item label="" name="idcard">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.idcard"
/>
<a-input allow-clear placeholder="请输入" v-model:value="form.idcard" />
</a-form-item>
<a-form-item label="" name="truename">
<a-input
@@ -231,7 +227,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingUser : addBookingUser;
const saveOrUpdate = isUpdate.value
? updateBookingUser
: addBookingUser;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -254,12 +252,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -165,7 +165,10 @@
v-model:value="form.month"
/>
</a-form-item>
<a-form-item label="IC卡类型:1年卡,2次卡,3月卡,4会员IC卡,5充值卡 " name="type">
<a-form-item
label="IC卡类型:1年卡,2次卡,3月卡,4会员IC卡,5充值卡 "
name="type"
>
<a-input
allow-clear
placeholder="请输入IC卡类型:1年卡,2次卡,3月卡,4会员IC卡,5充值卡 "
@@ -200,7 +203,10 @@
v-model:value="form.prices"
/>
</a-form-item>
<a-form-item label="1微信支付,2支付宝支付,3现金,4POS机刷卡,15平安健康卡" name="payType">
<a-form-item
label="1微信支付,2支付宝支付,3现金,4POS机刷卡,15平安健康卡"
name="payType"
>
<a-input
allow-clear
placeholder="请输入1微信支付,2支付宝支付,3现金,4POS机刷卡,15平安健康卡"
@@ -214,7 +220,10 @@
v-model:value="form.isIntegral"
/>
</a-form-item>
<a-form-item label="是否已开具发票:1已开发票,2未开发票" name="isInvoice">
<a-form-item
label="是否已开具发票:1已开发票,2未开发票"
name="isInvoice"
>
<a-input
allow-clear
placeholder="请输入是否已开具发票:1已开发票,2未开发票"
@@ -292,7 +301,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingUserCard, updateBookingUserCard } from '@/api/booking/bookingUserCard';
import {
addBookingUserCard,
updateBookingUserCard
} from '@/api/booking/bookingUserCard';
import { BookingUserCard } from '@/api/booking/bookingUserCard/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -422,7 +434,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingUserCard : addBookingUserCard;
const saveOrUpdate = isUpdate.value
? updateBookingUserCard
: addBookingUserCard;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -445,12 +459,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -161,7 +161,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingUserCoupon, updateBookingUserCoupon } from '@/api/booking/bookingUserCoupon';
import {
addBookingUserCoupon,
updateBookingUserCoupon
} from '@/api/booking/bookingUserCoupon';
import { BookingUserCoupon } from '@/api/booking/bookingUserCoupon/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -272,7 +275,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingUserCoupon : addBookingUserCoupon;
const saveOrUpdate = isUpdate.value
? updateBookingUserCoupon
: addBookingUserCoupon;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -295,12 +300,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+37 -24
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingUserCouponEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingUserCouponEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingUserCouponEdit from './components/bookingUserCouponEdit.vue';
import { pageBookingUserCoupon, removeBookingUserCoupon, removeBatchBookingUserCoupon } from '@/api/booking/bookingUserCoupon';
import type { BookingUserCoupon, BookingUserCouponParam } from '@/api/booking/bookingUserCoupon/model';
import {
pageBookingUserCoupon,
removeBookingUserCoupon,
removeBatchBookingUserCoupon
} from '@/api/booking/bookingUserCoupon';
import type {
BookingUserCoupon,
BookingUserCouponParam
} from '@/api/booking/bookingUserCoupon/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,115 +116,115 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '优惠劵id',
dataIndex: 'couponId',
key: 'couponId',
align: 'center',
align: 'center'
},
{
title: '优惠券名称',
dataIndex: 'name',
key: 'name',
align: 'center',
align: 'center'
},
{
title: '优惠券类型(10满减券 20折扣券)',
dataIndex: 'type',
key: 'type',
align: 'center',
align: 'center'
},
{
title: '满减券-减免金额',
dataIndex: 'reducePrice',
key: 'reducePrice',
align: 'center',
align: 'center'
},
{
title: '折扣券-折扣率(0-100)',
dataIndex: 'discount',
key: 'discount',
align: 'center',
align: 'center'
},
{
title: '最低消费金额',
dataIndex: 'minPrice',
key: 'minPrice',
align: 'center',
align: 'center'
},
{
title: '到期类型(10领取后生效 20固定时间)',
dataIndex: 'expireType',
key: 'expireType',
align: 'center',
align: 'center'
},
{
title: '领取后生效-有效天数',
dataIndex: 'expireDay',
key: 'expireDay',
align: 'center',
align: 'center'
},
{
title: '有效期开始时间',
dataIndex: 'startTime',
key: 'startTime',
align: 'center',
align: 'center'
},
{
title: '有效期结束时间',
dataIndex: 'endTime',
key: 'endTime',
align: 'center',
align: 'center'
},
{
title: '适用范围(10全部商品 20指定商品)',
dataIndex: 'applyRange',
key: 'applyRange',
align: 'center',
align: 'center'
},
{
title: '适用范围配置(json格式)',
dataIndex: 'applyRangeConfig',
key: 'applyRangeConfig',
align: 'center',
align: 'center'
},
{
title: '是否过期(0未过期 1已过期)',
dataIndex: 'isExpire',
key: 'isExpire',
align: 'center',
align: 'center'
},
{
title: '是否已使用(0未使用 1已使用)',
dataIndex: 'isUse',
key: 'isUse',
align: 'center',
align: 'center'
},
{
title: '排序(数字越小越靠前)',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '状态, 0待使用, 1已使用, 2已失效',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '是否删除, 0否, 1是',
dataIndex: 'deleted',
key: 'deleted',
align: 'center',
align: 'center'
},
{
title: '用户ID',
dataIndex: 'userId',
key: 'userId',
align: 'center',
align: 'center'
},
{
title: '注册时间',
@@ -228,7 +239,7 @@
title: '修改时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
align: 'center'
},
{
title: '操作',
@@ -285,7 +296,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingUserCoupon(selection.value.map((d) => d.bookingUserCouponId))
removeBatchBookingUserCoupon(
selection.value.map((d) => d.bookingUserCouponId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -78,7 +78,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingUserEmergency, updateBookingUserEmergency } from '@/api/booking/bookingUserEmergency';
import {
addBookingUserEmergency,
updateBookingUserEmergency
} from '@/api/booking/bookingUserEmergency';
import { BookingUserEmergency } from '@/api/booking/bookingUserEmergency/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -176,7 +179,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingUserEmergency : addBookingUserEmergency;
const saveOrUpdate = isUpdate.value
? updateBookingUserEmergency
: addBookingUserEmergency;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -199,12 +204,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingUserEmergencyEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingUserEmergencyEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingUserEmergencyEdit from './components/bookingUserEmergencyEdit.vue';
import { pageBookingUserEmergency, removeBookingUserEmergency, removeBatchBookingUserEmergency } from '@/api/booking/bookingUserEmergency';
import type { BookingUserEmergency, BookingUserEmergencyParam } from '@/api/booking/bookingUserEmergency/model';
import {
pageBookingUserEmergency,
removeBookingUserEmergency,
removeBatchBookingUserEmergency
} from '@/api/booking/bookingUserEmergency';
import type {
BookingUserEmergency,
BookingUserEmergencyParam
} from '@/api/booking/bookingUserEmergency/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,43 +116,43 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '用户id',
dataIndex: 'uid',
key: 'uid',
align: 'center',
align: 'center'
},
{
title: '联系人姓名',
dataIndex: 'contractName',
key: 'contractName',
align: 'center',
align: 'center'
},
{
title: '联系人电话',
dataIndex: 'contractPhone',
key: 'contractPhone',
align: 'center',
align: 'center'
},
{
title: '联系人地址',
dataIndex: 'contractAddress',
key: 'contractAddress',
align: 'center',
align: 'center'
},
{
title: '排序',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '是否默认',
dataIndex: 'isDefault',
key: 'isDefault',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -156,7 +167,7 @@
title: '修改时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
align: 'center'
},
{
title: '操作',
@@ -213,7 +224,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingUserEmergency(selection.value.map((d) => d.bookingUserEmergencyId))
removeBatchBookingUserEmergency(
selection.value.map((d) => d.bookingUserEmergencyId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -169,7 +169,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addBookingUserInvoice, updateBookingUserInvoice } from '@/api/booking/bookingUserInvoice';
import {
addBookingUserInvoice,
updateBookingUserInvoice
} from '@/api/booking/bookingUserInvoice';
import { BookingUserInvoice } from '@/api/booking/bookingUserInvoice/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -281,7 +284,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateBookingUserInvoice : addBookingUserInvoice;
const saveOrUpdate = isUpdate.value
? updateBookingUserInvoice
: addBookingUserInvoice;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -304,12 +309,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+38 -25
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<BookingUserInvoiceEdit v-model:visible="showEdit" :data="current" @done="reload" />
<BookingUserInvoiceEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import BookingUserInvoiceEdit from './components/bookingUserInvoiceEdit.vue';
import { pageBookingUserInvoice, removeBookingUserInvoice, removeBatchBookingUserInvoice } from '@/api/booking/bookingUserInvoice';
import type { BookingUserInvoice, BookingUserInvoiceParam } from '@/api/booking/bookingUserInvoice/model';
import {
pageBookingUserInvoice,
removeBookingUserInvoice,
removeBatchBookingUserInvoice
} from '@/api/booking/bookingUserInvoice';
import type {
BookingUserInvoice,
BookingUserInvoiceParam
} from '@/api/booking/bookingUserInvoice/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,121 +116,121 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '发票类型(0纸质 1电子)',
dataIndex: 'type',
key: 'type',
align: 'center',
align: 'center'
},
{
title: '发票名称',
dataIndex: 'name',
key: 'name',
align: 'center',
align: 'center'
},
{
title: '开票类型(0普票 1专票)',
dataIndex: 'invoiceType',
key: 'invoiceType',
align: 'center',
align: 'center'
},
{
title: '税号',
dataIndex: 'invoiceCode',
key: 'invoiceCode',
align: 'center',
align: 'center'
},
{
title: '公司地址',
dataIndex: 'address',
key: 'address',
align: 'center',
align: 'center'
},
{
title: '公司电话',
dataIndex: 'tel',
key: 'tel',
align: 'center',
align: 'center'
},
{
title: '开户行',
dataIndex: 'bankName',
key: 'bankName',
align: 'center',
align: 'center'
},
{
title: '开户账号',
dataIndex: 'bankAccount',
key: 'bankAccount',
align: 'center',
align: 'center'
},
{
title: '手机号码',
dataIndex: 'phone',
key: 'phone',
align: 'center',
align: 'center'
},
{
title: '电子邮箱',
dataIndex: 'email',
key: 'email',
align: 'center',
align: 'center'
},
{
title: '发票流水号',
dataIndex: 'invoiceNo',
key: 'invoiceNo',
align: 'center',
align: 'center'
},
{
title: '发票图片预览',
dataIndex: 'invoiceImg',
key: 'invoiceImg',
align: 'center',
align: 'center'
},
{
title: '发票pdf地址',
dataIndex: 'invoicePdf',
key: 'invoicePdf',
align: 'center',
align: 'center'
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
align: 'center'
},
{
title: '是否启用',
dataIndex: 'isCompany',
key: 'isCompany',
align: 'center',
align: 'center'
},
{
title: '排序(数字越小越靠前)',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '状态, 0待使用, 1已使用, 2已失效',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '是否删除, 0否, 1是',
dataIndex: 'deleted',
key: 'deleted',
align: 'center',
align: 'center'
},
{
title: '用户ID',
dataIndex: 'userId',
key: 'userId',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -234,7 +245,7 @@
title: '修改时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
align: 'center'
},
{
title: '操作',
@@ -291,7 +302,9 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchBookingUserInvoice(selection.value.map((d) => d.bookingUserInvoiceId))
removeBatchBookingUserInvoice(
selection.value.map((d) => d.bookingUserInvoiceId)
)
.then((msg) => {
hide();
message.success(msg);
@@ -105,7 +105,10 @@
v-model:value="form.sortNumber"
/>
</a-form-item>
<a-form-item label="会员卡类型:1年卡,2次卡,3月卡,4会员VIP,VIP充值卡" name="type">
<a-form-item
label="会员卡类型:1年卡,2次卡,3月卡,4会员VIP,VIP充值卡"
name="type"
>
<a-input
allow-clear
placeholder="请输入会员卡类型:1年卡,2次卡,3月卡,4会员VIP,VIP充值卡"
@@ -304,12 +307,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+76 -72
View File
@@ -18,95 +18,99 @@
<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-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";
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 props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data: ThinkOrder;
}>();
const emit = defineEmits<{
(e: "done"): void;
(e: "update:visible", visible: boolean): void;
}>();
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 form = reactive<ThinkOrderRefundLog>({
int: undefined,
uid: undefined,
refundAmount: undefined,
sid: undefined,
oid: undefined,
status: 1,
type: 0
});
// 请求状态
const loading = ref(false);
// 请求状态
const loading = ref(false);
/* 更新visible */
const updateVisible = (value: boolean) => {
emit("update:visible", value);
};
/* 更新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");
};
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;
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;
.order-card {
margin-bottom: 20px;
}
}
.tag-icon {
padding-right: 6px;
}
.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>
+101 -82
View File
@@ -3,13 +3,23 @@
<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
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
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>
@@ -19,7 +29,12 @@
<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
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>
@@ -40,7 +55,12 @@
<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
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>
@@ -77,90 +97,89 @@
</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";
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 props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
const emit = defineEmits<{
(e: "search", where?: ThinkOrderInfoParam): void;
(e: "add"): void;
(e: "remove"): void;
(e: "advanced"): void;
}>();
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 + ' 23:59:59').valueOf() / 1000 : undefined;
// where.createTimeStart = d1 ? d1 + ' 00:00:00' : undefined;
// where.createTimeEnd = d2 ? d2 + ' 00:00:00' : undefined;
emit("search", {
...where
// 表单数据
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 chooseSiteId = (data: ThinkSite) => {
where.sid = data.id;
where.siteName = data.name;
search();
};
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
xlsFileName.value = `${d1}至${d2}`;
where.timeStart = d1 ? dayjs(d1).valueOf() / 1000 : undefined;
where.timeEnd = d2 ? dayjs(d2 + ' 23:59:59').valueOf() / 1000 : undefined;
// where.createTimeStart = d1 ? d1 + ' 00:00:00' : undefined;
// where.createTimeEnd = d2 ? d2 + ' 00:00:00' : undefined;
emit('search', {
...where
});
};
/* 重置 */
const reset = () => {
resetFields();
search();
};
const chooseSiteId = (data: ThinkSite) => {
where.sid = data.id;
where.siteName = data.name;
search();
};
// 导出
const handleExport = async () => {
const hide = messageLoading("导出中...", 0);
const res = await thinkOrderExport(where);
hide();
window.open(res.url);
};
/* 重置 */
const reset = () => {
resetFields();
search();
};
watch(
() => props.selection,
() => {
}
);
// 导出
const handleExport = async () => {
const hide = messageLoading('导出中...', 0);
const res = await thinkOrderExport(where);
hide();
window.open(res.url);
};
watch(
() => props.selection,
() => {}
);
</script>
+259 -243
View File
@@ -113,7 +113,8 @@
</a-tag>
<a-tag
v-if="record.payStatus == 3 || record.payStatus == 0"
color="cyan">
color="cyan"
>
<CoffeeOutlined class="tag-icon" />
未付款,占场中
</a-tag>
@@ -131,15 +132,30 @@
<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>
<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
@click="openRefund(record)"
v-if="
record.payStatus === 1 &&
[1, 3].includes(record.payType) &&
[1, 2].includes(record.orderStatus)
"
>退款</a
>
</a-space>
</template>
</template>
@@ -155,258 +171,258 @@
</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";
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 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 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,
// 表格数据源
const datasource: DatasourceFunction = ({
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);
});
limit,
where,
orders,
filters
}) => {
if (filters) {
where.status = filters.status;
}
});
};
/* 开具发票 */
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);
where.forAdmin = true;
return pageThinkOrder({
...where,
...orders,
page,
limit
});
}
};
};
/* 查询 */
const query = () => {
loading.value = true;
};
/* 自定义行属性 */
const customRow = (record: ThinkOrder) => {
return {
// 行点击事件
onClick: () => {
// console.log(record);
// 表格列配置
const columns = ref<ColumnItem[]>([
{
title: '场馆名称',
dataIndex: 'siteName',
key: 'iod',
width: 90
},
// 行双击事件
onDblclick: () => {
openEdit(record);
{
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);
});
}
};
};
query();
/* 查询 */
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";
import * as MenuIcons from '@/layout/menu-icons';
export default {
name: "ThinkOrder",
components: MenuIcons
};
export default {
name: 'ThinkOrder',
components: MenuIcons
};
</script>
<style lang="less" scoped>
.tag-icon {
padding-right: 6px;
}
.tag-icon {
padding-right: 6px;
}
</style>
+1 -1
View File
@@ -71,7 +71,7 @@
import { Merchant } from '@/api/shop/merchant/model';
import { listMerchant } from '@/api/shop/merchant';
import { getMerchantId } from '@/utils/common';
import { getMerchantName } from "@/utils/merchant";
import { getMerchantName } from '@/utils/merchant';
// 加载状态
const loading = ref(true);
+1 -1
View File
@@ -95,7 +95,7 @@
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Merchant } from '@/api/shop/merchant/model';
import PeriodEdit from './period/index.vue';
import { getMerchantId } from "@/utils/common";
import { getMerchantId } from '@/utils/common';
const props = defineProps<{
// 场馆场地 id
File diff suppressed because it is too large Load Diff
+90 -83
View File
@@ -20,94 +20,101 @@
</template>
<script lang="ts" setup>
import useSearch from "@/utils/use-search";
import { ref, watch } from "vue";
import { ThinkOrderInfoParam } from "@/api/think/thinkOrderInfo/model";
import { messageLoading } from "ele-admin-pro";
import dayjs from "dayjs";
import {
exportThinkOrderTrainingBusiness,
thinkOrderExportData
} from "@/api/think/thinkOrder";
import { ThinkOrder, ThinkOrderParam } from "@/api/think/thinkOrder/model";
import useSearch from '@/utils/use-search';
import { ref, watch } from 'vue';
import { ThinkOrderInfoParam } from '@/api/think/thinkOrderInfo/model';
import { messageLoading } from 'ele-admin-pro';
import dayjs from 'dayjs';
import {
exportThinkOrderTrainingBusiness,
thinkOrderExportData
} from '@/api/think/thinkOrder';
import { ThinkOrder, ThinkOrderParam } from '@/api/think/thinkOrder/model';
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
type?: number;
}>(),
{
type: 0
}
);
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
type?: number;
}>(),
{
type: 0
}
);
const emit = defineEmits<{
(e: "search", where?: ThinkOrderInfoParam): void;
(e: "reload"): void;
(e: "add"): void;
(e: "remove"): void;
(e: "advanced"): void;
}>();
const emit = defineEmits<{
(e: 'search', where?: ThinkOrderInfoParam): void;
(e: 'reload'): 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]>([dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD 23:59:59')]);
const orders = ref<ThinkOrder[] | any[]>();
const xlsFileName = ref<string>();
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
where.createTimeStart = d1 ? dayjs(d1).format('YYYY-MM-DD') : undefined;
where.createTimeEnd = d2 ? dayjs(d2).format('YYYY-MM-DD 23:59:59') : undefined;
emit("search", {
...where
// 表单数据
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]>([
dayjs().format('YYYY-MM-DD'),
dayjs().format('YYYY-MM-DD 23:59:59')
]);
const orders = ref<ThinkOrder[] | any[]>();
const xlsFileName = ref<string>();
/* 重置 */
const reload = () => {
dateRange.value = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')];
emit('reload')
};
// 导出
const handleExport = async () => {
const hide = messageLoading("导出中...", 0);
const [d1, d2] = dateRange.value ?? [];
const params = {
...where,
createTimeStart: d1 ? dayjs(d1).unix() : undefined,
createTimeEnd: d2 ? dayjs(d2).unix() : undefined
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
where.createTimeStart = d1 ? dayjs(d1).format('YYYY-MM-DD') : undefined;
where.createTimeEnd = d2
? dayjs(d2).format('YYYY-MM-DD 23:59:59')
: undefined;
emit('search', {
...where
});
};
const res =
props.type === 2
? await exportThinkOrderTrainingBusiness(params)
: await thinkOrderExportData(params);
hide();
window.open(res.url);
};
watch(
() => props.selection,
() => {
}
);
/* 重置 */
const reload = () => {
dateRange.value = [
dayjs().format('YYYY-MM-DD'),
dayjs().format('YYYY-MM-DD')
];
emit('reload');
};
// 导出
const handleExport = async () => {
const hide = messageLoading('导出中...', 0);
const [d1, d2] = dateRange.value ?? [];
const params = {
...where,
createTimeStart: d1 ? dayjs(d1).unix() : undefined,
createTimeEnd: d2 ? dayjs(d2).unix() : undefined
};
const res =
props.type === 2
? await exportThinkOrderTrainingBusiness(params)
: await thinkOrderExportData(params);
hide();
window.open(res.url);
};
watch(
() => props.selection,
() => {}
);
</script>
@@ -31,8 +31,11 @@
</tr>
</thead>
<tbody>
<tr v-for="row in section.rows || []" :key="row.trainingInstitutionName">
<td>{{ row.trainingInstitutionName || "-" }}</td>
<tr
v-for="row in section.rows || []"
:key="row.trainingInstitutionName"
>
<td>{{ row.trainingInstitutionName || '-' }}</td>
<td>{{ formatCount(row.openCount) }}</td>
<td>{{ formatAmount(row.openAmount) }}</td>
<td>{{ formatCount(row.verifyCount) }}</td>
@@ -60,72 +63,72 @@
</template>
<script lang="ts" setup>
import type { ThinkTrainingBusinessSection } from "@/api/think/thinkOrder/model";
import type { ThinkTrainingBusinessSection } from '@/api/think/thinkOrder/model';
defineProps<{
sections: ThinkTrainingBusinessSection[];
}>();
defineProps<{
sections: ThinkTrainingBusinessSection[];
}>();
const formatCount = (value?: number | string) => {
if (value === undefined || value === null || value === "") {
return "0";
}
return String(value);
};
const formatCount = (value?: number | string) => {
if (value === undefined || value === null || value === '') {
return '0';
}
return String(value);
};
const formatAmount = (value?: number | string) => {
if (value === undefined || value === null || value === "") {
return "0";
}
return String(value);
};
const formatAmount = (value?: number | string) => {
if (value === undefined || value === null || value === '') {
return '0';
}
return String(value);
};
</script>
<style lang="less" scoped>
.training-report {
display: flex;
flex-direction: column;
gap: 28px;
}
.training-report {
display: flex;
flex-direction: column;
gap: 28px;
}
.report-section {
overflow-x: auto;
}
.report-section {
overflow-x: auto;
}
.report-table {
width: 100%;
min-width: 1200px;
border-collapse: collapse;
table-layout: fixed;
background: #fff;
}
.report-table {
width: 100%;
min-width: 1200px;
border-collapse: collapse;
table-layout: fixed;
background: #fff;
}
.report-table th,
.report-table td {
padding: 12px 10px;
border: 1px solid #1f1f1f;
font-size: 14px;
line-height: 1.45;
text-align: center;
vertical-align: middle;
word-break: break-all;
}
.report-table th,
.report-table td {
padding: 12px 10px;
border: 1px solid #1f1f1f;
font-size: 14px;
line-height: 1.45;
text-align: center;
vertical-align: middle;
word-break: break-all;
}
.report-table th {
font-weight: 600;
}
.report-table th {
font-weight: 600;
}
.section-title {
font-size: 22px;
line-height: 1.4;
padding: 16px 12px !important;
}
.section-title {
font-size: 22px;
line-height: 1.4;
padding: 16px 12px !important;
}
.institution-col {
width: 240px;
}
.institution-col {
width: 240px;
}
.total-row td {
font-weight: 600;
}
.total-row td {
font-weight: 600;
}
</style>
+289 -289
View File
@@ -50,312 +50,312 @@
</template>
<script lang="ts" setup>
import { ref } from "vue";
import type { ColumnItem } from "ele-admin-pro/es/ele-pro-table/types";
import Search from "./components/search.vue";
import TrainingBusinessReport from "./components/trainingBusinessReport.vue";
import {
getThinkOrderExcelData,
getThinkOrderExcelDataForCard,
getThinkOrderTrainingBusinessData
} from "@/api/think/thinkOrder";
import type {
ThinkOrderParam,
ThinkTrainingBusinessSection
} from "@/api/think/thinkOrder/model";
import OrderList from "./components/OrderList.vue";
import dayjs from "dayjs";
import { ref } from 'vue';
import type { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import TrainingBusinessReport from './components/trainingBusinessReport.vue';
import {
getThinkOrderExcelData,
getThinkOrderExcelDataForCard,
getThinkOrderTrainingBusinessData
} from '@/api/think/thinkOrder';
import type {
ThinkOrderParam,
ThinkTrainingBusinessSection
} from '@/api/think/thinkOrder/model';
import OrderList from './components/OrderList.vue';
import dayjs from 'dayjs';
const loading = ref(true);
const showType = ref(false);
const showCardType = ref(false);
const type = ref<number>(0);
const tableHeight = document.body.clientHeight - 330;
const loading = ref(true);
const showType = ref(false);
const showCardType = ref(false);
const type = ref<number>(0);
const tableHeight = document.body.clientHeight - 330;
const createTimeStart = ref();
const createTimeEnd = ref();
const incomeList = ref<any[]>([]);
const cardList = ref<any[]>([]);
const trainingSections = ref<ThinkTrainingBusinessSection[]>([]);
const createTimeStart = ref();
const createTimeEnd = ref();
const incomeList = ref<any[]>([]);
const cardList = ref<any[]>([]);
const trainingSections = ref<ThinkTrainingBusinessSection[]>([]);
const sid = ref<number>(0);
const wechatOrder = ref<string>("");
const payTypeList = ref<number[]>([]);
const showList = ref(false);
const sid = ref<number>(0);
const wechatOrder = ref<string>('');
const payTypeList = ref<number[]>([]);
const showList = ref(false);
const getList = async () => {
loading.value = true;
incomeList.value = [];
cardList.value = [];
trainingSections.value = [];
const params = {
createTimeStart: createTimeStart.value
? dayjs(createTimeStart.value).unix()
: undefined,
createTimeEnd: createTimeEnd.value
? dayjs(createTimeEnd.value).unix()
: undefined
const getList = async () => {
loading.value = true;
incomeList.value = [];
cardList.value = [];
trainingSections.value = [];
const params = {
createTimeStart: createTimeStart.value
? dayjs(createTimeStart.value).unix()
: undefined,
createTimeEnd: createTimeEnd.value
? dayjs(createTimeEnd.value).unix()
: undefined
};
if (type.value === 0) {
incomeList.value = await getThinkOrderExcelData(params);
} else if (type.value === 1) {
cardList.value = await getThinkOrderExcelDataForCard(params);
} else {
trainingSections.value = await getThinkOrderTrainingBusinessData(params);
}
loading.value = false;
};
if (type.value === 0) {
incomeList.value = await getThinkOrderExcelData(params);
} else if (type.value === 1) {
cardList.value = await getThinkOrderExcelDataForCard(params);
} else {
trainingSections.value = await getThinkOrderTrainingBusinessData(params);
}
loading.value = false;
};
const changeType = (val: number) => {
type.value = val;
const changeType = (val: number) => {
type.value = val;
getList();
};
createTimeStart.value = dayjs().format('YYYY-MM-DD');
createTimeEnd.value = dayjs().format('YYYY-MM-DD 23:59:59');
getList();
};
createTimeStart.value = dayjs().format("YYYY-MM-DD");
createTimeEnd.value = dayjs().format("YYYY-MM-DD 23:59:59");
getList();
const columns1 = ref<ColumnItem[]>([
{
title: '场馆名称',
dataIndex: 'siteName'
},
{
title: '卡类型',
children: [
{
title: '次卡',
dataIndex: 'timeCardIncome',
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = '';
payTypeList.value = [8, 11];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: '期间卡(指月卡、季卡、年卡)',
dataIndex: 'monthCardIncome',
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = '';
payTypeList.value = [6, 7, 9, 10, 16, 17];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: '充值卡(会员卡、IC卡)',
dataIndex: 'chargeCardIncome',
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = '';
sid.value = row.sid;
payTypeList.value = [13, 14];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: '散客订单',
dataIndex: 'guestIncome',
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = '';
sid.value = row.sid;
payTypeList.value = [1, 4, 5];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: '其他',
dataIndex: 'otherIncome',
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = '';
payTypeList.value = [2, 3, 12, 15];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: '小计',
dataIndex: 'siteIncome'
}
]
}
]);
const columns1 = ref<ColumnItem[]>([
{
title: "场馆名称",
dataIndex: "siteName"
},
{
title: "卡类型",
children: [
{
title: "次卡",
dataIndex: "timeCardIncome",
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = "";
payTypeList.value = [8, 11];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
const columns = ref<ColumnItem[]>([
{
title: '场馆名称',
dataIndex: 'siteName'
},
{
title: '收款方式',
children: [
{
title: '微信支付',
dataIndex: 'wechatIncome',
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = '420000';
payTypeList.value = [1];
showList.value = true;
showType.value = true;
showCardType.value = false;
}
};
}
},
{
title: '微信支付退款',
dataIndex: 'wechatRefund',
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
}
};
}
},
{
title: 'POS机',
dataIndex: 'posIncome',
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = '';
sid.value = row.sid;
payTypeList.value = [1, 3, 5];
showList.value = true;
showType.value = false;
showCardType.value = true;
}
};
}
},
{
title: '对公转账',
dataIndex: 'businessIncome',
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = '';
sid.value = row.sid;
payTypeList.value = [18];
showList.value = true;
showType.value = false;
showCardType.value = true;
}
};
}
},
{
title: '现金收款',
dataIndex: 'cashIncome',
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = '';
sid.value = row.sid;
payTypeList.value = [4];
showList.value = true;
showType.value = false;
showCardType.value = true;
}
};
}
},
{
title: '未支付已使用',
dataIndex: 'unPaidUsed',
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = '';
sid.value = row.sid;
payTypeList.value = [4];
showList.value = true;
showType.value = false;
}
};
}
},
{
title: '其他',
dataIndex: 'otherIncome',
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = '';
sid.value = row.sid;
payTypeList.value = [2, 12];
showList.value = true;
showType.value = false;
}
};
}
},
{
title: '小计',
dataIndex: 'siteIncome'
}
},
{
title: "期间卡(指月卡、季卡、年卡)",
dataIndex: "monthCardIncome",
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = "";
payTypeList.value = [6, 7, 9, 10, 16, 17];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: "充值卡(会员卡、IC卡)",
dataIndex: "chargeCardIncome",
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = "";
sid.value = row.sid;
payTypeList.value = [13, 14];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: "散客订单",
dataIndex: "guestIncome",
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = "";
sid.value = row.sid;
payTypeList.value = [1, 4, 5];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: "其他",
dataIndex: "otherIncome",
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = "";
payTypeList.value = [2, 3, 12, 15];
showList.value = true;
showType.value = false;
showCardType.value = false;
}
};
}
},
{
title: "小计",
dataIndex: "siteIncome"
}
]
}
]);
]
}
]);
const columns = ref<ColumnItem[]>([
{
title: "场馆名称",
dataIndex: "siteName"
},
{
title: "收款方式",
children: [
{
title: "微信支付",
dataIndex: "wechatIncome",
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
wechatOrder.value = "420000";
payTypeList.value = [1];
showList.value = true;
showType.value = true;
showCardType.value = false;
}
};
}
},
{
title: "微信支付退款",
dataIndex: "wechatRefund",
customCell: (row) => {
return {
onClick: () => {
sid.value = row.sid;
}
};
}
},
{
title: "POS机",
dataIndex: "posIncome",
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = "";
sid.value = row.sid;
payTypeList.value = [1, 3, 5];
showList.value = true;
showType.value = false;
showCardType.value = true;
}
};
}
},
{
title: "对公转账",
dataIndex: "businessIncome",
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = "";
sid.value = row.sid;
payTypeList.value = [18];
showList.value = true;
showType.value = false;
showCardType.value = true;
}
};
}
},
{
title: "现金收款",
dataIndex: "cashIncome",
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = "";
sid.value = row.sid;
payTypeList.value = [4];
showList.value = true;
showType.value = false;
showCardType.value = true;
}
};
}
},
{
title: "未支付已使用",
dataIndex: "unPaidUsed",
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = "";
sid.value = row.sid;
payTypeList.value = [4];
showList.value = true;
showType.value = false;
}
};
}
},
{
title: "其他",
dataIndex: "otherIncome",
customCell: (row) => {
return {
onClick: () => {
wechatOrder.value = "";
sid.value = row.sid;
payTypeList.value = [2, 12];
showList.value = true;
showType.value = false;
}
};
}
},
{
title: "小计",
dataIndex: "siteIncome"
}
]
}
]);
const searchData = (param: ThinkOrderParam) => {
createTimeStart.value = param.createTimeStart;
createTimeEnd.value = param.createTimeEnd;
getList();
};
const searchData = (param: ThinkOrderParam) => {
createTimeStart.value = param.createTimeStart;
createTimeEnd.value = param.createTimeEnd;
getList();
};
const reload = () => {
createTimeStart.value = dayjs().format("YYYY-MM-DD");
createTimeEnd.value = dayjs().format("YYYY-MM-DD");
getList();
};
const reload = () => {
createTimeStart.value = dayjs().format('YYYY-MM-DD');
createTimeEnd.value = dayjs().format('YYYY-MM-DD');
getList();
};
</script>
<script lang="ts">
import * as MenuIcons from "@/layout/menu-icons";
import * as MenuIcons from '@/layout/menu-icons';
export default {
name: "ThinkOrder",
components: MenuIcons
};
export default {
name: 'ThinkOrder',
components: MenuIcons
};
</script>
<style lang="less" scoped>
.tag-icon {
padding-right: 6px;
}
.tag-icon {
padding-right: 6px;
}
</style>
@@ -179,12 +179,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
@@ -150,7 +150,7 @@
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form, message } from "ant-design-vue";
import { Form, message } from 'ant-design-vue';
import { assignObject } from 'ele-admin-pro';
import { Order } from '@/api/shop/order/model';
import { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
@@ -89,7 +89,10 @@
v-model:value="form.childrenNum"
/>
</a-form-item>
<a-form-item label="1已付款,2未付款,3无需付款或占用状态" name="payStatus">
<a-form-item
label="1已付款,2未付款,3无需付款或占用状态"
name="payStatus"
>
<a-input
allow-clear
placeholder="请输入1已付款,2未付款,3无需付款或占用状态"
@@ -286,12 +289,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {
+33 -22
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<OrderInfoEdit v-model:visible="showEdit" :data="current" @done="reload" />
<OrderInfoEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import OrderInfoEdit from './components/orderInfoEdit.vue';
import { pageOrderInfo, removeOrderInfo, removeBatchOrderInfo } from '@/api/booking/orderInfo';
import type { OrderInfo, OrderInfoParam } from '@/api/booking/orderInfo/model';
import {
pageOrderInfo,
removeOrderInfo,
removeBatchOrderInfo
} from '@/api/booking/orderInfo';
import type {
OrderInfo,
OrderInfoParam
} from '@/api/booking/orderInfo/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,115 +116,115 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '关联订单表id',
dataIndex: 'oid',
key: 'oid',
align: 'center',
align: 'center'
},
{
title: '关联场馆id',
dataIndex: 'sid',
key: 'sid',
align: 'center',
align: 'center'
},
{
title: '关联场地id',
dataIndex: 'fid',
key: 'fid',
align: 'center',
align: 'center'
},
{
title: '场馆',
dataIndex: 'siteName',
key: 'siteName',
align: 'center',
align: 'center'
},
{
title: '场地',
dataIndex: 'fieldName',
key: 'fieldName',
align: 'center',
align: 'center'
},
{
title: '预约时间段',
dataIndex: 'dateTime',
key: 'dateTime',
align: 'center',
align: 'center'
},
{
title: '单价',
dataIndex: 'price',
key: 'price',
align: 'center',
align: 'center'
},
{
title: '儿童价',
dataIndex: 'childrenPrice',
key: 'childrenPrice',
align: 'center',
align: 'center'
},
{
title: '成人人数',
dataIndex: 'adultNum',
key: 'adultNum',
align: 'center',
align: 'center'
},
{
title: '儿童人数',
dataIndex: 'childrenNum',
key: 'childrenNum',
align: 'center',
align: 'center'
},
{
title: '1已付款,2未付款,3无需付款或占用状态',
dataIndex: 'payStatus',
key: 'payStatus',
align: 'center',
align: 'center'
},
{
title: '是否免费:1免费、2收费',
dataIndex: 'isFree',
key: 'isFree',
align: 'center',
align: 'center'
},
{
title: '是否支持儿童票:1支持,2不支持',
dataIndex: 'isChildren',
key: 'isChildren',
align: 'center',
align: 'center'
},
{
title: '预订类型:1全场,2半场',
dataIndex: 'type',
key: 'type',
align: 'center',
align: 'center'
},
{
title: '组合数据:日期+时间段+场馆id+场地id',
dataIndex: 'mergeData',
key: 'mergeData',
align: 'center',
align: 'center'
},
{
title: '开场时间',
dataIndex: 'startTime',
key: 'startTime',
align: 'center',
align: 'center'
},
{
title: '下单时间',
dataIndex: 'orderTime',
key: 'orderTime',
align: 'center',
align: 'center'
},
{
title: '毫秒时间戳',
dataIndex: 'timeFlag',
key: 'timeFlag',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -61,12 +61,12 @@
</a-form-item>
<a-form-item label="项目类型" name="itemType">
<ItemTypeForm v-model:value="select" />
<!-- <DictSelect-->
<!-- dict-code="ItemType"-->
<!-- :placeholder="`请选择项目类型`"-->
<!-- style="width: 120px"-->
<!-- v-model:value="form.itemType"-->
<!-- />-->
<!-- <DictSelect-->
<!-- dict-code="ItemType"-->
<!-- :placeholder="`请选择项目类型`"-->
<!-- style="width: 120px"-->
<!-- v-model:value="form.itemType"-->
<!-- />-->
</a-form-item>
<a-form-item label="营业时间" name="businessTime">
<!-- <a-time-picker-->
@@ -235,7 +235,11 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addMerchant, listMerchant, updateMerchant } from "@/api/shop/merchant";
import {
addMerchant,
listMerchant,
updateMerchant
} from '@/api/shop/merchant';
import { Merchant } from '@/api/shop/merchant/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -243,13 +247,13 @@
import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model';
import { MerchantType } from '@/api/shop/merchantType/model';
import ItemTypeForm from './itemType.vue'
import ItemTypeForm from './itemType.vue';
import { CenterPoint } from 'ele-admin-pro/es/ele-map-picker/types';
import { listRoles } from '@/api/system/role';
import TinymceEditor from '@/components/TinymceEditor/index.vue';
import { uploadOss } from '@/api/system/file';
import { Item } from "@/api/booking/item/model";
import { listItem } from "@/api/booking/item";
import { Item } from '@/api/booking/item/model';
import { listItem } from '@/api/booking/item';
// 是否是修改
const isUpdate = ref(false);
@@ -101,7 +101,7 @@
status: undefined,
sortNumber: undefined,
tenantId: undefined,
createTime: undefined,
createTime: undefined
});
/* 更新visible */
@@ -149,7 +149,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateMerchantType : addMerchantType;
const saveOrUpdate = isUpdate.value
? updateMerchantType
: addMerchantType;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -172,12 +174,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {