huang_an пре 2 година
родитељ
комит
f58dfc77c0

+ 257 - 68
package-lock.json

@@ -17,11 +17,13 @@
         "cropperjs": "^1.5.12",
         "echarts": "^5.3.3",
         "echarts-wordcloud": "^2.0.0",
+        "el-table-infinite-scroll": "^2.0.2",
         "ele-admin": "^1.11.2",
         "element-ui": "2.15.7",
         "github-markdown-css": "^5.1.0",
         "jsbarcode": "^3.11.5",
         "json-bigint": "^1.0.0",
+        "mathjs": "11.11.0",
         "nprogress": "^0.2.0",
         "tinymce": "^5.10.5",
         "vue": "^2.7.10",
@@ -36,7 +38,7 @@
         "vuex": "^3.6.2",
         "vuex-persistedstate": "^4.1.0",
         "xgplayer-vue": "^1.1.5",
-        "xlsx": "^0.18.5"
+        "xlsx": "^0.14.1"
       },
       "devDependencies": {
         "@vue/cli-plugin-babel": "^5.0.8",
@@ -1687,7 +1689,6 @@
       "version": "7.24.4",
       "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.4.tgz",
       "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==",
-      "dev": true,
       "dependencies": {
         "regenerator-runtime": "^0.14.0"
       },
@@ -4103,13 +4104,25 @@
       }
     },
     "node_modules/codepage": {
-      "version": "1.15.0",
-      "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz",
-      "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
+      "version": "1.14.0",
+      "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.14.0.tgz",
+      "integrity": "sha512-iz3zJLhlrg37/gYRWgEPkaFTtzmnEv1h+r7NgZum2lFElYQPi0/5bnmuDfODHxfp0INEfnRqyfyeIJDbb7ahRw==",
+      "dependencies": {
+        "commander": "~2.14.1",
+        "exit-on-epipe": "~1.0.1"
+      },
+      "bin": {
+        "codepage": "bin/codepage.njs"
+      },
       "engines": {
         "node": ">=0.8"
       }
     },
+    "node_modules/codepage/node_modules/commander": {
+      "version": "2.14.1",
+      "resolved": "https://registry.npmmirror.com/commander/-/commander-2.14.1.tgz",
+      "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw=="
+    },
     "node_modules/collection-visit": {
       "version": "1.0.0",
       "resolved": "https://registry.npmmirror.com/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -4174,6 +4187,18 @@
       "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
       "dev": true
     },
+    "node_modules/complex.js": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmmirror.com/complex.js/-/complex.js-2.1.1.tgz",
+      "integrity": "sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg==",
+      "engines": {
+        "node": "*"
+      },
+      "funding": {
+        "type": "patreon",
+        "url": "https://www.patreon.com/infusion"
+      }
+    },
     "node_modules/component-emitter": {
       "version": "1.3.0",
       "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.3.0.tgz",
@@ -4835,6 +4860,11 @@
         }
       }
     },
+    "node_modules/decimal.js": {
+      "version": "10.4.3",
+      "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
+      "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="
+    },
     "node_modules/decode-uri-component": {
       "version": "0.2.2",
       "resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
@@ -5226,6 +5256,16 @@
       "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
       "dev": true
     },
+    "node_modules/el-table-infinite-scroll": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmmirror.com/el-table-infinite-scroll/-/el-table-infinite-scroll-2.0.2.tgz",
+      "integrity": "sha512-Z2HePQqdo45+w0QrVcRaGUwBOl/J6SxJ/9d5T0pqR5Gu1y8XDcVFK525jsSWZ3/Ck+bEh9aUgf2TO7+n+tpq/w==",
+      "dependencies": {
+        "core-js": "^3.x",
+        "element-ui": "^2.12.0",
+        "vue": "^2.6.14"
+      }
+    },
     "node_modules/ele-admin": {
       "version": "1.11.2",
       "resolved": "https://registry.npmmirror.com/ele-admin/-/ele-admin-1.11.2.tgz",
@@ -5488,6 +5528,11 @@
       "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
       "dev": true
     },
+    "node_modules/escape-latex": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmmirror.com/escape-latex/-/escape-latex-1.2.0.tgz",
+      "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw=="
+    },
     "node_modules/escape-string-regexp": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -6057,6 +6102,14 @@
         "which": "bin/which"
       }
     },
+    "node_modules/exit-on-epipe": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
+      "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==",
+      "engines": {
+        "node": ">=0.8"
+      }
+    },
     "node_modules/expand-brackets": {
       "version": "2.1.4",
       "resolved": "https://registry.npmmirror.com/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -6468,7 +6521,6 @@
       "version": "4.3.4",
       "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.3.4.tgz",
       "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==",
-      "dev": true,
       "engines": {
         "node": "*"
       }
@@ -7707,6 +7759,11 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/javascript-natural-sort": {
+      "version": "0.7.1",
+      "resolved": "https://registry.npmmirror.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz",
+      "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw=="
+    },
     "node_modules/javascript-stringify": {
       "version": "2.1.0",
       "resolved": "https://registry.npmmirror.com/javascript-stringify/-/javascript-stringify-2.1.0.tgz",
@@ -8331,6 +8388,28 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/mathjs": {
+      "version": "11.11.0",
+      "resolved": "https://registry.npmmirror.com/mathjs/-/mathjs-11.11.0.tgz",
+      "integrity": "sha512-i1Ao/tv1mlNd09XlOMOUu3KMySX3S0jhHNfDPzh0sCnPf1i62x6RjxhLwZ9ytmVSs0OdhF3moI4O84VSEjmUFw==",
+      "dependencies": {
+        "@babel/runtime": "^7.22.6",
+        "complex.js": "^2.1.1",
+        "decimal.js": "^10.4.3",
+        "escape-latex": "^1.2.0",
+        "fraction.js": "4.3.4",
+        "javascript-natural-sort": "^0.7.1",
+        "seedrandom": "^3.0.5",
+        "tiny-emitter": "^2.1.0",
+        "typed-function": "^4.1.0"
+      },
+      "bin": {
+        "mathjs": "bin/cli.js"
+      },
+      "engines": {
+        "node": ">= 14"
+      }
+    },
     "node_modules/mdn-data": {
       "version": "1.1.4",
       "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-1.1.4.tgz",
@@ -10327,6 +10406,17 @@
         "renderkid": "^3.0.0"
       }
     },
+    "node_modules/printj": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmmirror.com/printj/-/printj-1.1.2.tgz",
+      "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==",
+      "bin": {
+        "printj": "bin/printj.njs"
+      },
+      "engines": {
+        "node": ">=0.8"
+      }
+    },
     "node_modules/process-nextick-args": {
       "version": "2.0.1",
       "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -10614,8 +10704,7 @@
     "node_modules/regenerator-runtime": {
       "version": "0.14.1",
       "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
-      "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
-      "dev": true
+      "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
     },
     "node_modules/regenerator-transform": {
       "version": "0.15.0",
@@ -11057,6 +11146,11 @@
         "node": ">= 8.9.0"
       }
     },
+    "node_modules/seedrandom": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmmirror.com/seedrandom/-/seedrandom-3.0.5.tgz",
+      "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
+    },
     "node_modules/select": {
       "version": "1.1.2",
       "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
@@ -11624,12 +11718,15 @@
       "dev": true
     },
     "node_modules/ssf": {
-      "version": "0.11.2",
-      "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz",
-      "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
+      "version": "0.10.3",
+      "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.10.3.tgz",
+      "integrity": "sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w==",
       "dependencies": {
         "frac": "~1.1.2"
       },
+      "bin": {
+        "ssf": "bin/ssf.njs"
+      },
       "engines": {
         "node": ">=0.8"
       }
@@ -12690,6 +12787,14 @@
         "is-typed-array": "^1.1.9"
       }
     },
+    "node_modules/typed-function": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmmirror.com/typed-function/-/typed-function-4.2.1.tgz",
+      "integrity": "sha512-EGjWssW7Tsk4DGfE+5yluuljS1OGYWiI1J6e8puZz9nTMM51Oug8CD5Zo4gWMsOhq5BI+1bF+rWTm4Vbj3ivRA==",
+      "engines": {
+        "node": ">= 18"
+      }
+    },
     "node_modules/unbox-primitive": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
@@ -13832,22 +13937,6 @@
       "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
       "dev": true
     },
-    "node_modules/wmf": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz",
-      "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
-      "engines": {
-        "node": ">=0.8"
-      }
-    },
-    "node_modules/word": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz",
-      "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
-      "engines": {
-        "node": ">=0.8"
-      }
-    },
     "node_modules/word-wrap": {
       "version": "1.2.3",
       "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz",
@@ -13998,17 +14087,17 @@
       }
     },
     "node_modules/xlsx": {
-      "version": "0.18.5",
-      "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz",
-      "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
+      "version": "0.14.1",
+      "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.14.1.tgz",
+      "integrity": "sha512-7hjB5YuyJo1fuuzXQjwuxD8LSUzE4Rxu5ToC3fB5JSunZxGjLcgKg69bEFG9GYoxeVDx5GL0k1dUodlvaQNRQw==",
       "dependencies": {
-        "adler-32": "~1.3.0",
-        "cfb": "~1.2.1",
-        "codepage": "~1.15.0",
-        "crc-32": "~1.2.1",
-        "ssf": "~0.11.2",
-        "wmf": "~1.0.1",
-        "word": "~0.3.0"
+        "adler-32": "~1.2.0",
+        "cfb": "^1.1.0",
+        "codepage": "~1.14.0",
+        "commander": "~2.17.1",
+        "crc-32": "~1.2.0",
+        "exit-on-epipe": "~1.0.1",
+        "ssf": "~0.10.2"
       },
       "bin": {
         "xlsx": "bin/xlsx.njs"
@@ -14017,6 +14106,26 @@
         "node": ">=0.8"
       }
     },
+    "node_modules/xlsx/node_modules/adler-32": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.2.0.tgz",
+      "integrity": "sha512-/vUqU/UY4MVeFsg+SsK6c+/05RZXIHZMGJA+PX5JyWI0ZRcBpupnRuPLU/NXXoFwMYCPCoxIfElM2eS+DUXCqQ==",
+      "dependencies": {
+        "exit-on-epipe": "~1.0.1",
+        "printj": "~1.1.0"
+      },
+      "bin": {
+        "adler32": "bin/adler32.njs"
+      },
+      "engines": {
+        "node": ">=0.8"
+      }
+    },
+    "node_modules/xlsx/node_modules/commander": {
+      "version": "2.17.1",
+      "resolved": "https://registry.npmmirror.com/commander/-/commander-2.17.1.tgz",
+      "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
+    },
     "node_modules/xml-name-validator": {
       "version": "4.0.0",
       "resolved": "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
@@ -15322,7 +15431,6 @@
       "version": "7.24.4",
       "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.4.tgz",
       "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==",
-      "dev": true,
       "requires": {
         "regenerator-runtime": "^0.14.0"
       }
@@ -17335,9 +17443,20 @@
       }
     },
     "codepage": {
-      "version": "1.15.0",
-      "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz",
-      "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA=="
+      "version": "1.14.0",
+      "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.14.0.tgz",
+      "integrity": "sha512-iz3zJLhlrg37/gYRWgEPkaFTtzmnEv1h+r7NgZum2lFElYQPi0/5bnmuDfODHxfp0INEfnRqyfyeIJDbb7ahRw==",
+      "requires": {
+        "commander": "~2.14.1",
+        "exit-on-epipe": "~1.0.1"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.14.1",
+          "resolved": "https://registry.npmmirror.com/commander/-/commander-2.14.1.tgz",
+          "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw=="
+        }
+      }
     },
     "collection-visit": {
       "version": "1.0.0",
@@ -17394,6 +17513,11 @@
       "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
       "dev": true
     },
+    "complex.js": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmmirror.com/complex.js/-/complex.js-2.1.1.tgz",
+      "integrity": "sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg=="
+    },
     "component-emitter": {
       "version": "1.3.0",
       "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.3.0.tgz",
@@ -17919,6 +18043,11 @@
         "ms": "2.1.2"
       }
     },
+    "decimal.js": {
+      "version": "10.4.3",
+      "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
+      "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="
+    },
     "decode-uri-component": {
       "version": "0.2.2",
       "resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
@@ -18240,6 +18369,16 @@
       "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
       "dev": true
     },
+    "el-table-infinite-scroll": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmmirror.com/el-table-infinite-scroll/-/el-table-infinite-scroll-2.0.2.tgz",
+      "integrity": "sha512-Z2HePQqdo45+w0QrVcRaGUwBOl/J6SxJ/9d5T0pqR5Gu1y8XDcVFK525jsSWZ3/Ck+bEh9aUgf2TO7+n+tpq/w==",
+      "requires": {
+        "core-js": "^3.x",
+        "element-ui": "^2.12.0",
+        "vue": "^2.6.14"
+      }
+    },
     "ele-admin": {
       "version": "1.11.2",
       "resolved": "https://registry.npmmirror.com/ele-admin/-/ele-admin-1.11.2.tgz",
@@ -18475,6 +18614,11 @@
       "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
       "dev": true
     },
+    "escape-latex": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmmirror.com/escape-latex/-/escape-latex-1.2.0.tgz",
+      "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw=="
+    },
     "escape-string-regexp": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -18903,6 +19047,11 @@
         }
       }
     },
+    "exit-on-epipe": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
+      "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="
+    },
     "expand-brackets": {
       "version": "2.1.4",
       "resolved": "https://registry.npmmirror.com/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -19258,8 +19407,7 @@
     "fraction.js": {
       "version": "4.3.4",
       "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.3.4.tgz",
-      "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==",
-      "dev": true
+      "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q=="
     },
     "fragment-cache": {
       "version": "0.2.1",
@@ -20267,6 +20415,11 @@
       "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",
       "dev": true
     },
+    "javascript-natural-sort": {
+      "version": "0.7.1",
+      "resolved": "https://registry.npmmirror.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz",
+      "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw=="
+    },
     "javascript-stringify": {
       "version": "2.1.0",
       "resolved": "https://registry.npmmirror.com/javascript-stringify/-/javascript-stringify-2.1.0.tgz",
@@ -20731,6 +20884,22 @@
         "object-visit": "^1.0.0"
       }
     },
