@{
    ViewBag.Title = "修改客户信息";
    Layout = "~/Views/Shared/_LayoutTable.cshtml";
}
<body>
    <div class="wrapper wrapper-content">
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div id="toolbar" class="row">
                    <div class="col-sm-1 col-md-1">
                    </div>
                </div>
                <table id="newConfigurationTable" class="table table-bordered table-striped table-hover">
                    <tr style="height:40px">
                        <td style="text-align:right">审核人：</td>
                        <td>

                            <input type="text" id="txtCheckname" value="@ViewBag.Checkname" disabled="disabled" />
                        </td>
                    </tr>
                    <tr style="height:40px">
                        <td style="text-align:right">时间：</td>
                        <td><input type="text" id="txtCheckDate" value="@ViewBag.CheckDate" disabled="disabled" /></td>
                    </tr>
                    <tr style="height:40px">
                        <td style="text-align:right">审核状态：</td>
                        <td><input type="text" id="txtCheckzt" value="@ViewBag.Checkzt" disabled="disabled" /></td>
                    </tr>
                    <tr style="height:40px">
                        <td style="text-align:right">原客户名称：</td>
                        <td><input type="text" id="txtbfullname" value="@ViewBag.bfullname" disabled="disabled" /></td>
                    </tr>
                    <tr style="height:40px">
                        <td style="text-align:right">线路名称：</td>
                        <td><input type="text" id="txtlodefullname" value="@ViewBag.lodefullname" disabled="disabled" /></td>
                    </tr>
                    <tr>
                        <td style="text-align:right">新客户名称：</td>
                        <td>
                            <input type="text" id="txtBtypeName" value="@ViewBag.BtypeName" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">地区：</td>
                        <td>
                            <input type="text" id="txtArea" value="@ViewBag.Area" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">原联系人：</td>
                        <td>
                            <input type="text" id="txtOldPerson" value="@ViewBag.OldPerson" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">新联系人：</td>
                        <td>
                            <input type="text" id="txtNewPerson" value="@ViewBag.NewPerson" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">原联系电话：</td>
                        <td>
                            <input type="text" id="txtOldTel" value="@ViewBag.OldTel" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">新联系电话：</td>
                        <td>
                            <input type="text" id="txtNewTel" value="@ViewBag.NewTel" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">原手机号：</td>
                        <td>
                            <input type="text" id="txtOldPhone" value="@ViewBag.OldPhone" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">新手机号：</td>
                        <td>
                            <input type="text" id="txtNewPhone" value="@ViewBag.NewPhone" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">原地址：</td>
                        <td>
                            <input type="text" id="txtOldAddress" value="@ViewBag.OldAddress" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">更新地址：</td>
                        <td>
                            <input type="text" id="txtNewAddress" value="@ViewBag.NewAddress" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">更换原因：</td>
                        <td>
                            <input type="text" id="txtUpdateReason" value="@ViewBag.UpdateReason" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">提交日期：</td>
                        <td>
                            <input type="text" id="txtuploaddate" value="@ViewBag.uploaddate" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right">提交人：</td>
                        <td>
                            <input type="text" id="txtuploadname" value="@ViewBag.uploadname" disabled="disabled" />
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td style="text-align:left;height:60px">
                            <button id="btnSubmit" class="btn btn-default"><i class="glyphicon glyphicon-ok"></i> 提交</button>
                            <input type="text" id="typeid" value="@ViewBag.typeid" style="visibility:hidden">
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

    <script type="text/javascript">
    $(document).ready(function () {
        //提交按钮
        $("#btnSubmit").click(function () {
            //if ($("#txtNewTel").val().trim() && !/^1[34578]\d{9}$/.test($("#txtNewTel").val())) {
            //    $.LeversScroll(window, document.getElementById("txtNewTel"));
            //    layer.tips('填写正确手机号码', '#txtNewTel', {
            //        shift: 0,
            //        tips: [1, '#c00']
            //    });
            //    return;
            //}
            //if ($("#txtNewPhone").val().trim() && !/^1[34578]\d{9}$/.test($("#txtNewPhone").val())) {
            //    $.LeversScroll(window, document.getElementById("txtNewPhone"));
            //    layer.tips('填写正确手机号码', '#txtNewPhone', {
            //        shift: 0,
            //        tips: [1, '#c00']
            //    });
            //    return;
            //}
            $.ajax({
                url: "../WLTManage/SaveModifyBtype",
                dataType: "text",
                data: {
                    typeid: $("#typeid").val(),
                    newPerson: $("#txtNewPerson").val(),
                    newTel: $("#txtNewTel").val(),
                    newPhone: $("#txtNewPhone").val(),
                    newAddress: $("#txtNewAddress").val(),
                    btypeName: $("#txtBtypeName").val()
                },
                type: "post",
                success: function (data) {
                    //新增或修改成功后刷新table
                    parent.layer.msg(data, { icon: 1, time: 2000 });
                    parent.$('#ModifyBtypeTable').bootstrapTable("refresh");
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                },
                error: function (data) {
                    layer.msg(data, { icon: 2, time: 2000 });
                }
            })
        })
    })
    </script>
</body>