jformunion.ftl 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <#setting number_format="0.#####################">
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <base href="${basePath}/"/>
  6. <title>订单信息</title>
  7. <style type="text/css">
  8. .Button{
  9. display: inline-block;
  10. outline: none;
  11. cursor: pointer;
  12. text-align: center;
  13. text-decoration: none;
  14. font: 14px/100% Arial, Helvetica, sans-serif;
  15. padding: .5em 2em .55em;
  16. -webkit-border-radius: .5em;
  17. -moz-border-radius: .5em;
  18. border-radius: .5em;
  19. -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
  20. -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
  21. box-shadow: 0 1px 2px rgba(0,0,0,.2);
  22. color: #fef4e9;
  23. border: solid 1px #1D73F7;
  24. background: #1D73F7;
  25. background: -webkit-gradient(linear, left top, left bottom, from(#1D73F7), to(#1D51F7));
  26. }
  27. </style>
  28. ${config_iframe}
  29. </head>
  30. <script type="text/javascript">
  31. $(document).ready(function(){
  32. $('#tt').tabs({
  33. onSelect:function(title){
  34. $('#tt .panel-body').css('width','auto');
  35. }
  36. });
  37. $(".tabs-wrap").css('width','100%');
  38. });
  39. //初始化下标
  40. function resetTrNum(tableId) {
  41. $tbody = $("#"+tableId+"");
  42. $tbody.find('>tr').each(function(i){
  43. <#-- update--begin--author:zhangjiaqiang date:20170607 for:修订初始化下标当中涉及的下标内容 -->
  44. $(':input, select, button, a', this).each(function(){
  45. var $this = $(this), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
  46. if(name!=null){
  47. if (name.indexOf("#index#") >= 0){
  48. $this.attr("name",name.replace('#index#',i));
  49. }else{
  50. var s = name.indexOf("[");
  51. var e = name.indexOf("]");
  52. var new_name = name.substring(s+1,e);
  53. $this.attr("name",name.replace(new_name,i));
  54. }
  55. }
  56. if(id!=null){
  57. if (id.indexOf("#index#") >= 0){
  58. $this.attr("id",id.replace('#index#',i));
  59. }else{
  60. var s = id.indexOf("[");
  61. var e = id.indexOf("]");
  62. var new_id = id.substring(s+1,e);
  63. $this.attr("id",id.replace(new_id,i));
  64. }
  65. }
  66. if(onclick_str!=null){
  67. if (onclick_str.indexOf("#index#") >= 0){
  68. $this.attr("onclick",onclick_str.replace(/#index#/g,i));
  69. }else{
  70. }
  71. }
  72. <#-- update--end--author:zhangjiaqiang date:20170607 for:修订初始化下标当中涉及的下标内容 -->
  73. });
  74. $(this).find('div[name=\'xh\']').html(i+1);
  75. });
  76. }
  77. </script>
  78. <body>
  79. <form id="formobj" action="${basePath}/cgFormBuildController.do?saveOrUpdateMore" name="formobj" method="post"><input type="hidden" id="btn_sub" class="btn_sub"/>
  80. <#include "online/template/default/html/jformhead.ftl">
  81. <script type="text/javascript">
  82. $(function(){
  83. //查看模式情况下,删除和上传附件功能禁止使用
  84. if(location.href.indexOf("goDetail.do")!=-1){
  85. $(".jeecgDetail").hide();
  86. }
  87. if(location.href.indexOf("goDetail.do")!=-1){
  88. //查看模式控件禁用
  89. $("#formobj").find(":input").attr("disabled","disabled");
  90. }
  91. if(location.href.indexOf("goAddButton.do")!=-1||location.href.indexOf("goUpdateButton.do")!=-1){
  92. //其他模式显示提交按钮
  93. $("#sub_tr").show();
  94. }
  95. });
  96. function upload() {
  97. <#-- update--begin--author:zhangjiaqiang date:20170607 for:增加对于图片的支持 -->
  98. <#list columns as po>
  99. <#if po.show_type=='file' || po.show_type == 'image'>
  100. $('#${po.field_name}').uploadify('upload', '*');
  101. </#if>
  102. </#list>
  103. <#-- update--end--author:zhangjiaqiang date:20170607 for:增加对于图片的支持 -->
  104. }
  105. var neibuClickFlag = false;
  106. function neibuClick() {
  107. neibuClickFlag = true;
  108. $('#btn_sub').trigger('click');
  109. }
  110. function cancel() {
  111. <#-- update--begin--author:zhangjiaqiang date:20170607 for:增加对于图片的支持 -->
  112. <#list columns as po>
  113. <#if po.show_type=='file' || po.show_type == 'image'>
  114. $('#${po.field_name}').uploadify('cancel', '*');
  115. </#if>
  116. </#list>
  117. <#-- update--end--author:zhangjiaqiang date:20170607 for:增加对于图片的支持 -->
  118. }
  119. function uploadFile(data){
  120. if(!$("input[name='id']").val()){
  121. <#--update-start--Author:luobaoli Date:20150614 for:需要判断data.obj存在,才能取id值-->
  122. if(data.obj!=null && data.obj!='undefined'){
  123. $("input[name='id']").val(data.obj.id);
  124. }
  125. <#--update-end--Author:luobaoli Date:20150614 for:需要判断data.obj存在,才能取id值-->
  126. }
  127. if($(".uploadify-queue-item").length>0){
  128. upload();
  129. }else{
  130. if (neibuClickFlag){
  131. alert(data.msg);
  132. neibuClickFlag = false;
  133. }else {
  134. var win = frameElement.api.opener;
  135. win.reloadTable();
  136. win.tip(data.msg);
  137. frameElement.api.close();
  138. }
  139. }
  140. }
  141. $.dialog.setting.zIndex = getzIndex();
  142. function del(url,obj){
  143. $.dialog.confirm("确认删除该条记录?", function(){
  144. $.ajax({
  145. async : false,
  146. cache : false,
  147. type : 'POST',
  148. url : url,// 请求的action路径
  149. error : function() {// 请求失败处理函数
  150. },
  151. success : function(data) {
  152. var d = $.parseJSON(data);
  153. if (d.success) {
  154. var msg = d.msg;
  155. tip(msg);
  156. $(obj).closest("tr").hide("slow");
  157. }
  158. }
  159. });
  160. }, function(){
  161. });
  162. }
  163. </script>
  164. <div style="width: auto;height: 200px;">
  165. <div style="width:690px;height:1px;"></div>
  166. <div id="tt" tabPosition="top" border=flase style="margin:0px;padding:0px;overflow:hidden;width:auto;" class="easyui-tabs" fit="false">
  167. <#assign subTableStr>${head.subTableStr?if_exists?html}</#assign>
  168. <#assign subtablelist=subTableStr?split(",")>
  169. <#list subtablelist as sub >
  170. <#if field['${sub}']?exists >
  171. <#if field['${sub}'].head.relationType==1 >
  172. <#include "online/template/default/html/jformonetoone.ftl">
  173. <#else>
  174. <#include "online/template/default/html/jformonetomany.ftl">
  175. </#if>
  176. </#if>
  177. </#list>
  178. </div>
  179. </div>
  180. <div align="center" id = "sub_tr" style="display: none;" > <input type="button" value="提交" onclick="$('#btn_sub').trigger('click');" class="Button"></div>
  181. <#--update--begin--author:scott Date:20170304 for:替换layer风格提示框-->
  182. <script type="text/javascript">$(function(){$("#formobj").Validform({tiptype:function(msg,o,cssctl){if(o.type == 3){layer.open({title:'提示信息',content:msg,icon:5,shift:6,btn:false,shade:false,time:5000,cancel:function(index){o.obj.focus();layer.close(index);},yes:function(index){o.obj.focus();layer.close(index);},})}},btnSubmit:"#btn_sub",btnReset:"#btn_reset",ajaxPost:true,usePlugin:{passwordstrength:{minLen:6,maxLen:18,trigger:function(obj,error){if(error){obj.parent().next().find(".Validform_checktip").show();obj.find(".passwordStrength").hide();}else{$(".passwordStrength").show();obj.parent().next().find(".Validform_checktip").hide();}}}},callback:function(data){if(data.success==true){uploadFile(data);}else{if(data.responseText==''||data.responseText==undefined){$.messager.alert('错误', data.msg);$.Hidemsg();}else{try{var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'),data.responseText.indexOf('错误信息')); $.messager.alert('错误',emsg);$.Hidemsg();}catch(ex){$.messager.alert('错误',data.responseText+'');}} return false;}if(!neibuClickFlag){var win = frameElement.api.opener; win.reloadTable();}}});});</script></form>
  183. <#--update--end--author:scott Date:20170304 for:替换layer风格提示框-->
  184. <!-- 添加 产品明细 模版 -->
  185. <table style="display:none">
  186. <#assign subTableStr>${head.subTableStr?if_exists?html}</#assign>
  187. <#assign subtablelist=subTableStr?split(",")>
  188. <#list subtablelist as sub >
  189. <#if field['${sub}']?exists >
  190. <#if field['${sub}'].head.relationType!=1 >
  191. <#include "online/template/default/html/jformonetomanytpl.ftl">
  192. </#if>
  193. </#if>
  194. </#list>
  195. </table>
  196. <script type="text/javascript">${js_plug_in?if_exists}</script>
  197. <#-- update--begin--author:zhangjiaqiang date:20170607 for:增加对于图片的支持 -->
  198. <script>
  199. //通用弹出式文件上传
  200. function commonUpload(callback,inputId){
  201. $.dialog({
  202. content: "url:systemController.do?commonUpload",
  203. lock : true,
  204. title:"文件上传",
  205. <#-- update--begin--author:zhangjiaqiang date:20170601 for:修订弹出框对应的index -->
  206. zIndex:getzIndex(),
  207. <#-- update--end--author:zhangjiaqiang date:20170601 for:修订弹出框对应的index -->
  208. width:700,
  209. height: 200,
  210. parent:windowapi,
  211. cache:false,
  212. ok: function(){
  213. var iframe = this.iframe.contentWindow;
  214. iframe.uploadCallback(callback,inputId);
  215. return true;
  216. },
  217. cancelVal: '关闭',
  218. cancel: function(){
  219. }
  220. });
  221. }
  222. //通用弹出式文件上传-回调
  223. function commonUploadDefaultCallBack(url,name,inputId){
  224. var linkElement = document.getElementById(inputId+"_href");
  225. var inputElement = document.getElementById(inputId);
  226. linkElement.setAttribute("href",url);
  227. linkElement.innerHTML="下载";
  228. inputElement.setAttribute("value",url);
  229. //$("#"+inputId+"_href").attr('href',url).html('下载');
  230. //$("#"+inputId).val(url);
  231. }
  232. </script>
  233. <#-- update--begin--author:zhangjiaqiang date:20170607 for:增加对于图片的支持 -->
  234. </body>
  235. </html>