register.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>注册</title>
  7. <style>
  8. label.error {
  9. left: 15px;
  10. top: 29px
  11. }
  12. #filePicker div:nth-child(2) {
  13. width: 100% !important;
  14. height: 100% !important;
  15. }
  16. .ke-container {
  17. width: 100% !important;
  18. }
  19. .ke-swfupload-body {
  20. height: 265px
  21. }
  22. .ke-dialog-body {
  23. height: 340px !important;
  24. }
  25. .ke-dialog-default {
  26. height: 410px !important;
  27. }
  28. </style>
  29. </head>
  30. <body layout:fragment="content">
  31. <article class="page-container">
  32. <form class="form form-horizontal" id="form-information-add">
  33. <div class="row cl">
  34. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>基本信息:</label>
  35. <div class="formControls col-xs-8 col-sm-9">
  36. <label>有“<span class="c-red">*</span>”的为必填项</label>
  37. </div>
  38. </div>
  39. <div class="row cl">
  40. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>企业名称:</label>
  41. <div class="formControls col-xs-8 col-sm-3">
  42. <input type="text" required class="input-text" value="" placeholder="请输入企业名称" th:id="company_name"
  43. th:name="company_name"/>
  44. </div>
  45. </div>
  46. <div class="row cl">
  47. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>姓名:</label>
  48. <div class="formControls col-xs-8 col-sm-3">
  49. <div class="add_contact">
  50. <p><input type="text" required minlength="1" maxlength="45" class="width_200 input-text user_name"
  51. placeholder="请输入联系人姓名" th:name="user_name"/></p>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="row cl">
  56. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>账号名:</label>
  57. <div class="formControls col-xs-8 col-sm-3">
  58. <div class="add_contact">
  59. <p><input type="text" required class="ml_50 width_200 input-text nick_name" th:name="nick_name"
  60. th:id="nick_name"
  61. placeholder="账号名可以为组织机构代码等"/></p>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="row cl">
  66. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>手机号:</label>
  67. <div class="formControls col-xs-8 col-sm-3">
  68. <div class="add_contact">
  69. <p><input type="text" required isMobile="true" class="ml_50 width_200 input-text phone"
  70. placeholder="请输入手机号" th:name="phone" th:id="phone"/></p>
  71. <input id="verificationCode" onClick="getVerificationCode()" type="button"
  72. class="btn btn-primary radius" value="获取验证码"/>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="row cl">
  77. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>验证码:</label>
  78. <div class="formControls col-xs-8 col-sm-3">
  79. <div class="add_contact">
  80. <p><input type="text" required class="ml_50 width_200 input-text" th:name="validateNum"
  81. placeholder="请输入短信验证码"/></p>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="row cl">
  86. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>密码:</label>
  87. <div class="formControls col-xs-8 col-sm-3">
  88. <div class="add_contact">
  89. <p><input type="password" required class="ml_50 width_200 input-text " th:name="password"
  90. placeholder="请至少输入六个字符" th:id="password"/></p>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="row cl">
  95. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>确认密码:</label>
  96. <div class="formControls col-xs-8 col-sm-3">
  97. <div class="add_contact">
  98. <p><input type="password" required class="ml_50 width_200 input-text " th:name="repassword"
  99. placeholder="请再次输入密码"/></p>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="row cl">
  104. <input type="hidden" name="street_id" id="street_id"/>
  105. <input type="hidden" name="street_name" id="street_name"/>
  106. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>企业工商注册属地:</label>
  107. <div class="formControls col-xs-8 col-sm-3">
  108. <span class="select-box">
  109. <select class="select" id="Street" onchange="getStreet_ids1()" required>
  110. <option value="">--请选择--</option>
  111. <option th:each="item : ${streetList}" th:value="${item.id}" th:text="${item.name}"/>
  112. </select>
  113. </span>
  114. </div>
  115. </div>
  116. <div class="row cl">
  117. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>注册地址:</label>
  118. <div class="formControls col-xs-8 col-sm-8">
  119. <input type="text" required class="input-text" th:id="location" th:name="location"/>
  120. </div>
  121. </div>
  122. <div class="row cl more">
  123. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span></label>
  124. <div class="formControls col-xs-8 col-sm-9">
  125. <input onClick="showMore()" type="button" class="btn btn-primary radius" value="点击展开"/>
  126. </div>
  127. </div>
  128. <div class="less" hidden>
  129. <div class="row cl">
  130. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>拓展信息:</label>
  131. <div class="formControls col-xs-8 col-sm-9">
  132. <label>注册后,属地将会审核账号信息,填写的信息越全,才能越快越容易的通过审核</label>
  133. </div>
  134. </div>
  135. <!-- 企业信息----------------------------------------- 开始 -->
  136. <div class="row cl">
  137. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>组织机构代码: </label>
  138. <div class="formControls col-xs-8 col-sm-3">
  139. <input type="text" class="input-text" placeholder="请输入组织机构代码" th:id="organization_code"
  140. th:name="organization_code"/>
  141. </div>
  142. <div class="formControls col-xs-8 col-sm-3" style="padding-left: 0px;">
  143. <i style="color:#5a98de;font-size: 20px;" title="组织机构代码是统一社会信用代码的第9-17位" class="icon Hui-iconfont">&#xe633;</i>
  144. </div>
  145. </div>
  146. <div class="row cl">
  147. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>统一社会信用代码:</label>
  148. <div class="formControls col-xs-8 col-sm-3">
  149. <input type="text" class="input-text" value="" th:id="uscc" th:name="uscc"/>
  150. </div>
  151. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业编号:</label>
  152. <div class="formControls col-xs-8 col-sm-3">
  153. <input type="text" class="input-text" value="" th:id="no" th:name="no"/>
  154. </div>
  155. </div>
  156. <div class="row cl">
  157. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>所属行业:</label>
  158. <div class="formControls col-xs-8 col-sm-3">
  159. <span class="select-box">
  160. <select class="select" th:name="industry_code" id="industryTypeList">
  161. <option value="">--请选择--</option>
  162. <option value="" th:each="item : ${industryTypeList}" th:value="${item.value}"
  163. th:text="${item.name}">
  164. </option>
  165. </select>
  166. </span>
  167. </div>
  168. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>法定代表人:</label>
  169. <div class="formControls col-xs-8 col-sm-3">
  170. <input type="text" class="input-text" value="" th:id="legal_representative"
  171. th:name="legal_representative"/>
  172. </div>
  173. </div>
  174. <div class="row cl" id="industry" hidden>
  175. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>其它行业:</label>
  176. <div class="formControls col-xs-8 col-sm-3">
  177. <input type="text" class="input-text" value="" th:id="industry_name" th:name="industry_name"
  178. placeholder="请输入所属行业"/>
  179. </div>
  180. </div>
  181. <div class="row cl">
  182. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>是否经营:</label>
  183. <div class="formControls col-xs-8 col-sm-3">
  184. <label>
  185. <input name="is_product" checked type="radio" value="true">
  186. 是</label>
  187. <label>
  188. <input type="radio" name="is_product" value="false">
  189. 否</label>
  190. </div>
  191. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业性质:</label>
  192. <div class="formControls col-xs-8 col-sm-3">
  193. <span class="select-box">
  194. <select class="select" th:name="type_id">
  195. <option value="">--请选择--</option>
  196. <option value="" th:each="item : ${companyTypeList}" th:value="${item.id}"
  197. th:text="${item.name}">
  198. </option>
  199. </select>
  200. </span>
  201. </div>
  202. </div>
  203. <div class="row cl">
  204. <label class="form-label col-xs-4 col-sm-2"><span>经营范围:</span></label>
  205. <div class="formControls col-xs-8 col-sm-8">
  206. <input type="text" class="input-text" th:id="business" th:name="business"/>
  207. </div>
  208. </div>
  209. <div class="row cl">
  210. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册资本:</label>
  211. <div class="formControls col-xs-6 col-sm-2" style="padding-right: 0;">
  212. <input type="hidden" name="currency_unit" id="currency_unit"/>
  213. <span class="select-box">
  214. <select id="currency" class="select" onchange="bindCurrency()">
  215. <option th:each="item : ${itemList}" th:value="${item.id}" th:text="${item.name}"/>
  216. </select>
  217. </span>
  218. </div>
  219. <div class="formControls col-xs-8 col-sm-3">
  220. <input type="text" class="input-text" th:id="registration_capital" th:name="registration_capital"/>
  221. </div>
  222. <div class="col-xs-2 col-sm-3">(万元)</div>
  223. </div>
  224. <div class="row cl">
  225. <label class="form-label col-xs-2 col-sm-2"><span class="c-red"></span>注册时间:</label>
  226. <div class="formControls col-xs-10 col-sm-3">
  227. <input type="text" class="input-text" th:id="establishment_date" th:name="establishment_date"/>
  228. </div>
  229. <label class="form-label col-xs-2 col-sm-2"><span class="c-red"></span>员工数(人):</label>
  230. <div class="formControls col-xs-10 col-sm-3">
  231. <input type="text" class="input-text" th:id="staff_number" th:name="staff_number"/>
  232. </div>
  233. </div>
  234. <div class="row cl">
  235. <label class="form-label col-xs-4 col-sm-2"><span>相关证件:</span></label>
  236. <div class="formControls col-xs-8 col-sm-8">
  237. <table class="table table-border table-bordered table-bg table-hover">
  238. <thead>
  239. <tr class="text-c">
  240. <th>文件名</th>
  241. <th>附件</th>
  242. <th>操作</th>
  243. </tr>
  244. </thead>
  245. <tbody id="uploadList">
  246. </tbody>
  247. </table>
  248. <div class="uploader-thum-container">
  249. <p id="state" style="padding-top: 2px;"></p>
  250. <div id="progress" style="padding-bottom: 2px;"></div>
  251. <div id="fileListPre" class="uploader-list"></div>
  252. <div id="filePicker">选择文件</div>
  253. </div>
  254. </div>
  255. </div>
  256. <div class="row cl">
  257. <label class="form-label col-xs-4 col-sm-2"><span>其他联系人信息:</span></label>
  258. <div class="formControls col-xs-8 col-sm-8">
  259. <table class="table table-border table-bordered table-bg table-hover">
  260. <thead>
  261. <tr class="text-c">
  262. <th>联系人</th>
  263. <th>联系电话</th>
  264. <th>邮箱</th>
  265. <th>操作</th>
  266. </tr>
  267. </thead>
  268. <tbody id="companyContact">
  269. </tbody>
  270. </table>
  271. <input onclick="addContacts()" type="button" class="btn btn-primary radius" value="添加"
  272. style="margin-top: 15px;"/>
  273. </div>
  274. </div>
  275. <div class="row cl">
  276. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span></label>
  277. <div class="formControls col-xs-8 col-sm-9">
  278. <input onClick="hideMore()" type="button" class="btn btn-primary radius" value="点击收起"/>
  279. </div>
  280. </div>
  281. </div>
  282. <!-- 企业信息 ------------------------------------------- 结束 -->
  283. <div class="row cl">
  284. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  285. <a onclick="submit()" class="btn btn-primary radius norefactor"><i class="Hui-iconfont">&#xe632;</i>注册</a>
  286. <!--<button class="btn btn-primary radius norefactor" type="submit"><i class="Hui-iconfont">&#xe632;</i>注册</button>-->
  287. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  288. </div>
  289. </div>
  290. </form>
  291. </article>
  292. <script th:inline="javascript">
  293. //window.onload = function () {
  294. $(function () {
  295. var options = {
  296. uploadBtnId: '#filePicker',
  297. picturePreId: 'fileListPre',
  298. hiddenPictureUrl: 'img',
  299. hiddenPictureName: 'imgName',
  300. width: 81,
  301. height: 81,
  302. fileSizeLimit: 100 * 1024 * 1024,
  303. fileSingleSizeLimit: 100 * 1024 * 1024
  304. };
  305. var webUploadDocList = new $WebUploadDocList(options);
  306. webUploadDocList.init();
  307. })
  308. //}
  309. $("#industryTypeList").change(function () {
  310. if ($('#industryTypeList option:selected').val() == "Empty") {
  311. $("#industry").show()
  312. } else {
  313. $("#industry").hide()
  314. }
  315. });
  316. function showMore() {
  317. $(".more").hide()
  318. $(".less").show()
  319. }
  320. function hideMore() {
  321. $(".less").hide()
  322. $(".more").show()
  323. }
  324. /**
  325. * 取消
  326. */
  327. function removeIframe() {
  328. var index = parent.layer.getFrameIndex(window.name);
  329. parent.layer.close(index);
  330. }
  331. laydate.render({
  332. elem: '#establishment_date' //指定元素
  333. });
  334. function removeLine(obj) {
  335. $(obj).parent().parent().remove();
  336. }
  337. function addContact() {
  338. var length = $(".add_contact").length;
  339. var html = "<i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1;</i>";
  340. $(".add_contact:eq(0)").clone().insertAfter($('.add_contact').eq(-1))
  341. .find(".phone").removeAttr("name").attr("name", "companyContacts[" + length + "].phone").val("").end()
  342. .find(".contact").removeAttr("name").attr("name", "companyContacts[" + length + "].contact").val("").end()
  343. .find(".email").removeAttr("name").attr("name", "companyContacts[" + length + "].email").val("").end()
  344. .find(".icon_font").html(html).end();
  345. }
  346. var contact_index = 0;
  347. function addContacts() {
  348. var reg1 = /^[0-9]+.?[0-9]*$/;
  349. var reg2 = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
  350. var reg3 = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
  351. var flag = false;
  352. $(".isname").each(function () {
  353. var name = $(this).val();
  354. if (name == null || name == "") {
  355. errorMessage("请输入姓名!");
  356. flag = true;
  357. return
  358. } else if (reg1.test(name)) {
  359. errorMessage("姓名不能为数字!");
  360. flag = true;
  361. return
  362. }
  363. });
  364. $(".isphone").each(function () {
  365. var phone = $(this).val();
  366. if (phone == null || phone == "") {
  367. errorMessage("请输入手机号!");
  368. flag = true;
  369. return
  370. } else if (!reg2.test(phone)) {
  371. errorMessage("请输入正确的手机号!");
  372. flag = true;
  373. return
  374. }
  375. });
  376. $(".isemail").each(function () {
  377. var mail = $(this).val();
  378. if (mail == null || mail == "") {
  379. errorMessage("请输入邮箱!");
  380. flag = true;
  381. return
  382. } else if (!reg3.test(mail)) {
  383. errorMessage("请输入正确的邮箱!");
  384. flag = true;
  385. return
  386. }
  387. });
  388. if (flag) {
  389. return;
  390. }
  391. var str = ''
  392. str += '<tr class="text-c">'
  393. str += '<td>'
  394. str += '<input name="contactList[' + contact_index + '].contact" class="isname" maxlength="20">'
  395. str += '</td>'
  396. str += '<td>'
  397. str += '<input name="contactList[' + contact_index + '].phone" class="isphone" maxlength="20">'
  398. str += '</td>'
  399. str += '<td>'
  400. str += '<input name="contactList[' + contact_index + '].email" class="isemail" maxlength="40">'
  401. str += '</td>'
  402. str += '<td>'
  403. str += '<a href="javascript:;" onclick="delContact(this);">删除</a>'
  404. str += '</td>'
  405. str += '</tr>'
  406. $("#companyContact").append(str);
  407. contact_index++;
  408. }
  409. function delContact(obj) {
  410. var $this = $(obj);
  411. $this.parent().parent().remove();
  412. }
  413. /*绑定街道id*/
  414. function getStreet_ids1() {
  415. var value = $("#Street").find("option:selected").val();
  416. var text = $("#Street").find("option:selected").text();
  417. $("#street_id").val(value);
  418. $("#street_name").val(text);
  419. getBuilds();
  420. }
  421. /*绑定园区id*/
  422. function getBuild_ids1() {
  423. var value = $("#Builds").find("option:selected").val();
  424. var text = $("#Builds").find("option:selected").text();
  425. $("#build_id").val(value);
  426. //$("#build_name").val(text);
  427. }
  428. /*绑定币种单位*/
  429. function bindCurrency() {
  430. var value = $("#currency").find("option:selected").val();
  431. var text = $("#currency").find("option:selected").text();
  432. $("#currency_unit").val(value);
  433. }
  434. function getBuilds() {
  435. $.ajax({
  436. url: pagePath + "/company/companyInfoManage/selectBuildByStreetId",
  437. type: "post",
  438. data: {
  439. 'street_id': $("#street_id").val()
  440. },
  441. dataType: "json",
  442. success: function (result) {
  443. if (result.success) {
  444. var buildInfo = result.obj;
  445. bidBuild(buildInfo);
  446. } else {
  447. //errorMessage(result.message);
  448. }
  449. },
  450. error: function () {
  451. errorMessage('系统错误!');
  452. }
  453. });
  454. }
  455. function bidBuild(buildInfo) {
  456. $("#Builds option").remove();
  457. var option = '<option value="-1">' + "--请选择--" + '</option>'
  458. for (var i = 0; i < buildInfo.length; i++) {
  459. option += '<option value="' + buildInfo[i].id + '" name = "' + buildInfo[i].name + '" id = "' + buildInfo[i].id + '" >'
  460. option += buildInfo[i].name
  461. option += '</option>'
  462. }
  463. $("#Builds").append(option);
  464. }
  465. //获取验证码
  466. function getVerificationCode() {
  467. var phone = $("#phone").val();
  468. var v_regex = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
  469. if (phone) {
  470. if (v_regex.test(phone)) {
  471. //checkPhoneNumber(phone)
  472. //startCountDown();
  473. sendVerificationCode(phone);
  474. } else {
  475. errorMessage('手机号码格式不正确!');
  476. }
  477. } else {
  478. errorMessage('请输入手机号码!');
  479. }
  480. }
  481. //校验手机号码是否已被使用
  482. function checkPhoneNumber(phone) {
  483. $.ajax({
  484. dataType: "json",
  485. contentType: "application/json;charset=utf-8",
  486. url: pagePath + "/company/companyInfoManage/getPhone",
  487. type: "get",
  488. sync: true,
  489. data: {
  490. phone: phone
  491. },
  492. success: function (result) {
  493. if (result) {
  494. sendVerificationCode(phone);
  495. } else {
  496. errorMessage('该手机号码已被注册!');
  497. }
  498. },
  499. error: function () {
  500. errorMessage('系统错误!');
  501. }
  502. });
  503. }
  504. //发送验证码
  505. function sendVerificationCode(phone) {
  506. $.ajax({
  507. contentType: "application/json;charset=utf-8",
  508. dataType: "json",
  509. url: pagePath + "/home/sendVerificationCode",
  510. type: "get",
  511. sync: true,
  512. data: {
  513. phone: phone
  514. },
  515. success: function (result) {
  516. if (result.success) {
  517. startCountDown();
  518. succeedMessage(result.message);
  519. } else {
  520. errorMessage(result.message);
  521. }
  522. },
  523. error: function () {
  524. errorMessage('系统错误!');
  525. }
  526. });
  527. }
  528. //验证码倒计时
  529. function startCountDown() {
  530. var second = 60;//时间默认值
  531. $("#verificationCode").attr("disabled", true);
  532. var timer = null;
  533. timer = setInterval(function () {
  534. $("#verificationCode").val(second + "秒后重发")
  535. second--;
  536. if (second < 0) {
  537. $("#verificationCode").attr("disabled", false);
  538. $("#verificationCode").val("获取验证码")
  539. clearInterval(timer);
  540. }
  541. }, 1000);
  542. }
  543. /*自定义jQuery校验是9位数字和字母*/
  544. jQuery.validator.addMethod("LetterAndNum9", function (value, element) {
  545. return this.optional(element) || /^[a-zA-Z0-9]{9}$/.test(value);
  546. }, "组织结构代码由9位数字或字母组成");
  547. //保存企业信息
  548. $("#form-information-add").validate({
  549. rules: {
  550. company_name: {
  551. required: true,
  552. minlength: 1,
  553. maxlength: 60,
  554. remote: {
  555. url: pagePath + "/company/companyInfoManage/getConpanyName",
  556. type: "get",
  557. data: {
  558. company_name: function () {
  559. return $("#company_name").val();
  560. },
  561. id: ''
  562. }
  563. }
  564. },
  565. organization_code: {
  566. //required: true,
  567. remote: {
  568. url: pagePath + "/company/companyInfoManage/getOrganization_code",
  569. type: "get",
  570. data: {
  571. organization_code: function () {
  572. return $("#organization_code").val();
  573. },
  574. id: ''
  575. }
  576. },
  577. LetterAndNum9: $("#organization_code").val(),
  578. },
  579. no: {
  580. minlength: 1,
  581. maxlength: 60,
  582. },
  583. nick_name: {
  584. minlength: 1,
  585. maxlength: 60,
  586. remote: {
  587. url: pagePath + "/company/companyInfoManage/getNickName",
  588. type: "get",
  589. data: {
  590. nick_name: function () {
  591. return $("#nick_name").val();
  592. },
  593. id: ''
  594. }
  595. },
  596. },
  597. uscc: {
  598. minlength: 1,
  599. maxlength: 60,
  600. },
  601. /* organization_code: {
  602. minlength: 1,
  603. maxlength: 60,
  604. }, */
  605. industry_code: {
  606. minlength: 1,
  607. maxlength: 60,
  608. },
  609. legal_representative: {
  610. minlength: 1,
  611. maxlength: 60,
  612. },
  613. business: {
  614. minlength: 1,
  615. maxlength: 200,
  616. },
  617. registration_capital: {
  618. minlength: 1,
  619. maxlength: 60,
  620. number: true
  621. },
  622. value: {
  623. required: true,
  624. minlength: 1,
  625. maxlength: 60
  626. },
  627. relation_name: {
  628. minlength: 1,
  629. maxlength: 60
  630. },
  631. location: {
  632. minlength: 1,
  633. maxlength: 200
  634. },
  635. user_name: {
  636. minlength: 1,
  637. maxlength: 20
  638. },
  639. phone: {
  640. minlength: 1,
  641. maxlength: 20,
  642. /*remote: {
  643. url: pagePath + "/company/companyInfoManage/getPhone",
  644. type: "get",
  645. data: {
  646. company_name: function () {
  647. return $("#phone").val();
  648. },
  649. id: ''
  650. }
  651. },*/
  652. phone: true
  653. },
  654. isphone: {
  655. minlength: 1,
  656. maxlength: 20,
  657. phone: true
  658. },
  659. validateNum: {
  660. minlength: 1,
  661. maxlength: 20
  662. },
  663. password: {
  664. minlength: 6,
  665. maxlength: 20,
  666. // password: true,
  667. },
  668. repassword: {
  669. minlength: 6,
  670. maxlength: 20,
  671. repassword: true,
  672. },
  673. email: {
  674. //minlength: 6,
  675. maxlength: 20,
  676. email: true,
  677. }
  678. },
  679. messages: {
  680. company_name: {
  681. remote: "该公司名已存在!"
  682. },
  683. organization_code: {
  684. remote: "该组织机构代码已存在!"
  685. },
  686. phone: {
  687. remote: "该手机号码已被注册!"
  688. },
  689. nick_name: {
  690. remote: "该账号名已被注册!"
  691. }
  692. },
  693. });
  694. function submit() {
  695. console.log($('#form-information-add').valid());
  696. if($('#form-information-add').valid()){
  697. $("#form-information-add").ajaxSubmit({
  698. type: 'post',
  699. url: pagePath + "/home/register",
  700. dataType: "json",
  701. success: function (data) {
  702. if (data.success) {
  703. succeedMessage(data.message, 8000);
  704. setTimeout(function () {
  705. parent.removeIframe();
  706. }, 8000);
  707. $('.norefactor').removeAttr('onclick')
  708. } else {
  709. // $(form).find(":submit").attr("disabled", false);
  710. errorMessage(data.message);
  711. }
  712. },
  713. error: function () {
  714. errorMessage('系统错误!');
  715. }
  716. });
  717. }
  718. }
  719. </script>
  720. </body>
  721. </html>