Merge remote-tracking branch 'origin/main'

perf/export-docx
Lei OT 11 months ago
commit 605eae0db5

@ -186,10 +186,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})`)

Loading…
Cancel
Save