<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>

<link rel="stylesheet" href="${contextRoot}/develop/lib/plugin/steps/jquery.steps.css">
<style>
    .wizard > .steps a, .wizard > .steps a:hover, .wizard > .steps a:active{margin:10px;line-height:30px;}
    .wizard > .steps .disabled a, .wizard > .steps .disabled a:hover, .wizard > .steps .disabled a:active{background: #f5f8fa;border:1px dashed #e1e1e1}
    .wizard > .steps .done a, .wizard > .steps .done a:hover, .wizard > .steps .done a:active{background:#f0f0f0;border:1px solid #e1e1e1;color:#323232}
    .wizard > .steps .current a, .wizard > .steps .current a:hover, .wizard > .steps .current a:active{background: #1eaaff;border:0px;}
    .wizard > .steps span.number{color:#aaa;background:transparent;}
    .wizard > .steps .current span.number{color:#fff}
    .wizard > .steps .done span.number{color:#323232}
    .wizard > .actions{position: fixed;bottom:0px;height:55px;padding:10px;background: #f5f8fa;width:100%}
    .wizard > .actions > ul > li {margin-left: 10px;  }
    .wizard > .actions a, .wizard > .actions a:hover, .wizard > .actions a:active
    {
        border-radius:3px;
        background:#1eaaff;
        height:30px;
        overflow:hidden;
        width:70px;
        line-height:30px;
        cursor:pointer;
        padding:0px;
        text-align: center;
    }
    .wizard > .actions a.l-button-green{background:#50b946;}
    .wizard > .actions a.l-button-no{background-color: #f0f0f0;color:#323232}
    .wizard > .content{  background-color: transparent;  }
    .wizard > .content > .body {  position:inherit;  }
    .wizard > .content > .body input{  border:0px;  }
    .wizard > .content > .body input.l-textbox{border:1px solid #e1e1e1}
    .wizard > .content > .body input.l-textbox:focus{ border-color:#1eaaff; }
    .wizard > .content > .body input.l-hidden{  display:none;  }


    .divIntervalOption{display: none;padding-top:10px;}
    .divIntervalOption .label-left{float:left;padding-left:4px;padding-right:4px;height:30px;line-height:30px;}
    .divIntervalOption .l-text{float:left}
    .inlineDialog .l-dialog-tl,.inlineDialog .l-dialog-tc,.inlineDialog .l-dialog-tr,.inlineDialog .l-dialog-tc-inner{height:0px;overflow: hidden}
    .inlineDialog .l-dialog-table tr,.inlineDialog .l-dialog-table td{border:0px;}
    .wizard > .content{height:410px;}
</style>

<%--按步执行面板--%>
<div id="div_form" style="display: none;" class="m-form-inline">
    <h1>基本信息</h1>
    <div class="step-content">
        <div class="m-form-group">
            <label>任务名称：</label>
            <div class="m-form-control">
                <input type="text"  class="l-textbox" id="txtJobName"/>
            </div>
        </div>
        <div class="m-form-group">
            <label>任务说明：</label>
            <div class="m-form-control">
                <textarea rows="6" class="l-textarea" style="width:240px;" id="txtJobInfo"></textarea>
            </div>
        </div>
        <div class="m-form-group">
            <label>任务类型：</label>
            <div class="m-form-control">
                <div class="u-checkbox-wrap m-form-control">
                    <input type="radio" name="jobContentType" value="0" checked>采集
                    <input type="radio" name="jobContentType" value="1" >上传
                </div>
            </div>
        </div>
        <div class="m-form-group">
            <label id="lbJobContent">关联模板流程：</label>
            <div class="m-form-control">
                <input type="text" name="flowTempId" id="jobContentClass">
                <input type="hidden" name="flowId" id="flowId" >
                <input type="text"  class="l-textbox" id="txtJobContent" style="display: none"/>
            </div>
        </div>
        <div style="display:none;">
            <input type="hidden" id="txtId"/>
            <input type="hidden" id="txtValid"/>
            <input type="hidden" id="txtSchemeId"/>
            <input type="hidden" id="txtSchemeVersion"/>
            <input type="hidden" id="txtCronExpression" />
            <input type="hidden" id="txtJobDataset"/>
        </div>
    </div>

    <h1>适配方案</h1>
    <div class="step-content">
        <div class="m-form-group">
            <label>适配方案列表：</label>
            <div id="listPlan" class="m-form-control"></div>
        </div>
    </div>

    <h1>数据集</h1>
    <div class="step-content">
        <div class="m-form-group">
            <label>数据集列表：</label>
            <div id="listDataset" class="m-form-control"></div>
            <div id="crawlerListDataset" class="m-form-control f-dn"></div>
        </div>
    </div>

    <h1>执行计划</h1>
    <div class="step-content">
        <div class="m-form-group">
            <label>任务执行方式：</label>
            <div class="u-checkbox-wrap m-form-control">
                <input type="radio" name="jobType" value="0">单次执行
                <input type="radio" name="jobType" value="1" checked>周期执行
            </div>
        </div>
        <div class="m-form-group">
            <label>任务触发时间：</label>
            <div class="m-form-control">
                <input id="dateNextTime" type="text" id="jobNextTime" />
            </div>
        </div>

        <div class="m-form-group" id="divRepeatStart" style="display: none">
            <label>上传事件起始时间：</label>
            <div class="m-form-control">
                <input id="repeatStartTime" type="text" />
            </div>
        </div>
        <div class="m-form-group" id="divRepeatEnd" style="display: none">
            <label>上传事件结束时间：</label>
            <div class="m-form-control">
                <input id="repeatEndTime" type="text" />
            </div>
        </div>
        <div id="divDelayTime" class="m-form-group" style="display: none">
            <label>延迟上传时间：</label>
            <div class="m-form-control">
                <input type="text" id="txtDelayTime" />
            </div>
            <div style="float:left;line-height:30px;padding-left:4px;">天</div>
        </div>

        <div class="m-form-group" id="divTimeInterval">
            <label>执行周期：</label>
            <div class="m-form-control">
                <div>
                    <input type="radio" name="interval_type" value="0" checked/>分
                    <input type="radio" name="interval_type" value="1" />时
                    <input type="radio" name="interval_type" value="2" />天
                    <input type="radio" name="interval_type" value="3" />周
                    <input type="radio" name="interval_type" value="4" />月
                </div>

                <div id="divIntervalOption0" class="divIntervalOption" style="display: block">
                    <div class="label-left">每隔</div><input type="text" id="txtM" /><div class="label-left">分钟</div>
                </div>
                <div id="divIntervalOption1" class="divIntervalOption">
                    <div class="label-left">每隔</div><input type="text" id="txtH" /><div class="label-left">小时</div>
                </div>
                <div id="divIntervalOption2" class="divIntervalOption">
                    <div class="label-left">每隔</div><input type="text" id="txtD" /><div class="label-left">天</div>
                </div>
                <div id="divIntervalOption3" class="divIntervalOption">
                    <input type="checkbox" name="week_day" value="2"/>周一
                    <input type="checkbox" name="week_day" value="3"/>周二
                    <input type="checkbox" name="week_day" value="4"/>周三
                    <input type="checkbox" name="week_day" value="5"/>周四
                    <input type="checkbox" name="week_day" value="6"/>周五<br/>
                    <input type="checkbox" name="week_day" value="7"/>周六
                    <input type="checkbox" name="week_day" value="1"/>周日
                </div>
                <div id="divIntervalOption4" class="divIntervalOption">
                    <div class="m-form-group">
                        <input type="radio" name="month_day" value="0" checked/>每月第一天
                    </div>
                    <div class="m-form-group">
                        <input type="radio" name="month_day" value="1" />每月最后一天
                    </div>
                    <div class="m-form-group">
                        <div style="float: left">
                            <input type="radio" name="month_day" value="2"/>
                        </div>
                        <div class="label-left" style="padding-left:0px;">每月第</div><input type="text" id="txtMD" disabled/><div class="label-left">天</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<%--设置条件面板--%>
<div id="divCondition" style="display:none;height:440px;width:100%" class="m-form-inline m-form-top">
    <div class="m-form-group" style="padding-top:10px;">
        <label>轮询字段：</label>
        <div class="m-form-control">
            <input type="text" data-type="select" id="jobDatasetKey">
        </div>
    </div>
    <div class="m-form-group">
        <label>轮询字段类型：</label>
        <div class="m-form-control">
            <input type="text" data-type="select" id="jobDatasetKeytype">
        </div>
    </div>
    <div class="m-form-group">
        <label>轮询起始值：</label>
        <div class="m-form-control">
            <input type="text" id="jobDatasetKeyvalue" class="l-textbox">
        </div>
    </div>
    <div class="m-form-group">
        <label>过滤条件：</label>
        <div class="m-form-control">
            <input type="text" id="jobDatasetCondition" />
        </div>
    </div>
    <div class="m-form-bottom">
        <div id="btnCancelCondition" class="l-button l-button-no" >
            <span>取消</span>
        </div>
        <div id="btnSaveCondition" class="l-button" >
            <span>确定</span>
        </div>
    </div>
</div>