|
|
@ -1,6 +1,7 @@ |
|
|
// pages/index/index.js
|
|
|
// pages/index/index.js
|
|
|
import Dialog from '../../../components/dialog/dialog' |
|
|
import Dialog from '../../../components/dialog/dialog' |
|
|
import { getStatisticsInfo } from "../../../api/saas" |
|
|
import { getStatisticsInfo } from "../../../api/saas" |
|
|
|
|
|
import { headerFactoryId } from "../../../api/user" |
|
|
import util from '../../../utils/util' |
|
|
import util from '../../../utils/util' |
|
|
const event = require('../../../utils/event') |
|
|
const event = require('../../../utils/event') |
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
@ -14,6 +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), |
|
|
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' }, |
|
|
@ -34,7 +36,8 @@ Component({ |
|
|
usedCreditLine: 0 |
|
|
usedCreditLine: 0 |
|
|
}, |
|
|
}, |
|
|
vdate: [], |
|
|
vdate: [], |
|
|
vdateString: '' |
|
|
|
|
|
|
|
|
vdateString: '', |
|
|
|
|
|
visiable: false |
|
|
}, |
|
|
}, |
|
|
lifetimes: { |
|
|
lifetimes: { |
|
|
attached: function () { |
|
|
attached: function () { |
|
|
@ -84,6 +87,7 @@ Component({ |
|
|
wx.navigateTo({ url: '/pages/process/order-list/index' }) |
|
|
wx.navigateTo({ url: '/pages/process/order-list/index' }) |
|
|
}, |
|
|
}, |
|
|
agentList: function (e) { |
|
|
agentList: function (e) { |
|
|
|
|
|
// this.showFactoryList()
|
|
|
wx.navigateTo({ url: '/pages/process/agent-list/index' }) |
|
|
wx.navigateTo({ url: '/pages/process/agent-list/index' }) |
|
|
}, |
|
|
}, |
|
|
checkList: function (e) { |
|
|
checkList: function (e) { |
|
|
@ -114,7 +118,8 @@ Component({ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
fetchStatisticsInfo: function(vdate){ |
|
|
fetchStatisticsInfo: function(vdate){ |
|
|
getStatisticsInfo({startTime: util.formatTime(new Date(vdate[0]), 'Y-M-D'), endTime: util.formatTime(new Date(vdate[1]), 'Y-M-D')}).then(result => { |
|
|
|
|
|
|
|
|
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){ |
|
|
if(Number(result.data.priceOrderNum) > 0){ |
|
|
this.data.tabList[0].badge = Number(result.data.priceOrderNum) |
|
|
this.data.tabList[0].badge = Number(result.data.priceOrderNum) |
|
|
} else { |
|
|
} else { |
|
|
@ -166,14 +171,12 @@ Component({ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
showSheet: function(){ |
|
|
showSheet: function(){ |
|
|
// this.setData({ show: true })
|
|
|
|
|
|
// event.emit('TabMessage', { what: 99, visiable: false })
|
|
|
|
|
|
|
|
|
this.setData({ show: true }) |
|
|
|
|
|
this.triggerEvent("zIndex", -1) |
|
|
}, |
|
|
}, |
|
|
onClose: function() { |
|
|
onClose: function() { |
|
|
this.setData({ show: false }) |
|
|
this.setData({ show: false }) |
|
|
setTimeout(function(){ |
|
|
|
|
|
event.emit('TabMessage', { what: 99, visiable: true }) |
|
|
|
|
|
}, 100) |
|
|
|
|
|
|
|
|
this.triggerEvent("zIndex", 9) |
|
|
}, |
|
|
}, |
|
|
onSelect: function({detail}) { |
|
|
onSelect: function({detail}) { |
|
|
const [start, end] = detail |
|
|
const [start, end] = detail |
|
|
@ -182,6 +185,14 @@ Component({ |
|
|
}, |
|
|
}, |
|
|
toAuths: function(){ |
|
|
toAuths: function(){ |
|
|
wx.navigateTo({ url: '/pages/htmls/auths/index' }) |
|
|
wx.navigateTo({ url: '/pages/htmls/auths/index' }) |
|
|
|
|
|
}, |
|
|
|
|
|
showFactoryList: function(){ |
|
|
|
|
|
this.setData({ visiable: true }) |
|
|
|
|
|
// this.$emit("zIndex", -1)
|
|
|
|
|
|
}, |
|
|
|
|
|
onClickHide: function(){ |
|
|
|
|
|
this.setData({ visiable: false }) |
|
|
|
|
|
// this.$emit("zIndex", 9)
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |