瀏覽代碼

【修改】bug

howie 2 年之前
父節點
當前提交
7b0ff547cd

+ 2 - 1
public/index.html

@@ -5,9 +5,10 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
     <link rel="icon" href="<%= BASE_URL %>favicon.png">
+    <link rel="stylesheet" type="text/css" media="print" href="https://cdn.jsdelivr.net/npm/vue-plugin-hiprint@latest/dist/print-lock.css">
     <title><%= webpackConfig.name %></title>
     <style>
-      
+
     </style>
   </head>
   <body>

+ 4 - 1
src/views/supply/implement/implement_list.vue

@@ -261,8 +261,11 @@ let that
 export default {
   filters: {
     statusFilter(val) {
-      let obj = that.statusList.find(o => o.value == val);
+      if (that.statusList.length) {
+        let obj = that.statusList.find(o => o.value == val);
       return obj ? obj.label : ''
+      }
+      return ''
     }
   },
   data() {

+ 4 - 1
src/views/supply/implement/implement_total_list.vue

@@ -260,8 +260,11 @@ let that
 export default {
   filters: {
     statusFilter(val) {
-      let obj = that.statusList.find(o => o.value == val);
+      if (that.statusList.length) {
+        let obj = that.statusList.find(o => o.value == val);
       return obj ? obj.label : ''
+      }
+      return ''
     }
   },
   data() {

+ 11 - 4
src/views/supply/implement/nsales_list.vue

@@ -507,12 +507,19 @@ export default {
   },
   filters: {
     statusFilter(val) {
-      let obj = that.statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
+      if (that.statusList.length) {
+        let obj = that.statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+      }
+      return ''
     },
     orderTypeFilter(val) {
-      let obj = that.orderTypeList.find((o) => o.value == val);
-      return obj ? obj.label : "";
+
+      if (that.orderTypeList.length) {
+        let obj = that.orderTypeList.find(o => o.value == val);
+      return obj ? obj.label : ''
+      }
+      return ''
     },
     billStatusFilter(val) {
       const MAP = {

+ 3 - 1
src/views/supply/price/difference_modify_list.vue

@@ -828,7 +828,9 @@ export default {
     },
     // 下载经销商模板
     hanleDownloadFiles() {
-      downloadFiles('product-upd-price/download')
+      downloadFiles('product-upd-price/download',{
+        billType:'DIFF'
+      })
     },
     tableRowClassName({row, rowIndex}) {
       // || row.examineStatus=='FAIL'

+ 11 - 4
src/views/supply/sales/sales_list.vue

@@ -550,12 +550,19 @@ export default {
   },
   filters: {
     statusFilter(val) {
-      let obj = that.statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
+      if (that.statusList.length) {
+        let obj = that.statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+      }
+      return ''
     },
     orderTypeFilter(val) {
-      let obj = that.orderTypeList.find((o) => o.value == val);
-      return obj ? obj.label : "";
+      if (that.orderTypeList.length) {
+        let obj = that.orderTypeList.find(o => o.value == val);
+      return obj ? obj.label : ''
+      }
+      return ''
+
     },
     billStatusFilter(val) {
       const MAP = {

+ 21 - 0
vue.config.js

@@ -1,6 +1,7 @@
 'use strict'
 const path = require('path')
 const defaultSettings = require('./src/settings.js')
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
 let webpack = require('webpack')
 function resolve(dir) {
   return path.join(__dirname, dir)
@@ -57,12 +58,32 @@ module.exports = {
     plugins: [
       new webpack.ProvidePlugin({
       }),
+
     ],
     resolve: {
       alias: {
         '@': resolve('src')
       },
       extensions: ['*', '.js', '.vue', '.json']
+    },
+    optimization:{
+      minimizer:[
+        new UglifyJsPlugin({
+            uglifyOptions:{
+              output:{
+                commons:false
+              },
+              compress:{
+               // warnings:false
+               drop_debugger:true,
+               drop_console:true,
+               pure_funcs:['console.log']
+              }
+            },
+            sourceMap:false,
+            parallel:true
+        })
+      ]
     }
   },
   chainWebpack(config) {