jform.ftl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <#setting number_format="0.#####################">
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <base href="${basePath}/"/>
  6. <title></title>
  7. ${config_iframe}
  8. <script type="text/javascript">
  9. <!--
  10. $(function(){
  11. $("tbody > tr > td[align='right']").css("text-align","center");
  12. $("tbody > tr > td[align='right']:last").css("text-align","right").css("padding-right","50px");
  13. });
  14. //-->
  15. </script>
  16. </head>
  17. <body style="overflow-y: hidden; overflow-x: hidden;" scroll="no">
  18. <form id="formobj" action="${basePath}/cgFormBuildController.do?saveOrUpdate" name="formobj" method="post">
  19. <input type="hidden" id="btn_sub" class="btn_sub"/>
  20. <input type="hidden" name="tableName" value="${tableName?if_exists?html}" >
  21. <input type="hidden" name="id" value="${id?if_exists?html}" >
  22. <#list columnhidden as po>
  23. <input type="hidden" id="${po.field_name}" name="${po.field_name}" value="${data['${tableName}']['${po.field_name}']?if_exists?html}" >
  24. </#list>
  25. <table cellpadding="0" cellspacing="1" class="formtable">
  26. <tbody>
  27. <tr>
  28. <td colspan='6' align="center" ><strong>客户追踪记录表</strong></td>
  29. </tr>
  30. <!-- line.1 -->
  31. <tr>
  32. <td align="right" height="40" width="10%">
  33. <span class="filedzt">* 客户编号</span>
  34. </td>
  35. <td class="value" width="20%">
  36. <input name="custom_id" id="custom_id" datatype="*" class="inputxt" value="${data['${tableName}']['custom_id']?if_exists?html}" >
  37. <span class="Validform_checktip"></span>
  38. <label class="Validform_label" style="display: none;">客户编号</label>
  39. </td>
  40. <td align="right" height="40" width="10%">
  41. <span class="filedzt">负责人</span>
  42. </td>
  43. <td class="value" width="20%">
  44. <input name="header" id="header" datatype="*" class="inputxt" value="${data['${tableName}']['header']?if_exists?html}" >
  45. <span class="Validform_checktip"></span>
  46. <label class="Validform_label" style="display: none;">负责人</label>
  47. </td>
  48. <td align="right" height="40" width="10%">
  49. <span class="filedzt">成立日期</span>
  50. </td>
  51. <td class="value" width="30%">
  52. <input name="establish_date" id="establish_date" datatype="*" class="Wdate" onClick="WdatePicker()" value="${data['${tableName}']['establish_date']?if_exists?html}" >
  53. <span class="Validform_checktip"></span>
  54. <label class="Validform_label" style="display: none;">成立日期</label>
  55. </td>
  56. </tr>
  57. <!-- line.2 -->
  58. <tr>
  59. <td align="right" height="40" width="10%">
  60. <span class="filedzt">客户名称</span>
  61. </td>
  62. <td class="value" width="20%" colspan="3">
  63. <input name="custom_name" id="custom_name" datatype="*" class="inputxt" value="${data['${tableName}']['custom_name']?if_exists?html}" >
  64. <span class="Validform_checktip"></span>
  65. <label class="Validform_label" style="display: none;">客户名称</label>
  66. </td>
  67. <td align="right" height="40" width="10%">
  68. <span class="filedzt">资本额</span>
  69. </td>
  70. <td class="value" width="30%">
  71. <input name="capital_lines" id="capital_lines" datatype="*" class="inputxt" value="${data['${tableName}']['capital_lines']?if_exists?html}" >
  72. <span class="Validform_checktip"></span>
  73. <label class="Validform_label" style="display: none;">资本额</label>
  74. </td>
  75. </tr>
  76. <!-- line.3 -->
  77. <tr>
  78. <td align="right" height="40" width="10%">
  79. <span class="filedzt">地 址</span>
  80. </td>
  81. <td class="value" width="20%" colspan="3">
  82. <input name="address" id="address" datatype="*" class="inputxt" value="${data['${tableName}']['address']?if_exists?html}" >
  83. <span class="Validform_checktip"></span>
  84. <label class="Validform_label" style="display: none;">地 址</label>
  85. </td>
  86. <td align="right" height="40" width="10%">
  87. <span class="filedzt">电 话</span>
  88. </td>
  89. <td class="value" width="30%">
  90. <input name="phone" id="phone" datatype="*" class="inputxt" value="${data['${tableName}']['phone']?if_exists?html}" >
  91. <span class="Validform_checktip"></span>
  92. <label class="Validform_label" style="display: none;">电 话</label>
  93. </td>
  94. </tr>
  95. <!-- line.4 -->
  96. <tr>
  97. <td align="right" height="40" width="10%">
  98. <span class="filedzt">营业类型</span>
  99. </td>
  100. <td class="value" width="20%" colspan="3">
  101. <input name="business_type" id="business_type" datatype="*" class="inputxt" value="${data['${tableName}']['business_type']?if_exists?html}" >
  102. <span class="Validform_checktip"></span>
  103. <label class="Validform_label" style="display: none;">营业类型</label>
  104. </td>
  105. <td align="right" height="40" width="10%">
  106. <span class="filedzt">传 真</span>
  107. </td>
  108. <td class="value" width="30%">
  109. <input name="fax" id="fax" datatype="*" class="inputxt" value="${data['${tableName}']['fax']?if_exists?html}" >
  110. <span class="Validform_checktip"></span>
  111. <label class="Validform_label" style="display: none;">传 真</label>
  112. </td>
  113. </tr>
  114. <!-- line.5 -->
  115. <tr>
  116. <td align="right" height="40" width="10%">
  117. <span class="filedzt">主要往来银行</span>
  118. </td>
  119. <td class="value" width="20%" colspan="5">
  120. <input name="banks" id="banks" datatype="*" class="inputxt" value="${data['${tableName}']['banks']?if_exists?html}" >
  121. <span class="Validform_checktip"></span>
  122. <label class="Validform_label" style="display: none;">主要往来银行</label>
  123. </td>
  124. </tr>
  125. <!-- line.6 -->
  126. <tr>
  127. <td align="right" height="40" width="10%">
  128. <span class="filedzt">其他投资事业</span>
  129. </td>
  130. <td class="value" width="30%" colspan="2">
  131. <input name="other_business" id="other_business" datatype="*" class="inputxt" value="${data['${tableName}']['other_business']?if_exists?html}" >
  132. <span class="Validform_checktip"></span>
  133. <label class="Validform_label" style="display: none;">其他投资事业</label>
  134. </td>
  135. <td align="right" height="40" width="20%">
  136. <span class="filedzt">平均每日营业额</span>
  137. </td>
  138. <td class="value" width="30%" colspan="2">
  139. <input name="turnover" id="turnover" datatype="*" class="inputxt" value="${data['${tableName}']['turnover']?if_exists?html}" >
  140. <span class="Validform_checktip"></span>
  141. <label class="Validform_label" style="display: none;">平均每日营业额</label>
  142. </td>
  143. </tr>
  144. <!-- line.7 -->
  145. <tr>
  146. <td align="right" height="40" width="10%">
  147. <span class="filedzt">主要业务往来</span>
  148. </td>
  149. <td class="value" width="30%" colspan="2">
  150. <input name="business" id="business" datatype="*" class="inputxt" value="${data['${tableName}']['business']?if_exists?html}" >
  151. <span class="Validform_checktip"></span>
  152. <label class="Validform_label" style="display: none;">主要业务往来</label>
  153. </td>
  154. <td align="right" height="40" width="20%">
  155. <span class="filedzt">付款方式</span>
  156. </td>
  157. <td class="value" width="30%" colspan="2">
  158. <input type="hidden" id="pay_type" name="pay_type" value="${data['${tableName}']['pay_type']?if_exists?html}" />
  159. <input type="checkbox" name="pay_type_c" value="a" <#if (data['${tableName}']['pay_type']?if_exists?index_of('a') gt 0)>checked</#if> onclick="getChecked(this.name,'pay_type')" >现金</input>
  160. <input type="checkbox" name="pay_type_c" value="b" <#if (data['${tableName}']['pay_type']?if_exists?index_of('b') gt 0)>checked</#if> onclick="getChecked(this.name,'pay_type')" >支票</input>
  161. <input type="checkbox" name="pay_type_c" value="c" <#if (data['${tableName}']['pay_type']?if_exists?index_of('c') gt 0)>checked</#if> onclick="getChecked(this.name,'pay_type')" >客票</input>
  162. <input type="checkbox" name="pay_type_c" value="d" <#if (data['${tableName}']['pay_type']?if_exists?index_of('d') gt 0)>checked</#if> onclick="getChecked(this.name,'pay_type')" >其他</input>
  163. </td>
  164. </tr>
  165. <!-- line.8 -->
  166. <tr>
  167. <td align="right" height="40" width="10%">
  168. <span class="filedzt">与本公司往来</span>
  169. </td>
  170. <td class="value" width="30%" colspan="2">
  171. <input name="business_contacts" id="business_contacts" datatype="*" class="inputxt" value="${data['${tableName}']['business_contacts']?if_exists?html}" >
  172. <span class="Validform_checktip"></span>
  173. <label class="Validform_label" style="display: none;">与本公司往来</label>
  174. </td>
  175. <td align="right" height="40" width="20%">
  176. <span class="filedzt">收款记录</span>
  177. </td>
  178. <td class="value" width="30%" colspan="2">
  179. <input type="hidden" id="collection" name="collection" value="${data['${tableName}']['collection']?if_exists?html}" />
  180. <input type="checkbox" name="collection_c" value="a" <#if (data['${tableName}']['collection']?if_exists?index_of('a') gt 0)>checked</#if> onclick="getChecked(this.name,'collection')" >优秀</input>
  181. <input type="checkbox" name="collection_c" value="b" <#if (data['${tableName}']['collection']?if_exists?index_of('b') gt 0)>checked</#if> onclick="getChecked(this.name,'collection')" >良好</input>
  182. <input type="checkbox" name="collection_c" value="c" <#if (data['${tableName}']['collection']?if_exists?index_of('c') gt 0)>checked</#if> onclick="getChecked(this.name,'collection')" >一般</input>
  183. <input type="checkbox" name="collection_c" value="d" <#if (data['${tableName}']['collection']?if_exists?index_of('d') gt 0)>checked</#if> onclick="getChecked(this.name,'collection')" >很差</input>
  184. </td>
  185. </tr>
  186. <!-- line.9 -->
  187. <tr>
  188. <td align="right" height="40" width="10%">
  189. <span class="filedzt">最近与本公司往来重要记录</span>
  190. </td>
  191. <td class="value" width="20%" colspan="5">
  192. <input name="business_important_contacts" id="business_important_contacts" datatype="*" class="inputxt" value="${data['${tableName}']['business_important_contacts']?if_exists?html}" >
  193. <span class="Validform_checktip"></span>
  194. <label class="Validform_label" style="display: none;">最近与本公司往来重要记录</label>
  195. </td>
  196. </tr>
  197. <!-- line.10 -->
  198. <tr>
  199. <td align="right" height="40" width="10%">
  200. <span class="filedzt">最近交易数据跟踪</span>
  201. </td>
  202. <td class="value" width="20%" colspan="5">
  203. <input name="business_record" id="business_record" datatype="*" class="inputxt" value="${data['${tableName}']['business_record']?if_exists?html}" >
  204. <span class="Validform_checktip"></span>
  205. <label class="Validform_label" style="display: none;">最近交易数据跟踪</label>
  206. </td>
  207. </tr>
  208. <!-- line.11 -->
  209. <tr>
  210. <td align="right" height="40" width="10%">
  211. <span class="filedzt">客 户 意 见</span>
  212. </td>
  213. <td class="value" width="20%" colspan="5">
  214. <input name="customer_opinion" id="customer_opinion" datatype="*" class="inputxt" value="${data['${tableName}']['customer_opinion']?if_exists?html}" >
  215. <span class="Validform_checktip"></span>
  216. <label class="Validform_label" style="display: none;">客 户 意 见</label>
  217. </td>
  218. </tr>
  219. <!-- line.12 -->
  220. <tr>
  221. <td align="right" height="40" width="10%">
  222. <span class="filedzt">信 用 评 定</span>
  223. </td>
  224. <td class="value" width="20%" colspan="5">
  225. <input name="credit_evaluation" id="credit_evaluation" datatype="*" class="inputxt" value="${data['${tableName}']['credit_evaluation']?if_exists?html}" >
  226. <span class="Validform_checktip"></span>
  227. <label class="Validform_label" style="display: none;">信 用 评 定</label>
  228. </td>
  229. </tr>
  230. <!-- line.13 -->
  231. <tr>
  232. <td align="right" height="40" width="70%" colspan="4">
  233. <span class="filedzt">填表人</span>
  234. </td>
  235. <td class="value" width="30%" colspan="2">
  236. <input name="preparer" id="preparer" datatype="*" class="inputxt" value="${data['${tableName}']['preparer']?if_exists?html}" >
  237. <span class="Validform_checktip"></span>
  238. <label class="Validform_label" style="display: none;">填表人</label>
  239. </td>
  240. </tr>
  241. <tr id = "sub_tr" style="display: none;">
  242. <td colspan="2" align="center">
  243. <input type="button" value="提交" onclick="neibuClick();" class="ui_state_highlight">
  244. </td>
  245. </tr>
  246. </tbody>
  247. </table>
  248. <script type="text/javascript">$(function(){$("#formobj").Validform({tiptype:1,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>
  249. </form>
  250. <script type="text/javascript">
  251. function uploadFile(data){
  252. frameElement.api.opener.reloadTable();
  253. frameElement.api.close();
  254. }
  255. function getChecked(checkName,inputID){
  256. var checkObj= $("input[type='checkbox'][name='"+checkName+"']:checked");
  257. var val="";
  258. $.each(checkObj,function(i,f){
  259. val+=","+ f.value;
  260. });
  261. $("#"+inputID).val(val);
  262. }
  263. $(function(){
  264. //查看模式情况下,删除和上传附件功能禁止使用
  265. if(location.href.indexOf("goDetail.do")!=-1){
  266. $(".jeecgDetail").hide();
  267. }
  268. if(location.href.indexOf("goDetail.do")!=-1){
  269. //查看模式控件禁用
  270. $("#formobj").find(":input").attr("disabled","disabled");
  271. }
  272. if(location.href.indexOf("goAddButton.do")!=-1||location.href.indexOf("goUpdateButton.do")!=-1){
  273. //其他模式显示提交按钮
  274. $("#sub_tr").show();
  275. }
  276. });
  277. var neibuClickFlag = false;
  278. function neibuClick() {
  279. neibuClickFlag = true;
  280. $('#btn_sub').trigger('click');
  281. }
  282. $.dialog.setting.zIndex =1990;
  283. function del(url,obj){
  284. $.dialog.confirm("确认删除该条记录?", function(){
  285. $.ajax({
  286. async : false,
  287. cache : false,
  288. type : 'POST',
  289. url : url,// 请求的action路径
  290. error : function() {// 请求失败处理函数
  291. },
  292. success : function(data) {
  293. var d = $.parseJSON(data);
  294. if (d.success) {
  295. var msg = d.msg;
  296. tip(msg);
  297. $(obj).closest("tr").hide("slow");
  298. }
  299. }
  300. });
  301. }, function(){
  302. });
  303. }
  304. <#--add-start--Author:钟世云 Date:20150614 for:online支持树配置-->
  305. /**树形列表数据转换**/
  306. function convertTreeData(rows, textField) {
  307. for(var i = 0; i < rows.length; i++) {
  308. var row = rows[i];
  309. row.text = row[textField];
  310. if(row.children) {
  311. row.state = "open";
  312. convertTreeData(row.children, textField);
  313. }
  314. }
  315. }
  316. /**树形列表加入子元素**/
  317. function joinTreeChildren(arr1, arr2) {
  318. for(var i = 0; i < arr1.length; i++) {
  319. var row1 = arr1[i];
  320. for(var j = 0; j < arr2.length; j++) {
  321. if(row1.id == arr2[j].id) {
  322. var children = arr2[j].children;
  323. if(children) {
  324. row1.children = children;
  325. }
  326. }
  327. }
  328. }
  329. }
  330. </script>
  331. <script type="text/javascript">${js_plug_in?if_exists}</script>
  332. </body>
  333. </html>