230 lines
8.8 KiB
Plaintext
230 lines
8.8 KiB
Plaintext
@using WX.CRM.WebHelper
|
||
|
||
@{
|
||
ViewBag.Title = "客户信息查询";
|
||
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
||
}
|
||
<div class="mvctool">
|
||
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
||
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
|
||
</div>
|
||
|
||
<div class="bas_datagrid">
|
||
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
|
||
<ul class="toolBar_ul">
|
||
<li>软件用户名:<input type="text" name="txt_SoftName" style="width: 150px" /> </li>
|
||
<li>客户ID:<input type="text" name="txt_ResID" style="width: 160px" /> </li>
|
||
<li>注册时间:@Html.WdatePickerText("txt_ctime1", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString("yyyy-MM-dd"))-@Html.WdatePickerText("txt_ctime2", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"))</li>
|
||
</ul>
|
||
</div>
|
||
@Html.Raw(ViewBag.GroupList)
|
||
</div>
|
||
<div id="dlgResetMobile" class="easyui-dialog" closed="true" style="width: 600px; height: 400px; padding: 10px;">
|
||
<ul style="padding:0px 0px 10px; font-size:16px;">
|
||
<li style="line-height:40px;">用户名:<span id="dlg_username"></span></li>
|
||
<li style="display: none; line-height: 30px;">类型:<span id="dlg_type"></span></li>
|
||
<li style="line-height:40px;" id="dlgResetMobile_li_3">新手机:<input type="text" id="dlg_newmobile" /></li>
|
||
<li style="line-height:40px;" id="dlgResetMobile_li_4">旧手机:<input type="text" id="dlg_oldmobile" /></li>
|
||
</ul>
|
||
<input type="button" class="layui-btn" value="确定" onclick="ResetMobileSave()" />
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
function onLoadSucced() {
|
||
$('#tablist').tablegrid("Search");
|
||
}
|
||
$(function () {
|
||
$('#tablist').tablegrid({
|
||
url: '/Soft/Soft_Customer/GetHtmlList',
|
||
height: $(window).height() - 130,
|
||
loadNow: true,
|
||
isPage: true,
|
||
//data: GetControlValue
|
||
});
|
||
function GetControlValue() {
|
||
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val() };
|
||
}
|
||
$("#btnQuery").click(function () {
|
||
$('#tablist').tablegrid("Search");
|
||
});
|
||
});
|
||
function ShowResDetial(url) {
|
||
window.parent.ChildAddTab("客户详细", url, "");
|
||
}
|
||
function frameReturnByClose() {
|
||
$("#modalwindow").window('close');
|
||
}
|
||
|
||
function frameReturnByReload(flag) {
|
||
$("#tablist").tablegrid("Load");
|
||
}
|
||
|
||
function frameReturnByMes(mes) {
|
||
$.messageBox5s('提示', mes);
|
||
}
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
|
||
}
|
||
//获取datagrid头部及字段
|
||
function getDataGridHeader() {
|
||
var columns = $('#tablist').tablegrid("getHead");
|
||
return columns;
|
||
}
|
||
function Export_Click() {
|
||
//$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/Soft/Soft_Customer/Export?" + GetQueryStr() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val())));
|
||
//$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
||
window.open("/Res/Soft_Customer/Export?" + GetQueryStr());
|
||
}
|
||
|
||
function ResetPwd(userName, resid, obj) {
|
||
$(obj).attr('disabled', true);
|
||
$(obj).val(180);
|
||
//倒计时显示
|
||
var oInterval = setInterval(function CountDown(obj) {
|
||
if ($(obj).val() != "重置密码") {
|
||
var count = $(obj).val();
|
||
count--;
|
||
if (count != 0) {
|
||
$(obj).val(count);
|
||
} else {
|
||
clearInterval(oInterval);
|
||
$(obj).attr('disabled', false);
|
||
$(obj).val("重置密码");
|
||
};
|
||
}
|
||
|
||
}, 1000, obj);
|
||
|
||
$.r_ajax({
|
||
url: "/Soft/SoftUser/ResetPassword",
|
||
type: "Post",
|
||
data: { userName: userName, resid: resid },
|
||
dataType: "json",
|
||
loading: true,
|
||
success: function (data) {
|
||
if (data.type) {
|
||
//alert("密码重置成功!");
|
||
$.messager.alert("提示", "密码重置成功!", "info");
|
||
// window.frameReturnByMes(data.message);
|
||
}
|
||
else {
|
||
alert(data.message);
|
||
// window.frameReturnByMes(data.message);
|
||
}
|
||
}
|
||
});
|
||
|
||
}
|
||
function UnBindQW(username, obj) {
|
||
$(obj).attr('disabled', true);
|
||
if (confirm("请问你要确定要解绑“" + username + "”的企业微信关系吗!")) {
|
||
$.r_ajax({
|
||
url: "/Soft/SoftUser/UnBindQW",
|
||
type: "Post",
|
||
data: { username: username },
|
||
dataType: "json",
|
||
loading: true,
|
||
success: function (data) {
|
||
$(obj).attr('disabled', false);
|
||
if (data.type) {
|
||
//alert("解绑成功!");
|
||
$.messager.alert("提示", "解绑成功!", "info");
|
||
}
|
||
else {
|
||
//alert(data.message);
|
||
$.messager.alert("警告", data.message, "error");
|
||
}
|
||
}
|
||
});
|
||
} else {
|
||
$(obj).attr('disabled', false);
|
||
}
|
||
|
||
}
|
||
|
||
function ResetMobile(username, type, obj) {
|
||
$(obj).attr('disabled', true);
|
||
var title = "";
|
||
if (type == 0) {
|
||
title = "绑定手机";
|
||
$("#dlgResetMobile_li_3").show();
|
||
$("#dlgResetMobile_li_4").hide();
|
||
}
|
||
else if (type == 1) {
|
||
title = "解绑手机";
|
||
$("#dlgResetMobile_li_3").hide();
|
||
$("#dlgResetMobile_li_4").show();
|
||
}
|
||
else if (type == 2) {
|
||
title = "修改手机";
|
||
$("#dlgResetMobile_li_3").show();
|
||
$("#dlgResetMobile_li_4").show();
|
||
}
|
||
else {
|
||
alert("参数错误!");
|
||
return;
|
||
}
|
||
$("#dlg_username").html(username);
|
||
$("#dlg_type").html(type);
|
||
$('#dlgResetMobile').dialog({ title: title, width: 550, height: 250, closed: false, cache: false, modal: true });
|
||
|
||
$(obj).attr('disabled', false);
|
||
}
|
||
|
||
function ResetMobileSave() {
|
||
var username = $("#dlg_username").html();
|
||
var type = $("#dlg_type").html();
|
||
var oldmobile = $("#dlg_oldmobile").val();
|
||
var newmobile = $("#dlg_newmobile").val();
|
||
|
||
$.r_ajax({
|
||
url: "/Soft/SoftUser/ResetMobile",
|
||
type: "Post",
|
||
data: { username: username, type: type, oldmobile: oldmobile, newmobile: newmobile },
|
||
dataType: "json",
|
||
loading: true,
|
||
success: function (data) {
|
||
if (data.type) {
|
||
if (type == 0) {
|
||
//alert("绑定成功!");
|
||
$.messager.alert("提示", "绑定成功!", "info");
|
||
$('#dlgResetMobile').dialog("close");
|
||
}
|
||
else if (type == 1) {
|
||
//alert("解绑成功!");
|
||
$.messager.alert("提示", "解绑成功!", "info");
|
||
$('#dlgResetMobile').dialog("close");
|
||
}
|
||
else if (type == 2) {
|
||
//alert("修改成功!");
|
||
$.messager.alert("提示", "修改成功!", "info");
|
||
$('#dlgResetMobile').dialog("close");
|
||
}
|
||
else {
|
||
//alert("参数错误!");
|
||
$.messager.alert("警告", "参数错误", "error");
|
||
}
|
||
//alert("认证成功!");
|
||
// window.frameReturnByMes(data.message);
|
||
}
|
||
else {
|
||
if (data.code = -5) {
|
||
//alert("手机号不正确!");
|
||
$.messager.alert("警告", "手机号不正确", "error");
|
||
}
|
||
else if (data.code == -6) {
|
||
//alert("手机号绑定其他账户!");
|
||
$.messager.alert("警告", "手机号绑定其他账户", "error");
|
||
}
|
||
else {
|
||
//alert("操作失败,请重试!");
|
||
$.messager.alert("警告", data.message, "error");
|
||
}
|
||
// window.frameReturnByMes(data.message);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
</script>
|