王 垚
2022-09-27 4e03e74ea1081fb88052395668381fa9bf7b2c97

3个文件已修改
241 ■■■■■ 已修改文件
WebTM/views/仓存管理/仓库调拨/Cc_LookingForBill.html 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/验收入库/委外入库/Kf_EntrustInBill_Fast.html 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Cc_LookingForBill.html
@@ -205,23 +205,15 @@
            $("#HSource").val(sessionStorage["HSource"]);
            $("#HMakerID").val(sessionStorage["Czybm"]);
            $("#HMaker").val(sessionStorage["HUserName"]);
            $("#HGroupID").val(sessionStorage["HGroupID"])
            $("#HGroup").val(sessionStorage["HGroup"] == 'undefined' ? '' : sessionStorage["HGroup"]);
            $("#HEmpID1").val(sessionStorage["HBillerID"])
            $("#HEmpName1").val(sessionStorage["HUserName"])
            $("#HJiaYe").val($("#HEmpID1").val() + ',' + $("#HEmpID2").val());
            $("#HGroupID").val(sessionStorage["HGroupID"]);
            //判断用户是否绑定班组和生产资源
            if ($("#HGroupID").val() == 0 || $("#HSourceID").val() == 0) {
                layer.confirm("该用户未绑定班组或生产资源!不允许找货!", {
                    icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['确认退出']
                }, function () { window.location.href = "../../index.html"; });
            }
            //根据登陆人员带出班组和职员
            getGroupEmp(sessionStorage["HUserName"]);
            //获取最大单据号 new
            $("#HInterID").val("");
            $("#HBillNo").val("");
@@ -576,7 +568,7 @@
                //    }
                //}
                var sSubStr = JSON.stringify(tableData);
                sSubStr = "{\"oSub\": " + sSubStr + "}" ;
                sSubStr = "{\"oSub\": " + sSubStr + "}";
                //sSubStr = JSON.stringify(sSubStr);
                //var json = "{\"oMain\":" + sMainStr + "},{\"oMain\":" + sSubStr + "}";
                if (AllowLoadData(sSubStr, 'Saver') != false)//非空验证
