approve_page.html 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  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-land-approve">
  29. <input type="hidden" th:id="apply_id" th:name="apply_id" th:value="${landApply.id}"/>
  30. <div class="line">基本信息</div>
  31. <div class="row cl">
  32. <label class="form-label col-xs-4 col-sm-2"> 企业名称:</label>
  33. <div class="formControls col-xs-8 col-sm-4">
  34. [[${companyInfo.company_name}]]
  35. </div>
  36. <label class="form-label col-xs-4 col-sm-2"> 统一社会信用代码:</label>
  37. <div class="formControls col-xs-8 col-sm-4">
  38. [[${companyInfo.uscc}]]
  39. </div>
  40. </div>
  41. <div class="row cl">
  42. <label class="form-label col-xs-4 col-sm-2"> 组织机构代码:</label>
  43. <div class="formControls col-xs-8 col-sm-4">
  44. [[${companyInfo.organization_code}]]
  45. </div>
  46. <label class="form-label col-xs-4 col-sm-2"> 所属行业:</label>
  47. <div class="formControls col-xs-8 col-sm-4">
  48. [[${companyInfo.industry_code}]]
  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. [[${companyInfo.registration_address}]]
  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. [[${companyInfo.contact}]]
  59. </div>
  60. </div>
  61. <div class="row cl">
  62. <label class="form-label col-xs-4 col-sm-2"> 联系人职位:</label>
  63. <div class="formControls col-xs-8 col-sm-4">
  64. [[${companyInfo.contact_position}]]
  65. </div>
  66. <label class="form-label col-xs-4 col-sm-2"> 联系人手机:</label>
  67. <div class="formControls col-xs-8 col-sm-4">
  68. [[${companyInfo.contact_phone}]]
  69. </div>
  70. </div>
  71. <div class="line">存量用地申请</div>
  72. <div class="row cl">
  73. <label class="form-label col-xs-4 col-sm-2"> 申请类别:</label>
  74. <div class="formControls col-xs-8 col-sm-9">
  75. [[${landApply.apply_type_str}]]
  76. </div>
  77. </div>
  78. <div class="row cl">
  79. <label class="form-label col-xs-4 col-sm-2">厂房所在属地:</label>
  80. <div class="formControls col-xs-8 col-sm-9">
  81. [[${landApply.building_street_name}]]
  82. </div>
  83. </div>
  84. <div class="row cl">
  85. <label class="form-label col-xs-4 col-sm-2"> 审核状态:</label>
  86. <div class="formControls col-xs-8 col-sm-9">
  87. [[${landApply.approve_status_str}]]
  88. </div>
  89. </div>
  90. <div th:if="${landApply.summary_procedure}" class="row cl">
  91. <label class="form-label col-xs-4 col-sm-2"> 简易程序类别:</label>
  92. <div class="formControls col-xs-8 col-sm-9">
  93. [[${landApply.summary_procedure_str}]]
  94. </div>
  95. </div>
  96. <div class="line">基准材料</div>
  97. <div class="row cl">
  98. <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
  99. <table class="table table-border table-bordered table-bg table-hover">
  100. <thead>
  101. <tr class="text-c">
  102. <th>编号</th>
  103. <th>内容</th>
  104. <th>下载材料</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. <tr class="text-c" th:each="model,iterStat:${applyMaterials}" th:object="${model}">
  109. <td th:text="${iterStat.index+1}"></td>
  110. <td th:text="*{content}"></td>
  111. <td class="td_material">
  112. <div th:if="*{fileDown}">
  113. <a download th:href="${fileUrl} + *{fileDown.file_url}" target="_blank"
  114. style="color: #5b98dd;">[[*{fileDown.file_name}]]</a>
  115. </div>
  116. </td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. </div>
  121. </div>
  122. <div th:if="${landApply.summary_procedure}" class="line">简易程序材料</div>
  123. <div th:if="${landApply.summary_procedure}" class="row cl" id="summaryMaterials">
  124. <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
  125. <table class="table table-border table-bordered table-bg table-hover ">
  126. <thead>
  127. <tr class="text-c">
  128. <th>编号</th>
  129. <th>下载材料</th>
  130. </tr>
  131. </thead>
  132. <tbody class="add_file_line">
  133. <tr class="text-c" th:each="model,iterStat:${summaryMaterials}" th:object="${model}">
  134. <td th:text="${iterStat.index+1}"></td>
  135. <td class="td_material">
  136. <div th:if="*{fileDown}">
  137. <a download th:href="${fileUrl} + *{fileDown.file_url}" target="_blank"
  138. style="color: #5b98dd;">[[*{fileDown.file_name}]]</a>
  139. </div>
  140. </td>
  141. </tr>
  142. </tbody>
  143. </table>
  144. </div>
  145. </div>
  146. <div class="line">其他材料</div>
  147. <div class="row cl" id="otherMaterials">
  148. <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
  149. <table class="table table-border table-bordered table-bg table-hover ">
  150. <thead>
  151. <tr class="text-c">
  152. <th>编号</th>
  153. <th>下载材料</th>
  154. </tr>
  155. </thead>
  156. <tbody class="add_file_line">
  157. <tr class="text-c" th:each="model,iterStat:${otherMaterials}" th:object="${model}">
  158. <td th:text="${iterStat.index+1}"></td>
  159. <td class="td_material">
  160. <div th:if="*{fileDown}">
  161. <a download th:href="${fileUrl} + *{fileDown.file_url}" target="_blank"
  162. style="color: #5b98dd;">[[*{fileDown.file_name}]]</a>
  163. </div>
  164. </td>
  165. </tr>
  166. </tbody>
  167. </table>
  168. </div>
  169. </div>
  170. <th:block th:if="${isRent}">
  171. <th:block th:unless="${isLeader}">
  172. <div class="line">合同基本信息</div>
  173. <div class="row cl">
  174. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>是否在园区内:</label>
  175. <div class="formControls col-xs-8 col-sm-9">
  176. <label style="margin-right: 10px;"><input name="is_in_park" checked type="radio" value="1">在园区内</label>
  177. <label><input name="is_in_park" type="radio" value="0">不在园区内</label>
  178. </div>
  179. </div>
  180. <div id="inPark">
  181. <div class="row cl">
  182. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>所属园区:</label>
  183. <div class="formControls col-xs-4 col-sm-2">
  184. <span class="select-box">
  185. <select class="select" th:id="park">
  186. <option value='0'>请选择</option>
  187. <option th:each="item : ${parkList}" th:value="${item.id}" th:text="${item.name}">
  188. </option>
  189. </select>
  190. </span>
  191. </div>
  192. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>楼栋:</label>
  193. <div class="formControls col-xs-4 col-sm-2">
  194. <span class="select-box">
  195. <select class="select" th:id="building">
  196. <option value='0'>请选择</option>
  197. <option th:each="item : ${buildingList}" th:value="${item.id}" th:text="${item.name}">
  198. </option>
  199. </select>
  200. </span>
  201. </div>
  202. </div>
  203. <div class="row cl">
  204. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>楼层:</label>
  205. <div class="formControls col-xs-4 col-sm-2">
  206. <span class="select-box">
  207. <select class="select" th:id="floor">
  208. <option value='0'>请选择</option>
  209. <option th:each="item : ${floorList}" th:value="${item.id}" th:text="${item.name}">
  210. </option>
  211. </select>
  212. </span>
  213. </div>
  214. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租赁面积(㎡):</label>
  215. <div class="formControls col-xs-4 col-sm-2">
  216. <input type="text" class="input-text" th:id="area" th:value="${contract_area}"
  217. th:name="contract_area"/>
  218. </div>
  219. <a class="btn btn-primary radius" onclick="addFloor()">&nbsp;&nbsp;新增&nbsp;&nbsp;</a>
  220. </div>
  221. <div class="row cl">
  222. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>关联载体:</label>
  223. <div class="col-xs-8 col-sm-8">
  224. <table class="table table-border table-bordered table-bg table-hover ">
  225. <thead>
  226. <tr class="text-c">
  227. <th>所属园区</th>
  228. <th>楼栋</th>
  229. <th>楼层</th>
  230. <td>面积(㎡)</td>
  231. <th>操作</th>
  232. </tr>
  233. </thead>
  234. <tbody class="add-floor" th:id="'floor-table'">
  235. </tbody>
  236. </table>
  237. </div>
  238. </div>
  239. <div class="row cl">
  240. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住生效日期:</label>
  241. <div class="formControls col-xs-4 col-sm-2">
  242. <!-- <input type="text" class="input-text" id="contract_starttime" name="contract_starttime"-->
  243. <!-- th:id="contract_starttime" th:name="contract_starttime" style="float:left; width: 150px;"/>-->
  244. <input class="Wdate input-text" type="text" th:id="contract_start"
  245. th:name="contract.contract_start"
  246. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'contract_end\')}',isShowClear:true,readOnly:true})"/>
  247. </div>
  248. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住到期日期:</label>
  249. <div class="formControls col-xs-4 col-sm-2">
  250. <!-- <input type="text" class="input-text pull-left" id="contract_endtime" name="contract_endtime"-->
  251. <!-- th:id="contract_endtime" th:name="contract_endtime" style="float:left; width: 150px;"/>-->
  252. <input class="Wdate input-text" type="text" th:id="contract_end"
  253. th:name="contract.contract_end"
  254. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'contract_start\')}',isShowClear:true,readOnly:true})"/>
  255. </div>
  256. </div>
  257. <div class="row cl">
  258. <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>备注:</label>
  259. <div class="formControls col-xs-8 col-sm-8">
  260. <textarea class="textarea" id="contract_remark" th:name="contract.remark"
  261. placeholder=""></textarea>
  262. </div>
  263. </div>
  264. </div>
  265. <div id="notInPark" hidden>
  266. <div class="row cl">
  267. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租赁地址:</label>
  268. <div class="formControls col-xs-8 col-sm-9">
  269. <input type="text" class="input-text" th:id="out_park_location"
  270. th:value="${out_park_location}"
  271. th:name="out_park_location"/>
  272. </div>
  273. </div>
  274. <div class="row cl">
  275. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租赁面积(㎡):</label>
  276. <div class="formControls col-xs-4 col-sm-2">
  277. <input type="text" class="input-text" th:id="out_park_contract_area"
  278. th:value="${out_park_contract_area}"
  279. th:name="out_park_contract_area"/>
  280. </div>
  281. </div>
  282. <div class="row cl">
  283. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住生效日期:</label>
  284. <div class="formControls col-xs-4 col-sm-2">
  285. <input class="Wdate input-text" type="text" th:id="out_park_contract_start"
  286. th:name="out_park_contract_start"
  287. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'out_park_contract_end\')}',isShowClear:true,readOnly:true})"/>
  288. </div>
  289. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住到期日期:</label>
  290. <div class="formControls col-xs-4 col-sm-2">
  291. <input class="Wdate input-text" type="text" th:id="out_park_contract_end"
  292. th:name="out_park_contract_end"
  293. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'out_park_contract_start\')}',isShowClear:true,readOnly:true})"/>
  294. </div>
  295. </div>
  296. </div>
  297. </th:block>
  298. <th:block th:if="${isLeader}">
  299. <div class="line">合同基本信息</div>
  300. <th:block th:if="${landApply.is_in_park == '1'}">
  301. <div class="row cl">
  302. <label class="form-label col-xs-4 col-sm-2">关联载体:</label>
  303. <div class="col-xs-8 col-sm-8">
  304. <table class="table table-border table-bordered table-bg table-hover ">
  305. <thead>
  306. <tr class="text-c">
  307. <th>所属园区</th>
  308. <th>楼栋</th>
  309. <th>楼层</th>
  310. <td>面积</td>
  311. </tr>
  312. </thead>
  313. <tbody>
  314. <tr class="text-c" th:each="item : ${contract.floors}">
  315. <td th:text="${contract.park_name}"></td>
  316. <td th:text="${item.building_name}"></td>
  317. <td th:text="${item.floor}"></td>
  318. <td th:text="${item.area}"></td>
  319. </tr>
  320. </tbody>
  321. </table>
  322. </div>
  323. </div>
  324. <div class="row cl">
  325. <label class="form-label col-xs-4 col-sm-2">租住生效日期:</label>
  326. <div class="formControls col-xs-4 col-sm-2">
  327. [[${contract.contract_start}]]
  328. </div>
  329. <label class="form-label col-xs-4 col-sm-2">租住到期日期:</label>
  330. <div class="formControls col-xs-4 col-sm-2">
  331. [[${contract.contract_end}]]
  332. </div>
  333. </div>
  334. </th:block>
  335. <th:block th:if="${landApply.is_in_park == '0'}">
  336. <div class="row cl">
  337. <label class="form-label col-xs-4 col-sm-2">租赁地址:</label>
  338. <div class="formControls col-xs-8 col-sm-9">
  339. [[${stockLandOutPark.out_park_location}]]
  340. </div>
  341. </div>
  342. <div class="row cl">
  343. <label class="form-label col-xs-4 col-sm-2">租赁面积(㎡):</label>
  344. <div class="formControls col-xs-4 col-sm-2">
  345. [[${stockLandOutPark.out_park_contract_area}]]
  346. </div>
  347. </div>
  348. <div class="row cl">
  349. <label class="form-label col-xs-4 col-sm-2">租住生效日期:</label>
  350. <div class="formControls col-xs-4 col-sm-2">
  351. [[${stockLandOutPark.out_park_contract_start}]]
  352. </div>
  353. <label class="form-label col-xs-4 col-sm-2">租住到期日期:</label>
  354. <div class="formControls col-xs-4 col-sm-2">
  355. [[${stockLandOutPark.out_park_contract_end}]]
  356. </div>
  357. </div>
  358. </th:block>
  359. </th:block>
  360. </th:block>
  361. <div class="line">流程信息</div>
  362. <div class="row cl">
  363. <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
  364. <table class="table table-border table-bordered table-bg table-hover processTb">
  365. <thead>
  366. <tr class="text-c">
  367. <th style="width:15%;">时间</th>
  368. <th style="width:15%;">审核状态</th>
  369. <th style="width:10%;">部门</th>
  370. <th style="width:10%;">操作人</th>
  371. <th style="width:10%;">操作</th>
  372. <th style="width:15%;">材料</th>
  373. <th style="width:25%;">审核意见</th>
  374. </tr>
  375. </thead>
  376. <tbody>
  377. <tr class="text-c" th:each="model,iterStat:${approvalList}" th:object="${model}">
  378. <td th:text="*{create_time}"></td>
  379. <td th:text="*{before_approvalstatus_str}"></td>
  380. <td th:text="*{department}"></td>
  381. <td th:text="*{create_name}"></td>
  382. <td th:text="*{oper_type}"></td>
  383. <td class="td_material">
  384. <div th:if="*{fileDowns}">
  385. <a download th:each="filedown,iterStat:*{fileDowns}" th:object="${filedown}"
  386. th:href="${fileUrl} + *{file_url}" target="_blank" style="color: #5b98dd;">[[*{file_name}]]<br/></a>
  387. </div>
  388. </td>
  389. <td class="viewComment" th:data="*{approval_comment}" th:text="*{approval_comment}"></td>
  390. </tr>
  391. </tbody>
  392. </table>
  393. </div>
  394. </div>
  395. <div class="line">审核意见</div>
  396. <div class="row cl">
  397. <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
  398. <textarea class="textarea" id="approval_comment" th:name="approval_comment"
  399. placeholder="请输入审核意见"></textarea>
  400. </div>
  401. </div>
  402. <div class="line">审核材料上传</div>
  403. <div class="row cl">
  404. <label class="form-label col-xs-4 col-sm-2">上传材料:</label>
  405. <div class="formControls col-xs-8 col-sm-9">
  406. <div class="uploader-thum-container">
  407. <div id="fileListPre" class="uploader-list">
  408. </div>
  409. <div id="filePicker">选择文件</div>
  410. </div>
  411. </div>
  412. </div>
  413. <div class="row cl">
  414. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  415. <input id="status" type="hidden" name="status"/>
  416. <input id="isRent" type="hidden" th:value="${isRent}"/>
  417. <input id="isLeader" type="hidden" th:value="${isLeader}"/>
  418. <a th:unless="${isLeader}" class="btn btn-primary radius" onclick="audit(4)">&nbsp;&nbsp;提交审核意见&nbsp;&nbsp;</a>
  419. <!-- <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(2)">&nbsp;&nbsp;通过&nbsp;&nbsp;</a>
  420. <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(3)" >&nbsp;&nbsp;不通过&nbsp;&nbsp;</a>
  421. <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(1)">&nbsp;&nbsp;退回&nbsp;&nbsp;</a>
  422. -->
  423. <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(2)">&nbsp;&nbsp;通过&nbsp;&nbsp;</a>
  424. <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(3)">&nbsp;&nbsp;不通过&nbsp;&nbsp;</a>
  425. <a class="btn btn-primary radius" onclick="audit(1)">&nbsp;&nbsp;退回&nbsp;&nbsp;</a>
  426. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  427. </div>
  428. </div>
  429. </form>
  430. </article>
  431. <script th:inline="javascript">
  432. //status 1退回,2通过,3不通过,4提交审核意见
  433. function audit(status) {
  434. if ($('input[type=radio][name=is_in_park]:checked').val() == '0') {
  435. //不在园区内
  436. if ($("#out_park_location").val() == "") {
  437. errorMessage("请填写租赁地址!")
  438. return
  439. }
  440. if ($("#out_park_contract_area").val() == "") {
  441. errorMessage("请填写租赁面积!")
  442. return
  443. }
  444. if ($("#out_park_contract_start").val() == "") {
  445. errorMessage("请选择租住生效日期!")
  446. return
  447. }
  448. if ($("#out_park_contract_end").val() == "") {
  449. errorMessage("请选择租住到期日期!")
  450. return
  451. }
  452. } else if ($('input[type=radio][name=is_in_park]:checked').val() == '1') {
  453. //在园区内
  454. if (floorList.length <= 0) {
  455. errorMessage("请选择关联载体!")
  456. return
  457. }
  458. if ($("#contract_start").val() == "") {
  459. errorMessage("请选择租住生效日期!")
  460. return
  461. }
  462. if ($("#contract_end").val() == "") {
  463. errorMessage("请选择租住到期日期!")
  464. return
  465. }
  466. }
  467. $("#status").val(status);
  468. //所有审核意见必填-2018-06-04
  469. //if(status==1 || status==3){
  470. //退回、不通过审核意见必填
  471. if ($.trim($("#approval_comment").val()) == "") {
  472. errorMessage('请填写审核意见!');
  473. return false;
  474. }
  475. //}
  476. $("#form-land-approve").submit();
  477. }
  478. $(function () {
  479. $("#form-land-approve").validate({
  480. rules: {},
  481. messages: {},
  482. onkeyup: false,
  483. focusCleanup: true,
  484. success: "valid",
  485. submitHandler: function (form) {
  486. // $(form).find(":submit").attr("disabled", true);
  487. setDocNames();
  488. $(form).ajaxSubmit({
  489. type: 'post',
  490. url: pagePath + "/stockLand/approve",
  491. dataType: "json",
  492. success: function (data) {
  493. if (data.success) {
  494. succeedMessage(data.message);
  495. //setTimeClose();
  496. //退回 或者 房屋出租街道通过或者不通过
  497. if ($("#status").val() == "1" || $("#status").val() == "3" ||
  498. ($("#isRent").val() == "true" && $("#status").val() == "2")) {
  499. layer.confirm(
  500. '审核成功,确认现在就通知企业吗?',
  501. function (index) {
  502. var url = "/stockLand/confirmPage/" + $("#apply_id").val();
  503. open_dialog("通知企业", url, 800, 500);
  504. },
  505. function () {
  506. setTimeClose();
  507. }
  508. );
  509. } else {
  510. setTimeClose();
  511. }
  512. } else {
  513. // $(form).find(":submit").attr("disabled", false);
  514. errorMessage(data.message);
  515. }
  516. },
  517. error: function () {
  518. errorMessage('系统错误!');
  519. }
  520. });
  521. return false; // 非常重要,如果是false,则表明是不跳转,在本页上处理,也就是ajax,如果是非false,则传统的form跳转。
  522. }
  523. });
  524. //查看完整意见
  525. $(".viewComment").on("click", function () {
  526. layer.alert(
  527. $(this).attr('data'),
  528. {area: ['800px', '500px']}
  529. )
  530. });
  531. $('input[type=radio][name=is_in_park]').change(function () {
  532. if (this.value == '1') {
  533. //在园区内
  534. $('#inPark').show();
  535. $('#notInPark').hide();
  536. } else if (this.value == '0') {
  537. //不在园区内
  538. $('#inPark').hide();
  539. $('#notInPark').show();
  540. }
  541. });
  542. });
  543. //修改上传文件的name域,改成数组形式
  544. function setDocNames() {
  545. $("#fileListPre").find("input[id$='DocUrl']").each(function (i, item) {
  546. $(this).attr("name", "fileDowns[" + i + "].file_id");
  547. });
  548. }
  549. /*管理员-详情*/
  550. function open_dialog(title, url, w, h) {
  551. layer_show(title, pagePath + url, w, h);
  552. }
  553. /**
  554. * 初始化上传控件
  555. */
  556. var options = {
  557. uploadBtnId: '#filePicker',
  558. picturePreId: 'fileListPre',
  559. hiddenPictureUrl: 'img',
  560. hiddenPictureName: 'imgName',
  561. // accept : {
  562. // title : 'Images',
  563. // extensions : 'gif,jpg,jpeg,bmp,png',
  564. // mimeTypes : 'image/gif,image/jpg,image/jpeg,image/bmp,image/png'
  565. // },
  566. width: 81,
  567. height: 81,
  568. fileSizeLimit: 100 * 1024 * 1024,
  569. fileSingleSizeLimit: 100 * 1024 * 1024,
  570. // fileNumLimit: 1,
  571. append: true
  572. };
  573. var webUploadDoc = new $WebUploadDoc(options);
  574. webUploadDoc.init();
  575. $("#park").change(function () {
  576. var parkId = $("#park").val();
  577. var buildingId = $("#building").val();
  578. if (parkId == '') {
  579. return;
  580. }
  581. var url = pagePath + "/stockLand/contract_building_data";
  582. $.ajax({
  583. cache: true,
  584. type: 'get',
  585. url: url,
  586. dataType: "json",
  587. data: {
  588. 'parkId': parkId
  589. },
  590. success: function (result) {
  591. if (result.success) {
  592. var buildingList = result.obj.buildingList;
  593. var building = $("#building").empty();
  594. building.append("<option value='0'>请选择</option>");
  595. var floor = $("#floor").empty();
  596. floor.append("<option value='0'>请选择</option>");
  597. $("#area").val("");
  598. if (buildingList.length > 0) {
  599. for (var i = 0; i < buildingList.length; i++) {
  600. building.append("<option value='" + buildingList[i].id + "'>" + buildingList[i].build_name + "</option>")
  601. }
  602. }
  603. } else {
  604. errorMessage(result.message);
  605. }
  606. },
  607. error: function () {
  608. errorMessage('系统错误!');
  609. }
  610. })
  611. })
  612. $("#building").change(function () {
  613. var parkId = $("#park").val();
  614. var buildingId = $("#building").val();
  615. if (buildingId == '') {
  616. return;
  617. }
  618. var url = pagePath + "/stockLand/contract_floor_data";
  619. $.ajax({
  620. cache: true,
  621. type: 'get',
  622. url: url,
  623. dataType: "json",
  624. data: {
  625. 'buildingId': buildingId
  626. },
  627. success: function (result) {
  628. if (result.success) {
  629. var floorList = result.obj.floorList;
  630. var floor = $("#floor").empty();
  631. floor.append("<option value='0'>请选择</option>");
  632. $("#area").val("");
  633. if (floorList.length > 0) {
  634. for (var i = 0; i < floorList.length; i++) {
  635. floor.append("<option value='" + floorList[i].id + "'>" + floorList[i].floor + "</option>")
  636. }
  637. }
  638. } else {
  639. errorMessage(result.message);
  640. }
  641. },
  642. error: function () {
  643. errorMessage('系统错误!');
  644. }
  645. })
  646. })
  647. $("#floor").change(function () {
  648. $("#area").val("");
  649. })
  650. var floorList = new Array();
  651. function addFloor() {
  652. var parkId = $("#park").val();
  653. var buildingId = $("#building").val();
  654. var floorId = $("#floor").val();
  655. var area = $("#area").val();
  656. var parkName = $("#park option:selected").text();
  657. var buildingName = $("#building option:selected").text();
  658. var floorName = $("#floor option:selected").text();
  659. if (parkId == "0" || parkId == "" || parkId == undefined || parkId == null) {
  660. errorMessage("请填选择园区!");
  661. return
  662. }
  663. if (buildingId == "0" || buildingId == "" || buildingId == undefined || buildingId == null) {
  664. errorMessage("请填选择楼栋!");
  665. return
  666. }
  667. if (floorId == "0" || floorId == "" || floorId == undefined || floorId == null) {
  668. errorMessage("请填选择楼层!");
  669. return
  670. }
  671. if (area == "" || area == undefined || area == null) {
  672. errorMessage("请填写租赁面积!");
  673. return
  674. }
  675. if (floorList.length > 0) {
  676. for (var i = 0; i < floorList.length; i++) {
  677. if (parkId != floorList[i].parkId) {
  678. errorMessage("请选择同一园区!");
  679. return;
  680. }
  681. if (floorId == floorList[i].floorId) {
  682. errorMessage("楼层重复!");
  683. return;
  684. }
  685. }
  686. }
  687. floorList.push({
  688. parkId: parkId,
  689. buildingId: buildingId,
  690. floorId: floorId,
  691. parkName: parkName,
  692. buildingName: buildingName,
  693. floorName: floorName,
  694. area: area
  695. })
  696. renderFloorTable(floorList);
  697. }
  698. function renderFloorTable(floorList) {
  699. var str = "";
  700. if (floorList.length > 0) {
  701. for (var i = 0; i < floorList.length; i++) {
  702. str += "<tr class='text-c'>"
  703. str += "<td>" + floorList[i].parkName + "</td>"
  704. str += "<td>" + floorList[i].buildingName + "</td>"
  705. str += "<td>" + floorList[i].floorName + "</td>"
  706. str += "<td>" + floorList[i].area + "</td>"
  707. str += "<td class='icon_font'><i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>"
  708. str += "<input hidden name='contract.floors[" + i + "].floor_id' value='" + floorList[i].floorId + "'/>"
  709. str += "<input hidden name='contract.floors[" + i + "].area' value='" + floorList[i].area + "'/>"
  710. str += "<input hidden name='contract.park_id' value='" + floorList[i].parkId + "'/>"
  711. str += "</td>"
  712. str += "</tr>"
  713. }
  714. }
  715. $("#floor-table").html(str);
  716. }
  717. function removeLine(obj) {
  718. $(obj).parent().parent().remove();
  719. }
  720. /**
  721. * 取消
  722. */
  723. function removeIframe() {
  724. var index = parent.layer.getFrameIndex(window.name);
  725. parent.layer.close(index);
  726. }
  727. // $(function () {
  728. //
  729. // var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
  730. // var isOpera = userAgent.indexOf("Opera") > -1;
  731. // //判断是否IE浏览器
  732. // if (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera) {
  733. // $("#contract_starttime").remove();
  734. // $("#contract_endtime").remove();
  735. // } else {
  736. // $("#contract_starttimeIE").remove();
  737. // $("#contract_endtimeIE").remove();
  738. // var startDate = laydate.render({
  739. // elem: '#contract_starttime',
  740. // type: 'datetime',
  741. // format: 'yyyy-MM-dd',
  742. // done: function (value, date) {
  743. // setTimeout(function () {
  744. // $("#form-land-approve").validate().element($("#contract_starttime"));
  745. // }, 100)
  746. // if (value !== '') {
  747. // endDate.config.min.year = date.year;
  748. // endDate.config.min.month = date.month - 1;
  749. // endDate.config.min.date = date.date;
  750. // // endDate.config.min.hours = date.hours;
  751. // // endDate.config.min.minutes = date.minutes;
  752. // // endDate.config.min.seconds = date.seconds;
  753. // } else {
  754. // endDate.config.min.year = '1900';
  755. // endDate.config.min.month = '0';
  756. // endDate.config.min.date = '1';
  757. // // endDate.config.min.hours = '0';
  758. // // endDate.config.min.minutes = '0';
  759. // // endDate.config.min.seconds = '0';
  760. // }
  761. // }
  762. // });
  763. //
  764. // var endDate = laydate.render({
  765. // elem: '#contract_endtime',
  766. // type: 'datetime',
  767. // format: 'yyyy-MM-dd',
  768. // done: function (value, date) {
  769. // setTimeout(function () {
  770. // $("#form-land-approve").validate().element($("#contract_endtime"));
  771. // }, 100)
  772. // if (value !== '') {
  773. // startDate.config.max.year = date.year;
  774. // startDate.config.max.month = date.month - 1;
  775. // startDate.config.max.date = date.date;
  776. // // startDate.config.max.hours = date.hours;
  777. // // startDate.config.max.minutes = date.minutes;
  778. // // startDate.config.max.seconds = date.seconds;
  779. // } else {
  780. // startDate.config.max.year = '2100';
  781. // startDate.config.max.month = '0';
  782. // startDate.config.max.date = '1';
  783. // // startDate.config.max.hours = '0';
  784. // // startDate.config.max.minutes = '0';
  785. // // startDate.config.max.seconds = '0';
  786. // }
  787. // }
  788. // });
  789. // }
  790. // });
  791. </script>
  792. </body>
  793. </html>