Browse Source

ESLINT规范调整 20221222****重要;前端 马圣毅

mashengyi 2 years ago
parent
commit
69e1473f42
53 changed files with 21097 additions and 5120 deletions
  1. 52 20
      .eslintrc.js
  2. 13 0
      build/webpack.base.conf.js
  3. 16294 256
      package-lock.json
  4. 1 0
      package.json
  5. 2 2
      src/App.vue
  6. 2 2
      src/components/MyBreadcrumb.vue
  7. 3 3
      src/config/globle.js
  8. 1 1
      src/config/rem.js
  9. 24 25
      src/main.js
  10. 19 19
      src/plugins/MyAxios.js
  11. 20 20
      src/views/Login.vue
  12. 106 120
      src/views/customer/Customer.vue
  13. 97 98
      src/views/customer/custRecMoney.vue
  14. 82 83
      src/views/customer/custRecTime.vue
  15. 93 94
      src/views/customer/customerEtcChangeInfo.vue
  16. 85 86
      src/views/customer/customerRecharge.vue
  17. 87 88
      src/views/customerRechargeMoney/customerRechargeMoney.vue
  18. 1 1
      src/views/main/main.vue
  19. 116 117
      src/views/manager/paramMagager.vue
  20. 69 79
      src/views/noCar/billway.vue
  21. 22 24
      src/views/noCar/billwayException.vue
  22. 144 143
      src/views/noCar/calculateInfo.vue
  23. 88 89
      src/views/noCar/calculateInfostatis.vue
  24. 127 129
      src/views/noCar/hcInvoice.vue
  25. 102 116
      src/views/noCar/invoice.vue
  26. 131 131
      src/views/noCar/mothaccount.vue
  27. 81 82
      src/views/noCar/nocarRec.vue
  28. 75 75
      src/views/personal/personal.vue
  29. 120 123
      src/views/platform/apply/already.vue
  30. 71 71
      src/views/platform/apply/apply.vue
  31. 42 42
      src/views/platform/apply/packaging.vue
  32. 168 174
      src/views/platform/apply/selfCarTrade.vue
  33. 93 94
      src/views/platform/car/carsuccess.vue
  34. 209 210
      src/views/platform/car/carupload.vue
  35. 130 133
      src/views/platform/carbinding/carbinding.vue
  36. 55 55
      src/views/platform/carbinding/carbindinglist.vue
  37. 137 137
      src/views/platform/check/check.vue
  38. 8 11
      src/views/platform/invoice/invoice.vue
  39. 73 79
      src/views/platform/invoice/list.vue
  40. 160 162
      src/views/platform/waybill/history.vue
  41. 100 101
      src/views/platform/waybill/over.vue
  42. 139 144
      src/views/platform/waybill/waybill.vue
  43. 131 133
      src/views/platform/waybillmanagement/noinvoice.vue
  44. 130 132
      src/views/platform/waybillmanagement/trueinvoice.vue
  45. 171 173
      src/views/platform/waybillmanagement/waybillList.vue
  46. 106 107
      src/views/selfCar/calculateInfo.vue
  47. 273 278
      src/views/selfCar/invoice.vue
  48. 79 80
      src/views/selfCar/selfCarApply.vue
  49. 283 289
      src/views/selfCar/selfCarTrade.vue
  50. 110 111
      src/views/selfCar/selfCarTradeException.vue
  51. 109 110
      src/views/selfCar/selfcarRec.vue
  52. 3 5
      src/views/selfCar/tradeCarApply.vue
  53. 260 263
      src/views/sys/user.vue

+ 52 - 20
.eslintrc.js

@@ -1,31 +1,63 @@
-// https://eslint.org/docs/user-guide/configuring
-
 module.exports = {
-  root: true,
+  //此项是用来告诉eslint找当前配置文件不能往父级查找
+  root: true, 
+  //此项是用来指定eslint解析器的,解析器必须符合规则,babel-eslint解析器是对babel解析器的包装使其与ESLint解析
+  parser: 'babel-eslint',
+  //此项是用来指定javaScript语言类型和风格,sourceType用来指定js导入的方式,默认是script,此处设置为module,指某块导入方式
   parserOptions: {
-    parser: 'babel-eslint'
+    sourceType: 'module'
   },
+  //此项指定环境的全局变量,下面的配置指定为浏览器环境
   env: {
     browser: true,
   },
-  extends: [
-    // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
-    // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
-    'plugin:vue/essential',
-    // https://github.com/standard/standard/blob/master/docs/RULES-en.md
-    'standard'
-  ],
+  // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
+  // 此项是用来配置标准的js风格,就是说写代码的时候要规范的写,如果你使用vs-code我觉得应该可以避免出错
+  extends: 'standard',
   // required to lint *.vue files
+  // 此项是用来提供插件的,插件名称省略了eslint-plugin-,下面这个配置是用来规范html的
   plugins: [
-    'vue'
+    'html'
   ],
   // add your custom rules here
+  // 下面这些rules是用来设置从插件来的规范代码的规则,使用必须去掉前缀eslint-plugin-
+  // 主要有如下的设置规则,可以设置字符串也可以设置数字,两者效果一致
+  // "off" -> 0 关闭规则
+  // "warn" -> 1 开启警告规则
+  //"error" -> 2 开启错误规则
+  // 了解了上面这些,下面这些代码相信也看的明白了
   rules: {
-    // allow async-await
-    'generator-star-spacing': 'off',
-    // allow debugger during development
-    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
-    'semi': ['error', 'always'],
-    'space-before-function-paren': 'off'
-  }
-}
+    "indent":["off",2],
+    "no-console": "error", // 禁止console
+    "no-alert": "error",  // 禁止alert,conirm等
+    "no-debugger": "error",  // 禁止debugger
+    "semi": 0,   // 禁止分号
+    "no-tabs": "error", // 禁止使用tab
+    "no-unreachable": "error", // 当有不能执行到的代码时
+    "eol-last": "error", // 文件末尾强制换行
+    "no-new": "error", // 禁止在使用new构造一个实例后不赋值
+    "quotes": 0,  // 引号类型 `` "" ''
+    "no-unused-vars": 0, // 不能有声明后未被使用的变量
+    "no-trailing-spaces": "error", // 一行结束后面不要有空格
+    "space-before-function-paren": 0, // 函数定义时括号前面要不要有空格
+    "no-undef": "error", // 不能有未定义的变量,定义之前必须有var或者let
+    "curly": ["error", "all"],  // 必须使用 if(){} 中的{}
+    'arrow-parens': "error", // 箭头函数的参数要有()包裹
+    'generator-star-spacing': "error", // allow async-await
+    "space-before-function-paren": 0,  // 禁止函数名前有空格,如function Test (aaa,bbb)
+    "space-in-parens": 0, // 禁止圆括号有空格,如Test( 2, 3 )
+    "space-infix-ops": 0, //在操作符旁边必须有空格, 如 a + b而不是a+b
+    "space-before-blocks": 0, // 语句块之前必须有空格 如 ) {}
+    "spaced-comment":0, // 注释前必须有空格
+    "arrow-body-style": ["error", "always"], // 要求箭头函数必须有大括号 如 a => {}
+    "arrow-parens": ["error", "always"], //要求箭头函数的参数必有用括弧包住,如(a) =>{}
+    "arrow-spacing": ["error", { "before": true, "after": true }], // 定义箭头函数的箭头前后都必须有空格
+    "no-const-assign": "error",    // 禁止修改const变量
+    "template-curly-spacing": ["error", "never"], // 禁止末班字符串中的{}中的变量出现空格,如以下错误`${ a }`
+    "no-multi-spaces": 0, // 禁止多个空格,只有一个空格的地方必须只有一个
+    "no-whitespace-before-property": 0, // 禁止属性前有空格,如obj. a
+    "keyword-spacing":0,//关键字前后必须有空格 如 } else {
+    "no-useless-escape": 0,// 禁止不必要的转义字符
+
+},
+}

+ 13 - 0
build/webpack.base.conf.js

@@ -57,12 +57,25 @@ module.exports = {
   module: {
     rules: [
       ...(config.dev.useEslint ? [createLintingRule()] : []),
+
+      
       {
         test: /\.vue$/,
         loader: 'vue-loader',
         options: vueLoaderConfig
       },
       {
+        test: /\.(js|vue)$/,
+        loader: 'eslint-loader',
+        enforce: 'pre',
+        include: [resolve('src'), resolve('test')],
+        options: {
+         formatter: require('eslint-friendly-formatter'),
+         // 不符合Eslint规则时只警告(默认运行出错)
+         // emitWarning: !config.dev.showEslintErrorsInOverlay
+        }
+      },
+      {
         test: /\.js$/,
         loader: 'babel-loader',
         include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]

File diff suppressed because it is too large
+ 16294 - 256
package-lock.json


+ 1 - 0
package.json

@@ -43,6 +43,7 @@
     "eslint-config-standard": "^10.2.1",
     "eslint-friendly-formatter": "^3.0.0",
     "eslint-loader": "^1.7.1",
+    "eslint-plugin-html": "^3.0.0",
     "eslint-plugin-import": "^2.7.0",
     "eslint-plugin-node": "^5.2.0",
     "eslint-plugin-promise": "^3.4.0",

+ 2 - 2
src/App.vue

@@ -6,8 +6,8 @@
 
 <script>
 export default {
-  name: 'App'
-};
+  name: `App`
+}
 </script>
 
 <style>

+ 2 - 2
src/components/MyBreadcrumb.vue

@@ -8,8 +8,8 @@
 
 <script type="text/javascript">
 export default{
-  name: 'MyBreadcrumb',
-  props: ['level1', 'level2']
+  name: `MyBreadcrumb`,
+  props: [`level1`, `level2`]
 }
 </script>
 

+ 3 - 3
src/config/globle.js

@@ -1,3 +1,3 @@
-window.hostUrl = "http://invoice.jkcredit.com:80/";
-//window.hostUrl = "http://127.0.0.1:18081/"
-window.tableHeight =  (document.body.clientHeight*0.6-20);
+window.hostUrl = `http://invoice.jkcredit.com:80/`;
+//window.hostUrl = `http://127.0.0.1:18081/`;
+window.tableHeight = (document.body.clientHeight * 0.6 - 20)

+ 1 - 1
src/config/rem.js

@@ -1 +1 @@
-(function(){function a(){var b=document.documentElement.clientWidth;b=b>750?750:b;var c=b/750*100;document.getElementsByTagName("html")[0].style.fontSize=c+"px"}a();window.onresize=a})();
+(function() { function a() { var b = document.documentElement.clientWidth; b = b > 750 ? 750 : b; var c = b / 750 * 100; document.getElementsByTagName(`html`)[0].style.fontSize = c + `px` }a(); window.onresize = a })()

+ 24 - 25
src/main.js

@@ -1,34 +1,33 @@
 // The Vue build version to load with the `import` command
 // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
-import Vue from 'vue';
-import App from './App';
-import router from './router';
-import ElementUI from 'element-ui';
-import 'element-ui/lib/theme-chalk/index.css';
-import '@/assets/css/index.css';
-import moment from 'moment';
-import './config/rem.js';
+import Vue from 'vue'
+import App from './App'
+import router from './router'
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
+import '@/assets/css/index.css'
+import moment from 'moment'
+import './config/rem.js'
 // import axios from 'axios';
-import   './config/globle.js';
-import myaxios from '@/plugins/MyAxios';
-import MyBreadcrumb from '@/components/MyBreadcrumb';
-import 'babel-polyfill';
+import './config/globle.js'
+import myaxios from '@/plugins/MyAxios'
+import MyBreadcrumb from '@/components/MyBreadcrumb'
+import 'babel-polyfill'
 
-Vue.use(ElementUI);
-Vue.use(myaxios);
-Vue.component(MyBreadcrumb.name, MyBreadcrumb);
+Vue.use(ElementUI)
+Vue.use(myaxios)
+Vue.component(MyBreadcrumb.name, MyBreadcrumb)
 
-Vue.filter('fmtDate', (value, formatString) => {
-  formatString = formatString || 'YYYY-MM-DD HH:mm:ss';
-return moment(value).format(formatString);
-});
+Vue.filter(`fmtDate`, (value, formatString) => {
+  formatString = formatString || `YYYY-MM-DD HH:mm:ss`
+  return moment(value).format(formatString)
+})
 
-Vue.config.productionTip = false;
+Vue.config.productionTip = false
 
-new Vue({
-  el: '#app',
+new Vue({// eslint-disable-line
+  el: `#app`,
   router,
   components: { App },
-  template: '<App/>'
-});
-
+  template: `<App/>`
+})

+ 19 - 19
src/plugins/MyAxios.js

@@ -1,31 +1,31 @@
-import axios from 'axios';
-const MyAxios = {};
+import axios from 'axios'
+const MyAxios = {}
 MyAxios.install = function(Vue) {
-  axios.defaults.baseURL = hostUrl;
+  axios.defaults.baseURL = hostUrl // eslint-disable-line
   // axios.defaults.baseURL = 'http://222.35.31.66:18080/';
-  axios.defaults.headers.common['app_id'] = 'RGZYQD'
-  axios.interceptors.request.use(function (config) {
+  axios.defaults.headers.common[`app_id`] = `RGZYQD`
+  axios.interceptors.request.use(function(config) {
     // Do something before request is sent
-    if(config.url.toLocaleLowerCase() !== 'login') {
-      const token = sessionStorage.getItem('token');
-      config.headers.token = token;
+    if (config.url.toLocaleLowerCase() !== `login`) {
+      const token = sessionStorage.getItem(`token`)
+      config.headers.token = token
     }
-    return config;
-  }, function (error) {
+    return config
+  }, function(error) {
     // Do something with request error
-    return Promise.reject(error);
-  });
+    return Promise.reject(error)
+  })
 
   // Add a response interceptor
-  axios.interceptors.response.use(function (response) {
+  axios.interceptors.response.use(function(response) {
     // Do something with response data
-    return response;
-  }, function (error) {
+    return response
+  }, function(error) {
     // Do something with response error
-    return Promise.reject(error);
-  });
+    return Promise.reject(error)
+  })
 
-  Vue.prototype.$http = axios;
+  Vue.prototype.$http = axios
 }
 
-export default MyAxios;
+export default MyAxios

+ 20 - 20
src/views/Login.vue

@@ -34,35 +34,35 @@ export default {
   data() {
     return {
       fromData: {
-        "userName": '',
-        "password": '',
-      },
-    };
+        "userName": ``,
+        "password": ``
+      }
+    }
   },
   methods: {
-    async handleLogin () {
-      const response = await this.$http.post(`auth/login`, this.fromData);
-      var {data: { code, msg, data }} = response;
+    async handleLogin() {
+      const response = await this.$http.post(`auth/login`, this.fromData)
+      var {data: { code, msg, data }} = response
       if (response.data.code === 0) {
-        this.$message.success('登录成功');
+        this.$message.success(`登录成功`)
         // 将tocken取到
-        const token = document.cookie;
+        const token = document.cookie
         // 将tocken保存到sessionStorage中
-        sessionStorage.setItem('token', response.data.data.token);
-        sessionStorage.setItem('companyNum', response.data.data.user.companyNum);
-        sessionStorage.setItem('userName', response.data.data.user.userName);
-        sessionStorage.setItem('name', response.data.data.user.name);
-        sessionStorage.setItem('roleId', response.data.data.user.roleId);
-        sessionStorage.setItem('userId', response.data.data.user.id);
-        sessionStorage.setItem('price', response.data.data.user.price);
+        sessionStorage.setItem(`token`, response.data.data.token)
+        sessionStorage.setItem(`companyNum`, response.data.data.user.companyNum)
+        sessionStorage.setItem(`userName`, response.data.data.user.userName)
+        sessionStorage.setItem(`name`, response.data.data.user.name)
+        sessionStorage.setItem(`roleId`, response.data.data.user.roleId)
+        sessionStorage.setItem(`userId`, response.data.data.user.id)
+        sessionStorage.setItem(`price`, response.data.data.user.price)
 
-        this.$router.push('/');
+        this.$router.push(`/`)
       } else {
-        this.$message.error(msg);
+        this.$message.error(msg)
       }
-    },
+    }
   }
-};
+}
 </script>
 
 <style>

+ 106 - 120
src/views/customer/Customer.vue

