diff --git a/pages/agent/index/index.js b/pages/agent/index/index.js
index c4a3506..2dedcb6 100644
--- a/pages/agent/index/index.js
+++ b/pages/agent/index/index.js
@@ -11,7 +11,6 @@ Component({
},
/** 页面的初始数据 */
data: {
- userInfo: app.userInfo,
firstShow: false,
height: app.globalData.safeFragmentHeight - 100,
tabList: [
@@ -33,7 +32,7 @@ Component({
methods: {
onRestart: function () {
if(!this.data.firstShow) {
- this.setData({userInfo: app.userInfo, height: app.globalData.safeFragmentHeight - 100 })
+ this.setData({ height: app.globalData.safeFragmentHeight - 100 })
}
this.fetchStatisticsInfo()
this.data.firstShow = true
diff --git a/pages/agent/index/index.wxml b/pages/agent/index/index.wxml
index 7cdf673..0d59afa 100644
--- a/pages/agent/index/index.wxml
+++ b/pages/agent/index/index.wxml
@@ -1,9 +1,5 @@
-
-
diff --git a/pages/home/index/index.wxml b/pages/home/index/index.wxml
index e64ebec..e5637d1 100644
--- a/pages/home/index/index.wxml
+++ b/pages/home/index/index.wxml
@@ -1,8 +1,4 @@
-
-
diff --git a/pages/index/index.js b/pages/index/index.js
index f2b5387..8aa398b 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -138,10 +138,10 @@ Scene({
return
}
this.setData({ visible: !this.data.visible, mActiveIndex: this.data.popIndex })
- if (this.data.tabIndex == 0) {
- var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value)
- pageView.onClose()
- }
+ // if (this.data.tabIndex == 0) {
+ // var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value)
+ // pageView.onClose()
+ // }
},
onHide: function(){
this.setData({ visible: false })
diff --git a/pages/index/index.json b/pages/index/index.json
index c202f81..9060de5 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -7,7 +7,6 @@
"process": "/pages/process/index/index",
"agent": "/pages/agent/index/index",
"home": "/pages/home/index/index",
- "van-dialog": "/components/dialog/index",
"van-popup": "/components/popup/index",
"van-cell": "/components/cell/index",
"van-tree-select": "/components/tree-select/index",
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index e0486a6..2f3a52e 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -38,5 +38,4 @@
-
\ No newline at end of file
diff --git a/pages/process/index/index.js b/pages/process/index/index.js
index c23dc2d..b249970 100644
--- a/pages/process/index/index.js
+++ b/pages/process/index/index.js
@@ -11,7 +11,6 @@ Component({
},
/** 页面的初始数据 */
data: {
- userInfo: null,
height: app.globalData.safeFragmentHeight,
tabList: [
{ status: 1, badge: '', name: '定价', icon: '/assets/image/icon_pricing.png' },
@@ -60,24 +59,11 @@ Component({
onRestart: function () {
if(!this.data.firstShow) {
var min = new Date()
- min.setFullYear(min.getFullYear() - 1, min.getMonth(), min.getDate())
- min.setHours(0, 0, 0)
- var minDate = min.getTime()
- var max = new Date(new Date().getTime() + 24 * 60 * 60 * 1000)
- max.setHours(0, 0, 0)
- var maxDate = max.getTime()
- var today = new Date()
- today.setHours(0, 0, 0)
- var vdate = [today.getTime(), maxDate]
- var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D')
- this.data.form.startTime = util.formatDate(today, 'Y-M-D') + ' 00:00:00'
+ var max = new Date(min.getTime() + 24 * 60 * 60 * 1000)
+ var vdateString = util.formatDate(min, 'Y-M-D')
+ this.data.form.startTime = util.formatDate(min, 'Y-M-D') + ' 00:00:00'
this.data.form.endTime = util.formatDate(max, 'Y-M-D') + ' 00:00:00'
- var height = app.globalData.safeFragmentHeight - 100
- if(app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0){
- this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString})
- } else {
- this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString })
- }
+ this.setData({ height: app.globalData.safeFragmentHeight - 100, vdateString })
// const worker = wx.createWorker('/workers/process.js')
// worker.postMessage({ x : 10, y : 2 })
// worker.onMessage(function(res){
@@ -159,8 +145,7 @@ Component({
if(util.isEmpty(result.data.usedCreditLine)){
result.data.usedCreditLine = app.userInfo.usedCreditLine
}
- 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 })
+ this.setData({ tabList: this.data.tabList, tabList1: this.data.tabList1, totalInfo: result.data })
if(loading){
wx.hideLoading()
}
@@ -170,40 +155,8 @@ Component({
}
})
},
- showCalendar: function(){
- this.setData({ show: true })
- this.triggerEvent("zIndex", -1)
- },
- onClose: function() {
- this.setData({ show: false, sheet: false })
- this.trigEvent(9)
- },
- onSelect: function({detail}) {
- var start = new Date(detail[0])
- var end = new Date(detail[1])
- var vdateString = util.formatDate(start, 'Y-M-D') + '至' + util.formatDate(end, 'Y-M-D')
- this.data.form.startTime = util.formatDate(start, 'Y-M-D') + ' 00:00:00'
- this.data.form.endTime = util.formatDate(end, 'Y-M-D') + ' 00:00:00'
- this.setData({ show: false, vdateString })
- this.trigEvent(9)
- this.fetchStatisticsInfo()
- },
- toAuths: function(){
- wx.navigateTo({ url: '/pages/htmls/auths/index' })
- },
- trigEvent: function(zIndex){
- setTimeout(() => {
- this.triggerEvent('zIndex', zIndex)
- }, 300);
- },
- showSheet: function(){
- this.setData({ sheet: true })
- this.triggerEvent("zIndex", -1)
- },
- onAction: function({detail}){
- this.setData({ sheetStr: detail.name })
- this.data.form.type = detail.id
- this.fetchStatisticsInfo()
+ report: function(){
+ wx.navigateTo({ url: `/xtends/statics/index/index` })
}
}
})
\ No newline at end of file
diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml
index 617c857..a00e613 100644
--- a/pages/process/index/index.wxml
+++ b/pages/process/index/index.wxml
@@ -2,24 +2,28 @@
-
+
-
+
- 收货统计
-
+
+ 收货统计
+ ({{vdateString}})
+
+
+ 查看智能报表
+
+
-
+
@@ -85,7 +89,7 @@
-
+
@@ -107,7 +111,7 @@
-
+
\ No newline at end of file
diff --git a/pages/storage/index/index.js b/pages/storage/index/index.js
index 6eed6a1..ef5e6ca 100644
--- a/pages/storage/index/index.js
+++ b/pages/storage/index/index.js
@@ -1,6 +1,5 @@
// pages/index/index.js
import { getStatisticsInfo } from "../../../api/saas"
-import util from '../../../utils/util'
const event = require('../../../utils/event')
const app = getApp()
@@ -11,7 +10,6 @@ Component({
},
/** 页面的初始数据 */
data: {
- userInfo: app.userInfo,
height: app.globalData.safeFragmentHeight,
tabList2: [
{ status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' },
@@ -19,13 +17,7 @@ Component({
{ status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' },
{ status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.png' }
],
- form: {
- startTime: '',
- endTime: '',
- },
- show: false,
- vdate: [],
- vdateString: ''
+ form: { startTime: '', endTime: ''}
},
lifetimes: {
attached: function () {
@@ -38,17 +30,6 @@ Component({
methods: {
onRestart: function () {
if(!this.data.firstShow) {
- var min = new Date()
- min.setFullYear(min.getFullYear() - 1, min.getMonth(), min.getDate())
- min.setHours(0, 0, 0)
- var minDate = min.getTime()
- var max = new Date(new Date().getTime() + 24 * 60 * 60 * 1000)
- max.setHours(0, 0, 0)
- var maxDate = max.getTime()
- var today = new Date()
- today.setHours(0, 0, 0)
- 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
if(app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0){
var tabList2 = [
@@ -57,14 +38,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({height, tabList2})
} 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({height, tabList2 })
}
}
this.fetchStatisticsInfo()
@@ -122,27 +103,6 @@ Component({
wx.hideLoading()
}
})
- },
- showCalendar: function(){
- this.setData({ show: true })
- this.triggerEvent("zIndex", -1)
- },
- onClose: function() {
- this.setData({ show: false })
- this.trigEvent(9)
- },
- onSelect: function({detail}) {
- const [start, end] = detail
- this.onClose()
- this.fetchStatisticsInfo([start.getTime(), end.getTime()])
- },
- toAuths: function(){
- wx.navigateTo({ url: '/pages/htmls/auths/index' })
- },
- trigEvent: function(zIndex){
- setTimeout(() => {
- this.triggerEvent('zIndex', zIndex)
- }, 100);
}
}
})
\ No newline at end of file
diff --git a/pages/storage/index/index.json b/pages/storage/index/index.json
index 4b2d7ba..2b6546f 100644
--- a/pages/storage/index/index.json
+++ b/pages/storage/index/index.json
@@ -5,8 +5,6 @@
"van-grid-item": "/components/grid-item/index",
"van-cell": "/components/cell/index",
"van-cell-group": "/components/cell-group/index",
- "van-icon": "/components/icon/index",
- "van-popup": "/components/popup/index",
- "van-calendar": "/components/calendar/index"
+ "van-icon": "/components/icon/index"
}
}
\ No newline at end of file
diff --git a/pages/storage/index/index.wxml b/pages/storage/index/index.wxml
index 7417461..ee09518 100644
--- a/pages/storage/index/index.wxml
+++ b/pages/storage/index/index.wxml
@@ -61,7 +61,5 @@
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file