<tbody>
<tr ng-transclude></tr>
<tr class="detail">
    <td colspan="9">
        <div class="col-xs-12 p0 pt20 ys-framework-grid-form"
             ng-if="pager.editorSelectedItem==input||(pager.add&&!input.id)" style="display: none">
            <div class="col-xs-12 p0 title">
                <span>{{::input.id?'编辑':'新增'}}</span>
                <div class="pull-right">
                    <button class="btn btn-danger" ng-click="submit($event)">保存</button>
                    <button class="btn btn-default" ng-if="input.id"
                            ng-click="$parent.$parent.$parent.$app.form.row.drop({service:'project',refresh:refresh,id:input.id,message:'您正在删除项目信息<br/>该操作不可恢复、确定执行？'})">
                        删除
                    </button>
                    <button class="btn btn-default"
                            ng-click="$parent.$parent.$app.form.row.slideToggle({event:$event,pager:pager})">收起
                    </button>
                </div>
            </div>
            <div class="col-xs-12 body">
                <div class="col-xs-8 left-panel form-horizontal pt20 pb20"
                     ng-style="{minHeight:input.id?'361px':'261px'}">
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">全称</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" ng-model="input.name"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9001}" placeholder="例如：XXX广场、XXX一期">
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">简称</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" ng-model="input.abbreviationName"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9002}" placeholder="-- 请填写 --">
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">区域</label>
                        <div class="col-xs-8">
                            <div ys-framework-edit="{model:input,require:true}"
                                 ys-framework-error="{model:input,code:9003}"
                                 ys-framework-dropdown="{dictionary:'AREAS',model:input,property:'areaId',width:140,placeholder:'-- 请选择区域 --'}"></div>
                        </div>
                    </div>
                    <!--<div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">编码</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" ng-model="input.code"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9004}" placeholder="可以由字母数字组成"/>
                        </div>
                    </div>-->
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">运营状态</label>
                        <div class="col-xs-8">
                            <div ys-framework-edit="{model:input,require:true}"
                                 ys-framework-error="{model:input,code:9005}"
                                 ys-framework-dropdown="{dictionary:'PROJECT_OPERATE_STATUS',model:input,property:'operateStatusId',width:140,placeholder:'-- 请选择状态 --'}"></div>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">经营类型</label>
                        <div class="col-xs-8">
                            <div ys-framework-edit="{model:input,require:true}"
                                 ys-framework-error="{model:input,code:9006}"
                                 ys-framework-dropdown="{dictionary:'BUSINESS_TYPES',model:input,property:'businessTypeId',placeholder:'-- 请选择经营类型 --'}"></div>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">产权性质</label>
                        <div class="col-xs-8">
                            <div ys-framework-edit="{model:input,require:true}"
                                 ys-framework-error="{model:input,code:9007}"
                                 ys-framework-dropdown="{dictionary:'PROPERTY_NATURE',model:input,property:'propertyNatureId',placeholder:'-- 请选择产权性质 --'}"></div>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">建筑面积(m<sup>2</sup>)</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9008}"
                                   ys-framework-number="{model:input,property:'totalBuildingArea'}"
                                   placeholder="保留两位小数">
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10" ng-if="input.id">
                        <label class="col-xs-4 control-label">经营面积(m<sup>2</sup>)</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" ng-model="input.totalServiceArea"
                                   placeholder="自动统计" readonly>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">开业日期</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control readonly" ng-model="input.openingDate"
                                   current-text="今天" clear-text="清空" close-text="关闭" readonly
                                   is-open="openingDate"
                                   ng-click="openingDate=true"
                                   datepicker-append-to-body="true"
                                   uib-datepicker-popup="yyyy-MM-dd" datepicker-options="{showWeeks:false}"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9009}" placeholder="-- 请选择 --"/>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10" ng-if="input.id">
                        <label class="col-xs-4 control-label">停车位数量</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" ng-model="input.parkingSpaceCount"
                                   placeholder="自动统计" readonly>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">电话</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" ng-model="input.tel"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9010}" placeholder="联系电话"/>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10" ng-if="input.id">
                        <label class="col-xs-4 control-label">商铺数量</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" readonly placeholder="自动统计"
                                   ng-model="input.storeCount"/>
                        </div>
                    </div>
                    <div class="col-xs-6 p0 mb10">
                        <label class="col-xs-4 control-label">关联组织机构</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control readonly" readonly
                                   ng-click="setOrganization()"
                                   value="{{$parent.$parent.$app.dictionary.ORGANIZATIONS.hash[input.orgId].text}}"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9011}" placeholder="-- 请选择组织机构 --"/>
                        </div>
                    </div>
                    <div class="col-xs-12 p0 mb10">
                        <label class="col-xs-2 control-label">地址</label>
                        <div class="col-xs-10">
                            <input type="text" class="form-control" ng-model="input.address"
                                   ys-framework-edit="{model:input,require:true}"
                                   ys-framework-error="{model:input,code:9012}" placeholder="例如：XXX市XXX路XXX号">
                        </div>
                    </div>
                    <div class="col-xs-12 p0">
                        <label class="col-xs-2 control-label">缩略图</label>
                        <div class="col-xs-10 text-invalid">
                            <div class="col-xs-12 lh34 p0 attach" ys-framework-error="{model:input,code:9013}">
                                <a class="text-primary" href="javascript:void(0)" uploader="logos">上传文件</a>
                                可上传小于5M的常用图片格式文件
                            </div>
                        </div>
                        <div class="col-xs-8 col-xs-offset-2 pt10" ng-if="input.logo.path">
                            <img ng-src="{{$parent.$parent.$parent.$app.getStaticUrl($parent.input.logo.path)}}"
                                 width="200"
                                 height="100"/>
                        </div>
                    </div>
                </div>
                <div class="col-xs-4 p0">
                    <h5 class="pt10">负责人</h5>
                    <div class="col-xs-12 p0 mb10" ng-repeat="charge in input.charges">
                        <div class="col-xs-10 p0">
                            <div class="col-xs-4 p0 pr5">
                                <input type="text" class="form-control require" placeholder="负责人"
                                       ng-model="charge.realname"
                                       ng-click="setUser(charge)"
                                       ys-framework-error="{model:input,code:9014,expression:'!charge.userId'}"/>
                            </div>
                            <div class="col-xs-4 p0 pr5">
                                <input type="text" class="form-control readonly" readonly
                                       ng-model="charge.startDate"
                                       current-text="今天"
                                       clear-text="清空"
                                       close-text="关闭"
                                       datepicker-append-to-body="true"
                                       is-open="charge.startDateOpen"
                                       ng-click="charge.startDateOpen=true"
                                       uib-datepicker-popup="yyyy-MM-dd"
                                       datepicker-options="{showWeeks:false}" placeholder="任职起始"/>
                            </div>
                            <div class="col-xs-4 p0">
                                <input type="text" class="form-control readonly" readonly
                                       ng-model="charge.endDate"
                                       current-text="今天"
                                       clear-text="清空"
                                       close-text="关闭"
                                       datepicker-append-to-body="true"
                                       is-open="charge.endDateOpen"
                                       ng-click="charge.endDateOpen=true"
                                       uib-datepicker-popup="yyyy-MM-dd"
                                       datepicker-options="{showWeeks:false}" placeholder="任职结束"/>
                            </div>
                        </div>
                        <div class="col-xs-2">
                            <a href="javascript:void(0)" ng-if="$index==0" ng-click="addCharge()">
                                <img class="pt5" src="../../../../../webapp/styles/img/common/icon/add-blue.png">
                            </a>
                            <a href="javascript:void(0)" ng-if="$index>0" ng-click="subtractCharge(charge)">
                                <img class="pt5" src="../../../../../webapp/styles/img/common/icon/subtract-gray.png">
                            </a>
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 p0" ng-if="false">
                    <hr class="mt0"/>
                    <h3 class="text-center">
                        甲方合同抬头及开户行规则&nbsp;&nbsp;<a href="javascript:void(0)" ng-click="addParty()"><img
                            src="../../../../../webapp/styles/img/common/icon/add-blue.png"></a>
                    </h3>
                    <hr/>
                    <div class="col-xs-12 p0 form-horizontal pb20" ng-repeat="party in input.partys">
                        <div class="col-xs-12 p0 form-group">
                            <div class="col-xs-3 p0">
                                <label class="col-xs-5 control-label">商铺产权性质</label>
                                <div class="col-xs-7">
                                    <select select2="prnos" style="width: 100%" class="require"
                                            ng-model="party.propertyNatureId"
                                            error="{{input.errorCode}}" code="9013"/>
                                </div>
                            </div>
                            <div class="col-xs-3 p0">
                                <label class="col-xs-5 control-label">合同甲方抬头</label>
                                <div class="col-xs-7">
                                    <select select2="headOptions" class="require" style="width: 100%"
                                            ng-model="party.headId"
                                            error="{{input.errorCode}}" code="9014"/>
                                </div>
                            </div>
                            <div class="col-xs-3 p0 ">
                                <label class="col-xs-5 control-label">甲方地址</label>
                                <div class="col-xs-7">
                                    <input type="text" class="form-control" ng-model="party.head.address" readonly>
                                </div>
                            </div>
                            <div class="col-xs-3 p0 ">
                                <label class="col-xs-5 control-label">合同甲方电话</label>
                                <div class="col-xs-7">
                                    <input type="text" class="form-control" ng-model="party.head.tel" readonly>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12 p0 form-group">
                            <div class="col-xs-3 p0 pt5 text-center">
                                <div class="col-xs-7">
                                    <img src="../../../../../webapp/styles/img/common/icon/subtract-gray.png"
                                         ng-click="subtractParty(party)" ng-if="$index>0" class="pointer"/>
                                </div>
                            </div>
                            <div class="col-xs-3 p0">
                                <label class="col-xs-5 control-label">甲方开户账号</label>
                                <div class="col-xs-7">
                                    <select select2="bankOptions" class="require" style="width: 100%"
                                            ng-model="party.bankId"
                                            error="{{input.errorCode}}" code="9015"/>
                                </div>
                            </div>
                            <div class="col-xs-3 p0">
                                <label class="col-xs-5 control-label">甲方开户名称</label>
                                <div class="col-xs-7">
                                    <input type="text" class="form-control" ng-model="party.bank.companyName"
                                           readonly>
                                </div>
                            </div>
                            <div class="col-xs-3 p0 ">
                                <label class="col-xs-5 control-label">甲方开户行</label>
                                <div class="col-xs-7">
                                    <input type="text" class="form-control" ng-model="party.bank.bankName" readonly>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="ys-framework-grid-form-line"></div>
        </div>
    </td>
</tr>
</tbody>