@@ -663,26 +663,31 @@
 import FileSaver from "file-saver";
 import XLSX from "xlsx";
       export default {
-        data(){
-          return{
-            formCondition:{
-              customerName:'',
-              company:'',
-              subCompany:''
+        data() {
+          return {
+            formCondition: {
+              customerName: '',
+              company: '',
+              subCompany: ''
             },
-            hightt:'0px',
-            coustomerTable:[],
-            coustomerCarTable:[],
-            customeRecQueryListTable:[],
-            companyList:[{id:1,name:"行业用户"},{id:2,name:"自营平台"},{id:3,name:"合作商户"}],
-            bussinessTypeList:[{id:"0",name:"自有车"},{id:"2",name:"无车"}],
-            operatingRangeList:[{id:1,name:"快递"},
-                                {id:2,name:"速运"},
-                                {id:3,name:"货运代理"},
-                                {id:4,name:"普通货运"},
-                                {id:5,name:"专线运输"},
-                                {id:6,name:"其他"}],
-            serviceTypeList:[{id:1,name:"一级产品"},{id:2,name:"二级产品"},{id:3,name:"三级产品"}],
+            hightt: '0px',
+            coustomerTable: [],
+            coustomerCarTable: [],
+            customeRecQueryListTable: [],
+            companyList: [{id: 1, name: "行业用户"},
+                         {id: 2, name: "自营平台"},
+                         {id: 3, name: "合作商户"}],
+            bussinessTypeList: [{id: "0", name: "自有车"},
+                                {id: "2", name: "无车"}],
+            operatingRangeList: [{id: 1, name: "快递"},
+                                {id: 2, name: "速运"},
+                                {id: 3, name: "货运代理"},
+                                {id: 4, name: "普通货运"},
+                                {id: 5, name: "专线运输"},
+                                {id: 6, name: "其他"}],
+            serviceTypeList: [{id: 1, name: "一级产品"},
+                             {id: 2, name: "二级产品"},
+                             {id: 3, name: "三级产品"}],
             custAddrules: {
               customerName: [
                 { required: true, message: '请输入', trigger: 'blur' },
@@ -693,80 +698,77 @@ import XLSX from "xlsx";
                 { min: 3, max: 100, message: '长度在 3 到 300个字符', trigger: 'blur' }
               ],
                bussinessType: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
               ]
             },
             custRecAddrules: {
               customerName: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
               ],
                companyLeader: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
               ],
                companyLeaderPhone: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                companyName: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                companyReferencenum: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                companyOpenbank: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                companyOpenbankAcc: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                companyAdress: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                companyPhone: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                bussinessType: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                companyType: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                operatingRangeType: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                serviceType: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                serviceStartTime: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ],
                serviceEndTime: [
-                { required: true, message: '请输入', trigger: 'blur' },
+                { required: true, message: '请输入', trigger: 'blur' }
                ]
             },
-            customerRec:{
+            customerRec: {
 
             },
-            queryParam:{},
-            customer:{
-               id:0,
-               customerName:'',
-               usenumAll:'',
-               invoiceTime:'',
-               usenumInterface:'',
-               usenumPlat:'',
-               accountBalance:'',
-               bussinessType:'',
-               integrationType:'',
-               firstSign:'',
-               accstatus:'0',
-               company:''
-            },
-            customerRecharge:{
-              customerName:'',
-              rechargeMony:''
+            queryParam: {},
+            customer: {
+               id: 0,
+               customerName: '',
+               usenumAll: '',
+               invoiceTime: '',
+               usenumInterface: '',
+               usenumPlat: '',
+               accountBalance: '',
+               bussinessType: '',
+               integrationType: '',
+               firstSign: '',
+               accstatus: '0',
+               company: ''
             },
-            queryParam:{
-
+            customerRecharge: {
+              customerName: '',
+              rechargeMony: ''
             },
              optionone: [{
               value: 0,
@@ -784,35 +786,35 @@ import XLSX from "xlsx";
             }],
             current: 1,
             pagesize: 8,
-            total:'',
-            addCustomerShow:false,
-            addCustomerRecShow1:false,
-            changeStatus:false,
-            recVis:false,
-            concatVis:false,
-            accIsclose:false,
-            carRecclose:false,
-            recVisList:false,
-            disable:false,
-            showEtcFee:false
+            total: '',
+            addCustomerShow: false,
+            addCustomerRecShow1: false,
+            changeStatus: false,
+            recVis: false,
+            concatVis: false,
+            accIsclose: false,
+            carRecclose: false,
+            recVisList: false,
+            disable: false,
+            showEtcFee: false
           }
         },
-          created() {
-             this.heightt = tableHeight;
+        created() {
+          this.heightt = tableHeight  // eslint-disable-line
           this.loadData();
         },
         filters: {
-            rounding (value) {
+            rounding(value) {
               return value.toFixed(2)
             }
         },
-        methods:{
-          showAddCustomerRec(){
-            this.addCustomerRecShow1 =true;
+        methods: {
+          showAddCustomerRec() {
+            this.addCustomerRecShow1 = true;
             this.customerRec.customerName = this.customer.customerName;
           },
-          changeAmt(value){
-           value=value.replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '');
+          changeAmt(value) {
+           value = value.replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '');
            this.customerRecharge.rechargeMony = value;
          },
           getBase64(file) {
@@ -822,21 +824,18 @@ import XLSX from "xlsx";
                   let reader = new FileReader();
                   let fileResult = "";
                   reader.readAsDataURL(file);
-               //开始转
                   reader.onload = function() {
                     fileResult = reader.result;
                   };
-               //转 失败
                   reader.onerror = function(error) {
                     reject(error);
                   };
-               //转 结束  咱就 resolve 出去
                   reader.onloadend = function() {
                     resolve(fileResult);
                   };
                 });
           },
-          httpRequest(data){  // 没事儿就打印data看看呗    //这是限制上传文件类型
+          httpRequest(data) {
               const isPFX = data.file.type === "application/pdf";
               const isLt2M = data.file.size / 1024 / 1024 < 10;
 
@@ -844,14 +843,15 @@ import XLSX from "xlsx";
                 this.$message.error("上传文件只能是pdf格式!");
               }else if (!isLt2M) {
                 this.$message.error("上传文件大小不能超过 10MB!");
-              }else{
+              } else {
                 // 转base64
-                this.getBase64(data.file).then(resBase64 => {
-                this.fileBase64 = resBase64.split(',')[1]  //直接拿到base64信息
+                this.getBase64(data.file).then((resBase64) => {
+                this.fileBase64 = resBase64.split(',')[1]//直接拿到base64信息
                  this.customerRec.base64Str = resBase64.split(',')[1];
                 })
                 this.$message.success('文件上传成功');
-          }},
+          }
+      },
           addCustomer(formName){
                 this.$refs[formName].validate(async (valid) => {
                 if(valid) {
@@ -876,14 +876,14 @@ import XLSX from "xlsx";
               })
           },
           investMone(recoder){
-            this.customer = this.customer= JSON.parse(JSON.stringify(recoder ));;
+            this.customer = this.customer= JSON.parse(JSON.stringify(recoder ));
             this.customerRecharge['rechargeMony']='';
             this.accIsclose = true;
           },
          async customRecharge(){
              this.customerRecharge['customerName'] = this.customer['customerName'];
              const response = await this.$http.post(`customer/customRecharge`, this.customerRecharge);
-                  if(response.data.data == true) {
+                  if(response.data.data === true) {
                     this.loadData();
                     this.accIsclose = false;
                     this.$message({
@@ -919,24 +919,21 @@ import XLSX from "xlsx";
           },
           async recInfo(recoder){
               this.recVis = true;
-
-
-            const response = await this.$http.post(`lowerService/customeRecQuery`, {"customerName":recoder.customerName,"companyName":recoder.companyName});
+            const response = await this.$http.post(`lowerService/customeRecQuery`, {"customerName": recoder.customerName, "companyName": recoder.companyName});
             if (response.data.code === 0) {
               this.customerRec = response.data.data;
 
-              this.disable = !((this.customerRec.interType ==1) && (this.customerRec.recStatus ==2 || this.customerRec.recStatus ==0));
-
+              this.disable = !((this.customerRec.interType === 1) && (this.customerRec.recStatus === 2 || this.customerRec.recStatus === 0));
             }
           },
 
           async concatInfo(recoder){
               //this.recVis = true;
               this.concatVis = true;
-            const response = await this.$http.post(`lowerService/customeRecQuery`, {"customerName":recoder.customerName,"companyName":recoder.companyName});
+            const response = await this.$http.post(`lowerService/customeRecQuery`, {"customerName": recoder.customerName, "companyName": recoder.companyName});
             if (response.data.code === 0) {
               this.customerRec = response.data.data;
-              this.disable = !((this.customerRec.interType ==1) && (this.customerRec.recStatus ==2));
+              this.disable = !((this.customerRec.interType === 1) && (this.customerRec.recStatus === 2));
             }
           },
           stopUse(recoder){
@@ -945,7 +942,7 @@ import XLSX from "xlsx";
                         cancelButtonText: '取消',
                          type: 'warning'
                    }).then(async () => {
-                       const response = await this.$http.post("customer/customeRecStop", {"customerName":recoder.customerName,"companyName":recoder.companyName});
+                       const response = await this.$http.post("customer/customeRecStop", {"customerName": recoder.customerName, "companyName": recoder.companyName});
                        if (response.data.code === 0) {
                             this.$message({
                                 type: 'success',
@@ -961,7 +958,6 @@ import XLSX from "xlsx";
                    }).catch(() => {
                       //几点取消的提示
                    });
-
           },
           startUse(recoder){
                   this.$confirm('此操作将备案状态改为启用状态, 是否继续?', '提示', {
@@ -969,7 +965,7 @@ import XLSX from "xlsx";
                         cancelButtonText: '取消',
                          type: 'warning'
                    }).then(async () => {
-                       const response = await this.$http.post("customer/customeRecStart", {"customerName":recoder.customerName,"companyName":recoder.companyName});
+                       const response = await this.$http.post("customer/customeRecStart", {"customerName": recoder.customerName, "companyName": recoder.companyName});
                        if (response.data.code === 0) {
                             this.$message({
                                 type: 'success',
@@ -985,11 +981,10 @@ import XLSX from "xlsx";
                    }).catch(() => {
                       //几点取消的提示
                    });
-
           },
            async recInfoList(recoder){
              this.customer.customerName =recoder.customerName;
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":recoder.customerName});
+            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": recoder.customerName});
             if (response.data.code === 0) {
               this.customeRecQueryListTable = response.data.data;
             }
@@ -997,13 +992,13 @@ import XLSX from "xlsx";
             this.recVisList = true;
           },
           async queryCustomerRec(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":this.customer.customerName,"companyName":this.customer.company});
+            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": this.customer.customerName, "companyName": this.customer.company});
             if (response.data.code === 0) {
               this.customeRecQueryListTable = response.data.data;
             }
           },
           async carInfo(recoder){
-            const response = await this.$http.post(`lowerService/customerCarRecQuery`, {"customerName":recoder.customerName});
+            const response = await this.$http.post(`lowerService/customerCarRecQuery`, {"customerName": recoder.customerName});
             if (response.data.code === 0) {
               this.coustomerCarTable = response.data.data;
             }
@@ -1019,14 +1014,13 @@ import XLSX from "xlsx";
             this.customer['accstatus'] = 0;
           },
           custRecClose() {
-            this.recVis = false,
-            this.concatVis = false,
+            this.recVis = false;
+            this.concatVis = false;
             this.addCustomerRecShow1 =false;
             this.customerRec = {};
           },
           async customerRecquerry(){
-            if(this.customerRec['companyName'] == null || this.customerRec['companyReferencenum'] == null
-            || this.customerRec['companyType'] == null){
+            if(this.customerRec['companyName'] == null || this.customerRec['companyReferencenum'] == null || this.customerRec['companyType'] == null){
               this.$message({
                       type: 'error',
                       message: '需要填写公司名称、税号和公司类型'
@@ -1053,10 +1047,8 @@ import XLSX from "xlsx";
                                background: 'rgba(0, 0, 0, 0.7)'
                              });
                     const response = await this.$http.post(`customer/customerRecAdd`, this.customerRec);
-
                   if(response.data.code === 0) {
-
-                  const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":this.customer.customerName});
+                  const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": this.customer.customerName});
                   if (response.data.code === 0) {
                     this.customeRecQueryListTable = response.data.data;
                   }
@@ -1075,11 +1067,10 @@ import XLSX from "xlsx";
                   }
                }
              });
-
           },
           generateWord(){
             const token = sessionStorage.getItem('token');
-            window.open(hostUrl+'customer/generateWord?customerRecId='+this.customerRec['id']+'&token='+token);
+            window.open(hostUrl+'customer/generateWord?customerRecId='+this.customerRec['id']+'&token='+token);// eslint-disable-line
           },
           async customerRecConform(){
              const response = await this.$http.post(`customer/customeRec`, this.customerRec);
@@ -1099,7 +1090,7 @@ import XLSX from "xlsx";
                   }
           },
           changeRow(id){
-            if(id == 0){
+            if(id === 0){
               this.showEtcFee =true
             }else{
               this.showEtcFee =false
@@ -1122,9 +1113,7 @@ import XLSX from "xlsx";
                     });
                   }
           },
-
-            async contractStatusFail(){
-              
+            async contractStatusFail() {
              const response = await this.$http.post(`customer/contractStatusFail`, this.customerRec);
                   if(response.data.code === 0) {
                     this.loadData();
@@ -1142,8 +1131,7 @@ import XLSX from "xlsx";
                   }
           },
 
-           async contractStatusProcess(){
-              
+           async contractStatusProcess() {
              const response = await this.$http.post(`customer/contractStatusProcess`, this.customerRec);
                   if(response.data.code === 0) {
                     this.loadData();
@@ -1160,9 +1148,7 @@ import XLSX from "xlsx";
                     });
                   }
           },
-
-           async contractStatusSuccess(){
-              
+           async contractStatusSuccess() {
              const response = await this.$http.post(`customer/contractStatusSuccess`, this.customerRec);
                   if(response.data.code === 0) {
                     this.loadData();
@@ -1182,7 +1168,7 @@ import XLSX from "xlsx";
 
           contractDownload(){
             const token = sessionStorage.getItem('token');
-            window.open(hostUrl+'customer/contractDownload?customerRecId='+this.customerRec['id']+'&token='+token);
+            window.open(hostUrl+'customer/contractDownload?customerRecId='+this.customerRec['id']+'&token='+token);// eslint-disable-line
           },
            firstLoadData(){
             this.current = 1;
@@ -1220,7 +1206,7 @@ import XLSX from "xlsx";
                                       background: 'rgba(0, 0, 0, 0.7)'
                                     });
         let customer = this.formCondition.customerName;
-        window.location.href = hostUrl+"customer/findCustomerRecListExport?customerName="+customer+"&&companyName="+this.formCondition.subCompany+"&&companyBelongName="+this.formCondition.company+"&&token="+sessionStorage.getItem('token');
+        window.location.href = hostUrl+"customer/findCustomerRecListExport?customerName="+customer+"&&companyName="+this.formCondition.subCompany+"&&companyBelongName="+this.formCondition.company+"&&token="+sessionStorage.getItem('token');// eslint-disable-line
          loading.close();
       //   let curr = this.current;
       // let pagesize1 = this.pagesize;
@@ -1255,7 +1241,7 @@ import XLSX from "xlsx";
       // this.pagesize = pagesize1;
       // this.loadData();
       // return wbout;
-    },
+    }
         }
       };
 </script>

+ 97 - 98
src/views/customer/custRecMoney.vue

@@ -71,116 +71,115 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              customerName:'',
-              company:''
-            },
-            customeRecMoneyListTable:[],
-             hightt:'0px',
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-         filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-           changeAmtLower(value){
-           value=value.replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '');
-           this.formCondition.moneyLower = value;
-         },
-          changeAmtUpper(value){
-           value=value.replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '');
-           this.formCondition.moneyUpper = value;
-         },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('customerName', this.formCondition.customerName);
-            formData.append('company', this.formCondition.company);
-            formData.append('moneyLower', this.formCondition.moneyLower||-1);
-            formData.append('moneyUpper', this.formCondition.moneyUpper||-1);
-            const response = await this.$http.post(`customer/findCustomerMoney`, formData);
-            if (response.data.code === 0) {
-              this.customeRecMoneyListTable = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-          formatterBannerOs: function() {
-          return '余额不足,请提醒客户充值'
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-      async   exportExcel() {
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        customerName: ``,
+        company: ``
+      },
+      customeRecMoneyListTable: [],
+      hightt: `0px`,
+      current: 1,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    changeAmtLower(value) {
+      value = value.replace(/\.{2,}/g, `.`).replace(`.`, `$#$`).replace(/\./g, ``).replace(`$#$`, `.`).replace(/^(\-)*(\d+)\.(\d\d).*$/, `$1$2.$3`).replace(/^\./g, ``)
+      this.formCondition.moneyLower = value
+    },
+    changeAmtUpper(value) {
+      value = value.replace(/\.{2,}/g, `.`).replace(`.`, `$#$`).replace(/\./g, ``).replace(`$#$`, `.`).replace(/^(\-)*(\d+)\.(\d\d).*$/, `$1$2.$3`).replace(/^\./g, ``)
+      this.formCondition.moneyUpper = value
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formCondition.customerName)
+      formData.append(`company`, this.formCondition.company)
+      formData.append(`moneyLower`, this.formCondition.moneyLower || -1)
+      formData.append(`moneyUpper`, this.formCondition.moneyUpper || -1)
+      const response = await this.$http.post(`customer/findCustomerMoney`, formData)
+      if (response.data.code === 0) {
+        this.customeRecMoneyListTable = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    formatterBannerOs: function() {
+      return `余额不足,请提醒客户充值`
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async   exportExcel() {
       const loading = this.$loading({
-                            lock: true,
-                            text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                            spinner: 'el-icon-loading',
-                            background: 'rgba(0, 0, 0, 0.7)'
-                          });
-        let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "客户余额预警查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .custRecMoney_container {

+ 82 - 83
src/views/customer/custRecTime.vue

@@ -78,100 +78,99 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              companyName:'',
-              serviceEndTime:'',
-              companyBelongName:''
-            },
-            customeRecTimeListTable:[],
-             hightt:'0px',
-            current: 1,
-            pagesize: 3000,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 3000;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('companyName', this.formCondition.companyName);
-            formData.append('serviceEndTime', this.formCondition.serviceEndTime);
-            formData.append('companyBelongName', this.formCondition.companyBelongName);
-            const response = await this.$http.post(`customer/findCustomerRecTimeList`, formData);
-            if (response.data.code === 0) {
-              this.customeRecTimeListTable = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-        async    exportExcel() {
-        const loading = this.$loading({
-                              lock: true,
-                              text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                              spinner: 'el-icon-loading',
-                              background: 'rgba(0, 0, 0, 0.7)'
-                            });
-          let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = pagesize1;
-      await this.loadData();
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        companyName: ``,
+        serviceEndTime: ``,
+        companyBelongName: ``
+      },
+      customeRecTimeListTable: [],
+      hightt: `0px`,
+      current: 1,
+      pagesize: 3000,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 3000
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`companyName`, this.formCondition.companyName)
+      formData.append(`serviceEndTime`, this.formCondition.serviceEndTime)
+      formData.append(`companyBelongName`, this.formCondition.companyBelongName)
+      const response = await this.$http.post(`customer/findCustomerRecTimeList`, formData)
+      if (response.data.code === 0) {
+        this.customeRecTimeListTable = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = pagesize1
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "客户备案预警查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .custRecTime_container {

+ 93 - 94
src/views/customer/customerEtcChangeInfo.vue

@@ -118,112 +118,111 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              companyName:'',
-              customerId:''
-            },
-            flag:false,
-            customerChangeListTable:[],
-            customerChangeInfoTable:[],
-             hightt:'0px',
-            current: 1,
-            pagesize: 500,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 50;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('companyName', this.formCondition.companyName);
-            formData.append('customerId', this.formCondition.customerId);
-            const response = await this.$http.post(`customer/customerChangeList`, formData);
-            if (response.data.code === 0) {
-              this.customerChangeListTable = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-          async showChangeInfo(recoder){
-             this.flag = true;
-              const formData = new FormData();
-             formData.append('applyId', recoder['applyId']);
-              const response = await this.$http.post(`customer/customerChangeInfo`, formData);
-            if (response.data.code === 0) {
-              this.customerChangeInfoTable = response.data.data;
-            }else{
-              this.customerChangeInfoTable = [];
-            }
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        companyName: ``,
+        customerId: ``
+      },
+      flag: false,
+      customerChangeListTable: [],
+      customerChangeInfoTable: [],
+      hightt: `0px`,
+      current: 1,
+      pagesize: 500,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 50
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`companyName`, this.formCondition.companyName)
+      formData.append(`customerId`, this.formCondition.customerId)
+      const response = await this.$http.post(`customer/customerChangeList`, formData)
+      if (response.data.code === 0) {
+        this.customerChangeListTable = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    async showChangeInfo(recoder) {
+      this.flag = true
+      const formData = new FormData()
+      formData.append(`applyId`, recoder[`applyId`])
+      const response = await this.$http.post(`customer/customerChangeInfo`, formData)
+      if (response.data.code === 0) {
+        this.customerChangeInfoTable = response.data.data
+      } else {
+        this.customerChangeInfoTable = []
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
 
-        async    exportExcel() {
-        const loading = this.$loading({
-                              lock: true,
-                              text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                              spinner: 'el-icon-loading',
-                              background: 'rgba(0, 0, 0, 0.7)'
-                            });
-          let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = pagesize1;
-      await this.loadData();
+    async    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = pagesize1
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "客户换卡信息查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .cuctomerChange_container {

+ 85 - 86
src/views/customer/customerRecharge.vue

@@ -79,103 +79,102 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              customerName:'',
-              companyName:''
-            },
-            hightt:'0px',
-            customerRechargeList:[],
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('customerName', this.formCondition.customerName);
-            formData.append('companyName', this.formCondition.companyName);
-            const response = await this.$http.post(`customer/findCustomerRecharge`, formData);
-            if (response.data.code === 0) {
-              this.customerRechargeList = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-          firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-     async exportExcel() {
-     const loading = this.$loading({
-                           lock: true,
-                           text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                           spinner: 'el-icon-loading',
-                           background: 'rgba(0, 0, 0, 0.7)'
-                         });
-      let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        customerName: ``,
+        companyName: ``
+      },
+      hightt: `0px`,
+      customerRechargeList: [],
+      current: 1,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formCondition.customerName)
+      formData.append(`companyName`, this.formCondition.companyName)
+      const response = await this.$http.post(`customer/findCustomerRecharge`, formData)
+      if (response.data.code === 0) {
+        this.customerRechargeList = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "客户充值记录查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .customerRecharge_container {

+ 87 - 88
src/views/customerRechargeMoney/customerRechargeMoney.vue

@@ -68,107 +68,106 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              rechargeStartTime:'',
-              rechargeEndTime:''
-            },
-            hightt:'0px',
-            customerRechargeList:[],
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-          // 列表展示
-          async loadData() {
-            this.customerName = sessionStorage.getItem('userName');
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        rechargeStartTime: ``,
+        rechargeEndTime: ``
+      },
+      hightt: `0px`,
+      customerRechargeList: [],
+      current: 1,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    // 列表展示
+    async loadData() {
+      this.customerName = sessionStorage.getItem(`userName`)
 
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('customerName',  this.customerName);
-            formData.append('rechargeStartTime',  this.rechargeStartTime);
-            formData.append('rechargeEndTime',  this.rechargeEndTime);
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.customerName)
+      formData.append(`rechargeStartTime`, this.rechargeStartTime)
+      formData.append(`rechargeEndTime`, this.rechargeEndTime)
 
-            const response = await this.$http.post(`customer/findCustomerRechargeMoney`, formData);
-            if (response.data.code === 0) {
-              this.customerRechargeList = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-          firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-     async exportExcel() {
-     const loading = this.$loading({
-                           lock: true,
-                           text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                           spinner: 'el-icon-loading',
-                           background: 'rgba(0, 0, 0, 0.7)'
-                         });
-      let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+      const response = await this.$http.post(`customer/findCustomerRechargeMoney`, formData)
+      if (response.data.code === 0) {
+        this.customerRechargeList = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "充值记录查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .customerRecharge_container {

+ 1 - 1
src/views/main/main.vue

@@ -13,7 +13,7 @@ export default{
     return {
 
     }
-  },
+  }
 }
 </script>
 

+ 116 - 117
src/views/manager/paramMagager.vue

@@ -131,192 +131,191 @@
 </template>
 
 <script type="text/javascript">
-import axios from 'axios';
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import axios from 'axios'
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
       loading: true,
       rules: {
-          paramName: [
-            { required: true, message: '请输入参数名称', trigger: 'blur' },
-            { min: 3, max: 50, message: '长度在 3 到 50 个字符', trigger: 'blur' }
-          ],
-          paramValue: [
-            { required: true, message: '请输入参数值', trigger: 'blur' },
-            { min: 1, max: 16, message: '长度在 1 到 16 个字符', trigger: 'blur' }
-          ],
-          paramNote: [
-            { required: true, message: '请输入备注信息', trigger: 'blur' },
-            { min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' }
-          ]
-        },
-      paramName: '',
-      paramValue: '',
-      paramNote: '',
+        paramName: [
+          { required: true, message: `请输入参数名称`, trigger: `blur` },
+          { min: 3, max: 50, message: `长度在 3 到 50 个字符`, trigger: `blur` }
+        ],
+        paramValue: [
+          { required: true, message: `请输入参数值`, trigger: `blur` },
+          { min: 1, max: 16, message: `长度在 1 到 16 个字符`, trigger: `blur` }
+        ],
+        paramNote: [
+          { required: true, message: `请输入备注信息`, trigger: `blur` },
+          { min: 2, max: 50, message: `长度在 2 到 50 个字符`, trigger: `blur` }
+        ]
+      },
+      paramName: ``,
+      paramValue: ``,
+      paramNote: ``,
       current: 1,
-       hightt:'0px',
+      hightt: `0px`,
       pagesize: 8,
       formParamList: {
-        "paramName":"",
-        "paramValue": "",
-        "id":"",
-        "paramNote": ""
+        "paramName": ``,
+        "paramValue": ``,
+        "id": ``,
+        "paramNote": ``
       },
       // 总共有多少条数据
       total: 0,
       addParamList: false,
-      changeParam: false,
+      changeParam: false
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.loadData();
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
   },
   methods: {
 
     // 列表展示
     async loadData() {
-      const formData = new FormData();
-      formData.append('current', this.current);
-      formData.append('size', this.pagesize);
-      const response = await this.$http.post(`param/page`, formData);
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      const response = await this.$http.post(`param/page`, formData)
       if (response.data.code === 0) {
-        this.loading = false;
-        this.usertable = response.data.data.records;
-        this.total = response.data.data.total;
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
       }
     },
-    //查询
+    // 查询
     async queryLook() {
-      const formData = new FormData();
-      formData.append('current', this.current);
-      formData.append('size', this.pagesize);
-      formData.append('paramName', this.paramName);
-      formData.append('paramValue', this.paramValue);
-      formData.append('paramNote', this.paramNote);
-      const response = await this.$http.post(`param/page`, formData);
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`paramName`, this.paramName)
+      formData.append(`paramValue`, this.paramValue)
+      formData.append(`paramNote`, this.paramNote)
+      const response = await this.$http.post(`param/page`, formData)
       if (response.data.code === 0) {
-        this.loading = false;
-        this.usertable = response.data.data.records;
-        this.total = response.data.data.total;
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
       }
     },
     // 新增参数
     addData(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if(valid) {
-          const response = await this.$http.post(`param`, this.formParamList);
-          if(response.data.code === 0) {
-            this.loadData();
-            this.addParamList = false;
+      this.$refs[formName].validate(async(valid) => {
+        if (valid) {
+          const response = await this.$http.post(`param`, this.formParamList)
+          if (response.data.code === 0) {
+            this.loadData()
+            this.addParamList = false
             this.$message({
-              type: 'success',
-              message: '添加成功'
-            });
-          }else {
+              type: `success`,
+              message: `添加成功`
+            })
+          } else {
             this.$message({
-              type: 'error',
-              message: '添加失败'
-            });
+              type: `error`,
+              message: `添加失败`
+            })
           }
-        }else {
-          this.$message.error('请查看是否有选项未填写或填错项');
-          return false;
+        } else {
+          this.$message.error(`请查看是否有选项未填写或填错项`)
+          return false
         }
       })
     },
     // 打开修改并赋予信息
     openChange(param) {
-      this.changeParam = true;
-      this.formParamList.paramName = param.paramName;
-      this.formParamList.id = param.id;
-      this.formParamList.paramValue = param.paramValue;
-      this.formParamList.paramNote = param.paramNote;
+      this.changeParam = true
+      this.formParamList.paramName = param.paramName
+      this.formParamList.id = param.id
+      this.formParamList.paramValue = param.paramValue
+      this.formParamList.paramNote = param.paramNote
     },
     // 修改参数
-  async  changeData() {
-      const response = await this.$http.post(`param/updateParam`, this.formParamList);
-      if(response.data.code === 0) {
-        this.loadData();
-        this.changeParam = false;
+    async  changeData() {
+      const response = await this.$http.post(`param/updateParam`, this.formParamList)
+      if (response.data.code === 0) {
+        this.loadData()
+        this.changeParam = false
         this.$message({
-          type: 'success',
-          message: '修改成功'
-        });
-      }else {
+          type: `success`,
+          message: `修改成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '修改失败'
-        });
-        }
+          type: `error`,
+          message: `修改失败`
+        })
+      }
     },
 
     // 清空表单数据
     handleEditDialogClose() {
       for (var key in this.formParamList) {
-        this.formParamList[key] = '';
+        this.formParamList[key] = ``
       };
-      this.current = 1;
-      this.pagesize = 8;
+      this.current = 1
+      this.pagesize = 8
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-      if(this.userName !== '' || this.company !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.pagesize = val
+      if (this.userName !== `` || this.company !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
     },
     handleCurrentChange(val) {
-      this.current = val;
-      if(this.userName !== '' || this.company !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.current = val
+      if (this.userName !== `` || this.company !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
     },
-        // 导出表格所用
+    // 导出表格所用
     async exportExcel() {
-      let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1; 
-      this.pagesize = this.total;
-      await this.queryLook();
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.queryLook()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "参数管理_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr; 
-      this.pagesize = pagesize1;
-      this.queryLook();
-      return wbout;
-    },
+      this.current = curr
+      this.pagesize = pagesize1
+      this.queryLook()
+      return wbout
+    }
 
   }
-};
+}
 </script>
 
 <style>

+ 69 - 79
src/views/noCar/billway.vue

@@ -207,21 +207,21 @@ import FileSaver from "file-saver";
 import CsvExportor from "csv-exportor";
 import XLSX from "xlsx";
       export default {
-        data(){
-          return{
-            noCarWayBill:{
-              billNum:''
+        data() {
+          return {
+            noCarWayBill: {
+              billNum: ''
             },
              formUserList: {
             "file": ""
             },
-            tradeStatus:[
-              {"label":"上传失败","value":"-2"},
-              {"label":"结束指令上传失败","value":"-3"},
-              {"label":"未结束","value":"1"},
-              {"label":"开票中","value":"2"},
-            {"label":"开票完成","value":"3"},
-            {"label":"超时运单","value":"4"}],
+            tradeStatus: [
+              {"label": "上传失败", "value": "-2"},
+              {"label": "结束指令上传失败", "value": "-3"},
+              {"label": "未结束", "value": "1"},
+              {"label": "开票中", "value": "2"},
+            {"label": "开票完成", "value": "3"},
+            {"label": "超时运单", "value": "4"}],
             multipleSelection: [],
              optionone: [{
               value: 0,
@@ -230,11 +230,11 @@ import XLSX from "xlsx";
               value: 1,
               label: '历史运单'
             }],
-            billWayTable:[],
+            billWayTable: [],
             current: 1,
             pagesize: 8,
-             hightt:'0px',
-            total:''
+            hightt: '0px',
+            total: ''
           }
         },
         created() {
@@ -247,7 +247,7 @@ import XLSX from "xlsx";
               return value.toFixed(2)
             }
         },
-        methods:{
+        methods: {
            firstLoadData(){
             this.current = 1;
             this.pagesize = 8;
@@ -259,7 +259,7 @@ import XLSX from "xlsx";
             formData.append('current', this.current);
             formData.append('size', this.pagesize);
             for(var i in this.noCarWayBill){
-                formData.append(i,this.noCarWayBill[i]);
+                formData.append(i, this.noCarWayBill[i]);
             }
 
             const response = await this.$http.post(`noCar/findBillWay`, formData);
@@ -272,35 +272,32 @@ import XLSX from "xlsx";
     const file = content.file
     // let file = file.files[0] // 使用传统的input方法需要加上这一步
     const filename = file.name
-    if(!filename||typeof filename!='string'){
+    if(!filename||typeof filename!=='string'){
       this.$message('格式错误!请重新选择')
      return
     }
   let a = filename.split('').reverse().join('');
-  let types = a.substring(0,a.search(/\./)).split('').reverse().join('');
+  let types = a.substring(0, a.search(/\./)).split('').reverse().join('');
 
-    const fileType = ['xlsx', 'xlc', 'xlm', 'xls', 'xlt', 'xlw', 'csv'].some(item => item === types)
+    const fileType = ['xlsx', 'xlc', 'xlm', 'xls', 'xlt', 'xlw', 'csv'].some(item => item === types)// eslint-disable-line
     if (!fileType) {
       this.$message(fileType+'格式错误!请重新选择xlsx xls格式')
       return
     }
-    this.file2Xce(file).then(tabJson => {
+    this.file2Xce(file).then((tabJson) => {
       var billNums = '';
       if (tabJson && tabJson.length > 0) {
         this.xlsxJson = tabJson
         this.fileList = this.xlsxJson[0].sheet
         this.fileList.forEach((item, index, arr) => {
-           if(item['运单编号']!=null && item['运单编号']!='' && typeof item['运单编号']!='undefined'){
+           if(item['运单编号']!=null && item['运单编号']!=='' && typeof item['运单编号']!=='undefined'){
                billNums+= item['运单编号'].trim()+',';
            }
         });
-
       }
-      if(billNums!=''){
-        this.noCarWayBill.billNum =billNums.substring(0,billNums.length-1);
+      if(billNums!==''){
+        this.noCarWayBill.billNum =billNums.substring(0, billNums.length-1);
       }
-
-
     })
   },
   file2Xce (file) {
@@ -313,7 +310,7 @@ import XLSX from "xlsx";
         })
         const result = []
         var are = (this.wb.Sheets.Sheet1)['!ref'];
-        var areRe = are.replace('A1','A2');
+        var areRe = are.replace('A1', 'A2');
         (this.wb.Sheets.Sheet1)['!ref'] = areRe;
         this.wb.SheetNames.forEach((sheetName) => {
           result.push({
@@ -329,9 +326,8 @@ import XLSX from "xlsx";
   },
            // 下载模板
           DownloadTemplate() {
-            var url = hostUrl+"noCar/templateDownload?fileName=5"
+            var url = hostUrl+"noCar/templateDownload?fileName=5"// eslint-disable-line
             window.location.href= url;
-
           },
             handleRemove(file, fileList) {
           },
@@ -343,12 +339,11 @@ import XLSX from "xlsx";
           },
            handleSelectionChange(value){
                        this.multipleSelection = value;
-
-           },
+          },
          async updateStatus(){
              const formData = new FormData();
             formData.append('noCarWayBillStr', JSON.stringify(this.multipleSelection));
-            const response = await this.$http.post(`noCar/updateStatus`,formData);
+            const response = await this.$http.post(`noCar/updateStatus`, formData);
                   if(response.data.code === 0) {
                     this.loadData();
                     this.$message({
@@ -376,7 +371,7 @@ import XLSX from "xlsx";
       this.fullscreenLoading = true;
       const formData = new FormData();
       formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`noCar/batchImportNocarBillWay`,formData);
+      const response = await this.$http.post(`noCar/batchImportNocarBillWay`, formData);
       var {data: { code, msg, data }} = response;
       if(code === 0 && msg === '1') {
          this.fullscreenLoading = false;
@@ -392,11 +387,11 @@ import XLSX from "xlsx";
             var sheet = wb['Sheets']['Sheet1'];
             var replaceTemp = [];
             for(var i in sheet){
-              if(sheet[i]['v'] == '运单费用'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
+              if(sheet[i]['v'] === '运单费用'){
+                replaceTemp.push(i.replace(/[0-9]/g, ''));
                 continue;
               }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
+              if(replaceTemp.includes(i.replace(/[0-9]/g, ''))){
                 sheet[i]['t']='n';
               }
             }
@@ -409,20 +404,18 @@ import XLSX from "xlsx";
                                background: 'rgba(0, 0, 0, 0.7)'
                              });
              var recodes = [];
-            for(var j=1;j<=this.total/10000+1;j++){
+            for(var j=1; j<=this.total/10000+1; j++) {
                const formData = new FormData();
                 formData.append('current', j);
                 formData.append('size', 10000);
                 for(var i in this.noCarWayBill){
-                    formData.append(i,this.noCarWayBill[i]);
+                    formData.append(i, this.noCarWayBill[i]);
                 }
                 const response = await this.$http.post(`noCar/findBillWay`, formData);
                 if (response.data.code === 0) {
                 recodes = recodes.concat(response.data.data.records);
                 }
-            }
-           
-            
+       }
                // 设置当前日期
                     let time = new Date();
                     let year = time.getFullYear();
@@ -430,66 +423,63 @@ import XLSX from "xlsx";
                     let day = time.getDate();
                     let name = "无车运单查询列表_"+year + "" + month + "" + day;
                     let cloums = [
-                          {"title":"客户名称","key":"customerName"},
-                          {"title":"企业编号","key":"companyNum"},
-                          {"title":"公司名称","key":"companyName"},
-                          {"title":"运单号","key":"billNum"},
-                          {"title":"税号","key":"taxplayerCode"},
-                          {"title":"车牌号码","key":"plateNum"},
-                          {"title":"运单开始时间","key":"startTime"},
-                          {"title":"开始指令时间","key":"intfaceStartTime"},
-                          {"title":"运单结束时间","key":"predictEndTime"},
-                          {"title":"结束指令时间","key":"interfaceEndTime"},
-                          {"title":"运单开始地址","key":"sourceAddr"},
-                          {"title":"运单结束地址","key":"destAddr"},
-                          {"title":"运单费用(元)","key":"fee"},
-                          {"title":"运单状态","key":"billwayStatus"},
-                          {"title":"失败原因","key":"failReason"},
-                          {"title":"运单类型","key":"hisFlag"},
+                          {"title": "客户名称", "key": "customerName"},
+                          {"title": "企业编号", "key": "companyNum"},
+                          {"title": "公司名称", "key": "companyName"},
+                          {"title": "运单号", "key": "billNum"},
+                          {"title": "税号", "key": "taxplayerCode"},
+                          {"title": "车牌号码", "key": "plateNum"},
+                          {"title": "运单开始时间", "key": "startTime"},
+                          {"title": "开始指令时间", "key": "intfaceStartTime"},
+                          {"title": "运单结束时间", "key": "predictEndTime"},
+                          {"title": "结束指令时间", "key": "interfaceEndTime"},
+                          {"title": "运单开始地址", "key": "sourceAddr"},
+                          {"title": "运单结束地址", "key": "destAddr"},
+                          {"title": "运单费用(元)", "key": "fee"},
+                          {"title": "运单状态", "key": "billwayStatus"},
+                          {"title": "失败原因", "key": "failReason"},
+                          {"title": "运单类型", "key": "hisFlag"}
                     ];
-                    await this.exportExcelComm(cloums,recodes,name,loading);
-            
+                    await this.exportExcelComm(cloums, recodes, name, loading);
           },
           formatJson (filterVal, jsonData) {
-            return jsonData.map(v => filterVal.map(j => {
-              if(j == 'billwayStatus'){
-                 if(v[j] == 1){
+            return jsonData.map(v => filterVal.map((j) => {// eslint-disable-line
+              if(j === 'billwayStatus'){
+                 if(v[j] === 1){
                    return "未结束";
-                 } else if(v[j] == -2){
+                 } else if(v[j] === -2){
                    return "上传失败";
-                 }else if(v[j] == -3){
+                 }else if(v[j] === -3){
                    return "指令结束上传失败";
-                 }else if(v[j] == 2){
+                 }else if(v[j] === 2){
                    return "开票中";
-                 }else if(v[j] == 3){
+                 }else if(v[j] === 3){
                    return "开票完成";
                  }else {
                    return "超时运单";
                  }
-              }else if(j =='fee'){
+              }else if(j ==='fee'){
                   return v[j]/100;
-              }else if(j=='hisFlag'){
-                if(v[j] == 0){
+              }else if(j==='hisFlag'){
+                if(v[j] === 0){
                   return "实时运单";
                 }else{
                   return "历史运单";
                 }
-              }else if(j=='billNum'){
+              }else if( j==='billNum'){
                  return v[j]+'\t';
-              }
-              else{
-                  return v[j];
-              }
-              
+              }else{
+                return v[j];
+        }
               }));
           },
           // 导出Excel
-          exportExcelComm(columns,list,excelName,loading){
+          exportExcelComm(columns, list, excelName, loading){
                   require.ensure([], () => {
-                      const { export_json_to_excel } = require('@/vendor/Export2Excel');
+                      const { export_json_to_excel } = require('@/vendor/Export2Excel');// eslint-disable-line
                       let tHeader = []
                       let filterVal = []
-                      columns.forEach(item =>{
+                      columns.forEach((item) => {
                           tHeader.push(item.title)
                           filterVal.push(item.key)
                       })
@@ -497,7 +487,7 @@ import XLSX from "xlsx";
                       //   const data = this.formatJson(filterVal, list.slice(i*100000,(i+1)*100000>list.length?list.length:(i+1)*100000));
                       //   export_json_to_excel(tHeader, data, excelName+'_'+i);
                       // }
-                      const data = this.formatJson(filterVal,list);
+                      const data = this.formatJson(filterVal, list);
                       data.unshift(tHeader);
                        CsvExportor.downloadCsv(data, { tHeader }, excelName+".csv");
                       loading.close();

+ 22 - 24
src/views/noCar/billwayException.vue

@@ -191,7 +191,7 @@ import XLSX from "xlsx";
       export default {
         data(){
           return{
-            noCarWayBill:{
+            noCarWayBill: {
 
             },
              multipleSelection: [],
@@ -202,22 +202,22 @@ import XLSX from "xlsx";
               value: 1,
               label: '历史运单'
             }],
-            tradeStatus:[
-              {"label":"上传失败","value":"-2"},
-              {"label":"结束指令上传失败","value":"-3"},
-              {"label":"未结束","value":"1"},
-              {"label":"开票中","value":"2"},
-            {"label":"开票完成","value":"3"},
-            {"label":"超时运单","value":"4"}],
-            billWayTable:[],
-             hightt:'0px',
+            tradeStatus: [
+              {"label": "上传失败", "value": "-2"},
+              {"label": "结束指令上传失败", "value": "-3"},
+              {"label": "未结束", "value": "1"},
+              {"label": "开票中", "value": "2"},
+            {"label": "开票完成", "value": "3"},
+            {"label": "超时运单", "value": "4"}],
+            billWayTable: [],
+            hightt: '0px',
             current: 1,
             pagesize: 8,
-            total:''
+            total: ''
           }
         },
         created() {
-          this.heightt = tableHeight;
+          this.heightt = tableHeight;// eslint-disable-line
           this.loadData();
         },
         filters: {
@@ -226,7 +226,7 @@ import XLSX from "xlsx";
             }
         },
 
-        methods:{
+        methods: {
            firstLoadData(){
             this.current = 1;
             this.pagesize = 8;
@@ -238,7 +238,7 @@ import XLSX from "xlsx";
             formData.append('current', this.current);
             formData.append('size', this.pagesize);
             for(var i in this.noCarWayBill){
-                formData.append(i,this.noCarWayBill[i]);
+                formData.append(i, this.noCarWayBill[i]);
             }
             const response = await this.$http.post(`noCar/findBillWayException`, formData);
             if (response.data.code === 0) {
@@ -247,13 +247,12 @@ import XLSX from "xlsx";
             }
           },
           handleSelectionChange(value){
-                       this.multipleSelection = value;
-
+             this.multipleSelection = value;
            },
            async updateStatus(){
              const formData = new FormData();
             formData.append('noCarWayBillStr', JSON.stringify(this.multipleSelection));
-            const response = await this.$http.post(`noCar/updateStatus`,formData);
+            const response = await this.$http.post(`noCar/updateStatus`, formData);
                   if(response.data.code === 0) {
                     this.loadData();
                     this.$message({
@@ -277,14 +276,14 @@ import XLSX from "xlsx";
             this.current = val;
               this.loadData();
           },
-       async     exportExcel() {
+       async exportExcel() {
        const loading = this.$loading({
                              lock: true,
                              text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
                              spinner: 'el-icon-loading',
                              background: 'rgba(0, 0, 0, 0.7)'
                            });
-         let curr = this.current;
+      let curr = this.current;
       let pagesize1 = this.pagesize;
       this.current = 1;
       this.pagesize = this.total;
@@ -297,7 +296,7 @@ import XLSX from "xlsx";
       let name = "无车异常运单查询列表_"+year + "" + month + "" + day;
       /* generate workbook object from table */
       //  .table要导出的是哪一个表格
-      var wb = XLSX.utils.table_to_book(document.querySelector(".table"),{ raw: true });
+      var wb = XLSX.utils.table_to_book(document.querySelector(".table"), { raw: true });
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
         bookType: "xlsx",
@@ -311,15 +310,14 @@ import XLSX from "xlsx";
           name + ".xlsx"
         );
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
+      this.current = curr;
       this.pagesize = pagesize1;
       this.loadData();
       loading.close();
       return wbout;
-    },
-        }
+      }
+ }
       };
 </script>
 <style>

+ 144 - 143
src/views/noCar/calculateInfo.vue

@@ -92,153 +92,154 @@
     </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:{
-              companyLongName:'',
-              buyerTaxpayerCode:'',
-              buyerName:'',
-              invoiceMakeTime:'',
-              tradeId:'',
-              calculateTime:''
-            },
-            calculateInfo:[],
-            current: 1,
-             hightt:'0px',
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-         filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
+import FileSaver from "file-saver"
+import CsvExportor from "csv-exportor"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        companyLongName: ``,
+        buyerTaxpayerCode: ``,
+        buyerName: ``,
+        invoiceMakeTime: ``,
+        tradeId: ``,
+        calculateTime: ``
+      },
+      calculateInfo: [],
+      current: 1,
+      hightt: `0px`,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
 
-            formData.append('companyLongName', this.formCondition.companyLongName);
-            formData.append('buyerTaxpayerCode', this.formCondition.buyerTaxpayerCode);
-            formData.append('buyerName', this.formCondition.buyerName);
-            formData.append('invoiceMakeTime', this.formCondition.invoiceMakeTime);
-            formData.append('calculateTime', this.formCondition.calculateTime);
-            formData.append('tradeId', this.formCondition.tradeId);
-            const response = await this.$http.post(`noCar/findNocarCalculateInfo`, formData);
-            if (response.data.code === 0) {
-              this.calculateInfo = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
+      formData.append(`companyLongName`, this.formCondition.companyLongName)
+      formData.append(`buyerTaxpayerCode`, this.formCondition.buyerTaxpayerCode)
+      formData.append(`buyerName`, this.formCondition.buyerName)
+      formData.append(`invoiceMakeTime`, this.formCondition.invoiceMakeTime)
+      formData.append(`calculateTime`, this.formCondition.calculateTime)
+      formData.append(`tradeId`, this.formCondition.tradeId)
+      const response = await this.$http.post(`noCar/findNocarCalculateInfo`, formData)
+      if (response.data.code === 0) {
+        this.calculateInfo = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
 
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-          formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-            for(var i in sheet){
-              if(sheet[i]['v'] == '费用'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-       async    exportExcel() {
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-        
-        var recodes = [];
-            for(var j=1;j<=this.total/10000+1;j++){
-               const formData = new FormData();
-                formData.append('current', j);
-                formData.append('size', 10000);
-                for(var i in this.formCondition){
-                    formData.append(i,this.formCondition[i]);
-                }
-                const response = await this.$http.post(`noCar/findNocarCalculateInfo`, formData);
-                if (response.data.code === 0) {
-                recodes = recodes.concat(response.data.data.records);
-                }
-            }
-      // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "无车计费查询列表_"+year + "" + month + "" + day;
-       let cloums = [
-                          {"title":"主体名称","key":"companyLongName"},
-                          {"title":"购方名称","key":"buyerName"},
-                          {"title":"购方税号","key":"buyerTaxpayerCode"},
-                          {"title":"交易Id","key":"tradeId"},
-                          {"title":"费用","key":"fee"},
-                          {"title":"计费时间","key":"calculateTime"},
-                          {"title":"开票时间","key":"invoiceMakeTime"},
-                    ];
-      await this.exportExcelComm(cloums,recodes,name,loading);
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `费用`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
     },
-     // 导出Excel
-          exportExcelComm(columns,list,excelName,loading){
-                  require.ensure([], () => {
-                      const { export_json_to_excel } = require('@/vendor/Export2Excel');
-                      let tHeader = []
-                      let filterVal = []
-                      columns.forEach(item =>{
-                          tHeader.push(item.title)
-                          filterVal.push(item.key)
-                      })
-                      // for(var i =0;i<list.length/200000;i++){
-                      //   const data = this.formatJson(filterVal, list.slice(i*200000,(i+1)*200000>list.length?list.length:(i+1)*200000));
-                      //   export_json_to_excel(tHeader, data, excelName+'_'+i);
-                      // }
-                      const data = this.formatJson(filterVal,list);
-                      data.unshift(tHeader);
-                      CsvExportor.downloadCsv(data, { tHeader }, excelName+".csv");
-                      loading.close();
-                  })
-            },
-            formatJson (filterVal, jsonData) {
-            return jsonData.map(v => filterVal.map(j => {
-              if(j=='buyerTaxpayerCode'){
-                 return v[j]+'\t';
-              }
-              return v[j];
-              
-              }));
-          },
-    
+    async    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+
+      var recodes = []
+      for (var j = 1; j <= this.total / 10000 + 1; j++) {
+        const formData = new FormData()
+        formData.append(`current`, j)
+        formData.append(`size`, 10000)
+        for (var i in this.formCondition) {
+          formData.append(i, this.formCondition[i])
+        }
+        const response = await this.$http.post(`noCar/findNocarCalculateInfo`, formData)
+        if (response.data.code === 0) {
+          recodes = recodes.concat(response.data.data.records)
         }
-      };
+      }
+      // 设置当前日期
+      let time = new Date()
+      let year = time.getFullYear()
+      let month = time.getMonth() + 1
+      let day = time.getDate()
+      let name = `无车计费查询列表_` + year + `` + month + `` + day
+      let cloums = [
+        {"title": `主体名称`, "key": `companyLongName`},
+        {"title": `购方名称`, "key": `buyerName`},
+        {"title": `购方税号`, "key": `buyerTaxpayerCode`},
+        {"title": `交易Id`, "key": `tradeId`},
+        {"title": `费用`, "key": `fee`},
+        {"title": `计费时间`, "key": `calculateTime`},
+        {"title": `开票时间`, "key": `invoiceMakeTime`}
+      ]
+      await this.exportExcelComm(cloums, recodes, name, loading)
+    },
+    // 导出Excel
+    exportExcelComm(columns, list, excelName, loading) {
+      require.ensure([], () => {
+        const { export_json_to_excel } = require(`@/vendor/Export2Excel`)// eslint-disable-line
+        let tHeader = []
+        let filterVal = []
+        columns.forEach((item) => {
+          tHeader.push(item.title)
+          filterVal.push(item.key)
+        })
+        // for(var i =0;i<list.length/200000;i++){
+        //   const data = this.formatJson(filterVal, list.slice(i*200000,(i+1)*200000>list.length?list.length:(i+1)*200000));
+        //   export_json_to_excel(tHeader, data, excelName+'_'+i);
+        // }
+        const data = this.formatJson(filterVal, list)
+        data.unshift(tHeader)
+        CsvExportor.downloadCsv(data, { tHeader }, excelName + `.csv`)
+        loading.close()
+      })
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) => {
+        return filterVal.map((j) => {
+          if (j === `buyerTaxpayerCode`) {
+            return v[j] + `\t`
+          }
+          return v[j]
+        })
+      })
+    }
+
+  }
+}
 </script>
 <style>
 .calculateInfo_container {

+ 88 - 89
src/views/noCar/calculateInfostatis.vue

@@ -56,107 +56,106 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-            },
-            calculateInfo:[],
-            current: 1,
-             hightt:'0px',
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-         // this.loadData();
-        },
-         filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
-            }
-            const response = await this.$http.post(`noCar/findNocarCalculateInfoStatis`, formData);
-            if (response.data.code === 0) {
-              this.calculateInfo = response.data.data;
-            }
-          },
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+      },
+      calculateInfo: [],
+      current: 1,
+      hightt: `0px`,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    // this.loadData();
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
+      }
+      const response = await this.$http.post(`noCar/findNocarCalculateInfoStatis`, formData)
+      if (response.data.code === 0) {
+        this.calculateInfo = response.data.data
+      }
+    },
 
-         formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-            for(var i in sheet){
-              if(sheet[i]['v'] == '费用个数'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-       async    exportExcel() {
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-         let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `费用个数`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
+    async    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "无车计费查询列表_"+year + "" + month + "" + day;
+      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 });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .calculateInfo_container {

+ 127 - 129
src/views/noCar/hcInvoice.vue

@@ -94,148 +94,146 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-            },
-           invoiceTable:[],
-            hightt:'0px',
-          }
-        },
-        created() {
-          this.heightt = tableHeight+100;
-
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-          // 列表展示
-          async loadData() {
-            if(this.formCondition.month == null || this.formCondition.month==''){
-              this.$message({
-                              type: 'error',
-                              message:'请先选择需要查询的月份'
-                              });
-                              return
-            }
-            const loading = this.$loading({
-                               lock: true,
-                               text: '系统正在努力接收中...',
-                               spinner: 'el-icon-loading',
-                               background: 'rgba(0, 0, 0, 0.7)'
-                             });
-            const response = await this.$http.post('noCarService/hCVoiceQuery', this.formCondition);
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+      },
+      invoiceTable: [],
+      hightt: `0px`
+    }
+  },
+  created() {
+    this.heightt = tableHeight + 100  // eslint-disable-line
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    // 列表展示
+    async loadData() {
+      if (this.formCondition.month === null || this.formCondition.month === ``) {
+        this.$message({
+          type: `error`,
+          message: `请先选择需要查询的月份`
+        })
+        return
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const response = await this.$http.post(`noCarService/hCVoiceQuery`, this.formCondition)
 
-            loading.close();
-            if (response.data.code === 0) {
-              this.invoiceTable = response.data.data.result;
-            }else{
-              this.$message({
-                              type: 'error',
-                              message: ''+response.data.msg
-                          });
-            }
-          },
-          // 列表展示
-          async updateData() {
-            if(this.formCondition.month == null || this.formCondition.month==''){
-              this.$message({
-                              type: 'error',
-                              message:'请先选择需要查询的月份'
-                              });
-                              return
-            }
-            const loading = this.$loading({
-                               lock: true,
-                               text: '系统正在努力更新...',
-                               spinner: 'el-icon-loading',
-                               background: 'rgba(0, 0, 0, 0.7)'
-                             });
-            const response = await this.$http.post('noCarService/hCVoiceUpdate', this.formCondition);
-            loading.close();
-            if (response.data.code === 0) {
-              this.$message.success('更新成功');
-            }else{
-              this.$message({
-                              type: 'error',
-                              message: ''+response.data.msg
-                          });
-            }
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-          formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
+      loading.close()
+      if (response.data.code === 0) {
+        this.invoiceTable = response.data.data.result
+      } else {
+        this.$message({
+          type: `error`,
+          message: `` + response.data.msg
+        })
+      }
+    },
+    // 列表展示
+    async updateData() {
+      if (this.formCondition.month === null || this.formCondition.month === ``) {
+        this.$message({
+          type: `error`,
+          message: `请先选择需要查询的月份`
+        })
+        return
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力更新...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const response = await this.$http.post(`noCarService/hCVoiceUpdate`, this.formCondition)
+      loading.close()
+      if (response.data.code === 0) {
+        this.$message.success(`更新成功`)
+      } else {
+        this.$message({
+          type: `error`,
+          message: `` + response.data.msg
+        })
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
 
-            for(var i in sheet){
-              if(sheet[i]['v'] == '金额'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-       async     exportExcel() {
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-         let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `金额`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
+    async     exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "无车红冲发票查询列表_"+year + "" + month + "" + day;
+      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 });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .invoice_container {

+ 102 - 116
src/views/noCar/invoice.vue

@@ -265,29 +265,29 @@ import XLSX from "xlsx";
       export default {
         data(){
           return{
-            formCondition:{
-              invoiceCode:'',
-              invoiceNum:'',
-              waybillNum:'',
-              plateNum:''
+            formCondition: {
+              invoiceCode: '',
+              invoiceNum: '',
+              waybillNum: '',
+              plateNum: ''
             },
-            invoiceStatusA:[
-            {"label":"待开票","value":"1"},
-            {"label":"开票中","value":"2"},
-            {"label":"开票完成","value":"3"}
+            invoiceStatusA: [
+            {"label": "待开票", "value": "1"},
+            {"label": "开票中", "value": "2"},
+            {"label": "开票完成", "value": "3"}
            ],
             formUserList: {
             "file": ""
             },
-            invoiceTable:[],
-            hightt:'0px',
+            invoiceTable: [],
+            hightt: '0px',
             current: 1,
             pagesize: 8,
-            total:''
+            total: ''
           }
         },
         created() {
-          this.heightt = tableHeight-110;
+          this.heightt = tableHeight-110;// eslint-disable-line
           this.loadData();
         },
          filters: {
@@ -295,7 +295,7 @@ import XLSX from "xlsx";
               return value.toFixed(2)
             }
         },
-        methods:{
+        methods: {
            firstLoadData(){
             this.current = 1;
             this.pagesize = 8;
@@ -307,7 +307,7 @@ import XLSX from "xlsx";
             formData.append('current', this.current);
             formData.append('size', this.pagesize);
              for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
+                formData.append(i, this.formCondition[i]);
             }
             const response = await this.$http.post('noCar/findNocarInvoices', formData);
             if (response.data.code === 0) {
@@ -316,23 +316,22 @@ import XLSX from "xlsx";
             }
           },
           importExcel (content) {
-
     const file = content.file
     // let file = file.files[0] // 使用传统的input方法需要加上这一步
     const filename = file.name
-    if(!filename||typeof filename!='string'){
+    if(!filename||typeof filename !== 'string'){
       this.$message('格式错误!请按照模板中格式')
      return
     }
   let a = filename.split('').reverse().join('');
-  let types = a.substring(0,a.search(/\./)).split('').reverse().join('');
+  let types = a.substring(0, a.search(/\./)).split('').reverse().join('');
 
-    const fileType = ['xlsx', 'xlc', 'xlm', 'xls', 'xlt', 'xlw', 'csv'].some(item => item === types)
+    const fileType = ['xlsx', 'xlc', 'xlm', 'xls', 'xlt', 'xlw', 'csv'].some((item) => item === types) // eslint-disable-line
     if (!fileType) {
       this.$message(types+'格式错误!请按照模板中格式')
       return
     }
-    this.file2Xce(file).then(tabJson => {
+    this.file2Xce(file).then((tabJson) => {
       var billNums = '';
       var invoiceCodes = '';
       var invoiceNums = '';
@@ -340,53 +339,50 @@ import XLSX from "xlsx";
       if (tabJson && tabJson.length > 0) {
         this.xlsxJson = tabJson;
         this.fileList = this.xlsxJson[0].sheet;
-        debugger;
         this.fileList.forEach((item, index, arr) => {
-           if(item['运单编号']!=null && item['运单编号']!='' && typeof item['运单编号']!='undefined'){
+           if(item['运单编号']!==null && item['运单编号']!=='' && typeof item['运单编号']!=='undefined'){
                billNums+= item['运单编号'].trim()+',';
            }
-           if(item['发票号码']!=null && item['发票号码']!='' && typeof item['发票号码']!='undefined'){
+           if(item['发票号码']!==null && item['发票号码']!=='' && typeof item['发票号码']!=='undefined'){
                invoiceNums+= item['发票号码'].trim()+',';
            }else{
              invoiceNums+= '#,';
            }
-            if(item['发票代码']!=null && item['发票代码']!='' && typeof item['发票代码']!='undefined'){
+            if(item['发票代码']!==null && item['发票代码']!=='' && typeof item['发票代码']!=='undefined'){
                invoiceCodes+= item['发票代码'].trim()+',';
            }else{
              invoiceNums+= '#,';
            }
-           if(item['车牌号']!=null && item['车牌号']!='' && typeof item['车牌号']!='undefined'){
+           if(item['车牌号']!==null && item['车牌号']!=='' && typeof item['车牌号']!=='undefined'){
                carNums+= item['车牌号'].trim()+',';
            }
         });
-
       }
-      if(billNums!=''){
-        this.formCondition.waybillNum =billNums.substring(0,billNums.length-1);
+      if(billNums !== '') {
+        this.formCondition.waybillNum =billNums.substring(0, billNums.length-1);
       }
-      if(invoiceNums!=null || invoiceNums!=''){
-        this.formCondition.invoiceCode =invoiceCodes.substring(0,invoiceCodes.length-1);
+      if(invoiceNums!==null || invoiceNums!=='') {
+        this.formCondition.invoiceCode =invoiceCodes.substring(0, invoiceCodes.length-1);
       }
-
-      if(invoiceCodes!=''){
-         this.formCondition.invoiceNum =invoiceNums.substring(0,invoiceNums.length-1);
+      if(invoiceCodes!=='') {
+         this.formCondition.invoiceNum =invoiceNums.substring(0, invoiceNums.length-1);
       }
-      if(carNums!=null || carNums!=''){
-        this.formCondition.plateNum = carNums.substring(0,carNums.length-1);
+      if(carNums !== null || carNums !== '') {
+        this.formCondition.plateNum = carNums.substring(0, carNums.length-1);
       }
     })
   },
-  file2Xce (file) {
-    return new Promise(function (resolve, reject) {
+  file2Xce(file) {
+    return new Promise(function(resolve, reject) {
       const reader = new FileReader()
-      reader.onload = function (e) {
+      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');
+        var areRe = are.replace('A1', 'A2');
         (this.wb.Sheets.Sheet1)['!ref'] = areRe;
         this.wb.SheetNames.forEach((sheetName) => {
           result.push({
@@ -402,25 +398,22 @@ import XLSX from "xlsx";
   },
            // 下载模板
           DownloadTemplate() {
-            var url = hostUrl+"noCar/templateDownload?fileName=4"
-            window.location.href= url;
-
+            var url = hostUrl + "noCar/templateDownload?fileName=4"// eslint-disable-line
+            window.location.href = url;
           },
-            handleRemove(file, fileList) {
+          handleRemove(file, fileList) {
           },
-
           handlePreview(file) {
           },
-          handleSuccess (a) {
+          handleSuccess(a) {
             this.formUserList.file = a.raw;
           },
              // 批量上传模板信息
     async batchUpload() {
-
-         const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
-      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
+       const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
+       let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
        let AllUpExt = ".xlsx";
-       if( extName != AllUpExt){
+       if (extName !== AllUpExt) {
           this.$message.error('格式错误!请重新选择');
           return false;
     }
@@ -438,13 +431,13 @@ import XLSX from "xlsx";
               });
       const formData = new FormData();
       formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`noCar/batchImportNocarInvoices`,formData);
+      const response = await this.$http.post(`noCar/batchImportNocarInvoices`, formData);
       var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === '1') {
+      if (code === 0 && msg === '1') {
           loading.close();
          this.invoiceTable = response.data.data;
          this.total = response.data.data.length;
-      }else {
+      } else {
         loading.close();
         this.$message.error('数据存在错误,请检查文件中数据');
       }
@@ -458,17 +451,17 @@ import XLSX from "xlsx";
             this.current = val;
               this.loadData();
           },
-          formartNum(wb){
+          formartNum(wb) {
             var sheet = wb['Sheets']['Sheet1'];
             var replaceTemp = [];
 
-            for(var i in sheet){
-              if(sheet[i]['v'] == '交易金额'||sheet[i]['v'] == "价税合计"||sheet[i]['v'] == "税额"||sheet[i]['v'] == "金额"||sheet[i]['v'] == "税率"){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
+            for(var i in sheet) {
+               if(sheet[i]['v'] === '交易金额' || sheet[i]['v'] === "价税合计" || sheet[i]['v'] === "税额" || sheet[i]['v'] === "金额" || sheet[i]['v'] === "税率") {
+                replaceTemp.push(i.replace(/[0-9]/g, ''));
                 continue;
               }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
+               if (replaceTemp.includes(i.replace(/[0-9]/g, ''))) {
+                sheet[i]['t'] = 'n';
               }
             }
           },
@@ -523,20 +516,18 @@ import XLSX from "xlsx";
                                background: 'rgba(0, 0, 0, 0.7)'
                              });
             var recodes = [];
-            for(var j=1;j<=this.total/10000+1;j++){
-
+            for(var j = 1; j<=this.total/10000+1; j++){
               const formData = new FormData();
               formData.append('current', j);
               formData.append('size', 10000);
               for(var i in this.formCondition){
-                  formData.append(i,this.formCondition[i]);
+                  formData.append(i, this.formCondition[i]);
               }
               const response = await this.$http.post('noCar/findNocarInvoices', formData);
                if (response.data.code === 0) {
                 recodes = recodes.concat(response.data.data.records);
                 }
             }
-
                // 设置当前日期
                     let time = new Date();
                     let year = time.getFullYear();
@@ -544,89 +535,84 @@ import XLSX from "xlsx";
                     let day = time.getDate();
                     let name = "无车发票查询列表_"+year + "" + month + "" + day;
                     let cloums = [
-                      {"title":"企业编号","key":"companyNum"},
-                      {"title":"公司名称","key":"buyerName"},
-                      {"title":"运单号","key":"waybillNum"},
-                      {"title":"购方税号","key":"buyerTaxpayerCode"},
-                      {"title":"车牌号码","key":"plateNum"},
-                      {"title":"运单开始时间","key":"waybillStartTime"},
-                      {"title":"运单结束时间","key":"waybillEndTime"},
-                      {"title":"销方税号","key":"sellerTaxpayerCode"},
-                      {"title":"销方名称","key":"sellerName"},
-                      {"title":"入口收费站","key":"enStation"},
-                      {"title":"出口收费站","key":"exStation"},
-                      {"title":"发票代码","key":"invoiceCode"},
-                      {"title":"发票号码","key":"invoiceNum"},
-                      {"title":"交易Id","key":"transactionId"},
-                      {"title":"开票时间","key":"invoiceMakeTime"},
-                      {"title":"交易时间","key":"exTime"},
-                      {"title":"交易金额(元)","key":"fee"},
-                      {"title":"价税合计(元)","key":"totalAmount"},
-                      {"title":"税额(元)","key":"totalTaxAmount"},
-                      {"title":"金额(元)","key":"amount"},
-                      {"title":"税率","key":"taxRate"},
-                      {"title":"扣费时间","key":"calculateTime"},
-                      {"title":"运单状态","key":"billStatus"},
-                      {"title":"发票状态","key":"invoiceStatus"},
-                      {"title":"发票状态信息","key":"msg"},
-                      {"title":"预览地址","key":"invoiceHtmlUrl"},
-                      {"title":"下载地址","key":"invoiceUrl"}
-
-
+                      {"title": "企业编号", "key": "companyNum"},
+                      {"title": "公司名称", "key": "buyerName"},
+                      {"title": "运单号", "key": "waybillNum"},
+                      {"title": "购方税号", "key": "buyerTaxpayerCode"},
+                      {"title": "车牌号码", "key": "plateNum"},
+                      {"title": "运单开始时间", "key": "waybillStartTime"},
+                      {"title": "运单结束时间", "key": "waybillEndTime"},
+                      {"title": "销方税号", "key": "sellerTaxpayerCode"},
+                      {"title": "销方名称", "key": "sellerName"},
+                      {"title": "入口收费站", "key": "enStation"},
+                      {"title": "出口收费站", "key": "exStation"},
+                      {"title": "发票代码", "key": "invoiceCode"},
+                      {"title": "发票号码", "key": "invoiceNum"},
+                      {"title": "交易Id", "key": "transactionId"},
+                      {"title": "开票时间", "key": "invoiceMakeTime"},
+                      {"title": "交易时间", "key": "exTime"},
+                      {"title": "交易金额(元)", "key": "fee"},
+                      {"title": "价税合计(元)", "key": "totalAmount"},
+                      {"title": "税额(元)", "key": "totalTaxAmount"},
+                      {"title": "金额(元)", "key": "amount"},
+                      {"title": "税率", "key": "taxRate"},
+                      {"title": "扣费时间", "key": "calculateTime"},
+                      {"title": "运单状态", "key": "billStatus"},
+                      {"title": "发票状态", "key": "invoiceStatus"},
+                      {"title": "发票状态信息", "key": "msg"},
+                      {"title": "预览地址", "key": "invoiceHtmlUrl"},
+                      {"title": "下载地址", "key": "invoiceUrl"}
                     ];
-                    this.exportExcelComm(cloums,recodes,name,loading)
-
+                    this.exportExcelComm(cloums, recodes, name, loading)
           },
           formatJson (filterVal, jsonData) {
-            return jsonData.map(v => filterVal.map(j => {
-             if(j == 'billStatus'){
-                 if(v[j] == 1){
+            return jsonData.map(v => filterVal.map((j) => {  // eslint-disable-line
+             if(j === 'billStatus'){
+                 if(v[j] === 1){
                    return "未结束";
-                 } else if(v[j] == -2){
+                 } else if(v[j] === -2){
                    return "上传失败";
-                 }else if(v[j] == -3){
+                 }else if(v[j] === -3){
                    return "指令结束上传失败";
-                 }else if(v[j] == 2){
+                 }else if(v[j] === 2){
                    return "开票中";
-                 }else if(v[j] == 3){
+                 }else if(v[j] === 3){
                    return "开票完成";
                  }else {
                    return "超时运单";
                  }
-              } else if(j == 'invoiceStatus'){
-                 if(v[j] == 1){
+              } else if(j === 'invoiceStatus'){
+                 if(v[j] === 1){
                    return "待开票";
-                 } else if(v[j] == 2){
+                 } else if(v[j] === 2){
                    return "开票中";
                  }else{
                    return "开票完成";
                  }
-              }else if(j =='fee'){
+              }else if(j ==='fee'){
                   return v[j]/100;
-              }else if(j =='totalAmount'){
+              }else if(j ==='totalAmount'){
                   return v[j]/100;
-              }else if(j =='totalTaxAmount'){
+              }else if(j ==='totalTaxAmount'){
                   return v[j]/100;
-              }else if(j =='amount'){
+              }else if(j ==='amount'){
                   return v[j]/100;
-              }else if(j=='waybillNum' || j=='invoiceCode' || j=='invoiceNum'){
+              }else if(j==='waybillNum' || j==='invoiceCode' || j==='invoiceNum'){
                  return v[j]+'\t';
               }else{
                   return v[j];
               }
-
               }));
           },
           // 导出Excel
-          exportExcelComm(columns,list,excelName,loading){
+          exportExcelComm(columns, list, excelName, loading){
                   let tHeader = []
                       let filterVal = []
-                      columns.forEach(item =>{
-                          tHeader.push(item.title)
-                          filterVal.push(item.key)
-                      })
-
-                     const data = this.formatJson(filterVal,list);
+                      columns.forEach((item) => {
+                          tHeader.push (item.title)// eslint-disable-line
+                          filterVal.push (item.key)// eslint-disable-line
+                      });
+                     const data = this.formatJson(filterVal, list);
                       data.unshift(tHeader);
                      CsvExportor.downloadCsv(data, { tHeader }, excelName+".csv");
                       loading.close();

+ 131 - 131
src/views/noCar/mothaccount.vue

@@ -79,143 +79,143 @@
     </div>
 </template>
 <script type="text/javascript">
-import CsvExportor from "csv-exportor";
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-             current: 1,
-             pagesize: 1000,
-             total:'',
-            formCondition:{
-            },
-           invoiceTable:[],
-            hightt:'0px',
-          }
-        },
-        created() {
-          this.heightt = tableHeight+100;
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-          // 列表展示
-          async loadData() {
-            this.formCondition['pageNo'] = this.current;
-            const response = await this.$http.post('noCarService/monthAccQuery', this.formCondition);
-
-            if (response.data.code === 0) {
-              this.invoiceTable = response.data.data.result;
-              this.total = response.data.data.totalCount;
-            }else{
-              this.$message({
-                              type: 'error',
-                              message: ''+response.data.msg
-                          });
-            }
-          },
-           async updateData() {
-            this.formCondition['pageNo'] = 1;
-            const response = await this.$http.post('noCarService/monthAccUpdate', this.formCondition);
-
-            if (response.data.code === 0) {
-               this.$message({
-                  type: 'success',
-                  message: '更新成功'
-              });
-            }else{
-              this.$message({
-                              type: 'error',
-                              message: ''+response.data.msg
-                          });
-            }
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-          formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
+import CsvExportor from "csv-exportor"
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      current: 1,
+      pagesize: 1000,
+      total: ``,
+      formCondition: {
+      },
+      invoiceTable: [],
+      hightt: `0px`
+    }
+  },
+  created() {
+    this.heightt = tableHeight + 100 // eslint-disable-line
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    // 列表展示
+    async loadData() {
+      this.formCondition[`pageNo`] = this.current
+      const response = await this.$http.post(`noCarService/monthAccQuery`, this.formCondition)
 
-            for(var i in sheet){
-              if(sheet[i]['v'] == '金额'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-       async     exportExcel() {
-        const loading = this.$loading({
-                              lock: true,
-                              text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                              spinner: 'el-icon-loading',
-                              background: 'rgba(0, 0, 0, 0.7)'
-                            });
-        const response = await this.$http.post('noCarService/monthAccQueryAll');
+      if (response.data.code === 0) {
+        this.invoiceTable = response.data.data.result
+        this.total = response.data.data.totalCount
+      } else {
+        this.$message({
+          type: `error`,
+          message: `` + response.data.msg
+        })
+      }
+    },
+    async updateData() {
+      this.formCondition[`pageNo`] = 1
+      const response = await this.$http.post(`noCarService/monthAccUpdate`, this.formCondition)
 
-        if (response.data.code === 0) {
-            let recodes = response.data.data;
-            let time = new Date();
-            let year = time.getFullYear();
-            let month = time.getMonth() + 1;
-            let day = time.getDate();
-            let name = "无车月账单_"+year + "" + month + "" + day;
-            let cloums = [
-               {"title":"企业名称","key":"companyName"},
-               {"title":"购方名称","key":"buyerName"},
-               {"title":"购方税号","key":"buyerTaxpayerCode"},
-               {"title":"运单编号","key":"waybillNum"},
-               {"title":"交易id","key":"tradeId"},
-               {"title":"入口站名","key":"enStation"},
-               {"title":"出口站名","key":"exStation"},
-               {"title":"交易时间","key":"exTime"},
-               {"title":"交易金额","key":"fee"},
-            ];
-             this.exportExcelComm(cloums,recodes,name,loading);
+      if (response.data.code === 0) {
+        this.$message({
+          type: `success`,
+          message: `更新成功`
+        })
+      } else {
+        this.$message({
+          type: `error`,
+          message: `` + response.data.msg
+        })
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
 
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `金额`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
         }
-      },
-       formatJson (filterVal, jsonData) {
-            return jsonData.map(v => filterVal.map(j => {
-              if(j =='fee'){
-                  return v[j]/100;
-              }else if(j=='waybillNum' || j=='buyerTaxpayerCode'){
-                 return v[j]+'\t';
-              }else{
-                  return v[j];
-              }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
+    async     exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const response = await this.$http.post(`noCarService/monthAccQueryAll`)
 
-              }));
-          },
-          // 导出Excel
-          exportExcelComm(columns,list,excelName,loading){
-                  let tHeader = []
-                      let filterVal = []
-                      columns.forEach(item =>{
-                          tHeader.push(item.title)
-                          filterVal.push(item.key)
-                      })
+      if (response.data.code === 0) {
+        let recodes = response.data.data
+        let time = new Date()
+        let year = time.getFullYear()
+        let month = time.getMonth() + 1
+        let day = time.getDate()
+        let name = `无车月账单_` + year + `` + month + `` + day
+        let cloums = [
+          {"title": `企业名称`, "key": `companyName`},
+          {"title": `购方名称`, "key": `buyerName`},
+          {"title": `购方税号`, "key": `buyerTaxpayerCode`},
+          {"title": `运单编号`, "key": `waybillNum`},
+          {"title": `交易id`, "key": `tradeId`},
+          {"title": `入口站名`, "key": `enStation`},
+          {"title": `出口站名`, "key": `exStation`},
+          {"title": `交易时间`, "key": `exTime`},
+          {"title": `交易金额`, "key": `fee`}
+        ]
+        this.exportExcelComm(cloums, recodes, name, loading)
+      }
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) => {
+        return filterVal.map((j) => {
+          if (j === `fee`) {
+            return v[j] / 100
+          } else if (j === `waybillNum` || j === `buyerTaxpayerCode`) {
+            return v[j] + `\t`
+          } else {
+            return v[j]
+          }
+        })
+      })
+    },
+    // 导出Excel
+    exportExcelComm(columns, list, excelName, loading) {
+      let tHeader = []
+      let filterVal = []
+      columns.forEach((item) => {
+        tHeader.push(item.title)
+        filterVal.push(item.key)
+      })
 
-                     const data = this.formatJson(filterVal,list);
-                      data.unshift(tHeader);
-                     CsvExportor.downloadCsv(data, { tHeader }, excelName+".csv");
-                      loading.close();
-            }
-        }
-      };
+      const data = this.formatJson(filterVal, list)
+      data.unshift(tHeader)
+      CsvExportor.downloadCsv(data, { tHeader }, excelName + `.csv`)
+      loading.close()
+    }
+  }
+}
 </script>
 <style>
 .invoice_container {

+ 81 - 82
src/views/noCar/nocarRec.vue

@@ -127,99 +127,98 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            nocarRecCarTable:[],
-            companyName:'',
-            carNum:'',
-            startTime:'',
-             hightt:'0px',
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('companyName', this.companyName);
-            formData.append('carNum', this.carNum);
-            formData.append('startTime',this.startTime);
-            formData.append('businessType', 2);
-            const response = await this.$http.post(`noCar/findCarRec`, formData);
-            if (response.data.code === 0) {
-              this.nocarRecCarTable = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-       async    exportExcel() {
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-         let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      nocarRecCarTable: [],
+      companyName: ``,
+      carNum: ``,
+      startTime: ``,
+      hightt: `0px`,
+      current: 1,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`companyName`, this.companyName)
+      formData.append(`carNum`, this.carNum)
+      formData.append(`startTime`, this.startTime)
+      formData.append(`businessType`, 2)
+      const response = await this.$http.post(`noCar/findCarRec`, formData)
+      if (response.data.code === 0) {
+        this.nocarRecCarTable = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "无车车辆备案查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .sefCarRec_container {

+ 75 - 75
src/views/personal/personal.vue

@@ -77,121 +77,121 @@ export default{
   data() {
     return {
       formUserList: {
-        "userName":"",
-        "password": "",
-        "price": "",
-        "id":"",
-        "name": "",
-        "phone":"",
-        "roleId": "",
-        "money": "",
-        "isLock":"",
-        "dutyParagraph": "",
-        "company": "",
-        "threshold": "",
-        "autoUpdate": ""
+        "userName": ``,
+        "password": ``,
+        "price": ``,
+        "id": ``,
+        "name": ``,
+        "phone": ``,
+        "roleId": ``,
+        "money": ``,
+        "isLock": ``,
+        "dutyParagraph": ``,
+        "company": ``,
+        "threshold": ``,
+        "autoUpdate": ``
       },
       // autoUpdate: 1,
       formupdateList: {
-        "id": "",
-        "autoUpdate": '',
+        "id": ``,
+        "autoUpdate": ``
       },
       formList: {
-        "id":"",
-        "userName":"",
-        "password": "",
+        "id": ``,
+        "userName": ``,
+        "password": ``
       },
       formthresholdList: {
-        "id": "",
-        "threshold": ""
+        "id": ``,
+        "threshold": ``
       },
       changepassword: false
     }
   },
   created() {
-    this.loadData();
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
   },
- filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
   methods: {
     async loadData() {
-      this.formUserList.userId = sessionStorage.getItem('userId');
-      this.formupdateList.id = sessionStorage.getItem('userId');
-      this.formthresholdList.id = sessionStorage.getItem('userId');
-        const response = await this.$http.get(`user/${this.formUserList.userId}`);
-        if (response.data.code === 0) {
-          this.formUserList = response.data.data;
-          this.formupdateList.autoUpdate = response.data.data.autoUpdate;
-        };
+      this.formUserList.userId = sessionStorage.getItem(`userId`)
+      this.formupdateList.id = sessionStorage.getItem(`userId`)
+      this.formthresholdList.id = sessionStorage.getItem(`userId`)
+      const response = await this.$http.get(`user/${this.formUserList.userId}`)
+      if (response.data.code === 0) {
+        this.formUserList = response.data.data
+        this.formupdateList.autoUpdate = response.data.data.autoUpdate
+      };
     },
     // 打开修改密码的弹框
     ChangeThePassword() {
-      this.changepassword = true;
-      this.formList.userName = this.formUserList.userName;
-      this.formList.id = this.formUserList.id;
+      this.changepassword = true
+      this.formList.userName = this.formUserList.userName
+      this.formList.id = this.formUserList.id
     },
     // 修改是否自动更新开票中的发票信息
     async updateInvoiceMessage() {
-      this.formupdateList.autoUpdate = this.formupdateList.autoUpdate;
-      const response = await this.$http.put(`user/auto`, this.formupdateList);
-      if(response.data.code === 0) {
-        this.loadData();
+      this.formupdateList.autoUpdate = this.formupdateList.autoUpdate
+      const response = await this.$http.put(`user/auto`, this.formupdateList)
+      if (response.data.code === 0) {
+        this.loadData()
         this.$message({
-          type: 'success',
-          message: '修改成功'
-        });
-      }else {
+          type: `success`,
+          message: `修改成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '修改失败'
-        });
+          type: `error`,
+          message: `修改失败`
+        })
       }
     },
     // 修改密码
     async resetPassword() {
-      const response = await this.$http.put(`user/restPassword`, this.formList);
-      if(response.data.code === 0) {
-        this.loadData();
-        this.changepassword = false;
-        this.$router.push('/login');
+      const response = await this.$http.put(`user/restPassword`, this.formList)
+      if (response.data.code === 0) {
+        this.loadData()
+        this.changepassword = false
+        this.$router.push(`/login`)
         this.$message({
-          type: 'success',
-          message: '修改成功'
-        });
-      }else {
+          type: `success`,
+          message: `修改成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '修改失败'
-        });
+          type: `error`,
+          message: `修改失败`
+        })
       }
     },
-    //更改阈值
+    // 更改阈值
     async changeThreshold() {
-      this.formthresholdList.id = this.formUserList.id;
-      this.formthresholdList.threshold = this.formUserList.threshold;
-      const response = await this.$http.put(`user`, this.formthresholdList);
-      if(response.data.code === 0) {
+      this.formthresholdList.id = this.formUserList.id
+      this.formthresholdList.threshold = this.formUserList.threshold
+      const response = await this.$http.put(`user`, this.formthresholdList)
+      if (response.data.code === 0) {
         this.$message({
-          type: 'success',
-          message: '修改成功'
-        });
-      }else {
+          type: `success`,
+          message: `修改成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '修改失败'
-        });
+          type: `error`,
+          message: `修改失败`
+        })
       }
     },
     handleEditDialogClose() {
       for (var key in this.formList) {
-        this.formList[key] = '';
+        this.formList[key] = ``
       };
-    },
+    }
   }
-};
+}
 </script>
 
 <style>

+ 120 - 123
src/views/platform/apply/already.vue

@@ -199,166 +199,163 @@
 </template>
 
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
       fullscreenLoading: false,
       usertabletwo: [],
-      roleId: '',
-       hightt:'0px',
+      roleId: ``,
+      hightt: `0px`,
       // codeNumber: '',
       formList: {
-        "companyName": "",
-        "customerName": "",
-        "carNum": "",
-        "startTime": "",
-        "endTime": "",
-        "invoiceMakeTime":""
+        "companyName": ``,
+        "customerName": ``,
+        "carNum": ``,
+        "startTime": ``,
+        "endTime": ``,
+        "invoiceMakeTime": ``
       },
       current: 1,
       pagesize: 8,
-      total:'',
-      companyList:[]
+      total: ``,
+      companyList: []
 
     }
   },
   created() {
-    this.heightt = tableHeight+20;
-    this.formList.customerName = sessionStorage.getItem('userName');
-    this.initCompanyList();
+    this.heightt = tableHeight + 20  // eslint-disable-line
+    this.formList.customerName = sessionStorage.getItem(`userName`)
+    this.initCompanyList()
   },
   methods: {
-     firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
 
-           // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('customerName', this.formList.customerName);
-            formData.append('companyName', this.formList.companyName);
-            formData.append('plateNum', this.formList.carNum);
-            formData.append('invoiceMakeTime', this.formList.invoiceMakeTime);
-            const response = await this.$http.post('selfCar/findSelfCarInvoices', formData);
-            if (response.data.code === 0) {
-              this.usertabletwo = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formList.customerName)
+      formData.append(`companyName`, this.formList.companyName)
+      formData.append(`plateNum`, this.formList.carNum)
+      formData.append(`invoiceMakeTime`, this.formList.invoiceMakeTime)
+      const response = await this.$http.post(`selfCar/findSelfCarInvoices`, formData)
+      if (response.data.code === 0) {
+        this.usertabletwo = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
     // 查询已开发票数据
     async queryLook() {
-
-       if(this.formList.invoiceMakeTime !=null && this.formList.invoiceMakeTime !=''){
-
-         this.formList.startTime = this.formList.invoiceMakeTime[0];
-         this.formList.endTime = this.formList.invoiceMakeTime[1];
-       }
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-      const response = await this.$http.post(`/selfCar/findSelfcarInvoiceByTime`, this.formList);
-      var {data: { code, msg, data }} = response;
-      if(code === 0) {
-         this.$message({
-          type: 'success',
-          message: '更新成功'
-        });
-      }else{
-        this.$message.error(msg);
+      if (this.formList.invoiceMakeTime != null && this.formList.invoiceMakeTime !== ``) {
+        this.formList.startTime = this.formList.invoiceMakeTime[0]
+        this.formList.endTime = this.formList.invoiceMakeTime[1]
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const response = await this.$http.post(`/selfCar/findSelfcarInvoiceByTime`, this.formList)
+      var {data: { code, msg, data }} = response
+      if (code === 0) {
+        this.$message({
+          type: `success`,
+          message: `更新成功`
+        })
+      } else {
+        this.$message.error(msg)
       }
-      loading.close();
+      loading.close()
     },
-    async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }
-            if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                  this.companyList = [{'companyName':'.'}];
-                                                }
-            this.formList.companyName = this.companyList[0]['companyName'];
-            this.loadData();
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      }
+      if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.formList.companyName = this.companyList[0][`companyName`]
+      this.loadData()
     },
     // 展示发票全部信息
     checkLook(user) {
-      window.location.href= user;
+      window.location.href = user
     },
- // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-          formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-            for(var i in sheet){
-              if(sheet[i]['v'] == '税额(元)'||sheet[i]['v'] == '价税合计(元)'||sheet[i]['v'] == '交易金额(元)'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-       async     exportExcel() {
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-         let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `税额(元)` || sheet[i][`v`] === `价税合计(元)` || sheet[i][`v`] === `交易金额(元)`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
+    async     exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "自有车发票查询列表_"+year + "" + month + "" + day;
+      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 });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
   }
-};
+}
 </script>
 
 <style>

+ 71 - 71
src/views/platform/apply/apply.vue

@@ -85,96 +85,96 @@ export default{
   data() {
     return {
       usertabletwo: [],
-      carNum: '',
-      startTime: '',
-      endTime: '',
-      companyName: '',
-       hightt:'0px',
-      customerName:'',
-       multipleSelection: [],
-       carIdStr:'',
+      carNum: ``,
+      startTime: ``,
+      endTime: ``,
+      companyName: ``,
+      hightt: `0px`,
+      customerName: ``,
+      multipleSelection: [],
+      carIdStr: ``,
       // codeNumber: '',
       formList: {},
-      companyList:[]
+      companyList: []
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.initCompanyList();
-    this.customerName = sessionStorage.getItem('userName');
+    this.heightt = tableHeight // eslint-disable-line
+    this.initCompanyList()
+    this.customerName = sessionStorage.getItem(`userName`)
   },
   methods: {
     // 查询交易数据
     async queryLook() {
-      this.startTime = (new Date(this.startTime)).getTime();
-      this.endTime = (new Date(this.endTime)).getTime();
-      this.formList.companyName = this.companyName;
-      this.formList.customerName = this.customerName;
-      this.formList.carNum = this.carNum;
-      this.formList.startTime = this.startTime;
-      this.formList.endTime = this.endTime;
-      const response = await this.$http.post(`/selfCar/getTradeList`, this.formList);
-      var {data: { code, msg, data }} = response;
-      if(code === 0) {
-        this.usertabletwo = response.data.data;
-      }else{
-        this.$message.error(msg);
+      this.startTime = (new Date(this.startTime)).getTime()
+      this.endTime = (new Date(this.endTime)).getTime()
+      this.formList.companyName = this.companyName
+      this.formList.customerName = this.customerName
+      this.formList.carNum = this.carNum
+      this.formList.startTime = this.startTime
+      this.formList.endTime = this.endTime
+      const response = await this.$http.post(`/selfCar/getTradeList`, this.formList)
+      var {data: { code, msg, data }} = response
+      if (code === 0) {
+        this.usertabletwo = response.data.data
+      } else {
+        this.$message.error(msg)
       }
     },
-     async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }
-            if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                  this.companyList = [{'companyName':'.'}];
-                                                }
-            this.companyName = this.companyList[0]['companyName'];
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      }
+      if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.companyName = this.companyList[0][`companyName`]
     },
