From e6af8c1e1e2716aeba978eb35cfdb2d956053847 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Mon, 5 Aug 2024 11:47:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=B9=E6=AF=94=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Products/Index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stores/Products/Index.js b/src/stores/Products/Index.js index ed31239..9b6f029 100644 --- a/src/stores/Products/Index.js +++ b/src/stores/Products/Index.js @@ -184,10 +184,16 @@ export const useProductsStore = create( const prevList = quotationList.filter(q => q.id === formValues.id) console.info(prevList) if (prevList.length > 0) { + + formValues.use_dates_start = formValues.use_dates[0].format('YYYY-MM-DD') + formValues.use_dates_end = formValues.use_dates[1].format('YYYY-MM-DD') const prevQuotation = prevList[0] console.info('formValues: ', formValues) console.info('prevQuotation: ', prevQuotation) + // 对比报价前后是否有改动 for (const [key, value] of Object.entries(formValues)) { + if (key === 'use_dates') continue + const prevValue = prevQuotation[key] const hasChanged = prevValue === value console.log(`${key}: ${prevValue} - ${value} (${hasChanged})`)