diff --git a/topages/staffmanage/staffmanage.js b/topages/staffmanage/staffmanage.js index 05b67eb..10bf43c 100644 --- a/topages/staffmanage/staffmanage.js +++ b/topages/staffmanage/staffmanage.js @@ -4,7 +4,6 @@ var fun = { /**初始化*/ init:function(){ - debugger; console.log(1) fun.createTableData(); fun.queryBtn(); diff --git a/topages/workfill/workfill.js b/topages/workfill/workfill.js index 4dd7692..15aca3a 100644 --- a/topages/workfill/workfill.js +++ b/topages/workfill/workfill.js @@ -162,37 +162,42 @@ var fun = { var projectId = $("#work-projectName"+id).find("option:selected").val(); var dailyDate = $("#weekday"+id).attr("data-date"); var dailyContent = $("#daily-report"+id).text(); + if(dailyContent==''){ - - var req= { - id:arsaId, - projectId:projectId, - dailyDate:dailyDate, - dailyContent:dailyContent, - sysCode:sysComm.sysCode - }; - var editAreaBlok= { - method: "post", - url: dataUrl.util.saveOrUpdateAsraDaily(), - data: JSON.stringify(req), - contentType: 'application/json; charset=utf-8', - dataType:'json', - success: function(res){ - if(res.success == true){ - _this.text('编辑'); - _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); - var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none'); - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); - - }else{ - alert("失败"); - return false; + }else{ + var req= { + id:arsaId, + projectId:projectId, + dailyDate:dailyDate, + dailyContent:dailyContent, + sysCode:sysComm.sysCode + }; + var editAreaBlok= { + method: "post", + url: dataUrl.util.saveOrUpdateAsraDaily(), + data: JSON.stringify(req), + contentType: 'application/json; charset=utf-8', + dataType:'json', + success: function(res){ + if(res.success == true){ + _this.text('编辑'); + _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); + var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none'); + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); + + }else{ + alert("失败"); + return false; + } } - } - }; - sysAjax(editAreaBlok); + }; + sysAjax(editAreaBlok); + } + + + } }; fun.init();