YYC
2023-10-29 e4a102acbd91e300497572404866f2a5f16571ab
igds-web/src/main/resources/static/admin/inout/in-check.js
@@ -29,6 +29,13 @@
        });
        laydate.render({
            elem: '#foodYear',
            theme: '#7b8e9f',
            value: foodYear,
            type: 'year'
        });
        laydate.render({
            elem: '#checkTime',
            theme: '#7b8e9f',
            format: 'yyyy-MM-dd HH:mm:ss',
@@ -67,11 +74,18 @@
    //显示入库流程
    showProgress();
});
window.onbeforeunload = function () {
}
window.onunload = function () {
}
window.onload = function () {
    //扫描枪自动回车事件
    $('#checkId').bind('keyup', function(event) {
    $('#checkId').bind('keyup', function (event) {
        if (event.keyCode == "13") {
            // //去掉焦点,防止刷新页面
            // $('#checkId').blur();
            getDataByCheckId();
        }
    });
@@ -117,7 +131,6 @@
    var limit = data.upperLimit;
    //运算符
    var symbol = data.operaSymbol;
    if (symbol && limit) {
        if (">=" == symbol) {
            if (newValue < limit) {
@@ -217,6 +230,7 @@
    // var url = "com.ld.igds.inout.ReportInoutCheck.d";
    // window.parent.openTab(url, "化验结果导出", "checkDataExport");
};
// 扦样机解除急停
function checkResetStop() {
    var param = JSON.stringify(checkDto);
@@ -348,7 +362,8 @@
            title: '备注说明',
            align: 'center',
            edit: 'text'
        }]]
        }]],
        limit: this.curCheckItems.length //显示的数量
    });
    $("thead tr").css({
@@ -359,7 +374,6 @@
function showDetail(data) {
    curCheckData = data;
    if (!curCheckData.checkTime) {
        curCheckData.checkTime = dateFtt("yyyy-MM-dd hh:mm:ss", new Date());
    }
@@ -376,14 +390,14 @@
        shade: 0,
        content: $('#checkDetail'),
        btnAlign: 'c',
        btn: ['仅保存', '保存提交','关闭取消'],
        btn: ['仅保存', '保存提交', '关闭取消'],
        yes: function () {
            // 更新到页面
            var data = form.val("form-detail");
            // 合并更新當前编辑数据
            Object.assign(curCheckData, data);
            saveCheckData();
            if(scanCodeTag){
            if (scanCodeTag) {
                showScanCode();
            }
        }, btn2: function () {
@@ -392,18 +406,17 @@
            // 合并更新當前编辑数据
            Object.assign(curCheckData, data);
            submit();
            if(scanCodeTag){
            if (scanCodeTag) {
                showScanCode();
            }
        }, btn3: function () {
            parent.layer.closeAll();
            if(scanCodeTag){
            if (scanCodeTag) {
                showScanCode();
            }
        },
        closeBtn: 0
    });
    // 获取化验项信息
    flushCheckItem(curCheckData.foodVariety);
    getPriceByFoodLevel(curCheckData.foodLevel);
@@ -417,7 +430,6 @@
    $("#check-result-tip").text("检验结果:#");
    $("#price-result-tip2").text("粮食定价:#元/公斤");
    curCheckData.foodVariety = foodVariety;
    var index = layer.load();
    $.ajax({
        type: "POST",
@@ -537,7 +549,7 @@
        area: ['700px', '320px'],
        shade: 0,
        content: $('#scanCodeDetail'),
        success: function(){
        success: function () {
            document.getElementById('checkId').focus();
        },
        btnAlign: 'c',
@@ -555,7 +567,7 @@
//根据质检单号获取信息
function getDataByCheckId() {
    var param = form.val("form-sacnCodeDetail");
    if(!param.checkId){
    if (!param.checkId) {
        layer.alert("质检单号为空,请扫码或输入质检单号");
    }
    var index = layer.load();