-     handleSelectionChange(value){
-                       this.multipleSelection = value;
-                    },
-    changeStartDate(value){
-     var dd = new Date();
-     dd.setDate(value.getDate()+90);
-     this.endTime = dd;
+    handleSelectionChange(value) {
+      this.multipleSelection = value
     },
-    //申请开票
+    changeStartDate(value) {
+      var dd = new Date()
+      dd.setDate(value.getDate() + 90)
+      this.endTime = dd
+    },
+    // 申请开票
     async applyForTicket() {
-       if(this.multipleSelection.length>0){
-            this.carIdStr ='';
-            for(var i in this.multipleSelection){
-                           this.carIdStr+=this.multipleSelection[i]['cardId']+"#"+this.multipleSelection[i]['tradeId']+","
-            }
-        }else{
-           this.$message({
-              type: 'error',
-              message: '请选择需要开票的交易id'
-           });
-          return;
+      if (this.multipleSelection.length > 0) {
+        this.carIdStr = ``
+        for (var i in this.multipleSelection) {
+          this.carIdStr += this.multipleSelection[i][`cardId`] + `#` + this.multipleSelection[i][`tradeId`] + `,`
         }
-      this.startTime = (new Date(this.startTime)).getTime();
-      this.endTime = (new Date(this.endTime)).getTime();
-      this.formList.companyName = this.companyName;
-      this.formList.customerName = this.customerName;
-      this.formList.carNum = this.carNum;
-      this.formList.startTime = this.startTime;
-      this.formList.endTime = this.endTime;
-       this.formList.carIdStr = this.carIdStr;
-      const response = await this.$http.post(`/selfCar/applTradeList`, this.formList);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
+      } else {
         this.$message({
-          type: 'success',
-          message: '开票成功'
-        });
-      }else{
-        this.$message.error(msg);
+          type: `error`,
+          message: `请选择需要开票的交易id`
+        })
+        return
       }
-    },
+      this.startTime = (new Date(this.startTime)).getTime()
+      this.endTime = (new Date(this.endTime)).getTime()
+      this.formList.companyName = this.companyName
+      this.formList.customerName = this.customerName
+      this.formList.carNum = this.carNum
+      this.formList.startTime = this.startTime
+      this.formList.endTime = this.endTime
+      this.formList.carIdStr = this.carIdStr
+      const response = await this.$http.post(`/selfCar/applTradeList`, this.formList)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
+        this.$message({
+          type: `success`,
+          message: `开票成功`
+        })
+      } else {
+        this.$message.error(msg)
+      }
+    }
 
   }
-};
+}
 </script>
 
 <style>

+ 42 - 42
src/views/platform/apply/packaging.vue

@@ -75,80 +75,80 @@ export default{
     return {
       loading: false,
       usertable: [],
-       hightt:'0px',
+      hightt: `0px`,
       formPackList: {
-        "customerName": "",
-        "companyName": "",
-        "month": "",
+        "customerName": ``,
+        "companyName": ``,
+        "month": ``
       },
       companyList: []
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.formPackList.customerName = sessionStorage.getItem('userName');
-    this.initCompanyList();
-    this.loadData();
+    this.heightt = tableHeight // eslint-disable-line
+    this.formPackList.customerName = sessionStorage.getItem(`userName`)
+    this.initCompanyList()
+    this.loadData()
   },
   methods: {
-    //数据加载
+    // 数据加载
     async loadData() {
       //  const response = await this.$http.post(`b2bInvoicePackage/page`, formData);
       //   if (response.data.code === 0) {
       //     this.usertable = response.data.data.records;
       //   }
     },
-    //发票打包
+    // 发票打包
     async applyForTicket() {
-      const response = await this.$http.post(`/selfCarService/getSelfCarInvoicePackage`, this.formPackList);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
+      const response = await this.$http.post(`/selfCarService/getSelfCarInvoicePackage`, this.formPackList)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
         this.$message({
-          type: 'success',
-          message: '发票打包成功'
-        });
-        this.usertable = response.data.data;
-      }else{
-        this.$message.error(msg);
+          type: `success`,
+          message: `发票打包成功`
+        })
+        this.usertable = response.data.data
+      } else {
+        this.$message.error(msg)
       }
     },
-     async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                   this.companyList = [{'companyName':'.'}];
-                                                 }
-            this.formPackList.companyName = this.companyList[0]['companyName'];
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      } if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.formPackList.companyName = this.companyList[0][`companyName`]
     },
-    //下载打包
+    // 下载打包
     Download(url) {
-      window.location.href= url;
+      window.location.href = url
     },
 
     DownloadTwo(url) {
-      window.location.href= url;
+      window.location.href = url
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-      if(this.companyName !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.pagesize = val
+      if (this.companyName !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
     },
     handleCurrentChange(val) {
-      this.current = val;
-      if(this.companyName !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.current = val
+      if (this.companyName !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
-    },
+    }
 
   }
-};
+}
 </script>
 
 <style>

+ 168 - 174
src/views/platform/apply/selfCarTrade.vue

@@ -117,193 +117,187 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              customId:'',
-              status:2,
-              companyName:''
-            },
-             multipleSelection:[],
-            statusList:[{status:1,statusName:"待开票"},{status:2,statusName:"开票中"},{status:3,statusName:"已开票"}],
-            companyList:[],
-            selfcarTrade:[],
-            hightt:'0px',
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.formCondition.customId = sessionStorage.getItem('userName');
-          this.heightt = tableHeight;
-           this.initCompanyList();
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-               firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          loadDataUpper(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadDataUpper();
-          },
-           // 列表展示
-          async loadDataUpper() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
-            }
-            const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-            const response = await this.$http.post(`selfCar/findTradesUpper`, formData);
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        customId: ``,
+        status: 2,
+        companyName: ``
+      },
+      multipleSelection: [],
+      statusList: [{status: 1, statusName: `待开票`}, {status: 2, statusName: `开票中`}, {status: 3, statusName: `已开票`}],
+      companyList: [],
+      selfcarTrade: [],
+      hightt: `0px`,
+      current: 1,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.formCondition.customId = sessionStorage.getItem(`userName`)
+    this.heightt = tableHeight  // eslint-disable-line
+    this.initCompanyList()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadDataUpper() {
+      this.current = 1
+      this.pagesize = 8
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const response = await this.$http.post(`selfCar/findTradesUpper`, formData)
 
-            if (response.data.code === 0) {
-              this.selfcarTrade = response.data.data.records;
-              this.total = response.data.data.total;
-            }else{
-              debugger
-               this.$message(response.data.msg);
-   
-            }
-            loading.close();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
-            }
-            const response = await this.$http.post(`selfCar/findTrades`, formData);
-            if (response.data.code === 0) {
-              this.selfcarTrade = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-           handleSelectionChange(value){
-                       this.multipleSelection = value;
-           },
-            async update(){
-               var loading = null;
-            const formData = new FormData();
-            if(this.multipleSelection.length == 0){
-               loading = this.$loading({
-                          lock: true,
-                          text: '全量更新中,速度较慢,请您耐心等待...',
-                          spinner: 'el-icon-loading',
-                          background: 'rgba(0, 0, 0, 0.7)'
-                        });
-              formData.append("companyName",this.formCondition.companyName);
-            };
-            
-            formData.append('selfCarTradesStr', JSON.stringify(this.multipleSelection));
-              const response = await this.$http.post(`selfCar/updateTrades`, formData);
-              if(this.multipleSelection.length == 0){
-                    loading.close();
-               };
-               this.loadData();
-                this.$message({
-                      type: 'success',
-                      message: '更新成功'
-                    });
-          },
-           async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            } if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                   this.companyList = [{'companyName':'.'}];
-                                                 }
-            this.formCondition.companyName = this.companyList[0]['companyName'];
-             this.loadData();
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-           formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-            
-            for(var i in sheet){
-              if(sheet[i]['v'] == '交易费用'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-       async     exportExcel() {
-       const loading = this.$loading({
-                                   lock: true,
-                                   text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                   spinner: 'el-icon-loading',
-                                   background: 'rgba(0, 0, 0, 0.7)'
-                                 });
-         let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+      if (response.data.code === 0) {
+        this.selfcarTrade = response.data.data.records
+        this.total = response.data.data.total
+      } else {
+        this.$message(response.data.msg)
+      }
+      loading.close()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
+      }
+      const response = await this.$http.post(`selfCar/findTrades`, formData)
+      if (response.data.code === 0) {
+        this.selfcarTrade = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    handleSelectionChange(value) {
+      this.multipleSelection = value
+    },
+    async update() {
+      var loading = null
+      const formData = new FormData()
+      if (this.multipleSelection.length === 0) {
+        loading = this.$loading({
+          lock: true,
+          text: `全量更新中,速度较慢,请您耐心等待...`,
+          spinner: `el-icon-loading`,
+          background: `rgba(0, 0, 0, 0.7)`
+        })
+        formData.append(`companyName`, this.formCondition.companyName)
+      };
+
+      formData.append(`selfCarTradesStr`, JSON.stringify(this.multipleSelection))
+      const response = await this.$http.post(`selfCar/updateTrades`, formData)
+      if (this.multipleSelection.length === 0) {
+        loading.close()
+      };
+      this.loadData()
+      this.$message({
+        type: `success`,
+        message: `更新成功`
+      })
+    },
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      } if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.formCondition.companyName = this.companyList[0][`companyName`]
+      this.loadData()
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `交易费用`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
+    async     exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "自有车交易查询列表_"+year + "" + month + "" + day;
+      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 });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
 
-      this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .billWay_container {

+ 93 - 94
src/views/platform/car/carsuccess.vue

@@ -94,133 +94,132 @@
 </template>
 
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
       loading: false,
       optionone: [{
-          value: '2',
-          label: '成功'
-        }, {
-          value: '1',
-          label: '失败'
-        }],
+        value: `2`,
+        label: `成功`
+      }, {
+        value: `1`,
+        label: `失败`
+      }],
       current: 1,
-       hightt:'0px',
+      hightt: `0px`,
       pagesize: 10,
       total: 0,
       usertable: [],
-      companyList:[],
+      companyList: [],
       formUserList: {
-       "customerName": "",
-       "companyName":"",
-       "recStatus":'',
-       "carNum":''
-      },
+        "customerName": ``,
+        "companyName": ``,
+        "recStatus": ``,
+        "carNum": ``
+      }
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.initCompanyList();
-    this.formUserList.customerName = sessionStorage.getItem('userName');
-    this.loadData();
+    this.heightt = tableHeight  // eslint-disable-line
+    this.initCompanyList()
+    this.formUserList.customerName = sessionStorage.getItem(`userName`)
+    this.loadData()
   },
   methods: {
-                   firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
     // 列表展示
     async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('companyName', this.formUserList.companyName);
-            formData.append('carNum', this.formUserList.carNum);
-            formData.append('customerName', this.formUserList.customerName);
-            formData.append('recStatus', this.formUserList.recStatus);
-            const response = await this.$http.post(`noCar/findCarRec`, formData);
-            if (response.data.code === 0) {
-              this.usertable = response.data.data.records;
-              this.total = response.data.data.total;
-            }
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`companyName`, this.formUserList.companyName)
+      formData.append(`carNum`, this.formUserList.carNum)
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`recStatus`, this.formUserList.recStatus)
+      const response = await this.$http.post(`noCar/findCarRec`, formData)
+      if (response.data.code === 0) {
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
+      }
     },
-    async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }
-            if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                      this.companyList = [{'companyName':'.'}];
-                                    }
-            this.formUserList.companyName = this.companyList[0]['companyName'];
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      }
+      if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.formUserList.companyName = this.companyList[0][`companyName`]
     },
-    //导出功能
+    // 导出功能
     async  exportOut() {
-    const loading = this.$loading({
-                                      lock: true,
-                                      text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                      spinner: 'el-icon-loading',
-                                      background: 'rgba(0, 0, 0, 0.7)'
-                                    });
-      let curr = this.current;
-              let pagesize1 = this.pagesize;
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
 
-              this.current = 1;
-              this.pagesize = this.total;
-             await this.loadData();
-            // 设置当前日期
-            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);
-            }
-            this.current = curr;
-            this.pagesize = pagesize1;
-            this.loadData();
-            loading.close();
-            return wbout;
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
+      // 设置当前日期
+      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) {
+      }
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
     },
     handleRemove(file, fileList) {
     },
     handlePreview(file) {
     },
-    handleSuccess (a) {
-      this.formUserList.file = a.raw;
+    handleSuccess(a) {
+      this.formUserList.file = a.raw
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-      this.loadData();
+      this.pagesize = val
+      this.loadData()
     },
     handleCurrentChange(val) {
-      this.current = val;
-      this.loadData();
-    },
+      this.current = val
+      this.loadData()
+    }
 
   }
-};
+}
 </script>
 
 <style>

+ 209 - 210
src/views/platform/car/carupload.vue

@@ -207,38 +207,38 @@ export default{
     return {
       loading: false,
       fullscreenLoading: false,
-      userName: '',
-      userCompany: '',
-       hightt:'0px',
-      batchNumber: '',
-      userPhone: '',
-      plateNumber: '',
-      plateColor: '',
+      userName: ``,
+      userCompany: ``,
+      hightt: `0px`,
+      batchNumber: ``,
+      userPhone: ``,
+      plateNumber: ``,
+      plateColor: ``,
       optionone: [{
-          value: '0',
-          label: '蓝色'
-        }, {
-          value: '1',
-          label: '黄色'
-        }, {
-          value: '2',
-          label: '黑色'
-        }, {
-          value: '3',
-          label: '白色'
-        }, {
-          value: '4',
-          label: '渐变绿色'
-        }, {
-          value: '5',
-          label: '黄绿渐变色'
-        }, {
-          value: '6',
-          label: '蓝白渐变色'
-        }, {
-          value: '9',
-          label: '未确定'
-        }],
+        value: `0`,
+        label: `蓝色`
+      }, {
+        value: `1`,
+        label: `黄色`
+      }, {
+        value: `2`,
+        label: `黑色`
+      }, {
+        value: `3`,
+        label: `白色`
+      }, {
+        value: `4`,
+        label: `渐变绿色`
+      }, {
+        value: `5`,
+        label: `黄绿渐变色`
+      }, {
+        value: `6`,
+        label: `蓝白渐变色`
+      }, {
+        value: `9`,
+        label: `未确定`
+      }],
       addList: false,
       current: 1,
       pagesize: 8,
@@ -246,254 +246,253 @@ export default{
       currenttwo: 1,
       pagesizetwo: 8,
       totaltwo: 0,
-      batch: '',
-      batchId: '',
+      batch: ``,
+      batchId: ``,
       usertable: [],
       usertabletwo: [],
       formUserList: {
-       "userId": "",
-       "file": "",
-       "roleId": ""
-      },
+        "userId": ``,
+        "file": ``,
+        "roleId": ``
+      }
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.loadData();
+    this.heightt = tableHeight // eslint-disable-line
+    this.loadData()
   },
   methods: {
-                   firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.queryLook();
-          },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.queryLook()
+    },
     // 列表展示
     async loadData() {
-      this.formUserList.userId = sessionStorage.getItem('userId');
-      this.formUserList.roleId = sessionStorage.getItem('roleId');
-      if(this.formUserList.roleId == 1) {
-        const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('type', 1);
-        const response = await this.$http.post(`batch/list`, formData);
-          if (response.data.code === 0) {
-          this.loading = false;
-          this.usertable = response.data.data.records;
-          this.total = response.data.data.total;
+      this.formUserList.userId = sessionStorage.getItem(`userId`)
+      this.formUserList.roleId = sessionStorage.getItem(`roleId`)
+      if (this.formUserList.roleId === 1) {
+        const formData = new FormData()
+        formData.append(`current`, this.current)
+        formData.append(`size`, this.pagesize)
+        formData.append(`type`, 1)
+        const response = await this.$http.post(`batch/list`, formData)
+        if (response.data.code === 0) {
+          this.loading = false
+          this.usertable = response.data.data.records
+          this.total = response.data.data.total
         };
-      }else {
-        const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('userId', this.formUserList.userId);
-        formData.append('type', 1);
-        const response = await this.$http.post(`batch/list`, formData);
-          if (response.data.code === 0) {
-            this.loading = false;
-            this.usertable = response.data.data.records;
-            this.total = response.data.data.total;
+      } else {
+        const formData = new FormData()
+        formData.append(`current`, this.current)
+        formData.append(`size`, this.pagesize)
+        formData.append(`userId`, this.formUserList.userId)
+        formData.append(`type`, 1)
+        const response = await this.$http.post(`batch/list`, formData)
+        if (response.data.code === 0) {
+          this.loading = false
+          this.usertable = response.data.data.records
+          this.total = response.data.data.total
         };
       };
     },
-    //查询
+    // 查询
     async queryLook() {
-      if(this.formUserList.roleId == 1) {
-        const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('type', 1);
-        formData.append('userName', this.userName);
-        formData.append('userCompany', this.userCompany);
-        formData.append('batchNumber', this.batchNumber);
-        const response = await this.$http.post(`batch/list`, formData);
-          if (response.data.code === 0) {
-          this.loading = false;
-          this.usertable = response.data.data.records;
-          this.total = response.data.data.total;
+      if (this.formUserList.roleId === 1) {
+        const formData = new FormData()
+        formData.append(`current`, this.current)
+        formData.append(`size`, this.pagesize)
+        formData.append(`type`, 1)
+        formData.append(`userName`, this.userName)
+        formData.append(`userCompany`, this.userCompany)
+        formData.append(`batchNumber`, this.batchNumber)
+        const response = await this.$http.post(`batch/list`, formData)
+        if (response.data.code === 0) {
+          this.loading = false
+          this.usertable = response.data.data.records
+          this.total = response.data.data.total
         };
-      }else {
-        const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('userId', this.formUserList.userId);
-        formData.append('type', 1);
-        formData.append('userName', this.userName);
-        formData.append('userCompany', this.userCompany);
-        formData.append('batchNumber', this.batchNumber);
-        const response = await this.$http.post(`batch/list`, formData);
-          if (response.data.code === 0) {
-            this.loading = false;
-            this.usertable = response.data.data.records;
-            this.total = response.data.data.total;
+      } else {
+        const formData = new FormData()
+        formData.append(`current`, this.current)
+        formData.append(`size`, this.pagesize)
+        formData.append(`userId`, this.formUserList.userId)
+        formData.append(`type`, 1)
+        formData.append(`userName`, this.userName)
+        formData.append(`userCompany`, this.userCompany)
+        formData.append(`batchNumber`, this.batchNumber)
+        const response = await this.$http.post(`batch/list`, formData)
+        if (response.data.code === 0) {
+          this.loading = false
+          this.usertable = response.data.data.records
+          this.total = response.data.data.total
         };
       };
     },
     // 下载模板
     DownloadTemplate() {
-      var url = 'http://invoice.back.jkcredit.com/carFreeCarrierRegister/downTemp';
-
-      window.location.href= url;
+      var url = `http://invoice.back.jkcredit.com/carFreeCarrierRegister/downTemp`
 
+      window.location.href = url
     },
     // 批量上传模板信息
     async batchUpload() {
-         const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
-      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
-       let AllUpExt = ".xlsx";
-       if( extName != AllUpExt){
-          this.$message.error('格式错误!请重新选择');
-          return false;
-    }
+      const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50
+      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(`.`)).toLowerCase()
+      let AllUpExt = `.xlsx`
+      if (extName !== AllUpExt) {
+        this.$message.error(`格式错误!请重新选择`)
+        return false
+      }
 
       if (!isLt50M) {
-                this.$message.error('上传文件大小不能超过50MB!');
-                return false;
-       }
+        this.$message.error(`上传文件大小不能超过50MB!`)
+        return false
+      }
 
-const loading = this.$loading({
-                          lock: true,
-                          text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                          spinner: 'el-icon-loading',
-                          background: 'rgba(0, 0, 0, 0.7)'
-                        });
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
 
-      const formData = new FormData();
-      formData.append('userId', this.formUserList.userId);
-      formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`carFreeCarrierRegister/excel`,formData);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
-        this.loadData();
-       loading.close();
-        this.$message.success('上传成功');
-      }else if(code === 1 && msg == null && data == null) {
-        loading.close();
-        this.$message.error('数据存在错误,请检查文件中数据');
-      }else {
-       loading.close();
-        this.$message.error("数据存在错误,请检查文件中数据");
+      const formData = new FormData()
+      formData.append(`userId`, this.formUserList.userId)
+      formData.append(`file`, this.formUserList.file)
+      const response = await this.$http.post(`carFreeCarrierRegister/excel`, formData)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
+        this.loadData()
+        loading.close()
+        this.$message.success(`上传成功`)
+      } else if (code === 1 && msg == null && data == null) {
+        loading.close()
+        this.$message.error(`数据存在错误,请检查文件中数据`)
+      } else {
+        loading.close()
+        this.$message.error(`数据存在错误,请检查文件中数据`)
       }
     },
     // 查看批次数据
     async checkLook(id) {
-      this.addList = true;
-      this.batchId = id;
-      this.loadDataCar();
+      this.addList = true
+      this.batchId = id
+      this.loadDataCar()
     },
     // 查看批次数据
     async loadDataCar() {
-      if(this.formUserList.roleId == 1) {
-        const formData = new FormData();
-        formData.append('current', this.currenttwo);
-        formData.append('size', this.pagesizetwo);
-        formData.append('batchId', this.batchId);
-        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData);
-          if (response.data.code === 0) {
-          this.loading = false;
-          this.usertabletwo = response.data.data.records;
-          this.totaltwo = response.data.data.total;
+      if (this.formUserList.roleId === 1) {
+        const formData = new FormData()
+        formData.append(`current`, this.currenttwo)
+        formData.append(`size`, this.pagesizetwo)
+        formData.append(`batchId`, this.batchId)
+        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData)
+        if (response.data.code === 0) {
+          this.loading = false
+          this.usertabletwo = response.data.data.records
+          this.totaltwo = response.data.data.total
         }
-      }else {
-        const formData = new FormData();
-        formData.append('current', this.currenttwo);
-        formData.append('size', this.pagesizetwo);
-        formData.append('batchId', this.batchId);
-        formData.append('userId', this.formUserList.userId);
-        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData);
+      } else {
+        const formData = new FormData()
+        formData.append(`current`, this.currenttwo)
+        formData.append(`size`, this.pagesizetwo)
+        formData.append(`batchId`, this.batchId)
+        formData.append(`userId`, this.formUserList.userId)
+        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData)
         if (response.data.code === 0) {
-          this.loading = false;
-          this.usertabletwo = response.data.data.records;
-          this.totaltwo = response.data.data.total;
+          this.loading = false
+          this.usertabletwo = response.data.data.records
+          this.totaltwo = response.data.data.total
         }
       }
     },
-    //查看(二)
-    async queryLookTwo(){
-      if(this.formUserList.roleId == 1) {
-        const formData = new FormData();
-        formData.append('current', this.currenttwo);
-        formData.append('size', this.pagesizetwo);
-        formData.append('batchId', this.batchId);
-        formData.append('userPhone', this.userPhone);
-        formData.append('plateNumber', this.plateNumber);
-        formData.append('plateColor', this.plateColor);
-        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData);
-          if (response.data.code === 0) {
-          this.loading = false;
-          this.usertabletwo = response.data.data.records;
-          this.totaltwo = response.data.data.total;
+    // 查看(二)
+    async queryLookTwo() {
+      if (this.formUserList.roleId === 1) {
+        const formData = new FormData()
+        formData.append(`current`, this.currenttwo)
+        formData.append(`size`, this.pagesizetwo)
+        formData.append(`batchId`, this.batchId)
+        formData.append(`userPhone`, this.userPhone)
+        formData.append(`plateNumber`, this.plateNumber)
+        formData.append(`plateColor`, this.plateColor)
+        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData)
+        if (response.data.code === 0) {
+          this.loading = false
+          this.usertabletwo = response.data.data.records
+          this.totaltwo = response.data.data.total
         }
-      }else {
-        const formData = new FormData();
-        formData.append('current', this.currenttwo);
-        formData.append('size', this.pagesizetwo);
-        formData.append('batchId', this.batchId);
-        formData.append('userId', this.formUserList.userId);
-        formData.append('userPhone', this.userPhone);
-        formData.append('plateNumber', this.plateNumber);
-        formData.append('plateColor', this.plateColor);
-        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData);
+      } else {
+        const formData = new FormData()
+        formData.append(`current`, this.currenttwo)
+        formData.append(`size`, this.pagesizetwo)
+        formData.append(`batchId`, this.batchId)
+        formData.append(`userId`, this.formUserList.userId)
+        formData.append(`userPhone`, this.userPhone)
+        formData.append(`plateNumber`, this.plateNumber)
+        formData.append(`plateColor`, this.plateColor)
+        const response = await this.$http.post(`carFreeCarrierRegister/list`, formData)
         if (response.data.code === 0) {
-          this.loading = false;
-          this.usertabletwo = response.data.data.records;
-          this.totaltwo = response.data.data.total;
+          this.loading = false
+          this.usertabletwo = response.data.data.records
+          this.totaltwo = response.data.data.total
         }
       }
     },
 
     // 清空表单数据
     handleEditDialogClose() {
-      this.userPhone = '';
-      this.plateNumber = '';
-      this.plateColor = '';
-      this.current = 1;
-      this.pagesize = 8;
-      this.currenttwo = 1;
-      this.pagesizetwo = 8;
+      this.userPhone = ``
+      this.plateNumber = ``
+      this.plateColor = ``
+      this.current = 1
+      this.pagesize = 8
+      this.currenttwo = 1
+      this.pagesizetwo = 8
     },
     handleRemove(file, fileList) {
     },
     handlePreview(file) {
     },