@@ -673,7 +665,24 @@
            });
        });
        function getGroupEmp(HUserName) {
            $.ajax({
                url: GetWEBURL() + "/Web/getGroupEmp",
                type: "GET",
                data: { "HUserName": HUserName },
                success: function (result) {
                    if (result.data.length > 0) {
                        $("#HGroupID").val(result.data[0].HGroupID);
                        $("#HGroup").val(result.data[0].HGroupName);
                        $("#HEmpID1").val(result.data[0].HEmpID1);
                        $("#HEmpName1").val(result.data[0].HEmpName1);
                        $("#HEmpID2").val(result.data[0].HEmpID2);
                        $("#HEmpName2").val(result.data[0].HEmpName2);
                        $("#HJiaYe").val(result.data[0].HJiaYe);
                    }
                }
            })
        }
        //返回仓库
        function GetHWHValue(obj)  //返回仓库
        {
@@ -725,9 +734,16 @@
        }
        function AllowLoadData(sSubStr, bnt) {  //非空验证
            return true;
            if ($("#HSourceBillNo").val() == '') {
                layer.msg("请先扫源单!", { icon: 5 });
                return false;
            }
            if ($("#HGroup").val() == '') {
                layer.msg("请选择班组!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HEmpName1").val() == '' || $("#HEmpName2").val() == '') {
                layer.msg("请选择职员!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HWHNAME").val() == '') {
@@ -738,6 +754,10 @@
                layer.msg("没有物料明细记录!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if (JSON.parse(sSubStr).oSub.length == 0) {
                layer.msg("请扫描条码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if (bnt == 'Saver1') {
                if (!typeof (sSubStr) == "undefined") {
                    for (var i = 0; i <= sSubStr.length - 1; i++) {  //判断扫码数量不能大于应收数量
WebTM/views/ÑéÊÕÈë¿â/²úÆ·Èë¿â/Kf_ProductInBill_Fast.html
@@ -306,20 +306,9 @@
            $("#HMakerID").hide();
            $("#HBillerID").val(sessionStorage["HBillerID"]);
            $("#HBillerID").hide();
            $("#HGroupID").val(sessionStorage["HGroupID"])
            $("#HGroupName").val(sessionStorage["HGroup"] == 'undefined' ? '' : sessionStorage["HGroup"]);
            $("#HEmpID1").val(sessionStorage["HBillerID"])
            $("#HEmpName1").val(sessionStorage["HUserName"])
            $("#HJiaYe").val($("#HEmpID1").val() + ',' + $("#HEmpID2").val());
            var HSourceFlag = sessionStorage["SourceFlag"];
            //默认带入的仓库,如果启用仓位则仓位有效,如果没有启用则仓位灰度 new
            $("#HBarCode").focus();
            //获取参数
            function getUrlVars() {
                var vars = [], hash;
@@ -343,53 +332,9 @@
            var linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            function RoadBillMain(linterid)//加载表头
            {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (d) {
                        // console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        //$("#HBillType").val(d.data[0].HSourceBillType);
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                        //$("#HWHID").val(d.data[0].HWhID);
                        //$("#HKeeperID").val(d.data[0].HKeeperID);
                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
                        //$("#HDeptID").val(d.data[0].HDeptID);
                        //$("#HBarCode").val(d.data[0].HBarCode);
                        //$("#HQty").val(d.data[0].HQty);
                    }
                })
            }
            function RoadBillSub(linterid)//加载表体
            {
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
                    , cellMinWidth: 80
                    , toolbar: '#toolbarDemo'
                    , where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
                    , cols: [[
                        { type: 'radio' }
                        , { field: 'HQty', title: '数量', width: 80 }
                        , { field: 'HQtyMust', title: '应收数量', width: 80 }
                        , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                        , { field: 'HMaterName', title: '物料名称', width: 100 }
                        , { field: 'HMaterModel', title: '规格型号', width: 100 }
                        , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                        , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                        , { field: 'HBatchNo', title: '批次', width: 100 }
                        , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                        , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                        , { field: 'HMaterID', title: '物料ID', width: 100 }
                    ]]
                    , height: 500
                })
            }
            //根据登陆人员带出班组和职员
            getGroupEmp(sessionStorage["HUserName"]);
            //动态加载源单类型列表 new
            //判断是否新增
            if (linterid == null || linterid == 0) {
@@ -411,8 +356,6 @@
                RoadBillMain(linterid);
                RoadBillSub(linterid);
            }
            //进入物料明细页签、条码框 å…‰æ ‡ç„¦ç‚¹   new
            //if (1 == 2)
            //{
@@ -430,7 +373,6 @@
            //}
            //
            //
            //选择仓库
            form.on('submit(HWHID-BT)', function () {//选择仓库
                layer.open({
@@ -447,7 +389,6 @@
                    }
                })
            });
            //选择仓位
            form.on('submit(HSpID-BT)', function () {//选择仓位
                layer.open({
@@ -464,7 +405,6 @@
                    }
                })
            });
            //选择保管
            form.on('submit(HKeeperID-BT)', function () {//选择保管
                layer.open({
@@ -1001,6 +941,71 @@
                }
            });
        });
        function getGroupEmp(HUserName) {
            $.ajax({
                url: GetWEBURL() + "/Web/getGroupEmp",
                type: "GET",
                data: { "HUserName": HUserName },
                success: function (result) {
                    if (result.data.length > 0) {
                        $("#HGroupID").val(result.data[0].HGroupID);
                        $("#HGroupName").val(result.data[0].HGroupName);
                        $("#HEmpID1").val(result.data[0].HEmpID1);
                        $("#HEmpName1").val(result.data[0].HEmpName1);
                        $("#HEmpID2").val(result.data[0].HEmpID2);
                        $("#HEmpName2").val(result.data[0].HEmpName2);
                        $("#HJiaYe").val(result.data[0].HJiaYe);
                    }
                }
            })
        }
        function RoadBillMain(linterid)//加载表头
        {
            $.ajax({
                url: GetWEBURL() + "/Web/GetPonderationBill",
                type: "GET",
                data: { "HInterID": linterid },
                success: function (d) {
                    // console.log(d.data);
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                    //$("#HBillType").val(d.data[0].HSourceBillType);
                    $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                    //$("#HWHID").val(d.data[0].HWhID);
                    //$("#HKeeperID").val(d.data[0].HKeeperID);
                    //$("#HSecManagerID").val(d.data[0].HSecManagerID);
                    //$("#HDeptID").val(d.data[0].HDeptID);
                    //$("#HBarCode").val(d.data[0].HBarCode);
                    //$("#HQty").val(d.data[0].HQty);
                }
            })
        }
        function RoadBillSub(linterid)//加载表体
        {
            table.render({
                elem: '#wl-table'
                , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
                , cellMinWidth: 80
                , toolbar: '#toolbarDemo'
                , where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HQty', title: '数量', width: 80 }
                    , { field: 'HQtyMust', title: '应收数量', width: 80 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', width: 100 }
                    , { field: 'HMaterModel', title: '规格型号', width: 100 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                    , { field: 'HBatchNo', title: '批次', width: 100 }
                    , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                    , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                    , { field: 'HMaterID', title: '物料ID', width: 100 }
                ]]
                , height: 500
            })
        }
        function GetHWHValue(obj)  //返回调入仓库
        {
            $("#HWHNAME").val(obj[0].HName);
@@ -1042,16 +1047,24 @@
            //    layer.msg("请先扫源单!", { icon: 5 });
            //    return false;
            //}
            if ($("#HGroupName").val() == '') {
                layer.msg("请选择班组!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HEmpName1").val() == '' || $("#HEmpName2").val() == '') {
                layer.msg("请选择职员!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HDeptName").val() == '') {
                layer.msg("部门没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                layer.msg("请选择部门", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HSecManager").val() == '') {
                layer.msg("验收人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                layer.msg("请选择验收人", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HKeeper").val() == '') {
                layer.msg("保管人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                layer.msg("请选择保管人", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            //if ($("#HWHNAME").val() == '') {
WebTM/views/ÑéÊÕÈë¿â/ίÍâÈë¿â/Kf_EntrustInBill_Fast.html
@@ -323,14 +323,6 @@
            $("#HMakerID").hide();
            $("#HBillerID").val(sessionStorage["HBillerID"]);
            $("#HBillerID").hide();
            $("#HGroupID").val(sessionStorage["HGroupID"])
            $("#HGroupName").val(sessionStorage["HGroup"] == 'undefined' ? '' : sessionStorage["HGroup"] );
            $("#HEmpID1").val(sessionStorage["HBillerID"])
            $("#HEmpName1").val(sessionStorage["HUserName"])
            $("#HJiaYe").val($("#HEmpID1").val() + ',' + $("#HEmpID2").val());
            //sessionStorage["HGroupID"]
            //默认带入的仓库,如果启用仓位则仓位有效,如果没有启用则仓位灰度 new
            //获取参数
@@ -347,7 +339,9 @@
            var params = getUrlVars();
            var linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            //根据登陆人员带出班组和职员
            getGroupEmp(sessionStorage["HUserName"]);
            //加载表头
            function  RoadBillMain(linterid)
            {
@@ -370,7 +364,6 @@
                    }
                })
            }
            //加载表体
            function RoadBillSub(linterid)
            {
@@ -397,15 +390,6 @@
                    }
                });
            }
            //动态加载源单类型列表 new
            //判断是否新增
            if (linterid == null || linterid == 0) {
                //获取最大单据号 new
@@ -990,6 +974,24 @@
        //以上为layui模块
        });
        function getGroupEmp(HUserName) {
            $.ajax({
                url: GetWEBURL() + "/Web/getGroupEmp",
                type: "GET",
                data: { "HUserName": HUserName },
                success: function (result) {
                    if (result.data.length > 0) {
                        $("#HGroupID").val(result.data[0].HGroupID);
                        $("#HGroupName").val(result.data[0].HGroupName);
                        $("#HEmpID1").val(result.data[0].HEmpID1);
                        $("#HEmpName1").val(result.data[0].HEmpName1);
                        $("#HEmpID2").val(result.data[0].HEmpID2);
                        $("#HEmpName2").val(result.data[0].HEmpName2);
                        $("#HJiaYe").val(result.data[0].HJiaYe);
                    }
                }
            })
        }
        //清空表头
        //function f_ClearTitle() {
@@ -1098,6 +1100,14 @@
            //    layer.msg("仓库没有选择!", { icon: 5 });
            //    return false;
            //}
            if ($("#HGroupName").val() == '') {
                layer.msg("请选择班组!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HEmpName1").val() == '' || $("#HEmpName2").val() == '') {
                layer.msg("请选择职员!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HBillNo").val() == '') {
                layer.msg("错误的单据号!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;