From acad71339e2a131f6ef72c9be912b9e70dd00af0 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期四, 24 三月 2022 15:17:16 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/pickout/pickout.js |   65 ++++++++++++++++++++++----------
 1 files changed, 44 insertions(+), 21 deletions(-)

diff --git a/src/main/webapp/static/js/pickout/pickout.js b/src/main/webapp/static/js/pickout/pickout.js
index 316ce54..95be0cb 100644
--- a/src/main/webapp/static/js/pickout/pickout.js
+++ b/src/main/webapp/static/js/pickout/pickout.js
@@ -1,4 +1,5 @@
 var pageCurr;
+var currPick;
 layui.config({
     base: baseUrl + "/static/layui/lay/modules/"
 }).use(['table','laydate', 'form', 'admin'], function(){
@@ -57,8 +58,8 @@
     table.on('tool(leftTable)', function(obj){
         var data = obj.data;
         switch (obj.event) {
-            case 'complete':
-                complete(data);
+            case 'printOrder':
+                printPick(data);
                 break;
             case "del":
                 var ids = [data.id];
@@ -69,9 +70,11 @@
     /* 鐩戝惉琛屽崟鍑讳簨浠� */
     var selObj;
     table.on('row(leftTable)', function (obj) {
+        currPick = obj.data.id;
         selObj = obj;
         obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
         tableIns.reload({where: {head_id: obj.data.id}, page: {curr: 1}});
+
     });
 
     /* 鍒犻櫎 */
@@ -89,14 +92,18 @@
                 method: 'POST',
                 success: function (res) {
                     layer.close(loadIndex);
+
                     if (res.code === 200){
+
                         layer.msg(res.msg, {icon: 1});
-                        tableReload();
+
                     } else if (res.code === 403){
                         top.location.href = baseUrl+"/";
                     } else {
                         layer.msg(res.msg, {icon: 2});
                     }
+                    leftTB.reload({where: null,page: {curr: 1}});
+                    tableIns.reload({where: null,page: {curr: 1}});
                 }
             })
         });
@@ -106,6 +113,17 @@
         leftTB.reload({where: {wrk_no: data.field.docName}});
         return false;
     });
+    // 閲嶇疆
+    form.on('submit(leftReset)', function (data) {
+
+        leftTB.reload({where: null,page: {curr: 1}});
+        $("#docName").val("");
+        tableReload(false);
+    });
+
+    function printPick(data){
+
+    }
 
 
 
@@ -174,12 +192,12 @@
             limit();
         }
     });
-    /* 琛ㄦ牸2鎼滅储 */
-    form.on('submit(rightSearch)', function (data) {
-
-        tableIns.reload({where: data.field , page: {curr: 1}});
-        return false;
-    });
+    // /* 琛ㄦ牸2鎼滅储 */
+    // form.on('submit(rightSearch)', function (data) {
+    //
+    //     tableIns.reload({where: data.field , page: {curr: 1}});
+    //     return false;
+    // });
     // // 鐩戝惉鎺掑簭浜嬩欢
     // table.on('sort(pickout)', function (obj) {
     //     var searchData = {};
@@ -258,18 +276,22 @@
     // });
     //
     //
-    // // 鎼滅储
-    // form.on('submit(search)', function (data) {
-    //     pageCurr = 1;
-    //     tableReload(false);
-    // });
-    //
-    // // 閲嶇疆
-    // form.on('submit(reset)', function (data) {
-    //     pageCurr = 1;
-    //     clearFormVal($('#search-box'));
-    //     tableReload(false);
-    // });
+    // 鎼滅储
+    form.on('submit(rightSearch)', function (data) {
+        data.field.head_id = currPick;
+        tableIns.reload({
+            where: data.field,
+            page: {curr: 1}
+        });
+    });
+
+    // 閲嶇疆
+    form.on('submit(reset)', function (data) {
+
+        tableIns.reload({where: null,page: {curr: 1}});
+        $("#matnr").val("");
+        tableReload(false);
+    });
     //
     // 鏃堕棿閫夋嫨鍣�
     function layDateRender() {
@@ -297,6 +319,7 @@
     $.each($('#search-box [name]').serializeArray(), function() {
         searchData[this.name] = this.value;
     });
+
     tableIns.reload({
         where: searchData,
         page: {curr: pageCurr}

--
Gitblit v1.9.1