From 75b8acaa4617ec20d6da616b8ccf02b1f71fdc69 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期二, 22 三月 2022 15:37:05 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/pickout/pickout.js |  261 ++++++++++++++++++++++++++++------------------------
 1 files changed, 141 insertions(+), 120 deletions(-)

diff --git a/src/main/webapp/static/js/pickout/pickout.js b/src/main/webapp/static/js/pickout/pickout.js
index 7e54ae0..aaa9c24 100644
--- a/src/main/webapp/static/js/pickout/pickout.js
+++ b/src/main/webapp/static/js/pickout/pickout.js
@@ -34,7 +34,7 @@
         defaultToolbar: [],
         cols:[[
             // {type: 'checkbox'}
-            {field: 'wrkNo', align: 'center',title: '浠诲姟鍙�'}
+            {field: 'wrkNo', align: 'center',title: '浠诲姟鍙�',width: 180}
             ,{field: 'id', align: 'center',title: '鍞竴ID',hide: true}
             ,{field: 'hostId', align: 'center',title: '鍟嗘埛ID', hide: true}
             ,{field: 'userId', align: 'center',title: '鐢ㄦ埛ID', hide: true}
@@ -47,7 +47,7 @@
             ,{field: 'updateBy', align: 'center',title: '', hide:true}
             ,{field: 'memo', align: 'center',title: '', hide:true}
 
-            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:180}
+            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate'}
         ]],
         done: function (res,curr,count){
             $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
@@ -66,10 +66,17 @@
                 break;
         }
     });
