From 8d1a27af40f3ebe9343a11eaede198e93836fa79 Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期一, 29 三月 2021 16:45:32 +0800
Subject: [PATCH] 出库增加备注修改功能

---
 src/main/webapp/views/pakStore/pakStore.html   |    1 +
 src/main/webapp/views/pakStore/matMemo.html    |   23 +++++++++++++++++++++++
 src/main/webapp/static/js/pakStore/pakStore.js |   35 ++++++++++++++++++++++++++++++++++-
 3 files changed, 58 insertions(+), 1 deletions(-)

diff --git a/src/main/webapp/static/js/pakStore/pakStore.js b/src/main/webapp/static/js/pakStore/pakStore.js
index 55db1b3..3f712f8 100644
--- a/src/main/webapp/static/js/pakStore/pakStore.js
+++ b/src/main/webapp/static/js/pakStore/pakStore.js
@@ -6,7 +6,10 @@
         {fixed: 'left', field: 'count', title: '鏁伴噺(蹇呭~)', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'}
     ];
     cols.push.apply(cols, matCols);
-    cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
+    cols.push(
+        {field: 'memo', title:'澶囨敞', align: 'center'},
+        {fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:120}
+        )
     return cols;
 }
 
@@ -89,6 +92,7 @@
     // 鐩戝惉琛屽伐鍏蜂簨浠�
     table.on('tool(chooseData)', function(obj){
         var data = obj.data;
+
         switch (obj.event) {
             case 'remove':
                 for (var i = matCodeData.length - 1; i >= 0; i--) {
@@ -102,6 +106,35 @@
                         // 瑕嗙洊render鏂规硶鐨刣one
                     }});
                 break;
+            case 'memo':
+               var memoLayer = layer.open({
+                    type: 2,
+                    title: '澶囨敞',
+                    maxmin: true,
+                    area: ['400px', '215px'],
+                    shadeClose: false,
+                    content: 'matMemo.html',
+                    btn: ['淇濆瓨', '鍙栨秷'],
+                    style: 'text-algin: center',
+                    yes:  function(index, layero){
+                        var memo = layer.getChildFrame('body', index).find("#memo")[0].value;
+                        matCodeData.map(function (item) {
+                            if (item.matNo === data.matNo) {
+                                item.memo = memo;
+                            }
+                        });
+                        // 閲嶇疆琛ㄦ牸鏁版嵁
+                        tableIns.reload({data: matCodeData,done:function (res) {
+                            limit();
+                            getInBound();
+                            layer.close(memoLayer);
+                        }});
+                    },
+                    success: function(layero, index){
+
+                    }
+                });
+                break;
         }
     });
 
diff --git a/src/main/webapp/views/pakStore/matMemo.html b/src/main/webapp/views/pakStore/matMemo.html
new file mode 100644
index 0000000..379579b
--- /dev/null
+++ b/src/main/webapp/views/pakStore/matMemo.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>澶囨敞</title>
+    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
+    <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+    <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
+</head>
+<body>
+<div style="text-align: center; padding: 5px">
+    <textarea rows="6" style="width: 95%; resize: none" id="memo" type="text"></textarea>
+</div>
+</body>
+<script>
+    function setMatMemo(val) {
+        $("#memo").val(val);
+    }
+</script>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/views/pakStore/pakStore.html b/src/main/webapp/views/pakStore/pakStore.html
index 2387f41..2250d7a 100644
--- a/src/main/webapp/views/pakStore/pakStore.html
+++ b/src/main/webapp/views/pakStore/pakStore.html
@@ -108,6 +108,7 @@
 
     <!-- 琛� -->
     <script type="text/html" id="operate">
+        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="memo">澶囨敞</a>
         <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">绉婚櫎</a>
     </script>
 

--
Gitblit v1.9.1