wtt
2025-02-07 b9188d860a4f7cee18ecf7c7a3562f7b912e01fe
WebTM/views/WMSɨÂëÄ£¿é/²É¹ºÈë¿â/Kf_POStockInBill_PDA.html
@@ -31,21 +31,49 @@
                    </div>
                    <div class="layui-form-item" style="padding:15px;margin:0px">
                        <div class="layui-row">
                            <div class="layui-col-xs3">
                                <label class="layui-form-label" style="width: 30px;padding-left: 0px;">条码</label>
                            </div>
                            <div class="layui-col-xs7">
                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                            </div>
                            <div class="layui-col-xs2">
                                <button type="button" lay-submit="" lay-filter="HBarCode-BT" class="layui-btn layui_btn_sm" id="HBarCode-BT">确定</button>
                            </div>
                            <div class="layui-row">
                            <div class="layui-col-xs6">
                                <div class="layui-col-xs3">
                                    <label class="layui-form-label" style="width:30px;padding-left:0px;">数量</label>
                                    <label class="layui-form-label" style="width: 30px;padding-left: 0px;">条码</label>
                                </div>
                                <div class="layui-col-xs7">
                                <div class="layui-col-xs9">
                                    <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <div class="layui-col-xs3">
                                    <label class="layui-form-label" style="width: 30px; margin-left: 8px; padding-left: 0px;">数量</label>
                                </div>
                                <div class="layui-col-xs5">
                                    <input type="number" 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 class="layui-col-xs4">
                                    <button type="button" lay-submit="" lay-filter="HBarCode-BT" class="layui-btn" id="HBarCode-BT" style="width: 45px; margin-left: 8px;padding-left:12px">OK</button>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row" style="margin-top: 5px; margin-bottom: 0px;">
                            <div class="layui-col-xs6">
                                <div class="layui-col-xs3">
                                    <label class="layui-form-label" style="width:30px;padding-left:0px;">仓库</label>
                                </div>
                                <div class="layui-col-xs6">
                                    <input type="text" name="HWHName" id="HWHName" lay-verify="HWHName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                    <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-col-xs3">
                                    <button type="button" lay-submit="" lay-filter="HWHID-BT" class="layui-btn" id="HWHID-BT" style="width: 30px; margin-left: 8px;padding-left:8px">...</button>
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <div class="layui-col-xs3">
                                    <label class="layui-form-label" style="width:30px;padding-left:0px;">仓位</label>
                                </div>
                                <div class="layui-col-xs6">
                                    <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                    <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-col-xs3">
                                    <button type="button" lay-submit="" lay-filter="HSpID-BT" class="layui-btn" id="HSpID-BT" style="width: 30px; margin-left: 8px;padding-left:8px">...</button>
                                </div>
                            </div>
                        </div>
@@ -76,11 +104,18 @@
                                            <div class="layui-col-xs3">
                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">源单单号</label>
                                            </div>
                                            <div class="layui-col-xs7">
                                                <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                            </div>
                                            <div class="layui-col-xs2">
                                                <button type="button" lay-submit="" lay-filter="HSourceBillNo-BT" class="layui-btn" id="HSourceBillNo-BT">确定</button>
                                            <div class="layui-col-xs9">
                                                <div class="layui-col-xs8">
                                                    <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <button type="button" lay-submit="" lay-filter="cmdHSourceBillNo" class="layui-btn" id="cmdHSourceBillNo" style="width: 45px; margin-left: 10px; padding-left: 12px">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-2px;"></i>
                                                    </button>
                                                </div>
                                                <div class="layui-col-xs2" style="float: right;">
                                                    <button type="button" lay-submit="" lay-filter="HSourceBillNo-BT" class="layui-btn" id="HSourceBillNo-BT" style="width: 45px; margin-left: -5px;padding-left:12px">OK</button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
@@ -119,38 +154,6 @@
                                </div>
                                <!--表头信息-->
                                <div class="layui-tab-item">
                                    <div class="layui-form-item" style="padding:0px;margin:0px">
                                        <div class="layui-row">
                                            <div class="layui-col-xs2">
                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">仓库</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <div class="layui-col-xs10">
                                                    <input type="text" name="HWHName" id="HWHName" lay-verify="HWHName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                                    <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <button type="button" lay-submit="" lay-filter="HWHID-BT" class="layui-btn" id="HWHID-BT">...</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item" style="padding:0px;margin:0px">
                                        <div class="layui-row">
                                            <div class="layui-col-xs2">
                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">仓位</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <div class="layui-col-xs10">
                                                    <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                                    <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <button type="button" lay-submit="" lay-filter="HSpID-BT" class="layui-btn" id="HSpID-BT">...</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item" style="padding:0px;margin:0px">
                                        <div class="layui-row">
                                            <div class="layui-col-xs2">
