From 69cd9f59a0fabf12f8c9147fcba7f69817a870b3 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期一, 06 十一月 2023 23:40:59 +0800 Subject: [PATCH] 更新仓内抓拍2 --- igds-web/src/main/resources/static/admin/inout/in-sample.js | 46 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 39 insertions(+), 7 deletions(-) diff --git a/igds-web/src/main/resources/static/admin/inout/in-sample.js b/igds-web/src/main/resources/static/admin/inout/in-sample.js index 575d438..f727125 100644 --- a/igds-web/src/main/resources/static/admin/inout/in-sample.js +++ b/igds-web/src/main/resources/static/admin/inout/in-sample.js @@ -6,7 +6,6 @@ var page = 1; var limit = 10; var curSampleData = null;// 褰撳墠缂栬緫鏁版嵁 -var curCheckItems = null;// 褰撳墠鏁版嵁鐨勬鏌ラ」淇℃伅 $(function () { layui.use(['layer', 'laydate', 'form', 'table'], function () { @@ -308,18 +307,17 @@ shade: 0, content: $('#checkDetail'), btnAlign: 'c', - btn: ['淇濆瓨骞舵墦鍗�', '淇濆瓨鎻愪氦', '鍏抽棴鍙栨秷'], + btn: ['鎵撳嵃骞朵繚瀛�', '浠呬繚瀛�', '鍏抽棴鍙栨秷'], yes: function () { - alertSuccess("鏉″舰鐮佸緟纭畾锛�"); + printBar(curSampleData); + submit(); }, btn2: function () { // 鏇存柊鍒伴〉闈� var data = form.val("form-detail"); obj.update(data); // 鍚堝苟鏇存柊鐣跺墠缂栬緫鏁版嵁 Object.assign(curSampleData, data); - submit(); - }, btn3: function () { layer.closeAll(); }, @@ -329,7 +327,6 @@ // 褰撳墠瀹屾垚 function submit() { - if (!curSampleData.sampleUser) { layer.alert("璇疯緭鍏ユ墻鏍蜂汉锛侊紒"); return; @@ -348,7 +345,7 @@ success: function (result) { if (result.code != "0000") { layer.close(index); - notify(result.msg, result.data); + alertError(result.msg); } else { layer.closeAll(); curSampleData = null; @@ -361,4 +358,39 @@ alertError("鎻愪氦澶辫触锛岃閲嶆柊灏濊瘯"); } }); +} + +/** + * 寮瑰嚭鎻愰啋妗� + * @param msg 鎻愰啋淇℃伅 + * @param data 鏁版嵁淇℃伅锛屽彲鑳戒负绌� + */ +function notify(msg, data) { + if (data) { + //璧嬪�� + $("#resultMsg").text(msg); + $("#resultUserName").text(data.userName); + $("#resultPlateNum").text(data.plateNum); + if ("IN" == data.type) { + $("#resultType").text("鍏ュ簱-" + INOUT_PROGRESS_MSG(data.progress)); + } else { + $("#resultType").text("鍑哄簱-" + INOUT_PROGRESS_MSG(data.progress)); + } + $("#resultIntelCard").text(data.intelCard); + + layer.open({ + type: 1, + offset: ['150px', '200px'], + area: '450px;', + shade: 0.8, + id: 'dialog_notify_info', + btn: ['纭畾'], + content: $('#dialog-from-notify'), + yes: function (index) { + layer.closeAll(); + } + }); + } else { + layer.alert(msg, {offset: ['300px', '300px']}); + } } \ No newline at end of file -- Gitblit v1.9.3