apply_edit.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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. .industry_name_show {
  25. display: block;
  26. }
  27. .industry_name_hide {
  28. display: none;
  29. }
  30. </style>
  31. </head>
  32. <body layout:fragment="content">
  33. <article class="page-container">
  34. <form class="form form-horizontal" id="form-projectApplication-edit">
  35. <input type="hidden" th:name="id" th:id="id" th:value="${projectApply.id}"/>
  36. <input type="hidden" th:name="declaration_id" th:id="declaration_id" th:value="${projectApply.declaration_id}"/>
  37. <input type="hidden" th:name="companyInfo.company_id" th:id="companyId" th:value="${projectApply.company_id}"/>
  38. <input type="hidden" th:name="isDraft" th:id="isDraft" th:value="0"/>
  39. <div class="line">企业基本情况</div>
  40. <div id="companyInfo">
  41. <!-- <div class="row cl">
  42. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>申请企业:</label>
  43. <div class="formControls col-xs-8 col-sm-9">
  44. <input type="text" readonly="readonly" style="width:48%" required placeholder="点击查找按钮查找公司"
  45. maxlength="45" class="input-text readonly" id="company_name" th:name="company_name" th:value="${companyName}"/>
  46. <a class="btn btn-primary" style="margin-top:0px;" th:onclick="'javascript:open_dialog(\'查找公司\',\'/build/contract/selectCompany\',\'800\',\'500\');'">
  47. <i class="Hui-iconfont">&#xe665;</i>查找</a>
  48. </div>
  49. </div> -->
  50. <div class="row cl">
  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="text" class="input-text" th:value="${companyInfo.company_name}" th:name="companyInfo.company_name" />
  54. <input type="hidden" th:value="${companyInfo.id}" th:name="companyInfo.id" />
  55. </div>
  56. <label class="form-label col-xs-4 col-sm-2"> 统一社会信用代码:</label>
  57. <div class="formControls col-xs-8 col-sm-4">
  58. <input type="text" class="input-text" th:name="companyInfo.uscc" th:value="${companyInfo.uscc}" hidden/>
  59. <span>[[${companyInfo.uscc}]]</span>
  60. </div>
  61. </div>
  62. <div class="row cl">
  63. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>所属行业:</label>
  64. <div class="formControls col-xs-8 col-sm-4">
  65. <span class="select-box">
  66. <select class="select" th:name="companyInfo.industry_code" id="industryTypeList">
  67. <option value="">--请选择--</option>
  68. <option value="" th:each="item : ${industryTypeList}" th:value="${item.value}"
  69. th:selected="${companyInfo.industry_code==item.value}"
  70. th:text="${item.name}">
  71. </option>
  72. </select>
  73. </span>
  74. </div>
  75. <label class="form-label col-xs-4 col-sm-2"> 组织机构代码:</label>
  76. <div class="formControls col-xs-8 col-sm-4">
  77. <input type="hidden" th:name="companyInfo.organization_code" th:value="${companyInfo.organization_code}" />
  78. <span th:value="${companyInfo.organization_code}" >[[${companyInfo.organization_code}]]</span>
  79. </div>
  80. <!--<label class="form-label col-xs-4 col-sm-2"> 所属行业:</label>
  81. <div class="formControls col-xs-8 col-sm-4">
  82. <input type="text" class="input-text"th:value="${companyInfo.industry_code}" th:name="companyInfo.industry_code" />
  83. </div>-->
  84. </div>
  85. <div class="row cl" id="industry"
  86. th:class="${companyInfo.industry_name!=null&&companyInfo.industry_name!=''&&companyInfo.industry_code=='Empty'}?'industry_name_show row cl':'industry_name_hide row cl'">
  87. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>其它行业:</label>
  88. <div class="formControls col-xs-8 col-sm-3">
  89. <input type="text" class="input-text" value="" th:id="industry_name" th:name="companyInfo.industry_name"
  90. th:value="${companyInfo.industry_name}"
  91. placeholder="请输入所属行业"/>
  92. </div>
  93. </div>
  94. <div class="row cl">
  95. <label class="form-label col-xs-4 col-sm-2"> 注册地点:</label>
  96. <div class="formControls col-xs-8 col-sm-4">
  97. <input type="text" class="input-text"th:value="${companyInfo.registration_address}" th:name="companyInfo.registration_address" />
  98. </div>
  99. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>注册资金:</label>
  100. <div class="formControls col-xs-4 col-sm-1">
  101. <span class="select-box">
  102. <select class="select" th:name="companyInfo.currency_unit" id="currency_unit" >
  103. <!-- <option value="">--请选择货币单位--</option> -->
  104. <option th:selected="${companyInfo.currency_unit==item.id}" th:each="item : ${currencyList}"
  105. th:value="${item.id}" th:text="${item.name}"/>
  106. </select>
  107. </span>
  108. </div>
  109. <div class="formControls col-xs-6 col-sm-2" >
  110. <input type="text" class="input-text" th:id="registration_capital" th:name="companyInfo.registration_capital" th:value="${companyInfo.registration_capital}"/>
  111. </div>
  112. <div class="col-xs-4 col-sm-1">(万元)</div>
  113. </div>
  114. <div class="row cl">
  115. <label class="form-label col-xs-4 col-sm-2"> 法人代表姓名:</label>
  116. <div class="formControls col-xs-8 col-sm-4">
  117. <input type="text" class="input-text" th:value="${companyInfo.legal_representative}" th:name="companyInfo.legal_representative" />
  118. </div>
  119. <label class="form-label col-xs-4 col-sm-2"> 联系人姓名:</label>
  120. <div class="formControls col-xs-8 col-sm-4">
  121. <input type="text" class="input-text" th:value="${companyInfo.contact}" th:name="companyInfo.contact"/>
  122. </div>
  123. </div>
  124. <div class="row cl">
  125. <label class="form-label col-xs-4 col-sm-2"> 法人代表职务:</label>
  126. <div class="formControls col-xs-8 col-sm-4">
  127. <input type="text" class="input-text" th:value="${companyInfo.lr_position}" th:name="companyInfo.lr_position" />
  128. </div>
  129. <label class="form-label col-xs-4 col-sm-2"> 联系人职务:</label>
  130. <div class="formControls col-xs-8 col-sm-4">
  131. <input type="text" class="input-text" th:value="${companyInfo.contact_position}" th:name="companyInfo.contact_position" />
  132. </div>
  133. </div>
  134. <div class="row cl">
  135. <label class="form-label col-xs-4 col-sm-2"> 法人代表手机:</label>
  136. <div class="formControls col-xs-8 col-sm-4">
  137. <input type="text" class="input-text" th:value="${companyInfo.lr_phone}" th:name="companyInfo.lr_phone" />
  138. </div>
  139. <label class="form-label col-xs-4 col-sm-2"> 联系人手机:</label>
  140. <div class="formControls col-xs-8 col-sm-4">
  141. <input type="text" class="input-text" th:value="${companyInfo.contact_phone}" th:name="companyInfo.contact_phone" />
  142. </div>
  143. </div>
  144. <div class="row cl">
  145. <label class="form-label col-xs-4 col-sm-2"> 总资产:</label>
  146. <div class="formControls col-xs-4 col-sm-1" >
  147. <!--<input type="hidden" class="input-text" th:value="${companyInfo.total_assets_currency_unit}" name="companyInfo.total_assets_currency_unit" id="total_assets_currency_unit"/>-->
  148. <span class="select-box">
  149. <select class="select" th:name="companyInfo.total_assets_currency_unit" >
  150. <!-- <option value="">--请选择货币单位--</option> -->
  151. <option th:selected="${companyInfo.total_assets_currency_unit==item.id}" th:each="item : ${currencyList}"
  152. th:value="${item.id}" th:text="${item.name}"/>
  153. </select>
  154. </span>
  155. </div>
  156. <div class="formControls col-xs-6 col-sm-2" >
  157. <input type="text" class="input-text" th:id="total_assets" th:value="${companyInfo.total_assets}" th:name="companyInfo.total_assets" />
  158. </div>
  159. <div class="col-xs-4 col-sm-1">(万元)</div>
  160. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>固定资产净值:</label>
  161. <div class="formControls col-xs-4 col-sm-1" >
  162. <span class="select-box">
  163. <select class="select" th:name="companyInfo.fixed_assets_currency_unit" >
  164. <!-- <option value="">--请选择货币单位--</option> -->
  165. <option th:selected="${companyInfo.fixed_assets_currency_unit==item.id}" th:each="item : ${currencyList}" th:value="${item.id}" th:text="${item.name}"/>
  166. </select>
  167. </span>
  168. </div>
  169. <div class="formControls col-xs-6 col-sm-2" >
  170. <input type="text" class="input-text" th:id="fixed_assets" th:value="${companyInfo.fixed_assets}" th:name="companyInfo.fixed_assets" />
  171. </div>
  172. <div class="col-xs-4 col-sm-1">(万元)</div>
  173. </div>
  174. </div>
  175. <div class="line" id="project_provinces" style="display: none;">项目申报种类</div>
  176. <div class="row cl" id="project_type" style="display: none;">
  177. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>项目类别:</label>
  178. <div class="formControls col-xs-8 col-sm-4">
  179. <span class="select-box">
  180. <select class="select" th:name="category_id" id="category_id" onChange="changeType(this)">
  181. <option value="" >-- 请选择申报项目种类 --</option>
  182. <option th:each="item : ${superTypeList}" th:value="${item.id}"
  183. th:text="${item.project_type_name}" th:selected="${projectApply.category_id}==${item.id}">
  184. </option>
  185. </select>
  186. </span>
  187. </div>
  188. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>项目名称:</label>
  189. <div class="formControls col-xs-8 col-sm-4">
  190. <span class="select-box">
  191. <input type="hidden" th:id="project_type_name" th:name="project_type_name" th:value="${projectApply.project_type_name}"/>
  192. <select class="select" th:name="project_id" th:id="project_id">
  193. <option th:each="item : ${projectNameList}" th:value="${item.id}"
  194. th:text="${item.project_type_name}" th:selected = "${projectApply.project_id}==${item.id}">
  195. </option>
  196. </select>
  197. </span>
  198. </div>
  199. </div>
  200. <div class="line">申报材料</div>
  201. <div class="row cl" id="applyMaterials">
  202. <label class="form-label col-xs-4 col-sm-2">上传材料:</label>
  203. <div class="formControls col-xs-8 col-sm-9">
  204. <div class="uploader-thum-container">
  205. <div id="fileListPre" class="uploader-list">
  206. <th:block th:unless="${projectApply.fileDown.file_url} == null">
  207. <a th:href="${fileUrl} + ${projectApply.fileDown.file_url}" id="fileName" target="_blank">[[${projectApply.fileDown.file_name}]]</a>
  208. </th:block>
  209. </div>
  210. <div id="filePicker">选择文件</div>
  211. </div>
  212. </div>
  213. </div>
  214. <div class="row cl">
  215. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  216. <a class="btn btn-primary radius" onclick="saveDraft(1)" >&nbsp;&nbsp;保存草稿&nbsp;&nbsp;</a>
  217. <a class="btn btn-primary radius" onclick="saveDraft(0)" >&nbsp;&nbsp;提交&nbsp;&nbsp;</a>
  218. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  219. </div>
  220. </div>
  221. </form>
  222. </article>
  223. <script type="text/javascript" th:src="@{/js/company/project_intelligent/apply_edit.js}"></script>
  224. <script th:inline="javascript">
  225. /**
  226. * 初始化上传控件
  227. */
  228. var options = {
  229. uploadBtnId: '#filePicker',
  230. picturePreId: 'fileListPre',
  231. hiddenPictureUrl: 'img',
  232. hiddenPictureName: 'imgName',
  233. // accept : {
  234. // title : 'Images',
  235. // extensions : 'gif,jpg,jpeg,bmp,png',
  236. // mimeTypes : 'image/gif,image/jpg,image/jpeg,image/bmp,image/png'
  237. // },
  238. width: 81,
  239. height: 81,
  240. fileSizeLimit: 100 * 1024 * 1024,
  241. fileSingleSizeLimit: 100 * 1024 * 1024,
  242. // fileNumLimit: 1,
  243. append : false
  244. };
  245. var webUploadDoc = new $WebUploadDoc(options);
  246. webUploadDoc.init();
  247. var fileUrl = [[${fileUrl}]];
  248. var project =[[${projectApply}]];
  249. $(function(){
  250. $("#operationsInfoTb").find(".number").each(function(i,item){
  251. $(this).rules('add', {
  252. required:true,
  253. min : 0,
  254. max : 999999999.999999,
  255. isFloat : true,
  256. isFloat6Fn : true
  257. });
  258. });
  259. if (project.is_comprehensive){
  260. $("#project_provinces").show();
  261. $("#project_type").show();
  262. }
  263. });
  264. $("#industryTypeList").change(function () {
  265. if ($('#industryTypeList option:selected').val() == "Empty") {
  266. $("#industry").show()
  267. } else {
  268. $("#industry").hide()
  269. }
  270. });
  271. function saveDraft(isDraft){
  272. $("#isDraft").val(isDraft);
  273. submit();
  274. }
  275. /**
  276. * 取消
  277. */
  278. function removeIframe(){
  279. var index = parent.layer.getFrameIndex(window.name);
  280. parent.layer.close(index);
  281. }
  282. function changeType(obj){
  283. $.ajax({
  284. url :pagePath+"/company/projectIntelligent/getProjectByType",
  285. type : "get",
  286. data : {
  287. 'serviceId': $("#category_id").val()
  288. },
  289. dataType : "json",
  290. success: function (result) {
  291. if (result.success) {
  292. var projects = result.obj;
  293. $("#project_id").find("option").remove();
  294. var options = '';
  295. for(var i=0;i< projects.length;i++){
  296. options += '<option value="'+projects[i].id+'">'+projects[i].project_type_name+'</option>';
  297. }
  298. $("#project_id").append(options);
  299. } else {
  300. errorMessage(result.message);
  301. }
  302. },
  303. error: function () {
  304. errorMessage('系统错误!');
  305. }
  306. });
  307. }
  308. function changeProject(obj){
  309. var pName = $.trim($(obj).find("option:selected").text());
  310. $("#project_name").val(pName);
  311. getTemplateFiles(obj);
  312. }
  313. function getTemplateFiles(obj,pid){
  314. var projectId = 0;
  315. if(pid){
  316. projectId = pid;
  317. }else{
  318. projectId = $(obj).val();
  319. }
  320. $.ajax({
  321. url :pagePath+"/project/getProjectMaterials",
  322. type : "get",
  323. data : {
  324. 'id': projectId
  325. },
  326. dataType : "json",
  327. success: function (result) {
  328. if (result.success) {
  329. var applyMaterials = result.obj.applyMaterials;
  330. if(applyMaterials.length>0){
  331. $("#applyMaterials").find("tbody tr").remove();
  332. for(var i=0;i< applyMaterials.length;i++){
  333. var file = applyMaterials[i].templateFile;
  334. var tr = '<tr class="text-c" >';
  335. //编号
  336. tr +='<td class="index" > '+(i+1)+' </td>';
  337. //模板
  338. tr += '<td class ="templateFile">'
  339. if(file.file_url){
  340. url = fileUrl + file.file_url;
  341. tr += '<a href="'+url+'" target="_blank">'+file.file_name+'</a>';
  342. }
  343. tr += '</td>';
  344. //上传文件
  345. tr += '<td>';
  346. tr += '<input class="uploadFileTemplateId" type="hidden" name="applyMaterials['+i+'].fileDown.file_id" value="'+file.file_id+'"/>';
  347. tr += '<input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" onclick="javascript:addFile(\'添加文件\',\'/stockLand/addApplyFile/1/'+file.file_id+'\',\'800\',\'350\');"/>';
  348. tr += '<input class="uploadFileId" type="hidden" name="applyMaterials['+i+'].fileDown.file_id" />';
  349. tr += '</td>';
  350. $("#applyMaterials").find("tbody").append(tr);
  351. }
  352. }
  353. } else {
  354. errorMessage(result.message);
  355. }
  356. },
  357. error: function () {
  358. errorMessage('系统错误!');
  359. }
  360. });
  361. }
  362. </script>
  363. </body>
  364. </html>