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