|
|
|
@ -620,15 +620,30 @@ const handleJumpDetail = (row, column) => {
|
|
|
|
|
|
|
|
|
|
// 年 |
|
|
|
|
console.log('details.query.year :>> ', details.query.year); |
|
|
|
|
if (getObjType(details.query.year) === 'array' && details.query.year.length > 0) { |
|
|
|
|
// query.startTimeStr = |
|
|
|
|
if (details.query.year) { |
|
|
|
|
query.startTimeStr = details.query.year + '-01-01'; |
|
|
|
|
query.endTimeStr = details.query.year + '-12-31'; |
|
|
|
|
} else if (details.query.month) { |
|
|
|
|
const formatDate = date => { |
|
|
|
|
console.log('date :>> ', date); |
|
|
|
|
const y = date.getFullYear(); |
|
|
|
|
const m = String(date.getMonth() + 1).padStart(2, '0'); // 月份补零 |
|
|
|
|
const d = String(date.getDate()).padStart(2, '0'); // 日期补零 |
|
|
|
|
return `${y}-${m}-${d}`; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const month = details.query.month.split('-'); |
|
|
|
|
console.log('month :>> ', month); |
|
|
|
|
query.startTimeStr = details.query.month + '-01'; |
|
|
|
|
query.endTimeStr = formatDate(new Date(month[0], Number(month[1]), 0)); |
|
|
|
|
console.log('query.endTimeStr :>> ', query.endTimeStr); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// $store.commit('DEL_ONCE_TAG', '/reportforms/SalesDepartmentIncomeReportDetails'); |
|
|
|
|
// $router.push({ |
|
|
|
|
// path: '/reportforms/SalesDepartmentIncomeReportDetails', |
|
|
|
|
// query, |
|
|
|
|
// }); |
|
|
|
|
$store.commit('DEL_ONCE_TAG', '/reportforms/SalesDepartmentIncomeReportDetails'); |
|
|
|
|
$router.push({ |
|
|
|
|
path: '/reportforms/SalesDepartmentIncomeReportDetails', |
|
|
|
|
query, |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|