diff --git a/api/index/index.js b/api/index/index.js index 7c6919e..0f2257b 100644 --- a/api/index/index.js +++ b/api/index/index.js @@ -62,38 +62,7 @@ export function loadCategoryMenus(_that, _data) { reslove(_data); return; } - reslove(_data[0].childs); - - // let _menus = _data[0].childs; - // _menus = _menus.sort(function(a, b) { - // return a.seq - b.seq; - // }); - - // let _tempMenuData = {}; - // let _menuPage = []; - // let _curMenu = {}; - // for (let _menuIndex = 0; _menuIndex < _menus.length; _menuIndex++) { - // _curMenu = _menus[_menuIndex]; - // if (_curMenu.isShow != 'Y') { - // continue; - // } - // _menuPage.push({ - // name: _curMenu.name, - // src: _curMenu.description, - // href: _curMenu.href - // }); - // if ((_menuIndex + 1) % 8 == 0 && _menuIndex != 0) { - // _tempMenuData[_menuIndex] = _menuPage; - // _menuPage = []; - // } - // } - - // if (_menuPage.length > 0) { - // _tempMenuData[_menus.length] = _menuPage; - // } - - // console.log('_tempMenuData', _tempMenuData) - // reslove(_tempMenuData); + reslove(_data); }, fail: function(e) { wx.showToast({ diff --git a/api/report/feeReport.js b/api/report/feeReport.js new file mode 100644 index 0000000..ebb0f84 --- /dev/null +++ b/api/report/feeReport.js @@ -0,0 +1,91 @@ + +/** + * 查询首页 目录 + */ +/** + * 查询数据统计 + * @param {Object} _that + * @param {Object} _data + */ +export function queryFeeDataReport(_that, _data) { + return new Promise(function(reslove, reject) { + _that.context.get({ + url: _that.url.queryFeeDataReport, + data: _data, //动态数据 + success: function(res) { + let _data = res.data; + reslove(_data); + }, + fail: function(e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }); + }) +} +export function queryOrderDataReport(_that, _data) { + return new Promise(function(reslove, reject) { + _that.context.get({ + url: _that.url.queryOrderDataReport, + data: _data, //动态数据 + success: function(res) { + let _data = res.data; + reslove(_data); + }, + fail: function(e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }); + }) +} + +export function queryInoutDataReport(_that, _data) { + return new Promise(function(reslove, reject) { + _that.context.get({ + url: _that.url.queryInoutDataReport, + data: _data, //动态数据 + success: function(res) { + let _data = res.data; + reslove(_data); + }, + fail: function(e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }); + }) +} + +export function queryOthersDataReport(_that, _data) { + return new Promise(function(reslove, reject) { + _that.context.get({ + url: _that.url.queryOthersDataReport, + data: _data, //动态数据 + success: function(res) { + let _data = res.data; + reslove(_data); + }, + fail: function(e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }); + }) +} + + + + diff --git a/components/report/fee-data-report.vue b/components/report/fee-data-report.vue new file mode 100644 index 0000000..c0a0348 --- /dev/null +++ b/components/report/fee-data-report.vue @@ -0,0 +1,80 @@ + + + + + \ No newline at end of file diff --git a/components/report/inout-data-report.vue b/components/report/inout-data-report.vue new file mode 100644 index 0000000..452da11 --- /dev/null +++ b/components/report/inout-data-report.vue @@ -0,0 +1,80 @@ + + + + + \ No newline at end of file diff --git a/components/report/order-data-report.vue b/components/report/order-data-report.vue new file mode 100644 index 0000000..8658a12 --- /dev/null +++ b/components/report/order-data-report.vue @@ -0,0 +1,80 @@ + + + + + \ No newline at end of file diff --git a/components/report/others-data-report.vue b/components/report/others-data-report.vue new file mode 100644 index 0000000..cb8b80a --- /dev/null +++ b/components/report/others-data-report.vue @@ -0,0 +1,80 @@ + + + + + \ No newline at end of file diff --git a/components/vc-index/work-function.vue b/components/vc-index/work-function.vue index 7098cd9..962306c 100644 --- a/components/vc-index/work-function.vue +++ b/components/vc-index/work-function.vue @@ -1,6 +1,6 @@ @@ -24,6 +33,7 @@ data() { return { real_list: [], + reportMenus:[] }; }, created() { @@ -37,12 +47,20 @@ }); }, _loadMenu: function() { + let _that =this; loadCategoryMenus(this, { userId: getUserInfo().userId, groupType: 'P_APP' }).then(_data=>{ console.log(_data); - this.real_list = _data; + _data.forEach(_menu=>{ + if(_menu.name == "物业手机版"){ + _that.real_list = _menu.childs; + } + if(_menu.name == "手机报表"){ + _that.reportMenus = _menu.childs; + } + }) }) } } diff --git a/constant/url.js b/constant/url.js index f87fe68..7fd0f43 100644 --- a/constant/url.js +++ b/constant/url.js @@ -204,4 +204,11 @@ export default { queryUndoCount: baseUrl+"callComponent/undo/list", allocationStoreEnter: baseUrl+"app/resourceStore.allocationStoreEnter", + //todo 报表相关接口 + queryFeeDataReport:baseUrl+"app/dataReport.queryFeeDataReport", + queryOrderDataReport:baseUrl+"app/dataReport.queryOrderDataReport", + queryInoutDataReport:baseUrl+"app/dataReport.queryInoutDataReport", + queryOthersDataReport:baseUrl+"app/dataReport.queryOthersDataReport", + + } diff --git a/pages.json b/pages.json index 41606f7..2d66f36 100644 --- a/pages.json +++ b/pages.json @@ -658,6 +658,15 @@ } } + ,{ + "path" : "pages/report/dataReport", + "style" : + { + "navigationBarTitleText": "数据统计", + "enablePullDownRefresh": false + } + + } ], "globalStyle": { "navigationBarTextStyle": "white", diff --git a/pages/report/dataReport.vue b/pages/report/dataReport.vue new file mode 100644 index 0000000..0bee719 --- /dev/null +++ b/pages/report/dataReport.vue @@ -0,0 +1,100 @@ + + + + +