feat: 更新业务需求
This commit is contained in:
@@ -196,8 +196,8 @@ export interface OrderChargeQuery extends PageQuery {
|
||||
chargeStatus?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
@@ -266,4 +266,8 @@ export interface orderChargeDetailForm extends BaseEntity {
|
||||
* 收费状态
|
||||
*/
|
||||
chargeStatus?: string | number;
|
||||
/**
|
||||
* 租赁单位
|
||||
*/
|
||||
unitName?: string;
|
||||
}
|
||||
|
@@ -86,6 +86,10 @@ export interface RentalOrderVO {
|
||||
*/
|
||||
signTime: string;
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
unitName: string;
|
||||
}
|
||||
|
||||
export interface RentalOrderForm extends BaseEntity {
|
||||
@@ -173,7 +177,6 @@ export interface RentalOrderForm extends BaseEntity {
|
||||
* 签署时间
|
||||
*/
|
||||
signTime?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface RentalOrderQuery extends PageQuery {
|
||||
@@ -257,7 +260,7 @@ export interface RentalOrderQuery extends PageQuery {
|
||||
signTime?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
slots: {default: 'state'},
|
||||
slots: { default: 'state' },
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
@@ -159,11 +159,11 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '手机缴费',
|
||||
fieldName: 'isMobilePay',
|
||||
label: '付费方式',
|
||||
fieldName: 'paymentMode',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('pro_mobile_payment'),
|
||||
options: getDictOptions('wy_fffs'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
@@ -202,7 +202,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
options: getDictOptions('pro_calculation_formula'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
formItemClass:'col-span-2',
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '计费单价',
|
||||
|
@@ -1,17 +1,18 @@
|
||||
import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {costItemSettingList} from "#/api/property/costManagement/costItemSetting";
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render';
|
||||
import { costItemSettingList } from '#/api/property/costManagement/costItemSetting';
|
||||
import { h } from 'vue';
|
||||
|
||||
import { resident_unitList } from '#/api/property/resident/unit';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api:async ()=>{
|
||||
return (await costItemSettingList({pageSize: 1000, pageNum: 1}))?.rows
|
||||
api: async () => {
|
||||
return (await costItemSettingList({ pageSize: 1000, pageNum: 1 }))
|
||||
?.rows;
|
||||
},
|
||||
afterFetch: (data: { chargeItem: string; id: string }[]) => {
|
||||
return data.map((item: any) => ({
|
||||
@@ -28,12 +29,29 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'chargeStatus',
|
||||
label: '缴费状态',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_fyshzt')
|
||||
options: getDictOptions('wy_fyshzt'),
|
||||
},
|
||||
},
|
||||
{
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => {
|
||||
const rows = await resident_unitList({
|
||||
pageSize: 1000000000,
|
||||
pageNum: 1,
|
||||
});
|
||||
return rows;
|
||||
},
|
||||
resultField: 'rows',
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
fieldName: 'residentUnitId',
|
||||
label: '单位',
|
||||
},
|
||||
];
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{type: 'checkbox', width: 60},
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '单位',
|
||||
field: 'residentUnitText',
|
||||
@@ -41,7 +59,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
{
|
||||
title: '收费项目',
|
||||
field: 'costItemsId',
|
||||
field: 'chargeItemText',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
@@ -53,21 +71,23 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '计费开始时间',
|
||||
field: 'startTime',
|
||||
width: 150,
|
||||
slots: { default: 'startTime' },
|
||||
},
|
||||
{
|
||||
title: '计费结束时间',
|
||||
field: 'endTime',
|
||||
width: 150,
|
||||
slots: { default: 'endTime' },
|
||||
},
|
||||
{
|
||||
title: '缴费状态',
|
||||
field: 'chargeStatus',
|
||||
width: 150,
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.chargeStatus, 'wy_fyshzt')
|
||||
}
|
||||
}
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.chargeStatus, 'wy_fyshzt');
|
||||
},
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: '状态',
|
||||
@@ -87,7 +107,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: {default: 'action'},
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
@@ -107,8 +127,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '单位',
|
||||
fieldName: 'residentUnitId',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
},
|
||||
componentProps: {},
|
||||
rules: 'selectRequired',
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
@@ -136,16 +155,14 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '业主',
|
||||
fieldName: 'personId',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
},
|
||||
componentProps: {},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '费用类型',
|
||||
fieldName: 'costType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
},
|
||||
componentProps: {},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
@@ -201,7 +218,7 @@ export const modalSchemaUpdate: FormSchemaGetter = () => [
|
||||
fieldName: 'payType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options:getDictOptions('wy_zffs')
|
||||
options: getDictOptions('wy_zffs'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
@@ -210,14 +227,15 @@ export const modalSchemaUpdate: FormSchemaGetter = () => [
|
||||
fieldName: 'chargeCycle',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:1,
|
||||
precision:0,
|
||||
placeholder:'请输入缴费周期(月)'
|
||||
min: 1,
|
||||
precision: 0,
|
||||
placeholder: '请输入缴费周期(月)',
|
||||
},
|
||||
suffix: () => h('span', { style: {fontSize: '0.875rem',fontWeight:500,} }, '月'),
|
||||
suffix: () =>
|
||||
h('span', { style: { fontSize: '0.875rem', fontWeight: 500 } }, '月'),
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
]
|
||||
];
|
||||
export const modalSchemaRefund: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
@@ -233,6 +251,6 @@ export const modalSchemaRefund: FormSchemaGetter = () => [
|
||||
fieldName: 'reason',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
rules:'required'
|
||||
rules: 'required',
|
||||
},
|
||||
]
|
||||
];
|
||||
|
@@ -39,6 +39,11 @@ async function handleOpenChange(open: boolean) {
|
||||
}
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
function formatDate(dateString: string) {
|
||||
if (!dateString) return '';
|
||||
const date = new Date(dateString);
|
||||
return date.toISOString().split('T')[0];
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -57,7 +62,7 @@ async function handleOpenChange(open: boolean) {
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="计费时间">
|
||||
{{ houseChargeDetail.startTime + ' 至 ' + houseChargeDetail.endTime }}
|
||||
{{ formatDate(houseChargeDetail.startTime) + ' 至 ' + formatDate(houseChargeDetail.endTime) }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="单位">
|
||||
{{ houseChargeDetail?.residentUnitText }}
|
||||
|
@@ -125,7 +125,11 @@ function handleMultiDelete() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function formatDate(dateString: string) {
|
||||
if (!dateString) return '';
|
||||
const date = new Date(dateString);
|
||||
return date.toISOString().split('T')[0];
|
||||
}
|
||||
function handleDownloadExcel() {
|
||||
commonDownloadExcel(houseChargeExport, '房屋收费数据', tableApi.formApi.form.values, {
|
||||
fieldMappingTime: formOptions.fieldMappingTime,
|
||||
@@ -161,6 +165,14 @@ function handleDownloadExcel() {
|
||||
</a-button>
|
||||
</Space>
|
||||
</template>
|
||||
<template #startTime="{row}">
|
||||
{{ formatDate(row.startTime) }}
|
||||
|
||||
</template>
|
||||
<template #endTime="{row}">
|
||||
{{ formatDate(row.endTime) }}
|
||||
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
|
@@ -2,7 +2,8 @@ import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render';
|
||||
import {rentalOrderList} from "#/api/property/rentalOrder";
|
||||
import { rentalOrderList } from '#/api/property/rentalOrder';
|
||||
import { resident_unitList } from '#/api/property/resident/unit';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -70,47 +71,47 @@ export const columns: VxeGridProps['columns'] = [
|
||||
return (rowIndex + 1).toString();
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
field: 'orderId',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '租赁合同编号',
|
||||
field: 'userId',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '租赁人',
|
||||
field: 'userName',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '租金',
|
||||
field: 'rent',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '押金',
|
||||
field: 'deposit',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '违约金',
|
||||
field: 'penalty',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '总金额',
|
||||
field: 'totalAmount',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '收费日期',
|
||||
field: 'chargeDate',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '支付方式',
|
||||
@@ -120,7 +121,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
return renderDict(row.paymentMethod, 'pro_payment_method');
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '开票状态',
|
||||
@@ -130,7 +131,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
return renderDict(row.invoiceStatus, 'pro_invoice_status');
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '发票类型',
|
||||
@@ -140,7 +141,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
return renderDict(row.invoiceType, 'pro_invoice_type');
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '收费状态',
|
||||
@@ -150,12 +151,12 @@ export const columns: VxeGridProps['columns'] = [
|
||||
return renderDict(row.chargeStatus, 'pro_charging_status');
|
||||
},
|
||||
},
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
minWidth: '120'
|
||||
minWidth: '120',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@@ -203,7 +204,24 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '租赁人',
|
||||
fieldName: 'userName',
|
||||
component: "Select",
|
||||
component: 'Select',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
component: 'ApiSelect',
|
||||
fieldName: 'unitId',
|
||||
label: '租赁单位',
|
||||
componentProps: {
|
||||
api: getUnitList,
|
||||
resultField: 'data',
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
immediate: true,
|
||||
debounceTime: 500,
|
||||
allowClear: true,
|
||||
placeholder: '请选择租赁单位',
|
||||
filterOption: true,
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
@@ -211,27 +229,27 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'rent',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
precision: 2,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '押金',
|
||||
fieldName: 'deposit',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
precision: 2,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '违约金',
|
||||
fieldName: 'penalty',
|
||||
component: 'InputNumber',
|
||||
rules: 'required',
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
precision: 2,
|
||||
}
|
||||
},
|
||||
},
|
||||
// {
|
||||
// label: '总金额',
|
||||
@@ -287,3 +305,21 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
||||
export async function getUnitList(): Promise<
|
||||
{ value: number; label: string }[]
|
||||
> {
|
||||
const queryParam = {
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
};
|
||||
const res = await resident_unitList(queryParam);
|
||||
const data: { value: number; label: string }[] = [];
|
||||
|
||||
res.rows.forEach((r: any) => {
|
||||
data.push({
|
||||
value: r.id,
|
||||
label: r.name,
|
||||
});
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
@@ -1,13 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import type {orderChargeDetailForm} from '#/api/property/chargeManagement/model';
|
||||
import {shallowRef} from 'vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
import type { orderChargeDetailForm } from '#/api/property/chargeManagement/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 {orderChargeInfo} from '#/api/property/chargeManagement';
|
||||
import {renderDict} from "#/utils/render";
|
||||
import { orderChargeInfo } from '#/api/property/chargeManagement';
|
||||
import { renderDict } from '#/utils/render';
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
@@ -25,7 +25,7 @@ async function handleOpenChange(open: boolean) {
|
||||
return null;
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const { id } = modalApi.getData() as { id: number | string };
|
||||
const response = await orderChargeInfo(id);
|
||||
orderChargeDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
@@ -33,8 +33,19 @@ async function handleOpenChange(open: boolean) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="查看收费" class="w-[70%]">
|
||||
<Descriptions v-if="orderChargeDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<BasicModal
|
||||
:footer="false"
|
||||
:fullscreen-button="false"
|
||||
title="查看收费"
|
||||
class="w-[70%]"
|
||||
>
|
||||
<Descriptions
|
||||
v-if="orderChargeDetail"
|
||||
size="small"
|
||||
:column="2"
|
||||
bordered
|
||||
:labelStyle="{ width: '100px' }"
|
||||
>
|
||||
<DescriptionsItem label="订单号">
|
||||
{{ orderChargeDetail.orderId }}
|
||||
</DescriptionsItem>
|
||||
@@ -42,7 +53,10 @@ async function handleOpenChange(open: boolean) {
|
||||
{{ orderChargeDetail.rentalOrder.contractCode }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁人">
|
||||
{{ orderChargeDetail.userName}}
|
||||
{{ orderChargeDetail.userName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁单位">
|
||||
{{ orderChargeDetail.unitName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租金">
|
||||
{{ orderChargeDetail.rent }}
|
||||
@@ -53,32 +67,53 @@ async function handleOpenChange(open: boolean) {
|
||||
<DescriptionsItem label="违约金">
|
||||
{{ orderChargeDetail.penalty }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="开票状态" v-if="orderChargeDetail.invoiceStatus!=null">
|
||||
<DescriptionsItem
|
||||
label="开票状态"
|
||||
v-if="orderChargeDetail.invoiceStatus != null"
|
||||
>
|
||||
<component
|
||||
:is="renderDict(orderChargeDetail.invoiceStatus,'pro_invoice_status')"
|
||||
:is="
|
||||
renderDict(orderChargeDetail.invoiceStatus, 'pro_invoice_status')
|
||||
"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="发票类型" v-if="orderChargeDetail.invoiceType!=null">
|
||||
<DescriptionsItem
|
||||
label="发票类型"
|
||||
v-if="orderChargeDetail.invoiceType != null"
|
||||
>
|
||||
<component
|
||||
:is="renderDict(orderChargeDetail.invoiceType,'pro_invoice_type')"
|
||||
:is="renderDict(orderChargeDetail.invoiceType, 'pro_invoice_type')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="收费状态" v-if="orderChargeDetail.chargeStatus!=null">
|
||||
<DescriptionsItem
|
||||
label="收费状态"
|
||||
v-if="orderChargeDetail.chargeStatus != null"
|
||||
>
|
||||
<component
|
||||
:is="renderDict(orderChargeDetail.chargeStatus,'pro_charging_status')"
|
||||
:is="
|
||||
renderDict(orderChargeDetail.chargeStatus, 'pro_charging_status')
|
||||
"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产品编号">
|
||||
{{ orderChargeDetail.rentalOrder.productList.map(item => item.plantCode).join('、') }}
|
||||
{{
|
||||
orderChargeDetail.rentalOrder.productList
|
||||
.map((item) => item.plantCode)
|
||||
.join('、')
|
||||
}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="购买植物">
|
||||
{{ orderChargeDetail.rentalOrder.productList.map(item => item.plantName).join('、') }}
|
||||
{{
|
||||
orderChargeDetail.rentalOrder.productList
|
||||
.map((item) => item.plantName)
|
||||
.join('、')
|
||||
}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="总金额">
|
||||
{{ orderChargeDetail.totalAmount }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="产品图片">
|
||||
<img :src="orderChargeDetail.createTime" alt="">
|
||||
<img :src="orderChargeDetail.createTime" alt="" />
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
|
@@ -1,24 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, shallowRef } from 'vue';
|
||||
|
||||
import {ref, shallowRef} from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
|
||||
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||
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";
|
||||
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 planProducts = ref([]);
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
@@ -27,7 +26,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
},
|
||||
});
|
||||
|
||||
const orderDetail = shallowRef<null |RentalOrderVO>(null);
|
||||
const orderDetail = shallowRef<null | RentalOrderVO>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
@@ -35,73 +34,90 @@ async function handleOpenChange(open: boolean) {
|
||||
}
|
||||
modalApi.modalLoading(true);
|
||||
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const { id } = modalApi.getData() as { id: number | string };
|
||||
// 赋值
|
||||
orderDetail.value = await rentalOrderInfo(id);
|
||||
planProducts.value=orderDetail.value?.productList
|
||||
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'}">
|
||||
<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 }}
|
||||
{{ orderDetail.orderNo }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="客户名称">
|
||||
{{ orderDetail.customerName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="客户类型" v-if="orderDetail.type!=null">
|
||||
<component
|
||||
:is="renderDict(orderDetail.customerType,'wy_khlx')"
|
||||
/>
|
||||
<DescriptionsItem label="客户类型" v-if="orderDetail.type != null">
|
||||
<component :is="renderDict(orderDetail.customerType, 'wy_khlx')" />
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁单位">
|
||||
{{ orderDetail.unitName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁周期">
|
||||
{{ orderDetail.rentalPeriod}}
|
||||
{{ orderDetail.rentalPeriod }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁时间" :span="2">
|
||||
{{dayjs(orderDetail.startTime).format("YYYY-MM-DD")+' 至 '+dayjs(orderDetail.endTime).format("YYYY-MM-DD")}}
|
||||
{{
|
||||
dayjs(orderDetail.startTime).format('YYYY-MM-DD') +
|
||||
' 至 ' +
|
||||
dayjs(orderDetail.endTime).format('YYYY-MM-DD')
|
||||
}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="总金额">
|
||||
{{ orderDetail.totalAmount +"元"}}
|
||||
{{ orderDetail.totalAmount + '元' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="租赁方式">
|
||||
<component
|
||||
:is="renderDict(orderDetail.rentalType,'wy_zlfs')"
|
||||
/>
|
||||
<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.paymentStatus,'pro_charging_status')"-->
|
||||
<!-- />-->
|
||||
<!-- </DescriptionsItem>-->
|
||||
<DescriptionsItem label="是否续租">
|
||||
<component
|
||||
:is="renderDict(orderDetail.isRelet,'wy_sf')"
|
||||
/>
|
||||
<component :is="renderDict(orderDetail.isRelet, 'wy_sf')" />
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="合同状态">
|
||||
<component
|
||||
:is="renderDict(orderDetail.contractStatus,'wy_htzt')"
|
||||
/>
|
||||
<component :is="renderDict(orderDetail.contractStatus, 'wy_htzt')" />
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="合同编号" v-if="orderDetail.contractStatus!='1'">
|
||||
<DescriptionsItem
|
||||
label="合同编号"
|
||||
v-if="orderDetail.contractStatus != '1'"
|
||||
>
|
||||
{{ orderDetail.contractCode ?? '无' }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="签署时间" v-if="orderDetail.contractStatus!='1'">
|
||||
<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">
|
||||
<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 }}
|
||||
|
@@ -20,6 +20,7 @@ import type {PropertyVO} from "#/api/property/productManagement/model";
|
||||
import type {RentalPlanVO} from "#/api/property/rentalPlan/model";
|
||||
import {planInfoColumns} from './data';
|
||||
import {Table} from "ant-design-vue";
|
||||
import { resident_unitList } from '#/api/property/resident/unit'
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
@@ -57,6 +58,23 @@ const modalSchema = [
|
||||
options: getDictOptions('wy_khlx')
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
component: 'ApiSelect',
|
||||
fieldName: 'unitId',
|
||||
label: '租赁单位',
|
||||
componentProps: {
|
||||
api: getUnitList,
|
||||
resultField: 'data',
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
immediate: true,
|
||||
debounceTime: 500,
|
||||
allowClear: true,
|
||||
placeholder: '请选择租赁单位',
|
||||
filterOption: true,
|
||||
},
|
||||
rules:'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '租赁周期',
|
||||
@@ -300,7 +318,22 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
modalApi.modalLoading(false);
|
||||
},
|
||||
});
|
||||
async function getUnitList(){
|
||||
const queryParam = {
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
}
|
||||
const res = await resident_unitList(queryParam)
|
||||
const data: { value: number; label: string }[] = []
|
||||
|
||||
res.rows.forEach((r: any) => {
|
||||
data.push({
|
||||
value: r.id,
|
||||
label: r.name,
|
||||
})
|
||||
})
|
||||
return data;
|
||||
}
|
||||
async function handleConfirm() {
|
||||
try {
|
||||
modalApi.lock(true);
|
||||
|
Reference in New Issue
Block a user