| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- <!DOCTYPE HTML>
- <html xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- layout:decorate="~{admin/common/common}">
- <head>
- <title>企业信息</title>
- </head>
- <body layout:fragment="content">
- <style>
- .width_200 {
- width: 200px;
- }
- .ml_50 {
- margin-left: 50px;
- }
- .mt_10 {
- margin-top: 10px !important;
- }
- .line {
- display: block;
- text-align: left;
- background-color: #fff;
- color: #333;
- border-bottom: 1px solid #0a6999;
- border-color: #fff;
- border-bottom: 1px solid #0a6999;
- margin-top: 10px;
- vertical-align: middle;
- padding: 4px 12px;
- height: 31px;
- line-height: 31px;
- font-size: 14px;
- font-weight: bold;
- }
- .readonly {
- border: none;
- }
- </style>
- <nav class="breadcrumb">
- <i class="Hui-iconfont"></i>
- 首页
- <span class="c-gray en">></span>企业信息
- <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
- href="javascript:location.replace(location.href);" title="刷新">
- <i class="Hui-iconfont"></i>
- </a>
- </nav>
- <article class="page-container">
- <form class="form form-horizontal" id="form-companyInfo-edit">
- <input type="hidden" id="companyId" th:value="*{company.id}" th:name="id"/>
- <!-- 企业信息----------------------------------------- 开始 -->
- <div class="line">企业信息</div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业编号:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <!--<input type="text" class="input-text" th:value="${company.no}" th:id="no" th:name="no"/> -->
- [[${company.no}]]
- </div>
- <label class="form-label col-xs-4 col-sm-2">企业名称:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <!-- <input type="text" class="input-text" required th:value="${company.company_name}" th:id="company_name" th:name="company_name"/> -->
- [[${company.company_name}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>统一社会信用代码:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <input type="text" class="input-text" th:value="${company.uscc}" th:id="uscc" th:name="uscc"/>
- </div>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>组织机构代码 <i
- title="组织机构代码是统一社会信用代码的第9-17位" class="Hui-iconfont"></i>:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <input type="text" class="input-text" th:value="${company.organization_code}"
- th:id="organization_code" th:name="organization_code"/>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>所属行业:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <span class="select-box">
- <select class="select" th:name="industry_code" id="industryTypeList">
- <option value="">--请选择--</option>
- <option value="" th:each="item : ${industryTypeList}" th:value="${item.value}"
- th:selected="${company.industry_code==item.value}"
- th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>法定代表人:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <input type="text" class="input-text" th:value="${company.legal_representative}"
- th:id="legal_representative" th:name="legal_representative"/>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>是否经营:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <label>
- <input name="operated" type="radio" value="true" th:checked="${company.operated==true}">
- 是</label>
- <label>
- <input name="operated" type="radio" th:checked="${company.operated==false}" value="false">
- 否</label>
- </div>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业性质:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <span class="select-box">
- <select class="select" th:name="type">
- <option value="">--请选择--</option>
- <option value="" th:selected="${company.type==item.id}" th:each="item : ${companyTypeList}"
- th:value="${item.id}" th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span>经营范围:</span></label>
- <div class="formControls col-xs-8 col-sm-8">
- <input type="text" class="input-text" th:id="business" th:name="business"
- th:value="${company.business}"/>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册资本:</label>
- <div class="formControls col-xs-6 col-sm-2" style="padding-right: 0;">
- <span class="select-box">
- <select class="select" id="currency" style="width:100%" name="currency_unit">
- <!--<option value="">--请选择货币单位--</option>-->
- <option th:selected="${company.currency_unit==item.id}" th:each="item : ${itemList}"
- th:value="${item.id}" th:text="${item.name}"/>
- </select>
- </span>
- </div>
- <div class="formControls col-xs-8 col-sm-3">
- <input type="text" class="input-text" th:id="registration_capital" th:name="registration_capital"
- th:value="${company.registration_capital}"/>
- </div>
- <div class="col-xs-2 col-sm-3">(万元)</div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册时间:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <input type="text" class="input-text" th:id="establishment_date" th:name="establishment_date"
- th:value="${company.establishment_date}"/>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span><!--<span class="c-red">*</span>-->员工数:</span></label>
- <div class="formControls col-xs-8 col-sm-8">
- <input type="text" class="input-text" number th:id="staff_number" th:name="staff_number"
- th:value="${company.staff_number}"/>
- </div>
- </div>
- <div class="row cl">
- <input type="hidden" name="street_id" id="street_id" th:value="${company.street_id}"/>
- <input type="hidden" name="street_name" id="street_name"/>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>工商注册属地:</label>
- <div class="formControls col-xs-8 col-sm-3">
- <span class="select-box">
- <select class="select" id="Street" onchange="getStreet_ids1()" required>
- <option value="">--请选择--</option>
- <option th:selected="${company.street_id==item.id}" th:each="item : ${streetList}"
- th:value="${item.id}" th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- <input type="hidden" name="build_id" id="build_id" th:value="${company.build_id}"/>
- <input type="hidden" name="build_name" id="build_name"/>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>园区:</label>
- <dd class="pushBuildsList">
- <div class="formControls col-xs-8 col-sm-3">
- <span class="select-box">
- <select class="select" id="Builds" onchange="getBuild_ids1()">
- <option value="">--请选择--</option>
- <option th:selected="${company.build_id==item.id}" th:each="item : ${buildList}"
- th:value="${item.id}" th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- <dd/>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册地址:</label>
- <div class="formControls col-xs-8 col-sm-8">
- <input type="text" class="input-text" th:id="registration_address" th:name="registration_address"
- th:value="${company.registration_address}"/>
- </div>
- </div>
- <div class="line">存量工业用地相关</div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>厂房所在属地:</label>
- <div class="formControls col-xs-8 col-sm-9">
- <div><i class="Hui-iconfont" style="cursor: pointer;" onclick="addFloorLine()"></i></div>
- <table class="table table-border table-bordered table-bg table-hover">
- <thead>
- <tr class="text-c">
- <th width="200">所在属地</th>
- <th width="100">操作</th>
- </tr>
- </thead>
- <tbody class="add_floor_line">
- <tr class="text-c ">
- <td>
- <div class="formControls col-sm-12 text-left">
- <span class="select-box">
- <select class="select street" required
- name="buildingStreets[0].street_id" onchange="checkBuildingStreet(this)">
- <option value="">--请选择--</option>
- <option th:each="item : ${streetList}"
- th:value="${item.id}" th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- </td>
- <td class="icon_font"></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="line">其他联系人信息</div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2 mt_10"><span class="c-red">*</span>联系人:</label>
- <div class="formControls col-xs-8 col-sm-9">
- <div class="add_contact mt_10" th:unless="${#lists.isEmpty(company.companyContacts)}"
- th:each="companyContact,iterStat:${company.companyContacts}" th:object="${companyContact}">
- <input type="text" required minlength="1" th:value="*{contact}" maxlength="45"
- class="width_200 input-text contact" placeholder="请输入联系人"
- th:name="'companyContacts['+${iterStat.index}+'].contact'"/>
- <input type="text" isTel="true" th:value="*{phone}" class="ml_50 width_200 input-text phone"
- placeholder="请输入联系电话" th:name="'companyContacts['+${iterStat.index}+'].phone'"/>
- <!-- <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="是否接收短信"/> -->
- <span th:if="${iterStat.first}" class="ml_50 icon_font"><i class="Hui-iconfont hand"
- onclick="addContact()"></i></span>
- <span th:unless="${iterStat.first}" class="ml_50 icon_font"><i class="Hui-iconfont hand"
- onclick="removeLine(this)"></i></span>
- </div>
- <div class="add_contact mt_10" th:if="${#lists.isEmpty(company.companyContacts)}">
- <input type="text" required minlength="1" maxlength="45" class="width_200 input-text contact"
- placeholder="请输入联系人" th:name="companyContacts[0].contact"/>
- <input type="text" required isTel="true" class="ml_50 width_200 input-text phone"
- placeholder="请输入联系电话" th:name="companyContacts[0].phone"/>
- <!-- <input type="checkbox" class="ml_50 is_send_sms" th:name="'companyContacts[0].is_send_sms'" th:text="是否接收短信"/> -->
- <span class="ml_50 icon_font"><i class="Hui-iconfont hand"
- onclick="addContact()"></i></span>
- </div>
- </div>
- </div>
- <div class="row cl">
- <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
- <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont"></i> 保存</button>
- </div>
- </div>
- </form>
- </article>
- <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
- <script type="text/javascript" th:src="@{/js/build/company/company_edit.js}"></script>
- <script th:inline="javascript">
- $(function () {
- addFloorLine([[${company.buildingStreets}]]);
- laydate.render({
- elem: '#establishment_date' //指定元素
- });
- });
- function addContact() {
- var length = $(".add_contact").length;
- var html = "<i class='Hui-iconfont' onclick='removeLine(this)'></i>";
- $(".add_contact:eq(0)").clone().insertAfter($('.add_contact').eq(-1))
- .find(".phone").removeAttr("name").attr("name", "companyContacts[" + length + "].phone").val("").end()
- .find(".contact").removeAttr("name").attr("name", "companyContacts[" + length + "].contact").val("").end()
- .find(".icon_font").html(html).end();
- }
- function removeLine(obj) {
- $(obj).parents(".add_contact").remove();
- }
- //添加属地相关
- function addFloorLine(buildStreets) {
- if (buildStreets) {
- if (buildStreets.length > 0) {
- for (var i = 0; i < buildStreets.length; i++) {
- var length = i;
- var html = "<i class='Hui-iconfont' onclick='removeFloorLine(this)'></i>";
- $(".add_floor_line tr:eq(0)").clone().insertAfter($('.add_floor_line>tr').eq(-1))
- .find(".street").removeAttr("name").attr("name", "buildingStreets[" + i + "].street_id").end()
- .find(".icon_font").html(html).end();
- $(".add_floor_line tr:eq(" + (i + 1) + ")").find("option[value='" + buildStreets[i].street_id + "']").attr("selected", true);
- }
- $(".add_floor_line tr:eq(0)").remove();
- }
- } else {
- var length = $(".add_floor_line tr").length;
- var html = "<i class='Hui-iconfont' onclick='removeFloorLine(this)'></i>";
- $(".add_floor_line tr:eq(0)").clone().insertAfter($('.add_floor_line>tr').eq(-1))
- .find(".street").removeAttr("name").attr("name", "buildingStreets[" + length + "].street_id").val("").end()
- .find(".icon_font").html(html).end();
- $('#layui-layer2').height(48);
- }
- }
- function removeFloorLine(obj) {
- if ($(".add_floor_line").find("tr").length == 1) {
- errorMessage("至少添加一个属地");
- } else {
- $(obj).parent().parent().remove();
- }
- }
- function checkBuildingStreet(obj) {
- var index = $(".add_floor_line tr").index($(obj).parents("tr"));
- $(".add_floor_line tr:not(:eq(" + index + "))").find(".street").each(function (i, item) {
- if ($(this).val() != "" && $(obj).val() == $(this).val()) {
- errorMessage("不能添加重复属地");
- $(obj).val("");
- }
- });
- }
- //修改StreetId域名称
- function setBuildStreetName() {
- $(".add_floor_line").find(".street").each(function (i, item) {
- $(this).attr("name", "buildingStreets[" + i + "].street_id");
- });
- }
- //添加属地相关
- /*绑定街道id*/
- function getStreet_ids1() {
- var value = $("#Street").find("option:selected").val();
- var text = $("#Street").find("option:selected").text();
- $("#street_id").val(value);
- //$("#street_name").val(text);
- $("#build_id").val("");
- $("#build_name").val("");
- getBuilds();
- }
- /*绑定园区id*/
- function getBuild_ids1() {
- var value = $("#Builds").find("option:selected").val();
- var text = $("#Builds").find("option:selected").text();
- $("#build_id").val(value);
- }
- function getBuilds() {
- $.ajax({
- url: pagePath + "/company/companyInfoManage/selectBuildByStreetId",
- type: "post",
- data: {
- 'street_id': $("#street_id").val()
- },
- dataType: "json",
- success: function (result) {
- if (result.success) {
- var buildInfo = result.obj;
- bidBuild(buildInfo);
- } else {
- //errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- }
- function bidBuild(buildInfo) {
- $("#Builds option").remove();
- var option = '<option value="-1">' + "--请选择--" + '</option>'
- for (var i = 0; i < buildInfo.length; i++) {
- option += '<option value="' + buildInfo[i].id + '" name = "' + buildInfo[i].name + '" id = "' + buildInfo[i].id + '" >'
- option += buildInfo[i].name
- option += '</option>'
- }
- $("#Builds").append(option);
- }
- </script>
- </body>
- </html>
|