WebTM/views/¹¤Ðò»ã±¨/MES_StationInBill_PDA.html
@@ -57,115 +57,121 @@
                                <tr>
                                    <th>条形码</th>
                                    <td class="t1_input">
                                        <input type="text" name="条形码" class="layui-input" id="HFbarcode" placeholder="请输入条形码" style="background-color:#efefef4d;border-radius: 50px;" readonly>
                                        <input type="text" name="HBarCode" class="layui-input" id="HBarCode" placeholder="请输入条形码" style="border-radius: 50px;">
                                    </td>
                                </tr>
                                <tr>
                                    <th>流转卡号</th>
                                    <td class="t1_input">
                                        <input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="流转卡号" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HProcExchBillNo" class="layui-input" id="HProcExchBillNo" placeholder="流转卡号" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>流水号</th>
                                    <td class="t1_input">
                                        <input type="text" name="流水号" class="layui-input" id="Serial_number" placeholder="请输入流水号" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HProcNo" class="layui-input" id="HProcNo" placeholder="请输入流水号" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>工序代码</th>
                                    <td class="t1_input">
                                        <input type="text" name="工序代码" class="layui-input" id="工序代码" placeholder="请输入工序代码" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HProcName" class="layui-input" id="HProcName" placeholder="请输入工序代码" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="HProcID" id="HProcID" value="0" autocomplete="off" class="layui-input">
                                    </td>
                                </tr>
                                <tr>
                                    <th>工序名称</th>
                                    <td class="t1_input">
                                        <input type="text" name="工序名称" class="layui-input" id="工序名称" placeholder="请输入工序名称" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HProc" class="layui-input" id="HProc" placeholder="请输入工序名称" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>创建人</th>
                                    <td class="t1_input">
                                        <input type="text" name="创建人" class="layui-input" id="创建人" placeholder="请输入创建人" style="background-color:#efefef4d;" readonly>
                                        <input type="text" class="layui-input" id="HEmp" placeholder="请输入创建人" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="HEmpID" id="HEmpID" value="0" autocomplete="off" class="layui-input">
                                    </td>
                                </tr>
                                <tr>
                                    <th>进站数量</th>
                                    <td class="t1_input">
                                        <input type="text" name="进站数量" class="layui-input" id="进站数量" placeholder="请输入进站数量" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HQty" class="layui-input" id="HQty" placeholder="请输入进站数量">
                                    </td>
                                </tr>
                                <tr>
                                <tr style="display:none;">
                                    <th>生产资源</th>
                                    <td class="bz_td">
                                        <input type="text" name="生产班组" class="layui-input" id="ProductionResources" placeholder="选择生产资源" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="生产资源代码" id="ProductionResourcesID" value="0" autocomplete="off" class="layui-input">
                                        <input type="text" name="HSource" class="layui-input" id="HSource" placeholder="选择生产资源" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="HSourceID" id="HSourceID" value="0" autocomplete="off" class="layui-input">
                                        <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionResources-BT">...</button>
                                    </td>
                                </tr>
                                <tr>
                                    <th>生产班组</th>
                                    <td class="bz_td">
                                        <input type="text" name="生产班组" class="layui-input" id="ProductionTeam" placeholder="选择生产班组" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="生产班组代码" id="ProductionTeamID" value="0" autocomplete="off" class="layui-input">
                                        <input type="text" name="HGroup" class="layui-input" id="HGroup" placeholder="选择生产班组" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="HGroupID" id="HGroupID" value="0" autocomplete="off" class="layui-input">
                                        <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionTeam-BT">...</button>
                                    </td>
                                </tr>
                                <tr>
                                    <th>工作中心</th>
                                    <td class="bz_td">
                                        <input type="text" name="工作中心" class="layui-input" id="HProcName" placeholder="选择工作中心" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="工作中心代码" id="HProcID" value="0" autocomplete="off" class="layui-input">
                                        <input type="text" name="HCenter" class="layui-input" id="HCenter" placeholder="选择工作中心" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="HCenterID" id="HCenterID" value="0" autocomplete="off" class="layui-input">
                                        <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="HWorkingProcedure-BT">...</button>
                                    </td>
                                </tr>
                                <tr>
                                    <th>进站单号</th>
                                    <td class="t1_input">
                                        <input type="text" name="进站单号" class="layui-input" id="进站单号" placeholder="请输入进站单号" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="请输入进站单号" style="background-color:#efefef4d;" readonly>
                                        <input type="hidden" name="HInterID" class="layui-input" id="HInterID">
                                    </td>
                                </tr>
                                <tr>
                                    <th>日期</th>
                                    <td class="t1_input">
                                        <input type="date" name="日期" class="layui-input HDateNow" id="HDateNow" placeholder="请选择日期">
                                        <input type="date" name="HStationInTime" class="layui-input" id="HStationInTime" placeholder="请选择日期">
                                    </td>
                                </tr>
                                <tr>
                                    <th>生产订单</th>
                                    <td class="t1_input">
                                        <input type="text" name="生产订单" class="layui-input" id="生产订单" placeholder="请输入生产订单" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HICMOBillNo" class="layui-input" id="HICMOBillNo" placeholder="请输入生产订单" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>产品代码</th>
                                    <td class="t1_input">
                                        <input type="text" name="产品代码" class="layui-input" id="产品代码" placeholder="请输入产品代码" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HMaterID" class="layui-input" id="HMaterID" placeholder="请输入产品代码" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>产品名称</th>
                                    <td class="t1_input">
                                        <input type="text" name="产品名称" class="layui-input" id="产品名称" placeholder="请输入产品名称" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HMaterName" class="layui-input" id="HMaterName" placeholder="请输入产品名称" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>规格型号</th>
                                    <td class="t1_input">
                                        <input type="text" name="规格型号" class="layui-input" id="规格型号" placeholder="请输入规格型号" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HMaterModel" class="layui-input" id="HMaterModel" placeholder="请输入规格型号" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>订单跟踪号</th>
                                    <td class="t1_input">
                                        <input type="text" name="订单跟踪号" class="layui-input" id="订单跟踪号" placeholder="请输入订单跟踪号" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HOrderProcNO" class="layui-input" id="HOrderProcNO" placeholder="请输入订单跟踪号" style="background-color:#efefef4d;" readonly>
                                    </td>
                                </tr>
                                <tr>
                                    <th>生产订单数量</th>
                                    <td class="t1_input">
                                        <input type="text" name="生产订单数量" class="layui-input" id="生产订单数量" placeholder="请输入生产订单数量" style="background-color:#efefef4d;" readonly>
                                        <input type="text" name="HICMOQty" class="layui-input" id="HICMOQty" placeholder="请输入生产订单数量" style="background-color:#efefef4d;" readonly>
                                        <!--隐藏字段-->
                                        <input type="hidden" name="HICMOInterID" class="layui-input" id="HICMOInterID"><!--任务单号ID取hicmointerid-->
                                        <input type="hidden" name="HDeptID" class="layui-input" id="HDeptID"><!--生产车间id-->
                                    </td>
                                </tr>
                            </tbody>
