From 9e09a5a1f6cfa8e25fa72ed4cbc5a5becc962ca8 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Thu, 24 Jul 2025 09:55:23 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BB=B7=E6=A0=BC=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E8=BF=94=E5=9B=9E{}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Products/Index.js | 4 ++-- src/views/products/Detail/ProductInfoForm.jsx | 8 ++++++++ src/views/products/Detail/ProductInfoQuotation.jsx | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/stores/Products/Index.js b/src/stores/Products/Index.js index 7da1344..64ef53c 100644 --- a/src/stores/Products/Index.js +++ b/src/stores/Products/Index.js @@ -360,7 +360,7 @@ export const useProductsStore = create( if (formValues.fresh) { formValues.key = generateId() - formValues.lastedit_changed = '' + formValues.lastedit_changed = {} formValues.audit_state_id = -1 // 新增, formValues.fresh = false // 添加到列表后就不是新纪录,保存要修改原来记录 mergedList = [...quotationList,...[formValues]] @@ -369,7 +369,7 @@ export const useProductsStore = create( if (prevQuotation.key === formValues.key) { const changedObject = {} for (const [key, value] of Object.entries(formValues)) { - if (key === 'use_dates' || key === 'id' || key === 'key') continue + if (key === 'use_dates' || key === 'id' || key === 'key' || key === 'weekdayList') continue const preValue = prevQuotation[key] const hasChanged = preValue !== value diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index a6daa43..1df2fd8 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -223,6 +223,14 @@ function getFields(props) { , fieldProps?.city?.col || midCol ), + item( + 'city_list', + 99, + + + , + fieldProps?.city_list?.col || midCol + ), item( 'dept', 99, diff --git a/src/views/products/Detail/ProductInfoQuotation.jsx b/src/views/products/Detail/ProductInfoQuotation.jsx index db79f31..c016fd8 100644 --- a/src/views/products/Detail/ProductInfoQuotation.jsx +++ b/src/views/products/Detail/ProductInfoQuotation.jsx @@ -173,6 +173,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => { const onQuotationFinish = (values) => { const newList = saveOrUpdateQuotation(values) + console.info('newList', newList) triggerChange(newList) setQuotationModalOpen(false) }