@@ -344,6 +347,7 @@
                    <input type="hidden" name="HBillType" id="HBillType">
                    <input type="hidden" name="HBillerID" id="HBillerID">
                    <input type="hidden" name="HRedBlueFlag" id="HRedBlueFlag">
                    <input type="hidden" name="HSourceBillListCtl" id="HSourceBillListCtl">
                    <!--失败提示音-->
                    <div id="" style="display:none;">
                        <audio id="cs" hidden controls>
@@ -419,7 +423,7 @@
                        }
                        else {
                            layer.msg(d.Message, {
                                icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            }, function () { parent.location.href = "../../../views/index_Mobile.html"; });
                        }
                    },
@@ -473,7 +477,7 @@
                $("#HStockOrgName").val(sessionStorage["Organization"]);
                $("#HBillType").val("1201");
                $("#HRedBlueFlag").val("false");
                if (sessionStorage["HWhSPFlag"]) {
                if (sessionStorage["HWHID"] != 0 && sessionStorage["HWhSPFlag"]) {
                    $("#HStockPlaceID").val("0");
                    $("#HStockPlaceName").val("");
                    $("#HStockPlaceName").attr("disabled", "disabled");
@@ -487,7 +491,7 @@
                }
                //默认显示页面
                element.tabChange('tab-Kf_POStockInBill_PDA', '2');
                element.tabChange('tab-Kf_POStockInBill_PDA', '1');
                set_InitDate();         //初始化表单时间
                set_InitGrid();         //初始化表格
@@ -526,7 +530,7 @@
                    , totalRow: true
                    , height: 'full-60'
                    , cellMinWidth: 90
                    , limit: 50
                    , limit: 200
                };
            }
