companyInfoManage_edit.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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. .ke-container {
  13. width: 100% !important;
  14. }
  15. .ke-swfupload-body {
  16. height: 265px
  17. }
  18. .ke-dialog-body {
  19. height: 340px !important;
  20. }
  21. .ke-dialog-default {
  22. height: 410px !important;
  23. }
  24. .form-label {
  25. line-height: 32px;
  26. }
  27. .industry_name_show {
  28. display: block;
  29. }
  30. .industry_name_hide {
  31. display: none;
  32. }
  33. </style>
  34. </head>
  35. <body layout:fragment="content">
  36. <article class="page-container">
  37. <div class="row cl">
  38. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业信息</label>
  39. </div>
  40. <form class="form form-horizontal" id="form-information-edit">
  41. <!-- 企业信息----------------------------------------- 开始 -->
  42. <input type="hidden" th:name="id" th:id="companyId" th:value="${company.id}"/>
  43. <div class="row cl">
  44. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业编号:</label>
  45. <div class="formControls col-xs-8 col-sm-3">
  46. <input type="text" class="input-text" th:value="${company.no}" th:id="no" th:name="no"/>
  47. </div>
  48. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>企业名称:</label>
  49. <div class="formControls col-xs-8 col-sm-3">
  50. <input type="text" class="input-text" required th:value="${company.company_name}" th:id="company_name"
  51. th:name="company_name"/>
  52. </div>
  53. </div>
  54. <div class="row cl">
  55. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>统一社会信用代码:</label>
  56. <div class="formControls col-xs-8 col-sm-3">
  57. <input type="text" class="input-text" th:value="${company.uscc}" th:id="uscc" th:name="uscc"/>
  58. </div>
  59. <label class="form-label col-xs-4 col-sm-2">组织机构代码:</label>
  60. <div class="formControls col-xs-8 col-sm-3">
  61. <input type="text" class="input-text" th:value="${company.organization_code}" th:id="organization_code"
  62. th:name="organization_code"/>
  63. <!-- <input type="text" disabled="disabled" required class="input-text" th:value="${company.organization_code}" th:id="organization_code" th:name="organization_code"/> -->
  64. <!-- [[${company.organization_code}]] -->
  65. </div>
  66. </div>
  67. <div class="row cl">
  68. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>所属行业:</label>
  69. <div class="formControls col-xs-8 col-sm-3">
  70. <span class="select-box">
  71. <select class="select" th:name="industry_code" id="industryTypeList">
  72. <option value="">--请选择--</option>
  73. <option value="" th:each="item : ${industryTypeList}" th:value="${item.value}"
  74. th:selected="${company.industry_code==item.value}"
  75. th:text="${item.name}">
  76. </option>
  77. </select>
  78. </span>
  79. </div>
  80. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>法定代表人:</label>
  81. <div class="formControls col-xs-8 col-sm-3">
  82. <input type="text" class="input-text" th:value="${company.legal_representative}"
  83. th:id="legal_representative" th:name="legal_representative"/>
  84. </div>
  85. </div>
  86. <div class="row cl" id="industry"
  87. th:class="${company.industry_name!=null&&company.industry_name!=''&&company.industry_code=='Empty'}?'industry_name_show row cl':'industry_name_hide row cl'">
  88. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>其它行业:</label>
  89. <div class="formControls col-xs-8 col-sm-3">
  90. <input type="text" class="input-text" value="" th:id="industry_name" th:name="industry_name"
  91. th:value="${company.industry_name}"
  92. placeholder="请输入所属行业"/>
  93. </div>
  94. </div>
  95. <div class="row cl">
  96. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>是否经营:</label>
  97. <div class="formControls col-xs-8 col-sm-3">
  98. <label>
  99. <input name="is_product" type="radio" value="true" th:checked="${company.is_product==true}">
  100. 是</label>
  101. <label>
  102. <input type="radio" name="is_product" th:checked="${company.is_product==false}" value="false">
  103. 否</label>
  104. </div>
  105. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业性质:</label>
  106. <div class="formControls col-xs-8 col-sm-3">
  107. <span class="select-box">
  108. <select class="select" th:name="type">
  109. <option value="">--请选择--</option>
  110. <option value="" th:selected="${company.type==item.id}" th:each="item : ${companyTypeList}"
  111. th:value="${item.id}" th:text="${item.name}">
  112. </option>
  113. </select>
  114. </span>
  115. </div>
  116. </div>
  117. <div class="row cl">
  118. <label class="form-label col-xs-4 col-sm-2"><span>经营范围:</span></label>
  119. <div class="formControls col-xs-8 col-sm-8">
  120. <input type="text" class="input-text" th:id="business" th:name="business"
  121. th:value="${company.business}"/>
  122. </div>
  123. </div>
  124. <div class="row cl">
  125. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册资本:</label>
  126. <div class="formControls col-xs-6 col-sm-2" style="padding-right: 0;">
  127. <input type="hidden" name="currency_unit" id="currency_unit"/>
  128. <span class="select-box">
  129. <select class="select" id="currency" style="width:100%" onchange="bindCurrency()">
  130. <option value="">--请选择货币单位--</option>
  131. <option th:selected="${company.currency_unit==item.id}" th:each="item : ${itemList}"
  132. th:value="${item.id}" th:text="${item.name}"/>
  133. </select>
  134. </span>
  135. </div>
  136. <div class="formControls col-xs-8 col-sm-3">
  137. <input type="text" class="input-text" th:id="registration_capital" th:name="registration_capital"
  138. th:value="${company.registration_capital}"/>
  139. </div>
  140. <div class="col-xs-2 col-sm-3">(万元)</div>
  141. </div>
  142. <div class="row cl">
  143. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册时间:</label>
  144. <div class="formControls col-xs-8 col-sm-3">
  145. <input type="text" class="input-text" th:id="establishment_date" th:name="establishment_date"
  146. th:value="${company.establishment_date}"/>
  147. </div>
  148. </div>
  149. <div class="row cl">
  150. <input type="hidden" name="street_id" id="street_id"/>
  151. <input type="hidden" name="street_name" id="street_name"/>
  152. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>工商注册属地:</label>
  153. <div class="formControls col-xs-8 col-sm-3">
  154. <span class="select-box">
  155. <select class="select" id="Street" onchange="getStreet_ids1()" required>
  156. <option value="">--请选择--</option>
  157. <option th:selected="${company.street_id==item.id}" th:each="item : ${streetList}"
  158. th:value="${item.id}" th:text="${item.name}">
  159. </option>
  160. </select>
  161. </span>
  162. </div>
  163. <input type="hidden" name="build_id" id="build_id"/>
  164. <input type="hidden" name="build_name" id="build_name"/>
  165. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>所属园区:</label>
  166. <dd class="pushBuildsList">
  167. <div class="formControls col-xs-8 col-sm-3">
  168. <span class="select-box">
  169. <select class="select" id="Builds" onchange="getBuild_ids1()">
  170. <option value="">--请选择--</option>
  171. <option th:selected="${company.build_id==item.id}" th:each="item : ${buildInfo}"
  172. th:value="${item.id}" th:text="${item.name}">
  173. </option>
  174. </select>
  175. </span>
  176. </div>
  177. <dd/>
  178. </div>
  179. <div class="row cl">
  180. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>管理部门:</label>
  181. <div class="formControls col-xs-8 col-sm-3">
  182. <input type="text" class="input-text" th:id="relation_name" th:name="relation_name"
  183. th:value="${company.relation_name}"/>
  184. </div>
  185. </div>
  186. <div class="row cl">
  187. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>注册地址:</label>
  188. <div class="formControls col-xs-8 col-sm-8">
  189. <input type="text" class="input-text" th:id="registration_address" th:name="registration_address"
  190. th:value="${company.registration_address}" required/>
  191. </div>
  192. </div>
  193. <!-- 企业信息 ------------------------------------------- 结束 -->
  194. <div class="row cl">
  195. <label class="form-label col-xs-4 col-sm-2 mt_10"><span class="c-red">*</span>联系人:</label>
  196. <div class="formControls col-xs-8 col-sm-3">
  197. <div class="add_contact mt_10" th:unless="${#lists.isEmpty(company.companyContacts)}"
  198. th:each="companyContact,iterStat:${company.companyContacts}" th:object="${companyContact}">
  199. <p><input type="text" required minlength="1" th:value="*{contact}" maxlength="45"
  200. class="width_200 input-text contact" placeholder="请输入联系人"
  201. th:name="'companyContacts['+${iterStat.index}+'].contact'"/></p>
  202. <p><input type="text" required isTel="true" th:value="*{phone}"
  203. class="ml_50 width_200 input-text phone" placeholder="请输入联系人电话"
  204. th:name="'companyContacts['+${iterStat.index}+'].phone'"/></p>
  205. <p><input type="text" th:value="*{email}" class="ml_50 width_200 input-text email"
  206. placeholder="请输入联系人邮箱" th:name="'companyContacts['+${iterStat.index}+'].email'"/></p>
  207. <p><input type="text" th:value="*{position}" class="ml_50 width_200 input-text position"
  208. placeholder="请输入联系人职位" th:name="'companyContacts['+${iterStat.index}+'].position'"/></p>
  209. <span th:if="${iterStat.first}" class="ml_50 icon_font"><i class="Hui-iconfont hand"
  210. onclick="addContact()">&#xe600;</i></span>
  211. <span th:unless="${iterStat.first}" class="ml_50 icon_font"><i class="Hui-iconfont hand"
  212. onclick="removeLine(this)">&#xe6a1;</i></span>
  213. </div>
  214. </div>
  215. </div>
  216. <!-- 联系人信息 ------------------------------------------- 结束 -->
  217. <!-- 有效证件信息 ------------------------------------------- 结束 -->
  218. <div class="row cl">
  219. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  220. <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>保存</button>
  221. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>
  222. </div>
  223. </div>
  224. </form>
  225. </article>
  226. <script type="text/javascript" th:src="@{/js/company/companyInfoManage/companyInfoManage_edit.js}"></script>
  227. <script th:inline="javascript">
  228. /**
  229. * 取消
  230. */
  231. function removeIframe() {
  232. var index = parent.layer.getFrameIndex(window.name);
  233. parent.layer.close(index);
  234. }
  235. $("#industryTypeList").change(function () {
  236. if ($('#industryTypeList option:selected').val() == "Empty") {
  237. $("#industry").show()
  238. } else {
  239. $("#industry").hide()
  240. }
  241. });
  242. laydate.render({
  243. elem: '#establishment_date' //指定元素
  244. });
  245. function addContact() {
  246. var length = $(".add_contact").length;
  247. var html = "<i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1;</i>";
  248. $(".add_contact:eq(0)").clone().insertAfter($('.add_contact').eq(-1))
  249. .find(".phone").removeAttr("name").attr("name", "companyContacts[" + length + "].phone").val("").end()
  250. .find(".contact").removeAttr("name").attr("name", "companyContacts[" + length + "].contact").val("").end()
  251. .find(".email").removeAttr("name").attr("name", "companyContacts[" + length + "].email").val("").end()
  252. .find(".position").removeAttr("name").attr("name", "companyContacts[" + length + "].position").val("").end()
  253. .find(".icon_font").html(html).end();
  254. }
  255. function removeLine(obj) {
  256. $(obj).parents(".add_contact").remove();
  257. }
  258. function removeLine(obj) {
  259. $(obj).parent().parent().remove();
  260. }
  261. /*绑定街道id*/
  262. function getStreet_ids1() {
  263. var value = $("#Street").find("option:selected").val();
  264. var text = $("#Street").find("option:selected").text();
  265. $("#street_id").val(value);
  266. $("#street_name").val(text);
  267. getBuilds();
  268. }
  269. /*绑定园区id*/
  270. function getBuild_ids1() {
  271. var value = $("#Builds").find("option:selected").val();
  272. var text = $("#Builds").find("option:selected").text();
  273. $("#build_id").val(value);
  274. $("#build_name").val(text);
  275. }
  276. /*绑定币种单位*/
  277. function bindCurrency() {
  278. var value = $("#currency").find("option:selected").val();
  279. console.log("value = " + value);
  280. var text = $("#currency").find("option:selected").text();
  281. $("#currency_unit").val(value);
  282. }
  283. function getBuilds() {
  284. $.ajax({
  285. url: pagePath + "/company/companyInfoManage/selectBuildByStreetId",
  286. type: "post",
  287. data: {
  288. 'street_id': $("#street_id").val()
  289. },
  290. dataType: "json",
  291. success: function (result) {
  292. if (result.success) {
  293. var buildInfo = result.obj;
  294. bidBuild(buildInfo);
  295. } else {
  296. //errorMessage(result.message);
  297. }
  298. },
  299. error: function () {
  300. errorMessage('系统错误!');
  301. }
  302. });
  303. }
  304. function bidBuild(buildInfo) {
  305. $("#Builds option").remove();
  306. var option = '<option value="-1">' + "--请选择--" + '</option>'
  307. for (var i = 0; i < buildInfo.length; i++) {
  308. option += '<option value="' + buildInfo[i].id + '" name = "' + buildInfo[i].name + '" id = "' + buildInfo[i].id + '" >'
  309. option += buildInfo[i].name
  310. option += '</option>'
  311. }
  312. $("#Builds").append(option);
  313. }
  314. </script>
  315. </body>
  316. </html>