@@ -208,148 +214,124 @@
                , form = layui.form;
            //获取当前时间处理
            var data = new Date();
            var year = data.getFullYear();  //获取年
            var month = data.getMonth() + 1;    //获取月
            var day = data.getDate(); //获取日
            var time = year + "/" + month + "/" + day;
            var date = new Date();
            //$("#HDateNow").val(time);//加载当前时间
            //alert($("#HDateNow").val());
            $("#HDateNow").val(Format(new Date(), "yyyy-MM-dd"));
            $("#HStationInTime").val(Format(new Date(), "yyyy-MM-dd"));
            $("#HEmp").val(sessionStorage["HUserName"]);//创建人
            $("#HEmpID").val(sessionStorage["HEmpID"]);
            $("#HProc").val(sessionStorage["HProc"]);//工序
            $("#HProcName").val(sessionStorage["HProcName"]);//工序代码
            $("#HProcID").val(sessionStorage["HProcID"]);//工序ID
            $("#HSource").val(sessionStorage["HSource"]);//生产资源
            $("#HSourceID").val(sessionStorage["HSourceID"]);
            $("#HGroup").val(sessionStorage["HGroup"]);//生产班组
            $("#HGroupID").val(sessionStorage["HGroupID"]);
            $("#HCenter").val(sessionStorage["HWorkCenter"]);//工作中心
            $("#HCenterID").val(sessionStorage["HWorkCenterID"]);
            $("#HProcNo").val(sessionStorage["HProcNo"]);//流水号
            //laydate.render({
            //    elem: '#HDateNow' //指定元素
            //    , value: new Date()
            //    ,trigger: 'click',
            //});
            //页面初始化赋值
            //获取单据号
            $.ajax({
                url: GetWEBURL() + "/Web/GetMAXNum",
                url: GetWEBURL() + "/api/newBill/getNewInterBillNo",
                type: "GET",
                data: { "HBillType": '3790' },
                data: { "billType": '3790' },
                success: function (d) {
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo2").val(d.data[0].HBillNo);
                    $("#HBillNo").val(d.data.HBillNo);//进站单号
                    $("#HInterID").val(d.data.HInterID);//进站单号ID
                }, error: function () {
                    layer.alert("获取单据号失败!", { icon: 5 });
                }
            });
            $("#HFbarcode").focus();
            $("#HFbarcode").css("box-shadow", "0 0 0 1px #00ff00");
            $("#Serial_number").attr("readonly", "readonly");//流水号只读
            $("#Serial_number").css("background-color", "#efefef4d");
            $("#Entrants_number").attr("readonly", "readonly");//进站数量只读
            $("#Entrants_number").css("background-color", "#efefef4d");
            $("#HBarCode").focus();
            $("#HBarCode").css("box-shadow", "0 0 0 1px #00ff00");
            //扫条形码方法
            $('#HFbarcode').on('keydown', function (event) {   //扫条形码
                var HFbarcode = $('#HFbarcode').val();
            $('#HBarCode').on('keydown', function (event) {   //扫条形码
                var HBarCode = $('#HBarCode').val();//条形码(流转卡号)(数据库中为单据号)
                if (event.keyCode == 13) {
                    //判断文本框是否有数据    new
                    if (HFbarcode == "") {
                    if (HBarCode == "") {
                        layer.alert("条形码为空!", { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        return;
                    }
                    //
                    $.ajax({
                        url: GetWEBURL() + "TEST",
                        url: GetWEBURL() + "api/newBill/getHbarCodeDetail",
                        type: "GET",
                        data: {
                            "sBillBarCode": HFbarcode
                            "sBillBarCode": HBarCode
                        },
                        success: function (result) {
                            //var data = result.data;
                            //if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //    form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                            //        "订单跟踪号": data[0].订单跟踪号
                            //        , "产品代码": data[0].产品代码
                            //        , "产品名称": data[0].产品
                            //        , "规格型号": data[0].规格型号
                            //        , "流转卡数量": data[0].流转卡数量
                            //        , "制单人": data[0].制单人
                            //        , "制单日期": data[0].制单日期
                            //        , "修改人": data[0].修改人
                            //        , "修改日期": data[0].修改日期
                            //        , "审核人": data[0].审核人
                            //        , "审核日期": data[0].审核日期
                            //        , "生产订单号": data[0].源单单号
                            //        , "生产订单数量": data[0].生产数量
                            //        , "HBillNo": $("#HFbarcode").val()
                            //    });
                            //    $("#HFbarcode").attr("readonly", "readonly");//条形码只读
                            //    $("#HFbarcode").css("background-color", "#efefef4d");
                            //    $("#HFbarcode").css("box-shadow", "none");
                            //    $("#Serial_number").removeAttr("readonly");//移除流水号只读
                            //    $("#Serial_number").css("background-color", "white");
                            //    $("#Serial_number").focus();
                            //    $("#Serial_number").css("box-shadow", "0 0 0 1px #00ff00");
                            //} else {
                            //    layer.alert(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                            //}
                            if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                var data = result.data.h_v_Sc_ProcessExchangeBillList[0];
                                form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                    "HProcExchBillNo": $("#HBarCode").val()
                                    //, "HProcID": data.HProcID
                                    //, "HProc": data.工序
                                    //, "HCenter": data.工作中心
                                    //, "HCenterID": data.工作中心代码
                                    , "HICMOInterID": data.hicmointerid
                                    , "HICMOBillNo": data.任务单号
                                    , "HDeptID": data.HDeptID
                                    , "HQty": data.计划数量
                                    , "HMaterID": data.HMaterID
                                    , "HMaterName": data.产品
                                    , "HMaterModel": data.规格型号
                                    , "HICMOQty": data.生产数量
                                    , "HOrderProcNO":data.订单跟踪号
                                });
                                //$("#HBarCode").attr("readonly", "readonly");//条形码只读
                                //$("#HBarCode").css("background-color", "#efefef4d");
                                $("#HBarCode").css("box-shadow", "none");
                            } else {
                                layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                            }
                        }, error: function () {
                            layer.alert("扫条形码方法发生错误!", { icon: 5 });
                        }
                    });
                    // layer.msg($('#HFbarcode').val(), { icon: 1 });
                }
            });
            //流水号回车方法
            $('#Serial_number').on('keydown', function (event) {   //扫条形码
                var sProcNo = $('#Serial_number').val();
                var sBillNo = $('#HBillNo').val();
            $('#HProcNo').on('keydown', function (event) {   //扫条形码
                var HProcNo = $('#HProcNo').val();
                var HBarCode = $('#HBarCode').val();
                if (event.keyCode == 13) {
                    if (sProcNo == "" || sBillNo == "") {
                    if (HProcNo == "" || HBarCode == "") {
                        layer.alert("流水号或流转卡号为空!", { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        return;
                    }
                    $.ajax({
                        url: GetWEBURL() + "/LEMS/TxtHProcNo_KeyDown",
                        url: GetWEBURL() + "/api/newBill/getProcDetail",
                        type: "GET",
                        data: {
                            "sProcNo": sProcNo
                            , "sBillNo": sBillNo
                            "sBillNo": HBarCode
                            , "sProcNo": HProcNo
                        },
                        success: function (result) {
                            var data = result.data;
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_ProcessExchangeBillList[0];
                            if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                    "订单跟踪号": data[0].订单跟踪号
                                    , "产品代码": data[0].产品代码
                                    , "产品名称": data[0].产品
                                    , "规格型号": data[0].规格型号
                                    , "流转卡数量": data[0].流转卡数量
                                    , "工作中心": data[0].工作中心
                                    , "工作中心代码": data[0].工作中心代码
                                    , "生产班组": data[0].班组
                                    , "生产班组代码": data[0].班组代码
                                    , "生产资源": data[0].生产资源
                                    , "生产资源代码": data[0].生产资源代码
                                    , "制单人": data[0].制单人
                                    , "制单日期": data[0].制单日期
                                    , "修改人": data[0].修改人
                                    , "修改日期": data[0].修改日期
                                    , "审核人": data[0].审核人
                                    , "审核日期": data[0].审核日期
                                    , "生产订单号": data[0].源单单号
                                    , "生产订单数量": data[0].生产数量
                                    , "HBillNo": $("#HFbarcode").val()
                                     //"HProcID": data.HProcID
                                    //, "HProc": data.工序
                                    //, "HCenter": data.工作中心
                                    //, "HCenterID": data.工作中心代码
                                     "HICMOInterID": data.hicmointerid
                                    , "HICMOBillNo": data.任务单号
                                    , "HDeptID": data.HDeptID
                                    , "HQty": data.计划数量
                                    , "HMaterID": data.HMaterID
                                    , "HMaterName": data.产品
                                    , "HMaterModel": data.规格型号
                                    , "HICMOQty": data.生产数量
                                });
                                $("#Serial_number").attr("readonly", "readonly");//条形码只读
                                $("#Serial_number").css("background-color", "#efefef4d");
                                $("#Serial_number").css("box-shadow", "none");
                                $("#Entrants_number").removeAttr("readonly");//移除进站数量只读
                                $("#Entrants_number").css("background-color", "white");
                                $("#Entrants_number").focus();
                                $("#Entrants_number").css("box-shadow", "0 0 0 1px #00ff00");
                                $("#HProcNo").css("box-shadow", "none");
                                checkPopup();
                            } else {
                                // $("#verifycode").click();
                                //layer.msg(result.Message, { icon: 5 });
                                layer.alert(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                                layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                            }
                        }, error: function () {
                            layer.alert("流水号方法发生错误!", { icon: 5 });
@@ -371,7 +353,7 @@
                    }
                }
            });
            //选择生产班组弹窗
            form.on('submit(ProductionTeam-BT)', function () {//选择生产班组
                layer.open({
@@ -404,33 +386,49 @@
                })
            });
            //选择工作中心弹窗
            form.on('submit(HWorkingProcedure-BT)', function () {//选择工作中心
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '工作中心'
                    , shade: 0.6 //遮罩透明度
                    //, maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../Baseset/基础资料/Gy_WorkCenterList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
            //保存按钮
            form.on('submit(Saver)', function (data) {//提交
                //debugger;
                var sMainStr = JSON.stringify(data.field);
                console.log(sMainStr);
                var sMainStr =data.field;
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "/LEMS/Sub_SaveBill_Json", //方法所在页面和方法名
                        url: GetWEBURL() + "/api/newBill/setStationInBill", //方法所在页面和方法名
                        async: true,
                        data: { "oMain": sMainStr },
                        data: sMainStr,
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                        success: function (result) {
                            console.log(result);
                            if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                $("#sHWHID").val("");
                                layer.alert(data.Message + $("#HBillNo").val(), { icon: 1 }, function () {
                                layer.alert(result.msg + "单号为:" + $("#HBillNo").val(), { icon: 1 }, function () {
                                    window.location.reload();//刷新页面
                                });
                            }
                            else {
                                layer.alert(data.Message, { icon: 5 });
                                layer.alert(result.msg, { icon: 5 });
                            }
                            layer.closeAll("loading");
                            layui.form.render();
                        },
                        error: function (err) {
                            layer.alert("错误:" + err, { icon: 5 });
                            layer.alert("接口请求失败:" + err, { icon: 5 });
                        }
                    });
            });
@@ -438,7 +436,7 @@
            //退出按钮
            form.on('submit(Close)', function (data) {//退出
                layer.confirm('您确定要关闭本页吗?', { icon: 3, title: '提示' }, function (index) {
                    parent.layui.admin.events.closeThisTabs();
                    parent.location.href = "../../views/index.html";
                });
            });
@@ -462,42 +460,56 @@
        });
        //校验是否选择弹窗事件
        function checkPopup() {
            //if (!$("#HSource").val()) {//生产资源
            //    $("#HSource").css("box-shadow", "0 0 1px 2px #00ff00");
            //}
            //else
            if (!$("#HGroup").val()) {
                $("#HGroup").css("box-shadow", "0 0 1px 2px #00ff00");
            }
            else if (!$("#HCenter").val()) {
                $("#HCenter").css("box-shadow", "0 0 1px 2px #00ff00");
            }
        }
        //返回生产班组
        function GetProductionTeamValue(obj) {  //返回生产班组
            if (obj.length == 0) {
                layer.msg("请先选择班组", { index: 0 });
            } else {
                $("#ProductionTeam").val(obj[0].班组);
                $("#ProductionTeamID").val(obj[0].HItemID);
                $("#ProductionTeam").css("box-shadow", "none");
                if ($("#ProductionResources").val()) {
                    $("#ProductionResources").css("box-shadow", "none");
                } else {
                    $("#ProductionResources").css("box-shadow", "0 0 1px 2px #00ff00");
                }
                $("#HGroup").val(obj[0].班组);
                $("#HGroupID").val(obj[0].HItemID);
                $("#HGroup").css("box-shadow", "none");
                checkPopup();
                layer.closeAll();
            }
        }
        //返回生产资源
        function GetProductionResourcesValue(obj) {  //返回生产资源
            if ($("#ProductionResources").val()) {
                $("#ProductionResources").css("box-shadow", "none");
            if ($("#HSource").val()) {
                $("#HSource").css("box-shadow", "none");
            }
            $("#ProductionResources").val(obj[0].生产资源);
            $("#ProductionResourcesID").val(obj[0].生产资源代码);
            $("#ProductionResources").css("box-shadow", "none");
            $("#HSource").val(obj[0].生产资源);
            $("#HSourceID").val(obj[0].HItemID);
            $("#HSource").css("box-shadow", "none");
            checkPopup();
        }
                            //function GetHEmpValue(obj)  //返回职员
                            //{
                            //    $("#HEmpName").val(obj[0].HName);
                            //    $("#HEmpID").val(obj[0].HItemID);
                            //}
                            //function GetHDeptNameValue(obj)  //返回部门
                            //{
                            //    $("#HDeptName").val(obj[0].HName);
                            //    $("#HDeptID").val(obj[0].HItemID);
                            //}
        //返回工作中心
        function GetWorkCenterValue(obj) {  //返回工作中心
            if (obj.length == 0) {
                layer.msg("请先选择工作中心", { index: 0 });
            } else {
                $("#HCenter").val(obj[0].工作中心);
                $("#HCenterID").val(obj[0].HItemID);
                $("#HCenter").css("box-shadow", "none");
                checkPopup();
                layer.closeAll();
            }
        }
    </script>