From 1b60f1df51e1824154018a5b6a7159b09b44c8b1 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期一, 12 六月 2023 14:23:26 +0800
Subject: [PATCH] 化验页面--数据提交更新

---
 igds-web/src/main/resources/static/admin/inout/in-check.js |  152 +++++++++++++++++++++++++++++---------------------
 1 files changed, 89 insertions(+), 63 deletions(-)

diff --git a/igds-web/src/main/resources/static/admin/inout/in-check.js b/igds-web/src/main/resources/static/admin/inout/in-check.js
index 0a780a4..e2ba053 100644
--- a/igds-web/src/main/resources/static/admin/inout/in-check.js
+++ b/igds-web/src/main/resources/static/admin/inout/in-check.js
@@ -1,5 +1,6 @@
 //褰撳墠鑺傜偣 鍏ュ簱璐ㄦ
 var layer;
+var laydate;
 var form;
 var table;
 var page = 1;
@@ -12,7 +13,7 @@
         layer = layui.layer;
         form = layui.form;
         table = layui.table;
-        var laydate = layui.laydate;
+        laydate = layui.laydate;
 
         laydate.render({
             elem: '#start',
@@ -27,9 +28,10 @@
         });
 
         laydate.render({
-            elem: '#foodYear',
+            elem: '#checkTime',
             theme: '#7b8e9f',
-            type: 'year',
+            format: 'yyyy-MM-dd HH:mm:ss',
+            type: 'datetime'
         });
 
         // 鍒濆鍖栬〃鍗曟暟鎹�
@@ -108,23 +110,23 @@
     if (symbol && limit) {
         if (">=" == symbol) {
             if (newValue < limit) {
-                data.remarks = "涓嶅悎鏍�";
+                data.result = "涓嶅悎鏍�";
             } else {
-                data.remarks = "鍚堟牸";
+                data.result = "鍚堟牸";
             }
         }
         if ("<=" == symbol) {
             if (newValue > limit) {
-                data.remarks = "涓嶅悎鏍�";
+                data.result = "涓嶅悎鏍�";
             } else {
-                data.remarks = "鍚堟牸";
+                data.result = "鍚堟牸";
             }
         }
         if ("==" == symbol) {
             if (newValue != limit) {
-                data.remarks = "涓嶅悎鏍�";
+                data.result = "涓嶅悎鏍�";
             } else {
-                data.remarks = "鍚堟牸";
+                data.result = "鍚堟牸";
             }
         }
     }
