From 74951023b54f1789d1244fe923219d467487d771 Mon Sep 17 00:00:00 2001
From: chen.llin <1442464845@qq.comm>
Date: 星期一, 26 一月 2026 09:03:42 +0800
Subject: [PATCH] agv增加一个新单号防重复  ,增加一个手动呼叫agv

---
 src/main/webapp/static/js/taskLog/taskLog.js |   55 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/src/main/webapp/static/js/taskLog/taskLog.js b/src/main/webapp/static/js/taskLog/taskLog.js
index 762510f..680728e 100644
--- a/src/main/webapp/static/js/taskLog/taskLog.js
+++ b/src/main/webapp/static/js/taskLog/taskLog.js
@@ -11,7 +11,7 @@
     // 鏁版嵁娓叉煋
     tableIns = table.render({
         elem: '#taskLog',
-        headers: {token: localStorage.getItem('token')},
+        headers: { token: localStorage.getItem('token') },
         url: baseUrl + '/taskLog/list/auth',
         page: true,
         limit: 16,
@@ -20,31 +20,44 @@
         toolbar: '#toolbar',
         cellMinWidth: 50,
         cols: [[
-            {field: 'wrkNo', align: 'center', title: '宸ヤ綔鍙�', event: 'wrkNo', sort: true}
-            , {field: 'ioTime$', align: 'center', title: '宸ヤ綔鏃堕棿', width: 160, sort: true}
-            , {field: 'wrkSts$', align: 'center', title: '宸ヤ綔鐘舵��', width: 160}
-            , {field: 'ioType$', align: 'center', title: '鍏ュ嚭搴撶被鍨�', width: 160}
-            , {field: 'ioPri', align: 'center', title: '浼樺厛绾�'}
-            , {field: 'crnNo$', align: 'center', title: '鍫嗗灈鏈哄彿'}
-            , {field: 'sourceStaNo$', align: 'center', title: '婧愮珯'}
-            , {field: 'staNo$', align: 'center', title: '鐩爣绔�'}
-            , {field: 'sourceLocNo$', align: 'center', title: '婧愬簱浣�'}
-            , {field: 'locNo$', align: 'center', title: '鐩爣搴撲綅'}
-            , {field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
-            , {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true}
-            , {field: 'barcode', align: 'center', title: '鏉$爜'}
-            , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}
+            // {field: 'id', align: 'center', title: 'id'}
+            { field: 'wrkNo', align: 'center', title: '宸ヤ綔鍙�', sort: true, width: 105 }
+            , { field: 'ioTime$', align: 'center', title: '宸ヤ綔鏃堕棿', }
+            , { field: 'wrkSts$', align: 'center', title: '宸ヤ綔鐘舵��', }
+            , { field: 'ioType$', align: 'center', title: '鍏ュ嚭搴撶被鍨�', width: 150 }
+            , { field: 'ioPri', align: 'center', title: '浼樺厛绾�', width: 80 }
+            , { field: 'taskType$', align: 'center', title: '浠诲姟绫诲瀷', width: 120 }
+            , { field: 'crnNo$', align: 'center', title: '鍫嗗灈鏈�', hide: true }
+            , { field: 'sourceStaNo$', align: 'center', title: '婧愮珯', width: 120 }
+            , { field: 'sourceLocNo', align: 'center', title: '婧愬簱浣�', width: 120 }
+            , { field: 'staNo$', align: 'center', title: '鐩爣绔�', width: 120 }
+            , { field: 'locNo', align: 'center', title: '鐩爣搴撲綅', width: 120 }
+            , { field: 'barcode', align: 'center', title: '鏉$爜', width: 110 }
+            , { field: 'preHave', align: 'center', title: '鍏堝叆鍝�', hide: true }
+            , { field: 'takeNone', align: 'center', title: '绌烘搷浣�', hide: true }
+            , { field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true }
+            , { field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true, width: 160 }
+            , { fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 200 }
         ]],
         request: {
             pageName: 'curr',
             pageSize: 'limit'
         },
         parseData: function (res) {
+            // 瀹夊叏妫�鏌ワ紝闃叉res.data涓簎ndefined
+            if (!res || !res.data) {
+                return {
+                    'code': res ? res.code : 500,
+                    'msg': res ? res.msg : '鏁版嵁鏍煎紡閿欒',
+                    'count': 0,
+                    'data': []
+                };
+            }
             return {
                 'code': res.code,
                 'msg': res.msg,
-                'count': res.data.total,
-                'data': res.data.records
+                'count': res.data.total || 0,
+                'data': res.data.records || []
             }
         },
         response: {
@@ -96,6 +109,7 @@
         switch (obj.event) {
             // 鏄庣粏灞曠ず
             case 'detlShow':
+                id = data.id;
                 wrkNo = data.wrkNo;
                 ioTime = data.ioTime;
                 // 琛ㄦ牸涓嬫柟鏄剧ず
@@ -134,7 +148,7 @@
             shade: [0.5, '#000'] //0.1閫忔槑搴︾殑鑳屾櫙
         });
         var data = {
-//            id: $('#id').val(),
+            //            id: $('#id').val(),
             id: $('#id').val(),
             wrkNo: $('#wrkNo').val(),
             invWh: $('#invWh').val(),
@@ -195,7 +209,7 @@
         };
         $.ajax({
             url: baseUrl + "/taskLog/" + name + "/auth",
-            headers: {'token': localStorage.getItem('token')},
+            headers: { 'token': localStorage.getItem('token') },
             data: top.reObject(data),
             method: 'POST',
             success: function (res) {
@@ -227,6 +241,7 @@
 
     // 鎼滅储鏍忔悳绱簨浠�
     form.on('submit(search)', function (data) {
+        console.log('1111')
         pageCurr = 1;
         tableReload(false);
     });
@@ -372,7 +387,7 @@
         height = ($(window).height() * 0.8);
     }
     layer.style(index, {
-//        top: (($(window).height()-height)/3)+"px",
+        //        top: (($(window).height()-height)/3)+"px",
         height: height + 'px'
     });
 }

--
Gitblit v1.9.1