1
duhe
2024-07-08 53dedd9f2fb4352e360638438c132951c0f48c23
WebTM/views/¹¤×ʹÜÀí/¹¤×ʵ¥/Pay_PayMentBill.html
@@ -553,11 +553,11 @@
                        , { type: 'numbers', title: '序号' }
                        , { field: 'RowID', title: '行号', hide: true }                                                   //行标识,用于下一行、上一行识别所在行
                        , { field: 'HEmpID', title: '职员ID', hide: true }
                        , { field: 'HEmpNumber', title: '职员代码', event: "HEmpNumber" }     //f7
                        , { field: 'HEmpNumber', title: '职员代码', edit: 'text', event: "HEmpNumber" }     //f7
                        , { field: 'HEmpName', title: '职员名称' }
                        , { field: 'HEmpType', title: '工资类型' }
                        , { field: 'HPostID', title: '岗位ID', hide: true }
                        , { field: 'HPostNumber', title: '岗位代码' }
                        , { field: 'HPostID', title: '岗位ID',  hide: true }
                        , { field: 'HPostNumber', title: '岗位代码'}
                        , { field: 'HPostName', title: '岗位名称' }
                        , { field: 'HPiecePay', title: '计件工资', totalRow: true }
                        , { field: 'HTimesPay', title: '计时工资', event: "HTimesPay", totalRow: true }
@@ -619,7 +619,7 @@
                    , shift: 2                                          //弹出动画
                    , area: ["90%", "90%"]                              //窗体大小
                    , maxmin: true                                      //设置最大最小按钮是否显示
                    , content: ["../../../views/基础资料/工资基础资料/Gy_Group.html?Type=HGroupID", "yes"]
                    , content: ["../../../views/基础资料/工资基础资料/Gy_Group.html?Type=HGroup", "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //按钮一  çš„回调
@@ -665,7 +665,7 @@
                    , shift: 2                                          //弹出动画
                    , area: ["90%", "90%"]                              //窗体大小
                    , maxmin: true                                      //设置最大最小按钮是否显示
                    , content: ["../../../views/Baseset/基础资料/Gy_DepartmentList.html?Type=HDeptID", "yes"]
                    , content: ["../../基础资料/公用基础资料/Gy_DepartmentList.html", "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //按钮一  çš„回调
@@ -677,7 +677,7 @@
                        }
                        $("#HDeptID").val(checkStatus.data[0].HItemID);//内码
                        $("#HDeptName").val(checkStatus.data[0].HName);//名称
                        $("#HDeptName").val(checkStatus.data[0].部门名称);//名称
                        layer.close(index);//关闭弹窗
                    }
                    , btn2: function (index, layero) { }
@@ -971,7 +971,7 @@
                                , shift: 2                                          //弹出动画
                                , area: ["90%", "90%"]                              //窗体大小
                                , maxmin: true                                      //设置最大最小按钮是否显示
                                , content: ["../../Baseset/基础资料/Gy_EmployeeList.html", "yes"]
                                , content: ["../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HEmpList", "yes"]
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -981,14 +981,21 @@
                                    if (checkStatus.data.length != 1) {
                                        return layer.msg("请选择一条数据");
                                    }
                                    //更新表格缓存的数据
                                    obj.update({
                                        "HEmpID": checkStatus.data[0].HItemID
                                        , "HEmpNumber": checkStatus.data[0].HNumber
                                        , "HEmpName": checkStatus.data[0].HName
                                    })
                                    OptionData = checkStatus.data[0];
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    //更新表格缓存的数据
                                    obj.update({
                                        "HEmpID": OptionData.HItemID
                                        , "HEmpNumber": OptionData.职员代码
                                        , "HEmpName": OptionData.职员名称
                                        , "HPostID": OptionData.HPostID
                                        , "HPostNumber": OptionData.岗位代码
                                        , "HPostName": OptionData.岗位名称
                                    })
                                }
                            })
                        }
                        obj.event = "";
@@ -1004,36 +1011,36 @@
            function openDetailTouchedByDblclick(obj) {
                $(document).off('dblclick', ".layui-table").on('dblclick', '.layui-table', function (e) {
                    //职员
                    if (obj.event == "HTimesPay") {
                        //打开职员小窗体
                        layer.open({
                            type: 2
                            , skin: "layui-layer-rim"                           //加上边框
                            , title: "职员列表"                             //标题
                            , closeBtn: 1                                       //窗体右上角关闭 çš„ æ ·å¼
                            , shift: 2                                          //弹出动画
                            , area: ["90%", "90%"]                              //窗体大小
                            , maxmin: true                                      //设置最大最小按钮是否显示
                            , content: ["../../Baseset/基础资料/Gy_EmployeeList.html", "yes"]
                            , btn: ["确定", "取消"]
                            , btn1: function (index, laero) {
                                //按钮一  çš„回调
                                var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                    //if (obj.event == "HTimesPay") {
                    //    //打开职员小窗体
                    //    layer.open({
                    //        type: 2
                    //        , skin: "layui-layer-rim"                           //加上边框
                    //        , title: "职员列表"                             //标题
                    //        , closeBtn: 1                                       //窗体右上角关闭 çš„ æ ·å¼
                    //        , shift: 2                                          //弹出动画
                    //        , area: ["90%", "90%"]                              //窗体大小
                    //        , maxmin: true                                      //设置最大最小按钮是否显示
                    //        , content: ["../../Baseset/基础资料/Gy_EmployeeList.html", "yes"]
                    //        , btn: ["确定", "取消"]
                    //        , btn1: function (index, laero) {
                    //            //按钮一  çš„回调
                    //            var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                    //            var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                                if (checkStatus.data.length != 1) {
                                    return layer.msg("请选择一条数据");
                                }
                                //更新表格缓存的数据
                                obj.update({
                                    "HEmpID": checkStatus.data[0].HItemID
                                    , "HEmpNumber": checkStatus.data[0].HNumber
                                    , "HEmpName": checkStatus.data[0].HName
                                })
                                layer.close(index);//关闭弹窗
                            }
                        })
                    }
                    //            if (checkStatus.data.length != 1) {
                    //                return layer.msg("请选择一条数据");
                    //            }
                    //            //更新表格缓存的数据
                    //            obj.update({
                    //                "HEmpID": checkStatus.data[0].HItemID
                    //                , "HEmpNumber": checkStatus.data[0].HNumber
                    //                , "HEmpName": checkStatus.data[0].HName
                    //            })
                    //            layer.close(index);//关闭弹窗
                    //        }
                    //    })
                    //}
                    obj.event = "";
                    return false;
                })
@@ -1277,8 +1284,23 @@
            //#endregion
        });
        //双击返回基础资料数据    è¡¨å¤´
        function GetHDeptNameValue(obj)  //返回部门
        {
            $("#HDeptName").val(obj[0].部门名称);
            $("#HDeptID").val(obj[0].HItemID);
        }
        function GetHGroupValue(obj)  //返回班组
        {
            $("#HGroupName").val(obj[0].班组名称);
            $("#HGroupID").val(obj[0].HItemID);
            $("#HDeptID").val(obj[0].HDeptID);//部门代码
            $("#HDeptName").val(obj[0].部门名称);//部门名称
        }
        function GetHEmpListValue(data)  //返回职员
        {
            OptionData = data
        }
    </script>
</body>
</html>