@@ -422,7 +467,11 @@ const QuotationPage = () => {
{selectedTemplateId === template.id && (
@@ -440,4 +489,4 @@ const QuotationPage = () => {
);
};
-export default QuotationPage;
\ No newline at end of file
+export default QuotationPage;
diff --git a/src/pages/company/supplier/index.jsx b/src/pages/company/supplier/index.jsx
index 45c5faa..fd82331 100644
--- a/src/pages/company/supplier/index.jsx
+++ b/src/pages/company/supplier/index.jsx
@@ -1,21 +1,24 @@
-import React, { useEffect, useState } from 'react';
-import { Card, Table, Button, message, Popconfirm, Tag, Space } from 'antd';
-import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
-import { useResources } from '@/hooks/resource/useResource';
-import { useNavigate } from 'react-router-dom';
+import React, { useEffect, useState } from "react";
+import { Card, Table, Button, message, Popconfirm, Tag, Space } from "antd";
+import { PlusOutlined, EditOutlined, DeleteOutlined } from "@ant-design/icons";
+import { useResources } from "@/hooks/resource/useResource";
+import { useNavigate } from "react-router-dom";
const SupplierPage = () => {
const navigate = useNavigate();
const [pagination, setPagination] = useState({ current: 1, pageSize: 10 });
- const [sorter, setSorter] = useState({ field: 'created_at', order: 'descend' });
+ const [sorter, setSorter] = useState({
+ field: "created_at",
+ order: "descend",
+ });
const {
resources: suppliers,
loading,
total,
fetchResources: fetchSuppliers,
- deleteResource: deleteSupplier
- } = useResources(pagination, sorter, 'supplier');
+ deleteResource: deleteSupplier,
+ } = useResources(pagination, sorter, "supplier");
useEffect(() => {
fetchSuppliers();
@@ -35,66 +38,70 @@ const SupplierPage = () => {
const handleDelete = async (id) => {
try {
await deleteSupplier(id);
- message.success('删除成功');
+ message.success("删除成功");
fetchSuppliers();
} catch (error) {
- message.error('删除失败:' + error.message);
+ message.error("删除失败:" + error.message);
}
};
const columns = [
{
- title: '供应商名称',
- dataIndex: ['attributes', 'name'],
- key: 'name',
+ title: "供应商名称",
+ dataIndex: ["attributes", "name"],
+ key: "name",
ellipsis: true,
},
{
- title: '联系人',
- dataIndex: ['attributes', 'contact'],
- key: 'contact',
+ title: "联系人",
+ dataIndex: ["attributes", "contact"],
+ key: "contact",
},
{
- title: '电话',
- dataIndex: ['attributes', 'phone'],
- key: 'phone',
+ title: "电话",
+ dataIndex: ["attributes", "phone"],
+ key: "phone",
},
{
- title: '状态',
- dataIndex: ['attributes', 'status'],
- key: 'status',
+ title: "状态",
+ dataIndex: ["attributes", "status"],
+ key: "status",
render: (status) => (
-
- {status === 'active' ? '启用' : '禁用'}
+
+ {status === "active" ? "启用" : "禁用"}
),
},
{
- title: '创建日期',
- dataIndex: 'created_at',
- key: 'created_at',
+ title: "创建日期",
+ dataIndex: "created_at",
+ key: "created_at",
sorter: true,
render: (text) => (
- {new Date(text).toLocaleString('zh-CN', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit',
- hour: '2-digit',
- minute: '2-digit'
- })}
+
+ {new Date(text).toLocaleString("zh-CN", {
+ year: "numeric",
+ month: "2-digit",
+ day: "2-digit",
+ hour: "2-digit",
+ minute: "2-digit",
+ })}
+
),
},
{
- title: '操作',
- key: 'action',
- fixed: 'right',
+ title: "操作",
+ key: "action",
+ fixed: "right",
render: (_, record) => (
}
- onClick={() => navigate(`/company/supplierInfo/${record.id}?edit=true`)}
+ onClick={() =>
+ navigate(`/company/supplierInfo/${record.id}?edit=true`)
+ }
>
编辑
@@ -106,7 +113,7 @@ const SupplierPage = () => {
cancelText="取消"
okButtonProps={{ danger: true }}
>
- }>
+ }>
删除
@@ -123,15 +130,17 @@ const SupplierPage = () => {
{total} 个供应商
}
- className='h-full w-full overflow-auto'
+ className="h-full w-full overflow-auto"
extra={
- }
- onClick={() => navigate('/company/supplierInfo')}
- >
- 新增供应商
-
+
+ }
+ onClick={() => navigate("/company/supplierInfo")}
+ >
+ 新增供应商
+
+
}
>
{
);
};
-export default SupplierPage;
\ No newline at end of file
+export default SupplierPage;
diff --git a/src/pages/company/task/index.jsx b/src/pages/company/task/index.jsx
index 272aceb..2ea31ed 100644
--- a/src/pages/company/task/index.jsx
+++ b/src/pages/company/task/index.jsx
@@ -30,9 +30,11 @@ const TaskPage = () => {
}>
- 新增任务
-
+
+ }>
+ 新增任务
+
+
}
>
diff --git a/src/pages/marketing/communication/tasks/index.jsx b/src/pages/marketing/communication/tasks/index.jsx
index 56b1744..18bfb0d 100644
--- a/src/pages/marketing/communication/tasks/index.jsx
+++ b/src/pages/marketing/communication/tasks/index.jsx
@@ -35,9 +35,11 @@ const CommunicationTasks = () => {
}>
- 新增任务
-
+
+ }>
+ 新增任务
+
+
}
>
diff --git a/src/pages/resource/resourceTask/index.jsx b/src/pages/resource/resourceTask/index.jsx
index 86bd9ab..870fb98 100644
--- a/src/pages/resource/resourceTask/index.jsx
+++ b/src/pages/resource/resourceTask/index.jsx
@@ -86,7 +86,7 @@ const ResourceTask = () => {
},
{
title: "操作",
- fixed: 'right',
+ fixed: "right",
key: "action",
render: (_, record) => (
@@ -136,13 +136,15 @@ const ResourceTask = () => {
}
className="h-full w-full overflow-auto"
extra={
- }
- onClick={() => navigate("/resource/task/edit")}
- >
- 新增任务
-
+
+ }
+ onClick={() => navigate("/resource/task/edit")}
+ >
+ 新增任务
+
+
}
>