From fae4bd828a6b81b95f53e285fcb4749fbd80c7bf Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期一, 04 九月 2023 17:31:46 +0800
Subject: [PATCH] 增加粮情层行转换配置

---
 igds-web/src/main/resources/static/admin/inout/in-weight.js |  174 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 171 insertions(+), 3 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 b2cf50b..93b01f3 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,8 @@
 var timerWeight;
 var paramIntelCard;//璁惧璇嗗埆缁撴灉
 var paramIdCard;//璁惧璇嗗埆缁撴灉
+var curCheckItems = null;// 褰撳墠鏁版嵁鐨勬鏌ラ」淇℃伅
+var step = 1;
 
 $(function () {
     layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () {
@@ -113,6 +115,7 @@
         deptId: deptId,
         progress: recordData.progress,
         bizType: bizType,
+        bizId: recordData.id,
         plateNum: recordData.plateNum,
         id1: snapDto1.id,
         id2: snapDto2.id,
@@ -143,7 +146,6 @@
             alertError("鍚庡彴璋冪敤鎴浘澶辫触锛岃閲嶆柊灏濊瘯");
         }
     });
-
     //濡傛灉鏄浜屾绉伴噸锛岄粯璁ゆ墽琛岃嚜鍔ㄨ绠�
     if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
         deAutoByIn("emptyWeight");
@@ -324,6 +326,8 @@
     weightDto.weight = 0.0;
     $("#weightValue").text("0.0");
     $("#img_scale_statule").attr("src", "../../static/images/icon-red.png");
+
+    $("#text-param").val(null);
 }
 
 function flushPage() {
@@ -473,7 +477,7 @@
         data: JSON.stringify(recordData),
         success: function (result) {
             if (result.code != "0000") {
-                notify(result.msg, result.data);
+                alertError(result.msg);
             } else {
                 notify("鏁版嵁鎻愪氦鎴愬姛", result.data);
             }
@@ -488,5 +492,169 @@
 
 //鏄剧ず璐ㄦ淇℃伅
 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("鍚庡彴寮傚父锛岃閲嶈瘯鎴栬�呰仈绯荤鐞嗗憳锛侊紒");
+        }
+    });
+}
+
+/**
+ * 寮瑰嚭鎻愰啋妗�
+ * @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']});
+    }
+}
+
+/**
+ * 娓叉煋琛ㄦ牸
+ */
+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