From c7bf4b8773f888fd5be613b7bb6fb8ae4a47b028 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期二, 23 四月 2024 16:53:57 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/orderCheck/orderCheck.js |  186 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 144 insertions(+), 42 deletions(-)

diff --git a/src/main/webapp/static/js/orderCheck/orderCheck.js b/src/main/webapp/static/js/orderCheck/orderCheck.js
index fdc8cc0..d465eb5 100644
--- a/src/main/webapp/static/js/orderCheck/orderCheck.js
+++ b/src/main/webapp/static/js/orderCheck/orderCheck.js
@@ -102,6 +102,8 @@
             btnPrint(data.id, data.orderNo, 4);
         } else if (layEvent === 'manPrint') {
             addPakOut(data.orderNo);
+        }else if (layEvent === 'examine') {
+            examine(data);
         }else if (layEvent === 'look') {
             var $a = $(obj.tr).find('a[lay-event="look"]');
             var offset = $a.offset();
@@ -131,15 +133,14 @@
                         cols: [[   //宸ュ叿鏉℃槑缁�
                             {type: 'numbers'},
                             {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                            {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
+                            {field: 'maktx', title: '鍟嗗搧鍚嶇О'},
                             {field: 'locNo', title: '搴撲綅鍙�'},
+                            {field: 'batch', title: '鎵规'},
                             {field: 'anfme', title: '鏁伴噺'},
                             {field: 'realAnfme', title: '鐪熷疄鏁伴噺',style: 'color: blue;font-weight: bold', edit: true},
                             {field: 'diffAnfme', title: '宸紓鏁伴噺', style: 'font-weight: bold'},
-                            {field: 'type$', title: '鐘舵��'},
-                            {field: 'owner$', title: '璐т富'},
-                            {field: 'payment$', title: '璐х墿鐘舵��'},
-                            {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar3', minWidth: 80, width: 80, fixed: 'right'}
+                            {field: 'type$', title: '鐘舵��'}
+
                         ]],
                         request: {
                             pageName: 'curr',
@@ -172,14 +173,14 @@
             printExcel(data);
         }
     });
-    //鍗曟嵁鏄庣粏琛� 瀹℃牳鎸夐挳
-    table.on('tool(lookSSXMTable)', function (obj) {
-        var data = obj.data;
-        var layEvent = obj.event;
-        if (layEvent === 'examine') {
-            examine(data);
-        }
-    })
+    // //鍗曟嵁鏄庣粏琛� 瀹℃牳鎸夐挳
+    // table.on('tool(lookSSXMTable)', function (obj) {
+    //     var data = obj.data;
+    //     var layEvent = obj.event;
+    //     if (layEvent === 'examine') {
+    //         examine(data);
+    //     }
+    // })
 
     function showWrkTrace(orderId) {
         console.log(orderId);
@@ -241,6 +242,7 @@
                                 layer.close(dIndex);
                                 $(".layui-laypage-btn")[0].click();
                                 layer.msg(res.msg, {icon: 1});
+                                insTb.reload();
                             } else if (res.code === 403){
                                 top.location.href = baseUrl+"/";
                             }else {
@@ -264,14 +266,12 @@
                         {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
                         {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
                         {field: 'locNo', title: '搴撲綅鍙�'},
-                        {field: 'owner$', title: '璐т富'},
-                        {field: 'payment$', title: '璐х墿鐘舵��'},
                         {field: 'anfme', title: '搴撳瓨鏁伴噺'},
                         {field: 'realAnfme', title: '鐪熷疄鏁伴噺'},
                         {field: 'diffAnfme', title: '宸紓鏁伴噺', style: 'font-weight: bold'},
-                        {field: 'type$', title: '鐘舵��'},
+                        {field: 'type$', title: '鐘舵��'}
 
-                        {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBarr', minWidth: 80, width: 80, fixed: 'right'}
+
                     ]],
                     done: function (res) {
                         $(layero).find('.layui-table-view').css('margin', '0');
@@ -736,31 +736,31 @@
         })
     }
 
-    function examine(data){
-        console.log(data)
-        layer.confirm('璇风‘瀹氱湡瀹炴暟閲忎互鍙婂樊寮傛暟閲�!', {
-            shade: .1,
-            skin: 'layui-layer-admin'
-        }, function (i) {
-            $.ajax({
-                url: baseUrl + "/orderCheck/mxamine",
-                headers: {'token': localStorage.getItem('token')},
-                contentType:'application/json;charset=UTF-8',
-                data: JSON.stringify(data),
-                method: 'POST',
-                async: false,
-                success: function (res) {
-                    if (res.code === 200){
-                        layer.msg(res.msg);
-                    }else {
-                        layer.msg(res.msg);
-                    }
-                }
-            });
-
-
-        });
-    }
+    // function examine(data){
+    //     console.log(data)
+    //     layer.confirm('璇风‘瀹氱湡瀹炴暟閲忎互鍙婂樊寮傛暟閲�!', {
+    //         shade: .1,
+    //         skin: 'layui-layer-admin'
+    //     }, function (i) {
+    //         $.ajax({
+    //             url: baseUrl + "/orderCheck/mxamine",
+    //             headers: {'token': localStorage.getItem('token')},
+    //             contentType:'application/json;charset=UTF-8',
+    //             data: JSON.stringify(data),
+    //             method: 'POST',
+    //             async: false,
+    //             success: function (res) {
+    //                 if (res.code === 200){
+    //                     layer.msg(res.msg);
+    //                 }else {
+    //                     layer.msg(res.msg);
+    //                 }
+    //             }
+    //         });
+    //
+    //
+    //     });
+    // }
 
     // 椤甸潰淇敼
     table.on('edit(lookSSXMTable)', function (obj) {
@@ -780,4 +780,106 @@
     }
 
 
+    function examine(expTpe) {
+        admin.open({
+            type: 1,
+            title: '瀹℃牳鐩樼偣鍗�',
+            content: $('#editDialog2').html(),
+            area: '1300px',
+            success: function (layero, dIndex) {
+                $(layero).children('.layui-layer-content').css('overflow', 'visible');
+                var isExpAdd = !expTpe;
+                // 鍥炴樉鏁版嵁
+                form.val('editForm2', expTpe);
+                if (expTpe) {
+                    $('#orderNo').attr("disabled", "disabled");
+                }
+                // 琛ㄥ崟鎻愪氦浜嬩欢
+                form.on('submit(examine)', function (data) {
+                    let nList = admin.util.deepClone(xxDataList);
+                    layer.load(2);
+                    console.log(data);
+                    $.ajax({
+                        url: baseUrl + "/orderCheck/examine",
+                        headers: {'token': localStorage.getItem('token')},
+                        data: JSON.stringify({
+                            orderNo: data.field.orderNo,
+                            list: nList
+                        }),
+                        contentType: 'application/json;charset=UTF-8',
+                        method: 'POST',
+                        success: function (res) {
+                            layer.closeAll('loading');
+                            if (res.code === 200) {
+                                layer.close(dIndex);
+                                $(".layui-laypage-btn")[0].click();
+                                layer.msg(res.msg, {icon: 1});
+                                insTb.reload();
+                            } else if (res.code === 403) {
+                                top.location.href = baseUrl + "/";
+                            } else {
+                                layer.msg(res.msg, {icon: 2});
+                            }
+                        }
+                    })
+                    return false;
+                });
+                // 鏄庣粏琛ㄦ牸
+                var xxDataList = [];
+                var tbOptions = {
+                    elem: '#formSSXMTable2',
+                    headers: {token: localStorage.getItem('token')},
+                    data: xxDataList,
+                    page: true,
+                    height: '350px;',
+                    cellMinWidth: 100,
+                    cols: [[
+                        {type: 'numbers'},
+                        {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
+                        {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
+                        {field: 'locNo', title: '搴撲綅鍙�'},
+                        {field: 'anfme', title: '搴撳瓨鏁伴噺'},
+                        {field: 'realAnfme', title: '鐪熷疄鏁伴噺'},
+                        {field: 'diffAnfme', title: '宸紓鏁伴噺', style: 'font-weight: bold'},
+                        {field: 'type$', title: '鐘舵��'}
+
+                    ]],
+                    done: function (res) {
+                        $(layero).find('.layui-table-view').css('margin', '0');
+                    },
+                    size: ''
+                };
+
+
+                if (!isExpAdd) {
+
+                    $.ajax({
+                        url: baseUrl + "/orderCheck/detl/all/auth?orderNo=" + expTpe.orderNo,
+                        headers: {'token': localStorage.getItem('token')},
+                        method: 'GET',
+                        async: false,
+                        success: function (res) {
+                            if (res.code === 200) {
+                                console.log(res.data);
+                                xxDataList = res.data;
+                                tbOptions.data = xxDataList;
+                            } else if (res.code === 403) {
+                                top.location.href = baseUrl + "/";
+                            } else {
+                                layer.msg(res.msg, {icon: 2})
+                            }
+                        }
+                    })
+                }
+                var insTbSSXM = table.render(tbOptions);
+
+
+
+
+            }
+        });
+    }
+
+
+
 });

--
Gitblit v1.9.1