-    handleSuccess (a) {
-      this.formUserList.file = a.raw;
+    handleSuccess(a) {
+      this.formUserList.file = a.raw
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-      if(this.userName !== '' || this.userCompany !== '' || this.batchNumber !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.pagesize = val
+      if (this.userName !== `` || this.userCompany !== `` || this.batchNumber !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
     },
     handleCurrentChange(val) {
-      this.current = val;
-      if(this.userName !== '' || this.userCompany !== '' || this.batchNumber !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.current = val
+      if (this.userName !== `` || this.userCompany !== `` || this.batchNumber !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
     },
     handleSize(val) {
-      this.pagesizetwo = val;
-      if(this.userPhone !== '' || this.plateNumber !== '' || this.plateColor !== '') {
-        this.queryLookTwo();
-      }else{
-        this.loadDataCar();
+      this.pagesizetwo = val
+      if (this.userPhone !== `` || this.plateNumber !== `` || this.plateColor !== ``) {
+        this.queryLookTwo()
+      } else {
+        this.loadDataCar()
       };
     },
     handleCurrent(val) {
-      this.currenttwo = val;
-      if(this.userPhone !== '' || this.plateNumber !== '' || this.plateColor !== '') {
-        this.queryLookTwo();
-      }else{
-        this.loadDataCar();
+      this.currenttwo = val
+      if (this.userPhone !== `` || this.plateNumber !== `` || this.plateColor !== ``) {
+        this.queryLookTwo()
+      } else {
+        this.loadDataCar()
       };
     }
   }
-};
+}
 </script>
 
 <style>

+ 130 - 133
src/views/platform/carbinding/carbinding.vue

@@ -118,193 +118,190 @@ export default{
     return {
       loading: false,
       rules: {
-          bankNumber: [
-            { required: true, message: '请输入银行账号', trigger: 'blur' },
-            { min: 12, max: 20, message: '长度在 12 到 20 个字符', trigger: 'blur' }
-          ],
-          address: [
-            { required: true, message: '请输入公司地址', trigger: 'blur' },
-          ],
-          bankAddress : [
-            { required: true, message: '请输入开户行', trigger: 'blur' },
-          ],
-          phone: [
-            { required: true, message: '请输入手机号', trigger: 'blur' },
-            { min: 11, max: 11, message: '长度在 11 个字符', trigger: 'blur' }
-          ],
-          dutyParagraph:[
-            { required: true, message: '请输入税号', trigger: 'blur' },
-            { min: 15, max: 20, message: '长度在 15 到 20 个字符', trigger: 'blur' }
-          ],
-          company: [
-            { required: true, message: '请输入发票抬头', trigger: 'blur' },
-          ],
-        },
+        bankNumber: [
+          { required: true, message: `请输入银行账号`, trigger: `blur` },
+          { min: 12, max: 20, message: `长度在 12 到 20 个字符`, trigger: `blur` }
+        ],
+        address: [
+          { required: true, message: `请输入公司地址`, trigger: `blur` }
+        ],
+        bankAddress: [
+          { required: true, message: `请输入开户行`, trigger: `blur` }
+        ],
+        phone: [
+          { required: true, message: `请输入手机号`, trigger: `blur` },
+          { min: 11, max: 11, message: `长度在 11 个字符`, trigger: `blur` }
+        ],
+        dutyParagraph: [
+          { required: true, message: `请输入税号`, trigger: `blur` },
+          { min: 15, max: 20, message: `长度在 15 到 20 个字符`, trigger: `blur` }
+        ],
+        company: [
+          { required: true, message: `请输入发票抬头`, trigger: `blur` }
+        ]
+      },
       binDing: false,
-       hightt:'0px',
+      hightt: `0px`,
       current: 1,
       pagesize: 8,
       total: 0,
       usertabletwo: [],
       optionone: [{
-          value: '0',
-          label: '蓝色'
-        }, {
-          value: '1',
-          label: '黄色'
-        }, {
-          value: '2',
-          label: '黑色'
-        }, {
-          value: '3',
-          label: '白色'
-        }, {
-          value: '4',
-          label: '渐变绿色'
-        }, {
-          value: '5',
-          label: '黄绿渐变色'
-        }, {
-          value: '6',
-          label: '蓝白渐变色'
-        }, {
-          value: '9',
-          label: '未确定'
+        value: `0`,
+        label: `蓝色`
+      }, {
+        value: `1`,
+        label: `黄色`
+      }, {
+        value: `2`,
+        label: `黑色`
+      }, {
+        value: `3`,
+        label: `白色`
+      }, {
+        value: `4`,
+        label: `渐变绿色`
+      }, {
+        value: `5`,
+        label: `黄绿渐变色`
+      }, {
+        value: `6`,
+        label: `蓝白渐变色`
+      }, {
+        value: `9`,
+        label: `未确定`
       }],
-      plateNum: '',
-      plateColor: '',
-      roleId: '',
-      codeNumber: '',
+      plateNum: ``,
+      plateColor: ``,
+      roleId: ``,
+      codeNumber: ``,
       multipleSelection: [],
       formCodeList: {
-        "mobile": "",
-        "customerName": "",
-        "companyName": "",
+        "mobile": ``,
+        "customerName": ``,
+        "companyName": ``,
         "cards": []
       },
       formBindingList: {
-        "mobile": "",
-        "customerName": "",
-        "companyName": "",
-        "validCode":""
+        "mobile": ``,
+        "customerName": ``,
+        "companyName": ``,
+        "validCode": ``
       },
       formList: {
-        "companyName": "",
-        "customerName": "",
+        "companyName": ``,
+        "customerName": ``,
         "cards": []
       },
-      companyList:[]
+      companyList: []
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.initCompanyList();
+    this.heightt = tableHeight  // eslint-disable-line
+    this.initCompanyList()
   },
   methods: {
     async queryLook() {
-      this.formList.customerName = sessionStorage.getItem('userName');
-      var object = new Object();
-      object.num = this.plateNum;
-      object.color = this.plateColor;
-      this.formList.cards.push(object);
-      const response = await this.$http.post(`/selfCarService/queryEtcInfo`, this.formList);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
-        this.usertabletwo = response.data.data;
-        this.formList.cards = [];
-      }else{
-        this.$message.error(msg);
-        this.formList.cards = [];
+      this.formList.customerName = sessionStorage.getItem(`userName`)
+      var object = {}
+      object.num = this.plateNum
+      object.color = this.plateColor
+      this.formList.cards.push(object)
+      const response = await this.$http.post(`/selfCarService/queryEtcInfo`, this.formList)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
+        this.usertabletwo = response.data.data
+        this.formList.cards = []
+      } else {
+        this.$message.error(msg)
+        this.formList.cards = []
       }
     },
     // 当选择中列表前的小框时候
     handleSelectionChange(val) {
-        this.multipleSelection = val;
+      this.multipleSelection = val
     },
-    async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName'),"bussinessType":"0"});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }
-            if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                  this.companyList = [{'companyName':'.'}];
-                                                }
-            this.formList.companyName = this.companyList[0]['companyName'];
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`), "bussinessType": `0`})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      }
+      if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.formList.companyName = this.companyList[0][`companyName`]
     },
     // 获取验证码数据
     checkLook() {
-      this.formCodeList.companyName = this.formList.companyName;
-      this.formCodeList.customerName = sessionStorage.getItem('userName');
-      this.formBindingList.companyName = this.formList.companyName;
-      this.formBindingList.customerName = sessionStorage.getItem('userName');
-      var len = this.multipleSelection.length;
+      this.formCodeList.companyName = this.formList.companyName
+      this.formCodeList.customerName = sessionStorage.getItem(`userName`)
+      this.formBindingList.companyName = this.formList.companyName
+      this.formBindingList.customerName = sessionStorage.getItem(`userName`)
+      var len = this.multipleSelection.length
 
-      var flag = true;
-      for(var i = 0; i < len; i++) {
-        if(this.multipleSelection[0].mobile !== this.multipleSelection[i].mobile) {
-          flag = false;
-        }else{
-          var object = new Object();
-          object.etcNum = this.multipleSelection[i].id;
-          this.formCodeList.cards.push(object);
+      var flag = true
+      for (var i = 0; i < len; i++) {
+        if (this.multipleSelection[0].mobile !== this.multipleSelection[i].mobile) {
+          flag = false
+        } else {
+          var object = {};
+          object.etcNum = this.multipleSelection[i].id
+          this.formCodeList.cards.push(object)
         }
       }
-      if(len === 0 ) {
-        this.$message.error('请选择需要绑定的ETC卡');
+      if (len === 0) {
+        this.$message.error(`请选择需要绑定的ETC卡`)
       }
-      if(flag === true && len !== 0) {
-        this.binDing = true;
-      }else if(len !== 0){
-        this.$message.error('请选择相同手机号下的ETC卡');
+      if (flag === true && len !== 0) {
+        this.binDing = true
+      } else if (len !== 0) {
+        this.$message.error(`请选择相同手机号下的ETC卡`)
       }
-
     },
 
-
     // 获取验证码
     async getCode() {
-      const response = await this.$http.post(`/selfCarService/customerETCRec`, this.formCodeList);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
+      const response = await this.$http.post(`/selfCarService/customerETCRec`, this.formCodeList)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
 
-      }else {
-        this.$message.error(msg);
+      } else {
+        this.$message.error(msg)
       }
     },
-    //绑定银行卡
-    async BindingCard () {
-      this.formBindingList.mobile = this.formCodeList.mobile;
-      const response = await this.$http.post(`/selfCarService/customerETCRecValid`, this.formBindingList);
-       var {data: { code, msg, data }} = response;
-      if(code === 0) {
-        this.binDing = false;
+    // 绑定银行卡
+    async BindingCard() {
+      this.formBindingList.mobile = this.formCodeList.mobile
+      const response = await this.$http.post(`/selfCarService/customerETCRecValid`, this.formBindingList)
+      var {data: { code, msg, data }} = response
+      if (code === 0) {
+        this.binDing = false
         for (var key in this.formBindingList) {
-          this.formBindingList[key] = '';
+          this.formBindingList[key] = ``
         };
         this.$message({
-          type: 'success',
-          message: '绑定成功'
-        });
-        this.binDing=false;
-      }else{
-        this.$message.error(msg);
+          type: `success`,
+          message: `绑定成功`
+        })
+        this.binDing = false
+      } else {
+        this.$message.error(msg)
       }
     },
 
     // 清空表单数据
     handleEditDialogClose() {
       for (var key in this.formList) {
-        this.formList[key] = '';
+        this.formList[key] = ``
       };
-      for (var key in this.formBindingList) {
-        this.formBindingList[key] = '';
+      for (var key in this.formBindingList) { // eslint-disable-line
+        this.formBindingList[key] = ``
       };
-      this.formCodeList.cardList = [];
-      this.formCodeList.mobile = '';
-
-    },
+      this.formCodeList.cardList = []
+      this.formCodeList.mobile = ``
+    }
   }
-};
+}
 </script>
 
 <style>

+ 55 - 55
src/views/platform/carbinding/carbindinglist.vue

@@ -84,79 +84,79 @@ export default{
       pagesize: 8,
       total: 0,
       usertable: [],
-      carNum: '',
-      hightt:'0px',
-      roleId: '',
-      companyList:[],
+      carNum: ``,
+      hightt: `0px`,
+      roleId: ``,
+      companyList: [],
       formList: {
-        "companyName": "",
-        "customerName": ""
+        "companyName": ``,
+        "customerName": ``
       }
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.initCompanyList();
-    this.loadData();
+    this.heightt = tableHeight // eslint-disable-line
+    this.initCompanyList()
+    this.loadData()
   },
   methods: {
-     firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-    //数据加载
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 数据加载
     async loadData() {
-      this.formList.customerName = sessionStorage.getItem('userName');
-       const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('customerName', this.formList.customerName);
-        formData.append('companyName', this.formList.companyName);
-        formData.append('carNum', this.carNum);
-         formData.append('businessType',0);
-        const response = await this.$http.post(`noCar/findCarRec`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertable = response.data.data.records;
-          this.total = response.data.data.total;
-        };
+      this.formList.customerName = sessionStorage.getItem(`userName`)
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formList.customerName)
+      formData.append(`companyName`, this.formList.companyName)
+      formData.append(`carNum`, this.carNum)
+      formData.append(`businessType`, 0)
+      const response = await this.$http.post(`noCar/findCarRec`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
+      };
     },
     // 查询
     async queryLook() {
-        const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('customerName', this.formList.customerName);
-        formData.append('carNum', this.carNum);
-         formData.append('businessType',0);
-        const response = await this.$http.post(`noCar/findCarRec`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertable = response.data.data.records;
-          this.total = response.data.data.total;
-        };
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formList.customerName)
+      formData.append(`carNum`, this.carNum)
+      formData.append(`businessType`, 0)
+      const response = await this.$http.post(`noCar/findCarRec`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
+      };
     },
-    async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName'),"bussinessType":"0"});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            } if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                    this.companyList = [{'companyName':'.'}];
-                                                  }
-            this.formList.companyName = this.companyList[0]['companyName'];
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`), "bussinessType": `0`})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      } if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.formList.companyName = this.companyList[0][`companyName`]
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-     this.loadData();
+      this.pagesize = val
+      this.loadData()
     },
     handleCurrentChange(val) {
-      this.current = val;
-     this.loadData();
-    },
+      this.current = val
+      this.loadData()
+    }
   }
-};
+}
 </script>
 
 <style>

+ 137 - 137
src/views/platform/check/check.vue

@@ -167,177 +167,177 @@
         loading: false,
         rules: {
           companyOpenbankAcc: [
-            { required: true, message: '请输入银行账号', trigger: 'blur' },
-            { min: 9, max: 30, message: '长度在 9 到 30 个字符', trigger: 'blur' }
+            { required: true, message: `请输入银行账号`, trigger: `blur` },
+            { min: 9, max: 30, message: `长度在 9 到 30 个字符`, trigger: `blur` }
           ],
           companyAdress: [
-            { required: true, message: '请输入公司地址', trigger: 'blur' },
+            { required: true, message: `请输入公司地址`, trigger: `blur` }
           ],
-          companyOpenbank : [
-            { required: true, message: '请输入开户行', trigger: 'blur' },
+          companyOpenbank: [
+            { required: true, message: `请输入开户行`, trigger: `blur` }
           ],
           companyLeaderPhone: [
-            { required: true, message: '请输入正确联系方式', trigger: 'blur' },
+            { required: true, message: `请输入正确联系方式`, trigger: `blur` }
           ],
-          companyReferencenum:[
-            { required: true, message: '请输入税号', trigger: 'blur' },
-            { min: 15, max: 30, message: '长度在 15 到 30 个字符', trigger: 'blur' }
+          companyReferencenum: [
+            { required: true, message: `请输入税号`, trigger: `blur` },
+            { min: 15, max: 30, message: `长度在 15 到 30 个字符`, trigger: `blur` }
           ],
           companyName: [
-            { required: true, message: '请输入发票抬头', trigger: 'blur' },
+            { required: true, message: `请输入发票抬头`, trigger: `blur` }
           ],
           operatingRangeType: [
-            { required: true, message: '请选择经营范围', trigger: 'change' }
+            { required: true, message: `请选择经营范围`, trigger: `change` }
           ],
           companyLeader: [
-            {required: true, message: '请输入联系人', trigger: 'blur'},
+            {required: true, message: `请输入联系人`, trigger: `blur`}
           ],
           companyPhone: [
-            {required: true, message: '请输入正确的购方电话', trigger: 'blur'},
-          ],
+            {required: true, message: `请输入正确的购方电话`, trigger: `blur`}
+          ]
         },
         optionone: [{
-          value: '1',
-          label: '快递'
+          value: `1`,
+          label: `快递`
+        }, {
+          value: `2`,
+          label: `速运`
+        }, {
+          value: `3`,
+          label: `货运代理`
         }, {
-          value: '2',
-          label: '速运'
-        },{
-          value: '3',
-          label: '货运代理'
-        },{
-          value: '4',
-          label: '普通货运'
-        },{
-          value: '5',
-          label: '专线运输'
-        },{
-          value: '6',
-          label: '其他'
+          value: `4`,
+          label: `普通货运`
+        }, {
+          value: `5`,
+          label: `专线运输`
+        }, {
+          value: `6`,
+          label: `其他`
         }],
         addList: false,
         current: 1,
         pagesize: 8,
         total: 0,
         usertable: [],
-         hightt:'0px',
-        customerName: "",
-        companyLeaderPhone: "",
-        companyReferencenum: "",
-        companyName: "",
+        hightt: `0px`,
+        customerName: ``,
+        companyLeaderPhone: ``,
+        companyReferencenum: ``,
+        companyName: ``,
         formUserList: {
-          "customerName":"",
-          "companyReferencenum":"",
-          "companyName":"",
-          "companyOpenbankAcc":"",
-          "companyOpenbank":"",
-          "companyAdress":"",
-          "userId":"",
-          "operatingRangeType": "",
-          "bussinessType": "",
-          "companyLeader": "",
-          "companyLeaderPhone": "",
-          "companyPhone": ""
-        },
+          "customerName": ``,
+          "companyReferencenum": ``,
+          "companyName": ``,
+          "companyOpenbankAcc": ``,
+          "companyOpenbank": ``,
+          "companyAdress": ``,
+          "userId": ``,
+          "operatingRangeType": ``,
+          "bussinessType": ``,
+          "companyLeader": ``,
+          "companyLeaderPhone": ``,
+          "companyPhone": ``
+        }
       }
     },
     created() {
-      this.heightt = tableHeight;
-     this.loadData();
-    },
+      this.heightt = tableHeight // eslint-disable-line
+      this.loadData()
+  },
     methods: {
-          firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.queryLook();
-          },
+      firstLoadData() {
+        this.current = 1
+        this.pagesize = 8
+        this.queryLook()
+      },
       // 列表展示
       async loadData() {
-        this.customerName = sessionStorage.getItem('userName');
-        this.formUserList.customerName = sessionStorage.getItem('userName');
-        this.formUserList.bussinessType = sessionStorage.getItem('roleId');
-        if(this.formUserList.bussinessType == 1) {
-          const formData = new FormData();
-          formData.append('current', this.current);
-          formData.append('size', this.pagesize);
-           formData.append('customerName', this.formUserList.customerName);
-          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
+        this.customerName = sessionStorage.getItem(`userName`)
+        this.formUserList.customerName = sessionStorage.getItem(`userName`)
+        this.formUserList.bussinessType = sessionStorage.getItem(`roleId`)
+        if (this.formUserList.bussinessType === 1) {
+          const formData = new FormData()
+          formData.append(`current`, this.current)
+          formData.append(`size`, this.pagesize)
+          formData.append(`customerName`, this.formUserList.customerName)
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData)
           if (response.data.code === 0) {
-            this.loading = false;
-            this.usertable = response.data.data.records;
-            this.total = response.data.data.total;
+            this.loading = false
+            this.usertable = response.data.data.records
+            this.total = response.data.data.total
           };
-        }else {
-          const formData = new FormData();
-          formData.append('current', this.current);
-          formData.append('size', this.pagesize);
-          formData.append('customerName', this.formUserList.customerName);
-          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
+        } else {
+          const formData = new FormData()
+          formData.append(`current`, this.current)
+          formData.append(`size`, this.pagesize)
+          formData.append(`customerName`, this.formUserList.customerName)
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData)
           if (response.data.code === 0) {
-            this.loading = false;
-            this.usertable = response.data.data.records;
-            this.total = response.data.data.total;
+            this.loading = false
+            this.usertable = response.data.data.records
+            this.total = response.data.data.total
           };
         };
       },
 
-      async queryLook(){
-        if(this.formUserList.bussinessType == 1) {
-          const formData = new FormData();
-          formData.append('current', this.current);
-          formData.append('size', this.pagesize);
-          formData.append('customerName', this.customerName);
-          formData.append('companyLeaderPhone', this.companyLeaderPhone);
-          formData.append('companyReferencenum', this.companyReferencenum);
-          formData.append('companyName', this.companyName);
-          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
+      async queryLook() {
+        if (this.formUserList.bussinessType === 1) {
+          const formData = new FormData()
+          formData.append(`current`, this.current)
+          formData.append(`size`, this.pagesize)
+          formData.append(`customerName`, this.customerName)
+          formData.append(`companyLeaderPhone`, this.companyLeaderPhone)
+          formData.append(`companyReferencenum`, this.companyReferencenum)
+          formData.append(`companyName`, this.companyName)
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData)
           if (response.data.code === 0) {
-            this.loading = false;
-            this.usertable = response.data.data.records;
-            this.total = response.data.data.total;
+            this.loading = false
+            this.usertable = response.data.data.records
+            this.total = response.data.data.total
           };
-        }else {
-          this.formUserList.userId = sessionStorage.getItem('userId');
-          const formData = new FormData();
-          formData.append('current', this.current);
-          formData.append('size', this.pagesize);
-          formData.append('userId', this.formUserList.userId);
-          formData.append('customerName', this.customerName);
-          formData.append('companyLeaderPhone', this.companyLeaderPhone);
-          formData.append('companyReferencenum', this.companyReferencenum);
-          formData.append('companyName', this.companyName);
-          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
+        } else {
+          this.formUserList.userId = sessionStorage.getItem(`userId`)
+          const formData = new FormData()
+          formData.append(`current`, this.current)
+          formData.append(`size`, this.pagesize)
+          formData.append(`userId`, this.formUserList.userId)
+          formData.append(`customerName`, this.customerName)
+          formData.append(`companyLeaderPhone`, this.companyLeaderPhone)
+          formData.append(`companyReferencenum`, this.companyReferencenum)
+          formData.append(`companyName`, this.companyName)
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData)
           if (response.data.code === 0) {
-            this.loading = false;
-            this.usertable = response.data.data.records;
-            this.total = response.data.data.total;
+            this.loading = false
+            this.usertable = response.data.data.records
+            this.total = response.data.data.total
           };
         };
       },
       // 新增发票信息
       addData(formName) {
-        this.$refs[formName].validate(async (valid) => {
-          if(valid) {
-            const response = await this.$http.post(`customer/customerRecAdd`, this.formUserList);
-            if(response.data.code === 0) {
-              this.loadData();
-              this.addList = false;
+        this.$refs[formName].validate(async(valid) => {
+          if (valid) {
+            const response = await this.$http.post(`customer/customerRecAdd`, this.formUserList)
+            if (response.data.code === 0) {
+              this.loadData()
+              this.addList = false
               this.$message({
-                type: 'success',
-                message: '添加成功'
-              });
-              // for (var key in this.formUserList) {
-              //   this.formUserList[key] = '';
-              // };
-            }else {
+                type: `success`,
+                message: `添加成功`
+              })
+            // for (var key in this.formUserList) {
+            //   this.formUserList[key] = '';
+            // };
+            } else {
               this.$message({
-                type: 'error',
-                message: '添加失败'
-              });
+                type: `error`,
+                message: `添加失败`
+              })
             }
-          }else {
-            this.$message.error('请查看是否有选项未填写或填错项');
-            return false;
+          } else {
+            this.$message.error(`请查看是否有选项未填写或填错项`)
+            return false
           }
         })
       },
@@ -345,30 +345,30 @@
       // 清空表单数据
       handleEditDialogClose() {
         for (var key in this.formUserList) {
-          this.formUserList[key] = '';
+          this.formUserList[key] = ``
         };
-        this.formUserList.customerName = sessionStorage.getItem('userName');
+        this.formUserList.customerName = sessionStorage.getItem(`userName`)
       },
       // 分页方法
       handleSizeChange(val) {
-        this.pagesize = val;
-        if(this.customerName !== '' || this.companyLeaderPhone !== '' || this.companyReferencenum !== '' || this.companyName !== '') {
-          this.queryLook();
-        }else{
-          this.loadData();
+        this.pagesize = val
+        if (this.customerName !== `` || this.companyLeaderPhone !== `` || this.companyReferencenum !== `` || this.companyName !== ``) {
+          this.queryLook()
+        } else {
+          this.loadData()
         };
       },
       handleCurrentChange(val) {
-        this.current = val;
-        if(this.customerName !== '' || this.companyLeaderPhone !== '' || this.companyReferencenum !== '' || this.companyName !== '') {
-          this.queryLook();
-        }else{
-          this.loadData();
+        this.current = val
+        if (this.customerName !== `` || this.companyLeaderPhone !== `` || this.companyReferencenum !== `` || this.companyName !== ``) {
+          this.queryLook()
+        } else {
+          this.loadData()
         };
-      },
+      }
 
     }
-  };
+  }
 </script>
 
 <style>

+ 8 - 11
src/views/platform/invoice/invoice.vue