@@ -540,6 +544,32 @@
            })
            //#endregion
            //#region  ç›‘听网格表体事件
            table.on('tool(wl-table)', function (obj) {
                var data = obj.data;
                //物料代码超链接
                if (obj.event == '物料代码') {                      //检查 obj.event æ˜¯å¦ç­‰äºŽå­—符串 '物料代码'。如果等于,则执行if循环
                    var HMaterNumber = data.物料代码.toString();    //声明变量HMaterNumber ä¸º data.物料代码
                    layer.open({                                    //使用 layer的open打开弹出 å±‚
                        type: 2                                     //表示弹出层的内容是一个 iframe
                        , area: ['100%', '100%']
                        , title: '及时库存信息'                     //设置弹出层的名字和变量
                        , closeBtn: 1                               //显示关闭按钮
                        , shade: 0.6                                //遮罩透明度
                        , maxmin: false                              //允许全屏最小化
                        , anim: 0                                   //0-6的动画形式,-1不开启
                        , content: '../../WMS扫码模块/库存查询/KF_ICInventoryByCLD_PDA.html?OperationType=2&HMaterNumber=' + HMaterNumber  //设置 iframe çš„ URL,URL ä¸­åŒ…含了查询参数,来调用所需要的值
                        , resize: false,                            //是否允许用户调整弹出大小
                        end: function () {  //当关闭时调用
                        }
                        , cancel: function () {  //点击取消时使用回调
                        }
                    })
                }
            });
             //#endregion
            //判断是否新增,获取最大单据号
            if (HInterID != 0) {
                HSourceFlag = true;
@@ -552,7 +582,7 @@
                //显示表体明细
                DisBillEntryList();
                HSourceFlag = true;
                element.tabChange('tab-Kf_POStockInBill_PDA', '2');
                element.tabChange('tab-Kf_POStockInBill_PDA', '3');
            }
            else {
                //获取最大单据ID、单据号
@@ -569,7 +599,7 @@
                            HBillNo = $('#HBillNo').val()
                        }
                        else {
                            layer.msg(d.Message, { icon: 0, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            layer.msg(d.Message, { icon: 0, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
@@ -657,7 +687,7 @@
                        $("#HStockPlaceName").removeAttr("disabled");
                        $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                        layer.msg("仓库条码为空!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HWHName").select();
                            $("#HWHName").focus();
@@ -685,7 +715,6 @@
                                    $("#HStockPlaceName").removeAttr("disabled");
                                    $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                                }
                                element.tabChange('tab-Kf_POStockInBill_PDA', '2');
                                //光标显示到条码上
                                $("#HBarCode").select();
                                $("#HBarCode").focus();
@@ -699,7 +728,7 @@
                                $("#HStockPlaceName").removeAttr("disabled");
                                $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                                layer.msg(result.Message, {
                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HWHName").select();
                                    $("#HWHName").focus();
@@ -748,7 +777,7 @@
                        $("#HStockPlaceID").val("0");
                        $("#HStockPlaceName").val("");
                        layer.msg("仓位条码为空!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HStockPlaceName").select();
                            $("#HStockPlaceName").focus();
@@ -768,7 +797,6 @@
                                $("#HStockPlaceID").val(result.data[0].HItemID);
                                $("#HWHName").val(result.data[0].HWhName);
                                $("#HWHID").val(result.data[0].HWHID);
                                element.tabChange('tab-Kf_POStockInBill_PDA', '2');
                                //光标显示到条码上
                                $("#HBarCode").select();
                                $("#HBarCode").focus();
@@ -780,7 +808,7 @@
                                $("#HStockPlaceID").val("0");
                                $("#HStockPlaceName").val("");
                                layer.msg(result.Message, {
                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HStockPlaceName").select();
                                    $("#HStockPlaceName").focus();
@@ -826,7 +854,7 @@
                        $("#HKeeperID").val("0");
                        $("#HKeeperName").val("");
                        layer.msg("保管员条码为空!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HKeeperName").select();
                            $("#HKeeperName").focus();
@@ -854,7 +882,7 @@
                                $("#HKeeperID").val("0");
                                $("#HKeeperName").val("");
                                layer.msg(result.Message, {
                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HKeeperName").select();
                                    $("#HKeeperName").focus();
@@ -896,7 +924,7 @@
                        $("#HSecManagerID").val("0");
                        $("#HSecManagerName").val("");
                        layer.msg("验收员条码为空!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HSecManagerName").select();
                            $("#HSecManagerName").focus();
@@ -924,7 +952,7 @@
                                $("#HSecManagerID").val("0");
                                $("#HSecManagerName").val("");
                                layer.msg(result.Message, {
                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HSecManagerName").select();
                                    $("#HSecManagerName").focus();
@@ -966,7 +994,7 @@
                        $("#HDeptID").val("0");
                        $("#HDeptName").val("");
                        layer.msg("部门条码为空!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HDeptName").select();
                            $("#HDeptName").focus();
@@ -994,7 +1022,7 @@
                                $("#HDeptID").val("0");
                                $("#HDeptName").val("");
                                layer.msg(result.Message, {
                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HDeptName").select();
                                    $("#HDeptName").focus();
@@ -1036,7 +1064,7 @@
                        $("#HSupID").val("0");
                        $("#HSupName").val("");
                        layer.msg("供应商条码为空!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HSupName").select();
                            $("#HSupName").focus();
@@ -1064,7 +1092,7 @@
                                $("#HSupID").val("0");
                                $("#HSupName").val("");
                                layer.msg(result.Message, {
                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HSupName").select();
                                    $("#HSupName").focus();
@@ -1159,12 +1187,12 @@
                                        });//新增
                                }
                                else {
                                    layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                    layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                                }
                            },
                            complete: function (XHR, TS) { XHR = null },//回收资源
                            error: function (err) {
                                layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                        });
                    layer.closeAll("loading");
@@ -1236,12 +1264,12 @@
                                    }
                                    else {
                                        playSound();
                                        layer.msg(data.Message, { icon: 2, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                        layer.msg(data.Message, { icon: 2, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                                    }
                                },
                                complete: function (XHR, TS) { XHR = null },//回收资源
                                error: function (err) {
                                    layer.msg('错误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                    layer.msg('错误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                                }
                            });
                        layer.closeAll("loading");
@@ -1270,6 +1298,42 @@
            })
            //#endregion
            //#endregion
            //#region æºå•选择
            form.on('submit(cmdHSourceBillNo)', function () {
                var HSourceTitle = "";
                var HSourceBillType = $("#HMainSourceBillType").val()
                if (HSourceBillType == '1103') {
                    HSourceTitle = "收料通知单";
                }
                else if (HSourceBillType == '1102') {
                    HSourceTitle = "采购订单";
                }
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: HSourceTitle + '列表'//标题
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/公共页面/Kf_SourceBillEditDlg_PDA.html?HBillType =' + HBillType + '&HSourceBillType =' + HSourceBillType + '&HStockOrgID =' + HStockOrgID, 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                    , end: function () {
                        if ($("#HSourceBillListCtl").val() == '1') {
                            GetMeesageBySourceBillNo();
                            $("#HSourceBillListCtl").val("0");  //用于区分源单列表界面关闭状态(1为返回,0为退出)
                        }
                    }
                })
            });
            //#endregion
@@ -1319,7 +1383,7 @@
                            //供应商不可编辑
                            $("#HSupName").attr("disabled", "disabled");
                            $('#HSupID-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                            element.tabChange('tab-Kf_POStockInBill_PDA', '2');
                            element.tabChange('tab-Kf_POStockInBill_PDA', '3');
                            $("#HBarCode").select();
                            $("#HBarCode").focus();
                            //显示表体明细
@@ -1328,7 +1392,7 @@
                        else {
                            playSound();
                            layer.msg(result.Message, {
                                icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            }, function () {
                                element.tabChange('tab-Kf_POStockInBill_PDA', '1');
                                $("#HSourceBillNo").select();
@@ -1384,7 +1448,7 @@
                    if (sBarCode == "") {
                        playSound();
                        layer.msg("请扫描要删除的条码", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HBarCode").select();
                            $("#HBarCode").focus();
@@ -1413,7 +1477,7 @@
                                else {
                                    playSound();
                                    layer.msg(data.Message, {
                                        icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                        icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    }, function () {
                                        $("#HBarCode").select();
                                        $("#HBarCode").focus();
@@ -1424,7 +1488,7 @@
                            error: function (err) {
                                playSound();
                                layer.msg('错误' + err, {
                                    icon: 2, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 2, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HBarCode").select();
                                    $("#HBarCode").focus();
@@ -1438,7 +1502,7 @@
                    if (sBarCode == '') {
                        playSound();
                        layer.msg("条码为空,请扫描条码!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HBarCode").select();
                            $("#HBarCode").focus();
@@ -1473,7 +1537,6 @@
                                        $("#HStockPlaceName").removeAttr("disabled");
                                        $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                                    }
                                    element.tabChange('tab-Kf_POStockInBill_PDA', '2');  //跳转页签
                                    return;//结束
                                }
                                else if (result.data.hBarTypeField == '仓位条码') {
@@ -1481,7 +1544,6 @@
                                    $("#HStockPlaceID").val(result.data.hSPIDField);
                                    $("#HWHName").val(result.data.hWhNameField);
                                    $("#HWHID").val(result.data.hWhIDField);
                                    element.tabChange('tab-Kf_POStockInBill_PDA', '2');//跳转页签
                                    return;//结束
                                }
                                else if (result.data.hBarTypeField == '部门条码') {
@@ -1590,7 +1652,7 @@
                            else {
                                playSound();
                                layer.msg(result.Message, {
                                    icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                    icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HBarCode").select();
                                    $("#HBarCode").focus();
@@ -1601,7 +1663,7 @@
                        error: function (err) {
                            playSound();
                            layer.msg("错误!" + err, {
                                icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            }, function () {
                                $("#HBarCode").select();
                                $("#HBarCode").focus();
@@ -1643,19 +1705,26 @@
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                } else if (data[i].name == '物料代码') {
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'left', sort: true, width: 120, event: '物料代码', event: '物料代码', templet: function (d) {
                                            return '<span style="color: blue;">' + d.物料代码 + '</span>'
                                        }, style: 'cursor: pointer;'
                                    });
                                } else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
                                            break;
                                        default:
                                        if (data[i].name == '数量' || data[i].name == '源单数量' || data[i].name == '条码个数') {
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', totalRow: true });
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', totalRow: true });
                                        } else if (data[i].name == '物料名称' || data[i].name == '规格型号') {
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 180 });
                                        } else {
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center' });
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 150 });
                                        }
                                    }
                                }
@@ -1784,19 +1853,26 @@
                $("#HSupID").val(obj[0].HItemID);
            }
        }
        //点击按钮选择后   è¿”回源单单号
        function GetHSourceBillValue(obj) {
            if (obj.length > 0) {
                $("#HSourceBillNo").val(obj[0].单据号);
                $("#HSourceBillListCtl").val("1");
            }
        }
        //单据上传前判断
        function AllowLoadData(sSubStr) {
            if (HInterID == 0) {
                layer.msg("单据内码获取失败,错误的单据内码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                layer.msg("单据内码获取失败,错误的单据内码!", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if (HBillNo == '') {
                layer.msg("单据号获取失败,错误的单据号!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                layer.msg("单据号获取失败,错误的单据号!", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if (sSubStr.length == 0) {
                layer.msg("没有扫码信息,请先扫描条码,确认无误后再提交!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                layer.msg("没有扫码信息,请先扫描条码,确认无误后再提交!", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            //判断是否已扫描物料条码
@@ -1808,7 +1884,7 @@
                    }
                }
                if (s == 0) {
                    layer.msg("没有扫描物料条码,请先扫描物料条码,确认无误后再提交!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    layer.msg("没有扫描物料条码,请先扫描物料条码,确认无误后再提交!", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
            }