index_search.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. <style>
  2. .layui-col-space12>*{
  3. padding: 6px 0 6px 0 !important;
  4. }
  5. </style>
  6. <fieldset>
  7. <legend>条件搜索</legend>
  8. <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" >
  9. <div class="layui-form-item layui-inline">
  10. <label class="layui-form-label">建筑分类</label>
  11. <div class="layui-input-inline">
  12. <select class="layui-select" name="category_id">
  13. {foreach $menus as $k=>$v}
  14. {eq name='Think.get.category_id' value='$v.id.""'}
  15. <option selected value="{$v.id}">{$v.spl|raw}{$v.title}</option>
  16. {else}
  17. <option value="{$v.id}">{$v.spl|raw}{$v.title}</option>
  18. {/eq}
  19. {/foreach}
  20. </select>
  21. </div>
  22. </div>
  23. <div class="layui-form-item layui-inline">
  24. <label class="layui-form-label">工程类别</label>
  25. <div class="layui-input-inline">
  26. <select class="layui-select" name="engineering_category">
  27. {foreach [''=>'-- 全部 --','新建工程'=>'新建工程','改扩建加固工程'=>'改扩建加固工程','其他'=>'其他'] as $k=>$v}
  28. {eq name='Think.get.engineering_category' value='$k.""'}
  29. <option selected value="{$k}">{$v}</option>
  30. {else}
  31. <option value="{$k}">{$v}</option>
  32. {/eq}
  33. {/foreach}
  34. </select>
  35. </div>
  36. </div>
  37. <div class="layui-form-item layui-inline">
  38. <label class="layui-form-label">工程范围</label>
  39. <div class="layui-input-inline">
  40. <input name="project_scope" value="{$Think.get.project_scope|default=''}" placeholder="请输入工程范围" class="layui-input">
  41. </div>
  42. </div>
  43. <div class="layui-form-item layui-inline">
  44. <label class="layui-form-label">造价类别</label>
  45. <div class="layui-input-inline">
  46. <select class="layui-select" name="cost_categories">
  47. {foreach [''=>'-- 全部 --','投标价'=>'投标价','合同价'=>'合同价','结算价'=>'结算价','重计量'=>'重计量','清单控制价'=>'清单控制价','估算'=>'估算','概算'=>'概算','目标成本'=>'目标成本','其他'=>'其他'] as $k=>$v}
  48. {eq name='Think.get.cost_categories' value='$k.""'}
  49. <option selected value="{$k}">{$v}</option>
  50. {else}
  51. <option value="{$k}">{$v}</option>
  52. {/eq}
  53. {/foreach}
  54. </select>
  55. </div>
  56. </div>
  57. <div class="layui-form-item layui-inline">
  58. <label class="layui-form-label">模板类型</label>
  59. <div class="layui-input-inline">
  60. <select class="layui-select" name="template">
  61. {foreach $template as $k=>$v}
  62. {eq name='Think.get.template' value='$v.id.""'}
  63. <option selected value="{$v.id}">{$v.title}</option>
  64. {else}
  65. <option value="{$v.id}">{$v.title}</option>
  66. {/eq}
  67. {/foreach}
  68. </select>
  69. </div>
  70. </div>
  71. <br />
  72. <div class="layui-form-item layui-inline ">
  73. <label class="layui-form-label">建设地点</label>
  74. <div class="layui-input-inline layui-col-space18" style="width: 350px">
  75. <label class="layui-col-xs4">
  76. <select name="construction_site_province" id="province" lay-filter="province">
  77. <option value="">选择省</option>
  78. {foreach $province as $k=>$v}
  79. {eq name='Think.get.construction_site_province' value='$v.name.""'}
  80. <option selected value="{$v.name}">{$v.name}</option>
  81. {else}
  82. <option value="{$v.name}">{$v.name}</option>
  83. {/eq}
  84. {/foreach}
  85. </select>
  86. </label>
  87. <label class="layui-col-xs4">
  88. <select name="construction_site_city" class="city-selector" data-value="" id="city" lay-filter="city">
  89. <option value="">选择市</option>
  90. {foreach $city as $k=>$v}
  91. {eq name='Think.get.construction_site_city' value='$v.name.""'}
  92. <option selected value="{$v.name}">{$v.name}</option>
  93. {else}
  94. <option value="{$v.name}">{$v.name}</option>
  95. {/eq}
  96. {/foreach}
  97. </select>
  98. </label>
  99. <label class="layui-col-xs4">
  100. <select name="construction_site_area" class="county-selector" data-value="" id="area" lay-filter="area">
  101. <option value="">选择区</option>
  102. {foreach $area as $k=>$v}
  103. {eq name='Think.get.construction_site_area' value='$v.name.""'}
  104. <option selected value="{$v.name}">{$v.name}</option>
  105. {else}
  106. <option value="{$v.name}">{$v.name}</option>
  107. {/eq}
  108. {/foreach}
  109. </select>
  110. </label>
  111. </div>
  112. </div>
  113. <div class="layui-form-item layui-inline">
  114. <label class="layui-form-label">编制日期</label>
  115. <div class="layui-input-inline">
  116. <!-- <input type="text" class="layui-input" readonly name="prepare_date" value="{$Think.get.prepare_date|default=''}" id="test1" placeholder="yyyy-MM-dd">-->
  117. <input data-date-range name="prepare_date" readonly value="{$Think.get.prepare_date|default=''}" placeholder="请选择编制日期" class="layui-input">
  118. </div>
  119. </div>
  120. <br />
  121. <div class="layui-form-item layui-inline">
  122. <label class="layui-form-label">项目名称</label>
  123. <div class="layui-input-inline">
  124. <input name="project_name" value="{$Think.get.project_name|default=''}" placeholder="请输入项目名称" class="layui-input">
  125. </div>
  126. </div>
  127. <div class="layui-form-item layui-inline">
  128. <label class="layui-form-label">清单编制依据</label>
  129. <div class="layui-input-inline">
  130. <input name="basis_for_listing" value="{$Think.get.basis_for_listing|default=''}" placeholder="请输入清单编制依据" class="layui-input">
  131. </div>
  132. </div>
  133. <div class="layui-form-item layui-inline">
  134. <label class="layui-form-label">建筑类别及组成</label>
  135. <div class="layui-input-inline">
  136. <input name="building_composition" value="{$Think.get.building_composition|default=''}" placeholder="请输入建筑类别及组成" class="layui-input">
  137. </div>
  138. </div>
  139. <div class="layui-form-item layui-inline">
  140. <label class="layui-form-label">标准(档次)</label>
  141. <div class="layui-input-inline">
  142. <input name="grade" value="{$Think.get.grade|default=''}" placeholder="请输入标准(档次)" class="layui-input">
  143. </div>
  144. </div>
  145. <br />
  146. <div class="layui-form-item layui-inline">
  147. <label class="layui-form-label">总用地面积</label>
  148. <div class="layui-input-inline layui-col-space12">
  149. <div class="layui-input-inline" style="width: 68px;">
  150. <input type="text" name="total_land_area_start" id="total_land_area_start" placeholder="" value="{$Think.get.total_land_area_start|default=''}" class="layui-input">
  151. </div>
  152. <div class="layui-form-mid">-</div>
  153. <div class="layui-input-inline" style="width: 68px;">
  154. <input type="text" name="total_land_area_end" id="total_land_area_end" placeholder="" value="{$Think.get.total_land_area_end|default=''}" class="layui-input">
  155. </div>
  156. </div>
  157. </div>
  158. <div class="layui-form-item layui-inline">
  159. <label class="layui-form-label">总建筑面积</label>
  160. <div class="layui-input-inline layui-col-space12">
  161. <div class="layui-input-inline" style="width: 68px;">
  162. <input type="text" name="gross_floor_area_start" id="gross_floor_area_start" placeholder="" value="{$Think.get.gross_floor_area_start|default=''}" class="layui-input">
  163. </div>
  164. <div class="layui-form-mid">-</div>
  165. <div class="layui-input-inline" style="width: 68px;">
  166. <input type="text" name="gross_floor_area_end" id="gross_floor_area_end" placeholder="" value="{$Think.get.gross_floor_area_end|default=''}" class="layui-input">
  167. </div>
  168. </div>
  169. </div>
  170. <div class="layui-form-item layui-inline">
  171. <label class="layui-form-label">地上面积</label>
  172. <div class="layui-input-inline layui-col-space12">
  173. <div class="layui-input-inline" style="width: 68px;">
  174. <input type="text" name="floor_area_start" id="floor_area_start" placeholder="" value="{$Think.get.floor_area_start|default=''}" class="layui-input">
  175. </div>
  176. <div class="layui-form-mid">-</div>
  177. <div class="layui-input-inline" style="width: 68px;">
  178. <input type="text" name="floor_area_end" id="floor_area_end" placeholder="" value="{$Think.get.floor_area_end|default=''}" class="layui-input">
  179. </div>
  180. </div>
  181. </div>
  182. <div class="layui-form-item layui-inline">
  183. <label class="layui-form-label">地下面积</label>
  184. <div class="layui-input-inline layui-col-space12">
  185. <div class="layui-input-inline" style="width: 68px;">
  186. <input type="text" name="underground_area_start" id="underground_area_start" placeholder="" value="{$Think.get.underground_area_start|default=''}" class="layui-input">
  187. </div>
  188. <div class="layui-form-mid">-</div>
  189. <div class="layui-input-inline" style="width: 68px;">
  190. <input type="text" name="underground_area_end" id="underground_area_end" placeholder="" value="{$Think.get.underground_area_end|default=''}" class="layui-input">
  191. </div>
  192. </div>
  193. </div>
  194. <div class="layui-form-item layui-inline">
  195. <label class="layui-form-label">建筑密度</label>
  196. <div class="layui-input-inline layui-col-space12">
  197. <div class="layui-input-inline" style="width: 68px;">
  198. <input type="text" name="building_density_start" id="building_density_start" placeholder="" value="{$Think.get.building_density_start|default=''}" class="layui-input">
  199. </div>
  200. <div class="layui-form-mid">-</div>
  201. <div class="layui-input-inline" style="width: 68px;">
  202. <input type="text" name="building_density_end" id="building_density_end" placeholder="" value="{$Think.get.building_density_end|default=''}" class="layui-input">
  203. </div>
  204. </div>
  205. </div>
  206. <div class="layui-form-item layui-inline">
  207. <label class="layui-form-label">绿化面积</label>
  208. <div class="layui-input-inline layui-col-space12">
  209. <div class="layui-input-inline" style="width: 68px;">
  210. <input type="text" name="green_area_start" id="green_area_start" placeholder="" value="{$Think.get.green_area_start|default=''}" class="layui-input">
  211. </div>
  212. <div class="layui-form-mid">-</div>
  213. <div class="layui-input-inline" style="width: 68px;">
  214. <input type="text" name="green_area_end" id="green_area_end" placeholder="" value="{$Think.get.green_area_end|default=''}" class="layui-input">
  215. </div>
  216. </div>
  217. </div>
  218. <div class="layui-form-item layui-inline">
  219. <label class="layui-form-label">道路面积</label>
  220. <div class="layui-input-inline layui-col-space12">
  221. <div class="layui-input-inline" style="width: 68px;">
  222. <input type="text" name="road_area_start" id="road_area_start" placeholder="" value="{$Think.get.road_area_start|default=''}" class="layui-input">
  223. </div>
  224. <div class="layui-form-mid">-</div>
  225. <div class="layui-input-inline" style="width: 68px;">
  226. <input type="text" name="road_area_end" id="road_area_end" placeholder="" value="{$Think.get.road_area_end|default=''}" class="layui-input">
  227. </div>
  228. </div>
  229. </div>
  230. <div class="layui-form-item layui-inline">
  231. <label class="layui-form-label">道路长度</label>
  232. <div class="layui-input-inline layui-col-space12">
  233. <div class="layui-input-inline" style="width: 68px;">
  234. <input type="text" name="road_length_start" id="road_length_start" placeholder="" value="{$Think.get.road_length_start|default=''}" class="layui-input">
  235. </div>
  236. <div class="layui-form-mid">-</div>
  237. <div class="layui-input-inline" style="width: 68px;">
  238. <input type="text" name="road_length_end" id="road_length_end" placeholder="" value="{$Think.get.road_length_end|default=''}" class="layui-input">
  239. </div>
  240. </div>
  241. </div>
  242. <div class="layui-form-item layui-inline">
  243. <label class="layui-form-label">分期或分期建设情况描述</label>
  244. <div class="layui-input-inline" style="width: 187px">
  245. <input name="case_description" value="{$Think.get.case_description|default=''}" style="width: 190px !important;" placeholder="请输入分期或分期建设情况描述" class="layui-input">
  246. </div>
  247. </div>
  248. <div class="layui-form-item layui-inline">
  249. <label class="layui-form-label">功能参数</label>
  250. <div class="layui-input-inline">
  251. <input name="function_parameters" value="{$Think.get.function_parameters|default=''}" placeholder="请输入功能参数" class="layui-input">
  252. </div>
  253. </div>
  254. <div class="layui-form-item layui-inline">
  255. <label class="layui-form-label">人防面积</label>
  256. <div class="layui-input-inline">
  257. <div class="layui-input-inline" style="width: 68px;">
  258. <input type="text" name="defense_start" id="defense_start" placeholder="" value="{$Think.get.defense_start|default=''}" class="layui-input">
  259. </div>
  260. <div class="layui-form-mid">-</div>
  261. <div class="layui-input-inline" style="width: 68px;">
  262. <input type="text" name="defense_end" id="defense_end" placeholder="" value="{$Think.get.defense_end|default=''}" class="layui-input">
  263. </div>
  264. </div>
  265. </div>
  266. <br />
  267. <div class="layui-form-item layui-inline">
  268. <label class="layui-form-label">人防类型</label>
  269. <div class="layui-input-inline">
  270. <input name="defense_type" value="{$Think.get.defense_type|default=''}" placeholder="请输入人防类型" class="layui-input">
  271. </div>
  272. </div>
  273. <div class="layui-form-item layui-inline">
  274. <label class="layui-form-label">投资主体</label>
  275. <div class="layui-input-inline">
  276. <input name="investment_subject" value="{$Think.get.investment_subject|default=''}" placeholder="请输入人投资主体" class="layui-input">
  277. </div>
  278. </div>
  279. <div class="layui-form-item layui-inline">
  280. <label class="layui-form-label">资金来源</label>
  281. <div class="layui-input-inline">
  282. <input name="sources_funding" value="{$Think.get.sources_funding|default=''}" placeholder="请输入资金来源" class="layui-input">
  283. </div>
  284. </div>
  285. <div class="layui-form-item layui-inline">
  286. <label class="layui-form-label">承发包模式</label>
  287. <div class="layui-input-inline">
  288. <input name="contract_mode" value="{$Think.get.contract_mode|default=''}" placeholder="请输入承发包模式" class="layui-input">
  289. </div>
  290. </div>
  291. <div class="layui-form-item layui-inline">
  292. <label class="layui-form-label">组织管理模式</label>
  293. <div class="layui-input-inline">
  294. <input name="management_mode" value="{$Think.get.management_mode|default=''}" placeholder="请输入组织管理模式" class="layui-input">
  295. </div>
  296. </div>
  297. <div class="layui-form-item layui-inline">
  298. <label class="layui-form-label">业主</label>
  299. <div class="layui-input-inline">
  300. <input name="owner" value="{$Think.get.owner|default=''}" placeholder="请输入业主" class="layui-input">
  301. </div>
  302. </div>
  303. <div class="layui-form-item layui-inline">
  304. <label class="layui-form-label">总包</label>
  305. <div class="layui-input-inline">
  306. <input name="total_package" value="{$Think.get.total_package|default=''}" placeholder="请输入总包" class="layui-input">
  307. </div>
  308. </div>
  309. <div class="layui-form-item layui-inline">
  310. <label class="layui-form-label">开工时间</label>
  311. <div class="layui-input-inline">
  312. <input data-date-range name="starting_time" readonly value="{$Think.get.starting_time|default=''}" placeholder="请选择开工时间" class="layui-input">
  313. </div>
  314. </div>
  315. <div class="layui-form-item layui-inline">
  316. <label class="layui-form-label">竣工时间</label>
  317. <div class="layui-input-inline">
  318. <input data-date-range name="ending_time" readonly value="{$Think.get.ending_time|default=''}" placeholder="请选择竣工时间" class="layui-input">
  319. </div>
  320. </div>
  321. <div class="layui-form-item layui-inline">
  322. <label class="layui-form-label">工期</label>
  323. <div class="layui-input-inline layui-col-space12">
  324. <div class="layui-input-inline" style="width: 68px;">
  325. <input type="text" name="project_time_start" id="project_time_start" placeholder="" value="{$Think.get.project_time_start|default=''}" class="layui-input">
  326. </div>
  327. <div class="layui-form-mid">-</div>
  328. <div class="layui-input-inline" style="width: 68px;">
  329. <input type="text" name="project_time_end" id="project_time_end" placeholder="" value="{$Think.get.project_time_end|default=''}" class="layui-input">
  330. </div>
  331. </div>
  332. </div>
  333. <div class="layui-form-item layui-inline">
  334. <label class="layui-form-label">获奖情况</label>
  335. <div class="layui-input-inline">
  336. <input name="awards" value="{$Think.get.awards|default=''}" placeholder="请输入获奖情况" class="layui-input">
  337. </div>
  338. </div>
  339. <div class="layui-form-item layui-inline">
  340. <label class="layui-form-label">其他说明</label>
  341. <div class="layui-input-inline">
  342. <input name="other_instructions" value="{$Think.get.other_instructions|default=''}" placeholder="请输入其他说明" class="layui-input">
  343. </div>
  344. </div>
  345. <div class="layui-form-item layui-inline">
  346. <button class="layui-btn layui-btn-primary" style="color: #FFFFFF;background-color: #DC2219" lay-submit lay-filter="tijiao"><i class="layui-icon">&#xe615;</i>立即搜索</button>
  347. </div>
  348. </form>
  349. </fieldset>
  350. <script>
  351. form.render();
  352. layui.use(['form', 'layedit', 'laydate'], function(){
  353. var form = layui.form
  354. ,layer = layui.layer
  355. ,layedit = layui.layedit
  356. ,laydate = layui.laydate;
  357. //常规用法
  358. laydate.render({
  359. elem: '#test1'
  360. });
  361. form.on('submit(tijiao)', function(data) {
  362. var total_land_area_start = data.field.total_land_area_start;
  363. var total_land_area_end = data.field.total_land_area_end;
  364. if (total_land_area_start=='' && total_land_area_end!=''){
  365. layer.msg('请输入起始值');
  366. $("#total_land_area_start").focus();
  367. return false
  368. }else if (total_land_area_start!='' && total_land_area_end==''){
  369. layer.msg('请输入终止值');
  370. $("#total_land_area_end").focus();
  371. return false
  372. }else if (total_land_area_end<total_land_area_start){
  373. layer.msg('终止值小于起始值');
  374. $("#total_land_area_start").focus();
  375. return false
  376. }
  377. var gross_floor_area_start = data.field.gross_floor_area_start;
  378. var gross_floor_area_end = data.field.gross_floor_area_end;
  379. if (gross_floor_area_start=='' && gross_floor_area_end!=''){
  380. layer.msg('请输入起始值');
  381. $("#gross_floor_area_start").focus();
  382. return false
  383. }else if (gross_floor_area_start!='' && gross_floor_area_end==''){
  384. layer.msg('请输入终止值');
  385. $("#gross_floor_area_end").focus();
  386. return false
  387. }else if (gross_floor_area_end<gross_floor_area_start){
  388. layer.msg('终止值小于起始值');
  389. $("#gross_floor_area_start").focus();
  390. return false
  391. }
  392. var floor_area_start = data.field.floor_area_start;
  393. var floor_area_end = data.field.floor_area_end;
  394. if (floor_area_start=='' && floor_area_end!=''){
  395. layer.msg('请输入起始值');
  396. $("#floor_area_start").focus();
  397. return false
  398. }else if (floor_area_start!='' && floor_area_end==''){
  399. layer.msg('请输入终止值');
  400. $("#floor_area_end").focus();
  401. return false
  402. }else if (floor_area_end<floor_area_start){
  403. layer.msg('终止值小于起始值');
  404. $("#floor_area_start").focus();
  405. return false
  406. }
  407. var underground_area_start = data.field.underground_area_start;
  408. var underground_area_end = data.field.underground_area_end;
  409. if (underground_area_start=='' && underground_area_end!=''){
  410. layer.msg('请输入起始值');
  411. $("#underground_area_start").focus();
  412. return false
  413. }else if (underground_area_start!='' && underground_area_end==''){
  414. layer.msg('请输入终止值');
  415. $("#underground_area_end").focus();
  416. return false
  417. }else if (underground_area_end<underground_area_start){
  418. layer.msg('终止值小于起始值');
  419. $("#underground_area_start").focus();
  420. return false
  421. }
  422. var building_density_start = data.field.building_density_start;
  423. var building_density_end = data.field.building_density_end;
  424. if (building_density_start=='' && building_density_end!=''){
  425. layer.msg('请输入起始值');
  426. $("#building_density_start").focus();
  427. return false
  428. }else if (building_density_start!='' && building_density_end==''){
  429. layer.msg('请输入终止值');
  430. $("#building_density_end").focus();
  431. return false
  432. }else if (building_density_end<building_density_start){
  433. layer.msg('终止值小于起始值');
  434. $("#building_density_start").focus();
  435. return false
  436. }
  437. var green_area_start = data.field.green_area_start;
  438. var green_area_end = data.field.green_area_end;
  439. if (green_area_start=='' && green_area_end!=''){
  440. layer.msg('请输入起始值');
  441. $("#green_area_start").focus();
  442. return false
  443. }else if (green_area_start!='' && green_area_end==''){
  444. layer.msg('请输入终止值');
  445. $("#green_area_end").focus();
  446. return false
  447. }else if (green_area_end<green_area_start){
  448. layer.msg('终止值小于起始值');
  449. $("#green_area_start").focus();
  450. return false
  451. }
  452. var road_area_start = data.field.road_area_start;
  453. var road_area_end = data.field.road_area_end;
  454. if (road_area_start=='' && road_area_end!=''){
  455. layer.msg('请输入起始值');
  456. $("#road_area_start").focus();
  457. return false
  458. }else if (road_area_start!='' && road_area_end==''){
  459. layer.msg('请输入终止值');
  460. $("#road_area_end").focus();
  461. return false
  462. }else if (road_area_end<road_area_start){
  463. layer.msg('终止值小于起始值');
  464. $("#road_area_start").focus();
  465. return false
  466. }
  467. var road_length_start = data.field.road_length_start;
  468. var road_length_end = data.field.road_length_end;
  469. if (road_length_start=='' && road_length_end!=''){
  470. layer.msg('请输入起始值');
  471. $("#road_length_start").focus();
  472. return false
  473. }else if (road_length_start!='' && road_length_end==''){
  474. layer.msg('请输入终止值');
  475. $("#road_length_end").focus();
  476. return false
  477. }else if (road_length_end<road_length_start){
  478. layer.msg('终止值小于起始值');
  479. $("#road_length_start").focus();
  480. return false
  481. }
  482. var project_time_start = data.field.project_time_start;
  483. var project_time_end = data.field.project_time_end;
  484. if (project_time_start=='' && project_time_end!=''){
  485. layer.msg('请输入起始值');
  486. $("#project_time_start").focus();
  487. return false
  488. }else if (project_time_start!='' && project_time_end==''){
  489. layer.msg('请输入终止值');
  490. $("#project_time_end").focus();
  491. return false
  492. }else if (project_time_end<project_time_start){
  493. layer.msg('终止值小于起始值');
  494. $("#project_time_start").focus();
  495. return false
  496. }
  497. var defense_start = data.field.defense_start;
  498. var defense_end = data.field.defense_end;
  499. if (defense_start=='' && defense_end!=''){
  500. layer.msg('请输入起始值');
  501. $("#defense_start").focus();
  502. return false
  503. }else if (defense_start!='' && defense_end==''){
  504. layer.msg('请输入终止值');
  505. $("#defense_end").focus();
  506. return false
  507. }else if (defense_end<defense_start){
  508. layer.msg('终止值小于起始值');
  509. $("#defense_start").focus();
  510. return false
  511. }
  512. });
  513. form.on('select(province)', function (data) {
  514. var val = data.value;
  515. $.ajax({
  516. type:"get",
  517. url:"{:url('MainProject/get_city')}", //数据传输的控制器方法
  518. data: {id:val},//这里data传递过去的是序列化以后的字符串
  519. success:function(data){
  520. //console.log(data)
  521. var arr = data.data;
  522. //console.log(arr)
  523. if (arr.length>0){
  524. //$("#tow").attr("style","display:block;");//显示div
  525. var options='<option value="">选择市</option>';
  526. for (var i = 0; i < arr.length; i++) {
  527. var tag = arr[i];
  528. options+=' <option value="'+tag.name+'">'+tag.name+'</option>';
  529. }
  530. $("select[name='construction_site_city']").html(options)
  531. form.render('select');
  532. }else {
  533. var options='<option value="">选择市</option>';
  534. $("select[name='construction_site_city']").html(options)
  535. form.render('select');
  536. }
  537. }
  538. });
  539. });
  540. form.on('select(city)', function (data) {
  541. var val = data.value;
  542. // console.log(val)
  543. $.ajax({
  544. type:"get",
  545. url:"{:url('MainProject/get_area')}", //数据传输的控制器方法
  546. data: {id:val},//这里data传递过去的是序列化以后的字符串
  547. success:function(data){
  548. //console.log(data)
  549. var arr = data.data;
  550. // console.log(arr)
  551. if (arr.length>0){
  552. var options='<option value="">选择区</option>';
  553. for (var i = 0; i < arr.length; i++) {
  554. var tag = arr[i];
  555. options+=' <option value="'+tag.name+'">'+tag.name+'</option>';
  556. }
  557. $("select[name='construction_site_area']").html(options)
  558. form.render('select');
  559. }else {
  560. var options='<option value="">选择区</option>';
  561. $("select[name='construction_site_area']").html(options)
  562. form.render('select');
  563. }
  564. }
  565. });
  566. });
  567. });
  568. </script>