575 lines
26 KiB
JavaScript
575 lines
26 KiB
JavaScript
|
||
$(function () {
|
||
var PostData = {};
|
||
$(".datepicker").datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true });
|
||
jqGridInit();
|
||
g_grid = jQuery('#listGrid');
|
||
g_grid.setGridParam({
|
||
resizeStop: function (newWidth, index) {
|
||
$(".ui-jqgrid-hdiv table:first th").eq(index).css("width", newWidth + "px");
|
||
$(".frozen-div table:first th").eq(index).css("width", newWidth + "px");
|
||
$(".frozen-bdiv table:first td").eq(index).css("width", newWidth + "px");
|
||
}
|
||
});
|
||
function keyEnter(event) {
|
||
try {
|
||
var e = event ? event : (window.event ? window.event : null);
|
||
(e.keyCode === 13) && SearchClick(true);
|
||
} catch (e) {
|
||
//
|
||
}
|
||
}
|
||
document.onkeydown = keyEnter;
|
||
$(window).resize(function () {
|
||
//如有频繁改变大小的需求,要增加延迟运行的逻辑;
|
||
$("#listGrid").jqGrid('destroyFrozenColumns');
|
||
$("#listGrid").jqGrid('setFrozenColumns');
|
||
$(".frozen-div").css("overflow", "hidden")
|
||
var height = $("#listGrid .jqgrow").height() + 2;
|
||
$("#listGrid_frozen .jqgrow").height(height);
|
||
$("#listGrid").setGridWidth($("#main-wrapper").width() - 30);
|
||
});
|
||
$(window).resize();
|
||
});
|
||
|
||
var i = 0;
|
||
var colModelGrid = [
|
||
{
|
||
name: 'id', label: 'id', index: 'id', sortIndex: i++, align: 'center', hidden: true, optionHide: true, frozen: true
|
||
}, {
|
||
name: 'EncryptId', label: 'EncryptId', index: 'EncryptId', sortIndex: i++, align: 'center', hidden: true, optionHide: true, frozen: true
|
||
}, {
|
||
name: 'Number', label: '客户编号', index: 'Number', sortIndex: i++, width: 160, align: 'left', optionHide: true, frozen: true
|
||
}, {
|
||
name: 'ClientName', label: '客户名称', index: 'ClientName', sortIndex: i++, width: 250, formatter: clientNameFormat, optionHide: true, sortable: false, frozen: true
|
||
}, {
|
||
name: 'Name', label: 'ClientName', index: 'Name', sortIndex: i++, width: 250, align: 'left', hidden: true, optionHide: true
|
||
}, {
|
||
name: 'Abbreviation', label: '客户简称', index: 'Abbreviation', sortIndex: i++, width: 250, sortable: false, frozen: true
|
||
}, {
|
||
name: 'ContactName', label: '联系人姓名', index: 'ContactName', sortIndex: i++, align: 'center', classes: 'ContactName', sortable: false
|
||
}, {
|
||
name: 'IdentificationType', label: '联系人证件类型', index: 'IdentificationType', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'IdentificationNumber', label: '联系人证件号码', index: 'IdentificationNumber', sortIndex: i++, width: 130, align: 'left'
|
||
}, {
|
||
name: 'Phone', label: '联系人电话', index: 'Phone', sortIndex: i++, width: 110, align: 'left', formatter: PhoneFormater
|
||
}, {
|
||
name: 'Email', label: '联系人邮箱', index: 'Email', sortIndex: i++, width: 110, align: 'left'
|
||
}, {
|
||
name: 'PendingMarginCallPayment', label: '是否需要追保', index: 'PendingMarginCallPayment', sortIndex: i++, width: 90, align: 'left', formatter: boolFormater
|
||
}, {
|
||
name: 'SalesDepartment', label: '归属营业部', index: 'SalesDepartment', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'PostalAddress', label: '办公地址', index: 'PostalAddress', sortIndex: i++, width: 130, align: 'left'
|
||
}, {
|
||
name: 'LicenseType', label: '证照类型', index: 'LicenseType', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'LicenseCode', label: '证照编号', index: 'LicenseCode', sortIndex: i++, width: 130, align: 'left'
|
||
}, {
|
||
name: 'ProcessStatus', label: '开户状态', index: 'ProcessStatus', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'EvaluateDate', label: '评估日期', index: 'EvaluateDate', sortIndex: i++, width: 90, align: 'left', formatter: 'date'
|
||
}, {
|
||
name: 'EvaluateOfValidity', label: '评估有效期', index: 'EvaluateOfValidity', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'ClientType', label: '客户类别', index: 'ClientType', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'ProductNumber', label: '产品编号', index: 'ProductNumber', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'BusinessType', label: '行业', index: 'BusinessType', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'InstitutionalAttributes', label: '机构属性', index: 'InstitutionalAttributes', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'CustomerNature1', label: '客户性质1', index: 'CustomerNature1', sortIndex: i++, width: 130, align: 'left', sortable: false
|
||
}, {
|
||
name: 'CustomerNature2', label: '客户性质2', index: 'CustomerNature2', sortIndex: i++, width: 130, align: 'left', sortable: false
|
||
}, {
|
||
name: 'RegisteredCapital', label: '注册资本(万元)', index: 'RegisteredCapital', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'ActualBeneficiary', label: '实际受益人', index: 'ActualBeneficiary', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'ActualController', label: '实际控制人', index: 'ActualController', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'RegisteredAddress', label: '注册地址', index: 'RegisteredAddress', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'Region', label: '地域', index: 'Region', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'FinancialSituation', label: '财务状况', index: 'FinancialSituation', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'InvestmentExperience', label: '投资经验', index: 'InvestmentExperience', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'IsIndustryConnectVariety', label: '行业标的相关', index: 'IsIndustryConnectVariety', sortIndex: i++, width: 110, align: 'left', formatter: boolFormater
|
||
}, {
|
||
name: 'TransactionTarget', label: '交易目的', index: 'TransactionTarget', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'InvestmentTermName', label: '投资期限', index: 'InvestmentTermName', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'IsRealControl', label: '实际控制关系', index: 'IsRealControl', sortIndex: i++, width: 130, align: 'left', formatter: boolFormater
|
||
}, {
|
||
name: 'FundsSourceName', label: '资金来源', index: 'FundsSourceName', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'AcceptableLoss', label: '可接受损失', index: 'AcceptableLoss', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'RiskPreference', label: extendFieldName, index: 'RiskPreference', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'ExpectedReturn2', label: '期望收益', index: 'ExpectedReturn2', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'BadFaithRecordName', label: '不良诚信记录', index: 'BadFaithRecordName', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'IsEvaluate', label: '是否评估', index: 'IsEvaluate', sortIndex: i++, width: 90, align: 'left', formatter: boolFormater
|
||
}, {
|
||
name: 'QuestionnaireScore', label: '问卷得分', index: 'QuestionnaireScore', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'AppropriatenessDegreeName', label: '适当性评级', index: 'AppropriatenessDegreeName', sortIndex: i++, width: 90, align: 'left', sortable: false, formatter: appropriatenessDegreeNameFormater
|
||
}, {
|
||
name: 'RiskServiceDegreeName', label: '可接受风险服务', index: 'RiskServiceDegreeName', sortIndex: i++, width: 130, align: 'left', sortable: false
|
||
}, {
|
||
name: 'AppropriatenessAssessorName', label: '适当性评估人', index: 'AppropriatenessAssessorName', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'IsRequireConversionTypes', label: '转化类型', index: 'IsRequireConversionTypes', sortIndex: i++, width: 130, align: 'left', formatter: boolFormater
|
||
}, {
|
||
name: 'IsAssessmentResultChange', label: '评估结果变动', index: 'IsAssessmentResultChange', sortIndex: i++, width: 130, align: 'left', formatter: boolFormater
|
||
}, {
|
||
name: 'Remark', label: '备注', index: 'Remark', sortIndex: i++, width: 90, align: 'left', formatter: function (cellValue, options, rowObject) {
|
||
if (cellValue && cellValue.startsWith("http://")) {
|
||
return "<a href='{0}' style='text-decoration:underline;' target='_blank'>{0}</a>".template(cellValue);
|
||
}
|
||
return cellValue;
|
||
}
|
||
}, {
|
||
name: 'ChangeReasonAndEvaluationResults', label: '变动原因及历史', index: 'ChangeReasonAndEvaluationResults', sortIndex: i++, width: 130, align: 'left'
|
||
}, {
|
||
name: 'DisbeliefRecord', label: '失信行为记录', index: 'DisbeliefRecord', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'ProtocolSignDate', label: '商品类签署日期', index: 'ProtocolSignDate', sortIndex: i++, width: 150, formatter: 'date', align: 'left'
|
||
}, {
|
||
name: 'RightProtocolSignDate', label: '权益类签署日期', index: 'RightProtocolSignDate', sortIndex: i++, width: 150, formatter: 'date', align: 'left'
|
||
}, {
|
||
name: 'ProtocolSignVersion', label: '协议签署版本', index: 'ProtocolSignVersion', sortIndex: i++, width: 150, align: 'left'
|
||
}, {
|
||
name: 'BankCreditRating', label: '信用评级', index: 'BankCreditRating', sortIndex: i++, width: 60, align: 'center'
|
||
}, {
|
||
name: 'Level', label: '客户等级', index: 'Level', sortIndex: i++, width: 60, align: 'left'
|
||
}, {
|
||
name: 'ProperClientClass', label: '适当性类型', index: 'ProperClientClass', sortIndex: i++, width: 130, align: 'left'
|
||
}, {
|
||
name: 'CreditRatingName', label: '资信评级', index: 'CreditRatingName', sortIndex: i++, width: 70, align: 'left', sortable: false
|
||
}, {
|
||
name: 'CreditLine', label: '授信总额', index: 'CreditLine', sortIndex: i++, width: 70, align: 'left', sortable: false
|
||
}, {
|
||
name: 'CustomerManager', label: '客户经理', index: 'CustomerManager', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'Seller', label: '营业部销售', index: 'Seller', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'SamePeerDesc', label: '同业/非同业', index: 'SamePeerDesc', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'OptName', label: '操作人', index: 'OptName', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'OptDate', label: '操作时间', index: 'OptDate', sortIndex: i++, width: 90, align: 'left', formatter: 'date'
|
||
}, {
|
||
name: '', label: '操作', index: '', sortIndex: i++, width: 240, align: 'left', formatter: showToolName, resizable: false, sortable: false
|
||
}, {
|
||
name: 'AdminFullName', label: '管理员全称', index: 'AdminFullName', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'NFICode', label: '行业代码', index: 'ParentName', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'CounterpartyCode', label: '组织机构代码', index: 'ParentName', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'ParentName', label: '所属机构', index: 'ParentName', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'IsDocShowParentName', label: '报告展示机构名称', index: 'IsDocShowParentName', sortIndex: i++, width: 90, align: 'left', formatter: boolFormater
|
||
}, {
|
||
name: 'AdminRegisteredNum', label: '管理员登记编号', index: 'AdminRegisteredNum', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'SettlementCurrency', label: '结算币种', index: 'SettlementCurrency', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'BoundSideDesc', label: '资金流向', index: 'BoundSideDesc', sortIndex: i++, width: 90, align: 'left', sortable: false
|
||
}, {
|
||
name: 'Seat', label: '席位', index: 'Seat', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'AgreementBookNo', label: '履约协议编号', index: 'AgreementBookNo', sortIndex: i++, width: 90, align: 'left'
|
||
}, {
|
||
name: 'AgreementBookType', label: '履约协议类型', index: 'AgreementBookType', sortIndex: i++, width: 90, align: 'left', formatter: AgreementBookTypeFormater
|
||
}, {
|
||
name: 'MarginOptionType', label: '追保方向', index: 'MarginOptionType', sortIndex: i++, width: 90, align: 'left', formatter: MarginOptionFormater
|
||
}, {
|
||
name: 'MainProtocolCode', label: '主协议编号', index: 'MainProtocolCode', sortIndex: i++, width: 150, align: 'left',
|
||
}, {
|
||
name: 'SupProtocolCode', label: '补充协议编号', index: 'SupProtocolCode', sortIndex: i++, width: 150, align: 'left',
|
||
}, {
|
||
name: 'ProductName', label: '产品名称', index: 'ProductName', sortIndex: i++, width: 150, align: 'left', sortable: false
|
||
}, {
|
||
name: 'ClearingAgency', label: '清算机构', index: 'ClearingAgency', sortIndex: i++, width: 150, align: 'left',
|
||
}
|
||
];
|
||
|
||
if (page.isCreditLimit) {
|
||
colModelGrid.push({
|
||
name: 'IsCreditOn',
|
||
label: '授信',
|
||
index: 'IsCreditOn',
|
||
sortIndex: i++,
|
||
width: 80,
|
||
align: 'left',
|
||
formatter: boolFormater
|
||
});
|
||
}
|
||
else {
|
||
colModelGrid.push({
|
||
name: 'IsTradeCredit',
|
||
label: '期权费授信',
|
||
index: 'IsTradeCredit',
|
||
sortIndex: i++,
|
||
width: 80,
|
||
align: 'left',
|
||
formatter: boolFormater
|
||
});
|
||
}
|
||
|
||
function gridComplete() {
|
||
main.setcolumnChooser(jQuery('#listGrid'), page.configcolumn_name);
|
||
var height = $("#listGrid .jqgrow").height() + 2;
|
||
$("#listGrid_frozen .jqgrow").height(height);
|
||
$("#listGrid").setGridWidth($("#main-wrapper").width() - 30);
|
||
}
|
||
function clientNameFormat(c, o, r) {
|
||
var html = r.Name;
|
||
if (r.IsTradeCredit && r.IsCreditOn) {
|
||
html += "<img title='期权费已授信' style='cursor:help;width:18px;' src='/images/duigou.png'/>";
|
||
}
|
||
if (!r.HasDocuments) {
|
||
html += "<img title='未上传任何文件' style='cursor:help;width:18px;' src='/images/light_yellow.png'/>";
|
||
}
|
||
if (r.IsExistContactExpired) {
|
||
html += "<img title='联系人或法人登记信息已过期' style='cursor:help;width:18px;' src='/images/light_red.png'/>";
|
||
}
|
||
if (r.AssessmentExpired) {//适当性评估已到期或当日到期
|
||
html += '<i class="fa fa-exclamation tip" aria-hidden="true" title="适当性评估已过期" ></i>';
|
||
}
|
||
if (r.AssessmentExpiredWithinThreeDays) { //适当性评估三日内到期包括三日
|
||
html += '<i class="fa fa-exclamation tip" aria-hidden="true" style="color:#ffc107" title="适当性评估即将过期(到期日:' + r.AssessmentExpiredDate + ')" ></i>';
|
||
}
|
||
return html;
|
||
}
|
||
|
||
function rowdblclick(rowid) {
|
||
var rowData = $(this).getRowData(rowid);
|
||
startclientView(rowData.EncryptId);
|
||
}
|
||
|
||
function customButton(cellValue, options, rowObject) {
|
||
var imageHtml = "<input type=\"button\" value=\"删除\" class=\"btn-warning\" onclick=\"deleteclient('" + rowObject.EncryptId + "');\" />";
|
||
return imageHtml;
|
||
}
|
||
|
||
function deleteclient(encryptId) {
|
||
if (confirm("确定删除吗?")) {
|
||
$.ajax({
|
||
type: "Post",
|
||
url: "/client/Deleteclient",
|
||
data: { id: encryptId, d: new Date() },
|
||
success: function (data) {
|
||
showmiddlemessage(data.obj);
|
||
if (data.success == true) {
|
||
$('#listGrid').trigger('reloadGrid');
|
||
}
|
||
},
|
||
error: function (msg) {
|
||
alert("error:" + msg);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
function showToolName(cellValue, options, rowObject) {
|
||
var html = "";// "<input type=\"button\" class=\"wentiEdit\" title='查看客户信息' onclick=\"startclientView('{0}')\" value=\"{1}\" />".template(rowObject.EncryptId, "查看");
|
||
|
||
if (rowObject.ProcessStatus == "已开户" || rowObject.ProcessStatus == "已休眠") {
|
||
if (page.isCanle) {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='销户' onclick=\"cancel('{0}')\" value=\"{1}\" />"
|
||
.template(rowObject.id, "销户");
|
||
} else {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='销户' disabled='disabled' value=\"{1}\" />"
|
||
.template(rowObject.EncryptId, "销户");
|
||
}
|
||
|
||
}
|
||
|
||
if (rowObject.ProcessStatus == "已销户") {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='已销户' disabled='disabled' value=\"{1}\" />"
|
||
.template(rowObject.EncryptId, "已销户");
|
||
}
|
||
|
||
if (rowObject.ProcessStatus == "已休眠") {
|
||
if (page.allowSleep) {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='取消休眠' onclick=\"resumeClient('{0}')\" value=\"{1}\" />"
|
||
.template(rowObject.id, "取消休眠");
|
||
} else {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='取消休眠' disabled='disabled' value=\"{1}\" />"
|
||
.template(rowObject.id, "取消休眠");
|
||
}
|
||
}
|
||
|
||
if (rowObject.ProcessStatus == "已开户") {
|
||
if (page.allowSleep) {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='休眠' onclick=\"suspendClient('{0}')\" value=\"{1}\" />"
|
||
.template(rowObject.id, "休眠");
|
||
} else {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='休眠' disabled='disabled' value=\"{1}\" />"
|
||
.template(rowObject.id, "休眠");
|
||
}
|
||
}
|
||
if (page.showApprovalBtn) {
|
||
html = html +
|
||
"<input type=\"button\" class=\"wentiEdit\" title='匹配接口审批记录' onclick=\"approvalList('{0}')\" value=\"{1}\" />"
|
||
.template(rowObject.Name, "匹配审批");
|
||
}
|
||
|
||
return html;
|
||
}
|
||
|
||
function approvalList(name) {
|
||
main.open("审批记录", "/trade/InterfaceApprovalRecord?type=2&code=" + name, { area: ["1200px", "600px"] });
|
||
}
|
||
|
||
function appropriatenessDegreeNameFormater(cellValue, options, rowObject) {
|
||
if (rowObject.ProperClientClass == "专业投资者") {
|
||
return "";
|
||
}
|
||
else {
|
||
return rowObject.AppropriatenessDegreeName;
|
||
}
|
||
}
|
||
|
||
function boolFormater(cellValue, options, rowObject) {
|
||
if (cellValue == null) return "";
|
||
var s = cellValue ? "是" : "否";
|
||
var html = "<label>{0}</label>".template(s);
|
||
return html;
|
||
}
|
||
|
||
function PhoneFormater(cellValue, options, rowObject) {
|
||
//换行会影响行高,造成冻结列之后行错位的问题
|
||
//return cellValue != undefined ? cellValue.replace(",", "\n") : "";
|
||
return cellValue;
|
||
}
|
||
|
||
function AgreementBookTypeFormater(cellValue, option, rowObject) {
|
||
if (cellValue == undefined) {
|
||
cellValue = true;
|
||
}
|
||
var s = cellValue ? "单向" : "双向";
|
||
var html = "<label>{0}</label>".template(s);
|
||
return html;
|
||
}
|
||
|
||
function MarginOptionFormater(cellValue, option, rowObject) {
|
||
if (cellValue == undefined) {
|
||
cellValue = 0;
|
||
}
|
||
switch (cellValue) {
|
||
case 0: return "单向追保";
|
||
case 1: return "双向追保";
|
||
case 2: return "对手方单向追保";
|
||
case 3: return "其他";
|
||
default: return "单向追保";
|
||
}
|
||
}
|
||
|
||
function rowclick(id) {
|
||
|
||
}
|
||
|
||
function startclientView(id) {
|
||
var srcurl = "/client/clientViewV2?enid=" + id;
|
||
layer.open({
|
||
type: 2,
|
||
title: "查看客户信息",
|
||
shadeClose: false,
|
||
shade: 0.4,
|
||
area: ['1300px', '800px'],
|
||
content: srcurl,
|
||
});
|
||
// main.open("查看客户信息", srcurl);
|
||
}
|
||
|
||
function reloadclient() {
|
||
//重新加载
|
||
SearchClick();
|
||
window.layer.closeAll();
|
||
}
|
||
|
||
function reloadclient2() {
|
||
//重新加载
|
||
SearchClick();
|
||
}
|
||
|
||
function exprotChooseColumn() {
|
||
if (page.exportFutureVersion === "V2") {
|
||
var postData = $('#listGrid').jqGrid('getGridParam', 'postData');
|
||
postData.page = 0;
|
||
postData.rows = 100000;
|
||
main.formOpenNewPage('/client/ClientListExport', postData);
|
||
} else {
|
||
var dateTemp = new Date().Format("yyyyMMddhhmmss");
|
||
var fileName = "客户清单(配置列)_" + dateTemp;
|
||
var formatters = _.map(["客户编号", "客户名称", "联系人证件号码", "联系人电话", "证照编号", "注册资本(万元)", "产品编号", "所属机构"]
|
||
, x => new Object({ colName: x, formatter: "text" }));
|
||
formatters[1].formatter = (c, o, r) => r.Name;
|
||
formatters.push(_.map(["行业相关标的", "实际控制关系", "是否评估", "转化类型", "评估结果变动", "报告展示机构名称"]
|
||
, x => new Object({ colName: x, formatter: boolFormater })));
|
||
main.toExcel("listGrid", fileName, "xls", null, "资金流向,履约协议编号,履约协议类型,席位,操作人,操作时间,操作", formatters);
|
||
}
|
||
}
|
||
|
||
function exprotChooseClientDuty() {
|
||
SearchClick();
|
||
exportSubmit('/client/ExportClientDuty');
|
||
}
|
||
|
||
function exprotChooseBankCard() {
|
||
SearchClick();
|
||
exportSubmit('/client/ExportClientBankCard');
|
||
}
|
||
|
||
function Test() {
|
||
exportSubmit('/clientblackController/ExportClientBlack');
|
||
}
|
||
|
||
function exportSubmit(url) {
|
||
var $form = $('#exportForm').html('');
|
||
$form.attr("action", url)
|
||
_.each(query_data, (val, key) => {
|
||
if (!val) {
|
||
val = '';
|
||
} else if (_.isArray(val)) {
|
||
_.each(val, x => {
|
||
$form.append(`<input type="hidden" name="${key}" value="${x}">`);
|
||
});
|
||
return;
|
||
}
|
||
$form.append(`<input type="hidden" name="${key}" value="${val}">`);
|
||
});
|
||
$form.submit();
|
||
}
|
||
|
||
function SearchClick(isSearchclick) {
|
||
var listGrid = $('#listGrid');
|
||
|
||
listGrid.appendPostData({ Number: $("#Number").val() });
|
||
listGrid.appendPostData({ Name: $("#Name").val() });
|
||
listGrid.appendPostData({ LicenseCode: $("#LicenseCode").val() });
|
||
listGrid.appendPostData({ CustomerNatures: $("#CustomerNature").val() == null ? "" : $("#CustomerNature").val().join(",") });
|
||
listGrid.appendPostData({ ProtocolSignDateStart: $("#DateFromProtocolSignDate").val() });
|
||
listGrid.appendPostData({ ProtocolSignDateEnd: $("#DateToProtocolSignDate").val() });
|
||
listGrid.appendPostData({ OptName: $("#OptName").val() });
|
||
listGrid.appendPostData({ OptDateStart: $("#DateFromOptDate").val() });
|
||
listGrid.appendPostData({ OptDateEnd: $("#DateToOptDate").val() });
|
||
listGrid.appendPostData({ ProcessStatus: $("#ProcessStatus").val() });
|
||
listGrid.appendPostData({ ProperClientClass: $("#ProperClientClass").val() == null ? "" : $("#ProperClientClass").val().join(",") });
|
||
listGrid.appendPostData({ CustomerManagerIds: $("#CustomerManagerIds").val() });
|
||
listGrid.appendPostData({ CustomerManagerString: $("#CustomerManagerString").val() });
|
||
listGrid.appendPostData({ CreditRatingIds: $("#CreditRatingId").val() == null ? "" : $("#CreditRatingId").val().join(",") });
|
||
listGrid.appendPostData({ CreditLineStart: $("#CreditLineStart").val() });
|
||
listGrid.appendPostData({ CreditLineEnd: $("#CreditLineEnd").val() });
|
||
listGrid.appendPostData({ IsTradeCredit: $("#IsTradeCredit").val() });
|
||
listGrid.appendPostData({ AssessmentExpiredStatus: $("#AssessmentExpiredStatus").val() });
|
||
listGrid.appendPostData({ SwapHedgingType: $("#SwapHedgingType").val() });
|
||
|
||
query_data = {
|
||
Number: $("#Number").val(),
|
||
Name: $("#Name").val(),
|
||
CustomerNatures: $("#CustomerNature").val() == null ? "" : $("#CustomerNature").val().join(","),
|
||
ProtocolSignDateStart: $("#DateFromProtocolSignDate").val(),
|
||
ProtocolSignDateEnd: $("#DateToProtocolSignDate").val(),
|
||
OptName: $("#OptName").val(),
|
||
OptDateStart: $("#DateFromOptDate").val(),
|
||
OptDateEnd: $("#DateToOptDate").val(),
|
||
ProcessStatus: $("#ProcessStatus").val(),
|
||
ProperClientClass: $("#ProperClientClass").val() == null ? "" : $("#ProperClientClass").val().join(","),
|
||
CustomerManagerIds: $("#CustomerManagerIds").val(),
|
||
CustomerManagerString: $("#CustomerManagerString").val(),
|
||
CreditRatingIds: $("#CreditRatingId").val() == null ? "" : $("#CreditRatingId").val().join(","),
|
||
CreditLineStart: $("#CreditLineStart").val(),
|
||
CreditLineEnd: $("#CreditLineEnd").val(),
|
||
AssessmentExpiredStatus: $("#AssessmentExpiredStatus").val(),
|
||
SwapHedgingType: $("#SwapHedgingType").val()
|
||
}
|
||
|
||
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
|
||
//点击搜索时默认第一页
|
||
listGrid.jqGrid('setGridParam', {
|
||
page: 1
|
||
});
|
||
}
|
||
listGrid.trigger('reloadGrid');
|
||
}
|
||
|
||
function cancel(eid) {
|
||
main.confirm("确认销户吗?", function () {
|
||
$.ajax({
|
||
type: "Post",
|
||
url: "/client/CancelClient",
|
||
data: { clientId: eid },
|
||
async: false,
|
||
success: function (data) {
|
||
main.message(data.msg);
|
||
}
|
||
});
|
||
try { window.parent.reloadclient(); } catch (e) { }
|
||
});
|
||
}
|
||
|
||
function suspendClient(eid) {
|
||
main.confirm("确认休眠吗?", function () {
|
||
$.ajax({
|
||
type: "Post",
|
||
url: "/client/SuspendClient",
|
||
data: { clientId: eid },
|
||
async: false,
|
||
success: function (data) {
|
||
main.message(data.msg);
|
||
}
|
||
});
|
||
try { window.parent.reloadclient(); } catch (e) { }
|
||
});
|
||
}
|
||
|
||
function resumeClient(eid) {
|
||
main.confirm("确认取消休眠吗?", function () {
|
||
$.ajax({
|
||
type: "Post",
|
||
url: "/client/ResumeClient",
|
||
data: { clientId: eid },
|
||
async: false,
|
||
success: function (data) {
|
||
main.message(data.msg);
|
||
}
|
||
});
|
||
try { window.parent.reloadclient(); } catch (e) { }
|
||
});
|
||
}
|
||
|
||
$("#Name").change(function () {
|
||
var value = $("#Name").val();
|
||
$("#Name").attr("title", value);
|
||
|
||
});
|
||
|
||
$("#OptName").change(function () {
|
||
var value = $("#OptName").val();
|
||
$("#OptName").attr("title", value);
|
||
|
||
});
|
||
|
||
function showcolumnChooser() {
|
||
main.showcolumnChooser(jQuery('#listGrid'), page.configcolumn_name);
|
||
} |