|
|
|
@ -129,7 +129,7 @@ Component({ |
|
|
|
wx.navigateTo({ url: '/pages/storage/order-list/index' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
fetchStatisticsInfo: function(vdate){ |
|
|
|
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 => { |
|
|
|
if(Number(result.data.priceOrderNum) > 0){ |
|
|
|
@ -178,8 +178,13 @@ Component({ |
|
|
|
} |
|
|
|
var vdateString = util.formatDate(new Date(vdate[0]), 'Y-M-D') + '至' + util.formatDate(new Date(vdate[1]), 'Y-M-D') |
|
|
|
this.setData({ tabList: this.data.tabList, tabList2: this.data.tabList2, totalInfo: result.data, vdate, vdateString }) |
|
|
|
if(loading){ |
|
|
|
wx.hideLoading() |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
if(loading){ |
|
|
|
wx.hideLoading() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
showSheet: function(){ |
|
|
|
@ -208,10 +213,12 @@ Component({ |
|
|
|
}, |
|
|
|
changeFactory: function(e){ |
|
|
|
var item = this.data.factoryList[e.currentTarget.dataset.index] |
|
|
|
wx.showLoading({ title: '正在切换', mask: true }) |
|
|
|
headerFactoryId(item.id) |
|
|
|
event.emit('EventMessage', { what: 999, desc: 'changeFactory' }) |
|
|
|
this.setData({ visible: false, factoryId: item.id }) |
|
|
|
this.trigEvent(9) |
|
|
|
this.fetchStatisticsInfo(this.data.vdate, true) |
|
|
|
}, |
|
|
|
trigEvent: function(zIndex){ |
|
|
|
setTimeout(() => { |
|
|
|
|