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 |   66 +++++++++++++++++++--------------
 1 files changed, 38 insertions(+), 28 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 6824ee7..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
@@ -309,7 +309,8 @@
         btnAlign: 'c',
         btn: ['鎵撳嵃骞朵繚瀛�', '浠呬繚瀛�', '鍏抽棴鍙栨秷'],
         yes: function () {
-            printSimpleStart();
+            printBar(curSampleData);
+            submit();
         }, btn2: function () {
             // 鏇存柊鍒伴〉闈�
             var data = form.val("form-detail");
@@ -321,32 +322,6 @@
             layer.closeAll();
         },
         closeBtn: 0
-    });
-}
-
-
-//鎵ц鎵撳嵃
-function printSimpleStart() {
-    var index = layer.load();
-    $.ajax({
-        type: "POST",
-        url: "../../basic/inout/report/bill-simple",
-        dataType: "json",
-        contentType: "application/json;charset=UTF-8",
-        data: JSON.stringify(curSampleData),
-        success: function (result) {
-            layer.close(index);
-            if (result.code != "0000") {
-                alertError(result.msg);
-            } else {
-                printSimpleBill(result.data);
-                submit();
-            }
-        },
-        error: function () {
-            layer.close(index);
-            alertError("鎵撳嵃鍗曟嵁璋冪敤澶辫触");
-        }
     });
 }
 
@@ -370,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;
@@ -383,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