yxj
2024-10-24 f0d50f4515444e2731294495d64ff6afaaf5efee
考勤汇报单编辑模块,列表增加字段计时工时HBaseTimes_Sec
2个文件已修改
41 ■■■■■ 已修改文件
WebTM/layuiadmin/Scripts/webConfig.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/工资管理/考勤汇报单/Pay_WorkTimesBillEdit.html 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js
@@ -3,11 +3,11 @@
    //var WEBURL = "http://192.168.16.80:8011/";          //办公室服务器
    //var WEBURL = "http://localhost:8081/SWEAPI/";       //ch本地*/
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
    //var WEBURL = "http://localhost/API/";             //颜晓军本地配置
    var WEBURL = "http://localhost/API/";             //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //杨乐本地配置
    //var WEBURL = "http://localhost:8082/API/";    //杜贺本地配置
    /*var WEBURL = "http://localhost/API/";*/    //潘浙游本地配置  
    var WEBURL = "http://localhost:8082/API/";    //张瑞广本地配置
    //var WEBURL = "http://localhost:8082/API/";    //张瑞广本地配置
    //var WEBURL = "http://localhost:81/API/"    //翁涛涛本地配置
    //var WEBURL = "http://47.96.97.237/API/";          //智云服务器
    /*var WEBURL = "http://localhost:8082/LuBaoAPI/"; */  //余思杰本地配置
WebTM/views/¹¤×ʹÜÀí/¿¼Çڻ㱨µ¥/Pay_WorkTimesBillEdit.html
@@ -394,6 +394,7 @@
                                        , "HPMTimes": result.data[i].HPMTimes
                                        , "HAMTimes": result.data[i].HAMTimes
                                        , 'HBaseTimes': result.data[i].HBaseTimes
                                        , 'HBaseTimes_Sec': result.data[i].HBaseTimes_Sec
                                        , 'HBaseDays': result.data[i].HBaseDays
                                        , 'HOverTimes': result.data[i].HOverTimes
                                        , 'HOverDays': result.data[i].HOverDays
@@ -477,6 +478,7 @@
                                        , "HPMTimes": result.data[i].HPMTimes
                                        , "HAMTimes": result.data[i].HAMTimes
                                        , 'HBaseTimes': result.data[i].HBaseTimes
                                        , 'HBaseTimes_Sec': result.data[i].HBaseTimes_Sec
                                        , 'HBaseDays': result.data[i].HBaseDays
                                        , 'HOverTimes': result.data[i].HOverTimes
                                        , 'HOverDays': result.data[i].HOverDays
@@ -546,6 +548,7 @@
                        , { field: 'HAMTimes', title: '上午工时', width: 100, edit: 'text', totalRow: true }
                        , { field: 'HPMTimes', title: '下午工时', width: 100, edit: 'text', totalRow: true }
                        , { field: 'HBaseTimes', title: '基本工时', width: 100, edit: 'text', totalRow: true, event: "HBaseTimes" }
                        , { field: 'HBaseTimes_Sec', title: '计时工时', width: 100, edit: 'text', totalRow: true, event: "HBaseTimes_Sec" }
                        , { field: 'HBaseDays', title: '基本天数', width: 100, edit: 'text', totalRow: true }
                        , { field: 'HOverTimes', title: '加班工时', width: 100, edit: 'text', totalRow: true }
                        , { field: 'HOverDays', title: '加班天数', width: 100, edit: 'text', totalRow: true }
@@ -586,6 +589,7 @@
                    , "HPMTimes": "0"
                    , "HAMTimes": "0"
                    , "HBaseTimes": "0"
                    , "HBaseTimes_Sec": "0"
                    , "HBaseDays": "0"
                    , "HOverTimes": "0"
                    , "HOverDays": "0"
@@ -735,6 +739,7 @@
                                        , "HPMTimes": "0"
                                        , "HAMTimes": "0"
                                        , "HBaseTimes": "0"
                                        , "HBaseTimes_Sec": "0"
                                        , "HBaseDays": "0"
                                        , "HOverTimes": "0"
                                        , "HOverDays": "0"
@@ -799,6 +804,7 @@
                    , "HPMTimes": "0"
                    , "HAMTimes": "0"
                    , "HBaseTimes": "0"
                    , "HBaseTimes_Sec": "0"
                    , "HBaseDays": "0"
                    , "HOverTimes": "0"
                    , "HOverDays": "0"
@@ -1373,6 +1379,37 @@
                            CheckedSet_tableSub();
                        }
                        //计时工时
                        if (obj.event == "HBaseTimes_Sec") {
                            var oldText = table.cache["mainTable"][rowIndex].HBaseTimes_Sec;
                            var value = e.target.value; //得到修改后的值
                            //数据格式校验
                            temp = value + "";
                            if (!ref.test(temp) || temp == 0) {
                                //恢复数据到编辑前
                                option.data[rowIndex].HBaseTimes_Sec = oldText;
                                table.render(option);
                                //刷新设置复选框状态
                                CheckedSet_tableSub();
                                layer.msg("所输入值必须为大于0的数字!");
                                return;
                            }
                            for (var i = rowIndex * 1; i < option.data.length; i++) {
                                //数据校验合格,重算记录
                                var HBaseTimes_Sec = isNaN(value) ? 0 : value * 1;  //计时工时
                                //同步更新表格和缓存对应的值
                                option.data[i].HBaseTimes_Sec = HBaseTimes_Sec;
                            }
                            table.render(option);
                            //刷新设置复选框状态
                            CheckedSet_tableSub();
                        }
                        obj.event = "";
                        return false;
                    }