+    /* 鐩戝惉琛屽崟鍑讳簨浠� */
+    var selObj;
+    table.on('row(leftTable)', function (obj) {
+        selObj = obj;
+        obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
+        insTb2.reload({where: {doc_type: obj.data.docId}, page: {curr: 1}});
+    });
 
     /* 鍒犻櫎 */
     function del(ids) {
-        layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
+        layer.confirm('纭畾瑕佹挙閿�閫変腑鏁版嵁鍚楋紵', {
             skin: 'layui-layer-admin',
             shade: .1
         }, function (i) {
@@ -100,7 +107,7 @@
     tableIns = table.render({
         elem: '#pickout',
         headers: {token: localStorage.getItem('token')},
-        url: baseUrl+'/pickout/list/auth',
+        url: baseUrl+'/pickoutDetl/list/auth',
         page: true,
         limit: 16,
         limits: [16, 30, 50, 100, 200, 500],
@@ -108,20 +115,34 @@
         cellMinWidth: 50,
         cols: [[
             // {type: 'checkbox'}
-            {field: 'wrkNo', align: 'center',title: '浠诲姟鍙�'}
-            ,{field: 'id', align: 'center',title: '鍞竴ID'}
-            ,{field: 'hostId', align: 'center',title: '鍟嗘埛ID'}
-            ,{field: 'userId', align: 'center',title: '鐢ㄦ埛ID'}
+            {field: 'id', align: 'center',title: '鍞竴ID', hide:true}
+            ,{field: 'headId', align: 'center',title: '琛ㄥごID', hide:true}
+            ,{field: 'nodeId', align: 'center',title: '搴撲綅ID', hide:true}
+            ,{field: 'nodeName', align: 'center',title: '搴撲綅鍚嶇О'}
+            ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+            ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜'}
+            ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'}
+            ,{field: 'name', align: 'center',title: '鍚嶇О', hide:true}
+            ,{field: 'specs', align: 'center',title: '瑙勬牸', hide:true}
+            ,{field: 'model', align: 'center',title: '鍨嬪彿', hide:true}
+            ,{field: 'batch', align: 'center',title: '鎵瑰彿', hide:true}
+            ,{field: 'unit', align: 'center',title: '鍗曚綅', hide:true}
+            ,{field: 'barcode', align: 'center',title: '鎵樼洏鐮�', hide:true}
+            ,{field: 'docType', align: 'center',title: '鍗曟嵁绫诲瀷', hide:true}
+            ,{field: 'docId', align: 'center',title: '鍗曟嵁缂栧彿', hide:true}
+            ,{field: 'price', align: 'center',title: '浠锋牸', hide:true}
+            ,{field: 'weight', align: 'center',title: '閲嶉噺', hide:true}
+            ,{field: 'status', align: 'center',title: '鐘舵��' , hide:true}
+            ,{field: 'pickStaff', align: 'center',title: '鎷h揣鍛業D'}
+            ,{field: 'pickStart$', align: 'center',title: '鎷h揣寮�濮嬫椂闂�'}
+            ,{field: 'pickEnd$', align: 'center',title: '鎷h揣缁撴潫鏃堕棿'}
+            ,{field: 'createTime$', align: 'center',title: '鍒涘缓鏃堕棿', hide:true}
+            ,{field: 'createBy', align: 'center',title: '鍒涘缓浜哄憳ID', hide:true}
+            ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide:true}
+            ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳ID', hide:true}
+            ,{field: 'memo', align: 'center',title: '澶囨敞', hide:true}
 
-            ,{field: 'wrkSts$', align: 'center',title: '宸ヤ綔鐘舵��' ,templet: '#wrkStsTpl' , width: 100}
-            ,{field: 'zpallet', align: 'center',title: '鏉″舰鐮�' , hide:true}
-            ,{field: 'createTime$', align: 'center',title: '', hide:true}
-            ,{field: 'createBy', align: 'center',title: '', hide:true}
-            ,{field: 'updateTime$', align: 'center',title: '', hide:true}
-            ,{field: 'updateBy', align: 'center',title: '', hide:true}
-            ,{field: 'memo', align: 'center',title: '', hide:true}
-
-            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:180}
+            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
         ]],
         request: {
             pageName: 'curr',
@@ -147,109 +168,109 @@
         }
     });
 
-    // 鐩戝惉鎺掑簭浜嬩欢
-    table.on('sort(pickout)', function (obj) {
-        var searchData = {};
-        $.each($('#search-box [name]').serializeArray(), function() {
-            searchData[this.name] = this.value;
-        });
-        searchData['orderByField'] = obj.field;
-        searchData['orderByType'] = obj.type;
-        tableIns.reload({
-            where: searchData,
-            page: {curr: 1}
-        });
-    });
-
-    // 鐩戝惉澶村伐鍏锋爮浜嬩欢
-    table.on('toolbar(pickout)', function (obj) {
-        var checkStatus = table.checkStatus(obj.config.id).data;
-        switch(obj.event) {
-            case 'addData':
-                showEditModel();
-                break;
-            case 'deleteData':
-               if (checkStatus.length === 0) {
-                   layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
-                   return;
-               }
-               var ids = checkStatus.map(function (d) {
-                   return d.id;
-               });
-               del(ids);
-               break;
-            case 'exportData':
-                layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
-                    var titles=[];
-                    var fields=[];
-                    obj.config.cols[0].map(function (col) {
-                        if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
-                            titles.push(col.title);
-                            fields.push(col.field);
-                        }
-                    });
-                    var exportData = {};
-                    $.each($('#search-box [name]').serializeArray(), function() {
-                        exportData[this.name] = this.value;
-                    });
-                    var param = {
-                        'pickout': exportData,
-                        'fields': fields
-                    };
-                    $.ajax({
-                        url: baseUrl+"/pickout/export/auth",
-                        headers: {'token': localStorage.getItem('token')},
-                        data: JSON.stringify(param),
-                        dataType:'json',
-                        contentType:'application/json;charset=UTF-8',
-                        method: 'POST',
-                        success: function (res) {
-                            layer.closeAll();
-                            if (res.code === 200) {
-                                table.exportFile(titles,res.data,'xls');
-                            } else if (res.code === 403) {
-                                top.location.href = baseUrl+"/";
-                            } else {
-                                layer.msg(res.msg, {icon: 2})
-                            }
-                        }
-                    });
-                });
-                break;
-        }
-    });
-    /* 琛ㄦ牸鎼滅储 */
-    form.on('submit(leftResearch)', function (data) {
-        insTb.reload({where: {doc_name: data.field.docName,doc_class:2}});
-        return false;
-    });
-
-
-    // 鎼滅储
-    form.on('submit(search)', function (data) {
-        pageCurr = 1;
-        tableReload(false);
-    });
-
-    // 閲嶇疆
-    form.on('submit(reset)', function (data) {
-        pageCurr = 1;
-        clearFormVal($('#search-box'));
-        tableReload(false);
-    });
-
-    // 鏃堕棿閫夋嫨鍣�
-    function layDateRender() {
-            layDate.render({
-        elem: '#createTime\\$',
-        type: 'datetime'
-    });
-        layDate.render({
-        elem: '#updateTime\\$',
-        type: 'datetime'
-    });
-
-    }
+    // // 鐩戝惉鎺掑簭浜嬩欢
+    // table.on('sort(pickout)', function (obj) {
+    //     var searchData = {};
+    //     $.each($('#search-box [name]').serializeArray(), function() {
+    //         searchData[this.name] = this.value;
+    //     });
+    //     searchData['orderByField'] = obj.field;
+    //     searchData['orderByType'] = obj.type;
+    //     tableIns.reload({
+    //         where: searchData,
+    //         page: {curr: 1}
+    //     });
+    // });
+    //
+    // // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+    // table.on('toolbar(pickout)', function (obj) {
+    //     var checkStatus = table.checkStatus(obj.config.id).data;
+    //     switch(obj.event) {
+    //         case 'addData':
+    //             showEditModel();
+    //             break;
+    //         case 'deleteData':
+    //            if (checkStatus.length === 0) {
+    //                layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+    //                return;
+    //            }
+    //            var ids = checkStatus.map(function (d) {
+    //                return d.id;
+    //            });
+    //            del(ids);
+    //            break;
+    //         case 'exportData':
+    //             layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
+    //                 var titles=[];
+    //                 var fields=[];
+    //                 obj.config.cols[0].map(function (col) {
+    //                     if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
+    //                         titles.push(col.title);
+    //                         fields.push(col.field);
+    //                     }
+    //                 });
+    //                 var exportData = {};
+    //                 $.each($('#search-box [name]').serializeArray(), function() {
+    //                     exportData[this.name] = this.value;
+    //                 });
+    //                 var param = {
+    //                     'pickout': exportData,
+    //                     'fields': fields
+    //                 };
+    //                 $.ajax({
+    //                     url: baseUrl+"/pickout/export/auth",
+    //                     headers: {'token': localStorage.getItem('token')},
+    //                     data: JSON.stringify(param),
+    //                     dataType:'json',
+    //                     contentType:'application/json;charset=UTF-8',
+    //                     method: 'POST',
+    //                     success: function (res) {
+    //                         layer.closeAll();
+    //                         if (res.code === 200) {
+    //                             table.exportFile(titles,res.data,'xls');
+    //                         } else if (res.code === 403) {
+    //                             top.location.href = baseUrl+"/";
+    //                         } else {
+    //                             layer.msg(res.msg, {icon: 2})
+    //                         }
+    //                     }
+    //                 });
+    //             });
+    //             break;
+    //     }
+    // });
+    // /* 琛ㄦ牸鎼滅储 */
+    // form.on('submit(leftResearch)', function (data) {
+    //     insTb.reload({where: {doc_name: data.field.docName,doc_class:2}});
+    //     return false;
+    // });
+    //
+    //
+    // // 鎼滅储
+    // form.on('submit(search)', function (data) {
+    //     pageCurr = 1;
+    //     tableReload(false);
+    // });
+    //
+    // // 閲嶇疆
+    // form.on('submit(reset)', function (data) {
+    //     pageCurr = 1;
+    //     clearFormVal($('#search-box'));
+    //     tableReload(false);
+    // });
+    //
+    // // 鏃堕棿閫夋嫨鍣�
+    // function layDateRender() {
+    //         layDate.render({
+    //     elem: '#createTime\\$',
+    //     type: 'datetime'
+    // });
+    //     layDate.render({
+    //     elem: '#updateTime\\$',
+    //     type: 'datetime'
+    // });
+    //
+    // }
     layDateRender();
 
 });

--
Gitblit v1.9.1