Commit 250784d9 by chenwq

优化车辆和财务页面,调整日期选择功能,增加日期限制,排序列以符合预设顺序

1 parent 4da57903
Pipeline #608 for 250784d9 failed in 0 seconds
import { useMemo, useState } from 'react'; import { useMemo, useState } from 'react';
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import type { Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { UAlert, UCard, UImage } from '@uj/ui'; import { UAlert, UCard } from '@uj/ui';
import { downloadCenter } from '@uj/platform-sdk'; import { downloadCenter } from '@uj/platform-sdk';
import { DataTable, SearchForm, type FieldSchema } from '@/components'; import { DataTable, SearchForm, type FieldSchema } from '@/components';
import { financialLedgerApi } from '@/api'; import { financialLedgerApi } from '@/api';
...@@ -59,16 +59,14 @@ export default function FinancialLedger() { ...@@ -59,16 +59,14 @@ export default function FinancialLedger() {
essential: true, essential: true,
inputProps: { maxLength: 20 }, inputProps: { maxLength: 20 },
}, },
{ name: 'storageTime', label: '入库时间', type: 'dateRange' },
];
const columns = [
{ {
title: '车辆照片', name: 'storageTime',
dataIndex: 'carPhoto', label: '入库时间',
width: 112, type: 'dateRange',
render: (v: unknown) => disabledDate: (date) => date.isAfter(dayjs(), 'day'),
typeof v === 'string' ? <UImage src={v} width={88} height={64} /> : '-',
}, },
];
const columns = [
...( ...(
[ [
['卖方单位/个人', 'partAName'], ['卖方单位/个人', 'partAName'],
......
...@@ -196,6 +196,59 @@ export default function VehicleLedger() { ...@@ -196,6 +196,59 @@ export default function VehicleLedger() {
{ title: '拍卖价格', dataIndex: 'sellingPrice', width: 110, render: money }, { title: '拍卖价格', dataIndex: 'sellingPrice', width: 110, render: money },
{ title: '收拍利润', dataIndex: 'profit', width: 110, render: money }, { title: '收拍利润', dataIndex: 'profit', width: 110, render: money },
); );
const columnOrder = [
'评估单编号',
'评估单时间',
'评估单来源',
'总部定价师',
'转让协议签署',
'交接确认单签署',
'补充协议签署',
'代保管协议签署',
'企微审批单号(定金)',
'企微审批状态(定金)',
'企微审批单号(尾款/全款)',
'企微审批状态(尾款/全款)',
'门店',
'销售顾问',
'驻店人员',
'签约人',
'收款方',
'车牌号',
'类别',
'品牌',
'车架号',
'收购时间(付款)',
'收购价格/元(包含对公流量费)',
'是否全款',
'定金时间',
'定金金额',
'尾款时间',
'尾款金额',
'入库时间',
'是否交付',
'是否在库',
'在库时长/天',
'是否拍卖',
'拍卖价格',
'拍卖时间',
'收款时间',
'付款方',
'收拍利润',
'拍卖平台',
'备注',
'车主身份证号码',
'电话',
'卖方单位/个人地址',
'登记证号',
'厂牌(品牌)型号',
'车辆类型',
'是否对账',
];
columns.sort(
(left, right) =>
columnOrder.indexOf(String(left.title)) - columnOrder.indexOf(String(right.title)),
);
return ( return (
<> <>
<UCard className="uj-filter-card" size="small"> <UCard className="uj-filter-card" size="small">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!