TG.WXCRM.V4/WEB/Views/Res/Customer/BestIndex.cshtml

183 lines
7.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using WX.CRM.WebHelper
@{
ViewBag.Title = "bas_salesDepartment";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<div class="mvctool">
<div class="mvctool_mytitle">
优质客户列表
</div>
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@if (Request.QueryString["type"] == null)
{
@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>客户ID<input type="text" name="txt_resID" style="width:150px" />&nbsp;</li>
<li>成交金额:<input type="text" name="txt_minPrice" /> -<input type="text" name="txt_maxPrice" /> </li>
<li class="layui-inline">
@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_优质客户列表 })
</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
function GetGroups() {
var node = $("#innerGroupId").combotree("tree").tree('getSelected');
var tree = $("#innerGroupId").tree;
var isLeaf = tree('isLeaf', node.target);
var gorupidvalues = "";
if (node.id.toString().indexOf("com_") == -1 && node.id.toString().indexOf("sale_") == -1)
gorupidvalues = node.id.toString() + ",";
if (!isLeaf) {//不是最底层
var child = $("#innerGroupId").combotree("tree").tree("getChildren", node.target);
if (node.id != 0 && child != null) {
for (var i = 0; i < child.length; i++) {
if (child[i].id.toString().indexOf("com_") == -1 && child[i].id.toString().indexOf("sale_") == -1)
gorupidvalues += child[i].id + ","
}
}
}
if (gorupidvalues.length > 0)
return gorupidvalues.substr(0, gorupidvalues.length - 1);
else
return "-1";
}
function onLoadSucced() {
$('#tablist').tablegrid("Search");
}
$(function () {
$("[field='map_POSITIVETIME']").remove();
$('#tablist').tablegrid({
url: '/Res/Customer/BestIndex',
height: $(window).height() - 110,
loadNow: false,
isPage: true,
isCheckMore: true,
onLoadSuccess: function (data) {
$("[field='map_POSITIVETIME']").remove();
}
});
$("#btnQuery").click(function () {//搜索按钮点击事件
$('#tablist').tablegrid("Search");
});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
$(".layui-btn-reset").on("click", "child", function () {
debugger
})
//$('#tablist').fixedHeaderTable({
// autoShow: true
//});
$("#Other5").hide();
$("#Other6").hide();
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
function frameReturnByMes(mes) {
$.messageBox5s('提示', mes);
}
function getPageOptions(gridID) {
var option = $("#tablist").tablepage('getPagination');
var str = "rows=" + option.rows + "&page=" + option.page + "&order=" + option.order + "&sort=" + option.sort;
return str;
}
//获取datagrid头部及字段
function getDataGridHeader() {
var columns = $('#tablist').tablegrid("getHead");
return columns;
}
</script>
@*ToolBar事件处理*@
<script type="text/javascript">
function GetIframeHtml(src) {
return "<iframe id='ifymbc' width='100%' height='98%' scrolling='yes' frameborder='0'' src='" + src + "'></iframe>";
}
function QiWeiLook(resid, extuserids, url, lineCompany, isHg, eid,appid,) {
var firstUrl = "";
var urlX = "";
var newURL = "";
var urlSplit = url.split('$');
$(urlSplit).each(function (a, url) {
if (url.indexOf("|") > -1) {//分内外网
var ssw = window.location.href;
if (ssw.indexOf("192.168.") > -1 || ssw.indexOf("localhost") > -1) {//内网无疑
newURL = url.split('|')[0];
} else {
newURL = url.split('|')[1];
}
} else {
newURL = url;
}
if (a == 0) {
firstUrl = newURL;
urlX += "<a class='MyXianLu Chosea' id='woxs_" + a + "' href='javascript:ShowMsgg(" + a + ",\"" + newURL + "\");'>查看线路" + (a + 1) + "</a>";
} else {
urlX += "<a class='MyXianLu ' id='woxs_" + a + "' href='javascript:ShowMsgg(" + a + ",\"" + newURL + "\");'>查看线路" + (a + 1) + "</a>";
}
});
var src = firstUrl + "/Admin/OutHHuser/User_extuserList2?exuserid=" + extuserids + "&isHg=" + isHg + "&companycode=" + lineCompany + "&eid=" + eid + "&appid=" + appid+"&ext_flag=@Html.Raw(System.Web.HttpUtility.UrlEncode(WX.CRM.Common.Utility.Encrypt(WX.CRM.Common.DateTimeTool.ConvertDateTimeLong(DateTime.Now).ToString())))";
var width = $(window).width() * 0.7;
$("#modalwindow").html(GetIframeHtml(src + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '付费企业微信', width: width, height: 650, iconCls: 'icon-edit' }).window('open');
}
function Create_Click() {
$("#modalwindow").html(GetIframeHtml("/Res/Customer/BestEdit"));
var height = $(window).height()*0.5;
$("#modalwindow").window({ title: '新增', width: 700, height: height, iconCls: 'icon-add' }).window('open');
//ShoLayoutWindow();
}
function Edit_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
var height = $(window).height() * 0.5;
$("#modalwindow").html(GetIframeHtml("/Res/Customer/BestEdit?id=" + row.RESID));
$("#modalwindow").window({ title: '编辑', width: 700, height: height, iconCls: 'icon-edit' }).window('open');
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function Delete_Click() {
var row = $('#tablist').tablegrid('getSelections');
if (row != null && row != '') {
var orderArr = [];
$(row).each(function (i, n) {
var orderid = $(n.RESID).text();
orderArr.push(orderid);
});
var orderids = orderArr.join(",");
$.messager.confirm('提示', '@Suggestion.YouWantToDeleteTheSelectedRecords', function (r) {
if (r) {
$.r_post("/Res/Customer/BestDelete?id=" + orderids, function (data) {
if (data.type == 1) {
$("#tablist").tablegrid('Load');
}
$.messageBox5s('提示', data.message);
}, "json");
}
});
} else {
$.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords');
}
}
</script>