@using DTO;
|
@{
|
ViewBag.Title = "CooperatecustomCustomer";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
|
List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
|
}
|
@section headerStyle{
|
<script type="text/javascript">
|
|
var khlxs = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khlx))';
|
var khlys = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khly))';
|
var hyfls = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.hyfl))';
|
var users = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.users))';
|
var shengDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShengDropDown))';
|
var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
|
|
loseherght = 60;
|
//gridConfig = { multiselect: true, selectcol: "Id" };
|
dataCol = [
|
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
|
{ label: '建档时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 },
|
{
|
label: '客户单位', name: 'Name', labtype: 'txt', hidden: false, width: 400,
|
|
},
|
{ label: '联系电话', name: 'Tel', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '所属区域', name: 'ShengName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '业务经理', name: 'YwjlName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '预付款余额', name: 'YufukuanName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '授信额度', name: 'ShouxineduName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '已使用授信额度', name: 'ShenyushouxinName', labtype: 'txt', hidden: false, width: 100 },
|
//{ label: '订单数量', name: 'Ordercount', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '订单产值', name: 'Moneycount', labtype: 'txt', hidden: false, width: 100 },
|
{
|
label: '存款', name: 'Name111', labtype: 'txt', hidden: false, width: 100,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a class=\"Cunkuan\" style=\"display: none; \" onclick=\"OpenWindow('存款','100%','100%', '/FiOrderrecievemoney/EditCustomer?id=&CustomerId=" + rowObject.Id + "')\" >存款</a>";
|
}
|
},
|
{
|
label: '存款明细', name: 'Name111111', labtype: 'txt', hidden: false, width: 100,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a class=\"Cunkuan\" style=\"display: none; \" onclick=\"OpenWindow('" + rowObject.Name+"存款明细','100%','100%', '/FiOrderrecievemoney/IndexCustomerdtl?id=&CustomerId=" + rowObject.Id + "')\" >存款明细</a>";
|
}
|
},
|
|
];
|
dataUrl = "/CooperatecustomCustomer/GetList";
|
searchCol = [
|
|
{ label: '客户来源', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys), cwidth: '5%', cccwidth: '8%' },
|
{ label: '行业分类', name: 'Hyfl', labtype: 'combox', hidden: false, data: JSON.parse(hyfls), cwidth: '5%', cccwidth: '15%' },
|
{ label: '客户类型', name: 'Khlx', labtype: 'combox', hidden: false, data: JSON.parse(khlxs), cwidth: '5%', cccwidth: '8%' },
|
{ label: '业务经理', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(users), cwidth: '5%', cccwidth: '8%' },
|
|
{ label: '省', name: 'Sheng', labtype: 'combox', hidden: false, data: JSON.parse(shengDropDown), cwidth: '5%', cccwidth: '8%' },
|
{ label: '市', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '8%' },
|
{ label: '区县', name: 'AreaId', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2%', cccwidth: '8%' },
|
{ label: '客户单位', name: 'Name', labtype: 'txt', hidden: false },
|
{ label: '建档时间', name: 'Createtime', labtype: 'datearea', hidden: false },
|
{ label: '是否加微信', name: 'Shifouweixin', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
|
|
];
|
|
var ActionInfo22 = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ActionInfo2))';
|
|
var _afterLoadDataload = function (xhr) {
|
//console.info(xhr);
|
//var rows = jQuery("#jqGrid").jqGrid("getRowData"), total_Xuefei = 0, total_Baomingrenshu = 0;
|
//for (var i = 0, l = rows.length; i < l; i++) {
|
// total_Xuefei += (rows[i].Xuefei - 0);
|
// total_Baomingrenshu += (rows[i].Baomingrenshu - 0);
|
//}
|
|
jQuery("#jqGrid").jqGrid("footerData", "set", { YwjlName: "<font color='darkgoldenrod'>--当页合计--</font> </br> <font color='darkgoldenrod'>--合计--</font>", YufukuanName: "<font color='darkgoldenrod'>" + xhr.DangyeHeji1 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji1 + "</font>", ShouxineduName: "<font color='darkgoldenrod'>" + xhr.DangyeHeji2 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji2 + "</font>", ShenyushouxinName: "<font color='darkgoldenrod'>" + xhr.DangyeHeji3 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji3 + "</font>", Moneycount: "<font color='darkgoldenrod'>" + xhr.DangyeHeji4 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji4 + "</font>"});
|
|
|
var data = JSON.parse(ActionInfo22);
|
for (var o in data) {
|
//alert(o);
|
//alert(data[o]);
|
/* alert("PageShortcut:" + data[o].PageShortcut + " PageName:" + data[o].PageName);*/
|
$("." + data[o].PageShortcut).show();
|
|
}
|
};
|
|
|
|
|
|
|
var _afterSave = function (result) {
|
if (result) {
|
toastr.success("保存成功");
|
} else {
|
toastr.error("保存失败");
|
}
|
}
|
|
var _afterDel = function (result) {
|
if (result) {
|
toastr.success("删除成功");
|
} else {
|
/**/
|
toastr.error("删除成功");
|
/**/
|
}
|
}
|
</script>
|
}
|
|
@section footerScripts{
|
<script type="text/javascript">
|
|
function send() {
|
|
var msg = $("#PBSSheng");
|
|
|
if (msg.length > 0) {
|
$("#PBSSheng").change(function () {
|
var sheng = $("#PBSSheng").val();
|
$.ajax({
|
type: "GET",
|
url: "/Project/getCity?shengid=" + sheng,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var city = $("#PBSCity");
|
city.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true"> </option>';
|
city.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
|
city.append(o);
|
}
|
}
|
$("#PBSCity").trigger('chosen:updated');//更新选项
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
} else {
|
setTimeout(send, 1000);
|
}
|
}
|
|
|
send();
|
|
|
|
function sendCity() {
|
|
var msg = $("#PBSCity");
|
|
|
if (msg.length > 0) {
|
$("#PBSCity").change(function () {
|
|
var city = $("#PBSCity").val();
|
$.ajax({
|
type: "GET",
|
url: "/Project/getAreaId?cityid=" + city,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var quxian = $("#PBSAreaId");
|
quxian.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true"> </option>';
|
quxian.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
|
quxian.append(o);
|
}
|
}
|
$("#PBSAreaId").trigger('chosen:updated');//更新选项
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
} else {
|
setTimeout(sendCity, 1000);
|
}
|
}
|
|
|
sendCity();
|
|
|
|
|
</script>
|
}
|