yusijie
2023-11-27 3ccf32f224519ba7e1f38b8d5b0f4d1e7a8cffaf
WebTM/views/³µ¼ä¹ÜÀí/µ¥Æ·¹ýÕ¾/Cj_ProcessItemStationPlatform.html
@@ -603,6 +603,7 @@
            $.ajax({
                url: GetWEBURL() + '/Cj_SingleStation/BadRecordsList',
                type: "GET",
                async: false,
                data: { "HBarCode": HBarCode, "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.count == 1) {
@@ -631,6 +632,7 @@
            $.ajax({
                url: GetWEBURL() + '/Cj_SingleStation/HGRecordsList',
                type: "GET",
                async: false,
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.count == 1) {
@@ -651,37 +653,52 @@
        
        //条码回车查询
        function txtHBarCode_KeyDown(HBarCode) {
            var index = layer.load();
            var HProcExchBillNo = $("#HProcExchBillNo").val();
            var indexs = layer.load();
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/Cj_SingleStation/HBardCodeAccessoryList",
                url: GetWEBURL() + "/Cj_SingleStation/SNHBardCodeList",
                async: false,
                data: { "HBarCode": HBarCode, "user": sessionStorage["HUserName"]},
                data: { "HBarCode": HBarCode, "HProcExchBillNo": HProcExchBillNo, "user": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"] },
                dataType: "json",
                success: function (data1) {
                    if (data1.count == 1) {
                        layer.close(index);
                        var HProcExchBillNo = $("#HProcExchBillNo").val();
                        //if (data1.data[0]["HSourceBillNo"] != HProcExchBillNo) {
                        //    return layer.msg("扫码错误,请重新扫!");
                        //} else {
                        //    $("#HBarCode_P").val(HBarCode);
                        //    layer.msg("扫码成功!");
                        //}
                        layer.close(indexs);
                        var index = layer.load();
                        $("#HBarCode_P").val(HBarCode);
                        //保存数据
                        set_AddAssemblyBill();
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "/Cj_SingleStation/HBardCodeSNList",
                            async: false,
                            data: { "HBarCode": HBarCode, "user": sessionStorage["HUserName"] },
                            dataType: "json",
                            success: function (data1) {
                                if (data1.count == 1) {
                                    layer.close(index);
                                    $("#HBarCode_P").val(HBarCode);
                                    //保存数据
                                    set_AddAssemblyBill();
                                }
                                else {
                                    layer.close(index);
                                    layer.msg(data1.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                }
                                $("#HBarCodeSN").val("");
                            },
                            error: function (err) {
                                layer.close(index);
                                layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                        });
                    }
                    else {
                        layer.close(index);
                        layer.close(indexs);
                        layer.msg(data1.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                    $("#HBarCodeSN").val("");
                },
                error: function (err) {
                    layer.close(index);
                    layer.close(indexs);
                    layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            });
@@ -822,6 +839,7 @@
                                layer.confirm('是否要把当前批次:' + option.data[i]["HBatchNo"] + '替换成批次:' + data1.data[0]["HBatchNo"], function (index) {
                                    layer.close(index);
                                    option.data[i]["HBatchNo"] = data1.data[0]["HBatchNo"];
                                    option.data[i]["配件数量"] = data1.data[0]["HQty"];
                                    option.data[i]["HBarCode"] = HBarCode;
                                    table.render(option);
                                });
@@ -829,6 +847,7 @@
                            }
                            if (data1.data[0]["HMaterNumber"] == option.data[i]["配件代码"]) {
                                option.data[i]["HBatchNo"] = data1.data[0]["HBatchNo"];
                                option.data[i]["配件数量"] = data1.data[0]["HQty"];
                                option.data[i]["HBarCode"] = HBarCode;
                                KNum += 1;
                                table.render(option);
@@ -1049,7 +1068,7 @@
                    , area: ['100%', '100%']//大小
                    , title: '工序不良汇报'//标题
                    , shift: 2//弹出动画
                    , content: ['../../车间管理/单品过站/Cj_CollectionOfSingleProductDefects.html?OperationType=1&linterid=' + $("#HInterID").val(), 'yes']
                    , content: ['../../车间管理/单品过站/Cj_CollectionOfSingleProductDefects.html?OperationType=1&linterid=' + $("#HInterID").val() + '&HProcExchBillNo=' + $("#HProcExchBillNo").val(), 'yes']
                    , end: function () {
                        get_BadRecords($("#HBardCodeProcExchBillNo").val());
                    }
@@ -1084,7 +1103,6 @@
                        get_AddBomTempList();
                        var HBardCodeProcExchBillNo = $("#HBardCodeProcExchBillNo").val();
                        get_BomList(HBardCodeProcExchBillNo);
                        get_BadRecords(HBardCodeProcExchBillNo);
                        //查询合格记录
                        get_HGRecords();
                        //查询不良记录