feat: 流程类型筛选改从后端字典接口加载(保留静态兜底)
This commit is contained in:
@@ -72,8 +72,8 @@ export function approvalStatusColor(status?: string): string {
|
||||
/**
|
||||
* 流程类型(flowCode)显示名。
|
||||
*
|
||||
* 后端目前没有暴露 flowCode 字典接口,选项在此静态维护;
|
||||
* 新增单据类型时需同步本文件,后端提供字典接口后可改为远程加载。
|
||||
* 运行时优先用 `GET /approval/directory/flows` 的返回值覆盖本表;
|
||||
* 静态表只作首屏兜底与接口不可用时的降级,因此新增单据不必再改前端。
|
||||
*/
|
||||
export const APPROVAL_FLOW_NAMES: Record<string, string> = {
|
||||
completion: '业务完成确认单',
|
||||
@@ -88,12 +88,37 @@ export const APPROVAL_FLOW_NAMES: Record<string, string> = {
|
||||
};
|
||||
|
||||
/**
|
||||
* 流程类型下拉选项
|
||||
* 流程类型下拉选项(静态兜底;页面以 `loadApprovalFlowOptions` 的返回为准)
|
||||
*/
|
||||
export const APPROVAL_FLOW_OPTIONS = Object.keys(APPROVAL_FLOW_NAMES).map(
|
||||
(value) => ({ label: APPROVAL_FLOW_NAMES[value], value })
|
||||
);
|
||||
|
||||
/**
|
||||
* 用后端返回的流程类型覆盖本地显示名表,并返回下拉选项
|
||||
*/
|
||||
export async function loadApprovalFlowOptions(): Promise<
|
||||
Array<{ label: string; value: string }>
|
||||
> {
|
||||
try {
|
||||
const { listApprovalFlows } = await import('@/api/approval/directory');
|
||||
const flows = await listApprovalFlows();
|
||||
flows.forEach((flow) => {
|
||||
if (flow.flowCode && flow.flowName) {
|
||||
APPROVAL_FLOW_NAMES[flow.flowCode] = flow.flowName;
|
||||
}
|
||||
});
|
||||
return flows
|
||||
.filter((flow) => flow.flowCode && flow.flowName)
|
||||
.map((flow) => ({
|
||||
label: flow.flowName as string,
|
||||
value: flow.flowCode as string
|
||||
}));
|
||||
} catch {
|
||||
return APPROVAL_FLOW_OPTIONS;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 按 flowCode 取流程显示名;未知编码原样返回(降级为 docTypeName)
|
||||
*/
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
ApprovalQueryParam,
|
||||
ApprovalUser
|
||||
} from '@/api/approval/instance/model';
|
||||
import { APPROVAL_FLOW_OPTIONS } from '../../format';
|
||||
import { loadApprovalFlowOptions } from '../../format';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'search', where?: ApprovalQueryParam): void;
|
||||
@@ -159,8 +159,11 @@
|
||||
{ prop: 'status', label: '状态' }
|
||||
];
|
||||
|
||||
// 流程类型选项(后端暂未提供字典接口,见 format.ts)
|
||||
const flowOptions = APPROVAL_FLOW_OPTIONS;
|
||||
// 流程类型选项:取自后端单据实现注册表,新增单据自动出现
|
||||
const flowOptions = ref<Array<{ label: string; value: string }>>([]);
|
||||
loadApprovalFlowOptions().then((options) => {
|
||||
flowOptions.value = options;
|
||||
});
|
||||
|
||||
// 单据类型选项
|
||||
const docTypeOptions = [
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
} from '@/api/approval/instance/model';
|
||||
import { pageApprovalTodo } from '@/api/approval/instance';
|
||||
import {
|
||||
APPROVAL_FLOW_OPTIONS,
|
||||
loadApprovalFlowOptions,
|
||||
approvalStatusColor,
|
||||
formatApprovalTime
|
||||
} from '../format';
|
||||
@@ -113,8 +113,11 @@
|
||||
keywords: undefined
|
||||
});
|
||||
|
||||
// 流程类型选项(后端暂未提供字典接口,见 format.ts)
|
||||
const flowOptions = APPROVAL_FLOW_OPTIONS;
|
||||
// 流程类型选项:取自后端单据实现注册表,新增单据自动出现
|
||||
const flowOptions = ref<Array<{ label: string; value: string }>>([]);
|
||||
loadApprovalFlowOptions().then((options) => {
|
||||
flowOptions.value = options;
|
||||
});
|
||||
|
||||
// 状态选项
|
||||
const statusOptions = [
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
@@ -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
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
import AdEdit from './components/ad-edit.vue';
|
||||
import { pageAd, removeAd, removeBatchAd } from '@/api/cms/ad';
|
||||
import type { Ad, AdParam } from '@/api/cms/ad/model';
|
||||
import { getMerchantId } from "@/utils/merchant";
|
||||
import { getMerchantId } from '@/utils/merchant';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
|
||||
@@ -256,12 +256,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 {
|
||||
|
||||
@@ -105,91 +105,91 @@
|
||||
dataIndex: 'adId',
|
||||
key: 'adId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '页面ID',
|
||||
dataIndex: 'designId',
|
||||
key: 'designId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '广告类型',
|
||||
dataIndex: 'adType',
|
||||
key: 'adType',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '广告位名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '宽',
|
||||
dataIndex: 'width',
|
||||
key: 'width',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '高',
|
||||
dataIndex: 'height',
|
||||
key: 'height',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '广告图片',
|
||||
dataIndex: 'images',
|
||||
key: 'images',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '路由/链接地址',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面ID',
|
||||
dataIndex: 'pageId',
|
||||
key: 'pageId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面名称',
|
||||
dataIndex: 'pageName',
|
||||
key: 'pageName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -177,7 +177,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsAdRecord : addCmsAdRecord;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsAdRecord
|
||||
: addCmsAdRecord;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -200,12 +202,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsAdRecordEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsAdRecordEdit
|
||||
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 CmsAdRecordEdit from './components/cmsAdRecordEdit.vue';
|
||||
import { pageCmsAdRecord, removeCmsAdRecord, removeBatchCmsAdRecord } from '@/api/cms/cmsAdRecord';
|
||||
import type { CmsAdRecord, CmsAdRecordParam } from '@/api/cms/cmsAdRecord/model';
|
||||
import {
|
||||
pageCmsAdRecord,
|
||||
removeCmsAdRecord,
|
||||
removeBatchCmsAdRecord
|
||||
} from '@/api/cms/cmsAdRecord';
|
||||
import type {
|
||||
CmsAdRecord,
|
||||
CmsAdRecordParam
|
||||
} from '@/api/cms/cmsAdRecord/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,49 +116,49 @@
|
||||
dataIndex: 'adRecordId',
|
||||
key: 'adRecordId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '广告标题',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '图片地址',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '链接地址',
|
||||
dataIndex: 'url',
|
||||
key: 'url',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '广告位ID',
|
||||
dataIndex: 'adId',
|
||||
key: 'adId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -40,17 +40,15 @@
|
||||
v-model:value="form.type"
|
||||
/>
|
||||
</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="上级分类ID" name="parentId">
|
||||
<a-input
|
||||
allow-clear
|
||||
@@ -110,7 +108,10 @@
|
||||
v-model:value="form.comments"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)" name="hide">
|
||||
<a-form-item
|
||||
label="是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)"
|
||||
name="hide"
|
||||
>
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)"
|
||||
@@ -159,7 +160,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsArticleCategory, updateCmsArticleCategory } from '@/api/cms/cmsArticleCategory';
|
||||
import {
|
||||
addCmsArticleCategory,
|
||||
updateCmsArticleCategory
|
||||
} from '@/api/cms/cmsArticleCategory';
|
||||
import { CmsArticleCategory } from '@/api/cms/cmsArticleCategory/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -269,7 +273,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsArticleCategory : addCmsArticleCategory;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsArticleCategory
|
||||
: addCmsArticleCategory;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -292,12 +298,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsArticleCategoryEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsArticleCategoryEdit
|
||||
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 CmsArticleCategoryEdit from './components/cmsArticleCategoryEdit.vue';
|
||||
import { pageCmsArticleCategory, removeCmsArticleCategory, removeBatchCmsArticleCategory } from '@/api/cms/cmsArticleCategory';
|
||||
import type { CmsArticleCategory, CmsArticleCategoryParam } from '@/api/cms/cmsArticleCategory/model';
|
||||
import {
|
||||
pageCmsArticleCategory,
|
||||
removeCmsArticleCategory,
|
||||
removeBatchCmsArticleCategory
|
||||
} from '@/api/cms/cmsArticleCategory';
|
||||
import type {
|
||||
CmsArticleCategory,
|
||||
CmsArticleCategoryParam
|
||||
} from '@/api/cms/cmsArticleCategory/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,109 +116,109 @@
|
||||
dataIndex: 'categoryId',
|
||||
key: 'categoryId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '分类标识',
|
||||
dataIndex: 'categoryCode',
|
||||
key: 'categoryCode',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '分类名称',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '类型 0列表 1单页 2外链',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '分类图片',
|
||||
dataIndex: 'image',
|
||||
key: 'image',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '上级分类ID',
|
||||
dataIndex: 'parentId',
|
||||
key: 'parentId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '路由/链接地址',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '组件路径',
|
||||
dataIndex: 'component',
|
||||
key: 'component',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的页面',
|
||||
dataIndex: 'pageId',
|
||||
key: 'pageId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '文章数量',
|
||||
dataIndex: 'count',
|
||||
key: 'count',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)',
|
||||
dataIndex: 'hide',
|
||||
key: 'hide',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否推荐',
|
||||
dataIndex: 'recommend',
|
||||
key: 'recommend',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否显示在首页',
|
||||
dataIndex: 'showIndex',
|
||||
key: 'showIndex',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1禁用',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -222,7 +233,7 @@
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
key: 'updateTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -279,7 +290,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsArticleCategory(selection.value.map((d) => d.cmsArticleCategoryId))
|
||||
removeBatchCmsArticleCategory(
|
||||
selection.value.map((d) => d.cmsArticleCategoryId)
|
||||
)
|
||||
.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 { addCmsArticleComment, updateCmsArticleComment } from '@/api/cms/cmsArticleComment';
|
||||
import {
|
||||
addCmsArticleComment,
|
||||
updateCmsArticleComment
|
||||
} from '@/api/cms/cmsArticleComment';
|
||||
import { CmsArticleComment } from '@/api/cms/cmsArticleComment/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -225,7 +228,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsArticleComment : addCmsArticleComment;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsArticleComment
|
||||
: addCmsArticleComment;
|
||||
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 {
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
</a-card>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsArticleCommentEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsArticleCommentEdit
|
||||
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 CmsArticleCommentEdit from './components/cmsArticleCommentEdit.vue';
|
||||
import { pageCmsArticleComment, removeCmsArticleComment, removeBatchCmsArticleComment } from '@/api/cms/cmsArticleComment';
|
||||
import type { CmsArticleComment, CmsArticleCommentParam } from '@/api/cms/cmsArticleComment/model';
|
||||
import {
|
||||
pageCmsArticleComment,
|
||||
removeCmsArticleComment,
|
||||
removeBatchCmsArticleComment
|
||||
} from '@/api/cms/cmsArticleComment';
|
||||
import type {
|
||||
CmsArticleComment,
|
||||
CmsArticleCommentParam
|
||||
} from '@/api/cms/cmsArticleComment/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,79 +116,79 @@
|
||||
dataIndex: 'commentId',
|
||||
key: 'commentId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '文章ID',
|
||||
dataIndex: 'articleId',
|
||||
key: 'articleId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '评分 (10好评 20中评 30差评)',
|
||||
dataIndex: 'score',
|
||||
key: 'score',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '评价内容',
|
||||
dataIndex: 'content',
|
||||
key: 'content',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否为图片评价',
|
||||
dataIndex: 'isPicture',
|
||||
key: 'isPicture',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '评论者ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '被评价者ID',
|
||||
dataIndex: 'toUserId',
|
||||
key: 'toUserId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '回复的评论ID',
|
||||
dataIndex: 'replyCommentId',
|
||||
key: 'replyCommentId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '回复者ID',
|
||||
dataIndex: 'replyUserId',
|
||||
key: 'replyUserId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0未读, 1已读',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -192,7 +203,7 @@
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
key: 'updateTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -249,7 +260,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsArticleComment(selection.value.map((d) => d.cmsArticleCommentId))
|
||||
removeBatchCmsArticleComment(
|
||||
selection.value.map((d) => d.cmsArticleCommentId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -41,7 +41,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsArticleContent, updateCmsArticleContent } from '@/api/cms/cmsArticleContent';
|
||||
import {
|
||||
addCmsArticleContent,
|
||||
updateCmsArticleContent
|
||||
} from '@/api/cms/cmsArticleContent';
|
||||
import { CmsArticleContent } from '@/api/cms/cmsArticleContent/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -135,7 +138,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsArticleContent : addCmsArticleContent;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsArticleContent
|
||||
: addCmsArticleContent;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -158,12 +163,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsArticleContentEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsArticleContentEdit
|
||||
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 CmsArticleContentEdit from './components/cmsArticleContentEdit.vue';
|
||||
import { pageCmsArticleContent, removeCmsArticleContent, removeBatchCmsArticleContent } from '@/api/cms/cmsArticleContent';
|
||||
import type { CmsArticleContent, CmsArticleContentParam } from '@/api/cms/cmsArticleContent/model';
|
||||
import {
|
||||
pageCmsArticleContent,
|
||||
removeCmsArticleContent,
|
||||
removeBatchCmsArticleContent
|
||||
} from '@/api/cms/cmsArticleContent';
|
||||
import type {
|
||||
CmsArticleContent,
|
||||
CmsArticleContentParam
|
||||
} from '@/api/cms/cmsArticleContent/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,19 +116,19 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '文章ID',
|
||||
dataIndex: 'articleId',
|
||||
key: 'articleId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '文章内容',
|
||||
dataIndex: 'content',
|
||||
key: 'content',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -183,7 +194,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsArticleContent(selection.value.map((d) => d.cmsArticleContentId))
|
||||
removeBatchCmsArticleContent(
|
||||
selection.value.map((d) => d.cmsArticleContentId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -41,7 +41,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsArticleCount, updateCmsArticleCount } from '@/api/cms/cmsArticleCount';
|
||||
import {
|
||||
addCmsArticleCount,
|
||||
updateCmsArticleCount
|
||||
} from '@/api/cms/cmsArticleCount';
|
||||
import { CmsArticleCount } from '@/api/cms/cmsArticleCount/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -135,7 +138,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsArticleCount : addCmsArticleCount;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsArticleCount
|
||||
: addCmsArticleCount;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -158,12 +163,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsArticleCountEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsArticleCountEdit
|
||||
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 CmsArticleCountEdit from './components/cmsArticleCountEdit.vue';
|
||||
import { pageCmsArticleCount, removeCmsArticleCount, removeBatchCmsArticleCount } from '@/api/cms/cmsArticleCount';
|
||||
import type { CmsArticleCount, CmsArticleCountParam } from '@/api/cms/cmsArticleCount/model';
|
||||
import {
|
||||
pageCmsArticleCount,
|
||||
removeCmsArticleCount,
|
||||
removeBatchCmsArticleCount
|
||||
} from '@/api/cms/cmsArticleCount';
|
||||
import type {
|
||||
CmsArticleCount,
|
||||
CmsArticleCountParam
|
||||
} from '@/api/cms/cmsArticleCount/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,19 +116,19 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '文章ID',
|
||||
dataIndex: 'articleId',
|
||||
key: 'articleId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -183,7 +194,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsArticleCount(selection.value.map((d) => d.cmsArticleCountId))
|
||||
removeBatchCmsArticleCount(
|
||||
selection.value.map((d) => d.cmsArticleCountId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -41,7 +41,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsArticleLike, updateCmsArticleLike } from '@/api/cms/cmsArticleLike';
|
||||
import {
|
||||
addCmsArticleLike,
|
||||
updateCmsArticleLike
|
||||
} from '@/api/cms/cmsArticleLike';
|
||||
import { CmsArticleLike } from '@/api/cms/cmsArticleLike/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -135,7 +138,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsArticleLike : addCmsArticleLike;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsArticleLike
|
||||
: addCmsArticleLike;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -158,12 +163,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsArticleLikeEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsArticleLikeEdit
|
||||
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 CmsArticleLikeEdit from './components/cmsArticleLikeEdit.vue';
|
||||
import { pageCmsArticleLike, removeCmsArticleLike, removeBatchCmsArticleLike } from '@/api/cms/cmsArticleLike';
|
||||
import type { CmsArticleLike, CmsArticleLikeParam } from '@/api/cms/cmsArticleLike/model';
|
||||
import {
|
||||
pageCmsArticleLike,
|
||||
removeCmsArticleLike,
|
||||
removeBatchCmsArticleLike
|
||||
} from '@/api/cms/cmsArticleLike';
|
||||
import type {
|
||||
CmsArticleLike,
|
||||
CmsArticleLikeParam
|
||||
} from '@/api/cms/cmsArticleLike/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,19 +116,19 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '文章ID',
|
||||
dataIndex: 'articleId',
|
||||
key: 'articleId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -183,7 +194,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsArticleLike(selection.value.map((d) => d.cmsArticleLikeId))
|
||||
removeBatchCmsArticleLike(
|
||||
selection.value.map((d) => d.cmsArticleLikeId)
|
||||
)
|
||||
.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 { addCmsComponents, updateCmsComponents } from '@/api/cms/cmsComponents';
|
||||
import {
|
||||
addCmsComponents,
|
||||
updateCmsComponents
|
||||
} from '@/api/cms/cmsComponents';
|
||||
import { CmsComponents } from '@/api/cms/cmsComponents/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -209,7 +212,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsComponents : addCmsComponents;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsComponents
|
||||
: addCmsComponents;
|
||||
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 {
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
</a-card>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsComponentsEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsComponentsEdit
|
||||
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 CmsComponentsEdit from './components/cmsComponentsEdit.vue';
|
||||
import { pageCmsComponents, removeCmsComponents, removeBatchCmsComponents } from '@/api/cms/cmsComponents';
|
||||
import type { CmsComponents, CmsComponentsParam } from '@/api/cms/cmsComponents/model';
|
||||
import {
|
||||
pageCmsComponents,
|
||||
removeCmsComponents,
|
||||
removeBatchCmsComponents
|
||||
} from '@/api/cms/cmsComponents';
|
||||
import type {
|
||||
CmsComponents,
|
||||
CmsComponentsParam
|
||||
} from '@/api/cms/cmsComponents/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,73 +116,73 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '组件标题',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '关联导航ID',
|
||||
dataIndex: 'navigationId',
|
||||
key: 'navigationId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '组件类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面关键词',
|
||||
dataIndex: 'keywords',
|
||||
key: 'keywords',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面描述',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '组件路径',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '组件图标',
|
||||
dataIndex: 'icon',
|
||||
key: 'icon',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -280,12 +280,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsDesignEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsDesignEdit
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
@done="reload"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -62,7 +66,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsDesignEdit from './components/cmsDesignEdit.vue';
|
||||
import { pageCmsDesign, removeCmsDesign, removeBatchCmsDesign } from '@/api/cms/cmsDesign';
|
||||
import {
|
||||
pageCmsDesign,
|
||||
removeCmsDesign,
|
||||
removeBatchCmsDesign
|
||||
} from '@/api/cms/cmsDesign';
|
||||
import type { CmsDesign, CmsDesignParam } from '@/api/cms/cmsDesign/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,109 +113,109 @@
|
||||
dataIndex: 'pageId',
|
||||
key: 'pageId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '页面标题',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '所属栏目ID',
|
||||
dataIndex: 'categoryId',
|
||||
key: 'categoryId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面关键词',
|
||||
dataIndex: 'keywords',
|
||||
key: 'keywords',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面描述',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '缩列图',
|
||||
dataIndex: 'photo',
|
||||
key: 'photo',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '购买链接',
|
||||
dataIndex: 'buyUrl',
|
||||
key: 'buyUrl',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面样式',
|
||||
dataIndex: 'style',
|
||||
key: 'style',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面内容',
|
||||
dataIndex: 'content',
|
||||
key: 'content',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否开启布局',
|
||||
dataIndex: 'showLayout',
|
||||
key: 'showLayout',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面布局',
|
||||
dataIndex: 'layout',
|
||||
key: 'layout',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '上级id, 0是顶级',
|
||||
dataIndex: 'parentId',
|
||||
key: 'parentId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '设为首页',
|
||||
dataIndex: 'home',
|
||||
key: 'home',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -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 { addCmsDesignRecord, updateCmsDesignRecord } from '@/api/cms/cmsDesignRecord';
|
||||
import {
|
||||
addCmsDesignRecord,
|
||||
updateCmsDesignRecord
|
||||
} from '@/api/cms/cmsDesignRecord';
|
||||
import { CmsDesignRecord } from '@/api/cms/cmsDesignRecord/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -225,7 +228,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsDesignRecord : addCmsDesignRecord;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsDesignRecord
|
||||
: addCmsDesignRecord;
|
||||
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 {
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
</a-card>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsDesignRecordEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsDesignRecordEdit
|
||||
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 CmsDesignRecordEdit from './components/cmsDesignRecordEdit.vue';
|
||||
import { pageCmsDesignRecord, removeCmsDesignRecord, removeBatchCmsDesignRecord } from '@/api/cms/cmsDesignRecord';
|
||||
import type { CmsDesignRecord, CmsDesignRecordParam } from '@/api/cms/cmsDesignRecord/model';
|
||||
import {
|
||||
pageCmsDesignRecord,
|
||||
removeCmsDesignRecord,
|
||||
removeBatchCmsDesignRecord
|
||||
} from '@/api/cms/cmsDesignRecord';
|
||||
import type {
|
||||
CmsDesignRecord,
|
||||
CmsDesignRecordParam
|
||||
} from '@/api/cms/cmsDesignRecord/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,85 +116,85 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '关联导航ID',
|
||||
dataIndex: 'navigationId',
|
||||
key: 'navigationId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '组件',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '组件标识',
|
||||
dataIndex: 'dictCode',
|
||||
key: 'dictCode',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '组件样式',
|
||||
dataIndex: 'styles',
|
||||
key: 'styles',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '卡片阴影显示时机',
|
||||
dataIndex: 'shadow',
|
||||
key: 'shadow',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面关键词',
|
||||
dataIndex: 'keywords',
|
||||
key: 'keywords',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面描述',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面路由地址',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '缩列图',
|
||||
dataIndex: 'photo',
|
||||
key: 'photo',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -249,7 +260,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsDesignRecord(selection.value.map((d) => d.cmsDesignRecordId))
|
||||
removeBatchCmsDesignRecord(
|
||||
selection.value.map((d) => d.cmsDesignRecordId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -240,12 +240,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 {
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsDocsEdit from './components/cmsDocsEdit.vue';
|
||||
import { pageCmsDocs, removeCmsDocs, removeBatchCmsDocs } from '@/api/cms/cmsDocs';
|
||||
import {
|
||||
pageCmsDocs,
|
||||
removeCmsDocs,
|
||||
removeBatchCmsDocs
|
||||
} from '@/api/cms/cmsDocs';
|
||||
import type { CmsDocs, CmsDocsParam } from '@/api/cms/cmsDocs/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,73 +109,73 @@
|
||||
dataIndex: 'docsId',
|
||||
key: 'docsId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '文档标题',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '上级目录',
|
||||
dataIndex: 'parentId',
|
||||
key: 'parentId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '书籍ID',
|
||||
dataIndex: 'bookId',
|
||||
key: 'bookId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '可见性(public,private,protected)',
|
||||
dataIndex: 'visibility',
|
||||
key: 'visibility',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '虚拟阅读量(仅用作展示)',
|
||||
dataIndex: 'virtualViews',
|
||||
key: 'virtualViews',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '实际阅读量',
|
||||
dataIndex: 'actualViews',
|
||||
key: 'actualViews',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -186,7 +190,7 @@
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
key: 'updateTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -185,7 +185,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsDocsBook : addCmsDocsBook;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsDocsBook
|
||||
: addCmsDocsBook;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -208,12 +210,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsDocsBookEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsDocsBookEdit
|
||||
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 CmsDocsBookEdit from './components/cmsDocsBookEdit.vue';
|
||||
import { pageCmsDocsBook, removeCmsDocsBook, removeBatchCmsDocsBook } from '@/api/cms/cmsDocsBook';
|
||||
import type { CmsDocsBook, CmsDocsBookParam } from '@/api/cms/cmsDocsBook/model';
|
||||
import {
|
||||
pageCmsDocsBook,
|
||||
removeCmsDocsBook,
|
||||
removeBatchCmsDocsBook
|
||||
} from '@/api/cms/cmsDocsBook';
|
||||
import type {
|
||||
CmsDocsBook,
|
||||
CmsDocsBookParam
|
||||
} from '@/api/cms/cmsDocsBook/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,55 +116,55 @@
|
||||
dataIndex: 'bookId',
|
||||
key: 'bookId',
|
||||
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: 'photo',
|
||||
key: 'photo',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '文档内容',
|
||||
dataIndex: 'content',
|
||||
key: 'content',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -41,7 +41,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsDocsContent, updateCmsDocsContent } from '@/api/cms/cmsDocsContent';
|
||||
import {
|
||||
addCmsDocsContent,
|
||||
updateCmsDocsContent
|
||||
} from '@/api/cms/cmsDocsContent';
|
||||
import { CmsDocsContent } from '@/api/cms/cmsDocsContent/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -135,7 +138,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsDocsContent : addCmsDocsContent;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsDocsContent
|
||||
: addCmsDocsContent;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -158,12 +163,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsDocsContentEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsDocsContentEdit
|
||||
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 CmsDocsContentEdit from './components/cmsDocsContentEdit.vue';
|
||||
import { pageCmsDocsContent, removeCmsDocsContent, removeBatchCmsDocsContent } from '@/api/cms/cmsDocsContent';
|
||||
import type { CmsDocsContent, CmsDocsContentParam } from '@/api/cms/cmsDocsContent/model';
|
||||
import {
|
||||
pageCmsDocsContent,
|
||||
removeCmsDocsContent,
|
||||
removeBatchCmsDocsContent
|
||||
} from '@/api/cms/cmsDocsContent';
|
||||
import type {
|
||||
CmsDocsContent,
|
||||
CmsDocsContentParam
|
||||
} from '@/api/cms/cmsDocsContent/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,19 +116,19 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '文档ID',
|
||||
dataIndex: 'docsId',
|
||||
key: 'docsId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '文档内容',
|
||||
dataIndex: 'content',
|
||||
key: 'content',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -183,7 +194,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsDocsContent(selection.value.map((d) => d.cmsDocsContentId))
|
||||
removeBatchCmsDocsContent(
|
||||
selection.value.map((d) => d.cmsDocsContentId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -231,12 +231,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsDomainEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsDomainEdit
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
@done="reload"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -62,7 +66,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsDomainEdit from './components/cmsDomainEdit.vue';
|
||||
import { pageCmsDomain, removeCmsDomain, removeBatchCmsDomain } from '@/api/cms/cmsDomain';
|
||||
import {
|
||||
pageCmsDomain,
|
||||
removeCmsDomain,
|
||||
removeBatchCmsDomain
|
||||
} from '@/api/cms/cmsDomain';
|
||||
import type { CmsDomain, CmsDomainParam } from '@/api/cms/cmsDomain/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,67 +113,67 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '类型 0赠送域名 1绑定域名 ',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '域名',
|
||||
dataIndex: 'domain',
|
||||
key: 'domain',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '主机记录',
|
||||
dataIndex: 'hostName',
|
||||
key: 'hostName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '记录值',
|
||||
dataIndex: 'hostValue',
|
||||
key: 'hostValue',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序号',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '网站ID',
|
||||
dataIndex: 'websiteId',
|
||||
key: 'websiteId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '租户ID',
|
||||
dataIndex: 'appId',
|
||||
key: 'appId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -180,7 +188,7 @@
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
key: 'updateTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -272,12 +272,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 {
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsFormEdit from './components/cmsFormEdit.vue';
|
||||
import { pageCmsForm, removeCmsForm, removeBatchCmsForm } from '@/api/cms/cmsForm';
|
||||
import {
|
||||
pageCmsForm,
|
||||
removeCmsForm,
|
||||
removeBatchCmsForm
|
||||
} from '@/api/cms/cmsForm';
|
||||
import type { CmsForm, CmsFormParam } from '@/api/cms/cmsForm/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,103 +109,103 @@
|
||||
dataIndex: 'formId',
|
||||
key: 'formId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '表单标题',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '顶部图片',
|
||||
dataIndex: 'photo',
|
||||
key: 'photo',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '背景图片',
|
||||
dataIndex: 'background',
|
||||
key: 'background',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '视频文件',
|
||||
dataIndex: 'video',
|
||||
key: 'video',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '提交次数',
|
||||
dataIndex: 'submitNumber',
|
||||
key: 'submitNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面布局',
|
||||
dataIndex: 'layout',
|
||||
key: 'layout',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否隐藏顶部图片',
|
||||
dataIndex: 'hidePhoto',
|
||||
key: 'hidePhoto',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否隐藏背景图片',
|
||||
dataIndex: 'hideBackground',
|
||||
key: 'hideBackground',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否隐藏视频',
|
||||
dataIndex: 'hideVideo',
|
||||
key: 'hideVideo',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '背景图片透明度',
|
||||
dataIndex: 'opacity',
|
||||
key: 'opacity',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '商户ID',
|
||||
dataIndex: 'merchantId',
|
||||
key: 'merchantId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -99,7 +99,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsFormRecord, updateCmsFormRecord } from '@/api/cms/cmsFormRecord';
|
||||
import {
|
||||
addCmsFormRecord,
|
||||
updateCmsFormRecord
|
||||
} from '@/api/cms/cmsFormRecord';
|
||||
import { CmsFormRecord } from '@/api/cms/cmsFormRecord/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -201,7 +204,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsFormRecord : addCmsFormRecord;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsFormRecord
|
||||
: addCmsFormRecord;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -224,12 +229,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsFormRecordEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsFormRecordEdit
|
||||
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 CmsFormRecordEdit from './components/cmsFormRecordEdit.vue';
|
||||
import { pageCmsFormRecord, removeCmsFormRecord, removeBatchCmsFormRecord } from '@/api/cms/cmsFormRecord';
|
||||
import type { CmsFormRecord, CmsFormRecordParam } from '@/api/cms/cmsFormRecord/model';
|
||||
import {
|
||||
pageCmsFormRecord,
|
||||
removeCmsFormRecord,
|
||||
removeBatchCmsFormRecord
|
||||
} from '@/api/cms/cmsFormRecord';
|
||||
import type {
|
||||
CmsFormRecord,
|
||||
CmsFormRecordParam
|
||||
} from '@/api/cms/cmsFormRecord/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,67 +116,67 @@
|
||||
dataIndex: 'formRecordId',
|
||||
key: 'formRecordId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'phone',
|
||||
key: 'phone',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '表单数据',
|
||||
dataIndex: 'formData',
|
||||
key: 'formData',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '表单ID',
|
||||
dataIndex: 'formId',
|
||||
key: 'formId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '商户ID',
|
||||
dataIndex: 'merchantId',
|
||||
key: 'merchantId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -232,12 +232,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 {
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsLinkEdit from './components/cmsLinkEdit.vue';
|
||||
import { pageCmsLink, removeCmsLink, removeBatchCmsLink } from '@/api/cms/cmsLink';
|
||||
import {
|
||||
pageCmsLink,
|
||||
removeCmsLink,
|
||||
removeBatchCmsLink
|
||||
} from '@/api/cms/cmsLink';
|
||||
import type { CmsLink, CmsLinkParam } from '@/api/cms/cmsLink/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,73 +109,73 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '链接名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '图标',
|
||||
dataIndex: 'icon',
|
||||
key: 'icon',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '链接地址',
|
||||
dataIndex: 'url',
|
||||
key: 'url',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '链接分类',
|
||||
dataIndex: 'linkType',
|
||||
key: 'linkType',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '应用ID',
|
||||
dataIndex: 'appId',
|
||||
key: 'appId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否推荐',
|
||||
dataIndex: 'recommend',
|
||||
key: 'recommend',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1待确认',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -304,12 +304,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 {
|
||||
|
||||
@@ -105,127 +105,127 @@
|
||||
dataIndex: 'mpId',
|
||||
key: 'mpId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '是否主账号',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '小程序ID',
|
||||
dataIndex: 'appId',
|
||||
key: 'appId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '小程序密钥',
|
||||
dataIndex: 'appSecret',
|
||||
key: 'appSecret',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '小程序名称',
|
||||
dataIndex: 'mpName',
|
||||
key: 'mpName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '小程序简称',
|
||||
dataIndex: 'shortName',
|
||||
key: 'shortName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '头像',
|
||||
dataIndex: 'avatar',
|
||||
key: 'avatar',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '小程序码',
|
||||
dataIndex: 'mpQrcode',
|
||||
key: 'mpQrcode',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '微信认证',
|
||||
dataIndex: 'authentication',
|
||||
key: 'authentication',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '主体信息',
|
||||
dataIndex: 'companyName',
|
||||
key: 'companyName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '小程序备案',
|
||||
dataIndex: 'icpNo',
|
||||
key: 'icpNo',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '登录邮箱',
|
||||
dataIndex: 'email',
|
||||
key: 'email',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '登录密码',
|
||||
dataIndex: 'password',
|
||||
key: 'password',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '原始ID',
|
||||
dataIndex: 'ghId',
|
||||
key: 'ghId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '入口页面',
|
||||
dataIndex: 'mainPath',
|
||||
key: 'mainPath',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '过期时间',
|
||||
dataIndex: 'expirationTime',
|
||||
key: 'expirationTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '介绍',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -248,12 +248,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 {
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsMpAdEdit from './components/cmsMpAdEdit.vue';
|
||||
import { pageCmsMpAd, removeCmsMpAd, removeBatchCmsMpAd } from '@/api/cms/cmsMpAd';
|
||||
import {
|
||||
pageCmsMpAd,
|
||||
removeCmsMpAd,
|
||||
removeBatchCmsMpAd
|
||||
} from '@/api/cms/cmsMpAd';
|
||||
import type { CmsMpAd, CmsMpAdParam } from '@/api/cms/cmsMpAd/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,85 +109,85 @@
|
||||
dataIndex: 'adId',
|
||||
key: 'adId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '页面ID',
|
||||
dataIndex: 'pageId',
|
||||
key: 'pageId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '广告类型',
|
||||
dataIndex: 'adType',
|
||||
key: 'adType',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '广告位名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '宽',
|
||||
dataIndex: 'width',
|
||||
key: 'width',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '高',
|
||||
dataIndex: 'height',
|
||||
key: 'height',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '广告图片',
|
||||
dataIndex: 'images',
|
||||
key: 'images',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '路由/链接地址',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面名称',
|
||||
dataIndex: 'pageName',
|
||||
key: 'pageName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -201,12 +201,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsMpFieldEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsMpFieldEdit
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
@done="reload"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -62,7 +66,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsMpFieldEdit from './components/cmsMpFieldEdit.vue';
|
||||
import { pageCmsMpField, removeCmsMpField, removeBatchCmsMpField } from '@/api/cms/cmsMpField';
|
||||
import {
|
||||
pageCmsMpField,
|
||||
removeCmsMpField,
|
||||
removeBatchCmsMpField
|
||||
} from '@/api/cms/cmsMpField';
|
||||
import type { CmsMpField, CmsMpFieldParam } from '@/api/cms/cmsMpField/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,49 +113,49 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '类型,0文本 1图片 2其他',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'value',
|
||||
key: 'value',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面ID',
|
||||
dataIndex: 'pageId',
|
||||
key: 'pageId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
v-model:value="form.title"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="类型 0功能图标 1订单状态图标 2首页导航图标 3 商城导航图标 4管理人员功能图标" name="type">
|
||||
<a-form-item
|
||||
label="类型 0功能图标 1订单状态图标 2首页导航图标 3 商城导航图标 4管理人员功能图标"
|
||||
name="type"
|
||||
>
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入类型 0功能图标 1订单状态图标 2首页导航图标 3 商城导航图标 4管理人员功能图标"
|
||||
@@ -89,7 +92,10 @@
|
||||
v-model:value="form.icon"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)" name="hide">
|
||||
<a-form-item
|
||||
label="是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)"
|
||||
name="hide"
|
||||
>
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)"
|
||||
@@ -376,12 +382,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsMpMenuEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsMpMenuEdit
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
@done="reload"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -62,7 +66,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsMpMenuEdit from './components/cmsMpMenuEdit.vue';
|
||||
import { pageCmsMpMenu, removeCmsMpMenu, removeBatchCmsMpMenu } from '@/api/cms/cmsMpMenu';
|
||||
import {
|
||||
pageCmsMpMenu,
|
||||
removeCmsMpMenu,
|
||||
removeBatchCmsMpMenu
|
||||
} from '@/api/cms/cmsMpMenu';
|
||||
import type { CmsMpMenu, CmsMpMenuParam } from '@/api/cms/cmsMpMenu/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,181 +113,182 @@
|
||||
dataIndex: 'menuId',
|
||||
key: 'menuId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '上级id, 0是顶级',
|
||||
dataIndex: 'parentId',
|
||||
key: 'parentId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '菜单名称',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '类型 0功能图标 1订单状态图标 2首页导航图标 3 商城导航图标 4管理人员功能图标',
|
||||
title:
|
||||
'类型 0功能图标 1订单状态图标 2首页导航图标 3 商城导航图标 4管理人员功能图标',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否微信小程序菜单',
|
||||
dataIndex: 'isMpWeixin',
|
||||
key: 'isMpWeixin',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '菜单路由地址',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '菜单组件地址, 目录可为空',
|
||||
dataIndex: 'component',
|
||||
key: 'component',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '打开位置',
|
||||
dataIndex: 'target',
|
||||
key: 'target',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '菜单图标',
|
||||
dataIndex: 'avatar',
|
||||
key: 'avatar',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '图标颜色',
|
||||
dataIndex: 'color',
|
||||
key: 'color',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '上传图标',
|
||||
dataIndex: 'icon',
|
||||
key: 'icon',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)',
|
||||
dataIndex: 'hide',
|
||||
key: 'hide',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '位置 0不限 1顶部 2底部',
|
||||
dataIndex: 'position',
|
||||
key: 'position',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '0 第一行 1第二行',
|
||||
dataIndex: 'rows',
|
||||
key: 'rows',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '菜单侧栏选中的path',
|
||||
dataIndex: 'active',
|
||||
key: 'active',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '其它路由元信息',
|
||||
dataIndex: 'meta',
|
||||
key: 'meta',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的页面',
|
||||
dataIndex: 'pageId',
|
||||
key: 'pageId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的文章分类ID',
|
||||
dataIndex: 'articleCategoryId',
|
||||
key: 'articleCategoryId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的文章ID',
|
||||
dataIndex: 'articleId',
|
||||
key: 'articleId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的表单ID',
|
||||
dataIndex: 'formId',
|
||||
key: 'formId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的书籍标识',
|
||||
dataIndex: 'bookCode',
|
||||
key: 'bookCode',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的商品分类ID',
|
||||
dataIndex: 'goodsCategoryId',
|
||||
key: 'goodsCategoryId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '绑定的商品ID',
|
||||
dataIndex: 'goodsId',
|
||||
key: 'goodsId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否管理人员可见',
|
||||
dataIndex: 'adminShow',
|
||||
key: 'adminShow',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '设为首页',
|
||||
dataIndex: 'home',
|
||||
key: 'home',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '分组名称',
|
||||
dataIndex: 'groupName',
|
||||
key: 'groupName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -248,12 +248,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsMpPagesEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsMpPagesEdit
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
@done="reload"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -62,7 +66,11 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import CmsMpPagesEdit from './components/cmsMpPagesEdit.vue';
|
||||
import { pageCmsMpPages, removeCmsMpPages, removeBatchCmsMpPages } from '@/api/cms/cmsMpPages';
|
||||
import {
|
||||
pageCmsMpPages,
|
||||
removeCmsMpPages,
|
||||
removeBatchCmsMpPages
|
||||
} from '@/api/cms/cmsMpPages';
|
||||
import type { CmsMpPages, CmsMpPagesParam } from '@/api/cms/cmsMpPages/model';
|
||||
|
||||
// 表格实例
|
||||
@@ -105,85 +113,85 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '上级id, 0是顶级',
|
||||
dataIndex: 'parentId',
|
||||
key: 'parentId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面名称',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '页面路径',
|
||||
dataIndex: 'path',
|
||||
key: 'path',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '设为首页',
|
||||
dataIndex: 'home',
|
||||
key: 'home',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '分包',
|
||||
dataIndex: 'subpackage',
|
||||
key: 'subpackage',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '图标',
|
||||
dataIndex: 'icon',
|
||||
key: 'icon',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '未选中图标',
|
||||
dataIndex: 'iconPath',
|
||||
key: 'iconPath',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '选中的图标',
|
||||
dataIndex: 'selectedIconPath',
|
||||
key: 'selectedIconPath',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1冻结',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '是否删除, 0否, 1是',
|
||||
dataIndex: 'deleted',
|
||||
key: 'deleted',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -121,7 +121,9 @@
|
||||
<a-space>
|
||||
<template v-if="record.parentId === 0">
|
||||
<a-tooltip :title="`配置SEO及页面内容`">
|
||||
<a class="text-fuchsia-300" @click="openDesign(record)">设计</a>
|
||||
<a class="text-fuchsia-300" @click="openDesign(record)"
|
||||
>设计</a
|
||||
>
|
||||
</a-tooltip>
|
||||
<a-divider type="vertical" />
|
||||
</template>
|
||||
|
||||
@@ -64,7 +64,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsProductComment, updateCmsProductComment } from '@/api/cms/cmsProductComment';
|
||||
import {
|
||||
addCmsProductComment,
|
||||
updateCmsProductComment
|
||||
} from '@/api/cms/cmsProductComment';
|
||||
import { CmsProductComment } from '@/api/cms/cmsProductComment/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -161,7 +164,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsProductComment : addCmsProductComment;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsProductComment
|
||||
: addCmsProductComment;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -184,12 +189,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsProductCommentEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsProductCommentEdit
|
||||
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 CmsProductCommentEdit from './components/cmsProductCommentEdit.vue';
|
||||
import { pageCmsProductComment, removeCmsProductComment, removeBatchCmsProductComment } from '@/api/cms/cmsProductComment';
|
||||
import type { CmsProductComment, CmsProductCommentParam } from '@/api/cms/cmsProductComment/model';
|
||||
import {
|
||||
pageCmsProductComment,
|
||||
removeCmsProductComment,
|
||||
removeBatchCmsProductComment
|
||||
} from '@/api/cms/cmsProductComment';
|
||||
import type {
|
||||
CmsProductComment,
|
||||
CmsProductCommentParam
|
||||
} from '@/api/cms/cmsProductComment/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,37 +116,37 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '产品ID',
|
||||
dataIndex: 'productId',
|
||||
key: 'productId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '评论内容',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -201,7 +212,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsProductComment(selection.value.map((d) => d.cmsProductCommentId))
|
||||
removeBatchCmsProductComment(
|
||||
selection.value.map((d) => d.cmsProductCommentId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -64,7 +64,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsProductRecord, updateCmsProductRecord } from '@/api/cms/cmsProductRecord';
|
||||
import {
|
||||
addCmsProductRecord,
|
||||
updateCmsProductRecord
|
||||
} from '@/api/cms/cmsProductRecord';
|
||||
import { CmsProductRecord } from '@/api/cms/cmsProductRecord/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -161,7 +164,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsProductRecord : addCmsProductRecord;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsProductRecord
|
||||
: addCmsProductRecord;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -184,12 +189,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsProductRecordEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsProductRecordEdit
|
||||
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 CmsProductRecordEdit from './components/cmsProductRecordEdit.vue';
|
||||
import { pageCmsProductRecord, removeCmsProductRecord, removeBatchCmsProductRecord } from '@/api/cms/cmsProductRecord';
|
||||
import type { CmsProductRecord, CmsProductRecordParam } from '@/api/cms/cmsProductRecord/model';
|
||||
import {
|
||||
pageCmsProductRecord,
|
||||
removeCmsProductRecord,
|
||||
removeBatchCmsProductRecord
|
||||
} from '@/api/cms/cmsProductRecord';
|
||||
import type {
|
||||
CmsProductRecord,
|
||||
CmsProductRecordParam
|
||||
} from '@/api/cms/cmsProductRecord/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,37 +116,37 @@
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '产品ID',
|
||||
dataIndex: 'productId',
|
||||
key: 'productId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '排序(数字越小越靠前)',
|
||||
dataIndex: 'sortNumber',
|
||||
key: 'sortNumber',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0待处理, 1已完成',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -201,7 +212,9 @@
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchCmsProductRecord(selection.value.map((d) => d.cmsProductRecordId))
|
||||
removeBatchCmsProductRecord(
|
||||
selection.value.map((d) => d.cmsProductRecordId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -55,7 +55,10 @@
|
||||
v-model:value="form.comments"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="状态, 0正常, 1待修,2异常已修,3异常未修" name="status">
|
||||
<a-form-item
|
||||
label="状态, 0正常, 1待修,2异常已修,3异常未修"
|
||||
name="status"
|
||||
>
|
||||
<a-radio-group v-model:value="form.status">
|
||||
<a-radio :value="0">显示</a-radio>
|
||||
<a-radio :value="1">隐藏</a-radio>
|
||||
@@ -78,7 +81,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsProductSpec, updateCmsProductSpec } from '@/api/cms/cmsProductSpec';
|
||||
import {
|
||||
addCmsProductSpec,
|
||||
updateCmsProductSpec
|
||||
} from '@/api/cms/cmsProductSpec';
|
||||
import { CmsProductSpec } from '@/api/cms/cmsProductSpec/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -177,7 +183,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsProductSpec : addCmsProductSpec;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsProductSpec
|
||||
: addCmsProductSpec;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -200,12 +208,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>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<CmsProductSpecEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<CmsProductSpecEdit
|
||||
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 CmsProductSpecEdit from './components/cmsProductSpecEdit.vue';
|
||||
import { pageCmsProductSpec, removeCmsProductSpec, removeBatchCmsProductSpec } from '@/api/cms/cmsProductSpec';
|
||||
import type { CmsProductSpec, CmsProductSpecParam } from '@/api/cms/cmsProductSpec/model';
|
||||
import {
|
||||
pageCmsProductSpec,
|
||||
removeCmsProductSpec,
|
||||
removeBatchCmsProductSpec
|
||||
} from '@/api/cms/cmsProductSpec';
|
||||
import type {
|
||||
CmsProductSpec,
|
||||
CmsProductSpecParam
|
||||
} from '@/api/cms/cmsProductSpec/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,49 +116,49 @@
|
||||
dataIndex: 'specId',
|
||||
key: 'specId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '规格名称',
|
||||
dataIndex: 'specName',
|
||||
key: 'specName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '规格值',
|
||||
dataIndex: 'specValue',
|
||||
key: 'specValue',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建用户',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '更新者',
|
||||
dataIndex: 'updater',
|
||||
key: 'updater',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '状态, 0正常, 1待修,2异常已修,3异常未修',
|
||||
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);
|
||||
removeBatchCmsProductSpec(selection.value.map((d) => d.cmsProductSpecId))
|
||||
removeBatchCmsProductSpec(
|
||||
selection.value.map((d) => d.cmsProductSpecId)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
|
||||
@@ -58,7 +58,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsProductSpecValue, updateCmsProductSpecValue } from '@/api/cms/cmsProductSpecValue';
|
||||
import {
|
||||
addCmsProductSpecValue,
|
||||
updateCmsProductSpecValue
|
||||
} from '@/api/cms/cmsProductSpecValue';
|
||||
import { CmsProductSpecValue } from '@/api/cms/cmsProductSpecValue/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -154,7 +157,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsProductSpecValue : addCmsProductSpecValue;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsProductSpecValue
|
||||
: addCmsProductSpecValue;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -177,12 +182,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 {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user