zhengcaioa/zhengcaioa/Views/IntentionVisit/Edit.cshtml
@@ -13,6 +13,8 @@
    string IsYwjl = ViewBag.IsYwjl as string;
    List<IntentionVisitDuanxinDTO> Duanxin = ViewData["Duanxin"] as List<IntentionVisitDuanxinDTO>; //短信
}
@{
    Layout = null;
@@ -198,13 +200,13 @@
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">接待人<i class="red">*</i></label>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">接待人</label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <input class="form-control" label="接待人" name="Jdr" id="Jdr" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Jdr">
                                    </div>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">职务<i class="red">*</i></label>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">职务</label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <select id="Zw" class="form-control" name="Zw" data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
@@ -302,7 +304,32 @@
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">短信模板<i class="red">*</i></label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <select id="Duanxin" class="form-control" name="Duanxin" data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in Duanxin)
                                            {
                                                <option value="@item.Id" hassubinfo="true">
                                                    @item.DuanxinTitle
                                                </option>
                                            }
                                        </select>
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">短信内容<i class="red">*</i></label>
                                    <div class="col-sm-8 col-md-8">
                                        <textarea class="form-control bt" id="DuanxinNeirong" name="DuanxinNeirong" title="短信内容" isempty="" maxlength="4000"  length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'" >@Model.DuanxinNeirong</textarea>
                                    </div>
                                </div>
@@ -328,6 +355,11 @@
    </form>
    <script type="text/javascript">
        var DuanxinNeirong = document.getElementById("DuanxinNeirong");
        DuanxinNeirong.style.height = DuanxinNeirong.scrollHeight + 'px';
        var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
        $("#div_content").height(hh);
@@ -419,11 +451,16 @@
                toastr.warning("访问业务不能为空");
                return;
            };
            //if ($("#Zw").val() == '') {
            //    toastr.warning("职务不能为空");
            //    return;
            //};
            
            if ($("#Jdr").val() == '') {
                toastr.warning("接待人不能为空");
                return;
            }
            //if ($("#Jdr").val() == '') {
            //    toastr.warning("接待人不能为空");
            //    return;
            //}
@@ -487,8 +524,33 @@
      
        $("#Duanxin").change(function () {
            var sheng = $("#Duanxin").val();
            $.ajax({
                type: "GET",
                url: "/IntentionVisit/getDuanxin?id=" + sheng,
                dataType: "json",
                global: false,
                data: "",
                success: function (data) {
                    if (data.Result) {
                        $("#DuanxinNeirong").val(data.Message);
                        var DuanxinNeirong = document.getElementById("DuanxinNeirong");
                        DuanxinNeirong.style.height = DuanxinNeirong.scrollHeight + 'px';
                    } else {
                        parent.layer.msg('查询失败', { icon: 5 });
                    }
                },
                error: function () {
                    parent.layer.msg('查询失败', { icon: 5 });
                }
            });
        });
        function _pageAutoClose() {
            parent.window._reloadPageData();