Commit 45e4d957 by zhangxw

bug修改

1 parent 6bf1e0b0
...@@ -200,8 +200,17 @@ Page({ ...@@ -200,8 +200,17 @@ Page({
}, },
// 设置目标日期 // 设置目标日期
setTargetDate() { setTargetDate() {
let { timeBean } = this.data let { timeBean, targetInfo } = this.data
let date = timeBean.weekDayList[timeBean.selectDay].date let date = timeBean.weekDayList[timeBean.selectDay].date
if (targetInfo?.reportDate) {
let index = timeBean?.weekDayList?.findIndex(val => val.date == targetInfo.reportDate)
if (index > -1) {
date = timeBean.weekDayList[index].date
this.setData({
['timeBean.selectDay']: index
})
}
}
this.setData({ this.setData({
['targetInfo.reportDate']: date, ['targetInfo.reportDate']: date,
isEditReport: false isEditReport: false
...@@ -348,7 +357,8 @@ Page({ ...@@ -348,7 +357,8 @@ Page({
// 初始化日期 // 初始化日期
if (options.hasOwnProperty('reportDate')) { if (options.hasOwnProperty('reportDate')) {
this.setData({ this.setData({
reportDate: options.reportDate reportDate: options.reportDate,
['targetInfo.reportDate']: options.reportDate
}) })
this.initData() this.initData()
} }
...@@ -377,7 +387,8 @@ Page({ ...@@ -377,7 +387,8 @@ Page({
// 初始化日期 // 初始化日期
if (options.hasOwnProperty('reportDate')) { if (options.hasOwnProperty('reportDate')) {
this.setData({ this.setData({
reportDate: options.reportDate reportDate: options.reportDate,
['targetInfo.reportDate']: options.reportDate
}) })
} }
this.initData() this.initData()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!