yxj
2023-05-04 7aca0ba298995c44c0cf3c2102c244f458ccf864
直接调拨模块扫描物料条码、源单条码方法修改
3个文件已修改
180 ■■■■■ 已修改文件
WebTM/views/仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/验收入库/外购入库/Kf_POStockInBill_Fast.html 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Kf_MoveStockBill_Fast.html
@@ -67,8 +67,8 @@
                                            <select name="HBillType" id="HBillType">
                                                <option value="1402">发货通知单</option>
                                                <option value="1243">调拨申请单</option>
                                                <!--<option value="3720">生产用料清单</option>-->
                                                <!--<option value="1604">委外用料清单</option>-->
                                                <option value="3720">生产用料清单</option>
                                                <option value="1604">委外用料清单</option>
                                                <option value="1242">出库申请单</option>
                                                <option value="1214">生产发料通知单</option>
                                                <option value="-1" selected>手工录入</option>
@@ -1146,6 +1146,14 @@
                                $("#HDeptID").val(result.data.hDeptIDField);
                                $("#HDeptName").val(result.data.hDeptNameField);
                            }
                            if (result.data.hWhIDField != 0) {
                                $("#HWHID").val(result.data.hWhIDField);
                                $("#HWHNAME").val(result.data.hWhNameField);
                            }
                            if (result.data.hSCWhIDField != 0) {
                                $("#HSCWHID").val(result.data.hSCWhIDField);
                                $("#HSCWHNAME").val(result.data.hSCWhNameField);
                            }
                            $("#HStockStyle").find("option:contains('" + result.data.hStockStyleField +"')").attr("selected", true);
                            $("#HStockInOrgID").val(result.data.hStockInOrgIDField);
