diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index 16259c2..7c55328 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -256,11 +256,11 @@ function getFields(props) { style={{ width: '100%' }} labelInValue={false} options={[ - { value: '1', label: 'Top 1' }, - { value: '2', label: 'Top 2' }, - { value: '3', label: 'Top 3' }, - { value: '4', label: '4' }, - { value: '5', label: '5' }, + { value: 1, label: 'Top 1' }, + { value: 2, label: 'Top 2' }, + { value: 3, label: 'Top 3' }, + { value: 4, label: '4' }, + { value: 5, label: '5' }, ]} /> , @@ -376,7 +376,7 @@ const formValuesMapper = (values) => { ], 'dept': { key: 'dept_id', transform: (value) => (typeof value === 'string' ? value : value?.value || value?.key || '') }, 'open_weekdays': { key: 'open_weekdays', transform: (value) => (Array.isArray(value) ? value.join(',') : value) }, - 'recommends_rate': { key: 'recommends_rate', transform: (value) => (typeof value === 'string' ? value : value?.value || value?.key || '') }, + 'recommends_rate': { key: 'recommends_rate', transform: (value) => ((typeof value === 'string' || typeof value === 'number') ? value : value?.value || value?.key || '') }, // 'lgc_details': [ // { // key: 'lgc_details',