diff --git a/pages/home/user-info/index.js b/pages/home/user-info/index.js index 3671949..1604fa8 100644 --- a/pages/home/user-info/index.js +++ b/pages/home/user-info/index.js @@ -22,7 +22,7 @@ Scene({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - var agenting = storage.get('saas-agenting') + var agenting = storage.get('saas-agenting' + app.userInfo.userId) if(!util.isEmpty(agenting)){ app.globalData.agenting = agenting } @@ -56,7 +56,7 @@ Scene({ settingAgent: function(){ var agenting = this.data.agenting ? 0 : 1 app.globalData.agenting = agenting - storage.put('saas-agenting', agenting) + storage.put('saas-agenting' + app.userInfo.userId, agenting) this.setData({ agenting: agenting ? true : false }) }, makeCall: function() { diff --git a/pages/login/index.js b/pages/login/index.js index 2c99018..e91efb5 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -129,7 +129,6 @@ Page({ return } headerFactoryId(app.userInfo.factoryId) - // wx.redirectTo({ url: '/pages/agent/select-list/index' }) wx.redirectTo({ url: '/pages/index/index' }) } else { wx.redirectTo({ url: '/pages/client/index/index' }) diff --git a/pages/process/index/index.js b/pages/process/index/index.js index b41bcd8..4dd6447 100644 --- a/pages/process/index/index.js +++ b/pages/process/index/index.js @@ -15,7 +15,7 @@ Component({ data: { userInfo: app.userInfo, height: app.globalData.safeFragmentHeight, - CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), + customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), tabList: [ { status: 1, badge: '', name: '定价', icon: '/assets/image/icon_pricing.png' }, { status: 2, badge: '', name: '过磅审核', icon: '/assets/image/icon_checking.png' }, @@ -37,7 +37,18 @@ Component({ }, vdate: [], vdateString: '', - visiable: false + factoryId: '12313K78978KK', + factoryList: [ + {id: '12313000KK12K', name: '济州岛打包站'}, + {id: '12313K78978KK', name: '福州道打包站'}, + {id: '1231345500KKK', name: '钟落潭打包站'}, + {id: '12345678978KK', name: '鹤山常服打包站'}, + {id: '123sdfsdf00KKK', name: '合剂打包站'}, + {id: '1231332K78978K', name: '永宁街打包站'}, + {id: '123242K78978KK', name: '河西路打包站'}, + {id: '12313378978KK5', name: '成林道打包站'} + ], + visible: false }, lifetimes: { attached: function () { @@ -53,6 +64,7 @@ Component({ var vdate = [today.getTime(), maxDate] var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D') 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){ var tabList2 = [ { status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, @@ -60,14 +72,14 @@ Component({ { status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.png' } ] - this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2 }) + this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2, customBar}) } else { var tabList2 = [ { status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, { status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.png' } ] - this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2 }) + this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2, customBar }) } event.on('EventMessage', this, this.onEvent) }, @@ -176,7 +188,7 @@ Component({ }, onClose: function() { this.setData({ show: false }) - this.triggerEvent("zIndex", 9) + this.trigEvent(9) }, onSelect: function({detail}) { const [start, end] = detail @@ -187,12 +199,24 @@ Component({ wx.navigateTo({ url: '/pages/htmls/auths/index' }) }, showFactoryList: function(){ - this.setData({ visiable: true }) - // this.$emit("zIndex", -1) + this.setData({ visible: true }) + this.triggerEvent("zIndex", -1) + }, + onHide: function(){ + this.setData({ visible: false }) + this.trigEvent(9) + }, + changeFactory: function(e){ + var item = this.data.factoryList[e.currentTarget.dataset.index] + headerFactoryId(item.id) + event.emit('EventMessage', { what: 999, desc: 'changeFactory' }) + this.setData({ visible: false, factoryId: item.id }) + this.trigEvent(9) }, - onClickHide: function(){ - this.setData({ visiable: false }) - // this.$emit("zIndex", 9) + trigEvent: function(zIndex){ + setTimeout(() => { + this.triggerEvent('zIndex', zIndex) + }, 100); } } }) \ No newline at end of file diff --git a/pages/process/index/index.json b/pages/process/index/index.json index eb60529..3329f39 100644 --- a/pages/process/index/index.json +++ b/pages/process/index/index.json @@ -7,6 +7,7 @@ "van-cell-group": "/components/cell-group/index", "van-info": "/components/info/index", "van-icon": "/components/icon/index", + "van-popup": "/components/popup/index", "van-calendar": "/components/calendar/index" } } \ No newline at end of file diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml index acab410..dd6bea5 100644 --- a/pages/process/index/index.wxml +++ b/pages/process/index/index.wxml @@ -138,9 +138,15 @@ - - - - \ No newline at end of file + + + + + {{item.name}} + + + + + \ No newline at end of file diff --git a/pages/process/index/index.wxss b/pages/process/index/index.wxss index 0e998ca..3256bde 100644 --- a/pages/process/index/index.wxss +++ b/pages/process/index/index.wxss @@ -9,4 +9,8 @@ white-space: nowrap; color:white; margin-left:32rpx; +} + +.fcell{ + height: 96rpx; } \ No newline at end of file diff --git a/pages/setting/index/index.js b/pages/setting/index/index.js index 639dce5..aad1c7d 100644 --- a/pages/setting/index/index.js +++ b/pages/setting/index/index.js @@ -18,7 +18,7 @@ Scene({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - var agenting = storage.get('saas-agenting') + var agenting = storage.get('saas-agenting' + app.userInfo.userId) if(!util.isEmpty(agenting)){ app.globalData.agenting = agenting } @@ -27,7 +27,7 @@ Scene({ settingAgent: function(){ var agenting = this.data.agenting ? 0 : 1 app.globalData.agenting = agenting - storage.put('saas-agenting', agenting) + storage.put('saas-agenting' + app.userInfo.userId, agenting) this.setData({ agenting: agenting ? true : false }) }, loginOut: function () {