🐛 fix: fix web price accuracy

This commit is contained in:
MartialBE 2024-05-15 04:19:01 +08:00
parent f7cdde4b50
commit 8a34f76851
No known key found for this signature in database
GPG Key ID: 27C0267EC84B0A5C
2 changed files with 8 additions and 5 deletions

View File

@ -7,5 +7,8 @@ export function ValueFormatter(value) {
if (value == null) {
return '';
}
return `$${parseFloat(value * 0.002).toFixed(4)} / ¥${parseFloat(value * 0.014).toFixed(4)}`;
if (value === 0) {
return '免费';
}
return `$${parseFloat(value * 0.002).toFixed(6)} / ¥${parseFloat(value * 0.014).toFixed(6)}`;
}

View File

@ -192,8 +192,8 @@ const Single = ({ ownedby, prices, reloadData }) => {
field: 'type',
sortable: true,
headerName: '类型',
flex: 1,
minWidth: 220,
flex: 0.5,
minWidth: 100,
type: 'singleSelect',
valueOptions: priceType,
editable: true,
@ -203,8 +203,8 @@ const Single = ({ ownedby, prices, reloadData }) => {
field: 'channel_type',
sortable: true,
headerName: '供应商',
flex: 1,
minWidth: 220,
flex: 0.5,
minWidth: 100,
type: 'singleSelect',
valueOptions: ownedby,
editable: true,