From d16d3b70e94f798d7e5abd145f8566d81d0c66c9 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期二, 14 六月 2022 18:07:45 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/matCode/matCode.js |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/src/main/webapp/static/js/matCode/matCode.js b/src/main/webapp/static/js/matCode/matCode.js
index f36bf68..0366a20 100644
--- a/src/main/webapp/static/js/matCode/matCode.js
+++ b/src/main/webapp/static/js/matCode/matCode.js
@@ -101,6 +101,21 @@
                         layer.getChildFrame('#data-detail-submit-edit', index).hide();
                     	clearFormVal(layer.getChildFrame('#detail', index));
                         layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+                        // 瀛楁娉ㄥ叆鐗╂枡缂栫爜
+                        $.ajax({
+                            url: baseUrl+"/matCode/auto/id/auth",
+                            headers: {'token': localStorage.getItem('token')},
+                            method: 'GET',
+                            success: function (res) {
+                                if (res.code === 200){
+                                    layer.getChildFrame('#matNo', index).val(res.data);
+                                } else if (res.code === 403){
+                                    parent.location.href = "/";
+                                }else {
+                                    layer.msg(res.msg)
+                                }
+                            }
+                        })
                     }
                 });
                 break;
@@ -119,7 +134,7 @@
                             success: function (res) {
                                 if (res.code === 200){
                                     layer.closeAll();
-                                    tableReload(false);
+                                    $(".layui-laypage-btn")[0].click();
                                 } else if (res.code === 403){
                                     top.location.href = baseUrl+"/";
                                 } else {
@@ -255,6 +270,26 @@
                     }
                 });
                 break;
+            // 缂栬緫
+            case 'edit':
+                layer.open({
+                    type: 2,
+                    title: '淇敼',
+                    maxmin: true,
+                    area: [top.detailWidth, top.detailHeight],
+                    shadeClose: false,
+                    content: 'matCode_detail.html',
+                    success: function(layero, index){
+                        layer.getChildFrame('#data-detail-submit-save', index).hide();
+                        setFormVal(layer.getChildFrame('#detail', index), data, false);
+                        // top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
+                        top.convertDisabled(layer.getChildFrame('#matNo', index), true);
+                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
+                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+                    }
+                });
+                break;
             // 鎵撳嵃
             case "btnPrint":
                 printMatCodeNos = [];

--
Gitblit v1.9.1