Index: ssts-web/src/main/webapp/disinfectsystem/problemReport/problemReportForm.js =================================================================== diff -u -r32051 -r32058 --- ssts-web/src/main/webapp/disinfectsystem/problemReport/problemReportForm.js (.../problemReportForm.js) (revision 32051) +++ ssts-web/src/main/webapp/disinfectsystem/problemReport/problemReportForm.js (.../problemReportForm.js) (revision 32058) @@ -53,7 +53,7 @@ fileManageStore.load(); var status = top.Ext.getCmp('status').getValue(); var newId = top.Ext.getCmp('id').getValue(); - loadAndEditProblemData(newId, status, "update", true) + loadAndEditProblemData(newId, status, "new", true) grid.dwrReload(); }, failure: function (response, options) { @@ -89,7 +89,7 @@ showResult("文件上传成功!"); fileManageStore.reload(); var status = top.Ext.getCmp('status').getValue(); - loadAndEditProblemData(id, status, "update", true) + loadAndEditProblemData(id, status, "new", true) dialog.hide(); }); //定义上传完成回调函数 dialog.on('uploadfailed', function (dialog) { @@ -206,6 +206,7 @@ showWindow(); top.Ext.getCmp('answerArea').disable(); top.Ext.getCmp('answerAreaButton').disable(); + top.Ext.getCmp('uploadButton').hide(); } function showWindow() { @@ -373,6 +374,7 @@ html: fileHtml }, new top.Ext.Button({ text: '附件管理', + id:'uploadButton', style: 'margin: 15px 0px 10px 95px;', handler: function () { uploadProblemFile(); @@ -528,6 +530,7 @@ top.Ext.getCmp('type').setValue(result.data.type || ''); top.Ext.getCmp('solveBtn').show(); + top.Ext.getCmp('uploadButton').show(); if (status == "已完成") { top.Ext.getCmp('title').addClass('fieldReadOnlyNoRemove'); top.Ext.getCmp('title').el.dom.readOnly = true; @@ -546,6 +549,7 @@ top.Ext.getCmp('answerAreaButton').disable(); top.Ext.getCmp('saveBtn').disable(); top.Ext.getCmp('solveBtn').disable(); + top.Ext.getCmp('uploadButton').hide(); top.Ext.getCmp('type').disable(); } else { top.Ext.getCmp('title').addClass('fieldReadOnlyNoRemove'); @@ -579,13 +583,9 @@ var html = ""; if (res.success) { for (var i = 0; i < res.data.length; i++) { - html += "" + res.data[i].fileName + ""; - if (i < (res.data.length - 1)) { - html += ","; - } - html += ""; + html += "

" + (i+1) + ',' + res.data[i].fileName + "

"; } - top.Ext.getCmp('fileDisplay').el.dom.getElementsByClassName('fileDisplayClass')[0].innerHTML = html; + documentGetElementsByClassName('fileDisplayClass',top.Ext.getCmp('fileDisplay').el.dom)[0].innerHTML = html; } } })