From d9e1a4fe6e51958c4571efe2ced4d4172ed385db Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期一, 12 六月 2023 21:49:53 +0800
Subject: [PATCH] 称重页面调整-增加化验信息

---
 igds-web/src/main/resources/static/admin/inout/in-weight.js |  132 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 131 insertions(+), 1 deletions(-)

diff --git a/igds-web/src/main/resources/static/admin/inout/in-weight.js b/igds-web/src/main/resources/static/admin/inout/in-weight.js
index 4577e0a..3f8b20e 100644
--- a/igds-web/src/main/resources/static/admin/inout/in-weight.js
+++ b/igds-web/src/main/resources/static/admin/inout/in-weight.js
@@ -7,6 +7,7 @@
 var timerWeight;
 var paramIntelCard;//璁惧璇嗗埆缁撴灉
 var paramIdCard;//璁惧璇嗗埆缁撴灉
+var curCheckItems = null;// 褰撳墠鏁版嵁鐨勬鏌ラ」淇℃伅
 var step = 1;
 
 $(function () {
@@ -491,5 +492,134 @@
 
 //鏄剧ず璐ㄦ淇℃伅
 function showCheck() {
-    alertError("璋冩暣");
+    if(!recordData){
+        alertError("娌℃湁涓氬姟鏁版嵁淇℃伅锛屾墽琛岃鎷掔粷");
+        return;
+    }
+
+    // 鑾峰彇鍖栭獙椤逛俊鎭�
+    flushCheckItem();
+
+    layer.open({
+        type: 1,
+        title: "璐ㄦ璇︾粏",
+        offset: ['120px', '100px'],
+        area: ['1000px', '520px'],
+        shade: 0,
+        content: $('#checkDetail'),
+        btnAlign: 'c',
+        btn: ['鍙栨秷'],
+        yes: function () {
+            layer.closeAll();
+        },
+        closeBtn: 0
+    });
+}
+
+/**
+ * 鍒锋柊鍖栭獙缁撴灉椤�
+ */
+function flushCheckItem() {
+
+    curCheckItems = null;
+    $.ajax({
+        type: "POST",
+        url: "../../basic/inout/get-check-item",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        data: JSON.stringify(recordData),
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.msg(result.msg);
+            } else {
+                curCheckItems = result.data;
+
+                // 椤甸潰娓叉煋妫�娴嬮」
+                renderTableCheckItem();
+            }
+        },
+        error: function () {
+            layer.msg("鍚庡彴寮傚父锛岃閲嶈瘯鎴栬�呰仈绯荤鐞嗗憳锛侊紒");
+        }
+    });
+}
+
+/**
+ * 娓叉煋琛ㄦ牸
+ */
+function renderTableCheckItem() {
+    // 娓呯┖鏁版嵁
+    $("#tableCheckItem").empty();
+    table.render({
+        elem: '#tableCheckItem',
+        data: curCheckItems,
+        page: false,
+        even: true,
+        cols: [[{
+            field: 'standardName',
+            title: '妫�楠岄」鐩�',
+            align: 'center',
+            width: '13%'
+        }, {
+            field: 'value',
+            title: '妫�楠屽��',
+            align: 'center',
+            width: '9%'
+        }, {
+            field: 'operaSymbolValue',
+            title: '鏍囧噯鍊�',
+            align: 'center',
+            width: '10%'
+        }, {
+            field: 'unit',
+            title: '鍗曚綅',
+            align: 'center',
+            width: '10%'
+        }, {
+            field: 'deNum',
+            title: '鎵i噸',
+            align: 'center',
+            width: '9%'
+        }, {
+            field: 'addNum',
+            title: '澧為噸',
+            align: 'center',
+            width: '9%'
+        }, {
+            field: 'dePrice',
+            title: '鎵d环',
+            align: 'center',
+            width: '9%'
+        }, {
+            field: 'addPrice',
+            title: '澧炰环',
+            align: 'center',
+            width: '9%'
+        }, {
+            field: 'result',
+            title: '妫�楠岀粨鏋�',
+            align: 'center',
+            width: '10%',
+            templet: function (item) {
+                if (item.result == null) {
+                    return "";
+                }
+                if (item.result == '0') {
+                    return "涓嶅悎鏍�";
+                }
+                if (item.result == '1') {
+                    return "鍚堟牸";
+                }
+            }
+        }, {
+            field: 'remarks',
+            title: '澶囨敞璇存槑',
+            align: 'center'
+        }]]
+    });
+
+    $("thead tr").css({
+        "border-bottom": "2px solid #53adce",
+        "background": "#eff4f6"
+    });
 }
\ No newline at end of file

--
Gitblit v1.9.3