companyInfo.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  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. </head>
  8. <body layout:fragment="content">
  9. <style>
  10. .width_200 {
  11. width: 200px;
  12. }
  13. .ml_50 {
  14. margin-left: 50px;
  15. }
  16. .mt_10 {
  17. margin-top: 10px !important;
  18. }
  19. .line {
  20. display: block;
  21. text-align: left;
  22. background-color: #fff;
  23. color: #333;
  24. border-bottom: 1px solid #0a6999;
  25. border-color: #fff;
  26. border-bottom: 1px solid #0a6999;
  27. margin-top: 10px;
  28. vertical-align: middle;
  29. padding: 4px 12px;
  30. height: 31px;
  31. line-height: 31px;
  32. font-size: 14px;
  33. font-weight: bold;
  34. }
  35. .readonly {
  36. border: none;
  37. }
  38. </style>
  39. <nav class="breadcrumb">
  40. <i class="Hui-iconfont">&#xe67f;</i>
  41. 首页
  42. <span class="c-gray en">&gt;</span>企业信息
  43. <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
  44. href="javascript:location.replace(location.href);" title="刷新">
  45. <i class="Hui-iconfont">&#xe68f;</i>
  46. </a>
  47. </nav>
  48. <article class="page-container">
  49. <form class="form form-horizontal" id="form-companyInfo-edit">
  50. <input type="hidden" id="companyId" th:value="*{company.id}" th:name="id"/>
  51. <!-- 企业信息----------------------------------------- 开始 -->
  52. <div class="line">企业信息</div>
  53. <div class="row cl">
  54. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业编号:</label>
  55. <div class="formControls col-xs-8 col-sm-3">
  56. <!--<input type="text" class="input-text" th:value="${company.no}" th:id="no" th:name="no"/> -->
  57. [[${company.no}]]
  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" required th:value="${company.company_name}" th:id="company_name" th:name="company_name"/> -->
  62. [[${company.company_name}]]
  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. <input type="text" class="input-text" th:value="${company.uscc}" th:id="uscc" th:name="uscc"/>
  69. </div>
  70. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>组织机构代码 <i
  71. title="组织机构代码是统一社会信用代码的第9-17位" class="Hui-iconfont">&#xe633;</i>:</label>
  72. <div class="formControls col-xs-8 col-sm-3">
  73. <input type="text" class="input-text" th:value="${company.organization_code}"
  74. th:id="organization_code" th:name="organization_code"/>
  75. </div>
  76. </div>
  77. <div class="row cl">
  78. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>所属行业:</label>
  79. <div class="formControls col-xs-8 col-sm-3">
  80. <span class="select-box">
  81. <select class="select" th:name="industry_code" id="industryTypeList">
  82. <option value="">--请选择--</option>
  83. <option value="" th:each="item : ${industryTypeList}" th:value="${item.value}"
  84. th:selected="${company.industry_code==item.value}"
  85. th:text="${item.name}">
  86. </option>
  87. </select>
  88. </span>
  89. </div>
  90. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>法定代表人:</label>
  91. <div class="formControls col-xs-8 col-sm-3">
  92. <input type="text" class="input-text" th:value="${company.legal_representative}"
  93. th:id="legal_representative" th:name="legal_representative"/>
  94. </div>
  95. </div>
  96. <div class="row cl">
  97. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>是否经营:</label>
  98. <div class="formControls col-xs-8 col-sm-3">
  99. <label>
  100. <input name="operated" type="radio" value="true" th:checked="${company.operated==true}">
  101. 是</label>
  102. <label>
  103. <input name="operated" type="radio" th:checked="${company.operated==false}" value="false">
  104. 否</label>
  105. </div>
  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" th:name="type">
  110. <option value="">--请选择--</option>
  111. <option value="" th:selected="${company.type==item.id}" th:each="item : ${companyTypeList}"
  112. th:value="${item.id}" th:text="${item.name}">
  113. </option>
  114. </select>
  115. </span>
  116. </div>
  117. </div>
  118. <div class="row cl">
  119. <label class="form-label col-xs-4 col-sm-2"><span>经营范围:</span></label>
  120. <div class="formControls col-xs-8 col-sm-8">
  121. <input type="text" class="input-text" th:id="business" th:name="business"
  122. th:value="${company.business}"/>
  123. </div>
  124. </div>
  125. <div class="row cl">
  126. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册资本:</label>
  127. <div class="formControls col-xs-6 col-sm-2" style="padding-right: 0;">
  128. <span class="select-box">
  129. <select class="select" id="currency" style="width:100%" name="currency_unit">
  130. <!--<option value="">&#45;&#45;请选择货币单位&#45;&#45;</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. <label class="form-label col-xs-4 col-sm-2"><span><!--<span class="c-red">*</span>-->员工数:</span></label>
  151. <div class="formControls col-xs-8 col-sm-8">
  152. <input type="text" class="input-text" number th:id="staff_number" th:name="staff_number"
  153. th:value="${company.staff_number}"/>
  154. </div>
  155. </div>
  156. <div class="row cl">
  157. <input type="hidden" name="street_id" id="street_id" th:value="${company.street_id}"/>
  158. <input type="hidden" name="street_name" id="street_name"/>
  159. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>工商注册属地:</label>
  160. <div class="formControls col-xs-8 col-sm-3">
  161. <span class="select-box">
  162. <select class="select" id="Street" onchange="getStreet_ids1()" required>
  163. <option value="">--请选择--</option>
  164. <option th:selected="${company.street_id==item.id}" th:each="item : ${streetList}"
  165. th:value="${item.id}" th:text="${item.name}">
  166. </option>
  167. </select>
  168. </span>
  169. </div>
  170. <input type="hidden" name="build_id" id="build_id" th:value="${company.build_id}"/>
  171. <input type="hidden" name="build_name" id="build_name"/>
  172. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>园区:</label>
  173. <dd class="pushBuildsList">
  174. <div class="formControls col-xs-8 col-sm-3">
  175. <span class="select-box">
  176. <select class="select" id="Builds" onchange="getBuild_ids1()">
  177. <option value="">--请选择--</option>
  178. <option th:selected="${company.build_id==item.id}" th:each="item : ${buildList}"
  179. th:value="${item.id}" th:text="${item.name}">
  180. </option>
  181. </select>
  182. </span>
  183. </div>
  184. <dd/>
  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}"/>
  191. </div>
  192. </div>
  193. <div class="line">存量工业用地相关</div>
  194. <div class="row cl">
  195. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>厂房所在属地:</label>
  196. <div class="formControls col-xs-8 col-sm-9">
  197. <div><i class="Hui-iconfont" style="cursor: pointer;" onclick="addFloorLine()">&#xe600;</i></div>
  198. <table class="table table-border table-bordered table-bg table-hover">
  199. <thead>
  200. <tr class="text-c">
  201. <th width="200">所在属地</th>
  202. <th width="100">操作</th>
  203. </tr>
  204. </thead>
  205. <tbody class="add_floor_line">
  206. <tr class="text-c ">
  207. <td>
  208. <div class="formControls col-sm-12 text-left">
  209. <span class="select-box">
  210. <select class="select street" required
  211. name="buildingStreets[0].street_id" onchange="checkBuildingStreet(this)">
  212. <option value="">--请选择--</option>
  213. <option th:each="item : ${streetList}"
  214. th:value="${item.id}" th:text="${item.name}">
  215. </option>
  216. </select>
  217. </span>
  218. </div>
  219. </td>
  220. <td class="icon_font"></td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. </div>
  225. </div>
  226. <div class="line">其他联系人信息</div>
  227. <div class="row cl">
  228. <label class="form-label col-xs-4 col-sm-2 mt_10"><span class="c-red">*</span>联系人:</label>
  229. <div class="formControls col-xs-8 col-sm-9">
  230. <div class="add_contact mt_10" th:unless="${#lists.isEmpty(company.companyContacts)}"
  231. th:each="companyContact,iterStat:${company.companyContacts}" th:object="${companyContact}">
  232. <input type="text" required minlength="1" th:value="*{contact}" maxlength="45"
  233. class="width_200 input-text contact" placeholder="请输入联系人"
  234. th:name="'companyContacts['+${iterStat.index}+'].contact'"/>
  235. <input type="text" isTel="true" th:value="*{phone}" class="ml_50 width_200 input-text phone"
  236. placeholder="请输入联系电话" th:name="'companyContacts['+${iterStat.index}+'].phone'"/>
  237. <!-- <input type="checkbox" th:checked=*{is_send_sms==true} class="ml_50 is_send_sms" th:name="'companyContacts['+${iterStat.index}+'].is_send_sms'" th:text="是否接收短信"/> -->
  238. <span th:if="${iterStat.first}" class="ml_50 icon_font"><i class="Hui-iconfont hand"
  239. onclick="addContact()">&#xe600;</i></span>
  240. <span th:unless="${iterStat.first}" class="ml_50 icon_font"><i class="Hui-iconfont hand"
  241. onclick="removeLine(this)">&#xe6a1;</i></span>
  242. </div>
  243. <div class="add_contact mt_10" th:if="${#lists.isEmpty(company.companyContacts)}">
  244. <input type="text" required minlength="1" maxlength="45" class="width_200 input-text contact"
  245. placeholder="请输入联系人" th:name="companyContacts[0].contact"/>
  246. <input type="text" required isTel="true" class="ml_50 width_200 input-text phone"
  247. placeholder="请输入联系电话" th:name="companyContacts[0].phone"/>
  248. <!-- <input type="checkbox" class="ml_50 is_send_sms" th:name="'companyContacts[0].is_send_sms'" th:text="是否接收短信"/> -->
  249. <span class="ml_50 icon_font"><i class="Hui-iconfont hand"
  250. onclick="addContact()">&#xe600;</i></span>
  251. </div>
  252. </div>
  253. </div>
  254. <div class="row cl">
  255. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  256. <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
  257. </div>
  258. </div>
  259. </form>
  260. </article>
  261. <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
  262. <script type="text/javascript" th:src="@{/js/build/company/company_edit.js}"></script>
  263. <script th:inline="javascript">
  264. $(function () {
  265. addFloorLine([[${company.buildingStreets}]]);
  266. laydate.render({
  267. elem: '#establishment_date' //指定元素
  268. });
  269. });
  270. function addContact() {
  271. var length = $(".add_contact").length;
  272. var html = "<i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1;</i>";
  273. $(".add_contact:eq(0)").clone().insertAfter($('.add_contact').eq(-1))
  274. .find(".phone").removeAttr("name").attr("name", "companyContacts[" + length + "].phone").val("").end()
  275. .find(".contact").removeAttr("name").attr("name", "companyContacts[" + length + "].contact").val("").end()
  276. .find(".icon_font").html(html).end();
  277. }
  278. function removeLine(obj) {
  279. $(obj).parents(".add_contact").remove();
  280. }
  281. //添加属地相关
  282. function addFloorLine(buildStreets) {
  283. if (buildStreets) {
  284. if (buildStreets.length > 0) {
  285. for (var i = 0; i < buildStreets.length; i++) {
  286. var length = i;
  287. var html = "<i class='Hui-iconfont' onclick='removeFloorLine(this)'>&#xe6a1;</i>";
  288. $(".add_floor_line tr:eq(0)").clone().insertAfter($('.add_floor_line>tr').eq(-1))
  289. .find(".street").removeAttr("name").attr("name", "buildingStreets[" + i + "].street_id").end()
  290. .find(".icon_font").html(html).end();
  291. $(".add_floor_line tr:eq(" + (i + 1) + ")").find("option[value='" + buildStreets[i].street_id + "']").attr("selected", true);
  292. }
  293. $(".add_floor_line tr:eq(0)").remove();
  294. }
  295. } else {
  296. var length = $(".add_floor_line tr").length;
  297. var html = "<i class='Hui-iconfont' onclick='removeFloorLine(this)'>&#xe6a1;</i>";
  298. $(".add_floor_line tr:eq(0)").clone().insertAfter($('.add_floor_line>tr').eq(-1))
  299. .find(".street").removeAttr("name").attr("name", "buildingStreets[" + length + "].street_id").val("").end()
  300. .find(".icon_font").html(html).end();
  301. $('#layui-layer2').height(48);
  302. }
  303. }
  304. function removeFloorLine(obj) {
  305. if ($(".add_floor_line").find("tr").length == 1) {
  306. errorMessage("至少添加一个属地");
  307. } else {
  308. $(obj).parent().parent().remove();
  309. }
  310. }
  311. function checkBuildingStreet(obj) {
  312. var index = $(".add_floor_line tr").index($(obj).parents("tr"));
  313. $(".add_floor_line tr:not(:eq(" + index + "))").find(".street").each(function (i, item) {
  314. if ($(this).val() != "" && $(obj).val() == $(this).val()) {
  315. errorMessage("不能添加重复属地");
  316. $(obj).val("");
  317. }
  318. });
  319. }
  320. //修改StreetId域名称
  321. function setBuildStreetName() {
  322. $(".add_floor_line").find(".street").each(function (i, item) {
  323. $(this).attr("name", "buildingStreets[" + i + "].street_id");
  324. });
  325. }
  326. //添加属地相关
  327. /*绑定街道id*/
  328. function getStreet_ids1() {
  329. var value = $("#Street").find("option:selected").val();
  330. var text = $("#Street").find("option:selected").text();
  331. $("#street_id").val(value);
  332. //$("#street_name").val(text);
  333. $("#build_id").val("");
  334. $("#build_name").val("");
  335. getBuilds();
  336. }
  337. /*绑定园区id*/
  338. function getBuild_ids1() {
  339. var value = $("#Builds").find("option:selected").val();
  340. var text = $("#Builds").find("option:selected").text();
  341. $("#build_id").val(value);
  342. }
  343. function getBuilds() {
  344. $.ajax({
  345. url: pagePath + "/company/companyInfoManage/selectBuildByStreetId",
  346. type: "post",
  347. data: {
  348. 'street_id': $("#street_id").val()
  349. },
  350. dataType: "json",
  351. success: function (result) {
  352. if (result.success) {
  353. var buildInfo = result.obj;
  354. bidBuild(buildInfo);
  355. } else {
  356. //errorMessage(result.message);
  357. }
  358. },
  359. error: function () {
  360. errorMessage('系统错误!');
  361. }
  362. });
  363. }
  364. function bidBuild(buildInfo) {
  365. $("#Builds option").remove();
  366. var option = '<option value="-1">' + "--请选择--" + '</option>'
  367. for (var i = 0; i < buildInfo.length; i++) {
  368. option += '<option value="' + buildInfo[i].id + '" name = "' + buildInfo[i].name + '" id = "' + buildInfo[i].id + '" >'
  369. option += buildInfo[i].name
  370. option += '</option>'
  371. }
  372. $("#Builds").append(option);
  373. }
  374. </script>
  375. </body>
  376. </html>