Browse Source

no message

feature/v1.5
xpz2018 4 years ago
parent
commit
a28a8c233b
1 changed files with 17 additions and 5 deletions
  1. 22
      pages/process/index/index.js

22
pages/process/index/index.js

@ -35,6 +35,11 @@ Component({
availableCreditLine: 0,
usedCreditLine: 0
},
form: {
type: 3,
startTime: '',
endTime: '',
},
vdate: [],
vdateString: '',
factoryId: '12313K78978KK',
@ -70,6 +75,8 @@ Component({
today.setHours(0, 0, 0)
var vdate = [today.getTime(), maxDate]
var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D')
this.data.form.startTime = util.formatDate(today, 'Y-M-D') + ' 00:00:00'
this.data.form.endTime = util.formatDate(max, 'Y-M-D') + ' 00:00:00'
var height = app.globalData.safeFragmentHeight - 100
var customBar = app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60)
if(app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0){
@ -119,8 +126,7 @@ Component({
}
},
fetchStatisticsInfo: function(vdate, loading){
var param = {startTime: util.formatTime(new Date(vdate[0]), 'Y-M-D'), endTime: util.formatTime(new Date(vdate[1]), 'Y-M-D')}
getStatisticsInfo(param).then(result => {
getStatisticsInfo(this.data.form).then(result => {
if(Number(result.data.priceOrderNum) > 0){
this.data.tabList[0].badge = Number(result.data.priceOrderNum)
} else {
@ -184,8 +190,13 @@ Component({
this.trigEvent(9)
},
onSelect: function({detail}) {
const [start, end] = detail
this.onClose()
var start = new Date(detail[0])
var end = new Date(detail[1])
var vdateString = util.formatDate(start, 'Y-M-D') + '至' + util.formatDate(end, 'Y-M-D')
this.data.form.startTime = util.formatDate(start, 'Y-M-D') + ' 00:00:00'
this.data.form.endTime = util.formatDate(end, 'Y-M-D') + ' 00:00:00'
this.setData({ show: false, vdateString })
this.trigEvent(9)
this.fetchStatisticsInfo([start.getTime(), end.getTime()])
},
toAuths: function(){
@ -223,7 +234,8 @@ Component({
},
onAction: function({detail}){
this.setData({ sheetStr: detail.name })
this.data.form.type = detail.id
this.fetchStatisticsInfo()
}
}
})
Loading…
Cancel
Save