diff --git a/pages/home/factory-list/index.js b/pages/home/factory-list/index.js index 3472450..1d08820 100644 --- a/pages/home/factory-list/index.js +++ b/pages/home/factory-list/index.js @@ -39,9 +39,9 @@ Scene({ */ onLoad: function (options) { if(options.type){ - this.setData({ height: app.globalData.fragmentHeight, type: Number(options.type )}) + this.setData({ userInfo: app.userInfo, height: app.globalData.fragmentHeight, type: Number(options.type )}) } else { - this.setData({ height: app.globalData.fragmentHeight }) + this.setData({ userInfo: app.userInfo, height: app.globalData.fragmentHeight }) } this.fetchList() // this.fetchFactoryList() diff --git a/pages/home/factory-list/index.wxml b/pages/home/factory-list/index.wxml index 5d2f19a..3e981d7 100644 --- a/pages/home/factory-list/index.wxml +++ b/pages/home/factory-list/index.wxml @@ -53,7 +53,7 @@ - + diff --git a/pages/home/user-info/index.wxml b/pages/home/user-info/index.wxml index 23c033b..2655592 100644 --- a/pages/home/user-info/index.wxml +++ b/pages/home/user-info/index.wxml @@ -20,7 +20,7 @@ - + 关注纸厂 diff --git a/pages/login/index.js b/pages/login/index.js index 2b43731..20985c8 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -123,6 +123,7 @@ Page({ this.setData({ loging: false, metaData: this.data.metaData }) } } else if(app.userInfo.factoryId){ + this.setData({ loging: false}) if(!result.data.isSaasPerssion){ Dialog.alert({ title: '温馨提示', message: '您的打包站还在授权中,请耐心等待,或者联系相关客服人员' }).then(() => { }) @@ -131,8 +132,10 @@ Page({ headerFactoryId(app.userInfo.factoryId) wx.redirectTo({ url: '/pages/index/index' }) } else { - Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站,请耐心等待,或者联系相关客服人员' }).then(() => { - }) + this.setData({ loging: false}) + // Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站,请耐心等待,或者联系相关客服人员' }).then(() => { + // }) + wx.redirectTo({ url: '/pages/index/index' }) } }).catch(err => { wx.hideLoading() diff --git a/pages/message/notification/index.js b/pages/message/notification/index.js index 1859f69..506e84f 100644 --- a/pages/message/notification/index.js +++ b/pages/message/notification/index.js @@ -26,7 +26,7 @@ Component({ }, methods: { notify: function(message){ - if(this.data.notice){ + if(!app.userInfo.factoryId || this.data.notice){ return } this.setData({ notice: true, message }) diff --git a/pages/process/index/index.js b/pages/process/index/index.js index 65b9c08..4635338 100644 --- a/pages/process/index/index.js +++ b/pages/process/index/index.js @@ -127,6 +127,7 @@ Component({ }, fetchStatisticsInfo: function(loading){ getStatisticsInfo(this.data.form).then(result => { + if(Number(result.data.priceOrderNum) > 0){ this.data.tabList[0].badge = Number(result.data.priceOrderNum) } else { @@ -163,15 +164,14 @@ Component({ } else { this.data.tabList1[3].badge = '' } - if(util.isEmpty(result.data.availableCreditLine)){ result.data.availableCreditLine = app.userInfo.availableCreditLine } if(util.isEmpty(result.data.usedCreditLine)){ result.data.usedCreditLine = app.userInfo.usedCreditLine } - 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, tabList1: this.data.tabList1, totalInfo: result.data, vdate, vdateString }) + var vdateString = this.data.form.startTime.substring(0, 10) + '至' + this.data.form.endTime.substring(0, 10) + this.setData({ tabList: this.data.tabList, tabList1: this.data.tabList1, totalInfo: result.data, vdateString }) if(loading){ wx.hideLoading() } diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml index 9fa8bf7..f38e28e 100644 --- a/pages/process/index/index.wxml +++ b/pages/process/index/index.wxml @@ -29,7 +29,7 @@ 收货重量 - {{formate.formateWeight(totalInfo.totalWeight)}}吨 + {{formate.formateWeight(totalInfo.totalWeight || 0)}}吨 查看收货详情