| | |
| | | */ |
| | | data: { |
| | | deadline: '', |
| | | leftday:0 , |
| | | |
| | | currentTab: 0, |
| | | tabList: [], |
| | |
| | | pageheight: '300px' |
| | | }, |
| | | |
| | | //每月台账提交期限日 |
| | | DEADLINEDAY: 10, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | this.getLedgerType() |
| | | |
| | | var deadline = moment().format(`MM-${this.DEADLINEDAY}`) |
| | | var leftday = this.DEADLINEDAY + 1 - moment().date() |
| | | this.setData({ |
| | | deadline: deadline, |
| | | leftday: leftday |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | getLedgerType () { |
| | | var that = this |
| | | ledgerservice.getLedgerType(app.globalData.userInfo.extension2, { |
| | | var time = moment().format('YYYY-MM-DD') |
| | | ledgerservice.getLedgerSummary(app.globalData.accessToken.userId, app.globalData.userInfo.extension2, time, { |
| | | success (res) { |
| | | // console.log(res); |
| | | let r = that.parseLedgerType(res) |
| | |
| | | subtypes.forEach(s => { |
| | | if (s.upLoad) { |
| | | s.tag = '/res/icons/round_check_fill.png' |
| | | s.color = '#4CAF50' |
| | | } else if (s.ledgerFinished) { |
| | | s.tag = '/res/icons/warning_yellow.png' |
| | | s.color = '#FFEB3B' |
| | | } else if (!s.needUpdate) { |
| | | s.tag = '/res/icons/round_check_fill.png' |
| | | s.color = '#4CAF50' |
| | | } else { |
| | | s.tag = '/res/icons/warning_red.png' |
| | | s.color = 'red' |
| | | } |
| | | if (!map.has(s.ledgerType)) { |
| | | map.set(s.ledgerType, []) |
| | |
| | | events: { |
| | | uploadOver: function (data) { |
| | | let i = data.indexGroup |
| | | let path = `pageList[${i[0]}][${i[1]}].upLoad` |
| | | let pageList = that.data.pageList |
| | | pageList[i[0]][i[1]].upLoad = true |
| | | pageList[i[0]][i[1]].tag = '/res/icons/round_check_fill.png' |
| | | that.setData({ |
| | | [path]: true |
| | | pageList |
| | | }) |
| | | } |
| | | }, |