From 4cd9aca3325b383d834087b67c155f13df00b2c5 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 26 六月 2021 14:40:07 +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 dfe5d51..0366a20 100644 --- a/src/main/webapp/static/js/matCode/matCode.js +++ b/src/main/webapp/static/js/matCode/matCode.js @@ -7,7 +7,7 @@ cols.push.apply(cols, matCols); cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true} ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide: true} - ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80}) + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:120}) return cols; } layui.use(['table','laydate', 'form','upload'], function(){ @@ -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; @@ -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