فهرست منبع

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-htqd

# Conflicts:
#	src/permission.js
achao 2 سال پیش
والد
کامیت
680e0564ea

+ 8 - 0
src/api/cargoOwnerManagement.js

@@ -81,3 +81,11 @@ export function getInfo(data) {
      params: data,
   })
 }
+// 充值
+export function theRecharge(data) {
+  return request({
+    url: '/hyCargoOwnerCapitalInfo/api/recharge',
+    method: 'post',
+     data: data,
+  })
+}

+ 8 - 0
src/api/enterpriseManagement.js

@@ -23,3 +23,11 @@ export function getBillList(data) {
      params: data,
   })
 }
+// 充值
+export function theRecharge(data) {
+  return request({
+    url: '/hyCargoOwnerCapitalInfo/api/recharge',
+    method: 'post',
+     data: data,
+  })
+}

+ 84 - 21
src/api/parkReportManagement.js

@@ -4,18 +4,18 @@ export function getList(data) {
   return request({
     url: '/driverInfo/selectDriverInfoSubmission',
     method: 'get',
-     params: data,
+    params: data,
   })
 }
 //上报
 export function report(data) {
-    return request({
-      url: '/driverInfo/api/batchSubmission',
-      method: 'post',
-       data: data,
-    })
-  }
-  //查看单条数据
+  return request({
+    url: '/driverInfo/api/batchSubmission',
+    method: 'post',
+    data: data,
+  })
+}
+//查看单条数据
 export function getInfo(data) {
   return request({
     url: '/driverInfo/getDriver',
@@ -28,7 +28,7 @@ export function carGetList(data) {
   return request({
     url: '/driverCarInfo/selectCarInfoSubmission',
     method: 'get',
-     params: data,
+    params: data,
   })
 }
 //车辆上报
@@ -36,15 +36,78 @@ export function carReport(data) {
   return request({
     url: '/driverCarInfo/api/batchSubmission',
     method: 'post',
-     data: data,
-  })
-}
-  //查看单条数据
-  export function carGetInfo(data) {
-    return request({
-      url: '/driverCarInfo/getDriverCarInfo',
-      method: 'get',
-      params: data,
-    })
-  }
-
+    data: data,
+  })
+}
+//查看单条数据
+export function carGetInfo(data) {
+  return request({
+    url: '/driverCarInfo/getDriverCarInfo',
+    method: 'get',
+    params: data,
+  })
+}
+// 运单上报列表
+export function waybillGetList(data) {
+  return request({
+    url: '/orderInfo/selectWaybillReporting',
+    method: 'get',
+    params: data,
+  })
+}
+//查看运单数据
+export function waybillGetInfo(data) {
+  return request({
+    url: '/orderInfo/getOrderInfo',
+    method: 'get',
+    params: data,
+  })
+}
+//运单暂缓上报
+export function deferEscalation(data) {
+  return request({
+    url: '/orderInfo/api/postponeReporting',
+    method: 'post',
+    data: data,
+  })
+}
+//运单批量上报
+export function batchEscalation(data) {
+  return request({
+    url: '/orderInfo/api/postponeReporting',
+    method: 'post',
+    data: data,
+  })
+}
+// 流水单上报列表
+export function dailyReportGetList(data) {
+  return request({
+    url: '/hyFreightSettlementInfo/selectFlowSheet',
+    method: 'get',
+    params: data,
+  })
+}
+//查看流水单数据
+export function dailyReporGetInfo(data) {
+  return request({
+    url: '/hyFreightSettlementInfo/getHyFreightSettlementInfo',
+    method: 'get',
+    params: data,
+  })
+}
+//流水单暂缓上报
+export function dailyReportDeferEscalation(data) {
+  return request({
+    url: '/hyFreightSettlementInfo/api/postponeReporting',
+    method: 'post',
+    data: data,
+  })
+}
+//流水单批量上报
+export function dailyReportBatchEscalation(data) {
+  return request({
+    url: '/hyFreightSettlementInfo/api/batchSubmission',
+    method: 'post',
+    data: data,
+  })
+}

+ 17 - 0
src/api/settlementManagement.js

@@ -31,6 +31,22 @@ export function getListpadsettleaccounts(data) {
      params: data,
   })
 }
+// 统计报表利润图表
+export function getListselectProfit(data) {
+  return request({
+    url: '/freightInfo/selectProfit',
+    method: 'get',
+     params: data,
+  })
+}
+// 统计报表利润柱状图
+export function getListexpenses(data) {
+  return request({
+    url: '/freightInfo/selectSettledExpenses',
+    method: 'get',
+     params: data,
+  })
+}
 // 货主提现批量审核
 export function batchAduit(data) {
   return request({
@@ -47,6 +63,7 @@ export function deferpay(data) {
      data: data,
   })
 }
+
 // 司机运费结算批量付款
 export function batchpay(data) {
   return request({

+ 26 - 0
src/api/user.js

@@ -43,3 +43,29 @@ export function getRoule() {
     // params: { token }
   })
 }
+//获取验证码
+export function getVerifyCode(data) {
+  return request({
+    url: '/commonUser/sendVerifyCode',
+    method: 'get',
+    params: data,
+  })
+}
+//校验验证码
+export function getCheckInfo(data) {
+  return request({
+    url: '/commonUser/checkVerifyCode',
+    method: 'get',
+    params: data,
+  })
+}
+//
+export function getlogin(data) {
+  return request({
+    url: '/loginController/query/login',
+    method: 'get',
+    params: data,
+  })
+}
+
+

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

@@ -3,6 +3,7 @@
     <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
       <!-- <app-link v-if="onlyOneChild.meta" @click.native="flushCom" :to="resolvePath(onlyOneChild.path)"> -->
         <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
+          {{onlyOneChild}}
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
           <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
         </el-menu-item>

+ 3 - 0
src/layout/components/Sidebar/index.vue

@@ -30,8 +30,11 @@
         'menu'
       ]),
       routes() {
+        // var data=this.menu.concat(this.$router.options.routes)
+        // console.log(data)
         console.log('----------------------', this.$router.options.routes)
           console.log('----------------------', this.menu)
+          
         // this.socketInfo()
         // return this.$router.options.routes
         return this.menu

+ 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)
 

+ 0 - 76
src/permission - 副本.js

@@ -1,76 +0,0 @@
-import router from './router'
-import store from './store'
-import {
-  Message
-} from 'element-ui'
-import NProgress from 'nprogress' // progress bar
-import 'nprogress/nprogress.css' // progress bar style
-import {
-  getToken
-} from '@/utils/auth' // get token from cookie
-import getPageTitle from '@/utils/get-page-title'
-
-NProgress.configure({
-  showSpinner: false
-}) // NProgress Configuration
-
-const whiteList = ['/login', '/dashboard'] // no redirect whitelist
-
-router.beforeEach(async (to, from, next) => {
-  // start progress bar
-  NProgress.start()
-
-  // set page title
-  document.title = getPageTitle(to.meta.title)
-
-  // determine whether the user has logged in
-  const hasToken = getToken()
-  debugger
-  if (hasToken) {
-    if (to.path === '/login') {
-      // if is logged in, redirect to the home page
-      next({
-        path: '/'
-      })
-      NProgress.done()
-    } else {
-      const hasGetUserInfo = store.getters.name
-      if (store.getters.token) {
-        next()
-      } else {
-        try {
-          // get user info
-          const accessRoutes = await store.dispatch('permission/generateRoutes');
-          router.addRoutes(accessRoutes);
-          // const {
-          //   roles
-          // } = await store.dispatch('user/getInfo')
-
-          next()
-        } catch (error) {
-          // remove token and go to login page to re-login
-          await store.dispatch('user/resetToken')
-          Message.error(error || 'Has Error')
-          next(`/login?redirect=${to.path}`)
-          NProgress.done()
-        }
-      }
-    }
-  } else {
-    /* has no token*/
-
-    if (whiteList.indexOf(to.path) !== -1) {
-      // in the free login whitelist, go directly
-      next()
-    } else {
-      // other pages that do not have permission to access are redirected to the login page.
-      next(`/login?redirect=${to.path}`)
-      NProgress.done()
-    }
-  }
-})
-
-router.afterEach(() => {
-  // finish progress bar
-  NProgress.done()
-})

+ 89 - 54
src/permission.js

@@ -1,73 +1,108 @@
 import router from './router'
 import store from './store'
 import {
-    Message
+  Message
 } from 'element-ui'
 import NProgress from 'nprogress' // progress bar
 import 'nprogress/nprogress.css' // progress bar style
+
 import {
-    getToken
-} from '@/utils/auth' // get token from cookie
+  getToken,
+  setToken,
+  removeToken
+} from '@/utils/auth'
 import getPageTitle from '@/utils/get-page-title'
 
 NProgress.configure({
-        showSpinner: false
-    }) // NProgress Configuration
+  showSpinner: false
+}) // NProgress Configuration
 
 const whiteList = ['/login', '/dashboard'] // no redirect whitelist
-router.beforeEach(async(to, from, next) => {
-    // start progress bar
-    NProgress.start()
 
-    // set page title
-    document.title = getPageTitle(to.meta.title)
+router.beforeEach(async (to, from, next) => {
+  // start progress bar
+  NProgress.start()
 
-    // determine whether the user has logged in
-    const hasToken = getToken()
-    if (hasToken) {
-        if (to.path === '/login') {
-            // if is logged in, redirect to the home page
-            next({
-                path: '/'
-            })
-            NProgress.done()
-        } else {
-            const hasGetUserInfo = store.getters.name
-            if (hasGetUserInfo) {
-                next()
-            } else {
-                try {
-                    // get user info
-                    const accessRoutes = await store.dispatch('permission/generateRoutes');
-                    router.addRoutes(accessRoutes);
-                    // const {
-                    //   roles
-                    // } = await store.dispatch('user/getInfo')
+  // set page title
+  document.title = getPageTitle(to.meta.title)
 
-                    next()
-                } catch (error) {
-                    // remove token and go to login page to re-login
-                    await store.dispatch('user/resetToken')
-                    Message.error(error || 'Has Error')
-                    next(`/login?redirect=${to.path}`)
-                    NProgress.done()
-                }
-            }
-        }
+  // determine whether the user has logged in
+  // const hasToken = getToken()
+  // console.log(hasToken)
+  if (localStorage.getItem('wf-pf_admin-token1')) {
+    console.log(to.path)
+    if (to.path === '/login') {
+      // if is logged in, redirect to the home page
+      next({
+        path: '/'
+      })
+      NProgress.done()
     } else {
-        /* has no token*/
-        if (whiteList.indexOf(to.path) !== -1) {
-            // in the free login whitelist, go directly
-            next()
-        } else {
-            // other pages that do not have permission to access are redirected to the login page.
-            next(`/login?redirect=${to.path}`)
-            NProgress.done()
-        }
+      const hasGetUserInfo = store.getters.name
+      // console.log(store.getters)
+      if (store.getters.token) {
+        
+        // if (!whiteList.includes(to.path)) {
+        //   checkLoginUser();
+        // }
+        next();
+      } else {
+        // try {
+          // get user info
+          const accessRoutes = await store.dispatch('permission/generateRoutes');
+          console.log(to)
+          router.addRoutes(accessRoutes);
+          // const {
+          //   roles
+          // } = await store.dispatch('user/getInfo')
+          // setToken( 'admin'); 
+          store.commit('user/SET_TOKEN', 'admin'); 
+          next({
+            ...to,
+            replace: true
+          });
+          
+        // } catch (error) {
+          // remove token and go to login page to re-login
+          // await store.dispatch('user/resetToken')
+          // Message.error(error || 'Has Error')
+          // next(`/login?redirect=${to.path}`)
+          // NProgress.done()
+        // }
+      }
     }
-})
+  } else {
+    /* has no token*/
 
+    // if (whiteList.indexOf(to.path) !== -1) {
+    //   // in the free login whitelist, go directly
+    //   next()
+    // } else {
+    //   // other pages that do not have permission to access are redirected to the login page.
+    //   next(`/login?redirect=${to.path}`)
+    //   NProgress.done()
+    // }
+    if (whiteList.indexOf(to.path) !== -1) {
+      if (!whiteList.includes(to.path)) {
+        checkLoginUser();
+      }
+      next();
+    } else {
+      next(getLoginOutUrl() + `?redirect=${to.path}`);
+      NProgress.done();
+    }
+  }
+})
+function getLoginOutUrl() {
+ 
+  return '/login';
+}
+function checkLoginUser() {
+  if (location.port) {
+    return;
+  }
+}
 router.afterEach(() => {
-    // finish progress bar
-    NProgress.done()
-})
+  // finish progress bar
+  NProgress.done()
+})

+ 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,

+ 2 - 0
src/store/modules/permission.js

