From c356df1cf4272db8792ccda3f0a48364b3b9f83c Mon Sep 17 00:00:00 2001 From: LSH Date: 星期四, 20 七月 2023 09:14:01 +0800 Subject: [PATCH] #贴标机申请获取货物信息接口实装 --- src/main/webapp/static/layuiadmin/lib/admin.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 50 insertions(+), 9 deletions(-) diff --git a/src/main/webapp/static/layuiadmin/lib/admin.js b/src/main/webapp/static/layuiadmin/lib/admin.js index d372ba0..0e69e9e 100644 --- a/src/main/webapp/static/layuiadmin/lib/admin.js +++ b/src/main/webapp/static/layuiadmin/lib/admin.js @@ -377,13 +377,29 @@ }); } - //渚跨 + //绉橀挜 ,note: function(othis){ var mobile = admin.screen() < 2 ,note = layui.data(setter.tableName).note; - + // 鑾峰彇婵�娲荤姸鎬� + var activation = false; + var exprTime; + $.ajax({ + url: baseUrl+"/system/activation/auth", + dataType:'json', + method: 'GET', + async: false, + success: function (res) { + if (res.code === 200) { + activation = true; + exprTime = res.data; + } + } + }); + events.note.index = admin.popup({ - title: '渚跨' + title: (activation?"宸叉縺娲伙紙鏈夋晥鏈熻嚦"+exprTime+"锛�":"Activation Code(鏈縺娲�)") + // title: 'license' ,shade: 0 ,offset: [ '41px' @@ -394,17 +410,42 @@ ,skin: 'layadmin-note layui-anim layui-anim-upbit' ,content: '<textarea placeholder="鍐呭"></textarea>' ,resize: false + ,btn: [(activation?"鏇存柊":"绔嬪嵆婵�娲�"), '鍙栨秷'] ,success: function(layero, index){ var textarea = layero.find('textarea') - ,value = note === undefined ? '渚跨涓殑鍐呭浼氬瓨鍌ㄥ湪鏈湴锛岃繖鏍峰嵆渚夸綘鍏虫帀浜嗘祻瑙堝櫒锛屽湪涓嬫鎵撳紑鏃讹紝渚濈劧浼氳鍙栧埌涓婁竴娆$殑璁板綍銆傛槸涓潪甯稿皬宸у疄鐢ㄧ殑鏈湴澶囧繕褰�' : note; + ,value = note === undefined ? '' : note; - textarea.val(value).focus().on('keyup', function(){ - layui.data(setter.tableName, { - key: 'note' - ,value: this.value - }); + // textarea.val(value).focus().on('keyup', function(){ + // layui.data(setter.tableName, { + // key: 'note' + // ,value: this.value + // }); + // }); + } + ,yes: function(index, layero){ + $.ajax({ + url: baseUrl+"/system/secret/auth", + headers: {'token': localStorage.getItem('token')}, + data: "secret="+$("#LAY_adminNote").children("textarea").val(), + dataType:'json', + method: 'POST', + success: function (res) { + if (res.code === 200) { + alert("婵�娲绘垚鍔�"); + location.reload(); + // layer.msg(res.msg); + // layer.close(index); + } else if (res.code === 403) { + top.location.href = baseUrl+"/login"; + } else { + layer.msg(res.msg) + } + } }); } + ,btn2: function(index, layero){ + layer.close(index); + } }) } -- Gitblit v1.9.1