@@ -173,7 +173,7 @@ export default{
       usertabletwo: [],
       batchId: '',
       addList: false,
-       hightt:'0px',
+       hightt: '0px',
       current: 1,
       pagesize: 8,
       total: 0,
@@ -185,11 +185,11 @@ export default{
         "roleId": "",
         "userId": "",
         "file": ""
-      },
+      }
     }
   },
   created() {
-    this.heightt = tableHeight;
+    this.heightt = tableHeight;// eslint-disable-line
     this.loadData();
   },
   methods: {
@@ -202,7 +202,7 @@ export default{
     async loadData() {
       this.formUserList.userId = sessionStorage.getItem('userId');
       this.formUserList.roleId = sessionStorage.getItem('roleId');
-      if(this.formUserList.roleId == 1) {
+      if(this.formUserList.roleId === 1) {
         const formData = new FormData();
         formData.append('current', this.current);
         formData.append('size', this.pagesize);
@@ -226,7 +226,6 @@ export default{
           this.total = response.data.data.total;
         };
       };
-
     },
      // 查看批次数据
     async checkLook(id) {
@@ -236,7 +235,7 @@ export default{
     },
     // 查看实时数据
     async loadDataCar() {
-      if(this.formUserList.roleId == 1) {
+      if(this.formUserList.roleId === 1) {
         const formData = new FormData();
         formData.append('current', this.currenttwo);
         formData.append('size', this.pagesizetwo);
@@ -263,7 +262,7 @@ export default{
     },
     //查询
     async queryLookTwo() {
-      if(this.formUserList.roleId == 1) {
+      if(this.formUserList.roleId === 1) {
         const formData = new FormData();
         formData.append('current', this.currenttwo);
         formData.append('size', this.pagesizetwo);
@@ -293,16 +292,14 @@ export default{
     // 下载模板
     DownloadTemplate() {
       var url = 'http://invoice.back.jkcredit.com/numInvoice/downTemp';
-
       window.location.href= url;
-
     },
     // 批量上传模板信息
     async batchUpload() {
          const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
       let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
        let AllUpExt = ".xlsx";
-       if( extName != AllUpExt){
+       if( extName !== AllUpExt){
           this.$message.error('格式错误!请重新选择');
           return false;
     }
@@ -321,7 +318,7 @@ export default{
       const formData = new FormData();
       formData.append('userId', this.formUserList.userId);
       formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`numInvoice/excel`,formData);
+      const response = await this.$http.post(`numInvoice/excel`, formData);
       var {data: { code, msg, data }} = response;
       if(code === 0 && msg === 'success') {
         this.loadData();

+ 73 - 79
src/views/platform/invoice/list.vue

@@ -292,7 +292,7 @@ export default{
       loading: false,
       fullscreenLoading: false,
       addList: false,
-       heightt:'0px',
+      heightt: '0px',
       current: 1,
       pagesize: 8,
       total: 0,
@@ -303,22 +303,22 @@ export default{
       plateNum: "",
       invoiceNum: "",
       invoiceCode: "",
-      invoiceMakeTime:'',
-      calculateTime:'',
+      invoiceMakeTime: '',
+      calculateTime: '',
       endTime: "",
       batchNumber: '',
       invoiceUrl: '',
-      allmeterList:[],
+      allmeterList: [],
       formUserList: {
-        "userName":"",
-        "roleId":"",
-        "userId":""
+        "userName": "",
+        "roleId": "",
+        "userId": ""
       },
-      packDownloadDisabled: false,
+      packDownloadDisabled: false
     }
   },
   created() {
-    this.heightt = tableHeight*0.5+150;
+    this.heightt = tableHeight*0.5+150; // eslint-disable-line
     this.initCompanyList();
   },
   methods: {
@@ -359,13 +359,13 @@ export default{
       this.packDownloadDisabled = true;
       this.$message({type: 'info', message: '正在下载,请稍等,请勿重复下载。'});
       this.fullscreenLoading = false;
-    } ,
+    },
     async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
+            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem('userName')});
             if (response.data.code === 0) {
               this.companyList = response.data.data;
-            } if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                    this.companyList = [{'companyName':'.'}];
+            } if(this.companyList == null || typeof this.companyList === 'undefined' || this.companyList === '' || this.companyList.length === 0){
+                                                    this.companyList = [{'companyName': '.'}];
                                                   }
 
             this.taxPlayerCode = this.companyList[0]['companyName'];
@@ -398,13 +398,12 @@ export default{
     formartNum(wb){
             var sheet = wb['Sheets']['Sheet1'];
             var replaceTemp = [];
-            
             for(var i in sheet){
-              if(sheet[i]['v'] == '税额(元)' || sheet[i]['v'] == '价税合计(元)' || sheet[i]['v'] == '交易金额(元)' || sheet[i]['v'] == '税率'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
+              if(sheet[i]['v'] === '税额(元)' || sheet[i]['v'] === '价税合计(元)' || sheet[i]['v'] === '交易金额(元)' || sheet[i]['v'] === '税率'){
+                replaceTemp.push(i.replace(/[0-9]/g, ''));
                 continue;
               }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
+              if(replaceTemp.includes(i.replace(/[0-9]/g, ''))){
                 sheet[i]['t']='n';
               }
             }
@@ -426,27 +425,27 @@ export default{
             // 设置当前日期
             let time = new Date();
             let year = time.getFullYear();
-            let month = time.getMonth() + 1;
-            let day = time.getDate();
-            let name = "运单发票列表_"+year + "" + month + "" + day;
+            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 });
-            this.formartNum(wb);
+            var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
+            this.formartNum(wb)
             /* get binary string as output */
             var wbout = XLSX.write(wb, {
-              bookType: "xlsx",
+              bookType: `xlsx`,
               bookSST: true,
-              type: "array"
-            });
+              type: `array`
+            })
             try {
               //  name+'.xlsx'表示导出的excel表格名字
               FileSaver.saveAs(
                 new Blob([wbout], { type: "application/octet-stream" }),
-                name + ".xlsx"
+                name + `.xlsx`
               );
             } catch (e) {
-              if (typeof console !== "undefined") console.log(e, wbout);
+
             }
             this.current = curr;
             this.pagesize = pagesize1;
@@ -482,89 +481,85 @@ export default{
                     let day = time.getDate();
                     let name = "无车发票查询列表_"+year + "" + month + "" + day;
                     let cloums = [
-                      {"title":"企业编号","key":"companyNum"},
-                      {"title":"公司名称","key":"buyerName"},
-                      {"title":"运单号","key":"waybillNum"},
-                      {"title":"购方税号","key":"buyerTaxpayerCode"},
-                      {"title":"车牌号码","key":"plateNum"},
-                      {"title":"运单开始时间","key":"waybillStartTime"},
-                      {"title":"运单结束时间","key":"waybillEndTime"},
-                      {"title":"销方税号","key":"sellerTaxpayerCode"},
-                      {"title":"销方名称","key":"sellerName"},
-                      {"title":"入口收费站","key":"enStation"},
-                      {"title":"出口收费站","key":"exStation"},
-                      {"title":"发票代码","key":"invoiceCode"},
-                      {"title":"发票号码","key":"invoiceNum"},
-                      {"title":"交易Id","key":"transactionId"},
-                      {"title":"开票时间","key":"invoiceMakeTime"},      
-                      {"title":"交易时间","key":"exTime"},
-                      {"title":"交易金额(元)","key":"fee"},
-                      {"title":"价税合计(元)","key":"totalAmount"},
-                      {"title":"税额(元)","key":"totalTaxAmount"},
-                      {"title":"金额(元)","key":"amount"},
-                      {"title":"税率","key":"taxRate"},
-                      {"title":"扣费时间","key":"calculateTime"},
-                      {"title":"运单状态","key":"billStatus"},
-                      {"title":"发票状态","key":"invoiceStatus"},
-                      {"title":"发票状态信息","key":"msg"},
-                      {"title":"预览地址","key":"invoiceHtmlUrl"},
-                      {"title":"下载地址","key":"invoiceUrl"}  
-                         
-                    ];
-                   
-                    await this.exportExcelComm(cloums,response.data.data.records,name,loading);
+                      {"title": `企业编号`, "key": `companyNum`},
+                      {"title": `公司名称`, "key": `buyerName`},
+                      {"title": `运单号`, "key": `waybillNum`},
+                      {"title": `购方税号`, "key": `buyerTaxpayerCode`},
+                      {"title": `车牌号码`, "key": `plateNum`},
+                      {"title": `运单开始时间`, "key": `waybillStartTime`},
+                      {"title": `运单结束时间`, "key": `waybillEndTime`},
+                      {"title": `销方税号`, "key": `sellerTaxpayerCode`},
+                      {"title": `销方名称`, "key": `sellerName`},
+                      {"title": `入口收费站`, "key": `enStation`},
+                      {"title": `出口收费站`, "key": `exStation`},
+                      {"title": `发票代码`, "key": `invoiceCode`},
+                      {"title": `发票号码`, "key": `invoiceNum`},
+                      {"title": `交易Id`, "key": `transactionId`},
+                      {"title": `开票时间`, "key": `invoiceMakeTime`},
+                      {"title": `交易时间`, "key": `exTime`},
+                      {"title": `交易金额(元)`, "key": `fee`},
+                      {"title": `价税合计(元)`, "key": `totalAmount`},
+                      {"title": `税额(元)`, "key": `totalTaxAmount`},
+                      {"title": `金额(元)`, "key": `amount`},
+                      {"title": `税率`, "key": `taxRate`},
+                      {"title": `扣费时间`, "key": `calculateTime`},
+                      {"title": `运单状态`, "key": `billStatus`},
+                      {"title": `发票状态`, "key": `invoiceStatus`},
+                      {"title": `发票状态信息`, "key": `msg`},
+                      {"title": `预览地址`, "key": `invoiceHtmlUrl`},
+                      {"title": `下载地址`, "key": `invoiceUrl`}
+                   ];
+                    await this.exportExcelComm(cloums, response.data.data.records, name, loading);
             }
           },
           formatJson (filterVal, jsonData) {
-            return jsonData.map(v => filterVal.map(j => {
-             if(j == 'billStatus'){
-                 if(v[j] == 1){
+            return jsonData.map(v => filterVal.map((j) => {// eslint-disable-line
+             if(j === 'billStatus'){
+                 if(v[j] === 1){
                    return "未结束";
-                 } else if(v[j] == -2){
+                 } else if(v[j] === -2){
                    return "上传失败";
-                 }else if(v[j] == -3){
+                 }else if(v[j] === -3){
                    return "指令结束上传失败";
-                 }else if(v[j] == 2){
+                 }else if(v[j] === 2){
                    return "开票中";
-                 }else if(v[j] == 3){
+                 }else if(v[j] === 3){
                    return "开票完成";
                  }else {
                    return "超时运单";
                  }
-              }else if(j == 'invoiceStatus'){
-                 if(v[j] == 1){
+              }else if(j === 'invoiceStatus'){
+                 if(v[j] === 1){
                    return "待开票";
-                 } else if(v[j] == 2){
+                 } else if(v[j] === 2){
                    return "开票中";
                  }else{
                    return "开票完成";
                  }
-              }else if(j =='fee'){
+              }else if(j ==='fee'){
                   return v[j]/100;
-              }else if(j =='totalAmount'){
+              }else if(j ==='totalAmount'){
                  return v[j]/100;
-              }else if(j =='totalTaxAmount'){
+              }else if(j ==='totalTaxAmount'){
                   return v[j]/100;
-              }else if(j =='amount'){
+              }else if(j ==='amount'){
                  return v[j]/100;
               }else{
                   return v[j];
               }
-              
               }));
           },
           // 导出Excel
-          exportExcelComm(columns,list,excelName,loading){
+          exportExcelComm(columns, list, excelName, loading) {
                   require.ensure([], () => {
-                      const { export_json_to_excel } = require('@/vendor/Export2Excel');
+                      const { export_json_to_excel } = require('@/vendor/Export2Excel');// eslint-disable-line
                       let tHeader = []
                       let filterVal = []
-                      columns.forEach(item =>{
+                      columns.forEach((item) => {
                           tHeader.push(item.title)
                           filterVal.push(item.key)
                       })
                       const data = this.formatJson(filterVal, list);
-                   
                       export_json_to_excel(tHeader, data, excelName);
                       loading.close();
                   })
@@ -577,8 +572,7 @@ export default{
     handleCurrentChange(val) {
       this.current = val;
       this.loadData();
-    },
-
+    }
   }
 };
 </script>

+ 160 - 162
src/views/platform/waybill/history.vue

@@ -218,22 +218,22 @@
 </template>
 
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
       loading: false,
       fullscreenLoading: false,
-      userName: '',
-      customerName: '',
-      companyName: '',
-      billNum: '',
-      plateNum: '',
-      success:'',
-      taxPlayerCode: '',
-       hightt:'0px',
-      status: '',
+      userName: ``,
+      customerName: ``,
+      companyName: ``,
+      billNum: ``,
+      plateNum: ``,
+      success: ``,
+      taxPlayerCode: ``,
+      hightt: `0px`,
+      status: ``,
       addList: false,
       current: 1,
       pagesize: 8,
@@ -241,220 +241,218 @@ export default{
       currenttwo: 1,
       pagesizetwo: 8,
       totaltwo: 0,
-      batchNum: '',
-      batchNumberQ:'',
+      batchNum: ``,
+      batchNumberQ: ``,
       usertable: [],
       usertabletwo: [],
       formUserList: {
-      "customerName": "",
-       "file": "",
-       "roleId": ""
+        "customerName": ``,
+        "file": ``,
+        "roleId": ``
       },
-      isSuccess: '',
+      isSuccess: ``,
       optionone: [{
-        value: '1',
-        label: '成功'
+        value: `1`,
+        label: `成功`
       }, {
-        value: '2',
-        label: '失败'
-      }],
+        value: `2`,
+        label: `失败`
+      }]
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.formUserList.customerName = sessionStorage.getItem('userName');
-    this.loadData();
+    this.heightt = tableHeight // eslint-disable-line
+    this.formUserList.customerName = sessionStorage.getItem(`userName`)
+    this.loadData()
   },
   methods: {
-    firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
     // 列表展示
     async loadData() {
-      const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('customerName',this.formUserList.customerName);
-         formData.append('company', this.companyName);
-        formData.append('batchNumber', this.batchNum);
-        formData.append('operType', 3);
-        const response = await this.$http.post(`noCar/findBatchList`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertable = response.data.data.records;
-          this.total = response.data.data.total;
-        }
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`company`, this.companyName)
+      formData.append(`batchNumber`, this.batchNum)
+      formData.append(`operType`, 3)
+      const response = await this.$http.post(`noCar/findBatchList`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
+      }
     },
     // 下载模板
     DownloadTemplate() {
-      //var url = 'http://invoice.back.jkcredit.com/carFreeCarrierBill/downTemp';
-      var url = hostUrl+"noCar/templateDownload?fileName=3"
-      window.location.href= url;
-
+      // var url = 'http://invoice.back.jkcredit.com/carFreeCarrierBill/downTemp';
+      var url = hostUrl + `noCar/templateDownload?fileName=3`// eslint-disable-line
+      window.location.href = url
     },
     // 批量上传模板信息
     async batchUpload() {
-         const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
-      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
-       let AllUpExt = ".xlsx";
-       if( extName != AllUpExt){
-          this.$message.error('格式错误!请上传xlsx的文件');
-          return false;
-    }
+      const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50
+      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(`.`)).toLowerCase()
+      let AllUpExt = `.xlsx`
+      if (extName !== AllUpExt) {
+        this.$message.error(`格式错误!请上传xlsx的文件`)
+        return false
+      }
 
       if (!isLt50M) {
-                this.$message.error('上传文件大小不能超过50MB!');
-                return false;
-       }
+        this.$message.error(`上传文件大小不能超过50MB!`)
+        return false
+      }
       const loading = this.$loading({
-                                lock: true,
-                                text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                spinner: 'el-icon-loading',
-                                background: 'rgba(0, 0, 0, 0.7)'
-                              });
-      const formData = new FormData();
-      formData.append('customerName', this.formUserList.customerName);
-      formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`noCar/batchImprotHistoryBillWay`,formData);
-       var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
-        this.loadData();
-        loading.close();
-        this.$message.success('上传成功');
-      }else if(code === 1 && msg == null && data == null) {
-        loading.close();
-        this.$message.error('数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式');
-      }else {
-        loading.close();
-        this.$message.error(msg);
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const formData = new FormData()
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`file`, this.formUserList.file)
+      const response = await this.$http.post(`noCar/batchImprotHistoryBillWay`, formData)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
+        this.loadData()
+        loading.close()
+        this.$message.success(`上传成功`)
+      } else if (code === 1 && msg == null && data == null) {
+        loading.close()
+        this.$message.error(`数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式`)
+      } else {
+        loading.close()
+        this.$message.error(msg)
       }
     },
     // 查看批次数据
     async checkLook(id) {
-      this.addList = true;
-      this.batchNumberQ = id;
-      this.loadDataCar();
+      this.addList = true
+      this.batchNumberQ = id
+      this.loadDataCar()
+    },
+    twoLoadData() {
+      this.currenttwo = 1
+      this.pagesizetwo = 8
+      this.loadDataCar()
     },
-    twoLoadData(){
-            this.currenttwo = 1;
-            this.pagesizetwo = 8;
-            this.loadDataCar();
-          },
     // 查看历史数据
     async loadDataCar() {
-       const formData = new FormData();
-        formData.append('current', this.currenttwo);
-        formData.append('size', this.pagesizetwo);
-        formData.append('customerName', this.formUserList.customerName);
-        formData.append('batchNum', this.batchNumberQ);
-        formData.append('billNum', this.billNum);
-        formData.append('success', this.success);
-         formData.append('plateNum', this.plateNum);
-        formData.append('taxplayerCode', this.taxPlayerCode);
-        formData.append('hisFlag', 1);
-        const response = await this.$http.post(`noCar/findImportBillWay`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertabletwo = response.data.data.records;
-          this.totaltwo = response.data.data.total;
+      const formData = new FormData()
+      formData.append(`current`, this.currenttwo)
+      formData.append(`size`, this.pagesizetwo)
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`batchNum`, this.batchNumberQ)
+      formData.append(`billNum`, this.billNum)
+      formData.append(`success`, this.success)
+      formData.append(`plateNum`, this.plateNum)
+      formData.append(`taxplayerCode`, this.taxPlayerCode)
+      formData.append(`hisFlag`, 1)
+      const response = await this.$http.post(`noCar/findImportBillWay`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertabletwo = response.data.data.records
+        this.totaltwo = response.data.data.total
+      }
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `运单费用(元)`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
         }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
     },
-     formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-           
-            for(var i in sheet){
-              if(sheet[i]['v'] == '运单费用(元)'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
     async    exportExcel() {
       const loading = this.$loading({
-                                  lock: true,
-                                  text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                  spinner: 'el-icon-loading',
-                                  background: 'rgba(0, 0, 0, 0.7)'
-                                });
-      let curr = this.currenttwo;
-      let pagesize1 = this.pagesizetwo;
-      this.currenttwo = 1;
-      this.pagesizetwo = this.totaltwo;
-      await this.loadDataCar();
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.currenttwo
+      let pagesize1 = this.pagesizetwo
+      this.currenttwo = 1
+      this.pagesizetwo = this.totaltwo
+      await this.loadDataCar()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "历史运单上传列表_"+year + "" + month + "" + day;
+      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(".ttt"),{ raw: true });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.ttt`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.currenttwo = curr;
-      this.pagesizetwo = pagesize1;
-      this.loadDataCar();
-      loading.close();
-      return wbout;
+      this.currenttwo = curr
+      this.pagesizetwo = pagesize1
+      this.loadDataCar()
+      loading.close()
+      return wbout
     },
     // 清空表单数据
     handleEditDialogClose() {
-      this.num = '';
-      this.plateNumber = '';
-      this.taxPlayerCode = '';
-      this.current = 1;
-      this.pagesize = 8;
-      this.currenttwo = 1;
-      this.pagesizetwo = 8;
+      this.num = ``
+      this.plateNumber = ``
+      this.taxPlayerCode = ``
+      this.current = 1
+      this.pagesize = 8
+      this.currenttwo = 1
+      this.pagesizetwo = 8
     },
-     handleRemove(file, fileList) {
+    handleRemove(file, fileList) {
     },
 
     handlePreview(file) {
     },
-    handleSuccess (a) {
-      this.formUserList.file = a.raw;
+    handleSuccess(a) {
+      this.formUserList.file = a.raw
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-       this.loadData();
+      this.pagesize = val
+      this.loadData()
     },
     handleCurrentChange(val) {
-      this.current = val;
-      this.loadData();
+      this.current = val
+      this.loadData()
     },
     handleSize(val) {
-      this.pagesizetwo = val;
-      this.loadDataCar();
+      this.pagesizetwo = val
+      this.loadDataCar()
     },
     handleCurrent(val) {
-      this.currenttwo = val;
-     this.loadDataCar();
+      this.currenttwo = val
+      this.loadDataCar()
     }
   }
-};
+}
 </script>
 
 <style>

+ 100 - 101
src/views/platform/waybill/over.vue

@@ -171,13 +171,13 @@ export default{
     return {
       loading: false,
       fullscreenLoading: false,
-      customerName: '',
-      companyName: '',
-      batchNumer: '',
-      batchNumberQ:'',
-      billNum:'',
-      num: '',
-      hightt:'0px',
+      customerName: ``,
+      companyName: ``,
+      batchNumer: ``,
+      batchNumberQ: ``,
+      billNum: ``,
+      num: ``,
+      hightt: `0px`,
       addList: false,
       current: 1,
       pagesize: 8,
@@ -185,145 +185,144 @@ export default{
       currenttwo: 1,
       pagesizetwo: 8,
       totaltwo: 0,
-      batchId: '',
+      batchId: ``,
       usertable: [],
       usertabletwo: [],
       formUserList: {
-       "customerName": "",
-       "file": "",
-       "roleId": ""
-      },
+        "customerName": ``,
+        "file": ``,
+        "roleId": ``
+      }
     }
   },
   created() {
-    this.heightt = tableHeight;
-     this.formUserList.customerName = sessionStorage.getItem('userName');
-    this.loadData();
+    this.heightt = tableHeight // eslint-disable-line
+    this.formUserList.customerName = sessionStorage.getItem(`userName`)
+    this.loadData()
   },
   methods: {
-    firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
     // 列表展示
     async loadData() {
-       const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('customerName',this.formUserList.customerName);
-         formData.append('company', this.companyName);
-        formData.append('batchNumber', this.batchNumer);
-        formData.append('operType', 2);
-        const response = await this.$http.post(`noCar/findBatchList`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertable = response.data.data.records;
-          this.total = response.data.data.total;
-        }
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`company`, this.companyName)
+      formData.append(`batchNumber`, this.batchNumer)
+      formData.append(`operType`, 2)
+      const response = await this.$http.post(`noCar/findBatchList`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
+      }
     },
     // 下载模板
     DownloadTemplate() {
-      var url = hostUrl+"noCar/templateDownload?fileName=2"
-      window.location.href= url;
-
+      var url = hostUrl + `noCar/templateDownload?fileName=2`// eslint-disable-line
+      window.location.href = url
     },
     // 批量上传模板信息
     async batchUpload() {
-         const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
-      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
-       let AllUpExt = ".xlsx";
-       if( extName != AllUpExt){
-          this.$message.error('格式错误!请重新选择');
-          return false;
-    }
+      const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50
+      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(`.`)).toLowerCase()
+      let AllUpExt = `.xlsx`
+      if (extName !== AllUpExt) {
+        this.$message.error(`格式错误!请重新选择`)
+        return false
+      }
 
       if (!isLt50M) {
-                this.$message.error('上传文件大小不能超过50MB!');
-                return false;
-       }
-       const loading = this.$loading({
-                                      lock: true,
-                                      text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                      spinner: 'el-icon-loading',
-                                      background: 'rgba(0, 0, 0, 0.7)'
-                                    });
-      const formData = new FormData();
-      formData.append('customerName', this.formUserList.customerName);
-      formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`noCar/batchImprotEndBillWay`,formData);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
-        this.loadData();
-        loading.close();
-        this.$message.success('上传成功');
-      }else if(code === 1 && msg == null && data == null) {
-        loading.close();
-        this.$message.error('数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式');
-      }else {
-         loading.close();
-        this.$message.error(msg);
+        this.$message.error(`上传文件大小不能超过50MB!`)
+        return false
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const formData = new FormData()
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`file`, this.formUserList.file)
+      const response = await this.$http.post(`noCar/batchImprotEndBillWay`, formData)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
+        this.loadData()
+        loading.close()
+        this.$message.success(`上传成功`)
+      } else if (code === 1 && msg == null && data == null) {
+        loading.close()
+        this.$message.error(`数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式`)
+      } else {
+        loading.close()
+        this.$message.error(msg)
       }
     },
     // 查看批次数据
     async checkLook(id) {
-      this.addList = true;
-      this.batchNumberQ = id;
-      this.loadDataCar();
+      this.addList = true
+      this.batchNumberQ = id
+      this.loadDataCar()
+    },
+    twoLoadData() {
+      this.currenttwo = 1
+      this.pagesizetwo = 8
+      this.loadDataCar()
     },
-     twoLoadData(){
-            this.currenttwo = 1;
-            this.pagesizetwo = 8;
-            this.loadDataCar();
-          },
     // 查看实时数据
     async loadDataCar() {
-       const formData = new FormData();
-        formData.append('current', this.currenttwo);
-        formData.append('size', this.pagesizetwo);
-        formData.append('customerName', this.formUserList.customerName);
-        formData.append('batchNumEnd', this.batchNumberQ);
-         formData.append('billNum', this.billNum);
-        formData.append('hisFlag', 0);
-        const response = await this.$http.post(`noCar/findImportBillWay`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertabletwo = response.data.data.records;
-          this.totaltwo = response.data.data.total;
-        }
+      const formData = new FormData()
+      formData.append(`current`, this.currenttwo)
+      formData.append(`size`, this.pagesizetwo)
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`batchNumEnd`, this.batchNumberQ)
+      formData.append(`billNum`, this.billNum)
+      formData.append(`hisFlag`, 0)
+      const response = await this.$http.post(`noCar/findImportBillWay`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertabletwo = response.data.data.records
+        this.totaltwo = response.data.data.total
+      }
     },
     // 清空表单数据
     handleEditDialogClose() {
-       this.addList = false;
+      this.addList = false
     },
-     handleRemove(file, fileList) {
+    handleRemove(file, fileList) {
     },
 
     handlePreview(file) {
     },
-    handleSuccess (a) {
-      this.formUserList.file = a.raw;
+    handleSuccess(a) {
+      this.formUserList.file = a.raw
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-       this.loadData();
+      this.pagesize = val
+      this.loadData()
     },
     handleCurrentChange(val) {
-      this.current = val;
-       this.loadData();
+      this.current = val
+      this.loadData()
     },
     handleSize(val) {
-      this.pagesizetwo = val;
-      this.loadDataCar();
+      this.pagesizetwo = val
+      this.loadDataCar()
     },
     handleCurrent(val) {
-      this.currenttwo = val;
-      this.loadDataCar();
+      this.currenttwo = val
+      this.loadDataCar()
     }
 
   }
-};
+}
 </script>
 
 <style>

+ 139 - 144
src/views/platform/waybill/waybill.vue

@@ -219,222 +219,217 @@
 </template>
 
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
       loading: false,
       fullscreenLoading: false,
-      customerName: '',
-      companyName: '',
-      billNum: '',
-      plateNumber: '',
-      taxPlayerCode: '',
-       hightt:'0px',
-      status: '',
+      customerName: ``,
+      companyName: ``,
+      billNum: ``,
+      plateNumber: ``,
+      taxPlayerCode: ``,
+      hightt: `0px`,
+      status: ``,
       addList: false,
-      success:'',
+      success: ``,
       current: 1,
       pagesize: 8,
       total: 0,
       currenttwo: 1,
       pagesizetwo: 8,
       totaltwo: 0,
-      batchNum: '',
-      batchNumberQ:'',
+      batchNum: ``,
+      batchNumberQ: ``,
       usertable: [],
       usertabletwo: [],
       formUserList: {
-       "customerName": "",
-       "file": "",
-       "roleId": ""
+        "customerName": ``,
+        "file": ``,
+        "roleId": ``
       },
       optionone: [{
-        value: '1',
-        label: '成功'
+        value: `1`,
+        label: `成功`
       }, {
-        value: '2',
-        label: '失败'
+        value: `2`,
+        label: `失败`
       }],
-      isSuccess: '',
+      isSuccess: ``
     }
   },
   created() {
-    this.heightt = tableHeight;
-    this.formUserList.customerName = sessionStorage.getItem('userName');
-    this.loadData();
+    this.heightt = tableHeight // eslint-disable-line
+    this.formUserList.customerName = sessionStorage.getItem(`userName`)
+    this.loadData()
   },
   methods: {
-    firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
     // 列表展示
     async loadData() {
-
-       const formData = new FormData();
-        formData.append('current', this.current);
-        formData.append('size', this.pagesize);
-        formData.append('customerName',this.formUserList.customerName);
-         formData.append('company', this.companyName);
-        formData.append('batchNumber', this.batchNum);
-        formData.append('operType', 1);
-        const response = await this.$http.post(`noCar/findBatchList`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertable = response.data.data.records;
-          this.total = response.data.data.total;
-        }
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`company`, this.companyName)
+      formData.append(`batchNumber`, this.batchNum)
+      formData.append(`operType`, 1)
+      const response = await this.$http.post(`noCar/findBatchList`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
+      }
     },
     // 下载模板
     DownloadTemplate() {
-      var url = hostUrl+"noCar/templateDownload?fileName=1"
-      window.location.href= url;
-
+      var url = hostUrl + `noCar/templateDownload?fileName=1`// eslint-disable-line
+      window.location.href = url
     },
     // 批量上传模板信息
     async batchUpload() {
-     
-      const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
-      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
-       let AllUpExt = ".xlsx";
-       if( extName != AllUpExt){
-          this.$message.error('格式错误!请重新选择xlsx格式的文件');
-          return false;
-    }
+      const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50
+      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(`.`)).toLowerCase()
+      let AllUpExt = `.xlsx`
+      if (extName !== AllUpExt) {
+        this.$message.error(`格式错误!请重新选择xlsx格式的文件`)
+        return false
+      }
 
       if (!isLt50M) {
-                this.$message.error('上传文件大小不能超过50MB!');
-                return false;
-       }
+        this.$message.error(`上传文件大小不能超过50MB!`)
+        return false
+      }
       const loading = this.$loading({
-                                           lock: true,
-                                           text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                           spinner: 'el-icon-loading',
-                                           background: 'rgba(0, 0, 0, 0.7)'
-                                         });
-      const formData = new FormData();
-      formData.append('customerName', this.formUserList.customerName);
-      formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`noCar/batchImprotBillWay`,formData);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === 'success') {
-        this.loadData();
-        loading.close();
-        this.$message.success('上传成功');
-      }else if(code === 1 && msg == null && data == null) {
-       loading.close();
-        this.$message.error('数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式');
-      }else {
-       loading.close();
-        this.$message.error(msg);
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const formData = new FormData()
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`file`, this.formUserList.file)
+      const response = await this.$http.post(`noCar/batchImprotBillWay`, formData)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `success`) {
+        this.loadData()
+        loading.close()
+        this.$message.success(`上传成功`)
+      } else if (code === 1 && msg == null && data == null) {
+        loading.close()
+        this.$message.error(`数据存在错误,请检查文件中数据,金额是否有空的,时间是否全是时间格式`)
+      } else {
+        loading.close()
+        this.$message.error(msg)
       }
     },
     // 查看批次数据
     async checkLook(id) {
-      this.addList = true;
-      this.batchNumberQ = id;
-      this.loadDataCar();
+      this.addList = true
+      this.batchNumberQ = id
+      this.loadDataCar()
+    },
+    handleEditDialogClose() {
+      this.addList = false
     },
-    handleEditDialogClose(){
-       this.addList = false;
+    twoLoadData() {
+      this.currenttwo = 1
+      this.pagesizetwo = 8
+      this.loadDataCar()
     },
-    twoLoadData(){
-            this.currenttwo = 1;
-            this.pagesizetwo = 8;
-            this.loadDataCar();
-          },
     // 查看实时数据
     async loadDataCar() {
-
-        const formData = new FormData();
-        formData.append('current', this.currenttwo);
-        formData.append('size', this.pagesizetwo);
-        formData.append('customerName', this.formUserList.customerName);
-        formData.append('batchNum', this.batchNumberQ);
-        formData.append('billNum', this.billNum);
-        formData.append('success', this.success);
-         formData.append('plateNum', this.plateNumber);
-        formData.append('taxPlayerCode', this.taxPlayerCode);
-        formData.append('hisFlag', 0);
-        const response = await this.$http.post(`noCar/findImportBillWay`, formData);
-        if (response.data.code === 0) {
-          this.loading = false;
-          this.usertabletwo = response.data.data.records;
-          this.totaltwo = response.data.data.total;
-        }
+      const formData = new FormData()
+      formData.append(`current`, this.currenttwo)
+      formData.append(`size`, this.pagesizetwo)
+      formData.append(`customerName`, this.formUserList.customerName)
+      formData.append(`batchNum`, this.batchNumberQ)
+      formData.append(`billNum`, this.billNum)
+      formData.append(`success`, this.success)
+      formData.append(`plateNum`, this.plateNumber)
+      formData.append(`taxPlayerCode`, this.taxPlayerCode)
+      formData.append(`hisFlag`, 0)
+      const response = await this.$http.post(`noCar/findImportBillWay`, formData)
+      if (response.data.code === 0) {
+        this.loading = false
+        this.usertabletwo = response.data.data.records
+        this.totaltwo = response.data.data.total
+      }
     },
-   async exportExcel() {
+    async exportExcel() {
       const loading = this.$loading({
-                                  lock: true,
-                                  text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                  spinner: 'el-icon-loading',
-                                  background: 'rgba(0, 0, 0, 0.7)'
-                                });
-      let curr = this.currenttwo;
-      let pagesize1 = this.pagesizetwo;
-      this.currenttwo = 1;
-      this.pagesizetwo = this.totaltwo;
-      await this.loadDataCar();
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.currenttwo
+      let pagesize1 = this.pagesizetwo
+      this.currenttwo = 1
+      this.pagesizetwo = this.totaltwo
+      await this.loadDataCar()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "实时运单上传列表_"+year + "" + month + "" + day;
+      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(".ttt"),{ raw: true });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.ttt`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.currenttwo = curr;
-      this.pagesizetwo = pagesize1;
-      this.loadDataCar();
-      loading.close();
-      return wbout;
+      this.currenttwo = curr
+      this.pagesizetwo = pagesize1
+      this.loadDataCar()
+      loading.close()
+      return wbout
     },
-     handleRemove(file, fileList) {
+    handleRemove(file, fileList) {
     },
 
     handlePreview(file) {
     },
-    handleSuccess (a) {
-      this.formUserList.file = a.raw;
+    handleSuccess(a) {
+      this.formUserList.file = a.raw
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-       this.loadData();
+      this.pagesize = val
+      this.loadData()
     },
     handleCurrentChange(val) {
-      this.current = val;
-      this.loadData();
+      this.current = val
+      this.loadData()
     },
     handleSize(val) {
-      this.pagesizetwo = val;
-      this.loadDataCar();
+      this.pagesizetwo = val
+      this.loadDataCar()
     },
     handleCurrent(val) {
-      this.currenttwo = val;
-     this.loadDataCar();
+      this.currenttwo = val
+      this.loadDataCar()
     }
   }
-};
+}
 </script>
 
 <style>

+ 131 - 133
src/views/platform/waybillmanagement/noinvoice.vue

@@ -154,173 +154,171 @@
 </template>
 
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
 
       loading: false,
-      hisFlag:'',
-      billNum: '',
-      plateNumber: '',
-      batchNumber: '',
-      hightt:'0px',
-      billStartTime: '',
-       multipleSelection: [],
-      billEndTime: '',
-      createStartTime: '',
-      createEndTime: '',
+      hisFlag: ``,
+      billNum: ``,
+      plateNumber: ``,
+      batchNumber: ``,
+      hightt: `0px`,
+      billStartTime: ``,
+      multipleSelection: [],
+      billEndTime: ``,
+      createStartTime: ``,
+      createEndTime: ``,
       // taxPlayerCode: '',
       // status: '',
       currenttwo: 1,
       pagesizetwo: 8,
       totaltwo: 0,
       // batch: '',
-      companyList:[],
-      companyName:'',
+      companyList: [],
+      companyName: ``,
       usertabletwo: [],
-      customerName:'',
-       optionone: [{
-          value: '0',
-          label: '实时运单'
-        }, {
-          value: '1',
-          label: '历史运单'
-        }],
+      customerName: ``,
+      optionone: [{
+        value: `0`,
+        label: `实时运单`
+      }, {
+        value: `1`,
+        label: `历史运单`
+      }]
     }
   },
   created() {
-    this.heightt = tableHeight;
-     this.customerName = sessionStorage.getItem('userName');
-     this.initCompanyList();
-
+    this.heightt = tableHeight  // eslint-disable-line
+    this.customerName = sessionStorage.getItem(`userName`)
+    this.initCompanyList()
   },
   methods: {
-    firstLoadData(){
-            this.currenttwo = 1;
-            this.pagesizetwo = 8;
-            this.loadDataCar();
-          },
+    firstLoadData() {
+      this.currenttwo = 1
+      this.pagesizetwo = 8
+      this.loadDataCar()
+    },
     // 列表展示
     async loadDataCar() {
-      const formData = new FormData();
-      formData.append('current', this.currenttwo);
-      formData.append('size', this.pagesizetwo);
-      formData.append('isSuccess', 1);
-      formData.append('customerName', this.customerName);
-      formData.append('companyName', this.companyName);
-      formData.append('billNum', this.billNum);
-      formData.append('billwayStatus', 2);
-      formData.append('plateNumber', this.plateNumber);
-      formData.append('hisFlag', this.hisFlag);
-     // formData.append('batchNumber', this.batchNumber);
-     // formData.append('billStartTime', this.billStartTime);
-      //formData.append('billEndTime', this.billEndTime);
-      //formData.append('createStartTime', this.createStartTime);
-      //formData.append('createEndTime', this.createEndTime);
-        // formData.append('isSuccess', 1);
-      const response = await this.$http.post(`noCar/findBillWay`, formData);
+      const formData = new FormData()
+      formData.append(`current`, this.currenttwo)
+      formData.append(`size`, this.pagesizetwo)
+      formData.append(`isSuccess`, 1)
+      formData.append(`customerName`, this.customerName)
+      formData.append(`companyName`, this.companyName)
+      formData.append(`billNum`, this.billNum)
+      formData.append(`billwayStatus`, 2)
+      formData.append(`plateNumber`, this.plateNumber)
+      formData.append(`hisFlag`, this.hisFlag)
+      // formData.append('batchNumber', this.batchNumber);
+      // formData.append('billStartTime', this.billStartTime);
+      // formData.append('billEndTime', this.billEndTime);
+      // formData.append('createStartTime', this.createStartTime);
+      // formData.append('createEndTime', this.createEndTime);
+      // formData.append('isSuccess', 1);
+      const response = await this.$http.post(`noCar/findBillWay`, formData)
       if (response.data.code === 0) {
-         this.loading = false;
-        this.usertabletwo = response.data.data.records;
-        this.totaltwo = response.data.data.total;
-        }
+        this.loading = false
+        this.usertabletwo = response.data.data.records
+        this.totaltwo = response.data.data.total
+      }
     },
-    async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }   if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                      this.companyList = [{'companyName':'.'}];
-                                                    }
-            this.companyName = this.companyList[0]['companyName'];
-            this.loadDataCar();
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      } if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.companyName = this.companyList[0][`companyName`]
+      this.loadDataCar()
     },
-     formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-           
-            for(var i in sheet){
-              if(sheet[i]['v'] == '运单费用(元)'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-    //查看
-   async    exportExcel() {
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `运单费用(元)`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
+    // 查看
+    async    exportExcel() {
       const loading = this.$loading({
-                                  lock: true,
-                                  text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                  spinner: 'el-icon-loading',
-                                  background: 'rgba(0, 0, 0, 0.7)'
-                                });
-      let curr = this.currenttwo;
-      let pagesize1 = this.pagesizetwo;
-      this.currenttwo = 1;
-      this.pagesizetwo = this.totaltwo;
-      await this.loadDataCar();
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.currenttwo
+      let pagesize1 = this.pagesizetwo
+      this.currenttwo = 1
+      this.pagesizetwo = this.totaltwo
+      await this.loadDataCar()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "历史运单上传列表_"+year + "" + month + "" + day;
+      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(".ttt"),{ raw: true });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.ttt`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.currenttwo = curr;
-      this.pagesizetwo = pagesize1;
-      this.loadDataCar();
-      loading.close();
-      return wbout;
+      this.currenttwo = curr
+      this.pagesizetwo = pagesize1
+      this.loadDataCar()
+      loading.close()
+      return wbout
     },
-     //导出功能
+    // 导出功能
     exportOut() {
-      var url = `http://invoice.back.jkcredit.com/carFreeCarrierBill/billExport?&userId=${this.formUserList.userId}`;
+      var url = `http://invoice.back.jkcredit.com/carFreeCarrierBill/billExport?&userId=${this.formUserList.userId}`
 
-      window.location.href= url;
+      window.location.href = url
+    },
+    handleSelectionChange(value) {
+      this.multipleSelection = value
     },
-    handleSelectionChange(value){
-                       this.multipleSelection = value;
-                    },
- //批量开票
+    // 批量开票
     async makeInvoice() {
-      const formData = new FormData();
-            formData.append('noCarWayBillStr', JSON.stringify(this.multipleSelection));
-            const response = await this.$http.post(`noCar/updateStatus`,formData);
-                  if(response.data.code === 0) {
-                    this.loadDataCar();
-                    this.$message({
-                      type: 'success',
-                      message: '更新成功'
-                    });
-                  }else {
-                    this.$message({
-                      type: 'error',
-                      message: '更新失败'
-                    });
-                  }
+      const formData = new FormData()
+      formData.append(`noCarWayBillStr`, JSON.stringify(this.multipleSelection))
+      const response = await this.$http.post(`noCar/updateStatus`, formData)
+      if (response.data.code === 0) {
+        this.loadDataCar()
+        this.$message({
+          type: `success`,
+          message: `更新成功`
+        })
+      } else {
+        this.$message({
+          type: `error`,
+          message: `更新失败`
+        })
+      }
       // this.fullscreenLoading = true;
       // this.formList.userId = Number(this.formUserList.userId);
       // for(var i = 0; i < this.multipleSelection.length; i++) {
@@ -348,15 +346,15 @@ export default{
     },
     // 分页方法
     handleSize(val) {
-      this.pagesizetwo = val;
-      this.loadDataCar();
+      this.pagesizetwo = val
+      this.loadDataCar()
     },
     handleCurrent(val) {
-      this.currenttwo = val;
-     this.loadDataCar();
+      this.currenttwo = val
+      this.loadDataCar()
     }
   }
-};
+}
 </script>
 
 <style>

+ 130 - 132
src/views/platform/waybillmanagement/trueinvoice.vue

@@ -167,187 +167,185 @@
 </template>
 
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
 
       loading: false,
-      hisFlag:'',
-      billNum: '',
-      plateNumber: '',
-      batchNumber: '',
-       startBegin: '',
-      startEnd: '',
-      endBegin: '',
-      endEnd: '',
-      hightt:'0px',
-      endTime: '',
-      createStartTime: '',
-      createEndTime: '',
-      isLegacyData:'',
-      isExport:'',
+      hisFlag: ``,
+      billNum: ``,
+      plateNumber: ``,
+      batchNumber: ``,
+      startBegin: ``,
+      startEnd: ``,
+      endBegin: ``,
+      endEnd: ``,
+      hightt: `0px`,
+      endTime: ``,
+      createStartTime: ``,
+      createEndTime: ``,
+      isLegacyData: ``,
+      isExport: ``,
       // taxPlayerCode: '',
       // status: '',
       currenttwo: 1,
       pagesizetwo: 8,
       totaltwo: 0,
       // batch: '',
-      companyList:[],
-      companyName:'',
+      companyList: [],
+      companyName: ``,
       usertabletwo: [],
-      customerName:'',
+      customerName: ``,
       optionone: [{
-          value: '0',
-          label: '实时运单'
-        }, {
-          value: '1',
-          label: '历史运单'
-        }],
+        value: `0`,
+        label: `实时运单`
+      }, {
+        value: `1`,
+        label: `历史运单`
+      }],
       option: [{
-          value: '1',
-          label: '已导出'
-        }, {
-          value: '2',
-          label: '未导出'
-        }],
+        value: `1`,
+        label: `已导出`
+      }, {
+        value: `2`,
+        label: `未导出`
+      }],
       optiontwo: [{
-          value: '1',
-          label: '非历史开票记录'
-        }, {
-          value: '2',
-          label: '历史开票记录'
-        }],
+        value: `1`,
+        label: `非历史开票记录`
+      }, {
+        value: `2`,
+        label: `历史开票记录`
+      }]
     }
   },
   created() {
-    this.heightt = tableHeight;
-     this.customerName = sessionStorage.getItem('userName');
-     this.initCompanyList();
-
+    this.heightt = tableHeight  // eslint-disable-line
+    this.customerName = sessionStorage.getItem(`userName`)
+    this.initCompanyList()
   },
   methods: {
-        firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadDataCar();
-          },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadDataCar()
+    },
     // 列表展示
     async loadDataCar() {
-      const formData = new FormData();
-      formData.append('current', this.currenttwo);
-      formData.append('size', this.pagesizetwo);
-      formData.append('customerName', this.customerName);
-      formData.append('companyName', this.companyName);
-      formData.append('billNum', this.billNum);
-       formData.append('startBegin', this.startBegin);
-      formData.append('startEnd', this.startEnd);
-      formData.append('endBegin', this.endBegin);
-      formData.append('endEnd', this.endEnd);
-      formData.append('plateNumber', this.plateNumber);
-      formData.append('billwayStatus', 3);
-      formData.append('hisFlag', this.hisFlag);
-     // formData.append('batchNumber', this.batchNumber);
-     // formData.append('billStartTime', this.billStartTime);
-      //formData.append('billEndTime', this.billEndTime);
-      //formData.append('createStartTime', this.createStartTime);
-      //formData.append('createEndTime', this.createEndTime);
-        // formData.append('isSuccess', 1);
-      const response = await this.$http.post(`noCar/findBillWayCust`, formData);
+      const formData = new FormData()
+      formData.append(`current`, this.currenttwo)
+      formData.append(`size`, this.pagesizetwo)
+      formData.append(`customerName`, this.customerName)
+      formData.append(`companyName`, this.companyName)
+      formData.append(`billNum`, this.billNum)
+      formData.append(`startBegin`, this.startBegin)
+      formData.append(`startEnd`, this.startEnd)
+      formData.append(`endBegin`, this.endBegin)
+      formData.append(`endEnd`, this.endEnd)
+      formData.append(`plateNumber`, this.plateNumber)
+      formData.append(`billwayStatus`, 3)
+      formData.append(`hisFlag`, this.hisFlag)
+      // formData.append('batchNumber', this.batchNumber);
+      // formData.append('billStartTime', this.billStartTime);
+      // formData.append('billEndTime', this.billEndTime);
+      // formData.append('createStartTime', this.createStartTime);
+      // formData.append('createEndTime', this.createEndTime);
+      // formData.append('isSuccess', 1);
+      const response = await this.$http.post(`noCar/findBillWayCust`, formData)
       if (response.data.code === 0) {
-         this.loading = false;
-        this.usertabletwo = response.data.data.records;
-        this.totaltwo = response.data.data.total;
-        }
+        this.loading = false
+        this.usertabletwo = response.data.data.records
+        this.totaltwo = response.data.data.total
+      }
     },
