|
|
@ -15,7 +15,7 @@ Component({ |
|
|
data: { |
|
|
data: { |
|
|
userInfo: app.userInfo, |
|
|
userInfo: app.userInfo, |
|
|
height: app.globalData.safeFragmentHeight, |
|
|
height: app.globalData.safeFragmentHeight, |
|
|
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), |
|
|
|
|
|
|
|
|
customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), |
|
|
tabList: [ |
|
|
tabList: [ |
|
|
{ status: 1, badge: '', name: '定价', icon: '/assets/image/icon_pricing.png' }, |
|
|
{ status: 1, badge: '', name: '定价', icon: '/assets/image/icon_pricing.png' }, |
|
|
{ status: 2, badge: '', name: '过磅审核', icon: '/assets/image/icon_checking.png' }, |
|
|
{ status: 2, badge: '', name: '过磅审核', icon: '/assets/image/icon_checking.png' }, |
|
|
@ -37,7 +37,18 @@ Component({ |
|
|
}, |
|
|
}, |
|
|
vdate: [], |
|
|
vdate: [], |
|
|
vdateString: '', |
|
|
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: { |
|
|
lifetimes: { |
|
|
attached: function () { |
|
|
attached: function () { |
|
|
@ -53,6 +64,7 @@ Component({ |
|
|
var vdate = [today.getTime(), maxDate] |
|
|
var vdate = [today.getTime(), maxDate] |
|
|
var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D') |
|
|
var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D') |
|
|
var height = app.globalData.safeFragmentHeight - 100 |
|
|
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){ |
|
|
if(app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0){ |
|
|
var tabList2 = [ |
|
|
var tabList2 = [ |
|
|
{ status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, |
|
|
{ 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: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, |
|
|
{ status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.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 { |
|
|
} else { |
|
|
var tabList2 = [ |
|
|
var tabList2 = [ |
|
|
{ status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, |
|
|
{ status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, |
|
|
{ status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, |
|
|
{ status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, |
|
|
{ status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.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) |
|
|
event.on('EventMessage', this, this.onEvent) |
|
|
}, |
|
|
}, |
|
|
@ -176,7 +188,7 @@ Component({ |
|
|
}, |
|
|
}, |
|
|
onClose: function() { |
|
|
onClose: function() { |
|
|
this.setData({ show: false }) |
|
|
this.setData({ show: false }) |
|
|
this.triggerEvent("zIndex", 9) |
|
|
|
|
|
|
|
|
this.trigEvent(9) |
|
|
}, |
|
|
}, |
|
|
onSelect: function({detail}) { |
|
|
onSelect: function({detail}) { |
|
|
const [start, end] = detail |
|
|
const [start, end] = detail |
|
|
@ -187,12 +199,24 @@ Component({ |
|
|
wx.navigateTo({ url: '/pages/htmls/auths/index' }) |
|
|
wx.navigateTo({ url: '/pages/htmls/auths/index' }) |
|
|
}, |
|
|
}, |
|
|
showFactoryList: function(){ |
|
|
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); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |