Browse Source

Merge remote-tracking branch 'origin/master'

hejiahui 2 years ago
parent
commit
14e5ae344f

+ 5 - 0
.prettierrc.json

@@ -0,0 +1,5 @@
+{ 
+ "singleQuote": true,
+ "semi": false,
+ "trailingComma":"none"
+}

+ 101 - 110
build/utils.js

@@ -1,13 +1,13 @@
-"use strict";
-const path = require("path");
-const config = require("../config");
-const ExtractTextPlugin = require("extract-text-webpack-plugin");
-const packageConfig = require("../package.json");
-const HtmlWebpackPlugin = require("html-webpack-plugin");
-const merge = require("webpack-merge");
-const glob = require("glob");
-const pathSrc = path.resolve(__dirname, "../src"); // F:\webui\multiple-pages\demo\src
-const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应用下
+'use strict'
+const path = require('path')
+const config = require('../config')
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
+const packageConfig = require('../package.json')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const merge = require('webpack-merge')
+const glob = require('glob')
+const pathSrc = path.resolve(__dirname, '../src') // F:\webui\multiple-pages\demo\src
+const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用下
 
 
 // 指定开发模式下需要加载的模块(可以做到只加载当前模块,提高开发效率)
 // 指定开发模式下需要加载的模块(可以做到只加载当前模块,提高开发效率)
 // index模块(登录)为必须,all 为所有
 // index模块(登录)为必须,all 为所有
@@ -15,148 +15,139 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-// let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
-// let devModules = ["index", "TMS", "appoint", "WMS", "queue"];
-// let devModules = ["index", "statisticalReport", "inward"];
-// let devModules = ["index", "WMS", "inward"];
-// let devModules = ["index", "inward", "WMS", "queue"];
-// let devModules = ["index", "appoint", "statisticalReport", "sale"];
-// let devModules = ["index", "appoint", "statisticalReport", "WMS", "sale"];
-let devModules = ["all"];
-//let devModules = ["BMS","index","sale","appoint","AMS","queue","QMS","RMS",'statisticalReport',"inward"];
-
-//let devModules = ["BMS","index","sale","appoint","AMS","queue","QMS","RMS",'statisticalReport'];
-
-if (pathSrc.indexOf("node_modules") > -1) {
-  devModules = require("../../../cors.js").devModules;
+//let devModules = ["index", "statisticalReport", "appoint", "sale"];
+let devModules = ['all']
+
+if (pathSrc.indexOf('node_modules') > -1) {
+  devModules = require('../../../cors.js').devModules
 }
 }
 // 获取入口集合
 // 获取入口集合
 const getEntries = function(suffix, polyfill) {
 const getEntries = function(suffix, polyfill) {
   // 自动获取
   // 自动获取
-  const entryHtml = glob.sync(pathSrc + "/views/**/app.html"); // 根据html来
-  const devEntryHtml = glob.sync(devPathSrc + "/views/**/app.html"); // 根据html来
-  const entries = {};
+  const entryHtml = glob.sync(pathSrc + '/views/**/app.html') // 根据html来
+  const devEntryHtml = glob.sync(devPathSrc + '/views/**/app.html') // 根据html来
+  const entries = {}
   let setEntries = function(filePath, _chunk) {
   let setEntries = function(filePath, _chunk) {
-    _chunk = _chunk.substring(0, _chunk.lastIndexOf("/"));
-    let flag = true;
-    flag = false;
+    _chunk = _chunk.substring(0, _chunk.lastIndexOf('/'))
+    let flag = true
+    flag = false
     for (let item of devModules) {
     for (let item of devModules) {
-      if (item && (_chunk.indexOf("views/" + item) >= 0 || item === "all")) {
-        flag = true;
-        break;
+      if (item && (_chunk.indexOf('views/' + item) >= 0 || item === 'all')) {
+        flag = true
+        break
       }
       }
     }
     }
     if (flag) {
     if (flag) {
-      let arr = _chunk.split("/"),
+      let arr = _chunk.split('/'),
         larr = [],
         larr = [],
-        rarr = [];
-      console.log("arr: ", arr);
-      larr = arr.slice(0, 2);
-      _chunk = larr.join("/");
+        rarr = []
+      console.log('arr: ', arr)
+      larr = arr.slice(0, 2)
+      _chunk = larr.join('/')
       if (arr.length > 2) {
       if (arr.length > 2) {
-        rarr = arr.slice(2, arr.length);
-        _chunk = _chunk + "/" + rarr.join("-");
+        rarr = arr.slice(2, arr.length)
+        _chunk = _chunk + '/' + rarr.join('-')
       }
       }
       if (suffix) {
       if (suffix) {
-        filePath = filePath.replace(".html", suffix);
+        filePath = filePath.replace('.html', suffix)
       }
       }
       if (polyfill) {
       if (polyfill) {
-        entries[_chunk] = ["babel-polyfill", filePath];
+        entries[_chunk] = ['babel-polyfill', filePath]
       } else {
       } else {
-        entries[_chunk] = filePath;
+        entries[_chunk] = filePath
       }
       }
     }
     }
-  };
+  }
   entryHtml.forEach(filePath => {
   entryHtml.forEach(filePath => {
     // views/index/app.html --> views/index   chunk有'/'则js/css会有相应的目录
     // views/index/app.html --> views/index   chunk有'/'则js/css会有相应的目录
-    let _chunk = filePath.split(pathSrc.replace(/\\/g, "/") + "/")[1]; // views/index/app.html
-    setEntries(filePath, _chunk);
-  });
+    let _chunk = filePath.split(pathSrc.replace(/\\/g, '/') + '/')[1] // views/index/app.html
+    setEntries(filePath, _chunk)
+  })
   devEntryHtml.forEach(filePath => {
   devEntryHtml.forEach(filePath => {
     // views/index/app.html --> views/index   chunk有'/'则js/css会有相应的目录
     // views/index/app.html --> views/index   chunk有'/'则js/css会有相应的目录
-    let _chunk = filePath.split(devPathSrc.replace(/\\/g, "/") + "/")[1]; // views/index/app.html
-    setEntries(filePath, _chunk);
-  });
-  return entries;
-};
+    let _chunk = filePath.split(devPathSrc.replace(/\\/g, '/') + '/')[1] // views/index/app.html
+    setEntries(filePath, _chunk)
+  })
+  return entries
+}
 // 多入口配置(入口JS固定为main.js)
 // 多入口配置(入口JS固定为main.js)
 exports.entries = function() {
 exports.entries = function() {
   // ['babel-polyfill', './src/main.js']
   // ['babel-polyfill', './src/main.js']
-  let _entries = getEntries(".js", true);
-  return _entries;
-};
+  let _entries = getEntries('.js', true)
+  return _entries
+}
 //多页面输出配置
 //多页面输出配置
 exports.htmlPlugins = function() {
 exports.htmlPlugins = function() {
-  let entryHtmls = getEntries(".html");
-  let arr = [];
+  let entryHtmls = getEntries('.html')
+  let arr = []
   for (let _chunk in entryHtmls) {
   for (let _chunk in entryHtmls) {
-    console.log("loading chunk:", _chunk);
+    console.log('loading chunk:', _chunk)
     // _chunk :views/index/index
     // _chunk :views/index/index
     let conf = {
     let conf = {
-      favicon: pathSrc + "/assets/img/favicon.ico", //favicon路径,通过webpack引入同时可以生成hash值
+      favicon: pathSrc + '/assets/img/favicon.ico', //favicon路径,通过webpack引入同时可以生成hash值
       template: entryHtmls[_chunk], // html模板路径
       template: entryHtmls[_chunk], // html模板路径
       // filename: 'views/' + fileName, // 生成的html存放路径,相对于path
       // filename: 'views/' + fileName, // 生成的html存放路径,相对于path
-      filename: _chunk + ".html",
+      filename: _chunk + '.html',
       chunks: [_chunk],
       chunks: [_chunk],
       inject: true // js插入的位置,true/'head'/'body'/false
       inject: true // js插入的位置,true/'head'/'body'/false
-    };
-    if (process.env.NODE_ENV === "production") {
-      console.log("package content: ", _chunk);
+    }
+    if (process.env.NODE_ENV === 'production') {
+      console.log('package content: ', _chunk)
       conf = merge(conf, {
       conf = merge(conf, {
-        chunks: ["manifest", "vendor", _chunk],
+        chunks: ['manifest', 'vendor', _chunk],
         minify: {
         minify: {
           // removeAttributeQuotes: true, // 删除可删除的引号
           // removeAttributeQuotes: true, // 删除可删除的引号
           removeComments: true, // 移除HTML中的注释
           removeComments: true, // 移除HTML中的注释
           collapseWhitespace: true // 删除空白符与换行符
           collapseWhitespace: true // 删除空白符与换行符
         },
         },
-        chunksSortMode: "dependency"
-      });
+        chunksSortMode: 'dependency'
+      })
     }
     }
-    arr.push(new HtmlWebpackPlugin(conf));
+    arr.push(new HtmlWebpackPlugin(conf))
   }
   }
-  console.log("arr:", arr);
-  return arr;
-};
+  console.log('arr:', arr)
+  return arr
+}
 
 
 exports.assetsPath = function(_path) {
 exports.assetsPath = function(_path) {
   const assetsSubDirectory =
   const assetsSubDirectory =
-    process.env.NODE_ENV === "production"
+    process.env.NODE_ENV === 'production'
       ? config.build.assetsSubDirectory
       ? config.build.assetsSubDirectory
-      : config.dev.assetsSubDirectory;
+      : config.dev.assetsSubDirectory
 
 
-  return path.posix.join(assetsSubDirectory, _path);
-};
+  return path.posix.join(assetsSubDirectory, _path)
+}
 
 
 exports.cssLoaders = function(options) {
 exports.cssLoaders = function(options) {
-  options = options || {};
+  options = options || {}
 
 
   const cssLoader = {
   const cssLoader = {
-    loader: "css-loader",
+    loader: 'css-loader',
     options: {
     options: {
       sourceMap: options.sourceMap
       sourceMap: options.sourceMap
     }
     }
-  };
+  }
 
 
   const postcssLoader = {
   const postcssLoader = {
-    loader: "postcss-loader",
+    loader: 'postcss-loader',
     options: {
     options: {
       sourceMap: options.sourceMap
       sourceMap: options.sourceMap
     }
     }
-  };
+  }
 
 
   // generate loader string to be used with extract text plugin
   // generate loader string to be used with extract text plugin
   function generateLoaders(loader, loaderOptions) {
   function generateLoaders(loader, loaderOptions) {
     const loaders = options.usePostCSS
     const loaders = options.usePostCSS
       ? [cssLoader, postcssLoader]
       ? [cssLoader, postcssLoader]
-      : [cssLoader];
+      : [cssLoader]
 
 
     if (loader) {
     if (loader) {
       loaders.push({
       loaders.push({
-        loader: loader + "-loader",
+        loader: loader + '-loader',
         options: Object.assign({}, loaderOptions, {
         options: Object.assign({}, loaderOptions, {
           sourceMap: options.sourceMap
           sourceMap: options.sourceMap
         })
         })
-      });
+      })
     }
     }
 
 
     // Extract CSS when that option is specified
     // Extract CSS when that option is specified
@@ -167,11 +158,11 @@ exports.cssLoaders = function(options) {
         // 解决打包后背景图片路径不对的问题
         // 解决打包后背景图片路径不对的问题
         // static/css/views/index/index.css
         // static/css/views/index/index.css
         // ../../../../static/img/xx.jpg
         // ../../../../static/img/xx.jpg
-        publicPath: "../../../", // 注意: 此处根据路径, 自动更改
-        fallback: "vue-style-loader"
-      });
+        publicPath: '../../../', // 注意: 此处根据路径, 自动更改
+        fallback: 'vue-style-loader'
+      })
     } else {
     } else {
-      return ["vue-style-loader"].concat(loaders);
+      return ['vue-style-loader'].concat(loaders)
     }
     }
   }
   }
 
 
@@ -179,46 +170,46 @@ exports.cssLoaders = function(options) {
   return {
   return {
     css: generateLoaders(),
     css: generateLoaders(),
     postcss: generateLoaders(),
     postcss: generateLoaders(),
-    less: generateLoaders("less"),
-    sass: generateLoaders("sass", {
+    less: generateLoaders('less'),
+    sass: generateLoaders('sass', {
       indentedSyntax: true
       indentedSyntax: true
     }),
     }),
-    scss: generateLoaders("sass"),
-    stylus: generateLoaders("stylus"),
-    styl: generateLoaders("stylus")
-  };
-};
+    scss: generateLoaders('sass'),
+    stylus: generateLoaders('stylus'),
+    styl: generateLoaders('stylus')
+  }
+}
 
 
 // Generate loaders for standalone style files (outside of .vue)
 // Generate loaders for standalone style files (outside of .vue)
 exports.styleLoaders = function(options) {
 exports.styleLoaders = function(options) {
-  const output = [];
-  const loaders = exports.cssLoaders(options);
+  const output = []
+  const loaders = exports.cssLoaders(options)
 
 
   for (const extension in loaders) {
   for (const extension in loaders) {
-    const loader = loaders[extension];
+    const loader = loaders[extension]
     output.push({
     output.push({
-      test: new RegExp("\\." + extension + "$"),
+      test: new RegExp('\\.' + extension + '$'),
       use: loader
       use: loader
-    });
+    })
   }
   }
 
 
-  return output;
-};
+  return output
+}
 
 
 exports.createNotifierCallback = () => {
 exports.createNotifierCallback = () => {
-  const notifier = require("node-notifier");
+  const notifier = require('node-notifier')
 
 
   return (severity, errors) => {
   return (severity, errors) => {
-    if (severity !== "error") return;
+    if (severity !== 'error') return
 
 
-    const error = errors[0];
-    const filename = error.file && error.file.split("!").pop();
+    const error = errors[0]
+    const filename = error.file && error.file.split('!').pop()
 
 
     notifier.notify({
     notifier.notify({
       title: packageConfig.name,
       title: packageConfig.name,
-      message: severity + ": " + error.name,
-      subtitle: filename || "",
-      icon: path.join(__dirname, "logo.png")
-    });
-  };
-};
+      message: severity + ': ' + error.name,
+      subtitle: filename || '',
+      icon: path.join(__dirname, 'logo.png')
+    })
+  }
+}

+ 49 - 49
config/index.js

@@ -1,111 +1,111 @@
-"use strict";
+'use strict'
 // Template version: 1.3.1
 // Template version: 1.3.1
 // see http://vuejs-templates.github.io/webpack for documentation.
 // see http://vuejs-templates.github.io/webpack for documentation.
 
 
-const path = require("path");
+const path = require('path')
 
 
-const pathSrc = path.resolve(__dirname, "../src");
+const pathSrc = path.resolve(__dirname, '../src')
 
 
 let proxyTable = {
 let proxyTable = {
-  "/icore.icp.web/pass/v1/sysusers/user/token": {
+  '/icore.icp.web/pass/v1/sysusers/user/token': {
     //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
     //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
     //target: 'https://portal-dev.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token',
     //target: 'https://portal-dev.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token',
-    target: "http://172.16.33.166:9001/v1/sysusers/user/token",
+    target: 'http://172.16.33.166:9001/v1/sysusers/user/token',
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
-      "^/icore.icp.web/pass/v1/sysusers/user/token": "/"
+      '^/icore.icp.web/pass/v1/sysusers/user/token': '/'
     }
     }
   },
   },
-  "/icore.icp.web/pass/v1": {
+  '/icore.icp.web/pass/v1': {
     //target: 'http://172.16.33.161:80/v1', //加http
     //target: 'http://172.16.33.161:80/v1', //加http
-    target: "http://172.16.33.166:9001/v1",
+    target: 'http://172.16.33.166:9001/v1',
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
-      "^/icore.icp.web/pass/v1": "/" //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
+      '^/icore.icp.web/pass/v1': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
       // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
       // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
     }
     }
   },
   },
-  "/icore.icp.web/pass/auth/login": {
+  '/icore.icp.web/pass/auth/login': {
     //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
     //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
-    target: "http://172.16.33.166:9001/auth/login",
+    target: 'http://172.16.33.166:9001/auth/login',
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
-      "^/icore.icp.web/pass/auth/login": ""
+      '^/icore.icp.web/pass/auth/login': ''
     }
     }
   },
   },
-  "/icore-api": {
-    target: "http://172.16.33.166:9001",
+  '/icore-api': {
+    target: 'http://172.16.33.166:9001',
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
-      "^/icore-api": "/"
+      '^/icore-api': '/'
     }
     }
   },
   },
-  "/icore.icp.web/pass/act": {
-    target: "http://172.16.33.166:8095",
+  '/icore.icp.web/pass/act': {
+    target: 'http://172.16.33.166:8095',
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
-      "^/icore.icp.web/pass/act": "/"
+      '^/icore.icp.web/pass/act': '/'
     }
     }
   },
   },
   // 表格表单请求的域名地址
   // 表格表单请求的域名地址
-  "/api/v1/cd": {
-    target: "http://172.16.33.161:8083",
+  '/api/v1/cd': {
+    target: 'http://172.16.33.161:8083',
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
-      "^/api/v1/cd": "/api/v1/cd"
+      '^/api/v1/cd': '/api/v1/cd'
     }
     }
   },
   },
   //抽奖结果的接口
   //抽奖结果的接口
-  "/icore.icp.web/game/v1": {
-    target: "http://172.16.33.166:9002",
+  '/icore.icp.web/game/v1': {
+    target: 'http://172.16.33.166:9002',
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
-      "^/icore.icp.web/game/v1": "/v1"
+      '^/icore.icp.web/game/v1': '/v1'
     }
     }
   },
   },
   // 所有数据的请求域名地址
   // 所有数据的请求域名地址
-  "/api/v1": {
-    target: "http://172.16.33.166:80",
-    //target: "http://localhost:8080",
+  '/api/v1': {
+    target: 'http://172.16.33.166:80',
+    // target: 'http://localhost:8080',
     // target: "http://192.168.1.101:8080",
     // target: "http://192.168.1.101:8080",
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
-      "^/api/v1": "/api/v1"
+      '^/api/v1': '/api/v1'
     }
     }
   },
   },
-  "/views/api/v1": {
+  '/views/api/v1': {
     //target: "http://172.16.33.166:80",
     //target: "http://172.16.33.166:80",
-    target: "http://172.16.33.166:80",
+    target: 'http://172.16.33.166:80',
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
-      "^/views/api/v1": "/api/v1"
+      '^/views/api/v1': '/api/v1'
     }
     }
   },
   },
-  "/icore.icp.web/pass/logout": {
-    target: "http://172.16.33.166:9001/logout",
+  '/icore.icp.web/pass/logout': {
+    target: 'http://172.16.33.166:9001/logout',
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
-      "^/icore.icp.web/pass/logout": "/"
+      '^/icore.icp.web/pass/logout': '/'
     }
     }
   }
   }
-};
-let dist = "../dist";
-if (pathSrc.indexOf("node_modules") > -1) {
-  dist = "../../../dist";
-  let proxyTableGet = require("../../../cors.js").proxyTable;
+}
+let dist = '../dist'
+if (pathSrc.indexOf('node_modules') > -1) {
+  dist = '../../../dist'
+  let proxyTableGet = require('../../../cors.js').proxyTable
   for (let i in proxyTableGet) {
   for (let i in proxyTableGet) {
-    proxyTable[i] = proxyTableGet[i];
+    proxyTable[i] = proxyTableGet[i]
   }
   }
 }
 }
 
 
 module.exports = {
 module.exports = {
   dev: {
   dev: {
     // Paths
     // Paths
-    assetsSubDirectory: "static",
-    assetsPublicPath: "/",
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
     proxyTable: proxyTable,
     proxyTable: proxyTable,
     // Various Dev Server settings
     // Various Dev Server settings
-    host: "localhost", // can be overwritten by process.env.HOST
+    host: 'localhost', // can be overwritten by process.env.HOST
     port: 8802, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     port: 8802, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     autoOpenBrowser: false,
     errorOverlay: true,
     errorOverlay: true,
@@ -144,12 +144,12 @@ module.exports = {
 
 
   build: {
   build: {
     // Template for index.html
     // Template for index.html
-    index: path.resolve(__dirname, dist + "/index.html"),
+    index: path.resolve(__dirname, dist + '/index.html'),
 
 
     // Paths
     // Paths
     assetsRoot: path.resolve(__dirname, dist),
     assetsRoot: path.resolve(__dirname, dist),
-    assetsSubDirectory: "static", // 打包后 static放的位置
-    assetsPublicPath: "../", // html中webpack打包的JS -> ../static/xxx.js
+    assetsSubDirectory: 'static', // 打包后 static放的位置
+    assetsPublicPath: '../', // html中webpack打包的JS -> ../static/xxx.js
 
 
     /**
     /**
      * Source Maps
      * Source Maps
@@ -157,14 +157,14 @@ module.exports = {
 
 
     productionSourceMap: false,
     productionSourceMap: false,
     // https:       //webpack.js.org/configuration/devtool/#production
     // https:       //webpack.js.org/configuration/devtool/#production
-    devtool: "#source-map",
+    devtool: '#source-map',
 
 
     // Gzip off by default as many popular static hosts such as
     // Gzip off by default as many popular static hosts such as
     // Surge or Netlify already gzip all static assets for you.
     // Surge or Netlify already gzip all static assets for you.
     // Before setting to `true`, make sure to:
     // Before setting to `true`, make sure to:
     // npm install --save-dev compression-webpack-plugin
     // npm install --save-dev compression-webpack-plugin
     productionGzip: false,
     productionGzip: false,
-    productionGzipExtensions: ["js", "css"],
+    productionGzipExtensions: ['js', 'css'],
 
 
     // Run the build command with an extra argument to
     // Run the build command with an extra argument to
     // View the bundle analyzer report after build finishes:
     // View the bundle analyzer report after build finishes:
@@ -172,4 +172,4 @@ module.exports = {
     // Set to `true` or `false` to always turn it on or off
     // Set to `true` or `false` to always turn it on or off
     bundleAnalyzerReport: process.env.npm_config_report
     bundleAnalyzerReport: process.env.npm_config_report
   }
   }
-};
+}

+ 3 - 1
src/components/main.vue

@@ -908,6 +908,7 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
+    this.orgcodezs=getCookie("orgCode");
     this.current_theme = window.top.localStorage.getItem("current_theme")
     this.current_theme = window.top.localStorage.getItem("current_theme")
       ? window.top.localStorage.getItem("current_theme")
       ? window.top.localStorage.getItem("current_theme")
       : "deepBlue_theme";
       : "deepBlue_theme";
@@ -920,6 +921,7 @@ export default {
     } else {
     } else {
       this.styleControll = false;
       this.styleControll = false;
     }
     }
+    console.log("获取到的orgCode+++++++++++++"+this.orgcodezs)
     this.getinformation();
     this.getinformation();
   },
   },
   destroyed() {
   destroyed() {
@@ -933,7 +935,6 @@ export default {
   beforeCreate() {
   beforeCreate() {
     let userId = getCookie("userId");
     let userId = getCookie("userId");
     this.appId = getCookie("appId");
     this.appId = getCookie("appId");
-    this.orgcodezs=getCookie("orgCode");
     let menuId = window.top.localStorage.getItem("activeMenu");
     let menuId = window.top.localStorage.getItem("activeMenu");
     let companyId = window.top.localStorage.getItem("companyId");
     let companyId = window.top.localStorage.getItem("companyId");
   },
   },
@@ -2558,6 +2559,7 @@ export default {
       this.socketshow=false;
       this.socketshow=false;
     },
     },
     getinformation(){
     getinformation(){
+      console.log("获取到的orgCode----------------"+this.orgcodezs)
       this.axios.post("/api/v1/ams/getNotice",{orgcodezs:this.orgcodezs}).then((res)=>{
       this.axios.post("/api/v1/ams/getNotice",{orgcodezs:this.orgcodezs}).then((res)=>{
          this.noticedata=res.data.data;
          this.noticedata=res.data.data;
          this.taskAllNum=res.data.data[0].taskAllNum
          this.taskAllNum=res.data.data[0].taskAllNum

+ 255 - 200
src/config/routerBefore.js

@@ -1,22 +1,22 @@
 // 路由前置操作
 // 路由前置操作
-import store from '@/store/index.js';
-import {
-  Message
-} from 'element-ui';
-import {
-  getCookie,
-  setCookie,
-  dgTree
-} from '@/utils/util.js';
-import axios from '@/config/axios.js';
-import {
-  stDev,
-  stProd,
-  proPath
-} from '@/config/config.js';
+import store from '@/store/index.js'
+import { Message } from 'element-ui'
+import { getCookie, setCookie, dgTree } from '@/utils/util.js'
+import axios from '@/config/axios.js'
+import { stDev, stProd, proPath } from '@/config/config.js'
 
 
 // 免登录白名单
 // 免登录白名单
-const whiteList = ['/', '/login', '/download', '/page404', '/dingtalkTaskMobileEnd', '/dingtalkWorkFlowMobileEnd', '/luckDraw', '/printScan'];
+const whiteList = [
+  '/',
+  '/login',
+  '/download',
+  '/page404',
+  '/dingtalkTaskMobileEnd',
+  '/dingtalkWorkFlowMobileEnd',
+  '/luckDraw',
+  '/printScan',
+  '/printReceipt'
+]
 
 
 /**
 /**
  * 当前路由取标题
  * 当前路由取标题
@@ -25,22 +25,22 @@ const whiteList = ['/', '/login', '/download', '/page404', '/dingtalkTaskMobileE
  * @param {Array} menu 菜单树
  * @param {Array} menu 菜单树
  * @returns {String} 标题
  * @returns {String} 标题
  */
  */
-const titleFn = function (to, menu) {
-  let title = '';
+const titleFn = function(to, menu) {
+  let title = ''
   if (to.meta && to.meta.title) {
   if (to.meta && to.meta.title) {
-    return to.meta.title;
+    return to.meta.title
   }
   }
   //
   //
   if (to.meta && to.meta.code) {
   if (to.meta && to.meta.code) {
     //  查找标题
     //  查找标题
-    let code = to.meta.code;
+    let code = to.meta.code
     dgTree(menu, '', item => {
     dgTree(menu, '', item => {
       if (item.menuCode === code) {
       if (item.menuCode === code) {
-        title = item.menuLabel;
+        title = item.menuLabel
       }
       }
-    });
+    })
   }
   }
-  return title;
+  return title
 }
 }
 
 
 /**
 /**
@@ -49,274 +49,329 @@ const titleFn = function (to, menu) {
  * @param {Array} menu 菜单树
  * @param {Array} menu 菜单树
  * @returns {Array} matched
  * @returns {Array} matched
  */
  */
-const breadcrumbFn = function (to, menu) {
-  let code = to.meta.code;
-  let list = [];
-  let item = null;
-  let data = [];
-  let getPid = function (pId) {
+const breadcrumbFn = function(to, menu) {
+  let code = to.meta.code
+  let list = []
+  let item = null
+  let data = []
+  let getPid = function(pId) {
     for (let ii of list) {
     for (let ii of list) {
       if (ii.menuId === pId) {
       if (ii.menuId === pId) {
-        return ii;
+        return ii
       }
       }
     }
     }
-    return null;
+    return null
   }
   }
   dgTree(menu, '', leaf => {
   dgTree(menu, '', leaf => {
-    list.push(leaf);
+    list.push(leaf)
     if (leaf.menuCode === code) {
     if (leaf.menuCode === code) {
-      item = leaf;
+      item = leaf
     }
     }
-  });
-  let init = function (pId) {
-    let itemPid = getPid(pId);
+  })
+  let init = function(pId) {
+    let itemPid = getPid(pId)
     if (itemPid) {
     if (itemPid) {
-      data.push(itemPid);
-      init(itemPid.pId);
+      data.push(itemPid)
+      init(itemPid.pId)
     }
     }
   }
   }
   //
   //
   if (item) {
   if (item) {
-    data.push(item);
-    init(item.pId);
+    data.push(item)
+    init(item.pId)
   }
   }
   if (data.length > 1) {
   if (data.length > 1) {
-    return data.reverse();
+    return data.reverse()
   }
   }
   //
   //
   to.matched.forEach(item => {
   to.matched.forEach(item => {
     dgTree(menu, '', leaf => {
     dgTree(menu, '', leaf => {
       if (item.meta && item.meta.code === leaf.menuCode) {
       if (item.meta && item.meta.code === leaf.menuCode) {
-        data.push(leaf);
+        data.push(leaf)
       }
       }
-    });
-  });
-  return data;
+    })
+  })
+  return data
 }
 }
 //  路由前置操作
 //  路由前置操作
-const routerBefore = function (router, constantRouterMap) {
+const routerBefore = function(router, constantRouterMap) {
   let flag = false
   let flag = false
-  console.log('开始了')
   router.beforeEach((to, from, next) => {
   router.beforeEach((to, from, next) => {
     //  面包屑
     //  面包屑
     if (document.domain.indexOf('steerinfo.com') > -1) {
     if (document.domain.indexOf('steerinfo.com') > -1) {
-      document.domain = 'steerinfo.com';
+      document.domain = 'steerinfo.com'
     }
     }
-    store.commit('breadcrumb', breadcrumbFn(to, store.state.routes));
+    store.commit('breadcrumb', breadcrumbFn(to, store.state.routes))
     //  标题
     //  标题
     if (to.meta && !to.meta.title) {
     if (to.meta && !to.meta.title) {
-      document.title = titleFn(to, store.state.routes) + ' ' + document.title.substr(document.title.indexOf('-'));
+      document.title =
+        titleFn(to, store.state.routes) +
+        ' ' +
+        document.title.substr(document.title.indexOf('-'))
     } else {
     } else {
-      document.title = to.meta.title + ' ' + document.title.substr(document.title.indexOf('-'));
+      document.title =
+        to.meta.title + ' ' + document.title.substr(document.title.indexOf('-'))
     }
     }
     if (to.query.ticket) {
     if (to.query.ticket) {
       console.log('开始了2')
       console.log('开始了2')
-      setCookie('ticket', to.query.ticket, '', '/');
+      setCookie('ticket', to.query.ticket, '', '/')
       let res = axios.get('pass/auth/ticket', {
       let res = axios.get('pass/auth/ticket', {
         params: {
         params: {
           ticket: to.query.ticket || '-5696372145848366561'
           ticket: to.query.ticket || '-5696372145848366561'
         }
         }
-      });
-        res.then(res => {
-            if (res.succeed) {
-              DoneCookie(to, from, next, res.data.accessToken, flag)
-            }
-        }).catch(err => {
+      })
+      res
+        .then(res => {
+          if (res.succeed) {
+            DoneCookie(to, from, next, res.data.accessToken, flag)
+          }
+        })
+        .catch(err => {
           console.log(err)
           console.log(err)
           Message('登陆账户异常, 请联系管理员')
           Message('登陆账户异常, 请联系管理员')
-        });
+        })
     } else {
     } else {
       console.log('开始了3')
       console.log('开始了3')
       DoneCookie(to, from, next, to.query.accessToken, flag)
       DoneCookie(to, from, next, to.query.accessToken, flag)
     }
     }
-  });
+  })
 }
 }
+
 function DoneCookie(to, from, next, accessToken, flag) {
 function DoneCookie(to, from, next, accessToken, flag) {
   if (accessToken) {
   if (accessToken) {
     if (to.query.menuLeave) {
     if (to.query.menuLeave) {
-      setCookie('menuLeave', to.query.menuLeave, '', '/', '', '', true);
+      setCookie('menuLeave', to.query.menuLeave, '', '/', '', '', true)
     } else {
     } else {
-      setCookie('menuLeave', '', '', '/', '', '', true);
+      setCookie('menuLeave', '', '', '/', '', '', true)
     }
     }
-    setCookie('accessToken', accessToken, '', '/');
-    store.dispatch('getLoginInfo').then(res => { // 拉取info
-      if (res.code === '0') {
-        setCookie('userId', res.data.user.userId);
-        setCookie('loginId', res.data.user.userId); // 为配合bms取值添加
-        setCookie('loginName', res.data.user.userCode);
-        let info = JSON.parse(JSON.stringify(res.data.user));
-        for (let k in info) {
-          if (k === 'sysGroup' || k === 'sysCompanys' || k === 'sysRoles') {
-            delete info[k];
-          }
-        }
-        setCookie('userInfo', JSON.stringify(info));
-        // 判断用户集团公司情况跳转
-        let userInfo = res.data.user;
-        // 超级管理员
-        if (userInfo.userCode === 'admin') {
-          if (userInfo.sysCompanys) {
-            // 公司列表过多时cookie存放失败,存至localStorage
-            // setCookie('companys', JSON.stringify(userInfo.sysCompanys));
-            window.top.localStorage.setItem('sysGroup', JSON.stringify(userInfo.sysGroup));
-            window.top.localStorage.setItem('companys', JSON.stringify(userInfo.sysCompanys));
-            if (userInfo.hasOwnProperty('sysCompanys')) {
-              window.top.localStorage.setItem('companyId', userInfo.sysCompanys[0].id);
+    setCookie('accessToken', accessToken, '', '/')
+    store
+      .dispatch('getLoginInfo')
+      .then(res => {
+        // 拉取info
+        if (res.code === '0') {
+          setCookie('userId', res.data.user.userId)
+          setCookie('loginId', res.data.user.userId) // 为配合bms取值添加
+          setCookie('loginName', res.data.user.userCode)
+          let info = JSON.parse(JSON.stringify(res.data.user))
+          for (let k in info) {
+            if (k === 'sysGroup' || k === 'sysCompanys' || k === 'sysRoles') {
+              delete info[k]
             }
             }
           }
           }
-          next({
-            path: '/default'
-          });
-          // 普通用户
-        } else if (userInfo.orgCode === 'zizhuyitiji') {
-          next({
-            path: '/printScan'
-          });
-        } else {
-          if (userInfo.hasOwnProperty('sysGroup') && userInfo.sysGroup !== '' && userInfo.sysGroup !== null && JSON.stringify(userInfo.sysGroup) !== '{}' && JSON.stringify(userInfo.sysGroup) !== '[]') {
-            window.top.localStorage.setItem('sysGroup', JSON.stringify(userInfo.sysGroup));
-            if (userInfo.hasOwnProperty('sysCompanys')) {
-              window.top.localStorage.setItem('companys', JSON.stringify(userInfo.sysCompanys));
-              window.top.localStorage.setItem('companyId', userInfo.sysCompanys[0].id);
-              if (userInfo.sysCompanys.length > 1) {
-                // 跳转选择集团公司页面
-                next({
-                  path: '/selectCompany'
-                });
+          setCookie('userInfo', JSON.stringify(info))
+          // 判断用户集团公司情况跳转
+          let userInfo = res.data.user
+          // 超级管理员
+          if (userInfo.userCode === 'admin') {
+            if (userInfo.sysCompanys) {
+              // 公司列表过多时cookie存放失败,存至localStorage
+              // setCookie('companys', JSON.stringify(userInfo.sysCompanys));
+              window.top.localStorage.setItem(
+                'sysGroup',
+                JSON.stringify(userInfo.sysGroup)
+              )
+              window.top.localStorage.setItem(
+                'companys',
+                JSON.stringify(userInfo.sysCompanys)
+              )
+              if (userInfo.hasOwnProperty('sysCompanys')) {
+                window.top.localStorage.setItem(
+                  'companyId',
+                  userInfo.sysCompanys[0].id
+                )
+              }
+            }
+            next({
+              path: '/default'
+            })
+            // 普通用户
+          } else {
+            if (
+              userInfo.hasOwnProperty('sysGroup') &&
+              userInfo.sysGroup !== '' &&
+              userInfo.sysGroup !== null &&
+              JSON.stringify(userInfo.sysGroup) !== '{}' &&
+              JSON.stringify(userInfo.sysGroup) !== '[]'
+            ) {
+              window.top.localStorage.setItem(
+                'sysGroup',
+                JSON.stringify(userInfo.sysGroup)
+              )
+              if (userInfo.hasOwnProperty('sysCompanys')) {
+                window.top.localStorage.setItem(
+                  'companys',
+                  JSON.stringify(userInfo.sysCompanys)
+                )
+                window.top.localStorage.setItem(
+                  'companyId',
+                  userInfo.sysCompanys[0].id
+                )
+                if (userInfo.sysCompanys.length > 1) {
+                  // 跳转选择集团公司页面
+                  next({
+                    path: '/selectCompany'
+                  })
+                } else {
+                  next({
+                    path: '/default'
+                  })
+                }
               } else {
               } else {
-                next({
-                  path: '/default'
-                });
+                this.$message.error(
+                  '后台返回数据缺少company信息,请联系开发人员!'
+                )
               }
               }
             } else {
             } else {
-              this.$message.error('后台返回数据缺少company信息,请联系开发人员!');
+              this.$message.error(
+                '必须隶属一个集团!请先联系管理员添加集团信息!'
+              )
             }
             }
-          } else {
-            this.$message.error('必须隶属一个集团!请先联系管理员添加集团信息!');
           }
           }
+        } else {
+          Message('登录已过期,请重新登录')
+          setCookie('accessToken', '', -1, '/')
+          setCookie('refreshToken', '', -1, '/')
+          setCookie('workDate', '', -1)
+          setCookie('appId', '', -1, '/')
+          setCookie('ticket', '', -1, '/')
+          setTimeout(() => {
+            window.top.location.href = store.getters.ctx
+          }, 500)
         }
         }
-      } else {
-        Message('登录已过期,请重新登录');
-        setCookie('accessToken', '', -1, '/');
-        setCookie('refreshToken', '', -1, '/');
-        setCookie('workDate', '', -1);
-        setCookie('appId', '', -1, '/');
-        setCookie('ticket', '', -1, '/');
-        setTimeout(() => {
-          window.top.location.href = store.getters.ctx;
-        }, 500)
-      }
-    }).catch(err => {
-      console.log(err);
-      Message('登录已过期,请重新登录');
-      setCookie('accessToken', '', -1, '/');
-      setCookie('refreshToken', '', -1, '/');
-      setCookie('workDate', '', -1);
-      setCookie('appId', '', -1, '/');
-      setCookie('ticket', '', -1, '/');
-      window.top.location.href = store.getters.ctx;
-    });
-  } else if (getCookie('accessToken')) { // 判断是否有token
-    if (window.top.document.URL === window.document.URL && !window.top.localStorage.getItem('allPrivilege')) {
-      let userInfo = JSON.parse(getCookie('userInfo'));
-      setCookie('userId', userInfo.userId);
-      let companyId = window.top.localStorage.getItem('companyId');
-      let menuId = window.top.localStorage.getItem('activeMenu');
+      })
+      .catch(err => {
+        console.log(err)
+        Message('登录已过期,请重新登录')
+        setCookie('accessToken', '', -1, '/')
+        setCookie('refreshToken', '', -1, '/')
+        setCookie('workDate', '', -1)
+        setCookie('appId', '', -1, '/')
+        setCookie('ticket', '', -1, '/')
+        window.top.location.href = store.getters.ctx
+      })
+  } else if (getCookie('accessToken')) {
+    // 判断是否有token
+    if (
+      window.top.document.URL === window.document.URL &&
+      !window.top.localStorage.getItem('allPrivilege')
+    ) {
+      let userInfo = JSON.parse(getCookie('userInfo'))
+      setCookie('userId', userInfo.userId)
+      let companyId = window.top.localStorage.getItem('companyId')
+      let menuId = window.top.localStorage.getItem('activeMenu')
       // 查询所有注释掉
       // 查询所有注释掉
       // store.dispatch('getAllMenuUrl', { companyId: companyId });
       // store.dispatch('getAllMenuUrl', { companyId: companyId });
       // store.dispatch('getOwnMenuUrl', { userId: userId, menuId: menuId });
       // store.dispatch('getOwnMenuUrl', { userId: userId, menuId: menuId });
-      store.dispatch('getOwnMenuUrl', { companyId: companyId });
+      store.dispatch('getOwnMenuUrl', {
+        companyId: companyId
+      })
     }
     }
-    console.log('to.path: ' + to.path);
+    console.log('to.path: ' + to.path)
     if (to.path === '/login' || to.path === '/') {
     if (to.path === '/login' || to.path === '/') {
       // 判断非本地模式登录页面不可访问
       // 判断非本地模式登录页面不可访问
       if (document.location.origin.indexOf('steerinfo.com') !== -1) {
       if (document.location.origin.indexOf('steerinfo.com') !== -1) {
         next({
         next({
           path: '/page404'
           path: '/page404'
-        });
+        })
       } else {
       } else {
-        console.log('to.path:======= ');
+        console.log('to.path:======= ')
         /**
         /**
         next({
         next({
           path: '/'
           path: '/'
         }); */
         }); */
-        next();
+        next()
       }
       }
     } else {
     } else {
-      if (window.top.document.URL === window.document.URL && store.state.userInfo === null) { // 判断当前用户是否已拉取完路由信息
-        store.dispatch('getUserInfo').then(res => { // 拉取info
-          if (res.code === '0') {
-            const userInfo = res.data;
-            let appId = getCookie('appId');
-            userInfo.appId = appId;
-            store.dispatch('generateRoutes', {
-              userInfo
-            }).then(() => { // 生成可访问的路由表
-              // router.addRoutes(store.state.routes) // 动态添加可访问路由表
-              if (flag) {
-                next()
-              } else {
-                next({
-                  ...to,
-                  replace: true
+      if (
+        window.top.document.URL === window.document.URL &&
+        store.state.userInfo === null
+      ) {
+        // 判断当前用户是否已拉取完路由信息
+        store
+          .dispatch('getUserInfo')
+          .then(res => {
+            // 拉取info
+            if (res.code === '0') {
+              const userInfo = res.data
+              let appId = getCookie('appId')
+              userInfo.appId = appId
+              store
+                .dispatch('generateRoutes', {
+                  userInfo
                 })
                 })
-                flag = true
-              }
-              // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
-              console.log('这是个什么东西', {
-                ...to,
-                replace: true
-              })
-            })
-          } else {
-            Message('登录已过期,请重新登录');
+                .then(() => {
+                  // 生成可访问的路由表
+                  // router.addRoutes(store.state.routes) // 动态添加可访问路由表
+                  if (flag) {
+                    next()
+                  } else {
+                    next({
+                      ...to,
+                      replace: true
+                    })
+                    flag = true
+                  }
+                  // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
+                  console.log('这是个什么东西', {
+                    ...to,
+                    replace: true
+                  })
+                })
+            } else {
+              Message('登录已过期,请重新登录')
+              // next('/login'); // 否则全部重定向到登录页
+              // window.location.href = '/views/index.html';
+              setCookie('accessToken', '', -1, '/')
+              setCookie('refreshToken', '', -1, '/')
+              setCookie('appId', '', -1, '/')
+              setCookie('workDate', '', -1)
+              setCookie('ticket', '', -1, '/')
+              window.top.location.href = store.getters.ctx
+            }
+          })
+          .catch(err => {
+            console.log(err)
+            Message('登录已过期,请重新登录')
             // next('/login'); // 否则全部重定向到登录页
             // next('/login'); // 否则全部重定向到登录页
             // window.location.href = '/views/index.html';
             // window.location.href = '/views/index.html';
-            setCookie('accessToken', '', -1, '/');
-            setCookie('refreshToken', '', -1, '/');
-            setCookie('appId', '', -1, '/');
-            setCookie('workDate', '', -1);
-            setCookie('ticket', '', -1, '/');
-            window.top.location.href = store.getters.ctx;
-          }
-        }).catch(err => {
-          console.log(err);
-          Message('登录已过期,请重新登录');
-          // next('/login'); // 否则全部重定向到登录页
-          // window.location.href = '/views/index.html';
-          setCookie('accessToken', '', -1, '/');
-          setCookie('refreshToken', '', -1, '/');
-          setCookie('appId', '', -1, '/');
-          setCookie('workDate', '', -1);
-          setCookie('ticket', '', -1, '/');
-          window.top.location.href = store.getters.ctx;
-        });
+            setCookie('accessToken', '', -1, '/')
+            setCookie('refreshToken', '', -1, '/')
+            setCookie('appId', '', -1, '/')
+            setCookie('workDate', '', -1)
+            setCookie('ticket', '', -1, '/')
+            window.top.location.href = store.getters.ctx
+          })
       } else {
       } else {
         next() // 当有用户权限的时候,说明所有可访问路由已生成 如访问没权限的全面会自动进入404页面
         next() // 当有用户权限的时候,说明所有可访问路由已生成 如访问没权限的全面会自动进入404页面
       }
       }
     }
     }
   } else {
   } else {
-    if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
+    if (whiteList.indexOf(to.path) !== -1) {
+      // 在免登录白名单,直接进入
       // 判断非本地模式登录页面不可访问
       // 判断非本地模式登录页面不可访问
-      if ((to.path === '/login' || to.path === '/') && document.location.origin.indexOf('steerinfo.com') !== -1) {
+      if (
+        (to.path === '/login' || to.path === '/') &&
+        document.location.origin.indexOf('steerinfo.com') !== -1
+      ) {
         next({
         next({
           path: '/page404'
           path: '/page404'
-        });
+        })
       } else {
       } else {
-        next();
+        next()
       }
       }
     } else {
     } else {
-      Message('未登录');
+      Message('未登录')
       // next('/login'); // 否则全部重定向到登录页
       // next('/login'); // 否则全部重定向到登录页
       // window.location.href = '/views/index.html';
       // window.location.href = '/views/index.html';
-      setCookie('accessToken', '', -1, '/');
-      setCookie('refreshToken', '', -1, '/');
-      setCookie('workDate', '', -1);
-      setCookie('appId', '', -1, '/');
-      setCookie('ticket', '', -1, '/');
-      window.top.location.href = store.getters.ctx;
+      setCookie('accessToken', '', -1, '/')
+      setCookie('refreshToken', '', -1, '/')
+      setCookie('workDate', '', -1)
+      setCookie('appId', '', -1, '/')
+      setCookie('ticket', '', -1, '/')
+      window.top.location.href = store.getters.ctx
     }
     }
   }
   }
 }
 }
 
 
-export default routerBefore;
+export default routerBefore

+ 1 - 1
src/views/index/app.html

@@ -3,7 +3,7 @@
   <head>
   <head>
     <meta charset="utf-8">
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="renderer" content="webkit">
+    <meta name="full-screen" content="webkit">
     <meta content="智慧物流平台" name="keywords">
     <meta content="智慧物流平台" name="keywords">
     <meta content="智慧物流平台" name="description">
     <meta content="智慧物流平台" name="description">
     <title>登录 - 智慧物流平台</title>
     <title>登录 - 智慧物流平台</title>

+ 4 - 9
src/views/index/components/login.vue

@@ -146,8 +146,8 @@ export default {
                 // 判断用户集团公司情况跳转
                 // 判断用户集团公司情况跳转
                 let userInfo = res.data.user;
                 let userInfo = res.data.user;
                 let sRedirect = this.$route.query.redirect;
                 let sRedirect = this.$route.query.redirect;
-                console.log(userInfo)
-                console.log("userInfo")
+                console.log(userInfo);
+                console.log("userInfo");
                 // 超级管理员
                 // 超级管理员
                 if (userInfo.userCode === "admin") {
                 if (userInfo.userCode === "admin") {
                   if (userInfo.sysCompanys) {
                   if (userInfo.sysCompanys) {
@@ -174,10 +174,7 @@ export default {
                     this.$router.push({ name: "default" }).catch(() => {});
                     this.$router.push({ name: "default" }).catch(() => {});
                   }
                   }
                   // 普通用户
                   // 普通用户
-                }
-                else if(userInfo.orgCode == 'zizhuyitiji'){
-                  this.$router.push("/printScan")
-                }else {
+                } else {
                   if (
                   if (
                     userInfo.hasOwnProperty("sysGroup") &&
                     userInfo.hasOwnProperty("sysGroup") &&
                     userInfo.sysGroup !== "" &&
                     userInfo.sysGroup !== "" &&
@@ -209,7 +206,6 @@ export default {
                             .push({ name: "default" })
                             .push({ name: "default" })
                             .catch(() => {});
                             .catch(() => {});
                         }
                         }
-
                       }
                       }
                     } else {
                     } else {
                       this.$message.error(
                       this.$message.error(
@@ -221,7 +217,6 @@ export default {
                       "必须隶属一个集团!请先联系管理员添加集团信息!"
                       "必须隶属一个集团!请先联系管理员添加集团信息!"
                     );
                     );
                   }
                   }
-
                 }
                 }
               } else {
               } else {
                 //  登录失败
                 //  登录失败
@@ -233,7 +228,7 @@ export default {
               }
               }
               this.loginBtnLoading = false;
               this.loginBtnLoading = false;
               setTimeout(() => {
               setTimeout(() => {
-                // this.$router.go(0);
+                this.$router.go(0);
               }, 2000);
               }, 2000);
             })
             })
             .catch(() => {
             .catch(() => {

+ 108 - 86
src/views/index/components/printReceipt.vue

@@ -6,6 +6,8 @@
         @click="print1()"
         @click="print1()"
         v-print="'#pdfDom1'"
         v-print="'#pdfDom1'"
         style="width: 500px;height: 120px;font-size: 100px"
         style="width: 500px;height: 120px;font-size: 100px"
+        id="printReceipt"
+        v-show="false"
       >
       >
         <!--class="el-icon-printer"-->
         <!--class="el-icon-printer"-->
         <!---->
         <!---->
@@ -16,17 +18,18 @@
       <div id="pdfDom" v-for="(item, index) in dataList" :key="index">
       <div id="pdfDom" v-for="(item, index) in dataList" :key="index">
         <div class="blank"></div>
         <div class="blank"></div>
 
 
-        <div class="title">
+        <div class="title" style="margin: auto">
           <h5 align="center">{{ shippername }} 物资送货单</h5>
           <h5 align="center">{{ shippername }} 物资送货单</h5>
           <!--        <h5 align="center">物资送货单</h5>-->
           <!--        <h5 align="center">物资送货单</h5>-->
         </div>
         </div>
+        <div style="height: 10px"></div>
         <div>
         <div>
           <!-- tablePart0 -->
           <!-- tablePart0 -->
           <table
           <table
             border="0"
             border="0"
             cellpadding="10"
             cellpadding="10"
             cellspacing="0"
             cellspacing="0"
-            style="margin: auto; font-size: 20px"
+            style="margin:auto; font-size: 20px"
             width="1000px"
             width="1000px"
             class="tablePart0"
             class="tablePart0"
           >
           >
@@ -46,21 +49,21 @@
             width="1000px"
             width="1000px"
             class="tablePart1"
             class="tablePart1"
           >
           >
-            <tr>
+            <tr style="height: 35px">
               <th style="width: 5%; text-align: center">序号</th>
               <th style="width: 5%; text-align: center">序号</th>
               <th style="width: 23.5%; text-align: center">物资名称</th>
               <th style="width: 23.5%; text-align: center">物资名称</th>
               <th style="width: 22.5%; text-align: center">规格型号</th>
               <th style="width: 22.5%; text-align: center">规格型号</th>
               <th style="width: 14%">件数</th>
               <th style="width: 14%">件数</th>
               <th style="width: 35%">重量</th>
               <th style="width: 35%">重量</th>
-<!--              <th style="width: 21%">订单日期</th>-->
+              <!--              <th style="width: 21%">订单日期</th>-->
             </tr>
             </tr>
-            <tr v-for="(item, index) in deliveryOrderMaterialList" :key="index">
+            <tr style="height: 35px" v-for="(item, index) in deliveryOrderMaterialList" :key="index">
               <td>{{ index + 1 }}</td>
               <td>{{ index + 1 }}</td>
               <td>{{ item.materialName }}</td>
               <td>{{ item.materialName }}</td>
               <td>{{ item.materialSpe }}{{ item.materialModel }}</td>
               <td>{{ item.materialSpe }}{{ item.materialModel }}</td>
               <td>{{ item.materialNumber }}</td>
               <td>{{ item.materialNumber }}</td>
               <td>{{ item.materialWeight }}</td>
               <td>{{ item.materialWeight }}</td>
-<!--              <td>{{ item.makeDate }}</td>-->
+              <!--              <td>{{ item.makeDate }}</td>-->
             </tr>
             </tr>
           </table>
           </table>
 
 
@@ -69,7 +72,7 @@
             border="1"
             border="1"
             cellpadding="10"
             cellpadding="10"
             cellspacing="0"
             cellspacing="0"
-            style="border-top: 0px"
+            style="border-top: 0px;height: 40px"
             width="1000px"
             width="1000px"
             class="tablePart2"
             class="tablePart2"
           >
           >
@@ -86,7 +89,7 @@
             border="1"
             border="1"
             cellpadding="10"
             cellpadding="10"
             cellspacing="0"
             cellspacing="0"
-            style="border-top: 0px"
+            style="border-top: 0px;height: 40px"
             width="1000px"
             width="1000px"
             class="tablePart3"
             class="tablePart3"
           >
           >
@@ -103,7 +106,7 @@
             border="0"
             border="0"
             cellpadding="10"
             cellpadding="10"
             cellspacing="0"
             cellspacing="0"
-            style="border-top: 0px"
+            style="border-top: 0px;height: 40px"
             width="1000px"
             width="1000px"
             class="tablePart4"
             class="tablePart4"
           >
           >
@@ -120,7 +123,7 @@
             border="1"
             border="1"
             cellpadding="10"
             cellpadding="10"
             cellspacing="0"
             cellspacing="0"
-            style="border-top: 0px"
+            style="border-top: 0px;height: 45px"
             width="1000px"
             width="1000px"
             class="tablePart9"
             class="tablePart9"
           >
           >
@@ -137,7 +140,7 @@
             border="0"
             border="0"
             cellpadding="10"
             cellpadding="10"
             cellspacing="0"
             cellspacing="0"
-            style="margin: auto; font-size: 20px"
+            style="margin-left: 190px; font-size: 20px;height: 45px"
             width="1000px"
             width="1000px"
             class="tablePart6"
             class="tablePart6"
           >
           >
@@ -172,13 +175,13 @@
             border="0"
             border="0"
             cellpadding="10"
             cellpadding="10"
             cellspacing="0"
             cellspacing="0"
-            style="margin: auto; font-size: 20px"
+            style="margin-left: 190px; font-size: 20px;height: 40px"
             width="1000px"
             width="1000px"
             class="tablePart6"
             class="tablePart6"
           >
           >
             <tr>
             <tr>
-              <th style="width: 14.5%">签收人:</th>
-              <th style="width: 14.5%">签收时间:</th>
+              <th style="width: 14.5%;text-align: left">签收人:</th>
+              <th style="width: 14.5%;text-align: left">签收时间:</th>
             </tr>
             </tr>
           </table>
           </table>
         </div>
         </div>
@@ -198,120 +201,139 @@
         </table>
         </table>
       </div>-->
       </div>-->
         <!--设置中间的间隔以及虚线-->
         <!--设置中间的间隔以及虚线-->
-        <div style="height: 80px"></div>
-        <hr width=1500px style="border:1px dashed black;height:1px">
+        <div style="height: 50px" v-show="index < 2"></div>
+        <hr width="1500px" style="border:1px dashed black" v-show="index < 2"/>
+        <div style="page-break-after:always" v-show="index ==1 && page"></div>
       </div>
       </div>
     </div>
     </div>
     <!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
     <!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
         <i class="el-icon-download"></i>导出(pdf)
         <i class="el-icon-download"></i>导出(pdf)
       </el-button> -->
       </el-button> -->
-    <el-button type="primary" @click="backScan()">
+<!--    <el-button type="primary" @click="backScan()">
       <i class="el-icon-back"></i>返回
       <i class="el-icon-back"></i>返回
-    </el-button>
+    </el-button>-->
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import table from "@/components/DilCommonUI/packages/table/src/table.vue";
+import table from '@/components/DilCommonUI/packages/table/src/table.vue'
 export default {
 export default {
   components: { table },
   components: { table },
-  name: "Login",
+  name: 'Login',
   data() {
   data() {
     return {
     return {
-      orderNumber: "",
-      consignee: "",
-      town: "",
-      consigneeTel: "",
-      sendDate: "",
-      receiptDate: "",
-      consigeeName: "",
-      saleNo: "",
+      orderNumber: '',
+      consignee: '',
+      town: '',
+      consigneeTel: '',
+      sendDate: '',
+      receiptDate: '',
+      consigeeName: '',
+      saleNo: '',
       deliveryOrderMaterialList: [
       deliveryOrderMaterialList: [
         {
         {
-          materialName: "",
-          materialSpe: "",
-          materialModel: "",
+          materialName: '',
+          materialSpe: '',
+          materialModel: '',
           materialNumber: 0,
           materialNumber: 0,
           materialWeight: 0,
           materialWeight: 0,
-          makeDate: ""
+          makeDate: ''
         }
         }
       ],
       ],
-      carrierName: "",
-      province: "",
-      deliveryAddress: "",
-      district: "",
-      capacityNumber: "",
-      shippername: "",
+      carrierName: '',
+      province: '',
+      deliveryAddress: '',
+      district: '',
+      capacityNumber: '',
+      shippername: '',
       year: new Date().getFullYear(),
       year: new Date().getFullYear(),
       month: new Date().getMonth() + 1,
       month: new Date().getMonth() + 1,
       date: new Date().getDate(),
       date: new Date().getDate(),
-      htmlTitle: "客户换票送货单",
-      note: "",
-      dataList: ["1", "2", "3"],
-      timer1:''
-    };
+      htmlTitle: '客户换票送货单',
+      note: '',
+      dataList: ['1', '2', '3'],
+      timer1: '',
+      //分页数据
+      page: '',
+    }
   },
   },
   created() {
   created() {
-    this.getDeliveryOrder();
+    this.getDeliveryOrder()
   },
   },
   mounted() {
   mounted() {
     /*this.timer1 = setTimeout(this.print,2000);*/
     /*this.timer1 = setTimeout(this.print,2000);*/
     // 六十秒不操作,自动返回扫码页面
     // 六十秒不操作,自动返回扫码页面
     const timer = setInterval(() => {
     const timer = setInterval(() => {
-      this.backScan();
-    }, 30000);
-    this.$once("hook:beforeDestroy", () => {
-      clearInterval(timer);
+
+      this.backScan()
+    }, 30000)
+    this.$once('hook:beforeDestroy', () => {
+      clearInterval(timer)
       /*clearTimeout(this.timer1)*/
       /*clearTimeout(this.timer1)*/
-    });
+    })
   },
   },
   methods: {
   methods: {
-    getDeliveryOrder() {
-      let orderNumber = this.$route.query.orderNumber;
-      this.axios
-        .post("/api/v1/tms/getDeliveryOrder?orderNumber=" + orderNumber)
+    async getDeliveryOrder() {
+      let orderNumber = this.$route.query.orderNumber
+      //空对象设置为null值
+      var deliver={};
+      await this.axios
+        .post('/api/v1/tms/getDeliveryOrder?orderNumber=' + orderNumber)
         .then(res => {
         .then(res => {
-          console.log(res);
-          this.orderNumber = res.data.orderNumber;
-          this.carrierName = res.data.carrierName;
-          this.capacityNumber = res.data.capacityNumber;
-          this.consigeeName = res.data.consigeeName;
-          this.consignee = res.data.consignee;
-          this.consigneeTel = res.data.consigneeTel;
-          this.sendDate = res.data.sendDate;
-          this.saleNo = res.data.saleNo;
-          console.log(this.saleNo);
-          this.shippername = res.data.shippername;
-          this.province = res.data.province;
-          this.district = res.data.district;
-          this.town = res.data.town;
-          this.deliveryAddress = res.data.deliveryAddress;
-          this.deliveryOrderMaterialList = res.data.deliveryOrderMaterialList;
-          this.note = res.data.note;
-        });
+          console.log("查询出来的数据")
+          console.log(res.data)
+          this.orderNumber = res.data.orderNumber
+          this.carrierName = res.data.carrierName
+          this.capacityNumber = res.data.capacityNumber
+          this.consigeeName = res.data.consigeeName
+          this.consignee = res.data.consignee
+          this.consigneeTel = res.data.consigneeTel
+          this.sendDate = res.data.sendDate
+          this.saleNo = res.data.saleNo
+          this.shippername = res.data.shippername
+          this.province = res.data.province
+          this.district = res.data.district
+          this.town = res.data.town
+          this.deliveryAddress = res.data.deliveryAddress
+          this.deliveryOrderMaterialList = res.data.deliveryOrderMaterialList
+          this.note = res.data.note
+          console.log("数据的长度"+res.data.deliveryOrderMaterialList.length)
+          if (res.data.deliveryOrderMaterialList.length > 2){
+            this.page=true
+          }else if (res.data.deliveryOrderMaterialList.length ==1){
+            this.deliveryOrderMaterialList.push(deliver)
+            console.log(this.deliveryOrderMaterialList)
+          }
+          document.getElementById('printReceipt').click()
+        })
     },
     },
-   print(){
-     let newstr=document.getElementById("pdfDom1").innerHTML
-     let oldstr=document.body.innerHTML
-     document.body.innerHTML=newstr
-     window.print()
-     /*document.body.innerHTML=oldstr*/
-     let orderNumber = this.$route.query.orderNumber;
-     this.axios.post("/api/v1/tms/changeNumber?orderNumber=" + orderNumber)
-   },
-    print1(){
-      let orderNumber = this.$route.query.orderNumber;
-      this.axios.post("/api/v1/tms/changeNumber?orderNumber=" + orderNumber)
-      this.backScan();
+    // print() {
+    //   console.log('调用了吗')
+    //   let newstr = document.getElementById('pdfDom1').innerHTML
+    //   let oldstr = document.body.innerHTML
+    //   document.body.innerHTML = newstr
+    //   window.print()
+    //   /*document.body.innerHTML=oldstr*/
+    //   // let orderNumber = this.$route.query.orderNumber
+    //   // this.axios.post('/api/v1/tms/changeNumber?orderNumber=' + orderNumber)
+    // },
+    print1() {
+      let orderNumber = this.$route.query.orderNumber
+      this.axios.post('/api/v1/tms/changeNumber?orderNumber=' + orderNumber)
+      this.backScan()
     },
     },
     backScan() {
     backScan() {
-      this.$router.go(-1);
+      this.$router.go(-1)
     }
     }
   }
   }
-};
+}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+#id {
+  width: 1500px;
+  height: 700px;
+}
 .title {
 .title {
   font-size: 25px;
   font-size: 25px;
 }
 }

+ 102 - 48
src/views/index/components/printScan.vue

@@ -3,6 +3,7 @@
     <div class="background">
     <div class="background">
       <img :src="backgroundImgURL" width="100%" height="100%" />
       <img :src="backgroundImgURL" width="100%" height="100%" />
     </div>
     </div>
+    <el-button @click.native="fullScreen" id="full" v-show="false"></el-button>
     <div class="orderNumberData">
     <div class="orderNumberData">
       <!--v-show="false" disabled="!isEdit"-->
       <!--v-show="false" disabled="!isEdit"-->
       <el-input
       <el-input
@@ -13,12 +14,15 @@
       >
       >
       </el-input>
       </el-input>
       <!--style="display:block;width:120px"-->
       <!--style="display:block;width:120px"-->
-      <div  v-show="false">
+      <div v-show="false">
         手动输入开关:
         手动输入开关:
       </div>
       </div>
-      <i class="el-icon-full-screen" @click="fullScreen"
-      v-show="edit1"></i>
-<!--      <el-switch
+      <!--      <i class="el-icon-full-screen" @click="fullScreen"
+      v-show="edit1"></i>-->
+      <!--      <el-switch
+=======
+      <i class="el-icon-full-screen" @click="fullScreen" v-show="edit1"></i>
+      <el-switch
         :disabled="!isEdit"
         :disabled="!isEdit"
         v-show="false"
         v-show="false"
       >
       >
@@ -35,39 +39,65 @@
       </el-switch>-->
       </el-switch>-->
     </div>
     </div>
     <div class="tip">
     <div class="tip">
-      手机二维码对准下方摄像头<br>
-      <i class="el-icon-bottom" style="padding-left: 450px;font-size: 300px"></i>
+      手机二维码对准下方摄像头<br />
+      <div class="arrowDown">⇩</div>
+      <!-- <i
+        class="el-icon-bottom"
+        style="padding-left: 450px;font-size: 300px;color: red"
+      ></i> -->
     </div>
     </div>
+    <div class="emg"><span style="">紧急联系人:曾16670077829</span></div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import screenfull from "screenfull";
+import screenfull from 'screenfull'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
       orderNumber: null,
       orderNumber: null,
       isEdit: true,
       isEdit: true,
       edit1: true,
       edit1: true,
-      backgroundImgURL: require("@/assets/saleSelfMachine/backgroundImg.jpg")
-    };
+      backgroundImgURL: require('@/assets/saleSelfMachine/backgroundImg.jpg')
+    }
   },
   },
   created() {
   created() {
-    this.changfouce();
+    this.changfouce()
   },
   },
   // watch:{
   // watch:{
   //    data:"toSaleSelfMachine"
   //    data:"toSaleSelfMachine"
   // },
   // },
   methods: {
   methods: {
+    //全屏函数
+    fullScreen() {
+      // screenfull.request()
+      // console.log('wbei')
+      // // documentElement 属性以一个元素对象返回一个文档的文档元素
+      // // var el = document.documentElement
+      // // el.requestFullscreen ||
+      // // el.mozRequestFullScreen ||
+      // // el.webkitRequestFullscreen ||
+      // // el.msRequestFullScreen
+      // //   ? el.requestFullscreen() ||
+      // //     el.mozRequestFullScreen() ||
+      // //     el.webkitRequestFullscreen() ||
+      // //     el.msRequestFullscreen()
+      // //   : null
+      var wscript = new ActiveXObject('WScript.Shell') //创建ActiveX
+      if (wscript !== null) {
+        //创建成功
+        wscript.SendKeys('{F11}') //触发f11
+      }
+    },
     //输入框自动聚焦
     //输入框自动聚焦
     changfouce() {
     changfouce() {
       this.$nextTick(x => {
       this.$nextTick(x => {
-        this.$refs.inputs.focus();
-      });
+        this.$refs.inputs.focus()
+      })
     },
     },
     fullScreen() {
     fullScreen() {
       if (screenfull.isEnabled && !screenfull.isFullscreen) {
       if (screenfull.isEnabled && !screenfull.isFullscreen) {
-        screenfull.request();
-        this.edit1=false
+        screenfull.request()
+        this.edit1 = false
       }
       }
     },
     },
     /*async querynumber(){
     /*async querynumber(){
@@ -89,21 +119,21 @@ export default {
       }
       }
     },*/
     },*/
     async querynumber() {
     async querynumber() {
-      console.log(this.orderNumber);
-      let orderNumber = this.orderNumber;
-      let i = 0;
+      console.log(this.orderNumber)
+      let orderNumber = this.orderNumber
+      let i = 0
       await this.axios
       await this.axios
-        .post("/api/v1/tms/queryNumber?orderNumber=" + orderNumber)
+        .post('/api/v1/tms/queryNumber?orderNumber=' + orderNumber)
         .then(res => {
         .then(res => {
-          console.log("查找出来的数据");
-          console.log(res.data);
-          console.log("-------------------------");
+          console.log('查找出来的数据')
+          console.log(res.data)
+          console.log('-------------------------')
           if (res.data.printnumber == 1) {
           if (res.data.printnumber == 1) {
-            i = 1;
+            i = 1
           }
           }
-        });
-      console.log(i);
-      return i;
+        })
+      console.log(i)
+      return i
     }
     }
     //失去焦点后自动执行获得焦点事件
     //失去焦点后自动执行获得焦点事件
     // onInputBlur(){
     // onInputBlur(){
@@ -117,39 +147,48 @@ export default {
     // }
     // }
   },
   },
   mounted() {
   mounted() {
-    console.log(screenfull.isFullscreen);
+    document.getElementById('full').click()
+    console.log(screenfull.isFullscreen)
     // this.changfouce();
     // this.changfouce();
     const timer = setInterval(async () => {
     const timer = setInterval(async () => {
       // if(this.$refs.inputs.focus==false){
       // if(this.$refs.inputs.focus==false){
       //     console.log("false")
       //     console.log("false")
-      this.changfouce();
+      this.changfouce()
       //}
       //}
-      if (this.orderNumber != null && this.orderNumber.length == 21) {
+      if (
+        this.orderNumber != null &&
+        this.orderNumber != '' &&
+        this.orderNumber.length == 21
+      ) {
         if (
         if (
-          this.orderNumber.startsWith("WYSDD") == true ||
-          this.orderNumber.startsWith("wysdd") == true
+          this.orderNumber.startsWith('WYSDD') == true ||
+          this.orderNumber.startsWith('wysdd') == true
         ) {
         ) {
-          let promise = await this.querynumber(this.orderNumber);
+          let promise = await this.querynumber(this.orderNumber)
           console.log(promise)
           console.log(promise)
-          if (promise==1){
-            this.$message.error("你已经打印过了")
-            this.orderNumber=null
+          if (promise == 1) {
+            this.$message.error('你已经打印过了')
+            this.orderNumber = null
             return
             return
           }
           }
           this.$router.push({
           this.$router.push({
-            path: "/printReceipt?orderNumber=" + this.orderNumber
-          });
+            path: '/printReceipt?orderNumber=' + this.orderNumber
+          })
         }
         }
-      } else if (this.orderNumber.length > 21) {
+      } else if (
+        this.orderNumber != null &&
+        this.orderNumber != '' &&
+        this.orderNumber.length > 21
+      ) {
         //清空输入框,免得一次多个重复订单还无法删除
         //清空输入框,免得一次多个重复订单还无法删除
-        this.orderNumber = null;
+        this.orderNumber = null
       }
       }
-    }, 3000);
-    this.$once("hook:beforeDestroy", () => {
-      clearInterval(timer);
-    });
+    }, 1000)
+    this.$once('hook:beforeDestroy', () => {
+      clearInterval(timer)
+    })
   }
   }