@@ -295,9 +297,11 @@
 
 function showDetail(obj) {
     curCheckData = obj.data;
-    // console.log(curCheckData);
 
-    curCheckData.foodYear = dateFtt("yyyy", new Date());
+    curSampleData = obj.data;
+    if(!curCheckData.checkTime){
+        curCheckData.checkTime = dateFtt("yyyy-MM-dd hh:mm:ss", new Date());
+    }
     curCheckData.checkUser = checkUser;
     if (curCheckData.checkStatus == "NONE") {
         //闅愯棌杞︾墝閮ㄥ垎淇℃伅
@@ -311,7 +315,7 @@
     layer.open({
         type: 1,
         title: "鍖栭獙鍗曟槑缁�",
-        area: ['1400px', '650px'],
+        area: ['1400px', '700px'],
         shade: 0,
         content: $('#checkDetail'),
         btnAlign: 'c',
@@ -331,9 +335,8 @@
     });
 
     // 鑾峰彇鍖栭獙椤逛俊鎭�
-    flushCheckItem(null);
-};
-
+    flushCheckItem(curCheckData.foodVariety);
+}
 
 /**
  * 鍒锋柊鍖栭獙缁撴灉椤�
@@ -341,6 +344,7 @@
 function flushCheckItem(foodVariety) {
     curCheckItems = null;
     $("#check-result-tip").text("妫�楠岀粨鏋滐細#");
+    $("#price-result-tip").text("绮鍗曚环锛�#鍏�/鍏枻");
     curCheckData.foodVariety = foodVariety;
 
     var index = layer.load();
@@ -391,9 +395,9 @@
         }
     });
     if (msg) {
-        $("#check-result-tip").text("妫�楠岀粨鏋滐細" + msg);
+        $("#check-result-tip").text("妫�楠岀粨鏋滐細" + msg + "锛涚伯椋熷崟浠凤細#鍏�/鍏枻");
     } else {
-        $("#check-result-tip").text("妫�楠岀粨鏋滐細鍚堟牸");
+        $("#check-result-tip").text("妫�楠岀粨鏋滐細鍚堟牸" + "锛涚伯椋熷崟浠凤細#鍏�/鍏枻");
     }
 };
 
@@ -411,28 +415,58 @@
         even: true,
         cols: [[{
             field: 'standardName',
-            title: '鍖栭獙椤圭洰',
+            title: '妫�楠岄」鐩�',
             align: 'center',
-            width: '20%'
+            width: '10%'
         }, {
             field: 'value',
-            title: '鍖栭獙缁撴灉',
+            title: '妫�楠屽��',
             align: 'center',
-            width: '20%',
+            width: '10%',
             edit: 'text'
+        }, {
+            field: 'operaSymbolValue',
+            title: '鏍囧噯鍊�',
+            align: 'center',
+            width: '10%'
         }, {
             field: 'unit',
             title: '鍗曚綅',
             align: 'center',
             width: '10%'
         }, {
-            field: 'standardValue',
-            title: '鍖栭獙鏍囧噯',
+            field: 'deNum',
+            title: '鎵i噸',
             align: 'center',
-            width: '15%'
+            width: '10%',
+            edit: 'text'
+        }, {
+            field: 'addNum',
+            title: '澧為噸',
+            align: 'center',
+            width: '10%',
+            edit: 'text'
+        }, {
+            field: 'dePrice',
+            title: '鎵d环',
+            align: 'center',
+            width: '10%',
+            edit: 'text'
+        }, {
+            field: 'addPrice',
+            title: '澧炰环',
+            align: 'center',
+            width: '10%',
+            edit: 'text'
+        }, {
+            field: 'result',
+            title: '妫�楠岀粨鏋�',
+            align: 'center',
+            width: '10%',
+            edit: 'text'
         }, {
             field: 'remarks',
-            title: '璇�  鏄�',
+            title: '澶囨敞璇存槑',
             align: 'center',
             edit: 'text'
         }]]
@@ -451,16 +485,8 @@
         layer.alert("璇风‘璁ゅ寲楠岀粨鏋滐紒锛�");
         return;
     }
-    if (!curCheckData.depotId) {
-        layer.alert("璇烽�夋嫨瑁呭嵏浠撳簱锛侊紒");
-        return;
-    }
     if (!curCheckData.foodVariety) {
         layer.alert("璇风‘璁ょ伯椋熷搧绉嶏紒锛�");
-        return;
-    }
-    if (!curCheckData.foodYear) {
-        layer.alert("璇风‘璁ょ伯椋熷勾浠斤紒锛�");
         return;
     }
     if (!curCheckData.foodLevel) {
@@ -471,7 +497,6 @@
         layer.alert("璇风‘璁ょ伯椋熷畾浠凤紝濡備笉鑰冭檻瀹氫环锛岃濉啓0.0");
         return;
     }
-
     curCheckData.checkItems = curCheckItems;
 
     var index = layer.load();
@@ -516,37 +541,43 @@
         contentType: "application/json;charset=UTF-8",
         cols: [[{
             field: 'checkId',
-            title: '妫�楠屽崟鍙�',
-            width: '13%',
+            title: '璐ㄦ鍗曞彿',
+            width: '10%',
             style: 'color: #f67d06;font-weight: bold'
         }, {
-            field: 'plateNum',
-            title: '杞﹁埞鍙�',
-            width: '11%',
-            style: 'font-weight: bold',
+            field: 'registerTime',
+            title: '鐧昏鏃堕棿',
+            width: '15%',
+            style: 'font-weight: bold'
+        }, {
+            field: 'sampleStatus',
+            title: '鏄惁鎵︽牱',
+            width: '10%',
             templet: function (item) {
-                if (item.checkStatus != "NONE") {
-                    return item.plateNum;
-                } else {
-                    var result = replaceStr(item.plateNum);
-                    return result == null ? "" : result;
+                if (item.sampleStatus == null) {
+                    return "鏈墻鏍�";
+                }
+                if (item.sampleStatus == 'NONE') {
+                    return "鏈墻鏍�";
+                }
+                if (item.sampleStatus == 'SAMPLE') {
+                    return "宸叉墻鏍�";
                 }
             }
         }, {
-            field: 'customerName',
-            title: '寰�鏉ュ崟浣�',
-            templet: function (item) {
-                if (item.checkStatus != "NONE") {
-                    return item.customerName;
-                } else {
-                    var result = replaceStr(item.customerName);
-                    return result == null ? "" : result;
-                }
-            }
+            field: 'sampleUser',
+            title: '鎵︽牱浜�',
+            width: '10%',
+            style: 'font-weight: bold'
+        }, {
+            field: 'sampleTime',
+            title: '鎵︽牱鏃堕棿',
+            width: '15%',
+            style: 'font-weight: bold'
         }, {
             field: 'foodVariety',
             title: '绮鍝佺',
-            width: '10%',
+            width: '11%',
             templet: function (item) {
                 var result = item.foodVariety;
                 $.each(listFoodVariety, function (index, data) {
@@ -560,7 +591,7 @@
         }, {
             field: 'depotId',
             title: '瑁呭嵏浠撳簱',
-            width: '10%',
+            width: '11%',
             templet: function (item) {
                 var result = item.depotId;
                 $.each(listDepot, function (index, data) {
@@ -574,7 +605,6 @@
         }, {
             field: 'checkStatus',
             title: '妫�楠岀粨鏋�',
-            width: '10%',
             style: 'font-weight: bold',
             templet: function (item) {
                 if (item.checkStatus == 'NONE') {
@@ -589,13 +619,9 @@
                 return item.checkStatus == null ? "" : item.checkStatus;
             }
         }, {
-            field: 'registerTime',
-            title: '鐧昏鏃堕棿',
-            width: '14%'
-        }, {
             field: '',
             title: '鎿嶄綔',
-            width: '9%',
+            width: '8%',
             toolbar: "#barControl"
         }]],
         where: param,

--
Gitblit v1.9.3