From 03d710eba5cb116976e434f03140238be8a18059 Mon Sep 17 00:00:00 2001
From: pjb <pjb123456>
Date: 星期一, 30 六月 2025 15:36:38 +0800
Subject: [PATCH] wms功能完善

---
 src/main/webapp/static/js/basCrnError/basCrnError.js |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/static/js/basCrnError/basCrnError.js b/src/main/webapp/static/js/basCrnError/basCrnError.js
index 5b7d565..968dfe8 100644
--- a/src/main/webapp/static/js/basCrnError/basCrnError.js
+++ b/src/main/webapp/static/js/basCrnError/basCrnError.js
@@ -1,11 +1,11 @@
 var pageCurr;
-layui.use(['table','laydate', 'form'], function(){
+layui.use(['table','laydate', 'form','upload','layer'], function(){
     var table = layui.table;
     var $ = layui.jquery;
     var layer = layui.layer;
     var layDate = layui.laydate;
     var form = layui.form;
-
+    var upload = layui.upload;
     // 鏁版嵁娓叉煋
     tableIns = table.render({
         elem: '#basCrnError',
@@ -60,7 +60,26 @@
             });
         }
     });
-
+    upload.render({
+        elem: '#uploadExcel', // 缁戝畾鍏冪礌
+        url: baseUrl+'/importCrnErr', // 涓婁紶鎺ュ彛锛屾浛鎹负浣犵殑鍚庣鎺ュ彛
+        headers:{'token': localStorage.getItem('token')},
+        accept: 'file', // 鍏佽涓婁紶鐨勬枃浠剁被鍨�
+        exts: 'xls|xlsx', // 鍏佽涓婁紶鐨勬枃浠跺悗缂�
+        done: function(res){
+            // 涓婁紶瀹屾瘯鍥炶皟
+            if(res.code === 200){
+                layer.msg(res.msg);
+                console.log('鏂囦欢鏁版嵁:', res.data);
+            } else {
+                layer.msg(res.msg || '涓婁紶澶辫触');
+            }
+        },
+        error: function(){
+            // 璇锋眰寮傚父鍥炶皟
+            layer.msg('涓婁紶澶辫触锛岃閲嶈瘯');
+        }
+    });
     // 鐩戝惉鎺掑簭浜嬩欢
     table.on('sort(basCrnError)', function (obj) {
         var searchData = {};

--
Gitblit v1.9.1