-    async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }  if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                     this.companyList = [{'companyName':'.'}];
-                                                   }
-            this.companyName = this.companyList[0]['companyName'];
-            this.loadDataCar();
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      } if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.companyName = this.companyList[0][`companyName`]
+      this.loadDataCar()
     },
-    //查看
+    // 查看
 
-     //导出功能
+    // 导出功能
     exportOut() {
-      var url = `http://invoice.back.jkcredit.com/carFreeCarrierBill/billExport?&userId=${this.formUserList.userId}`;
+      var url = `http://invoice.back.jkcredit.com/carFreeCarrierBill/billExport?&userId=${this.formUserList.userId}`
 
-      window.location.href= url;
+      window.location.href = url
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `运单费用(元)`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
     },
-     formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-           
-            for(var i in sheet){
-              if(sheet[i]['v'] == '运单费用(元)'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
     async    exportExcel() {
-    const loading = this.$loading({
-                                lock: true,
-                                text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                                spinner: 'el-icon-loading',
-                                background: 'rgba(0, 0, 0, 0.7)'
-                              });
-          let curr = this.currenttwo;
-      let pagesize1 = this.pagesizetwo;
-      this.currenttwo = 1;
-      this.pagesizetwo = this.totaltwo;
-      await this.loadDataCar();
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.currenttwo
+      let pagesize1 = this.pagesizetwo
+      this.currenttwo = 1
+      this.pagesizetwo = this.totaltwo
+      await this.loadDataCar()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "历史运单上传列表_"+year + "" + month + "" + day;
+      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(".ttt"),{ raw: true });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.ttt`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.currenttwo = curr;
-      this.pagesizetwo = pagesize1;
-      this.loadDataCar();
-      loading.close();
-      return wbout;
+      this.currenttwo = curr
+      this.pagesizetwo = pagesize1
+      this.loadDataCar()
+      loading.close()
+      return wbout
     },
 
     // 分页方法
     handleSize(val) {
-      this.pagesizetwo = val;
-      this.loadDataCar();
+      this.pagesizetwo = val
+      this.loadDataCar()
     },
     handleCurrent(val) {
-      this.currenttwo = val;
-     this.loadDataCar();
+      this.currenttwo = val
+      this.loadDataCar()
     }
   }
-};
+}
 </script>
 
 <style>

+ 171 - 173
src/views/platform/waybillmanagement/waybillList.vue

@@ -184,216 +184,214 @@
 </template>
 
 <script>
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
 
       loading: false,
-      billNum: '',
-      plateNum: '',
-      batchNumber: '',
-      startBegin: '',
-      startEnd: '',
-      endBegin: '',
-      success:'',
-      endEnd: '',
-       hightt:'0px',
+      billNum: ``,
+      plateNum: ``,
+      batchNumber: ``,
+      startBegin: ``,
+      startEnd: ``,
+      endBegin: ``,
+      success: ``,
+      endEnd: ``,
+      hightt: `0px`,
       // taxPlayerCode: '',
       // status: '',
       currenttwo: 1,
       pagesizetwo: 8,
       totaltwo: 0,
       optionone: [{
-        value: '1',
-        label: '成功'
+        value: `1`,
+        label: `成功`
       }, {
-        value: '2',
-        label: '失败'
+        value: `2`,
+        label: `失败`
       }],
       // batch: '',
-      companyList:[],
-      companyName:'',
+      companyList: [],
+      companyName: ``,
       usertabletwo: [],
-      customerName:'',
+      customerName: ``
     }
   },
   created() {
-    this.heightt = tableHeight;
-     this.customerName = sessionStorage.getItem('userName');
-     this.initCompanyList();
-
+    this.heightt = tableHeight // eslint-disable-line
+    this.customerName = sessionStorage.getItem(`userName`)
+    this.initCompanyList()
   },
   methods: {
-        firstLoadData(){
-            this.currenttwo = 1;
-            this.pagesizetwo = 8;
-            this.loadDataCar();
-          },
+    firstLoadData() {
+      this.currenttwo = 1
+      this.pagesizetwo = 8
+      this.loadDataCar()
+    },
     // 列表展示
     async loadDataCar() {
-      const formData = new FormData();
-      formData.append('current', this.currenttwo);
-      formData.append('size', this.pagesizetwo);
-      formData.append('success', this.success);
-      formData.append('customerName', this.customerName);
-      formData.append('companyName', this.companyName);
-      formData.append('billNum', this.billNum);
-       formData.append('billNumN', this.billNum);
-      formData.append('plateNum', this.plateNum);
-     // formData.append('batchNumber', this.batchNumber);
-      formData.append('startBegin', this.startBegin);
-      formData.append('startEnd', this.startEnd);
-      formData.append('endBegin', this.endBegin);
-      formData.append('endEnd', this.endEnd);
-        // formData.append('isSuccess', 1);
-      const response = await this.$http.post(`noCar/findBillWayCust`, formData);
+      const formData = new FormData()
+      formData.append(`current`, this.currenttwo)
+      formData.append(`size`, this.pagesizetwo)
+      formData.append(`success`, this.success)
+      formData.append(`customerName`, this.customerName)
+      formData.append(`companyName`, this.companyName)
+      formData.append(`billNum`, this.billNum)
+      formData.append(`billNumN`, this.billNum)
+      formData.append(`plateNum`, this.plateNum)
+      // formData.append('batchNumber', this.batchNumber);
+      formData.append(`startBegin`, this.startBegin)
+      formData.append(`startEnd`, this.startEnd)
+      formData.append(`endBegin`, this.endBegin)
+      formData.append(`endEnd`, this.endEnd)
+      // formData.append('isSuccess', 1);
+      const response = await this.$http.post(`noCar/findBillWayCust`, formData)
       if (response.data.code === 0) {
-         this.loading = false;
-        this.usertabletwo = response.data.data.records;
-        this.totaltwo = response.data.data.total;
-        }
+        this.loading = false
+        this.usertabletwo = response.data.data.records
+        this.totaltwo = response.data.data.total
+      }
     },
-    async initCompanyList(){
-            const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
-            if (response.data.code === 0) {
-              this.companyList = response.data.data;
-            }  if(this.companyList == null || typeof this.companyList == 'undefined' || this.companyList =='' || this.companyList.length==0){
-                                                     this.companyList = [{'companyName':'.'}];
-                                                   }
-            this.companyName = this.companyList[0]['companyName'];
-            this.loadDataCar();
+    async initCompanyList() {
+      const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName": sessionStorage.getItem(`userName`)})
+      if (response.data.code === 0) {
+        this.companyList = response.data.data
+      } if (this.companyList == null || typeof this.companyList === `undefined` || this.companyList === `` || this.companyList.length === 0) {
+        this.companyList = [{'companyName': `.`}]
+      }
+      this.companyName = this.companyList[0][`companyName`]
+      this.loadDataCar()
     },
-    //查看
+    // 查看
 
-     //导出功能
+    // 导出功能
     exportOut() {
-      var url = `http://invoice.back.jkcredit.com/carFreeCarrierBill/billExport?&userId=${this.formUserList.userId}`;
+      var url = `http://invoice.back.jkcredit.com/carFreeCarrierBill/billExport?&userId=${this.formUserList.userId}`
 
-      window.location.href= url;
+      window.location.href = url
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `运单费用(元)`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
     },
-     formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-           
-            for(var i in sheet){
-              if(sheet[i]['v'] == '运单费用(元)'){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
+    async  exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+
+      const formData = new FormData()
+      formData.append(`current`, 1)
+      formData.append(`size`, this.totaltwo)
+      formData.append(`success`, this.success)
+      formData.append(`customerName`, this.customerName)
+      formData.append(`companyName`, this.companyName)
+      formData.append(`billNum`, this.billNum)
+      formData.append(`billNumN`, this.billNum)
+      formData.append(`plateNum`, this.plateNum)
+      // formData.append('batchNumber', this.batchNumber);
+      formData.append(`startBegin`, this.startBegin)
+      formData.append(`startEnd`, this.startEnd)
+      formData.append(`endBegin`, this.endBegin)
+      formData.append(`endEnd`, this.endEnd)
+      // formData.append('isSuccess', 1);
+      const response = await this.$http.post(`noCar/findBillWayCust`, formData)
+      if (response.data.code === 0) {
+        // 设置当前日期
+        let time = new Date()
+        let year = time.getFullYear()
+        let month = time.getMonth() + 1
+        let day = time.getDate()
+        let name = `无车运单查询列表_` + year + `` + month + `` + day
+        let cloums = [
+          {"title": `公司名称`, "key": `companyName`},
+          {"title": `运单号`, "key": `billNum`},
+          {"title": `税号`, "key": `taxplayerCode`},
+          {"title": `车牌号码`, "key": `plateNum`},
+          {"title": `运单开始时间`, "key": `startTime`},
+          {"title": `运单结束时间`, "key": `predictEndTime`},
+          {"title": `运单开始地址`, "key": `sourceAddr`},
+          {"title": `运单结束地址`, "key": `destAddr`},
+          {"title": `运单费用(元)`, "key": `fee`},
+          {"title": `运单状态`, "key": `billwayStatus`},
+          {"title": `失败原因`, "key": `failReason`},
+          {"title": `运单类型`, "key": `hisFlag`}
+        ]
+
+        this.exportExcelComm(cloums, response.data.data.records, name, loading)
+      }
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) => {
+        return filterVal.map((j) => {
+          if (j === `billwayStatus`) {
+            if (v[j] === 1) {
+              return `未结束`
+            } else if (v[j] === -2) {
+              return `上传失败`
+            } else if (v[j] === -3) {
+              return `指令结束上传失败`
+            } else if (v[j] === 2) {
+              return `开票中`
+            } else if (v[j] === 3) {
+              return `开票完成`
+            } else {
+              return `超时运单`
             }
-          },
-async  exportExcel() {
-            const loading = this.$loading({
-                               lock: true,
-                               text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                               spinner: 'el-icon-loading',
-                               background: 'rgba(0, 0, 0, 0.7)'
-                             });
-            
-            const formData = new FormData();
-      formData.append('current', 1);
-      formData.append('size', this.totaltwo);
-      formData.append('success', this.success);
-      formData.append('customerName', this.customerName);
-      formData.append('companyName', this.companyName);
-      formData.append('billNum', this.billNum);
-       formData.append('billNumN', this.billNum);
-      formData.append('plateNum', this.plateNum);
-     // formData.append('batchNumber', this.batchNumber);
-      formData.append('startBegin', this.startBegin);
-      formData.append('startEnd', this.startEnd);
-      formData.append('endBegin', this.endBegin);
-      formData.append('endEnd', this.endEnd);
-        // formData.append('isSuccess', 1);
-      const response = await this.$http.post(`noCar/findBillWayCust`, formData);
-            if (response.data.code === 0) {
-               // 设置当前日期
-                    let time = new Date();
-                    let year = time.getFullYear();
-                    let month = time.getMonth() + 1;
-                    let day = time.getDate();
-                    let name = "无车运单查询列表_"+year + "" + month + "" + day;
-                    let cloums = [
-                      {"title":"公司名称","key":"companyName"},
-                          {"title":"运单号","key":"billNum"},
-                          {"title":"税号","key":"taxplayerCode"},
-                          {"title":"车牌号码","key":"plateNum"},
-                          {"title":"运单开始时间","key":"startTime"},
-                          {"title":"运单结束时间","key":"predictEndTime"},
-                          {"title":"运单开始地址","key":"sourceAddr"},
-                          {"title":"运单结束地址","key":"destAddr"},
-                          {"title":"运单费用(元)","key":"fee"},
-                          {"title":"运单状态","key":"billwayStatus"},
-                          {"title":"失败原因","key":"failReason"},
-                          {"title":"运单类型","key":"hisFlag"},
-                    ];
-                  
-                   this.exportExcelComm(cloums,response.data.data.records,name,loading)
-              
+          } else if (j === `hisFlag`) {
+            if (v[j] === 0) {
+              return `实时运单`
+            } else {
+              return `历史运单`
             }
-          },
-          formatJson (filterVal, jsonData) {
-            return jsonData.map(v => filterVal.map(j => {
-              if(j == 'billwayStatus'){
-                 if(v[j] == 1){
-                   return "未结束";
-                 } else if(v[j] == -2){
-                   return "上传失败";
-                 }else if(v[j] == -3){
-                   return "指令结束上传失败";
-                 }else if(v[j] == 2){
-                   return "开票中";
-                 }else if(v[j] == 3){
-                   return "开票完成";
-                 }else {
-                   return "超时运单";
-                 }
-              }else if(j=='hisFlag'){
-                if(v[j] == 0){
-                  return "实时运单";
-                }else{
-                  return "历史运单";
-                }
-              }else if(j =='fee'){
-                  return v[j]/100;
-              }else{
-                  return v[j];
-              }
-              
-              }));
-          },
-          // 导出Excel
-          exportExcelComm(columns,list,excelName,loading){
-                  require.ensure([], () => {
-                      const { export_json_to_excel } = require('@/vendor/Export2Excel');
-                      let tHeader = []
-                      let filterVal = []
-                      columns.forEach(item =>{
-                          tHeader.push(item.title)
-                          filterVal.push(item.key)
-                      })
-                      const data = this.formatJson(filterVal, list);
-                      export_json_to_excel(tHeader, data, excelName);
-                     loading.close();
-                   
-                  })
-            },
+          } else if (j === `fee`) {
+            return v[j] / 100
+          } else {
+            return v[j]
+          }
+        })
+      })
+    },
+    // 导出Excel
+    exportExcelComm(columns, list, excelName, loading) {
+      require.ensure([], () => {
+        const { export_json_to_excel } = require(`@/vendor/Export2Excel`)// eslint-disable-line
+        let tHeader = []
+        let filterVal = []
+        columns.forEach((item) => {
+          tHeader.push(item.title)
+          filterVal.push(item.key)
+        })
+        const data = this.formatJson(filterVal, list)
+        export_json_to_excel(tHeader, data, excelName)
+        loading.close()
+      })
+    },
     // 分页方法
     handleSize(val) {
-      this.pagesizetwo = val;
-      this.loadDataCar();
+      this.pagesizetwo = val
+      this.loadDataCar()
     },
     handleCurrent(val) {
-      this.currenttwo = val;
-     this.loadDataCar();
+      this.currenttwo = val
+      this.loadDataCar()
     }
   }
-};
+}
 </script>
 
 <style>

+ 106 - 107
src/views/selfCar/calculateInfo.vue

@@ -76,125 +76,124 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              companyName:'',
-              companyReferencenum:'',
-              etcNum:'',
-              calTime:'',
-              companyLongName:''
-            },
-            calculateInfo:[],
-             hightt:'0px',
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-              firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            formData.append('companyName', this.formCondition.companyName);
-            formData.append('companyReferencenum', this.formCondition.companyReferencenum);
-            formData.append('etcNum', this.formCondition.etcNum);
-            formData.append('calTime', this.formCondition.calTime);
-            formData.append('companyLongName', this.formCondition.companyLongName);
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        companyName: ``,
+        companyReferencenum: ``,
+        etcNum: ``,
+        calTime: ``,
+        companyLongName: ``
+      },
+      calculateInfo: [],
+      hightt: `0px`,
+      current: 1,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`companyName`, this.formCondition.companyName)
+      formData.append(`companyReferencenum`, this.formCondition.companyReferencenum)
+      formData.append(`etcNum`, this.formCondition.etcNum)
+      formData.append(`calTime`, this.formCondition.calTime)
+      formData.append(`companyLongName`, this.formCondition.companyLongName)
 
-            const response = await this.$http.post(`selfCar/findSelfcarCalculateInfo`, formData);
-            if (response.data.code === 0) {
-              this.calculateInfo = response.data.data.records;
-               this.total = response.data.data.total;
-            }
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-          formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
-          
-            for(var i in sheet){
-              if(sheet[i]['v'] == "费用"){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
-        async    exportExcel() {
-        const loading = this.$loading({
-                              lock: true,
-                              text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                              spinner: 'el-icon-loading',
-                              background: 'rgba(0, 0, 0, 0.7)'
-                            });
-          let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+      const response = await this.$http.post(`selfCar/findSelfcarCalculateInfo`, formData)
+      if (response.data.code === 0) {
+        this.calculateInfo = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
+
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `费用`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
+    async    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "自有车计费查询列表_"+year + "" + month + "" + day;
+      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 });
-      this.formartNum(wb);
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
+      this.formartNum(wb)
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .calculateInfo_container {

+ 273 - 278
src/views/selfCar/invoice.vue

@@ -219,303 +219,298 @@
     </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:{
-              cardId:'',
-              tradeId:''
-            },
-            formUserList: {
-            "file": ""
-            },
-           invoiceTable:[],
-            hightt:'0px',
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight-50;
-          this.loadData();
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
-            }
-            const response = await this.$http.post('selfCar/findSelfCarInvoices', formData);
-            if (response.data.code === 0) {
-              this.invoiceTable = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-importExcel (content) {
-    const file = content.file
-    // let file = file.files[0] // 使用传统的input方法需要加上这一步
-    const filename = file.name
-    if(!filename||typeof filename!='string'){
-      this.$message('格式错误!请重新选择')
-     return
+import FileSaver from "file-saver"
+import CsvExportor from "csv-exportor"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        cardId: ``,
+        tradeId: ``
+      },
+      formUserList: {
+        "file": ``
+      },
+      invoiceTable: [],
+      hightt: `0px`,
+      current: 1,
+      pagesize: 8,
+      total: ``
     }
-  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 => item === types)
-    if (!fileType) {
-      this.$message('格式错误!请重新选择')
-      return
+  },
+  created() {
+    this.heightt = tableHeight - 50 // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
     }
-    this.file2Xce(file).then(tabJson => {
-      var tradeIds = '';
-      var etcIds = '';
-      if (tabJson && tabJson.length > 0) {
-        this.xlsxJson = tabJson
-        this.fileList = this.xlsxJson[0].sheet
-        let n = '匹配的字段'
-        var i=0;
-        var j=0;
-        this.fileList.forEach((item, index, arr) => {
-           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+= '#,';
-           }
-        });
-
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
       }
-      if(etcIds!='' && i>0){
-        this.formCondition.cardId =etcIds.substring(0,etcIds.length-1);
+      const response = await this.$http.post(`selfCar/findSelfCarInvoices`, formData)
+      if (response.data.code === 0) {
+        this.invoiceTable = response.data.data.records
+        this.total = response.data.data.total
       }
-      if(tradeIds!='' && j>0){
-        this.formCondition.tradeId = tradeIds.substring(0,tradeIds.length-1)  ;
+    },
+    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(``)
 
-    })
-  },
-  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)
+      const fileType = [`xlsx`, `xlc`, `xlm`, `xls`, `xlt`, `xlw`, `csv`].some((item) => { return item === types })
+      if (!fileType) {
+        this.$message(`格式错误!请重新选择`)
+        return
       }
