yangle
2024-04-26 a005e2e61fe87c43436febfd6103bba21b232a7e
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBackBill.html
@@ -13,7 +13,7 @@
<body>
    <div class="layui-fluid" style="padding:0">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 5px; height:800px;">
            <div class="layui-card-body" style="padding: 0px; height:800px;">
                <form class="layui-form" action="" lay-filter="component-form-group">
                    <div style="background-color:#0085E8;">
                        <span style="color: white;"><i class="layui-icon layui-icon-form"></i>外购入库单(红字)</span>
@@ -201,7 +201,7 @@
                                            <label class="layui-form-label" style="width:40px;padding-left:0px;">数量</label>
                                        </div>
                                        <div class="layui-col-xs8">
                                            <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
                                            <input type="text" name="HQty" id="HQty" lay-verify="HQty" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
                                        </div>
                                    </div>
                                </div>
@@ -376,7 +376,7 @@
        {
            table.render({
                elem: '#wl-table'
                    , url: GetWEBURL1() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                    , url: GetWEBURL() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                    , toolbar: '#toolbarDemo'
                    , where: { HBillID: linterid, HBillType: '1239', sWhere: '' }
                    , cols: [[
@@ -413,7 +413,7 @@
            $("#HBillNo").val(""); 
            $.ajax({
                url: GetWEBURL() + "/Web/GetMAXNum",
                url: GetWEBURL() + "/Web/GetMAXNumPDA",
                type: "GET",
                data: { "HBillType": '1239' },
                success: function (d) {
@@ -488,37 +488,86 @@
                }
            })
        });
        //form.on('submit(HKeeperID-BT)', function () {//选择保管
        //    layer.open({
        //        type: 2
        //        , area: ['100%', '100%']
        //        , title: '保管列表'
        //        , shade: 0.6 //遮罩透明度
        //        , maxmin: true //允许全屏最小化
        //        , anim: 0 //0-6的动画形式,-1不开启
        //        , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
        //        , resize: false
        //        , cancel: function () {
        //            //$(".layui-btn").removeClass("layui-btn-disabled");
        //        }
        //    })
        //});
        //form.on('submit(HSecManagerID-BT)', function (data) {//选择验收
        //    var sMainStr = JSON.stringify(data.field);
        //    layer.open({
        //        type: 2
        //        , area: ['100%', '100%']
        //        , title: '验收列表'
        //        , shade: 0.6 //遮罩透明度
        //        , maxmin: true //允许全屏最小化
        //        , anim: 0 //0-6的动画形式,-1不开启
        //        , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
        //        , resize: false
        //        , cancel: function () {
        //            //$(".layui-btn").removeClass("layui-btn-disabled");
        //        }
        //    })
        //});
        form.on('submit(HKeeperID-BT)', function () {//选择保管
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '保管列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '职员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../PublicPage/UserInformation.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    $("#HKeeper").val(checkStatus.data[0].HName);
                    $("#HKeeperID").val(checkStatus.data[0].HItemID);
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        });
        form.on('submit(HSecManagerID-BT)', function (data) {//选择验收
            var sMainStr = JSON.stringify(data.field);
        form.on('submit(HSecManagerID-BT)', function (data) {//选择发货
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '验收列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '职员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../PublicPage/UserInformation.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    $("#HSecManager").val(checkStatus.data[0].HName);
                    $("#HSecManagerID").val(checkStatus.data[0].HItemID);
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        });
        form.on('submit(HDeptID-BT)', function () {//选择部门
            layer.open({
                type: 2
@@ -540,8 +589,11 @@
        form.on('submit(Cancel)', function () {
            sessionStorage["SourceFlag"] = false;
            parent.location.href = "../../../views/index.html"
            //parent.location.href = "../../../views/index.html"
            //window.close();//关闭当前页
            layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                parent.location.href = "../../../views/index_Mobile.html";
            });
        })
        form.on('submit(cmdModify)', function () {//编辑
@@ -587,7 +639,7 @@
                           //layer.msg(data.Message, { icon: 1 });
                           table.render({
                               elem: '#wl-table'
                               , url: GetWEBURL1() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                               , url: GetWEBURL() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                               , cellMinWidth: 80
                               , toolbar: '#toolbarDemo'
                               , where: { HBillID: sInterID, HBillType: '1239', sWhere: '' }
@@ -642,7 +694,7 @@
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            sessionStorage["SourceFlag"] = false;
                            layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
                            layer.msg(data.Message, { icon: 1 });
                        }
                        else {
                            layer.msg(data.Message, { icon: 5 });
@@ -722,7 +774,7 @@
                                $.ajax({
                                    url: GetWEBURL() + "/POStockInBackBill/get_CheckTypeByBarCode_All_Json",
                                    type: "GET",
                                    data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": true, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0, "sExpressNumber": sExpressNumber },
                                    data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": true, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"], "sExpressNumber": sExpressNumber },
                                    success: function (result) {
                                        if (result.count == 1) {
                                            if (result.data.HBarType == '仓库条码') {
@@ -807,13 +859,14 @@
                                            layer.load(3)
                                            table.render({
                                                    elem: '#wl-table' 
                                                  , url: GetWEBURL1() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                                                  , toolbar: '#toolbarDemo'
                                                  , url: GetWEBURL() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                                                , toolbar: '#toolbarDemo'
                                                , totalRow: true
                                                  , where: { HBillID: sInterID, HBillType: '1239', sWhere: '' }
                                                  , cols: [[
                                                      { type: 'radio' }
                                                     , { field: 'HQty', title: '数量', width: 150 }
                                                    , { field: 'HQtyMust', title: '应收数量', width: 150 }
                                                      , { field: 'HQty', title: '数量', width: 150, totalRow: true }
                                                      , { field: 'HQtyMust', title: '应收数量', width: 150, totalRow: true }
                                                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                                                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                                                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
@@ -871,14 +924,15 @@
                            element.tabChange('tab-POStockInBackBill', '2');
                            table.render({
                                elem: '#wl-table'
                                , totalRow: true
                                //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBackBill/DisBillEntryList_Webs_Json'
                               , url: GetWEBURL1() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                               , url: GetWEBURL() + '/POStockInBackBill/DisBillEntryList_Webs_Json'
                                //, toolbar: '#toolbarDemo'
                              , where: { HBillID: sInterID, HBillType: '1239', sWhere: '' }
                              , cols: [[
                                  { type: 'radio' }
                                , { field: 'HQty', title: '数量', width: 80 }
                                , { field: 'HQtyMust', title: '应收数量', width: 80 }
                                  , { field: 'HQty', title: '数量', width: 80, totalRow: true}
                                  , { field: 'HQtyMust', title: '应收数量', width: 80, totalRow: true }
                                , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                                , { field: 'HMaterName', title: '物料名称', width: 100 }
                                , { field: 'HMaterModel', title: '规格型号', width: 100 }
@@ -886,6 +940,7 @@
                                , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                                , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                , { field: 'HBatchNo', title: '批次', width: 100 }
                                , { field: 'HPieceQty', title: '条码数量', width: 150 }
                              ]]
                                // , data: [linterid]
                                // , page: true
@@ -950,10 +1005,12 @@
        //sessionStorage["HWHID"] = obj[0].HItemID;
        $("#HWHID").val(obj[0].HItemID);
    }
    function GetHSpValue(obj) {  //返回调入仓位
        $("#HStockPlaceName").val(obj[0].HName);
        $("#HStockPlaceID").val(obj[0].HItemID);
    }
        function GetHSpValue(obj) {  //返回调入仓位
            $("#HStockPlaceName").val(obj[0].HName);
            $("#HStockPlaceID").val(obj[0].HItemID);
            $("#HWHNAME").val(obj[0].HWhName);
            $("#HWHID").val(obj[0].HWHID);
        }
    function GetHSupValue(obj) {  //返回供应商
        $("#HSupName").val(obj[0].HName);
        $("#HSupID").val(obj[0].HItemID);
@@ -989,7 +1046,21 @@
    //        }
    //    })
    //}
    function AllowLoadData(sSubStr,bnt) {  //非空验证
        function AllowLoadData(sSubStr, bnt) {  //非空验证
            //数字正则(包含小数)
            var reg = /^\d+(\.\d+)?$/;
            //if (reg.test($("#HQty").val()) == false || $("#HQty").val() == '') {
            //    layer.msg("数量必须为数量或小数", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            //if (reg.test($("#HBarcodeQtys").val()) == false || $("#HBarcodeQtys").val() == '') {
            //    layer.msg("条码数量必须为数量或小数", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            //if (reg.test($("#HSumQtys").val()) == false || $("#HSumQtys").val() == '') {
            //    layer.msg("总数量必须为数量或小数", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
        //if ($("#HSourceBillNo").val() == '') {
        //    layer.msg("请先扫源单!", { icon: 5 });
        //    return false;