+    "mathjs": {
+      "version": "11.11.0",
+      "resolved": "https://registry.npmmirror.com/mathjs/-/mathjs-11.11.0.tgz",
+      "integrity": "sha512-i1Ao/tv1mlNd09XlOMOUu3KMySX3S0jhHNfDPzh0sCnPf1i62x6RjxhLwZ9ytmVSs0OdhF3moI4O84VSEjmUFw==",
+      "requires": {
+        "@babel/runtime": "^7.22.6",
+        "complex.js": "^2.1.1",
+        "decimal.js": "^10.4.3",
+        "escape-latex": "^1.2.0",
+        "fraction.js": "4.3.4",
+        "javascript-natural-sort": "^0.7.1",
+        "seedrandom": "^3.0.5",
+        "tiny-emitter": "^2.1.0",
+        "typed-function": "^4.1.0"
+      }
+    },
     "mdn-data": {
       "version": "1.1.4",
       "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-1.1.4.tgz",
@@ -22257,6 +22426,11 @@
         "renderkid": "^3.0.0"
       }
     },
+    "printj": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmmirror.com/printj/-/printj-1.1.2.tgz",
+      "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ=="
+    },
     "process-nextick-args": {
       "version": "2.0.1",
       "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -22486,8 +22660,7 @@
     "regenerator-runtime": {
       "version": "0.14.1",
       "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
-      "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
-      "dev": true
+      "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
     },
     "regenerator-transform": {
       "version": "0.15.0",
@@ -22838,6 +23011,11 @@
         "ajv-keywords": "^3.5.2"
       }
     },
+    "seedrandom": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmmirror.com/seedrandom/-/seedrandom-3.0.5.tgz",
+      "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
+    },
     "select": {
       "version": "1.1.2",
       "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
@@ -23336,9 +23514,9 @@
       "dev": true
     },
     "ssf": {
-      "version": "0.11.2",
-      "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz",
-      "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
+      "version": "0.10.3",
+      "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.10.3.tgz",
+      "integrity": "sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w==",
       "requires": {
         "frac": "~1.1.2"
       }
@@ -24201,6 +24379,11 @@
         "is-typed-array": "^1.1.9"
       }
     },
+    "typed-function": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmmirror.com/typed-function/-/typed-function-4.2.1.tgz",
+      "integrity": "sha512-EGjWssW7Tsk4DGfE+5yluuljS1OGYWiI1J6e8puZz9nTMM51Oug8CD5Zo4gWMsOhq5BI+1bF+rWTm4Vbj3ivRA=="
+    },
     "unbox-primitive": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
@@ -25111,16 +25294,6 @@
       "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
       "dev": true
     },
