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})`)