Browse Source

Merge branch 'master' of 121.41.102.225:Nidong/jiufang into hw

mushencc 3 years ago
parent
commit
c1c6857b6e

+ 16 - 62
package-lock.json

@@ -2485,7 +2485,6 @@
             "version": "3.1.1",
             "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz",
             "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "normalize-path": "^3.0.0",
@@ -2674,7 +2673,7 @@
             "version": "1.0.3",
             "resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz",
             "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=",
-            "dev": true
+            "devOptional": true
         },
         "node_modules/async-foreach": {
             "version": "0.1.3",
@@ -2980,7 +2979,6 @@
             "version": "2.1.0",
             "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.1.0.tgz",
             "integrity": "sha1-MPpAyef+B9vIlWeM0ocCTeokHdk=",
-            "dev": true,
             "optional": true,
             "engines": {
                 "node": ">=8"
@@ -2990,7 +2988,6 @@
             "version": "1.5.0",
             "resolved": "https://registry.npm.taobao.org/bindings/download/bindings-1.5.0.tgz",
             "integrity": "sha1-EDU8npRTNLwFEabZCzj7x8nFBN8=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "file-uri-to-path": "1.0.0"
@@ -3580,7 +3577,6 @@
             "version": "3.4.1",
             "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.1.tgz",
             "integrity": "sha1-6QW97PEOqgoLHbDGZEgcxMvCK6E=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "anymatch": "~3.1.1",
@@ -3602,7 +3598,6 @@
             "version": "3.0.2",
             "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz",
             "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "fill-range": "^7.0.1"
@@ -3615,7 +3610,6 @@
             "version": "7.0.1",
             "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz",
             "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "to-regex-range": "^5.0.1"
@@ -3628,7 +3622,6 @@
             "version": "7.0.0",
             "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz",
             "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=",
-            "dev": true,
             "optional": true,
             "engines": {
                 "node": ">=0.12.0"
@@ -3638,7 +3631,6 @@
             "version": "5.0.1",
             "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz",
             "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "is-number": "^7.0.0"
@@ -6317,7 +6309,6 @@
             "version": "1.0.0",
             "resolved": "https://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz",
             "integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=",
-            "dev": true,
             "optional": true
         },
         "node_modules/filesize": {
@@ -6575,7 +6566,6 @@
             "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz",
             "integrity": "sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4=",
             "deprecated": "\"Please update to latest v2.3 or v2.2\"",
-            "dev": true,
             "hasInstallScript": true,
             "optional": true,
             "os": [
@@ -6753,7 +6743,7 @@
             "version": "5.1.1",
             "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz",
             "integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=",
-            "dev": true,
+            "devOptional": true,
             "dependencies": {
                 "is-glob": "^4.0.1"
             },
@@ -7692,7 +7682,6 @@
             "version": "2.1.0",
             "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz",
             "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "binary-extensions": "^2.0.0"
@@ -7826,7 +7815,7 @@
             "version": "2.1.1",
             "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz",
             "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
-            "dev": true,
+            "devOptional": true,
             "engines": {
                 "node": ">=0.10.0"
             }
@@ -7852,7 +7841,7 @@
             "version": "4.0.1",
             "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz",
             "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=",
-            "dev": true,
+            "devOptional": true,
             "dependencies": {
                 "is-extglob": "^2.1.1"
             },
@@ -9302,7 +9291,7 @@
             "version": "3.0.0",
             "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz",
             "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=",
-            "dev": true,
+            "devOptional": true,
             "engines": {
                 "node": ">=0.10.0"
             }
@@ -9876,7 +9865,7 @@
             "version": "1.0.2",
             "resolved": "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz",
             "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
-            "dev": true
+            "devOptional": true
         },
         "node_modules/path-exists": {
             "version": "3.0.0",
@@ -9965,7 +9954,6 @@
             "version": "2.2.2",
             "resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.2.tgz",
             "integrity": "sha1-IfMz6ba46v8CRo9RRupAbTRfTa0=",
-            "dev": true,
             "optional": true,
             "engines": {
                 "node": ">=8.6"
@@ -11062,7 +11050,6 @@
             "version": "3.4.0",
             "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.4.0.tgz",
             "integrity": "sha1-n9zN+ekVWAVEkiGsZF6DA6tbmto=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "picomatch": "^2.2.1"
@@ -11231,7 +11218,7 @@
             "version": "1.1.0",
             "resolved": "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz",
             "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
-            "dev": true
+            "devOptional": true
         },
         "node_modules/renderkid": {
             "version": "2.0.3",
@@ -13326,7 +13313,7 @@
             "version": "1.2.0",
             "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz",
             "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=",
-            "dev": true,
+            "devOptional": true,
             "engines": {
                 "node": ">=4",
                 "yarn": "*"
@@ -13820,7 +13807,6 @@
             "version": "2.0.0",
             "resolved": "https://registry.npm.taobao.org/watchpack-chokidar2/download/watchpack-chokidar2-2.0.0.tgz",
             "integrity": "sha1-mUihhmy71suCTeoTp+1pH2yN3/A=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "chokidar": "^2.1.8"
@@ -13833,7 +13819,6 @@
             "version": "2.0.0",
             "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz",
             "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "micromatch": "^3.1.4",
@@ -13844,7 +13829,6 @@
             "version": "2.1.1",
             "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz",
             "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "remove-trailing-separator": "^1.0.1"
@@ -13857,7 +13841,6 @@
             "version": "1.13.1",
             "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz",
             "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=",
-            "dev": true,
             "optional": true,
             "engines": {
                 "node": ">=0.10.0"
@@ -13868,7 +13851,6 @@
             "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz",
             "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=",
             "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "anymatch": "^2.0.0",
@@ -13892,7 +13874,6 @@
             "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz",
             "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=",
             "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.",
-            "dev": true,
             "hasInstallScript": true,
             "optional": true,
             "os": [
@@ -13910,7 +13891,6 @@
             "version": "3.1.0",
             "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz",
             "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "is-glob": "^3.1.0",
@@ -13921,7 +13901,6 @@
             "version": "3.1.0",
             "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz",
             "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "is-extglob": "^2.1.0"
@@ -13934,7 +13913,6 @@
             "version": "1.0.1",
             "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz",
             "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "binary-extensions": "^1.0.0"
@@ -13947,7 +13925,6 @@
             "version": "2.2.1",
             "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz",
             "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=",
-            "dev": true,
             "optional": true,
             "dependencies": {
                 "graceful-fs": "^4.1.11",
@@ -16911,7 +16888,6 @@
             "version": "3.1.1",
             "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz",
             "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=",
-            "dev": true,
             "optional": true,
             "requires": {
                 "normalize-path": "^3.0.0",
@@ -17071,7 +17047,7 @@
             "version": "1.0.3",
             "resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz",
             "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=",
-            "dev": true
+            "devOptional": true
         },
         "async-foreach": {
             "version": "0.1.3",
@@ -17327,14 +17303,12 @@
             "version": "2.1.0",
             "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.1.0.tgz",
             "integrity": "sha1-MPpAyef+B9vIlWeM0ocCTeokHdk=",
-            "dev": true,
             "optional": true
         },
         "bindings": {
             "version": "1.5.0",
             "resolved": "https://registry.npm.taobao.org/bindings/download/bindings-1.5.0.tgz",
             "integrity": "sha1-EDU8npRTNLwFEabZCzj7x8nFBN8=",
-            "dev": true,
             "optional": true,
             "requires": {
                 "file-uri-to-path": "1.0.0"
@@ -17854,7 +17828,6 @@
             "version": "3.4.1",
             "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.1.tgz",
             "integrity": "sha1-6QW97PEOqgoLHbDGZEgcxMvCK6E=",
-            "dev": true,
             "optional": true,
             "requires": {
                 "anymatch": "~3.1.1",
@@ -17871,7 +17844,6 @@
                     "version": "3.0.2",
                     "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz",
                     "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "fill-range": "^7.0.1"
@@ -17881,7 +17853,6 @@
                     "version": "7.0.1",
                     "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz",
                     "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "to-regex-range": "^5.0.1"
@@ -17891,14 +17862,12 @@
                     "version": "7.0.0",
                     "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz",
                     "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=",
-                    "dev": true,
                     "optional": true
                 },
                 "to-regex-range": {
                     "version": "5.0.1",
                     "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz",
                     "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "is-number": "^7.0.0"
@@ -20104,7 +20073,6 @@
             "version": "1.0.0",
             "resolved": "https://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz",
             "integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=",
-            "dev": true,
             "optional": true
         },
         "filesize": {
@@ -20316,7 +20284,6 @@
             "version": "2.1.3",
             "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz",
             "integrity": "sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4=",
-            "dev": true,
             "optional": true
         },
         "fstream": {
@@ -20453,7 +20420,7 @@
             "version": "5.1.1",
             "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz",
             "integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=",
-            "dev": true,
+            "devOptional": true,
             "requires": {
                 "is-glob": "^4.0.1"
             }
@@ -21216,7 +21183,6 @@
             "version": "2.1.0",
             "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz",
             "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=",
-            "dev": true,
             "optional": true,
             "requires": {
                 "binary-extensions": "^2.0.0"
@@ -21318,7 +21284,7 @@
             "version": "2.1.1",
             "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz",
             "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
-            "dev": true
+            "devOptional": true
         },
         "is-finite": {
             "version": "1.1.0",
@@ -21335,7 +21301,7 @@
             "version": "4.0.1",
             "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz",
             "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=",
-            "dev": true,
+            "devOptional": true,
             "requires": {
                 "is-extglob": "^2.1.1"
             }
@@ -22534,7 +22500,7 @@
             "version": "3.0.0",
             "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz",
             "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=",
-            "dev": true
+            "devOptional": true
         },
         "normalize-range": {
             "version": "0.1.2",
@@ -22994,7 +22960,7 @@
             "version": "1.0.2",
             "resolved": "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz",
             "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
-            "dev": true
+            "devOptional": true
         },
         "path-exists": {
             "version": "3.0.0",
@@ -23067,7 +23033,6 @@
             "version": "2.2.2",
             "resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.2.tgz",
             "integrity": "sha1-IfMz6ba46v8CRo9RRupAbTRfTa0=",
-            "dev": true,
             "optional": true
         },
         "pify": {
@@ -24006,7 +23971,6 @@
             "version": "3.4.0",
             "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.4.0.tgz",
             "integrity": "sha1-n9zN+ekVWAVEkiGsZF6DA6tbmto=",
-            "dev": true,
             "optional": true,
             "requires": {
                 "picomatch": "^2.2.1"
@@ -24140,7 +24104,7 @@
             "version": "1.1.0",
             "resolved": "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz",
             "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
-            "dev": true
+            "devOptional": true
         },
         "renderkid": {
             "version": "2.0.3",
@@ -25877,7 +25841,7 @@
             "version": "1.2.0",
             "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz",
             "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=",
-            "dev": true
+            "devOptional": true
         },
         "upper-case": {
             "version": "1.1.3",
@@ -26281,7 +26245,6 @@
             "version": "2.0.0",
             "resolved": "https://registry.npm.taobao.org/watchpack-chokidar2/download/watchpack-chokidar2-2.0.0.tgz",
             "integrity": "sha1-mUihhmy71suCTeoTp+1pH2yN3/A=",
-            "dev": true,
             "optional": true,
             "requires": {
                 "chokidar": "^2.1.8"
@@ -26291,7 +26254,6 @@
                     "version": "2.0.0",
                     "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz",
                     "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "micromatch": "^3.1.4",
@@ -26302,7 +26264,6 @@
                             "version": "2.1.1",
                             "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz",
                             "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
-                            "dev": true,
                             "optional": true,
                             "requires": {
                                 "remove-trailing-separator": "^1.0.1"
@@ -26314,14 +26275,12 @@
                     "version": "1.13.1",
                     "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz",
                     "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=",
-                    "dev": true,
                     "optional": true
                 },
                 "chokidar": {
                     "version": "2.1.8",
                     "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz",
                     "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "anymatch": "^2.0.0",
@@ -26342,7 +26301,6 @@
                     "version": "1.2.13",
                     "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz",
                     "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "bindings": "^1.5.0",
@@ -26353,7 +26311,6 @@
                     "version": "3.1.0",
                     "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz",
                     "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "is-glob": "^3.1.0",
@@ -26364,7 +26321,6 @@
                             "version": "3.1.0",
                             "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz",
                             "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
-                            "dev": true,
                             "optional": true,
                             "requires": {
                                 "is-extglob": "^2.1.0"
@@ -26376,7 +26332,6 @@
                     "version": "1.0.1",
                     "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz",
                     "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "binary-extensions": "^1.0.0"
@@ -26386,7 +26341,6 @@
                     "version": "2.2.1",
                     "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz",
                     "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=",
-                    "dev": true,
                     "optional": true,
                     "requires": {
                         "graceful-fs": "^4.1.11",

+ 10 - 1
src/routerMap/index.js

@@ -278,6 +278,7 @@ const routerMap = [
     name: "InboundForm", //生产订单列表-->入库表
     meta: {
       index: 4,
+      keepAlive:true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/InboundForm/index"], resolve),
@@ -296,6 +297,7 @@ const routerMap = [
     name: "DeliveryList", //生产订单列表-->出库表
     meta: {
       index: 4,
+      keepAlive:true
     },
     component: (resolve) =>
       require([
@@ -318,6 +320,7 @@ const routerMap = [
     name: "checkUnusual", //生产订单列表-->出库表-->查看异常
     meta: {
       index: 4,
+      keepAlive:true
     },
     component: (resolve) =>
       require([
@@ -351,6 +354,7 @@ const routerMap = [
     name: "DispatchlistList", //生产订单列表-->派工单
     meta: {
       index: 4,
+      keepAlive:true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/Dispatchlist/list"], resolve),
@@ -360,6 +364,7 @@ const routerMap = [
     name: "workOverList", //生产订单列表-->返工单
     meta: {
       index: 4,
+      keepAlive:true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/workOver/list"], resolve),
@@ -369,6 +374,7 @@ const routerMap = [
     name: "workOverListDetails", //生产订单列表-->返工单-->详情
     meta: {
       index: 4,
+      keepAlive:true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/workOver/details"], resolve),
@@ -405,6 +411,7 @@ const routerMap = [
     name: "ProductionPlanlistList", //生产订单列表-->生产计划列表
     meta: {
       index: 4,
+      keepAlive:true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/ProductionPlanlist/list"], resolve),
@@ -434,6 +441,7 @@ const routerMap = [
     name: "bstProductionOrderList", //生产订单列表-->生产订单列表
     meta: {
       index: 4,
+      keepAlive:true,
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/ProductionsOrder/BST_list"], resolve),
@@ -590,6 +598,7 @@ const routerMap = [
     name: "MountOrder", //安装订单
     meta: {
       index: 1,
+      keepAlive:true
     },
     component: (resolve) => require(["@/views/MountOrder/index"], resolve),
   },
@@ -2064,7 +2073,7 @@ const routerMap = [
     name: "MatchChangeList", //业务管理-->生产制造-->匹配变更
     meta: {
       index: 3,
-      // keepAlive: true,
+      keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/MatchChange/list"], resolve),

+ 17 - 15
src/views/BasicSettings/PartSettings/list.vue

@@ -5,7 +5,7 @@
         >新增方案</Button
       >
     </Toptitle>
-    <Row style="padding:10px 0">
+    <Row style="padding: 10px 0">
       <Col span="6">
         <span>工艺属性:</span>
         <span>
@@ -75,7 +75,7 @@
       </Col>
     </Row>
     <div>
-      <div style="height:600px">
+      <div style="height: 600px">
         <Table
           :columns="tableColumns"
           border
@@ -84,10 +84,10 @@
         >
           <template slot="setSlot" slot-scope="{ row }">
             <div>
-              <a style="margin:0 5px;" @click="handleSet(row, 1)">复制</a>
-              <a style="margin:0 5px;" @click="handleSet(row, 2)">编辑</a>
-              <a style="margin:0 5px;" @click="handleSet(row, 3)">查看</a>
-              <a style="margin:0 5px;" @click="handleSet(row, 4)">删除</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 1)">复制</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 2)">编辑</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 3)">查看</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 4)">删除</a>
             </div>
           </template>
         </Table>
@@ -169,16 +169,18 @@ export default {
         });
     },
     handleProcessSelected(p_id) {
-      p_id &&
-        this.axios.post("/api/process_sub_title", { p_id }).then((res) => {
-          this.searchData.type_title= '';
-          res.data.forEach(element => {
-            if(element){
-              this.type_title_list.push(element);
-            }
+      this.type_title_list = [];
+      if (p_id.length > 0) {
+        p_id &&
+          this.axios.post("/api/process_sub_title", { p_id }).then((res) => {
+            this.searchData.type_title = "";
+            res.data.forEach((element) => {
+              if (element) {
+                this.type_title_list.push(element);
+              }
+            });
           });
-          
-        });
+      }
     },
     changeSize(e) {
       this.searchData.page_size = e;

+ 186 - 112
src/views/MatchChange/list.vue

@@ -1,125 +1,199 @@
 <template>
-    <div style="margin-top:10px">
-        <Toptitle title="匹配变更列表">
-        </Toptitle>
-        <div style="height:80%;overflow:auto">
-            <Form :label-width='100' style="display:flex;flex-wrap:wrap;margin:10px 0">
-                <FormItem label='项目编码:' style="width:250px">
-                  <Select size="small" v-model="searchData.order_no" clearable filterable multiple>
-                      <Option v-for="(item,index) in order_no_list" :key="index" :value="item" :label="item"/>
-                  </Select>
-                </FormItem>
-                <FormItem label='项目名称:' style="width:250px">
-                  <Select size="small" v-model="searchData.residential_name" clearable filterable multiple>
-                      <Option v-for="(item,index) in residential_name_list" :key="index" :value="item" :label="item">
-                      </Option>
-                  </Select>
-                </FormItem>
-                <FormItem label='项目简称:' style="width:250px">
-                   <Select size="small" v-model="searchData.abbreviation" clearable filterable multiple>
-                      <Option v-for="(item,index) in abbreviation_list" :key="index" :value="item" :label="item">
-                      </Option>
-                  </Select>
-                </FormItem>
-                <FormItem>
-                    <Button 
-                    type="primary"
-                    @click="getData(searchData)"
-                  size="small">搜索</Button>
-                </FormItem>
-            </Form>
-            <Table
-            :columns="tableColumns" max-height="550" :data="tableData" border
+  <div style="margin-top: 10px">
+    <Toptitle title="匹配变更列表"> </Toptitle>
+    <div style="height: 80%; overflow: auto">
+      <Form
+        :label-width="100"
+        style="display: flex; flex-wrap: wrap; margin: 10px 0"
+      >
+        <FormItem label="项目编码:" style="width: 250px">
+          <Select
+            size="small"
+            v-model="searchData.order_no"
+            clearable
+            filterable
+            multiple
+          >
+            <Option
+              v-for="(item, index) in order_no_list"
+              :key="index"
+              :value="item"
+              :label="item"
+            />
+          </Select>
+        </FormItem>
+        <FormItem label="项目名称:" style="width: 250px">
+          <Select
+            size="small"
+            v-model="searchData.residential_name"
+            clearable
+            filterable
+            multiple
+          >
+            <Option
+              v-for="(item, index) in residential_name_list"
+              :key="index"
+              :value="item"
+              :label="item"
             >
-           <template slot="set" slot-scope="{row}">
-              <a style="margin-right:10px" @click="goPage(row,1)">变更</a>
-              <a @click="goPage(row,2)">查看</a>
-           </template>
-            </Table>
-        </div>
-        <Page
-                :page-size-opts="[10, 20, 30, 40, 100, 1000]"
-                @on-page-size-change="changeSize"
-                @on-change="changePage"
-                :current="pageIndex"
-                show-total
-                :total="total"
-                show-sizer
-                :page-size="pageSize"
-                style="text-align: center; margin-top: 10px"
-              />
+            </Option>
+          </Select>
+        </FormItem>
+        <FormItem label="项目简称:" style="width: 250px">
+          <Select
+            size="small"
+            v-model="searchData.abbreviation"
+            clearable
+            filterable
+            multiple
+          >
+            <Option
+              v-for="(item, index) in abbreviation_list"
+              :key="index"
+              :value="item"
+              :label="item"
+            >
+            </Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Button type="primary" @click="getData(searchData)" size="small"
+            >搜索</Button
+          >
+        </FormItem>
+      </Form>
+      <Table :columns="tableColumns" max-height="550" :data="tableData" border>
+        <template slot="set" slot-scope="{ row }">
+          <a style="margin-right: 10px" @click="goPage(row, 1)">变更</a>
+          <a @click="goPage(row, 2)">查看</a>
+        </template>
+      </Table>
     </div>
+    <Page
+      :page-size-opts="[10, 20, 30, 40, 100, 1000]"
+      @on-page-size-change="changeSize"
+      @on-change="changePage"
+      :current="pageIndex"
+      show-total
+      :total="total"
+      show-sizer
+      :page-size="pageSize"
+      style="text-align: center; margin-top: 10px"
+    />
+  </div>
 </template>
 <script>
 export default {
-    data(){
-        return {
-            abbreviation_list:[],
-            residential_name_list:[],
-            order_no_list:[],
-            searchData:{
-               order_no:[],
-               residential_name:[],
-               abbreviation:[],
-            },
-            total:0,
-            pageSize:10,
-            pageIndex:1,
-            tableData:[],
-            tableColumns:[
-                {title:'项目编码',align:'center',key:'order_no',minWidth:90},
-                {title:'项目名称',align:'center',key:'residential_name',minWidth:90},
-                {title:'项目简称',align:'center',key:'abbreviation',minWidth:90},
-                {title:'制单日期',align:'center',key:'crt_time',minWidth:90,render:(h,params)=>{
-                    const {row} = params;
-                    return h('span',{},this.func.replaceDate(row.crt_time))
-                }},
-                {title:'操作',align:'center',slot:'set',minWidth:60}
-            ],
-        }
-    },
-    created(){
-    },
-    mounted(){
-          this.getData();
-    },
-    methods:{
-        goPage(row,type){
-            //1变更   2查看
-          switch(type){
-              case 1:
-                  this.$router.push({path:'/cms/MatchChange/change',query:{project_number:row.order_no,project_name:row.residential_name}})
-                  break;
-             case 2:
-                 this.$router.push({path:'/cms/MatchChange/check',query:{project_number:row.order_no,project_name:row.residential_name}})
-                 break
-          }
-        },
-        getData(row){
-              this.axios.post('/api/orders_produce_order_list',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
-                      this.tableData = res.data.data;
-                      this.total = res.data.total;
-                      this.abbreviation_list = res.data.abbreviation;
-                      this.order_no_list = res.data.order_no;
-                      this.residential_name_list = res.data.residential_name;
-                      console.log(this.abbreviation_list)
-              })
+  data() {
+    return {
+      abbreviation_list: [],
+      residential_name_list: [],
+      order_no_list: [],
+      searchData: {
+        order_no: [],
+        residential_name: [],
+        abbreviation: [],
+      },
+      total: 0,
+      pageSize: 10,
+      pageIndex: 1,
+      tableData: [],
+      tableColumns: [
+        { title: "项目编码", align: "center", key: "order_no", minWidth: 90 },
+        {
+          title: "项目名称",
+          align: "center",
+          key: "residential_name",
+          minWidth: 90,
         },
-        changeSize(e){
-       this.pageSize =e;
-       this.init();
+        {
+          title: "项目简称",
+          align: "center",
+          key: "abbreviation",
+          minWidth: 90,
         },
-        changePage(e){
-     this.pageIndex =e;
-     this.init();
+        {
+          title: "制单日期",
+          align: "center",
+          key: "crt_time",
+          minWidth: 90,
+          render: (h, params) => {
+            const { row } = params;
+            return h("span", {}, this.func.replaceDate(row.crt_time));
+          },
         },
-        init(){
-           this.getData(this.searchData);
-
-        }
+        { title: "操作", align: "center", slot: "set", minWidth: 60 },
+      ],
+    };
+  },
+  created() {},
+  mounted() {
+    this.getData();
+  },
+  beforeRouteLeave(to, from, next) {
+    if (
+      to.path == "/cms/MatchChange/change" ||
+      to.path == "/cms/MatchChange/check"
+    ) {
+      next();
+    } else {
+      from.meta.keepAlive = false;
+      next();
     }
-}
+  },
+  methods: {
+    goPage(row, type) {
+      //1变更   2查看
+      switch (type) {
+        case 1:
+          this.$router.push({
+            path: "/cms/MatchChange/change",
+            query: {
+              project_number: row.order_no,
+              project_name: row.residential_name,
+            },
+          });
+          break;
+        case 2:
+          this.$router.push({
+            path: "/cms/MatchChange/check",
+            query: {
+              project_number: row.order_no,
+              project_name: row.residential_name,
+            },
+          });
+          break;
+      }
+    },
+    getData(row) {
+      this.axios
+        .post("/api/orders_produce_order_list", {
+          ...row,
+          page_size: this.pageSize,
+          page_index: this.pageIndex,
+        })
+        .then((res) => {
+          this.tableData = res.data.data;
+          this.total = res.data.total;
+          this.abbreviation_list = res.data.abbreviation;
+          this.order_no_list = res.data.order_no;
+          this.residential_name_list = res.data.residential_name;
+          console.log(this.abbreviation_list);
+        });
+    },
+    changeSize(e) {
+      this.pageSize = e;
+      this.init();
+    },
+    changePage(e) {
+      this.pageIndex = e;
+      this.init();
+    },
+    init() {
+      this.getData(this.searchData);
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-
 </style>

+ 228 - 104
src/views/MountOrder/index.vue

@@ -1,35 +1,41 @@
 <template>
   <div>
-    <FullPage title='安装订单列表'
-              :list='set_list'
-              @init='init'
-              :loading='loading'
-              @searchData='init'
-              @changePage='changePage'
-              @changeSize='changeSize'
-              :tableColums='computedTable'
-              :tableData='tableData'
-              :pageIndex='pageIndex'
-              :total='total'>
+    <FullPage
+      title="安装订单列表"
+      :list="set_list"
+      @init="init"
+      :loading="loading"
+      @searchData="init"
+      @changePage="changePage"
+      @changeSize="changeSize"
+      :tableColums="computedTable"
+      :tableData="tableData"
+      :pageIndex="pageIndex"
+      :total="total"
+    >
       <!-- <div slot='titleButton'>
                 <Button v-if='persimissionData["批量确认"]||persimissionData.all' @click="setupTableHeader"  type="primary" ghost>批量确认</Button>
             </div> -->
-      <div slot='navButton'>
-        <Button v-if='persimissionData["表头设置"]||persimissionData.all'
-                @click="setupTableHeader"
-                type="primary"
-                ghost
-                icon='ios-cog'>表头设置</Button>
+      <div slot="navButton">
+        <Button
+          v-if="persimissionData['表头设置'] || persimissionData.all"
+          @click="setupTableHeader"
+          type="primary"
+          ghost
+          icon="ios-cog"
+          >表头设置</Button
+        >
       </div>
 
-      <template slot='set'
-                slot-scope='{row}'>
+      <template slot="set" slot-scope="{ row }">
         <div>
-          <a v-if='persimissionData["详情"]||persimissionData.all'
-             style="margin:0 5px"
-             @click="goPage(row)">详情</a>
-          <a style="margin:0 5px"
-             @click="goUnusualPage(row)">查看异常</a>
+          <a
+            v-if="persimissionData['详情'] || persimissionData.all"
+            style="margin: 0 5px"
+            @click="goPage(row)"
+            >详情</a
+          >
+          <a style="margin: 0 5px" @click="goUnusualPage(row)">查看异常</a>
         </div>
       </template>
     </FullPage>
@@ -37,31 +43,64 @@
 </template>
 
 <script>
-import { mapState } from 'vuex'
+import { mapState } from "vuex";
 export default {
-  data () {
+  data() {
     let _this = this;
     return {
-      title: '',
+      title: "",
       tableColums: [
-        { title: '订单编号', align: 'center', key: 'order_no', fixed: 'left', width: '200' },
         {
-          title: '订单类型', align: 'center', key: 'type', minWidth: 150,
-          render: (h, params) => h('span', {}, params.row.type == 1 ? '工装' : '家装')
+          title: "订单编号",
+          align: "center",
+          key: "order_no",
+          fixed: "left",
+          width: "200",
         },
-        { title: '客户', align: 'center', key: 'client_name', minWidth: 150 },
-        { title: '手机号', align: 'center', key: 'mobile', minWidth: 150 },
-        { title: '地址', align: 'center', key: 'address', minWidth: 150 },
-        { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 200 },
         {
-          title: '出库时间', align: 'center', key: 'predict_time', minWidth: 200,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.transport_start_time))
+          title: "订单类型",
+          align: "center",
+          key: "type",
+          minWidth: 150,
+          render: (h, params) =>
+            h("span", {}, params.row.type == 1 ? "工装" : "家装"),
         },
+        { title: "客户", align: "center", key: "client_name", minWidth: 150 },
+        { title: "手机号", align: "center", key: "mobile", minWidth: 150 },
+        { title: "地址", align: "center", key: "address", minWidth: 150 },
         {
-          title: '运输时间', align: 'center', key: 'crt_time', minWidth: 200,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.transport_end_time))
+          title: "项目名称",
+          align: "center",
+          key: "residential_name",
+          minWidth: 200,
+        },
+        {
+          title: "出库时间",
+          align: "center",
+          key: "predict_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h(
+              "span",
+              {},
+              this.func.replaceDate(params.row.transport_start_time)
+            ),
+        },
+        {
+          title: "运输时间",
+          align: "center",
+          key: "crt_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.transport_end_time)),
+        },
+        {
+          title: "操作",
+          align: "center",
+          slot: "set",
+          fixed: "right",
+          width: "150",
         },
-        { title: '操作', align: 'center', slot: 'set', fixed: 'right', width: '150' },
       ],
       tableData: [],
       pageIndex: 1,
@@ -69,114 +108,199 @@ export default {
       pageSize: 10,
       loading: false,
       tableheaders: [],
-      warningList: []
-    }
+      warningList: [],
+    };
   },
-  created () {
+  created() {
     // 获取紧急程度
-    this.axios.get('/api/warning_list').then(res => { this.warningList = res.data.data })
-  },
-  mounted () {
-
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
+    });
   },
+  mounted() {},
   watch: {
-    $route (to, from) {
-      this.type = to.query.type ? to.query.type : '';
-      this.getData(this.proxyObj)
-    }
+    $route(to, from) {
+      this.type = to.query.type ? to.query.type : "";
+      this.getData(this.proxyObj);
+    },
   },
   computed: {
-    ...mapState(['persimissionData']),
-    computedTable () {
+    ...mapState(["persimissionData"]),
+    computedTable() {
       if (this.tableheaders.length < 1) {
-        return this.tableColums
+        return this.tableColums;
       }
-      return this.func.computedHeader(this.tableheaders, this.tableColums)
+      return this.func.computedHeader(this.tableheaders, this.tableColums);
     },
-    set_list () {
+    set_list() {
       return [
-        { title: '订单编号', name: 'Input', serverName: 'order_no', placeholder: '请输入订单编号', value: '' },
         {
-          title: '订单类型', name: 'Select', placeholder: '请选择', serverName: 'type', value: '',
+          title: "订单编号",
+          name: "Input",
+          serverName: "order_no",
+          placeholder: "请输入订单编号",
+          value: "",
+        },
+        {
+          title: "订单类型",
+          name: "Select",
+          placeholder: "请选择",
+          serverName: "type",
+          value: "",
           option: [
-            { label: '工装', value: 1 },
-            { label: '家装', value: 0 },
-          ]
-        },
-        { title: '紧急程度', name: 'Select', serverName: 'warning_state', placeholder: '请选择', value: '', optionName: 'title', optionValue: 'id', option: this.warningList },
-        { title: '项目名称', name: 'Input', serverName: 'residential_name', placeholder: '项目名称', value: '' },
-        { title: '客户', name: 'Input', serverName: 'client_name', placeholder: '客户', value: '' },
-        { title: '手机号', name: 'Input', serverName: 'mobile', placeholder: '手机号', value: '' },
-        { title: '出库时间', name: 'Input', start_server: 'start_out_storage_time', end_server: 'end_out_storage_time', start_value: '', end_value: '', isDate: true, start_placeholder: '开始日期', end_placeholder: '结束日期' },
-        { title: '运输时间', name: 'Input', start_server: 'start_transport_time', end_server: 'end_transport_time', start_value: '', end_value: '', isDate: true, start_placeholder: '开始日期', end_placeholder: '结束日期' },
-        { title: '下单日期范围', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, start_placeholder: '开始日期', end_placeholder: '结束日期' },
-      ]
-    }
+            { label: "工装", value: 1 },
+            { label: "家装", value: 0 },
+          ],
+        },
+        {
+          title: "紧急程度",
+          name: "Select",
+          serverName: "warning_state",
+          placeholder: "请选择",
+          value: "",
+          optionName: "title",
+          optionValue: "id",
+          option: this.warningList,
+        },
+        {
+          title: "项目名称",
+          name: "Input",
+          serverName: "residential_name",
+          placeholder: "项目名称",
+          value: "",
+        },
+        {
+          title: "客户",
+          name: "Input",
+          serverName: "client_name",
+          placeholder: "客户",
+          value: "",
+        },
+        {
+          title: "手机号",
+          name: "Input",
+          serverName: "mobile",
+          placeholder: "手机号",
+          value: "",
+        },
+        {
+          title: "出库时间",
+          name: "Input",
+          start_server: "start_out_storage_time",
+          end_server: "end_out_storage_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
+        {
+          title: "运输时间",
+          name: "Input",
+          start_server: "start_transport_time",
+          end_server: "end_transport_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
+        {
+          title: "下单日期范围",
+          name: "Input",
+          start_server: "start_time",
+          end_server: "end_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
+      ];
+    },
   },
   methods: {
-    init (row) {
-      this.pageIndex = 1
+    init(row) {
+      this.pageIndex = 1;
       row.page_index = this.pageIndex;
       row.page_size = this.pageSize;
-      this.proxyObj = row
-      this.getData(row)
+      this.proxyObj = row;
+      this.getData(row);
     },
-    changePage (e) {
+    changePage(e) {
       this.pageIndex = e;
       this.proxyObj.page_index = this.pageIndex;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    changeSize (e) {
+    changeSize(e) {
       this.pageSize = e;
       this.proxyObj.page_size = this.pageSize;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    getData (row) {
+    getData(row) {
       this.loading = true;
-      this.axios('/api/orders_install_list', { params: row }).then(res => {
+      this.axios("/api/orders_install_list", { params: row }).then((res) => {
         this.loading = false;
         if (res.code == 200) {
           this.tableData = res.data.data;
           this.total = res.data.total;
-          this.tableheaders = res.data.tableSet || []
+          this.tableheaders = res.data.tableSet || [];
         }
-      })
+      });
     },
-    goPage (row) {
+    goPage(row) {
       this.$router.push({
-        path: '/cms/mountorder/details',
+        path: "/cms/mountorder/details",
         query: {
           order_no: row.order_no,
-          type: 3
-        }
-      })
+          type: 3,
+        },
+      });
     },
-    goUnusualPage (row) {
+    goUnusualPage(row) {
       this.$router.push({
-        path: '/cms/mountorder/unusual',
+        path: "/cms/mountorder/unusual",
         query: {
           order_no: row.order_no,
-          type: 3
-        }
-      })
+          type: 3,
+        },
+      });
     },
-    setupTableHeader () {
-      this.tableheaders.length < 1 ? this.tableheaders = this.tableColums.reduce((pre, cur) => pre.concat(cur.key), []) : ''
+    setupTableHeader() {
+      this.tableheaders.length < 1
+        ? (this.tableheaders = this.tableColums.reduce(
+            (pre, cur) => pre.concat(cur.key),
+            []
+          ))
+        : "";
       this.$setTableheader({
         list: this.tableColums,
         selects: this.tableheaders,
         then: (result) => {
-          this.tableheaders = result
-          this.axios.post('/api/update/table', { id: this.$route.query.id, result }).then(res => {
-            if (res.code == 200) {
-              this.$Message.success(res.msg)
-            }
-          })
-        }
-      })
+          this.tableheaders = result;
+          this.axios
+            .post("/api/update/table", { id: this.$route.query.id, result })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+              }
+            });
+        },
+      });
     },
-  }
-}
+  },
+  beforeRouteLeave(to, from, next) {
+    if (
+      to.path == "/cms/productionorderlist/productionsorder/bst_Decorationlist"
+    ) {
+      next()
+    } else {
+      from.meta.keepAlive = false;
+      next()
+    }
+    
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 95 - 94
src/views/ProductionOrderList/Deliverylist/Deliverylist.vue

@@ -12,7 +12,7 @@
       :tableData="tableData"
       :pageIndex="pageIndex"
       :total="total"
-      @selectTable='selectTable'
+      @selectTable="selectTable"
     >
       <div slot="titleButton">
         <!-- <Button
@@ -23,15 +23,12 @@
           icon="ios-cog"
           >表头设置</Button
         > -->
-        <Button  
-         type="primary"
-          ghost
-          @click="postData">
-         导出
-        </Button>
+        <Button type="primary" ghost @click="postData"> 导出 </Button>
       </div>
       <div slot="text-list">
-          <Checkbox @on-change='showTrueChange'>展示确认出库百分比不一致的数据</Checkbox>
+        <Checkbox @on-change="showTrueChange"
+          >展示确认出库百分比不一致的数据</Checkbox
+        >
       </div>
       <template slot="basicTypeSet" slot-scope="{ row }">
         <div>
@@ -45,8 +42,8 @@
         </div>
       </template>
       <template slot="set" slot-scope="{ row }">
-        <a class="map-margin" @click="goPage(row,1)">详情</a>
-         <a class="map-margin" @click="goPage(row,2)">查看异常</a>
+        <a class="map-margin" @click="goPage(row, 1)">详情</a>
+        <a class="map-margin" @click="goPage(row, 2)">查看异常</a>
         <a
           @click="confirmOutStock(row, 1)"
           v-if="row.state == 0"
@@ -69,11 +66,7 @@
           "
           >大屏</a
         >
-          <a
-          @click="goPage(row,3)"
-          class="map-margin"
-          >匹配五金</a
-        >
+        <a @click="goPage(row, 3)" class="map-margin">匹配五金</a>
       </template>
     </FullPage>
     <Modal v-model="showModal" fullscreen footer-hide class="modal-bs">
@@ -90,9 +83,7 @@
         <div class="modal-body-top">
           <div class="modal-body-top-left">
             <div class="modal-body-top-left-card">
-              <div class="font-gradient-style">
-                芯片总数
-              </div>
+              <div class="font-gradient-style">芯片总数</div>
               <div class="card-number-style" ref="tag_num_total">
                 <div>0</div>
                 <div>0</div>
@@ -101,9 +92,7 @@
               </div>
             </div>
             <div class="modal-body-top-left-card">
-              <div class="font-gradient-style">
-                今日发货
-              </div>
+              <div class="font-gradient-style">今日发货</div>
               <div class="card-number-style" ref="today_total_total">
                 <div>0</div>
                 <div>0</div>
@@ -112,9 +101,7 @@
               </div>
             </div>
             <div class="modal-body-top-left-card">
-              <div class="font-gradient-style">
-                已发货
-              </div>
+              <div class="font-gradient-style">已发货</div>
               <div class="card-number-style" ref="send_total_total">
                 <div>0</div>
                 <div>0</div>
@@ -125,9 +112,7 @@
           </div>
           <div class="modal-body-top-right">
             <div class="modal-body-top-right-card">
-              <div>
-                异常芯片
-              </div>
+              <div>异常芯片</div>
               <div class="card-number-style" ref="unusual_tag_num_total">
                 <div>0</div>
                 <div>0</div>
@@ -146,13 +131,13 @@
               :columns="modalHouseColums"
               :data="modalHouseList"
             ></Table>
-            <div style="padding-top:10px;color:white">
+            <div style="padding-top: 10px; color: white">
               共{{ today_total - send_total }}条未发货
             </div>
           </div>
           <div class="modal-body-content-right">
             <Table
-              style="background-color: transparent;"
+              style="background-color: transparent"
               stripe
               max-height="470"
               :columns="modalHouseColums"
@@ -170,9 +155,9 @@ import { mapState } from "vuex";
 export default {
   data() {
     return {
-      type:0,//不展示确认出库百分比与运输百分比不一定的数据
-      chooseData:[],
-      url_number_list:[],
+      type: 0, //不展示确认出库百分比与运输百分比不一定的数据
+      chooseData: [],
+      url_number_list: [],
       tableColums: [
         {
           type: "selection",
@@ -220,8 +205,8 @@ export default {
           align: "center",
           key: "url_number",
           minWidth: 200,
-          ellipsis:'true',
-          tooltip:'true'
+          ellipsis: "true",
+          tooltip: "true",
         },
         {
           title: "出库时间",
@@ -319,7 +304,7 @@ export default {
       }
       return this.func.computedHeader(this.tableheaders, this.tableColums);
     },
-    set_list(){
+    set_list() {
       return [
         {
           title: "订单编号",
@@ -367,12 +352,12 @@ export default {
           serverName: "residential_name",
           placeholder: "项目名称",
           value: "",
-        }, 
+        },
         {
           title: "图号",
           name: "Select",
-          filterable:true,
-          multiple:true,
+          filterable: true,
+          multiple: true,
           serverName: "url_number",
           placeholder: "请选择",
           value: "",
@@ -405,40 +390,52 @@ export default {
           start_placeholder: "开始日期",
           end_placeholder: "结束日期",
         },
-      ]
+      ];
     },
   },
+  beforeRouteLeave(to, from, next) {
+    if (
+      to.path == "/cms/productionorderlist/deliverylist/deliverylistDetail" ||
+      "/cms/productionorderlist/deliverylist/checkUnusual" ||
+      "/cms/productionorderlist/deliverylist/matchIronware"
+    ) {
+      next();
+    } else {
+      from.meta.keepAlive = false;
+      next();
+    }
+  },
   methods: {
-    showTrueChange(e){
-      if(e){
+    showTrueChange(e) {
+      if (e) {
         this.type = 1;
         this.init(this.proxyObj);
-      }else{
-        this.type =0;
-         this.init(this.proxyObj);
+      } else {
+        this.type = 0;
+        this.init(this.proxyObj);
       }
     },
-    selectTable(e){
-        this.chooseData = e;
-        console.log(this.chooseData)
+    selectTable(e) {
+      this.chooseData = e;
+      console.log(this.chooseData);
     },
-     async postData() {
-       if(this.chooseData.length==0){
-         return this.$Message.warning('请先选择数据!')
-       }
-        let transport_no = [];
-      this.chooseData.forEach(v=>{
-        transport_no.push(v.transport_no)
+    async postData() {
+      if (this.chooseData.length == 0) {
+        return this.$Message.warning("请先选择数据!");
+      }
+      let transport_no = [];
+      this.chooseData.forEach((v) => {
+        transport_no.push(v.transport_no);
       });
       const res = await this.axios.post("/api/transports_export", {
-        transport_no
+        transport_no,
       });
       if (res.code == 200) {
         let url = `${this.$store.state.ip}/api/storage/${res.data.file}`;
         location.href = url;
       }
     },
-   
+
     init(row) {
       this.pageIndex = 1;
       row.page_index = this.pageIndex;
@@ -446,28 +443,27 @@ export default {
       row.type = this.type;
       this.proxyObj = JSON.parse(JSON.stringify(row));
       this.getData(this.proxyObj);
-     
     },
     getData(row) {
       this.loading = true;
-      console.log(row,1)
+      console.log(row, 1);
       this.axios("/api/orders_out_list", { params: row }).then((res) => {
         this.loading = false;
         if (res.code == 200) {
           this.tableData = res.data.data;
           this.total = res.data.total;
           // this.tableheaders = res.data.tableSet || [];
-          let data =[];
-          res.data.url_number_list.map(v=>{
-            let obj={};
-               obj.title = v||'';
-           
+          let data = [];
+          res.data.url_number_list.map((v) => {
+            let obj = {};
+            obj.title = v || "";
+
             data.push(obj);
-          })
-         
+          });
+
           this.set_list[4].option = data;
           this.url_number_list = data;
-           console.log(this.set_list[4].option)
+          console.log(this.set_list[4].option);
         }
       });
     },
@@ -488,16 +484,19 @@ export default {
         type == 1 ? "/api/orders_transport" : "/api/orders_transport_confirm";
       params.transport_no = row.transport_no || row.order_no;
       this.confirmDelete({
-        formData:type==1?[
-          {title:'车牌号:',value:''},
-          {title:'司机姓名:',value:''},
-          {title:'联系电话:',value:''}
-        ]:false,
+        formData:
+          type == 1
+            ? [
+                { title: "车牌号:", value: "" },
+                { title: "司机姓名:", value: "" },
+                { title: "联系电话:", value: "" },
+              ]
+            : false,
         title: type == 1 ? "确认发货" : "确认收货",
-        content: type == 1 ? "确认发货么?" : "确认收货么?", 
+        content: type == 1 ? "确认发货么?" : "确认收货么?",
         type: "primary",
         then: (e) => {
-          console.log(123,e);
+          console.log(123, e);
           this.axios.post(post_url, params).then((res) => {
             if (res.code == 200) {
               this.$Message.success(res.msg);
@@ -508,23 +507,28 @@ export default {
         cancel: (e) => {},
       });
     },
-    goPage(row,type) {
-      switch(row,type){
+    goPage(row, type) {
+      switch ((row, type)) {
         case 1:
-      this.$router.push({
-        path: "/cms/productionorderlist/deliverylist/deliverylistDetail",
-        query: {
-          order_no: row.order_no,
-          type: 2,
-          transport_no: row.transport_no,
-        },
-      });
-      break
-      case 2:
-        this.$router.push('/cms/productionorderlist/deliverylist/checkUnusual')
-        break;
-      case 3:
-        this.$router.push({path:'/cms/productionorderlist/deliverylist/matchIronware',query:{order_no: row.order_no,transport_no: row.transport_no}})
+          this.$router.push({
+            path: "/cms/productionorderlist/deliverylist/deliverylistDetail",
+            query: {
+              order_no: row.order_no,
+              type: 2,
+              transport_no: row.transport_no,
+            },
+          });
+          break;
+        case 2:
+          this.$router.push(
+            "/cms/productionorderlist/deliverylist/checkUnusual"
+          );
+          break;
+        case 3:
+          this.$router.push({
+            path: "/cms/productionorderlist/deliverylist/matchIronware",
+            query: { order_no: row.order_no, transport_no: row.transport_no },
+          });
       }
     },
     goBigScreen(row) {
@@ -599,10 +603,7 @@ export default {
       to.forEach((el) => {
         el.innerText = 0;
       });
-      const arr = from
-        .toString()
-        .split("")
-        .reverse();
+      const arr = from.toString().split("").reverse();
       let i = 3;
       arr.forEach((el) => {
         to[i].innerText = el;
@@ -612,7 +613,7 @@ export default {
   },
   created() {
     let _this = this; //声明一个变量指向Vue实例this,保证作用域一致
-    this.timer = setInterval(function() {
+    this.timer = setInterval(function () {
       _this.currentDate = //修改数据date
         new Date().getFullYear() +
         "-" +

+ 98 - 76
src/views/ProductionOrderList/Dispatchlist/confirm.vue

@@ -8,17 +8,17 @@
       :logList="logList"
       @selectTable="selectTable"
       @changePage="changePage"
-      @changeSelected='changeSelected'
+      @changeSelected="changeSelected"
       @changeSize="changeSize"
       :tableColums="tableColums"
       :tableData="tableData"
       :pageIndex="pageIndex"
       :pageSize="pageSize"
       :total="total"
-      :loading='loading'
+      :loading="loading"
     >
       <div slot="titleButton">
-        <Button @click="back" style="margin-right:10px;">返回</Button>
+        <Button @click="back" style="margin-right: 10px">返回</Button>
         <Button @click="finish(selectIds, 1)" type="success" ghost
           >批量完成</Button
         >
@@ -29,7 +29,7 @@
           <a
             v-if="row.state != 3"
             class="map-margin"
-            style="color:#32C800"
+            style="color: #32c800"
             @click="finish(row, 1)"
             >完成</a
           >
@@ -37,25 +37,25 @@
         </div>
       </template>
     </FullPage>
-      <Modal
-       title="设置班组"
-        v-model="finish_modal"
-        width="400"
-      
-        @on-ok="finish_Ok">
-        <Form>
-          <FormItem label="完成班组:">
-              <Select v-model="finish_nickname" style="width:180px">
-                <Option
-                  :value="item.id"
-                  v-for="(item, index) in nickname_users"
-                  :key="index"
-                  >{{ item.nickname }}</Option
-                >
-              </Select>
-            </FormItem>
-        </Form>
-      </Modal>
+    <Modal
+      title="设置班组"
+      v-model="finish_modal"
+      width="400"
+      @on-ok="finish_Ok"
+    >
+      <Form>
+        <FormItem label="完成班组:">
+          <Select v-model="finish_nickname" style="width: 180px">
+            <Option
+              :value="item.id"
+              v-for="(item, index) in nickname_users"
+              :key="index"
+              >{{ item.nickname }}</Option
+            >
+          </Select>
+        </FormItem>
+      </Form>
+    </Modal>
   </div>
 </template>
 
@@ -63,10 +63,10 @@
 export default {
   data() {
     return {
-      loading:true,
-      url_number:[],
-      finish_nickname:'',
-      finish_modal:false,
+      loading: true,
+      url_number: [],
+      finish_nickname: "",
+      finish_modal: false,
       type: 1,
       logList: [{ title: "系统单号", value: "10998765" }],
       tableColums: [
@@ -89,9 +89,15 @@ export default {
           minWidth: 150,
           render: (h, params) =>
             h("span", {}, params.row.rework_state == 1 ? "返工" : "正常"),
-          
         },
-        { title: "图号", align: "center", minWidth: 150, key: "url_number" ,ellipsis:'true',tooltip:'true'},
+        {
+          title: "图号",
+          align: "center",
+          minWidth: 150,
+          key: "url_number",
+          ellipsis: "true",
+          tooltip: "true",
+        },
         { title: "班组信息", align: "center", minWidth: 150, key: "username" },
         {
           title: "完工状态",
@@ -142,22 +148,24 @@ export default {
       product_list: [],
       part_list: [],
       part_state_list: [],
-      url_number_list: [], 
+      url_number_list: [],
       part_label: [],
       produce_type_list: [],
-      nickname_users:[],
-      params_data:[]
+      nickname_users: [],
+      params_data: [],
     };
   },
   created() {
     // this.axios("/api/procedure_index").then(
     //   (res) => (this.produces = res.data.data)
     // );
-    this.axios("/api/employee_list").then((res) => (this.nickname_users = res.data.data));
+    this.axios("/api/employee_list").then(
+      (res) => (this.nickname_users = res.data.data)
+    );
   },
   computed: {
     list() {
-    return  [
+      return [
         {
           title: "工序分类",
           filterable: true,
@@ -190,11 +198,11 @@ export default {
         },
         {
           title: "图号",
-          isTooltip:true,
-          showChooseAll:true,
+          isTooltip: true,
+          showChooseAll: true,
           filterable: true,
-          multiple:true,
-          change:true,
+          multiple: true,
+          change: true,
           name: "Select",
           value: this.url_number,
           optionName: "title",
@@ -213,7 +221,7 @@ export default {
           ],
         },
         {
-               title: "工序状态",
+          title: "工序状态",
           name: "Select",
           value: "",
           serverName: "rework_state",
@@ -233,41 +241,55 @@ export default {
           start_placeholder: "开始日期",
           end_placeholder: "结束日期",
         },
-      ]
- 
+      ];
     },
   },
   methods: {
-    changeSelected(list){
-    
-        this.url_number = list[3].value;
+    changeSelected(list) {
+      this.url_number = list[3].value;
     },
-    finish_Ok(){
-      if(!this.finish_nickname){
-         this.$Message.warning('请选择班组')
-       
-      }else{
-               this.postData({...this.params_data,team_id:this.finish_nickname},1)
+    finish_Ok() {
+      if (!this.finish_nickname) {
+        this.$Message.warning("请选择班组");
+      } else {
+        this.postData(
+          { ...this.params_data, team_id: this.finish_nickname },
+          1
+        );
       }
     },
-    search(row){
+    search(row) {
       this.loading = true;
-           row.start_time = row.start_time?new Date(row.start_time).getTime().toString().split('').splice(0,10).join(''):'';
-      row.end_time =row.end_time? new Date(row.end_time).getTime().toString().split('').splice(0,10).join(''):'';
-       Object.assign(row, this.$route.query);
-        row.page_size = this.pageSize;
+      row.start_time = row.start_time
+        ? new Date(row.start_time)
+            .getTime()
+            .toString()
+            .split("")
+            .splice(0, 10)
+            .join("")
+        : "";
+      row.end_time = row.end_time
+        ? new Date(row.end_time)
+            .getTime()
+            .toString()
+            .split("")
+            .splice(0, 10)
+            .join("")
+        : "";
+      Object.assign(row, this.$route.query);
+      row.page_size = this.pageSize;
       row.page_index = this.pageIndex;
-       this.proxyObj = row;
-       this.axios("/api/orders_dispatch_produce_list", { params: row }).then(
+      this.proxyObj = row;
+      this.axios("/api/orders_dispatch_produce_list", { params: row }).then(
         (res) => {
           if (res.code == 200) {
             this.loading = false;
             this.tableData = res.data.list;
             this.logList = res.data.detail;
             this.total = res.data.total;
-          //  this.produce_type_list =res.data.basic_title;
-          //  this.produces = res.data.procedure_title;
-          //  this.users = res.data.username
+            //  this.produce_type_list =res.data.basic_title;
+            //  this.produces = res.data.procedure_title;
+            //  this.users = res.data.username
           }
         }
       );
@@ -294,16 +316,16 @@ export default {
             this.tableData = res.data.list;
             this.logList = res.data.detail;
             this.total = res.data.total;
-           this.produce_type_list =res.data.basic_title;
-           this.produces = res.data.procedure_title;
-           this.users = res.data.username;
-           let data =[];
-           res.data.url_number_list.map(v=>{
-             let obj={};
-             obj.title = v;
-             data.push(obj)
-           })
-           this.url_number_list = data
+            this.produce_type_list = res.data.basic_title;
+            this.produces = res.data.procedure_title;
+            this.users = res.data.username;
+            let data = [];
+            res.data.url_number_list.map((v) => {
+              let obj = {};
+              obj.title = v;
+              data.push(obj);
+            });
+            this.url_number_list = data;
           }
         }
       );
@@ -314,7 +336,7 @@ export default {
       this.axios.post(url, data).then((res) => {
         if (res.code == 200) {
           this.$Message.success(res.msg);
-          this.getData({...this.$route.query,...this.proxyObj});
+          this.getData({ ...this.$route.query, ...this.proxyObj });
         }
       });
     },
@@ -344,10 +366,10 @@ export default {
               ""
             )
           : row.produce_time,
-        url_number:this.proxyObj.url_number
+        url_number: this.proxyObj.url_number,
       };
-     this.finish_modal = true;
-     this.params_data = params;
+      this.finish_modal = true;
+      this.params_data = params;
     },
     selectTable(e) {
       this.selectIds = e;
@@ -369,8 +391,8 @@ export default {
           order_no: this.$route.query.order_no,
           produce_id: row.produce_id,
           produce_time: row.produce_time,
-          url_number:this.proxyObj.url_number.toString(),
-          procedure_title:this.proxyObj.procedure_title.toString()
+          url_number: this.proxyObj.url_number.toString(),
+          procedure_title: this.proxyObj.procedure_title.toString(),
         },
       });
     },

+ 270 - 159
src/views/ProductionOrderList/Dispatchlist/list.vue

@@ -1,62 +1,75 @@
 <template>
   <div>
-    <FullPage title='派工单'
-              :list='set_list'
-              @init='init'
-              @searchData='init'
-              @changePage='changePage'
-              @changeSize='changeSize'
-              :loading='loading'
-              :tableColums='computedTable'
-              :tableData='tableData'
-              :showPage='false'
-              :page_index='page_index'
-              :total='total'>
-      <div slot='titleButton'>
+    <FullPage
+      title="派工单"
+      :list="set_list"
+      @init="init"
+      @searchData="init"
+      @changePage="changePage"
+      @changeSize="changeSize"
+      :loading="loading"
+      :tableColums="computedTable"
+      :tableData="tableData"
+      :showPage="false"
+      :page_index="page_index"
+      :total="total"
+    >
+      <div slot="titleButton">
         <!-- <Button v-if='persimissionData["批量打印"]||persimissionData.all'
                 type="primary"
                 ghost>批量打印</Button> -->
       </div>
-      <div slot='navButton'>
-        <Button v-if='persimissionData["表头设置"]||persimissionData.all'
-                @click="setupTableHeader"
-                type="primary"
-                ghost
-                icon='ios-cog'>表头设置</Button>
+      <div slot="navButton">
+        <Button
+          v-if="persimissionData['表头设置'] || persimissionData.all"
+          @click="setupTableHeader"
+          type="primary"
+          ghost
+          icon="ios-cog"
+          >表头设置</Button
+        >
       </div>
-      <template slot="basicTypeSet"
-                slot-scope="{row}">
+      <template slot="basicTypeSet" slot-scope="{ row }">
         <div>
-          <span v-for="item in warningList"
-                :key="item.id"
-                :style="{color:item.color}"
-                v-show="item.id==row.warning_state">{{item.title}}</span>
+          <span
+            v-for="item in warningList"
+            :key="item.id"
+            :style="{ color: item.color }"
+            v-show="item.id == row.warning_state"
+            >{{ item.title }}</span
+          >
         </div>
       </template>
-      <template slot='set'
-                slot-scope='{row}'>
+      <template slot="set" slot-scope="{ row }">
         <div>
-          <a v-if='persimissionData["原材料预算"]||persimissionData.all'
-             class="map-margin"
-             @click="goOriginalPage(row)">原材料预算</a>
+          <a
+            v-if="persimissionData['原材料预算'] || persimissionData.all"
+            class="map-margin"
+            @click="goOriginalPage(row)"
+            >原材料预算</a
+          >
           <!-- <a v-if='persimissionData["打印派工单"]||persimissionData.all'
              class="map-margin">打印派工单</a> -->
-          <a v-if='persimissionData["详情"]||persimissionData.all'
-             class="map-margin"
-             @click="goDetial(row)">详情</a>
+          <a
+            v-if="persimissionData['详情'] || persimissionData.all"
+            class="map-margin"
+            @click="goDetial(row)"
+            >详情</a
+          >
         </div>
       </template>
       <template slot="pageSlot">
         <div class="pageSlotStyle">
-
-          <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
-                @on-page-size-change='changeSize'
-                @on-change='changePage'
-                :current='page_index'
-                show-total
-                :total="total"
-                show-sizer
-                :page-size='page_size' />
+          <Page
+            :page-size-opts="[10, 20, 30, 40, 100, 1000]"
+            @on-page-size-change="changeSize"
+            @on-change="changePage"
+            :current="page_index"
+            show-total
+            :total="total"
+            show-sizer
+            :page-size="page_size"
+          />
         </div>
       </template>
     </FullPage>
@@ -64,35 +77,77 @@
 </template>
 
 <script>
-import { mapState } from 'vuex'
+import { mapState } from "vuex";
 export default {
-  data () {
+  data() {
     return {
       tableColums: [
-        { title: '项目编号', align: 'center', key: 'order_no', fixed: 'left', width: '200' },
+        {
+          title: "项目编号",
+          align: "center",
+          key: "order_no",
+          fixed: "left",
+          width: "200",
+        },
         // {
         //   title: '订单类型', align: 'center', key: 'renovation_type', minWidth: 150,
         //   render: (h, params) => h('span', {}, params.row.renovation_type == 1 ? '工装' : '家装')
         // },
 
-        
-        { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 200 },
-        { title: '图号', align: 'center', key: 'url_number', minWidth: 200,ellipsis:'true',tooltip:'true' },
-        { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 100, slot: 'basicTypeSet' },
         {
-          title: '派工开始时间', align: 'center', key: 'start_time', minWidth: 200,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.start_time * 1, 1))
+          title: "项目名称",
+          align: "center",
+          key: "residential_name",
+          minWidth: 200,
+        },
+        {
+          title: "图号",
+          align: "center",
+          key: "url_number",
+          minWidth: 200,
+          ellipsis: "true",
+          tooltip: "true",
         },
         {
-          title: '派工结束时间', align: 'center', key: 'end_time', minWidth: 200,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.end_time * 1, 1))
+          title: "紧急程度",
+          align: "center",
+          key: "warning_state",
+          minWidth: 100,
+          slot: "basicTypeSet",
+        },
+        {
+          title: "派工开始时间",
+          align: "center",
+          key: "start_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.start_time * 1, 1)),
+        },
+        {
+          title: "派工结束时间",
+          align: "center",
+          key: "end_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.end_time * 1, 1)),
         },
         // { title: '派工人员', align: 'center', key: 'nickname', minWidth: 200 },
         {
-          title: '预估工期', align: 'center', key: 'predict_time', minWidth: 200,
-          render: (h, params) => h('span', `${(params.row.predict_time / 8).toFixed(1)}天`)
+          title: "预估工期",
+          align: "center",
+          key: "predict_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", `${(params.row.predict_time / 8).toFixed(1)}天`),
+        },
+        {
+          title: "操作",
+          align: "center",
+          key: "set",
+          slot: "set",
+          fixed: "right",
+          width: "240",
         },
-        { title: '操作', align: 'center', key: 'set', slot: 'set', fixed: 'right', width: '240' },
       ],
       tableData: [],
       page_index: 1,
@@ -102,23 +157,29 @@ export default {
       loading: false,
       tableheaders: [],
       //详情页返回保留搜索数据
-      corssPageData: {},
+      // corssPageData: {},
       warningList: [],
       userList: [],
-      url_number_list:[]
-    }
+      url_number_list: [],
+    };
   },
   computed: {
-    ...mapState(['persimissionData']),
-    computedTable () {
+    ...mapState(["persimissionData"]),
+    computedTable() {
       if (this.tableheaders.length < 1) {
-        return this.tableColums
+        return this.tableColums;
       }
-      return this.func.computedHeader(this.tableheaders, this.tableColums)
+      return this.func.computedHeader(this.tableheaders, this.tableColums);
     },
-    set_list () {
+    set_list() {
       return [
-        { title: '项目编号', name: 'Input', serverName: 'order_no', placeholder: '请输入订单编号', value: '' },
+        {
+          title: "项目编号",
+          name: "Input",
+          serverName: "order_no",
+          placeholder: "请输入订单编号",
+          value: "",
+        },
         // {
         //   title: '派工状态', name: 'Select', placeholder: '请选择', serverName: 'state', value: '',
         //   option: [
@@ -127,8 +188,30 @@ export default {
         //     { label: '生产完成', value: 2 },
         //   ]
         // },
-         { title: '图号', name: 'Select', serverName: 'url_number', placeholder: '请选择', value: '', optionName: 'label', optionValue: 'value', option: this.url_number_list,filterable:true,multiple:true },
-        { title: '开始派工时间', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, serverName: 'id2', start_placeholder: '开始日期', end_placeholder: '结束日期' },
+        {
+          title: "图号",
+          name: "Select",
+          serverName: "url_number",
+          placeholder: "请选择",
+          value: "",
+          optionName: "label",
+          optionValue: "value",
+          option: this.url_number_list,
+          filterable: true,
+          multiple: true,
+        },
+        {
+          title: "开始派工时间",
+          name: "Input",
+          start_server: "start_time",
+          end_server: "end_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          serverName: "id2",
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
         // {
         //   title: '订单类型', name: 'Select', serverName: 'renovation_type', placeholder: '请选择订单类型', value: '',
         //   option: [
@@ -136,145 +219,173 @@ export default {
         //     { label: '家装', value: 0 },
         //   ]
         // },
-        { title: '紧急程度', name: 'Select', serverName: 'warning_state', placeholder: '请选择', value: '', optionName: 'title', optionValue: 'id', option: this.warningList },
-        { title: '项目名称', name: 'Input', serverName: 'residential_name', placeholder: '请输入项目名称', value: '' },
+        {
+          title: "紧急程度",
+          name: "Select",
+          serverName: "warning_state",
+          placeholder: "请选择",
+          value: "",
+          optionName: "title",
+          optionValue: "id",
+          option: this.warningList,
+        },
+        {
+          title: "项目名称",
+          name: "Input",
+          serverName: "residential_name",
+          placeholder: "请输入项目名称",
+          value: "",
+        },
         // {
         //   title: '派工人员', name: 'Select', serverName: 'user_id', placeholder: '请选择派工人员', optionName: 'nickname', optionValue: 'id', value: '',
         //   option: this.userList
         // },
-      ]
-    }
+      ];
+    },
   },
-  created () {
+  created() {
     // 获取紧急程度
-    this.axios.get('/api/warning_list').then(res => { this.warningList = res.data.data })
-    // 获取用户列表
-    this.axios({ method: 'get', url: '/api/employee_list', }).then((res) => { this.userList = res.data.data }).catch((err) => { });
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (from.path != '/cms/productionorderlist/dispatchlist/confirm') {
-        localStorage.removeItem('corssPageData')
-      } else {
-        vm.firstEnter = 1
-        vm.page_index = JSON.parse(localStorage.getItem('corssPageData')).page_index
-        vm.page_size = JSON.parse(localStorage.getItem('corssPageData')).page_size
-      }
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
     });
+    // 获取用户列表
+    this.axios({ method: "get", url: "/api/employee_list" })
+      .then((res) => {
+        this.userList = res.data.data;
+      })
+      .catch((err) => {});
   },
-  beforeRouteLeave (to, from, next) {
-    if (to.path == '/cms/productionorderlist/dispatchlist/confirm') {
-      this.corssPageData = {
-        'order_no': this.set_list[0].value,
-        'url_number': this.set_list[1].value,
-        'start_time': this.set_list[2].start_value,
-        'end_time': this.set_list[2].end_value,
-        // 'renovation_type': this.set_list[3].value,
-        'warning_state': this.set_list[3].value,
-        'residential_name': this.set_list[4].value,
-        // 'user_id': this.set_list[6].value,
-        'page_index': this.page_index,
-        'page_size': this.page_size
-      }
-      localStorage.setItem('corssPageData', JSON.stringify(this.corssPageData))
+  beforeRouteLeave(to, from, next) {
+    if (
+      to.path == "/cms/rawmateria/index" ||
+      to.path == "/cms/productionorderlist/dispatchlist/confirm"
+    ) {
+      next()
+    } else {
+      from.meta.keepAlive = false;
+      next();
     }
-    next(vm => {
-    });
+    // if (to.path == "/cms/productionorderlist/dispatchlist/confirm") {
+    //   this.corssPageData = {
+    //     order_no: this.set_list[0].value,
+    //     url_number: this.set_list[1].value,
+    //     start_time: this.set_list[2].start_value,
+    //     end_time: this.set_list[2].end_value,
+    //     // 'renovation_type': this.set_list[3].value,
+    //     warning_state: this.set_list[3].value,
+    //     residential_name: this.set_list[4].value,
+    //     // 'user_id': this.set_list[6].value,
+    //     page_index: this.page_index,
+    //     page_size: this.page_size,
+    //   };
+    //   localStorage.setItem("corssPageData", JSON.stringify(this.corssPageData));
+    // }
+    // next(vm => {
+    //   console.log(vm.set_list,"123");
+    // });
   },
   methods: {
-    init (row) {
+    init(row) {
       row.page_index = this.page_index;
       row.page_size = this.page_size;
-      if (this.firstEnter == 1) {
-        this.corssPageData = JSON.parse(localStorage.getItem('corssPageData'))
-        row = this.corssPageData
-        this.proxyObj = row
-        this.set_list[0].value = row.order_no
-        this.set_list[1].value = row.url_number
-        this.set_list[2].value = row.start_time
-        this.set_list[2].value = row.end_time
-        // this.set_list[3].value = row.renovation_type
-        this.set_list[3].value = row.warning_state
-        this.set_list[4].value = row.residential_name
-        // this.set_list[6].value = row.user_id
-        this.firstEnter++
-        this.$nextTick(() => {
-          this.page_index = row.page_index
-          this.page_size = row.page_size
-        })
-      } else {
-        this.proxyObj = row
-      }
-      this.getData(row)
+      // if (this.firstEnter == 1) {
+      //   this.corssPageData = JSON.parse(localStorage.getItem("corssPageData"));
+      //   row = this.corssPageData;
+      //   this.proxyObj = row;
+      //   this.set_list[0].value = row.order_no;
+      //   this.set_list[1].value = row.url_number;
+      //   this.set_list[2].value = row.start_time;
+      //   this.set_list[2].value = row.end_time;
+      //   // this.set_list[3].value = row.renovation_type
+      //   this.set_list[3].value = row.warning_state;
+      //   this.set_list[4].value = row.residential_name;
+      //   // this.set_list[6].value = row.user_id
+      //   this.firstEnter++;
+      //   this.$nextTick(() => {
+      //     this.page_index = row.page_index;
+      //     this.page_size = row.page_size;
+      //   });
+      // } else {
+
+      // }
+      this.proxyObj = row;
+      this.getData(row);
     },
-    getData (row) {
+    getData(row) {
       this.loading = true;
-      this.axios('/api/orders_dispatch_list', { params: row }).then(res => {
+      this.axios("/api/orders_dispatch_list", { params: row }).then((res) => {
         this.loading = false;
         if (res.code == 200) {
           this.tableData = res.data.data;
           this.total = res.data.total;
           this.tableheaders = res.data.tableSet || [];
           let data = [];
-          res.data.url_number_list.map(v=>{
-            let obj={};
+          res.data.url_number_list.map((v) => {
+            let obj = {};
             obj.label = v;
             obj.value = v;
-            data.push(obj)
-          })
-          
+            data.push(obj);
+          });
+
           this.url_number_list = data;
-          console.log(this.url_number_list)
+          // console.log(this.url_number_list);
         }
-      })
+      });
     },
-    changePage (e) {
+    changePage(e) {
       this.page_index = e;
       this.proxyObj.page_index = this.page_index;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    changeSize (e) {
+    changeSize(e) {
       this.page_size = e;
       this.proxyObj.page_size = this.page_size;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    goDetial (row) {
-      console.log(1)
+    goDetial(row) {
+      // console.log(1);
       this.$router.push({
         // path:'/cms/productionorderlist/dispatchlist/details',
-        path: '/cms/productionorderlist/dispatchlist/confirm',
+        path: "/cms/productionorderlist/dispatchlist/confirm",
         query: {
           order_no: row.order_no,
-        }
-      })
+        },
+      });
     },
-    goOriginalPage (row) {
+    goOriginalPage(row) {
       this.$router.push({
-        path: '/cms/rawmateria/index',
+        path: "/cms/rawmateria/index",
         query: {
           order_no: row.order_no,
           type: 6,
-          residential_name: row.residential_name
-        }
-      })
+          residential_name: row.residential_name,
+        },
+      });
     },
-    setupTableHeader () {
-      this.tableheaders.length < 1 ? this.tableheaders = this.tableColums.reduce((pre, cur) => pre.concat(cur.key), []) : ''
+    setupTableHeader() {
+      this.tableheaders.length < 1
+        ? (this.tableheaders = this.tableColums.reduce(
+            (pre, cur) => pre.concat(cur.key),
+            []
+          ))
+        : "";
       this.$setTableheader({
         list: this.tableColums,
         selects: this.tableheaders,
         then: (result) => {
-          this.tableheaders = result
-          this.axios.post('/api/update/table', { id: this.$route.query.id, result }).then(res => {
-            if (res.code == 200) {
-              this.$Message.success(res.msg)
-            }
-          })
-        }
-      })
+          this.tableheaders = result;
+          this.axios
+            .post("/api/update/table", { id: this.$route.query.id, result })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+              }
+            });
+        },
+      });
     },
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 13 - 5
src/views/ProductionOrderList/InboundForm/index.vue

@@ -13,9 +13,9 @@
       :pageIndex="pageIndex"
       :total="total"
     >
-    <div slot="titleButton">
-        <Button type='primary' @click="goPagePrint">芯片补打</Button>
-    </div>
+      <div slot="titleButton">
+        <Button type="primary" @click="goPagePrint">芯片补打</Button>
+      </div>
       <div slot="navButton">
         <Button
           v-if="persimissionData['表头设置'] || persimissionData.all"
@@ -262,8 +262,8 @@ export default {
   },
 
   methods: {
-    goPagePrint(){
-         this.$router.push({path:'/cms/ChipPrintScreen/ChipPrintScreen'});
+    goPagePrint() {
+      this.$router.push({ path: "/cms/ChipPrintScreen/ChipPrintScreen" });
     },
     init(row) {
       this.pageIndex = 1;
@@ -323,6 +323,14 @@ export default {
       });
     },
   },
+  beforeRouteLeave(to, from, next) {
+    if (to.path == "/cms/productionorderlist/inboundform/details") {
+      next();
+    } else {
+      from.meta.keepAlive = false;
+      next();
+    }
+  },
 };
 </script>
 

+ 17 - 11
src/views/ProductionOrderList/ProductionPlanlist/list.vue

@@ -1,20 +1,26 @@
 <template>
-  <div >
-    
-    <BSTTwo v-if="true"/>
-    <typeOne v-else/>
+  <div>
+    <BSTTwo v-if="true" />
+    <typeOne v-else />
   </div>
 </template>
 <script>
-import typeOne from '@/views/ProductionOrderList/ProductionPlanlist/type_one'
-import BSTTwo from '@/views/ProductionOrderList/ProductionPlanlist/BST_two'
+import typeOne from "@/views/ProductionOrderList/ProductionPlanlist/type_one";
+import BSTTwo from "@/views/ProductionOrderList/ProductionPlanlist/BST_two";
 export default {
-  components:{
+  components: {
     typeOne,
-    BSTTwo
-  }
-}
+    BSTTwo,
+  },
+  beforeRouteLeave(to, from, next) {
+    if (to.path == "/cms/productionorderlist/productionplanlist/details") {
+      next((vm) => {});
+    } else {
+      from.meta.keepAlive = false;
+      next((vm) => {});
+    }
+  },
+};
 </script>
 <style scoped>
-
 </style>

+ 379 - 228
src/views/ProductionOrderList/ProductionsOrder/BST_list.vue

@@ -1,18 +1,20 @@
 <template>
   <div>
-    <FullPage title='生产订单列表'
-              :list='set_list'
-              @init='init'
-              @searchData='searchData'
-              @changePage='changePage'
-              @changeSize='changeSize'
-              @selectTable='selectTable'
-              :tableColums='computedTable'
-              :showPage='false'
-              :tableData='tableData'
-              :page_index='page_index'
-              :total='total'>
-      <div slot='titleButton'>
+    <FullPage
+      title="生产订单列表"
+      :list="set_list"
+      @init="init"
+      @searchData="searchData"
+      @changePage="changePage"
+      @changeSize="changeSize"
+      @selectTable="selectTable"
+      :tableColums="computedTable"
+      :showPage="false"
+      :tableData="tableData"
+      :page_index="page_index"
+      :total="total"
+    >
+      <div slot="titleButton">
         <!-- <Button v-if='persimissionData["批量打印二维码"]||persimissionData.all'
                 type="primary"
                 style="margin-right:10px"
@@ -22,90 +24,112 @@
                 ghost>批量下生产排产</Button> -->
       </div>
 
-      <div slot='navButton'>
+      <div slot="navButton">
         <!-- <Button @click="setupTableHeader"
                 v-if='persimissionData["表头设置"]||persimissionData.all'
                 type="primary"
                 ghost
                 icon='ios-cog'>表头设置</Button> -->
       </div>
-      <template slot="basicTypeSet"
-                slot-scope="{row}">
+      <template slot="basicTypeSet" slot-scope="{ row }">
         <div>
-          <span v-for="item in warningList"
-                :key="item.id"
-                :style="{color:item.color}"
-                v-show="item.id==row.warning_state">{{item.title}}</span>
+          <span
+            v-for="item in warningList"
+            :key="item.id"
+            :style="{ color: item.color }"
+            v-show="item.id == row.warning_state"
+            >{{ item.title }}</span
+          >
         </div>
       </template>
-      <template slot='set'
-                slot-scope='{row}'>
+      <template slot="set" slot-scope="{ row }">
         <div>
           <!-- <a v-if='persimissionData["原材料预算"]||persimissionData.all'
              style="margin:0 5px"
              @click="goOriginalPage(row)">原材料预算</a> -->
           <!-- <a v-if='persimissionData["打印二维码"]||persimissionData.all'
              style="margin:0 5px">打印二维码</a> -->
-          <a v-if='persimissionData["详情"]||persimissionData.all'
-             style="margin:0 5px"
-             @click="goDetial(row)">详情</a>
+          <a
+            v-if="persimissionData['详情'] || persimissionData.all"
+            style="margin: 0 5px"
+            @click="goDetial(row)"
+            >详情</a
+          >
           <!-- <a v-if='persimissionData["下生产计划"]||persimissionData.all'
              style="margin:0 5px"
              :disabled="row.state==2"
              @click="openModal(row)">下生产排产</a> -->
-              <a :disabled="row.part_state != 0"
-             style="margin:0 5px"
-             @click="del(row)">删除</a>
+          <a
+            :disabled="row.part_state != 0"
+            style="margin: 0 5px"
+            @click="del(row)"
+            >删除</a
+          >
         </div>
       </template>
       <template slot="pageSlot">
         <div class="pageSlotStyle">
-          <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
-                @on-page-size-change='changeSize'
-                @on-change='changePage'
-                :current='page_index'
-                show-total
-                :total="total"
-                show-sizer
-                :page-size='page_size' />
+          <Page
+            :page-size-opts="[10, 20, 30, 40, 100, 1000]"
+            @on-page-size-change="changeSize"
+            @on-change="changePage"
+            :current="page_index"
+            show-total
+            :total="total"
+            show-sizer
+            :page-size="page_size"
+          />
         </div>
       </template>
     </FullPage>
-       <Modal width='35'
-          title='下生产排产'
-          :mask-closable="false"
-           v-model="show">
-      <Form
-            ref='forms'
-            :rules='rules'>
-         <FormItem v-for="item in basics_procedure_list" :key="item.id" :label='`要求${item.title}完成的时间:`' style="margin-left:60px" >
-          <DatePicker type="daterange" placeholder="请选择" style="width: 200px" v-model='item.time' transfer :options='options' @on-open-change='timeFocus($event,item)'></DatePicker>
+    <Modal width="35" title="下生产排产" :mask-closable="false" v-model="show">
+      <Form ref="forms" :rules="rules">
+        <FormItem
+          v-for="item in basics_procedure_list"
+          :key="item.id"
+          :label="`要求${item.title}完成的时间:`"
+          style="margin-left: 60px"
+        >
+          <DatePicker
+            type="daterange"
+            placeholder="请选择"
+            style="width: 200px"
+            v-model="item.time"
+            transfer
+            :options="options"
+            @on-open-change="timeFocus($event, item)"
+          ></DatePicker>
         </FormItem>
       </Form>
-      <div slot="footer"
-           class="modal-footer">
-        <Button @click="show=false">取消</Button>
-        <Button @click="finishDataTrue"
-                type='primary'>确认</Button>
+      <div slot="footer" class="modal-footer">
+        <Button @click="show = false">取消</Button>
+        <Button @click="finishDataTrue" type="primary">确认</Button>
       </div>
     </Modal>
   </div>
 </template>
 
 <script>
-import { mapState } from 'vuex'
+import { mapState } from "vuex";
 export default {
-  data () {
+  data() {
     return {
-      options:{},
-      basics_procedure_list:[],
-        rules: {
-        time: [{ required: true, message: '请选择时间', }]
+      options: {},
+      basics_procedure_list: [],
+      rules: {
+        time: [{ required: true, message: "请选择时间" }],
       },
-      show:false,
+      show: false,
       tableColums: [
-        { type: 'selection', key: 'selection', title: '全选', fixed: 'left', width: 90, align: 'center' },
-        { title: '项目编号', align: 'center', key: 'order_no', width: '200' },
+        {
+          type: "selection",
+          key: "selection",
+          title: "全选",
+          fixed: "left",
+          width: 90,
+          align: "center",
+        },
+        { title: "项目编号", align: "center", key: "order_no", width: "200" },
         // {
         //   title: '订单类型', align: 'center', key: 'order_type', width: '200',
         //   render: (h, params) => {
@@ -116,24 +140,49 @@ export default {
         //   title: '生产订单编号', align: 'center', key: 'oa_order_no', minWidth: 200,
         //   render: (h, params) => h('span', {}, params.row.oa_order_no || params.row.order_no)
         // },
-         { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 200 },
         {
-          title: '生产状态', align: 'center', key: 'state', minWidth: 150,
-          render: (h, params) => h('span', {},
-            params.row.state == 0 ? '未下计划'
-              : (params.row.state == 1 ? '计划中'
-                : (params.row.state >= 2 ? '计划完成' : '全部'))
-          )
+          title: "项目名称",
+          align: "center",
+          key: "residential_name",
+          minWidth: 200,
         },
-       
+        {
+          title: "生产状态",
+          align: "center",
+          key: "state",
+          minWidth: 150,
+          render: (h, params) =>
+            h(
+              "span",
+              {},
+              params.row.state == 0
+                ? "未下计划"
+                : params.row.state == 1
+                ? "计划中"
+                : params.row.state >= 2
+                ? "计划完成"
+                : "全部"
+            ),
+        },
+
         // { title: '地址', align: 'center', key: 'address', minWidth: 200 },
         // { title: '客户姓名', align: 'center', key: 'client_name', minWidth: 200 },
         // { title: '手机号', align: 'center', key: 'mobile', minWidth: 200 },
         // { title: '测量人员', align: 'center', key: 'nickname', minWidth: 200 },
-        { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 100, slot: 'basicTypeSet', },
         {
-          title: '下单日期', align: 'center', minWidth: 200, key: 'crt_time',
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.crt_time * 1))
+          title: "紧急程度",
+          align: "center",
+          key: "warning_state",
+          minWidth: 100,
+          slot: "basicTypeSet",
+        },
+        {
+          title: "下单日期",
+          align: "center",
+          minWidth: 200,
+          key: "crt_time",
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.crt_time * 1)),
         },
         // {
         //   title: '测量开始日期', align: 'center', minWidth: 200, key: 'measure_start_time',
@@ -147,7 +196,14 @@ export default {
         //   title: '实际测量时间', align: 'center', minWidth: 200, key: 'measure_time',
         //   render: (h, params) => h('span', {}, this.func.replaceDate(params.row.measure_time * 1))
         // },
-        { title: '操作', align: 'center', key: 'set', slot: 'set', fixed: 'right', width: '320' },
+        {
+          title: "操作",
+          align: "center",
+          key: "set",
+          slot: "set",
+          fixed: "right",
+          width: "320",
+        },
       ],
       tableData: [],
       page_index: 1,
@@ -155,57 +211,88 @@ export default {
       total: 0,
       planInfo: {
         order_no: null,
-        start_time: '',
-        end_time: '',
+        start_time: "",
+        end_time: "",
         state: 3,
       },
       selects: [],
       tableheaders: [],
       //详情页返回保留搜索数据
-      corssPageData: localStorage.getItem('corssPageData') ? JSON.parse(localStorage.getItem('corssPageData')) : {},
+      corssPageData: localStorage.getItem("corssPageData")
+        ? JSON.parse(localStorage.getItem("corssPageData"))
+        : {},
       userList: [],
       warningList: [],
-      order_no:'',
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (from.path != '/cms/productionorderlist/productionsorder/Decorationlist') {
-        localStorage.removeItem('corssPageData')
-      } else {
-        vm.firstEnter = 1
-      }
-    });
+      order_no: "",
+    };
   },
-  beforeRouteLeave (to, from, next) {
-    if (to.path == '/cms/productionorderlist/productionsorder/Decorationlist') {
-      this.corssPageData.page_index = this.page_index,
-        this.corssPageData.page_size = this.page_size,
-        localStorage.setItem('corssPageData', JSON.stringify(this.corssPageData))
+  // beforeRouteEnter(to, from, next) {
+  //   next((vm) => {
+  //     if (
+  //       from.path != "/cms/productionorderlist/productionsorder/Decorationlist"
+  //     ) {
+  //       localStorage.removeItem("corssPageData");
+  //     } else {
+  //       vm.firstEnter = 1;
+  //     }
+  //   });
+  // },
+  beforeRouteLeave(to, from, next) {
+    if (
+      to.path == "/cms/productionorderlist/productionsorder/bst_Decorationlist"
+    ) {
+      next();
     } else {
-      localStorage.removeItem('corssPageData')
+      from.meta.keepAlive = false;
+      next();
     }
-    next(vm => {
-    });
+    // if (to.path == "/cms/productionorderlist/productionsorder/Decorationlist") {
+    //   (this.corssPageData.page_index = this.page_index),
+    //     (this.corssPageData.page_size = this.page_size),
+    //     localStorage.setItem(
+    //       "corssPageData",
+    //       JSON.stringify(this.corssPageData)
+    //     );
+    // } else {
+    //   localStorage.removeItem("corssPageData");
+    // }
   },
-  created () {
+  created() {
     // 获取用户列表
-    this.axios({ method: 'get', url: '/api/user', }).then((res) => { this.userList = res.data.data }).catch((err) => { });
+    this.axios({ method: "get", url: "/api/user" })
+      .then((res) => {
+        this.userList = res.data.data;
+      })
+      .catch((err) => {});
     // 获取紧急程度
-    this.axios.get('/api/warning_list').then(res => { this.warningList = res.data.data })
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
+    });
   },
   computed: {
-    ...mapState(['persimissionData']),
-    computedTable () {
+    ...mapState(["persimissionData"]),
+    computedTable() {
       // if (this.tableheaders.length < 1) {
-      return this.tableColums
+      return this.tableColums;
       // }
       // return this.func.computedHeader(this.tableheaders, this.tableColums)
     },
-    set_list () {
+    set_list() {
       return [
-        { title: '项目编号', name: 'Input', serverName: 'order_no', placeholder: '请输入订单编号', value: '' },
-        { title: '项目名称', name: 'Input', serverName: 'residential_name', placeholder: '请输入项目名称', value: '' },
+        {
+          title: "项目编号",
+          name: "Input",
+          serverName: "order_no",
+          placeholder: "请输入订单编号",
+          value: "",
+        },
+        {
+          title: "项目名称",
+          name: "Input",
+          serverName: "residential_name",
+          placeholder: "请输入项目名称",
+          value: "",
+        },
         // {
         //   title: '订单类型', name: 'Select', serverName: 'order_type', placeholder: '请选择', value: '',
         //   option: [
@@ -219,56 +306,95 @@ export default {
         // },
         // { title: '客户名字', name: 'Input', serverName: 'client_name', placeholder: '请输入', value: '' },
         // { title: '手机号', name: 'Input', serverName: 'mobile', placeholder: '请输入', value: '' },
-        { title: '紧急程度', name: 'Select', serverName: 'warning_state', placeholder: '请选择', value: '', optionName: 'title', optionValue: 'id', option: this.warningList },
         {
-          title: '生产状态', name: 'Select', placeholder: '请选择', serverName: 'state', value: '',
+          title: "紧急程度",
+          name: "Select",
+          serverName: "warning_state",
+          placeholder: "请选择",
+          value: "",
+          optionName: "title",
+          optionValue: "id",
+          option: this.warningList,
+        },
+        {
+          title: "生产状态",
+          name: "Select",
+          placeholder: "请选择",
+          serverName: "state",
+          value: "",
           option: [
-            { label: '未下计划', value: 0 },
-            { label: '计划中', value: 1 },
-            { label: '计划完成', value: 2 },
-          ]
+            { label: "未下计划", value: 0 },
+            { label: "计划中", value: 1 },
+            { label: "计划完成", value: 2 },
+          ],
         },
-        { title: '下单日期范围', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, serverName: 'id2', start_placeholder: '开始日期', end_placeholder: '结束日期' },
-      ]
-    }
+        {
+          title: "下单日期范围",
+          name: "Input",
+          start_server: "start_time",
+          end_server: "end_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          serverName: "id2",
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
+      ];
+    },
   },
   methods: {
-      timeFocus(e,row){
-      if(e){
-          let ids = [];
-           this.axios.post('/api/bst_get_plan_time',{type:0,id:[row.id],ids,order_no:this.planInfo.order_no}).then(res=>{
-          if(res.code == 200){
-             let time = [];
-             res.data.forEach(v=>{
-                 time.push(v*1000);
-             })
-            //  console.log(Date.parse(new Date()))
+    timeFocus(e, row) {
+      if (e) {
+        let ids = [];
+        this.axios
+          .post("/api/bst_get_plan_time", {
+            type: 0,
+            id: [row.id],
+            ids,
+            order_no: this.planInfo.order_no,
+          })
+          .then((res) => {
+            if (res.code == 200) {
+              let time = [];
+              res.data.forEach((v) => {
+                time.push(v * 1000);
+              });
+              //  console.log(Date.parse(new Date()))
               this.options = {
-        disabledDate(date) {
-          return date && (date.valueOf() < time[0]||date.valueOf()>time[1]);
-        }
-      }
-          }
-        })
+                disabledDate(date) {
+                  return (
+                    date &&
+                    (date.valueOf() < time[0] || date.valueOf() > time[1])
+                  );
+                },
+              };
+            }
+          });
       }
     },
-      finishDataTrue(){
+    finishDataTrue() {
       let arr = [];
-      this.basics_procedure_list.forEach(m=>{
-       let obj = {};
-       obj.id = m.id;
-       obj.start_time =Date.parse(m.time[0]).toString().slice(0,10)||'';
-      obj.end_time =Date.parse(m.time[1]).toString().slice(0,10)||'';
-      arr.push(obj);
-      })
+      this.basics_procedure_list.forEach((m) => {
+        let obj = {};
+        obj.id = m.id;
+        obj.start_time = Date.parse(m.time[0]).toString().slice(0, 10) || "";
+        obj.end_time = Date.parse(m.time[1]).toString().slice(0, 10) || "";
+        arr.push(obj);
+      });
       console.log(arr);
-        this.axios.post('/api/orders_plan',{order_no:this.planInfo.order_no,time_list:{...arr}}).then(res=>{
-           if(res.code==200){
-             this.$Message.success(res.msg);
-             this.show=false;
-             this.getData(this.proxyObj);
-           }
+      this.axios
+        .post("/api/orders_plan", {
+          order_no: this.planInfo.order_no,
+          time_list: { ...arr },
         })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$Message.success(res.msg);
+            this.show = false;
+            this.getData(this.proxyObj);
+          }
+        });
     },
     // sendPlanInfo(){
     //       if (!this.time[0]) {
@@ -287,143 +413,168 @@ export default {
     //     }
     //   })
     // },
-    del(row){
-       this.axios.get('/api/orders_produce_order_del',{params:{order_no:row.order_no}}).then(res=>{
-         if(res.code == 200){
-           this.$Message.success(res.msg);
-           this.getData(this.proxyObj)
-         }
-       })
+    del(row) {
+      this.axios
+        .get("/api/orders_produce_order_del", {
+          params: { order_no: row.order_no },
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$Message.success(res.msg);
+            this.getData(this.proxyObj);
+          }
+        });
     },
-    init (row) {
+    init(row) {
       // row.page_index = this.page_index;
       // row.page_size = this.page_size;
       if (this.firstEnter == 1) {
-        this.corssPageData = JSON.parse(localStorage.getItem('corssPageData'))
-        row = this.corssPageData
-        this.proxyObj = row
-        this.searchData(row)
+        this.corssPageData = JSON.parse(localStorage.getItem("corssPageData"));
+        row = this.corssPageData;
+        this.proxyObj = row;
+        this.searchData(row);
       } else {
-        this.page_index = 1
+        this.page_index = 1;
         row.page_index = this.page_index;
         row.page_size = this.page_size;
-        this.proxyObj = row
-        this.getData(row)
+        this.proxyObj = row;
+        this.getData(row);
       }
     },
-    searchData (row) {
+    searchData(row) {
       if (this.firstEnter == 1) {
         this.page_index = this.corssPageData.page_index;
         this.page_size = this.corssPageData.page_size;
-        this.set_list[0].value = this.corssPageData.order_no
+        this.set_list[0].value = this.corssPageData.order_no;
         // this.set_list[1].value = this.corssPageData.type
-        this.set_list[1].value = this.corssPageData.client_name
+        this.set_list[1].value = this.corssPageData.client_name;
         // this.set_list[3].value = this.corssPageData.mobile
-        this.set_list[2].value = this.corssPageData.warning_state
-        this.set_list[3].value = this.corssPageData.state
-        this.set_list[4].start_value = this.corssPageData.start_time ? this.corssPageData.start_time : ''
-        this.set_list[4].end_value = this.corssPageData.end_time ? this.corssPageData.end_time : ''
-        this.corssPageData.type = this.$route.query.type
-        this.getData(this.corssPageData)
+        this.set_list[2].value = this.corssPageData.warning_state;
+        this.set_list[3].value = this.corssPageData.state;
+        this.set_list[4].start_value = this.corssPageData.start_time
+          ? this.corssPageData.start_time
+          : "";
+        this.set_list[4].end_value = this.corssPageData.end_time
+          ? this.corssPageData.end_time
+          : "";
+        this.corssPageData.type = this.$route.query.type;
+        this.getData(this.corssPageData);
       } else {
-        this.page_index = 1
+        this.page_index = 1;
         row.page_index = this.page_index;
         row.page_size = this.page_size;
-        this.corssPageData.order_no = this.set_list[0].value
+        this.corssPageData.order_no = this.set_list[0].value;
         // this.corssPageData.type = this.set_list[1].value
-        this.corssPageData.client_name = this.set_list[1].value
+        this.corssPageData.client_name = this.set_list[1].value;
         // this.corssPageData.mobile = this.set_list[2].value
-        this.corssPageData.warning_state = this.set_list[2].value
-        this.corssPageData.state = this.set_list[3].value
-        this.corssPageData.start_time = this.func.setDate(this.set_list[4].start_value)
-        this.corssPageData.end_time = this.func.setDate(this.set_list[4].end_value)
-        this.proxyObj = row
-        this.getData(row)
+        this.corssPageData.warning_state = this.set_list[2].value;
+        this.corssPageData.state = this.set_list[3].value;
+        this.corssPageData.start_time = this.func.setDate(
+          this.set_list[4].start_value
+        );
+        this.corssPageData.end_time = this.func.setDate(
+          this.set_list[4].end_value
+        );
+        this.proxyObj = row;
+        this.getData(row);
       }
     },
-    changePage (e) {
+    changePage(e) {
       this.page_index = e;
       this.proxyObj.page_index = this.page_index;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    changeSize (e) {
+    changeSize(e) {
       this.page_size = e;
       this.proxyObj.page_size = this.page_size;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    getData (row) {
-      this.axios('/api/orders_produce_order_list', { params: row }).then(res => {
-        this.tableData = res.data.data;
-        this.firstEnter++
-        this.total = res.data.total;
-        this.tableheaders = res.data.tableSet || []
-      })
+    getData(row) {
+      this.axios("/api/orders_produce_order_list", { params: row }).then(
+        (res) => {
+          this.tableData = res.data.data;
+          this.firstEnter++;
+          this.total = res.data.total;
+          this.tableheaders = res.data.tableSet || [];
+        }
+      );
     },
-    goDetial (row) {
+    goDetial(row) {
       this.$router.push({
-        path: '/cms/productionorderlist/productionsorder/bst_Decorationlist',
+        path: "/cms/productionorderlist/productionsorder/bst_Decorationlist",
         query: {
           order_no: row.order_no,
-          type: 'produce',
-          oa_id:row.oa_id
-        }
-      })
+          type: "produce",
+          oa_id: row.oa_id,
+        },
+      });
     },
-    openModal (row) {
-       let order_no = [];
-       let id = [];
+    openModal(row) {
+      let order_no = [];
+      let id = [];
       if (Array.isArray(row)) {
-        if (row.length < 1) { return this.$Message.warning('请选择一项') }
-        this.planInfo.order_no = row.reduce((pre, cur, idx) => `${pre}${cur.order_no}${idx == row.length - 1 ? '' : ','}`, '')
-      row.forEach(v=>{
-        order_no.push(v.order_no);
-        id.push(v.id)
-      })
+        if (row.length < 1) {
+          return this.$Message.warning("请选择一项");
+        }
+        this.planInfo.order_no = row.reduce(
+          (pre, cur, idx) =>
+            `${pre}${cur.order_no}${idx == row.length - 1 ? "" : ","}`,
+          ""
+        );
+        row.forEach((v) => {
+          order_no.push(v.order_no);
+          id.push(v.id);
+        });
       } else {
         this.planInfo.order_no = row.order_no;
         order_no.push(row.order_no);
-        id.push(row.id)
+        id.push(row.id);
       }
-     
-      
-   this.axios.get('/api/basics_procedure_index').then(res=>{
-     this.show = true;
-         this.basics_procedure_list = res.data.data.filter(v=>{
-           return v.type==1||v.type==4
-         })
-      })
-   
+
+      this.axios.get("/api/basics_procedure_index").then((res) => {
+        this.show = true;
+        this.basics_procedure_list = res.data.data.filter((v) => {
+          return v.type == 1 || v.type == 4;
+        });
+      });
     },
-    goOriginalPage (row) {
+    goOriginalPage(row) {
       this.$router.push({
-        path: '/cms/rawmateria/index',
+        path: "/cms/rawmateria/index",
         query: {
           order_no: row.order_no,
           type: 4,
-          residential_name: row.residential_name
-        }
-      })
+          residential_name: row.residential_name,
+        },
+      });
     },
-    selectTable (e) {
+    selectTable(e) {
       this.selects = e;
     },
-    setupTableHeader () {
-      this.tableheaders.length < 1 ? this.tableheaders = this.tableColums.reduce((pre, cur) => pre.concat(cur.key), []) : ''
+    setupTableHeader() {
+      this.tableheaders.length < 1
+        ? (this.tableheaders = this.tableColums.reduce(
+            (pre, cur) => pre.concat(cur.key),
+            []
+          ))
+        : "";
       this.$setTableheader({
         list: this.tableColums,
         selects: this.tableheaders,
         then: (result) => {
-          this.tableheaders = result
-          this.axios.post('/api/update/table', { id: this.$route.query.id, result }).then(res => {
-            if (res.code == 200) {
-              this.$Message.success(res.msg)
-            }
-          })
-        }
-      })
+          this.tableheaders = result;
+          this.axios
+            .post("/api/update/table", { id: this.$route.query.id, result })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+              }
+            });
+        },
+      });
     },
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 247 - 147
src/views/ProductionOrderList/workOver/list.vue

@@ -1,61 +1,70 @@
 <template>
   <div>
-    <FullPage title='返工单'
-              :list='set_list'
-              @init='init'
-              @searchData='init'
-              @changePage='changePage'
-              @changeSize='changeSize'
-              :loading='loading'
-              :tableColums='computedTable'
-              :tableData='tableData'
-              :showPage='false'
-              :page_index='page_index'
-              :total='total'>
-      <div slot='titleButton'>
+    <FullPage
+      title="返工单"
+      :list="set_list"
+      @init="init"
+      @searchData="init"
+      @changePage="changePage"
+      @changeSize="changeSize"
+      :loading="loading"
+      :tableColums="computedTable"
+      :tableData="tableData"
+      :showPage="false"
+      :page_index="page_index"
+      :total="total"
+    >
+      <div slot="titleButton">
         <!-- <Button v-if='persimissionData["批量打印"]||persimissionData.all'
                 type="primary"
                 ghost>批量打印</Button> -->
       </div>
-      <div slot='navButton'>
-        <Button v-if='persimissionData["表头设置"]||persimissionData.all'
-                @click="setupTableHeader"
-                type="primary"
-                ghost
-                icon='ios-cog'>表头设置</Button>
+      <div slot="navButton">
+        <Button
+          v-if="persimissionData['表头设置'] || persimissionData.all"
+          @click="setupTableHeader"
+          type="primary"
+          ghost
+          icon="ios-cog"
+          >表头设置</Button
+        >
       </div>
-      <template slot="basicTypeSet"
-                slot-scope="{row}">
+      <template slot="basicTypeSet" slot-scope="{ row }">
         <div>
-          <span v-for="item in warningList"
-                :key="item.id"
-                :style="{color:item.color}"
-                v-show="item.id==row.warning_state">{{item.title}}</span>
+          <span
+            v-for="item in warningList"
+            :key="item.id"
+            :style="{ color: item.color }"
+            v-show="item.id == row.warning_state"
+            >{{ item.title }}</span
+          >
         </div>
       </template>
-      <template slot='set'
-                slot-scope='{row}'>
+      <template slot="set" slot-scope="{ row }">
         <div>
-          <a class="map-margin"
-             @click="del(row)" style="color:red">删除</a>
+          <a class="map-margin" @click="del(row)" style="color: red">删除</a>
           <!-- <a v-if='persimissionData["打印派工单"]||persimissionData.all'
              class="map-margin">打印派工单</a> -->
-          <a v-if='persimissionData["详情"]||persimissionData.all'
-             class="map-margin"
-             @click="goDetial(row)">详情</a>
+          <a
+            v-if="persimissionData['详情'] || persimissionData.all"
+            class="map-margin"
+            @click="goDetial(row)"
+            >详情</a
+          >
         </div>
       </template>
       <template slot="pageSlot">
         <div class="pageSlotStyle">
-
-          <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
-                @on-page-size-change='changeSize'
-                @on-change='changePage'
-                :current='page_index'
-                show-total
-                :total="total"
-                show-sizer
-                :page-size='page_size' />
+          <Page
+            :page-size-opts="[10, 20, 30, 40, 100, 1000]"
+            @on-page-size-change="changeSize"
+            @on-change="changePage"
+            :current="page_index"
+            show-total
+            :total="total"
+            show-sizer
+            :page-size="page_size"
+          />
         </div>
       </template>
     </FullPage>
@@ -63,34 +72,69 @@
 </template>
 
 <script>
-import { mapState } from 'vuex'
+import { mapState } from "vuex";
 export default {
-  data () {
+  data() {
     return {
       tableColums: [
-        { title: '项目编号', align: 'center', key: 'order_no', fixed: 'left', width: '200' },
+        {
+          title: "项目编号",
+          align: "center",
+          key: "order_no",
+          fixed: "left",
+          width: "200",
+        },
         // {
         //   title: '订单类型', align: 'center', key: 'renovation_type', minWidth: 150,
         //   render: (h, params) => h('span', {}, params.row.renovation_type == 1 ? '工装' : '家装')
         // },
 
-        
-        { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 200 },
-        { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 100, slot: 'basicTypeSet', },
         {
-          title: '派工开始时间', align: 'center', key: 'start_time', minWidth: 200,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.start_time * 1, 1))
+          title: "项目名称",
+          align: "center",
+          key: "residential_name",
+          minWidth: 200,
+        },
+        {
+          title: "紧急程度",
+          align: "center",
+          key: "warning_state",
+          minWidth: 100,
+          slot: "basicTypeSet",
         },
         {
-          title: '派工结束时间', align: 'center', key: 'end_time', minWidth: 200,
-          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.end_time * 1, 1))
+          title: "派工开始时间",
+          align: "center",
+          key: "start_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.start_time * 1, 1)),
         },
-        { title: '派工人员', align: 'center', key: 'nickname', minWidth: 200 },
         {
-          title: '预估工期', align: 'center', key: 'predict_time', minWidth: 200,
-          render: (h, params) => h('span', `${(params.row.predict_time / 8).toFixed(1)}天`)
+          title: "派工结束时间",
+          align: "center",
+          key: "end_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.end_time * 1, 1)),
+        },
+        { title: "派工人员", align: "center", key: "nickname", minWidth: 200 },
+        {
+          title: "预估工期",
+          align: "center",
+          key: "predict_time",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", `${(params.row.predict_time / 8).toFixed(1)}天`),
+        },
+        {
+          title: "操作",
+          align: "center",
+          key: "set",
+          slot: "set",
+          fixed: "right",
+          width: "240",
         },
-        { title: '操作', align: 'center', key: 'set', slot: 'set', fixed: 'right', width: '240' },
       ],
       tableData: [],
       page_index: 1,
@@ -102,20 +146,26 @@ export default {
       //详情页返回保留搜索数据
       corssPageData: {},
       warningList: [],
-      userList: []
-    }
+      userList: [],
+    };
   },
   computed: {
-    ...mapState(['persimissionData']),
-    computedTable () {
+    ...mapState(["persimissionData"]),
+    computedTable() {
       if (this.tableheaders.length < 1) {
-        return this.tableColums
+        return this.tableColums;
       }
-      return this.func.computedHeader(this.tableheaders, this.tableColums)
+      return this.func.computedHeader(this.tableheaders, this.tableColums);
     },
-    set_list () {
+    set_list() {
       return [
-        { title: '项目编号', name: 'Input', serverName: 'order_no', placeholder: '请输入订单编号', value: '' },
+        {
+          title: "项目编号",
+          name: "Input",
+          serverName: "order_no",
+          placeholder: "请输入订单编号",
+          value: "",
+        },
         // {
         //   title: '订单状态', name: 'Select', placeholder: '请选择', serverName: 'state', value: '',
         //   option: [
@@ -124,7 +174,18 @@ export default {
         //     { label: '生产完成', value: 2 },
         //   ]
         // },
-        { title: '派工开始时间', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, serverName: 'id2', start_placeholder: '开始日期', end_placeholder: '结束日期' },
+        {
+          title: "派工开始时间",
+          name: "Input",
+          start_server: "start_time",
+          end_server: "end_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          serverName: "id2",
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
         // {
         //   title: '订单类型', name: 'Select', serverName: 'renovation_type', placeholder: '请选择订单类型', value: '',
         //   option: [
@@ -132,58 +193,90 @@ export default {
         //     { label: '家装', value: 0 },
         //   ]
         // },
-        { title: '紧急程度', name: 'Select', serverName: 'warning_state', placeholder: '请选择', value: '', optionName: 'title', optionValue: 'id', option: this.warningList },
-        { title: '项目名称', name: 'Input', serverName: 'residential_name', placeholder: '请输入项目名称', value: '' },
         {
-          title: '派工人员', name: 'Select', serverName: 'user_id', placeholder: '请选择派工人员', optionName: 'nickname', optionValue: 'id', value: '',
-          option: this.userList
+          title: "紧急程度",
+          name: "Select",
+          serverName: "warning_state",
+          placeholder: "请选择",
+          value: "",
+          optionName: "title",
+          optionValue: "id",
+          option: this.warningList,
         },
-      ]
-    }
+        {
+          title: "项目名称",
+          name: "Input",
+          serverName: "residential_name",
+          placeholder: "请输入项目名称",
+          value: "",
+        },
+        {
+          title: "派工人员",
+          name: "Select",
+          serverName: "user_id",
+          placeholder: "请选择派工人员",
+          optionName: "nickname",
+          optionValue: "id",
+          value: "",
+          option: this.userList,
+        },
+      ];
+    },
   },
-  created () {
+  created() {
     // 获取紧急程度
-    this.axios.get('/api/warning_list').then(res => { this.warningList = res.data.data })
-    // 获取用户列表
-    this.axios({ method: 'get', url: '/api/employee_list', }).then((res) => { this.userList = res.data.data }).catch((err) => { });
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (from.path != '/cms/productionorderlist/dispatchlist/confirm') {
-        localStorage.removeItem('corssPageData')
-      } else {
-        vm.firstEnter = 1
-        vm.page_index = JSON.parse(localStorage.getItem('corssPageData')).page_index
-        vm.page_size = JSON.parse(localStorage.getItem('corssPageData')).page_size
-      }
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
     });
+    // 获取用户列表
+    this.axios({ method: "get", url: "/api/employee_list" })
+      .then((res) => {
+        this.userList = res.data.data;
+      })
+      .catch((err) => {});
   },
-  beforeRouteLeave (to, from, next) {
-    if (to.path == '/cms/productionorderlist/dispatchlist/confirm') {
-      this.corssPageData = {
-        'order_no': this.set_list[0].value,
-        'state': this.set_list[1].value,
-        'start_time': this.set_list[2].start_value,
-        'end_time': this.set_list[2].end_value,
-        'renovation_type': this.set_list[3].value,
-        'warning_state': this.set_list[4].value,
-        'residential_name': this.set_list[5].value,
-        'user_id': this.set_list[6].value,
-        'page_index': this.page_index,
-        'page_size': this.page_size
-      }
-      localStorage.setItem('corssPageData', JSON.stringify(this.corssPageData))
+  // beforeRouteEnter (to, from, next) {
+  //   next(vm => {
+  //     if (from.path != '/cms/productionorderlist/dispatchlist/confirm') {
+  //       localStorage.removeItem('corssPageData')
+  //     } else {
+  //       vm.firstEnter = 1
+  //       vm.page_index = JSON.parse(localStorage.getItem('corssPageData')).page_index
+  //       vm.page_size = JSON.parse(localStorage.getItem('corssPageData')).page_size
+  //     }
+  //   });
+  // },
+  beforeRouteLeave(to, from, next) {
+    if (to.path == "/cms/productionorderlist/workOver/details") {
+      next((vm) => {});
+    } else {
+      from.meta.keepAlive = false;
+      next((vm) => {});
     }
-    next(vm => {
-    });
+    // if (to.path == '/cms/productionorderlist/dispatchlist/confirm') {
+    //   this.corssPageData = {
+    //     'order_no': this.set_list[0].value,
+    //     'state': this.set_list[1].value,
+    //     'start_time': this.set_list[2].start_value,
+    //     'end_time': this.set_list[2].end_value,
+    //     'renovation_type': this.set_list[3].value,
+    //     'warning_state': this.set_list[4].value,
+    //     'residential_name': this.set_list[5].value,
+    //     'user_id': this.set_list[6].value,
+    //     'page_index': this.page_index,
+    //     'page_size': this.page_size
+    //   }
+    //   localStorage.setItem('corssPageData', JSON.stringify(this.corssPageData))
+    // }
+    next((vm) => {});
   },
   methods: {
-    del(row){
-       this.confirmDelete({
+    del(row) {
+      this.confirmDelete({
         content: "确认删除么?",
         then: () => {
           this.axios
-            .post("/api/orders_rework_list_del", {order_no:row.order_no})
+            .post("/api/orders_rework_list_del", { order_no: row.order_no })
             .then((res) => {
               if (res.code == 200) {
                 this.$Message.success(res.msg);
@@ -194,78 +287,85 @@ export default {
         },
       });
     },
-    init (row) {
+    init(row) {
       row.page_index = this.page_index;
       row.page_size = this.page_size;
-      console.log(1)
+      console.log(1);
       if (this.firstEnter == 1) {
-        this.corssPageData = JSON.parse(localStorage.getItem('corssPageData'))
-        row = this.corssPageData
-        this.proxyObj = row
-        this.set_list[0].value = row.order_no
-        this.set_list[1].value = row.state
-        this.set_list[2].value = row.start_time
-        this.set_list[2].value = row.end_time
-        this.set_list[3].value = row.renovation_type
-        this.set_list[4].value = row.warning_state
-        this.set_list[5].value = row.residential_name
-        this.set_list[6].value = row.user_id
-        this.firstEnter++
+        this.corssPageData = JSON.parse(localStorage.getItem("corssPageData"));
+        row = this.corssPageData;
+        this.proxyObj = row;
+        this.set_list[0].value = row.order_no;
+        this.set_list[1].value = row.state;
+        this.set_list[2].value = row.start_time;
+        this.set_list[2].value = row.end_time;
+        this.set_list[3].value = row.renovation_type;
+        this.set_list[4].value = row.warning_state;
+        this.set_list[5].value = row.residential_name;
+        this.set_list[6].value = row.user_id;
+        this.firstEnter++;
         this.$nextTick(() => {
-          this.page_index = row.page_index
-          this.page_size = row.page_size
-        })
+          this.page_index = row.page_index;
+          this.page_size = row.page_size;
+        });
       } else {
-        this.proxyObj = row
+        this.proxyObj = row;
       }
-      this.getData(row)
+      this.getData(row);
     },
-    getData (row) {
+    getData(row) {
       this.loading = true;
-      this.axios('/api/orders_rework_list', { params: row }).then(res => {
+      this.axios("/api/orders_rework_list", { params: row }).then((res) => {
         this.loading = false;
         if (res.code == 200) {
           this.tableData = res.data.data;
           this.total = res.data.total;
-          this.tableheaders = res.data.tableSet || []
+          this.tableheaders = res.data.tableSet || [];
         }
-      })
+      });
     },
-    changePage (e) {
+    changePage(e) {
       this.page_index = e;
       this.proxyObj.page_index = this.page_index;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    changeSize (e) {
+    changeSize(e) {
       this.page_size = e;
       this.proxyObj.page_size = this.page_size;
-      this.getData(this.proxyObj)
+      this.getData(this.proxyObj);
     },
-    goDetial (row) {
+    goDetial(row) {
       this.$router.push({
-        path: '/cms/productionorderlist/workOver/details',
+        path: "/cms/productionorderlist/workOver/details",
         query: {
           order_no: row.order_no,
-        }
-      })
+        },
+      });
     },
-    setupTableHeader () {
-      this.tableheaders.length < 1 ? this.tableheaders = this.tableColums.reduce((pre, cur) => pre.concat(cur.key), []) : ''
+    setupTableHeader() {
+      this.tableheaders.length < 1
+        ? (this.tableheaders = this.tableColums.reduce(
+            (pre, cur) => pre.concat(cur.key),
+            []
+          ))
+        : "";
       this.$setTableheader({
         list: this.tableColums,
         selects: this.tableheaders,
         then: (result) => {
-          this.tableheaders = result
-          this.axios.post('/api/update/table', { id: this.$route.query.id, result }).then(res => {
-            if (res.code == 200) {
-              this.$Message.success(res.msg)
-            }
-          })
-        }
-      })
+          this.tableheaders = result;
+          this.axios
+            .post("/api/update/table", { id: this.$route.query.id, result })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+              }
+            });
+        },
+      });
     },
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>