@@ -66,6 +66,7 @@ const state = {
 const mutations = {
     SET_ROUTES: (state, routes) => {
         const routerList = constantRoutes.concat(routes)
+        console.log(routerList)
         state.menu = routerList
         state.routes = routerList
     },
@@ -82,6 +83,7 @@ const actions = {
             const data = await getRoule().then().catch(error => {
                 clearStorage()
                 resetRouter()
+                window.location.href="https://admin.changyuntong56.com/#/login"
             })
             const roles = []
             handleRoles(data.data, roles, '')

+ 0 - 259
src/store/modules/user - 副本.js

@@ -1,259 +0,0 @@
-import {
-  login,
-  logout,
-  getInfo,
-  getRoule,
-  isLandBased,
-  companyInfo
-} from '@/api/user'
-import {
-  getToken,
-  setToken,
-  removeToken
-} from '@/utils/auth'
-import {
-  resetRouter
-} from '@/router'
-
-const getDefaultState = () => {
-  return {
-    token: getToken(),
-    name: '',
-    avatar: '',
-    roles: [],
-  }
-}
-
-const state = getDefaultState()
-
-const mutations = {
-  RESET_STATE: (state) => {
-    Object.assign(state, getDefaultState())
-  },
-  SET_TOKEN: (state, token) => {
-    state.token = token
-  },
-  SET_NAME: (state, name) => {
-    state.name = name
-  },
-  SET_AVATAR: (state, avatar) => {
-    state.avatar = avatar
-  },
-  SET_ROLES: (state, roles) => {
-    state.roles = roles
-  },
-}
-
-const actions = {
-  // user login
-  async login({
-    commit,
-    dispatch
-  }, userInfo) {
-    const {
-      companyName,
-      username,
-      password
-    } = userInfo
-    // return new Promise((resolve, reject) => {
-    const data = await login({
-      companyName: companyName,
-      username: username.trim(),
-      password: password
-    })
-    // .then(response => {
-    // const { data } = response
-    // commit('SET_TOKEN', data.token)
-    // setToken(data.token)
-    // commit('SET_TOKEN', 'Admin-Token')
-    // setToken('Admin-Token')
-    // resolve(response)
-    // }).catch(error => {
-    // reject(error)
-    // })
-    const {
-      compId,
-      tenantId,
-      vesselId,
-      vesselBankFlag,
-      clientFag,
-      userId
-    } = data.data
-    localStorage.setItem('ws-pf_compId', compId)
-    localStorage.setItem('ws-pf_userId', userId)
-    localStorage.setItem('ws-pf_tenantId', tenantId)
-    localStorage.setItem('ws-pf_vesselId', vesselId) // 仅适用于一条船
-    localStorage.setItem('ws-pf_vesselBankFlag', vesselBankFlag) // 当前登录人是船端还是岸端的人员
-    localStorage.setItem('ws-pf_clientFag', clientFag)
-    // notification.setSessionId(userId) // 设置通知唯一标识
-    // notification.start() // 开始监听通知
-    // })
-    await isLandBased().then(response => {
-      localStorage.setItem('ws-pf_serviceTypeFlag', response)
-    })
-    const {
-      organizationMonetaryKey,
-      compName,
-      compDomainName,
-      organizationMonetaryValue
-    } = await companyInfo({
-      compId: compId
-    })
-    localStorage.setItem('ws-pf_organMonetaryKey', organizationMonetaryKey)
-    localStorage.setItem('ws-pf_compName', compName)
-    localStorage.setItem('ws-pf_compDomainName', compDomainName)
-    localStorage.setItem('ws-pf_organMonetaryValue', organizationMonetaryValue)
-    dispatch('getInfo', {
-      vesselBankFlag,
-      compName
-    })
-  },
-  async getInfo({
-    commit,
-    dispatch
-  }, {
-    vesselBankFlag = 'B',
-    compName = ''
-  }) {
-    debugger
-    const response = await getInfo()
-    const {
-      staffName,
-      deptId,
-      deptName,
-      deptNameEn,
-      vessels = [],
-      majorRole: {
-        roleName = '',
-        roleId = '',
-        dutyId = ''
-      },
-      roles
-    } = response.data
-    const content = {
-      ...response.data,
-      showRoleName: roleName || roles[0].roleName,
-      showRoleId: roleId || roles[0].roleId,
-      showCompName: vesselBankFlag === 'V' ? vessels[0].vesselName : compName,
-      avatar: 'img/user.png'
-    }
-    // setStore({
-    //     name: 'userInfo',
-    //     content: content,
-    //     type: 'session'
-    // })
-    // dispatch('common/setLocalVessels', vessels, { root: true })
-    // commit('SET_USER_INFO', content)
-
-    localStorage.setItem('ws-pf_dutyId', dutyId || response.data.roles[0].dutyId)
-    localStorage.setItem('ws-pf_roleName', roleName || roles[0].roleName)
-
-    localStorage.setItem('ws-pf_staffName', staffName)
-    localStorage.setItem('ws-pf_deptId', deptId)
-    localStorage.setItem('ws-pf_deptName', deptName)
-    localStorage.setItem('ws-pf_deptNameEn', deptNameEn)
-    localStorage.setItem('ws-pf_vessels', JSON.stringify(vessels))
-    localStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
-
-  },
-  // // get user info
-  // async getInfo({
-  //   commit,
-  //   state,
-  //   dispatch
-  // }) {
-  //   return new Promise((resolve, reject) => {
-
-  //     getInfo().then(response => {
-  //       const {
-  //         data
-  //       } = response
-  //       if (!data) {
-  //         reject('Verification failed, please Login again.')
-  //       }
-  //       const {
-  //         staffName,
-  //         deptId,
-  //         deptName,
-  //         deptNameEn,
-  //         vessels = [],
-  //         majorRole: {
-  //           roleName = '',
-  //           roleId = '',
-  //           dutyId = ''
-  //         },
-  //         roles
-  //       } = data
-
-  //       // roles must be a non-empty array
-  //       // if (!roles || roles.length <= 0) {
-  //       //   reject('getInfo: roles must be a non-null array!')
-  //       // }
-
-  //       localStorage.setItem('ws-pf_dutyId', dutyId || data.roles[0].dutyId)
-  //       localStorage.setItem('ws-pf_roleName', roleName || roles[0].roleName)
-
-  //       localStorage.setItem('ws-pf_staffName', staffName)
-  //       localStorage.setItem('ws-pf_deptId', deptId)
-  //       localStorage.setItem('ws-pf_deptName', deptName)
-  //       localStorage.setItem('ws-pf_deptNameEn', deptNameEn)
-  //       localStorage.setItem('ws-pf_vessels', JSON.stringify(vessels))
-  //       localStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
-  //       resolve(data)
-  //     }).catch(error => {
-  //       reject(error)
-  //     })
-  //   })
-  // },
-  getRoule({
-    commit,
-    state
-  }) {
-    return new Promise(async (resolve, reject) => {
-      try {
-        const data = await getRoule(state.roles)
-        data.forEach(route => {
-          asyncRoutes.push(route)
-        })
-        commit('SET_ROUTES', asyncRoutes)
-        resolve(asyncRoutes)
-      } catch (error) {
-        reject(error)
-      }
-    })
-  },
-  // user logout
-  logout({
-    commit,
-    state
-  }) {
-    return new Promise((resolve, reject) => {
-      logout(state.token).then(() => {
-        removeToken() // must remove  token  first
-        resetRouter()
-        commit('RESET_STATE')
-        resolve()
-      }).catch(error => {
-        reject(error)
-      })
-    })
-  },
-
-  // remove token
-  resetToken({
-    commit
-  }) {
-    return new Promise(resolve => {
-      removeToken() // must remove  token  first
-      commit('RESET_STATE')
-      resolve()
-    })
-  }
-}
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions
-}

+ 260 - 140
src/store/modules/user.js

@@ -1,164 +1,284 @@
 import {
-    login,
-    logout,
-    getInfo,
-    getRoule
+  login,
+  logout,
+  getInfo,
+  getRoule,
+  isLandBased,
+  companyInfo
 } from '@/api/user'
 import {
-    getToken,
-    setToken,
-    removeToken,
-    asyncRoutes
+  getToken,
+  setToken,
+  removeToken
 } from '@/utils/auth'
 import {
-    resetRouter
+  resetRouter
 } from '@/router'
 
 const getDefaultState = () => {
-    return {
-        token: getToken(),
-        name: '',
-        avatar: '',
-        roles: [],
-    }
+  return {
+    token: getToken(),
+    name: '',
+    avatar: '',
+    roles: [],
+  }
 }
 
 const state = getDefaultState()
 
 const mutations = {
-    RESET_STATE: (state) => {
-        Object.assign(state, getDefaultState())
-    },
-    SET_TOKEN: (state, token) => {
-        state.token = token
-    },
-    SET_NAME: (state, name) => {
-        state.name = name
-    },
-    SET_AVATAR: (state, avatar) => {
-        state.avatar = avatar
-    },
-    SET_ROLES: (state, roles) => {
-        state.roles = roles
-    },
+  RESET_STATE: (state) => {
+    Object.assign(state, getDefaultState())
+  },
+  SET_TOKEN: (state, token) => {
+    state.token = token
+  },
+  SET_NAME: (state, name) => {
+    state.name = name
+  },
+  SET_AVATAR: (state, avatar) => {
+    state.avatar = avatar
+  },
+  SET_ROLES: (state, roles) => {
+    console.log(roles)
+    state.roles = roles
+  },
 }
 
 const actions = {
-    // user login
-    login({
-        commit
-    }, userInfo) {
-        const {
-            companyName,
-            username,
-            password
-        } = userInfo
-        return new Promise((resolve, reject) => {
-            login({
-                companyName: companyName,
-                username: username.trim(),
-                password: password
-            }).then(response => {
-                commit('SET_TOKEN', 'Admin-Token')
-                setToken('Admin-Token')
-                resolve(response)
-            }).catch(error => {
-                reject(error)
-            })
-        })
-    },
+  // user login
+  async login({
+    commit,
+    dispatch
+  }, userInfo) {
+    const {
+      companyName,
+      username,
+      password
+    } = userInfo
+    // return new Promise((resolve, reject) => {
+    const data = await login({
+      companyName: companyName,
+      username: username.trim(),
+      password: password
+    })
+    console.log(data,11111)
+    // .then(response => {
+    // const { data } = response
+    // commit('SET_TOKEN', '')
+    // setToken('')
+    // commit('SET_TOKEN', data.token)
+    // setToken(data.token)
+    // commit('SET_TOKEN', 'Admin-Token')
+    
+    // resolve(response)
+    // }).catch(error => {
+    // reject(error)
+    // })
+    const {
+      compId,
+      tenantId,
+      vesselId,
+      vesselBankFlag,
+      clientFag,
+      userId
+    } = data.data
+    localStorage.setItem('wf-pf_admin-token1', 'Admin-Token')
+    localStorage.setItem('ws-pf_compId', compId)
+    localStorage.setItem('ws-pf_userId', userId)
+    localStorage.setItem('ws-pf_tenantId', tenantId)
+    localStorage.setItem('ws-pf_vesselId', vesselId) // 仅适用于一条船
+    localStorage.setItem('ws-pf_vesselBankFlag', vesselBankFlag) // 当前登录人是船端还是岸端的人员
+    localStorage.setItem('ws-pf_clientFag', clientFag)
+    // notification.setSessionId(userId) // 设置通知唯一标识
+    // notification.start() // 开始监听通知
+    // })
+    await isLandBased().then(response => {
+      localStorage.setItem('ws-pf_serviceTypeFlag', response)
+    })
+    const {
+      organizationMonetaryKey,
+      compName,
+      compDomainName,
+      organizationMonetaryValue
+    } = await companyInfo({
+      compId: compId
+    })
+    localStorage.setItem('ws-pf_organMonetaryKey', organizationMonetaryKey)
+    localStorage.setItem('ws-pf_compName', compName)
+    localStorage.setItem('ws-pf_compDomainName', compDomainName)
+    localStorage.setItem('ws-pf_organMonetaryValue', organizationMonetaryValue)
+    dispatch('getInfo', {
+      vesselBankFlag,
+      compName
+    })
+    
+    return data
+  },
+  async getInfo({
+    commit,
+    dispatch
+  }, {
+    vesselBankFlag = 'B',
+    compName = ''
+  }) {
+    const response = await getInfo()
+    const {
+      staffName,
+      deptId,
+      deptName,
+      deptNameEn,
+      vessels = [],
+      majorRole: {
+        roleName = '',
+        roleId = '',
+        dutyId = ''
+      },
+      roles
+    } = response.data
+    const content = {
+      ...response.data,
+      showRoleName: roleName || roles[0].roleName,
+      showRoleId: roleId || roles[0].roleId,
+      showCompName: vesselBankFlag === 'V' ? vessels[0].vesselName : compName,
+      avatar: 'img/user.png'
+    }
+    // setStore({
+    //     name: 'userInfo',
+    //     content: content,
+    //     type: 'session'
+    // })
+    // dispatch('common/setLocalVessels', vessels, { root: true })
+    // commit('SET_USER_INFO', content)
 
-    // get user info
-    getInfo({
-        commit,
-        state
-    }) {
-        return new Promise((resolve, reject) => {
+    localStorage.setItem('ws-pf_dutyId', dutyId || response.data.roles[0].dutyId)
+    localStorage.setItem('ws-pf_roleName', roleName || roles[0].roleName)
+    localStorage.setItem('ws-pf_staffName', staffName)
+    localStorage.setItem('ws-pf_deptId', deptId)
+    localStorage.setItem('ws-pf_deptName', deptName)
+    localStorage.setItem('ws-pf_deptNameEn', deptNameEn)
+    localStorage.setItem('ws-pf_vessels', JSON.stringify(vessels))
+    localStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
+    
+  },
+  // // get user info
+  // async getInfo({
+  //   commit,
+  //   state,
+  //   dispatch
+  // }) {
+  //   return new Promise((resolve, reject) => {
 
-            getInfo().then(response => {
-                const {
-                    data
-                } = response
-                if (!data) {
-                    reject('Verification failed, please Login again.')
-                }
-                const {
-                    staffName,
-                    deptId,
-                    deptName,
-                    deptNameEn,
-                    vessels = [],
-                    majorRole: {
-                        roleName = '',
-                        roleId = '',
-                        dutyId = ''
-                    },
-                    roles
-                } = data
-                localStorage.setItem('ws-pf_dutyId', dutyId || data.roles[0].dutyId)
-                localStorage.setItem('ws-pf_roleName', roleName || roles[0].roleName)
+  //     getInfo().then(response => {
+  //       const {
+  //         data
+  //       } = response
+  //       if (!data) {
+  //         reject('Verification failed, please Login again.')
+  //       }
+  //       const {
+  //         staffName,
+  //         deptId,
+  //         deptName,
+  //         deptNameEn,
+  //         vessels = [],
+  //         majorRole: {
+  //           roleName = '',
+  //           roleId = '',
+  //           dutyId = ''
+  //         },
+  //         roles
+  //       } = data
 
-                localStorage.setItem('ws-pf_staffName', staffName)
-                localStorage.setItem('ws-pf_deptId', deptId)
-                localStorage.setItem('ws-pf_deptName', deptName)
-                localStorage.setItem('ws-pf_deptNameEn', deptNameEn)
-                localStorage.setItem('ws-pf_vessels', JSON.stringify(vessels))
-                localStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
-                resolve(data)
-            }).catch(error => {
-                reject(error)
-            })
-        })
-    },
-    getRoule({
-        commit,
-        state
-    }) {
-        return new Promise(async(resolve, reject) => {
-            try {
-                const data = await getRoule(state.roles)
-                data.forEach(route => {
-                    asyncRoutes.push(route)
-                })
-                commit('SET_ROUTES', asyncRoutes)
-                resolve(asyncRoutes)
-            } catch (error) {
-                reject(error)
-            }
-        })
-    },
-    // user logout
-    logout({
-        commit,
-        state
-    }) {
-        return new Promise((resolve, reject) => {
-            logout(state.token).then(() => {
-                removeToken() // must remove  token  first
-                resetRouter()
-                commit('RESET_STATE')
-                resolve()
-            }).catch(error => {
-                reject(error)
-            })
-        })
-    },
+  //       // roles must be a non-empty array
+  //       // if (!roles || roles.length <= 0) {
+  //       //   reject('getInfo: roles must be a non-null array!')
+  //       // }
+
+  //       localStorage.setItem('ws-pf_dutyId', dutyId || data.roles[0].dutyId)
+  //       localStorage.setItem('ws-pf_roleName', roleName || roles[0].roleName)
 
-    // remove token
-    resetToken({
-        commit
-    }) {
-        return new Promise(resolve => {
-            removeToken() // must remove  token  first
-            commit('RESET_STATE')
-            resolve()
+  //       localStorage.setItem('ws-pf_staffName', staffName)
+  //       localStorage.setItem('ws-pf_deptId', deptId)
+  //       localStorage.setItem('ws-pf_deptName', deptName)
+  //       localStorage.setItem('ws-pf_deptNameEn', deptNameEn)
+  //       localStorage.setItem('ws-pf_vessels', JSON.stringify(vessels))
+  //       localStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
+  //       resolve(data)
+  //     }).catch(error => {
+  //       reject(error)
+  //     })
+  //   })
+  // },
+  getRoule({
+    commit,
+    state
+  }) {
+    return new Promise(async (resolve, reject) => {
+      try {
+        const data = await getRoule(state.roles)
+        data.forEach(route => {
+          asyncRoutes.push(route)
         })
-    }
+        commit('SET_ROUTES', asyncRoutes)
+        resolve(asyncRoutes)
+      } catch (error) {
+        reject(error)
+      }
+    })
+//   getRoule({
+//     commit,
+//     state
+//   }) {
+//     return new Promise(async (resolve, reject) => {
+//       try {
+//         const data = await getRoule(state.roles)
+//         data.forEach(route => {
+//           asyncRoutes.push(route)
+//         })
+//         console.log(asyncRoutes)
+//         commit('SET_ROUTES', asyncRoutes)
+//         resolve(asyncRoutes)
+//       } catch (error) {
+//         reject(error)
+//       }
+//     })
+  },
+  // user logout
+  logout({
+    commit,
+    state
+  }) {
+    return new Promise((resolve, reject) => {
+      logout(state.token).then(() => {
+        removeToken() // must remove  token  first
+        // setToken('')
+        localStorage.setItem('wf-pf_admin-token1', '')
+        resetRouter()
+        // console.log(getToken())
+        // commit('RESET_STATE')
+        resolve()
+      }).catch(error => {
+        reject(error)
+      })
+    })
+  },
+
+  // remove token
+  resetToken({
+    commit
+  }) {
+    return new Promise(resolve => {
+      removeToken() // must remove  token  first
+    //   commit('RESET_STATE')
+      resolve()
+    })
+  }
 }
 
 export default {
-    namespaced: true,
-    state,
-    mutations,
-    actions
-}
+  namespaced: true,
+  state,
+  mutations,
+  actions
+}

+ 1 - 0
src/utils/request.js

@@ -47,6 +47,7 @@ service.interceptors.response.use(
      if(res.data instanceof Blob){
       return res.data
     }
+    console.log(res)
     if (res.code && res.code !== 200 && res.code !== '200') {
       Message({
         message: res.message || 'Error',

+ 650 - 499
src/views/cargoOwnerManagement/empowerExamine.vue

@@ -9,7 +9,8 @@
           </el-col>
           <el-col :span="10">
             <div class="screen">
-              <el-input class='find' placeholder="可按货主姓名、账号查找" v-model="searchkeyWord" @keyup.enter.native="find" clearable @change="find"></el-input>
+              <el-input class='find' placeholder="可按货主姓名、账号查找" v-model="searchkeyWord" @keyup.enter.native="find"
+                clearable @change="find"></el-input>
               <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
                   src="../../../public/img/sousuo.png" /></el-button>
             </div>
@@ -47,7 +48,8 @@
           </el-col>
         </el-row>
       </div>
-      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="55.8vh" border highlight-current-row>
+      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="55.8vh" border
+        highlight-current-row>
         <el-table-column prop="name" label="货主姓名" min-width="130"></el-table-column>
         <el-table-column prop="phone" label="账号" min-width="110"></el-table-column>
         <el-table-column prop="cardNumber" label="身份证号" min-width="165"></el-table-column>
@@ -57,10 +59,10 @@
         <el-table-column prop="amountMoney" label="代理身份">
           <template slot-scope="scope">
             <el-popover placement="top-start" title="" width="200" trigger="hover" :content="
-                scope.row.proxyIdentity
-                  ? scope.row.proxyIdentity
-                  : '暂无代理企业'
-              ">
+              scope.row.proxyIdentity
+                ? scope.row.proxyIdentity
+                : '暂无代理企业'
+            ">
               <span class="btn_css" slot="reference">企业</span>
             </el-popover>
           </template>
@@ -123,6 +125,10 @@
             <el-link target="_blank" @click="reject(scope.row)" type="primary" :underline="false"
               :disabled="scope.row.authenticationStatus != '审核中'">驳回</el-link>
             <el-divider direction="vertical"></el-divider>
+            <el-link target="_blank" @click="recharge(scope.row)" type="primary" :underline="false"
+              :disabled="scope.row.authenticationStatus !='已认证'">充值
+            </el-link>
+            <el-divider direction="vertical"></el-divider>
             <el-link target="_blank" @click="newInfo(scope.row)" type="primary" :underline="false"
               :disabled="scope.row.authenticationStatus == '审核中'">消息</el-link>
             <el-divider direction="vertical"></el-divider>
@@ -130,13 +136,13 @@
               <span class="btn_css">•••</span>
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item :disabled="
-                    scope.row.authenticationStatus == '已禁用' &&
-                    scope.row.authenticationStatus != '审核中'
-                  "><span @click="switchChange(scope.row, '1')">禁用</span></el-dropdown-item>
+                  scope.row.authenticationStatus == '已禁用' &&
+                  scope.row.authenticationStatus != '审核中'
+                "><span @click="switchChange(scope.row, '1')">禁用</span></el-dropdown-item>
                 <el-dropdown-item :disabled="
-                    scope.row.authenticationStatus != '已禁用' &&
-                    scope.row.authenticationStatus != '审核中'
-                  "><span @click="switchChange(scope.row, '2')">启用</span></el-dropdown-item>
+                  scope.row.authenticationStatus != '已禁用' &&
+                  scope.row.authenticationStatus != '审核中'
+                "><span @click="switchChange(scope.row, '2')">启用</span></el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
           </template>
@@ -211,6 +217,37 @@
         </div>
       </div>
     </el-dialog>
+    <!--充值弹窗-->
+    <el-dialog :close-on-click-modal="false" title="充值" :visible.sync="rechargeShow" width="500px"
+      :before-close="rechargeClose">
+      <div class="recharge">
+        <div class="recharge_css">
+          <div class="title_css">货主 :</div>
+          <div class="recharge_css">{{ rechargeData.name }}</div>
+        </div>
+        <div class="pay_css">
+          <div class="title_css">金额(元) :</div>
+          <div class="recharge_css" style="margin: -24px 32px 44px 69px;">
+            <el-input type="number" @mousewheel.native.prevent v-model="rechargeData.amountMoney" placeholder="输入充值金额"
+              maxlength="100" size="small">
+            </el-input>
+          </div>
+        </div>
+        <div class="recharge_css">
+          <div class="title_css">上传截图 :</div>
+          <div class="upLoad">
+            <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+              :on-success="handleAvatarSuccess">
+              <img v-if="imageUrl" :src="imageUrl" class="avatar" />
+              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            </el-upload>
+          </div>
+        </div>
+        <div style="text-align: center; margin-top: 20px">
+          <el-button @click="rechargeSubmit()">提交</el-button>
+        </div>
+      </div>
+    </el-dialog>
     <!-- 账户信息 -->
     <el-dialog :close-on-click-modal="false" title="账户信息" :visible.sync="payInfo" width="500px"
       :before-close="payClose">
@@ -242,582 +279,696 @@
   </div>
 </template>
 <script>
-  import {
-    getList,
-    toExamine,
-    postNews,
-    getBillList,
-    editInfo,
-    getInfo,
-  } from "@/api/cargoOwnerManagement";
-  export default {
-    components: {
-      "el-image-viewer": () =>
-        import("element-ui/packages/image/src/image-viewer"),
+import {
+  getList,
+  toExamine,
+  postNews,
+  getBillList,
+  editInfo,
+  getInfo,
+  theRecharge
+} from '@/api/cargoOwnerManagement';
+export default {
+  components: {
+    'el-image-viewer': () =>
+      import('element-ui/packages/image/src/image-viewer'),
+  },
+  data() {
+    return {
+      billList: [],
+      tableData: [],
+      //分页
+      searchkeyWord: '',
+      currentPage: 1,
+      pageSize: 10,
+      deptBudgetTotal: 0,
+      deptCircularPage: {},
+      search: '',
+      addressUrl: [],
+      disabled: false,
+      userInfo: false,
+      rejectInfo: false,
+      form: {},
+      Info: {},
+      sendInfo: false,
+      idSee: {},
+      //图片预览
+      srcList: [],
+      imgsVisible: false,
+      //账户信息
+      payInfo: false,
+      paySee: {},
+      rechargeShow: false,
+      imageUrl: '',
+      rechargeData: {},
+    };
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    seeInfo(val) {
+      this.listLoading = true;
+      getInfo({
+        commonId: val.commonId
+      })
+        .then((response) => {
+          if (response.code == 200) {
+            this.paySee = response.data
+            this.payInfo = true;
+            if (!this.paySee) {
+              this.$message.error('暂无数据!')
+            }
+          }
+        })
+        .catch(() => {
+          this.listLoading = false;
+        });
+
     },
-    data() {
-      return {
-        billList: [],
-        tableData: [],
-        //分页
-        searchkeyWord: "",
-        currentPage: 1,
-        pageSize: 10,
-        deptBudgetTotal: 0,
-        deptCircularPage: {},
-        search: "",
-        addressUrl: [],
-        disabled: false,
-        userInfo: false,
-        rejectInfo: false,
-        form: {},
-        Info: {},
-        sendInfo: false,
-        idSee: {},
-        //图片预览
-        srcList: [],
-        imgsVisible: false,
-        //账户信息
-        payInfo: false,
-        paySee: {},
-      };
+    payClose() {
+      this.payInfo = false;
     },
-    mounted() {
-      this.getList();
+    closeImgViewer() {
+      this.srcList = [];
+      this.imgsVisible = false;
+    },
+    enlarge(url) {
+      this.imgsVisible = true;
+      this.srcList.push(url);
+    },
+    IDLook(val) {
+      //查看身份证
+      this.idSee = val;
+      this.userInfo = true;
     },
-    methods: {
-      seeInfo(val) {
+    editRatio(val) {
+      this.$confirm('确定修改该货主的垫付比例?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
+        // 收费比例/100
+        if (val.chargeProportion) {
+          val.chargeProportion = (val.chargeProportion / 100).toFixed(2)
+        }
+        //垫付比例
+        if (val.advancePayment) {
+          val.advancePayment = (val.advancePayment / 100).toFixed(2)
+        }
         this.listLoading = true;
-        getInfo({
-            commonId: val.commonId
-          })
+        editInfo(val)
           .then((response) => {
             if (response.code == 200) {
-              this.paySee = response.data
-              this.payInfo = true;
-              if (!this.paySee) {
-                this.$message.error("暂无数据!")
-              }
+              this.$notify({
+                title: '成功',
+                message: '修改成功!',
+                type: 'success',
+              });
+              this.getList();
             }
           })
           .catch(() => {
             this.listLoading = false;
           });
-
-      },
-      payClose() {
-        this.payInfo = false;
-      },
-      closeImgViewer() {
-        this.srcList = [];
-        this.imgsVisible = false;
-      },
-      enlarge(url) {
-        this.imgsVisible = true;
-        this.srcList.push(url);
-      },
-      IDLook(val) {
-        //查看身份证
-        this.idSee = val;
-        this.userInfo = true;
-      },
-      editRatio(val) {
-        this.$confirm("确定修改该货主的垫付比例?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }).then(() => {
-            // 收费比例/100
-          if(val.chargeProportion){
-             val.chargeProportion = (val.chargeProportion/100).toFixed(2)
-          }
-          //垫付比例
-          if(val.advancePayment){
-             val.advancePayment = (val.advancePayment/100).toFixed(2)
-          }
-          this.listLoading = true;
-          editInfo(val)
-            .then((response) => {
-              if (response.code == 200) {
-                this.$notify({
-                  title: "成功",
-                  message: "修改成功!",
-                  type: "success",
-                });
-                this.getList();
-              }
-            })
-            .catch(() => {
-              this.listLoading = false;
-            });
-        });
-      },
-      editchargeProportion(val){
-         this.$confirm("确定修改该货主的收费比例?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }).then(() => {
-          // 收费比例/100
-          if(val.chargeProportion){
-             val.chargeProportion = (val.chargeProportion/100).toFixed(2)
-          }
-          //垫付比例
-          if(val.advancePayment){
-             val.advancePayment = (val.advancePayment/100).toFixed(2)
-          }
-          this.listLoading = true;
-          editInfo(val)
-            .then((response) => {
-              if (response.code == 200) {
-                this.$notify({
-                  title: "成功",
-                  message: "修改成功!",
-                  type: "success",
-                });
-                this.getList();
-              }
-            })
-            .catch(() => {
-              this.listLoading = false;
-            });
-        });
-
-      },
-      getBillList(id) {
-        let _obj = {
-          commonId: id,
-          pageSize: 999,
-          currentPage: 1,
-        };
-        getBillList(_obj)
-          .then((response) => {
-            this.billList = response.data.records;
-          })
-          .catch(() => {
-            this.loading = false;
-          });
-      },
-      getList() {
-        this.loading = true;
-        let _obj = {};
-        _obj.currentPage = this.currentPage;
-        _obj.pageSize = this.pageSize;
-        _obj.searchKeyWord = this.searchkeyWord;
-        _obj.searchType = this.search;
-        getList(_obj)
+      });
+    },
+    editchargeProportion(val) {
+      this.$confirm('确定修改该货主的收费比例?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
+        // 收费比例/100
+        if (val.chargeProportion) {
+          val.chargeProportion = (val.chargeProportion / 100).toFixed(2)
+        }
+        //垫付比例
+        if (val.advancePayment) {
+          val.advancePayment = (val.advancePayment / 100).toFixed(2)
+        }
+        this.listLoading = true;
+        editInfo(val)
           .then((response) => {
-            this.tableData = response.data.records;
-            for(let i = 0 ;i<this.tableData.length;i++){
-              if(this.tableData[i].advancePayment){
-                this.tableData[i].advancePayment = this.tableData[i].advancePayment*100
-              }
-              if(this.tableData[i].chargeProportion){
-                this.tableData[i].chargeProportion = this.tableData[i].chargeProportion*100
-              }
+            if (response.code == 200) {
+              this.$notify({
+                title: '成功',
+                message: '修改成功!',
+                type: 'success',
+              });
+              this.getList();
             }
-            this.deptBudgetTotal = response.data.total;
-            this.listLoading = false;
           })
           .catch(() => {
-            this.loading = false;
+            this.listLoading = false;
           });
-      },
-      switchChange(row, num) {
-        var _examine = {};
-        _examine.id = row.id;
-        let title;
-        if (num == 1) {
-          _examine.flag = 3;
-          title = "禁用后客户将无法使用所有功能,是否确定禁用?";
-        } else if (num == 2) {
-          title = "确定重新启用该用户?";
-          _examine.flag = 4;
-        }
-        this.$confirm(title, "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }).then(() => {
-          this.listLoading = true;
-          toExamine(_examine)
-            .then((response) => {
-              if (num == 1) {
-                this.$notify({
-                  title: "成功",
-                  message: "禁用成功!",
-                  type: "success",
-                });
-              } else if (num == 2) {
-                this.$notify({
-                  title: "成功",
-                  message: "启用成功!",
-                  type: "success",
-                });
-              }
-              this.getList();
-              this.listLoading = false;
-            })
-            .catch(() => {
-              this.loading = false;
-            });
+      });
+
+    },
+    getBillList(id) {
+      let _obj = {
+        commonId: id,
+        pageSize: 999,
+        currentPage: 1,
+      };
+      getBillList(_obj)
+        .then((response) => {
+          this.billList = response.data.records;
+        })
+        .catch(() => {
+          this.loading = false;
         });
-      },
-      newInfo(row) {
-        this.Info.newsTypeKey = 1;
-        this.Info.newsType = "系统消息";
-        this.Info.crtCommonId = JSON.parse(
-          localStorage.getItem("UserInfo")
-        ).userId;
-        this.Info.reCommonId = row.commonId;
-        this.Info.bussId = row.id;
-        this.sendInfo = true;
-      },
-      sendInfoClose() {
-        this.Info = {};
-        this.sendInfo = false;
-      },
-      adopt(row) {
-        this.$confirm("确定通过身份审核?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }).then(() => {
-          this.listLoading = true;
-          var _examine = {};
-          _examine.id = row.id;
-          _examine.flag = 1;
-          toExamine(_examine)
-            .then((response) => {
-              this.$notify({
-                title: "成功",
-                message: "通过成功!",
-                type: "success",
-              });
-              this.getList();
-              this.listLoading = false;
-            })
-            .catch(() => {
-              this.loading = false;
-            });
+    },
+    getList() {
+      this.loading = true;
+      let _obj = {};
+      _obj.currentPage = this.currentPage;
+      _obj.pageSize = this.pageSize;
+      _obj.searchKeyWord = this.searchkeyWord;
+      _obj.searchType = this.search;
+      getList(_obj)
+        .then((response) => {
+          this.tableData = response.data.records;
+          for (let i = 0; i < this.tableData.length; i++) {
+            if (this.tableData[i].advancePayment) {
+              this.tableData[i].advancePayment = this.tableData[i].advancePayment * 100
+            }
+            if (this.tableData[i].chargeProportion) {
+              this.tableData[i].chargeProportion = this.tableData[i].chargeProportion * 100
+            }
+          }
+          this.deptBudgetTotal = response.data.total;
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.loading = false;
         });
-      },
-      reject(row) {
-        this.form.id = row.id;
-        this.form.flag = 2;
-        this.rejectInfo = true;
-      },
-      rejectClose() {
-        this.form.rejectReasonDescription = "";
-        this.rejectInfo = false;
-      },
-      submit() {
-        if (!this.form.rejectReasonDescription) {
-          this.$message.error("请输入驳回原因");
-          return;
-        }
-        if (
-          this.form.rejectReasonDescription.length < 6 ||
-          this.form.rejectReasonDescription.length > 100
-        ) {
-          this.$message.error("驳回原因字数应在6-100之间");
-          return;
-        }
+    },
+    switchChange(row, num) {
+      var _examine = {};
+      _examine.id = row.id;
+      let title;
+      if (num == 1) {
+        _examine.flag = 3;
+        title = '禁用后客户将无法使用所有功能,是否确定禁用?';
+      } else if (num == 2) {
+        title = '确定重新启用该用户?';
+        _examine.flag = 4;
+      }
+      this.$confirm(title, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
         this.listLoading = true;
-        toExamine(this.form)
+        toExamine(_examine)
           .then((response) => {
-            this.$notify({
-              title: "成功",
-              message: "驳回成功!",
-              type: "success",
-            });
-            this.form = {};
-            this.rejectInfo = false;
+            if (num == 1) {
+              this.$notify({
+                title: '成功',
+                message: '禁用成功!',
+                type: 'success',
+              });
+            } else if (num == 2) {
+              this.$notify({
+                title: '成功',
+                message: '启用成功!',
+                type: 'success',
+              });
+            }
             this.getList();
             this.listLoading = false;
           })
           .catch(() => {
             this.loading = false;
           });
-      },
-      submitInfo() {
-        if (!this.Info.newsTitle) {
-          this.$message.error("请输入标题");
-          return;
-        }
-        if (!this.Info.newsContent) {
-          this.$message.error("请输入内容");
-          return;
-        }
-        if (this.Info.newsTitle.length < 4 || this.Info.newsTitle.length > 20) {
-          this.$message.error("标题字数应在4-20之间");
-          return;
-        }
-        if (
-          this.Info.newsContent.length < 10 ||
-          this.Info.newsContent.length > 100
-        ) {
-          this.$message.error("消息内容字数应在10-100之间");
-          return;
-        }
+      });
+    },
+    newInfo(row) {
+      this.Info.newsTypeKey = 1;
+      this.Info.newsType = '系统消息';
+      this.Info.crtCommonId = JSON.parse(
+        localStorage.getItem('UserInfo')
+      ).userId;
+      this.Info.reCommonId = row.commonId;
+      this.Info.bussId = row.id;
+      this.sendInfo = true;
+    },
+    sendInfoClose() {
+      this.Info = {};
+      this.sendInfo = false;
+    },
+    adopt(row) {
+      this.$confirm('确定通过身份审核?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
         this.listLoading = true;
-        postNews(this.Info)
+        var _examine = {};
+        _examine.id = row.id;
+        _examine.flag = 1;
+        toExamine(_examine)
           .then((response) => {
             this.$notify({
-              title: "成功",
-              message: "发送成功!",
-              type: "success",
+              title: '成功',
+              message: '通过成功!',
+              type: 'success',
             });
-            this.sendInfoClose();
+            this.getList();
             this.listLoading = false;
           })
           .catch(() => {
             this.loading = false;
           });
-      },
-      userSee(row) {
-        this.idSee.cardAddressUrl = row.cardAddressUrl;
-        this.idSee.cardBackAddressUrl = row.cardBackAddressUrl;
-        this.idSee.name = row.name;
-        this.idSee.cardNumber = row.cardNumber;
-        this.idSee.cardValidityDate = row.cardValidityDate;
-        this.userInfo = true;
-      },
-      userInfoClose() {
-        this.userInfo = false;
-      },
-      searchBtn(num) {
-        this.search = num;
-        this.getList();
-      },
-      find() {
-        this.getList();
-      },
-      onChange() {
-        this.$refs.upload
-          .handleSaveBill()
-          .then(async (response) => {
-            this.formData.addressUrl = response;
-          })
-          .catch((res) => {
-            EventBus.$emit("error", (JSON.parse(res) || {}).message);
-            this.$refs.upload.clearFiles();
+      });
+    },
+    reject(row) {
+      this.form.id = row.id;
+      this.form.flag = 2;
+      this.rejectInfo = true;
+    },
+    rejectClose() {
+      this.form.rejectReasonDescription = '';
+      this.rejectInfo = false;
+    },
+    submit() {
+      if (!this.form.rejectReasonDescription) {
+        this.$message.error('请输入驳回原因');
+        return;
+      }
+      if (
+        this.form.rejectReasonDescription.length < 6 ||
+        this.form.rejectReasonDescription.length > 100
+      ) {
+        this.$message.error('驳回原因字数应在6-100之间');
+        return;
+      }
+      this.listLoading = true;
+      toExamine(this.form)
+        .then((response) => {
+          this.$notify({
+            title: '成功',
+            message: '驳回成功!',
+            type: 'success',
+          });
+          this.form = {};
+          this.rejectInfo = false;
+          this.getList();
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    rechargeClose() {
+      this.rechargeShow = false;
+    },
+    recharge(item) {
+      // this.rechargeData = item
+      this.rechargeData.name = item.name
+      this.rechargeData.rechargeId = item.id;
+      this.rechargeData.flag = 1;
+      this.rechargeData.commonId = item.commonId;
+      this.rechargeShow = true
+    },
+    //上传付款截图
+    handleAvatarSuccess(e) {
+      this.imageUrl = e.url
+    },
+    rechargeSubmit() {
+      if (!this.rechargeData.amountMoney) {
+        this.$message({
+          message: '充值金额不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.imageUrl) {
+        this.$message({
+          message: '请上传截图 ',
+          type: 'warning',
+        })
+        return
+      }
+      this.rechargeData.rechargeUrl = this.imageUrl
+      this.listLoading = true;
+      this.$confirm('确定提交充值信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          theRecharge(this.rechargeData)
+            .then((response) => {
+              this.$notify({
+                title: '成功',
+                message: '充值成功!',
+                type: 'success',
+              });
+              this.rechargeData = {};
+              this.rechargeShow = false;
+              this.getList();
+              this.listLoading = false;
+            })
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    submitInfo() {
+      if (!this.Info.newsTitle) {
+        this.$message.error('请输入标题');
+        return;
+      }
+      if (!this.Info.newsContent) {
+        this.$message.error('请输入内容');
+        return;
+      }
+      if (this.Info.newsTitle.length < 4 || this.Info.newsTitle.length > 20) {
+        this.$message.error('标题字数应在4-20之间');
+        return;
+      }
+      if (
+        this.Info.newsContent.length < 10 ||
+        this.Info.newsContent.length > 100
+      ) {
+        this.$message.error('消息内容字数应在10-100之间');
+        return;
+      }
+      this.listLoading = true;
+      postNews(this.Info)
+        .then((response) => {
+          this.$notify({
+            title: '成功',
+            message: '发送成功!',
+            type: 'success',
           });
-      },
-      handleSizeChange(val) {
-        console.log(`每页 ${val} 条`);
-        this.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.currentPage = val;
-        console.log(`当前页: ${val}`);
-        this.getList();
-      },
+          this.sendInfoClose();
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    userSee(row) {
+      this.idSee.cardAddressUrl = row.cardAddressUrl;
+      this.idSee.cardBackAddressUrl = row.cardBackAddressUrl;
+      this.idSee.name = row.name;
+      this.idSee.cardNumber = row.cardNumber;
+      this.idSee.cardValidityDate = row.cardValidityDate;
+      this.userInfo = true;
     },
-  };
+    userInfoClose() {
+      this.userInfo = false;
+    },
+    searchBtn(num) {
+      this.search = num;
+      this.getList();
+    },
+    find() {
+      this.getList();
+    },
+    onChange() {
+      this.$refs.upload
+        .handleSaveBill()
+        .then(async (response) => {
+          this.formData.addressUrl = response;
+        })
+        .catch((res) => {
+          EventBus.$emit('error', (JSON.parse(res) || {}).message);
+          this.$refs.upload.clearFiles();
+        });
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      this.pageSize = val;
+      this.getList();
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      console.log(`当前页: ${val}`);
+      this.getList();
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-  .center {
-    padding: 10px 20px;
-    background: #f5f6f7;
-    height: calc(100vh - 5vh);
-
-    .top_css {
-      padding: 10px;
+.center {
+  padding: 10px 20px;
+  background: #f5f6f7;
+  height: calc(100vh - 5vh);
 
-      .search_btn {
-        height: 80px;
-        background: linear-gradient(#fafbfb, #ffffff);
-        display: flex;
-        margin-top: 20px;
-
-        .search_block {
-          margin-left: 20px;
-        }
-
-        .search_item {
-          text-align: center;
-          font-size: 14px;
-          font-weight: 600;
-          line-height: 40px;
-          width: 112px;
-          height: 40px;
-          background: #f7f8f9;
-          cursor: pointer;
-          margin-top: 30px;
-        }
-
-        .searchNo {
-          color: #323233;
-        }
-
-        .search {
-          color: #2f53eb;
-          background: #ffffff;
-        }
-      }
-    }
-
-    .center_css {
-      background: #ffffff;
-      border-radius: 1px;
-      margin-top: 10px;
-      padding-bottom: 10px;
-    }
+  .top_css {
+    padding: 10px;
 
-    .screen {
+    .search_btn {
+      height: 80px;
+      background: linear-gradient(#fafbfb, #ffffff);
       display: flex;
+      margin-top: 20px;
 
-      .search {
-        width: 40px;
-        height: 40px;
-        background: #2f53eb;
-        border-radius: 0px 2px 2px 0px;
-        border: 1px solid #DCDFE6;
-        margin-left:-1px;
+      .search_block {
+        margin-left: 20px;
       }
 
-      .count_css {
-        width: 80px;
+      .search_item {
         text-align: center;
+        font-size: 14px;
+        font-weight: 600;
         line-height: 40px;
-        color: #666666;
-      }
-    }
-
-    .el-button {
-      padding: 10px 20px !important;
-    }
-
-    .center_css {
-
-      ::v-deep .el-table th,
-      ::v-deep .el-table td {
-        text-align: center;
+        width: 112px;
+        height: 40px;
+        background: #f7f8f9;
+        cursor: pointer;
+        margin-top: 30px;
       }
 
-      .fujian {
-        font-size: 24px;
-        color: #409eff;
+      .searchNo {
+        color: #323233;
       }
 
-      .warning {
-        font-size: 14px;
-        color: #ed1d1d;
+      .search {
+        color: #2f53eb;
+        background: #ffffff;
       }
     }
   }
 
-  .car_css {
-    width: 50%;
-    display: inline-block;
-    text-align: center;
-    margin-top: 20px;
+  .center_css {
+    background: #ffffff;
+    border-radius: 1px;
+    margin-top: 10px;
+    padding-bottom: 10px;
   }
 
-  .car_item {
-    width: 100px;
-    height: 100px;
-  }
+  .screen {
+    display: flex;
 
-  .user {
-    margin-bottom: 20px;
+    .search {
+      width: 40px;
+      height: 40px;
+      background: #2f53eb;
+      border-radius: 0px 2px 2px 0px;
+      border: 1px solid #DCDFE6;
+      margin-left: -1px;
+    }
 
-    .title_css {
-      color: #9d9d9d;
-      margin-bottom: 6px;
+    .count_css {
+      width: 80px;
+      text-align: center;
+      line-height: 40px;
+      color: #666666;
     }
+  }
+
+  .el-button {
+    padding: 10px 20px !important;
+  }
+
+  .center_css {
 
-    .name_css {
-      color: #0d0d0d;
-      margin-bottom: 20px;
+    ::v-deep .el-table th,
+    ::v-deep .el-table td {
+      text-align: center;
     }
 
-    .form_btn {
-      text-align: right;
+    .fujian {
+      font-size: 24px;
+      color: #409eff;
     }
 
-    .user_item {
-      width: 380px;
-      height: 250px;
-      margin-bottom: 20px;
+    .warning {
+      font-size: 14px;
+      color: #ed1d1d;
     }
   }
+}
+
+.car_css {
+  width: 50%;
+  display: inline-block;
+  text-align: center;
+  margin-top: 20px;
+}
+
+.car_item {
+  width: 100px;
+  height: 100px;
+}
+
+.user {
+  margin-bottom: 20px;
+
+  .title_css {
+    color: #9d9d9d;
+    margin-bottom: 6px;
+  }
 
-  ::v-deep .el-table--border .el-table__header th {
-    background: #f7f8f9;
+  .name_css {
+    color: #0d0d0d;
+    margin-bottom: 20px;
   }
 
-  .btn_css {
-    color: #409eff;
-    cursor: pointer;
+  .form_btn {
+    text-align: right;
   }
 
-  .sign {
-    font-size: 14px;
-    color: red;
+  .user_item {
+    width: 380px;
+    height: 250px;
+    margin-bottom: 20px;
   }
+}
 
-  .form_css {
-    width: 100%;
-    margin: 0 auto 20px;
+::v-deep .el-table--border .el-table__header th {
+  background: #f7f8f9;
+}
 
-    ::v-deep .el-checkbox {
-      width: 40%;
-      height: 30px;
-    }
+.btn_css {
+  color: #409eff;
+  cursor: pointer;
+}
 
-    ::v-deep .el-dialog__body {
-      padding: 10px 20px;
-    }
+.sign {
+  font-size: 14px;
+  color: red;
+}
 
-    ::v-deep .el-dialog__title {
-      font-size: 16px;
-    }
+.form_css {
+  width: 100%;
+  margin: 0 auto 20px;
 
-    // ::v-deep .el-textarea__inner {
-    //   background: #F0F1F2;
-    // }
+  ::v-deep .el-checkbox {
+    width: 40%;
+    height: 30px;
+  }
 
-    .form_btn {
-      text-align: right;
-      margin-top: 10px;
-    }
+  ::v-deep .el-dialog__body {
+    padding: 10px 20px;
   }
 
-  //发送信息
-  .Info_css {
-    .Info_title {
-      color: #323233;
-      font-size: 16px;
-    }
+  ::v-deep .el-dialog__title {
+    font-size: 16px;
+  }
 
-    .Info_item {
-      margin: 20px 0;
-    }
+  // ::v-deep .el-textarea__inner {
+  //   background: #F0F1F2;
+  // }
 
-    .Info_btn {
-      text-align: right;
-      margin-top: 10px;
-    }
+  .form_btn {
+    text-align: right;
+    margin-top: 10px;
   }
+}
 
-  .advancePayment-style {
-    display: flex;
+//发送信息
+.Info_css {
+  .Info_title {
+    color: #323233;
+    font-size: 16px;
   }
 
-  ::v-deep .advancePayment-style .el-input__inner {
-    height: 30px;
+  .Info_item {
+    margin: 20px 0;
   }
 
-  .pay {
-    .pay_css {
-      display: flex;
-      margin-bottom: 20px;
-    }
+  .Info_btn {
+    text-align: right;
+    margin-top: 10px;
+  }
+}
+
+.advancePayment-style {
+  display: flex;
+}
+
+::v-deep .advancePayment-style .el-input__inner {
+  height: 30px;
+}
+
+.pay {
+  .pay_css {
+    display: flex;
+    margin-bottom: 20px;
+  }
+}
+
+.recharge {
+  .recharge_css {
+    display: flex;
+    margin-bottom: 20px;
+    justify-content: space-between;
   }
-  .find::v-deep input.el-input__inner{
-    border-radius:0;
+
+  .recharge_css {
+    width: 80%;
   }
+}
+
+.upLoad {
+  width: 40%;
+  margin: 0 auto;
+}
+
+.avatar-uploader {
+  position: relative;
+  width: 178px;
+}
+
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+  width: 178px;
+}
+
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+  border: 1px solid #8890b1;
+  border-radius: 5px;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  border: 1px solid #8890b1;
+  border-radius: 5px;
+  display: block;
+}
+
+.find::v-deep input.el-input__inner {
+  border-radius: 0;
+}
 </style>

+ 34 - 42
src/views/driverManagement/identityExamine.vue

@@ -9,8 +9,7 @@
           </el-col>
           <el-col :span="10">
             <div class="screen">
-              <el-input class='find' placeholder="可按司机姓名、账号、身份证号查找" @keyup.enter.native="find" v-model="searchkeyWord"
-                clearable @change="find"></el-input>
+              <el-input class='find' placeholder="可按司机姓名、账号、身份证号查找" @keyup.enter.native="find" v-model="searchkeyWord" clearable @change="find"></el-input>
               <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
                   src="../../../public/img/sousuo.png" /></el-button><span
                 class="count_css">共{{ deptBudgetTotal }}条</span>
@@ -52,23 +51,22 @@
           </el-col>
         </el-row>
       </div>
-      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="55.8vh" border
-        highlight-current-row>
-        <el-table-column prop="driverName" label="司机姓名" min-width="130"></el-table-column>
-        <el-table-column prop="driverPhone" label="账号" min-width="110"></el-table-column>
+      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="55.8vh" border highlight-current-row>
+        <el-table-column prop="driverName" label="司机姓名" min-width="90"></el-table-column>
+        <el-table-column prop="driverPhone" label="账号" min-width="130"></el-table-column>
         <el-table-column prop="numberCard" label="身份证号" min-width="165"></el-table-column>
         <el-table-column prop="shipmentsNumber" label="承运次数">
           <template scope="scope">
             {{ scope.row.shipmentsNumber ? scope.row.shipmentsNumber : 0 }}
           </template>
         </el-table-column>
-        <el-table-column prop="favorableRate" label="好评率" min-width="170">
+        <el-table-column prop="favorableRate" label="好评率" min-width="90">
           <!-- <template slot-scope="scope">
             <el-rate v-model="scope.row.count" disabled show-score text-color="#ff9900" score-template="{value}">
             </el-rate>
           </template> -->
         </el-table-column>
-        <el-table-column prop="complaintsNumber" label="投诉和举报">
+        <el-table-column min-width="110" prop="complaintsNumber" label="投诉和举报">
           <template scope="scope">
             <span>{{
               scope.row.complaintsNumber ? scope.row.complaintsNumber : 0
@@ -79,7 +77,7 @@
             }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="accumulatedFreight" label="累计支付运费(元)" min-width="130"></el-table-column>
+        <el-table-column prop="accumulatedFreight" label="累计收款(元)" min-width="110"></el-table-column>
         <el-table-column prop="advancePayment" label="垫付比例(%)" min-width="100">
           <template scope="scope">
             <div class="input_css">
@@ -96,8 +94,7 @@
         </el-table-column>
         <el-table-column label="车辆">
           <template slot-scope="scope">
-            <span @click="carLook(scope.row)" class="btn_css"
-              v-hasPermission="`changyuntong.changyuntongquanxian.audit.chakan`">查看</span>
+            <span @click="carLook(scope.row)" class="btn_css">查看</span>
           </template>
         </el-table-column>
         <el-table-column prop="payee" label="账户">
@@ -112,7 +109,7 @@
         </el-table-column>
         <el-table-column prop="paymentDate" label="附件">
           <template slot-scope="scope" style="text-align: center" v-if="scope.row.backStageStatus !='未认证'">
-            <span class="btn_css btn_css1" @click="fujianLook(scope.row)">查看</span>
+            <span class="btn_css" @click="fujianLook(scope.row)">查看</span>
             <el-tooltip placement="top" v-if="
                 scope.row.overdueFlag == 1 ||
                 scope.row.driverOverdueFlag == 1 ||
@@ -134,7 +131,7 @@
         </el-table-column>
         <el-table-column prop="createDate" label="注册日期" min-width="100"></el-table-column>
         <el-table-column prop="backStageStatus" label="状态"></el-table-column>
-        <el-table-column label="操作" min-width="300">
+        <el-table-column label="操作" min-width="200">
           <template slot-scope="scope">
             <el-link target="_blank" @click="adopt(scope.row)" type="primary" :underline="false"
               :disabled="scope.row.authenticationStatus != '审核中'">通过</el-link>
@@ -168,8 +165,7 @@
       style="text-align: center; margin-top: 10px" :page-size="deptCircularPage.pageSize"
       layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
     </el-pagination>
-    <el-dialog :close-on-click-modal='false' title="车辆信息" :visible.sync="carInfo" width="500px"
-      :before-close="carClose">
+    <el-dialog :close-on-click-modal='false' title="车辆信息" :visible.sync="carInfo" width="500px" :before-close="carClose">
       <!-- <span v-if="carSee.length == 0">暂无车辆</span> -->
       <span class="tips">注:车辆信息不在本页面审核,仅供查看</span>
       <div class="car_css" v-for="(item, index) in carSee" :key="index">
@@ -189,8 +185,7 @@
         <div class="carborder_css"></div>
       </div>
     </el-dialog>
-    <el-dialog :close-on-click-modal='false' title="账户信息" :visible.sync="userInfo" width="500px"
-      :before-close="userClose">
+    <el-dialog :close-on-click-modal='false' title="账户信息" :visible.sync="userInfo" width="500px" :before-close="userClose">
       <div class="user" v-for="(item, index) in paySee" :key="index">
         <div class="name_css">{{ item.payeeName }}</div>
         <div class="id_css">{{ item.bankCard }}</div>
@@ -201,8 +196,7 @@
       <div v-if="paySee.length == 0">暂无账户信息</div>
     </el-dialog>
     <!-- 账单 -->
-    <el-dialog :close-on-click-modal='false' title="账单" :visible.sync="billShow" width="500px"
-      :before-close="billClose">
+    <el-dialog :close-on-click-modal='false' title="账单" :visible.sync="billShow" width="500px" :before-close="billClose">
       <div style="height: 450px" class="bill_css">
         <div class="user" v-for="(item, index) in billInfo" :key="index">
           <div class="flex">
@@ -217,8 +211,7 @@
         <div v-show="billInfo.length == 0">暂无账单信息</div>
       </div>
     </el-dialog>
-    <el-dialog :close-on-click-modal='false' title="附件" :visible.sync="fujianInfo" width="830px"
-      :before-close="fujianClose">
+    <el-dialog :close-on-click-modal='false' title="附件" :visible.sync="fujianInfo" width="830px" :before-close="fujianClose">
       <div class="file">
         <div class="fujian_css">
           <div class="fujian_item" :class="count == 1 ? 'file_btn' : ''" @click="btnChange(1)">
@@ -244,12 +237,15 @@
           </div> -->
         </div>
         <div class="file_tips">
-          <span v-if="count == 1">有效期:{{file.cardValidityDate}} </span><span v-if="count == 2">
-            准驾车型:{{file.quasiDrivingVehicle}} </span> <span v-if="count == 2"> 发证机关:{{file.lssuingAuthority}} </span>
+          <span v-if="count == 1">有效期:{{file.cardValidityDate}} </span>
+          <span v-if="count == 2"> 准驾车型:{{file.quasiDrivingVehicle}} </span>
+          <span v-if="count == 2"> 发证机关:{{file.lssuingAuthority}} </span>
+          <span v-if="count == 2"> 有效期:{{file.driverLicenseValidityStartDate}} ~ {{file.driverLicenseValidityDate}} </span>
           <span v-if="count == 4"> 从业资格证号:{{file.qualificationCertificateNumber}}</span>
+          <span v-if="count == 4"> 有效期:{{file.qualificationCertificateValidityDate}}</span>
         </div>
         <div class="file_img">
-          <img :src="img[index]" class="img_css" @click="enlarge(img[index])" />
+          <img :src="img[index]" class="img_css" @click="enlarge(img[index])"/>
         </div>
         <div class="btn">
           <el-button style="margin-right: 120px" @click="index = 0"
@@ -259,8 +255,7 @@
         </div>
       </div>
     </el-dialog>
-    <el-dialog :close-on-click-modal='false' title="驳回认证" :visible.sync="rejectInfo" width="400px"
-      :before-close="rejectClose">
+    <el-dialog :close-on-click-modal='false' title="驳回认证" :visible.sync="rejectInfo" width="400px" :before-close="rejectClose">
       <div>
         <div><span class="sign">*</span>选择驳回原因</div>
         <div class="form_css">
@@ -284,8 +279,7 @@
       </div>
     </el-dialog>
     <!-- //消息 -->
-    <el-dialog title="发送信息" :close-on-click-modal='false' :visible.sync="sendInfo" width="400px"
-      :before-close="sendInfoClose">
+    <el-dialog title="发送信息" :close-on-click-modal='false' :visible.sync="sendInfo" width="400px" :before-close="sendInfoClose">
       <div class="Info_css">
         <div class="Info_title">标题</div>
         <div class="Info_item">
@@ -363,14 +357,14 @@
     },
     methods: {
       closeImgViewer() {
-        this.srcList = []
+         this.srcList = []
         this.imgsVisible = false;
       },
       enlarge(url) {
         this.imgsVisible = true;
         this.srcList.push(url)
       },
-      editNumber(item) {
+            editNumber(item) {
         //   // item.iconShow = false
         //   this.$set(item,"iconShow",false)
         for (let i = 0; i < this.tableData.length; i++) {
@@ -389,7 +383,7 @@
           type: "warning",
         }).then(() => {
           this.listLoading = true;
-          val.advancePayment = val.advancePayment / 100
+          val.advancePayment = val.advancePayment/100
           editInfo(val)
             .then((response) => {
               if (response.code == 200) {
@@ -435,8 +429,8 @@
             this.tableData = response.data.records;
             for (let i = 0; i < this.tableData.length; i++) {
               this.tableData[i].iconShow = true;
-              if (this.tableData[i].advancePayment) {
-                this.tableData[i].advancePayment *= 100
+              if(this.tableData[i].advancePayment){
+                this.tableData[i].advancePayment*=100
               }
             }
             this.deptBudgetTotal = response.data.total;
@@ -750,7 +744,7 @@
         background: #2f53eb;
         border-radius: 0px 2px 2px 0px;
         border: 1px solid #DCDFE6;
-        margin-left: -1px;
+        margin-left:-1px;
       }
 
       .count_css {
@@ -948,10 +942,10 @@
         background-color: #cfdbfe;
       }
     }
-
-    .file_tips {
-      margin: 10px auto;
-      width: 50%;
+    .file_tips{
+        margin: 10px auto;
+      //  width: 50%;
+      text-align:center;
     }
 
     .file_img {
@@ -986,11 +980,9 @@
   ::v-deep .input_css .el-input__inner {
     height: 30px;
   }
-
-  .find::v-deep input.el-input__inner {
-    border-radius: 0;
+  .find::v-deep input.el-input__inner{
+    border-radius:0;
   }
-
   // .tupian{
   //   width: 100%;
   //   height: 100%;

+ 169 - 2
src/views/driverManagement/vehicleExamine.vue

@@ -93,6 +93,8 @@
             <el-divider direction="vertical"></el-divider>
             <el-link target="_blank" @click="reject(scope.row)" type="primary" :underline="false"
               :disabled="scope.row.status != '审核中'">驳回</el-link>
+              <el-divider direction="vertical"></el-divider>
+              <el-link target="_blank" @click="lookmessage(scope.row)" type="primary" :underline="false">查看</el-link>
           </template>
         </el-table-column>
       </el-table>
@@ -148,6 +150,8 @@
         <div class="file_tips">
           <span v-if="count == 3">有效期:{{file.drivingLicenseValidityDate}} </span><span v-if="count == 3"> 注册日期:{{file.drivingLicenseRegistrationDate}} </span> <span v-if="count == 3"> 发证日期:{{file.drivingLicenseIssueDate}} </span> <span v-if="count == 3"> 发证机关:{{file.lssuingAuthority}}</span>
           <span v-if="count == 5">有效期:{{file.trailerLicenseValidityDate}} </span><span v-if="count == 5"> 注册日期:{{file.trailerLicenseRegistrationDate}} </span> <span v-if="count == 5"> 发证日期:{{file.trailerLicenseIssueDate}} </span> <span v-if="count == 5"> 发证机关:{{file.guaLssuingAuthority}}</span>
+          <span v-if="count == 6"> 运输证号:{{file.operationCertificateNumber}} </span><span v-if="count == 6">有效期:{{file.operationCertificateValidityDate}} </span>
+          <span v-if="count == 7"> 挂车运输证号:{{file.trailerOperationCertificateNumber}} </span><span v-if="count == 7">有效期:{{file.trailerOperationCertificateValidityDate}} </span>
         </div>
         <div class="file_img">
           <img :src="img[index]" class="img_css" @click="enlarge(img[index])" />
@@ -183,6 +187,109 @@
         </div>
       </div>
     </el-dialog>
+    <el-drawer title="车辆详情" :visible.sync="rightSee" style="overflow-y: auto !important">
+      <div class="right_css">
+        <div style='height:80vh;overflow-y:scroll;'>
+          <!-- <div class="title_name">基本信息</div> -->
+          <div class="right_item">车型:{{costData.carCategory}}{{costData.carType}}</div>
+          <div class="right_title">道路运输证</div>
+          <div class="right_item">
+            <img :src="costData.operationCertificate" class="right_img_css" @click="enlarge(costData.operationCertificate)" />
+          </div>
+          <div class="right_title">道路运输证号</div>
+          <div class="right_item">{{costData.operationCertificateNumber}}</div>
+          <div class="right_title">道路运输证有效期</div>
+          <div class="right_item">{{costData.operationCertificateValidityDate}}</div>
+          <div class="right_title">挂车道路运输证</div>
+          <div class="right_item">
+            <img :src="costData.trailerOperationCertificate" class="right_img_css" @click="enlarge(costData.trailerOperationCertificate)" />
+          </div>
+          <div class="right_title">挂车道路运输证号</div>
+          <div class="right_item">{{costData.trailerOperationCertificateNumber}}</div>
+          <div class="right_title">挂车道路运输证有效期</div>
+          <div class="right_item">{{costData.trailerOperationCertificateValidityDate}}</div>
+          <div class="right_title">行驶证主页</div>
+          <div class="right_item">
+            <img :src="costData.drivingLicenseHomePage" class="right_img_css" @click="enlarge(costData.drivingLicenseHomePage)" />
+          </div>
+          <div class="right_title">行驶证副页</div>
+          <div class="right_item">
+            <img :src="costData.drivingLicenseBackPage" class="right_img_css" @click="enlarge(costData.drivingLicenseBackPage)" />
+          </div>
+          <div class="right_title">行驶证车辆类型</div>
+          <div class="right_item">{{costData.vehicleType}}</div>
+          <div class="right_title">行驶证档案编号</div>
+          <div class="right_item">{{costData.drivingLicenseNumber}}</div>
+          <div class="right_title">注册日期</div>
+          <div class="right_item">{{costData.drivingLicenseRegistrationDate}}</div>
+          <div class="right_title">发证日期</div>
+          <div class="right_item">{{costData.drivingLicenseIssueDate}}</div>
+          <div class="right_title">行驶证有效期</div>
+          <div class="right_item">{{costData.drivingLicenseValidityDate}}</div>
+          <div class="right_title">使用性质</div>
+          <div class="right_item">{{costData.useNature}}</div>
+          <div class="right_title">发证机关</div>
+          <div class="right_item">{{costData.lssuingAuthority}}</div>
+          <div class="right_title">车辆能源类型</div>
+          <div class="right_item">{{costData.energyType}}</div>
+          <div class="right_title">挂车行驶证主页</div>
+          <div class="right_item">
+            <img :src="costData.trailerLicenseHomePage" class="right_img_css" @click="enlarge(costData.drivingLicenseHomePage)" />
+          </div>
+           <div class="right_title">挂车行驶证副页</div>
+          <div class="right_item">
+            <img :src="costData.trailerLicenseBackPage" class="right_img_css" @click="enlarge(costData.drivingLicenseBackPage)" />
+          </div>
+          <div class="right_title">挂车行驶证档案编号</div>
+          <div class="right_item">{{costData.trailerLicenseNumber}}</div>
+          <div class="right_title">注册日期</div>
+          <div class="right_item">{{costData.trailerLicenseRegistrationDate}}</div>
+          <div class="right_title">发证日期</div>
+          <div class="right_item">{{costData.trailerLicenseIssueDate}}</div>
+          <div class="right_title">挂车行驶证有效期</div>
+          <div class="right_item">{{costData.trailerLicenseValidityDate}}</div>
+          <div class="right_title">使用性质</div>
+          <div class="right_item">{{costData.guaUseNature}}</div>
+          <div class="right_title">发证机关</div>
+          <div class="right_item">{{costData.guaLssuingAuthority}}</div>
+          <div class="right_title">车牌号</div>
+          <div class="right_item">{{costData.carNumber}}</div>
+          <div class="right_title">车牌颜色</div>
+          <div class="right_item">{{costData.carNumberColour}}</div>
+          <div class="right_title">车辆所属车主</div>
+          <div class="right_item">{{costData.owner}}</div>
+          <div class="right_title">总质量(千克)</div>
+          <div class="right_item">{{costData.carTotalWeight}}</div>
+          <div class="right_title">核定载质量(千克)</div>
+          <div class="right_item">{{costData.carApprovedWeight}}</div>
+          <div class="right_title">整备质量(千克)</div>
+          <div class="right_item">{{costData.servicingWeight}}</div>
+          <div class="right_title">外廓尺寸(毫米)</div>
+          <div class="right_item">{{costData.carLong}}-{{costData.carWidth}}-{{costData.carHeight}}</div>
+          <div class="right_title">上传人车合影</div>
+          <div class="right_item">
+            <img  v-for="item in costData.addressUrlArray" :src="item" class="right_img_css" @click="enlarge(item)" />
+          </div>
+          <div class="right_title">挂车车牌号</div>
+          <div class="right_item">{{costData.guaCarNumber}}</div>
+          <div class="right_title">挂车车辆所属车主</div>
+          <div class="right_item">{{costData.guaOwner}}</div>
+          <div class="right_title">挂车核定载质量(千克)</div>
+          <div class="right_item">{{costData.guaCarApprovedWeight}}</div>
+          <div class="right_title">挂车整备质量(千克)</div>
+          <div class="right_item">{{costData.guaServicingWeight}}</div>
+          <div class="right_title">挂车外廓尺寸(毫米)</div>
+          <div class="right_item">{{costData.guaCarLong}}-{{costData.guaCarWidth}}-{{costData.guaCarHeight}}</div>
+          <div class="right_title">上传人和挂车合影</div>
+          <div class="right_item">
+            <img  v-for="item in costData.guaAddressUrlArray" :src="item" class="right_img_css" @click="enlarge(item)" />
+          </div>
+        <div class="right_btn">
+          <el-button @click="rightSee = false">关闭</el-button>
+        </div>
+        </div>
+      </div>
+    </el-drawer>
     <el-image-viewer v-if="imgsVisible" :on-close="closeImgViewer" :url-list="srcList" style="z-index:9999" />
   </div>
 </template>
@@ -215,6 +322,7 @@
         carSee: {},
         //附件
         file: {},
+        rightSee:false,
         img: [],
         index: "0",
         count: "1",
@@ -223,6 +331,7 @@
         fujianInfo: false,
         //图片预览
         srcList: [],
+        costData:{},
         imgsVisible: false,
       };
     },
@@ -230,7 +339,12 @@
       this.getList()
     },
     methods: {
+      lookmessage(row){
+        this.costData=row
+        this.rightSee=true
+      },
       closeImgViewer() {
+        console.log(11111111111)
          this.srcList = []
         this.imgsVisible = false;
       },
@@ -297,6 +411,21 @@
         _obj.searchKeyWord = this.searchkeyWord
         _obj.searchType = this.search
         getCarList(_obj).then(response => {
+          if(response.data.records.length>0){
+            for(var i=0;i<response.data.records.length;i++){
+              if(response.data.records[i].addressUrl){
+                response.data.records[i].addressUrlArray=response.data.records[i].addressUrl.split(',')
+              }else{
+                response.data.records[i].addressUrlArray=[]
+              }
+              if(response.data.records[i].guaAddressUrl){
+                response.data.records[i].guaAddressUrlArray=response.data.records[i].guaAddressUrl.split(',')
+              }else{
+                response.data.records[i].guaAddressUrlArray=[]
+              }
+            }
+            
+          }
             this.tableData = response.data.records
             this.deptBudgetTotal = response.data.total
             this.listLoading = false
@@ -559,11 +688,49 @@
       margin-top: 10px;
     }
   }
+  
+   .right_css {
+    // overflow-y: auto !important;
+    min-height: 1266px;
+    padding: 0 20px;
+
+    .right_title {
+      color: #9D9D9D;
+      font-size: 14px;
+      margin-bottom: 4px;
+    }
 
+    .title_name {
+      margin-bottom: 10px;
+    }
+
+    .right_item {
+      color: #0D0D0D;
+      font-size: 14px;
+      margin-bottom: 10px;
+    }
+
+    .right_btn {
+      text-align: right;
+      margin: 10px 0;
+    }
+
+    .right_img_css {
+    width: 100px;
+    height: 80px;
+    margin-right: 5px;
+  }
+
+    .right_img {
+      width: 200px;
+      height: 120px;
+      margin-top: 10px;
+    }
+  }
   //查看附件
   .file {
     .fujian_css {
-      width: 620px;
+      width: 746px;
       display: flex;
       margin: 0 auto;
       text-align: center;
@@ -574,7 +741,7 @@
 
       .fujian_item {
         cursor: pointer;
-        width: 105px;
+        width: 135px;
         height: 32px;
         border-right: 1px solid #f0f1f2;
       }

+ 552 - 400
src/views/enterpriseManagement/enterpriseAudit.vue

@@ -9,10 +9,11 @@
           </el-col>
           <el-col :span="10">
             <div class="screen">
-              <el-input class='find' placeholder="可按法人姓名、账号、企业名称查找" @keyup.enter.native="find" v-model="searchkeyWord" clearable @change="find"></el-input>
+              <el-input class='find' placeholder="可按法人姓名、账号、企业名称查找" @keyup.enter.native="find" v-model="searchkeyWord"
+                clearable @change="find"></el-input>
               <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
-                  src="../../../public/img/sousuo.png" /></el-button><span
-                class="count_css">共{{ deptBudgetTotal }}条</span>
+                  src="../../../public/img/sousuo.png" /></el-button><span class="count_css">共{{ deptBudgetTotal
+                  }}条</span>
             </div>
           </el-col>
         </el-row>
@@ -39,28 +40,24 @@
           </el-col>
         </el-row>
       </div>
-      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="55.8vh" border highlight-current-row>
+      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="55.8vh" border
+        highlight-current-row>
         <el-table-column prop="companyName" label="企业名称" min-width="150"></el-table-column>
-        <el-table-column prop="unifiedSocialCreditCode" label="统一社会信用代码" min-width="140"></el-table-column>
+        <el-table-column prop="unifiedSocialCreditCode" label="统一社会信用代码" min-width="160"></el-table-column>
         <el-table-column prop="legalPersonName" label="法定代表人" min-width="91"></el-table-column>
         <el-table-column prop="accountNumber" label="账号" min-width="107"></el-table-column>
         <el-table-column prop="accountBalance" label="可用余额(元)" min-width="133"></el-table-column>
         <el-table-column prop="frozenAmount" label="冻结金额(元)" min-width="133"></el-table-column>
-        <el-table-column label="账户"  min-width="153">
+        <el-table-column label="账户" min-width="153">
           <template slot-scope="scope">
-            <el-popover
-              placement="right"
-              width="400"
-              trigger="click"
-              @show="getBillList(scope.row.id)"
-              >
+            <el-popover placement="right" width="400" trigger="click" @show="getBillList(scope.row.id)">
               <div class="bill-content">
                 <div class="bill-item" v-for="item in billList" :Key="item.id">
                   <div class="row1">
                     <div class="left">
-                      {{item.types}}
+                      {{ item.types }}
                     </div>
-                    <div class="right">{{item.amountMoney}}</div>
+                    <div class="right">{{ item.amountMoney }}</div>
                   </div>
                   <!-- <div class="row2">
                     <div class="left">
@@ -71,10 +68,10 @@
                 </div>
               </div>
               <!-- <el-button slot="reference">账单</el-button> -->
-                <span slot="reference" class="btn_css" style="margin-right:20px">账单</span>
+              <span slot="reference" class="btn_css" style="margin-right:20px">账单</span>
             </el-popover>
             <!-- <el-button style='margin-left:10px;' @click='seemessage(scope.row)'>信息</el-button> -->
-                <span class="btn_css" @click='seemessage(scope.row)'>信息</span>
+            <span class="btn_css" @click='seemessage(scope.row)'>信息</span>
 
           </template>
         </el-table-column>
@@ -92,6 +89,9 @@
               :disabled="scope.row.status != '审核中'">驳回</el-link>
             <el-divider direction="vertical"></el-divider>
             <el-link target="_blank" @click="seeInfo(scope.row)" type="primary" :underline="false">查看</el-link>
+            <el-divider direction="vertical"></el-divider>
+            <el-link target="_blank" @click="recharge(scope.row)" type="primary" :underline="false"
+              :disabled="scope.row.status != '已认证'">充值</el-link>
             <!-- <span class="btn_css" @click="seeInfo(scope.row)"></span> -->
           </template>
         </el-table-column>
@@ -150,36 +150,69 @@
           @click="enlarge(paySee.payeeAddressUrl)"
         /> -->
     </el-dialog>
+    <el-dialog :close-on-click-modal="false" title="充值" :visible.sync="rechargeShow" width="500px"
+      :before-close="rechargeClose">
+      <div class="recharge">
+        <div class="recharge_css">
+          <div class="title_css">企业名称 :</div>
+          <div class="recharge_css">{{ rechargeData.companyName }}</div>
+        </div>
+        <div class="pay_css">
+          <div class="title_css">金额(元) :</div>
+          <div class="recharge_css" style="margin: -24px 32px 44px 69px;">
+            <el-input type="number" @mousewheel.native.prevent v-model="rechargeData.amountMoney" placeholder="输入充值金额"
+              maxlength="100" size="small">
+            </el-input>
+          </div>
+        </div>
+        <div class="recharge_css">
+          <div class="title_css">上传截图 :</div>
+          <div class="upLoad">
+            <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+              :on-success="handleAvatarSuccess">
+              <img v-if="imageUrl" :src="imageUrl" class="avatar" />
+              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            </el-upload>
+          </div>
+        </div>
+        <div style="text-align: center; margin-top: 20px">
+          <el-button @click="rechargeSubmit()">提交</el-button>
+        </div>
+      </div>
+    </el-dialog>
     <el-drawer title="企业详情" :visible.sync="rightSee">
       <div class="right_css">
         <div class="right_title">企业名称</div>
-        <div class="right_item">{{infoData.companyName}}</div>
+        <div class="right_item">{{ infoData.companyName }}</div>
         <div class="right_title">法定代表人姓名</div>
-        <div class="right_item">{{infoData.legalPersonName}}</div>
+        <div class="right_item">{{ infoData.legalPersonName }}</div>
         <div class="right_title">联系方式</div>
-        <div class="right_item">{{infoData.accountNumber}}</div>
-       <div class="right_title">通讯地址</div>
-        <div class="right_item">{{infoData.mailingAddress}}</div>
+        <div class="right_item">{{ infoData.accountNumber }}</div>
+        <div class="right_title">通讯地址</div>
+        <div class="right_item">{{ infoData.mailingAddress }}</div>
         <div class="right_title">上传营业执照</div>
         <div class="right_item">
-          <img :src="infoData.businessLicenseAddressUrl" class="right_img" @click="enlarge(infoData.businessLicenseAddressUrl)">
+          <img :src="infoData.businessLicenseAddressUrl" class="right_img"
+            @click="enlarge(infoData.businessLicenseAddressUrl)">
         </div>
         <div class="right_title">营业期限截止日期</div>
-        <div class="right_item">{{infoData.businessTermDate}}</div>
+        <div class="right_item">{{ infoData.businessTermDate }}</div>
         <div class="right_title">统一社会信用代码</div>
-        <div class="right_item">{{infoData.unifiedSocialCreditCode}}</div>
+        <div class="right_item">{{ infoData.unifiedSocialCreditCode }}</div>
         <div class="right_title">身份证正反面</div>
-        <div class="right_item" >
+        <div class="right_item">
           <img :src="infoData.cardAddressUrl" class="right_img" @click="enlarge(infoData.cardAddressUrl)">
           <img :src="infoData.cardBackAddressUrl" class="right_img" @click="enlarge(infoData.cardBackAddressUrl)">
         </div>
-          <div class="right_title">身份证号</div>
-        <div class="right_item">{{infoData.cardNumber}}</div>
-          <div class="right_title">身份证有效期</div>
-        <div class="right_item">{{infoData.cardValidityDate}}</div>
-
-        <div class="right_title" v-if="infoData.advanceFreightService == 1">{{infoData.landOwnership == 0 ? "房产证":"租赁合同"}}</div>
-        <div class="right_item"  v-for="(item , index) in infoData.imgs" :key="index">
+        <div class="right_title">身份证号</div>
+        <div class="right_item">{{ infoData.cardNumber }}</div>
+        <div class="right_title">身份证有效期</div>
+        <div class="right_item">{{ infoData.cardValidityDate }}</div>
+
+        <div class="right_title" v-if="infoData.advanceFreightService == 1">{{ infoData.landOwnership == 0 ?
+            "房产证" : "租赁合同"
+        }}</div>
+        <div class="right_item" v-for="(item, index) in infoData.imgs" :key="index">
           <img :src="item" class="right_img" @click="enlarge(item)">
         </div>
         <div class="right_title">视频验证</div>
@@ -193,7 +226,7 @@
             class="right_img">
           </video>
         </div>
-        <div class="right_item">{{infoData.advanceFreightService == 1 ? "申请开通平台垫付运费业务" : "未申请开通平台垫付运费业务"}}</div>
+        <div class="right_item">{{ infoData.advanceFreightService == 1 ? "申请开通平台垫付运费业务" : "未申请开通平台垫付运费业务" }}</div>
         <div class="right_btn">
           <el-button @click="submit(1)" v-if="infoData.status == '审核中'">通过</el-button>
           <el-button @click="submit(2)" v-if="infoData.status == '审核中'">驳回</el-button>
@@ -206,442 +239,561 @@
   </div>
 </template>
 <script>
-  import {
-    getList,
-    toallowExamine,
-    getBillList
-  } from '@/api/enterpriseManagement'
-  export default {
-     components: {
-      'el-image-viewer': () =>
-        import('element-ui/packages/image/src/image-viewer'),
-    },
-    data() {
-      return {
-        billList:[],
-        tableData: [],
-        //分页
-        searchkeyWord: '',
-        currentPage: 1,
-        pageSize: 10,
-        deptBudgetTotal: 0,
-        deptCircularPage: {},
-        message:{},
-        search: '5',
-        addressUrl: [],
-        disabled: false,
-        rejectInfo: false,
+import {
+  getList,
+  toallowExamine,
+  getBillList,
+  theRecharge
+} from '@/api/enterpriseManagement'
+export default {
+  components: {
+    'el-image-viewer': () =>
+      import('element-ui/packages/image/src/image-viewer'),
+  },
+  data() {
+    return {
+      billList: [],
+      tableData: [],
+      //分页
+      searchkeyWord: '',
+      currentPage: 1,
+      pageSize: 10,
+      deptBudgetTotal: 0,
+      deptCircularPage: {},
+      message: {},
+      search: '5',
+      addressUrl: [],
+      disabled: false,
+      rejectInfo: false,
+      checkList: [],
+      form: {
         checkList: [],
-        form: {
-          checkList: [],
-          textarea: '',
-        },
-        rightSee: false,
-        infoData: {},
-          //图片预览
-        srcList: [],
-        messageshow:false,
-        imgsVisible: false,
-      };
-    },
-    mounted() {
-      this.loading = true
-       let _obj = {}
-        let start_obj = {}
-        start_obj.currentPage = this.currentPage
-        start_obj.pageSize = this.pageSize
-        start_obj.searchKeyWord = this.searchkeyWord
-        start_obj.searchType = 1
-        console.log(start_obj)
-        getList(start_obj).then(response => {
-          if(response.data.records.length>0 ){
-            this.search=1
-            _obj.currentPage = this.currentPage
-            _obj.pageSize = this.pageSize
-            _obj.searchKeyWord = this.searchkeyWord
-            _obj.searchType = this.search
-            getList(_obj).then(response => {
-              this.tableData = response.data.records
-              this.deptBudgetTotal = response.data.total
-              this.listLoading = false
-            })
-              .catch(() => {
-            this.loading = false
-          })
-          }else{
-            this.search=''
-            _obj.currentPage = this.currentPage
-            _obj.pageSize = this.pageSize
-            _obj.searchKeyWord = this.searchkeyWord
-            _obj.searchType = this.search
-            getList(_obj).then(response => {
-              this.tableData = response.data.records
-              this.deptBudgetTotal = response.data.total
-              this.listLoading = false
-            })
-              .catch(() => {
-            this.loading = false
-          })
-          }
-            
-          })
-          .catch(() => {
-            this.loading = false
-          })
-    },
-    methods: {
-       closeImgViewer() {
-        this.srcList = []
-        this.imgsVisible = false;
+        textarea: '',
       },
-      enlarge(url) {
-        this.imgsVisible = true;
-        this.srcList.push(url)
-      },
-      getBillList(id) {
-        console.log('查看账单')
-        let _obj = {
-          companyId:id,
-          pageSize:999,
-          currentPage:1
-        }
-        getBillList(_obj).then(response => {
-            this.billList = response.data.records
-          })
+      rightSee: false,
+      infoData: {},
+      //图片预览
+      srcList: [],
+      messageshow: false,
+      rechargeShow: false,
+      imageUrl: '',
+      rechargeData: {},
+      imgsVisible: false,
+    };
+  },
+  mounted() {
+    this.loading = true
+    let _obj = {}
+    let start_obj = {}
+    start_obj.currentPage = this.currentPage
+    start_obj.pageSize = this.pageSize
+    start_obj.searchKeyWord = this.searchkeyWord
+    start_obj.searchType = 1
+    console.log(start_obj)
+    getList(start_obj).then(response => {
+      if (response.data.records.length > 0) {
+        this.search = 1
+        _obj.currentPage = this.currentPage
+        _obj.pageSize = this.pageSize
+        _obj.searchKeyWord = this.searchkeyWord
+        _obj.searchType = this.search
+        getList(_obj).then(response => {
+          this.tableData = response.data.records
+          this.deptBudgetTotal = response.data.total
+          this.listLoading = false
+        })
           .catch(() => {
             this.loading = false
           })
-      },
-      seemessage(item){
-        this.message=item
-        this.messageshow=true
-      },
-      payClose() {
-        this.messageshow = false;
-      },
-      getList() {
-        this.loading = true
-       let _obj = {}
- 
-            _obj.currentPage = this.currentPage
-            _obj.pageSize = this.pageSize
-            _obj.searchKeyWord = this.searchkeyWord
-            _obj.searchType = this.search
-            getList(_obj).then(response => {
-              this.tableData = response.data.records
-              this.deptBudgetTotal = response.data.total
-              this.listLoading = false
-            })
-              .catch(() => {
+      } else {
+        this.search = ''
+        _obj.currentPage = this.currentPage
+        _obj.pageSize = this.pageSize
+        _obj.searchKeyWord = this.searchkeyWord
+        _obj.searchType = this.search
+        getList(_obj).then(response => {
+          this.tableData = response.data.records
+          this.deptBudgetTotal = response.data.total
+          this.listLoading = false
+        })
+          .catch(() => {
             this.loading = false
           })
-      },
-      submit(num) {
-        var _allowObj = {}
-        _allowObj.id = this.infoData.id
-        let allowTitle = ''
-        if (num == 1) {
-          _allowObj.flag = 1
-          allowTitle = '通过'
-        } else if (num == 2) {
-          _allowObj.flag = 2
-          allowTitle = '驳回'
-        }
-        this.$confirm('确定' + allowTitle + '企业审核?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning',
-          })
-          .then(() => {
-            this.listLoading = true
-
-            toallowExamine(_allowObj).then(response => {
-                this.rightSee = false
-                this.infoData = {}
-                this.$notify({
-                  title: '成功',
-                  message: allowTitle + '成功!',
-                  type: 'success'
-                });
-                this.getList()
-                this.listLoading = false
-              })
-              .catch(() => {
-                this.loading = false
-              })
-          })
-      },
-      seeInfo(row) {
-        this.infoData = row
-        this.infoData.imgs = []
-        if (this.infoData.propertyAddressUrl) {
-          this.infoData.imgs = this.infoData.propertyAddressUrl.split(',')
-        }
-        this.rightSee = true
-      },
+      }
 
-      searchBtn(num) {
-        this.search = num;
-        this.getList();
-      },
-      find() {
-        this.getList();
-      },
-      onChange() {
-        this.$refs.upload
-          .handleSaveBill()
-          .then(async (response) => {
-            this.formData.addressUrl = response;
+    })
+      .catch(() => {
+        this.loading = false
+      })
+  },
+  methods: {
+    closeImgViewer() {
+      this.srcList = []
+      this.imgsVisible = false;
+    },
+    enlarge(url) {
+      this.imgsVisible = true;
+      this.srcList.push(url)
+    },
+    getBillList(id) {
+      console.log('查看账单')
+      let _obj = {
+        companyId: id,
+        pageSize: 999,
+        currentPage: 1
+      }
+      getBillList(_obj).then(response => {
+        this.billList = response.data.records
+      })
+        .catch(() => {
+          this.loading = false
+        })
+    },
+    seemessage(item) {
+      this.message = item
+      this.messageshow = true
+    },
+    payClose() {
+      this.messageshow = false;
+    },
+    getList() {
+      this.loading = true
+      let _obj = {}
+
+      _obj.currentPage = this.currentPage
+      _obj.pageSize = this.pageSize
+      _obj.searchKeyWord = this.searchkeyWord
+      _obj.searchType = this.search
+      getList(_obj).then(response => {
+        this.tableData = response.data.records
+        this.deptBudgetTotal = response.data.total
+        this.listLoading = false
+      })
+        .catch(() => {
+          this.loading = false
+        })
+    },
+    submit(num) {
+      var _allowObj = {}
+      _allowObj.id = this.infoData.id
+      let allowTitle = ''
+      if (num == 1) {
+        _allowObj.flag = 1
+        allowTitle = '通过'
+      } else if (num == 2) {
+        _allowObj.flag = 2
+        allowTitle = '驳回'
+      }
+      this.$confirm('确定' + allowTitle + '企业审核?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.listLoading = true
+
+          toallowExamine(_allowObj).then(response => {
+            this.rightSee = false
+            this.infoData = {}
+            this.$notify({
+              title: '成功',
+              message: allowTitle + '成功!',
+              type: 'success'
+            });
+            this.getList()
+            this.listLoading = false
           })
-          .catch((res) => {
-            EventBus.$emit('error', (JSON.parse(res) || {}).message);
-            this.$refs.upload.clearFiles();
-          });
-      },
-      handleSizeChange(val) {
-        console.log(`每页 ${val} 条`);
-        this.pageSize = val;
-        this.getList();
-      },
-      handleCurrentChange(val) {
-        this.currentPage = val;
-        console.log(`当前页: ${val}`);
-        this.getList();
-      },
+            .catch(() => {
+              this.loading = false
+            })
+        })
+    },
+    seeInfo(row) {
+      this.infoData = row
+      this.infoData.imgs = []
+      if (this.infoData.propertyAddressUrl) {
+        this.infoData.imgs = this.infoData.propertyAddressUrl.split(',')
+      }
+      this.rightSee = true
+    },
+    rechargeClose() {
+      this.rechargeShow = false;
+    },
+    recharge(item) {
+      // this.rechargeData = item
+      this.rechargeData.companyName = item.companyName
+      this.rechargeData.rechargeId = item.id;
+      this.rechargeData.flag = 2;
+      this.rechargeData.companyId = item.id;
+      this.rechargeShow = true
+    },
+    //上传付款截图
+    handleAvatarSuccess(e) {
+      this.imageUrl = e.url
+    },
+    rechargeSubmit() {
+      if (!this.rechargeData.amountMoney) {
+        this.$message({
+          message: '充值金额不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.imageUrl) {
+        this.$message({
+          message: '请上传截图 ',
+          type: 'warning',
+        })
+        return
+      }
+      this.rechargeData.rechargeUrl = this.imageUrl
+      this.listLoading = true;
+      this.$confirm('确定提交充值信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          theRecharge(this.rechargeData)
+            .then((response) => {
+              this.$notify({
+                title: '成功',
+                message: '充值成功!',
+                type: 'success',
+              });
+              this.rechargeData = {};
+              this.rechargeShow = false;
+              this.getList();
+              this.listLoading = false;
+            })
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    searchBtn(num) {
+      this.search = num;
+      this.getList();
+    },
+    find() {
+      this.getList();
     },
-  };
+    onChange() {
+      this.$refs.upload
+        .handleSaveBill()
+        .then(async (response) => {
+          this.formData.addressUrl = response;
+        })
+        .catch((res) => {
+          EventBus.$emit('error', (JSON.parse(res) || {}).message);
+          this.$refs.upload.clearFiles();
+        });
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      this.pageSize = val;
+      this.getList();
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      console.log(`当前页: ${val}`);
+      this.getList();
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-  .center {
-    padding: 10px 20px;
-    background: #f5f6f7;
-    height: calc(100vh - 5vh);
-
-    .top_css {
-      padding: 10px;
-
-      .search_btn {
-        height: 80px;
-        background: linear-gradient(#fafbfb, #ffffff);
-        display: flex;
-        margin-top: 20px;
-
-        .search_block {
-          margin-left: 20px;
-        }
-
-        .search_item {
-          text-align: center;
-          font-size: 14px;
-          font-weight: 600;
-          line-height: 40px;
-          width: 112px;
-          height: 40px;
-          background: #f7f8f9;
-          cursor: pointer;
-          margin-top: 30px;
-        }
-
-        .searchNo {
-          color: #323233;
-        }
-
-        .search {
-          color: #2f53eb;
-          background: #ffffff;
-        }
-      }
-    }
+.center {
+  padding: 10px 20px;
+  background: #f5f6f7;
+  height: calc(100vh - 5vh);
 
-    .center_css {
-      background: #ffffff;
-      border-radius: 1px;
-      margin-top: 10px;
-      padding-bottom: 10px;
-    }
+  .top_css {
+    padding: 10px;
 
-    .screen {
+    .search_btn {
+      height: 80px;
+      background: linear-gradient(#fafbfb, #ffffff);
       display: flex;
+      margin-top: 20px;
 
-      .search {
-        width: 40px;
-        height: 40px;
-        background: #2f53eb;
-        border-radius: 0px 2px 2px 0px;
-        border: 1px solid #DCDFE6;
-        margin-left:-1px;
-        // border-left: 1px solid #2f53eb;
+      .search_block {
+        margin-left: 20px;
       }
 
-      .count_css {
-        width: 80px;
+      .search_item {
         text-align: center;
+        font-size: 14px;
+        font-weight: 600;
         line-height: 40px;
-        color: #666666;
-      }
-    }
-
-    .el-button {
-      padding: 10px 20px !important;
-    }
-
-    .center_css {
-
-      ::v-deep .el-table th,
-      ::v-deep .el-table td {
-        text-align: center;
+        width: 112px;
+        height: 40px;
+        background: #f7f8f9;
+        cursor: pointer;
+        margin-top: 30px;
       }
 
-      .fujian {
-        font-size: 24px;
-        color: #409eff;
+      .searchNo {
+        color: #323233;
       }
 
-      .warning {
-        font-size: 14px;
-        color: #ed1d1d;
+      .search {
+        color: #2f53eb;
+        background: #ffffff;
       }
     }
   }
 
-  .car_css {
-    width: 50%;
-    display: inline-block;
-    text-align: center;
-    margin-top: 20px;
+  .center_css {
+    background: #ffffff;
+    border-radius: 1px;
+    margin-top: 10px;
+    padding-bottom: 10px;
   }
 
-  .car_item {
-    width: 100px;
-    height: 100px;
+  .screen {
+    display: flex;
+
+    .search {
+      width: 40px;
+      height: 40px;
+      background: #2f53eb;
+      border-radius: 0px 2px 2px 0px;
+      border: 1px solid #DCDFE6;
+      margin-left: -1px;
+      // border-left: 1px solid #2f53eb;
+    }
+
+    .count_css {
+      width: 80px;
+      text-align: center;
+      line-height: 40px;
+      color: #666666;
+    }
   }
 
-  .user {
-    margin-bottom: 20px;
+  .el-button {
+    padding: 10px 20px !important;
+  }
 
-    .user_id {
-      display: flex;
-      height: 30px;
-    }
+  .center_css {
 
-    .name_css,
-    .id_css {
-      width: 50%;
+    ::v-deep .el-table th,
+    ::v-deep .el-table td {
+      text-align: center;
     }
 
-    .name_css {
-      text-align: right;
+    .fujian {
+      font-size: 24px;
+      color: #409eff;
     }
 
-    .user_item {
-      width: 450px;
-      height: 300px;
+    .warning {
+      font-size: 14px;
+      color: #ed1d1d;
     }
   }
+}
+
+.car_css {
+  width: 50%;
+  display: inline-block;
+  text-align: center;
+  margin-top: 20px;
+}
+
+.car_item {
+  width: 100px;
+  height: 100px;
+}
+
+.user {
+  margin-bottom: 20px;
+
+  .user_id {
+    display: flex;
+    height: 30px;
+  }
 
-  ::v-deep .el-table--border .el-table__header th {
-    background: #f7f8f9;
+  .name_css,
+  .id_css {
+    width: 50%;
   }
 
-  .btn_css {
-    color: #409eff;
-    cursor: pointer;
+  .name_css {
+    text-align: right;
   }
 
-  .sign {
-    font-size: 14px;
-    color: red;
+  .user_item {
+    width: 450px;
+    height: 300px;
   }
+}
 
-  .form_css {
-    width: 100%;
-    margin: 20px auto 20px;
+::v-deep .el-table--border .el-table__header th {
+  background: #f7f8f9;
+}
 
-    ::v-deep .el-checkbox {
-      width: 40%;
-      height: 30px;
-    }
+.btn_css {
+  color: #409eff;
+  cursor: pointer;
+}
 
-    ::v-deep .el-dialog__body {
-      padding: 10px 20px;
-    }
+.sign {
+  font-size: 14px;
+  color: red;
+}
 
-    ::v-deep .el-dialog__title {
-      font-size: 16px;
-    }
+.form_css {
+  width: 100%;
+  margin: 20px auto 20px;
 
-    ::v-deep .el-textarea__inner {
-      background: #F0F1F2;
-    }
+  ::v-deep .el-checkbox {
+    width: 40%;
+    height: 30px;
+  }
 
-    .form_btn {
-      text-align: right;
-      margin-top: 10px;
-    }
+  ::v-deep .el-dialog__body {
+    padding: 10px 20px;
   }
 
-  //发送信息
-  .Info_css {
-    .Info_title {
-      color: #323233;
-      font-size: 16px;
-    }
+  ::v-deep .el-dialog__title {
+    font-size: 16px;
+  }
 
-    .Info_item {
-      margin: 20px 0;
-    }
+  ::v-deep .el-textarea__inner {
+    background: #F0F1F2;
+  }
 
-    .Info_btn {
-      text-align: right;
-      margin-top: 10px;
-    }
+  .form_btn {
+    text-align: right;
+    margin-top: 10px;
   }
+}
 
-  .right_css {
-    padding: 0 20px;
+//发送信息
+.Info_css {
+  .Info_title {
+    color: #323233;
+    font-size: 16px;
+  }
 
-    .right_title {
-      color: #9D9D9D;
-      font-size: 14px;
-    }
+  .Info_item {
+    margin: 20px 0;
+  }
 
-    .right_item {
-      color: #0D0D0D;
-      font-size: 14px;
-      margin-bottom: 20px;
-    }
+  .Info_btn {
+    text-align: right;
+    margin-top: 10px;
+  }
+}
 
-    .right_btn {
-      text-align: right;
-      margin: 10px 0;
-    }
+.right_css {
+  padding: 0 20px;
 
-    .right_img {
-      width: 200px;
-      height: 120px;
-      margin-top: 10px;
-    }
+  .right_title {
+    color: #9D9D9D;
+    font-size: 14px;
   }
 
-  ::v-deep .el-drawer {
-    overflow: auto;
+  .right_item {
+    color: #0D0D0D;
+    font-size: 14px;
+    margin-bottom: 20px;
   }
-  .bill-content{
-    .bill-item{
-      .row1,.row2{
-        display: flex;
-        justify-content: space-between;
-      }
-    }
+
+  .right_btn {
+    text-align: right;
+    margin: 10px 0;
   }
-  .pay {
-    .pay_css {
+
+  .right_img {
+    width: 200px;
+    height: 120px;
+    margin-top: 10px;
+  }
+}
+
+::v-deep .el-drawer {
+  overflow: auto;
+}
+
+.bill-content {
+  .bill-item {
+
+    .row1,
+    .row2 {
       display: flex;
-      margin-bottom: 20px;
       justify-content: space-between;
     }
   }
-  .find::v-deep input.el-input__inner{
-    border-radius:0;
+}
+
+.pay {
+  .pay_css {
+    display: flex;
+    margin-bottom: 20px;
+    justify-content: space-between;
+  }
+}
+
+.recharge {
+  .recharge_css {
+    display: flex;
+    margin-bottom: 20px;
+    justify-content: space-between;
+  }
+
+  .recharge_css {
+    width: 80%;
   }
+}
+
+.upLoad {
+  width: 40%;
+  margin: 0 auto;
+  // border: 1px solid #8890b1;
+  // border-radius: 3px;
+}
+
+.avatar-uploader {
+  position: relative;
+  width: 178px;
+}
+
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+  width: 178px;
+}
+
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+  border: 1px solid #8890b1;
+  border-radius: 5px;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  border: 1px solid #8890b1;
+  border-radius: 5px;
+  display: block;
+}
+
+.find::v-deep input.el-input__inner {
+  border-radius: 0;
+}
 </style>

+ 279 - 84
src/views/login/index.vue

@@ -25,12 +25,12 @@
         </span>
       </el-form-item>
       <el-form-item prop="code">
-        <el-row :span="24" style="display: flex;align-items: center;">
+        <el-row :span="24" style="display: flex; align-items: center">
           <el-col :span="12">
             <el-input v-model="loginForm.code" auto-complete="off" placeholder="请输入验证码" size=""
               @keyup.enter.native="submitForm('loginForm')"></el-input>
           </el-col>
-          <el-col :span="12" style="display: flex;justify-content: flex-end;">
+          <el-col :span="12" style="display: flex; justify-content: flex-end">
             <div class="login-code" @click="refreshCode">
               <!--验证码组件-->
               <s-identify :identifyCode="identifyCode"></s-identify>
@@ -38,8 +38,24 @@
           </el-col>
         </el-row>
       </el-form-item>
-      <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;"
-        @click.native.prevent="handleLogin">进入</el-button>
+      <el-form-item prop="checkCode">
+        <el-row :span="24" style="display: flex; align-items: center">
+          <el-col :span="12">
+            <el-input v-model="loginForm.checkCode" auto-complete="off" placeholder="请输入手机验证码"></el-input>
+          </el-col>
+          <el-col :span="12" style="display: flex; justify-content: flex-end">
+            <div class="login-code" @click="checkClick">
+              <el-button type="primary" style="width: 112px">{{
+                codeText
+              }}</el-button>
+            </div>
+          </el-col>
+        </el-row>
+      </el-form-item>
+      <div class="tips">手机验证码五分钟内有效</div>
+      <el-button :loading="loading" type="primary" style="width: 100%; margin-bottom: 30px"
+        @click.native.prevent="nextLogin">进入</el-button>
+      <!-- handleLogin -->
 
       <!-- <div class="tips">
         <span style="margin-right:20px;">username: admin</span>
@@ -50,167 +66,340 @@
 </template>
 
 <script>
+  import Cookies from "js-cookie";
+  import {
+    mapActions
+  } from "vuex";
   import {
     validUsername,
     isLoginName
-  } from '@/utils/validate'
-  import SIdentify from './sidentify'
+  } from "@/utils/validate";
+  import {
+    getVerifyCode,
+    getCheckInfo,
+    getlogin
+  } from '@/api/user'
+  import SIdentify from "./sidentify";
   export default {
-    name: 'Login',
+    name: "Login",
     components: {
-      SIdentify
+      SIdentify,
     },
     data() {
       const validateUsername = (rule, value, callback) => {
         if (!validUsername(value)) {
-          callback(new Error('请输入正确的账号'))
+          callback(new Error("请输入正确的账号"));
         } else {
-          callback()
+          callback();
         }
-      }
+      };
       const validatePassword = (rule, value, callback) => {
         if (value.length < 6) {
-          callback(new Error('请输入正确的密码'))
+          callback(new Error("请输入正确的密码"));
         } else {
-          callback()
+          callback();
         }
-      }
+      };
       const validateCode = (rule, value, callback) => {
         if (this.identifyCode !== value) {
-          this.loginForm.code = ''
-          this.refreshCode()
-          callback(new Error('请输入正确的验证码'))
+          this.loginForm.code = "";
+          this.refreshCode();
+          callback(new Error("请输入正确的验证码"));
         } else {
-          callback()
+          callback();
         }
-      }
+      };
+      const checkCode = (rule, value, callback) => {
+        if (this.identifyCode !== value || value.length != 6) {
+          this.loginForm.checkCode = "";
+          this.refreshCode();
+          callback(new Error("请输入正确的手机验证码"));
+        } else {
+          callback();
+        }
+      };
       return {
         isDebugLogin: false,
         loginForm: {
-          username: '',
-          password: '',
-          code: ''
+          username: "",
+          password: "",
+          code: "",
         },
-        identifyCodes: '1234567890',
-        identifyCode: '',
+        identifyCodes: "1234567890",
+        identifyCode: "",
         loginRules: {
           username: [{
               required: true,
-              trigger: 'blur',
-              message: '请输入用户名'
+              trigger: "blur",
+              message: "请输入账号",
             },
             {
-              min: 1,
-              max: 200,
-              message: '长度在1-200字符之间',
-              trigger: 'blur'
+              min: 11,
+              max: 11,
+              message: "请输入11位手机号",
+              trigger: "blur",
             },
             {
               validator: isLoginName,
-              trigger: 'blur'
-            }
+              trigger: "blur",
+            },
           ],
           password: [{
               required: true,
-              message: '请输入密码',
-              trigger: 'blur'
+              message: "请输入密码",
+              trigger: "blur",
             },
             {
               min: 1,
               max: 100,
-              message: '长度在1-100字符之间',
-              trigger: 'blur'
-            }
+              message: "长度在1-100字符之间",
+              trigger: "blur",
+            },
           ],
           code: [{
               required: true,
-              message: '请输入验证码',
-              trigger: 'blur'
+              message: "请输入验证码",
+              trigger: "blur",
             },
             {
               validator: validateCode,
-              trigger: 'blur'
-            }
-          ]
+              trigger: "blur",
+            },
+          ],
+          checkCode: [{
+              required: true,
+              message: "请输入手机验证码",
+              trigger: "blur",
+            },
+            {
+              min: 6,
+              max: 6,
+              message: "请输入6位手机验证码",
+              trigger: "blur",
+            },
+          ],
         },
         loading: false,
-        passwordType: 'password',
-        redirect: undefined
-      }
+        rememberMe: true,
+        passwordType: "password",
+        redirect: undefined,
+        codeText: "获取验证码",
+      };
     },
     watch: {
       $route: {
         handler: function(route) {
-          this.redirect = route.query && route.query.redirect
+          this.redirect = route.query && route.query.redirect;
         },
-        immediate: true
+        immediate: true,
       },
       isDebugLogin(v) {
         if (v) {
-          this.loginForm.password = '123'
-          this.refreshCode()
+          this.loginForm.password = "123";
+          this.refreshCode();
         }
       },
       identifyCode(v) {
-        this.isDebugLogin && (this.loginForm.code = v)
-      }
+        this.isDebugLogin && (this.loginForm.code = v);
+      },
     },
     methods: {
+      nextLogin() { //校验验证码
+        this.$refs.loginForm.validate(async (valid) => {
+          if (valid) {
+            getCheckInfo({
+              phone: this.loginForm.username,
+              verifyCode: this.loginForm.checkCode
+            }).then(response => {
+              if (response.code == 200) { //验证码校验成功   登录
+                this.handleLogin()
+              }
+            })
+          }
+        })
+      },
+      checkClick() { //获取验证码
+        let that = this;
+        if (that.identifyCode !== that.loginForm.code) {
+          this.loginForm.code = "";
+          that.$message.error("请输入正确的图片验证码")
+          return
+        }
+        if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.loginForm.username)) {
+          if (that.codeText == "获取验证码" || that.codeText == "重新发送") {
+            getVerifyCode({
+              phone: that.loginForm.username,
+              identification: 3
+            }).then(response => {
+              if (response.code == 200) {
+                that.codeText = 60;
+                setInterval(() => {
+                  if (that.codeText > 0) {
+                    that.codeText -= 1;
+                  } else {
+                    that.codeText = "重新发送";
+                  }
+                }, 1000);
+              } else {
+                that.$message.error(response.message)
+              }
+            })
+          }
+        } else {
+          that.$message.error("请输入正确的手机")
+        }
+      },
+      ...mapActions("user", ["login"]),
       randomNum(min, max) {
-        return Math.floor(Math.random() * (max - min) + min)
+        return Math.floor(Math.random() * (max - min) + min);
       },
       refreshCode() {
-        this.identifyCode = ''
-        this.makeCode(this.identifyCodes, 4)
+        this.identifyCode = "";
+        this.makeCode(this.identifyCodes, 4);
       },
       makeCode(o, l) {
         for (let i = 0; i < l; i++) {
-          this.identifyCode += this.identifyCodes[
-            this.randomNum(0, this.identifyCodes.length)
-          ]
+          this.identifyCode +=
+            this.identifyCodes[this.randomNum(0, this.identifyCodes.length)];
         }
       },
       showPwd() {
-        if (this.passwordType === 'password') {
-          this.passwordType = ''
+        if (this.passwordType === "password") {
+          this.passwordType = "";
         } else {
-          this.passwordType = 'password'
+          this.passwordType = "password";
         }
         this.$nextTick(() => {
-          this.$refs.password.focus()
-        })
+          this.$refs.password.focus();
+        });
       },
+      // handleLogin() {
+      //   this.$refs.loginForm.validate(async (valid) => {
+      //     if (valid) {
+      //       this.loginForm.companyName = '黑龙江中天昊元贸易有限公司'
+      //       this.loading = true
+      //       // this.$store.dispatch('user/login', this.loginForm)
+      //       // const res = await this.$store.dispatch('user/login', this.loginForm)
+      //       const res = await this.login(this.loginForm)
+      //       debugger
+      //       localStorage.setItem('ws_login_type', 2)
+      //       Cookies.set('ws_login_companyShortName', this.loginForm.companyName, {
+      //         expires: 365,
+      //       })
+      //       Cookies.set('ws_login_account', this.loginForm.username, {
+      //         expires: 365,
+      //       })
+      //       if (this.rememberMe) {
+      //         Cookies.set('ws_login_pwd', this.loginForm.password, {
+      //           expires: 365,
+      //         })
+      //         Cookies.set('ws_login_rememberMe', 1, {
+      //           expires: 365
+      //         })
+      //       } else {
+      //         Cookies.remove('ws_login_companyShortName')
+      //         Cookies.remove('ws_login_account')
+      //         Cookies.remove('ws_login_pwd')
+      //         Cookies.set('ws_login_rememberMe', 0, {
+      //           expires: 365
+      //         })
+      //       }
+      //       const redirect = this.$route.query.redirect
+      //       if (redirect) {
+      //         this.$router.push(redirect)
+      //       } else {
+      //         this.$router.push('/')
+      //       }
+      //       // .then(response => {
+      //       //   localStorage.setItem('UserInfo', JSON.stringify(response.data))
+      //       //   this.$router.push({
+      //       //     path: this.redirect || '/'
+      //       //   })
+      //       //   this.loading = false
+      //       // })
+      //       // .catch(() => {
+      //       //   this.loading = false
+      //       // })
+      //     } else {
+      //       console.log('error submit!!')
+      //       return false
+      //     }
+      //   })
+      // },
+
+
+
       handleLogin() {
-        this.$refs.loginForm.validate(valid => {
+        let that = this
+        this.$refs.loginForm.validate(async (valid) => {
           if (valid) {
-            this.loginForm.companyName = '黑龙江中天昊元贸易有限公司'
-            this.loading = true
-            this.$store.dispatch('user/login', this.loginForm)
-              .then(response => {
-                localStorage.setItem('UserInfo', JSON.stringify(response.data))
-                this.$router.push({
-                  path: this.redirect || '/'
-                })
-                this.loading = false
-              })
-              .catch(() => {
-                this.loading = false
-              })
+            this.loginForm.companyName = "黑龙江中天昊元贸易有限公司";
+            this.loading = true;
+            // this.$store.dispatch('user/login', this.loginForm)
+            // const res = await this.$store.dispatch('user/login', this.loginForm)、
+           const res = await getlogin({
+              loginName: this.loginForm.username,
+              loginPassword: this.loginForm.password,
+              compId: "2710b21efc1e4393930c5dc800010dc4",
+            })
+
+              if (res.code == 200) {
+                const res = await this.$store.dispatch('user/login', this.loginForm)
+                localStorage.setItem("ws_login_type", 2);
+                Cookies.set("ws_login_companyShortName", this.loginForm.companyName, {
+                  expires: 365,
+                });
+                Cookies.set("ws_login_account", this.loginForm.username, {
+                  expires: 365,
+                });
+                if (this.rememberMe) {
+                  Cookies.set("ws_login_pwd", this.loginForm.password, {
+                    expires: 365,
+                  });
+                  Cookies.set("ws_login_rememberMe", 1, {
+                    expires: 365,
+                  });
+                } else {
+                  Cookies.remove("ws_login_companyShortName");
+                  Cookies.remove("ws_login_account");
+                  Cookies.remove("ws_login_pwd");
+                  Cookies.set("ws_login_rememberMe", 0, {
+                    expires: 365,
+                  });
+                }
+                const redirect = this.$route.query.redirect;
+                if (redirect) {
+                  this.$router.push(redirect);
+                } else {
+                  this.$router.push("/");
+                }
+              } else {
+                this.$message.error(response.message)
+              }
+            // .then(response => {
+            //   localStorage.setItem('UserInfo', JSON.stringify(response.data))
+            //   this.$router.push({
+            //     path: this.redirect || '/'
+            //   })
+            //   this.loading = false
+            // })
+            // .catch(() => {
+            //   this.loading = false
+            // })
           } else {
-            console.log('error submit!!')
-            return false
+            console.log("error submit!!");
+            return false;
           }
-        })
-      }
+        });
+      },
     },
     created() {
-      this.refreshCode()
-    }
-  }
+      this.refreshCode();
+    },
+  };
 </script>
 
 <style lang="scss">
-  /* 修复input 背景不协调 和光标变色 */
   /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
 
   $bg: #283443;
@@ -336,4 +525,10 @@
       text-align: center;
     }
   }
+
+  .tips {
+    width: 100%;
+    text-align: right;
+    color: #a1a3a6 !important;
+  }
 </style>

+ 23 - 8
src/views/orderManagement/orderAudit.vue

@@ -261,6 +261,8 @@
             <div class="right_item">{{costData.wtContractNo}}</div>
             <div class="right_title">车牌号</div>
             <div class="right_item">{{costData.hyCarrierInfo.carNo}}</div>
+            <div class="right_title" v-if="costData.hyCarrierInfo.loadingWeight">净重</div>
+            <div class="right_item"  v-if="costData.hyCarrierInfo.loadingWeight">{{costData.hyCarrierInfo.loadingWeight}}</div>
             <div class="right_title">预计运费</div>
             <div class="right_item">{{costData.hyCarrierInfo.estimatedFreight}}</div>
             <div class="right_title">装车时间</div>
@@ -471,16 +473,29 @@
           if(response.data.records){
             for (let i = 0; i < response.data.records.length; i++) {
               if(response.data.records[i].cargoOwnerStatus=='已终止'){
-                if(response.data.records[i].terminationReason==1){
-                  response.data.records[i].content='原因:已与货主协商<br/>描述:'+response.data.records[i].terminationReasonDescription
-                }else if(response.data.records[i].terminationReason==2){
-                  response.data.records[i].content='原因:货主原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
-                }else if(response.data.records[i].terminationReason==3){
-                  response.data.records[i].content='原因:司机个人原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
-                }else if(response.data.records[i].terminationReason==4){
-                  response.data.records[i].content='原因:其他<br/>描述:'+response.data.records[i].terminationReasonDescription
+                if(response.data.records[i].terminator==1){
+                  if(response.data.records[i].terminationReason==1){
+                    response.data.records[i].content='原因:已与货主协商<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }else if(response.data.records[i].terminationReason==2){
+                    response.data.records[i].content='原因:货主原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }else if(response.data.records[i].terminationReason==3){
+                    response.data.records[i].content='原因:司机个人原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }else if(response.data.records[i].terminationReason==4){
+                    response.data.records[i].content='原因:其他<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }
+                }else if(response.data.records[i].terminator==2){
+                  if(response.data.records[i].terminationReason==1){
+                    response.data.records[i].content='原因:已与司机协商<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }else if(response.data.records[i].terminationReason==2){
+                    response.data.records[i].content='原因:司机原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }else if(response.data.records[i].terminationReason==3){
+                    response.data.records[i].content='原因:司机个人原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }else if(response.data.records[i].terminationReason==4){
+                    response.data.records[i].content='原因:其他<br/>描述:'+response.data.records[i].terminationReasonDescription
+                  }
                 }
                 
+                
               }else{
                 response.data.records[i].content=''
               }

+ 122 - 249
src/views/parkReportManagement/dailyReport.vue

@@ -53,20 +53,28 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="orderNo" label="订单编号" />
-        <el-table-column prop="compilationUnit" label="收款人" />
-        <el-table-column prop="editor" label="司机账号" />
-        <el-table-column prop="updateDate" label="流水号" />
-        <el-table-column prop="updateDate" label="金额(元)" />
-        <el-table-column prop="updateDate" label="类型" />
-        <el-table-column prop="status" label="状态" />
-        <el-table-column prop="updateDate" label="付款时间" />
+        <el-table-column prop="orderNo" label="订单编号" min-width="100" />
+        <el-table-column prop="driverName" label="收款人" />
+        <el-table-column prop="driverPhone" label="司机账号" />
+        <el-table-column prop="serialNumber" label="流水号" />
+        <el-table-column prop="amountMoney" label="金额(元)" />
+        <el-table-column prop="paymentType" label="类型" />
+        <el-table-column prop="escalationStatus" label="状态">
+           <template slot-scope="scope1">
+            <span>{{scope1.row.escalationStatus}}</span>
+              <el-tooltip class="item" effect="dark" :content="scope1.row.escalationFailureReason" placement="top" v-if="scope1.row.escalationStatus == '未通过'">
+                 <img src="../../../public/img/wenhao.png" alt="" class="ask_css" />
+              </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column prop="paymentDate" label="付款时间" min-width="100" />
         <el-table-column label="操作" min-width="200">
           <template slot-scope="scope">
             <el-link target="_blank" @click="look(scope.row)" type="primary" :underline="false">查看</el-link>
             <el-divider direction="vertical" />
             <el-link target="_blank" type="primary" :underline="false" @click="submission(scope.row)"
-              v-if="scope.row.search == 1 || scope.row.search == 4 || scope.row.status == '暂缓中'">上报</el-link>
+              :disabled="scope.row.escalationStatus != '未上报' && scope.row.escalationStatus != '未通过' && scope.row.escalationStatus != '暂缓中'">
+              上报</el-link>
           </template>
         </el-table-column>
       </el-table>
@@ -75,116 +83,53 @@
       :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"
       @size-change="handleSizeChange" @current-change="handleCurrentChange" />
 
-    <el-drawer title="单信息" :visible.sync="rightSee" style="overflow-y: auto !important">
+    <el-drawer title="流水单信息" :visible.sync="rightSee" style="overflow-y: auto !important">
       <div class="right_css">
-        <div class="right_item">订单编号:{{ orderData.compilationUnit }}</div>
-        <div class="right_title">发货时间</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">收货时间</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">托运方</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">托运方证件号或信用代码</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">收货方</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">收货方证件号或信用代码</div>
-        <div class="right_title">运费</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">单证号:{{ dailyReportData.documentNo }}</div>
+        <div class="right_title">实际承运人</div>
+        <div class="right_item">{{ dailyReportData.driverName }} </div>
+        <div class="right_title">实际承运人统一社会信用代码或证件号码</div>
+        <div class="right_item">{{ dailyReportData.driverIdCard }}</div>
         <div class="right_title">车牌号</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ dailyReportData.carNumber }}</div>
         <div class="right_title">车牌颜色</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">发货地址</div>
-        <div class="right_item">
-          {{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{
-              orderData.compilationUnit
-          }}
-        </div>
-        <div class="right_title">收货地址</div>
-        <div class="right_item">
-          {{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{
-              orderData.compilationUnit
-          }}
-        </div>
+        <div class="right_item">{{ dailyReportData.carNumberColour }}</div>
+        <div class="right_title">运单号</div>
+        <div class="right_item">{{ dailyReportData.orderNo }}</div>
+        <div class="right_title">分段分单号</div>
+        <div class="right_item">{{ '0000' }}</div>
+        <div class="right_title">总金额</div>
+        <div class="right_item">{{ dailyReportData.amountMoney }}</div>
+        <div class="right_title">燃油费用</div>
+        <div class="right_item">{{ 0 }}</div>
         <div class="right_title">司机姓名</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ dailyReportData.driverName }}</div>
         <div class="right_title">司机身份证号</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">货物类别</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">货名</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">重量(kg)</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-
-        <!-- <div class="right_title">发货联系人</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">发货联系人电话</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div> -->
-        <!-- <div class="right_title">距离</div>
-        <div class="right_item">约{{ orderData.compilationUnit ? orderData.compilationUnit : 0 }}km</div> -->
-        <!-- <el-divider v-if="orderData.compilationUnit"></el-divider>
-        <div v-if="orderData.compilationUnit">
-          <div class="title_name">承运信息</div>
-          <div class="right_title">承运合同编号</div>
-          <div class="right_item">{{orderData.compilationUnit}}</div>
-          <div class="right_title">委托合同编号</div>
-          <div class="right_item">{{orderData.compilationUnit}}</div>
-          <div class="right_title">车牌号</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.carNo}}</div>
-          <div class="right_title">预计运费</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.estimatedFreight}}</div>
-          <div class="right_title">装车时间</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.loadingDate}}</div>
-          <div class="right_title">装车定位</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.loadingCity}}{{orderData.hyCarrierInfo.loadingArea}}</div>
-          <div class="right_title">装车照片</div>
-          <div style="display: flex;" v-if="orderData.hyCarrierInfo.loadingImg">
-            <div v-for="(item,index) in orderData.hyCarrierInfo.loadingImg.split(',')" :key="index">
-              <img :src="item" class="img_css" @click="enlarge(item)">
-            </div>
-          </div>
-          <div class="right_title" v-if="orderData.hyCarrierInfo.totalFreight">合计应付运费</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.totalFreight}}</div>
-          <div class="right_title" v-if="orderData.hyCarrierInfo.unloadingDate">卸车时间</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.unloadingDate}}</div>
-          <div class="right_title">卸车定位</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.unloadingCity}}{{orderData.hyCarrierInfo.unloadingArea}}</div>
-          <div class="right_title" v-if="orderData.hyCarrierInfo.unloadingImg">卸车照片</div>
-          <div style="display: flex;" v-if="orderData.hyCarrierInfo.unloadingImg">
-            <div v-for="(item,index) in orderData.hyCarrierInfo.unloadingImg.split(',')" :key="index">
-              <img :src="item" class="img_css" @click="enlarge(item)">
-            </div>
-          </div>
-        </div> -->
-        <!-- <el-divider v-if="orderData.freightInfo"></el-divider>
-        <div v-if="orderData.freightInfo">
-          <div class="title_name">运费信息(单位:元)</div>
-          <div class="right_title">预付运费</div>
-          <div class="right_item">{{orderData.freightInfo.prepaidFreight}} <span
-              style="margin-left: 100px;">{{orderData.freightInfo.prepaidFreightDate}}</span></div>
-          <div class="right_title">运费尾款</div>
-          <div class="right_item">{{orderData.freightInfo.freightBalance?orderData.freightInfo.freightBalance:'未支付'}}
-            <span style="margin-left: 100px;">{{orderData.freightInfo.freightBalanceDate}}</span></div>
-          <div class="right_title" v-if="orderData.freightInfo.freightBalance">明细</div>
-          <div class="right_item" v-if="orderData.freightInfo.freightBalance">
-            预付{{orderData.freightInfo.prepaidFreight ? orderData.freightInfo.prepaidFreight : 0}}元,服务费{{orderData.freightInfo.driverServiceCharge ? orderData.freightInfo.driverServiceCharge:0}}元,尾款{{orderData.freightInfo.freightBalance ? orderData.freightInfo.freightBalance:0}}元,合计收款{{orderData.freightInfo.totalCollection ? orderData.freightInfo.totalCollection:0}}元。
-          </div>
-        </div> -->
-        <!-- <el-divider v-if="orderData.repaymentInfo"></el-divider> -->
-        <!-- <div v-if="orderData.repaymentInfo">
-          <div class="title_name">还款信息</div>
-          <div class="right_title">运费</div>
-          <div class="right_item">{{orderData.freight}}</div>
-          <div class="right_title">超期费(每天3%)</div>
-          <div class="right_item">{{orderData.repaymentInfo.overdueFee}}</div>
-          <div class="right_title">合计应还</div>
-          <div class="right_item">{{orderData.repaymentInfo.totalRepayable}}</div>
-          <div class="right_title">还款(尾号6666)</div>
-          <div class="right_item">{{orderData.repaymentInfo.alreadyRepaid}}</div>
-        </div> -->
+        <div class="right_item">{{ dailyReportData.driverIdCard }}</div>
+        <div class="right_title">收款方名称</div>
+        <div class="right_item">{{ dailyReportData.driverName }}</div>
+        <div class="right_title">收款人性别</div>
+        <div class="right_item">{{ dailyReportData.driverSex }}</div>
+        <div class="right_title">收款人生日</div>
+        <div class="right_item">{{ dailyReportData.driverBirthday }}</div>
+        <div class="right_title">收款人身份证号</div>
+        <div class="right_item">{{ dailyReportData.driverIdCard }}</div>
+        <div class="right_title">收款人电话</div>
+        <div class="right_item">{{ dailyReportData.driverPhone }}</div>
+        <div class="right_title">收款人地址</div>
+        <div class="right_item">{{ dailyReportData.driverAddress }}</div>
+        <div class="right_title">收款帐户信息</div>
+        <div class="right_item">{{ dailyReportData.driverName }}</div>
+        <div class="right_title">收款方银行代码</div>
+        <div class="right_item">{{ dailyReportData.bankKey }}</div>
+        <div class="right_title">收款方银行卡银行网点名称</div>
+        <div class="right_item">{{ dailyReportData.bankDepositBranch }}</div>
+        <div class="right_title">流水号</div>
+        <div class="right_item">{{ dailyReportData.serialNumber }}</div>
+        <div class="right_title">实际支付金额</div>
+        <div class="right_item">{{ dailyReportData.amountMoney }}</div>
+        <div class="right_title">支付凭证文件</div>
+        <div class="right_item">{{ dailyReportData.paymentVoucher }}</div>
         <div class="right_btn">
           <el-button @click="rightSee = false">关闭</el-button>
         </div>
@@ -194,16 +139,15 @@
 </template>
 <script>
 import {
-  getList,
-  seeData,
-  // toExamine,
-  // postNews,
-  // delFormData
-} from '@/api/platformManagement'
+  dailyReportGetList,
+  dailyReportDeferEscalation,
+  dailyReportBatchEscalation,
+  dailyReporGetInfo
+} from '@/api/parkReportManagement'
 export default {
   data() {
     return {
-      show : false,
+      show: false,
       tableData: [],
       // 分页
       searchkeyWord: '',
@@ -213,8 +157,8 @@ export default {
       deptCircularPage: {},
       search: '',
       modification: [],
-      orderData: {
-
+      dailyReportData: {
+        // hyFreightSettlementInfo: {}
       },
       value1: '',
       status: '',
@@ -222,39 +166,33 @@ export default {
       disabled: false,
       rejectInfo: false,
       rightSee: false,
-      form: {
-        id: '',
-        checkList: [],
-        rejectReasonDescription: ''
-      }
     }
   },
   mounted() {
     this.getList()
   },
   methods: {
-    // AddRecord() {
-    //   this.$router.push({
-    //     path: 'specifiedRecordsAdd'
-    //   })
-    // },
-
     dateChange(e) {
       this.startDate = e[0]
       this.endDate = e[1]
       this.getList()
     },
     selectInit(row) {
-        if (row.status == '审核中' || row.status == '已通过') {
-          return false
-        } 
-        else {
-          return true
-        }
+      if (row.status == '审核中' || row.status == '已通过') {
+        return false
+      }
+      else {
+        return true
+      }
     },
     handleSelectionChange(val) {
       this.modification = val;
     },
+    //上报
+    submission(row) {
+      this.modification.push(row)
+      this.batchSubmission()
+    },
     //暂缓上报
     postponeSubmission() {
       if (this.modification.length > 0) {
@@ -264,29 +202,21 @@ export default {
           type: 'warning'
         })
           .then(() => {
-            this.listLoading = true
-              // var _del = {}
-              // _del.id = row.id
-              // delFormData(_del)
+            dailyReportDeferEscalation({ hyFreightSettlementInfos: this.modification })
               .then(response => {
-                this.$notify({
-                  title: '成功',
-                  message: '操作成功!',
-                  type: 'success'
-                })
-                this.getList()
-                this.listLoading = false
-              })
-              .catch(() => {
-                this.loading = false
+                if (response.code == 200) {
+                  this.$notify({
+                    title: '成功',
+                    message: '操作成功!',
+                    type: 'success'
+                  })
+                  this.modification = []
+                  this.getList()
+                }
               })
           })
       } else {
-        this.$notify({
-          title: '操作失败',
-          message: '至少选中一条可上报的条目!',
-          type: 'error'
-        })
+        this.$message.error('至少选中一条可上报的条目!')
       }
     },
     //批量上报
@@ -298,115 +228,59 @@ export default {
           type: 'warning'
         })
           .then(() => {
-            this.listLoading = true
-              // var _del = {}
-              // _del.id = row.id
-              // delFormData(_del)
+            dailyReportBatchEscalation({ hyFreightSettlementInfos: this.modification })
               .then(response => {
-                this.$notify({
-                  title: '成功',
-                  message: '上报成功!',
-                  type: 'success'
-                })
-                this.getList()
-                this.listLoading = false
-              })
-              .catch(() => {
-                this.loading = false
+                if (response.code == 200) {
+                  this.$notify({
+                    title: '成功',
+                    message: '上报成功!',
+                    type: 'success'
+                  })
+                  this.modification = []
+                  this.getList()
+                }
               })
           })
       } else {
-        this.$notify({
-          title: '上报失败',
-          message: '至少选中一条可上报的条目!',
-          type: 'error'
-        })
+        this.$message.error('至少选中一条可上报的条目!')
       }
     },
-    //上报
-    submission() {
-      this.$confirm('确定上报运单信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.listLoading = true
-            // var _del = {}
-            // _del.id = row.id
-            // delFormData(_del)
-            .then(response => {
-              this.$notify({
-                title: '成功',
-                message: '上报成功!',
-                type: 'success'
-              })
-              this.getList()
-              this.listLoading = false
-            })
-            .catch(() => {
-              this.loading = false
-            })
-        })
-    },
     getList() {
-      this.loading = true
-      const _obj = {}
-      _obj.currentPage = this.currentPage
-      _obj.pageSize = this.pageSize
-      _obj.searchKeyWord = this.searchkeyWord
-      _obj.searchType = this.search
-      getList(_obj).then(response => {
-        this.tableData = response.data.records
-        this.deptBudgetTotal = response.data.total
-        // if (this.tableData[0].status == '待审核' || this.tableData[0].status == '已驳回') {
-        //   // 最上面一条处于待审核和已驳回时新增按钮置灰不可用
-        //   this.disabled = true
-        // }
-        this.listLoading = false
-      })
-        .catch(() => {
-          this.loading = false
+      this.listLoading = true;
+      let _obj = {};
+      _obj.currentPage = this.currentPage;
+      _obj.pageSize = this.pageSize;
+      _obj.searchKeyWord = this.searchkeyWord;
+      _obj.searchType = this.search;
+      _obj.startDate = this.startDate
+      _obj.endDate = this.endDate
+      dailyReportGetList(_obj)
+        .then((response) => {
+          this.tableData = response.data.records;
+          for (let i = 0; i < this.tableData.length; i++) {
+            this.tableData[i].iconShow = true;
+          }
+          this.deptBudgetTotal = response.data.total;
+          this.listLoading = false;
         })
+        .catch(() => {
+          this.listLoading = false;
+        });
     },
     searchBtn(num) {
       this.search = num;
       this.getList();
     },
-    // del(row) {
-    //   this.$confirm('确定要删除该记录吗?', '提示', {
-    //     confirmButtonText: '确定',
-    //     cancelButtonText: '取消',
-    //     type: 'warning'
-    //   })
-    //     .then(() => {
-    //       this.listLoading = true
-    //       var _del = {}
-    //       _del.id = row.id
-    //       delFormData(_del).then(response => {
-    //         this.$notify({
-    //           title: '成功',
-    //           message: '删除成功!',
-    //           type: 'success'
-    //         })
-    //         this.getList()
-    //         this.listLoading = false
-    //       })
-    //         .catch(() => {
-    //           this.loading = false
-    //         })
-    //     })
-    // },
     find() {
       this.getList()
     },
     look(row) {
       this.loading = true
-      seeData({
+      this.rightSee = true
+      dailyReporGetInfo({
         id: row.id
       }).then(response => {
-        this.orderData = response.data
-        this.rightSee = true
+        this.dailyReportData = response.data
         this.listLoading = false
       })
         .catch(() => {
@@ -749,7 +623,6 @@ export default {
     margin-top: 10px;
   }
 }
-
 .find::v-deep input.el-input__inner {
   border-radius: 0;
 }

+ 109 - 200
src/views/parkReportManagement/waybillReporting.vue

@@ -54,20 +54,27 @@
           </template>
         </el-table-column>
         <el-table-column prop="orderNo" label="订单编号" />
-        <el-table-column prop="compilationUnit" label="发运人" />
-        <el-table-column prop="editor" label="发运人账号" />
-        <el-table-column prop="updateDate" label="承运人" />
-        <el-table-column prop="updateDate" label="承运人账号" />
-        <el-table-column prop="updateDate" label="订单完结时间" />
-        <!-- <el-table-column label="上传" prop="submitter" /> -->
-        <!-- <el-table-column prop="versionDescription" label="版本说明" /> -->
-        <el-table-column prop="status" label="状态" />
+        <el-table-column prop="cargoOwner" label="发运人" />
+        <el-table-column prop="cargoOwnerPhone" label="发运人账号" />
+        <el-table-column prop="driverName" label="承运人" />
+        <el-table-column prop="driverPhone" label="承运人账号" />
+        <el-table-column prop="orderEndDate" label="订单完结时间" />
+        <el-table-column prop="escalationStatus" label="状态">
+          <template slot-scope="scope1">
+            <span>{{scope1.row.escalationStatus}}</span>
+              <el-tooltip class="item" effect="dark" :content="scope1.row.escalationFailureReason" placement="top" v-if="scope1.row.escalationStatus == '未通过'">
+                 <img src="../../../public/img/wenhao.png" alt="" class="ask_css" />
+              </el-tooltip>
+          </template>
+        </el-table-column>
         <el-table-column label="操作" min-width="200">
           <template slot-scope="scope">
             <el-link target="_blank" @click="look(scope.row)" type="primary" :underline="false">查看</el-link>
             <el-divider direction="vertical" />
             <el-link target="_blank" type="primary" :underline="false" @click="submission(scope.row)"
-              v-if="scope.row.search == 1 || scope.row.search == 4 || scope.row.status == '暂缓中'">上报</el-link>
+              :disabled="scope.row.escalationStatus != '未上报' && scope.row.escalationStatus != '未通过' && scope.row.escalationStatus != '暂缓中'">
+              上报</el-link>
+
           </template>
         </el-table-column>
       </el-table>
@@ -78,114 +85,53 @@
 
     <el-drawer title="运单信息" :visible.sync="rightSee" style="overflow-y: auto !important">
       <div class="right_css">
-        <div class="right_item">订单编号:{{ orderData.compilationUnit }}</div>
+        <div class="right_item">订单编号:{{ orderData.orderNo }}</div>
         <div class="right_title">发货时间</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">收货时间</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.hyCarrierInfo.loadingDate }}</div>
+        <div class="right_title" v-if="orderData.hyCarrierInfo.unloadingDate">收货时间</div>
+        <div class="right_item">{{ orderData.hyCarrierInfo.unloadingDate }}</div>
         <div class="right_title">托运方</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.cargoOwner ? orderData.cargoOwner : orderData.compName }}</div>
         <div class="right_title">托运方证件号或信用代码</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">收货方</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item" v-if="orderData.cargoOwnerIdCard">{{ orderData.cargoOwnerIdCard }}</div>
+        <div class="right_item" v-else>{{ orderData.hyCompanyInfo ? orderData.hyCompanyInfo.unifiedSocialCreditCode :
+            "暂无"
+        }}
+        </div>
+        <div class="right_title">收货联系人</div>
+        <div class="right_item">{{ orderData.publishTaskInfo.receiver }}</div>
         <div class="right_title">收货方证件号或信用代码</div>
+        <div class="right_item">{{ orderData.publishTaskInfo.receiverIdcard ? orderData.publishTaskInfo.receiverIdcard :
+            orderData.publishTaskInfo.receiverCreditCode
+        }}</div>
         <div class="right_title">运费</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.freight }}</div>
         <div class="right_title">车牌号</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.carNumber }}</div>
         <div class="right_title">车牌颜色</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.carNumberColour }}</div>
         <div class="right_title">发货地址</div>
         <div class="right_item">
-          {{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{
-              orderData.compilationUnit
+          {{ orderData.sendPrivate }}{{ orderData.sendCity }}{{ orderData.sendArea }}{{
+              orderData.sendDetailedAddress
           }}
         </div>
         <div class="right_title">收货地址</div>
         <div class="right_item">
-          {{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{ orderData.compilationUnit }}{{
-              orderData.compilationUnit
+          {{ orderData.unloadPrivate }}{{ orderData.unloadCity }}{{ orderData.unloadArea }}{{
+              orderData.unloadDetailedAddress
           }}
         </div>
         <div class="right_title">司机姓名</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.driverName }}</div>
         <div class="right_title">司机身份证号</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.driverIdCard }}</div>
         <div class="right_title">货物类别</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.goodsType }}</div>
         <div class="right_title">货名</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
+        <div class="right_item">{{ orderData.goodsName }}</div>
         <div class="right_title">重量(kg)</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-
-        <!-- <div class="right_title">发货联系人</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div>
-        <div class="right_title">发货联系人电话</div>
-        <div class="right_item">{{ orderData.compilationUnit }}</div> -->
-        <!-- <div class="right_title">距离</div>
-        <div class="right_item">约{{ orderData.compilationUnit ? orderData.compilationUnit : 0 }}km</div> -->
-        <!-- <el-divider v-if="orderData.compilationUnit"></el-divider>
-        <div v-if="orderData.compilationUnit">
-          <div class="title_name">承运信息</div>
-          <div class="right_title">承运合同编号</div>
-          <div class="right_item">{{orderData.compilationUnit}}</div>
-          <div class="right_title">委托合同编号</div>
-          <div class="right_item">{{orderData.compilationUnit}}</div>
-          <div class="right_title">车牌号</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.carNo}}</div>
-          <div class="right_title">预计运费</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.estimatedFreight}}</div>
-          <div class="right_title">装车时间</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.loadingDate}}</div>
-          <div class="right_title">装车定位</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.loadingCity}}{{orderData.hyCarrierInfo.loadingArea}}</div>
-          <div class="right_title">装车照片</div>
-          <div style="display: flex;" v-if="orderData.hyCarrierInfo.loadingImg">
-            <div v-for="(item,index) in orderData.hyCarrierInfo.loadingImg.split(',')" :key="index">
-              <img :src="item" class="img_css" @click="enlarge(item)">
-            </div>
-          </div>
-          <div class="right_title" v-if="orderData.hyCarrierInfo.totalFreight">合计应付运费</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.totalFreight}}</div>
-          <div class="right_title" v-if="orderData.hyCarrierInfo.unloadingDate">卸车时间</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.unloadingDate}}</div>
-          <div class="right_title">卸车定位</div>
-          <div class="right_item">{{orderData.hyCarrierInfo.unloadingCity}}{{orderData.hyCarrierInfo.unloadingArea}}</div>
-          <div class="right_title" v-if="orderData.hyCarrierInfo.unloadingImg">卸车照片</div>
-          <div style="display: flex;" v-if="orderData.hyCarrierInfo.unloadingImg">
-            <div v-for="(item,index) in orderData.hyCarrierInfo.unloadingImg.split(',')" :key="index">
-              <img :src="item" class="img_css" @click="enlarge(item)">
-            </div>
-          </div>
-        </div> -->
-        <!-- <el-divider v-if="orderData.freightInfo"></el-divider>
-        <div v-if="orderData.freightInfo">
-          <div class="title_name">运费信息(单位:元)</div>
-          <div class="right_title">预付运费</div>
-          <div class="right_item">{{orderData.freightInfo.prepaidFreight}} <span
-              style="margin-left: 100px;">{{orderData.freightInfo.prepaidFreightDate}}</span></div>
-          <div class="right_title">运费尾款</div>
-          <div class="right_item">{{orderData.freightInfo.freightBalance?orderData.freightInfo.freightBalance:'未支付'}}
-            <span style="margin-left: 100px;">{{orderData.freightInfo.freightBalanceDate}}</span></div>
-          <div class="right_title" v-if="orderData.freightInfo.freightBalance">明细</div>
-          <div class="right_item" v-if="orderData.freightInfo.freightBalance">
-            预付{{orderData.freightInfo.prepaidFreight ? orderData.freightInfo.prepaidFreight : 0}}元,服务费{{orderData.freightInfo.driverServiceCharge ? orderData.freightInfo.driverServiceCharge:0}}元,尾款{{orderData.freightInfo.freightBalance ? orderData.freightInfo.freightBalance:0}}元,合计收款{{orderData.freightInfo.totalCollection ? orderData.freightInfo.totalCollection:0}}元。
-          </div>
-        </div> -->
-        <!-- <el-divider v-if="orderData.repaymentInfo"></el-divider> -->
-        <!-- <div v-if="orderData.repaymentInfo">
-          <div class="title_name">还款信息</div>
-          <div class="right_title">运费</div>
-          <div class="right_item">{{orderData.freight}}</div>
-          <div class="right_title">超期费(每天3%)</div>
-          <div class="right_item">{{orderData.repaymentInfo.overdueFee}}</div>
-          <div class="right_title">合计应还</div>
-          <div class="right_item">{{orderData.repaymentInfo.totalRepayable}}</div>
-          <div class="right_title">还款(尾号6666)</div>
-          <div class="right_item">{{orderData.repaymentInfo.alreadyRepaid}}</div>
-        </div> -->
+        <div class="right_item">{{ orderData.publishTaskInfo.weight }}</div>
         <div class="right_btn">
           <el-button @click="rightSee = false">关闭</el-button>
         </div>
@@ -195,12 +141,11 @@
 </template>
 <script>
 import {
-  getList,
-  seeData,
-  // toExamine,
-  // postNews,
-  // delFormData
-} from '@/api/platformManagement'
+  waybillGetList,
+  waybillGetInfo,
+  deferEscalation,
+  batchEscalation
+} from '@/api/parkReportManagement'
 export default {
   data() {
     return {
@@ -214,30 +159,26 @@ export default {
       search: '',
       modification: [],
       orderData: {
-
+        publishTaskInfo: {},
+        hyCarrierInfo: {},
+        hyCargoOwnerInfo: {},
+        hyCompanyInfo: {}
       },
       value1: '',
       status: '',
-      addressUrl: [],
       disabled: false,
       rejectInfo: false,
+      //侧边查看
       rightSee: false,
-      form: {
-        id: '',
-        checkList: [],
-        rejectReasonDescription: ''
-      }
+      //筛选时间
+      startDate: '',
+      endDate: '',
     }
   },
   mounted() {
     this.getList()
   },
   methods: {
-    // AddRecord() {
-    //   this.$router.push({
-    //     path: 'specifiedRecordsAdd'
-    //   })
-    // },
     handleSelectionChange(val) {
       this.modification = val;
     },
@@ -246,6 +187,11 @@ export default {
       this.endDate = e[1]
       this.getList()
     },
+    //上报
+    submission(row) {
+      this.modification.push(row)
+      this.batchSubmission()
+    },
     //暂缓上报
     postponeSubmission() {
       if (this.modification.length > 0) {
@@ -255,29 +201,21 @@ export default {
           type: 'warning'
         })
           .then(() => {
-            this.listLoading = true
-              // var _del = {}
-              // _del.id = row.id
-              // delFormData(_del)
+            deferEscalation({ orderInfoList: this.modification })
               .then(response => {
-                this.$notify({
-                  title: '成功',
-                  message: '操作成功!',
-                  type: 'success'
-                })
-                this.getList()
-                this.listLoading = false
-              })
-              .catch(() => {
-                this.loading = false
+                if (response.code == 200) {
+                  this.$notify({
+                    title: '成功',
+                    message: '操作成功!',
+                    type: 'success'
+                  })
+                  this.modification = []
+                  this.getList()
+                }
               })
           })
       } else {
-        this.$notify({
-          title: '失败',
-          message: '至少选中一条可上报的条目!',
-          type: 'error'
-        })
+        this.$message.error('至少选中一条可上报的条目!')
       }
     },
     //批量上报
@@ -289,79 +227,51 @@ export default {
           type: 'warning'
         })
           .then(() => {
-            this.listLoading = true
-              // var _del = {}
-              // _del.id = row.id
-              // delFormData(_del)
+            batchEscalation({ orderInfoList: this.modification })
               .then(response => {
-                this.$notify({
-                  title: '成功',
-                  message: '上报成功!',
-                  type: 'success'
-                })
-                this.getList()
-                this.listLoading = false
-              })
-              .catch(() => {
-                this.loading = false
+                if (response.code == 200) {
+                  this.$notify({
+                    title: '成功',
+                    message: '上报成功!',
+                    type: 'success'
+                  })
+                  this.modification = []
+                  this.getList()
+                }
               })
           })
       } else {
-        this.$notify({
-          title: '上报失败',
-          message: '至少选中一条可上报的条目!',
-          type: 'error'
-        })
+        this.$message.error('至少选中一条可上报的条目!')
       }
     },
-    //上报
-    submission() {
-      this.$confirm('确定上报运单信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.listLoading = true
-            // var _del = {}
-            // _del.id = row.id
-            // delFormData(_del)
-            .then(response => {
-              this.$notify({
-                title: '成功',
-                message: '上报成功!',
-                type: 'success'
-              })
-              this.getList()
-              this.listLoading = false
-            })
-            .catch(() => {
-              this.loading = false
-            })
-        })
-    },
     selectInit(row) {
-       if (row.status == '审核中' || row.status == '已通过') {
-          return false
-        } else {
-          return true
-        }
+      if (row.status == '审核中' || row.status == '已通过') {
+        return false
+      } else {
+        return true
+      }
     },
     getList() {
-      this.loading = true
-      const _obj = {}
-      _obj.currentPage = this.currentPage
-      _obj.pageSize = this.pageSize
-      _obj.searchKeyWord = this.searchkeyWord
-      _obj.searchType = this.search
-      getList(_obj).then(response => {
-        this.tableData = response.data.records
-        this.deptBudgetTotal = response.data.total
-        this.listLoading = false
-      })
-        .catch(() => {
-          this.loading = false
+      this.listLoading = true;
+      let _obj = {};
+      _obj.currentPage = this.currentPage;
+      _obj.pageSize = this.pageSize;
+      _obj.searchKeyWord = this.searchkeyWord;
+      _obj.searchType = this.search;
+      _obj.startDate = this.startDate
+      _obj.endDate = this.endDate
+      waybillGetList(_obj)
+        .then((response) => {
+          this.tableData = response.data.records;
+          for (let i = 0; i < this.tableData.length; i++) {
+            this.tableData[i].iconShow = true;
+          }
+          this.deptBudgetTotal = response.data.total;
+          this.listLoading = false;
         })
+        .catch(() => {
+          this.listLoading = false;
+        });
     },
     searchBtn(num) {
       this.search = num;
@@ -372,11 +282,11 @@ export default {
     },
     look(row) {
       this.loading = true
-      seeData({
+      this.rightSee = true
+      waybillGetInfo({
         id: row.id
       }).then(response => {
         this.orderData = response.data
-        this.rightSee = true
         this.listLoading = false
       })
         .catch(() => {
@@ -719,7 +629,6 @@ export default {
     margin-top: 10px;
   }
 }
-
 .find::v-deep input.el-input__inner {
   border-radius: 0;
 }

+ 2 - 2
src/views/settlementManagement/advancePaymentAndRepaymentSettlement.vue

@@ -50,7 +50,7 @@
         <el-table-column prop="cargoOwnerName" label="货主" />
          <el-table-column prop="accountNumber" label="账号" />
         <el-table-column prop="affiliatedEnterprise" label="所属企业" />
-        <el-table-column prop="updateDate" label="垫付金额(元)" />
+        <el-table-column prop="padmoney" label="垫付金额(元)" />
         <el-table-column prop="overdueFee" label="超期金额(元)" />
         <el-table-column prop="totalRepayable" label="合计应还(元)" />
         <el-table-column prop="alreadyRepaid" label="已还金额(元)" />
@@ -85,7 +85,7 @@ import {
         pageSize: 10,
         deptBudgetTotal: 0,
         deptCircularPage: {},
-        search: '',
+        search: '1',
         disabled: false,
       }
     },

+ 167 - 14
src/views/settlementManagement/driverFeeSettlement.vue

@@ -5,7 +5,7 @@
         <el-row>
           <el-col :span="14">
           <el-button type="primary" @click="deferPay">暂缓支付</el-button>
-          <el-button type="primary" @click="batchpayment">批量付款</el-button>
+          <!-- <el-button type="primary" @click="batchpayment">批量付款</el-button> -->
           <el-date-picker class='date' v-model="value1" value-format="yyyy-MM-dd" @change="dateChange" type="daterange"
               range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
           </el-date-picker>
@@ -51,28 +51,33 @@
                 <!-- <span v-else>{{scope.$index}}</span> -->
             </template>
         </el-table-column>
-        <el-table-column prop="orderNo" label="订单编号" >
+        <el-table-column min-width="100" prop="orderNo" label="订单编号" >
           <template scope="scope">
-              <span>{{scope.row.orderNo}}</span>
-              <span class="pad_css" v-if="scope.row.freightAdvance == '1'">垫</span>
-            </template>
+            <span>{{scope.row.orderNo}}</span>
+            <span class="pad_css" v-if="scope.row.freightAdvance == '1'">垫</span>
+          </template>
         </el-table-column>
         <el-table-column prop="driverName" label="司机姓名" />
-         <el-table-column prop="issuingDate" label="开户行" >
-            <template scope="scope">
-              <span>{{scope.row.bankDeposit}}-{{scope.row.bankDepositBranch}}</span>
-            </template>
+        <el-table-column min-width="160" prop="issuingDate" label="开户行" >
+          <template scope="scope">
+            <span>{{scope.row.bankDeposit}}-{{scope.row.bankDepositBranch}}</span>
+          </template>
         </el-table-column>
         <el-table-column prop="bankCard" label="银行卡号" />
         <el-table-column prop="paymentType" label="付款类型" />
         <el-table-column prop="amountMoney" label="金额(元)" />
         <el-table-column prop="paymentDate" label="付款时间" />
+        <el-table-column prop="paymentDate" label="支付凭证" >
+          <template scope="scope">
+            <el-link v-if='scope.row.paymentVoucher' target="_blank" type="primary" :underline="false" @click="paymentVoucher(scope.row)">查看</el-link>
+          </template>
+        </el-table-column>
         <el-table-column prop="status" label="状态" >
           <template scope="scope">
             <span>{{scope.row.status}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" min-width="300">
+        <el-table-column label="操作" min-width="50">
           <template slot-scope="scope">
             <el-link v-if='scope.row.status!="已付款"' target="_blank" type="primary" :underline="false" @click="payment(scope.row)">付款</el-link>
           </template>
@@ -82,9 +87,49 @@
     <el-pagination :current-page="currentPage" style="text-align: center; margin-top: 10px"
       :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"
       @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+    <el-dialog :close-on-click-modal='false' title="支付凭证" :visible.sync="fujianInfo" width="830px" :before-close="fujianClose">
+      <div class="file_img">
+        <img :src="file.paymentVoucher" class="img_css" @click="enlarge(file.paymentVoucher)" />
+      </div>
+    </el-dialog>
+    <el-dialog :close-on-click-modal='false' :title="title" :visible.sync="paymentshow" width="830px" :before-close="paymentshowClose">
+      <div>
+        <el-form ref="form" auto-complete="on" :model="currectdata" :rules="Rules" label-width="100px">
+          <el-form-item label="收款人">
+            {{currectdata.driverName}}
+          </el-form-item>
+          <el-form-item label="卡号">
+           {{currectdata.bankCard}}
+          </el-form-item>
+          <el-form-item label="金额">
+           {{currectdata.amountMoney}}
+          </el-form-item>
+
+          <el-form-item label="流水号" prop='serialNumber'>
+            <el-input placeholder="输入流水号" v-model="currectdata.serialNumber"></el-input>
+            <!-- <el-input type="textarea" v-model="currectdata.serialNumber"></el-input> -->
+          </el-form-item>
+          <el-form-item label="支付凭证" prop='paymentVoucher'>
+            <el-upload ref='upload' class="avatar-uploader" :action="uploadPath" :show-file-list="false"
+              :on-success="uploadSuccess">
+              <img v-if="currectdata.paymentVoucher" :src="currectdata.paymentVoucher" class="avatar">
+              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            </el-upload>
+            <!-- <el-input type="textarea" v-model="currectdata.serialNumber"></el-input> -->
+          </el-form-item>
+          <div class="btn">
+            <el-button @click="paymentsubmit">提交</el-button>
+          </div>
+        </el-form>
+      </div>
+      
+    </el-dialog>
   </div>
 </template>
 <script>
+  import {
+    uploadPath
+  } from '@/api/officialWebsiteManagement'
 import {
   getListdriverfreight,
   deferpay,
@@ -93,6 +138,7 @@ import {
   export default {
     data() {
       return {
+        uploadPath,
         startDate: '',
         endDate: '',
          value1: '',
@@ -103,10 +149,36 @@ import {
         pageSize: 10,
         deptBudgetTotal: 0,
         deptCircularPage: {},
+        Rules: {
+          serialNumber: [{
+              required: true,
+              message: "请输入流水号",
+              trigger: "blur",
+            },
+            {
+              min: 6,
+              max: 30,
+              message: "流水号输入错误",
+              trigger: "blur",
+            },
+          ],
+          paymentVoucher: [{
+              required: true,
+              type:'string',
+              message: "支付凭证不能为空",
+              trigger: "change",
+            }
+          ],
+        },
         multipleSelection:[],
         search: 1,
         searchType:'1',
+        file:{},
+        title:'',
         disabled: false,
+        fujianInfo:false,
+        paymentshow:false,
+        currectdata:{}
       }
     },
     mounted() {
@@ -114,6 +186,16 @@ import {
       this.getList()
     },
     methods: {
+      fujianClose(){
+        this.fujianInfo=false
+      },
+      uploadSuccess(res) {
+        console.log(res.data)
+        this.currectdata.paymentVoucher=res.data.url
+      },
+      paymentshowClose(){
+        this.paymentshow=false
+      },
       checkSelectable(row) {
         if(row.status!='已付款'){
           return true
@@ -190,6 +272,10 @@ import {
         }
        
       },
+      paymentVoucher(row){
+        this.file=row
+        this.fujianInfo=true
+      },
       batchpayment(){
         if(this.multipleSelection.length>0){
           var money=0
@@ -230,29 +316,73 @@ import {
           })
         }
       },
-      payment(row){
-        this.$confirm(`确定支付${row.driverName}运费${row.amountMoney}元?`, '提示', {
+      // payment(row){
+      //   this.$confirm(`确定支付${row.driverName}运费${row.amountMoney}元?`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //     .then(() => {
+      //       this.listLoading = true
+      //       var _obj = {}
+      //       _obj.hyFreightSettlementInfos = [row]
+      //       batchpay(_obj).then(response => {
+      //           this.$notify({
+      //             title: '成功',
+      //             message: '支付成功!',
+      //             type: 'success'
+      //           })
+      //           this.getList()
+      //           this.listLoading = false
+      //         })
+      //         .catch(() => {
+      //           this.loading = false
+      //         })
+      //     })
+      // },
+      paymentsubmit(){
+        this.$refs.form.validate(async (valid) => {
+          if (valid) {
+          this.$confirm(`确定提交付款信息?`, '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
           })
           .then(() => {
+            this.paymentshow=false
             this.listLoading = true
             var _obj = {}
-            _obj.hyFreightSettlementInfos = [row]
+            _obj.hyFreightSettlementInfos = [this.currectdata]
             batchpay(_obj).then(response => {
                 this.$notify({
                   title: '成功',
-                  message: '支付成功!',
+                  message: '提交成功!',
                   type: 'success'
                 })
+                this.$refs.upload.clearFiles();
                 this.getList()
                 this.listLoading = false
               })
               .catch(() => {
+                // this.$notify({
+                //   title: '失败',
+                //   message: '提交失败!',
+                //   type: 'error'
+                // })
+                this.$refs.upload.clearFiles();
                 this.loading = false
               })
           })
+          }else {
+            console.log('error submit!!');
+            return false;
+          }
+        })
+      },
+      payment(row){
+        this.title='支付'+row.paymentType
+        this.currectdata=row
+        this.paymentshow=true
       },
       handleSelectionChange(val) {
         this.multipleSelection = val;
@@ -582,4 +712,27 @@ import {
     padding: 2px;
     margin-left: 10px;
   }
+  .avatar-uploader::v-deep .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+  }
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
 </style>

+ 126 - 77
src/views/settlementManagement/statisticalReport.vue

@@ -5,9 +5,9 @@
         <div style='position:absolute;z-index:999;right:0;width:100%;'>
           <div class='title'>毛利润(万元)</div>
           <div class="right" style='position:absolute;right:4%;'>
-            <el-button :class='{"active":status==1}' @click='statuschange(1)' type="text">按天</el-button>
-            <el-button :class='{"active":status==2}' @click='statuschange(2)' type="text">按月</el-button>
-            <el-button :class='{"active":status==3}' @click='statuschange(3)' type="text">按年</el-button>
+            <el-button :class='{"active":search==1}' @click='statuschange(1)' type="text">按天</el-button>
+            <el-button :class='{"active":search==2}' @click='statuschange(2)' type="text">按月</el-button>
+            <el-button :class='{"active":search==3}' @click='statuschange(3)' type="text">按年</el-button>
           </div>
           
           <!-- <el-button type="primary">按天</el-button>
@@ -20,7 +20,7 @@
         <div calss='table-top' style='width:95%;margin:10px auto 30px;display:flex;justify-content: space-between;align-items: center;'>
           <el-date-picker v-model="value1" type="year" placeholder="选择年"></el-date-picker>
           <div>
-            合计
+            合计{{tabledata.total}}万元
             <span class="svg-container">
               <svg-icon @click='showchange' :icon-class="show?'eye':'eye-open'" />
             </span>
@@ -33,22 +33,22 @@
               利润(万元)
             </el-form-item>
             <el-form-item label="1月">
-              利润(万元)
+              {{show?tabledata.jan:'******'}}
             </el-form-item>
             <el-form-item label="2月">
-              利润(万元)
+              {{show?tabledata.feb:'******'}}
             </el-form-item>
             <el-form-item label="3月">
-              利润(万元)
+              {{show?tabledata.mar:'******'}}
             </el-form-item>
             <el-form-item label="4月">
-              利润(万元)
+              {{show?tabledata.apr:'******'}}
             </el-form-item>
             <el-form-item label="5月">
-              利润(万元)
+              {{show?tabledata.may:'******'}}
             </el-form-item>
             <el-form-item label="6月">
-              利润(万元)
+              {{show?tabledata.june:'******'}}
             </el-form-item>
           </div>
           
@@ -57,117 +57,153 @@
               利润(万元)
             </el-form-item>
             <el-form-item label="7月">
-              利润(万元)
+              {{show?tabledata.july:'******'}}
             </el-form-item>
             <el-form-item label="8月">
-              利润(万元)
+              {{show?tabledata.aug:'******'}}
             </el-form-item>
             <el-form-item label="9月">
-              利润(万元)
+              {{show?tabledata.sept:'******'}}
             </el-form-item>
             <el-form-item label="10月">
-              利润(万元)
+              {{show?tabledata.oct:'******'}}
             </el-form-item>
             <el-form-item label="11月">
-              利润(万元)
+              {{show?tabledata.nov:'******'}}
             </el-form-item>
             <el-form-item label="12月">
-              利润(万元)
+              {{show?tabledata.dece:'******'}}
             </el-form-item>
           </div>
       </el-form>
       </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 {
-  getListwithdrawal
+  getListselectProfit,
+  getListexpenses
 } from '@/api/settlementManagement'
 export default {
   name: 'hello',
   data () {
     return {
       formInline:{},
+      tabledata:{},
+      linexaxis:[],
+      linedata:[],
+      barList:[],
       status:1,
-      value1:'',
-      show:true
+      value1:'2022',
+      show:true,
+      search:'1'
     }
   },
   mounted(){//⭐在mounted中定义
+
     this.drawLine();
     this.drawBar()
   },
   methods: {
     statuschange(status){
-      this.status=status
+      this.search=status
+      this.drawLine();
     },
     showchange(){
-      console.log(11111)
+      this.show=!this.show
     },
     drawLine(){
-      // 基于准备好的dom,初始化echarts实例
-      console.log(this.$echarts)
-      var echart = this.$echarts.init(document.getElementById("container"))//⭐注意是id选择器
-		  var option = {
-        xAxis: {
-          type: 'category',
-          boundaryGap: false,
-          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
-          axisLine:{
-            show:false
-          },
-          axisTick:{
-            show:false
-          },
-          axisLabel:{
-            color:'#9E9E9E'
-          }
-        },
-        yAxis: {
-          type: 'value',
-          // name:'毛利润(万元)',
-          nameTextStyle:{
-            fontWeight:'700',
-            fontSize:'16'
-          },
-          axisLine:{
-            show:false
-          },
-          axisTick:{
-            show:false
-          },
-          axisLabel:{
-            color:'#9E9E9E'
-          }
-        },
-        series: [
-          {
-            
-            lineStyle: {
-              color:'#2F53EB'
-            },
-            data: [150, 230, 224, 218, 135, 147, 260],
-            type: 'line',
-            areaStyle: {
-              color:'rgba(207, 219, 254, 1)'
+      var that=this
+      this.linexaxis=[]
+      this.linedata=[]
+      const _obj = {}
+        _obj.year= this.value1
+        _obj.searchType = this.search
+        getListselectProfit(_obj).then(response => {
+          this.tabledata=response.data.formList[0]
+          if(response.data.dataList.length>0){
+            for (let i = 0; i < response.data.dataList.length; i++) {
+              this.linexaxis.unshift(response.data.dataList[i].date)
+              this.linedata.unshift(response.data.dataList[i].profit)
             }
           }
-        ],
-        grid: {
-          left: '3%',
-          right: '4%',
-          bottom: '3%',
-          containLabel: true
-        },
-      };
-      echart.setOption(option);
+           var echart = that.$echarts.init(document.getElementById("container"))//⭐注意是id选择器
+            var option = {
+              xAxis: {
+                type: 'category',
+                boundaryGap: false,
+                data: that.linexaxis,
+                axisLine:{
+                  show:false
+                },
+                axisTick:{
+                  show:false
+                },
+                axisLabel:{
+                  color:'#9E9E9E'
+                }
+              },
+              yAxis: {
+                type: 'value',
+                // name:'毛利润(万元)',
+                nameTextStyle:{
+                  fontWeight:'700',
+                  fontSize:'16'
+                },
+                axisLine:{
+                  show:false
+                },
+                axisTick:{
+                  show:false
+                },
+                axisLabel:{
+                  color:'#9E9E9E'
+                }
+              },
+              series: [
+                {
+                  
+                  lineStyle: {
+                    color:'#2F53EB'
+                  },
+                  data: that.linedata,
+                  type: 'line',
+                  areaStyle: {
+                    color:'rgba(207, 219, 254, 1)'
+                  }
+                }
+              ],
+              grid: {
+                left: '3%',
+                right: '4%',
+                bottom: '3%',
+                containLabel: true
+              },
+            };
+            echart.setOption(option);
+          })
+          .catch(() => {
+            this.loading = false
+          })
+      // 基于准备好的dom,初始化echarts实例
+      console.log(this.$echarts)
+     
     },
     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: {
@@ -223,7 +259,7 @@ export default {
           {
 
             type: 'bar',
-            data: [18203, 23489, 29034, 104970],
+            data: that.barList,
             itemStyle: {
               normal: {
                 // 每根柱子颜色设置
@@ -253,6 +289,9 @@ export default {
         ]
       };
       echart1.setOption(option1);
+      }).catch(() => {
+            this.loading = false
+          })
     }
   }
 }
@@ -287,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;
@@ -309,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>