fix
This commit is contained in:
@@ -734,7 +734,7 @@ const QuotationForm = () => {
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="shadow-sm rounded-lg"
|
||||
className="shadow-sm rounded-lg mt-6"
|
||||
type="inner"
|
||||
title={
|
||||
<span className="flex items-center space-x-2 text-gray-700">
|
||||
@@ -750,6 +750,8 @@ const QuotationForm = () => {
|
||||
isView={isView}
|
||||
formValues={formValues}
|
||||
currentCurrency={currentCurrency}
|
||||
taxRate={taxRate}
|
||||
setTaxRate={setTaxRate}
|
||||
/>
|
||||
</Card>
|
||||
</Form>
|
||||
|
||||
@@ -4,11 +4,8 @@ import { PlusOutlined, EditOutlined, DeleteOutlined, EyeOutlined, CopyOutlined,
|
||||
import { useResources } from '@/hooks/resource/useResource';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { supabase } from '@/config/supabase'
|
||||
const CURRENCY_SYMBOLS = {
|
||||
CNY: "¥",
|
||||
TWD: "NT$",
|
||||
USD: "$",
|
||||
};
|
||||
import { formatExchangeRate,EXCHANGE_RATE,defaultSymbol } from '@/utils/exchange_rate';
|
||||
|
||||
const QuotationPage = () => {
|
||||
const navigate = useNavigate();
|
||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10 });
|
||||
@@ -150,19 +147,18 @@ const QuotationPage = () => {
|
||||
align: 'right',
|
||||
render: (attributes) => {
|
||||
// 获取货币符号
|
||||
const currencySymbol = CURRENCY_SYMBOLS[attributes.currency] || '¥';
|
||||
const currencySymbol = EXCHANGE_RATE[attributes?.currency]?.symbol || defaultSymbol;
|
||||
|
||||
return (
|
||||
<div className="space-y-1">
|
||||
<div className="flex justify-between items-center text-sm">
|
||||
<Typography.Text type="secondary" style={{ fontSize: '12px' }}>
|
||||
税前:{currencySymbol}{attributes.beforeTaxAmount?.toLocaleString()}
|
||||
税前:{formatExchangeRate(attributes?.currency, attributes.beforeTaxAmount)}
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="flex justify-between items-center">
|
||||
<Statistic
|
||||
value={attributes.afterTaxAmount}
|
||||
prefix={currencySymbol}
|
||||
value={formatExchangeRate(attributes?.currency, attributes.afterTaxAmount)}
|
||||
precision={2}
|
||||
valueStyle={{
|
||||
fontSize: '16px',
|
||||
|
||||
@@ -7,12 +7,7 @@ import html2canvas from 'html2canvas';
|
||||
import jsPDF from 'jspdf';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
|
||||
const CURRENCY_SYMBOLS = {
|
||||
CNY: "¥",
|
||||
TWD: "NT$",
|
||||
USD: "$",
|
||||
};
|
||||
import { EXCHANGE_RATE,defaultSymbol } from '@/utils/exchange_rate';
|
||||
|
||||
const QuotationPreview = () => {
|
||||
const { id } = useParams();
|
||||
@@ -132,7 +127,7 @@ const QuotationPreview = () => {
|
||||
if (!quotation) return null;
|
||||
|
||||
const { attributes } = quotation;
|
||||
const currencySymbol = CURRENCY_SYMBOLS[attributes.currency] || '¥';
|
||||
const currencySymbol = EXCHANGE_RATE[attributes.currency]?.symbol || defaultSymbol;
|
||||
|
||||
return (
|
||||
<div className="max-w-4xl mx-auto p-6">
|
||||
|
||||
Reference in New Issue
Block a user