From 53fab3f56e8335fbf39fc07c4e10f6abdb0505bb Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 03 十二月 2025 18:48:11 +0800
Subject: [PATCH] 登记、化验、称重页面调整,及登记化验数据提交

---
 fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js |  296 +++++-----------------------------------------------------
 1 files changed, 27 insertions(+), 269 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/inout/out-easy.js b/fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js
similarity index 73%
rename from fzzy-igdss-web/src/main/resources/static/inout/out-easy.js
rename to fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js
index 127e2cf..847f491 100644
--- a/fzzy-igdss-web/src/main/resources/static/inout/out-easy.js
+++ b/fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js
@@ -2,7 +2,6 @@
 var layer;
 var form;
 var table;
-var upload;
 var page = 1;
 var limit = 15;
 var recordData = null;
@@ -12,9 +11,7 @@
 var img1, img2, img3;// 椤甸潰涓殑鍥剧墖涓婁紶鍚嶇О
 
 $(function () {
-    layui.use(['layer', 'laydate', 'form', 'table', 'util', 'upload'], function () {
-        var util = layui.util;
-        upload = layui.upload;
+    layui.use(['layer', 'laydate', 'form', 'table'], function () {
         layer = layui.layer;
         form = layui.form;
         table = layui.table;
@@ -36,78 +33,6 @@
             elem: '#foodYear',
             theme: '#7b8e9f',
             type: 'year'
-        });
-        //涓婁紶
-        upload.render({
-            elem: '#kccz-r-btn1',
-            url: '../file/update-file', //涓婁紶鎺ュ彛
-            size: 4 * 1024, //闄愬埗鏂囦欢澶у皬锛屽崟浣岾B, 鏈�澶т笂浼�4MB
-            accept: 'images',
-            before: function (obj) {
-                var plateNum = $("#plateNum").val();
-                this.data = {"plateNum": plateNum, "type": "1"};//鎼哄甫鍙傛暟
-                //棰勮鏈湴鏂囦欢绀轰緥锛屼笉鏀寔ie8
-                obj.preview(function (index, file, result) {
-                    $('#kccz-r-img1').attr('src', result); //鍥剧墖閾炬帴锛坆ase64锛�
-                });
-            },
-            done: function (res) {
-                //濡傛灉涓婁紶澶辫触
-                if (res.code > 0) {
-                    layer.msg("鍥剧墖涓婁紶澶辫触锛�");
-                }
-                //涓婁紶鎴愬姛
-                img1 = res.msg;
-                layer.msg("鍥剧墖涓婁紶鎴愬姛锛�");
-                //console.log(img1);
-            }
-        });
-        upload.render({
-            elem: '#kccz-r-btn2',
-            url: '../file/update-file', //涓婁紶鎺ュ彛
-            size: 4 * 1024, //闄愬埗鏂囦欢澶у皬锛屽崟浣岾B, 鏈�澶т笂浼�4MB
-            accept: 'images',
-            before: function (obj) {
-                var plateNum = $("#plateNum").val();
-                this.data = {"plateNum": plateNum, "type": "1"};//鎼哄甫鍙傛暟
-                //棰勮鏈湴鏂囦欢绀轰緥锛屼笉鏀寔ie8
-                obj.preview(function (index, file, result) {
-                    $('#kccz-r-img2').attr('src', result); //鍥剧墖閾炬帴锛坆ase64锛�
-                });
-            },
-            done: function (res) {
-                //濡傛灉涓婁紶澶辫触
-                if (res.code > 0) {
-                    layer.msg("鍥剧墖涓婁紶澶辫触锛�");
-                }
-                //涓婁紶鎴愬姛
-                img2 = res.msg;
-                layer.msg("鍥剧墖涓婁紶鎴愬姛锛�");
-                // console.log(img2);
-            }
-        });
-        upload.render({
-            elem: '#kccz-r-btn3',
-            url: '../file/update-file', //涓婁紶鎺ュ彛
-            size: 4 * 1024, //闄愬埗鏂囦欢澶у皬锛屽崟浣岾B, 鏈�澶т笂浼�4MB
-            accept: 'images',
-            before: function (obj) {
-                var plateNum = $("#plateNum").val();
-                this.data = {"plateNum": plateNum}; //鎼哄甫鍙傛暟
-                //棰勮鏈湴鏂囦欢绀轰緥锛屼笉鏀寔ie8
-                obj.preview(function (index, file, result) {
-                    $('#kccz-r-img3').attr('src', result); //鍥剧墖閾炬帴锛坆ase64锛�
-                });
-            },
-            done: function (res) {
-                //濡傛灉涓婁紶澶辫触
-                if (res.code > 0) {
-                    layer.msg("鍥剧墖涓婁紶澶辫触锛�");
-                }
-                //涓婁紶鎴愬姛
-                img3 = res.msg;
-                layer.msg("鍥剧墖涓婁紶鎴愬姛锛�");
-            }
         });
 
         // 鐩戝惉琛屽伐鍏蜂簨浠�
@@ -180,12 +105,6 @@
     layer.close(index);
 }
 
-//琛ㄥ崟娓呯┖
-function resetForm() {
-    $("#form-param")[0].reset();
-    form.render();
-}
-
 // 娓叉煋琛ㄥ崟鏁版嵁
 function renderTable() {
     var param = form.val("form-param");
@@ -221,10 +140,7 @@
             }
         }, {
             field: 'customerName',
-            title: '鍙戣揣鍗曚綅'
-        }, {
-            field: 'deptName',
-            title: '鏀惰揣鍗曚綅'
+            title: '寰�鏉ュ崟浣�'
         }, {
             field: 'depotId',
             title: '瑁呭嵏浠撳簱',
@@ -269,7 +185,7 @@
         }]],
         where: param,
         parseData: function (res) {
-            if ("0000" == res.code) {
+            if ("0000" === res.code) {
                 return {
                     "code": "0",
                     "msg": res.msg,
@@ -304,7 +220,7 @@
     };
     $.ajax({
         type: "POST",
-        url: "../../basic/inout/inout-query",
+        url: "/basic/inout/inout-query",
         dataType: "json",
         contentType: "application/json;charset=UTF-8",
         data: JSON.stringify(param),
@@ -328,6 +244,7 @@
 function quickRegister() {
     //鐧昏鎸夐挳鏀惧紑
     $("#btn_register").css("display", "block");
+    $("#text-info").removeClass("text-info");
     //绉伴噸鎿嶄綔寮圭獥
     var pro = '鐧昏';
     updateEditAndProgress();
@@ -348,48 +265,29 @@
 
 //鏄剧ず娴佺▼鎿嶄綔寮圭獥
 function showWindows(progress) {
-    console.log(progress);
-    if (progress == 'WEIGHT_FULL' || progress == 'WEIGHT_EMPTY') {
-        //鐧昏鎸夐挳鏀惧紑
-        $("#btn_register").css("display", "none");
-        //绉伴噸鎿嶄綔寮圭獥
-        var pro = '绌鸿溅绉伴噸';
-        if (progress == 'WEIGHT_FULL') {
-            pro = '婊¤溅绉伴噸';
-        }
-        updateEditAndProgress();
-        flushPage();
-        layer.open({
-            type: 1,
-            title: "绉伴噸" + pro + " - 鍗曞彿锛�" + recordData.id,
-            area: ['1283px', '815px'],
-            cancel: function (index, layero) {
-                $("#weightDetail").css("display", "none");
-            },
-            shade: 0,
-            scrollbar: 0,
-            content: $('#weightDetail'),
-            offset: ['16px', '16px']
-        });
-    } else if (progress == 'HANDLE') {
-        //鍊间粨鎿嶄綔寮圭獥
-        form.val("form-handle", recordData);
-        form.render();
-        layer.open({
-            type: 1,
-            title: "鍊间粨 - 鍗曞彿锛�" + recordData.id,
-            area: ['1283px', '815px'],
-            cancel: function (index, layero) {
-                $("#handleDetail").css("display", "none");
-            },
-            shade: 0,
-            scrollbar: 0,
-            content: $('#handleDetail'),
-            offset: ['16px', '16px']
-        });
-    } else {
-        layer.alert("璇峰埌瀵瑰簲椤甸潰杩涜鎿嶄綔锛侊紒锛�");
+
+    //鐧昏鎸夐挳鏀惧紑
+    $("#btn_register").css("display", "none");
+    $("#text-info").addClass("text-info");
+    //绉伴噸鎿嶄綔寮圭獥
+    var pro = '绌鸿溅绉伴噸';
+    if (progress == 'WEIGHT_FULL') {
+        pro = '婊¤溅绉伴噸';
     }
+    updateEditAndProgress();
+    flushPage();
+    layer.open({
+        type: 1,
+        title: "绉伴噸" + pro + " - 鍗曞彿锛�" + recordData.id,
+        area: ['1283px', '815px'],
+        cancel: function (index, layero) {
+            $("#weightDetail").css("display", "none");
+        },
+        shade: 0,
+        scrollbar: 0,
+        content: $('#weightDetail'),
+        offset: ['16px', '16px']
+    });
 }
 
 //绉伴噸寮圭獥涓祦绋嬬幆鑺傛樉绀�
@@ -876,146 +774,6 @@
 }
 
 /*-----------------------绉伴噸鎿嶄綔-缁撴潫------------------------------*/
-
-/*-----------------------鍊间粨鎿嶄綔-寮�濮�------------------------------*/
-
-//鍊间粨鎻愪氦
-function submitHandle() {
-    if (null == recordData) {
-        layer.alert("娌℃湁鏁版嵁鍙互鎻愪氦锛侊紒锛�");
-        return;
-    }
-    var index = layer.load();
-    var data = form.val("form-handle");
-
-    // 鍚堝苟鏇存柊鐣跺墠缂栬緫鏁版嵁
-    Object.assign(recordData, data);
-
-    // 鑾峰彇鍥剧墖鍚嶇О
-    recordData.files = [{
-        fileName: img1
-    }, {
-        fileName: img2
-    }, {
-        fileName: img3
-    }];
-
-    console.log(recordData);
-
-    $.ajax({
-        type: "POST",
-        url: "../../basic/inout/inout-next-step",
-        dataType: "json",
-        contentType: "application/json;charset=UTF-8",
-        data: JSON.stringify(recordData),
-        success: function (result) {
-            if (result.code != "0000") {
-                layer.alert("鎻愪氦澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
-            } else {
-                layer.alert("鍊间粨瀹屾垚锛侊紒");
-                layer.closeAll();
-                flushData();
-            }
-            layer.close(index);
-        },
-        error: function () {
-            layer.close(index);
-            layer.alert("鎻愪氦澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
-        }
-    });
-}
-
-// ---------------------------寰�鏉ュ崟浣嶆搷浣�--寮�濮� -------------------//
-// 寮瑰嚭寰�鏉ュ崟浣嶄笅鎷夋
-function showCustomer() {
-    var index = layer.load();
-
-    // 娓叉煋寰�鏉ュ崟浣嶅垪琛�
-    table.render({
-        elem: '#tableCustomer',
-        url: '../../basic/inout/list-out-customer',
-        page: false,
-        // skin : "nob",
-        // size : 'sm',
-        toolbar: '#toolbarCustomer',
-        even: true,
-        method: 'POST',
-        contentType: "application/json;charset=UTF-8",
-        cols: [[{
-            field: 'id',
-            title: '缂栫爜'
-        }, {
-            field: 'name',
-            title: '鍚嶇О'
-        }, {
-            field: 'cardId',
-            title: '韬唤璇�'
-        }]],
-        parseData: function (res) {
-            if ("0000" == res.code) {
-                return {
-                    "code": "0",
-                    "msg": res.msg,
-                    "data": res.data
-                }
-            } else {
-                return {
-                    "code": "1",
-                    "msg": res.msg
-                }
-            }
-        },
-        done: function (res) {
-            layer.close(index);
-        }
-    });
-
-    //鍙屽嚮鏄剧ず閫変腑鏁版嵁
-    table.on('rowDouble(tableCustomer)', function (obj) {
-        var data = obj.data;
-        // 璧嬪��
-        form.val("form-weight", {
-            customerId: data.id,
-            customerName: data.name
-        });
-        // 鍏抽棴
-        layer.close(index2);
-    });
-
-    // 寮瑰嚭瀵硅瘽妗�
-    var index2 = layer.open({
-        type: 1,
-        title: "閫夋嫨寰�鏉ュ崟浣�",
-        area: ['600px', '600px'],
-        shade: 0,
-        content: $('#listCustomer'),
-        btn: 0,
-        btn: ['鍙栨秷'],
-        yes: function () {
-            layer.close(index2);
-        },
-        closeBtn: 0
-    });
-}
-
-// 鍒锋柊寰�鏉ュ崟浣嶆暟鎹�
-function flushCustomer() {
-    var key = $("#key").val();
-    var param = {
-        key: key
-    };
-    table.reload('tableCustomer', {
-        url: "../../basic/inout/list-out-customer",
-        where: param,
-        done: function (res) {
-            if (key) {
-                $("#key").val(key);
-            }
-        }
-    });
-}
-
-// ---------------------------寰�鏉ュ崟浣嶆搷浣�--缁撴潫-------------------//
 
 /**
  * 寮瑰嚭鎻愰啋妗�

--
Gitblit v1.9.3