yxj
2025-07-02 893c3300f1393afca737cacd60bc643d34d183bf
WebTM/views/ÏîÄ¿¹ÜÀí/¹¤×÷ÈÎÎñ/PM_WorkTaskReportBill.html
@@ -99,6 +99,26 @@
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">接收人</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HReceiveEmp" name="HReceiveEmp" id="HReceiveEmp" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <!--<input type="hidden" name="HPMEmpID" id="HPMEmpID" lay-verify="HPMEmpID" value="0">-->
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHReceiveEmp" id="btnSearchHReceiveEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">抄送人</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HCopyEmp" name="HCopyEmp" id="HCopyEmp" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <!--<input type="hidden" name="HWorkEmpID" id="HWorkEmpID" lay-verify="HWorkEmpID" value="0">-->
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHCopyEmp" id="btnSearchHCopyEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
@@ -450,6 +470,18 @@
            //#region åå…³é—­
            form.on('submit(set_CancelCloseBill)', function (data) {
                set_CancelCloseBill(data);
            });
            //#endregion
            //#region é€‰æ‹©æŽ¥æ”¶äººæŒ‰é’®
            form.on('submit(btnSearchHReceiveEmp)', function () {
                get_checkSearchHReceiveEmp();
            });
            //#endregion
            //#region é€‰æ‹©æŠ„送人按钮
            form.on('submit(btnSearchHCopyEmp)', function () {
                get_checkSearchHCopyEmp();
            });
            //#endregion
            //#endregion
@@ -857,6 +889,87 @@
                    }
                }
            }
            //#region æŽ¥æ”¶äººé€‰æ‹©é¡µé¢
            function get_checkSearchHReceiveEmp() {
                var HOrgID = $("#HOrgID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '员工表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=HReceive&HOrgID=' + HOrgID, '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('请选择数据');
                        }
                        //获取数据
                        $("#HReceiveEmp").val(checkStatus.data[0].职员名称);//接收人名称
                        if ($("#HReceiveEmp").val() == "") {
                            $("#HReceiveEmp").val(checkStatus.data[0].职员代码);
                        }
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () { }
                })
            }
            //#endregion
            //#region æŠ„送人选择页面
            function get_checkSearchHCopyEmp() {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '抄送人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/transfer.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.transfer.getData('key123'); //获取已分配数量
                        if (checkStatus.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        var value = "";
                        var title = "";
                        for (var i = 0; i < checkStatus.length; i++) {
                            value += checkStatus[i].value + ",";
                            title += checkStatus[i].title + ",";
                        }
                        //去掉最后一个逗号(如果不需要去掉,就不用写)
                        if (value.length > 0) {
                            value = value.substr(0, value.length - 1);
                            title = title.substr(0, title.length - 1);
                        }
                        $("#HCopyEmp").val(title);
                        console.log(checkStatus, value, title);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            }
            //#endregion
            
            //#region ç¼–辑 é¡µé¢èµ‹å€¼
            function RoadBillMain(linterid)//加载表头
@@ -893,6 +1006,8 @@
                            , "HBackRemark": tableMain[0]["HBackRemark"]
                            , "HReportEmpID": tableMain[0]["HReportEmpID"]
                            , "HReportEmpName": tableMain[0]["HReportEmpName"]
                            , "HReceiveEmp": tableMain[0]["HReceiveEmp"]
                            , "HCopyEmp": tableMain[0]["HCopyEmp"]
                        });
                        //组织的值HOrgID变化,重新渲染
@@ -1361,12 +1476,11 @@
            //#region æŸ¥è¯¢  æˆ‘的任务下推查询数据
            function get_Display() {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/PM_WorkTaskBill/XTList',
                    type: "GET",
                    async: false,
                    data: { "HInterID": linterid, "user": sessionStorage["HUserName"]},
                    data: { "HInterID": linterid, sWhere: sWhere, "user": sessionStorage["HUserName"]},
                    success: function (data1) {
                        if (data1.count == 1) {
                            var rowdata = [];
@@ -1576,6 +1690,12 @@
            $("#HReportEmpID").val(obj[0].HItemID);//客户id
            $("#HReportEmpName").val(obj[0].职员名称);//客户名称
        }
        //接收人
        function GetHReceiveValue(obj) {
            $("#HReceiveEmp").val(obj[0].职员名称);//接收人名称
        }
    </script>
</body>
</html>