浏览代码

渠道通过此接口可以查询当前交易对应的申请记录;前端

mashengyi 2 年之前
父节点
当前提交
2f58c367e5
共有 3 个文件被更改,包括 676 次插入295 次删除
  1. 107 104
      src/router/index.js
  2. 195 191
      src/views/Home.vue
  3. 374 0
      src/views/selfCar/tradeCarApply.vue

+ 107 - 104
src/router/index.js

@@ -1,151 +1,154 @@
-import Vue from 'vue';
-import Router from 'vue-router';
+import Vue from 'vue'
+import Router from 'vue-router'
 
-import { Message } from 'element-ui';
+import { Message } from 'element-ui'
 
-const Login = () => import('@/views/Login');
-const Home = () => import('@/views/Home');
+const Login = () => { return import(`@/views/Login`) }
+const Home = () => { return import(`@/views/Home`) }
 // 首页
-const Main = () => import('@/views/main/main');
+const Main = () => { return import(`@/views/main/main`) }
 
 // 个人中心
-const Personal = () => import('@/views/personal/personal');
+const Personal = () => { return import(`@/views/personal/personal`) }
 
 // 充值记录
-const customerRechargeMoney = () => import('@/views/customerRechargeMoney/customerRechargeMoney');
+const customerRechargeMoney = () => { return import(`@/views/customerRechargeMoney/customerRechargeMoney`) }
 
 // 个人中心
-const Customer = () => import('@/views/customer/Customer');
-const CustomerRecharge = () => import('@/views/customer/customerRecharge');
-const custRecTime = () => import('@/views/customer/custRecTime');
-const custRecMoney = () => import('@/views/customer/custRecMoney');
+const Customer = () => { return import(`@/views/customer/Customer`) }
+const CustomerRecharge = () => { return import(`@/views/customer/customerRecharge`) }
+const custRecTime = () => { return import(`@/views/customer/custRecTime`) }
+const custRecMoney = () => { return import(`@/views/customer/custRecMoney`) }
 
-const customerEtcChangeInfo = () => import('@/views/customer/customerEtcChangeInfo');
+const customerEtcChangeInfo = () => { return import(`@/views/customer/customerEtcChangeInfo`) }
 
 // 系统管理部分
-const User = () => import('@/views/sys/user');
+const User = () => { return import(`@/views/sys/user`) }
 
 // 无车部分
-const nocarRec = () => import('@/views/noCar/nocarRec.vue');
-const billway = () => import('@/views/noCar/billway.vue');
-const nocarInvoice = () => import('@/views/noCar/invoice.vue');
-const billwayException = () => import('@/views/noCar/billwayException.vue');
-const noCarCalculateInfo = () => import('@/views/noCar/calculateInfo.vue');
-const noCarCalculateInfoStatis = () => import('@/views/noCar/calculateInfostatis.vue');
-const hcInvoice = () => import('@/views/noCar/hcInvoice.vue');
-const mothaccount = () => import('@/views/noCar/mothaccount.vue');
+const nocarRec = () => { return import(`@/views/noCar/nocarRec.vue`) }
+const billway = () => { return import(`@/views/noCar/billway.vue`) }
+const nocarInvoice = () => { return import(`@/views/noCar/invoice.vue`) }
+const billwayException = () => { return import(`@/views/noCar/billwayException.vue`) }
+const noCarCalculateInfo = () => { return import(`@/views/noCar/calculateInfo.vue`) }
+const noCarCalculateInfoStatis = () => { return import(`@/views/noCar/calculateInfostatis.vue`) }
+const hcInvoice = () => { return import(`@/views/noCar/hcInvoice.vue`) }
+const mothaccount = () => { return import(`@/views/noCar/mothaccount.vue`) }
 // 自有车部分
 
-const selfcarRec = () => import('@/views/selfCar/selfcarRec.vue');
-const selfCarTrade = () => import('@/views/selfCar/selfCarTrade.vue');
-const selfInvoice = () => import('@/views/selfCar/invoice.vue');
-const selfCarTradeException = () => import('@/views/selfCar/selfCarTradeException.vue');
-const SelfCalculateInfo = () => import('@/views/selfCar/calculateInfo.vue');
-const selfCarApply = () => import('@/views/selfCar/selfCarApply');
+const selfcarRec = () => { return import(`@/views/selfCar/selfcarRec.vue`) }
+const selfCarTrade = () => { return import(`@/views/selfCar/selfCarTrade.vue`) }
+const selfInvoice = () => { return import(`@/views/selfCar/invoice.vue`) }
+const selfCarTradeException = () => { return import(`@/views/selfCar/selfCarTradeException.vue`) }
+const SelfCalculateInfo = () => { return import(`@/views/selfCar/calculateInfo.vue`) }
+const selfCarApply = () => { return import(`@/views/selfCar/selfCarApply`) }
+const tradeCarApply = () => { return import(`@/views/selfCar/tradeCarApply`) }
+
 // 平台菜单部分
 
 // 发票管理部分(企业注册部分)
