<% layout('/layouts/default.html', {title: '应用评价表管理', libs: ['validate','fileupload']}){ %>
<div class="main-content" xmlns="http://www.w3.org/1999/html">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa icon-note"></i> ${text(adminAppEvaluate.isNewRecord ? '新增应用评价表' : '编辑应用评价表')}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${adminAppEvaluate}" action="${ctx}/admin/adminAppEvaluate/save2" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="form-unit">${text('基本信息')}</div>
				<#form:hidden path="id"/>
				<input hidden name="evaluateApp" value="${appId}">
				<div class="row">
					<!--<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('评价人员id')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="evaluateUser" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>-->
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('评价人姓名')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<!--<#form:input path="evaluateUsername" maxlength="255" class="form-control"/>-->
								<input name="evaluateUsername" value="${evaluateUsername}" class="form-control" readonly="readonly">
							</div>
						</div>
					</div>

					<!--<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('评价appid')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="evaluateApp" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>-->
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('应用名字')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<!--<#form:input path="appName" maxlength="255" class="form-control"/>-->
								<input name="appName" value="${appName}" class="form-control" readonly="readonly">
							</div>
						</div>
					</div>

					<!--<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('评价图片')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="evaluateImage" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>-->
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('应用描述')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<!--<#form:textarea path="appDescribe" rows="4" maxlength="255" class="form-control"/>-->
								<textarea name="appDescribe" class="form-control" readonly="readonly">${evaluateMsg}</textarea>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('评价信息')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:textarea path="evaluateMsg" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('分数')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8" style="display: flex;align-items: center">
								<!--<#form:input path="score" maxlength="5" class="form-control"/>-->
								<div style="display: flex;align-items: center;margin-right: 20px">
									<input type="radio" name="score" value="1" style="width: 15px;height: 15px"/>
									<span style="font-size: 20px;font-weight: 500;margin-left: 5px"> 1分</span>
								</div>
								<div style="display: flex;align-items: center;margin-right: 20px">
									<input type="radio" name="score" value="2" style="width: 15px;height: 15px"/>
									<span style="font-size: 20px;font-weight: 500;margin-left: 5px"> 2分</span>
								</div>
								<div style="display: flex;align-items: center;margin-right: 20px">
									<input type="radio" name="score" value="3" style="width: 15px;height: 15px"/>
									<span style="font-size: 20px;font-weight: 500;margin-left: 5px"> 3分</span>
								</div>
								<div style="display: flex;align-items: center;margin-right: 20px">
									<input type="radio" name="score" value="4" style="width: 15px;height: 15px"/>
									<span style="font-size: 20px;font-weight: 500;margin-left: 5px"> 4分</span>
								</div>
								<div style="display: flex;align-items: center;margin-right: 20px">
									<input type="radio" name="score" value="5" style="width: 15px;height: 15px"/>
									<span style="font-size: 20px;font-weight: 500;margin-left: 5px"> 5分</span>
								</div>

							</div>
						</div>
					</div>
				</div>
				<!--<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('备注信息')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
							</div>
						</div>
					</div>
				</div>-->
				<!--<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2">
								<span class="required hide">*</span> ${text('图片上传')}：</label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadImage" bizKey="${adminAppEvaluate.id}" bizType="adminAppEvaluate_image"
									uploadType="image" class="" readonly="false" preview="true"/>
							</div>
						</div>
					</div>
				</div>-->
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('admin:adminAppEvaluate:edit')){ %>
							<button type="submit" onclick="close()" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>

	function close(){
		setTimeout(()=>{
			window.close();
		},2000)
	}

$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});


</script>