jiazx0107@163.com
2023-11-06 69cd9f59a0fabf12f8c9147fcba7f69817a870b3
igds-web/src/main/resources/static/admin/inout/out-handle.js
@@ -27,11 +27,11 @@
        upload.render({
            elem: '#kccz-r-btn1',
            url: '../file/update-file', //上传接口
            size: 4*1024, //限制文件大小,单位KB, 最大上传4MB
            size: 4 * 1024, //限制文件大小,单位KB, 最大上传4MB
            accept: 'images',
            before: function (obj) {
                var plateNum = $("#plateNum").val();
                this.data={"plateNum":plateNum}; //携带参数
                this.data = {"plateNum": plateNum}; //携带参数
                //预读本地文件示例,不支持ie8
                obj.preview(function (index, file, result) {
                    $('#kccz-r-img1').attr('src', result); //图片链接(base64)
@@ -51,11 +51,11 @@
        upload.render({
            elem: '#kccz-r-btn2',
            url: '../file/update-file', //上传接口
            size: 4*1024, //限制文件大小,单位KB, 最大上传4MB
            size: 4 * 1024, //限制文件大小,单位KB, 最大上传4MB
            accept: 'images',
            before: function (obj) {
                var plateNum = $("#plateNum").val();
                this.data={"plateNum":plateNum}; //携带参数
                this.data = {"plateNum": plateNum}; //携带参数
                //预读本地文件示例,不支持ie8
                obj.preview(function (index, file, result) {
                    $('#kccz-r-img2').attr('src', result); //图片链接(base64)
@@ -75,11 +75,11 @@
        upload.render({
            elem: '#kccz-r-btn3',
            url: '../file/update-file', //上传接口
            size: 4*1024, //限制文件大小,单位KB, 最大上传4MB
            size: 4 * 1024, //限制文件大小,单位KB, 最大上传4MB
            accept: 'images',
            before: function (obj) {
                var plateNum = $("#plateNum").val();
                this.data={"plateNum":plateNum}; //携带参数
                this.data = {"plateNum": plateNum}; //携带参数
                //预读本地文件示例,不支持ie8
                obj.preview(function (index, file, result) {
                    $('#kccz-r-img3').attr('src', result); //图片链接(base64)
@@ -99,33 +99,36 @@
    });
    showProgress();
    // 监听重量变化
    $(".weight").blur(function () {
        deAutoByHandle(this.name)
    });
    //调整字段不编辑
    $("#depotId").attr("disabled",true);
    $("#foodVariety").attr("disabled",true);
    $("#foodLevel").attr("disabled",true);
    $("#depotId").attr("disabled", true);
    $("#foodVariety").attr("disabled", true);
    // $("#foodLevel").attr("disabled", true);
});
//控制流程环节显示
function showProgress() {
    if(!inoutProgress){
    if (!inoutProgress) {
        return;
    }
    if(inoutProgress.indexOf("REGISTER") == -1){
    if (inoutProgress.indexOf("REGISTER") == -1) {
        $("#progress-register").css("display", "none");
    }
    if(inoutProgress.indexOf("WEIGHT_FULL") == -1){
    if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
        $("#progress-fullWeight").css("display", "none");
    }
    if(inoutProgress.indexOf("HANDLE") == -1){
    if (inoutProgress.indexOf("HANDLE") == -1) {
        $("#progress-hand").css("display", "none");
    }
    if(inoutProgress.indexOf("WEIGHT_EMPTY") == -1){
    if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
        $("#progress-emptyWeight").css("display", "none");
    }
    if(inoutProgress.indexOf("CARD_BACK") == -1){
    if (inoutProgress.indexOf("CARD_BACK") == -1) {
        $("#progress-cardBack").css("display", "none");
    }
}
@@ -191,6 +194,13 @@
    });
}
function flushPage() {
    layer.confirm('确定要刷新页面吗?', {icon: 3, title: '提示'}, function (index) {
        resetForm();
        layer.close(index);
    });
}
// 表单清空
function resetForm() {
    $("#form-data")[0].reset();
@@ -200,6 +210,7 @@
    $('#kccz-r-img3').removeAttr('src');
    form.render();
    recordData = null;
    $("#text-param").val(null);
}
// 更新数据信息
@@ -210,8 +221,8 @@
    var param = {
        type: type,
        progress: progress,
        userId:userId2,
        intelCard:intelCard,
        userId: userId2,
        intelCard: intelCard,
        plateNum: plateNum
    };
    var index = layer.load();
@@ -223,7 +234,7 @@
        data: JSON.stringify(param),
        success: function (result) {
            if (result.code != "0000") {
                notify(result.msg,result.data);
                notify(result.msg, result.data);
            } else {
                recordData = result.data;
                // 返回的数据进行赋值
@@ -241,7 +252,7 @@
// 当前完成
function submit() {
    if (null == recordData) {
    if (!recordData) {
        layer.alert("没有数据可以提交!!!");
        return;
    }
@@ -262,15 +273,15 @@
    $.ajax({
        type: "POST",
        url: "../../basic/inout/inout-next-step",
        url: "../../basic/inout/submit-handle",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            if (result.code != "0000") {
                notify(result.msg,result.data);
                notify(result.msg, result.data);
            } else {
                notify("值仓完成",result.data);
                notify("值仓完成", result.data);
                // 重置页面
                resetForm();
            }
@@ -278,7 +289,7 @@
        },
        error: function () {
            layer.close(index);
            notify("提交失败,请重新尝试",null);
            notify("提交失败,请重新尝试", null);
        }
    });
}