-};
+}
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
 .saleSelfMachine {
 .saleSelfMachine {
@@ -158,6 +197,7 @@ export default {
   .background {
   .background {
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
+    margin-top: 30px;
     z-index: -1;
     z-index: -1;
     position: absolute;
     position: absolute;
     overflow: hidden;
     overflow: hidden;
@@ -170,13 +210,27 @@ export default {
     justify-content: center;
     justify-content: center;
     align-items: center;
     align-items: center;
   }
   }
-  .tip{
-    width: 1500px;
-    height: 500px;
+  .tip {
+    width: 1800px;
+    height: 600px;
     font-size: 100px;
     font-size: 100px;
-    padding-left: 100px;
-    padding-top: 200px;
+    padding-left: 350px;
+    padding-top: 500px;
     color: #4cc9e9;
     color: #4cc9e9;
+    .arrowDown {
+      margin-top: 150px;
+      padding-left: 450px;
+      font-size: 300px;
+      color: red;
+    }
+  }
+  .emg {
+    position: fixed;
+    right: 20px;
+    bottom: 20px;
+    font-size: 30px;
+    color: red;
+    font-weight: 500;
   }
   }
 }
 }
 </style>
 </style>

+ 59 - 60
src/views/index/router/index.js

@@ -11,8 +11,7 @@ import download from "@/views/index/components/download.vue";
 // 抽奖结果
 // 抽奖结果
 //import luckDraw from "@/views/index/components/luckDraw.vue";
 //import luckDraw from "@/views/index/components/luckDraw.vue";
 
 
-import luckDraw from '@/views/index/components/luckDraw.vue'
-
+import luckDraw from "@/views/index/components/luckDraw.vue";
 
 
 import printReceipt from "../components/printReceipt";
 import printReceipt from "../components/printReceipt";
 // 网页登录不可访问
 // 网页登录不可访问
@@ -25,78 +24,78 @@ import printScan from "@/views/index/components/printScan.vue";
 
 
 Vue.use(Router);
 Vue.use(Router);
 
 
-export const constantRouterMap = [{
-        path: '/',
-        meta: {
-            'title': '登录'
-        },
-        component: login
+export const constantRouterMap = [
+  {
+    path: "/",
+    meta: {
+      title: "登录"
     },
     },
+    component: login
+  },
 
 
-    {
-        path: '/download',
-        name: 'download',
-        meta: {
-            'title': '下载'
-        },
-        component: download
-    },
   {
   {
-    path: '/printScan',
-    name: 'printScan',
+    path: "/download",
+    name: "download",
     meta: {
     meta: {
-      'title': '下载'
+      title: "下载"
     },
     },
-    component: printScan
+    component: download
   },
   },
   {
   {
-    path: '/printReceipt',
-    name: 'printReceipt',
+    path: "/printScan",
+    name: "printScan",
     meta: {
     meta: {
-      'title': '下载'
+      title: "下载"
     },
     },
+    component: printScan
+  },
+  {
+    path: "/printReceipt",
+    name: "printReceipt",
     component: printReceipt
     component: printReceipt
   },
   },
-    {
-        path: '/login',
-        name: 'login',
-        meta: {
-            'title': '登录'
-        },
-        component: login
+  {
+    path: "/login",
+    name: "login",
+    meta: {
+      title: "登录"
     },
     },
-    {
-        path:'/luckDraw',
-        name:'luckDraw',
-        meta:{
-            'title':'抽奖结果'
-        },
-        component:luckDraw
+    component: login
+  },
+  {
+    path: "/luckDraw",
+    name: "luckDraw",
+    meta: {
+      title: "抽奖结果"
     },
     },
-    {
-        path: '/default',
-        name: 'default',
-        component: main,
-        meta: {
-            'title': '首页'
-        }
+    component: luckDraw
+  },
+  {
+    path: "/default",
+    name: "default",
+    component: main,
+    meta: {
+      title: "首页"
+    }
+  },
+  {
+    path: "/selectCompany",
+    name: "selectCompany",
+    component: selectCompany,
+    meta: {
+      title: "集团与公司用户跳转页"
+    }
+  },
+  ,
+  {
+    path: "/page404",
+    name: "page404",
+    meta: {
+      title: "404"
     },
     },
-    {
-        path: '/selectCompany',
-        name: 'selectCompany',
-        component: selectCompany,
-        meta: {
-            'title': '集团与公司用户跳转页'
-        }
-    },,
-    {
-        path: '/page404',
-        name: 'page404',
-        meta: {
-            'title': '404'
-        },
-        component: page404
-}];
+    component: page404
+  }
+];
 
 
 const router = new Router({
 const router = new Router({
   // mode: 'history', // require service support
   // mode: 'history', // require service support

+ 213 - 184
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

@@ -382,7 +382,11 @@
         </el-table-column>
         </el-table-column>
         <el-table-column prop="canwork" label="继续装">
         <el-table-column prop="canwork" label="继续装">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button  type="primary" size="small" @click="continue1(scope.row)">
+            <el-button
+              type="primary"
+              size="small"
+              @click="continue1(scope.row)"
+            >
               继续装
               继续装
             </el-button>
             </el-button>
           </template>
           </template>
@@ -670,28 +674,28 @@ export default {
           .then(res => {
           .then(res => {
             if (res.data.code == "200") {
             if (res.data.code == "200") {
               this.$message({
               this.$message({
-                duration:600,
-                message:"反关闭成功",
-                type:"success"
-              })
-                //.success("反关闭成功");
+                duration: 600,
+                message: "反关闭成功",
+                type: "success"
+              });
+              //.success("反关闭成功");
               this.getSteelReport();
               this.getSteelReport();
             } else {
             } else {
               this.$message({
               this.$message({
-                duration:600,
-                message:"反关闭失败",
-                type:"error"
-              })
+                duration: 600,
+                message: "反关闭失败",
+                type: "error"
+              });
               //this.$message.error("反关闭失败");
               //this.$message.error("反关闭失败");
               this.getSteelReport();
               this.getSteelReport();
             }
             }
           })
           })
           .catch(() => {
           .catch(() => {
             this.$message({
             this.$message({
-              duration:600,
-              message:"反关闭失败",
-              type:"error"
-            })
+              duration: 600,
+              message: "反关闭失败",
+              type: "error"
+            });
             //this.$message.error("反关闭失败");
             //this.$message.error("反关闭失败");
             this.getSteelReport();
             this.getSteelReport();
           });
           });
@@ -790,10 +794,10 @@ export default {
               this.carrierList = [];
               this.carrierList = [];
               if (res.data.data.length == 0) {
               if (res.data.data.length == 0) {
                 this.$message({
                 this.$message({
-                  duration:600,
-                  message:"承运商不存在,请前往注册",
-                  type:"info"
-                })
+                  duration: 600,
+                  message: "承运商不存在,请前往注册",
+                  type: "info"
+                });
                 //this.$message.info("承运商不存在,请前往注册");
                 //this.$message.info("承运商不存在,请前往注册");
                 return;
                 return;
               }
               }
@@ -825,10 +829,10 @@ export default {
             if (res.data.code == "200") {
             if (res.data.code == "200") {
               if (res.data.data.length == 0) {
               if (res.data.data.length == 0) {
                 this.$message({
                 this.$message({
-                  duration:600,
-                  message:"车牌号不存在,请前往注册",
-                  type:"info"
-                })
+                  duration: 600,
+                  message: "车牌号不存在,请前往注册",
+                  type: "info"
+                });
                 //this.$message.info("车牌号不存在,请前往注册");
                 //this.$message.info("车牌号不存在,请前往注册");
                 return;
                 return;
               }
               }
@@ -863,19 +867,19 @@ export default {
       row.capacityId = row.newsCapacityId;
       row.capacityId = row.newsCapacityId;
       if (row.newsCapacityId == null) {
       if (row.newsCapacityId == null) {
         this.$message({
         this.$message({
-          duration:600,
-          message:"请先注册车牌号或者选中弹出后再提交!",
-          type:"warning"
-        })
+          duration: 600,
+          message: "请先注册车牌号或者选中弹出后再提交!",
+          type: "warning"
+        });
         //this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
         //this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
         return;
         return;
       }
       }
       if (!isVehicleNumber(row.capacityNo)) {
       if (!isVehicleNumber(row.capacityNo)) {
         this.$message({
         this.$message({
-          duration:600,
-          message:"请输入正确格式的车牌号!",
-          type:"error"
-        })
+          duration: 600,
+          message: "请输入正确格式的车牌号!",
+          type: "error"
+        });
         //this.$message.error("请输入正确格式的车牌号!");
         //this.$message.error("请输入正确格式的车牌号!");
         return;
         return;
       }
       }
@@ -891,19 +895,35 @@ export default {
           .then(res => {
           .then(res => {
             if (res.data.code == 200) {
             if (res.data.code == 200) {
               this.$message({
               this.$message({
-                duration:600,
-                message:"变更车牌号成功",
-                type:"success"
-              })
+                duration: 600,
+                message: "变更车牌号成功",
+                type: "success"
+              });
+              this.axios
+                .post(
+                  "/api/v1/ams/matchingDriverTelRecently?capacityNumber=" +
+                    row.capacityNo
+                )
+                .then(res => {
+                  if (res.data.data != null) {
+                    this.steelMap.capacityTel = res.data.data;
+                    this.updateDriverTel(row);
+                  }
+                });
+              this.$message({
+                duration: 600,
+                message: "变更车牌号成功!",
+                type: "success"
+              });
               //this.$message.success("变更车牌号成功!");
               //this.$message.success("变更车牌号成功!");
               this.getSteelReport();
               this.getSteelReport();
               loading.close();
               loading.close();
             } else {
             } else {
               this.$message({
               this.$message({
-                duration:600,
-                message:"变更失败,请联系管理员",
-                type:"error"
-              })
+                duration: 600,
+                message: "变更失败,请联系管理员",
+                type: "error"
+              });
               //this.$message.success("变更失败,请联系管理员");
               //this.$message.success("变更失败,请联系管理员");
               this.getSteelReport();
               this.getSteelReport();
               loading.close();
               loading.close();
@@ -911,10 +931,10 @@ export default {
           })
           })
           .catch(() => {
           .catch(() => {
             this.$message({
             this.$message({
-              duration:600,
-              message:"变更失败,请联系管理员",
-              type:"error"
-            })
+              duration: 600,
+              message: "变更失败,请联系管理员",
+              type: "error"
+            });
             //this.$message.success("变更失败,请联系管理员");
             //this.$message.success("变更失败,请联系管理员");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
@@ -922,10 +942,10 @@ export default {
       } else {
       } else {
         if (row.carrierIds == 0) {
         if (row.carrierIds == 0) {
           this.$message({
           this.$message({
-            duration:600,
-            message:"请先选择承运商!",
-            type:"error"
-          })
+            duration: 600,
+            message: "请先选择承运商!",
+            type: "error"
+          });
           //this.$message.error("请先选择承运商!");
           //this.$message.error("请先选择承运商!");
           return;
           return;
         }
         }
@@ -942,7 +962,7 @@ export default {
         arr.push(row);
         arr.push(row);
         const loading = this.$loading({
         const loading = this.$loading({
           lock: true,
           lock: true,
-          text: "正在变更车牌号",
+          text: "正在派车",
           spinner: "el-icon-loading",
           spinner: "el-icon-loading",
           background: "rgba(0, 0, 0, 0.7)"
           background: "rgba(0, 0, 0, 0.7)"
         });
         });
@@ -951,19 +971,30 @@ export default {
           .then(res => {
           .then(res => {
             if (res.data.code == "200") {
             if (res.data.code == "200") {
               this.$message({
               this.$message({
-                duration:600,
-                message:"派车成功!",
-                type:"success"
-              })
+                duration: 600,
+                message: "派车成功!",
+                type: "success"
+              });
+              this.axios
+                .post(
+                  "/api/v1/ams/matchingDriverTelRecently?capacityNumber=" +
+                    row.capacityNo
+                )
+                .then(res => {
+                  if (res.data.data != null) {
+                    this.steelMap.capacityTel = res.data.data;
+                    this.updateDriverTel(row);
+                  }
+                });
               //this.$message.success("派车成功!");
               //this.$message.success("派车成功!");
               this.getSteelReport();
               this.getSteelReport();
               loading.close();
               loading.close();
             } else {
             } else {
               this.$message({
               this.$message({
-                duration:600,
-                message:"派车失败,请联系管理员",
-                type:"error"
-              })
+                duration: 600,
+                message: "派车失败,请联系管理员",
+                type: "error"
+              });
               //this.$message.error("派车失败,请联系管理员");
               //this.$message.error("派车失败,请联系管理员");
               this.getSteelReport();
               this.getSteelReport();
               loading.close();
               loading.close();
@@ -971,10 +1002,10 @@ export default {
           })
           })
           .catch(() => {
           .catch(() => {
             this.$message({
             this.$message({
-              duration:600,
-              message:"派车失败,请联系管理员",
-              type:"error"
-            })
+              duration: 600,
+              message: "派车失败,请联系管理员",
+              type: "error"
+            });
             //this.$message.error("派车失败,请联系管理员");
             //this.$message.error("派车失败,请联系管理员");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
@@ -991,11 +1022,11 @@ export default {
       });
       });
       if (row.capacityTel == null || row.capacityTel == "") {
       if (row.capacityTel == null || row.capacityTel == "") {
         this.$message({
         this.$message({
-          duration:100,
-          message:'电话号码不能为空',
-          type:'error'
-        })
-          //.error("电话号码不能为空");
+          duration: 100,
+          message: "电话号码不能为空",
+          type: "error"
+        });
+        //.error("电话号码不能为空");
         return;
         return;
       }
       }
       this.axios
       this.axios
@@ -1006,19 +1037,19 @@ export default {
         .then(res => {
         .then(res => {
           if (res.data.code == "200") {
           if (res.data.code == "200") {
             this.$message({
             this.$message({
-              duration:600,
-              message:"修改成功",
-              type:"success"
-            })
+              duration: 600,
+              message: "修改成功",
+              type: "success"
+            });
             //this.$message.success("修改成功");
             //this.$message.success("修改成功");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
           } else {
           } else {
             this.$message({
             this.$message({
-              duration:600,
-              message:"修改失败",
-              type:"error"
-            })
+              duration: 600,
+              message: "修改失败",
+              type: "error"
+            });
             //this.$message.error("修改失败");
             //this.$message.error("修改失败");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
@@ -1026,10 +1057,10 @@ export default {
         })
         })
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
-            duration:600,
-            message:"修改失败",
-            type:"error"
-          })
+            duration: 600,
+            message: "修改失败",
+            type: "error"
+          });
           //this.$message.error("修改失败");
           //this.$message.error("修改失败");
           this.getSteelReport();
           this.getSteelReport();
           loading.close();
           loading.close();
@@ -1045,11 +1076,11 @@ export default {
       });
       });
       if (row.consigneeTel == null || row.consigneeTel == "") {
       if (row.consigneeTel == null || row.consigneeTel == "") {
         this.$message({
         this.$message({
-          duration:600,
-          message:'电话号码不能为空',
-          type:"error"
-        })
-          //.error("电话号码不能为空");
+          duration: 600,
+          message: "电话号码不能为空",
+          type: "error"
+        });
+        //.error("电话号码不能为空");
         this.getSteelReport();
         this.getSteelReport();
         loading.close();
         loading.close();
         return;
         return;
@@ -1063,19 +1094,19 @@ export default {
         .then(res => {
         .then(res => {
           if (res.data.code == "200") {
           if (res.data.code == "200") {
             this.$message({
             this.$message({
-              duration:600,
-              message:"修改成功",
-              type:"success"
-            })
+              duration: 600,
+              message: "修改成功",
+              type: "success"
+            });
             //this.$message.success("修改成功");
             //this.$message.success("修改成功");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
           } else {
           } else {
             this.$message({
             this.$message({
-              duration:600,
-              message:"修改失败",
-              type:"error"
-            })
+              duration: 600,
+              message: "修改失败",
+              type: "error"
+            });
             //this.$message.error("修改失败");
             //this.$message.error("修改失败");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
@@ -1083,10 +1114,10 @@ export default {
         })
         })
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
-            duration:600,
-            message:"修改失败",
-            type:"error"
-          })
+            duration: 600,
+            message: "修改失败",
+            type: "error"
+          });
           //this.$message.error("修改失败");
           //this.$message.error("修改失败");
           this.getSteelReport();
           this.getSteelReport();
           loading.close();
           loading.close();
@@ -1114,19 +1145,19 @@ export default {
             .then(res => {
             .then(res => {
               if (res.data.code == "200") {
               if (res.data.code == "200") {
                 this.$message({
                 this.$message({
-                  duration:600,
-                  message:"关闭车辆成功",
-                  type:"errsuccessor"
-                })
+                  duration: 600,
+                  message: "关闭车辆成功",
+                  type: "errsuccessor"
+                });
                 //this.$message.success("关闭车辆成功");
                 //this.$message.success("关闭车辆成功");
                 this.getSteelReport();
                 this.getSteelReport();
                 loading.close();
                 loading.close();
               } else {
               } else {
                 this.$message({
                 this.$message({
-                  duration:600,
-                  message:"关闭车辆失败",
-                  type:"error"
-                })
+                  duration: 600,
+                  message: "关闭车辆失败",
+                  type: "error"
+                });
                 //this.$message.error("关闭车辆失败");
                 //this.$message.error("关闭车辆失败");
                 this.getSteelReport();
                 this.getSteelReport();
                 loading.close();
                 loading.close();
@@ -1134,10 +1165,10 @@ export default {
             })
             })
             .catch(() => {
             .catch(() => {
               this.$message({
               this.$message({
-                duration:600,
-                message:"关闭车辆失败",
-                type:"error"
-              })
+                duration: 600,
+                message: "关闭车辆失败",
+                type: "error"
+              });
               //this.$message.error("关闭车辆失败");
               //this.$message.error("关闭车辆失败");
               this.getSteelReport();
               this.getSteelReport();
               loading.close();
               loading.close();
@@ -1145,10 +1176,10 @@ export default {
         })
         })
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
-            duration:600,
-            message:"取消关闭",
-            type:"info"
-          })
+            duration: 600,
+            message: "取消关闭",
+            type: "info"
+          });
           //this.$message.info("取消关闭");
           //this.$message.info("取消关闭");
         });
         });
     },
     },
@@ -1156,10 +1187,10 @@ export default {
     updateTruckCarrier(row) {
     updateTruckCarrier(row) {
       if (row.newCarrierId == null) {
       if (row.newCarrierId == null) {
         this.$message({
         this.$message({
-          duration:600,
-          message:"注册承运商或者选中弹出层之后再提交!",
-          type:"warning"
-        })
+          duration: 600,
+          message: "注册承运商或者选中弹出层之后再提交!",
+          type: "warning"
+        });
         //this.$message.warning("请注册承运商或者选中弹出层之后再提交!");
         //this.$message.warning("请注册承运商或者选中弹出层之后再提交!");
         this.getSteelReport();
         this.getSteelReport();
         return;
         return;
@@ -1176,19 +1207,19 @@ export default {
           .then(res => {
           .then(res => {
             if (res.data.code == "200") {
             if (res.data.code == "200") {
               this.$message({
               this.$message({
-                duration:600,
-                message:"修改承运商授权成功!",
-                type:"success"
-              })
+                duration: 600,
+                message: "修改承运商授权成功!",
+                type: "success"
+              });
               //this.$message.success("修改承运商授权成功");
               //this.$message.success("修改承运商授权成功");
               this.getSteelReport();
               this.getSteelReport();
               loading.close();
               loading.close();
             } else {
             } else {
               this.$message({
               this.$message({
-                duration:600,
-                message:"修改失败,请联系管理员!",
-                type:"error"
-              })
+                duration: 600,
+                message: "修改失败,请联系管理员!",
+                type: "error"
+              });
               //this.$message.error("修改失败,请联系管理员!");
               //this.$message.error("修改失败,请联系管理员!");
               this.getSteelReport();
               this.getSteelReport();
               loading.close();
               loading.close();
@@ -1196,10 +1227,10 @@ export default {
           })
           })
           .catch(() => {
           .catch(() => {
             this.$message({
             this.$message({
-              duration:600,
-              message:"修改失败,请联系管理员!",
-              type:"error"
-            })
+              duration: 600,
+              message: "修改失败,请联系管理员!",
+              type: "error"
+            });
             //this.$message.error("修改失败,请联系管理员!");
             //this.$message.error("修改失败,请联系管理员!");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
@@ -1222,7 +1253,7 @@ export default {
                 duration: 1000,
                 duration: 1000,
                 message: "授权承运商成功",
                 message: "授权承运商成功",
                 type: "success"
                 type: "success"
-              })
+              });
               //this.$message.success("授权承运商成功");
               //this.$message.success("授权承运商成功");
               if (res.data.code == "0") {
               if (res.data.code == "0") {
                 this.$message.success("授权承运商成功");
                 this.$message.success("授权承运商成功");
@@ -1233,7 +1264,7 @@ export default {
                   duration: 1000,
                   duration: 1000,
                   message: "授权失败,请联系管理员",
                   message: "授权失败,请联系管理员",
                   type: "error"
                   type: "error"
-                })
+                });
                 //this.$message.error("授权失败,请联系管理员");
                 //this.$message.error("授权失败,请联系管理员");
                 this.getSteelReport();
                 this.getSteelReport();
                 loading.close();
                 loading.close();
@@ -1242,10 +1273,10 @@ export default {
           })
           })
           .catch(() => {
           .catch(() => {
             this.$message({
             this.$message({
-              duration:1000,
-              message:"授权失败,请联系管理员",
-              type:"error"
-            })
+              duration: 1000,
+              message: "授权失败,请联系管理员",
+              type: "error"
+            });
             //this.$message.error("授权失败,请联系管理员");
             //this.$message.error("授权失败,请联系管理员");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
@@ -1358,20 +1389,20 @@ export default {
         .then(res => {
         .then(res => {
           if (res.data.code == "200") {
           if (res.data.code == "200") {
             this.$message({
             this.$message({
-              duration:1000,
-              message:"修改收货地址成功!",
-              type:"success"
-            })
+              duration: 1000,
+              message: "修改收货地址成功!",
+              type: "success"
+            });
             //this.$message.success("修改收货地址成功!");
             //this.$message.success("修改收货地址成功!");
             this.getSteelReport();
             this.getSteelReport();
             this.drawer = false;
             this.drawer = false;
             loading.close();
             loading.close();
           } else {
           } else {
             this.$message({
             this.$message({
-              duration:1000,
-              message:"修改失败,请联系管理员!",
-              type:"error"
-            })
+              duration: 1000,
+              message: "修改失败,请联系管理员!",
+              type: "error"
+            });
             //this.$message.error("修改失败,请联系管理员!");
             //this.$message.error("修改失败,请联系管理员!");
             this.getSteelReport();
             this.getSteelReport();
             this.drawer = false;
             this.drawer = false;
@@ -1380,10 +1411,10 @@ export default {
         })
         })
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
-            duration:1000,
-            message:"修改失败,请联系管理员!",
-            type:"error"
-          })
+            duration: 1000,
+            message: "修改失败,请联系管理员!",
+            type: "error"
+          });
           //this.$message.error("修改失败,请联系管理员!");
           //this.$message.error("修改失败,请联系管理员!");
           this.getSteelReport();
           this.getSteelReport();
           this.drawer = false;
           this.drawer = false;
@@ -1452,19 +1483,19 @@ export default {
         .then(res => {
         .then(res => {
           if (res.data.code == "200") {
           if (res.data.code == "200") {
             this.$message({
             this.$message({
-              duration:1000,
-              message:"修改物资数量成功",
-              type:"success"
-            })
+              duration: 1000,
+              message: "修改物资数量成功",
+              type: "success"
+            });
             //this.$message.success("修改物资数量成功");
             //this.$message.success("修改物资数量成功");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
           } else {
           } else {
             this.$message({
             this.$message({
-              duration:1000,
-              message:"修改物资数量失败,请联系管理员",
-              type:"error"
-            })
+              duration: 1000,
+              message: "修改物资数量失败,请联系管理员",
+              type: "error"
+            });
             //this.$message.error("修改物资数量失败,请联系管理员");
             //this.$message.error("修改物资数量失败,请联系管理员");
             this.getSteelReport();
             this.getSteelReport();
             loading.close();
             loading.close();
@@ -1472,29 +1503,27 @@ export default {
         })
         })
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
-            duration:1000,
-            message:"修改物资数量失败,请联系管理员",
-            type:"error"
-          })
+            duration: 1000,
+            message: "修改物资数量失败,请联系管理员",
+            type: "error"
+          });
           //this.$message.error("修改物资数量失败,请联系管理员");
           //this.$message.error("修改物资数量失败,请联系管理员");
           this.getSteelReport();
           this.getSteelReport();
           loading.close();
           loading.close();
         });
         });
     },
     },
     //继续装
     //继续装
-    continue1(row){
-      let map={
-        orderId:row.orderId
-      }
-      this.axios
-        .post("/api/v1/oms/updateContinueStaus", map)
-        .then((res)=>{
-          if (res.data.code=="200"){
-            this.$message.success("修改成功")
-          }else {
-            this.$message.error("修改失败")
-          }
-        })
+    continue1(row) {
+      let map = {
+        orderId: row.orderId
+      };
+      this.axios.post("/api/v1/oms/updateContinueStaus", map).then(res => {
+        if (res.data.code == "200") {
+          this.$message.success("修改成功");
+        } else {
+          this.$message.error("修改失败");
+        }
+      });
       this.getSteelReport();
       this.getSteelReport();
     },
     },
     //关闭单条分录
     //关闭单条分录
@@ -1527,19 +1556,19 @@ export default {
               .then(res => {
               .then(res => {
                 if (res.data.code == "200") {
                 if (res.data.code == "200") {
                   this.$message({
                   this.$message({
-                    duration:1000,
-                    message:"关闭成功",
-                    type:"success"
-                  })
+                    duration: 1000,
+                    message: "关闭成功",
+                    type: "success"
+                  });
                   //this.$message.success("关闭成功");
                   //this.$message.success("关闭成功");
                   this.getSteelReport();
                   this.getSteelReport();
                   loading.close();
                   loading.close();
                 } else {
                 } else {
                   this.$message({
                   this.$message({
-                    duration:1000,
-                    message:"关闭失败,请联系管理员",
-                    type:"error"
-                  })
+                    duration: 1000,
+                    message: "关闭失败,请联系管理员",
+                    type: "error"
+                  });
                   //this.$message.error("关闭失败,请联系管理员");
                   //this.$message.error("关闭失败,请联系管理员");
                   this.getSteelReport();
                   this.getSteelReport();
                   loading.close();
                   loading.close();
@@ -1547,10 +1576,10 @@ export default {
               })
               })
               .catch(() => {
               .catch(() => {
                 this.$message({
                 this.$message({
-                  duration:1000,
-                  message:"关闭失败,请联系管理员",
-                  type:"error"
-                })
+                  duration: 1000,
+                  message: "关闭失败,请联系管理员",
+                  type: "error"
+                });
                 //this.$message.error("关闭失败,请联系管理员");
                 //this.$message.error("关闭失败,请联系管理员");
                 this.getSteelReport();
                 this.getSteelReport();
                 loading.close();
                 loading.close();
@@ -1559,10 +1588,10 @@ export default {
         })
         })
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
-            duration:1000,
-            message:"取消输入",
-            type:"info"
-          })
+            duration: 1000,
+            message: "取消输入",
+            type: "info"
+          });
           //this.$message.info("取消输入");
           //this.$message.info("取消输入");
         });
         });
     },
     },

File diff suppressed because it is too large
+ 386 - 357
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue


Some files were not shown because too many files changed in this diff