apply_add.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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. .line {
  9. display: block;
  10. text-align: left;
  11. background-color: #fff;
  12. color: #333;
  13. border-bottom: 1px solid #0a6999;
  14. border-color: #fff;
  15. border-bottom: 1px solid #0a6999;
  16. margin-top: 10px;
  17. vertical-align: middle;
  18. padding: 4px 12px;
  19. height: 31px;
  20. line-height: 31px;
  21. font-size: 14px;
  22. font-weight: bold;
  23. }
  24. .line label{
  25. font-weight:50;
  26. }
  27. </style>
  28. </head>
  29. <body layout:fragment="content">
  30. <article class="page-container">
  31. <form class="form form-horizontal" id="form-landApply-add">
  32. <input type="hidden" th:name="company_id" th:id="companyId" th:value="${companyId}"/>
  33. <input type="hidden" th:name="isDraft" th:id="isDraft" th:value="0"/>
  34. <div class="line"><span class="c-red"></span>基本信息</div>
  35. <div id="companyInfo" >
  36. <div class="row cl" th:if="${userType==4 || userType==1}">
  37. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>申请企业:</label>
  38. <div class="formControls col-xs-8 col-sm-9">
  39. <input type="text" readonly="readonly" style="width:48%" required placeholder="点击查找按钮查找公司"
  40. maxlength="45" class="input-text readonly" id="company_name" th:name="company_name" th:value="${companyName}"/>
  41. <a class="btn btn-primary" style="margin-top:0px;" th:onclick="'javascript:open_dialog(\'查找公司\',\'/stockLand/selectCompany\',\'800\',\'500\');'">
  42. <i class="Hui-iconfont">&#xe665;</i>查找</a>
  43. </div>
  44. </div>
  45. <div class="row cl">
  46. <label class="form-label col-xs-4 col-sm-2"> 企业名称:</label>
  47. <div class="formControls col-xs-8 col-sm-4">
  48. <input class="company_name" th:value="${companyInfo.company_name}" type="hidden" name="companyInfo.company_name"/>
  49. <span th:value="${companyInfo.company_name}" class="company_name" >[[${companyInfo.company_name}]]</span>
  50. </div>
  51. <label class="form-label col-xs-4 col-sm-2"> 统一社会信用代码:</label>
  52. <div class="formControls col-xs-8 col-sm-4">
  53. <input type="hidden" th:value="${companyInfo.uscc}" th:name="companyInfo.uscc"/>
  54. <span th:value="${companyInfo.uscc}" class="uscc" >[[${companyInfo.uscc}]]</span>
  55. </div>
  56. </div>
  57. <div class="row cl">
  58. <label class="form-label col-xs-4 col-sm-2"> 所属行业:</label>
  59. <div class="formControls col-xs-8 col-sm-4">
  60. <span class="select-box">
  61. <select class="select" th:name="companyInfo.industry_code" id="industryTypeList">
  62. <option value="">--请选择--</option>
  63. <option value="" th:each="item : ${industryTypeList}" th:value="${item.value}"
  64. th:text="${item.name}" th:selected="${companyInfo.industry_code==item.value}">
  65. </option>
  66. </select>
  67. </span>
  68. </div>
  69. <label class="form-label col-xs-4 col-sm-2"> 组织机构代码:</label>
  70. <div class="formControls col-xs-8 col-sm-4">
  71. <input type="hidden" th:value="${companyInfo.organization_code}" th:name="companyInfo.organization_code"/>
  72. <span th:value="${companyInfo.organization_code}" class="organization_code" >[[${companyInfo.organization_code}]]</span>
  73. </div>
  74. </div>
  75. <div class="row cl" id="industry" hidden>
  76. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>其它行业:</label>
  77. <div class="formControls col-xs-8 col-sm-4">
  78. <input type="text" class="input-text" value="" th:id="industry_name" th:name="companyInfo.industry_name"
  79. placeholder="请输入所属行业"/>
  80. </div>
  81. </div>
  82. <div class="row cl">
  83. <label class="form-label col-xs-4 col-sm-2"> 注册地点:</label>
  84. <div class="formControls col-xs-8 col-sm-4">
  85. <input type="text" class="input-text registration_address" th:value="${companyInfo.registration_address}" th:name="companyInfo.registration_address" />
  86. </div>
  87. <label class="form-label col-xs-4 col-sm-2"> 联系人姓名:</label>
  88. <div class="formControls col-xs-8 col-sm-4">
  89. <input type="text" class="input-text contact" th:if="${companyInfo.companyContacts}" th:value="${companyInfo.companyContacts[0].contact}" th:name="companyInfo.contact"/>
  90. <input type="text" class="input-text contact" th:unless="${companyInfo.companyContacts}" th:name="companyInfo.contact" />
  91. </div>
  92. </div>
  93. <div class="row cl" >
  94. <label class="form-label col-xs-4 col-sm-2"> 联系人职务:</label>
  95. <div class="formControls col-xs-8 col-sm-4">
  96. <input type="text" class="input-text" th:if="${companyInfo.companyContacts}" th:value="${companyInfo.companyContacts[0].position}" th:name="companyInfo.contact_position" />
  97. <input type="text" class="input-text" th:unless="${companyInfo.companyContacts}" th:name="companyInfo.contact_position" />
  98. </div>
  99. <label class="form-label col-xs-4 col-sm-2"> 联系人手机:</label>
  100. <div class="formControls col-xs-8 col-sm-4">
  101. <input type="text" class="input-text contact_phone" th:if="${companyInfo.companyContacts}" th:value="${companyInfo.companyContacts[0].phone}" th:name="companyInfo.contact_phone" />
  102. <input type="text" class="input-text contact_phone" th:unless="${companyInfo.companyContacts}" th:name="companyInfo.contact_phone" />
  103. </div>
  104. </div>
  105. </div>
  106. <div class="line"><span class="c-red"></span>存量用地申请</div>
  107. <div class="row cl">
  108. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>申请类型:</label>
  109. <div class="formControls col-xs-8 col-sm-9">
  110. <span class="select-box">
  111. <select class="select" th:name="apply_type" onChange="changeType(this)">
  112. <option th:each="item : ${applyTypeList}" th:value="${item.value}"
  113. th:text="${item.name}" th:selected = "${applyType}==${item.value}">
  114. </option>
  115. </select>
  116. </span>
  117. </div>
  118. </div>
  119. <div class="row cl" th:if="${userType==3}">
  120. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>厂房所在属地:</label>
  121. <div class="formControls col-xs-8 col-sm-9">
  122. <span class="select-box">
  123. <select class="select" th:name="building_street_id" >
  124. <option th:value="${companyInfo.street_id}" th:text="${'工商注册属地:' + companyInfo.street_name}">
  125. </option>
  126. <option th:if="${companyInfo.street_id != item.street_id}" th:each="item : ${companyInfo.buildingStreets}" th:value="${item.street_id}"
  127. th:text="${item.street_name}" th:selected = "${companyInfo.street_id}==${item.street_id}">
  128. </option>
  129. </select>
  130. </span>
  131. <label>注:如未找到厂房所在属地,请前往用户中心->企业信息处添加</label>
  132. </div>
  133. </div>
  134. <div th:if="${applyType}==2" id="summaryProcedureType" class="row cl">
  135. <label class="form-label col-xs-4 col-sm-2">可走简易程序的类别:</label>
  136. <div class="formControls col-xs-8 col-sm-9">
  137. <label>(如想走简易程序,勾选后,自行上传相关材料,简易程序可加速审核时间)</label><br/>
  138. <label th:each="item : ${summaryProcedureTypeList}" >
  139. <input type="checkbox" th:name="summary_procedure" th:value="${item.value}" th:text="${item.name}" onchange="summaryProcedureTypeChange(this)"/><br/>
  140. </label>
  141. </div>
  142. </div>
  143. <div class="line"><span class="c-red">*</span>基准材料
  144. <label>(一栏只可上传一个文件;如有多个文件,请打包成压缩包或扫描成PDF进行上传)</label></div>
  145. <div class="row cl" id="applyMaterials">
  146. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  147. <table class="table table-border table-bordered table-bg table-hover">
  148. <thead>
  149. <tr class="text-c">
  150. <th>编号</th>
  151. <th>内容</th>
  152. <!--<th>模板</th> 20180408 jiangjz-->
  153. <th>上传材料</th>
  154. <th>操作</th>
  155. </tr>
  156. </thead>
  157. <tbody>
  158. <tr class="text-c" th:each="model,iterStat:${applyMaterials}" th:object="${model}">
  159. <td th:text="${iterStat.index+1}"></td>
  160. <td th:text="*{content}"></td>
  161. <td class="td_material" >
  162. <input class="uploadFileTemplateId" type="hidden" th:name="${'applyMaterials['+iterStat.index+'].template_id'}" th:value="*{template_id}"/>
  163. <input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" th:onclick="'javascript:addFile(\'添加文件\',\'/stockLand/addApplyFile/1/'+*{template_id}+'\',\'800\',\'350\',this);'"/>
  164. <input class="uploadFileId" type="hidden" th:name="${'applyMaterials['+iterStat.index+'].fileDown.file_id'}"/>
  165. </td>
  166. <!-- &#xe706; -->
  167. <td class="delFile"><i onclick='deleteFile(this)' class='Hui-iconfont'>&#xe6a1; 删除</i></td>
  168. </tr>
  169. </tbody>
  170. </table>
  171. </div>
  172. </div>
  173. <div id="summaryMaterials" style="display:none;">
  174. <div class="line"><span class="c-red">*</span>简易程序相关材料
  175. <label>(一栏只可上传一个文件;如有多个文件,请打包成压缩包或扫描成PDF进行上传)</label></div>
  176. <div class="row cl">
  177. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  178. <div ><i class="Hui-iconfont" style="cursor: pointer;" onclick="addFileLine('summaryMaterials')">&#xe600; 添加</i></div>
  179. <table class="table table-border table-bordered table-bg table-hover ">
  180. <thead>
  181. <tr class="text-c">
  182. <th>上传材料</th>
  183. <th>操作</th>
  184. </tr>
  185. </thead>
  186. <tbody class="add_file_line">
  187. <tr class="text-c" >
  188. <td class="td_material">
  189. <input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" th:onclick="'javascript:addFileByName(\'/stockLand/addApplyFile/3/0'+'\',this);'"/>
  190. <input class="uploadFileId" type="hidden" th:name="summaryMaterials[0].fileDown.file_id"/>
  191. </td>
  192. <td class="icon_font"><i class='Hui-iconfont' onclick='deleteFile(this)'>&#xe6a1; 删除</i></td>
  193. </tr>
  194. </tbody>
  195. </table>
  196. </div>
  197. </div>
  198. </div>
  199. <div class="line">其他材料
  200. <label>(一栏只可上传一个文件;如有多个文件,请打包成压缩包或扫描成PDF进行上传)</label></div>
  201. <div class="row cl" id="otherMaterials">
  202. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  203. <div><i class="Hui-iconfont" style="cursor: pointer;" onclick="addFileLine('otherMaterials')">&#xe600; 添加</i></div>
  204. <table class="table table-border table-bordered table-bg table-hover ">
  205. <thead>
  206. <tr class="text-c">
  207. <th>上传材料</th>
  208. <th>操作</th>
  209. </tr>
  210. </thead>
  211. <tbody class="add_file_line">
  212. <tr class="text-c" >
  213. <td class="td_material">
  214. <input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" th:onclick="'javascript:addFileByName(\'/stockLand/addApplyFile/2/0'+'\',this);'"/>
  215. <input class="uploadFileId" type="hidden" th:name="otherMaterials[0].fileDown.file_id"/>
  216. </td>
  217. <td class="icon_font"><i class='Hui-iconfont' onclick='deleteFile(this)'>&#xe6a1; 删除</i></td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. </div>
  222. </div>
  223. <div class="row cl">
  224. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  225. <a class="btn btn-primary radius" onclick="save(1)" >&nbsp;&nbsp;保存草稿&nbsp;&nbsp;</a>
  226. <a class="btn btn-primary radius" onclick="save(0)">&nbsp;&nbsp;提交&nbsp;&nbsp;</a>
  227. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  228. </div>
  229. </div>
  230. </form>
  231. </article>
  232. <script type="text/javascript" th:src="@{/js/company/stock_land/apply_add.js}"></script>
  233. <script th:inline="javascript">
  234. $("#industryTypeList").change(function () {
  235. if ($('#industryTypeList option:selected').val() == "Empty") {
  236. $("#industry").show()
  237. } else {
  238. $("#industry").hide()
  239. }
  240. });
  241. /*function saveDraft(){
  242. $("#isDraft").val(1);
  243. }*/
  244. function summaryProcedureTypeChange(obj){
  245. if($("#summaryProcedureType").find("input:checked").length==0){
  246. $("#summaryMaterials").hide();
  247. }else{
  248. $("#summaryMaterials").show();
  249. }
  250. }
  251. function addFileLine(divId) {
  252. var length = $("#"+divId).find(".add_file_line tr").length;
  253. var html = "<i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1;</i>";
  254. $("#"+divId).find(".add_file_line tr:eq(0)").clone().insertAfter($("#"+divId).find('.add_file_line>tr').eq(-1))
  255. .find(".uploadFileName").val("").end()
  256. .find(".uploadFileId").removeAttr("name").attr("name", divId+"[" + length + "].fileDown.file_id").val("").end()
  257. .find(".icon_font").html(html).end();
  258. $('#layui-layer2').height(48);
  259. }
  260. function removeLine(obj) {
  261. $(obj).parent().parent().remove();
  262. setDocName();//重新设一下fileId域名称,不然顺序会乱掉,或出现两个相同的name
  263. }
  264. function deleteFile(obj) {
  265. $(obj).parent().parent()
  266. .find(".uploadFileName").val("").end()
  267. .find(".uploadFileId").val("").end();
  268. }
  269. //修改上传文件的fileId域名称
  270. function setDocName(){
  271. $("#otherMaterials").find(".uploadFileId").each(function(i,item){
  272. $(this).attr("name","otherMaterials["+i+"].fileDown.file_id");
  273. });
  274. $("#summaryMaterials").find(".uploadFileId").each(function(i,item){
  275. $(this).attr("name","summaryMaterials["+i+"].fileDown.file_id");
  276. });
  277. }
  278. /**
  279. * 取消
  280. */
  281. function removeIframe(){
  282. var index = parent.layer.getFrameIndex(window.name);
  283. parent.layer.close(index);
  284. }
  285. function getCompanyInfo(){
  286. $.ajax({
  287. type: 'post',
  288. url: pagePath + "/stockLand/getInfoByCompanyName",
  289. dataType: "json",
  290. data: {
  291. company_name: function () {
  292. return $.trim($("#company_name").val());
  293. }
  294. },
  295. success: function (data) {
  296. if (data.success) {
  297. var company = data.obj.company;
  298. bindCompany(company);
  299. } else {
  300. errorMessage(data.message);
  301. }
  302. }
  303. });
  304. }
  305. function bindCompany(company) {
  306. for(var key in company){
  307. $("#companyInfo").find("span[class='"+key+"']").text(company[key]);
  308. $("#companyInfo").find(".registration_address").val(company.registration_address);
  309. }
  310. if(company.industry_code){
  311. $("#industryTypeList").find("option[value="+company.industry_code+"]").attr("selected","selected");
  312. $("#companyInfo").find("#industry_name").val(company.industry_name);
  313. }
  314. if (company.companyContacts.length > 0) {
  315. var contact = company.companyContacts[0].contact;
  316. var phone = company.companyContacts[0].phone;
  317. $("#companyInfo").find(".contact").val(contact);
  318. $("#companyInfo").find(".contact_phone").val(phone);
  319. }
  320. }
  321. </script>
  322. </body>
  323. </html>