From 46adcbf7494340a495539708210bb39110bdc33b Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期六, 29 十一月 2025 17:35:03 +0800
Subject: [PATCH] 快速登记、化验及称重作业页面提交1

---
 fzzy-igdss-web/src/main/resources/static/inout/inout-check.js |  869 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 869 insertions(+), 0 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/inout/inout-check.js b/fzzy-igdss-web/src/main/resources/static/inout/inout-check.js
new file mode 100644
index 0000000..fab3441
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/inout/inout-check.js
@@ -0,0 +1,869 @@
+//褰撳墠鑺傜偣 鍏ュ簱璐ㄦ
+var layer;
+var laydate;
+var form;
+var table;
+var scanCodeTag = false;
+var page = 1;
+var limit = 10;
+var curCheckData = null;// 褰撳墠缂栬緫鏁版嵁
+var curCheckItems = null;// 褰撳墠鏁版嵁鐨勬鏌ラ」淇℃伅
+
+$(function () {
+    layui.use(['layer', 'laydate', 'form', 'table'], function () {
+        layer = layui.layer;
+        form = layui.form;
+        table = layui.table;
+        laydate = layui.laydate;
+
+        laydate.render({
+            elem: '#start',
+            theme: '#7b8e9f',
+            value: startTime
+        });
+
+        laydate.render({
+            elem: '#end',
+            theme: '#7b8e9f',
+            value: endTime
+        });
+
+        laydate.render({
+            elem: '#foodYear',
+            theme: '#7b8e9f',
+            value: foodYear,
+            type: 'year'
+        });
+
+        laydate.render({
+            elem: '#checkTime',
+            theme: '#7b8e9f',
+            format: 'yyyy-MM-dd HH:mm:ss',
+            type: 'datetime'
+        });
+
+        // 鍒濆鍖栬〃鍗曟暟鎹�
+        renderTable();
+
+        // 鐩戝惉琛屽伐鍏蜂簨浠�
+        table.on('tool(tableData)', function (obj) {
+            if (obj.event === 'edit') {
+                //鏇存柊浠撳簱涓嬫媺鍒楄〃
+                updateSelect();
+                //灞曠ず鏁版嵁
+                showDetail(obj.data);
+            }
+        });
+
+        //鐩戝惉绮鍝佺锛岃幏鍙栧寲楠岄」
+        layui.form.on('select(select_foodVariety)', function (data) {
+            updateFoodVariety(data.value);
+        });
+
+        //鐩戝惉绮绛夌骇锛岃幏鍙栫伯椋熷畾浠�
+        layui.form.on('select(select_foodLevel)', function (data) {
+            getPriceByFoodLevel(data.value);
+        });
+
+        //鐩戝惉鍖栭獙缁撴灉鍗曞~鍐欐暟鎹�,骞剁粰鍑烘彁绀虹粨鏋�
+        table.on('edit(tableCheckItem)', function (obj) {
+            getResult(obj);
+        });
+    });
+
+    //鏄剧ず鍏ュ簱娴佺▼
+    showProgress();
+});
+window.onbeforeunload = function () {
+}
+
+window.onunload = function () {
+}
+window.onload = function () {
+
+    //鎵弿鏋嚜鍔ㄥ洖杞︿簨浠�
+    $('#checkId').bind('keyup', function (event) {
+        if (event.keyCode == "13") {
+            // //鍘绘帀鐒︾偣锛岄槻姝㈠埛鏂伴〉闈�
+            // $('#checkId').blur();
+            getDataByCheckId();
+        }
+    });
+};
+
+// socket淇℃伅杩斿洖铏曠悊
+function socketOnMessage(packet) {
+    layer.alert(packet.data);
+    window.parent.sysNotify(packet.data);
+}
+
+//鎺у埗娴佺▼鐜妭鏄剧ず
+function showProgress() {
+    if (!inoutProgress) {
+        return;
+    }
+    if (inoutProgress.indexOf("REGISTER") == -1) {
+        $("#progress-register").css("display", "none");
+    }
+    if (inoutProgress.indexOf("CHECK") == -1) {
+        $("#progress-check").css("display", "none");
+    }
+    if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
+        $("#progress-fullWeight").css("display", "none");
+    }
+    if (inoutProgress.indexOf("HANDLE") == -1) {
+        $("#progress-hand").css("display", "none");
+    }
+    if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
+        $("#progress-emptyWeight").css("display", "none");
+    }
+    if (inoutProgress.indexOf("CARD_BACK") == -1) {
+        $("#progress-cardBack").css("display", "none");
+    }
+}
+
+//鏍规嵁濉啓鍖栭獙鏁版嵁,缁欏嚭鎻愰啋鏄惁鍚堟牸
+function getResult(obj) {
+    var data = obj.data;
+    //濉啓鐨勬暟鎹��
+    var newValue = data.value;
+    //鏍囧噯鍊�
+    var limit = data.upperLimit;
+    //杩愮畻绗�
+    var symbol = data.operaSymbol;
+    if (symbol && limit) {
+        if (">=" == symbol) {
+            if (newValue < limit) {
+                data.result = "0";
+            } else {
+                data.result = "1";
+            }
+        }
+        if ("<=" == symbol) {
+            if (newValue > limit) {
+                data.result = "0";
+            } else {
+                data.result = "1";
+            }
+        }
+        if ("==" == symbol) {
+            if (newValue != limit) {
+                data.result = "0";
+            } else {
+                data.result = "1";
+            }
+        }
+    }
+    obj.update(data);
+    //鏍规嵁鍖栭獙缁撴灉鎻愰啋鏄惁鍚堟牸
+    updateCheckResultTip();
+}
+
+//鍔ㄦ�佹洿鎹粨搴撲笅鎷夊垪琛�
+function updateSelect() {
+    $('#depotId option').remove();
+    for (var i = 0; i < listDepot.length; i++) {
+        $('#depotId').append('<option value="' + listDepot[i].id + '">' + listDepot[i].name + '</option>');
+    }
+    //閲嶆柊娓叉煋
+    form.render('select');
+}
+
+//鏍规嵁鍝佺鑾峰彇鍖栭獙椤�
+function updateFoodVariety(foodVariety) {
+    if (null == foodVariety || "" == foodVariety) return;
+    form.val("form-detail", {
+        foodVariety: foodVariety
+    });
+    form.render();
+
+    flushCheckItem(foodVariety);
+}
+
+//鏍规嵁閫夋嫨浠撳簱鏄剧ず绮鍝佺
+function getPriceByFoodLevel(foodLevel) {
+    if (null == foodLevel || "" == foodLevel) return;
+    form.val("form-detail", {
+        foodLevel: foodLevel
+    });
+    form.render();
+    var data = form.val("form-detail");
+
+    $.ajax({
+        type: "POST",
+        url: "../../basic/inout/get-price",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        data: JSON.stringify(data),
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.msg(result.msg);
+            } else {
+                $("#check-result-tip2").text("绮瀹氫环锛�" + result.data.price + "鍏�/鍏枻");
+            }
+        },
+        error: function () {
+            layer.msg("鍚庡彴寮傚父锛岃閲嶈瘯鎴栬�呰仈绯荤鐞嗗憳锛侊紒");
+        }
+    });
+}
+
+// 鏌ヨ
+function flushData() {
+    var index = layer.load();
+    var param = form.val("form-param");
+
+    table.reload('tableData', {
+        url: "../../basic/inout/page-check-data",
+        where: param,
+    });
+
+    $("thead tr").css({
+        "border-bottom": "2px solid #53adce",
+        "background": "#eff4f6"
+    });
+    layer.close(index);
+};
+
+// 瀵煎嚭鏁版嵁-- 璺宠浆鏂伴〉闈㈠鐞�
+function exportData() {
+    // var url = "com.ld.igds.inout.ReportInoutCheck.d";
+    // window.parent.openTab(url, "鍖栭獙缁撴灉瀵煎嚭", "checkDataExport");
+};
+
+// 鎵︽牱鏈鸿В闄ゆ�ュ仠
+function checkResetStop() {
+    var param = JSON.stringify(checkDto);
+    var index = layer.load();
+    $.ajax({
+        type: "POST",
+        url: "../../api/check/reset-stop",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        data: param,
+        success: function (result) {
+            layer.close(index);
+            if (result.code != "0000") {
+                layer.alert(result.msg);
+            } else {
+                layer.msg("鎿嶄綔鍛戒护鍙戦�佹垚鍔燂紒");
+            }
+        },
+        error: function () {
+            layer.close(index);
+            layer.alert("鍚庡彴寮傚父锛屾搷浣滃懡浠ゅ彂閫佸け璐ワ紒");
+        }
+    });
+};
+
+// 鏇存柊鍖栭獙缁撴灉鎻愰啋锛屽彧鍋氭彁閱掞紝涓嶅仛鑷姩鍒ゆ柇
+function updateCheckResultTip() {
+    if (!curCheckItems || curCheckItems.length == 0) {
+        return;
+    }
+    if (curCheckData.checkStatus != "NONE") {
+        return;
+    }
+    var msg;
+    $.each(curCheckItems, function (index, data) {
+        if (!data.result) {
+            return true;
+        }
+        if (data.result == "0") {
+            msg = "涓嶅悎鏍�";
+            return false;
+        }
+        if (data.result == "1") {
+            msg = "鍚堟牸";
+        }
+    });
+    if (msg) {
+        $("#check-result-tip").text("璐ㄦ缁撴灉锛�" + msg);
+    } else {
+        $("#check-result-tip").text("璐ㄦ缁撴灉锛�#");
+    }
+}
+
+/**
+ * 娓叉煋琛ㄦ牸
+ */
+function renderTableCheckItem() {
+    // 娓呯┖鏁版嵁
+    $("#tableCheckItem").empty();
+    table.render({
+        elem: '#tableCheckItem',
+        data: curCheckItems,
+        page: false,
+        // skin: 'line',
+        even: true,
+        cols: [[{
+            field: 'standardName',
+            title: '妫�楠岄」鐩�',
+            align: 'center',
+            width: '10%'
+        }, {
+            field: 'value',
+            title: '妫�楠屽��',
+            align: 'center',
+            width: '10%',
+            edit: 'text'
+        }, {
+            field: 'operaSymbolValue',
+            title: '鏍囧噯鍊�',
+            align: 'center',
+            width: '10%'
+        }, {
+            field: 'unit',
+            title: '鍗曚綅',
+            align: 'center',
+            width: '10%'
+        }, {
+            field: 'deNum',
+            title: '鎵i噸',
+            align: 'center',
+            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%',
+            templet: function (item) {
+                if (item.result == null) {
+                    return "";
+                }
+                if (item.result == '0') {
+                    return "涓嶅悎鏍�";
+                }
+                if (item.result == '1') {
+                    return "鍚堟牸";
+                }
+            }
+        }, {
+            field: 'remarks',
+            title: '澶囨敞璇存槑',
+            align: 'center',
+            edit: 'text'
+        }]],
+        limit: this.curCheckItems.length //鏄剧ず鐨勬暟閲�
+    });
+
+    $("thead tr").css({
+        "border-bottom": "2px solid #53adce",
+        "background": "#eff4f6"
+    });
+}
+
+function showDetail(data) {
+    curCheckData = data;
+    if (!curCheckData.checkTime) {
+        curCheckData.checkTime = dateFtt("yyyy-MM-dd hh:mm:ss", new Date());
+    }
+    curCheckData.checkUser = checkUser;
+    // 璧嬪��
+    form.val("form-detail", curCheckData);
+    form.render();
+
+    layer.open({
+        type: 1,
+        title: "鍖栭獙鍗曟槑缁�",
+        area: ['1400px', '700px'],
+        shade: 0,
+        content: $('#checkDetail'),
+        btnAlign: 'c',
+        btn: ['浠呬繚瀛�', '淇濆瓨鎻愪氦', '鍏抽棴鍙栨秷'],
+        yes: function () {
+            // 鏇存柊鍒伴〉闈�
+            var data = form.val("form-detail");
+            // 鍚堝苟鏇存柊鐣跺墠缂栬緫鏁版嵁
+            Object.assign(curCheckData, data);
+            saveCheckData();
+            if (scanCodeTag) {
+                showScanCode();
+            }
+        }, btn2: function () {
+            // 鏇存柊鍒伴〉闈�
+            var data = form.val("form-detail");
+            // 鍚堝苟鏇存柊鐣跺墠缂栬緫鏁版嵁
+            Object.assign(curCheckData, data);
+            submit();
+            if (scanCodeTag) {
+                showScanCode();
+            }
+        }, btn3: function () {
+            parent.layer.closeAll();
+            if (scanCodeTag) {
+                showScanCode();
+            }
+        },
+        closeBtn: 0
+    });
+    //鍒ゆ柇鏄惁鍖栭獙锛岃嫢宸茬粡鍖栭獙锛屽垯涓嶆樉绀烘彁浜ゆ寜閽紝涓嶅厑璁镐慨鏀瑰寲楠岀粨鏋�
+    if (curCheckData.checkStatus != "NONE") {
+        $(".layui-layer-btn0").css('display', 'none');
+        $(".layui-layer-btn1").css('display', 'none');
+    }
+    // 鑾峰彇鍖栭獙椤逛俊鎭�
+    flushCheckItem(curCheckData.foodVariety);
+    getPriceByFoodLevel(curCheckData.foodLevel);
+}
+
+/**
+ * 鍒锋柊鍖栭獙缁撴灉椤�
+ */
+function flushCheckItem(foodVariety) {
+    curCheckItems = null;
+    $("#check-result-tip").text("妫�楠岀粨鏋滐細#");
+    $("#price-result-tip2").text("绮瀹氫环锛�#鍏�/鍏枻");
+    curCheckData.foodVariety = foodVariety;
+    var index = layer.load();
+    $.ajax({
+        type: "POST",
+        url: "../../basic/inout/get-check-item",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        data: JSON.stringify(curCheckData),
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.msg(result.msg);
+            } else {
+                curCheckItems = result.data;
+                // 鏍规嵁鍖栭獙缁撴灉鎻愰啋鏄惁鍚堟牸
+                updateCheckResultTip();
+                // 椤甸潰娓叉煋妫�娴嬮」
+                renderTableCheckItem();
+                layer.close(index);
+            }
+        },
+        error: function () {
+            layer.close(index);
+            layer.msg("鍚庡彴寮傚父锛岃閲嶈瘯鎴栬�呰仈绯荤鐞嗗憳锛侊紒");
+        }
+    });
+};
+
+//浠呬繚瀛�
+function saveCheckData() {
+    if (!curCheckData.foodVariety) {
+        layer.alert("璇风‘璁ょ伯椋熷搧绉嶏紒锛�");
+        return;
+    }
+    curCheckData.checkItems = curCheckItems;
+    var index1 = layer.load();
+    $.ajax({
+        type: "POST",
+        url: "../../basic/inout/submit-checkItem",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        async: false,
+        data: JSON.stringify(curCheckData),
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.close(index1);
+                notify(result.msg, result.data);
+            } else {
+                layer.closeAll();
+                curCheckData = null;
+                notify("鏁版嵁淇濆瓨鎴愬姛", result.data);
+                flushData();
+            }
+        },
+        error: function () {
+            layer.close(index1);
+            layer.alert("淇濆瓨澶辫触锛岃閲嶆柊灏濊瘯锛�");
+        }
+    });
+}
+
+//淇濆瓨鎻愪氦
+function submit() {
+
+    if (curCheckData.checkStatus == "NONE" || curCheckData.checkStatus == "NONE2") {
+        layer.alert("璇风‘璁ゅ寲楠岀粨鏋滐紒锛�");
+        return;
+    }
+    if (!curCheckData.foodVariety) {
+        layer.alert("璇风‘璁ょ伯椋熷搧绉嶏紒锛�");
+        return;
+    }
+    if (!curCheckData.foodLevel) {
+        layer.alert("璇风‘璁ょ伯椋熺瓑绾э紒锛�");
+        return;
+    }
+    if (!curCheckData.foodType) {
+        layer.alert("璇风‘璁ょ伯椋熸�ц川锛侊紒");
+        return;
+    }
+    if (!curCheckData.price) {
+        layer.alert("璇风‘璁ょ伯椋熷畾浠凤紝濡備笉鑰冭檻瀹氫环锛岃濉啓0.0");
+        return;
+    }
+    curCheckData.checkItems = curCheckItems;
+
+    var index = layer.load();
+    $.ajax({
+        type: "POST",
+        url: "../../basic/inout/submit-check",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        async: false,
+        data: JSON.stringify(curCheckData),
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.close(index);
+                notify(result.msg, result.data);
+            } else {
+                parent.layer.closeAll();
+                curCheckData = null;
+                notify("鏁版嵁鎻愪氦鎴愬姛", result.data);
+                flushData();
+            }
+        },
+        error: function () {
+            layer.close(index);
+            layer.alert("鎻愪氦澶辫触锛岃閲嶆柊灏濊瘯锛�");
+        }
+    });
+}
+
+//鎵爜寮圭獥
+function showScanCode() {
+    //娓呯┖琛ㄥ崟
+    $("#form-sacnCodeDetail")[0].reset();
+    form.render();
+
+    //鎵爜寮圭獥-璧嬪�紅rue
+    scanCodeTag = true;
+    layer.open({
+        type: 1,
+        title: "鎵爜淇℃伅",
+        area: ['700px', '320px'],
+        shade: 0,
+        content: $('#scanCodeDetail'),
+        success: function () {
+            document.getElementById('checkId').focus();
+        },
+        btnAlign: 'c',
+        btn: ['鏌ヨ', '鍏抽棴鍙栨秷'],
+        yes: function () {
+            getDataByCheckId();
+        }, btn2: function () {
+            scanCodeTag = false;
+            layer.closeAll();
+        },
+        closeBtn: 0
+    });
+}
+
+//鏍规嵁璐ㄦ鍗曞彿鑾峰彇淇℃伅
+function getDataByCheckId() {
+    var param = form.val("form-sacnCodeDetail");
+    if (!param.checkId) {
+        layer.alert("璐ㄦ鍗曞彿涓虹┖锛岃鎵爜鎴栬緭鍏ヨ川妫�鍗曞彿");
+    }
+    var index = layer.load();
+    $.ajax({
+        type: "POST",
+        url: "../../basic/inout/inout-check-scan-code",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        data: JSON.stringify(param),
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.close(index);
+                $("#form-sacnCodeDetail")[0].reset();
+                form.render();
+                notify(result.msg, result.data);
+            } else {
+                updateSelect();
+                showDetail(result.data);
+            }
+        },
+        error: function () {
+            layer.close(index);
+            $("#form-sacnCodeDetail")[0].reset();
+            form.render();
+            alertError("淇濆瓨澶辫触锛岃閲嶆柊灏濊瘯锛�")
+        }
+    });
+}
+
+// 娓叉煋琛ㄥ崟鏁版嵁
+function renderTable() {
+    var param = form.val("form-param");
+    // 娓呯┖鏁版嵁
+    $("#tableData").empty();
+    table.render({
+        elem: '#tableData',
+        url: '../../basic/inout/page-check-data',
+        page: true,
+        limit: limit,
+        even: true,
+        method: 'POST',
+        contentType: "application/json;charset=UTF-8",
+        cols: [[{
+            field: 'checkId',
+            title: '璐ㄦ鍗曞彿',
+            width: '10%',
+            style: 'color: #f67d06;font-weight: bold'
+        }, {
+            field: 'plateNum',
+            title: '杞︾墝鍙�',
+            width: '9%',
+            style: 'font-weight: bold'
+        }, {
+            field: 'registerTime',
+            title: '鐧昏鏃堕棿',
+            width: '13%',
+            style: 'font-weight: bold'
+        }, {
+            field: 'sampleStatus',
+            title: '鏄惁鎵︽牱',
+            width: '10%',
+            templet: function (item) {
+                if (item.sampleStatus == null) {
+                    return "鏈墻鏍�";
+                }
+                if (item.sampleStatus == 'NONE') {
+                    return "鏈墻鏍�";
+                }
+                if (item.sampleStatus == 'SAMPLE') {
+                    return "宸叉墻鏍�";
+                }
+            }
+        }, {
+            field: 'sampleUser',
+            title: '鎵︽牱浜�',
+            width: '10%',
+            style: 'font-weight: bold'
+        }, {
+            field: 'sampleTime',
+            title: '鎵︽牱鏃堕棿',
+            width: '13%',
+            style: 'font-weight: bold'
+        }, {
+            field: 'foodVariety',
+            title: '绮鍝佺',
+            width: '9%',
+            templet: function (item) {
+                var result = item.foodVariety;
+                $.each(listFoodVariety, function (index, data) {
+                    if (item.foodVariety == data.code) {
+                        result = data.name;
+                        return true;
+                    }
+                });
+                return result == null ? "" : result;
+            }
+        }, {
+            field: 'depotId',
+            title: '瑁呭嵏浠撳簱',
+            width: '10%',
+            templet: function (item) {
+                var result = item.depotId;
+                $.each(listDepot, function (index, data) {
+                    if (item.depotId == data.id) {
+                        result = data.name;
+                        return true;
+                    }
+                });
+                return result == null ? "" : result;
+            }
+        }, {
+            field: 'checkStatus',
+            title: '妫�楠岀粨鏋�',
+            style: 'font-weight: bold',
+            templet: function (item) {
+                if (item.checkStatus == 'NONE') {
+                    return "鏈寲楠�";
+                }
+                if (item.checkStatus == 'PASS') {
+                    return "鍚堟牸";
+                }
+                if (item.checkStatus == 'UNPASS') {
+                    return "涓嶅悎鏍�";
+                }
+                return item.checkStatus == null ? "" : item.checkStatus;
+            }
+        }, {
+            field: '',
+            title: '鎿嶄綔',
+            width: '8%',
+            toolbar: "#barControl"
+        }]],
+        where: param,
+        parseData: function (res) {
+            if ("0000" == res.code) {
+                return {
+                    "code": "0",
+                    "msg": res.msg,
+                    "count": res.data.total,
+                    "data": res.data.records
+                }
+            } else {
+                return {
+                    "code": "1",
+                    "msg": res.msg
+                }
+            }
+        }
+    });
+    $("thead tr").css({
+        "border-bottom": "2px solid #53adce",
+        "background": "#eff4f6"
+    });
+}
+
+// 琛ㄥ崟娓呯┖
+function resetForm() {
+    $("#form-param")[0].reset();
+    form.render();
+}
+
+// ---------------------------绮浜у湴 -寮�濮� -------------------//
+// 寮瑰嚭绮浜у湴涓嬫媺妗�
+function showFoodLocation() {
+    var index = layer.load();
+    // 娓叉煋寰�鏉ュ崟浣嶅垪琛�
+    table.render({
+        elem: '#tableFoodLoaction',
+        url: '../../basic/common/page-food-location',
+        page: false,
+        toolbar: '#toolbarFoodLocaton',
+        even: true,
+        method: 'POST',
+        contentType: "application/json;charset=UTF-8",
+        cols: [[{
+            field: 'code',
+            title: '缂栫爜',
+        }, {
+            field: 'simple',
+            title: '绠�鎷�',
+        }, {
+            field: 'name',
+            title: '鍚嶇О',
+            width: '60%'
+        }]],
+        where: {
+            "page": 1,
+            "limit": 100
+        },
+        parseData: function (res) {
+            if ("0000" == res.code) {
+                return {
+                    "code": "0",
+                    "msg": res.msg,
+                    "count": res.data.total,
+                    "data": res.data.records
+                }
+            } else {
+                return {
+                    "code": "1",
+                    "msg": res.msg
+                }
+            }
+        },
+        done: function (res) {
+            layer.close(index);
+        }
+    });
+
+    //鍙屽嚮鏄剧ず閫変腑鏁版嵁
+    table.on('rowDouble(tableFoodLoaction)', function (obj) {
+        var data = obj.data;
+        // 璧嬪��
+        form.val("form-detail", {
+            foodLocation: data.name,
+        });
+        // 鍏抽棴
+        layer.close(index2);
+    });
+
+    // 寮瑰嚭瀵硅瘽妗�
+    var index2 = layer.open({
+        type: 1,
+        title: "閫夋嫨绮骇鍦�",
+        area: ['600px', '600px'],
+        shade: 0,
+        content: $('#listFoodLocation'),
+        btn: 0,
+        btn: ['鍙栨秷'],
+        yes: function () {
+            // 鍏抽棴
+            layer.close(index2);
+        },
+        closeBtn: 0
+    });
+
+};
+
+// 鍒锋柊
+function flushFoodLocation() {
+    var key = $("#key2").val();
+    table.reload('tableFoodLoaction', {
+        url: "../../basic/common/page-food-location",
+        where: {
+            key: key
+        },
+        done: function (res) {
+            if (key) {
+                $("#key2").val(key);
+            }
+        }
+    });
+};
+
+/**
+ * 寮瑰嚭鎻愰啋妗�
+ * @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