jform.ftl 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <#setting number_format="0.#####################">
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <base href="${basePath}/"/>
  6. <title></title>
  7. ${config_iframe}
  8. </head>
  9. <body style="overflow-y: hidden; overflow-x: hidden;" scroll="no">
  10. <form id="formobj" action="${basePath}/cgFormBuildController.do?saveOrUpdate" name="formobj" method="post">
  11. <input type="hidden" id="btn_sub" class="btn_sub"/>
  12. <input type="hidden" name="tableName" value="${tableName?if_exists?html}" >
  13. <input type="hidden" name="id" value="${id?if_exists?html}" >
  14. <#list columnhidden as po>
  15. <input type="hidden" id="${po.field_name}" name="${po.field_name}" value="${data['${tableName}']['${po.field_name}']?if_exists?html}" >
  16. </#list>
  17. <table cellpadding="0" cellspacing="1" class="formtable">
  18. <tr>
  19. <td colspan='11' align="center" ><strong>客户资料管理卡</strong></td>
  20. </tr>
  21. <tr>
  22. <td colspan="2" align="right" ><label class="Validform_label">* 客户名称</label></td>
  23. <td colspan="3" class="value"><input id="cust_name" datatype="*" name="cust_name" type="text" style="width: 150px" class="inputxt" value="${data['${tableName}']['cust_name']?if_exists?html}" />
  24. <span class="Validform_checktip"></span>
  25. <label class="Validform_label" style="display: none;">客户名称</label>
  26. </td>
  27. <td align="right"><label class="Validform_label">地址</label></td>
  28. <td class="value"><input id="cust_addr" name="cust_addr" type="text" style="width: 70px" class="inputxt" value="${data['${tableName}']['cust_addr']?if_exists?html}" /></td>
  29. <td align="right"><label class="Validform_label">*客户编号</label></td>
  30. <td class="value"><input id="cust_code" datatype="*" name="cust_code" type="text" style="width: 60px" class="inputxt" value="${data['${tableName}']['cust_code']?if_exists?html}" />
  31. <span class="Validform_checktip"></span>
  32. <label class="Validform_label" style="display: none;">客户编号</label></td>
  33. <td align="right"><label class="Validform_label">邮箱</label></td>
  34. <td class="value"><input id="email" name="email" type="text" datatype="e" style="width: 150px" class="inputxt" value="${data['${tableName}']['email']?if_exists?html}" />
  35. <span class="Validform_checktip"></span>
  36. <label class="Validform_label" style="display: none;">邮箱</label>
  37. </td>
  38. </tr>
  39. <tr>
  40. <td colspan="2" align="right"><label class="Validform_label">负责人</label></td>
  41. <td class="value"><input id="cust_charge" name="cust_charge" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['cust_charge']?if_exists?html}" /></td>
  42. <td align="right"><label class="Validform_label">性别</label></td>
  43. <td class="value"><input name="sex" type="radio" value="男" <#if (data['${tableName}']['sex']?if_exists == '男')>checked</#if> />男&nbsp;<input <#if (data['${tableName}']['sex']?if_exists == '女')>checked</#if> name="sex" type="radio" value="女" />女</td>
  44. <td align="right"><label class="Validform_label">年龄</label></td>
  45. <td class="value"><input id="age" name="age" datatype="n" type="text" style="width: 70px" class="inputxt" value="${data['${tableName}']['age']?if_exists?html}" />
  46. <span class="Validform_checktip"></span>
  47. <label class="Validform_label" style="display: none;">年龄</label>
  48. </td>
  49. <td align="right"><label class="Validform_label">职务</label></td>
  50. <td class="value"><input id="position" name="position" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['position']?if_exists?html}" /></td>
  51. <td align="right"><label class="Validform_label">电话</label></td>
  52. <td class="value"><input id="phone" name="phone" type="text" style="width: 150px" class="inputxt" value="${data['${tableName}']['phone']?if_exists?html}" /></td>
  53. </tr>
  54. <tr>
  55. <td rowspan="3" align="right"><label class="Validform_label">金融情况</label></td>
  56. <td align="right"><label class="Validform_label">往来银行</label></td>
  57. <td class="value"><input id="bank" name="bank" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['bank']?if_exists?html}" /></td>
  58. <td colspan="2" align="right"><label class="Validform_label">现金情况</label></td>
  59. <td colspan="2" class="value"><input id="money" name="money" type="text" style="width: 150px" class="inputxt" value="${data['${tableName}']['money']?if_exists?html}" /></td>
  60. <td align="right"><label class="Validform_label">承办人</label></td>
  61. <td colspan="3" class="value"><input id="promoter" name="promoter" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['promoter']?if_exists?html}" /></td>
  62. </tr>
  63. <tr>
  64. <td align="right"><label class="Validform_label">账号</label></td>
  65. <td class="value"><input id="account" name="account" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['account']?if_exists?html}" /></td>
  66. <td colspan="2" align="right"><label class="Validform_label">资金周转</label></td>
  67. <td colspan="2" class="value"><input id="turnover" name="turnover" type="text" style="width: 150px" class="inputxt" value="${data['${tableName}']['turnover']?if_exists?html}" /></td>
  68. <td align="right"><label class="Validform_label">付款态度</label></td>
  69. <td colspan="3" class="value"><input id="payment_attr" name="payment_attr" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['payment_attr']?if_exists?html}" /></td>
  70. </tr>
  71. <tr>
  72. <td align="right"><label class="Validform_label">税号</label></td>
  73. <td colspan="5" class="value"><input id="sax_num" name="sax_num" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['sax_num']?if_exists?html}" /></td>
  74. <td align="right"><label class="Validform_label">付款日期</label></td>
  75. <td colspan="3" class="value"><input id="pay_date" name="pay_date" type="text" style="width: 250px" class="Wdate" onClick="WdatePicker()" value="${data['${tableName}']['pay_date']?if_exists?html}" /></td>
  76. </tr>
  77. <tr>
  78. <td colspan="2" align="right"><label class="Validform_label">开始交易日期</label></td>
  79. <td colspan="4" class="value"><input id="begin_pay_date" name="begin_pay_date" type="text" style="width: 150px" class="Wdate" onClick="WdatePicker()" value="${data['${tableName}']['begin_pay_date']?if_exists?html}" /></td>
  80. <td align="right"><label class="Validform_label">主营产品</label></td>
  81. <td colspan="4" class="value">
  82. <input type="hidden" id="main_bus" name="main_bus" value="${data['${tableName}']['main_bus']?if_exists?html}" />
  83. <input type="checkbox" name="main_bus_c" value="a" <#if (data['${tableName}']['main_bus']?if_exists?index_of('a') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >虚拟</input>
  84. <input type="checkbox" name="main_bus_c" value="b" <#if (data['${tableName}']['main_bus']?if_exists?index_of('b') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >数码</input>
  85. <input type="checkbox" name="main_bus_c" value="c" <#if (data['${tableName}']['main_bus']?if_exists?index_of('c') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >美容</input>
  86. <input type="checkbox" name="main_bus_c" value="d" <#if (data['${tableName}']['main_bus']?if_exists?index_of('d') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >服装</input>
  87. <input type="checkbox" name="main_bus_c" value="e" <#if (data['${tableName}']['main_bus']?if_exists?index_of('e') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >配饰</input>
  88. <input type="checkbox" name="main_bus_c" value="f" <#if (data['${tableName}']['main_bus']?if_exists?index_of('f') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >母婴</input>
  89. <input type="checkbox" name="main_bus_c" value="g" <#if (data['${tableName}']['main_bus']?if_exists?index_of('g') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >家居</input>
  90. <input type="checkbox" name="main_bus_c" value="h" <#if (data['${tableName}']['main_bus']?if_exists?index_of('h') gt 0)>checked</#if> onclick="getChecked(this.name,'main_bus')" >食品</input>
  91. </td>
  92. </tr>
  93. <tr>
  94. <td rowspan="7" align="right"><label class="Validform_label">营业概况</label></td>
  95. <td align="right"><label class="Validform_label">营业项目</label></td>
  96. <td class="value"><input id="bus_pro" name="bus_pro" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['bus_pro']?if_exists?html}" /></td>
  97. <td colspan="2" align="right"><label class="Validform_label">仓库情况</label></td>
  98. <td class="value"><input id="warehouse" name="warehouse" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['warehouse']?if_exists?html}" /></td>
  99. <td align="right"><label class="Validform_label">员工人数及素质</label></td>
  100. <td class="value"><input id="people" name="people" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['people']?if_exists?html}" /></td>
  101. <td align="right"><label class="Validform_label">运输方式</label></td>
  102. <td colspan="2" class="value">
  103. <input type="hidden" id="transportation" name="transportation" value="${data['${tableName}']['transportation']?if_exists?html}" />
  104. <input type="checkbox" name="transportation_c" value="a" <#if (data['${tableName}']['transportation']?if_exists?index_of('a') gt 0)>checked</#if> onclick="getChecked(this.name,'transportation')" >铁路</input>
  105. <input type="checkbox" name="transportation_c" value="b" <#if (data['${tableName}']['transportation']?if_exists?index_of('b') gt 0)>checked</#if> onclick="getChecked(this.name,'transportation')" >水运</input>
  106. <input type="checkbox" name="transportation_c" value="c" <#if (data['${tableName}']['transportation']?if_exists?index_of('c') gt 0)>checked</#if> onclick="getChecked(this.name,'transportation')" >汽运</input>
  107. <input type="checkbox" name="transportation_c" value="d" <#if (data['${tableName}']['transportation']?if_exists?index_of('d') gt 0)>checked</#if> onclick="getChecked(this.name,'transportation')" >自提</input>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td align="right"><label class="Validform_label">经营体制</label></td>
  112. <td class="value"><input id="operation" name="operation" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['operation']?if_exists?html}" /></td>
  113. <td colspan="2" align="right"><label class="Validform_label">服务车数目</label></td>
  114. <td class="value"><input id="car" name="car" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['car']?if_exists?html}" /></td>
  115. <td align="right"><label class="Validform_label">零售商数及覆盖情况</label></td>
  116. <td colspan="4" class="value"><input id="shopkeeper" name="shopkeeper" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['shopkeeper']?if_exists?html}" /></td>
  117. </tr>
  118. <tr>
  119. <td align="right"><label class="Validform_label">批发商数</label></td>
  120. <td class="value"><input id="wholesale" name="wholesale" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['wholesale']?if_exists?html}" /></td>
  121. <td colspan="2" align="right"><label class="Validform_label">营业范围</label></td>
  122. <td class="value"><input id="bus_scope" name="bus_scope" type="text" style="width: 50px" class="inputxt" value="${data['${tableName}']['bus_scope']?if_exists?html}" /></td>
  123. <td align="right"><label class="Validform_label">门市面积</label></td>
  124. <td colspan="4" class="value"><input id="area" name="area" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['area']?if_exists?html}" /></td>
  125. </tr>
  126. <tr>
  127. <td align="right"><label class="Validform_label">经营方针</label></td>
  128. <td colspan="9" class="value">
  129. <input id="management" name="management" type="hidden" value="${data['${tableName}']['management']?if_exists?html}" />
  130. <input name="management_c" type="checkbox" value="a" <#if (data['${tableName}']['management']?if_exists?index_of('a') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >销售上量</input>
  131. <input name="management_c" type="checkbox" value="b" <#if (data['${tableName}']['management']?if_exists?index_of('b') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >利润为准</input>
  132. <input name="management_c" type="checkbox" value="c" <#if (data['${tableName}']['management']?if_exists?index_of('c') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >量利兼顾</input>
  133. <input name="management_c" type="checkbox" value="d" <#if (data['${tableName}']['management']?if_exists?index_of('d') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >积极</input>
  134. <input name="management_c" type="checkbox" value="e" <#if (data['${tableName}']['management']?if_exists?index_of('e') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >保守</input>
  135. <input name="management_c" type="checkbox" value="f" <#if (data['${tableName}']['management']?if_exists?index_of('f') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >平常</input>
  136. <input name="management_c" type="checkbox" value="g" <#if (data['${tableName}']['management']?if_exists?index_of('g') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >投机</input>
  137. <input name="management_c" type="checkbox" value="h" <#if (data['${tableName}']['management']?if_exists?index_of('h') gt 0)>checked</#if> onclick="getChecked(this.name,'management')" >凌乱</input>
  138. </td>
  139. </tr>
  140. <tr>
  141. <td rowspan="3" align="right"><label class="Validform_label">年度销售潜力</label></td>
  142. <td align="right"><label class="Validform_label">进货</label></td>
  143. <td colspan="3" class="value"><input id="stock1" name="stock1" type="text" style="width: 130px" class="inputxt" value="${data['${tableName}']['stock1']?if_exists?html}" /></td>
  144. <td rowspan="3" align="right"><label class="Validform_label">第一品牌</label></td>
  145. <td align="right"><label class="Validform_label">进货</label></td>
  146. <td colspan="4" class="value"><input id="stock2" name="stock2" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['stock2']?if_exists?html}" /></td>
  147. </tr>
  148. <tr>
  149. <td align="right"><label class="Validform_label">销售</label></td>
  150. <td colspan="3" class="value"><input id="sale1" name="sale1" type="text" style="width: 130px" class="inputxt" value="${data['${tableName}']['sale1']?if_exists?html}" /></td>
  151. <td align="right"><label class="Validform_label">销售</label></td>
  152. <td colspan="4" class="value"><input id="sale2" name="sale2" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['sale2']?if_exists?html}" /></td>
  153. </tr>
  154. <tr>
  155. <td align="right"><label class="Validform_label">存货</label></td>
  156. <td colspan="3" class="value"><input id="inventory1" name="inventory1" type="text" style="width: 130px" class="inputxt" value="${data['${tableName}']['inventory1']?if_exists?html}" /></td>
  157. <td align="right"><label class="Validform_label">存货</label></td>
  158. <td colspan="4" class="value"><input id="inventory2" name="inventory2" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['inventory2']?if_exists?html}" /></td>
  159. </tr>
  160. <tr>
  161. <td colspan="2" align="right"><label class="Validform_label">最高信用额度</label></td>
  162. <td colspan="4" class="value"><input id="max_money" name="max_money" type="text" style="width: 200px" class="inputxt" value="${data['${tableName}']['max_money']?if_exists?html}" /></td>
  163. <td align="right"><label class="Validform_label">客户等级</label></td>
  164. <td colspan="4" class="value"><input id="cust_level" name="cust_level" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['cust_level']?if_exists?html}" /></td>
  165. </tr>
  166. <tr>
  167. <td colspan="2" align="right"><label class="Validform_label">总体月均库存数</label></td>
  168. <td colspan="4" class="value"><input id="all_avg_inventory" name="all_avg_inventory" type="text" style="width: 200px" class="inputxt" value="${data['${tableName}']['all_avg_inventory']?if_exists?html}" /></td>
  169. <td align="right"><label class="Validform_label">月均库存数</label></td>
  170. <td colspan="4" class="value"><input id="avg_inventory" name="avg_inventory" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['avg_inventory']?if_exists?html}" /></td>
  171. </tr>
  172. <tr>
  173. <td colspan="2" align="right"><label class="Validform_label">价格/折扣</label></td>
  174. <td colspan="4" class="value"><input id="price" name="price" type="text" style="width: 200px" class="inputxt" value="${data['${tableName}']['price']?if_exists?html}" /></td>
  175. <td align="right"><label class="Validform_label">支持和服务的承诺</label></td>
  176. <td colspan="4" class="value"><input id="promise" name="promise" type="text" style="width: 250px" class="inputxt" value="${data['${tableName}']['promise']?if_exists?html}" /></td>
  177. </tr>
  178. <tr>
  179. <td colspan="2" align="right"><label class="Validform_label">竞品经营情况</label></td>
  180. <td colspan="9" class="value"><input id="competing_goods" name="competing_goods" type="text" style="width: 620px" class="inputxt" value="${data['${tableName}']['competing_goods']?if_exists?html}" /></td>
  181. </tr>
  182. <tr id = "sub_tr" style="display: none;">
  183. <td colspan="11" align="center">
  184. <input type="button" value="提交" onclick="neibuClick();" class="ui_state_highlight">
  185. </td>
  186. </tr>
  187. </table>
  188. <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>
  189. </form>
  190. <#--update-end--Author:luobaoli Date:20150614 for:表单单表属性中增加了扩展参数 ${po.extend_json?if_exists}-->
  191. <script type="text/javascript">
  192. function uploadFile(data){
  193. frameElement.api.opener.reloadTable();
  194. frameElement.api.close();
  195. }
  196. function getChecked(checkName,inputID){
  197. var checkObj= $("input[type='checkbox'][name='"+checkName+"']:checked");
  198. var val="";
  199. $.each(checkObj,function(i,f){
  200. val+=","+ f.value;
  201. });
  202. $("#"+inputID).val(val);
  203. }
  204. $(function(){
  205. //查看模式情况下,删除和上传附件功能禁止使用
  206. if(location.href.indexOf("goDetail.do")!=-1){
  207. $(".jeecgDetail").hide();
  208. }
  209. if(location.href.indexOf("goDetail.do")!=-1){
  210. //查看模式控件禁用
  211. $("#formobj").find(":input").attr("disabled","disabled");
  212. }
  213. if(location.href.indexOf("goAddButton.do")!=-1||location.href.indexOf("goUpdateButton.do")!=-1){
  214. //其他模式显示提交按钮
  215. $("#sub_tr").show();
  216. }
  217. });
  218. var neibuClickFlag = false;
  219. function neibuClick() {
  220. neibuClickFlag = true;
  221. $('#btn_sub').trigger('click');
  222. }
  223. $.dialog.setting.zIndex =1990;
  224. function del(url,obj){
  225. $.dialog.confirm("确认删除该条记录?", function(){
  226. $.ajax({
  227. async : false,
  228. cache : false,
  229. type : 'POST',
  230. url : url,// 请求的action路径
  231. error : function() {// 请求失败处理函数
  232. },
  233. success : function(data) {
  234. var d = $.parseJSON(data);
  235. if (d.success) {
  236. var msg = d.msg;
  237. tip(msg);
  238. $(obj).closest("tr").hide("slow");
  239. }
  240. }
  241. });
  242. }, function(){
  243. });
  244. }
  245. <#--add-start--Author:钟世云 Date:20150614 for:online支持树配置-->
  246. /**树形列表数据转换**/
  247. function convertTreeData(rows, textField) {
  248. for(var i = 0; i < rows.length; i++) {
  249. var row = rows[i];
  250. row.text = row[textField];
  251. if(row.children) {
  252. row.state = "open";
  253. convertTreeData(row.children, textField);
  254. }
  255. }
  256. }
  257. /**树形列表加入子元素**/
  258. function joinTreeChildren(arr1, arr2) {
  259. for(var i = 0; i < arr1.length; i++) {
  260. var row1 = arr1[i];
  261. for(var j = 0; j < arr2.length; j++) {
  262. if(row1.id == arr2[j].id) {
  263. var children = arr2[j].children;
  264. if(children) {
  265. row1.children = children;
  266. }
  267. }
  268. }
  269. }
  270. }
  271. <#--add-end--Author:钟世云 Date:20150614 for:online支持树配置-->
  272. </script>
  273. <script type="text/javascript">${js_plug_in?if_exists}</script>
  274. </body>
  275. </html>