| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831 |
- <!DOCTYPE HTML>
- <html xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- layout:decorate="~{admin/common/common}">
- <head>
- <title>存量用地审核</title>
- <style>
- .line {
- display: block;
- text-align: left;
- background-color: #fff;
- color: #333;
- border-bottom: 1px solid #0a6999;
- border-color: #fff;
- border-bottom: 1px solid #0a6999;
- margin-top: 10px;
- vertical-align: middle;
- padding: 4px 12px;
- height: 31px;
- line-height: 31px;
- font-size: 14px;
- font-weight: bold;
- }
- </style>
- </head>
- <body layout:fragment="content">
- <article class="page-container">
- <form class="form form-horizontal" id="form-land-approve">
- <input type="hidden" th:id="apply_id" th:name="apply_id" th:value="${landApply.id}"/>
- <div class="line">基本信息</div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"> 企业名称:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.company_name}]]
- </div>
- <label class="form-label col-xs-4 col-sm-2"> 统一社会信用代码:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.uscc}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"> 组织机构代码:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.organization_code}]]
- </div>
- <label class="form-label col-xs-4 col-sm-2"> 所属行业:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.industry_code}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"> 地址:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.registration_address}]]
- </div>
- <label class="form-label col-xs-4 col-sm-2"> 联系人:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.contact}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"> 联系人职位:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.contact_position}]]
- </div>
- <label class="form-label col-xs-4 col-sm-2"> 联系人手机:</label>
- <div class="formControls col-xs-8 col-sm-4">
- [[${companyInfo.contact_phone}]]
- </div>
- </div>
- <div class="line">存量用地申请</div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"> 申请类别:</label>
- <div class="formControls col-xs-8 col-sm-9">
- [[${landApply.apply_type_str}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">厂房所在属地:</label>
- <div class="formControls col-xs-8 col-sm-9">
- [[${landApply.building_street_name}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"> 审核状态:</label>
- <div class="formControls col-xs-8 col-sm-9">
- [[${landApply.approve_status_str}]]
- </div>
- </div>
- <div th:if="${landApply.summary_procedure}" class="row cl">
- <label class="form-label col-xs-4 col-sm-2"> 简易程序类别:</label>
- <div class="formControls col-xs-8 col-sm-9">
- [[${landApply.summary_procedure_str}]]
- </div>
- </div>
- <div class="line">基准材料</div>
- <div class="row cl">
- <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
- <table class="table table-border table-bordered table-bg table-hover">
- <thead>
- <tr class="text-c">
- <th>编号</th>
- <th>内容</th>
- <th>下载材料</th>
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="model,iterStat:${applyMaterials}" th:object="${model}">
- <td th:text="${iterStat.index+1}"></td>
- <td th:text="*{content}"></td>
- <td class="td_material">
- <div th:if="*{fileDown}">
- <a download th:href="${fileUrl} + *{fileDown.file_url}" target="_blank"
- style="color: #5b98dd;">[[*{fileDown.file_name}]]</a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div th:if="${landApply.summary_procedure}" class="line">简易程序材料</div>
- <div th:if="${landApply.summary_procedure}" class="row cl" id="summaryMaterials">
- <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
- <table class="table table-border table-bordered table-bg table-hover ">
- <thead>
- <tr class="text-c">
- <th>编号</th>
- <th>下载材料</th>
- </tr>
- </thead>
- <tbody class="add_file_line">
- <tr class="text-c" th:each="model,iterStat:${summaryMaterials}" th:object="${model}">
- <td th:text="${iterStat.index+1}"></td>
- <td class="td_material">
- <div th:if="*{fileDown}">
- <a download th:href="${fileUrl} + *{fileDown.file_url}" target="_blank"
- style="color: #5b98dd;">[[*{fileDown.file_name}]]</a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="line">其他材料</div>
- <div class="row cl" id="otherMaterials">
- <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
- <table class="table table-border table-bordered table-bg table-hover ">
- <thead>
- <tr class="text-c">
- <th>编号</th>
- <th>下载材料</th>
- </tr>
- </thead>
- <tbody class="add_file_line">
- <tr class="text-c" th:each="model,iterStat:${otherMaterials}" th:object="${model}">
- <td th:text="${iterStat.index+1}"></td>
- <td class="td_material">
- <div th:if="*{fileDown}">
- <a download th:href="${fileUrl} + *{fileDown.file_url}" target="_blank"
- style="color: #5b98dd;">[[*{fileDown.file_name}]]</a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <th:block th:if="${isRent}">
- <th:block th:unless="${isLeader}">
- <div class="line">合同基本信息</div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>是否在园区内:</label>
- <div class="formControls col-xs-8 col-sm-9">
- <label style="margin-right: 10px;"><input name="is_in_park" checked type="radio" value="1">在园区内</label>
- <label><input name="is_in_park" type="radio" value="0">不在园区内</label>
- </div>
- </div>
- <div id="inPark">
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>所属园区:</label>
- <div class="formControls col-xs-4 col-sm-2">
- <span class="select-box">
- <select class="select" th:id="park">
- <option value='0'>请选择</option>
- <option th:each="item : ${parkList}" th:value="${item.id}" th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>楼栋:</label>
- <div class="formControls col-xs-4 col-sm-2">
- <span class="select-box">
- <select class="select" th:id="building">
- <option value='0'>请选择</option>
- <option th:each="item : ${buildingList}" th:value="${item.id}" th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>楼层:</label>
- <div class="formControls col-xs-4 col-sm-2">
- <span class="select-box">
- <select class="select" th:id="floor">
- <option value='0'>请选择</option>
- <option th:each="item : ${floorList}" th:value="${item.id}" th:text="${item.name}">
- </option>
- </select>
- </span>
- </div>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租赁面积(㎡):</label>
- <div class="formControls col-xs-4 col-sm-2">
- <input type="text" class="input-text" th:id="area" th:value="${contract_area}"
- th:name="contract_area"/>
- </div>
- <a class="btn btn-primary radius" onclick="addFloor()"> 新增 </a>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>关联载体:</label>
- <div class="col-xs-8 col-sm-8">
- <table class="table table-border table-bordered table-bg table-hover ">
- <thead>
- <tr class="text-c">
- <th>所属园区</th>
- <th>楼栋</th>
- <th>楼层</th>
- <td>面积(㎡)</td>
- <th>操作</th>
- </tr>
- </thead>
- <tbody class="add-floor" th:id="'floor-table'">
- </tbody>
- </table>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住生效日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- <!-- <input type="text" class="input-text" id="contract_starttime" name="contract_starttime"-->
- <!-- th:id="contract_starttime" th:name="contract_starttime" style="float:left; width: 150px;"/>-->
- <input class="Wdate input-text" type="text" th:id="contract_start"
- th:name="contract.contract_start"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'contract_end\')}',isShowClear:true,readOnly:true})"/>
- </div>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住到期日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- <!-- <input type="text" class="input-text pull-left" id="contract_endtime" name="contract_endtime"-->
- <!-- th:id="contract_endtime" th:name="contract_endtime" style="float:left; width: 150px;"/>-->
- <input class="Wdate input-text" type="text" th:id="contract_end"
- th:name="contract.contract_end"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'contract_start\')}',isShowClear:true,readOnly:true})"/>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>备注:</label>
- <div class="formControls col-xs-8 col-sm-8">
- <textarea class="textarea" id="contract_remark" th:name="contract.remark"
- placeholder=""></textarea>
- </div>
- </div>
- </div>
- <div id="notInPark" hidden>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租赁地址:</label>
- <div class="formControls col-xs-8 col-sm-9">
- <input type="text" class="input-text" th:id="out_park_location"
- th:value="${out_park_location}"
- th:name="out_park_location"/>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租赁面积(㎡):</label>
- <div class="formControls col-xs-4 col-sm-2">
- <input type="text" class="input-text" th:id="out_park_contract_area"
- th:value="${out_park_contract_area}"
- th:name="out_park_contract_area"/>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住生效日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- <input class="Wdate input-text" type="text" th:id="out_park_contract_start"
- th:name="out_park_contract_start"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'out_park_contract_end\')}',isShowClear:true,readOnly:true})"/>
- </div>
- <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>租住到期日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- <input class="Wdate input-text" type="text" th:id="out_park_contract_end"
- th:name="out_park_contract_end"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'out_park_contract_start\')}',isShowClear:true,readOnly:true})"/>
- </div>
- </div>
- </div>
- </th:block>
- <th:block th:if="${isLeader}">
- <div class="line">合同基本信息</div>
- <th:block th:if="${landApply.is_in_park == '1'}">
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">关联载体:</label>
- <div class="col-xs-8 col-sm-8">
- <table class="table table-border table-bordered table-bg table-hover ">
- <thead>
- <tr class="text-c">
- <th>所属园区</th>
- <th>楼栋</th>
- <th>楼层</th>
- <td>面积</td>
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="item : ${contract.floors}">
- <td th:text="${contract.park_name}"></td>
- <td th:text="${item.building_name}"></td>
- <td th:text="${item.floor}"></td>
- <td th:text="${item.area}"></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">租住生效日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- [[${contract.contract_start}]]
- </div>
- <label class="form-label col-xs-4 col-sm-2">租住到期日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- [[${contract.contract_end}]]
- </div>
- </div>
- </th:block>
- <th:block th:if="${landApply.is_in_park == '0'}">
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">租赁地址:</label>
- <div class="formControls col-xs-8 col-sm-9">
- [[${stockLandOutPark.out_park_location}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">租赁面积(㎡):</label>
- <div class="formControls col-xs-4 col-sm-2">
- [[${stockLandOutPark.out_park_contract_area}]]
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">租住生效日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- [[${stockLandOutPark.out_park_contract_start}]]
- </div>
- <label class="form-label col-xs-4 col-sm-2">租住到期日期:</label>
- <div class="formControls col-xs-4 col-sm-2">
- [[${stockLandOutPark.out_park_contract_end}]]
- </div>
- </div>
- </th:block>
- </th:block>
- </th:block>
- <div class="line">流程信息</div>
- <div class="row cl">
- <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
- <table class="table table-border table-bordered table-bg table-hover processTb">
- <thead>
- <tr class="text-c">
- <th style="width:15%;">时间</th>
- <th style="width:15%;">审核状态</th>
- <th style="width:10%;">部门</th>
- <th style="width:10%;">操作人</th>
- <th style="width:10%;">操作</th>
- <th style="width:15%;">材料</th>
- <th style="width:25%;">审核意见</th>
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="model,iterStat:${approvalList}" th:object="${model}">
- <td th:text="*{create_time}"></td>
- <td th:text="*{before_approvalstatus_str}"></td>
- <td th:text="*{department}"></td>
- <td th:text="*{create_name}"></td>
- <td th:text="*{oper_type}"></td>
- <td class="td_material">
- <div th:if="*{fileDowns}">
- <a download th:each="filedown,iterStat:*{fileDowns}" th:object="${filedown}"
- th:href="${fileUrl} + *{file_url}" target="_blank" style="color: #5b98dd;">[[*{file_name}]]<br/></a>
- </div>
- </td>
- <td class="viewComment" th:data="*{approval_comment}" th:text="*{approval_comment}"></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="line">审核意见</div>
- <div class="row cl">
- <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
- <textarea class="textarea" id="approval_comment" th:name="approval_comment"
- placeholder="请输入审核意见"></textarea>
- </div>
- </div>
- <div class="line">审核材料上传</div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">上传材料:</label>
- <div class="formControls col-xs-8 col-sm-9">
- <div class="uploader-thum-container">
- <div id="fileListPre" class="uploader-list">
- </div>
- <div id="filePicker">选择文件</div>
- </div>
- </div>
- </div>
- <div class="row cl">
- <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
- <input id="status" type="hidden" name="status"/>
- <input id="isRent" type="hidden" th:value="${isRent}"/>
- <input id="isLeader" type="hidden" th:value="${isLeader}"/>
- <a th:unless="${isLeader}" class="btn btn-primary radius" onclick="audit(4)"> 提交审核意见 </a>
- <!-- <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(2)"> 通过 </a>
- <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(3)" > 不通过 </a>
- <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(1)"> 退回 </a>
- -->
- <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(2)"> 通过 </a>
- <a th:if="${isLeader}" class="btn btn-primary radius" onclick="audit(3)"> 不通过 </a>
- <a class="btn btn-primary radius" onclick="audit(1)"> 退回 </a>
- <button onClick="removeIframe();" class="btn btn-default radius" type="button"> 取消 </button>
- </div>
- </div>
- </form>
- </article>
- <script th:inline="javascript">
- //status 1退回,2通过,3不通过,4提交审核意见
- function audit(status) {
- if ($('input[type=radio][name=is_in_park]:checked').val() == '0') {
- //不在园区内
- if ($("#out_park_location").val() == "") {
- errorMessage("请填写租赁地址!")
- return
- }
- if ($("#out_park_contract_area").val() == "") {
- errorMessage("请填写租赁面积!")
- return
- }
- if ($("#out_park_contract_start").val() == "") {
- errorMessage("请选择租住生效日期!")
- return
- }
- if ($("#out_park_contract_end").val() == "") {
- errorMessage("请选择租住到期日期!")
- return
- }
- } else if ($('input[type=radio][name=is_in_park]:checked').val() == '1') {
- //在园区内
- if (floorList.length <= 0) {
- errorMessage("请选择关联载体!")
- return
- }
- if ($("#contract_start").val() == "") {
- errorMessage("请选择租住生效日期!")
- return
- }
- if ($("#contract_end").val() == "") {
- errorMessage("请选择租住到期日期!")
- return
- }
- }
- $("#status").val(status);
- //所有审核意见必填-2018-06-04
- //if(status==1 || status==3){
- //退回、不通过审核意见必填
- if ($.trim($("#approval_comment").val()) == "") {
- errorMessage('请填写审核意见!');
- return false;
- }
- //}
- $("#form-land-approve").submit();
- }
- $(function () {
- $("#form-land-approve").validate({
- rules: {},
- messages: {},
- onkeyup: false,
- focusCleanup: true,
- success: "valid",
- submitHandler: function (form) {
- // $(form).find(":submit").attr("disabled", true);
- setDocNames();
- $(form).ajaxSubmit({
- type: 'post',
- url: pagePath + "/stockLand/approve",
- dataType: "json",
- success: function (data) {
- if (data.success) {
- succeedMessage(data.message);
- //setTimeClose();
- //退回 或者 房屋出租街道通过或者不通过
- if ($("#status").val() == "1" || $("#status").val() == "3" ||
- ($("#isRent").val() == "true" && $("#status").val() == "2")) {
- layer.confirm(
- '审核成功,确认现在就通知企业吗?',
- function (index) {
- var url = "/stockLand/confirmPage/" + $("#apply_id").val();
- open_dialog("通知企业", url, 800, 500);
- },
- function () {
- setTimeClose();
- }
- );
- } else {
- setTimeClose();
- }
- } else {
- // $(form).find(":submit").attr("disabled", false);
- errorMessage(data.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- return false; // 非常重要,如果是false,则表明是不跳转,在本页上处理,也就是ajax,如果是非false,则传统的form跳转。
- }
- });
- //查看完整意见
- $(".viewComment").on("click", function () {
- layer.alert(
- $(this).attr('data'),
- {area: ['800px', '500px']}
- )
- });
- $('input[type=radio][name=is_in_park]').change(function () {
- if (this.value == '1') {
- //在园区内
- $('#inPark').show();
- $('#notInPark').hide();
- } else if (this.value == '0') {
- //不在园区内
- $('#inPark').hide();
- $('#notInPark').show();
- }
- });
- });
- //修改上传文件的name域,改成数组形式
- function setDocNames() {
- $("#fileListPre").find("input[id$='DocUrl']").each(function (i, item) {
- $(this).attr("name", "fileDowns[" + i + "].file_id");
- });
- }
- /*管理员-详情*/
- function open_dialog(title, url, w, h) {
- layer_show(title, pagePath + url, w, h);
- }
- /**
- * 初始化上传控件
- */
- var options = {
- uploadBtnId: '#filePicker',
- picturePreId: 'fileListPre',
- hiddenPictureUrl: 'img',
- hiddenPictureName: 'imgName',
- // accept : {
- // title : 'Images',
- // extensions : 'gif,jpg,jpeg,bmp,png',
- // mimeTypes : 'image/gif,image/jpg,image/jpeg,image/bmp,image/png'
- // },
- width: 81,
- height: 81,
- fileSizeLimit: 100 * 1024 * 1024,
- fileSingleSizeLimit: 100 * 1024 * 1024,
- // fileNumLimit: 1,
- append: true
- };
- var webUploadDoc = new $WebUploadDoc(options);
- webUploadDoc.init();
- $("#park").change(function () {
- var parkId = $("#park").val();
- var buildingId = $("#building").val();
- if (parkId == '') {
- return;
- }
- var url = pagePath + "/stockLand/contract_building_data";
- $.ajax({
- cache: true,
- type: 'get',
- url: url,
- dataType: "json",
- data: {
- 'parkId': parkId
- },
- success: function (result) {
- if (result.success) {
- var buildingList = result.obj.buildingList;
- var building = $("#building").empty();
- building.append("<option value='0'>请选择</option>");
- var floor = $("#floor").empty();
- floor.append("<option value='0'>请选择</option>");
- $("#area").val("");
- if (buildingList.length > 0) {
- for (var i = 0; i < buildingList.length; i++) {
- building.append("<option value='" + buildingList[i].id + "'>" + buildingList[i].build_name + "</option>")
- }
- }
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- })
- })
- $("#building").change(function () {
- var parkId = $("#park").val();
- var buildingId = $("#building").val();
- if (buildingId == '') {
- return;
- }
- var url = pagePath + "/stockLand/contract_floor_data";
- $.ajax({
- cache: true,
- type: 'get',
- url: url,
- dataType: "json",
- data: {
- 'buildingId': buildingId
- },
- success: function (result) {
- if (result.success) {
- var floorList = result.obj.floorList;
- var floor = $("#floor").empty();
- floor.append("<option value='0'>请选择</option>");
- $("#area").val("");
- if (floorList.length > 0) {
- for (var i = 0; i < floorList.length; i++) {
- floor.append("<option value='" + floorList[i].id + "'>" + floorList[i].floor + "</option>")
- }
- }
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- })
- })
- $("#floor").change(function () {
- $("#area").val("");
- })
- var floorList = new Array();
- function addFloor() {
- var parkId = $("#park").val();
- var buildingId = $("#building").val();
- var floorId = $("#floor").val();
- var area = $("#area").val();
- var parkName = $("#park option:selected").text();
- var buildingName = $("#building option:selected").text();
- var floorName = $("#floor option:selected").text();
- if (parkId == "0" || parkId == "" || parkId == undefined || parkId == null) {
- errorMessage("请填选择园区!");
- return
- }
- if (buildingId == "0" || buildingId == "" || buildingId == undefined || buildingId == null) {
- errorMessage("请填选择楼栋!");
- return
- }
- if (floorId == "0" || floorId == "" || floorId == undefined || floorId == null) {
- errorMessage("请填选择楼层!");
- return
- }
- if (area == "" || area == undefined || area == null) {
- errorMessage("请填写租赁面积!");
- return
- }
- if (floorList.length > 0) {
- for (var i = 0; i < floorList.length; i++) {
- if (parkId != floorList[i].parkId) {
- errorMessage("请选择同一园区!");
- return;
- }
- if (floorId == floorList[i].floorId) {
- errorMessage("楼层重复!");
- return;
- }
- }
- }
- floorList.push({
- parkId: parkId,
- buildingId: buildingId,
- floorId: floorId,
- parkName: parkName,
- buildingName: buildingName,
- floorName: floorName,
- area: area
- })
- renderFloorTable(floorList);
- }
- function renderFloorTable(floorList) {
- var str = "";
- if (floorList.length > 0) {
- for (var i = 0; i < floorList.length; i++) {
- str += "<tr class='text-c'>"
- str += "<td>" + floorList[i].parkName + "</td>"
- str += "<td>" + floorList[i].buildingName + "</td>"
- str += "<td>" + floorList[i].floorName + "</td>"
- str += "<td>" + floorList[i].area + "</td>"
- str += "<td class='icon_font'><i class='Hui-iconfont' onclick='removeLine(this)'> 删除</i>"
- str += "<input hidden name='contract.floors[" + i + "].floor_id' value='" + floorList[i].floorId + "'/>"
- str += "<input hidden name='contract.floors[" + i + "].area' value='" + floorList[i].area + "'/>"
- str += "<input hidden name='contract.park_id' value='" + floorList[i].parkId + "'/>"
- str += "</td>"
- str += "</tr>"
- }
- }
- $("#floor-table").html(str);
- }
- function removeLine(obj) {
- $(obj).parent().parent().remove();
- }
- /**
- * 取消
- */
- function removeIframe() {
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- }
- // $(function () {
- //
- // var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
- // var isOpera = userAgent.indexOf("Opera") > -1;
- // //判断是否IE浏览器
- // if (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera) {
- // $("#contract_starttime").remove();
- // $("#contract_endtime").remove();
- // } else {
- // $("#contract_starttimeIE").remove();
- // $("#contract_endtimeIE").remove();
- // var startDate = laydate.render({
- // elem: '#contract_starttime',
- // type: 'datetime',
- // format: 'yyyy-MM-dd',
- // done: function (value, date) {
- // setTimeout(function () {
- // $("#form-land-approve").validate().element($("#contract_starttime"));
- // }, 100)
- // if (value !== '') {
- // endDate.config.min.year = date.year;
- // endDate.config.min.month = date.month - 1;
- // endDate.config.min.date = date.date;
- // // endDate.config.min.hours = date.hours;
- // // endDate.config.min.minutes = date.minutes;
- // // endDate.config.min.seconds = date.seconds;
- // } else {
- // endDate.config.min.year = '1900';
- // endDate.config.min.month = '0';
- // endDate.config.min.date = '1';
- // // endDate.config.min.hours = '0';
- // // endDate.config.min.minutes = '0';
- // // endDate.config.min.seconds = '0';
- // }
- // }
- // });
- //
- // var endDate = laydate.render({
- // elem: '#contract_endtime',
- // type: 'datetime',
- // format: 'yyyy-MM-dd',
- // done: function (value, date) {
- // setTimeout(function () {
- // $("#form-land-approve").validate().element($("#contract_endtime"));
- // }, 100)
- // if (value !== '') {
- // startDate.config.max.year = date.year;
- // startDate.config.max.month = date.month - 1;
- // startDate.config.max.date = date.date;
- // // startDate.config.max.hours = date.hours;
- // // startDate.config.max.minutes = date.minutes;
- // // startDate.config.max.seconds = date.seconds;
- // } else {
- // startDate.config.max.year = '2100';
- // startDate.config.max.month = '0';
- // startDate.config.max.date = '1';
- // // startDate.config.max.hours = '0';
- // // startDate.config.max.minutes = '0';
- // // startDate.config.max.seconds = '0';
- // }
- // }
- // });
- // }
- // });
- </script>
- </body>
- </html>
|