czt
2025-12-03 53fab3f56e8335fbf39fc07c4e10f6abdb0505bb
fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js
@@ -12,37 +12,12 @@
$(function () {
    layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () {
        var util = layui.util;
        layer = layui.layer;
        form = layui.form;
        table = layui.table;
        layui.laydate.render({
            elem: '#test1',
            theme: '#7b8e9f'
        });
        // 右下角添加固定信息
        util.fixbar({
            bar1: true,
            css: {
                right: 10,
                bottom: 20
            },
            bgcolor: '#53adce',
            click: function (type) {
                if (type === 'bar1') {
                    layer.closeAll();
                    layer.open({
                        type: 2,
                        title: false,
                        shadeClose: true,
                        shade: 0.3,
                        closeBtn: 2,
                        offset: ['50px', '120px'],
                        area: ['1000px', '640px'],
                        content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random()
                    });
                }
            }
        });
        //监听选择数据事件
@@ -164,80 +139,6 @@
    }
}
//读智慧卡
function flushICCard() {
    if (!cardDto.protocol) {
        flushICCard1();
    } else {
        flushICCard2();
    }
}
/**
 * 协议读取智慧卡
 */
function flushICCard2() {
    var index = layer.load();
    var param = JSON.stringify(cardDto);
    $.ajax({
        type: "POST",
        url: "../../inout/api/get-icCard",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                resultData = result.data;
                paramIntelCard = resultData.icCardNo;
                $("#text-param").text("识别卡号:" + paramIntelCard);
                flushData(paramIntelCard, null);
            }
        },
        error: function () {
            layer.close(index);
            alertError("IC卡读取失败");
        }
    });
}
/**
 * 本地读取智慧卡
 */
function flushICCard1() {
    var index = layer.load();
    $("#text-param").val(null);
    $("#form-data")[0].reset();
    form.render();
    recordData = null;
    $.ajax({
        type: "GET",
        async: true,
        url: "http://127.0.0.1:9111/ICCARD",
        data: {},
        dataType: "json",
        // jsonp: "callback",
        // jsonpCallback: "jsonpCallback",
        success: function (json) {
            var data = json;
            layer.close(index);
            if (data.code === "200" || data.code == 200) {
                paramIntelCard = data.no;
                $("#text-param").text("识别卡号:" + paramIntelCard);
                flushData(paramIntelCard, null);
            } else {
                alertError("请重新读卡!");
            }
        },
        error: function () {
            layer.close(index);
            alertError("IC卡读取出错!");
        }
    });
}
// 使用插件获取身份证
function flushIdCard() {
    var index = layer.load();
@@ -285,7 +186,7 @@
    };
    $.ajax({
        type: "POST",
        url: "../../basic/inout/list-only-progress",
        url: "/basic/inout/list-weight-data",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
@@ -568,57 +469,6 @@
    });
}
//显示质检信息
function showCheck() {
    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 提醒信息
@@ -739,20 +589,27 @@
    $("#tableListProgressData").empty();
    layer.open({
        type: 1,
        title: "选择流程中车辆",
        offset: ['120px', '100px'],
        area: ['1000px', '520px'],
        title: "选择称重中车辆",
        offset: ['240px', '100px'],
        area: ['1000px', '560px'],
        cancel: function (index, layero) {
            $("#listProgressData").css("display", "none");
        },
        shade: 0,
        scrollbar: 0,
        content: $('#listProgressData'),
        closeBtn: 1
    });
    table.render({
        elem: '#tableListProgressData',
        data: list,
        page: true,
        page: false,
        even: true,
        cols: [[
            {type: 'numbers'}, {
            {
                type: 'numbers',
                title: '序号'
            }, {
                field: 'id',
                title: '单据号',
                align: 'center'
@@ -764,7 +621,17 @@
                field: 'plateNum',
                title: '车牌号',
                align: 'center'
            }, {fixed: 'right', title: '选择操作', align: 'center', toolbar: '#barSelectProgress'}]]
            }, {
                field: 'progress',
                title: '流程进度',
                align: 'center'
            }, {
                fixed: 'right',
                title: '选择操作',
                align: 'center',
                toolbar: '#barSelectProgress'
            }
        ]]
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",