<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
    <link xmlns:th="http://www.thymeleaf.org" rel="stylesheet" th:href="${'/css/estate/notice-add.css'}" media="all">
    <!-- 样式 -->
    <link rel="stylesheet" th:href="@{'/css/permission/community-add.css'}" media="all">
    <style>

        .layui-form-label {
            width: 240px
        }
        .layui-form-item .layui-input-inline {
            width: 240px;
        }
        .layui-col-space15{padding:15px;}
        .info-btn{float: right;}
        .info-btn a{font-size: 14px;margin:0 20px;color: #1890FF;}
        .layui-col-md12{border: 1px solid #e9e9e9;margin-bottom:30px;}
        .layui-upload {margin-left: 160px; }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <!--图片服务器的地址，图片回显用到-->
        <input id="fastDfsServer" type="hidden" th:value="${fastDfsServer}">
        <!--  基础信息 -->
        <div class="layui-col-md12">
            <form  class="layui-form">
                <div class="layui-card">
                    <div class="layui-card-header">基础信息
                        <div class="info-btn">
                            <a href="javascript:;" lay-filter="insertProject" style="display:none;" lay-submit>保存</a>
                            <a href="javascript:;" lay-filter="editProject" lay-submit >修改</a>
                        </div>
                    </div>
                    <div class="layui-card-body" >
                        <div class="layui-form-item">
                            <!--项目id-->
                            <input type="hidden" id="projectId" name="id" th:value="${project.id}">
                            <div class="layui-inline">
                                <label  class="layui-form-label">
                                    <span class="must">*</span>楼盘名称：</label>
                                <div class="layui-input-inline">
                                    <input id="residentialName" disabled="disabled" th:value="${project.residentialName}" type="text" lay-verify="required" placeholder="输入小区名称搜索" autocomplete="off" class="layui-input layui-disabled">
                                    <dl class="layui-anim layui-anim-upbit select_content" id="select_residentialName"></dl>
                                    <!--<input id="residentialId" th:value="${project.residentialId}" name="residentialId" type="hidden" lay-verify="required" disabled="disabled">-->
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">区域：</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="region" th:value="${project.region}" class="layui-input layui-disabled" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">物业方联系人：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="propertyContact" th:value="${project.propertyContact}" class="layui-input layui-disabled" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">电话：</label>
                                <div class="layui-input-inline">
                                    <input type="tel" name="propertyTel" th:value="${project.propertyTel}" class="layui-input layui-disabled" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">实施项目经理：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="projectManager" th:value="${project.projectManager}" class="layui-input layui-disabled" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">电话：</label>
                                <div class="layui-input-inline">
                                    <input type="tel" name="projectTel" th:value="${project.projectTel}" class="layui-input layui-disabled" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">拓展业务经理：</label>
                                <div class="layui-input-inline">
                                    <input type="tel" name="businessManager" th:value="${project.businessManager}"  class="layui-input layui-disabled" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">电话：</label>
                                <div class="layui-input-inline">
                                    <input type="tel" name="businessTel" th:value="${project.businessTel}" lay-verify="tel" class="layui-input layui-disabled" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">安装工程经理：</label>
                                <div class="layui-input-inline">
                                    <input type="tel" name="installationManager" th:value="${project.installationManager}"  class="layui-input" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">电话：</label>
                                <div class="layui-input-inline">
                                    <input type="tel" name="installationTel" th:value="${project.installationTel}" lay-verify="tel" class="layui-input" autocomplete="off" disabled="disabled">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form >
        </div>
        <!--  合同信息 -->
        <div class="layui-col-md12">
            <form  class="layui-form" >
                <div class="layui-card">
                    <div class="layui-card-header">合同信息
                        <div class="info-btn">
                            <a href="javascript:;" lay-filter="insertContract" lay-submit style="display:none;">保存</a>
                            <a href="javascript:;" lay-filter="editContract" lay-submit >修改</a>
                        </div>
                    </div>
                    <div class="layui-card-body" >
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label  class="layui-form-label">
                                    <span class="must">*</span>合同编号：</label>
                                <div class="layui-input-inline">
                                    <input type="text"name="contractNo" th:value="${contract?.contractNo}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="must">*</span>物业管理方：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="propertyName" th:value="${contract?.propertyName}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="must">*</span>合同签约日期：</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="signingDate" name="signingDate" th:value="${#dates.format(contract?.signingDate, 'yyyy-MM-dd HH:mm:ss')}" autocomplete="off" class="layui-input layui-disabled" placeholder="请选择签约日期" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="must">*</span>综合服务方：</label>
                                <div class="layui-input-inline">
                                    <input id="integratedServiceName" th:value="${contract?.integratedServiceName}" type="text" placeholder="输入综合服务方名称搜索" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                    <dl class="layui-anim layui-anim-upbit select_content" id="select_integratedServiceName"></dl>
                                    <input name="integratedServiceId" th:value="${contract?.integratedServiceId}" type="hidden">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="must">*</span>合同时效：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="period" th:value="${contract?.period}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="must">*</span>是否扫描存档：</label>
                                <div class="layui-input-inline" th:if="${contract?.isScanArchive} != null">
                                    <input type="radio" name="IsScanArchive" value="0" title="否" th:field="*{contract.isScanArchive}" disabled="disabled">
                                    <input type="radio" name="IsScanArchive" value="1" title="是" th:field="*{contract.isScanArchive}" disabled="disabled">
                                </div>
                                <div class="layui-input-inline" th:if="${contract?.isScanArchive} == null">
                                    <input type="radio" name="IsScanArchive" value="0" title="否"  disabled="disabled" checked="">
                                    <input type="radio" name="IsScanArchive" value="1" title="是" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="must">*</span>印章使用：</label>
                                <div class="layui-input-inline">
                                    <select name="sealUse" disabled="disabled">
                                        <option value="0" th:selected="${contract?.sealUse==0?'checked':''}">合同章</option>
                                        <option value="1" th:selected="${contract?.sealUse==1?'checked':''}">公章</option>
                                        <option value="2" th:selected="${contract?.sealUse==2?'checked':''}">业务章</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="must">*</span>留档份数：</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="fileNumber" th:value="${contract?.fileNumber}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">备注：</label>
                                <div class="layui-input-inline">
                                    <textarea name="remark" th:text="${contract?.remark}" placeholder="请输入内容" class="layui-textarea w500 layui-disabled" disabled="disabled"></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">合同扫描件：</label>
                            <div class="layui-input-block">
                                <div class="layui-upload ">
                                    <div class="layui-upload-list layui-inline" id="previewImage">
                                        <div class="layer-photos-content" th:each="contractImg:${contract?.list}">
                                            <img class="layui-upload-img" th:src="${fastDfsServer+contractImg.imgUri}">
                                            <input type="hidden" name="imgUri" th:value="${contractImg.imgUri}" />
                                            <span class="layui-layer-setwin"><a style="display:none;" class="layui-layer-ico layui-layer-close layui-layer-close2" href="javascript:;"></a></span>
                                            <a href="javascript:;" class="layui-laypage-next" style="display:none;"><i class="layui-icon" ></i></a>
                                            <a href="javascript:;" class="layui-laypage-prev " style="display:none;"><i class="layui-icon"></i></a>
                                        </div>
                                    </div>
                                    <div class="layui-inline" id="uploadImage" style="display:none;">
                                        <div class="upload-btn">
                                            <i class="layui-icon layui-icon-add-1"></i>
                                            <p>上传图片</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </form >
        </div>
        <!--  派工单（设备定位） -->
        <div class="layui-col-md12">
            <form  class="layui-form" >
                <div class="layui-card">
                    <div class="layui-card-header">派工单（设备定位）
                        <div class="info-btn">
                            <a th:if="${position!=null}" th:href="@{'/implement/position/detail/view/'+${position?.id}}" target="_blank">查看定位详情</a>
                        </div>
                    </div>
                    <div class="layui-card-body" >
                        <input type="hidden" name="id" th:value="${position?.id}">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label  class="layui-form-label">派工单号：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${position?.orderNo}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">立柱机：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${position?.pillar}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">定位人：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${position?.createName}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">壁挂机：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${position?.wallHung}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">定位日期：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${#dates.format(position?.createDate, 'yyyy-MM-dd HH:mm:ss')}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">雨罩挂壁机：</label>
                                <div class="layui-input-inline">
                                    <input type="tel" th:value="${position?.rainCover}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">总台数：</label>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" th:value="${(position?.wallHung==null?0:position.wallHung)+(position?.pillar==null?0:position.pillar)+(position?.rainCover==null?0:position.rainCover)}" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form >
        </div>
        <!--  立项书项目时间  -->
        <div class="layui-col-md12">
            <form  class="layui-form" >
                <div class="layui-card">
                    <div class="layui-card-header">立项书项目时间
                        <div class="info-btn">
                            <a href="javascript:;" lay-filter="insertProjectBook" lay-submit style="display:none;">保存</a>
                            <a href="javascript:;" lay-filter="editProjectBook" lay-submit >修改</a>
                        </div>
                    </div>
                    <div class="layui-card-body" >
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label  class="layui-form-label">
                                    环境整改时间：</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="rectificationDate" name="rectificationDate" th:value="${projectBook?.beginRectificationDate==null?'':(#dates.format(projectBook?.beginRectificationDate, 'yyyy-MM')+' - '+#dates.format(projectBook?.endRectificationDate, 'yyyy-MM'))}"  autocomplete="off" class="layui-input layui-disabled" disabled="disabled" placeholder="请选择项目整改时间" >
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    设备生产时间：</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="productionDate" name="productionDate" th:value="${projectBook?.beginProductionDate==null?'':(#dates.format(projectBook?.beginProductionDate, 'yyyy-MM')+' - '+#dates.format(projectBook?.endProductionDate, 'yyyy-MM'))}"  autocomplete="off" class="layui-input layui-disabled" disabled="disabled" placeholder="请选择设备生产时间" >
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    进场施工时间：</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="constructionDate" name="constructionDate" th:value="${#dates.format(projectBook?.constructionDate, 'yyyy-MM')}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled" placeholder="请选择项目施工时间" >
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    项目验收和交接时间：</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="acceptanceDate" name="acceptanceDate" th:value="${#dates.format(projectBook?.acceptanceDate, 'yyyy-MM')}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled" placeholder="请选择项目验收和交接日期" >
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    设备出入库及物流发货时间：</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="deliveryDate" name="deliveryDate" th:value="${#dates.format(projectBook?.deliveryDate, 'yyyy-MM')}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled" placeholder="请选择设备出入库及物流发货时间">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form >
        </div>
        <!--  竣工单  -->
        <div class="layui-col-md12">
            <form  class="layui-form" >
                <div class="layui-card">
                    <div class="layui-card-header">物业验收单
                        <div class="info-btn">
                        </div>
                    </div>
                    <div class="layui-card-body" >
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label  class="layui-form-label">验收单号：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${projectCompletion?.orderNo}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">立柱机：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${projectCompletion?.pillar}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">填写人：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${projectCompletion?.createName}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">壁挂机：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${projectCompletion?.wallHung}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">填写日期：</label>
                                <div class="layui-input-inline">
                                    <input type="text" th:value="${#dates.format(projectCompletion?.createDate, 'yyyy-MM-dd HH:mm:ss')}" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">雨罩数：</label>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" th:value="${projectCompletion?.rainCover}" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">物业验收日期：</label>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" th:value="${#dates.format(projectCompletion?.completionDate, 'yyyy-MM-dd HH:mm:ss')}" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">总台数：</label>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" th:value="${(projectCompletion?.wallHung==null?0:projectCompletion.wallHung)+(projectCompletion?.pillar==null?0:projectCompletion.pillar)+(projectCompletion?.rainCover==null?0:projectCompletion.rainCover)}" class="layui-input layui-disabled" disabled="disabled">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form >
        </div>

    </div>
</div>
<!-- javascript -->
<script th:src="@{'/layui/layui.js'}"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    });
</script>
<script th:src="@{'/js/implement/project-detail.js'}"></script>
</body>
</html>