Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m42s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m42s
This commit is contained in:
commit
38012ccdb1
@ -3,21 +3,35 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
uses: http://127.0.0.1:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像
|
||||
uses: http://47.109.37.87:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像
|
||||
with:
|
||||
fetch-depth: 1 # 只拉取最新一次提交
|
||||
|
||||
- name: Set up Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: pnpm
|
||||
run: npm i pnpm -g
|
||||
- name: node
|
||||
run: pnpm i
|
||||
- name: Build
|
||||
run: pnpm build:antd
|
||||
- name: cp
|
||||
# run: robocopy ./apps/web-antd/dist C:\devtool\nginx-1.28.0\html\propety /E
|
||||
run: Copy-Item -Path "./apps/web-antd/dist" -Destination "C:\devtool\nginx-1.28.0\html\property" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
|
||||
- name: copy file via ssh password
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: 192.168.1.3
|
||||
username: root
|
||||
password: by@2025!
|
||||
port: 22
|
||||
source: "./apps/web-antd/dist"
|
||||
target: "/project/wl/web/dist"
|
||||
|
||||
|
||||
|
||||
|
@ -49,22 +49,22 @@ export interface OrderChargeVO {
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
paymentMethod: number;
|
||||
paymentMethod: string | number;
|
||||
|
||||
/**
|
||||
* 开票状态
|
||||
*/
|
||||
invoiceStatus: number;
|
||||
invoiceStatus: string | number;
|
||||
|
||||
/**
|
||||
* 发票类型
|
||||
*/
|
||||
invoiceType: number;
|
||||
invoiceType: string | number;
|
||||
|
||||
/**
|
||||
* 收费状态
|
||||
*/
|
||||
chargeStatus: number;
|
||||
chargeStatus: string | number;
|
||||
}
|
||||
|
||||
export interface OrderChargeForm extends BaseEntity {
|
||||
@ -116,22 +116,22 @@ export interface OrderChargeForm extends BaseEntity {
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
paymentMethod?: number;
|
||||
paymentMethod?: string | number;
|
||||
|
||||
/**
|
||||
* 开票状态
|
||||
*/
|
||||
invoiceStatus?: number;
|
||||
invoiceStatus?: string | number;
|
||||
|
||||
/**
|
||||
* 发票类型
|
||||
*/
|
||||
invoiceType?: number;
|
||||
invoiceType?: string | number;
|
||||
|
||||
/**
|
||||
* 收费状态
|
||||
*/
|
||||
chargeStatus?: number;
|
||||
chargeStatus?: string | number;
|
||||
}
|
||||
|
||||
export interface OrderChargeQuery extends PageQuery {
|
||||
@ -178,22 +178,22 @@ export interface OrderChargeQuery extends PageQuery {
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
paymentMethod?: number;
|
||||
paymentMethod?: string | number;
|
||||
|
||||
/**
|
||||
* 开票状态
|
||||
*/
|
||||
invoiceStatus?: number;
|
||||
invoiceStatus?: string | number;
|
||||
|
||||
/**
|
||||
* 发票类型
|
||||
*/
|
||||
invoiceType?: number;
|
||||
invoiceType?: string | number;
|
||||
|
||||
/**
|
||||
* 收费状态
|
||||
*/
|
||||
chargeStatus?: number;
|
||||
chargeStatus?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
@ -250,20 +250,20 @@ export interface orderChargeDetailForm extends BaseEntity {
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
paymentMethod?: number;
|
||||
paymentMethod?: string | number;
|
||||
|
||||
/**
|
||||
* 开票状态
|
||||
*/
|
||||
invoiceStatus?: number;
|
||||
invoiceStatus?: string | number;
|
||||
|
||||
/**
|
||||
* 发票类型
|
||||
*/
|
||||
invoiceType?: number;
|
||||
invoiceType?: string | number;
|
||||
|
||||
/**
|
||||
* 收费状态
|
||||
*/
|
||||
chargeStatus?: number;
|
||||
chargeStatus?: string | number;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ export interface OrderMaintainVO {
|
||||
/**
|
||||
* 养护周期类型
|
||||
*/
|
||||
periodType: number;
|
||||
periodType: string | number;
|
||||
|
||||
/**
|
||||
* 养护周期频次
|
||||
@ -116,7 +116,7 @@ export interface OrderMaintainForm extends BaseEntity {
|
||||
/**
|
||||
* 养护周期类型
|
||||
*/
|
||||
periodType?: number;
|
||||
periodType?: string | number;
|
||||
|
||||
/**
|
||||
* 养护周期频次
|
||||
@ -193,7 +193,7 @@ export interface OrderMaintainQuery extends PageQuery {
|
||||
/**
|
||||
* 养护周期类型
|
||||
*/
|
||||
periodType?: number;
|
||||
periodType?: string | number;
|
||||
|
||||
/**
|
||||
* 养护周期频次
|
||||
@ -257,6 +257,11 @@ export interface conservationManagement extends BaseEntity {
|
||||
*/
|
||||
maintainName: string;
|
||||
|
||||
/**
|
||||
* 服务地点
|
||||
*/
|
||||
roomName:string;
|
||||
|
||||
/**
|
||||
* 小区id
|
||||
*/
|
||||
@ -280,7 +285,7 @@ export interface conservationManagement extends BaseEntity {
|
||||
/**
|
||||
* 养护周期类型
|
||||
*/
|
||||
periodType: number;
|
||||
periodType: string | number;
|
||||
|
||||
/**
|
||||
* 养护周期频次
|
||||
|
@ -76,6 +76,11 @@ export interface RentalOrderVO {
|
||||
*/
|
||||
contractStatus: number;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
contractCode: string;
|
||||
|
||||
/**
|
||||
* 签署时间
|
||||
*/
|
||||
@ -159,6 +164,11 @@ export interface RentalOrderForm extends BaseEntity {
|
||||
*/
|
||||
contractStatus?: number;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
contractCode?: string;
|
||||
|
||||
/**
|
||||
* 签署时间
|
||||
*/
|
||||
@ -236,6 +246,10 @@ export interface RentalOrderQuery extends PageQuery {
|
||||
* 合同状态
|
||||
*/
|
||||
contractStatus?: number;
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
contractCode?: string;
|
||||
|
||||
/**
|
||||
* 签署时间
|
||||
|
@ -34,7 +34,7 @@ export interface AttachVO {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
state: number;
|
||||
state: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
@ -76,7 +76,7 @@ export interface AttachForm extends BaseEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
state?: number;
|
||||
state?: string | number;
|
||||
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ export interface AttachQuery extends PageQuery {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
state?: number;
|
||||
state?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
@ -151,7 +151,7 @@ export interface conferenceAddServices extends BaseEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
state: number;
|
||||
state: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
@ -50,7 +50,6 @@ export interface MeetVO {
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MeetForm extends BaseEntity {
|
||||
@ -157,3 +156,55 @@ export interface MeetQuery extends PageQuery {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface conferenceSettingsDetail extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 会议室名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
location: string;
|
||||
|
||||
/**
|
||||
* 容纳人数
|
||||
*/
|
||||
personNumber: number;
|
||||
|
||||
/**
|
||||
* 基础服务
|
||||
*/
|
||||
baseServiceId: string | number;
|
||||
|
||||
/**
|
||||
* 基础价格
|
||||
*/
|
||||
basePrice: number;
|
||||
|
||||
/**
|
||||
* 增值服务是否启用
|
||||
*/
|
||||
attach: number;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
createById: string | number;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
updateById: string | number;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
searchValue: string;
|
||||
}
|
||||
|
@ -6,9 +6,15 @@ import {rentalOrderList} from "#/api/property/rentalOrder";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Select',
|
||||
fieldName: 'orderId',
|
||||
label: '订单号',
|
||||
fieldName: 'orderId',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: rentalOrderList,
|
||||
resultField: 'rows',
|
||||
labelField: 'orderNo',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
@ -18,11 +24,11 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'invoiceStatus',
|
||||
label: '开票状态',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'userName',
|
||||
label: '租赁人',
|
||||
},
|
||||
// {
|
||||
// component: 'Select',
|
||||
// fieldName: 'userName',
|
||||
// label: '租赁人',
|
||||
// },
|
||||
// {
|
||||
// component: 'RangePicker',
|
||||
// componentProps: {
|
||||
@ -129,6 +135,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '发票类型',
|
||||
field: 'invoiceType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.invoiceType, 'pro_invoice_type');
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
},
|
||||
{
|
||||
@ -198,27 +209,36 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '租金',
|
||||
fieldName: 'rent',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
precision: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '押金',
|
||||
fieldName: 'deposit',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
precision: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '违约金',
|
||||
fieldName: 'penalty',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '总金额',
|
||||
fieldName: 'totalAmount',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
precision: 2,
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '总金额',
|
||||
// fieldName: 'totalAmount',
|
||||
// component: 'Input',
|
||||
// rules: 'required',
|
||||
// },
|
||||
{
|
||||
label: '开票状态',
|
||||
fieldName: 'invoiceStatus',
|
||||
|
@ -104,7 +104,7 @@ function handleMultiDelete() {
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="绿植租赁-订单收费列表">
|
||||
<BasicTable table-title="订单收费列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
|
@ -39,7 +39,7 @@ async function handleOpenChange(open: boolean) {
|
||||
{{ orderChargeDetail.orderId }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁合同编号">
|
||||
{{ orderChargeDetail.orderId }}
|
||||
{{ orderChargeDetail.rentalOrder.contractCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁人">
|
||||
{{ orderChargeDetail.userName}}
|
||||
@ -58,8 +58,10 @@ async function handleOpenChange(open: boolean) {
|
||||
:is="renderDict(orderChargeDetail.invoiceStatus,'pro_invoice_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="发票类型">
|
||||
{{ orderChargeDetail.invoiceType }}
|
||||
<DescriptionsItem label="发票类型" v-if="orderChargeDetail.invoiceType!=null">
|
||||
<component
|
||||
:is="renderDict(orderChargeDetail.invoiceType,'pro_invoice_type')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="收费状态" v-if="orderChargeDetail.chargeStatus!=null">
|
||||
<component
|
||||
@ -67,10 +69,10 @@ async function handleOpenChange(open: boolean) {
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产品编号">
|
||||
{{ orderChargeDetail.createTime }}
|
||||
{{ orderChargeDetail.rentalOrder.productList.map(item => item.plantCode).join('、') }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="购买植物">
|
||||
{{ orderChargeDetail.createTime }}
|
||||
{{ orderChargeDetail.rentalOrder.productList.map(item => item.plantName).join('、') }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="总金额">
|
||||
{{ orderChargeDetail.totalAmount }}
|
||||
|
@ -51,6 +51,10 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
isUpdate.value = !!id;
|
||||
if (isUpdate.value && id) {
|
||||
const record = await orderChargeInfo(id);
|
||||
record.chargeStatus = record.chargeStatus?.toString();
|
||||
record.paymentMethod = record.paymentMethod?.toString();
|
||||
record.invoiceType = record.invoiceType?.toString();
|
||||
record.invoiceStatus = record.invoiceStatus?.toString();
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
|
@ -4,6 +4,7 @@ import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render';
|
||||
import {h} from "vue";
|
||||
import {Rate} from "ant-design-vue";
|
||||
import {rentalOrderList} from "#/api/property/rentalOrder";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@ -38,11 +39,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'maintainName',
|
||||
minWidth: '120'
|
||||
},
|
||||
{
|
||||
title: '服务地点(房间id)',
|
||||
field: 'roomId',
|
||||
minWidth: '120'
|
||||
},
|
||||
// {
|
||||
// title: '服务地点',
|
||||
// field: 'roomName',
|
||||
// minWidth: '120'
|
||||
// },
|
||||
{
|
||||
title: '服务类型',
|
||||
field: 'serveType',
|
||||
@ -109,7 +110,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
});
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
minWidth: '150'
|
||||
},
|
||||
{
|
||||
title: '客户反馈',
|
||||
@ -154,8 +155,9 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
{
|
||||
label: '服务地点',
|
||||
fieldName: 'communityId',
|
||||
component: 'Input',
|
||||
fieldName: 'roomId',
|
||||
component: 'TreeSelect',
|
||||
defaultValue: undefined,
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
@ -190,7 +192,13 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '关联订单',
|
||||
fieldName: 'orderId',
|
||||
component: 'Input',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: rentalOrderList,
|
||||
resultField: 'rows',
|
||||
labelField: 'orderNo',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
@ -231,7 +239,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '处理措施',
|
||||
fieldName: 'measure',
|
||||
component: 'Input',
|
||||
component: 'Textarea',
|
||||
rules: 'required',
|
||||
labelWidth:100
|
||||
},
|
||||
|
@ -104,7 +104,7 @@ function handleMultiDelete() {
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="绿植租赁-订单养护管理列表">
|
||||
<BasicTable table-title="养护管理列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
|
@ -34,15 +34,15 @@ async function handleOpenChange(open: boolean) {
|
||||
{{ conservationManagementDetail.maintainName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务地点">
|
||||
{{ conservationManagementDetail.roomId }}
|
||||
{{ conservationManagementDetail.roomName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="服务类型" v-if="conservationManagementDetail.serveType!=null">
|
||||
<component
|
||||
:is="renderDict(conservationManagementDetail.serveType,'pro_service_type')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="养护周期">
|
||||
{{ conservationManagementDetail.orderId }}
|
||||
<DescriptionsItem label="养护周期" v-if="conservationManagementDetail.periodType!=null">
|
||||
1<component style="display: inline-block" :is="renderDict(conservationManagementDetail.periodType,'wy_time_unit')"/>{{ conservationManagementDetail.periodFrequency }}次
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="关联订单">
|
||||
{{ conservationManagementDetail.orderId }}
|
||||
|
@ -2,12 +2,12 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
import { cloneDeep,handleNode,getPopupContainer } from '@vben/utils';
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { orderMaintainAdd, orderMaintainInfo, orderMaintainUpdate } from '#/api/property/conservationManagement';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
import { modalSchema } from './data';
|
||||
|
||||
import { communityTree } from '#/api/property/community';
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
const isUpdate = ref(false);
|
||||
|
||||
@ -45,6 +45,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
setupCommunitySelect()
|
||||
modalApi.modalLoading(true);
|
||||
|
||||
const { id } = modalApi.getData() as { id?: number | string };
|
||||
@ -55,6 +56,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
record.serveType = record.serveType?.toString();
|
||||
record.state = record.state?.toString();
|
||||
record.inspectResult = record.inspectResult?.toString();
|
||||
record.periodType = record.periodType?.toString();
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
@ -86,6 +88,43 @@ async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
|
||||
// 获取服务地址
|
||||
async function setupCommunitySelect() {
|
||||
const areaList = await communityTree(5);
|
||||
// 选中后显示在输入框的值 即父节点 / 子节点
|
||||
// addFullName(areaList, 'areaName', ' / ');
|
||||
const splitStr = '/';
|
||||
handleNode(areaList, 'label', splitStr, function (node: any) {
|
||||
if (node.level != 5) {
|
||||
node.disabled = true;
|
||||
}
|
||||
});
|
||||
formApi.updateSchema([
|
||||
{
|
||||
componentProps: () => ({
|
||||
class: 'w-full',
|
||||
fieldNames: {
|
||||
key: 'id',
|
||||
label: 'label',
|
||||
value: 'code',
|
||||
children: 'children',
|
||||
},
|
||||
getPopupContainer,
|
||||
placeholder: '请选择',
|
||||
showSearch: true,
|
||||
treeData: areaList,
|
||||
treeDefaultExpandAll: true,
|
||||
treeLine: { showLeafIcon: false },
|
||||
// 筛选的字段
|
||||
treeNodeFilterProp: 'label',
|
||||
// 选中后显示在输入框的值
|
||||
treeNodeLabelProp: 'fullName',
|
||||
}),
|
||||
fieldName: 'roomId',
|
||||
},
|
||||
]);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -99,12 +99,6 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '租赁商品',
|
||||
field: 'planId',
|
||||
// slots: {default: 'planId'},
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '支付状态',
|
||||
field: 'paymentStatus',
|
||||
@ -135,11 +129,6 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '签署时间',
|
||||
field: 'signTime',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
@ -175,3 +164,30 @@ export const planInfoColumns: VxeGridProps['columns'] = [
|
||||
align: 'center'
|
||||
},
|
||||
]
|
||||
export const rentalColumns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '序号',
|
||||
field: 'id',
|
||||
width: 100,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '产品名称',
|
||||
field: 'plantName',
|
||||
minWidth: 100,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '产品租金(元)',
|
||||
field: 'rent',
|
||||
width: 180,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '租赁数量',
|
||||
field: 'planProNumber',
|
||||
width: 180,
|
||||
align: 'center'
|
||||
},
|
||||
]
|
||||
|
||||
|
@ -20,6 +20,7 @@ import type { RentalOrderForm } from '#/api/property/rentalOrder/model';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import rentalOrderModal from './rentalOrder-modal.vue';
|
||||
import orderDetailModal from './order-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
@ -31,15 +32,6 @@ const formOptions: VbenFormProps = {
|
||||
},
|
||||
schema: querySchema(),
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
|
||||
// 不需要直接删除
|
||||
// fieldMappingTime: [
|
||||
// [
|
||||
// 'createTime',
|
||||
// ['params[beginTime]', 'params[endTime]'],
|
||||
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
|
||||
// ],
|
||||
// ],
|
||||
};
|
||||
|
||||
const gridOptions: VxeGridProps = {
|
||||
@ -51,8 +43,6 @@ const gridOptions: VxeGridProps = {
|
||||
// 点击行选中
|
||||
// trigger: 'row',
|
||||
},
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// columns: columns(),
|
||||
columns,
|
||||
height: 'auto',
|
||||
keepSource: true,
|
||||
@ -84,15 +74,19 @@ const [RentalOrderModal, modalApi] = useVbenModal({
|
||||
connectedComponent: rentalOrderModal,
|
||||
});
|
||||
|
||||
const [OrderDetail, detailApi] = useVbenModal({
|
||||
connectedComponent: orderDetailModal,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
}
|
||||
|
||||
// async function handleEdit(row: Required<RentalOrderForm>) {
|
||||
// modalApi.setData({ id: row.id });
|
||||
// modalApi.open();
|
||||
// }
|
||||
async function handleInfo(row: Required<RentalOrderForm>) {
|
||||
detailApi.setData({ id: row.id });
|
||||
detailApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<RentalOrderForm>) {
|
||||
await rentalOrderRemove(row.id);
|
||||
@ -150,13 +144,13 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<!-- <ghost-button-->
|
||||
<!-- v-access:code="['property:rentalOrder:edit']"-->
|
||||
<!-- @click.stop="handleEdit(row)"-->
|
||||
<!-- >-->
|
||||
<!-- {{ $t('pages.common.edit') }}-->
|
||||
<!-- </ghost-button>-->
|
||||
<ghost-button
|
||||
v-access:code="['property:rentalOrder:info']"
|
||||
@click.stop="handleInfo(row)">
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<Popconfirm
|
||||
:disabled="row.paymentStatus==1&&row.contractStatus==1"
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
title="确认删除?"
|
||||
@ -174,5 +168,6 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
</BasicTable>
|
||||
<RentalOrderModal @reload="tableApi.query()" />
|
||||
<OrderDetail></OrderDetail>
|
||||
</Page>
|
||||
</template>
|
||||
|
@ -0,0 +1,116 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import {ref, shallowRef} from 'vue';
|
||||
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
|
||||
import {renderDict} from "#/utils/render";
|
||||
import type {RentalOrderVO} from "#/api/property/rentalOrder/model";
|
||||
import {rentalOrderInfo} from "#/api/property/rentalOrder";
|
||||
import {rentalColumns} from "./data";
|
||||
import {Table} from "ant-design-vue";
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
const planProducts=ref([]);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
orderDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const orderDetail = shallowRef<null |RentalOrderVO>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
// 赋值
|
||||
orderDetail.value = await rentalOrderInfo(id);
|
||||
planProducts.value=orderDetail.value?.productList
|
||||
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="租赁订单信息" class="w-[70%]">
|
||||
<Descriptions v-if="orderDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="订单号">
|
||||
{{ orderDetail.orderNo }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="客户名称">
|
||||
{{ orderDetail.customerName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="客户类型" v-if="orderDetail.type!=null">
|
||||
<component
|
||||
:is="renderDict(orderDetail.customerType,'wy_khlx')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁周期">
|
||||
{{ orderDetail.rentalPeriod}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁时间" :span="2">
|
||||
{{dayjs(orderDetail.startTime).format("YYYY-MM-DD")+' 至 '+dayjs(orderDetail.endTime).format("YYYY-MM-DD")}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="总金额">
|
||||
{{ orderDetail.totalAmount +"元"}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁方式">
|
||||
<component
|
||||
:is="renderDict(orderDetail.rentalType,'wy_zlfs')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="支付状态">
|
||||
<component
|
||||
:is="renderDict(orderDetail.paymentStatus,'pro_charging_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="是否续租">
|
||||
<component
|
||||
:is="renderDict(orderDetail.isRelet,'wy_sf')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="合同状态">
|
||||
<component
|
||||
:is="renderDict(orderDetail.contractStatus,'wy_htzt')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="合同编号" v-if="orderDetail.contractStatus!='1'">
|
||||
{{ orderDetail.contractCode ?? '无' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="签署时间" v-if="orderDetail.contractStatus!='1'">
|
||||
{{ orderDetail.signTime ?? '无' }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
<div v-if="planProducts.length">
|
||||
<div style="margin: 10px 0;font-weight: 500">
|
||||
订单产品详情
|
||||
</div>
|
||||
<Table :dataSource="planProducts" :columns="rentalColumns" :pagination="false"
|
||||
bordered size="small">
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.field === 'id'">
|
||||
{{ index + 1 }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ record[column.field] }}
|
||||
</template>
|
||||
</template>
|
||||
</Table>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
@ -28,7 +28,7 @@ const planList = ref<RentalPlanVO[]>([]);
|
||||
const plantsList = ref<PropertyVO[]>([]);
|
||||
const planProducts = ref<any[]>([]);
|
||||
const totalAmount = ref(0);
|
||||
const singleAmount = ref(0);
|
||||
const singleAmount = ref('0');
|
||||
const plantInfo = ref<PropertyVO>();
|
||||
const title = computed(() => {
|
||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||
@ -141,7 +141,7 @@ const modalSchema = [
|
||||
formItemClass: 'col-span-2',
|
||||
componentProps: {
|
||||
api: async () => {
|
||||
const res = await plantsProductList({pageNum: 1, pageSize: 1000, inventory: 1});
|
||||
const res = await plantsProductList({pageNum: 1, pageSize: 1000, inventory: 0});
|
||||
plantsList.value = res.rows || [];
|
||||
return plantsList.value.map(item => ({
|
||||
label: item.plantName + '-' + item.plantCode + '\xa0\xa0租金(元):' + item.rent + '\xa0\xa0库存数量:' + item.inventory,
|
||||
@ -151,10 +151,20 @@ const modalSchema = [
|
||||
onChange: async (value: string) => {
|
||||
plantInfo.value = plantsList.value.find(item => item.id === value);
|
||||
if (plantInfo.value) {
|
||||
const formValues = await formApi.getValues();
|
||||
if (formValues.productNum) {
|
||||
singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2);
|
||||
}
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
min: 1,
|
||||
max: plantInfo.value?.inventory,
|
||||
precision: 0,
|
||||
onChange:async ()=>{
|
||||
const formValues = await formApi.getValues();
|
||||
if (formValues.productNum&&plantInfo.value?.rent) {
|
||||
singleAmount.value = (plantInfo.value.rent * formValues.productNum).toFixed(2);
|
||||
}
|
||||
},
|
||||
}),
|
||||
fieldName: 'productNum',
|
||||
}])
|
||||
}
|
||||
},
|
||||
showSearch: true,
|
||||
@ -172,6 +182,7 @@ const modalSchema = [
|
||||
step: 1,
|
||||
placeholder: '租赁数量不可超出绿植产品库存数量',
|
||||
onChange: async (value: number) => {
|
||||
console.log(value,'================vvvv')
|
||||
if (plantInfo.value) {
|
||||
singleAmount.value = (plantInfo.value.rent * value).toFixed(2);
|
||||
}
|
||||
@ -313,7 +324,7 @@ async function handleConfirm() {
|
||||
data.startTime = data.rentalTime[0];
|
||||
data.endTime = data.rentalTime[1];
|
||||
}
|
||||
|
||||
data.paymentStatus=0
|
||||
await (isUpdate.value ? rentalOrderUpdate(data) : rentalOrderAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
@ -329,16 +340,6 @@ async function handleConfirm() {
|
||||
async function getPlanProducts(id: string) {
|
||||
const res = await rentalPlanInfo(id)
|
||||
plantsList.value=res.productList;
|
||||
// planProducts.value = [{
|
||||
// plantName: '发财树',
|
||||
// inventory: 3,
|
||||
// rent: 10,
|
||||
// }, {
|
||||
// plantName: '绿萝',
|
||||
// inventory: 5,
|
||||
// rent: 3,
|
||||
// }
|
||||
// ]
|
||||
totalAmount.value = planProducts.value?.reduce((sum, item: any) => sum + (item.rent * item.inventory), 0).toFixed(2)
|
||||
|
||||
}
|
||||
@ -354,7 +355,7 @@ async function handleClosed() {
|
||||
<BasicModal :title="title">
|
||||
<BasicForm>
|
||||
<template #planInfo="slotProps">
|
||||
<div v-if="planProducts.length" style="width: 100%">
|
||||
<div v-if="planProducts.length" style="width: 100%" v-bind="slotProps">
|
||||
<Table :dataSource="planProducts" :columns="planInfoColumns" :pagination="false"
|
||||
bordered size="small">
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
@ -375,7 +376,7 @@ async function handleClosed() {
|
||||
</div>
|
||||
</template>
|
||||
<template #totalAmount="slotProps">
|
||||
<div>{{ singleAmount }}</div>
|
||||
<div v-bind="slotProps">{{ singleAmount }}</div>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicModal>
|
||||
|
@ -119,8 +119,11 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '租金',
|
||||
fieldName: 'rent',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
precision: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '库存数量',
|
||||
@ -149,6 +152,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Input',
|
||||
component: 'Textarea',
|
||||
},
|
||||
];
|
||||
|
@ -103,7 +103,7 @@ function handleMultiDelete() {
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="绿植租赁-绿植产品列表">
|
||||
<BasicTable table-title="产品管理列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
|
@ -41,17 +41,19 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="单价(元)">
|
||||
{{ conferenceAddServicesDetail.price }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="单位">
|
||||
{{ conferenceAddServicesDetail.unit }}
|
||||
<DescriptionsItem label="单位" v-if="conferenceAddServicesDetail.unit!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceAddServicesDetail.unit,'pro_product_unit')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="类型" v-if="conferenceAddServicesDetail.type!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceAddServicesDetail.type,'wy_parking_spot')"
|
||||
:is="renderDict(conferenceAddServicesDetail.type,'value_added_type')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="状态" v-if="conferenceAddServicesDetail.state!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceAddServicesDetail.state,'wy_appointment_tatus')"
|
||||
:is="renderDict(conferenceAddServicesDetail.state,'product_management_status')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
|
@ -59,6 +59,8 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
const record = await attachInfo(id);
|
||||
record.unit = record.unit?.toString();
|
||||
record.state = record.state?.toString();
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
|
@ -40,6 +40,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '单位',
|
||||
field: 'unit',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.unit, 'pro_product_unit');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
@ -93,8 +98,11 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '单位',
|
||||
fieldName: 'unit',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_product_unit'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '类型',
|
||||
|
@ -1,5 +1,87 @@
|
||||
<template>
|
||||
<div>会议室预约</div>
|
||||
<div>
|
||||
<div class="card-box">
|
||||
<div v-for="(item,index) in meetingList" :key="index" class="card-list">
|
||||
<div><span class="card-title">{{ item.one }}</span><a-button class="card-button" type="primary">去预约</a-button></div>
|
||||
<div>容纳人数: {{ item.two }}人</div>
|
||||
<div>基础费用: {{ item.three }}元</div>
|
||||
<div>基础服务: {{ item.four }}</div>
|
||||
<div>基础服务: {{ item.five }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script></script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
const meetingList = ref([
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
{
|
||||
one: '10楼1002会议室',
|
||||
two: 50,
|
||||
three: 300,
|
||||
four: '话筒、音响、大屏',
|
||||
five: '开水、基础保洁'
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card-box{
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
padding: 30px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 30px;
|
||||
border: none;
|
||||
|
||||
.card-list{
|
||||
padding: 15px;
|
||||
background-color: white;
|
||||
border: 1px solid gray;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
|
||||
.card-title{
|
||||
font-size: 1.2vw;
|
||||
font-weight: bold;
|
||||
}
|
||||
div:nth-child(1){
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
div{
|
||||
line-height: 1.5vw;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 200px;
|
||||
|
||||
.card-button{
|
||||
right: 15px;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,59 @@
|
||||
<script setup lang="ts">
|
||||
import type {conferenceSettingsDetail} from '#/api/property/roomBooking/conferenceSettings/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import {meetInfo} from '#/api/property/roomBooking/conferenceSettings';
|
||||
import {renderDict} from "#/utils/render";
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
conferenceSettingsDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const conferenceSettingsDetail = shallowRef<null | conferenceSettingsDetail>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await meetInfo(id);
|
||||
conferenceSettingsDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="访客管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="conferenceSettingsDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="产品名称">
|
||||
{{ conferenceSettingsDetail.projectName}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="单价(元)">
|
||||
{{ conferenceSettingsDetail.price }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="单位">
|
||||
{{ conferenceSettingsDetail.unit }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="类型" v-if="conferenceSettingsDetail.type!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceSettingsDetail.type,'wy_parking_spot')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="状态" v-if="conferenceSettingsDetail.state!=null">
|
||||
<component
|
||||
:is="renderDict(conferenceSettingsDetail.state,'wy_appointment_tatus')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
</template>
|
@ -13,7 +13,8 @@ import {
|
||||
meetRemove,
|
||||
} from '#/api/property/roomBooking/conferenceSettings';
|
||||
import type { MeetForm } from '#/api/property/roomBooking/conferenceSettings/model';
|
||||
import meetModal from './meet-modal.vue';
|
||||
import ConferenceSettingsModal from './conferenceSettings-modal.vue';
|
||||
import ConferenceSettingsDetail from './conferenceSettings-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
@ -61,10 +62,19 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [MeetModal, modalApi] = useVbenModal({
|
||||
connectedComponent: meetModal,
|
||||
const [conferenceSettingsModal, modalApi] = useVbenModal({
|
||||
connectedComponent: ConferenceSettingsModal,
|
||||
});
|
||||
|
||||
const [ConferenceSettingsDetailModal, ConferenceSettingsDetailApi] = useVbenModal({
|
||||
connectedComponent: ConferenceSettingsDetail,
|
||||
});
|
||||
|
||||
async function handleInfo(row: Required<MeetForm>) {
|
||||
ConferenceSettingsDetailApi.setData({ id: row.id });
|
||||
ConferenceSettingsDetailApi.open();
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@ -119,6 +129,11 @@ function handleMultiDelete() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<ghost-button
|
||||
v-access:code="['system:meet:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@ -142,6 +157,7 @@ function handleMultiDelete() {
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<MeetModal @reload="tableApi.query()" />
|
||||
<conferenceSettingsModal @reload="tableApi.query()" />
|
||||
<ConferenceSettingsDetailModal/>
|
||||
</Page>
|
||||
</template>
|
||||
|
@ -1,369 +0,0 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'tbConferenceId',
|
||||
label: '会议室id',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
||||
options: getDictOptions('wy_yyzt'),
|
||||
},
|
||||
fieldName: 'bookingStatus',
|
||||
label: '预约状态',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护
|
||||
options: getDictOptions('wy_shzt'),
|
||||
},
|
||||
fieldName: 'reviewStatus',
|
||||
label: '审核状态',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'bookingName',
|
||||
label: '会议预订人',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'userUnit',
|
||||
label: '使用单位',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'conferenceTheme',
|
||||
label: '会议主题',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'appointmentDate',
|
||||
label: '预约日期',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'appointmentBeginTime',
|
||||
label: '预约开始时段',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'appointmentEndTime',
|
||||
label: '预约结束时段',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'attendeesName',
|
||||
label: '参会人员',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'approverCount',
|
||||
label: '参会人数',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'checkInStartTime',
|
||||
label: '签到开始时间',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'checkInEndTime',
|
||||
label: '签到结束时间',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'evaluate',
|
||||
label: '评价',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
|
||||
options: getDictOptions('wy_sf'),
|
||||
buttonStyle: 'solid',
|
||||
optionType: 'button',
|
||||
},
|
||||
fieldName: 'addServices',
|
||||
label: '是否需要增值服务',
|
||||
},
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '会议室id',
|
||||
field: 'tbConferenceId',
|
||||
},
|
||||
{
|
||||
title: '预约状态',
|
||||
field: 'bookingStatus',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
||||
return renderDict(row.bookingStatus, 'wy_yyzt');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
field: 'reviewStatus',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护
|
||||
return renderDict(row.reviewStatus, 'wy_shzt');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '会议预订人',
|
||||
field: 'bookingName',
|
||||
},
|
||||
{
|
||||
title: '使用单位',
|
||||
field: 'userUnit',
|
||||
},
|
||||
{
|
||||
title: '会议主题',
|
||||
field: 'conferenceTheme',
|
||||
},
|
||||
{
|
||||
title: '预约日期',
|
||||
field: 'appointmentDate',
|
||||
},
|
||||
{
|
||||
title: '预约开始时段',
|
||||
field: 'appointmentBeginTime',
|
||||
},
|
||||
{
|
||||
title: '预约结束时段',
|
||||
field: 'appointmentEndTime',
|
||||
},
|
||||
{
|
||||
title: '参会人员',
|
||||
field: 'attendeesName',
|
||||
},
|
||||
{
|
||||
title: '参会人数',
|
||||
field: 'approverCount',
|
||||
},
|
||||
{
|
||||
title: '签到开始时间',
|
||||
field: 'checkInStartTime',
|
||||
},
|
||||
{
|
||||
title: '签到结束时间',
|
||||
field: 'checkInEndTime',
|
||||
},
|
||||
{
|
||||
title: '评价',
|
||||
field: 'evaluate',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
field: 'remark',
|
||||
},
|
||||
{
|
||||
title: '是否需要增值服务',
|
||||
field: 'addServices',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
|
||||
return renderDict(row.addServices, 'wy_sf');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: 'id',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '会议室id',
|
||||
fieldName: 'tbConferenceId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预约状态',
|
||||
fieldName: 'bookingStatus',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_YYZT 便于维护
|
||||
options: getDictOptions('wy_yyzt'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '审核状态',
|
||||
fieldName: 'reviewStatus',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_SHZT 便于维护
|
||||
options: getDictOptions('wy_shzt'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '会议预订人',
|
||||
fieldName: 'bookingName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '使用单位',
|
||||
fieldName: 'userUnit',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '会议主题',
|
||||
fieldName: 'conferenceTheme',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预约日期',
|
||||
fieldName: 'appointmentDate',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预约开始时段',
|
||||
fieldName: 'appointmentBeginTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '预约结束时段',
|
||||
fieldName: 'appointmentEndTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '参会人员',
|
||||
fieldName: 'attendeesName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '参会人数',
|
||||
fieldName: 'approverCount',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '签到开始时间',
|
||||
fieldName: 'checkInStartTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '签到结束时间',
|
||||
fieldName: 'checkInEndTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '评价',
|
||||
fieldName: 'evaluate',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '是否需要增值服务',
|
||||
fieldName: 'addServices',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
|
||||
options: getDictOptions('wy_sf'),
|
||||
buttonStyle: 'solid',
|
||||
optionType: 'button',
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
];
|
@ -1,101 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { roomBookingAdd, roomBookingInfo, roomBookingUpdate } from '#/api/property/roomBooking';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
|
||||
import { modalSchema } from './data';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
const isUpdate = ref(false);
|
||||
const title = computed(() => {
|
||||
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||
});
|
||||
|
||||
const [BasicForm, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
// 默认占满两列
|
||||
formItemClass: 'col-span-2',
|
||||
// 默认label宽度 px
|
||||
labelWidth: 80,
|
||||
// 通用配置项 会影响到所有表单项
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
}
|
||||
},
|
||||
schema: modalSchema(),
|
||||
showDefaultActions: false,
|
||||
wrapperClass: 'grid-cols-2',
|
||||
});
|
||||
|
||||
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||
{
|
||||
initializedGetter: defaultFormValueGetter(formApi),
|
||||
currentGetter: defaultFormValueGetter(formApi),
|
||||
},
|
||||
);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
// 在这里更改宽度
|
||||
class: 'w-[550px]',
|
||||
fullscreenButton: false,
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
onConfirm: handleConfirm,
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
|
||||
const { id } = modalApi.getData() as { id?: number | string };
|
||||
isUpdate.value = !!id;
|
||||
|
||||
if (isUpdate.value && id) {
|
||||
const record = await roomBookingInfo(id);
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
await markInitialized();
|
||||
|
||||
modalApi.modalLoading(false);
|
||||
},
|
||||
});
|
||||
|
||||
async function handleConfirm() {
|
||||
try {
|
||||
modalApi.lock(true);
|
||||
const { valid } = await formApi.validate();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
await (isUpdate.value ? roomBookingUpdate(data) : roomBookingAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
modalApi.lock(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function handleClosed() {
|
||||
await formApi.resetForm();
|
||||
resetInitialized();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :title="title">
|
||||
<BasicForm />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user