ComplianceServer/oldcode/WEB/Views/Res/SharedPool/Index.cshtml

69 lines
2.5 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "资源类型";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<link href="~/Content/main.css" rel="stylesheet" />
<style>
.bodyDiv{height:100%}
</style>
<div style="margin: 0 auto; width:300px; padding-top:150px; font-size:25px;">
<div style="padding-bottom:20px;">
类型:<select id="resTypeCode">
<option value=""></option>
<option value="Q2007">推广资源</option>
<option value="Q2002" selected="selected">注册资源</option>
<option value="other">非注册资源</option>
</select>
</div>
<div style="color:red; font-weight:bold;">
资源池数量:@ViewBag.PoolCount
</div>
<div style="padding-top:30px;">
<input type="button" class="btn btn-primary" style="width:220px; height:35px; font-size:20px;" id="hq" value="点击获取一个资源" />
<a style="padding-left:10px;" href="javascript:void(0)" onclick="window.location.reload();">刷新</a>
</div>
</div>
<script type="text/javascript">
$(function () {
var resTypeCode = "@Request.QueryString["resTypeCode"]";
if (resTypeCode != "") {
$("#resTypeCode").val(resTypeCode);
}
$("#resTypeCode").change(function () {
var url = "/Res/SharedPool/Index";
if (this.value != "") {
url += "?resTypeCode=" + this.value;
}
location.href = url;
});
$("#hq").click(function () {
if (resTypeCode == "") {
$.messager.alert("警告", "请先选择一个类型!", "error");
return;
}
var poolCount = @ViewBag.PoolCount;
$.r_post('/Res/SharedPool/Find', { poolCount: poolCount, resTypeCode: resTypeCode }, function (rep) {
if (rep.resid != "" && rep.resid != undefined && rep.resid != null) {
var url = "/Csvr/CustomerInfo/CustomerDetail?resid=" + rep.resid;
window.parent.ChildAddTab("客户详细", url, "icon-memeber");
}
else {
$.messager.alert("警告", "未获取到资源,请稍后再试!", "error");
}
});
});
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
function frameReturnByMes(mes) {
$.messageBox5s('提示', mes);
}
</script>