jiazx0107@163.com
2023-05-31 5eb90395313f5d7232aad2fb1a821a0028ca7764
igds-web/src/main/resources/static/admin/inout/in-weight.js
@@ -5,6 +5,7 @@
var recordData = null;// 业务数据信息
var snapData;//系统抓拍对象信息
var timerWeight;
var textParam;//设备识别结果
$(function () {
    layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () {
@@ -34,7 +35,7 @@
                        shadeClose: true,
                        shade: 0.3,
                        closeBtn: 2,
                        offset: ['50px','120px'],
                        offset: ['50px', '120px'],
                        area: ['1000px', '640px'],
                        content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random()
                    });
@@ -122,32 +123,6 @@
        resetForm();
    }
}
//控制流程环节显示
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 addDisabled() {
@@ -249,13 +224,7 @@
//新的读卡方式
function flushICCard() {
    if(cardDto && cardDto.protocol != "TCP_DEFAULT"){
        //协议获取
        flushICCard2();
    }else {
        //本地读取
        flushICCard1();
    }
   flushICCard1();
}
/**
@@ -299,7 +268,7 @@
 * 本地读取智慧卡
 */
function flushICCard1() {
    $("#intelCard").val(null);
    $("#text-param").val(null);
    $("#form-data")[0].reset();
    form.render();
    recordData = null;
@@ -312,18 +281,17 @@
        jsonp: "callback",
        jsonpCallback: "jsonpCallback",
        success: function (json) {
            //console.log(json);
            var data = json.no;
            //console.log(data);
            if (data === "not found") {
                layer.alert("请重新读卡!", {offset: ['300px', '300px']});
               alertError("请重新读卡!");
            } else {
                $("#intelCard").val(data);
                textParam = data;
                $("#text-param").text("识别卡号:" + textParam);
                flushData();
            }
        },
        error: function () {
            layer.alert("IC卡读取出错!", {offset: ['300px', '300px']});
           alertError("IC卡读取出错!");
        }
    });
}
@@ -661,7 +629,7 @@
            field: 'name',
            title: '通知单名称',
            width: '15%'
        },{
        }, {
            field: 'customerName',
            title: '送货单位'
        }, {
@@ -743,35 +711,36 @@
    });
}
function controlGate(targetStatus){
        if(gateDto){
            var data = {"companyId":companyId
                ,"deptId":deptId
                ,"bizType":type
                ,"confId":gateDto.id
                ,"targetStatus":targetStatus
                ,"sort":gateDto.sort
            };
            $.ajax({
                type: "POST",
                url: "../../basic/inout/gate-ctrl",
                dataType: "json",
                contentType: "application/json;charset=UTF-8",
                data: JSON.stringify(data),
                success: function (result) {
                    if (result.code != "0000") {
                        layer.msg("操作失败:"+result.msg);
                    } else {
                        layer.msg("操作成功");
                    }
                },
                error: function () {
                    layer.alert("操作失败,请重新尝试!!");
function controlGate(targetStatus) {
    if (gateDto) {
        var data = {
            "companyId": companyId
            , "deptId": deptId
            , "bizType": type
            , "confId": gateDto.id
            , "targetStatus": targetStatus
            , "sort": gateDto.sort
        };
        $.ajax({
            type: "POST",
            url: "../../basic/inout/gate-ctrl",
            dataType: "json",
            contentType: "application/json;charset=UTF-8",
            data: JSON.stringify(data),
            success: function (result) {
                if (result.code != "0000") {
                    layer.msg("操作失败:" + result.msg);
                } else {
                    layer.msg("操作成功");
                }
            });
        }else{
            layer.msg("没有获取到设备!");
        }
            },
            error: function () {
                layer.alert("操作失败,请重新尝试!!");
            }
        });
    } else {
        layer.msg("没有获取到设备!");
    }
}
//-------------------------道闸操作--------------------------//