接单员与财务管理

This commit is contained in:
liu
2026-06-17 10:35:13 +08:00
parent 254823e308
commit 8d52e863b9
110 changed files with 6054 additions and 570 deletions
+161
View File
@@ -0,0 +1,161 @@
import { Tag, Typography } from 'antd';
import React from 'react';
import XinTable from '@/components/XinTable';
import type { XinTableColumn, XinTableProps } from '@/components/XinTable/typings';
import type IRunnerApplication from '@/domain/iRunnerApplication';
import { useTranslation } from 'react-i18next';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
const { Title, Text } = Typography;
dayjs.extend(relativeTime);
const Table: React.FC = () => {
const { t } = useTranslation();
const columns: XinTableColumn<IRunnerApplication>[] = [
{
title: t('runner.application.id'),
dataIndex: 'id',
hideInForm: true,
sorter: true,
align: 'center',
width: 80,
},
{
title: t('runner.application.user_id'),
dataIndex: 'user_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.application.real_name'),
dataIndex: 'real_name',
valueType: 'text',
align: 'center',
},
{
title: t('runner.application.mobile'),
dataIndex: 'mobile',
valueType: 'text',
align: 'center',
},
{
title: t('runner.application.resume'),
dataIndex: 'resume',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.application.id_card'),
dataIndex: 'id_card',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.application.id_card_front'),
dataIndex: 'id_card_front',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.application.id_card_back'),
dataIndex: 'id_card_back',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.application.status'),
dataIndex: 'status',
valueType: 'radioButton',
fieldProps: {
options: [
{ value: 0, label: t('runner.application.status.0') },
{ value: 1, label: t('runner.application.status.1') },
{ value: 2, label: t('runner.application.status.2') },
],
},
render: (value: number) => {
if (value === 1) return <Tag color="success">{t('runner.application.status.1')}</Tag>;
if (value === 2) return <Tag color="error">{t('runner.application.status.2')}</Tag>;
return <Tag color="warning">{t('runner.application.status.0')}</Tag>;
},
filters: [
{ text: t('runner.application.status.0'), value: 0 },
{ text: t('runner.application.status.1'), value: 1 },
{ text: t('runner.application.status.2'), value: 2 },
],
align: 'center',
},
{
title: t('runner.application.review_remark'),
dataIndex: 'review_remark',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.application.reviewed_at'),
dataIndex: 'reviewed_at',
hideInForm: true,
hideInSearch: true,
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.application.created_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'created_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.application.updated_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'updated_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
];
const tableProps: XinTableProps<IRunnerApplication> = {
api: '/runner/application',
columns,
rowKey: 'id',
accessName: 'runner.application',
formProps: {
grid: true,
colProps: { span: 12 },
rowProps: { gutter: [30, 0] },
layout: 'vertical',
},
modalProps: {
width: 800,
},
cardProps: {
variant: 'borderless',
},
pagination: {
size: 'small',
style: { marginBottom: 0 },
},
};
return (
<>
<div className="mb-5">
<Title level={3}>{t('runner.application.page.title')}</Title>
<Text type="secondary">{t('runner.application.page.description')}</Text>
</div>
<XinTable<IRunnerApplication> {...tableProps} />
</>
);
};
export default Table;
+141
View File
@@ -0,0 +1,141 @@
import { Tag, Typography } from 'antd';
import React from 'react';
import XinTable from '@/components/XinTable';
import type { XinTableColumn, XinTableProps } from '@/components/XinTable/typings';
import type IRunnerComplaintAppeal from '@/domain/iRunnerComplaintAppeal';
import { useTranslation } from 'react-i18next';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
const { Title, Text } = Typography;
dayjs.extend(relativeTime);
const Table: React.FC = () => {
const { t } = useTranslation();
const columns: XinTableColumn<IRunnerComplaintAppeal>[] = [
{
title: t('runner.complaint_appeal.id'),
dataIndex: 'id',
hideInForm: true,
sorter: true,
align: 'center',
width: 80,
},
{
title: t('runner.complaint_appeal.complaint_id'),
dataIndex: 'complaint_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.complaint_appeal.worker_id'),
dataIndex: 'worker_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.complaint_appeal.content'),
dataIndex: 'content',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.complaint_appeal.images'),
dataIndex: 'images',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.complaint_appeal.status'),
dataIndex: 'status',
valueType: 'radioButton',
fieldProps: {
options: [
{ value: 0, label: t('runner.complaint_appeal.status.0') },
{ value: 1, label: t('runner.complaint_appeal.status.1') },
{ value: 2, label: t('runner.complaint_appeal.status.2') },
],
},
render: (value: number) => {
if (value === 1) return <Tag color="success">{t('runner.complaint_appeal.status.1')}</Tag>;
if (value === 2) return <Tag color="error">{t('runner.complaint_appeal.status.2')}</Tag>;
return <Tag color="warning">{t('runner.complaint_appeal.status.0')}</Tag>;
},
filters: [
{ text: t('runner.complaint_appeal.status.0'), value: 0 },
{ text: t('runner.complaint_appeal.status.1'), value: 1 },
{ text: t('runner.complaint_appeal.status.2'), value: 2 },
],
align: 'center',
},
{
title: t('runner.complaint_appeal.reply'),
dataIndex: 'reply',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.complaint_appeal.reviewed_at'),
dataIndex: 'reviewed_at',
hideInForm: true,
hideInSearch: true,
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.complaint_appeal.created_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'created_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.complaint_appeal.updated_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'updated_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
];
const tableProps: XinTableProps<IRunnerComplaintAppeal> = {
api: '/runner/complaint-appeal',
columns,
rowKey: 'id',
accessName: 'runner.complaint_appeal',
formProps: {
grid: true,
colProps: { span: 12 },
rowProps: { gutter: [30, 0] },
layout: 'vertical',
},
modalProps: {
width: 800,
},
cardProps: {
variant: 'borderless',
},
pagination: {
size: 'small',
style: { marginBottom: 0 },
},
};
return (
<>
<div className="mb-5">
<Title level={3}>{t('runner.complaint_appeal.page.title')}</Title>
<Text type="secondary">{t('runner.complaint_appeal.page.description')}</Text>
</div>
<XinTable<IRunnerComplaintAppeal> {...tableProps} />
</>
);
};
export default Table;
+164
View File
@@ -0,0 +1,164 @@
import { Tag, Typography } from 'antd';
import React from 'react';
import XinTable from '@/components/XinTable';
import type { XinTableColumn, XinTableProps } from '@/components/XinTable/typings';
import type IRunnerComplaint from '@/domain/iRunnerComplaint';
import { useTranslation } from 'react-i18next';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
const { Title, Text } = Typography;
dayjs.extend(relativeTime);
const Table: React.FC = () => {
const { t } = useTranslation();
const columns: XinTableColumn<IRunnerComplaint>[] = [
{
title: t('runner.complaint.id'),
dataIndex: 'id',
hideInForm: true,
sorter: true,
align: 'center',
width: 80,
},
{
title: t('runner.complaint.complaint_no'),
dataIndex: 'complaint_no',
valueType: 'text',
align: 'center',
},
{
title: t('runner.complaint.user_id'),
dataIndex: 'user_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.complaint.worker_id'),
dataIndex: 'worker_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.complaint.order_id'),
dataIndex: 'order_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.complaint.type'),
dataIndex: 'type',
valueType: 'text',
align: 'center',
},
{
title: t('runner.complaint.content'),
dataIndex: 'content',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.complaint.images'),
dataIndex: 'images',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.complaint.status'),
dataIndex: 'status',
valueType: 'radioButton',
fieldProps: {
options: [
{ value: 0, label: t('runner.complaint.status.0') },
{ value: 1, label: t('runner.complaint.status.1') },
],
},
render: (value: number) => {
return value === 1
? <Tag color="success">{t('runner.complaint.status.1')}</Tag>
: <Tag color="warning">{t('runner.complaint.status.0')}</Tag>;
},
filters: [
{ text: t('runner.complaint.status.0'), value: 0 },
{ text: t('runner.complaint.status.1'), value: 1 },
],
align: 'center',
},
{
title: t('runner.complaint.result'),
dataIndex: 'result',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.complaint.result_remark'),
dataIndex: 'result_remark',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.complaint.handled_at'),
dataIndex: 'handled_at',
hideInForm: true,
hideInSearch: true,
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.complaint.created_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'created_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.complaint.updated_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'updated_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
];
const tableProps: XinTableProps<IRunnerComplaint> = {
api: '/runner/complaint',
columns,
rowKey: 'id',
accessName: 'runner.complaint',
formProps: {
grid: true,
colProps: { span: 12 },
rowProps: { gutter: [30, 0] },
layout: 'vertical',
},
modalProps: {
width: 800,
},
cardProps: {
variant: 'borderless',
},
pagination: {
size: 'small',
style: { marginBottom: 0 },
},
};
return (
<>
<div className="mb-5">
<Title level={3}>{t('runner.complaint.page.title')}</Title>
<Text type="secondary">{t('runner.complaint.page.description')}</Text>
</div>
<XinTable<IRunnerComplaint> {...tableProps} />
</>
);
};
export default Table;
+124
View File
@@ -0,0 +1,124 @@
import { Typography } from 'antd';
import React from 'react';
import XinTable from '@/components/XinTable';
import type { XinTableColumn, XinTableProps } from '@/components/XinTable/typings';
import type IRunnerCreditLog from '@/domain/iRunnerCreditLog';
import { useTranslation } from 'react-i18next';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
const { Title, Text } = Typography;
dayjs.extend(relativeTime);
const Table: React.FC = () => {
const { t } = useTranslation();
const columns: XinTableColumn<IRunnerCreditLog>[] = [
{
title: t('runner.credit_log.id'),
dataIndex: 'id',
hideInForm: true,
sorter: true,
align: 'center',
width: 80,
},
{
title: t('runner.credit_log.worker_id'),
dataIndex: 'worker_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.credit_log.score'),
dataIndex: 'score',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.credit_log.score_after'),
dataIndex: 'score_after',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.credit_log.type'),
dataIndex: 'type',
valueType: 'text',
align: 'center',
},
{
title: t('runner.credit_log.description'),
dataIndex: 'description',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.credit_log.related_type'),
dataIndex: 'related_type',
valueType: 'text',
align: 'center',
},
{
title: t('runner.credit_log.related_id'),
dataIndex: 'related_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.credit_log.created_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'created_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.credit_log.updated_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'updated_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
];
const tableProps: XinTableProps<IRunnerCreditLog> = {
api: '/runner/credit-log',
columns,
rowKey: 'id',
accessName: 'runner.credit_log',
addShow: false,
editShow: false,
formProps: {
grid: true,
colProps: { span: 12 },
rowProps: { gutter: [30, 0] },
layout: 'vertical',
},
modalProps: {
width: 800,
},
cardProps: {
variant: 'borderless',
},
pagination: {
size: 'small',
style: { marginBottom: 0 },
},
};
return (
<>
<div className="mb-5">
<Title level={3}>{t('runner.credit_log.page.title')}</Title>
<Text type="secondary">{t('runner.credit_log.page.description')}</Text>
</div>
<XinTable<IRunnerCreditLog> {...tableProps} />
</>
);
};
export default Table;
+159
View File
@@ -0,0 +1,159 @@
import { Tag, Typography } from 'antd';
import React from 'react';
import XinTable from '@/components/XinTable';
import type { XinTableColumn, XinTableProps } from '@/components/XinTable/typings';
import type IRunnerWorker from '@/domain/iRunnerWorker';
import { useTranslation } from 'react-i18next';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
const { Title, Text } = Typography;
dayjs.extend(relativeTime);
const Table: React.FC = () => {
const { t } = useTranslation();
const columns: XinTableColumn<IRunnerWorker>[] = [
{
title: t('runner.worker.id'),
dataIndex: 'id',
hideInForm: true,
sorter: true,
align: 'center',
width: 80,
},
{
title: t('runner.worker.user_id'),
dataIndex: 'user_id',
valueType: 'text',
align: 'center',
},
{
title: t('runner.worker.real_name'),
dataIndex: 'real_name',
valueType: 'text',
align: 'center',
},
{
title: t('runner.worker.mobile'),
dataIndex: 'mobile',
valueType: 'text',
align: 'center',
},
{
title: t('runner.worker.id_card'),
dataIndex: 'id_card',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.worker.total_income'),
dataIndex: 'total_income',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.worker.total_order'),
dataIndex: 'total_order',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.worker.cancel_order'),
dataIndex: 'cancel_order',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.worker.credit_score'),
dataIndex: 'credit_score',
valueType: 'text',
align: 'center',
hideInSearch: true,
},
{
title: t('runner.worker.verified_at'),
dataIndex: 'verified_at',
hideInForm: true,
hideInSearch: true,
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.worker.status'),
dataIndex: 'status',
valueType: 'radioButton',
fieldProps: {
options: [
{ value: 0, label: t('runner.worker.status.0') },
{ value: 1, label: t('runner.worker.status.1') },
],
},
render: (value: number) => {
return value === 1
? <Tag color="success">{t('runner.worker.status.1')}</Tag>
: <Tag color="error">{t('runner.worker.status.0')}</Tag>;
},
filters: [
{ text: t('runner.worker.status.0'), value: 0 },
{ text: t('runner.worker.status.1'), value: 1 },
],
align: 'center',
},
{
title: t('runner.worker.created_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'created_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
{
title: t('runner.worker.updated_at'),
hideInForm: true,
hideInSearch: true,
dataIndex: 'updated_at',
align: 'center',
render: (value: string) => (value ? dayjs(value).fromNow() : '-'),
},
];
const tableProps: XinTableProps<IRunnerWorker> = {
api: '/runner/worker',
columns,
rowKey: 'id',
accessName: 'runner.worker',
formProps: {
grid: true,
colProps: { span: 12 },
rowProps: { gutter: [30, 0] },
layout: 'vertical',
},
modalProps: {
width: 800,
},
cardProps: {
variant: 'borderless',
},
pagination: {
size: 'small',
style: { marginBottom: 0 },
},
};
return (
<>
<div className="mb-5">
<Title level={3}>{t('runner.worker.page.title')}</Title>
<Text type="secondary">{t('runner.worker.page.description')}</Text>
</div>
<XinTable<IRunnerWorker> {...tableProps} />
</>
);
};
export default Table;