@@ -1340,19 +1348,143 @@
                        data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sMaker, "HWhID": WhID, "HSPID": SPID, "HSCWHID": HSCWhID, "HSCSPID": HSCSPID, "HQty": sQty, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockInOrgID": HStockInOrgID, "HStockOutOrgID": HStockOutOrgID, "HScanStyle": HScanStyle },
                        success: function (result) {
                            if (result.count == 1) {
                                if (HSourceFlag == "false") {
                                    $("#HBillType").find("option:contains('手工录入')").attr("selected", true);
                                    $("#HSourceBillNo").val("");
                                if (result.data.hBarTypeField == '仓库条码') {
                                    $("#HSCWHNAME").val(result.data.hWhNameField);
                                    $("#HSCWHID").val(result.data.hWhIDField);
                                    $("#HOutStockPlaceName").val("");
                                    $("#HNote").val(";一键扫码仓库条码");
                                    element.tabChange('tab-MoveStockBill', '2');  //跳转页签
                                    return;
                                }
                                else if (result.data.hBarTypeField == '仓位条码') {
                                    $("#HOutStockPlaceName").val(result.data.hSPNameField);
                                    $("#HOutStockPlaceID").val(result.data.hSPIDField);
                                    $("#HSCWHNAME").val(result.data.hWhNameField);
                                    $("#HSCWHID").val(result.data.hWhIDField);
                                    $("#HNote").val(";一键扫码仓位条码");
                                    element.tabChange('tab-MoveStockBill', '2');//跳转页签
                                    return;
                                }
                                else if (result.data.hBarTypeField == '部门条码') {
                                    $("#HDeptName").val(result.data.hDeptNameField);
                                    $("#HDeptID").val(result.data.hDeptIDField);
                                    $("#HNote").val(";一键扫码部门条码");
                                    element.tabChange('tab-MoveStockBill', '2');//跳转页签
                                    return;
                                }
                                else if (result.data.hBarTypeField == '源单条码') {
                                    if (result.data.hDeptIDField != 0) {
                                        $("#HDeptID").val(result.data.hDeptIDField);
                                        $("#HDeptName").val(result.data.hDeptNameField);
                                    }
                                    if (result.data.hWhIDField != 0) {
                                        $("#HWHID").val(result.data.hWhIDField);
                                        $("#HWHNAME").val(result.data.hWhNameField);
                                    }
                                    if (result.data.hSCWhIDField != 0) {
                                        $("#HSCWHID").val(result.data.hSCWhIDField);
                                        $("#HSCWHNAME").val(result.data.hSCWhNameField);
                                    }
                                    $("#HStockStyle").find("option:contains('" + result.data.hStockStyleField + "')").attr("selected", true);
                                    $("#HStockInOrgID").val(result.data.hStockInOrgIDField);
                                    $("#HStockInOrgName").val(result.data.hStockInOrgNameField);
                                    $("#HStockOutOrgID").val(result.data.hStockOutOrgIDField);
                                    $("#HStockOutOrgName").val(result.data.hStockOutOrgNameField);
                                    $("#HSourceBillNo").val(result.data.hSourceBillNoField);
                                    HSourceFlag = true;
                                    //获取源单类型、源单单号
                                    $("#HBillType").val(result.data.hSourceBillTypeField == null ? "1402" : result.data.hSourceBillTypeField);
                                    if (result.data.hSourceBillTypeField == "1402") {
                                        $("#HBillType").empty();
                                        $("#HBillType").val("1402");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '发货通知单' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else if (result.data.hSourceBillTypeField == "1243") {
                                        $("#HBillType").empty();
                                        $("#HBillType").val("1243");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '调拨申请单' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else if (result.data.hSourceBillTypeField == "3720") {
                                        $("#HBillType").empty();
                                        $("#HBillType").val("3720");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '生产用料清单' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else if (result.data.hSourceBillTypeField == "1604") {
                                        $("#HBillType").empty();
                                        $("#HBillType").val("1604");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '委外用料清单' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else if (result.data.hSourceBillTypeField == "1242") {
                                        $("#HBillType").empty();
                                        $("#HBillType").val("1242");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '出库申请单' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else if (result.data.hSourceBillTypeField == "1214") {
                                        $("#HBillType").empty();
                                        $("#HBillType").val("1214");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '生产发料通知单' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else {
                                        //$("#HBillType").empty();
                                        $("#HBillType").val("-1");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '手工录入' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    $("#HStockStyle").attr("disabled", "disabled");
                                    $("#HStockInOrgName").attr("readonly", "readonly");
                                    $("#HStockOutOrgName").attr("readonly", "readonly");
                                    $("#HBillType").attr("disabled", "disabled");
                                    $("#HSourceBillNo").attr("readonly", "readonly");
                                    form.render('select');
                                    if (result.data.hMulSourceFlagField == 0) {
                                        $("#HSourceBillNo").attr("readonly", "readonly");
                                    }
                                    $("#HNote").val(";一键扫码源单条码");
                                    element.tabChange('tab-MoveStockBill', '3');
                                }
                                HSourceFlag = true;
                                element.tabChange('tab-MoveStockBill', '3');
                                else {
                                    if (HSourceFlag == "false") {
                                        $("#HBillType").find("option:contains('手工录入')").attr("selected", true);
                                        $("#HSourceBillNo").val("");
                                        $("#HStockStyle").attr("disabled", "disabled");
                                        $("#HStockInOrgName").attr("readonly", "readonly");
                                        $("#HStockOutOrgName").attr("readonly", "readonly");
                                        $("#HBillType").attr("disabled", "disabled");
                                        $("#HSourceBillNo").attr("readonly", "readonly");
                                        form.render('select');
                                    }
                                    HSourceFlag = true;
                                    element.tabChange('tab-MoveStockBill', '3');
                                }
                                layer.load(3)
                                $.ajax({
WebTM/views/ÑéÊÕÈë¿â/²úÆ·Èë¿â/Kf_ProductInBill_Fast.html
@@ -1368,7 +1368,13 @@
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else {
                                        //$("#HBillType").val("-1");
                                        //$("#HBillType").empty();
                                        $("#HBillType").val("-1");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '手工录入' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    $("#HSourceBillNo").attr("readonly", "readonly");
                                    $("#HNote").val(";一键扫码源单条码");
@@ -1420,7 +1426,13 @@
                                            $("#HBillType").attr("readonly", "readonly");
                                        }
                                        else {
                                            //$("#HBillType").val("-1");
                                            //$("#HBillType").empty();
                                            $("#HBillType").val("-1");
                                            var optionHtml = '';
                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '手工录入' + "</option>";
                                            $("#HBillType").append(optionHtml);
                                            layui.form.render('select');
                                            $("#HBillType").attr("readonly", "readonly");
                                        }
                                        $("#HSourceBillNo").attr("readonly", "readonly");
                                        $("#HNote").val(";物料条码");
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBill_Fast.html
@@ -1090,7 +1090,13 @@
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    else {
                                        //$("#HBillType").val("-1");
                                        //$("#HBillType").empty();
                                        $("#HBillType").val("-1");
                                        var optionHtml = '';
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '手工录入' + "</option>";
                                        $("#HBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HBillType").attr("readonly", "readonly");
                                    }
                                    $("#HSourceBillNo").attr("readonly", "readonly");
                                    $("#HNote").val(";一键扫码源单条码");
@@ -1129,7 +1135,13 @@
                                            $("#HBillType").attr("readonly", "readonly");
                                        }
                                        else {
                                            //$("#HBillType").val("-1");
                                            //$("#HBillType").empty();
                                            $("#HBillType").val("-1");
                                            var optionHtml = '';
                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '手工录入' + "</option>";
                                            $("#HBillType").append(optionHtml);
                                            layui.form.render('select');
                                            $("#HBillType").attr("readonly", "readonly");
                                        }
                                        $("#HSourceBillNo").attr("readonly", "readonly");
                                        $("#HNote").val(";物料条码");