-const Check = () => import('@/views/platform/check/check');
+const Check = () => { return import(`@/views/platform/check/check`) }
 // 自有车
-const Apply = () => import('@/views/platform/apply/apply');
-const Already = () => import('@/views/platform/apply/already');
-const Packaging = () => import('@/views/platform/apply/packaging');
-const selfCarTradeP = () => import('@/views/platform/apply/selfCarTrade');
+const Apply = () => { return import(`@/views/platform/apply/apply`) }
+const Already = () => { return import(`@/views/platform/apply/already`) }
+const Packaging = () => { return import(`@/views/platform/apply/packaging`) }
+const selfCarTradeP = () => { return import(`@/views/platform/apply/selfCarTrade`) }
 
-const Carbinding = () => import('@/views/platform/carbinding/carbinding');
-const Carbindinglist = () => import('@/views/platform/carbinding/carbindinglist');
+const Carbinding = () => { return import(`@/views/platform/carbinding/carbinding`) }
+const Carbindinglist = () => { return import(`@/views/platform/carbinding/carbindinglist`) }
 
-const Carupload = () => import('@/views/platform/car/carupload');
-const Carsuccess = () => import('@/views/platform/car/carsuccess');
+const Carupload = () => { return import(`@/views/platform/car/carupload`) }
+const Carsuccess = () => { return import(`@/views/platform/car/carsuccess`) }
 
-const Waybill = () => import('@/views/platform/waybill/waybill');
-const Over = () => import('@/views/platform/waybill/over');
-const History = () => import('@/views/platform/waybill/history');
+const Waybill = () => { return import(`@/views/platform/waybill/waybill`) }
+const Over = () => { return import(`@/views/platform/waybill/over`) }
+const History = () => { return import(`@/views/platform/waybill/history`) }
 
-const WaybillList = () => import('@/views/platform/waybillmanagement/waybillList');
-const Noinvoice = () => import('@/views/platform/waybillmanagement/noinvoice');
-const Trueinvoice = () => import('@/views/platform/waybillmanagement/trueinvoice');
+const WaybillList = () => { return import(`@/views/platform/waybillmanagement/waybillList`) }
+const Noinvoice = () => { return import(`@/views/platform/waybillmanagement/noinvoice`) }
+const Trueinvoice = () => { return import(`@/views/platform/waybillmanagement/trueinvoice`) }
 
-const Invoice = () => import('@/views/platform/invoice/invoice');
-const List = () => import('@/views/platform/invoice/list');
+const Invoice = () => { return import(`@/views/platform/invoice/invoice`) }
+const List = () => { return import(`@/views/platform/invoice/list`) }
 // 参数管理
-const paramMagager = () => import('@/views/manager/paramMagager.vue');
+const paramMagager = () => { return import(`@/views/manager/paramMagager.vue`) }
 
