enterprise_input.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. <style>
  2. .measure-input {
  3. background: transparent url("${ctxPath}/static/images/ruler.gif") repeat-x scroll 0 bottom
  4. }
  5. .mutiUpload {
  6. max-width: 510px;
  7. height: auto;
  8. font-size: 18px;
  9. margin-left: 90px;
  10. margin-top: -10px;
  11. }
  12. .mutiUpload div {
  13. line-height: 1.8;
  14. }
  15. .mutiUpload p {
  16. font-size: 20px;
  17. }
  18. .bjui-pageContent {
  19. margin: 0 auto;
  20. }
  21. </style>
  22. <script type="text/javascript">
  23. function thumb_upload_success(file, data) {
  24. var json = $.parseJSON(data)
  25. $(this).bjuiajax('ajaxDone', json)
  26. if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
  27. $('#qy_file_zz').val(json.filename).trigger('validate')
  28. $('#j_custom_pic').val(json.filename)
  29. $('#j_custom_span_pic').html('<img src="' + json.filename + '" style="margin: 10px 0 0 0" WIDTH="200" HEIGHT="120"/>')
  30. }
  31. }
  32. function upload_success(file, data) {
  33. var json = $.parseJSON(data)
  34. $(this).bjuiajax('ajaxDone', json)
  35. if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
  36. $('#qy_file_logo').val(json.filename).trigger('validate')
  37. $('#j_custom_p').val(json.filename)
  38. $('#j_custom_span_p').html('<img src="' + json.filename + '" style="margin: 10px 0 0 0" WIDTH="200" HEIGHT="120"/>')
  39. }
  40. }
  41. </script>
  42. <div class="bjui-pageContent" style="width: 1025px;height: 510px">
  43. <form method="post" action="${ctxPath}/cms/enterprise/update" id="j_model_form" data-toggle="validate"
  44. data-autorefresh="true" data-alertmsg="false">
  45. <input TYPE="hidden" name="qy_id" value="${content.qy_id!}">
  46. <input TYPE="hidden" name="userId" value="${session.SysUser.userId!}">
  47. <input TYPE="hidden" name="siteId" value="${session.SysUser.siteId!}">
  48. <div class="form-group tc">
  49. <label for="zh_id" class="control-label x85"><span style="color: red">*</span>企业账号:</label>
  50. <select id="zh_id" name="zh_id" style="width: 500px;height: 25px;" onchange="change(this.value)"
  51. data-rule="required;">
  52. <option value="">请选择企业账号</option>
  53. @for(zh in zhList){
  54. @if(!isEmpty(content.zh_id) && content.zh_id==zh.zh_id){
  55. <option value="${zh.zh_id!}" selected="selected">${zh.zh_user!}</option>
  56. @}else{
  57. <option value="${zh.zh_id!}">${zh.zh_user!}</option>
  58. @}
  59. @}
  60. </select>
  61. </div>
  62. <hr style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  63. <div class="form-group tc">
  64. <label for="qy_qymc" class="control-label x85"><span style="color: red">*</span>企业名称:</label>
  65. <input type="text" name="qy_qymc" id="qy_qymc" class="input-nm" style="width: 500px;" maxlength="20"
  66. value="${content.qy_qymc!,xss}" data-rule="required;" placeholder="请填写企业名称" size="50">
  67. </div>
  68. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  69. <div class="form-group tc">
  70. <label class="control-label x85">LOGO:</label>
  71. <div style="display: inline-block; vertical-align: middle;">
  72. <div id="qy_file_logo" data-toggle="upload" data-uploader="${ctxPath}/uploads"
  73. data-file-size-limit="1024000000"
  74. data-file-type-exts="*.jpg;*.png;*.gif;*.mpg"
  75. data-multi="false"
  76. data-on-upload-success="upload_success"
  77. data-icon="cloud-upload"></div>
  78. <input type="hidden" name="qy_file_logo" value="${content.qy_file_logo!}" id="j_custom_p">
  79. <span id="j_custom_span_p">
  80. @if(isNotEmpty(content.qy_file_logo)){
  81. <IMG WIDTH="200" HEIGHT="120" style="margin: 10px 0 0 0" src="${content.qy_file_logo!}">
  82. @}
  83. </span>
  84. </div>
  85. </div>
  86. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  87. <div class="form-group tc">
  88. <label class="control-label x85">营业执照:</label>
  89. <div style="display: inline-block; vertical-align: middle;">
  90. <div id="qy_file_zz" data-toggle="upload" data-uploader="${ctxPath}/uploads"
  91. data-file-size-limit="1024000000"
  92. data-file-type-exts="*.jpg;*.png;*.gif;*.mpg"
  93. data-multi="false"
  94. data-on-upload-success="thumb_upload_success"
  95. data-icon="cloud-upload"></div>
  96. <input type="hidden" name="qy_file_zz" value="${content.qy_file_zz!}" id="j_custom_pic">
  97. <span id="j_custom_span_pic">
  98. @if(isNotEmpty(content.qy_file_zz)){
  99. <IMG WIDTH="200" HEIGHT="120" style="margin: 10px 0 0 0" src="${content.qy_file_zz!}">
  100. @}
  101. </span>
  102. </div>
  103. </div>
  104. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  105. <div class="form-group tc" style=" position: relative; ">
  106. <label class="control-label x85"><span style="color: red">*</span>所属行业:</label>
  107. <input type="text" name="qy_sshy" id="int_hy_input" class="input-nm" value="${content.qy_sshy!,xss}"
  108. data-rule="required;" placeholder="请填写所属行业" size="50">
  109. <!-- <span class="ic i_block pointer" id="indtype_click1" onclick="work_industry_click(1)" style="cursor: pointer;">选择</span>-->
  110. <input id="btn_IndustryID" type="button" onclick="IndustrySelect('int_hy_input')"
  111. style=" position: absolute; left: 57%; top: 8px; "/>
  112. </div>
  113. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  114. <div class="form-group tc">
  115. <label for="qy_jjlx" class="control-label x85"><span style="color: red">*</span>企业类型:</label>
  116. <select name="qy_jjlx" id="qy_jjlx" style="width: 500px;height: 25px;" data-rule="required;">
  117. <option value="0">国有企业</option>
  118. <option value="1">集体企业</option>
  119. <option value="2">私营企业</option>
  120. <option value="3">个体企业</option>
  121. <option value="4">联营企业</option>
  122. <option value="5">股份制企业</option>
  123. <option value="6">外商投资企业</option>
  124. <option value="7">港澳台投资企业</option>
  125. <option value="8">其他企业</option>
  126. </select>
  127. </div>
  128. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  129. <div class="form-group tc">
  130. <label for="qy_qygm" class="control-label x85"><span style="color: red">*</span>企业规模:</label>
  131. <select name="qy_qygm" id="qy_qygm" style="width: 500px;height: 25px;" data-rule="required;">
  132. <option value="0">20人以下</option>
  133. <option value="1">20-99人</option>
  134. <option value="2">100-499人</option>
  135. <option value="3">500-999人</option>
  136. <option value="4">1000-9999人</option>
  137. <option value="5">10000人以上</option>
  138. </select>
  139. </div>
  140. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  141. <div class="form-group tc">
  142. <label for="qy_qyjl" class="control-label x85">企业简历:</label>
  143. <textarea id="qy_qyjl" name="qy_qyjl" placeholder="请填写企业简历" maxlength="500"
  144. style="height: 200px;resize:none;" cols="50">${content.qy_qyjl!,xss}</textarea>
  145. </div>
  146. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  147. <div class="form-group tc">
  148. <label for="qy_qyfl1" class="control-label x85">企业福利:</label>
  149. <label><input type="checkbox" id="qy_qyfl1" name="qy_qyfl" value="1"/>五险一金</label>
  150. <label><input type="checkbox" id="qy_qyfl2" name="qy_qyfl" value="2"/>节日福利</label>
  151. <label><input type="checkbox" id="qy_qyfl3" name="qy_qyfl" value="3"/>带薪年假</label>
  152. <label><input type="checkbox" id="qy_qyf14" name="qy_qyfl" value="4"/>现金补贴</label>
  153. </div>
  154. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  155. <div class="form-group tc">
  156. <label for="qy_qywz" class="control-label x85">企业网址:</label>
  157. <input type="text" name="qy_qywz" id="qy_qywz" value="${content.qy_qywz!,xss}" maxlength="20"
  158. class="input-nm" placeholder="请填写企业网址" size="50">
  159. </div>
  160. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  161. <div class="form-group tc">
  162. <label for="qy_lxr" class="control-label x85"><span style="color: red">*</span>联系人:</label>
  163. <input type="text" name="qy_lxr" id="qy_lxr" value="${content.qy_lxr!,xss}" maxlength="5" class="input-nm"
  164. data-rule="required;" placeholder="请填写联系人" size="50">
  165. </div>
  166. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  167. <div class="form-group tc">
  168. <label for="qy_lxdh" class="control-label x85"><span style="color: red">*</span>联系电话:</label>
  169. <input type="text" name="qy_lxdh" id="qy_lxdh" value="${content.qy_lxdh!,xss}" onchange="lxdhyz()" maxlength="20"
  170. class="input-nm" data-rule="required;" placeholder="请填写联系电话" >
  171. </div>
  172. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  173. <div class="form-group tc">
  174. <label for="qy_yx" class="control-label x85"><span style="color: red">*</span>邮编:</label>
  175. <input type="text" name="qy_yx" id="qy_yx" onchange="yx()" value="${content.qy_yx!,xss}" class="input-nm"
  176. data-rule="required;" placeholder="请填写邮政编码" size="50">
  177. </div>
  178. <hr class="tc" style="margin-top: 3px!important;padding-top: 3px;margin-bottom: 3px!important;">
  179. <div class="form-group tc">
  180. <label for="qy_xxdz" class="control-label x85"><span style="color: red">*</span>详细地址:</label>
  181. <input type="text" name="qy_xxdz" id="qy_xxdz" value="${content.qy_xxdz!,xss}" maxlength="50"
  182. class="input-nm" data-rule="required;" placeholder="请填写详细地址" size="50">
  183. </div>
  184. </form>
  185. </div>
  186. <div class="bjui-pageFooter" style="">
  187. <ul>
  188. <li>
  189. <!--<button onclick="chognzhiqy()" class="btn btn-blue" data-icon="pencil"> 重置</button>-->
  190. <input onclick="chognzhiqy()" type="button" class="btn btn-blue" data-icon="pencil" value="重置">
  191. </li>
  192. <li>
  193. <button type="submit" class="btn btn-green" data-icon="send"> 保存发布</button>
  194. </li>
  195. </ul>
  196. </div>
  197. <!--<div class="bjui-pageFooter">
  198. <ul>
  199. <li><button type="submit" class="btn-default" style=" margin-right: 565px;" data-icon="save">保存</button></li>
  200. </ul>
  201. </div>-->
  202. <div id="layer_back_drop" class="layer_back_drop_class" style=""></div>
  203. <div id="base_area_layer" class="layer_class" init="true">
  204. <iframe scrolling="auto" width="100%" height="100%" frameborder="0" id="iframe"></iframe>
  205. </div>
  206. <input type="hidden" id="work_func">
  207. <input type="hidden" id="count" value="5">
  208. <script>
  209. function isNull(str) {
  210. if (str == "")
  211. return true;
  212. var regu = "^[ ]+$";
  213. var re = new RegExp(regu);
  214. return re.test(str);
  215. }
  216. function isNumber(str)
  217. {
  218. var reg = /^\d+$/;
  219. if (reg.test(str))
  220. return true;
  221. else
  222. return false;
  223. }
  224. function isTelephone(s){
  225. var reg=/^((0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/;
  226. if(!reg.test(s))
  227. return false;
  228. return true ;
  229. }
  230. function checkMobile(s) {
  231. var regu = /^[1][0-9][0-9]{9}$/;
  232. var re = new RegExp(regu);
  233. if (re.test(s)) {
  234. return true;
  235. } else {
  236. return false;
  237. }
  238. }
  239. function lxdhyz(){
  240. var qy_lxdh =$('#qy_lxdh').val();
  241. if(isNull(qy_lxdh)){
  242. alert("联系电话不能为空,清填写!");
  243. return false;
  244. }else if(checkMobile(qy_lxdh) || isTelephone(qy_lxdh) || (isNumber(qy_lxdh) && qy_lxdh.length<=8) ){
  245. }else{
  246. alert("联系电话格式不对,清填写手机号或区号加电话号或电话号!");
  247. $('#qy_lxdh').val("");
  248. return false;
  249. }
  250. }
  251. function chognzhiqy() {
  252. if(isNull("${content.qy_qymc!,xss}")){
  253. $("#qy_qymc").val("");
  254. }else{
  255. $("#qy_qymc").val("${content.qy_qymc!,xss}");
  256. }
  257. if(isNull("${zhinfo.zh_id!}")){
  258. $("#zh_id").val("");
  259. }else{
  260. $("#zh_id").val("${zhinfo.zh_id!}");
  261. }
  262. if(isNull("${content.qy_sshy!,xss}")){
  263. $("#int_hy_input").val("");
  264. }else{
  265. $("#int_hy_input").val("${content.qy_sshy!,xss}");
  266. }
  267. if(isNull("${content.qy_jjlx!}")){
  268. $("#qy_jjlx").val("0");
  269. }else{
  270. $("#qy_jjlx").find("option[value='${content.qy_jjlx!}']").attr("selected", 'selected');
  271. }
  272. if(isNull("${content.qy_qygm!}")){
  273. $("#qy_qygm").val("0");
  274. }else{
  275. $("#qy_qygm").find("option[value='${content.qy_qygm!}']").attr("selected", 'selected');
  276. }
  277. if(isNull("${content.qy_qyfl!}")){
  278. var boxObj = $("input:checkbox[name='qy_qyfl']"); //获取所有的复选框
  279. boxObj[0].checked = false;
  280. boxObj[1].checked = false;
  281. boxObj[2].checked = false;
  282. boxObj[3].checked = false;
  283. }else{
  284. var boxObj1 = $("input:checkbox[name='qy_qyfl']");
  285. boxObj1[0].checked = false;
  286. boxObj1[1].checked = false;
  287. boxObj1[2].checked = false;
  288. boxObj1[3].checked = false;
  289. var boxObj = $("input:checkbox[name='qy_qyfl']"); //获取所有的复选框
  290. var expresslist = '${content.qy_qyfl!}'; //用el表达式获取在控制层存放的复选框的值为字符串类型
  291. var express = expresslist.split(','); //去掉它们之间的分割符“,”
  292. for (i = 0; i < boxObj.length; i++) {
  293. for (j = 0; j < express.length; j++) {
  294. if (boxObj[i].value == express[j]) //如果值与修改前的值相等
  295. {
  296. boxObj[i].checked = true;
  297. break;
  298. }
  299. }
  300. }
  301. }
  302. if(isNull("${content.qy_qywz!,xss}")){
  303. $("#qy_qywz").val("");
  304. }else{
  305. $("#qy_qywz").val("${content.qy_qywz!,xss}");
  306. }
  307. if(isNull("${content.qy_lxr!,xss}")){
  308. $("#qy_lxr").val("");
  309. }else{
  310. $("#qy_lxr").val("${content.qy_lxr!,xss}");
  311. }
  312. if(isNull("${content.qy_lxdh!,xss}")){
  313. $("#qy_lxdh").val("");
  314. }else{
  315. $("#qy_lxdh").val("${content.qy_lxdh!,xss}");
  316. }
  317. if(isNull("${content.qy_yx!,xss}")){
  318. $("#qy_yx").val("");
  319. }else{
  320. $("#qy_yx").val("${content.qy_yx!,xss}");
  321. }
  322. if(isNull("${content.qy_xxdz!,xss}")){
  323. $("#qy_xxdz").val("");
  324. }else{
  325. $("#qy_xxdz").val("${content.qy_xxdz!,xss}");
  326. }
  327. if(isNull("${content.qy_file_logo!}")){
  328. $("#j_custom_p").val("");
  329. $("#j_custom_span_p").text("");
  330. }else{
  331. $('#j_custom_p').val("${content.qy_file_logo!}");
  332. $('#j_custom_span_p').html('<img src="${content.qy_file_logo!}" style="margin: 10px 0 0 0" WIDTH="200" HEIGHT="120"/>');
  333. }
  334. if(isNull("${content.qy_file_zz!}")){
  335. $('#j_custom_pic').val("");
  336. $('#j_custom_span_pic').text("");
  337. }else{
  338. $('#j_custom_pic').val("${content.qy_file_zz!}")
  339. $('#j_custom_span_pic').html('<img src="${content.qy_file_zz!}" style="margin: 10px 0 0 0" WIDTH="200" HEIGHT="120"/>')
  340. }
  341. }
  342. $(function () {
  343. $("#qy_jjlx").find("option[value='${content.qy_jjlx!}']").attr("selected", 'selected');
  344. $("#qy_qygm").find("option[value='${content.qy_qygm!}']").attr("selected", 'selected');
  345. var boxObj = $("input:checkbox[name='qy_qyfl']"); //获取所有的复选框
  346. var expresslist = '${content.qy_qyfl!}'; //用el表达式获取在控制层存放的复选框的值为字符串类型
  347. var express = expresslist.split(','); //去掉它们之间的分割符“,”
  348. for (i = 0; i < boxObj.length; i++) {
  349. for (j = 0; j < express.length; j++) {
  350. if (boxObj[i].value == express[j]) //如果值与修改前的值相等
  351. {
  352. boxObj[i].checked = true;
  353. break;
  354. }
  355. }
  356. }
  357. });
  358. function yx() {
  359. var qy_yx=$('#qy_yx').val();
  360. var re= /^[1-9][0-9]{5}$/;
  361. if(qy_yx==''){
  362. alert("请填写邮箱");
  363. return;
  364. }else if(!re.test(qy_yx)){
  365. alert('邮政编码格式不正确,请重新输入');
  366. $('#qy_yx').val("");
  367. return false;
  368. }
  369. }
  370. function change(zh_id) {
  371. var formData = new FormData();
  372. formData.append('zh_id', zh_id);
  373. $.ajax({
  374. url: "${ctxPath}/cms/enterprise/selectZhId", //请求的url地址
  375. dataType: "json", //返回格式为json
  376. data: formData, //参数值
  377. type: "post", //请求方式
  378. crossDomain: true,
  379. cache: false,
  380. processData: false,
  381. contentType: false,
  382. success: function (data) {
  383. if (data != null) {
  384. alert("当前账号已添加企业,请重新选择");
  385. $("#zh_id").val(null).trigger("change");
  386. }
  387. },
  388. });
  389. }
  390. </script>
  391. <!--行业选择开始-->
  392. <script type="text/javascript">
  393. // 是否在数组内
  394. function in_array(needle, haystack) {
  395. if (typeof needle == 'string' || typeof needle == 'number') {
  396. for (var i in haystack) {
  397. if (haystack[i] == needle) {
  398. return true;
  399. }
  400. }
  401. }
  402. return false;
  403. }
  404. </script>
  405. <!--行业-->
  406. <script type="text/javascript" src="${resPath}/bcrc/cssjs/drag.js"></script>
  407. <script type="text/javascript" src="${resPath}/bcrc/cssjs/funtype_arr.js"></script>
  408. <script type="text/javascript" src="${resPath}/bcrc/cssjs/industry_arr.js"></script>
  409. <script type="text/javascript" src="${resPath}/bcrc/cssjs/major_arr.js"></script>
  410. <script type="text/javascript" src="${resPath}/bcrc/cssjs/industry_funch.js"></script>
  411. <link rel="stylesheet" type="text/css" href="${resPath}/bcrc/cssjs/css.css"/>
  412. <link rel="stylesheet" type="text/css" href="${resPath}/bcrc/cssjs/alpha.css"/>
  413. <!--行业结束-->
  414. <!--<input id="btn_IndustryID" type="button" value="请选择行业" onclick="IndustrySelect('btn_IndustryID')" />-->
  415. <!-- alpha div -->
  416. <div id="maskLayer" style="display:none">
  417. <iframe id="maskLayer_iframe" frameBorder=0 scrolling=no style="filter:alpha(opacity=50)"></iframe>
  418. <div id="alphadiv" style="filter:alpha(opacity=50);-moz-opacity:0.5;opacity:0.5"></div>
  419. <div id="drag">
  420. <h3 id="drag_h"></h3>
  421. <div id="drag_con"></div><!-- drag_con end -->
  422. </div>
  423. </div><!-- maskLayer end -->
  424. </div>
  425. <!-- alpha div end -->
  426. <div id="sublist" style="display:none"></div>
  427. <style>
  428. #drag {
  429. top: 30px !important;
  430. left: 50px !important;
  431. }
  432. </style>
  433. <!--行业选择 结束-->