色彩优化

This commit is contained in:
‘Liammcl’
2024-12-26 22:10:19 +08:00
parent 6a86447029
commit bde0a8fd65
9 changed files with 129 additions and 188 deletions

View File

@@ -83,7 +83,7 @@ const CustomerForm = () => {
};
return (
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-6">
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-2">
<Card
className="shadow-lg rounded-lg border-0"
title={

View File

@@ -629,7 +629,7 @@ const QuotationForm = () => {
};
return (
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-6">
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-2">
<Card
className="shadow-lg rounded-lg border-0"
title={

View File

@@ -12,7 +12,7 @@ import {
import {
ArrowLeftOutlined,
} from "@ant-design/icons";
import { useNavigate, useParams, useLocation } from "react-router-dom";
import { useNavigate, useParams,useSearchParams, useLocation } from "react-router-dom";
import { supabase } from "@/config/supabase";
import SectionList from '@/components/SectionList';
@@ -21,7 +21,9 @@ const { Title } = Typography;
const ServiceForm = () => {
const [form] = Form.useForm();
const navigate = useNavigate();
const { id } = useParams();
const { id} = useParams();
const [searchParams] = useSearchParams();
const isView = searchParams.get("isView") === "true";
const [loading, setLoading] = useState(false);
const location = useLocation();
const isEdit = location.search.includes("edit=true");
@@ -136,7 +138,7 @@ const ServiceForm = () => {
};
return (
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-6">
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-2">
<Card
className="shadow-lg rounded-lg border-0"
title={
@@ -160,13 +162,13 @@ const ServiceForm = () => {
>
返回
</Button>
<Button
{!isView&& <Button
type="primary"
onClick={() => form.submit()}
loading={loading}
>
保存
</Button>
</Button>}
</Space>
</div>
}
@@ -176,8 +178,9 @@ const ServiceForm = () => {
onFinish={onFinish}
onValuesChange={handleValuesChange}
layout="vertical"
variant="filled"
disabled={isView}
>
{/* 基本信息 */}
<Card
className="shadow-sm rounded-lg mb-6"
type="inner"
@@ -221,7 +224,6 @@ const ServiceForm = () => {
</div>
</Card>
{/* 服务明细 */}
<Card
className="shadow-sm rounded-lg"
type="inner"

View File

@@ -311,21 +311,21 @@ const ServicePage = () => {
</Paragraph>
),
},
{
title: "总金额",
dataIndex: ["attributes", "totalAmount"],
key: "totalAmount",
className: "min-w-[150px] text-right",
render: (amount) => (
<span style={{ color: "#f50", fontWeight: "bold" }}>
¥
{amount?.toLocaleString("zh-CN", {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
}) || "0.00"}
</span>
),
},
// {
// title: "总金额",
// dataIndex: ["attributes", "totalAmount"],
// key: "totalAmount",
// className: "min-w-[150px] text-right",
// render: (amount) => (
// <span style={{ color: "#f50", fontWeight: "bold" }}>
// ¥
// {amount?.toLocaleString("zh-CN", {
// minimumFractionDigits: 2,
// maximumFractionDigits: 2,
// }) || "0.00"}
// </span>
// ),
// },
{
title: "操作",
key: "action",

View File

@@ -83,7 +83,7 @@ const SupplierForm = () => {
};
return (
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-6">
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-2">
<Card
className="shadow-lg rounded-lg border-0"
title={