apply_edit.html 37 KB

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