Commit 45e4d957 by zhangxw

bug修改

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