-    "wmf": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz",
-      "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
-    },
-    "word": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz",
-      "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="
-    },
     "word-wrap": {
       "version": "1.2.3",
       "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz",
@@ -25239,17 +25412,33 @@
       }
     },
     "xlsx": {
-      "version": "0.18.5",
-      "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz",
-      "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
+      "version": "0.14.1",
+      "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.14.1.tgz",
+      "integrity": "sha512-7hjB5YuyJo1fuuzXQjwuxD8LSUzE4Rxu5ToC3fB5JSunZxGjLcgKg69bEFG9GYoxeVDx5GL0k1dUodlvaQNRQw==",
       "requires": {
-        "adler-32": "~1.3.0",
-        "cfb": "~1.2.1",
-        "codepage": "~1.15.0",
-        "crc-32": "~1.2.1",
-        "ssf": "~0.11.2",
-        "wmf": "~1.0.1",
-        "word": "~0.3.0"
+        "adler-32": "~1.2.0",
+        "cfb": "^1.1.0",
+        "codepage": "~1.14.0",
+        "commander": "~2.17.1",
+        "crc-32": "~1.2.0",
+        "exit-on-epipe": "~1.0.1",
+        "ssf": "~0.10.2"
+      },
+      "dependencies": {
+        "adler-32": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.2.0.tgz",
+          "integrity": "sha512-/vUqU/UY4MVeFsg+SsK6c+/05RZXIHZMGJA+PX5JyWI0ZRcBpupnRuPLU/NXXoFwMYCPCoxIfElM2eS+DUXCqQ==",
+          "requires": {
+            "exit-on-epipe": "~1.0.1",
+            "printj": "~1.1.0"
+          }
+        },
+        "commander": {
+          "version": "2.17.1",
+          "resolved": "https://registry.npmmirror.com/commander/-/commander-2.17.1.tgz",
+          "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
+        }
       }
     },
     "xml-name-validator": {

+ 2 - 1
package.json

@@ -22,6 +22,7 @@
     "cropperjs": "^1.5.12",
     "echarts": "^5.3.3",
     "echarts-wordcloud": "^2.0.0",
+    "el-table-infinite-scroll": "^2.0.2",
     "ele-admin": "^1.11.2",
     "element-ui": "2.15.7",
     "github-markdown-css": "^5.1.0",
@@ -42,7 +43,7 @@
     "vuex": "^3.6.2",
     "vuex-persistedstate": "^4.1.0",
     "xgplayer-vue": "^1.1.5",
-    "xlsx": "^0.18.5"
+    "xlsx": "^0.14.1"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "^5.0.8",

+ 9 - 0
src/api/warehouseManagement/outin.js

@@ -167,5 +167,14 @@ export default {
     if (res.data.code == 0) {
       return res.data;
     }
+  },
+  getListByNameOrModeType: async (data) => {
+    const res = await request.post(
+      `/main/category/getListByNameOrModeType`,
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
   }
 };

+ 2 - 0
src/main.js

@@ -12,7 +12,9 @@ import './styles/index.scss';
 import DictSelection from '@/components/Dict/DictSelection';
 import HeaderTitle from '@/components/header-title';
 import initParentStore from '../qiankun_config/store';
+import elTableInfiniteScroll from 'el-table-infinite-scroll';
 import { create, all } from 'mathjs'; // 引入mathjs工具并初始化
+Vue.use(elTableInfiniteScroll);
 const config = {
   number: 'BigNumber',
   precision: 64

+ 1 - 0
src/views/warehouseManagement/components/selectType.vue

@@ -199,6 +199,7 @@
         this.initData();
       },
       onConfirm() {
+        console.log([...this.memoSelection, ...this.multipleSelection]);
         this.$emit('selectTableData', [
           ...this.memoSelection,
           ...this.multipleSelection

+ 22 - 10
src/views/warehouseManagement/stockManagement/add.vue

@@ -2456,14 +2456,20 @@
         }
       },
       listSave(row, index) {
+        console.log('---------');
         if (this.isSplit && this.resultArray?.length > 0) {
           this.handleIsDetail(false);
         }
-        const fileds = [
-          // `warehousingMaterialList.${index}.cargoSpaceCode`,
-          `warehousingMaterialList.${index}.batchNo`,
-          `warehousingMaterialList.${index}.houseList`
-        ];
+        let fileds = [];
+        if (this.clientEnvironmentId != 2) {
+          fileds = [
+            // `warehousingMaterialList.${index}.cargoSpaceCode`,
+            `warehousingMaterialList.${index}.batchNo`,
+            `warehousingMaterialList.${index}.houseList`
+          ];
+        } else {
+          fileds = [`warehousingMaterialList.${index}.houseList`];
+        }
         if (this.formData.bizType == 1) {
           // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
         } else if (this.formData.bizType == 2) {
@@ -2484,6 +2490,7 @@
           this.$message.error('请选择资产编号!');
           return;
         }
+        console.log('---------------------');
         Promise.all(
           fileds.map(
             (item) =>
@@ -2527,11 +2534,16 @@
         let showMessage = true;
         rows.forEach((row, i) => {
           const index = indexes[i];
-          const fileds = [
-            // `warehousingMaterialList.${index}.cargoSpaceCode`,
-            `warehousingMaterialList.${index}.batchNo`,
-            `warehousingMaterialList.${index}.houseList`
-          ];
+          let fileds = [];
+          if (this.clientEnvironmentId != 2) {
+            fileds = [
+              // `warehousingMaterialList.${index}.cargoSpaceCode`,
+              `warehousingMaterialList.${index}.batchNo`,
+              `warehousingMaterialList.${index}.houseList`
+            ];
+          } else {
+            fileds = [`warehousingMaterialList.${index}.houseList`];
+          }
           if (this.formData.bizType == 1) {
             // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
           } else if (this.formData.bizType == 2) {

+ 2863 - 0
src/views/warehouseManagement/stockManagement/add_export.vue

@@ -0,0 +1,2863 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <header-title title="基本信息">
+        <el-upload
+          ref="fileUploadBtn"
+          action="#"
+          :auto-upload="false"
+          :on-change="onChange"
+          :limit="1"
+          :show-file-list="false"
+          accept=".xls,.xlsx"
+        >
+          <el-button type="primary">导入excel</el-button>
+        </el-upload>
+      </header-title>
+      <el-form
+        :model="formData"
+        ref="formName"
+        label-width="110px"
+        :rules="rules"
+      >
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="物品类型" prop="extInfo.assetType">
+              <selectTree
+                ref="tree"
+                :isBindPlan="true"
+                class="form-ipt"
+                size="medium"
+                style="width: 100%"
+                clearable
+                :value="formData.extInfo.assetType"
+                :options="codeList"
+                :props="{
+                  value: 'id',
+                  label: 'name',
+                  children: 'children'
+                }"
+                @getValue="codeListValue"
+                :isAll="false"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="入库类型" prop="bizType">
+              <el-select
+                :disabled="true"
+                @change="onClear"
+                filterable
+                placeholder="请选择"
+                v-model="formData.bizType"
+              >
+                <el-option
+                  v-for="item in sceneState"
+                  :key="item.code"
+                  :value="item.code + ''"
+                  :label="item.label"
+                ></el-option>
+              </el-select> </el-form-item
+          ></el-col>
+          <el-col :span="8">
+            <el-form-item label="采购收货单" prop="documentSource">
+              <el-input
+                :disabled="true"
+                placeholder="请输入"
+                v-model="formData.extInfo.documentSource"
+              >
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="权属部门" prop="deptName">
+              <el-input
+                placeholder="权属部门"
+                disabled
+                v-model="formData.extInfo.deptName"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="入库登记人">
+              <el-input
+                placeholder="登记人"
+                disabled
+                v-model="formData.extInfo.createUserName"
+                clearable /></el-form-item
+          ></el-col>
+          <el-col :span="8" v-if="formData.bizType == 2">
+            <el-form-item label="供应商" prop="supplierName">
+              <el-input
+                placeholder="请输入"
+                clearable
+                v-model="formData.extInfo.supplierName"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="送货人" prop="fromUser">
+              <el-input
+                placeholder="请输入"
+                v-model="formData.fromUser"
+                clearable
+              /> </el-form-item
+          ></el-col>
+          <el-col :span="8">
+            <el-form-item label="送货人联系方式" prop="deliveryPhone">
+              <el-input
+                placeholder="请输入"
+                v-model="formData.extInfo.deliveryPhone"
+                clearable /></el-form-item
+          ></el-col>
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remark">
+              <el-input
+                v-model="formData.remark"
+                clearable
+                type="textarea"
+                placeholder="请详细说明"
+                :rows="4"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div class="material">
+        <header-title title="产品信息">
+          <!-- <el-button v-if="!isOutsourcing" type="primary" @click="addStock"
+            >添加</el-button
+          > -->
+        </header-title>
+
+        <div class="mt10 form-table">
+          <el-form
+            ref="warehousingMaterialListRef"
+            :model="{ warehousingMaterialList: warehousingMaterialList }"
+            :show-message="false"
+          >
+            <!-- <el-button
+              v-if="warehousingMaterialList.length != 0"
+              type="success"
+              plain
+              style="margin-bottom: 20px; float: right; margin-right: 20px"
+              size="mini"
+              @click="listSaveArrs"
+              >批量保存</el-button
+            > -->
+            <el-table
+              v-if="isWeight"
+              :header-cell-style="rowClass"
+              :max-height="300"
+              ref="warehousingMaterialListTable"
+              :key="formData.extInfo.assetType"
+              :data="warehousingMaterialList"
+              tooltip-effect="dark"
+              style="width: 100%"
+              stripe
+            >
+              <el-table-column
+                label="序号"
+                type="index"
+                width="50"
+                align="center"
+              >
+              </el-table-column>
+
+              <el-table-column
+                label="编码"
+                prop="assetCode"
+                align="center"
+                width="130"
+                :show-overflow-tooltip="true"
+              ></el-table-column>
+              <el-table-column
+                label="名称"
+                align="center"
+                width="200"
+                prop="assetName"
+                :show-overflow-tooltip="true"
+              ></el-table-column>
+              <el-table-column
+                v-for="(item, index) in tableHeader"
+                :key="index"
+                align="center"
+                :label="item.label"
+                :width="item.width"
+                :prop="item.prop"
+                :show-overflow-tooltip="true"
+              >
+                <template slot-scope="{ row }">
+                  <template v-if="item.formatter">{{
+                    item.formatter(row)
+                  }}</template>
+                  <template v-else>{{ row[item.prop] }}</template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="批号"
+                width="100"
+                prop="manualBatchNo"
+              ></el-table-column>
+              <el-table-column
+                v-if="clientEnvironmentId != 2"
+                label="批次号"
+                prop="batchNo"
+                width="70"
+                align="center"
+              >
+              </el-table-column>
+
+              <el-table-column
+                label="最小包装单元"
+                align="center"
+                prop="minPackingCount"
+                width="100"
+              >
+                <el-table-column label="" prop="minPackingCount" width="100">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.minPackingCount }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="" prop="minPackingCount">
+                  <template slot-scope="{ row, $index }">
+                    {{ handleRowUnit(row) }} /{{ row.minPackUnit }}
+                  </template>
+                </el-table-column>
+              </el-table-column>
+              <el-table-column
+                label="包装数量"
+                prop="outInNum"
+                width="150"
+                align="center"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template>
+                    {{ row.outInNum }} {{ row.minPackUnit }}
+                  </template>
+                </template>
+              </el-table-column>
+              <el-table-column label="计量数量" prop="counts">
+                <template slot-scope="{ row, $index }">
+                  {{ $math.format(row.minPackingCount * row.outInNum, 14) }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="计量单位"
+                prop="batchNo"
+                width="100"
+                align="center"
+              >
+                <!-- v-if="formData.extInfo.assetType == 1" -->
+
+                <template slot-scope="{ row, $index }">
+                  <template>
+                    {{ row.measuringUnit }}
+                  </template>
+                </template>
+              </el-table-column>
+              <!-- <el-table-column
+                label="计量单位"
+                prop="batchNo"
+                width="100"
+                align="center"
+                v-if="formData.extInfo.assetType == 4"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template>
+                    {{ row.measuringUnit }}
+                  </template>
+                </template>
+              </el-table-column> -->
+
+              <!-- <el-table-column
+                label="数量"
+                prop="batchNo"
+                width="150"
+                align="center"
+                v-if="formData.extInfo.assetType == 1"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template> {{ row.outInNum }} </template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="数量"
+                prop="batchNo"
+                width="150"
+                align="center"
+                v-if="formData.extInfo.assetType == 4"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template>
+                    {{ row.minPackingCount * row.outInNum }}
+                  </template>
+                </template>
+              </el-table-column> -->
+
+              <el-table-column
+                label="重量"
+                align="center"
+                prop="contentImage"
+                :show-overflow-tooltip="true"
+              >
+                <!-- v-if="formData.extInfo.assetType == 1" -->
+                <template slot-scope="{ row, $index }">
+                  {{ row.weight }}
+                  <template slot="append">
+                    {{ handleRowUnit(row) }}
+                    <!-- {{
+                          { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
+                        }} -->
+                  </template>
+                </template>
+              </el-table-column>
+              <!-- <el-table-column
+                label="重量"
+                align="center"
+                prop="contentImage"
+                :show-overflow-tooltip="true"
+                v-if="formData.extInfo.assetType == 4"
+              >
+                <template slot-scope="{ row, $index }">
+                  {{
+                    deviceWeight(
+                      row.roughWeight,
+                      row.minPackingCount * row.outInNum
+                    )
+                  }}
+                  <template slot="append"> -->
+              <!-- {{ handleRowUnit(row) }} -->
+              <!-- {{
+                          { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
+                        }} -->
+              <!-- </template>
+                </template>
+              </el-table-column> -->
+              <el-table-column
+                label="重量单位"
+                align="center"
+                prop="contentImage"
+                :show-overflow-tooltip="true"
+              >
+                <template slot-scope="{ row, $index }">
+                  {{ row.weightUnit }}
+                  <template slot="append"> </template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="单价"
+                prop="univalence"
+                width="150"
+                align="center"
+              >
+                <template slot-scope="{ row, $index }">
+                  <!-- <template v-if="row.isSave || formData.bizType == 5">
+                    <template v-if="row.univalence || row.univalence === 0">
+                      {{ row.univalence
+                      }}{{
+                        { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
+                      }}
+                    </template>
+                  </template> -->
+                  <!-- v-else -->
+                  <el-form-item
+                    :prop="`warehousingMaterialList.${$index}.univalence`"
+                  >
+                    {{ row.univalence }}元/{{ handleRowUnit(row) }}
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="金额"
+                align="center"
+                prop="contentImage"
+                :show-overflow-tooltip="true"
+              >
+                <template slot-scope="{ row, $index }">
+                  {{
+                    calcSumTotal(
+                      row.outInNum,
+                      row.minPackingCount,
+                      row.univalence,
+                      row
+                    )
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="货位"
+                prop="warehouseName"
+                :show-overflow-tooltip="true"
+                width="250"
+                required
+              >
+                <template slot-scope="{ row, $index }">
+                  <el-form-item
+                    :prop="`warehousingMaterialList.${$index}.houseList`"
+                    :required="true"
+                  >
+                    <div @click="handleWareHouse(row, $index)">
+                      <div
+                        style="color: #ff4949"
+                        v-if="row.houseList.length == 0"
+                      >
+                        ---(必填)
+                      </div>
+                      <div v-else>
+                        <div
+                          class="fontOmitted"
+                          v-for="(item, index) in row.houseList"
+                          :key="index"
+                        >
+                          {{ item.warehouseName }}- {{ item.areaName }}-
+                          {{ item.shelfCode }}- {{ item.cargoSpaceCode
+                          }}<span style="color: #ff4949" v-if="item.num">
+                            - {{ item.num }}(数)</span
+                          >
+                          <br />
+                        </div>
+                      </div>
+                    </div>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-form>
+        </div>
+        <div class="mt20">
+          <header-title :title="`包装明细`">
+            <!-- <div class="switch_right">
+              <span v-if="materialCodeReqList.length != 0">
+                分拆<el-switch
+                  v-model="isSplit"
+                  active-color="#13ce66"
+                  inactive-color="#ff4949"
+                  @change="handleIsDetail"
+                  style="margin-left: 10px"
+                >
+                </el-switch>
+              </span>
+
+              <el-button
+                style="margin-left: 20px"
+                type="text"
+                @click="dateSetting"
+                v-if="!isSplit && formData.bizType != 5"
+                >批量设置{{
+                  curDateType === 'manufactureTime' ? '生产日期' : '采购日期'
+                }}</el-button
+              >
+            </div> -->
+          </header-title>
+          <!-- <el-button
+            v-if="materialCodeReqList.length != 0"
+            type="success"
+            plain
+            style="margin-bottom: 20px; float: right; margin-right: 20px"
+            size="mini"
+            @click="wrapListSave"
+            >批量保存</el-button
+          > -->
+          <el-table
+            v-if="isWrapTable"
+            ref="materialCodeReqListTable"
+            :data="showMaterialCodeReqList"
+            tooltip-effect="dark"
+            :key="formData.bizType"
+            :header-cell-style="rowClass"
+            style="width: 100%"
+            stripe
+            height="300px"
+            v-el-table-infinite-scroll="wrapHandleScroll"
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              prop="assetCode"
+              width="130"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              prop="assetName"
+              width="200"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="批号"
+              prop="manualBatchNo"
+              width="100"
+            ></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId != 2"
+              label="批次号"
+              prop="batchNo"
+              width="70"
+            ></el-table-column>
+            <el-table-column
+              :label="`包装编码`"
+              prop="onlyCode"
+              width="200"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="packingCount"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="packingUnit"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="minPackingCount"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measuringUnit"
+            ></el-table-column>
+            <el-table-column label="物料代号" prop="materielCode" width="130">
+            </el-table-column>
+            <el-table-column label="客户代号" prop="clientCode">
+            </el-table-column>
+            <el-table-column label="刻码" prop="engrave"> </el-table-column>
+            <el-table-column label="重量" prop="weight" width="100">
+            </el-table-column>
+            <el-table-column label="重量单位" prop="weightUtil">
+            </el-table-column>
+            <el-table-column label="质检结果" prop="result" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityResults[row.result] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="质检状态" prop="status" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityStatus[row.status] }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <!-- </el-tab-pane>
+        </el-tabs> -->
+        </div>
+        <div class="mt20" v-if="isSplit">
+          <header-title :title="`物料明细`"> </header-title>
+          <!-- <el-button
+            v-if="resultArray.length != 0"
+            type="success"
+            plain
+            style="margin-bottom: 20px; float: right; margin-right: 20px"
+            size="mini"
+            @click="materialListSave"
+            >批量保存</el-button
+          > -->
+          <el-table
+            v-if="isMaterialTable"
+            ref="resultArrayTable"
+            :data="showResultArray"
+            tooltip-effect="dark"
+            :key="formData.bizType"
+            :header-cell-style="rowClass"
+            style="width: 100%"
+            stripe
+            height="300px"
+            v-el-table-infinite-scroll="materielHandleScroll"
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              width="130"
+              prop="assetCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              prop="assetName"
+              width="200"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="批号"
+              prop="manualBatchNo"
+              width="100"
+            ></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId != 2"
+              label="批次号"
+              prop="batchNo"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              label="物料编码"
+              prop="no"
+              width="200"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="minPackingCount"
+              width="90"
+            ></el-table-column>
+            <el-table-column
+              width="80"
+              label="计量单位"
+              prop="measuringUnit"
+            ></el-table-column>
+            <el-table-column label="物料代号" prop="materielCode" width="130">
+            </el-table-column>
+            <el-table-column label="客户代号" prop="clientCode">
+            </el-table-column>
+            <el-table-column label="刻码" prop="engrave"> </el-table-column>
+            <el-table-column label="重量" prop="weight" width="100">
+            </el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              width="100"
+            ></el-table-column>
+            <el-table-column label="质检结果" prop="result" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityResults[row.result] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="质检状态" prop="status" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityStatus[row.status] }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="center mt20">
+        <el-button type="primary" @click="handleSave" :loading="saveLoading"
+          >保存</el-button
+        >
+        <el-button @click="$router.go(-1)">返回</el-button>
+      </div>
+    </el-card>
+
+    <selectType
+      :visibleDialog.sync="visibleDialog"
+      :title="title"
+      :tableHeader="tableHeader"
+      :bizScene="formData.bizType"
+      :type="[selectEquiType]"
+      :loadTree.sync="loadTree"
+      @selectTableData="addProduct"
+    />
+    <WareHouseDailog
+      ref="wareHouseDailogRef"
+      @houseData="houseData"
+    ></WareHouseDailog>
+    <ReturnSelect
+      ref="returnSelectRef"
+      :tableHeader="tableHeader"
+      :curDateType="curDateType"
+    ></ReturnSelect>
+    <el-dialog :visible.sync="dateVisible" title="选择日期" width="400px">
+      <el-date-picker
+        size="small"
+        v-model="batchTime"
+        type="datetime"
+        style="width: 320px"
+        value-format="yyyy-MM-dd HH:mm:ss"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <div style="text-align: right; margin-top: 20px">
+        <el-button @click="dateVisible = false">取消</el-button>
+        <el-button type="primary" @click="dateConfirm" :disabled="!batchTime"
+          >确认</el-button
+        >
+      </div>
+    </el-dialog>
+    <!-- 出库单 -->
+    <stockOutOrder ref="stockOutOrderRef" @success="stockOutOrderSuccess" />
+    <!-- 销售订单 -->
+    <picker ref="pickerRef" @success="pickerSuccess" />
+    <!-- 委外订单 -->
+    <outsourcedOrders
+      ref="outsourcedOrdersRef"
+      @success="outsourcedOrdersSuccess"
+    />
+  </div>
+</template>
+
+<script>
+  import elTableInfiniteScroll from 'el-table-infinite-scroll';
+  import XLSX from 'xlsx';
+  import { add, bignumber } from 'mathjs';
+  import picker from './components/picker.vue';
+  import stockOutOrder from './components/stockOutOrder.vue';
+  import outsourcedOrders from './components/outsourcedOrders.vue';
+  import outin from '@/api/warehouseManagement/outin';
+  import {
+    getTreeByPid,
+    getTreeByGroup,
+    getProductList
+  } from '@/api/classifyManage';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import selectUpload from '@/components/selectUpload';
+  import upload from '@/components/uploadImg';
+  import {
+    warehousingType,
+    sceneState,
+    emergencyState,
+    materialType
+  } from '@/utils/dict/index';
+  // import { getInfo, warehousingAdd, getAssetNum } from '@/api/stockManagement';
+  import selectTree from '@/components/selectTree';
+  import selectType from '../components/selectType.vue';
+  import WareHouseDailog from '../components/WareHouseDailog.vue';
+  import ReturnSelect from './components/ReturnSelect.vue';
+  // import supplier from '@/api/main/supplier';
+  // import org from '@/api/main/org';
+  // import user from '@/api/main/user';
+  import { tableHeader } from '../common';
+  import { getCode } from '@/api/codeManagement/index.js';
+  import { number } from 'echarts/core';
+  import { purchaseorderGetById, contactlink, oneId } from '@/api/mes';
+  export default {
+    components: {
+      selectUpload,
+      selectTree,
+      selectType,
+      WareHouseDailog,
+      upload,
+      ReturnSelect,
+      picker,
+      outsourcedOrders,
+      stockOutOrder
+    },
+    directives: {
+      'el-table-infinite-scroll': elTableInfiniteScroll
+    },
+    data() {
+      return {
+        pageSize: 20,
+        wrapPageNum: 1,
+        materielPageNum: 1,
+        showResultArray: [],
+        loadingWrapMore: false,
+        loadingMaterielMore: false,
+        showMaterialCodeReqList: [],
+        qualityStatusOptions: [
+          {
+            label: '合格',
+            value: '0'
+          },
+          {
+            label: '不合格',
+            value: '1'
+          },
+          {
+            label: '让步接收',
+            value: '3'
+          }
+        ],
+        isWrapTable: true, // 包装表格显隐
+        isMaterialTable: true, // 物料表格显隐
+        isOutsourcing: false, // 是否委外
+        stockOutOrders: '',
+        isSplit: false, // 是否拆分到物料明细
+        qualityStatus: {
+          0: '未检',
+          1: '已检',
+          2: '部分检'
+        }, // 质检状态 0未检 1已检
+        qualityResults: {
+          0: '合格',
+          1: '不合格',
+          3: '让步接收'
+        }, // 质检结果 0合格 1不合格 3让步接收
+        isWeight: true,
+        resultArray: [],
+        contactList: [],
+        pickerRow: {},
+        outsourcedOrdersRow: {},
+        fromUserList: [],
+        codeList: [],
+        materialType,
+        warehousingType,
+        sceneState,
+        emergencyState,
+        saveLoading: false,
+        visibleDialog: false,
+        curDateType: 'manufactureTime',
+        materialCodeReqListSelected: [],
+        // warehouseList: [], //仓库数组
+        // warehouse: {},
+        title: '',
+        tableData2: [],
+        uploadList: [],
+        supplierList: [],
+        warehousingMaterialList: [],
+        activeName: 'a',
+        loadTree: true,
+        selectEquiType: '',
+        batchTime: '',
+        dateVisible: false,
+        treeList: [],
+        staffList: [],
+
+        formData: {
+          extInfo: {
+            assetType: '', //物品类型
+            deptCode: '', //部门code
+            deptName: '', //部门名称
+            verifyDeptCode: '', //审核部门编码
+            verifyDeptName: '', //审核部门名称
+            deliveryName: '', //送货人名称
+            deliveryPhone: '', //送货人电话
+            documentSource: '', //销售订单
+            urgent: '', //紧急状态
+            supplierId: '', //供应商ID
+            supplierName: '', //供应商名称
+            createUserName: '', //创建人名字
+            contentImage: [] //图片数组
+          },
+          fromUser: '', //送货人
+          bizType: '2', //物品类型
+          verifyId: '', //审核人Id
+          verifyName: '', //审核人名称
+          createUserId: '',
+          remark: ''
+        },
+        rules: {
+          'extInfo.assetType': {
+            required: true,
+            message: '请选择物品类型',
+            trigger: 'change'
+          },
+          bizType: {
+            required: true,
+            message: '请选择入库场景',
+            trigger: 'change'
+          }
+        }
+      };
+    },
+    computed: {
+      // 条码信息
+      materialCodeReqList() {
+        return this.warehousingMaterialList
+          .map((i) => i.warehouseLedgerDetails || [])
+          .flat();
+      },
+      tableHeader() {
+        return tableHeader(this.selectEquiType);
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
+    },
+    created() {
+      if (this.$route.query.id) {
+        // this._getInfo()
+      } else {
+        let obj = localStorage.getItem('orgInfo')
+          ? JSON.parse(localStorage.getItem('orgInfo'))
+          : {};
+        this.formData.createUserName = obj.name;
+        this.formData.extInfo.deptName = obj.dept?.name;
+        this.formData.deptCode = obj.dept?.code;
+      }
+      this.initData();
+    },
+    methods: {
+      wrapHandleScroll() {
+        console.log('---------wrapHandleScroll------------');
+        this.wrapPageNum += 1;
+        this.wrapFetchData();
+        // console.log(event);
+        // const target = event.target;
+        // // 计算是否滚动到底部
+        // if (
+        //   target.scrollHeight - target.scrollTop <= target.clientHeight &&
+        //   this.showMaterialCodeReqList.length < this.materialCodeReqList.length
+        // ) {
+        //   if (!this.loadingWrapMore) {
+        //     this.loadingWrapMore = true;
+        //     setTimeout(() => {
+        //       this.wrapPageNum += 1;
+        //       this.wrapFetchData();
+        //       this.loadingWrapMore = false;
+        //     }, 1000);
+        //   }
+        // }
+      },
+      wrapFetchData() {
+        const start = (this.wrapPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showMaterialCodeReqList = this.showMaterialCodeReqList.concat(
+          this.materialCodeReqList.slice(start, end)
+        );
+      },
+      materielHandleScroll() {
+        console.log('----------materielHandleScroll-----------');
+        this.materielPageNum += 1;
+        this.materielFetchData();
+        // console.log(event);
+        // const target = event.target;
+        // // 计算是否滚动到底部
+        // if (
+        //   target.scrollHeight - target.scrollTop <= target.clientHeight &&
+        //   this.showResultArray.length < this.resultArray.length
+        // ) {
+        //   if (!this.loadingMaterielMore) {
+        //     this.loadingMaterielMore = true;
+        //     setTimeout(() => {
+        //       this.materielPageNum += 1;
+        //       this.materielFetchData();
+        //       this.loadingMaterielMore = false;
+        //     }, 1000);
+        //   }
+        // }
+      },
+      materielFetchData() {
+        const start = (this.materielPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showResultArray = this.showResultArray.concat(
+          this.resultArray.slice(start, end)
+        );
+      },
+      handleAvatarSuccess() {
+        this.$refs.fileUploadBtn.clearFiles(); //上传成功之后清除历史记录**加粗样式**
+      },
+      async onChange(file) {
+        console.log(XLSX);
+        this.warehousingMaterialList = [];
+        this.resultArray = [];
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中...'
+        });
+        /**
+         * 1. 使用原生api去读取好的文件
+         * */
+        // console.log("原始上传的文件", file);
+        // 读取文件不是立马能够读取到的,所以是异步的,使用Promise
+        let dataBinary = await new Promise((resolve) => {
+          // Web API构造函数FileReader,可实例化对象,去调用其身上方法,去读取解析文件信息
+          let reader = new FileReader(); // https://developer.mozilla.org/zh-CN/docs/Web/API/FileReader
+          // console.log("实例化对象有各种方法", reader);
+          reader.readAsBinaryString(file.raw); // 读取raw的File文件
+          reader.onload = (ev) => {
+            // console.log("文件解析流程进度事件", ev);
+            resolve(ev.target.result); // 将解析好的结果扔出去,以供使用
+          };
+        });
+        // console.log("读取出的流文件", dataBinary);
+
+        /**
+         * 2. 使用xlsx插件去解析已经读取好的二进制excel流文件
+         * */
+        let workBook = XLSX.read(dataBinary, {
+          type: 'binary',
+          cellDates: true
+        });
+        // excel中有很多的sheet,这里取了第一个sheet:workBook.SheetNames[0]
+        let firstWorkSheet = workBook.Sheets[workBook.SheetNames[0]];
+        // 分为第一行的数据,和第一行下方的数据
+        // const header = this.getHeaderRow(firstWorkSheet);
+        // console.log('读取的excel表头数据(第一行)', header);
+        const xlsxData = XLSX.utils.sheet_to_json(firstWorkSheet);
+        console.log('读取所有excel数据', xlsxData);
+        let modelTypeList = xlsxData.map((item) => {
+          return item['型号'];
+        });
+        let nameList = xlsxData.map((item) => {
+          return item['物品名'];
+        });
+        this.formData.extInfo.assetType = '6'; //备品备件
+        this.selectEquiType = '6';
+        this.title = '备品备件';
+        this.formData.bizType = '2'; // 采购入库
+        outin
+          .getListByNameOrModeType({
+            modelTypeList,
+            nameList,
+            categoryLevelId: '6'
+          })
+          .then(async (data) => {
+            console.log('查询到的备件数据', data);
+            let list = data.map((item) => {
+              return {
+                ...item,
+                assetCode: item.code,
+                assetId: item.id,
+                assetName: item.name,
+                curId: item.id,
+                minPackUnit: item.packingUnit,
+                unit: item.measuringUnit
+              };
+            });
+            await this.onSelectTableData(list);
+            this.warehousingMaterialList = this.warehousingMaterialList.map(
+              (item) => {
+                // 添加包装数量和最小包装单元
+                let filterArray = xlsxData.filter(
+                  (xlsxItem) =>
+                    xlsxItem['物品名'] == item.assetName &&
+                    xlsxItem['型号'] == item.modelType
+                );
+                if (filterArray.length > 0) {
+                  item.minPackingCount = 1;
+                  item.outInNum = filterArray[0]['数量'];
+                }
+                // 添加固定货位
+                item.houseList = [
+                  {
+                    areaId: '1746702944766128130',
+                    areaName: '备件1号库区',
+                    cargoSpaceCode: '01',
+                    cargoSpaceId: '1746702944837431297',
+                    num: 10,
+                    shelfCode: 'A',
+                    shelfId: '1746702944791293954',
+                    warehouseId: '1746702427377758210',
+                    warehouseName: '型材分公司-备品备件库1号仓'
+                  }
+                ];
+                return { ...item };
+              }
+            );
+            // 物品批量保存
+            await this.listSaveArrs();
+            // 分拆包装
+            console.log('total--------------------');
+            this.handleIsDetail(true);
+            this.wrapFetchData();
+            this.materielFetchData();
+            this.handleAvatarSuccess();
+            loading.close();
+          })
+          .catch(() => {
+            loading.close();
+          });
+      },
+      getHeaderRow(sheet) {
+        const headers = []; // 定义数组,用于存放解析好的数据
+        const range = XLSX.utils.decode_range(sheet['!ref']); // 读取sheet的单元格数据
+        let C;
+        const R = range.s.r;
+        /* start in the first row */
+        for (C = range.s.c; C <= range.e.c; ++C) {
+          /* walk every column in the range */
+          const cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })];
+          /* find the cell in the first row */
+          let hdr = 'UNKNOWN ' + C; // <-- replace with your desired default
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell);
+          headers.push(hdr);
+        }
+        return headers; // 经过上方一波操作遍历,得到最终的第一行头数据
+      },
+      // 键盘移动
+      moveFocus(event, index, key, type, row) {
+        let keyfield = [];
+        let listLength = 0;
+        switch (type) {
+          case '产品':
+            listLength = this.warehousingMaterialList.length;
+            keyfield = [
+              'manualBatchNo',
+              'minPackingCount',
+              'outInNum',
+              'univalence'
+            ];
+            break;
+          case '包装':
+            listLength = this.materialCodeReqList.length;
+            if (row.measuringUnit != row.weightUtil) {
+              keyfield = ['materielCode', 'clientCode', 'engrave', 'weight'];
+            } else {
+              keyfield = ['materielCode', 'clientCode', 'engrave'];
+            }
+            break;
+          case '物料':
+            listLength = this.resultArray.length;
+            if (row.measuringUnit != row.weightUnit) {
+              keyfield = ['materielCode', 'clientCode', 'engrave', 'weight'];
+            } else {
+              keyfield = ['materielCode', 'clientCode', 'engrave'];
+            }
+            break;
+        }
+
+        if (event.keyCode === 13) {
+          // 回车
+          if (
+            index === listLength - 1 &&
+            key === keyfield[keyfield.length - 1]
+          ) {
+            // 最后一行最后一个
+            return;
+          }
+
+          this.$refs[key + index].blur();
+          if (key === keyfield[keyfield.length - 1]) {
+            // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
+            this.$refs[keyfield[0] + (index + 1)].focus();
+          } else {
+            // 跳转下一个
+            const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[nextkeyindex] + index].focus();
+            });
+          }
+        }
+
+        // 向上 =38
+        if (event.keyCode === 38) {
+          console.log('向上');
+          if (index === 0) {
+            // 第一行
+            console.log('第一行无法向上');
+            return;
+          }
+          this.$refs[key + index].blur();
+          this.$nextTick(() => {
+            if (this.$refs[key + (index - 1)].value == 0) {
+              this.$refs[key + (index - 1)].value = '';
+            }
+            this.$refs[key + (index - 1)].focus();
+          });
+        }
+
+        // 下 = 40
+        if (event.keyCode === 40) {
+          console.log('向下');
+          if (index === listLength - 1) {
+            // 最后一行
+            console.log('最后一行无法向下');
+            return;
+          }
+          this.$refs[key + index].blur();
+          this.$nextTick(() => {
+            if (this.$refs[key + (index + 1)].value == 0) {
+              this.$refs[key + (index + 1)].value = '';
+            }
+            this.$refs[key + (index + 1)].focus();
+          });
+        }
+
+        // 左 = 37
+        if (event.keyCode === 37) {
+          console.log('向左');
+          if (index === 0 && key === keyfield[0]) {
+            // 第一行第一个
+            console.log('第一行第一个无法向左');
+            return;
+          }
+          this.$refs[key + index].blur();
+          if (key === keyfield[0]) {
+            if (
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value == 0
+            ) {
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value =
+                '';
+            }
+            // 当前行第一个,跳转上一行最后一个
+            this.$refs[keyfield[keyfield.length - 1] + (index - 1)].focus();
+          } else {
+            // 跳转上一个
+            const prevkeyindex = keyfield.findIndex((k) => k === key) - 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[prevkeyindex] + index].value == 0) {
+                this.$refs[keyfield[prevkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[prevkeyindex] + index].focus();
+            });
+          }
+        }
+
+        // 右 = 39
+        if (event.keyCode === 39) {
+          console.log('向右');
+          if (
+            index === listLength - 1 &&
+            key === keyfield[keyfield.length - 1]
+          ) {
+            // 最后一行最后一个
+            console.log('最后一行最后一个无法向左');
+            return;
+          }
+          this.$refs[key + index].blur();
+          if (key === keyfield[keyfield.length - 1]) {
+            // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
+            this.$refs[keyfield[0] + (index + 1)].focus();
+          } else {
+            // 跳转下一个
+            const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[nextkeyindex] + index].focus();
+            });
+          }
+        }
+      },
+      // 包装维度最小包装单元改变——>总重量
+      minPackingCountChange(row, value) {
+        if (value >= 0) {
+          row.minPackingCount = value.replace(/^[0]+/, '');
+        } else {
+          row.minPackingCount = 0;
+        }
+        // row.minPackingCount = value.replace(/^(0+)|[^\d]+/g, '');
+        if (row.outInNum >= 0 && value >= 0) {
+          this.packNum(row, row.outInNum);
+        }
+      },
+      // 选择质检结果改变质检状态
+      changeWrapStatus(resultValue, row) {
+        switch (resultValue) {
+          case '':
+            // 清空质检状态
+            row.status = '0';
+            break;
+          default:
+            // 默认已检质检状态
+            row.status = '1';
+            break;
+        }
+      },
+      // 包装批量保存
+      wrapListSave() {
+        // 批量修改包装明细
+        this.isWeight = false;
+        this.bulkEditingWrap();
+        this.$nextTick(() => {
+          this.isWeight = true;
+        });
+      },
+      // 物料批量保存
+      materialListSave() {
+        this.resultArray.forEach((item) => {
+          if (!item.isPack) {
+            this.materialBtn(item);
+          }
+        });
+      },
+      weightInput(value, row) {
+        const newValue = value.replace(/[^\d.]/g, ''); // 保留数字和小数点
+        const decimalCount = (newValue.match(/\./g) || []).length; // 计算小数点的个数
+        if (decimalCount > 1) {
+          // 如果小数点个数大于1,移除多余的小数点
+          const lastIndex = newValue.lastIndexOf('.');
+          row.weight =
+            newValue.slice(0, lastIndex) + newValue.slice(lastIndex + 1);
+        } else if (decimalCount === 1) {
+          // 如果小数点个数等于1,允许小数点的输入
+          row.weight = newValue;
+        } else {
+          row.weight = newValue === '' ? 0 : parseFloat(newValue); // 如果输入为空,则设为0
+        }
+      },
+      handleIsDetail(event) {
+        this.isSplit = event;
+        const list = this.materialCodeReqList;
+        if (event) {
+          let resultArray = [];
+          list.forEach((item) => {
+            // 包装维度改成已保存状态
+            item.isPack = true;
+            // 拆分物料维度并生成列表
+            for (let i = 1; i <= Number(item.minPackingCount); i++) {
+              // console.log(item.weight);
+              // console.log(item.minPackingCount);
+              resultArray.push({
+                onlyCode: item.onlyCode,
+                no: item.onlyCode + i.toString().padStart(4, '0'),
+                assetCode: item.assetCode,
+                assetName: item.assetName,
+                manualBatchNo: item.manualBatchNo,
+                batchNo: item.batchNo,
+                minPackingCount: 1,
+                measuringUnit: item.measuringUnit,
+                materielCode: item.materielCode,
+                clientCode: item.clientCode,
+                weight: this.$math.format(
+                  item.weight / Number(item.minPackingCount),
+                  14
+                ),
+                initWeight: this.$math.format(
+                  item.weight / Number(item.minPackingCount),
+                  14
+                ),
+                weightUnit: item.weightUnit,
+                engrave: item.engrave,
+                result: item.result,
+                status: item.status,
+                isPack: false
+              });
+            }
+          });
+
+          this.resultArray = resultArray;
+          // 批量修改包装明细
+          this.isWeight = false;
+          this.bulkEditingWrap();
+          this.$nextTick(() => {
+            this.isWeight = true;
+          });
+        } else {
+          // 包装维度改成编辑状态
+          list.forEach((item) => {
+            item.isPack = false;
+          });
+          // 清空物料维度列表
+          this.resultArray = [];
+        }
+      },
+      //包装明细保存
+      packCout(row) {
+        //true保存==》反之
+        if (!row.isPack) {
+          row.isPack = true;
+          const code = row.assetCode;
+          const batchNo = row.batchNo;
+          //做防护,防止weight字符串类型
+          this.materialCodeReqList.forEach((ele) => {
+            ele.weight = Number(ele.weight);
+          });
+          // const count = this.materialCodeReqList.reduce(
+          //   (acc, curr) => acc + curr.weight,
+          //   0
+          // );
+          // 修改产品信息重量(包装维度累计)
+          this.isWeight = false;
+          this.warehousingMaterialList.forEach((item) => {
+            if (item.assetCode == code && item.batchNo == batchNo) {
+              let arr = [];
+              for (const key in this.materialCodeReqList) {
+                if (
+                  this.materialCodeReqList[key].assetCode == item.assetCode &&
+                  this.materialCodeReqList[key].batchNo == item.batchNo
+                ) {
+                  arr.push({ ...this.materialCodeReqList[key] });
+                }
+              }
+              const count = arr.reduce((acc, curr) => {
+                if (curr.isPack) {
+                  this.$set(curr, 'initWeight', +curr.weight);
+                  return Number(this.$math.format(+acc + +curr.weight, 14));
+                } else {
+                  return Number(this.$math.format(+acc + +curr.initWeight, 14));
+                }
+              }, 0);
+              this.$set(item, 'weight', count);
+            }
+          });
+          this.$nextTick(() => {
+            this.isWeight = true;
+          });
+        } else {
+          row.isPack = false;
+        }
+        this.$nextTick(() => {
+          this.isWrapTable = false;
+          this.$nextTick(() => {
+            this.isWrapTable = true;
+          });
+        });
+      },
+      // 批量修改包装明细
+      bulkEditingWrap() {
+        // 批量修改包装明细列表状态(已保存)
+        this.materialCodeReqList.forEach((item) => {
+          item.isPack = true;
+        });
+        // 改变产品明细重量
+        this.warehousingMaterialList.forEach((outItem) => {
+          let arr = [];
+          this.materialCodeReqList.forEach((inneritem) => {
+            if (
+              inneritem.assetCode == outItem.assetCode &&
+              inneritem.batchNo == outItem.batchNo
+            ) {
+              arr.push(inneritem);
+            }
+          });
+          const count = arr.reduce((acc, curr) => {
+            if (curr.isPack) {
+              this.$set(curr, 'initWeight', +curr.weight);
+              return Number(this.$math.format(+acc + +curr.weight, 14));
+            } else {
+              return Number(this.$math.format(+acc + +curr.initWeight, 14));
+            }
+          }, 0);
+          this.$set(outItem, 'weight', count);
+        });
+      },
+      // 批量修改物料明细
+      bulkEditingMaterial() {
+        // 批量修改物料明细列表状态(已保存)
+        this.resultArray.forEach((item) => {
+          item.isPack = true;
+        });
+        // 改变包装明细重量
+        this.materialCodeReqList.forEach((outItem) => {
+          let arr = [];
+          this.resultArray.forEach((inneritem) => {
+            if (
+              inneritem.assetCode == outItem.assetCode &&
+              inneritem.batchNo == outItem.batchNo
+            ) {
+              arr.push(inneritem);
+            }
+          });
+          const count = arr.reduce((acc, curr) => {
+            if (curr.isPack) {
+              this.$set(curr, 'initWeight', +curr.weight);
+              return Number(this.$math.format(+acc + +curr.weight, 14));
+            } else {
+              return Number(this.$math.format(+acc + +curr.initWeight, 14));
+            }
+          }, 0);
+          this.$set(outItem, 'weight', count);
+        });
+      },
+      // 物料明细保存
+      materialBtn(row) {
+        console.log(row);
+        console.log(this.resultArray);
+        console.log(this.materialCodeReqList);
+        // true保存 false编辑
+        if (!row.isPack) {
+          row.isPack = true;
+          // 物料维度修改质检改变包装维度质检(结果和状态)
+          this.materialCodeReqList.forEach((outItem) => {
+            let arr = [];
+            this.resultArray.forEach((inneritem) => {
+              if (inneritem.onlyCode == outItem.onlyCode) {
+                arr.push(inneritem);
+              }
+            });
+            console.log(arr);
+            // 首先判断是未填/合格不合格
+            let boolen = arr.every((item) => {
+              return item.result === '' || item.result === undefined;
+            });
+            // 判断只要物料全部质检结果(未填)——>包装质检结果(未填) 状态(未检)
+            if (boolen) {
+              this.$set(outItem, 'result', '');
+              this.$set(outItem, 'status', '0');
+            } else {
+              // 判断只要物料有一个质检结果(不合格)——>包装质检结果(不合格) 状态(已检)
+              let boolen = arr.some((item) => {
+                return item.result === '1';
+              });
+              if (boolen) {
+                this.$set(outItem, 'result', '1');
+                this.$set(outItem, 'status', '1');
+              } else {
+                // 判断只要物料有一个质检结果(让步接收)——>包装质检结果(让步接收) 状态(已检)
+                let boolen = arr.some((item) => {
+                  return item.result === '3';
+                });
+                if (boolen) {
+                  // 让步接收 已检
+                  this.$set(outItem, 'result', '3');
+                  this.$set(outItem, 'status', '1');
+                } else {
+                  // 判断只要物料有全部质检结果(合格)——>包装质检结果(合格) 状态(已检)
+                  let boolen = arr.every((item) => {
+                    return item.result === '0';
+                  });
+                  if (boolen) {
+                    // 合格 已检
+                    this.$set(outItem, 'result', '0');
+                    this.$set(outItem, 'status', '1');
+                  } else {
+                    // 合格 部分检
+                    this.$set(outItem, 'result', '0');
+                    this.$set(outItem, 'status', '2');
+                  }
+                }
+              }
+            }
+            // this.$set(outItem, 'result', boolen ? '1' : '0');
+          });
+          // 物料维度修改重量改变包装维度重量
+          let onlyCode = row.onlyCode;
+          this.materialCodeReqList.forEach((item) => {
+            if (item.onlyCode === onlyCode) {
+              let arr = [];
+              for (const key in this.resultArray) {
+                if (this.resultArray[key].onlyCode == item.onlyCode) {
+                  arr.push(this.resultArray[key]);
+                }
+              }
+              const count = arr.reduce((acc, curr) => {
+                if (curr.isPack) {
+                  this.$set(curr, 'initWeight', +curr.weight);
+                  return Number(this.$math.format(+acc + +curr.weight, 14));
+                } else {
+                  return Number(this.$math.format(+acc + +curr.initWeight, 14));
+                }
+              }, 0);
+              this.$set(item, 'weight', count);
+            }
+          });
+          // 包装维度修改重量改变产品信息
+          this.isWeight = false;
+          // 批量修改包装明细
+          this.bulkEditingWrap();
+          this.$nextTick(() => {
+            this.isWeight = true;
+          });
+        } else {
+          row.isPack = false;
+        }
+        this.$nextTick(() => {
+          this.isWrapTable = false;
+          this.isMaterialTable = false;
+          this.$nextTick(() => {
+            this.isWrapTable = true;
+            this.isMaterialTable = true;
+          });
+        });
+      },
+      packNum(row, value) {
+        const total = {
+          packingCount: Number(
+            row.minPackingCount > 0 ? row.minPackingCount : 0
+          ),
+          outInNum: Number(row.outInNum > 0 ? row.outInNum : 0)
+        };
+        if (row.measuringUnit == row.weightUnit) {
+          row.weight = Number(
+            this.$math.format(
+              total.packingCount * 1 * total.outInNum.toFixed(2),
+              14
+            )
+          );
+        } else {
+          const totals = Number(
+            this.$math.format(total.packingCount * total.outInNum, 14)
+          );
+          row.weight = Number(
+            this.$math.format(
+              totals * (row.netWeight > 0 ? row.netWeight.toFixed(2) : 0),
+              14
+            )
+          );
+        }
+        return (row.outInNum = value.replace(/^(0+)|[^\d]+/g, ''));
+      },
+      async searchContact(id) {
+        const data = await contactlink({ contactId: id });
+        this.contactList = data.data;
+      },
+      outsourcedOrdersSuccess(row) {
+        this.outsourcedOrdersRow = row;
+        this.formData.extInfo.documentSource = row.code;
+        this.$forceUpdate();
+      },
+      // 包装删除
+      wrapDelete(row, index) {
+        // 删除包装
+        this.materialCodeReqList.splice(index, 1);
+        let outIndex = 0;
+        let arr = this.warehousingMaterialList.filter((item, index) => {
+          if (item.assetCode == row.assetCode && item.batchNo == row.batchNo) {
+            outIndex = index;
+            return true;
+          }
+        });
+        // 修改产品
+        if (arr[0].minPackingCount * arr[0].outInNum === row.minPackingCount) {
+          this.warehousingMaterialList.splice(outIndex, 1);
+        } else {
+          this.$set(
+            this.warehousingMaterialList[outIndex],
+            'outInNum',
+            this.warehousingMaterialList[outIndex].outInNum - 1
+          );
+        }
+        // 删除物料
+        if (this.resultArray.length > 0) {
+          let indexs = [];
+          let arr = this.resultArray.filter((item, index) => {
+            if (
+              item.assetCode == row.assetCode &&
+              item.batchNo == row.batchNo
+            ) {
+              indexs.push(index);
+              return true;
+            }
+          });
+          console.log(indexs);
+          console.log(arr);
+          this.resultArray = this.resultArray.filter((item, index) => {
+            return !indexs.includes(index);
+          });
+        }
+      },
+      // 物料删除
+      materialDelete(row, index) {
+        console.log('row---------------');
+        console.log(index);
+        console.log(row);
+        let isBoolen = false;
+        // 删除物料
+        this.resultArray.splice(index, 1);
+        // 过滤物料对应包装
+        let wrapOutIndex = 0;
+        let wrapArr = this.materialCodeReqList.filter((item, index) => {
+          if (
+            item.assetCode == row.assetCode &&
+            item.batchNo == row.batchNo &&
+            item.onlyCode == row.onlyCode
+          ) {
+            wrapOutIndex = index;
+            return true;
+          }
+        });
+        console.log('wrapArr------------------');
+        console.log(wrapArr);
+        // 包装和物料数量一致(相同删除列/不同-1)
+        if (wrapArr[0].minPackingCount === row.minPackingCount) {
+          isBoolen = true;
+          // 修改产品
+          let materialOutIndex = 0;
+          let materialArr = this.warehousingMaterialList.filter(
+            (item, index) => {
+              console.log(wrapOutIndex);
+              console.log(this.materialCodeReqList);
+              console.log(item.assetCode);
+              console.log(this.materialCodeReqList[wrapOutIndex]);
+              console.log(this.materialCodeReqList[wrapOutIndex].assetCode);
+              console.log('----------------');
+              if (
+                item.assetCode ==
+                  this.materialCodeReqList[wrapOutIndex].assetCode &&
+                item.batchNo == this.materialCodeReqList[wrapOutIndex].batchNo
+              ) {
+                materialOutIndex = index;
+                return true;
+              }
+            }
+          );
+          // 产品和包装数量一致(相同删除列/不同-1)———— 产品
+          if (
+            materialArr[0].minPackingCount * materialArr[0].outInNum ===
+            this.materialCodeReqList[wrapOutIndex].minPackingCount
+          ) {
+            this.warehousingMaterialList.splice(materialOutIndex, 1);
+          } else {
+            this.$set(
+              this.warehousingMaterialList[materialOutIndex],
+              'outInNum',
+              this.warehousingMaterialList[materialOutIndex].outInNum - 1
+            );
+          }
+          this.materialCodeReqList.splice(wrapOutIndex, 1);
+        } else {
+          // 包装数量-1
+          this.$set(
+            this.materialCodeReqList[wrapOutIndex],
+            'minPackingCount',
+            this.materialCodeReqList[wrapOutIndex].minPackingCount - 1
+          );
+        }
+        if (!isBoolen) {
+          // 修改产品
+          let materialOutIndex = 0;
+          // 找到包装对应产品
+          let materialArr = this.warehousingMaterialList.filter(
+            (item, index) => {
+              console.log(wrapOutIndex);
+              console.log(this.materialCodeReqList);
+              console.log(item.assetCode);
+              console.log(this.materialCodeReqList[wrapOutIndex]);
+              console.log(this.materialCodeReqList[wrapOutIndex].assetCode);
+              console.log('----------------');
+              if (
+                item.assetCode ==
+                  this.materialCodeReqList[wrapOutIndex].assetCode &&
+                item.batchNo == this.materialCodeReqList[wrapOutIndex].batchNo
+              ) {
+                materialOutIndex = index;
+                return true;
+              }
+            }
+          );
+          // 产品和包装数量一致(相同删除列/不同-1)———— 产品
+          if (
+            materialArr[0].minPackingCount * materialArr[0].outInNum ===
+            this.materialCodeReqList[wrapOutIndex].minPackingCount
+          ) {
+            this.warehousingMaterialList.splice(materialOutIndex, 1);
+          } else {
+            this.$set(
+              this.warehousingMaterialList[materialOutIndex],
+              'outInNum',
+              this.warehousingMaterialList[materialOutIndex].outInNum - 1
+            );
+          }
+        }
+      },
+      async stockOutOrderSuccess(row) {
+        console.log('--------------------------');
+        console.log(row);
+        this.stockOutOrders = row.bizNo;
+        this.formData.bizType = '2';
+        this.formData.extInfo = row.extInfo;
+        this.selectEquiType = row.categoryLevelTopId;
+        this.formData.sourceBizNo = row.receiveNo;
+        this.formData.fromId = row.id;
+        this.formData.clientName = row.partaName;
+        this.formData.clientCode = row.partaId;
+        // const data = await oneId(row.id);
+        // if (this.warehousingMaterialList.length == 0) {
+        //   let list = data.productList.map((item) => {
+        //     return {
+        //       ...item,
+        //       assetName: item.productName,
+        //       assetCode: item.productCode,
+        //       categoryId: item.productCategoryId,
+        //       minPackUnit: item.packingUnit
+        //     };
+        //   });
+        //   await this.onSelectTableData(await this.serachMainCode(list));
+        // }
+        // // 委外发货入库(出库再入库)
+        // if (row.outsourceSendCode) {
+        this.isOutsourcing = true;
+        this.formData.bizType = '12';
+        this.title = '委外入库(非采购)';
+        console.log('-------this.formData----');
+        console.log(this.formData);
+        outin.getById(row.id).then(async (res) => {
+          console.log('-------res--------res-------');
+          console.log(res);
+          if (res.outInDetailVOList && res.outInDetailVOList.length > 0) {
+            const batchNo = await getCode('lot_number_code');
+            this.warehousingMaterialList = [];
+            this.resultArray = [];
+            let arr = res.outInDetailVOList.map(async (goodsiItem) => {
+              return new Promise(async (outResolve) => {
+                goodsiItem.isSave = true;
+                goodsiItem.houseList = [];
+                goodsiItem.batchNo = batchNo;
+                goodsiItem.assetName = goodsiItem.name;
+                goodsiItem.assetCode = goodsiItem.categoryCode;
+                goodsiItem.outInNum =
+                  goodsiItem.packingCount < 1 ? 1 : goodsiItem.packingCount;
+                goodsiItem.minPackingCount = goodsiItem.minPackingCount;
+                goodsiItem.minPackUnit = goodsiItem.packingUnit;
+                this.warehousingMaterialList.push(goodsiItem);
+                let res = await outin.getAssetNum({
+                  assetCode: goodsiItem.assetCode,
+                  batchNum: goodsiItem.batchNo,
+                  num: goodsiItem.outInNum < 1 ? 1 : goodsiItem.outInNum
+                });
+                let arr = goodsiItem.outInDetailRecordVOList.map(
+                  (wrapItem, index) => {
+                    return new Promise(async (resolve) => {
+                      wrapItem.onlyCode = res.shift().onlyCode;
+                      wrapItem.packingCount =
+                        wrapItem.packingCount < 1 ? 1 : wrapItem.packingCount;
+                      wrapItem.isPack = true;
+                      wrapItem.minPackingCount = wrapItem.totalCount;
+                      wrapItem.assetName = goodsiItem.name;
+                      wrapItem.assetCode = goodsiItem.categoryCode;
+                      wrapItem.batchNo = batchNo;
+                      wrapItem.result =
+                        wrapItem.result === null ? '' : String(wrapItem.result);
+                      // wrapItem.count =
+                      //   wrapItem.outInDetailRecordMaterialDetailVOList.length; // 增加包装计量数量
+                      // 增加内部重量(解决重量未保存同时参与计算问题)
+                      wrapItem.initWeight = wrapItem.weight;
+                      if (
+                        wrapItem.outInDetailRecordMaterialDetailVOList?.length >
+                        0
+                      ) {
+                        wrapItem.outInDetailRecordMaterialDetailVOList.forEach(
+                          (materialItem, index) => {
+                            materialItem.id = '';
+                            materialItem.onlyCode = wrapItem.onlyCode;
+                            materialItem.no =
+                              materialItem.onlyCode +
+                              index.toString().padStart(4, '0');
+                            materialItem.result =
+                              materialItem.result === null
+                                ? ''
+                                : String(materialItem.result);
+                            materialItem.batchNo = batchNo;
+                            materialItem.minPackingCount = 1;
+                            materialItem.isPack = true;
+                            // 增加内部重量(解决重量未保存同时参与计算问题)
+                            materialItem.initWeight = materialItem.weight;
+                            this.resultArray.push(materialItem);
+                          }
+                        );
+                      }
+                      resolve(wrapItem);
+                    });
+                  }
+                );
+                Promise.all(arr).then((data) => {
+                  console.log(goodsiItem);
+                  goodsiItem.warehouseLedgerDetails = data;
+                  outResolve(goodsiItem);
+                });
+              });
+            });
+            Promise.all(arr).then((data) => {
+              console.log(this.warehousingMaterialList);
+              console.log(this.resultArray);
+              this.warehousingMaterialList = data;
+              if (this.resultArray.length > 0) {
+                this.isSplit = true;
+              }
+            });
+          }
+        });
+        // } else {
+        //   this.formData.bizType = '2';
+        //   this.title = '采购入库';
+        // }
+      },
+      async pickerSuccess(row) {
+        this.pickerRow = row;
+        this.formData.extInfo.documentSource = row.orderNo;
+        this.formData.clientName = row.partaName;
+        this.formData.clientCode = row.partaId;
+        this.formData.extInfo.supplierName = row.partbName;
+        this.formData.extInfo.supplierId = row.partbId;
+        await this.searchContact(row.partbId);
+        const data = await oneId(row.id);
+        if (this.warehousingMaterialList.length == 0) {
+          console.log('data===', data);
+          let list = data.data.productList.map((item) => {
+            return {
+              ...item,
+              assetName: item.productName,
+              assetCode: item.productCode,
+              categoryId: item.productCategoryId,
+              minPackUnit: item.packingUnit
+            };
+          });
+          this.onSelectTableData(await this.serachMainCode(list));
+        }
+      },
+      async serachMainCode(arr) {
+        let newArr = [];
+        // 使用 Promise.all 来等待所有异步操作完成
+        await Promise.all(
+          arr.map(async (item) => {
+            const data = await getProductList({
+              pageNum: 1,
+              size: 10,
+              categoryLevelId: item.categoryLevelPathIdParent,
+              code: item.assetCode
+            });
+            newArr.push(data.list); // 将结果存储到 newArr 中
+          })
+        );
+        let re = [];
+        for (const item of newArr) {
+          for (const it of item) {
+            re.push(it);
+          }
+        }
+        return re.map((item) => {
+          return {
+            ...item,
+            minPackUnit: item.packingUnit,
+            assetCode: item.code,
+            assetName: item.name
+          };
+        });
+      },
+      onClear() {
+        this.formData.extInfo.documentSource = '';
+        this.pickerRow = {};
+        this.outsourcedOrdersRow = {};
+        this.formData.clientName = '';
+        this.formData.clientCode = '';
+        this.formData.extInfo.supplierName = '';
+        this.formData.extInfo.supplierId = '';
+        this.$forceUpdate();
+      },
+
+      handleStockOutOrder() {
+        this.$refs.stockOutOrderRef.open();
+      },
+      handleOutsourcedOrders() {
+        this.$refs.outsourcedOrdersRef.open();
+      },
+      handlePicker() {
+        this.$refs.pickerRef.open();
+      },
+      codeListValue(val) {
+        this.formData.extInfo.assetType = val.id;
+        this.$forceUpdate();
+        this.title = val?.name;
+        this.selectEquiType = val?.id;
+      },
+      //计算生产设备重量
+      deviceWeight(row, num) {
+        if (row) {
+          return Number(row * num);
+        } else {
+          return row;
+        }
+      },
+      //计算金额
+      calcSumTotal(PackingCount, outInNum, univalence) {
+        //最小包装单元,包装数量,单价
+        const total = {
+          PackingCount: Number(PackingCount > 0 ? PackingCount : 0),
+          outInNum: Number(outInNum > 0 ? outInNum : 0),
+          univalence: Number(univalence > 0 ? univalence : 0)
+        };
+        return Number(
+          this.$math.format(
+            total.PackingCount * total.outInNum * total.univalence,
+            14
+          )
+        );
+      },
+      handleRowUnit(row) {
+        return row.measuringUnit;
+        // if (this.formData.extInfo.assetType == 1) {
+        //   return row.weightUnit;
+        // } else if (this.formData.extInfo.assetType == 4) {
+        //   return row.measuringUnit;
+        // } else {
+        //   return row.measuringUnit;
+        // }
+      },
+      changeVerfy(it) {
+        this.formData.verifyName = it.name;
+      },
+      //选择供应啥的操作
+      ChangeSupplier(data) {
+        this.formData.extInfo.supplierName = data.dictValue;
+      },
+      ChangeSuppliers(data) {
+        this.formData.clientName = data.dictValue;
+      },
+
+      rowClass({ row, column, rowIndex, columnIndex }) {
+        if (rowIndex === 1) {
+          return {
+            display: 'none',
+            background: '#EEEEEE',
+            border: 'none'
+          };
+        }
+
+        return { background: '#EEEEEE', border: 'none' };
+      },
+      calcSum(a, b, c, row) {
+        if (
+          (Number.isNaN(+a) && a !== '') ||
+          (Number.isNaN(+b) && b !== '') ||
+          (Number.isNaN(+c) && c !== '')
+        ) {
+          return '';
+        }
+
+        return a * b * c + { yuan: '元', wanyuan: '万元' }[row.univalenceUnit];
+        // return a * b * c;
+      },
+      // 部门 点击事件
+      async auditorDeptClick(data) {
+        this.formData.extInfo.verifyDeptCode = data?.id;
+        this.formData.extInfo.verifyDeptName = data?.name;
+        this.formData.verifyId = '';
+        this.formData.verifyName = '';
+
+        this.$refs.formName.validateField('verifyDeptName');
+        if (data) {
+          this.getStaffList(data);
+        }
+      },
+      async getStaffList(data) {
+        let res = await warehouseDefinition.getUserPage({
+          groupId: data.id,
+          size: 9999,
+          page: 1
+        });
+
+        this.staffList = res.list;
+      },
+      // 详情接口
+      // async _getInfo () {
+      //   const res = await getInfo({ id: this.$route.query.id })
+
+      //   if (res?.success) {
+      //     this.warehousingMaterialList = res.data.warehouseLedgerInfos.map(i => {
+      //       i.isSave = true
+      //       return i
+      //     })
+
+      //     this.formData = res.data.outInWarehouse
+
+      //     this.uploadList = this.formData.contentImage
+
+      //   }
+      // },
+      chooseAssets(row, index) {
+        this.$refs.returnSelectRef.open(row, (res) => {
+          row.outInNum = res.length;
+
+          this.$set(
+            row,
+            'selfWarehouseLedgerDetails',
+            res.map((i) => {
+              delete i.updateTime;
+              delete i.createTime;
+              return i;
+            })
+          );
+        });
+      },
+      // 仓库编辑
+      handleWareHouse(row, idx) {
+        this.$refs.wareHouseDailogRef.open(row, idx);
+      },
+      // 入库操作
+      listEdit(row) {
+        this.$set(row, 'isSave', false);
+        row.selfWarehouseLedgerDetails = row.warehouseLedgerDetails;
+        row.warehouseLedgerDetails = [];
+        // 重置重量
+        this.packNum(row, row.outInNum);
+        // 清空物料明细防止数据错乱
+        if (this.isSplit && this.resultArray?.length > 0) {
+          this.handleIsDetail(false);
+        }
+      },
+      listSave(row, index) {
+        if (this.isSplit && this.resultArray?.length > 0) {
+          this.handleIsDetail(false);
+        }
+        let fileds = [`warehousingMaterialList.${index}.houseList`];
+        if (this.formData.bizType == 1) {
+          // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
+        } else if (this.formData.bizType == 2) {
+          // fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
+        }
+        if (this.formData.bizType != 5) {
+          // fileds.push(
+          //   ...[
+          //     `warehousingMaterialList.${index}.outInNum`,
+          //     `warehousingMaterialList.${index}.minPackingCount`
+          //   ]
+          // );
+        } else if (
+          this.warehousingMaterialList.some(
+            (i) => !i.selfWarehouseLedgerDetails?.length
+          )
+        ) {
+          this.$message.error('请选择资产编号!');
+          return;
+        }
+        Promise.all(
+          fileds.map(
+            (item) =>
+              new Promise(async (resolve, rej) => {
+                this.$refs.warehousingMaterialListRef.validateField(
+                  item,
+                  (err) => {
+                    if (err) {
+                      rej(err);
+                    } else {
+                      resolve();
+                    }
+                  }
+                );
+              })
+          )
+        )
+          .then((res) => {
+            this.$set(row, 'isSave', true);
+            if (this.formData.bizType != 5) {
+              this.createMaterialCode(row);
+            } else {
+              // 退还
+              this.createMaterialCodeReturn(row);
+            }
+          })
+          .catch((err) => {
+            this.$message.error('请填入必填项!');
+          });
+      },
+      listSaveArrs() {
+        return new Promise((resolve, reject) => {
+          // 已经拆分(还原到未拆封编辑状态)
+          if (this.isSplit && this.resultArray.length > 0) {
+            this.handleIsDetail(false);
+          }
+          const rows = this.warehousingMaterialList;
+          const indexes = Array.from(
+            { length: this.warehousingMaterialList.length },
+            (_, index) => index
+          );
+          let showMessage = true;
+          Promise.all(
+            rows.map((row, i) => {
+              const index = indexes[i];
+              let fileds = [`warehousingMaterialList.${index}.houseList`];
+              if (this.formData.bizType == 1) {
+                // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
+              } else if (this.formData.bizType == 2) {
+                // fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
+              }
+              if (this.formData.bizType != 5) {
+                // fileds.push(
+                //   ...[
+                //     `warehousingMaterialList.${index}.outInNum`,
+                //     `warehousingMaterialList.${index}.minPackingCount`
+                //   ]
+                // );
+              } else if (
+                this.warehousingMaterialList.some(
+                  (i) => !i.selfWarehouseLedgerDetails?.length
+                )
+              ) {
+                this.$message.error('请选择资产编号!');
+                return;
+              }
+              console.log(fileds);
+              return Promise.all(
+                fileds.map(
+                  (item) =>
+                    new Promise(async (resolve, rej) => {
+                      this.$refs.warehousingMaterialListRef.validateField(
+                        item,
+                        (err) => {
+                          if (err) {
+                            rej(err);
+                          } else {
+                            resolve();
+                          }
+                        }
+                      );
+                    })
+                )
+              )
+                .then(async (res) => {
+                  this.$set(row, 'isSave', true);
+                  if (this.formData.bizType != 5) {
+                    console.log(
+                      'createMaterialCode__' + i + '-----------------------'
+                    );
+                    await this.createMaterialCode(row);
+                    console.log(
+                      'createMaterialCode__' +
+                        i +
+                        '---执行完了--------------------'
+                    );
+                  } else {
+                    // 退还
+                    await this.createMaterialCodeReturn(row);
+                  }
+                  return Promise.resolve();
+                })
+                .catch((err) => {
+                  if (showMessage) {
+                    showMessage = false;
+                    this.$message.error('请填入必填项!');
+                  }
+                });
+            })
+          )
+            .then(() => {
+              console.log('全部执行完毕~~~~');
+              resolve();
+            })
+            .catch(() => {
+              reject();
+            });
+        });
+      },
+      // listSaveArrs() {
+      //   console.log(this.warehousingMaterialList);
+      // },
+      // 批量设置生产日期
+      handleSelectionChange(val) {
+        this.materialCodeReqListSelected = val;
+      },
+      dateSetting() {
+        if (!this.materialCodeReqListSelected.length) {
+          return this.$message.error(`请选择${this.title}明细!`);
+        }
+        this.dateVisible = true;
+      },
+      dateConfirm() {
+        this.materialCodeReqListSelected.forEach((item) => {
+          this.$set(item, this.curDateType, this.batchTime);
+        });
+        this.dateVisible = false;
+      },
+      //入库明细删除
+      listDel(row, index) {
+        this.warehousingMaterialList.splice(index, 1);
+        if (this.isSplit && this.resultArray?.length > 0) {
+          this.handleIsDetail(false);
+        }
+      },
+      // 入库明细生成条码信息
+      async createMaterialCode(row) {
+        // 添加相同物品、批次号重新更新明细 原料编码
+        const list = this.warehousingMaterialList.filter(
+          (i) =>
+            i.assetCode === row.assetCode &&
+            i.batchNo === row.batchNo &&
+            i.isSave
+        );
+        const num = list.reduce((num, pre) => {
+          num += row.isUnpack
+            ? Number(this.$math.format(pre.outInNum * pre.minPackingCount, 14))
+            : pre.outInNum - 0;
+          return num;
+        }, 0);
+
+        const nums = list.reduce((num, pre) => {
+          num += Number(
+            this.$math.format(pre.outInNum * pre.minPackingCount, 14)
+          );
+
+          return num;
+        }, 0);
+
+        const res = await outin.getAssetNum({
+          assetCode: row.assetCode,
+          batchNum: row.batchNo,
+          num: num
+        });
+        // row.measuringUnit == 'PCS' ? nums :
+
+        list.forEach((item) => {
+          if (item.warehouseLedgerDetails?.length) {
+            item.warehouseLedgerDetails.forEach((i) => {
+              i.onlyCode = res.shift().onlyCode;
+            });
+          } else {
+            this.$set(
+              item,
+              'warehouseLedgerDetails',
+              Array.from(
+                new Array(
+                  item.isUnpack
+                    ? Number(
+                        this.$math.format(
+                          item.outInNum * item.minPackingCount,
+                          14
+                        )
+                      )
+                    : // : item.measuringUnit == 'PCS'
+                      // ? +item.outInNum * parseInt(item.minPackingCount)
+                      +item.outInNum
+                ),
+                (val, idx) => {
+                  return {
+                    ...item,
+                    onlyCode: res.shift().onlyCode,
+                    bizStatus: 1,
+                    contentImage: []
+                  };
+                }
+              )
+            );
+          }
+        });
+
+        // 添加相同物品,重复批次号 重新更新明细 包装编码
+        const batchList = this.warehousingMaterialList.filter(
+          (i) => i.batchNo === row.batchNo && i.isSave
+        );
+        if (batchList.length) {
+          const num = batchList.reduce((num, pre) => {
+            num += +pre.outInNum;
+            return num;
+          }, 0);
+          // const res1 = await outin.getAssetNum({
+          //   batchNum: row.batchNo,
+          //   num
+          // });
+          // if (res1) {
+          batchList.forEach((item) => {
+            // let num = res1.shift()?.num;
+            let minPackingCount = item.minPackingCount;
+            if (item.warehouseLedgerDetails?.length) {
+              item.warehouseLedgerDetails.forEach((i, index) => {
+                // this.$set(i, 'num', num);
+                if (row.code == i.code) {
+                  if (item.measuringUnit == item.weightUnit) {
+                    this.$set(i, 'weight', item.minPackingCount);
+                    this.$set(i, 'initWeight', item.minPackingCount);
+                  } else {
+                    this.$set(
+                      i,
+                      'weight',
+                      Number(
+                        this.$math.format(
+                          1 * item.minPackingCount * item.netWeight,
+                          14
+                        )
+                      )
+                    );
+                    this.$set(
+                      i,
+                      'initWeight',
+                      Number(
+                        this.$math.format(
+                          1 * item.minPackingCount * item.netWeight,
+                          14
+                        )
+                      )
+                    );
+                  }
+                }
+                this.$set(i, 'weightUtil', item.weightUnit);
+
+                this.$set(i, 'packingCount', 1);
+                this.$set(i, 'packingUnit ', item.packingUnit);
+                this.$set(i, 'minPackingCount ', item.minPackingCount);
+                this.$set(i, 'measuringUnit', item.measuringUnit);
+                this.$set(i, 'isPack', false);
+                this.$set(i, 'result', '0');
+                this.$set(i, 'status', '1');
+                // if (this.formData.extInfo.assetType == 1) {
+                //   this.$set(i, 'status', '0');
+                // } else {
+                //   this.$set(i, 'result', '0');
+                //   this.$set(i, 'status', '1');
+                // }
+
+                // if (!item.isUnpack) {
+                //   if (index < item.warehouseLedgerDetails.length - 1) {
+                //     num = res1.shift()?.num;
+                //   }
+                // } else {
+                //   // 拆包的包装编码一致
+                //   minPackingCount--;
+                //   if (
+                //     minPackingCount === 0 &&
+                //     index < item.warehouseLedgerDetails.length - 1
+                //   ) {
+                //     minPackingCount = item.minPackingCount;
+                //     num = res1.shift()?.num;
+                //   }
+                // }
+              });
+            }
+          });
+          // }
+        }
+      },
+      // 入库明细生成条码信息 退还
+      async createMaterialCodeReturn(row) {
+        // 添加相同物品重新更新明细 原料编码
+        const list = this.warehousingMaterialList.filter(
+          (i) => i.batchNo === row.batchNo && i.isSave
+        );
+        // 退还
+        const res = await getAssetNum({
+          batchNo: row.batchNo,
+          num: list.reduce((num, pre) => {
+            num += pre.selfWarehouseLedgerDetails.length;
+            return num;
+          }, 0)
+        });
+        if (res?.success) {
+          list.forEach((item) => {
+            let num = res.data.shift().num;
+            let minPackingCount = item.minPackingCount;
+            if (item.warehouseLedgerDetails?.length) {
+              item.warehouseLedgerDetails.forEach((i, index) => {
+                Object.assign(i, {
+                  num,
+                  manualBatchNo: item.manualBatchNo,
+                  batchNo: item.batchNo,
+                  cargoSpaceCode: item.cargoSpaceCode, //货位编码
+                  cargoSpaceId: item.cargoSpaceId, //货位id
+                  shelfId: item.shelfId, //货架id
+                  shelfCode: item.shelfCode, //货架名称
+                  areaId: item.areaId, //库区id
+                  areaName: item.areaName, //库区名称
+                  warehouseId: item.warehouseId, //仓库id
+                  warehouseName: item.warehouseName //仓库名称
+                });
+
+                if (!item.isUnpack) {
+                  // 拆包的包装编码一致
+
+                  if (index < item.warehouseLedgerDetails.length - 1) {
+                    num = res.data.shift()?.num;
+                  }
+                } else {
+                  minPackingCount--;
+                  if (
+                    minPackingCount === 0 &&
+                    index < item.warehouseLedgerDetails.length - 1
+                  ) {
+                    minPackingCount = item.minPackingCount;
+                    num = res1.data.shift()?.num;
+                  }
+                }
+              });
+            } else {
+              this.$set(
+                item,
+                'warehouseLedgerDetails',
+                item.selfWarehouseLedgerDetails.map((val, idx) => {
+                  let obj = {
+                    ...val,
+                    bizStatus: 1,
+                    minPackingCount: item.minPackingCount,
+                    batchNo: item.batchNo,
+                    cargoSpaceCode: item.cargoSpaceCode, //货位编码
+                    cargoSpaceId: item.cargoSpaceId, //货位id
+                    shelfId: item.shelfId, //货架id
+                    shelfCode: item.shelfCode, //货架名称
+                    areaId: item.areaId, //库区id
+                    areaName: item.areaName, //库区名称
+                    warehouseId: item.warehouseId, //仓库id
+                    warehouseName: item.warehouseName, //仓库名称
+                    materialId: item.materialId,
+                    num
+                  };
+                  if (!item.isUnpack) {
+                    // 拆包的包装编码一致
+                    if (idx < item.warehouseLedgerDetails.length - 1) {
+                      num = res.data.shift()?.num;
+                    }
+                  } else {
+                    minPackingCount--;
+                    if (
+                      minPackingCount === 0 &&
+                      idx < item.warehouseLedgerDetails.length - 1
+                    ) {
+                      minPackingCount = item.minPackingCount;
+                      num = res1.data.shift()?.num;
+                    }
+                  }
+                  return obj;
+                })
+              );
+            }
+          });
+        }
+      },
+
+      handleSave() {
+        this.$refs.formName.validate(async (valid) => {
+          if (valid) {
+            if (!this.warehousingMaterialList?.length) {
+              return this.$message.error('请添加入库明细!');
+            } else if (
+              this.warehousingMaterialList.some((item) => !item.isSave)
+            ) {
+              return this.$message.error('请保存入库明细!');
+            }
+            // // 默认全部保存
+            // if (this.resultArray?.length > 0) {
+            //   // 物料批量保存
+            //   this.materialListSave();
+            // } else {
+            //   // 包装批量保存
+            //   this.wrapListSave();
+            // }
+            this.saveLoading = true;
+            this.formatWarehouseMaterialList();
+
+            let arr = this.warehousingMaterialList.map((item) => {
+              return {
+                netWeight: item.netWeight > 0 ? item.netWeight : 0,
+                num: item.num > 0 ? item.num : 0,
+                manualBatchNo: item.manualBatchNo,
+                batchNo: item.batchNo,
+                categoryId:
+                  this.formData.bizType == 2 || this.formData.bizType == 12
+                    ? item.categoryId
+                      ? item.categoryId
+                      : item.id
+                    : item.id,
+                count:
+                  item.outInNum > 0 && item.minPackingCount > 0
+                    ? this.$math.format(
+                        parseInt(item.outInNum) *
+                          parseInt(item.minPackingCount),
+                        14
+                      )
+                    : 0,
+                minPackingCount:
+                  item.minPackingCount > 0 ? item.minPackingCount : 0,
+                packingCount: item.outInNum > 0 ? item.outInNum : 0,
+                price: item.univalence > 0 ? item.univalence : 0,
+                outInDetailRecordAddPOList: item.warehouseLedgerDetails,
+                position: `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`,
+                remark: '',
+                pathIds: `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`,
+                pathName: `${item.warehouseName},${item.areaName},${item.shelfCode},${item.cargoSpaceCode}`,
+                totalMoney:
+                  item.outInNum > 0 &&
+                  item.minPackingCount > 0 &&
+                  item.univalence > 0
+                    ? this.$math.format(
+                        item.outInNum * item.minPackingCount * item.univalence,
+                        14
+                      )
+                    : 0,
+                weightUnit: item.weightUnit,
+                customCode: item.customCode,
+                supplierCode: item.supplierCode,
+                weight: item.weight > 0 ? item.weight : 0
+              };
+            });
+
+            arr.forEach((item) => {
+              if (item.outInDetailRecordAddPOList.length > 0) {
+                let list = item.outInDetailRecordAddPOList.map((it) => {
+                  return this.formatOutInDetailRecordAddPO(it, item);
+                });
+                item.outInDetailRecordAddPOList = list;
+              }
+            });
+            let obj = { ...this.formData, type: 1 };
+            obj.sourceBizNo = this.formData.extInfo.documentSource;
+
+            obj.outInDetailAddPOList = arr;
+            console.log('=====>', obj);
+            // this.saveLoading = true;
+            try {
+              if (obj.bizType == '12') {
+                obj.storageSource = 1;
+              }
+              const res = await outin.save(obj);
+              if (res.code == 0) {
+                // 委外入库(非采购)
+                if (obj.bizType == '12') {
+                  await outin.outApproveQuality({ outInId: res.data[0] });
+                } else {
+                  await outin.outApproves({ outInId: res.data[0] });
+                }
+                this.$message.success('保存成功!');
+                this.saveLoading = false;
+                this.$router.push('/warehouseManagement/stockManagement');
+              }
+            } catch (error) {
+              this.saveLoading = false;
+              console.error('保存失败:', error);
+            }
+          }
+        });
+      },
+
+      formatWarehouseMaterialList() {
+        for (let key in this.warehousingMaterialList) {
+          for (let k in this.warehousingMaterialList[key].houseList) {
+            let house = this.warehousingMaterialList[key].houseList[k];
+            this.warehousingMaterialList[key].warehouseName =
+              house.warehouseName;
+            this.warehousingMaterialList[key].areaName = house.areaName;
+            this.warehousingMaterialList[key].shelfCode = house.shelfCode;
+            this.warehousingMaterialList[key].cargoSpaceCode =
+              house.cargoSpaceCode;
+            this.warehousingMaterialList[key].warehouseId = house.warehouseId;
+            this.warehousingMaterialList[key].areaId = house.areaId;
+            this.warehousingMaterialList[key].shelfId = house.shelfId;
+            this.warehousingMaterialList[key].cargoSpaceId = house.cargoSpaceId;
+            this.warehousingMaterialList[key].num = house.num;
+          }
+        }
+      },
+
+      formatOutInDetailRecordAddPO(it, item) {
+        return {
+          code: it.onlyCode,
+          dateType: this.curDateType === 'manufactureTime' ? 2 : 1,
+          dateValue: it[this.curDateType],
+          minUnit: it.minPackingCount,
+          minPackingCount: it.minPackingCount,
+          minPositionId: it.cargoSpaceId,
+          name: it.assetName,
+          pathIds: item.pathIds,
+          unit: it.unit,
+          packageNo: it.num,
+          clientCode: it.clientCode,
+          materielCode: it.materielCode,
+          weight: it.weight,
+          weightUtil: it.weightUtil,
+          engrave: it.engrave,
+          materialDetails: this.materialDetails(it.onlyCode),
+          packingCount: it.packingCount,
+          status: it.status,
+          result: it.result
+        };
+      },
+      materialDetails(onlyCode) {
+        return this.resultArray.filter((item) => item.onlyCode === onlyCode);
+      },
+      async getOrderCode() {
+        const data = await getCode('in_warehouse');
+        return data;
+      },
+      // 添加物品明细
+      addProduct(val) {
+        // 已经拆分(还原到未拆封编辑状态)
+        if (this.isSplit && this.resultArray.length > 0) {
+          this.handleIsDetail(false);
+        }
+        console.log('--------val---------');
+        console.log(val);
+        this.onSelectTableData(val);
+      },
+      //添加明细
+      async onSelectTableData(val) {
+        console.log('val-----------', val);
+        const res = await getCode('lot_number_code');
+        this.warehousingMaterialList.push(
+          ...val.map((next) => {
+            next.batchNo = res;
+            let cur = {};
+
+            next.realInventoryAmount = next.realInventoryAmount || 0;
+            cur = {
+              ...next,
+              cargoSpaceCode: '', //货位编码
+              cargoSpaceId: '', //货位id
+              shelfId: '', //货架id
+              shelfCode: '', //货架名称
+              areaId: '', //库区id
+              areaName: '', //库区名称
+              warehouseId: '', //仓库id
+              warehouseName: '', //仓库名称
+              assetType: this.formData.extInfo.assetType,
+              expirationDate: '',
+              outInNum: '',
+              minPackingCount: '',
+              bizStatus: 1,
+              contentImage: [],
+              warehouseLedgerDetails: [],
+              houseList: []
+            };
+            return cur;
+          })
+        );
+      },
+      async initData() {
+        const { data } = await getTreeByGroup({ type: 2 });
+        this.codeList = data;
+        // .map((item) => {
+        //   return { dictCode: item.id, dictValue: item.name };
+        // });
+        const res = await warehouseDefinition.tree();
+        this.treeList = this.$util.toTreeData({
+          data: res,
+          idField: 'id',
+          parentIdField: 'parentId'
+        });
+        // const res111 = await warehouseDefinition.list();
+        // this.warehouseList = res111.list;
+        let res22 = await warehouseDefinition.getUserPage({
+          size: -1,
+          page: 1
+        });
+        this.fromUserList = res22.list;
+        const info = JSON.parse(localStorage.getItem('info'));
+        let obj = res.find(
+          (item) => item.id === info.deptId[info.deptId.length - 1]
+        );
+        if (!obj) return;
+        this.formData.extInfo.deptCode = obj.id;
+        this.formData.extInfo.deptName = obj.name;
+        this.formData.extInfo.createUserName = info.name;
+        this.formData.createUserId = info.id;
+
+        // this.treeList = res;
+        // this.formData.extInfo.deptCode =
+
+        // this.getTreeList().then((res) => {
+        //   if (res?.success) {
+        //     this.treeList = res.data;
+        //   }
+        // });
+        // this.getSupplier().then((res) => {
+        //   if (res?.success) {
+        //     this.supplierList = res.data.items;
+        //   }
+        // });
+        // this.getStaffList();
+      },
+      addStock() {
+        // this.$refs.wareHouseDailogRef.open({});
+        // return;
+        if (!this.title) return this.$message.error('请选择入库产品类型');
+        if (!this.formData.bizType)
+          return this.$message.error('请选择入库场景');
+        if (
+          this.formData.bizType == 12 &&
+          !this.formData.extInfo.documentSource
+        ) {
+          return this.$message.error('请选择委外申请单');
+        }
+        this.visibleDialog = true;
+      },
+      handleChange(data) {
+        this.title = data?.dictValue;
+        this.selectEquiType = data?.dictCode;
+      },
+      handleChanges(code) {
+        const data = this.codeList.find((item) => item.dictCode == code);
+        this.title = data?.dictValue;
+        this.selectEquiType = data?.dictCode;
+      },
+      getSupplier() {
+        return new Promise((resolve, reject) => {
+          supplier.list({ page: 1, size: 999 }).then((res) => {
+            if (res.success) {
+              resolve(res);
+            }
+          });
+        });
+      },
+      getTreeList() {
+        return new Promise((resolve, reject) => {
+          org.tree().then((res) => {
+            if (res.success) {
+              resolve(res);
+            }
+          });
+        });
+      },
+      upload(data) {
+        this.formData.contentImage = data;
+        this.$refs.formName.validateField('contentImage');
+      },
+      houseData(argum, idx) {
+        console.log(argum);
+        this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
+      }
+    },
+
+    watch: {
+      // 解决右侧悬浮操作栏不对称问题
+      warehousingMaterialList: {
+        handler() {
+          this.$nextTick(() => {
+            this.$refs.warehousingMaterialListTable?.doLayout();
+          });
+        },
+        deep: true
+      },
+      // 解决右侧悬浮操作栏不对称问题
+      materialCodeReqList: {
+        handler() {
+          this.$nextTick(() => {
+            this.$refs.materialCodeReqListTable?.doLayout();
+          });
+        },
+        deep: true
+      },
+      // 解决右侧悬浮操作栏不对称问题
+      resultArray: {
+        handler() {
+          this.$nextTick(() => {
+            this.$refs.resultArrayTable?.doLayout();
+          });
+        },
+        deep: true
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .el-row {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  ::v-deep.form-table {
+    .el-form-item {
+      margin-bottom: 0;
+    }
+    .el-input__inner {
+      padding: 0 10px;
+    }
+    ::-webkit-scrollbar {
+      width: 8px;
+      height: 8px;
+      background-color: transparent;
+    }
+  }
+  .p20 {
+    padding: 20px;
+  }
+  .el-select,
+  .el-date-editor {
+    width: 100%;
+  }
+  .el-form-item {
+    margin-bottom: 22px;
+  }
+  .material {
+    margin-top: 20px;
+    .flex {
+      display: flex;
+      justify-content: space-between;
+      font-size: 14px;
+      align-items: center;
+      .red {
+        color: #ff4949;
+      }
+    }
+  }
+  .mt10 {
+    margin-top: 10px;
+  }
+  .mt20 {
+    margin-top: 20px;
+  }
+  .center {
+    text-align: center;
+  }
+
+  .switch_left li {
+    border-right: 1px solid rgba(222, 222, 222, 1);
+    border-left: 1px solid rgba(222, 222, 222, 1);
+  }
+  .fontOmitted {
+    text-overflow: ellipsis;
+    overflow: hidden;
+    word-break: break-all;
+    white-space: nowrap;
+  }
+  .table-fixed {
+    .el-table__fixed-right {
+      height: 100% !important;
+    }
+    .el-table__fixed-left {
+      height: 100% !important;
+    }
+    .el-table__fixed {
+      height: 100% !important;
+    }
+  }
+</style>

+ 42 - 13
src/views/warehouseManagement/stockManagement/details.vue

@@ -313,13 +313,14 @@
 
           <el-table
             ref="multipleTable"
-            :data="detailList"
+            :data="showMaterialCodeReqList"
             tooltip-effect="dark"
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
             style="width: 100%"
             stripe
+            v-el-table-infinite-scroll="wrapHandleScroll"
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
@@ -422,7 +423,7 @@
           <header-title :title="`物料明细`" size="16px"> </header-title>
           <el-table
             ref="multipleTable"
-            :data="metailList"
+            :data="showResultArray"
             tooltip-effect="dark"
             :max-height="300"
             :row-class-name="tableRowClassName"
@@ -430,6 +431,7 @@
             style="width: 100%"
             stripe
             height="300px"
+            v-el-table-infinite-scroll="materielHandleScroll"
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
@@ -526,6 +528,7 @@
 </template>
 
 <script>
+  import elTableInfiniteScroll from 'el-table-infinite-scroll';
   import { getFile } from '@/api/system/file/index.js';
   // import { getInfo } from '@/api/stockManagement';
   import PageHeader from '@/components/PageHeader';
@@ -549,11 +552,19 @@
   import { mapGetters, mapActions } from 'vuex';
   export default {
     components: { StatusStep, PageHeader },
+    directives: {
+      'el-table-infinite-scroll': elTableInfiniteScroll
+    },
     data() {
       return {
-        metailList: [],
         dateTypes: 1,
-        detailList: [],
+        pageSize: 20,
+        wrapPageNum: 1,
+        materielPageNum: 1,
+        showMaterialCodeReqList: [],
+        materialCodeReqList: [],
+        showResultArray: [],
+        resultArray: [],
         extInfo: {},
         codeList: [],
         auditStatus,
@@ -614,13 +625,6 @@
     },
     computed: {
       ...mapGetters(['getDictValue']),
-      curDateType() {
-        if (this.materialCodeReqList) {
-          return this.materialCodeReqList[0].manufactureTime
-            ? 'manufactureTime'
-            : 'procurementTime';
-        }
-      },
       tableHeader() {
         return tableHeader(this.infoData.assetType);
       },
@@ -640,6 +644,29 @@
       this._getInfo();
     },
     methods: {
+      wrapHandleScroll() {
+        console.log('---------wrapHandleScroll------------');
+        this.wrapPageNum += 1;
+        this.wrapFetchData();
+      },
+      wrapFetchData() {
+        const start = (this.wrapPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showMaterialCodeReqList = this.showMaterialCodeReqList.concat(
+          this.materialCodeReqList.slice(start, end)
+        );
+      },
+      materielHandleScroll() {
+        this.materielPageNum += 1;
+        this.materielFetchData();
+      },
+      materielFetchData() {
+        const start = (this.materielPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showResultArray = this.showResultArray.concat(
+          this.resultArray.slice(start, end)
+        );
+      },
       ...mapActions('dict', ['requestDict']),
       getAuditStatus: useDictLabel(auditStatus),
       getMaterialType: useDictLabel(materialType),
@@ -695,14 +722,16 @@
             }
           }
           this.dateTypes = arr[0].dateType;
-          this.detailList = arr;
+          this.materialCodeReqList = arr;
           let iArr = [];
           arr.forEach((item) => {
             item.outInDetailRecordMaterialDetailVOList.forEach((ele) => {
               iArr.push({ ...ele });
             });
           });
-          this.metailList = iArr;
+          this.resultArray = iArr;
+          this.wrapFetchData();
+          this.materielFetchData();
         }
         // const { data } = await getTreeByPid(0);
         const { data } = await allCategoryLevel();

+ 19 - 1
src/views/warehouseManagement/stockManagement/index.vue

@@ -103,6 +103,14 @@
           <el-button icon="el-icon-plus" type="primary" @click="add"
             >新建</el-button
           >
+          <!-- v-if="clientEnvironmentId == 2" -->
+          <el-button
+            v-if="clientEnvironmentId == 2"
+            icon="el-icon-plus"
+            type="primary"
+            @click="exportExcel"
+            >导入</el-button
+          >
         </template>
         <!-- 状态 -->
         <template v-slot:verifyStatus="{ row }">
@@ -266,7 +274,11 @@
         ]
       };
     },
-    created() {},
+    computed: {
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
+    },
     methods: {
       submit(row) {
         this.$confirm('此操作将提交流程, 是否继续?', '提示', {
@@ -322,6 +334,12 @@
           // query
         });
       },
+      exportExcel() {
+        this.$router.push({
+          path: '/warehouseManagement/stockManagement/add_export'
+          // query
+        });
+      },
       edit(row) {
         this.$router.push({
           path: '/warehouseManagement/stockManagement/edit',