zgq
2021-08-11 6fd6b4d8399cd5ce53b20ba2b865e7cee0f4cc9d
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill_Fast.html
@@ -958,6 +958,7 @@
                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                GetSellOutFindSP();
                                $("#HSupID").val(result.data[0].HSupID);
                                $("#HSupName").val(result.data[0].HSupName);
                                //$("#HDeptID").val(result.data[0].HDeptID);
@@ -1015,32 +1016,56 @@
            });
            //扫源单查货
            $('#HSourceBillNo').on('keydown', function (event) {
            //$('#HSourceBillNo').on('keydown', function (event) {
            //    var HSourceBillNo = $('#HSourceBillNo').val();
            //    if (event.keyCode == 13) {
            //        var index = layer.load(0);
            //        $.ajax({
            //            url: GetWEBURL() + "/LookingFor/GetSellOutFindSP",
            //            type: "GET",
            //            data: { "HbillNo": HSourceBillNo },
            //            success: function (result) {
            //                if (result.count == 1) {
            //                    ZHOption.data = result.data;
            //                    table.render(ZHOption);
            //                    layer.close(index);
            //                    element.tabChange('tab-SellOutBill', '5');
            //                }
            //                else {
            //                    layer.close(index);
            //                    layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //                }
            //            }, error: function () {
            //                layer.close(index);
            //                layer.alert("接口请求失败!", { icon: 5 });
            //            }
            //        });
            //    }
            //});
            //扫源单查货
            function GetSellOutFindSP() {
                var HSourceBillNo = $('#HSourceBillNo').val();
                if (event.keyCode == 13) {
                    var index = layer.load(0);
                    $.ajax({
                        url: GetWEBURL() + "/LookingFor/GetSellOutFindSP",
                        type: "GET",
                        data: { "HbillNo": HSourceBillNo },
                        success: function (result) {
                            if (result.count == 1) {
                                ZHOption.data = result.data;
                                table.render(ZHOption);
                                layer.close(index);
                                element.tabChange('tab-SellOutBill', '5');
                            }
                            else {
                                layer.close(index);
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                        }, error: function () {
                $.ajax({
                    url: GetWEBURL() + "/LookingFor/GetSellOutFindSP",
                    type: "GET",
                    data: { "HbillNo": HSourceBillNo },
                    success: function (result) {
                        if (result.count == 1) {
                            ZHOption.data = result.data;
                            table.render(ZHOption);
                            layer.close(index);
                            layer.alert("接口请求失败!", { icon: 5 });
                            element.tabChange('tab-SellOutBill', '5');
                        }
                    });
                }
            });
                        else {
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
        //以上为layui模块
        });