-      // reader.readAsBinaryString(file.raw)
-      reader.readAsBinaryString(file) // 传统input方法
-    })
-  },
-             // 下载模板
-          DownloadTemplate() {
-            var url = hostUrl+"noCar/templateDownload?fileName=7"
-            window.location.href= url;
-
-          },
-           handleRemove(file, fileList) {
-          },
+      this.file2Xce(file).then((tabJson) => {
+        var tradeIds = ``
+        var etcIds = ``
+        if (tabJson && tabJson.length > 0) {
+          this.xlsxJson = tabJson
+          this.fileList = this.xlsxJson[0].sheet
+          let n = `匹配的字段`
+          var i = 0
+          var j = 0
+          this.fileList.forEach((item, index, arr) => {
+            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 (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=7` // eslint-disable-line
+      window.location.href = url
+    },
+    handleRemove(file, fileList) {
+    },
 
-          handlePreview(file) {
-          },
-          handleSuccess (a) {
-            this.formUserList.file = a.raw;
-          },
+    handlePreview(file) {
+    },
+    handleSuccess(a) {
+      this.formUserList.file = a.raw
+    },
 
-                // 批量上传模板信息
-          async batchUpload() {
-               const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
-      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
-       let AllUpExt = ".xlsx";
-       if( extName != AllUpExt){
-          this.$message.error(extName+'格式错误!请重新选择xlsx文件');
-          return false;
-    }
+    // 批量上传模板信息
+    async batchUpload() {
+      const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50
+      let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(`.`)).toLowerCase()
+      let AllUpExt = `.xlsx`
+      if (extName !== AllUpExt) {
+        this.$message.error(extName + `格式错误!请重新选择xlsx文件`)
+        return false
+      }
 
       if (!isLt50M) {
-                this.$message.error('上传文件大小不能超过50MB!');
-                return false;
-       }
-
+        this.$message.error(`上传文件大小不能超过50MB!`)
+        return false
+      }
 
-           const loading = this.$loading({
-                          lock: true,
-                          text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                          spinner: 'el-icon-loading',
-                          background: 'rgba(0, 0, 0, 0.7)'
-                        });
-          const formData = new FormData();
-          formData.append('file', this.formUserList.file);
-          const response = await this.$http.post(`selfCar/batchImportSelfcarInvoices`,formData);
-          var {data: { code, msg, data }} = response;
-          if(code === 0 && msg === '1') {
-               loading.close();
-              this.invoiceTable = response.data.data;
-              this.total = response.data.data.length;
-          }else {
-            loading.close();
-            this.$message.error('数据存在错误,请检查文件中数据');
-          }
-        },
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      const formData = new FormData()
+      formData.append(`file`, this.formUserList.file)
+      const response = await this.$http.post(`selfCar/batchImportSelfcarInvoices`, formData)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `1`) {
+        loading.close()
+        this.invoiceTable = response.data.data
+        this.total = response.data.data.length
+      } else {
+        loading.close()
+        this.$message.error(`数据存在错误,请检查文件中数据`)
+      }
+    },
 
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-          formartNum(wb){
-            var sheet = wb['Sheets']['Sheet1'];
-            var replaceTemp = [];
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    formartNum(wb) {
+      var sheet = wb[`Sheets`][`Sheet1`]
+      var replaceTemp = []
 
-            for(var i in sheet){
-              if(sheet[i]['v'] == "价税合计"||sheet[i]['v'] == "税额"||sheet[i]['v'] == "金额"||sheet[i]['v'] == "税率"||sheet[i]['v'] == "交易金额"){
-                replaceTemp.push(i.replace(/[0-9]/g,''));
-                continue;
-              }
-              if(replaceTemp.includes(i.replace(/[0-9]/g,''))){
-                sheet[i]['t']='n';
-              }
-            }
-          },
+      for (var i in sheet) {
+        if (sheet[i][`v`] === `价税合计` || sheet[i][`v`] === `税额` || sheet[i][`v`] === `金额` || sheet[i][`v`] === `税率` || sheet[i][`v`] === `交易金额`) {
+          replaceTemp.push(i.replace(/[0-9]/g, ``))
+          continue
+        }
+        if (replaceTemp.includes(i.replace(/[0-9]/g, ``))) {
+          sheet[i][`t`] = `n`
+        }
+      }
+    },
     async  exportExcel() {
-            const loading = this.$loading({
-                               lock: true,
-                               text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                               spinner: 'el-icon-loading',
-                               background: 'rgba(0, 0, 0, 0.7)'
-                             });
-            var recodes = [];
-            debugger;
-            for(var j=1;j<=this.total/10000+1;j++){
-
-              const formData = new FormData();
-              formData.append('current', j);
-              formData.append('size', 10000);
-              for(var i in this.formCondition){
-                  formData.append(i,this.formCondition[i]);
-              }
-              const response = await this.$http.post('selfCar/findSelfCarInvoices', formData);
-               if (response.data.code === 0) {
-                recodes = recodes.concat(response.data.data.records);
-                }
-            }
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      var recodes = []
 
-               // 设置当前日期
-                    let time = new Date();
-                    let year = time.getFullYear();
-                    let month = time.getMonth() + 1;
-                    let day = time.getDate();
-                    let name = "自有车发票查询列表_"+year + "" + month + "" + day;
-                    let cloums = [
-                     {"title":"企业编号","key":"companyNum"},
-                      {"title":"公司名称","key":"buyerName"},
-                      {"title":"购方税号","key":"buyerTaxpayerCode"},
-                      {"title":"车牌号码","key":"plateNum"},
-                      {"title":"etc卡号","key":"cardId"},
-					            {"title":"交易Id","key":"tradeId"},
-                      {"title":"销方税号","key":"sellerTaxpayerCode"},
-                      {"title":"销方名称","key":"sellerName"},
-                      {"title":"入口收费站","key":"enStation"},
-                      {"title":"出口收费站","key":"exStation"},
-                      {"title":"发票代码","key":"invoiceCode"},
-                      {"title":"发票号码","key":"invoiceNum"},
-                      {"title":"开票时间","key":"invoiceMakeTime"},
-                      {"title":"交易时间","key":"exTime"},
-                      {"title":"交易金额(元)","key":"fee"},
-                      {"title":"价税合计(元)","key":"totalAmount"},
-                      {"title":"税额(元)","key":"totalTaxAmount"},
-                      {"title":"金额(元)","key":"amount"},
-                      {"title":"税率","key":"taxRate"},
-                      {"title":"扣费时间","key":"calculateTime"},
-                      {"title":"交易状态","key":"tradeStatus"},
-                      {"title":"预览地址","key":"invoiceHtmlUrl"},
-                      {"title":"下载地址","key":"invoiceUrl"}
-
-                    ];
-                    this.exportExcelComm(cloums,recodes,name,loading)
-
-          },
-          formatJson (filterVal, jsonData) {
-            return jsonData.map(v => 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];
-              }
+      for (var j = 1; j <= this.total / 10000 + 1; j++) {
+        const formData = new FormData()
+        formData.append(`current`, j)
+        formData.append(`size`, 10000)
+        for (var i in this.formCondition) {
+          formData.append(i, this.formCondition[i])
+        }
+        const response = await this.$http.post(`selfCar/findSelfCarInvoices`, formData)
+        if (response.data.code === 0) {
+          recodes = recodes.concat(response.data.data.records)
+        }
+      }
 
-              }));
-          },
-          // 导出Excel
-          exportExcelComm(columns,list,excelName,loading){
-                  let tHeader = []
-                      let filterVal = []
-                      columns.forEach(item =>{
-                          tHeader.push(item.title)
-                          filterVal.push(item.key)
-                      })
+      // 设置当前日期
+      let time = new Date()
+      let year = time.getFullYear()
+      let month = time.getMonth() + 1
+      let day = time.getDate()
+      let name = `自有车发票查询列表_` + year + `` + month + `` + day
+      let cloums = [
+        {"title": `企业编号`, "key": `companyNum`},
+        {"title": `公司名称`, "key": `buyerName`},
+        {"title": `购方税号`, "key": `buyerTaxpayerCode`},
+        {"title": `车牌号码`, "key": `plateNum`},
+        {"title": `etc卡号`, "key": `cardId`},
+        {"title": `交易Id`, "key": `tradeId`},
+        {"title": `销方税号`, "key": `sellerTaxpayerCode`},
+        {"title": `销方名称`, "key": `sellerName`},
+        {"title": `入口收费站`, "key": `enStation`},
+        {"title": `出口收费站`, "key": `exStation`},
+        {"title": `发票代码`, "key": `invoiceCode`},
+        {"title": `发票号码`, "key": `invoiceNum`},
+        {"title": `开票时间`, "key": `invoiceMakeTime`},
+        {"title": `交易时间`, "key": `exTime`},
+        {"title": `交易金额(元)`, "key": `fee`},
+        {"title": `价税合计(元)`, "key": `totalAmount`},
+        {"title": `税额(元)`, "key": `totalTaxAmount`},
+        {"title": `金额(元)`, "key": `amount`},
+        {"title": `税率`, "key": `taxRate`},
+        {"title": `扣费时间`, "key": `calculateTime`},
+        {"title": `交易状态`, "key": `tradeStatus`},
+        {"title": `预览地址`, "key": `invoiceHtmlUrl`},
+        {"title": `下载地址`, "key": `invoiceUrl`}
 
-                     const data = this.formatJson(filterVal,list);
-                      data.unshift(tHeader);
-                     CsvExportor.downloadCsv(data, { tHeader }, excelName+".csv");
-                      loading.close();
+      ]
+      this.exportExcelComm(cloums, recodes, name, loading)
+    },
+    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]
+          }
+        })
+      })
+    },
+    // 导出Excel
+    exportExcelComm(columns, list, excelName, loading) {
+      let tHeader = []
+      let filterVal = []
+      columns.forEach((item) => {
+        tHeader.push(item.title)
+        filterVal.push(item.key)
+      })
+
+      const data = this.formatJson(filterVal, list)
+      data.unshift(tHeader)
+      CsvExportor.downloadCsv(data, { tHeader }, excelName + `.csv`)
+      loading.close()
+    }
+  }
+}
 </script>
 <style>
 .invoice_container {

+ 79 - 80
src/views/selfCar/selfCarApply.vue

@@ -174,87 +174,86 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              etcNum:'',
-              applId:'',
-              companyNum:''
-            },
-        
-           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/getSelfCarInvoicesByAppl', formData);
-            if (response.data.code === 0) {
-              this.invoiceTable = response.data.data;
-            }else{
-              this.$message({
-                      type: 'error',
-                      message: '查询结果:'+response.data.msg
-                    });
-            }
-          },
-
-         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;
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        etcNum: ``,
+        applId: ``,
+        companyNum: ``
       },
-         
-        }
-      };
+
+      invoiceTable: [],
+      hightt: `0px`
+    }
+  },
+  created() {
+    this.heightt = tableHeight - 50  // eslint-disable-line
+  },
+  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/getSelfCarInvoicesByAppl`, formData)
+      if (response.data.code === 0) {
+        this.invoiceTable = response.data.data
+      } else {
+        this.$message({
+          type: `error`,
+          message: `查询结果:` + response.data.msg
+        })
+      }
+    },
+
+    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) {
+      }
+      loading.close()
+      return wbout
+    }
+
+  }
+}
 </script>
 <style>
 .invoice_container {

+ 283 - 289
src/views/selfCar/selfCarTrade.vue

@@ -138,320 +138,314 @@
     </div>
 </template>
 <script type="text/javascript">
-import CsvExportor from "csv-exportor";
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            multipleSelection:[],
-            formCondition:{
-               status:'',
-                cardId:'',
-              tradeId:''
-            },
-            formUserList: {
-            "file": ""
-            },
-            tradeStatus:[{"label":"待开票","value":"1"},{"label":"开票中","value":"2"},{"label":"已开票","value":"3"}],
-            selfcarTrade:[],
-            hightt:'0px',
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight-90;
-          this.loadData();
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          async update(){
-            var loading = null;
-            if(this.multipleSelection.length == 0){
-                loading = this.$loading({
-                          lock: true,
-                          text: '全量更新中,速度较慢,请您耐心等待...',
-                          spinner: 'el-icon-loading',
-                          background: 'rgba(0, 0, 0, 0.7)'
-                        });
-            };
-             const formData = new FormData();
-            formData.append('selfCarTradesStr', JSON.stringify(this.multipleSelection));
-               const response = await this.$http.post(`selfCar/updateTrades`, formData);
-            if(this.multipleSelection.length == 0){
-                loading.close();
-            };
-               this.loadData();
-                this.$message({
-                      type: 'success',
-                      message: '更新成功'
-                    });
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
-            }
-            const response = await this.$http.post(`selfCar/findTrades`, formData);
-            if (response.data.code === 0) {
-              this.selfcarTrade = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-          importExcel (content) {
-    const file = content.file
-    // let file = file.files[0] // 使用传统的input方法需要加上这一步
-     const filename = file.name
-    if(!filename||typeof filename!='string'){
-      this.$message('格式错误!请重新选择')
-     return
+import CsvExportor from "csv-exportor"
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      multipleSelection: [],
+      formCondition: {
+        status: ``,
+        cardId: ``,
+        tradeId: ``
+      },
+      formUserList: {
+        "file": ``
+      },
+      tradeStatus: [{"label": `待开票`, "value": `1`}, {"label": `开票中`, "value": `2`}, {"label": `已开票`, "value": `3`}],
+      selfcarTrade: [],
+      hightt: `0px`,
+      current: 1,
+      pagesize: 8,
+      total: ``
     }
-  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 => item === types)
-    if (!fileType) {
-      this.$message(fileType+'格式错误!请重新选择xlsx格式')
-      return
+  },
+  created() {
+    this.heightt = tableHeight - 90 // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
     }
-    this.file2Xce(file).then(tabJson => {
-      var tradeIds = '';
-      var etcIds = '';
-      if (tabJson && tabJson.length > 0) {
-        this.xlsxJson = tabJson
-        this.fileList = this.xlsxJson[0].sheet
-        let n = '匹配的字段'
-        var i=0;
-        var j=0;
-        this.fileList.forEach((item, index, arr) => {
-           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+= '#,';
-           }
-        });
-
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    async update() {
+      var loading = null
+      if (this.multipleSelection.length === 0) {
+        loading = this.$loading({
+          lock: true,
+          text: `全量更新中,速度较慢,请您耐心等待...`,
+          spinner: `el-icon-loading`,
+          background: `rgba(0, 0, 0, 0.7)`
+        })
+      };
+      const formData = new FormData()
+      formData.append(`selfCarTradesStr`, JSON.stringify(this.multipleSelection))
+      const response = await this.$http.post(`selfCar/updateTrades`, formData)
+      if (this.multipleSelection.length === 0) {
+        loading.close()
+      };
+      this.loadData()
+      this.$message({
+        type: `success`,
+        message: `更新成功`
+      })
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
       }
-      if(etcIds!='' && i>0){
-        this.formCondition.cardId =etcIds.substring(0,etcIds.length-1);
+      const response = await this.$http.post(`selfCar/findTrades`, formData)
+      if (response.data.code === 0) {
+        this.selfcarTrade = response.data.data.records
+        this.total = response.data.data.total
       }
-      if(tradeIds!='' && j>0){
-        this.formCondition.tradeId = tradeIds.substring(0,tradeIds.length-1)  ;
+    },
+    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(``)
 
-    })
-  },
-  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)
+      const fileType = [`xlsx`, `xlc`, `xlm`, `xls`, `xlt`, `xlw`, `csv`].some((item) => { return item === types })
+      if (!fileType) {
+        this.$message(fileType + `格式错误!请重新选择xlsx格式`)
+        return
       }
-      // reader.readAsBinaryString(file.raw)
-      reader.readAsBinaryString(file) // 传统input方法
-    })
-  },
-           handleSelectionChange(value){
-                       this.multipleSelection = value;
-           },
-            // 下载模板
-          DownloadTemplate() {
-            var url = hostUrl+"noCar/templateDownload?fileName=6"
-            window.location.href= url;
-
-          },
-           handleRemove(file, fileList) {
-          },
+      this.file2Xce(file).then((tabJson) => {
+        var tradeIds = ``
+        var etcIds = ``
+        if (tabJson && tabJson.length > 0) {
+          this.xlsxJson = tabJson
+          this.fileList = this.xlsxJson[0].sheet
+          let n = `匹配的字段`
+          var i = 0
+          var j = 0
+          this.fileList.forEach((item, index, arr) => {
+            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 (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方法
+      })
+    },
+    handleSelectionChange(value) {
+      this.multipleSelection = value
+    },
+    // 下载模板
+    DownloadTemplate() {
+      var url = hostUrl + `noCar/templateDownload?fileName=6` // eslint-disable-line
+      window.location.href = url
+    },
+    handleRemove(file, fileList) {
+    },
 
-          handlePreview(file) {
-          },
-          handleSuccess (a) {
-            this.formUserList.file = a.raw;
-          },
-                      // 批量上传模板信息
-      async batchUpload() {
-      this.fullscreenLoading = true;
-      const formData = new FormData();
-      formData.append('file', this.formUserList.file);
-      const response = await this.$http.post(`selfCar/batchImportSelfcarTrades`,formData);
-      var {data: { code, msg, data }} = response;
-      if(code === 0 && msg === '1') {
-         this.fullscreenLoading = false;
-         this.invoiceTable = response.data.data;
-         this.total = response.data.data.length;
-      }else {
-        this.fullscreenLoading = false;
-        this.$message.error('数据存在错误,请检查文件中数据');
+    handlePreview(file) {
+    },
+    handleSuccess(a) {
+      this.formUserList.file = a.raw
+    },
+    // 批量上传模板信息
+    async batchUpload() {
+      this.fullscreenLoading = true
+      const formData = new FormData()
+      formData.append(`file`, this.formUserList.file)
+      const response = await this.$http.post(`selfCar/batchImportSelfcarTrades`, formData)
+      var {data: { code, msg, data }} = response
+      if (code === 0 && msg === `1`) {
+        this.fullscreenLoading = false
+        this.invoiceTable = response.data.data
+        this.total = response.data.data.length
+      } else {
+        this.fullscreenLoading = false
+        this.$message.error(`数据存在错误,请检查文件中数据`)
       }
     },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-       async     exportExcel1() {
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-         let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async     exportExcel1() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "自有车交易查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    },
+    async     exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      var recodes = []
+
+      for (var j = 1; j <= this.total / 10000 + 1; j++) {
+        const formData = new FormData()
+        formData.append(`current`, j)
+        formData.append(`size`, 10000)
+        for (var i in this.formCondition) {
+          formData.append(i, this.formCondition[i])
+        }
+        const response = await this.$http.post(`selfCar/findTrades`, formData)
+        if (response.data.code === 0) {
+          recodes = recodes.concat(response.data.data.records)
+        }
+      }
+
+      // 设置当前日期
+      let time = new Date()
+      let year = time.getFullYear()
+      let month = time.getMonth() + 1
+      let day = time.getDate()
+      let name = `自有车交易查询列表_` + year + `` + month + `` + day
+      let cloums = [
+        {"title": `企业编号`, "key": `companyNum`},
+        {"title": `公司名称`, "key": `companyName`},
+        {"title": `公司税号`, "key": `companyReferencenum`},
+        {"title": `交易Id`, "key": `tradeId`},
+        {"title": `etc卡号`, "key": `cardId`},
 
-      this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
+        {"title": `交易费用`, "key": `fee`},
+        {"title": `交易时间`, "key": `exTime`},
+        {"title": `申请开票时间`, "key": `aclTime`},
+        {"title": `申请Id`, "key": `applId`},
+        {"title": `状态`, "key": `status`}
+      ]
+      this.exportExcelComm(cloums, recodes, name, loading)
     },
-     async     exportExcel() {
-         const loading = this.$loading({
-                               lock: true,
-                               text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                               spinner: 'el-icon-loading',
-                               background: 'rgba(0, 0, 0, 0.7)'
-                             });
-            var recodes = [];  
-            debugger;               
-            for(var j=1;j<=this.total/10000+1;j++){ 
-              
-              const formData = new FormData();
-              formData.append('current', j);
-              formData.append('size', 10000);
-              for(var i in this.formCondition){
-                  formData.append(i,this.formCondition[i]);
-              }
-              const response = await this.$http.post('selfCar/findTrades', formData);
-               if (response.data.code === 0) {
-                recodes = recodes.concat(response.data.data.records);
-                }
-            }
-           
-               // 设置当前日期
-                    let time = new Date();
-                    let year = time.getFullYear();
-                    let month = time.getMonth() + 1;
-                    let day = time.getDate();
-                    let name =  "自有车交易查询列表_"+year + "" + month + "" + day;
-                    let cloums = [
-                     {"title":"企业编号","key":"companyNum"},
-                      {"title":"公司名称","key":"companyName"},
-                      {"title":"公司税号","key":"companyReferencenum"},
-                      {"title":"交易Id","key":"tradeId"},
-                      {"title":"etc卡号","key":"cardId"},
-					      
-                      {"title":"交易费用","key":"fee"},
-                      {"title":"交易时间","key":"exTime"},
-                      {"title":"申请开票时间","key":"aclTime"},
-                      {"title":"申请Id","key":"applId"},
-                      {"title":"状态","key":"status"}  
-                    ];
-                    this.exportExcelComm(cloums,recodes,name,loading)
+    // 导出Excel
+    exportExcelComm(columns, list, excelName, loading) {
+      let tHeader = []
+      let filterVal = []
+      columns.forEach((item) => {
+        tHeader.push(item.title)
+        filterVal.push(item.key)
+      })
 
-     },
- // 导出Excel
-  exportExcelComm(columns,list,excelName,loading){
-                  let tHeader = []
-                      let filterVal = []
-                      columns.forEach(item =>{
-                          tHeader.push(item.title)
-                          filterVal.push(item.key)
-                      })
-                     
-                     const data = this.formatJson(filterVal,list);
-                      data.unshift(tHeader);
-                     CsvExportor.downloadCsv(data, { tHeader }, excelName+".csv");
-                      loading.close();
-            },
-            formatJson (filterVal, jsonData) {
-            return jsonData.map(v => filterVal.map(j => {
-             if(j == 'status'){
-                 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=='companyReferencenum' || j=='cardId' ){
-                 return v[j]+'\t';
-              }else{
-                  return v[j];
-              }
-              
-              }));
-          },
+      const data = this.formatJson(filterVal, list)
+      data.unshift(tHeader)
+      CsvExportor.downloadCsv(data, { tHeader }, excelName + `.csv`)
+      loading.close()
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) => {
+        return filterVal.map((j) => {
+          if (j === `status`) {
+            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 === `companyReferencenum` || j === `cardId`) {
+            return v[j] + `\t`
+          } else {
+            return v[j]
+          }
+        })
+      })
+    }
   }
-      };
+}
 </script>
 <style>
 .billWay_container {

+ 110 - 111
src/views/selfCar/selfCarTradeException.vue

@@ -120,128 +120,127 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            formCondition:{
-              "exceptionFlag":1
-            },
-             tradeStatus:[{"label":"待开票","value":"1"},{"label":"开票中","value":"2"},{"label":"已开票","value":"3"}],
-            selfcarTrade:[],
-             multipleSelection:[],
-            current: 1,
-            hightt:'0px',
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        filters: {
-            rounding (value) {
-              return value.toFixed(2)
-            }
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-            for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
-            }
-            const response = await this.$http.post(`selfCar/findTrades`, formData);
-            if (response.data.code === 0) {
-              this.selfcarTrade = response.data.data.records;
-              this.total = response.data.data.total;
-            }
-          },
-           handleSelectionChange(value){
-                       this.multipleSelection = value;
-           },
-            async update(){
-               var loading = null;
-            if(this.multipleSelection.length == 0){
-                loading = this.$loading({
-                          lock: true,
-                          text: '全量更新中,速度较慢,请您耐心等待...',
-                          spinner: 'el-icon-loading',
-                          background: 'rgba(0, 0, 0, 0.7)'
-                        });
-            };
-               const response = await this.$http.post(`selfCar/updateTrades`, this.multipleSelection);
-               if(this.multipleSelection.length == 0){
-                loading.close();
-            };
-               this.loadData();
-                this.$message({
-                      type: 'success',
-                      message: '更新成功'
-                    });
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-       async  exportExcel() {
-       const loading = this.$loading({
-                             lock: true,
-                             text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                             spinner: 'el-icon-loading',
-                             background: 'rgba(0, 0, 0, 0.7)'
-                           });
-         let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      formCondition: {
+        "exceptionFlag": 1
+      },
+      tradeStatus: [{"label": `待开票`, "value": `1`}, {"label": `开票中`, "value": `2`}, {"label": `已开票`, "value": `3`}],
+      selfcarTrade: [],
+      multipleSelection: [],
+      current: 1,
+      hightt: `0px`,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight // eslint-disable-line
+    this.loadData()
+  },
+  filters: {
+    rounding(value) {
+      return value.toFixed(2)
+    }
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
+      }
+      const response = await this.$http.post(`selfCar/findTrades`, formData)
+      if (response.data.code === 0) {
+        this.selfcarTrade = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    handleSelectionChange(value) {
+      this.multipleSelection = value
+    },
+    async update() {
+      var loading = null
+      if (this.multipleSelection.length === 0) {
+        loading = this.$loading({
+          lock: true,
+          text: `全量更新中,速度较慢,请您耐心等待...`,
+          spinner: `el-icon-loading`,
+          background: `rgba(0, 0, 0, 0.7)`
+        })
+      };
+      const response = await this.$http.post(`selfCar/updateTrades`, this.multipleSelection)
+      if (this.multipleSelection.length === 0) {
+        loading.close()
+      };
+      this.loadData()
+      this.$message({
+        type: `success`,
+        message: `更新成功`
+      })
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async  exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "自有车异常交易查询列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .billWay_container {

+ 109 - 110
src/views/selfCar/selfcarRec.vue

@@ -149,128 +149,127 @@
     </div>
 </template>
 <script type="text/javascript">
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-      export default {
-        data(){
-          return{
-            selfcarRecCarTable:[],
-            recLists:[{"label":"备案失败","value":"1"},{"label":"备案成功","value":"2"}],
-            formCondition:{
-              businessType: "0"
-            },
-             hightt:'0px',
-            current: 1,
-            pagesize: 8,
-            total:''
-          }
-        },
-        created() {
-          this.heightt = tableHeight;
-          this.loadData();
-        },
-        methods:{
-           firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.loadData();
-          },
-          // 列表展示
-          async loadData() {
-            const formData = new FormData();
-            formData.append('current', this.current);
-            formData.append('size', this.pagesize);
-           for(var i in this.formCondition){
-                formData.append(i,this.formCondition[i]);
-            }
-            const response = await this.$http.post(`noCar/findCarRec`, formData);
-            if (response.data.code === 0) {
-              this.selfcarRecCarTable = response.data.data.records;
-              this.total = response.data.data.total;
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
+export default {
+  data() {
+    return {
+      selfcarRecCarTable: [],
+      recLists: [{"label": `备案失败`, "value": `1`}, {"label": `备案成功`, "value": `2`}],
+      formCondition: {
+        businessType: `0`
+      },
+      hightt: `0px`,
+      current: 1,
+      pagesize: 8,
+      total: ``
+    }
+  },
+  created() {
+    this.heightt = tableHeight  // eslint-disable-line
+    this.loadData()
+  },
+  methods: {
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.loadData()
+    },
+    // 列表展示
+    async loadData() {
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      for (var i in this.formCondition) {
+        formData.append(i, this.formCondition[i])
+      }
+      const response = await this.$http.post(`noCar/findCarRec`, formData)
+      if (response.data.code === 0) {
+        this.selfcarRecCarTable = response.data.data.records
+        this.total = response.data.data.total
+      }
+    },
+    async selfCarUnBind(etcNum) {
+      this.$confirm(`此操作将解绑ETC:` + etcNum + `, 是否继续?`, `提示`, {
+        confirmButtonText: `确定`,
+        cancelButtonText: `取消`,
+        type: `warning`
+      }).then(() => {
+        const formData = new FormData()
+        formData.append(`etcNum`, etcNum)
+        const request = this.$http.post(`selfCar/selfCarUnBind`, formData)
+        request.then(
+          (data) => {
+            if (data.data.code === 0) {
+              loadData()  // eslint-disable-line
+              this.$message({
+                type: `success`,
+                message: `解绑成功`
+              })
+            } else {
+              this.$message({
+                type: `error`,
+                message: `` + data.data.msg
+              })
             }
-          },
-          async selfCarUnBind(etcNum){
-                this.$confirm('此操作将解绑ETC:'+etcNum+', 是否继续?', '提示', {
-                  confirmButtonText: '确定',
-                  cancelButtonText: '取消',
-                  type: 'warning'
-                }).then(() => {
-                  const formData = new FormData();
-                  formData.append('etcNum',etcNum);
-                  const request =  this.$http.post(`selfCar/selfCarUnBind`, formData);
-                  request.then(
-                      data => {
-                        if (data.data.code === 0) {
-                           loadData();
-                           this.$message({
-                              type: 'success',
-                              message: '解绑成功'
-                           });
-                         }else{
-                           this.$message({
-                              type: 'error',
-                              message: ''+data.data.msg
-                          });
-                         }
-                      }
-                  );
-                }).catch(() => {
-                  //几点取消的提示
-                });
-          },
-          // 分页方法
-          handleSizeChange(val) {
-            this.pagesize = val;
-            this.loadData();
-          },
-          handleCurrentChange(val) {
-            this.current = val;
-              this.loadData();
-          },
-        async    exportExcel() {
-        const loading = this.$loading({
-                              lock: true,
-                              text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                              spinner: 'el-icon-loading',
-                              background: 'rgba(0, 0, 0, 0.7)'
-                            });
-          let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+          }
+        )
+      }).catch(() => {
+        // 几点取消的提示
+      })
+    },
+    // 分页方法
+    handleSizeChange(val) {
+      this.pagesize = val
+      this.loadData()
+    },
+    handleCurrentChange(val) {
+      this.current = val
+      this.loadData()
+    },
+    async    exportExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "自有车ETC备案查询列表_"+year + "" + month + "" + day;
+      let time = new Date()
+      let year = time.getFullYear()
+      let month = time.getMonth() + 1
+      let day = time.getDate()
+      let name = `自有车ETC备案查询列表_` + year + `` + month + `` + day
       /* generate workbook object from table */
       //  .table要导出的是哪一个表格
-      var wb = XLSX.utils.table_to_book(document.querySelector(".table"),{ raw: true });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-       this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
-        }
-      };
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
+  }
+}
 </script>
 <style>
 .sefCarRec_container {

+ 3 - 5
src/views/selfCar/tradeCarApply.vue

@@ -136,7 +136,7 @@ export default {
     }
   },
   created() {
-    this.heightt = tableHeight - 50
+    this.heightt = tableHeight - 50 // eslint-disable-line
   },
   filters: {
     rounding(value) {
@@ -249,7 +249,7 @@ export default {
     },
     // 下载模板
     DownloadTemplate() {
-      var url = hostUrl + `noCar/templateDownload?fileName=8`;
+      var url = hostUrl + `noCar/templateDownload?fileName=8`; // eslint-disable-line
       window.location.href = url;
     },
     exportExcel() {
@@ -281,8 +281,6 @@ export default {
           name + `.xlsx`
         );
       } catch (e) {
-        if (typeof console !== `undefined`) { console.log(e, wbout) ;
-        }
       }
       loading.close();
       return wbout;
@@ -291,7 +289,7 @@ export default {
       return jsonData.map((v) => {
         return filterVal.map((j) => {
           if (j === `tradeStatus`) {
-            if (v[j] == 1) {
+            if (v[j] === 1) {
               return `待开票`
             } else if (v[j] === 2) {
               return `开票中`

+ 260 - 263
src/views/sys/user.vue

@@ -343,68 +343,68 @@
 </template>
 
 <script type="text/javascript">
-import axios from 'axios';
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
+import axios from 'axios'
+import FileSaver from "file-saver"
+import XLSX from "xlsx"
 export default{
   data() {
     return {
       loading: true,
       rules: {
-          userName: [
-            { required: true, message: '请输入用户名', trigger: 'blur' },
-            { min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur' }
-          ],
-          password: [
-            { required: true, message: '请输入密码', trigger: 'blur' },
-            { min: 6, max: 16, message: '长度在 6 到 16 个字符', trigger: 'blur' }
-          ],
-          name: [
-            { required: true, message: '请输入真实姓名', trigger: 'blur' },
-            { min: 2, max: 15, message: '长度在 2 到 15 个字符', trigger: 'blur' }
-          ],
-          roleId: [
-            { required: true, message: '请选择角色', trigger: 'change' }
-          ],
-          phone: [
-            { required: true, message: '请输入手机号', trigger: 'blur' },
-            { min: 11, max: 11, message: '长度在 11 个字符', trigger: 'blur' }
-          ],
-
-          company: [
-            { required: true, message: '请输入企业名称', trigger: 'blur' },
-            { min: 2, max: 25, message: '长度在 2 到 25 个字符', trigger: 'blur' }
-          ],
-          isLock: [
-            { required: true, message: '请选择状态', trigger: 'change' }
-          ]
-        },
-      userName: '',
-      company: '',
+        userName: [
+          { required: true, message: `请输入用户名`, trigger: `blur` },
+          { min: 3, max: 15, message: `长度在 3 到 15 个字符`, trigger: `blur` }
+        ],
+        password: [
+          { required: true, message: `请输入密码`, trigger: `blur` },
+          { min: 6, max: 16, message: `长度在 6 到 16 个字符`, trigger: `blur` }
+        ],
+        name: [
+          { required: true, message: `请输入真实姓名`, trigger: `blur` },
+          { min: 2, max: 15, message: `长度在 2 到 15 个字符`, trigger: `blur` }
+        ],
+        roleId: [
+          { required: true, message: `请选择角色`, trigger: `change` }
+        ],
+        phone: [
+          { required: true, message: `请输入手机号`, trigger: `blur` },
+          { min: 11, max: 11, message: `长度在 11 个字符`, trigger: `blur` }
+        ],
+
+        company: [
+          { required: true, message: `请输入企业名称`, trigger: `blur` },
+          { min: 2, max: 25, message: `长度在 2 到 25 个字符`, trigger: `blur` }
+        ],
+        isLock: [
+          { required: true, message: `请选择状态`, trigger: `change` }
+        ]
+      },
+      userName: ``,
+      company: ``,
       usertable: [],
       roleList: [],
-      tempRole:[],
-      hightt:'0px',
+      tempRole: [],
+      hightt: `0px`,
       formUserList: {
-        "userName":"",
-        "password": "",
-        "id":"",
-        "name": "",
-        "phone":"",
-        "roleId": "",
-        "isLock":"",
-        "company": ""
+        "userName": ``,
+        "password": ``,
+        "id": ``,
+        "name": ``,
+        "phone": ``,
+        "roleId": ``,
+        "isLock": ``,
+        "company": ``
       },
       optionone: [{
-          value: '0',
-          label: '正常'
-        }, {
-          value: '1',
-          label: '锁定'
-        },{
-           value: '2',
-          label: '停用'
-        }],
+        value: `0`,
+        label: `正常`
+      }, {
+        value: `1`,
+        label: `锁定`
+      }, {
+        value: `2`,
+        label: `停用`
+      }],
       current: 1,
       pagesize: 8,
       // 总共有多少条数据
@@ -414,20 +414,20 @@ export default{
       changeMoney: false,
       changelocks: false,
       changepassword: false,
-      showEtcFee:false
+      showEtcFee: false
     }
   },
   created() {
-   this.heightt = tableHeight;
-    this.loadRoleList();
-    this.loadData();
+    this.heightt = tableHeight // eslint-disable-line
+    this.loadRoleList()
+    this.loadData()
   },
   methods: {
     // 获取角色状态
     async loadRoleList() {
-      const response = await this.$http.post(`role/list`);
+      const response = await this.$http.post(`role/list`)
       if (response.data.code === 0) {
-        this.roleList = response.data.data;
+        this.roleList = response.data.data
       }
     },
     // showRole(row){
@@ -440,301 +440,298 @@ export default{
     //       this.tempRole.push(parseInt(roleids[i]));
     //     }
 
-
     // },
-    changeRow(id){
-     if(id == 0){
-       this.showEtcFee =true
-     }else{
-       this.showEtcFee =false
-     }
+    changeRow(id) {
+      if (id === 0) {
+        this.showEtcFee = true
+      } else {
+        this.showEtcFee = false
+      }
     },
-    async changeRole(data,row){
-        row.roleId ='';
-        row.roleName = '无权限';
-        for(var i in data){
-          if(i == 0){
-            row.roleId = data[i];
-            for(var j in this.roleList){
-              if(this.roleList[j]['id'] == data[i]){
-                row.roleName = '';
-                row.roleName = this.roleList[j]['roleName'];
-              }
+    async changeRole(data, row) {
+      row.roleId = ``
+      row.roleName = `无权限`
+      for (var i in data) {
+        if (i === 0) {
+          row.roleId = data[i]
+          for (var j in this.roleList) {
+            if (this.roleList[j][`id`] === data[i]) {
+              row.roleName = ``
+              row.roleName = this.roleList[j][`roleName`]
             }
-          }else{
-            row.roleId +=","+data[i];
-            for(var j in this.roleList){
-              if(this.roleList[j]['id'] == data[i]){
-                row.roleName +=","+ this.roleList[j]['roleName'];
-              }
+          }
+        } else {
+          row.roleId += `,` + data[i]
+          for (var j in this.roleList) { // eslint-disable-line
+            if (this.roleList[j][`id`] === data[i]) {
+              row.roleName += `,` + this.roleList[j][`roleName`]
             }
-
           }
         }
-         const response = await this.$http.post(`user/updateUser`, row);
-          if(response.data.code === 0) {
+      }
+      const response = await this.$http.post(`user/updateUser`, row)
+      if (response.data.code === 0) {
 
-          }else {
-            this.$message({
-              type: 'error',
-              message: '修改权限失败'
-            });
-          }
+      } else {
+        this.$message({
+          type: `error`,
+          message: `修改权限失败`
+        })
+      }
+    },
+    firstLoadData() {
+      this.current = 1
+      this.pagesize = 8
+      this.queryLook()
     },
-     firstLoadData(){
-            this.current = 1;
-            this.pagesize = 8;
-            this.queryLook();
-          },
     // 列表展示
     async loadData() {
-      const formData = new FormData();
-      formData.append('current', this.current);
-      formData.append('size', this.pagesize);
-      const response = await this.$http.post(`user/page`, formData);
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      const response = await this.$http.post(`user/page`, formData)
       if (response.data.code === 0) {
-        this.loading = false;
-        this.usertable = response.data.data.records;
-        this.total = response.data.data.total;
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
       }
     },
-    //查询
+    // 查询
     async queryLook() {
-      const formData = new FormData();
-      formData.append('current', this.current);
-      formData.append('size', this.pagesize);
-      formData.append('userName', this.userName);
-      formData.append('company', this.company);
-      const response = await this.$http.post(`user/page`, formData);
+      const formData = new FormData()
+      formData.append(`current`, this.current)
+      formData.append(`size`, this.pagesize)
+      formData.append(`userName`, this.userName)
+      formData.append(`company`, this.company)
+      const response = await this.$http.post(`user/page`, formData)
       if (response.data.code === 0) {
-        this.loading = false;
-        this.usertable = response.data.data.records;
-        this.total = response.data.data.total;
+        this.loading = false
+        this.usertable = response.data.data.records
+        this.total = response.data.data.total
       }
     },
     // 新增用户
     addData(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if(valid) {
-          this.formUserList.price = this.formUserList.price * 100;
-          const response = await this.$http.post(`user`, this.formUserList);
-          if(response.data.code === 0) {
-            this.loadData();
-            this.addUserList = false;
+      this.$refs[formName].validate(async(valid) => {
+        if (valid) {
+          this.formUserList.price = this.formUserList.price * 100
+          const response = await this.$http.post(`user`, this.formUserList)
+          if (response.data.code === 0) {
+            this.loadData()
+            this.addUserList = false
             this.$message({
-              type: 'success',
-              message: '添加成功'
-            });
-          }else {
+              type: `success`,
+              message: `添加成功`
+            })
+          } else {
             this.$message({
-              type: 'error',
+              type: `error`,
               message: response.data.msg
-            });
+            })
           }
-        }else {
-          this.$message.error('请查看是否有选项未填写或填错项');
-          return false;
+        } else {
+          this.$message.error(`请查看是否有选项未填写或填错项`)
+          return false
         }
       })
     },
     // 打开修改并赋予信息
     openChange(user) {
-      this.changeUser = true;
-      this.formUserList.userName = user.userName;
-      this.formUserList.price = user.price / 100;
-      this.formUserList.id = user.id;
-      this.formUserList.name = user.name;
-      this.formUserList.phone = user.phone;
-      this.formUserList.roleId = user.roleId;
-      this.formUserList.isLock = user.isLock;
-      this.formUserList.dutyParagraph = user.dutyParagraph;
-      this.formUserList.company = user.company;
-      this.formUserList.money = user.money;
+      this.changeUser = true
+      this.formUserList.userName = user.userName
+      this.formUserList.price = user.price / 100
+      this.formUserList.id = user.id
+      this.formUserList.name = user.name
+      this.formUserList.phone = user.phone
+      this.formUserList.roleId = user.roleId
+      this.formUserList.isLock = user.isLock
+      this.formUserList.dutyParagraph = user.dutyParagraph
+      this.formUserList.company = user.company
+      this.formUserList.money = user.money
     },
     // 修改用户
     async changeData() {
-      this.formUserList.price = this.formUserList.price * 100;
-      const response = await this.$http.post(`user/updateUser`, this.formUserList);
-      if(response.data.code === 0) {
-        this.loadData();
-        this.changeUser = false;
+      this.formUserList.price = this.formUserList.price * 100
+      const response = await this.$http.post(`user/updateUser`, this.formUserList)
+      if (response.data.code === 0) {
+        this.loadData()
+        this.changeUser = false
         this.$message({
-          type: 'success',
-          message: '修改成功'
-        });
-      }else {
+          type: `success`,
+          message: `修改成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '修改失败'
-        });
+          type: `error`,
+          message: `修改失败`
+        })
       }
     },
-     // 点击删除按钮
+    // 点击删除按钮
     Delete(id) {
-      this.$confirm('是否删除该用户', '提示' ,{
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(async () => {
-          const response = await this.$http.delete(`user/${id}`);
-          if(response.data.code === 0) {
-            this.loadData();
-            this.$message({
-              type: 'success',
-              message: '删除成功'
-            });
-          }else {
-            this.$message({
-              type: 'error',
-              message: '删除失败'
-            });
-          }
-        }).catch(() => {
-           this.$message({ type: 'info', message: '已取消删除'});
-      });
+      this.$confirm(`是否删除该用户`, `提示`, {
+        confirmButtonText: `确定`,
+        cancelButtonText: `取消`,
+        type: `warning`
+      }).then(async() => {
+        const response = await this.$http.delete(`user/${id}`)
+        if (response.data.code === 0) {
+          this.loadData()
+          this.$message({
+            type: `success`,
+            message: `删除成功`
+          })
+        } else {
+          this.$message({
+            type: `error`,
+            message: `删除失败`
+          })
+        }
+      }).catch(() => {
+        this.$message({type: `info`, message: `已取消删除`});
+      })
     },
     // 打开修改密码
     openPassword(user) {
-      this.changepassword = true;
-      this.formUserList.userName = user.userName;
-      this.formUserList.id = user.id;
+      this.changepassword = true
+      this.formUserList.userName = user.userName
+      this.formUserList.id = user.id
     },
-    //修改密码
+    // 修改密码
     async resetPassword() {
-      const response = await this.$http.put(`user/restPassword`, this.formUserList);
-      if(response.data.code === 0) {
-        this.loadData();
-        this.changepassword = false;
+      const response = await this.$http.put(`user/restPassword`, this.formUserList)
+      if (response.data.code === 0) {
+        this.loadData()
+        this.changepassword = false
         this.$message({
-          type: 'success',
-          message: '修改成功'
-        });
-      }else {
+          type: `success`,
+          message: `修改成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '修改失败'
-        });
+          type: `error`,
+          message: `修改失败`
+        })
       }
     },
     // 打开充值弹框
     openMoney(user) {
-      this.changeMoney = true;
-      this.formUserList.userName = user.userName;
-      this.formUserList.id = user.id;
+      this.changeMoney = true
+      this.formUserList.userName = user.userName
+      this.formUserList.id = user.id
     },
     // 充值
     async resetMoney() {
-      this.formUserList.money = this.formUserList.money * 100;
-      const response = await this.$http.put(`user/money`, this.formUserList);
-      if(response.data.code === 0) {
-        this.loadData();
-        this.changeMoney = false;
+      this.formUserList.money = this.formUserList.money * 100
+      const response = await this.$http.put(`user/money`, this.formUserList)
+      if (response.data.code === 0) {
+        this.loadData()
+        this.changeMoney = false
         this.$message({
-          type: 'success',
-          message: '充值成功'
-        });
-      }else {
+          type: `success`,
+          message: `充值成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '充值失败'
-        });
+          type: `error`,
+          message: `充值失败`
+        })
       }
     },
     // 打开修改状态弹框
     openisLock(user) {
-      this.changelocks = true;
-      this.formUserList.userName = user.userName;
-      this.formUserList.id = user.id;
+      this.changelocks = true
+      this.formUserList.userName = user.userName
+      this.formUserList.id = user.id
     },
     // 修改用户状态
     async changeLock() {
-      const response = await this.$http.put(`user/lock`, this.formUserList);
-      if(response.data.code === 0) {
-        this.loadData();
-        this.changelocks = false;
+      const response = await this.$http.put(`user/lock`, this.formUserList)
+      if (response.data.code === 0) {
+        this.loadData()
+        this.changelocks = false
         this.$message({
-          type: 'success',
-          message: '修改成功'
-        });
-      }else {
+          type: `success`,
+          message: `修改成功`
+        })
+      } else {
         this.$message({
-          type: 'error',
-          message: '修改失败'
-        });
+          type: `error`,
+          message: `修改失败`
+        })
       }
     },
 
     // 清空表单数据
     handleEditDialogClose() {
       for (var key in this.formUserList) {
-        this.formUserList[key] = '';
+        this.formUserList[key] = ``
       };
-      this.current = 1;
-      this.pagesize = 8;
+      this.current = 1
+      this.pagesize = 8
     },
     // 分页方法
     handleSizeChange(val) {
-      this.pagesize = val;
-      if(this.userName !== '' || this.company !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.pagesize = val
+      if (this.userName !== `` || this.company !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
     },
     handleCurrentChange(val) {
-      this.current = val;
-      if(this.userName !== '' || this.company !== '') {
-        this.queryLook();
-      }else{
-        this.loadData();
+      this.current = val
+      if (this.userName !== `` || this.company !== ``) {
+        this.queryLook()
+      } else {
+        this.loadData()
       };
     },
-        // 导出表格所用
-   async exportExcel() {
+    // 导出表格所用
+    async exportExcel() {
       const loading = this.$loading({
-                      lock: true,
-                      text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
-                      spinner: 'el-icon-loading',
-                      background: 'rgba(0, 0, 0, 0.7)'
-                    });
-      let curr = this.current;
-      let pagesize1 = this.pagesize;
-      this.current = 1;
-      this.pagesize = this.total;
-      await this.loadData();
+        lock: true,
+        text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
+        spinner: `el-icon-loading`,
+        background: `rgba(0, 0, 0, 0.7)`
+      })
+      let curr = this.current
+      let pagesize1 = this.pagesize
+      this.current = 1
+      this.pagesize = this.total
+      await this.loadData()
       // 设置当前日期
-      let time = new Date();
-      let year = time.getFullYear();
-      let month = time.getMonth() + 1;
-      let day = time.getDate();
-      let name = "用户列表_"+year + "" + month + "" + day;
+      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 });
+      var wb = XLSX.utils.table_to_book(document.querySelector(`.table`), { raw: true })
       /* get binary string as output */
       var wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: `xlsx`,
         bookSST: true,
-        type: "array"
-      });
+        type: `array`
+      })
       try {
         //  name+'.xlsx'表示导出的excel表格名字
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          name + ".xlsx"
-        );
+          new Blob([wbout], { type: `application/octet-stream` }),
+          name + `.xlsx`
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
       }
-      this.current = curr;
-      this.pagesize = pagesize1;
-      this.loadData();
-      loading.close();
-      return wbout;
-    },
+      this.current = curr
+      this.pagesize = pagesize1
+      this.loadData()
+      loading.close()
+      return wbout
+    }
 
   }
-};
+}
 </script>
 
 <style>