diff --git a/topages/workfill/workfill.js b/topages/workfill/workfill.js index 3dac697..13cf9c7 100644 --- a/topages/workfill/workfill.js +++ b/topages/workfill/workfill.js @@ -136,7 +136,7 @@ var fun = { //如果不是本周则隐藏按钮 if(clicknum >= 1) { $("#btn-commit" + i).attr("style", "display:none;"); - $("#btn-commit" + i).parent().parent().find(".workfill-list-container").attr("contenteditable", "false"); + $("#daily-report" + i).attr("contenteditable", "false"); $("#btn-commit" + i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); var projectName = $("#btn-commit" + i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); $("#btn-commit" + i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); @@ -163,7 +163,7 @@ var fun = { $("#btn-commit"+i).attr("style","display:block;"); } //展示变更 - $("#btn-commit"+i).parent().parent().find(".workfill-list-container").attr("contenteditable","true"); + $("#daily-report"+i).attr("contenteditable","true"); if($("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')) { $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').removeClass('display-none'); var projectName=$("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); @@ -186,7 +186,7 @@ var fun = { $("#work-projectName"+row.weeksNum).selectpicker('refresh'); $("#btn-commit"+row.weeksNum).html('编辑'); - $("#btn-commit"+row.weeksNum).parent().parent().find(".workfill-list-container").attr("contenteditable","false"); + $("#daily-report"+row.weeksNum).attr("contenteditable","false"); $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); var projectName=$("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); @@ -229,7 +229,7 @@ var fun = { var asraId = res.data; $("#weekday"+id).attr("data-id",asraId); _this.html('编辑'); - _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); + _this.parent().next().attr("contenteditable","false"); _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('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').removeClass('display-none'); @@ -279,7 +279,7 @@ documentBindFunc.on('click','.workfill-list-btn',function () { var _this=$(this); if(_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')){ _this.html('提交'); - _this.parent().parent().find(".workfill-list-container").attr("contenteditable","true"); + _this.parent().next().attr("contenteditable","true"); _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');