From 3aaa2f73d832be9f277e3bad798896d061c85516 Mon Sep 17 00:00:00 2001
From: Administrator <56479841@QQ.COM>
Date: 星期二, 12 十二月 2023 13:04:12 +0800
Subject: [PATCH] #20231212-1304

---
 src/main/webapp/static/js/waitPakinLog/waitPakinLog.js |   64 ++++++++++++++++++++++---------
 1 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/src/main/webapp/static/js/waitPakinLog/waitPakinLog.js b/src/main/webapp/static/js/waitPakinLog/waitPakinLog.js
index 4c5a625..c6411a6 100644
--- a/src/main/webapp/static/js/waitPakinLog/waitPakinLog.js
+++ b/src/main/webapp/static/js/waitPakinLog/waitPakinLog.js
@@ -1,4 +1,24 @@
 var pageCurr;
+function getCol() {
+    var cols = [
+    ];
+    cols.push.apply(cols, detlCols);
+    cols.push({field: 'status', align: 'center',title: '鏁版嵁鐘舵��', templet:function(row){
+                var html = "<input value='status' type='checkbox' lay-skin='switch' lay-text='姝e父|閿佸畾' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'";
+                if(row.status === 'Y'){html += " checked ";}
+                html += ">";
+                return html;
+            }}
+        ,{field: 'ioStatus', align: 'center',title: '鍏ュ嚭鐘舵��', templet:function(row){
+                var html = "<input value='ioStatus' type='checkbox' lay-skin='switch' lay-text='杩愯涓瓅寰呭鐞�' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'";
+                if(row.ioStatus === 'Y'){html += " checked ";}
+                html += ">";
+                return html;
+            }}
+        ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true}
+        ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+    return cols;
+}
 layui.use(['table','laydate', 'form'], function(){
     var table = layui.table;
     var $ = layui.jquery;
@@ -17,25 +37,7 @@
         even: true,
         toolbar: '#toolbar',
         cellMinWidth: 50,
-        cols: [[
-            {type: 'checkbox'}
-//            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
-//             ,{field: 'id', align: 'center',title: '缂栧彿'}
-            ,{field: 'pakinId', align: 'center',title: '鍏ュ簱閫氱煡鍙�'}
-            ,{field: 'barcode', align: 'center',title: '鎵樼洏鐮�'}
-            ,{field: 'matnr', align: 'center',title: '鐗╂枡缂栫爜'}
-            ,{field: 'maktx', align: 'center',title: '鐗╂枡鎻忚堪'}
-            ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
-            ,{field: 'unit', align: 'center',title: '鍗曚綅'}
-            ,{field: 'status', align: 'center',title: '鐘舵��'}
-            ,{field: 'memo', align: 'center',title: '澶囨敞',hide:true}
-            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿',hide:true}
-            ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',hide:true}
-            // ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿'}
-            // ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�',event: 'appeUser', style: 'cursor:pointer'}
-
-            // ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
-        ]],
+        cols: [getCol()],
         request: {
             pageName: 'curr',
             pageSize: 'limit'
@@ -65,6 +67,7 @@
                     res.data[_index][data.value] = 'N';
                 }
             });
+            getOutBound();
         }
     });
 
@@ -389,6 +392,29 @@
         ,range: true
     });
 
+    // 鑾峰彇鎷ユ湁鑰呰〃鏁版嵁
+    function getOutBound(){
+        $.ajax({
+            url: baseUrl+"/owner/auto/site",
+            headers: {'token': localStorage.getItem('token')},
+            method: 'POST',
+            async: false,
+            success: function (res) {
+                if (res.code === 200){
+                    var tpl = $("#takeSiteSelectTemplate").html();
+                    var template = Handlebars.compile(tpl);
+                    var html = template(res);
+                    $('#ownerSelect').append(html);
+                    form.render('select');
+                } else if (res.code === 403){
+                    top.location.href = baseUrl+"/";
+                }else {
+                    layer.msg(res.msg)
+                }
+            }
+        })
+    }
+
 });
 
 // 鍏抽棴鍔ㄤ綔

--
Gitblit v1.9.1