 <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('随访跟进人分配')" />
</head>
<style>

</style>
<script>

</script>
<body>
    <div class="ui-layout-center">
        <form class="form-horizontal" id="form-followUp-edit" th:object="${user}">
            <h4 class="form-header h4">基本信息</h4>
            <input type="hidden" id="id" name="id" th:value="${id}">
            <div class="row">

                <div class="col-sm-12">
                    <div class="form-group">
                        <!--is-required 增加星号 显示为必填-->
                        <label class="col-sm-1 control-label">患者姓名：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="patientName" placeholder="请输入姓名" class="styled-input" type="text" maxlength="30" th:value="${patientName}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">患者手机号：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="patientPhone" placeholder="随访小结" class="styled-input" type="text" maxlength="30" th:value="${patientPhone}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">性别：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <select name="gender" class="styled-input" th:with="type=${@dict.getType('sys_user_sex')}" >
                                    <!--<option>所有</option>-->
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
                                            th:selected="${dict.dictLabel} == ${gender}" ></option>
                                </select>
                                <!--<input name="gender" placeholder="请输入性别" class="styled-input" type="text" maxlength="30" th:value="${gender}" required>-->
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">年龄：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="age" placeholder="请输入年龄" class="styled-input" type="text" maxlength="30" th:value="${age}" required>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <!--is-required 增加星号 显示为必填-->
                        <label class="col-sm-1 control-label">疾病：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="disease" placeholder="请输入证件类型" class="styled-input" type="text" maxlength="30" th:value="${disease}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">临床诊断：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="clinicalDiagnosis" placeholder="临床诊断" class="styled-input" type="text" maxlength="30" th:value="${clinicalDiagnosis}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">药品名称：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="medicineName" placeholder="药品名称" class="styled-input" type="text" maxlength="30" th:value="${medicineName}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">最后一次购药：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input type="text" class="styled-input time-input-new" id="lastPurchaseDate" placeholder="最后一次购药" name="lastPurchaseDate" th:value="${lastPurchaseDate}" required/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <!--is-required 增加星号 显示为必填-->
                        <label class="col-sm-1 control-label">随访跟进人姓名：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="followUpPersonName" placeholder="请输入疾病" class="styled-input" type="text" maxlength="30" th:value="${followUpPersonName}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">跟进人手机号：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="followUpPersonPhone" placeholder="跟进人手机号" class="styled-input" type="text" maxlength="30" th:value="${followUpPersonPhone}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">跟进人角色：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="followUpPersonRole" placeholder="接通次数" class="styled-input" type="text" maxlength="30" th:value="${followUpPersonRole}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">患者分配状态：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <select name="patientAssignmentStatus" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_sfrw_hzfpzt')}" >
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:selected="${dict.dictLabel} == ${patientAssignmentStatus}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-12">
                    <div class="form-group">
                        <!--is-required 增加星号 显示为必填-->
                        <label class="col-sm-1 control-label">门店：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="storeName" placeholder="门店" class="styled-input" type="text" maxlength="30" th:value="${storeName}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">离职员工：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="terminatedEmployeeName" placeholder="离职员工" class="styled-input" type="text" maxlength="30" th:value="${terminatedEmployeeName}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">离职员工手机号：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input name="terminatedEmployeePhone" placeholder="离职员工手机号"
                                       class="styled-input" type="text" maxlength="30" th:value="${terminatedEmployeePhone}" required>
                            </div>
                        </div>
                        <label class="col-sm-1 control-label">离职员工门店：</label>
                        <div class="col-sm-2" >
                            <div class="input-group">
                                <input type="text" class="styled-input" id="terminatedEmployeeStore"
                                       placeholder="离职员工门店" name="terminatedEmployeeStore" th:value="${terminatedEmployeeStore}" required/>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </form>
    </div>
    <div class="main-content">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
	<th:block th:include="include :: footer" />
</body>
</html>

<script>
    function submitHandler() {
        var prefix = ctx + "dtp/pmService";
        if ($.validate.form()) {
            var data = $("#form-followUp-edit").serializeArray();
            /*var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
            var roleIds = $.form.selectCheckeds("role");
            var postIds = $.form.selectSelects("post");
            data.push({"name": "status", "value": status});
            data.push({"name": "roleIds", "value": roleIds});
            data.push({"name": "postIds", "value": postIds});*/
            $.operate.saveTab(prefix + "/followUpAssignEdit", data);
        }
    }
</script>
