Ver código fonte

[流程管理]修复附件上传指定格式文件异常的问题中

unknown 5 anos atrás
pai
commit
df969f05a1

+ 30 - 11
o2web/source/x_component_cms_FormDesigner/Module/Attachment/attachment.html

@@ -56,17 +56,36 @@
             <tr>
                 <td class="editTableTitle">允许上传类型:</td>
                 <td class="editTableValue">
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('word')!=-1)?'checked':''} value="word">WORD文档
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('excel')!=-1)?'checked':''} value="excel">EXCEL文档
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('ppt')!=-1)?'checked':''} value="ppt">PPT文档
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('ppt')!=-1)?'checked':''} value="txt">文本文档
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('pic')!=-1)?'checked':''} value="pic">图片文件
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('pdf')!=-1)?'checked':''} value="pdf">PDF文档
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('zip')!=-1)?'checked':''} value="zip">压缩文档
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('audio')!=-1)?'checked':''} value="audio">音频文档
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('video')!=-1)?'checked':''} value="video">视频文档<br/>
-                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('other')!=-1)?'checked':''} value="other">其他
-                    <input type="text" name="attachmentExtOtherType" value="text{$.attachmentExtOtherType}" class="editTableInput"/>
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('word')!=-1)?'checked':''} value="word" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">WORD文档
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('excel')!=-1)?'checked':''} value="excel" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">EXCEL文档
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('ppt')!=-1)?'checked':''} value="ppt" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">PPT文档
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('ppt')!=-1)?'checked':''} value="txt" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">文本文档
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('pic')!=-1)?'checked':''} value="pic" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">图片文件
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('pdf')!=-1)?'checked':''} value="pdf" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">PDF文档
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('zip')!=-1)?'checked':''} value="zip" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">压缩文档
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('audio')!=-1)?'checked':''} value="audio" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">音频文档
+                    <input type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('video')!=-1)?'checked':''} value="video" onchange="
+                    if (!this.checked && !$('text{$.pid}attachmentExtOtherType').get('value'))$('text{$.pid}attachmentExtType_other').set('checked', false );
+                    ">视频文档<br/>
+                    <input id="text{$.pid}attachmentExtType_other" type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('other')!=-1)?'checked':''} value="other">其他
+                    <input id="text{$.pid}attachmentExtOtherType" type="text" name="attachmentExtOtherType" value="text{$.attachmentExtOtherType}" class="editTableInput"/>
+                    <span>填写样例:.doc, .docx, .xls</span>
                 </td>
             </tr>
             <tr>

+ 1 - 1
o2web/source/x_component_cms_Xform/Attachment.js

@@ -193,7 +193,7 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment = new Class({
                         if (this.json.attachmentExtOtherType) accepts.push(this.json.attachmentExtOtherType);
                         break;
                 }
-            });
+            }.bind(this));
             accept = accepts.join(", ");
         }
         var size = 0;

+ 1 - 0
o2web/source/x_component_process_FormDesigner/Module/Attachment/attachment.html

@@ -85,6 +85,7 @@
                     ">视频文档<br/>
                     <input id="text{$.pid}attachmentExtType_other" type="checkbox" name="attachmentExtType" text{(!$.attachmentExtType || $.attachmentExtType.indexOf('other')!=-1)?'checked':''} value="other">其他
                     <input id="text{$.pid}attachmentExtOtherType" type="text" name="attachmentExtOtherType" value="text{$.attachmentExtOtherType}" class="editTableInput"/>
+                    <span>填写样例:.doc, .docx, .xls</span>
                 </td>
             </tr>
             <tr>

+ 1 - 1
o2web/source/x_component_process_Xform/Attachment.js

@@ -1144,7 +1144,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
                         if (this.json.attachmentExtOtherType) accepts.push(this.json.attachmentExtOtherType);
                         break;
                 }
-            });
+            }.bind(this));
             accept = accepts.join(", ");
         }
         var size = 0;