diff --git a/app.js b/app.js
index 68d51be..76ed0a8 100644
--- a/app.js
+++ b/app.js
@@ -2,7 +2,7 @@
App({
evn: 0, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: ['AFoM5TOfsgERsfcetNSB0UlmEixnLF1ySXr54Bqno2M', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
- version: '2.0.0',
+ version: '2.1.0',
xAppId: '503258978847953926',
userInfo: null,
//----------------------------------------------globalData--------------------------------------
diff --git a/xtends/statics/agent-report/index.js b/xtends/statics/agent-report/index.js
index 23c16aa..5c68e07 100644
--- a/xtends/statics/agent-report/index.js
+++ b/xtends/statics/agent-report/index.js
@@ -1,15 +1,105 @@
import Scene from '../../../pages/index/scene'
+import { getStatisticsInfo } from "../../../api/saas"
+import util from '../../../utils/util'
+
+const app = getApp()
Scene({
/**
* 页面的初始数据
*/
data: {
+ height: app.globalData.fragmentHeight,
+ form: {},
+ columns: [
+ { key: 'catname', title: '品类', width: 100, fixed: 'left', align: 'center' },
+ { key: 'product_title', width: 100, fixed: 'left', title: '结算重量(吨)' },
+ { key: 'product_bar_code', title: '实收金额(元)', width: 100, },
+ { key: 'quantity', width: 100, title: '代卖费(元)' }
+ ],
+ data: [
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '187500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '187500.00', quantity: '2.500'},
+ ],
+ show: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ wx.showLoading({ title: '加载中', mask: true })
+ 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'
+ this.data.form.endTime = util.formatDate(max, 'Y-M-D') + ' 00:00:00'
+ this.setData({ height: app.globalData.fragmentHeight - 80, minDate, maxDate, vdate, vdateString })
+ this.fetchStatisticsInfo()
+ },
+ showCalendar: function(){
+ this.setData({ show: true })
+ },
+ onClose: function() {
+ this.setData({ show: false })
+ },
+ 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 })
+ wx.showLoading({ title: '加载中', mask: true })
+ this.fetchStatisticsInfo()
+ },
+ fetchStatisticsInfo: function(){
+ getStatisticsInfo(this.data.form).then(result => {
+ // this.setData({ })
+ wx.hideLoading()
+ }).catch(err => {
+ wx.hideLoading()
+ })
}
})
\ No newline at end of file
diff --git a/xtends/statics/agent-report/index.json b/xtends/statics/agent-report/index.json
index 19bbcd2..4209c60 100644
--- a/xtends/statics/agent-report/index.json
+++ b/xtends/statics/agent-report/index.json
@@ -1,5 +1,8 @@
{
"usingComponents": {
+ "van-icon": "/components/icon/index",
+ "van-table": "/components/table/index",
+ "van-calendar": "/components/calendar/index",
"notification": "/pages/message/notification/index"
}
}
\ No newline at end of file
diff --git a/xtends/statics/agent-report/index.wxml b/xtends/statics/agent-report/index.wxml
index 2ef6d81..b3e754c 100644
--- a/xtends/statics/agent-report/index.wxml
+++ b/xtends/statics/agent-report/index.wxml
@@ -3,6 +3,18 @@
代卖报表
+
+
+
+ 出货信息
+
+
+ {{vdateString}}
+
+
+
+
+
diff --git a/xtends/statics/gross-report/index.js b/xtends/statics/gross-report/index.js
index 23c16aa..c8519a9 100644
--- a/xtends/statics/gross-report/index.js
+++ b/xtends/statics/gross-report/index.js
@@ -1,15 +1,105 @@
import Scene from '../../../pages/index/scene'
+import { getStatisticsInfo } from "../../../api/saas"
+import util from '../../../utils/util'
+
+const app = getApp()
Scene({
/**
* 页面的初始数据
*/
data: {
+ height: app.globalData.fragmentHeight,
+ form: {},
+ columns: [
+ { key: 'catname', title: '品类', width: 100, fixed: 'left', align: 'center' },
+ { key: 'product_title', width: 100, fixed: 'left', title: '采购金额(元)' },
+ { key: 'product_bar_code', title: '销售金额(元)', width: 100, },
+ { key: 'quantity', width: 80, title: '毛利(元)' }
+ ],
+ data: [
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '187500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '87500.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '35000.00', product_title: '187500.00', quantity: '2.500'},
+ ],
+ show: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ wx.showLoading({ title: '加载中', mask: true })
+ 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'
+ this.data.form.endTime = util.formatDate(max, 'Y-M-D') + ' 00:00:00'
+ this.setData({ height: app.globalData.fragmentHeight - 80, minDate, maxDate, vdate, vdateString })
+ this.fetchStatisticsInfo()
+ },
+ showCalendar: function(){
+ this.setData({ show: true })
+ },
+ onClose: function() {
+ this.setData({ show: false })
+ },
+ 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 })
+ wx.showLoading({ title: '加载中', mask: true })
+ this.fetchStatisticsInfo()
+ },
+ fetchStatisticsInfo: function(){
+ getStatisticsInfo(this.data.form).then(result => {
+ // this.setData({ })
+ wx.hideLoading()
+ }).catch(err => {
+ wx.hideLoading()
+ })
}
})
\ No newline at end of file
diff --git a/xtends/statics/gross-report/index.json b/xtends/statics/gross-report/index.json
index 19bbcd2..4209c60 100644
--- a/xtends/statics/gross-report/index.json
+++ b/xtends/statics/gross-report/index.json
@@ -1,5 +1,8 @@
{
"usingComponents": {
+ "van-icon": "/components/icon/index",
+ "van-table": "/components/table/index",
+ "van-calendar": "/components/calendar/index",
"notification": "/pages/message/notification/index"
}
}
\ No newline at end of file
diff --git a/xtends/statics/gross-report/index.wxml b/xtends/statics/gross-report/index.wxml
index bdae9d0..26b1053 100644
--- a/xtends/statics/gross-report/index.wxml
+++ b/xtends/statics/gross-report/index.wxml
@@ -3,6 +3,18 @@
毛利报表
+
+
+
+ 出货信息
+
+
+ {{vdateString}}
+
+
+
+
+
diff --git a/xtends/statics/purchase-report/index.js b/xtends/statics/purchase-report/index.js
index 507e2ea..1572d2f 100644
--- a/xtends/statics/purchase-report/index.js
+++ b/xtends/statics/purchase-report/index.js
@@ -1,5 +1,7 @@
import Scene from '../../../pages/index/scene'
+import { getStatisticsInfo } from "../../../api/saas"
import util from '../../../utils/util'
+
const app = getApp()
Scene({
@@ -59,6 +61,7 @@ Scene({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ wx.showLoading({ title: '加载中', mask: true })
var min = new Date()
min.setFullYear(min.getFullYear() - 1, min.getMonth(), min.getDate())
min.setHours(0, 0, 0)
@@ -73,6 +76,7 @@ Scene({
this.data.form.startTime = util.formatDate(today, 'Y-M-D') + ' 00:00:00'
this.data.form.endTime = util.formatDate(max, 'Y-M-D') + ' 00:00:00'
this.setData({ height: app.globalData.fragmentHeight - 80, minDate, maxDate, vdate, vdateString })
+ this.fetchStatisticsInfo()
},
showCalendar: function(){
this.setData({ show: true })
@@ -87,9 +91,15 @@ Scene({
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 })
+ wx.showLoading({ title: '加载中', mask: true })
this.fetchStatisticsInfo()
},
fetchStatisticsInfo: function(){
-
+ getStatisticsInfo(this.data.form).then(result => {
+ // this.setData({ })
+ wx.hideLoading()
+ }).catch(err => {
+ wx.hideLoading()
+ })
}
})
\ No newline at end of file
diff --git a/xtends/statics/sale-report/index.js b/xtends/statics/sale-report/index.js
index 23c16aa..4eccb8d 100644
--- a/xtends/statics/sale-report/index.js
+++ b/xtends/statics/sale-report/index.js
@@ -1,15 +1,106 @@
import Scene from '../../../pages/index/scene'
+import { getStatisticsInfo } from "../../../api/saas"
+import util from '../../../utils/util'
+
+const app = getApp()
Scene({
/**
* 页面的初始数据
*/
data: {
+ height: app.globalData.fragmentHeight,
+ form: {},
+ columns: [
+ { key: 'catname', title: '品类', width: 100, fixed: 'left', align: 'center' },
+ { key: 'product_title', width: 90, fixed: 'left', title: '出货重量' },
+ { key: 'product_bar_code', title: '结算重量', width: 90, },
+ { key: 'quantity', width: 90, title: '结算均价' },
+ { key: 'quantity', width: 90, title: '结算金额' }
+ ],
+ data: [
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '1870.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '870.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '870.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '875.00', quantity: '2.500'},
+ {catname: '黄纸皮A级', product_bar_code: '2400.00', product_title: '1875.00', quantity: '2.500'},
+ ],
+ show: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ wx.showLoading({ title: '加载中', mask: true })
+ 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'
+ this.data.form.endTime = util.formatDate(max, 'Y-M-D') + ' 00:00:00'
+ this.setData({ height: app.globalData.fragmentHeight - 80, minDate, maxDate, vdate, vdateString })
+ this.fetchStatisticsInfo()
+ },
+ showCalendar: function(){
+ this.setData({ show: true })
+ },
+ onClose: function() {
+ this.setData({ show: false })
+ },
+ 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 })
+ wx.showLoading({ title: '加载中', mask: true })
+ this.fetchStatisticsInfo()
+ },
+ fetchStatisticsInfo: function(){
+ getStatisticsInfo(this.data.form).then(result => {
+ // this.setData({ })
+ wx.hideLoading()
+ }).catch(err => {
+ wx.hideLoading()
+ })
}
})
\ No newline at end of file
diff --git a/xtends/statics/sale-report/index.json b/xtends/statics/sale-report/index.json
index 19bbcd2..4209c60 100644
--- a/xtends/statics/sale-report/index.json
+++ b/xtends/statics/sale-report/index.json
@@ -1,5 +1,8 @@
{
"usingComponents": {
+ "van-icon": "/components/icon/index",
+ "van-table": "/components/table/index",
+ "van-calendar": "/components/calendar/index",
"notification": "/pages/message/notification/index"
}
}
\ No newline at end of file
diff --git a/xtends/statics/sale-report/index.wxml b/xtends/statics/sale-report/index.wxml
index 4494687..1f3d08a 100644
--- a/xtends/statics/sale-report/index.wxml
+++ b/xtends/statics/sale-report/index.wxml
@@ -3,6 +3,18 @@
销售报表
+
+
+
+ 出货信息
+
+
+ {{vdateString}}
+
+
+
+
+