apply_add.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. </style>
  25. </head>
  26. <body layout:fragment="content">
  27. <article class="page-container">
  28. <form class="form form-horizontal" id="form-projectApplication-add">
  29. <input type="hidden" th:name="id" th:id="id"/>
  30. <input type="hidden" th:name="companyInfo.company_id" th:id="companyId" th:value="${companyId}"/>
  31. <input type="hidden" th:name="declaration_id" th:id="declaration_id" th:value="${declaration_id}"/>
  32. <input type="hidden" th:name="isDraft" th:id="isDraft" th:value="0"/>
  33. <div class="baseInfo">
  34. <div class="line">企业基本情况</div>
  35. <div id="companyInfo">
  36. <div class="row cl">
  37. <label class="form-label col-xs-4 col-sm-2"> 企业名称:</label>
  38. <div class="formControls col-xs-8 col-sm-4">
  39. <input type="text" class="input-text" th:value="${companyInfo.company_name}"
  40. th:name="companyInfo.company_name"/>
  41. <input type="hidden" th:value="${companyInfo.id}" th:name="companyInfo.id"/>
  42. </div>
  43. <label class="form-label col-xs-4 col-sm-2"> 统一社会信用代码:</label>
  44. <div class="formControls col-xs-8 col-sm-4">
  45. <input type="text" class="input-text" th:name="companyInfo.uscc" th:value="${companyInfo.uscc}"
  46. hidden/>
  47. <span>[[${companyInfo.uscc}]]</span>
  48. </div>
  49. </div>
  50. <div class="row cl">
  51. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>所属行业:</label>
  52. <div class="formControls col-xs-8 col-sm-4">
  53. <span class="select-box">
  54. <select class="select" th:name="companyInfo.industry_code" id="industryTypeList">
  55. <option value="">--请选择--</option>
  56. <option value="" th:each="item : ${industryTypeList}" th:value="${item.value}"
  57. th:selected="${companyInfo.industry_code==item.value}"
  58. th:text="${item.name}">
  59. </option>
  60. </select>
  61. </span>
  62. </div>
  63. <label class="form-label col-xs-4 col-sm-2"> 组织机构代码:</label>
  64. <div class="formControls col-xs-8 col-sm-4">
  65. <input type="hidden" th:name="companyInfo.organization_code"
  66. th:value="${companyInfo.organization_code}"/>
  67. <span th:value="${companyInfo.organization_code}">[[${companyInfo.organization_code}]]</span>
  68. </div>
  69. </div>
  70. <div class="row cl">
  71. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>注册地点:</label>
  72. <div class="formControls col-xs-8 col-sm-4">
  73. <input type="text" class="input-text" th:value="${companyInfo.registration_address}"
  74. th:name="companyInfo.registration_address"/>
  75. </div>
  76. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>注册资金:</label>
  77. <div class="formControls col-xs-4 col-sm-1">
  78. <span class="select-box">
  79. <select class="select" th:name="companyInfo.currency_unit" id="currency_unit">
  80. <!-- <option value="">--请选择货币单位--</option> -->
  81. <option th:selected="${companyInfo.currency_unit==item.id}"
  82. th:each="item : ${currencyList}"
  83. th:value="${item.id}" th:text="${item.name}"/>
  84. </select>
  85. </span>
  86. </div>
  87. <div class="formControls col-xs-6 col-sm-2">
  88. <input type="text" class="input-text" th:id="registration_capital"
  89. th:name="companyInfo.registration_capital"
  90. th:value="${companyInfo.registration_capital}"/>
  91. </div>
  92. <div class="col-xs-4 col-sm-1">(万元)</div>
  93. </div>
  94. <div class="row cl">
  95. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>法人代表姓名:</label>
  96. <div class="formControls col-xs-8 col-sm-4">
  97. <input type="text" class="input-text" th:value="${companyInfo.legal_representative}"
  98. th:name="companyInfo.legal_representative"/>
  99. </div>
  100. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>联系人姓名:</label>
  101. <div class="formControls col-xs-8 col-sm-4">
  102. <input type="text" class="input-text" th:value="${companyInfo.contact}"
  103. th:name="companyInfo.contact"/>
  104. </div>
  105. </div>
  106. <div class="row cl">
  107. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>法人代表职务:</label>
  108. <div class="formControls col-xs-8 col-sm-4">
  109. <input type="text" class="input-text" th:value="${companyInfo.lr_position}"
  110. th:name="companyInfo.lr_position"/>
  111. </div>
  112. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>联系人职务:</label>
  113. <div class="formControls col-xs-8 col-sm-4">
  114. <input type="text" class="input-text" th:value="${companyInfo.contact_position}"
  115. th:name="companyInfo.contact_position"/>
  116. </div>
  117. </div>
  118. <div class="row cl">
  119. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>法人代表手机:</label>
  120. <div class="formControls col-xs-8 col-sm-4">
  121. <input type="text" class="input-text" th:value="${companyInfo.lr_phone}"
  122. th:name="companyInfo.lr_phone"/>
  123. </div>
  124. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>联系人手机:</label>
  125. <div class="formControls col-xs-8 col-sm-4">
  126. <input type="text" class="input-text" th:value="${companyInfo.contact_phone}"
  127. th:name="companyInfo.contact_phone"/>
  128. </div>
  129. </div>
  130. <div class="row cl">
  131. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>总资产:</label>
  132. <div class="formControls col-xs-4 col-sm-1">
  133. <!--<input type="hidden" class="input-text" th:value="${companyInfo.total_assets_currency_unit}" name="companyInfo.total_assets_currency_unit" id="total_assets_currency_unit"/>-->
  134. <span class="select-box">
  135. <select class="select" th:name="companyInfo.total_assets_currency_unit">
  136. <!-- <option value="">--请选择货币单位--</option> -->
  137. <option th:selected="${companyInfo.total_assets_currency_unit==item.id}"
  138. th:each="item : ${currencyList}"
  139. th:value="${item.id}" th:text="${item.name}"/>
  140. </select>
  141. </span>
  142. </div>
  143. <div class="formControls col-xs-6 col-sm-2">
  144. <input type="text" class="input-text" th:id="total_assets"
  145. th:value="${companyInfo.total_assets}" th:name="companyInfo.total_assets"/>
  146. </div>
  147. <div class="col-xs-4 col-sm-1">(万元)</div>
  148. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>固定资产净值:</label>
  149. <div class="formControls col-xs-4 col-sm-1">
  150. <span class="select-box">
  151. <select class="select" th:name="companyInfo.fixed_assets_currency_unit">
  152. <!-- <option value="">--请选择货币单位--</option> -->
  153. <option th:selected="${companyInfo.fixed_assets_currency_unit==item.id}"
  154. th:each="item : ${currencyList}"
  155. th:value="${item.id}" th:text="${item.name}"/>
  156. </select>
  157. </span>
  158. </div>
  159. <div class="formControls col-xs-6 col-sm-2">
  160. <input type="text" class="input-text" th:id="fixed_assets"
  161. th:value="${companyInfo.fixed_assets}" th:name="companyInfo.fixed_assets"/>
  162. </div>
  163. <div class="col-xs-4 col-sm-1">(万元)</div>
  164. </div>
  165. </div>
  166. <div class="line"><span class="c-red">*</span>企业经营情况</div>
  167. <table class="table table-border table-bordered table-bg table-hover" id="operationsInfoTb">
  168. <thead>
  169. <tr class="text-c">
  170. <th>年份</th>
  171. <th th:each="item,iterStat: ${operationsInfo}">
  172. [[${item.year}]] 年
  173. <input type="hidden" th:value="${item.year}"
  174. th:name="${'operationsInfo['+iterStat.index+'].year'}"/>
  175. </th>
  176. </tr>
  177. </thead>
  178. <tbody>
  179. <tr class="text-c">
  180. <td>营业收入(万元)</td>
  181. <td th:each="item,iterStat: ${operationsInfo}">
  182. <input type="hidden" th:value="${item.cid}"
  183. th:name="${'operationsInfo['+iterStat.index+'].cid'}"/>
  184. <input required type="text" class="input-text number" th:value="${item.operation_income}"
  185. th:name="${'operationsInfo['+iterStat.index+'].operation_income'}"/>
  186. </td>
  187. </tr>
  188. <tr class="text-c">
  189. <td>其中:产品销售收入(万元)</td>
  190. <td th:each="item,iterStat: ${operationsInfo}">
  191. <input required type="text" class="input-text number" th:value="${item.sales_income}"
  192. th:name="${'operationsInfo['+iterStat.index+'].sales_income'}"/>
  193. </td>
  194. </tr>
  195. <tr class="text-c">
  196. <td>加工收入(万元)</td>
  197. <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"
  198. th:value="${item.processing_income}"
  199. th:name="${'operationsInfo['+iterStat.index+'].processing_income'}"/>
  200. </td>
  201. </tr>
  202. <tr class="text-c">
  203. <td>入库税金(万元)</td>
  204. <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"
  205. th:value="${item.storage_tax}"
  206. th:name="${'operationsInfo['+iterStat.index+'].storage_tax'}"/>
  207. </td>
  208. </tr>
  209. <tr class="text-c">
  210. <td>其中:增值税(万元)</td>
  211. <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"
  212. th:value="${item.added_value_tax}"
  213. th:name="${'operationsInfo['+iterStat.index+'].added_value_tax'}"/>
  214. </td>
  215. </tr>
  216. <!-- <tr class="text-c">-->
  217. <!-- <td>营业税(万元)</td>-->
  218. <!-- <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"-->
  219. <!-- th:value="${item.business_tax}"-->
  220. <!-- th:name="${'operationsInfo['+iterStat.index+'].business_tax'}"/>-->
  221. <!-- </td>-->
  222. <!-- </tr>-->
  223. <tr class="text-c">
  224. <td>企业所得税(万元)</td>
  225. <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"
  226. th:value="${item.corporate_income_tax}"
  227. th:name="${'operationsInfo['+iterStat.index+'].corporate_income_tax'}"/>
  228. </td>
  229. </tr>
  230. </tbody>
  231. </table>
  232. <div class="row cl">
  233. <div class="formControls col-xs-8 col-sm-4">
  234. <input id="isStatement" name="is_statement" type="checkbox"/><strong style="color:red;">
  235. 本企业声明:本企业保证以上信息真实无误!</strong>
  236. </div>
  237. </div>
  238. <div class="line">项目申报类别&nbsp;&nbsp;&nbsp;&nbsp; <a th:href="${instructionUrl} " target="_blank"
  239. style="color: #5b98dd;">&nbsp;&nbsp;下载</a></div>
  240. <div class="row cl">
  241. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span><span
  242. class="c-red"></span>类型:</label>
  243. <div class="formControls col-xs-8 col-sm-4">
  244. <span class="select-box">
  245. <select class="select" th:name="is_application" id="is_application" onChange="changeType(this)">
  246. <option value="">-- 全部 --</option>
  247. <option value="1">申请类</option>
  248. <option value="0">奖励类</option>
  249. </select>
  250. </span>
  251. </div>
  252. </div>
  253. <div class="row cl">
  254. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span><span class="c-red">*</span>项目大类:</label>
  255. <div class="formControls col-xs-8 col-sm-4">
  256. <span class="select-box">
  257. <select class="select" th:name="project_type" id="project_type" onChange="changeType(this)">
  258. <option value="">-- 请选择申报项目种类 --</option>
  259. <option th:each="item : ${projectTypeList}" th:value="${item.id}"
  260. th:text="${item.type_name}" th:selected="${applyType}==${item.id}">
  261. </option>
  262. </select>
  263. </span>
  264. </div>
  265. <label class="form-label col-xs-4 col-sm-2">
  266. <i class="Hui-iconfont Hui-iconfont-help" id="tips" title="" hidden></i>
  267. <span class="c-red">*</span>项目小类:
  268. </label>
  269. <div class="formControls col-xs-8 col-sm-4">
  270. <span class="select-box">
  271. <input type="hidden" th:id="project_name" th:name="project_name"/>
  272. <select class="select" th:name="project_id" th:id="project_id" onChange="changeProject(this)">
  273. <option th:each="item : ${projectNameList}" th:value="${item.value}"
  274. th:text="${item.name}" th:selected="${applyType}==${item.value}">
  275. </option>
  276. </select>
  277. </span>
  278. </div>
  279. </div>
  280. <div class="line">项目名称</div>
  281. <div class="row cl">
  282. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>项目名称:</label>
  283. <div class="formControls col-xs-8 col-sm-4">
  284. <input type="text" class="input-text" th:name="customize_name" id="customize_name">
  285. </div>
  286. </div>
  287. <!--<div class="row cl">
  288. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>项目类别说明:</label>
  289. <a th:href="${instructionUrl} " target="_blank" style="color: #5b98dd;">&nbsp;&nbsp;下载</a>
  290. </div>-->
  291. <div class="row cl">
  292. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  293. <a class="btn btn-primary radius" onclick="createFile();">&nbsp;&nbsp;保存&nbsp;&nbsp;</a>
  294. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  295. </div>
  296. </div>
  297. </div>
  298. <div style="display: none" id="applyFile">
  299. <div class="line">申报材料&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<span style="color: red;">附件2请下载填写上传;附件1、附件3、附件4系统根据企业填写信息自动生成,请企业下载确认后,再上传盖章扫描件</span>)
  300. </div>
  301. <div class="row cl" id="applyMaterials">
  302. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  303. <table class="table table-border table-bordered table-bg table-hover">
  304. <thead>
  305. <tr class="text-c">
  306. <th width="10%">序号</th>
  307. <th>附件</th>
  308. <th>申请材料</th>
  309. </tr>
  310. </thead>
  311. <tbody>
  312. <tr class="text-c">
  313. </tr>
  314. </tbody>
  315. </table>
  316. </div>
  317. </div>
  318. <div class="row cl">
  319. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  320. <a class="btn btn-primary radius" onclick="saveDraft(1);">&nbsp;&nbsp;保存草稿&nbsp;&nbsp;</a>
  321. <a class="btn btn-primary radius" onclick="saveDraft(0);">&nbsp;&nbsp;提交&nbsp;&nbsp;</a>
  322. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  323. <a class="btn btn-primary radius" onclick="returnNext();">&nbsp;&nbsp;返回上一步&nbsp;&nbsp;</a>
  324. </div>
  325. </div>
  326. </div>
  327. </form>
  328. </article>
  329. <script type="text/javascript" th:src="@{/js/company/project_application/apply_add.js}"></script>
  330. <script th:inline="javascript">
  331. var fileUrl = [[${fileUrl}]];
  332. $(function () {
  333. checkUscc();
  334. $("#operationsInfoTb").find(".number").each(function (i, item) {
  335. $(this).rules('add', {
  336. required: true,
  337. min: 0,
  338. max: 999999999.999999,
  339. isFloat: true,
  340. isFloat6Fn: true
  341. });
  342. });
  343. });
  344. $("#industryTypeList").change(function () {
  345. if ($('#industryTypeList option:selected').val() == "Empty") {
  346. $("#industry").show()
  347. } else {
  348. $("#industry").hide()
  349. }
  350. });
  351. function checkUscc() {
  352. var uscc = [[${companyInfo.uscc}]];
  353. console.log(uscc)
  354. if (uscc == null || uscc == "") {
  355. var index = layer.open({
  356. type: 2,
  357. area: ['80%', '60%'],
  358. fix: false, //不固定
  359. maxmin: true,
  360. shade: 0.4,
  361. shadeClose: true,
  362. title: ["请完善统一社会信用代码后保存并关闭此弹窗!", "color:red;"],
  363. content: pagePath + "/build/company/companyInfo",
  364. end: function () {
  365. location.reload();
  366. }
  367. });
  368. // layer.full(index);
  369. }
  370. }
  371. function saveDraft(isDraft) {
  372. $("#isDraft").val(isDraft);
  373. submit();
  374. }
  375. /**
  376. * 保存信息,生产附件1、3、4
  377. */
  378. function createFile() {
  379. if ($("#form-projectApplication-add").valid()) {
  380. var valid = true;
  381. if (!$("#isStatement").is(":checked")) {
  382. errorMessage('请勾选企业声明!');
  383. valid = false;
  384. }
  385. if (!valid) {
  386. return false;
  387. }
  388. } else {
  389. return false;
  390. }
  391. //提交
  392. $("#form-projectApplication-add").ajaxSubmit({
  393. type: 'post',
  394. url: pagePath + "/projectApplication/createFile",
  395. dataType: "json",
  396. success: function (data) {
  397. if (data.success) {
  398. // $("#id").val(data.obj.draftId);
  399. var applyMaterials = data.obj.fileDowns;
  400. console.log(applyMaterials);
  401. var baseFileUrl = data.obj.file_url;
  402. console.log(baseFileUrl);
  403. if (applyMaterials.length > 0) {
  404. $("#applyMaterials").find("tbody tr").remove();
  405. for (var i = 0; i < applyMaterials.length; i++) {
  406. var file = applyMaterials[i];
  407. var tr = '<tr class="text-c" >';
  408. //编号
  409. tr += '<td class="index" > ' + (i + 1) + ' </td>';
  410. //附件
  411. tr += '<td class ="templateFile">';
  412. if (baseFileUrl && file.file_url) {
  413. tr += '<a href="' + baseFileUrl + file.file_url + '" target="_blank" style="color: #5b98dd;">' + file.file_name + '</a>';
  414. } else {
  415. tr += '<span>' + file.file_name + '</span>';
  416. }
  417. tr += '</td>';
  418. //上传文件
  419. if (file.download_uri) {
  420. tr += '<td>';
  421. tr += '<input class="uploadFileTemplateId" type="hidden" name="applyMaterials[' + i + '].template_id" value="' + file.file_id + '"/>';
  422. tr += '<input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" onclick="javascript:addFile(\'添加文件\',\'/stockLand/addApplyFile/1/' + file.file_id + '\',\'800\',\'350\');"/>';
  423. tr += '<input class="uploadFileId" type="hidden" name="applyMaterials[' + i + '].fileDown.file_id" />';
  424. tr += '</td>';
  425. } else {
  426. tr += '<td>';
  427. tr += '<input class="uploadFileTemplateId" type="hidden" name="applyMaterials[' + i + '].template_id" value="' + file.file_id + '"/>';
  428. tr += '<input class="uploadFileContent" type="hidden" name="applyMaterials[' + i + '].content" value="annex_template"/>';
  429. tr += '<input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" onclick="javascript:addFile(\'添加文件\',\'/stockLand/addApplyFile/1/' + file.file_id + '\',\'800\',\'350\');"/>';
  430. tr += '<input class="uploadFileId" type="hidden" name="applyMaterials[' + i + '].fileDown.file_id" />';
  431. tr += '</td>';
  432. }
  433. $("#applyMaterials").find("tbody").append(tr);
  434. }
  435. } else {
  436. $("#applyMaterials").find("tbody tr").remove();
  437. }
  438. $("#applyFile").show();
  439. $(".baseInfo").hide();
  440. } else {
  441. errorMessage(data.message);
  442. }
  443. },
  444. error: function () {
  445. errorMessage('系统错误!');
  446. }
  447. });
  448. return false;
  449. }
  450. function returnNext() {
  451. $("#applyFile").hide();
  452. $(".baseInfo").show();
  453. }
  454. /**
  455. * 取消
  456. */
  457. function removeIframe() {
  458. // var index = parent.layer.getFrameIndex(window.name);
  459. // if(index){
  460. // parent.layer.close(index);
  461. // }else{
  462. // //返回门户申报页面
  463. // window.location.href = pagePath+"/home/informList/69";
  464. // //history.back(-2);
  465. // }
  466. history.back(-1);
  467. }
  468. function changeType(obj) {
  469. $.ajax({
  470. url: pagePath + "/project/getProjectByType",
  471. type: "get",
  472. data: {
  473. 'type': $("#project_type").val(),
  474. 'isApplication': $("#is_application").val()
  475. },
  476. dataType: "json",
  477. success: function (result) {
  478. if (result.success) {
  479. var projects = result.obj;
  480. if (projects.length > 0) {
  481. $("#project_id").find("option").remove();
  482. var options = '';
  483. for (var i = 0; i < projects.length; i++) {
  484. if(i == 0){
  485. $("#project_name").val(projects[i].project_name);
  486. }
  487. options += '<option value="' + projects[i].id + '" project_name="' + projects[i].project_name + '" >' + projects[i].project_name + '</option>';
  488. }
  489. $("#project_id").append(options);
  490. $("#project_name").val(projects[0].project_name);
  491. //获取材料模板
  492. // getTemplateFiles(null ,projects[0].id);
  493. weatherTips()
  494. } else {
  495. $("#project_id").find("option").remove();
  496. $("#project_name").val("");
  497. $("#applyMaterials").find("tbody tr").remove();
  498. }
  499. } else {
  500. errorMessage(result.message);
  501. }
  502. },
  503. error: function () {
  504. errorMessage('系统错误!');
  505. }
  506. });
  507. }
  508. function changeProject(obj) {
  509. $("#project_name").val($(obj).find("option:selected").attr("project_name"));
  510. // getTemplateFiles(obj);
  511. weatherTips()
  512. }
  513. function weatherTips(){
  514. var text = $("#project_id").find("option:selected").text();
  515. if(text == "鼓励企业创新发展(1)"){
  516. $("#tips").attr("title","获评企国家、省工业企业质量标杆的。");
  517. $("#tips").show();
  518. }else if(text == "鼓励企业创新发展(2)"){
  519. $("#tips").attr("title","获评省自主工业品牌50强的。");
  520. $("#tips").show();
  521. }else if(text == "鼓励企业创新发展(3)"){
  522. $("#tips").attr("title","获得国家级单项冠军示范企业、培育企业、单项冠军产品企业称号。");
  523. $("#tips").show();
  524. }else if(text == "鼓励企业创新发展(4)"){
  525. $("#tips").attr("title","获得国家级专精特新小巨人企业、省专精特新企业(含省专精特新产品企业、科技小巨人企业、隐形冠军企业、隐形小巨人企业)、市专精特新企业称号的。");
  526. $("#tips").show();
  527. }else if(text == "鼓励企业创新发展(5)"){
  528. $("#tips").attr("title","列入省重点推广应用目录的新产品新技术、省重点技术创新导向性计划奖励项目的。");
  529. $("#tips").show();
  530. }else if(text == "鼓励企业创新发展(6)"){
  531. $("#tips").attr("title","获评中国优秀工业设计奖(产品设计)金奖、优秀奖产品,获评省工业设计产品金奖、银奖、铜奖的产品。");
  532. $("#tips").show();
  533. }else{
  534. $("#tips").hide();
  535. }
  536. }
  537. function getTemplateFiles(obj, pid) {
  538. var projectId = 0;
  539. if (pid) {
  540. projectId = pid;
  541. } else {
  542. projectId = $(obj).val();
  543. }
  544. $.ajax({
  545. url: pagePath + "/project/getProjectMaterials",
  546. type: "get",
  547. data: {
  548. 'id': projectId
  549. },
  550. dataType: "json",
  551. success: function (result) {
  552. if (result.success) {
  553. var applyMaterials = result.obj.applyMaterials;
  554. if (applyMaterials.length > 0) {
  555. $("#applyMaterials").find("tbody tr").remove();
  556. for (var i = 0; i < applyMaterials.length; i++) {
  557. var file = applyMaterials[i].templateFile;
  558. var tr = '<tr class="text-c" >';
  559. //编号
  560. tr += '<td class="index" > ' + (i + 1) + ' </td>';
  561. //模板
  562. tr += '<td class ="templateFile">'
  563. if (file && file.file_url) {
  564. url = fileUrl + file.file_url;
  565. tr += '<a href="' + url + '" target="_blank">' + file.file_name + '</a>';
  566. } else {
  567. tr += '<span>' + applyMaterials[i].content + '</span>';
  568. }
  569. tr += '</td>';
  570. //上传文件
  571. tr += '<td>';
  572. tr += '<input class="uploadFileTemplateId" type="hidden" name="applyMaterials[' + i + '].template_id" value="' + applyMaterials[i].template_id + '"/>';
  573. tr += '<input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" onclick="javascript:addFile(\'添加文件\',\'/stockLand/addApplyFile/1/' + applyMaterials[i].template_id + '\',\'800\',\'350\');"/>';
  574. tr += '<input class="uploadFileId" type="hidden" name="applyMaterials[' + i + '].fileDown.file_id" />';
  575. tr += '</td>';
  576. $("#applyMaterials").find("tbody").append(tr);
  577. }
  578. } else {
  579. $("#applyMaterials").find("tbody tr").remove();
  580. }
  581. } else {
  582. errorMessage(result.message);
  583. }
  584. },
  585. error: function () {
  586. errorMessage('系统错误!');
  587. }
  588. });
  589. }
  590. </script>
  591. </body>
  592. </html>