-Vue.use(Router);
+Vue.use(Router)
 
 const router = new Router({
-  base: '/jkcredit/',
-  mode: 'history',
+  base: `/jkcredit/`,
+  mode: `history`,
   routes: [
-    { name: 'Login', path: '/login', component: Login },
+    { name: `Login`, path: `/login`, component: Login },
     {
-      name: 'Home',
-      path: '/',
+      name: `Home`,
+      path: `/`,
       component: Home,
-      redirect: '/main',
+      redirect: `/main`,
       children: [
         // 首页
-        { name: 'Main', path: '/main', component: Main },
+        { name: `Main`, path: `/main`, component: Main },
         // 个人中心
-        { name: 'Personal', path: '/personal', component: Personal },
+        { name: `Personal`, path: `/personal`, component: Personal },
         // 充值记录
-        { name: 'customerRechargeMoney', path: '/customerRechargeMoney', component: customerRechargeMoney },
+        { name: `customerRechargeMoney`, path: `/customerRechargeMoney`, component: customerRechargeMoney },
 
         // 客户管理
-        { name: 'Customer', path: '/customer', component: Customer },
-        { name: 'customerRecharge', path: '/CustomerRecharge', component: CustomerRecharge },
-        { name: 'custRecTime', path: '/custRecTime', component: custRecTime },
-        { name: 'custRecMoney', path: '/custRecMoney', component: custRecMoney },
-        { name: 'customerEtcChangeInfo', path: '/customerEtcChangeInfo', component: customerEtcChangeInfo },
-        { name: 'selfCarApply', path: '/selfCarApply', component: selfCarApply },
+        { name: `Customer`, path: `/customer`, component: Customer },
+        { name: `customerRecharge`, path: `/CustomerRecharge`, component: CustomerRecharge },
+        { name: `custRecTime`, path: `/custRecTime`, component: custRecTime },
+        { name: `custRecMoney`, path: `/custRecMoney`, component: custRecMoney },
+        { name: `customerEtcChangeInfo`, path: `/customerEtcChangeInfo`, component: customerEtcChangeInfo },
+        { name: `selfCarApply`, path: `/selfCarApply`, component: selfCarApply },
+        { name: `tradeCarApply`, path: `/tradeCarApply`, component: tradeCarApply },
         // 系统管理部分
-        { name: 'User', path: '/user', component: User },
+        { name: `User`, path: `/user`, component: User },
         // 无车部分
-        { name: 'nocarRec', path: '/nocarRec', component: nocarRec },
-        { name: 'billway', path: '/billway', component: billway },
-        { name: 'nocarInvoice', path: '/nocarInvoice', component: nocarInvoice },
-        { name: 'billwayException', path: '/billwayException', component: billwayException },
-        { name: 'noCarCalculateInfo', path: '/noCarCalculateInfo', component: noCarCalculateInfo },
-        { name: 'noCarCalculateInfoStatis', path: '/noCarCalculateInfoStatis', component: noCarCalculateInfoStatis },
-
-        { name: 'hcInvoice', path: '/hcInvoice', component: hcInvoice },
-        { name: 'mothaccount', path: '/mothaccount', component: mothaccount },
+        { name: `nocarRec`, path: `/nocarRec`, component: nocarRec },
+        { name: `billway`, path: `/billway`, component: billway },
+        { name: `nocarInvoice`, path: `/nocarInvoice`, component: nocarInvoice },
+        { name: `billwayException`, path: `/billwayException`, component: billwayException },
+        { name: `noCarCalculateInfo`, path: `/noCarCalculateInfo`, component: noCarCalculateInfo },
+        { name: `noCarCalculateInfoStatis`, path: `/noCarCalculateInfoStatis`, component: noCarCalculateInfoStatis },
+
+        { name: `hcInvoice`, path: `/hcInvoice`, component: hcInvoice },
+        { name: `mothaccount`, path: `/mothaccount`, component: mothaccount },
         // 自有车部分
-        { name: 'selfcarRec', path: '/selfcarRec', component: selfcarRec },
-        { name: 'selfInvoice', path: '/selfInvoice', component: selfInvoice },
-        { name: 'selfCarTrade', path: '/selfCarTrade', component: selfCarTrade },
-        { name: 'selfCarTradeException', path: '/selfCarTradeException', component: selfCarTradeException },
-        { name: 'SelfCalculateInfo', path: '/SelfCalculateInfo', component: SelfCalculateInfo },
+        { name: `selfcarRec`, path: `/selfcarRec`, component: selfcarRec },
+        { name: `selfInvoice`, path: `/selfInvoice`, component: selfInvoice },
+        { name: `selfCarTrade`, path: `/selfCarTrade`, component: selfCarTrade },
+        { name: `selfCarTradeException`, path: `/selfCarTradeException`, component: selfCarTradeException },
+        { name: `SelfCalculateInfo`, path: `/SelfCalculateInfo`, component: SelfCalculateInfo },
 
         // 平台菜单部分
-        { name: 'Check', path: '/check', component: Check },
+        { name: `Check`, path: `/check`, component: Check },
 
-        { name: 'Apply', path: '/apply', component: Apply },
-        { name: 'Already', path: '/already', component: Already },
-        { name: 'Packaging', path: '/packaging', component: Packaging },
-        { name: 'selfCarTradeP', path: '/selfCarTradeP', component: selfCarTradeP },
-        { name: 'Carbinding', path: '/carbinding', component: Carbinding },
-        { name: 'Carbindinglist', path: '/carbindinglist', component: Carbindinglist },
+        { name: `Apply`, path: `/apply`, component: Apply },
+        { name: `Already`, path: `/already`, component: Already },
+        { name: `Packaging`, path: `/packaging`, component: Packaging },
+        { name: `selfCarTradeP`, path: `/selfCarTradeP`, component: selfCarTradeP },
+        { name: `Carbinding`, path: `/carbinding`, component: Carbinding },
+        { name: `Carbindinglist`, path: `/carbindinglist`, component: Carbindinglist },
 
-        { name: 'Carupload', path: '/carupload', component: Carupload },
-        { name: 'Carsuccess', path: '/carsuccess', component: Carsuccess },
+        { name: `Carupload`, path: `/carupload`, component: Carupload },
+        { name: `Carsuccess`, path: `/carsuccess`, component: Carsuccess },
 
-        { name: 'Waybill', path: '/waybill', component: Waybill },
-        { name: 'Over', path: '/over', component: Over },
-        { name: 'History', path: '/history', component: History },
+        { name: `Waybill`, path: `/waybill`, component: Waybill },
+        { name: `Over`, path: `/over`, component: Over },
+        { name: `History`, path: `/history`, component: History },
 
-        { name: 'WaybillList', path: '/waybillList', component: WaybillList },
-        { name: 'Noinvoice', path: '/noinvoice', component: Noinvoice },
-        { name: 'Trueinvoice', path: '/trueinvoice', component: Trueinvoice },
+        { name: `WaybillList`, path: `/waybillList`, component: WaybillList },
+        { name: `Noinvoice`, path: `/noinvoice`, component: Noinvoice },
+        { name: `Trueinvoice`, path: `/trueinvoice`, component: Trueinvoice },
 
-        { name: 'Invoice', path: '/invoice', component: Invoice },
-        { name: 'List', path: '/list', component: List },
+        { name: `Invoice`, path: `/invoice`, component: Invoice },
+        { name: `List`, path: `/list`, component: List },
         // 参数管理
-        { name: 'paramMagager', path: '/paramMagager', component: paramMagager }
+        { name: `paramMagager`, path: `/paramMagager`, component: paramMagager }
       ]
     }
   ]
-});
+})
 
 router.beforeEach((to, from, next) => {
   // console.log(to);
@@ -153,20 +156,20 @@ router.beforeEach((to, from, next) => {
   // next();
   // 如果是登录的时候不判断token ,不是登录才判断token
   // console.log(to);
-  if (to.name && to.name.toLocaleLowerCase() !== 'login') {
+  if (to.name && to.name.toLocaleLowerCase() !== `login`) {
     // 判断token
-    const token = sessionStorage.getItem('token');
+    const token = sessionStorage.getItem(`token`)
     if (!token) {
       // 没有token,跳转到登录页面
       // this.$router.push('/login')
-      router.push('/login');
+      router.push(`/login`)
       // 提示
       // this.$message.warning('请先登录');
-      Message.warning('请先登录');
-      return;
+      Message.warning(`请先登录`)
+      return
     }
   }
-  next();
-});
+  next()
+})
 
-export default router;
+export default router

+ 195 - 191
src/views/Home.vue

@@ -154,213 +154,217 @@ export default {
       menus: [
 
         {
-          id:2,
-          authName:"用户管理",
-          children:[
+          id: 2,
+          authName: `用户管理`,
+          children: [
             {
-              id:1,
-              path:"user",
-              authName:"用户列表"
-            },
+              id: 1,
+              path: `user`,
+              authName: `用户列表`
+            }
           ]
         },
         {
           id: 3,
-          authName:"客户管理",
-          children:[
+          authName: `客户管理`,
+          children: [
             {
-              id:1,
-              path:"customer",
-              authName:"客户管理"
-            },{
-              id:2,
-              path:"customerRecharge",
-              authName:"充值记录"
-            },{
-              id:3,
-              path:"custRecTime",
-              authName:"备案预警查询"
-            },{
-              id:4,
-              path:"custRecMoney",
-              authName:"余额预警查询"
-            },{
-              id:4,
-              path:"customerEtcChangeInfo",
-              authName:"客户换卡记录查询"
+              id: 1,
+              path: `customer`,
+              authName: `客户管理`
+            }, {
+              id: 2,
+              path: `customerRecharge`,
+              authName: `充值记录`
+            }, {
+              id: 3,
+              path: `custRecTime`,
+              authName: `备案预警查询`
+            }, {
+              id: 4,
+              path: `custRecMoney`,
+              authName: `余额预警查询`
+            }, {
+              id: 4,
+              path: `customerEtcChangeInfo`,
+              authName: `客户换卡记录查询`
             }
           ]
-         },
-         {
+        },
+        {
           id: 4,
-          authName:"无车管理",
-          children:[
+          authName: `无车管理`,
+          children: [
             {
-              id:8,
-              path:"nocarRec",
-              authName:"车辆备案"
-            },{
-              id:2,
-              path:"billway",
-              authName:"运单查询"
-            },{
-              id:3,
-              path:"billwayException",
-              authName:"异常运单"
-            },{
-              id:4,
-              path:"nocarInvoice",
-              authName:"发票查询"
-            },{
-              id:5,
-              path:"hcInvoice",
-              authName:"红冲发票查询"
-            },{
-              id:5,
-              path:"mothaccount",
-              authName:"月账单查询"
+              id: 8,
+              path: `nocarRec`,
+              authName: `车辆备案`
+            }, {
+              id: 2,
+              path: `billway`,
+              authName: `运单查询`
+            }, {
+              id: 3,
+              path: `billwayException`,
+              authName: `异常运单`
+            }, {
+              id: 4,
+              path: `nocarInvoice`,
+              authName: `发票查询`
+            }, {
+              id: 5,
+              path: `hcInvoice`,
+              authName: `红冲发票查询`
+            }, {
+              id: 5,
+              path: `mothaccount`,
+              authName: `月账单查询`
             }
           ]
-         },{
+        }, {
           id: 5,
-          authName:"自有车管理",
-          children:[
+          authName: `自有车管理`,
+          children: [
             {
-              id:1,
-              path:"selfcarRec",
-              authName:"ETC备案"
-            },{
-              id:2,
-              path:"selfCarTrade",
-              authName:"交易查询"
-            },{
-              id:3,
-              path:"selfCarTradeException",
-              authName:"异常交易查询"
-            },{
-              id:4,
-              path:"selfInvoice",
-              authName:"发票查询"
-            },{
-              id:5,
-              path:"selfCarApply",
-              authName:"按申请发票查询"
-            } 
+              id: 1,
+              path: `selfcarRec`,
+              authName: `ETC备案`
+            }, {
+              id: 2,
+              path: `selfCarTrade`,
+              authName: `交易查询`
+            }, {
+              id: 3,
+              path: `selfCarTradeException`,
+              authName: `异常交易查询`
+            }, {
+              id: 4,
+              path: `selfInvoice`,
+              authName: `发票查询`
+            }, {
+              id: 5,
+              path: `selfCarApply`,
+              authName: `按申请发票查询`
+            }, {
+              id: 6,
+              path: `tradeCarApply`,
+              authName: `按交易查询申请`
+            }
           ]
-         },{
+        }, {
           id: 6,
-          authName:"计费管理",
-          children:[
+          authName: `计费管理`,
+          children: [
             {
-              id:1,
-              path:"SelfCalculateInfo",
-              authName:"自有车计费查询"
+              id: 1,
+              path: `SelfCalculateInfo`,
+              authName: `自有车计费查询`
             },
             {
-              id:2,
-              path:"noCarCalculateInfo",
-              authName:"无车计费明细查询"
+              id: 2,
+              path: `noCarCalculateInfo`,
+              authName: `无车计费明细查询`
             }, {
-              id:2,
-              path:"noCarCalculateInfoStatis",
-              authName:"无车计费统计信息查询"
+              id: 2,
+              path: `noCarCalculateInfoStatis`,
+              authName: `无车计费统计信息查询`
             }
           ]
-         },{
+        }, {
           id: 7,
-          authName:"参数管理",
-          children:[
+          authName: `参数管理`,
+          children: [
             {
-              id:1,
-              path:"paramMagager",
-              authName:"参数管理"
+              id: 1,
+              path: `paramMagager`,
+              authName: `参数管理`
             }
           ]
-         }
+        }
       ],
-       noCarMenu: [
+      noCarMenu: [
         {
           id: 3,
-          authName:"发票管理",
-          children:[
+          authName: `发票管理`,
+          children: [
             {
-              id:1,
-              path:"check",
-              authName:"发票列表"
-            },
+              id: 1,
+              path: `check`,
+              authName: `发票列表`
+            }
           ]
         },
         {
           id: 4,
-          authName:"车辆备案管理",
-          children:[
+          authName: `车辆备案管理`,
+          children: [
             {
-              id:2,
-              path:"carsuccess",
-              authName:"车辆备案列表"
-            },
+              id: 2,
+              path: `carsuccess`,
+              authName: `车辆备案列表`
+            }
           ]
         },
         {
           id: 5,
-          authName:"运单上传",
-          children:[
+          authName: `运单上传`,
+          children: [
             {
-              id:1,
-              path:"waybill",
-              authName:"实时运单上传"
+              id: 1,
+              path: `waybill`,
+              authName: `实时运单上传`
             },
             {
-              id:2,
-              path:"over",
-              authName:"实时运单发票匹配"
+              id: 2,
+              path: `over`,
+              authName: `实时运单发票匹配`
             },
             {
-              id:3,
-              path:"history",
-              authName:"历史运单发票匹配"
-            },
+              id: 3,
+              path: `history`,
+              authName: `历史运单发票匹配`
+            }
           ]
         },
         {
           id: 6,
-          authName:"运单管理",
-          children:[
+          authName: `运单管理`,
+          children: [
             {
-              id:1,
-              path:"waybillList",
-              authName:"运单列表"
+              id: 1,
+              path: `waybillList`,
+              authName: `运单列表`
             },
             {
-              id:2,
-              path:"noinvoice",
-              authName:"开票中运单列表"
+              id: 2,
+              path: `noinvoice`,
+              authName: `开票中运单列表`
             },
             {
-              id:3,
-              path:"trueinvoice",
-              authName:"已开票运单列表"
-            },
+              id: 3,
+              path: `trueinvoice`,
+              authName: `已开票运单列表`
+            }
 
           ]
         },
         {
           id: 7,
-          authName:"运单查询发票",
-          children:[
+          authName: `运单查询发票`,
+          children: [
             // {
             //   id:1,
             //   path:"invoice",
             //   authName:"运单发票上传"
             // },
             {
-              id:2,
-              path:"list",
-              authName:"运单发票列表"
-            },
+              id: 2,
+              path: `list`,
+              authName: `运单发票列表`
+            }
 
           ]
-        },
+        }
         // {
         //   id: 8,
         //   authName:"运单预估",
@@ -379,99 +383,99 @@ export default {
       selfCarMenu: [
         {
           id: 3,
-          authName:"发票管理",
-          children:[
+          authName: `发票管理`,
+          children: [
             {
-              id:1,
-              path:"check",
-              authName:"发票列表"
-            },
+              id: 1,
+              path: `check`,
+              authName: `发票列表`
+            }
           ]
         },
         {
           id: 4,
-          authName:"车辆管理",
-          children:[
+          authName: `车辆管理`,
+          children: [
             {
-              id:1,
-              path:"carbinding",
-              authName:"车辆绑定"
+              id: 1,
+              path: `carbinding`,
+              authName: `车辆绑定`
             },
             {
-              id:2,
-              path:"carbindinglist",
-              authName:"车辆绑定列表"
-            },
+              id: 2,
+              path: `carbindinglist`,
+              authName: `车辆绑定列表`
+            }
           ]
         },
         {
           id: 7,
-          authName:"交易管理",
-          children:[
+          authName: `交易管理`,
+          children: [
             {
-              id:1,
-              path:"apply",
-              authName:"申请开票"
-            },
-             {
-              id:1,
-              path:"selfCarTradeP",
-              authName:"交易查询"
+              id: 1,
+              path: `apply`,
+              authName: `申请开票`
             },
             {
-              id:2,
-              path:"already",
-              authName:"已开票查询"
+              id: 1,
+              path: `selfCarTradeP`,
+              authName: `交易查询`
             },
             {
-              id:3,
-              path:"packaging",
-              authName:"发票打包列表"
+              id: 2,
+              path: `already`,
+              authName: `已开票查询`
             },
+            {
+              id: 3,
+              path: `packaging`,
+              authName: `发票打包列表`
+            }
           ]
-        },
+        }
       ],
-      roleId: '',
-      userName: '',
-      name: ''
-    };
+      roleId: ``,
+      userName: ``,
+      name: ``
+    }
   },
   components: {
 
   },
   beforeCreate() {
     // 判断是否登录,token
-    var token = sessionStorage.getItem('token');
+    var token = sessionStorage.getItem(`token`)
     if (!token) {
       // 提示
-      this.$message.warning('请先登录');
+      this.$message.warning(`请先登录`)
       // 没有token,跳转到登录页面
-      this.$router.push('/login');
+      this.$router.push(`/login`)
     }
   },
   created() {
-    this.roleId = sessionStorage.getItem('roleId');
-    this.name = sessionStorage.getItem('name');
+    this.roleId = sessionStorage.getItem(`roleId`)
+    this.name = sessionStorage.getItem(`name`)
   },
-  mounted () {
+  mounted() {
 
   },
   methods: {
     // 退出登录
     Logout() {
-      const formData = new FormData();
-      formData.append("token",sessionStorage.getItem('token'));
-      this.$http.post('auth/login/loginOut', formData);
+      const formData = new FormData()
+      formData.append(`token`, sessionStorage.getItem(`token`))
+      this.$http.post(`auth/login/loginOut`, formData)
       // 提示退出成功
-      this.$message.success('退出成功');
+      this.$message.success(`退出成功`)
       // 1 清除token
-      sessionStorage.clear();
+      sessionStorage.clear()
       // 2 跳转到登录页面
-      this.$router.push('/login');
-    },
+      this.$router.push(`/login`)
+    }
 
   }
-};
+}
 </script>
 
 <style>

+ 374 - 0
src/views/selfCar/tradeCarApply.vue

@@ -0,0 +1,374 @@
+<template>
+    <div class="invoice_container">
+      <div class="title">
+        <el-row>
+          <el-col :span="24">
+            <div class="top">
+              <div class="demo-input-suffix" style="margin-left: 10px;">
+              <el-upload  :action="url" :http-request="importExcel" list-type="text" :show-file-list="false" >
+                <el-button  type="primary">导入参数</el-button>
+                <el-button style="margin-left: 555px;" @click="DownloadTemplate">查询模板下载</el-button>
+             </el-upload>
+              </div>
+             <div class="demo-input-suffix" style="margin-top: 5px">
+                <el-input  placeholder="公司编码" class="input-demo" v-model="formCondition.companyNum"></el-input>
+                <el-input  placeholder="etc卡号" class="input-demo" v-model="formCondition.cardId"></el-input>
+                <el-input  placeholder="交易id" class="input-demo" v-model="formCondition.tradeId"></el-input>
+                <el-button type="success" style="margin-left: 1%;" @click="loadData">查询</el-button>
+                <el-button type="primary" style="margin-left: 1%;" @click="exportExcel">导出报表</el-button>
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+      <!-- 表格部分 -->
+        <template>
+        <el-table
+          class="table"
+          v-loading="loading"
+          ref="multipleTable"
+          :data="invoiceTable"
+          :height="heightt"
+          border
+          tooltip-effect="dark">
+          <el-table-column
+            label="ETC卡号"
+            prop="cardId"
+            show-overflow-tooltip>
+          </el-table-column>
+          <el-table-column
+            prop="applyId"
+            label="申请id"
+            show-overflow-tooltip>
+          </el-table-column>
+           <el-table-column
+            prop="tradeCount"
+            label="交易数量"
+            show-overflow-tooltip>
+          </el-table-column>
+          <el-table-column
+            prop="invoiceCount"
+            label="发票数量"
+            show-overflow-tooltip>
+          </el-table-column>
+           <!-- <el-table-column
+            prop="invoiceAmount"
+            label="发票金额"
+            show-overflow-tooltip>
+          </el-table-column> -->
+          <el-table-column
+            prop="invoiceAmount"
+            label="发票金额"
+            width="100"
+            show-overflow-tooltip>
+             <template slot-scope="scope">
+               <span>{{scope.row.invoiceAmount/100| rounding}}</span>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column
+            prop="taxAmount"
+            label="发票税额"
+            show-overflow-tooltip>
+          </el-table-column> -->
+           <el-table-column
+            prop="taxAmount"
+            label="发票税额"
+            width="100"
+            show-overflow-tooltip>
+             <template slot-scope="scope">
+               <span>{{scope.row.taxAmount/100| rounding}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="invoicedCount"
+            label="已开发票数量"
+            show-overflow-tooltip>
+          </el-table-column>
+          <!-- <el-table-column
+            prop="invoicedAmount"
+            label="已开发票金额"
+            width="100"
+            show-overflow-tooltip>
+          </el-table-column> -->
+          <el-table-column
+            prop="invoicedAmount"
+            label="已开发票金额"
+            width="100"
+            show-overflow-tooltip>
+             <template slot-scope="scope">
+               <span>{{scope.row.invoicedAmount/100| rounding}}</span>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column
+            prop="applyStatus"
+            label="申请状态"
+            width="100"
+            show-overflow-tooltip>
+          </el-table-column> -->
+           <el-table-column
+            prop="applyStatus"
+            label="申请状态"
+            show-overflow-tooltip>
+             <template slot-scope="scope">
+              <span v-if="scope.row.applyStatus == 1" style="color: green">申请中</span>
+              <span v-else-if="scope.row.applyStatus == 2" style="color: red">开票中</span>
+              <span v-else-if="scope.row.applyStatus == 3" style="color: red">开票完成</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </template>
+    </div>
+</template>
+<script type="text/javascript">
+import FileSaver from "file-saver"
+import CsvExportor from "csv-exportor"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        companyNum: ``,
+        cardId: ``,
+        tradeId: ``
+      },
+      invoiceTable: [],
+      hightt: `0px`
+    }
+  },
+  created() {
+    this.heightt = tableHeight - 50
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    firstLoadData() {
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
+      }
+      const response = await this.$http.post(`selfCarService/getApplyQueryByTradeIds`, formData);
+      if (response.data.code === 0) {
+        this.invoiceTable = response.data.data.result;
+      } else {
+        this.$message({
+          type: `error`,
+          message: `查询结果:` + response.data.msg
+        });
+      }
+    },
+    importExcel(content) {
+      const file = content.file;
+      // let file = file.files[0] // 使用传统的input方法需要加上这一步
+      const filename = file.name;
+      if (!filename || typeof filename !== `string`) {
+        this.$message(`格式错误!请重新选择`);
+        return;
+      }
+      let a = filename.split(``).reverse().join(``);
+      let types = a.substring(0, a.search(/\./)).split(``).reverse().join(``);
+
+      const fileType = [`xlsx`, `xlc`, `xlm`, `xls`, `xlt`, `xlw`, `csv`].some((item) => { return item === types });
+      if (!fileType) {
+        this.$message(`格式错误!请重新选择`)
+        return;
+      }
+      this.file2Xce(file).then((tabJson) => {
+        var companyNums = ``;
+        var etcIds = ``;
+        var tradeIds = ``;
+        if (tabJson && tabJson.length > 0) {
+          this.xlsxJson = tabJson;
+          this.fileList = this.xlsxJson[0].sheet;
+          let n = `匹配的字段`;
+          var k = 0;
+          var i = 0;
+          var j = 0;
+          this.fileList.forEach((item, index, arr) => {
+            if (item[`公司编码`] !== null && item[`公司编码`] !== `` && typeof item[`公司编码`] !== `undefined`) {
+              companyNums += item[`公司编码`].trim() + `,`;
+              k++;
+            } else {
+              companyNums += `#,`;
+            }
+
+            if (item[`etc卡号`] !== null && item[`etc卡号`] !== `` && typeof item[`etc卡号`] !== `undefined`) {
+              etcIds += item[`etc卡号`].trim() + `,`;
+              i++;
+            } else {
+              etcIds += `#,`;
+            }
+
+            if (item[`交易id`] !== null && item[`交易id`] !== `` && typeof item[`交易id`] !== `undefined`) {
+              tradeIds += item[`交易id`].trim() + `,`;
+              j++;
+            } else {
+              tradeIds += `#,`;
+            }
+          });
+        }
+        if (companyNums !== `` && k > 0) {
+          this.formCondition.companyNum = companyNums.substring(0, companyNums.length - 1);
+        }
+        if (etcIds !== `` && i > 0) {
+          this.formCondition.cardId = etcIds.substring(0, etcIds.length - 1);
+        }
+        if (tradeIds !== `` && j > 0) {
+          this.formCondition.tradeId = tradeIds.substring(0, tradeIds.length - 1);
+        }
+      });
+    },
+    file2Xce(file) {
+      return new Promise(function(resolve, reject) {
+        const reader = new FileReader();
+        reader.onload = function(e) {
+          const data = e.target.result;
+          this.wb = XLSX.read(data, {
+            type: `binary`
+          });
+          const result = [];
+          var are = (this.wb.Sheets.Sheet1)[`!ref`];
+          var areRe = are.replace(`A1`, `A2`);
+          (this.wb.Sheets.Sheet1)[`!ref`] = areRe;
+          this.wb.SheetNames.forEach((sheetName) => {
+            result.push({
+              sheetName: sheetName,
+              sheet: XLSX.utils.sheet_to_json(this.wb.Sheets[sheetName])
+            });
+          });
+          resolve(result);
+        };
+        // reader.readAsBinaryString(file.raw)
+        reader.readAsBinaryString(file);// 传统input方法
+      });
+    },
+    // 下载模板
+    DownloadTemplate() {
+      var url = hostUrl + `noCar/templateDownload?fileName=8`;
+      window.location.href = url;
+    },
+    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      });
+      // 设置当前日期
+      let time = new Date()
+      let year = time.getFullYear()
+      let month = time.getMonth() + 1
+      let day = time.getDate()
+      let name = `按交易查询申请列表_` + year + `` + month + `` + day
+      /* generate workbook object from table */
+      //  .table要导出的是哪一个表格
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
+      /* get binary string as output */
+      var wbout = XLSX.write(wb, {
+        bookType: `xlsx`,
+        bookSST: true,
+        type: `array`
+      });
+      try {
+        //  name+'.xlsx'表示导出的excel表格名字
+        FileSaver.saveAs(
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        );
+      } catch (e) {
+        if (typeof console !== `undefined`) { console.log(e, wbout) ;
+        }
+      }
+      loading.close();
+      return wbout;
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) => {
+        return filterVal.map((j) => {
+          if (j === `tradeStatus`) {
+            if (v[j] == 1) {
+              return `待开票`
+            } else if (v[j] === 2) {
+              return `开票中`
+            } else if (v[j] === 3) {
+              return `开票完成`
+            }
+          } else if (j === `fee`) {
+            return v[j] / 100
+          } else if (j === `totalAmount`) {
+            return v[j] / 100
+          } else if (j === `totalTaxAmount`) {
+            return v[j] / 100
+          } else if (j === `amount`) {
+            return v[j] / 100
+          } else if (j === `sellerTaxpayerCode` || j === `cardId` || j === `invoiceCode` || j === `invoiceNum`) {
+            return v[j] + `\t`
+          } else {
+            return v[j]
+          }
+        })
+      })
+    }
+  }
+}
+</script>
+<style>
+.invoice_container {
+  border: 1px solid #d9d9d9;
+  border-radius: 10px;
+}
+.invoice_container .title {
+  font-size: 5px;
+  margin-bottom: 20px;
+}
+.invoice_container .top {
+  padding-top: 20px;
+  padding-left: 20px;
+}
+.invoice_container .text {
+  display: inline-block;
+  color: #000;
+  font-size: 16px ;
+  margin-left: 1%;
+}
+.invoice_container .input-demo {
+  display: inline-block;
+  width: 15%;
+  margin-left: 1%;
+}
+.invoice_container .block {
+  font-size: 5px;
+  text-align: center;
+  margin-top: 25px;
+  margin-bottom: 25px;
+}
+.invoice_container .el-dialog {
+  width: 60%;
+}
+.invoice_container .el-dialog__header, .el-dialog__body {
+  padding: 0 20px;
+}
+.invoice_container .tou {
+  font-size: 20px;
+  height: 30px;
+  line-height: 30px;
+  padding-top: 15px;
+}
+.invoice_container .line {
+  margin-top: 15px;
+  margin-bottom: 15px;
+  width: 100%;
+  height: 2px;
+  background-color: #d9d9d9;
+}
+.invoice_container .xinxi {
+  text-align: center;
+  margin: 15px auto;
+  font-size: 18px;
+}
+</style>