gjy 2 éve
szülő
commit
a47885877d

+ 8 - 0
src/api/settlementManagement.js

@@ -39,6 +39,14 @@ export function getListselectProfit(data) {
      params: data,
   })
 }
+// 统计报表利润柱状图
+export function getListexpenses(data) {
+  return request({
+    url: '/freightInfo/selectSettledExpenses',
+    method: 'get',
+     params: data,
+  })
+}
 // 货主提现批量审核
 export function batchAduit(data) {
   return request({

+ 0 - 1
src/layout/components/Sidebar/SidebarItem.vue

@@ -72,7 +72,6 @@ export default {
         if (item.hidden) {
           return false
         } else {
-          console.log(item)
           // Temp set(will be used if only has one showing child)
           this.onlyOneChild = item
           return true

+ 1 - 4
src/main.js

@@ -5,7 +5,6 @@ import 'normalize.css/normalize.css' // A modern alternative to CSS resets
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
-
 import '@/styles/index.scss' // global css
 
 import App from './App'
@@ -36,9 +35,7 @@ import './global/index'
 // }
 
 // set ElementUI lang to EN
-Vue.use(ElementUI, {
-  locale
-})
+Vue.use(ElementUI, { locale })
 // 如果想要中文版 element-ui,按如下方式声明
 // Vue.use(ElementUI)
 

+ 4 - 3
src/permission.js

@@ -27,8 +27,8 @@ router.beforeEach(async (to, from, next) => {
   document.title = getPageTitle(to.meta.title)
 
   // determine whether the user has logged in
-  const hasToken = getToken()
-  console.log(hasToken)
+  // const hasToken = getToken()
+  // console.log(hasToken)
   if (localStorage.getItem('wf-pf_admin-token1')) {
     console.log(to.path)
     if (to.path === '/login') {
@@ -39,7 +39,7 @@ router.beforeEach(async (to, from, next) => {
       NProgress.done()
     } else {
       const hasGetUserInfo = store.getters.name
-      console.log(store.getters.token)
+      console.log(store.getters)
       if (store.getters.token) {
         
         // if (!whiteList.includes(to.path)) {
@@ -50,6 +50,7 @@ router.beforeEach(async (to, from, next) => {
         // try {
           // get user info
           const accessRoutes = await store.dispatch('permission/generateRoutes');
+          console.log(to)
           router.addRoutes(accessRoutes);
           // const {
           //   roles

+ 2 - 2
src/router/cargoOwnerManagement/index.js

@@ -11,7 +11,7 @@ const cargoOwnerManagementRouter = {
     meta: {
         title: '货主管理',
         icon: 'huozhuguanli',
-        module: 'changyuntong.huozhuguanli.view',
+        module: 'changyuntong.huozhuguanli',
     },
     children: [{
             path: 'empowerExamine',
@@ -22,7 +22,7 @@ const cargoOwnerManagementRouter = {
             meta: {
                 title: '货主信息',
                 icon: '',
-                module: 'changyuntong.huozhuguanli.view',
+                module: 'changyuntong.huozhuguanli',
             }
         },
         {

+ 6 - 6
src/router/index.js

@@ -1,6 +1,6 @@
 import Vue from 'vue'
 import Router from 'vue-router'
-
+import store from '../store'
 Vue.use(Router)
 
 import Layout from '@/layout'
@@ -76,11 +76,11 @@ export const constantRoutes = [{
             }
         ]
     },
-    {
-        path: '*',
-        redirect: '/404',
-        hidden: true
-    }
+    // {
+    //     path: '*',
+    //     redirect: '/404',
+    //     hidden: true
+    // }
 ]
 let cofigRouter = [
     driverManagement,

+ 5 - 5
src/router/settlementManagement/index.js

@@ -21,7 +21,7 @@ const settlementManagement = {
             meta: {
                 title: '司机费用结算',
                 icon: '',
-                module: 'changyuntong.sifei.view',
+                module: 'changyuntong.jiesuanguanli.sifei.view',
             }
         },
         {
@@ -32,7 +32,7 @@ const settlementManagement = {
             meta: {
                 title: '垫付还款结算',
                 icon: '',
-                module: 'changyuntong.dianfu.view',
+                module: 'changyuntong.jiesuanguanli.dianfu.view',
             },
         },
         {
@@ -43,7 +43,7 @@ const settlementManagement = {
             meta: {
                 title: '货主提现',
                 icon: '',
-                module: 'changyuntong.tixian.view',
+                module: 'changyuntong.jiesuanguanli.tixian.view',
             },
         },
         {
@@ -54,7 +54,7 @@ const settlementManagement = {
             meta: {
                 title: '货主银行流水',
                 icon: '',
-                module: 'changyuntong.hangliu.view',
+                module: 'changyuntong.jiesuanguanli.hangliu.view',
             },
         },
         {
@@ -65,7 +65,7 @@ const settlementManagement = {
             meta: {
                 title: '统计报表',
                 icon: '',
-                module: 'changyuntong.baobiao.view',
+                module: 'changyuntong.jiesuanguanli.baobiao.view',
             },
         },
     ]

+ 1 - 0
src/store/modules/user.js

@@ -40,6 +40,7 @@ const mutations = {
     state.avatar = avatar
   },
   SET_ROLES: (state, roles) => {
+    console.log(roles)
     state.roles = roles
   },
 }

+ 27 - 3
src/views/settlementManagement/statisticalReport.vue

@@ -79,14 +79,16 @@
       </div>
       <div class='echarts2'>
         <div class='title'>待结算</div>
-        <div style="width: 100%;height: 600px;" id="container2"></div>
+        <div style="width: 100%;height: 500px;" id="container2"></div>
+        <div class='bottom-title'>金额(万元)</div>
       </div>
     </div>
   </div>
 </template>
 <script>
 import {
-  getListselectProfit
+  getListselectProfit,
+  getListexpenses
 } from '@/api/settlementManagement'
 export default {
   name: 'hello',
@@ -96,6 +98,7 @@ export default {
       tabledata:{},
       linexaxis:[],
       linedata:[],
+      barList:[],
       status:1,
       value1:'2022',
       show:true,
@@ -193,6 +196,14 @@ export default {
      
     },
     drawBar(){
+      const _obj = {},that=this
+      getListexpenses(_obj).then(response => {
+        if(response.data){
+          this.barList[0]=response.data[0].freight.toFixed(4)
+          this.barList[1]=response.data[0].withdrawal.toFixed(4)
+          this.barList[2]=response.data[0].collection.toFixed(4)
+          this.barList[3]=response.data[0].invoice.toFixed(4)
+        }
       var echart1 = this.$echarts.init(document.getElementById("container2"))//⭐注意是id选择器
 		  var option1 = {
         // title: {
@@ -248,7 +259,7 @@ export default {
           {
 
             type: 'bar',
-            data: [18203, 23489, 29034, 104970],
+            data: that.barList,
             itemStyle: {
               normal: {
                 // 每根柱子颜色设置
@@ -278,6 +289,9 @@ export default {
         ]
       };
       echart1.setOption(option1);
+      }).catch(() => {
+            this.loading = false
+          })
     }
   }
 }
@@ -312,6 +326,9 @@ export default {
   .echarts1,.echarts2{
     position:relative;width:90%;margin:0 auto; background:#fff;
   }
+  .echarts2{
+    padding:20px 0;
+  }
   .content{
     background:#F5F6F7;
     padding:20px 0;
@@ -334,4 +351,11 @@ export default {
     padding:20px 0 20px 3%;
     position:absolute;
   }
+  .bottom-title{
+    font-size:16px;
+    font-weight:600;
+    position:absolute;
+    right:3%;
+    bottom:20px;
+  }
 </style>