You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWebMobile/Scripts/clientList.js

507 lines
106 KiB
JavaScript

3 years ago
var u = "";
var w = "";
var pageCount = 20; //每页计数
var UrlParam = "";
var cacheKey = "";
var gid = "";
var companyid = "";
var pageTotalCount = 0;
var url = "";
var rdoAuditing = "";
var pageNum = 0;
var data = [];
var strProfitField = "";
var chkID = 0;
var chkBSChecked = false;
var chkAccChecked = false;
var chkETDChecked = false;
var isEnteringDate = false;
var strSearchDate = "";
var symbol = "null";
var strBFDate = "";
var strBTDate = "";
var strAFDate = "";
var strATDate = "";
var strParam = "";
var defaultBFDate = "";
var defaultBTDate = "";
$(function () {
$.ajaxSetup({ async: false });
var winWidth = document.documentElement.clientWidth;
var winHeight = document.documentElement.clientHeight;
$("#txtBSFromDate").datepicker();
$("#txtBSToDate").datepicker();
$("#txtETDFromDate").datepicker();
$("#txtETDToDate").datepicker();
$("#txtACCFromDate").datepicker();
$("#txtACCToDate").datepicker();
$('.jqtransform').jqTransform();
u = UrlParm.parm("u");
w = UrlParm.parm("w");
//document.body.scroll = "no";
/*if ((winWidth <= 320)) { // && (winHeight == 985)
$("#css").attr("href", "lib/css/list960.css");
}
else if ((winWidth >= 360)) { // && (winHeight == 673)
$("#css").attr("href", "lib/css/list1080.css");
}*/
//得到默认月份起始日期
$.ajax({
type: "post",
dataType: "json",
url: "../../Handler/DayOfMonth.ashx?action=0",
cache: false,
success: function (msg) {
$.each(msg, function (i, item) {
defaultBFDate = item.date;
});
}
});
//得到默认月份结束日期
$.ajax({
type: "post",
dataType: "json",
url: "../../Handler/DayOfMonth.ashx?action=1",
cache: false,
success: function (msg) {
$.each(msg, function (i, item) {
defaultBTDate = item.date;
});
}
});
//marginBottom表示滚动条离底部的距离0表示滚动到最底部才加载可以根据需要修改
new NeuF.ScrollPage(window, { delay: 1000, marginBottom: 0 }, function (offset) {
if (offset > 0) {
//$("#Loadding").show(); //加载提示
setTimeout(function () {
//这里就是异步获取内容的地方,这里简化成一句话,可以根据需要修改
//$("#divContainer").append($("<div class='content'>第“" + ($(".content").size() + 1) + "”页内容</div>"));
pageNum++;
var searchKey = "";
if (strSearchDate != "") { // symbol != "null" && symbol != ","
searchKey = $("#txtSearch").val() + symbol + strSearchDate;
}
else {
searchKey = $("#txtSearch").val();
}
UrlParam = "&id=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), gid) + "&p=" + escape(jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), companyid)) + "&s=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), searchKey) + "&i=" + pageNum + "&c=" + pageCount; //" + PageIndex + "
url = "../../Handler/ClientAnalysis.ashx?action=0" + strParam + "&k=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), cacheKey) + "&u=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), decrypt(u, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + "&w=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), decrypt(w, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + UrlParam;
fnList(pageTotalCount, url);
}, 1000);
}
});
$("input[name='profitColumn']").change(function () {
strProfitField = "";
for (var iNum = 0; iNum < 13; iNum++) {
chkID = iNum + 1;
if ($("#chk" + chkID).attr("checked")) {
if (strProfitField.indexOf($("#chk" + chkID).val()) == -1) {
strProfitField += $("#chk" + chkID).val() + ",";
}
}
}
strProfitField = strProfitField.substring(0, strProfitField.length - 1);
});
$("#txtSearch").focus(function () {
$("#txtSearch").val("");
});
$("#txtSearch").blur(function () {
var txtSearchText = $("#txtSearch").val();
var strSearchText = new Array(); //定义一维数组
var result = "";
if ($("#txtSearch").val() == "请输入客户名称、操作员、揽货人等信息") {
$("#txtSearch").css("color", "#acacac");
}
else {
$("#txtSearch").css("color", "#7d7d7d");
}
if (txtSearchText.indexOf(",") != -1) {
strSearchText = txtSearchText.split(",");
symbol = ",";
}
else if (txtSearchText.indexOf(";") != -1) {
strSearchText = txtSearchText.split(";");
symbol = ";";
}
else if (txtSearchText.indexOf("\\") != -1) {
strSearchText = txtSearchText.split("\\");
symbol = "\\";
}
else if (txtSearchText.indexOf("/") != -1) {
strSearchText = txtSearchText.split("/");
symbol = "/";
}
result = "";
if (strSearchText.length > 0) {
for (var iCount = 0; iCount < strSearchText.length; iCount++) {
if (!isDate(strSearchText[iCount])) {
result += strSearchText[iCount] + symbol;
}
}
}
result = result.substring(0, result.length - 1);
if (result != "") {
$("#txtSearch").val(result);
}
});
fnClientAnalysisList();
var itemContainHeight = winHeight - 5.625 * 16;
$("#listItemContain").height(itemContainHeight);
});
function isDate(dateString) {
if (dateString.trim() == "") return true;
var r = dateString.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
if (r == null) {
//alert("请输入格式正确的日期\n\r日期格式yyyy-mm-dd\n\r例 如2008-08-08\n\r");
return false;
}
else {
return true;
}
}
function fnComfirm() {
if ($("#txtBSFromDate").val() != "") { strBFDate = $("#txtBSFromDate").val(); }
if ($("#txtBSToDate").val() != "") { strBTDate = $("#txtBSToDate").val(); }
if ($("#txtACCFromDate").val() != "") { strAFDate = $("#txtACCFromDate").val(); }
if ($("#txtACCToDate").val() != "") { strATDate = $("#txtACCToDate").val(); }
$("#inquireParameter").css("display", "none");
}
function fnClose() {
fnComfirm();
}
function fnParam() {
var _leftDatumPoint = 0;
var _topDatumPoint = 0;
var _scrollWidth = 0;
var _scrollHeight = 0;
_scrollWidth = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth);
_scrollHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
_leftDatumPoint = document.body.scrollLeft + document.body.clientWidth / 2 - 130;
_topDatumPoint = 96; //document.body.scrollTop + document.body.clientHeight / 2 - 160;
$(".dateMask").width(_scrollWidth);
$(".dateMask").height(_scrollHeight);
$(".dateContain").css("left", _leftDatumPoint / 16 + "em");
$(".dateContain").css("top", _topDatumPoint / 16 + "em");
$("#inquireParameter").css("display", "block");
}
function fnClientAnalysisList() {
$.ajaxSetup({ async: false });
var searchKey = "";
searchKey = fnSearchParam();
var pageTotalCount = 0;
strParam = "";
if (strBFDate != "") {
strParam = "&bfd=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strBFDate);
strParam += "&sm=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strBFDate);
}
else {
strParam = "&bfd=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), defaultBFDate);
strParam += "&sm=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), defaultBFDate);
}
if (strBTDate != "") {
strParam += "&btd=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strBTDate);
strParam += "&em=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strBTDate);
}
else {
strParam += "&btd=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), defaultBTDate);
strParam += "&em=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), defaultBTDate);
}
if (strAFDate != "") { strParam += "&afd=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strAFDate); }
else { strParam += "&afd="; }
if (strATDate != "") { strParam += "&atd=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strATDate); }
else { strParam += "&atd="; }
UrlParam = strParam + "&s=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), searchKey) + "&t=1&l=50"; // + pageCount; //" + PageIndex + "
if (searchKey != "") {
url = "../../Handler/Client.ashx?action=2" + UrlParam;
}
else {
url = "../../Handler/Client.ashx?action=0" + UrlParam;
}
fnList(pageTotalCount, url);
}
function fnSearchParam() {
var strSearch = "";
var searchValue = $("#txtSearch").val();
if (searchValue != "请输入客户名称、操作员、揽货人等信息") {
if (searchValue.indexOf(",") != -1) {
var arrsearchValue = searchValue.split(',');
for (var i = 0; i < arrsearchValue.length; i++) {
if (i == 0) {
strSearch += "(F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i < arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i == arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%') ";
}
}
}
else if (searchValue.indexOf(";") != -1) {
var arrsearchValue = searchValue.split(';');
for (var i = 0; i < arrsearchValue.length; i++) {
if (i == 0) {
strSearch += "(F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i < arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i == arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%') ";
}
}
}
else if (searchValue.indexOf("\\") != -1) {
var arrsearchValue = searchValue.split('\\');
for (var i = 0; i < arrsearchValue.length; i++) {
if (i == 0) {
strSearch += "(F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i < arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i == arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%') ";
}
}
}
else if (searchValue.indexOf("/") != -1) {
var arrsearchValue = searchValue.split('/');
for (var i = 0; i < arrsearchValue.length; i++) {
if (i == 0) {
strSearch += "(F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i < arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%' ";
}
else if (i == arrsearchValue.Length - 1) {
strSearch += "or F.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or B.SALE like '%" + arrsearchValue[i].toString() + "%' or B.CORPID like '%" + arrsearchValue[i].toString() + "%' or B.OP like '%" + arrsearchValue[i].toString() + "%' or B.BSTYPE like '%" + arrsearchValue[i].toString() + "%' or B.OPLBNAME like '%" + arrsearchValue[i].toString() + "%') ";
}
}
}
else if (searchValue != "") {
strSearch = "(F.CUSTOMERNAME like '%" + searchValue + "%' or B.SALE like '%" + searchValue + "%' or B.CORPID like '%" + searchValue + "%' or B.OP like '%" + searchValue + "%' or B.BSTYPE like '%" + searchValue + "%' or B.OPLBNAME like '%" + searchValue + "%') ";
}
}
return strSearch;
}
function fnList(pageTotalCount, url) {
$.ajaxSetup({ async: false });
var strInfo = "";
var totalCount = 0;
var profit = "";
$.ajax({
type: "post",
dataType: "json",
data: UrlParam,
url: url,
cache: false,
success: function (msg) {
data.length = 0;
$.each(msg, function (i, item) {
if (item.CUSTNAME != undefined && item.CUSTNAME != null) {
if (item.ZLTTL != undefined) { profit = item.ZLTTL; }
else if (item.ZLRMB != undefined) { profit = item.ZLRMB; }
else if (item.ZLUSD != undefined) { profit = item.ZLUSD; }
data[i] = [item.CUSTNAME, profit, item.OPDATE];
}
});
var title = '客户分析-委托单位';
var bar1 = new bar();
bar1.id = 'listItemContain';
bar1.title = title;
bar1.data = data;
bar1.show(title);
}
});
}
function fnIndex() {
window.location.href = "/Home/Index?u=" + escape(u) + "&w=" + escape(w); //encrypt(_mobile, _encrypt)
}
function fnReturn() {
window.location.href = "/Home/Index?u=" + escape(u) + "&w=" + escape(w); //encrypt(_mobile, _encrypt)
}
var bar = function (id, title, data) {
var opdate = "";
//展示的id
this.id = '';
//标题
this.title = '';
//数据
this.data = '';
//宽
//this.width = layWidth; //500,350
this.width = document.documentElement.clientWidth - 15;
//背景图片位置
this.bgimg = '../../Images/plan.gif';
//动画速度
this.speed = 1000;
//投票总数
var num_all = 0;
this.show = function (thisTitle) {
//添加一个table对象
$("#" + this.id).html("");
$("#" + this.id).append("<table align='left' width='" + this.width + "' cellpadding=0 cellspacing=6 border=0 style='font-size:12px;' ></table>")
//$("#"+this.id+" table").append("<tr><td colspan=3 align='center' ><span style='font:900 14px ;color:#444'>"+this.title+"</span></td></tr>")
//计算总数
$(this.data).each(function (i, n) {
if (n[1] != undefined) {
num_all += parseInt(n[1]);
}
})
var that = this;
//起始
var s_img = [0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156, -208, 0, -52, -104, -156
//中间点起始坐标
var c_img = [-312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395, -420, -312, -339, -367, -395,
//结束
var e_img = [-26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130, -182, -234, -26, -78, -130
var that = this;
var div;
$(this.data).each(function (i, n) {
if (n[1] != undefined) {
//计算比例
var bili = (n[1] * 100 / num_all).toFixed(2);
//计算图片长度, *0.96是为了给前后图片留空间
var img = parseFloat(bili) * 0.96;
if (img > 0) {
if ((i % 6 == 0 || i % 6 == 1 || i % 6 == 2 || i % 6 == 3) && bili > 35) {
div = "<div style='position:relative;'><div style='position:absolute;left:33%;top:0.1em;z-index:1000;color:#fff;'>" + parseInt(n[1]) + ".00</div>";
div += "<div style='margin:0;padding:0;width:3px;height:16px;background:url(" + that.bgimg + ") 0px " + s_img[i] + "px ;float:left;'></div>";
div += "<div fag='" + img + "' style='margin:0;margin:0;width:0%;height:16px;background:url(" + that.bgimg + ") 0 " + c_img[i] + "px repeat-x ;float:left;'></div>";
div += "<div style='width:3px;height:16px;background:url(" + that.bgimg + ") 0px " + e_img[i] + "px ;float:left;'></div></div>";
}
else {
div = "<div style='position:relative;'><div style='position:absolute;left:33%;top:0.1em;z-index:1000;color:#000;'>" + parseInt(n[1]) + ".00</div>";
div += "<div style='margin:0;padding:0;width:3px;height:16px;background:url(" + that.bgimg + ") 0px " + s_img[i] + "px ;float:left;'></div>";
div += "<div fag='" + img + "' style='margin:0;margin:0;width:0%;height:16px;background:url(" + that.bgimg + ") 0 " + c_img[i] + "px repeat-x ;float:left;'></div>";
div += "<div style='width:3px;height:16px;background:url(" + that.bgimg + ") 0px " + e_img[i] + "px ;float:left;'></div></div>";
}
}
else {
div = '';
}
//alert(n[1]);
if (n[1] != 0.0000000) {
if (opdate != n[2]) {
opdate = n[2];
$("#" + that.id + " table").append("<tr><td colspan='3' align='center' style='font-size:0.875em;color:#009bdb;'>" + opdate + "</td></tr>");
$("#" + that.id + " table").append("<tr><td width='30%' align='right' ><a href='javascript:fnClientDetail(\"" + n[0] + "\");' class='blackContentTab'>" + n[0] + "</a></td><td width='60%' bgcolor='#fffae2' >" + div + "</td><td width='10%' nowrap ></td></tr>");
}
else {
$("#" + that.id + " table").append("<tr><td width='30%' align='right' ><a href='javascript:fnClientDetail(\"" + n[0] + "\");' class='blackContentTab'>" + n[0] + "</a></td><td width='60%' bgcolor='#fffae2' >" + div + "</td><td width='10%' nowrap ></td></tr>");
}
}
}
})
this.play();
}
this.play = function () {
var that = this;
$("#" + this.id + " div").each(function (i, n) {
if ($(n).attr('fag')) {
$(n).animate({ width: $(n).attr('fag') + '%' }, that.speed)
}
})
}
}
function fnClientDetail(client) {
var pageTotalCount = 0;
if (strSearchDate != "") { // symbol != "null" && symbol != ","
searchKey = $("#txtSearch").val() + symbol + strSearchDate;
}
else {
searchKey = $("#txtSearch").val();
}
UrlParam = "&id=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), gid) + "&p=" + escape(jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), companyid)) + "&s=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), searchKey) + "&cl=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), client); //" + PageIndex + "
url = "../../Handler/HsTable.ashx?action=1&k=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), cacheKey) + "&u=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), decrypt(u, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + "&w=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), decrypt(w, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + UrlParam;
$.ajax({
type: "post",
dataType: "json",
data: UrlParam,
url: url,
cache: false,
success: function (msg) {
}
});
if (strBFDate != "") {
strBFDate = encrypt(strBFDate, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"));
}
if (strBTDate != "") {
strBTDate = encrypt(strBTDate, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"));
}
if (strAFDate != "") {
strAFDate = encrypt(strAFDate, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"));
}
if (strATDate != "") {
strATDate = encrypt(strATDate, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"));
}
window.location.href = "ClientAnalysisInfo.aspx?u=" + escape(u) + "&w=" + escape(w) + "&bf=" + escape(strBFDate) + "&bt=" + escape(strBTDate) + "&af=" + escape(strAFDate) + "&at=" + escape(strATDate);
}