From be3aea599b677d76124d0c8c949d3446f1a3d0b3 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 29 Oct 2024 10:55:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=A5=E4=BB=B7=E4=BF=A1=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useProductsSets.js | 2 +- src/views/products/Detail/ProductInfoForm.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hooks/useProductsSets.js b/src/hooks/useProductsSets.js index 612d8d4..6a3d464 100644 --- a/src/hooks/useProductsSets.js +++ b/src/hooks/useProductsSets.js @@ -143,7 +143,7 @@ export const useNewProductRecord = () => { 'recommends_rate': 0, 'dept_id': 0, 'dept_name': '', - 'display_to_c': 0, + 'display_to_c': '0', 'km': 0, 'city_id': 0, 'city_name': '', diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index de2a718..413fa19 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -41,7 +41,7 @@ const InfoForm = ({ onSubmit, onReset, onValuesChange, editablePerm, infoEditabl const lgc_details_mapped = (editingProduct?.lgc_details || []).reduce((r, c) => ({ ...r, [c.lgc]: c }), {}); form.setFieldValue('lgc_details_mapped', lgc_details_mapped); form.setFieldValue('quotation', editingProduct?.quotation); - form.setFieldValue('display_to_c', editingProduct?.display_to_c || 0); + form.setFieldValue('display_to_c', editingProduct.info?.display_to_c || '0'); setPickEditedInfo({ ...pickEditedInfo, product_title: editingProduct?.info?.product_title }); setFormEditable(infoEditable || priceEditable); @@ -297,7 +297,7 @@ function getFields(props) { labelInValue={false} options={[ { value: '153001', label: '在计划显示,不在报价信显示' }, - { value: 0, label: '计划和报价信都要显示' }, + { value: '0', label: '计划和报价信都要显示' }, { value: '153001, 153002', label: '计划和报价信都不用显示' }, ]} {...styleProps}