Commit d9b3c0ba3c9bb046e793f4b522c7a66939d1b4ca
1 parent
ed29b064
登录
Showing
2 changed files
with
34 additions
and
30 deletions
topages/staffmanage/staffmanage.js
topages/workfill/workfill.js
@@ -162,37 +162,42 @@ var fun = { | @@ -162,37 +162,42 @@ var fun = { | ||
162 | var projectId = $("#work-projectName"+id).find("option:selected").val(); | 162 | var projectId = $("#work-projectName"+id).find("option:selected").val(); |
163 | var dailyDate = $("#weekday"+id).attr("data-date"); | 163 | var dailyDate = $("#weekday"+id).attr("data-date"); |
164 | var dailyContent = $("#daily-report"+id).text(); | 164 | var dailyContent = $("#daily-report"+id).text(); |
165 | + if(dailyContent==''){ | ||
165 | 166 | ||
166 | - | ||
167 | - var req= { | ||
168 | - id:arsaId, | ||
169 | - projectId:projectId, | ||
170 | - dailyDate:dailyDate, | ||
171 | - dailyContent:dailyContent, | ||
172 | - sysCode:sysComm.sysCode | ||
173 | - }; | ||
174 | - var editAreaBlok= { | ||
175 | - method: "post", | ||
176 | - url: dataUrl.util.saveOrUpdateAsraDaily(), | ||
177 | - data: JSON.stringify(req), | ||
178 | - contentType: 'application/json; charset=utf-8', | ||
179 | - dataType:'json', | ||
180 | - success: function(res){ | ||
181 | - if(res.success == true){ | ||
182 | - _this.text('编辑'); | ||
183 | - _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); | ||
184 | - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); | ||
185 | - var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); | ||
186 | - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none'); | ||
187 | - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); | ||
188 | - | ||
189 | - }else{ | ||
190 | - alert("失败"); | ||
191 | - return false; | 167 | + }else{ |
168 | + var req= { | ||
169 | + id:arsaId, | ||
170 | + projectId:projectId, | ||
171 | + dailyDate:dailyDate, | ||
172 | + dailyContent:dailyContent, | ||
173 | + sysCode:sysComm.sysCode | ||
174 | + }; | ||
175 | + var editAreaBlok= { | ||
176 | + method: "post", | ||
177 | + url: dataUrl.util.saveOrUpdateAsraDaily(), | ||
178 | + data: JSON.stringify(req), | ||
179 | + contentType: 'application/json; charset=utf-8', | ||
180 | + dataType:'json', | ||
181 | + success: function(res){ | ||
182 | + if(res.success == true){ | ||
183 | + _this.text('编辑'); | ||
184 | + _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); | ||
185 | + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); | ||
186 | + var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); | ||
187 | + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none'); | ||
188 | + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); | ||
189 | + | ||
190 | + }else{ | ||
191 | + alert("失败"); | ||
192 | + return false; | ||
193 | + } | ||
192 | } | 194 | } |
193 | - } | ||
194 | - }; | ||
195 | - sysAjax(editAreaBlok); | 195 | + }; |
196 | + sysAjax(editAreaBlok); | ||
197 | + } | ||
198 | + | ||
199 | + | ||
200 | + | ||
196 | } | 201 | } |
197 | }; | 202 | }; |
198 | fun.init(); | 203 | fun.init(); |