YYC
2023-07-07 b32697542f61ab9f6579aed1321d2916dd278eb5
igds-web/src/main/resources/static/admin/inout/out-weight.js
@@ -264,7 +264,7 @@
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../inout/api/ic-card-num",
        url: "../../inout/api/get-icCard",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
@@ -388,10 +388,11 @@
    });
}
// 打印过磅单
// 点击打印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
function printBill() {
    if (!recordData) {
        layer.alert("没有获取到业务数据,不支持打印!");
        alertError("没有获取到业务数据,打印被拒绝!");
        return;
    }
    // 从后台获取模版并打印
@@ -399,7 +400,27 @@
    // 合并更新當前编辑数据
    Object.assign(recordData, data);
    printBillStep2();
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/report/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                layer.msg("开始渲染打印单……");
                printWeight(result.data);
            }
        },
        error: function () {
            layer.close(index);
            alertError("获取打印模版失败,请联系管理员查看原因");
        }
    });
}
// 点击打印,先执行系统默认执行完成卡回收
@@ -407,7 +428,7 @@
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout-report/inout-bill-weight",
        url: "../../basic/inout-report/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
@@ -599,7 +620,6 @@
        fileName: snapData.fileName3
    }];
    recordData.files = files;
    console.log("out-weight,submit")
    var index = layer.load();
    $.ajax({
        type: "POST",
@@ -624,10 +644,10 @@
    });
    //以下逻辑为增加一个语音通知的调用方法,不考虑返回结果
    var curWeight = recordData.fullWeight;
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        curWeight = recordData.emptyWeight;
    }
    // var curWeight = recordData.fullWeight;
    // if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
    //     curWeight = recordData.emptyWeight;
    // }
    // var param = {
    //     sort: $("#scaleName").val(),
    //     weight: curWeight,