| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- <!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>
- <style>
- label.error {
- left: 15px;
- top: 29px
- }
- .ke-container {
- width: 100% !important;
- }
- .ke-swfupload-body {
- height: 265px
- }
- .ke-dialog-body {
- height: 340px !important;
- }
- .ke-dialog-default {
- height: 410px !important;
- }
- .form-label {
- line-height: 32px;
- }
- .industry_name_show {
- display: block;
- }
- .industry_name_hide {
- display: none;
- }
- </style>
- </head>
- <body layout:fragment="content">
- <article class="page-container">
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>企业信息</label>
- </div>
- <form class="form form-horizontal" id="form-information-edit">
- <!-- 企业信息----------------------------------------- 开始 -->
- <input type="hidden" th:name="id" th:id="companyId" th:value="${company.id}"/>
- <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"/>
- </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" required th:value="${company.company_name}" th:id="company_name"
- th:name="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">组织机构代码:</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"/>
- <!-- <input type="text" disabled="disabled" required class="input-text" th:value="${company.organization_code}" th:id="organization_code" th:name="organization_code"/> -->
- <!-- [[${company.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" id="industry"
- th:class="${company.industry_name!=null&&company.industry_name!=''&&company.industry_code=='Empty'}?'industry_name_show row cl':'industry_name_hide 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" value="" th:id="industry_name" th:name="industry_name"
- th:value="${company.industry_name}"
- placeholder="请输入所属行业"/>
- </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="is_product" type="radio" value="true" th:checked="${company.is_product==true}">
- 是</label>
- <label>
- <input type="radio" name="is_product" th:checked="${company.is_product==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;">
- <input type="hidden" name="currency_unit" id="currency_unit"/>
- <span class="select-box">
- <select class="select" id="currency" style="width:100%" onchange="bindCurrency()">
- <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">
- <input type="hidden" name="street_id" id="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"/>
- <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 : ${buildInfo}"
- 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-3">
- <input type="text" class="input-text" th:id="relation_name" th:name="relation_name"
- th:value="${company.relation_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-8">
- <input type="text" class="input-text" th:id="registration_address" th:name="registration_address"
- th:value="${company.registration_address}" required/>
- </div>
- </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-3">
- <div class="add_contact mt_10" th:unless="${#lists.isEmpty(company.companyContacts)}"
- th:each="companyContact,iterStat:${company.companyContacts}" th:object="${companyContact}">
- <p><input type="text" required minlength="1" th:value="*{contact}" maxlength="45"
- class="width_200 input-text contact" placeholder="请输入联系人"
- th:name="'companyContacts['+${iterStat.index}+'].contact'"/></p>
- <p><input type="text" required isTel="true" th:value="*{phone}"
- class="ml_50 width_200 input-text phone" placeholder="请输入联系人电话"
- th:name="'companyContacts['+${iterStat.index}+'].phone'"/></p>
- <p><input type="text" th:value="*{email}" class="ml_50 width_200 input-text email"
- placeholder="请输入联系人邮箱" th:name="'companyContacts['+${iterStat.index}+'].email'"/></p>
- <p><input type="text" th:value="*{position}" class="ml_50 width_200 input-text position"
- placeholder="请输入联系人职位" th:name="'companyContacts['+${iterStat.index}+'].position'"/></p>
- <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>
- </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>
- <button onClick="removeIframe();" class="btn btn-default radius" type="button"> 返回 </button>
- </div>
- </div>
- </form>
- </article>
- <script type="text/javascript" th:src="@{/js/company/companyInfoManage/companyInfoManage_edit.js}"></script>
- <script th:inline="javascript">
- /**
- * 取消
- */
- function removeIframe() {
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- }
- $("#industryTypeList").change(function () {
- if ($('#industryTypeList option:selected').val() == "Empty") {
- $("#industry").show()
- } else {
- $("#industry").hide()
- }
- });
- 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(".email").removeAttr("name").attr("name", "companyContacts[" + length + "].email").val("").end()
- .find(".position").removeAttr("name").attr("name", "companyContacts[" + length + "].position").val("").end()
- .find(".icon_font").html(html).end();
- }
- function removeLine(obj) {
- $(obj).parents(".add_contact").remove();
- }
- function removeLine(obj) {
- $(obj).parent().parent().remove();
- }
- /*绑定街道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);
- getBuilds();
- }
- /*绑定园区id*/
- function getBuild_ids1() {
- var value = $("#Builds").find("option:selected").val();
- var text = $("#Builds").find("option:selected").text();
- $("#build_id").val(value);
- $("#build_name").val(text);
- }
- /*绑定币种单位*/
- function bindCurrency() {
- var value = $("#currency").find("option:selected").val();
- console.log("value = " + value);
- var text = $("#currency").find("option:selected").text();
- $("#currency_unit").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>
|