ComplianceServer/oldcode/WEB/Views/TZGW/RoomApplay/Index.cshtml

148 lines
7.1 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "Room_Index";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script src="~/Scripts/op/tablegrid.sort.js"></script>
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@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>交易商码:<input type="text" name="txt_tradecode" style="width:120px;" />&nbsp;</li>
<li>软件用户名:<input type="text" name="txt_username" style="width:120px;" />&nbsp;</li>
<li>@Html.Action("UserComBoxByRole", "Control", new { onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = "" })</li>
<li>
状态:@Html.DropDownList("slt_status", new List<SelectListItem>() {
new SelectListItem(){ Text="所有",Value=""},
new SelectListItem(){ Text="已申请",Value="100"},
new SelectListItem(){ Text="审核通过",Value="200"},
new SelectListItem(){ Text="已撤销",Value="60"},
new SelectListItem(){ Text="审核未通过",Value="80"},
new SelectListItem(){ Text="未申请",Value="61"}
}, new { style = "width:100px" })
</li>
<li>
开户来源:@Html.DropDownList("slt_accountFrom", ViewBag.AccountFromList as List<SelectListItem>, new { style = "width:100px" })
</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
function onLoadSucced() {
$('#tablist').tablegrid("Search");
}
$(function () {
$('#tablist').tablegrid({
url: '/TZGW/RoomApplay/GetHtmlList',
height: $(window).height() - 130,
loadNow: false,
data: GetControlValue
});
});
function GetControlValue() {
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val() };
}
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
function frameReturnByMes(mes) {
$.messageBox5s('提示', mes);
}
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
}
function Create_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
if (!row.status || row.status === "60" || row.status === "80") {
if (row.username === "未设置") {
$.messageBox5s('提示', '该交易商未设置主软件用户,请先设置');
} else {
$("#modalwindow").html(GetIframeHtml("/TZGW/RoomApplay/AddRoomApplay?tradecode=" + row.tradecode + "&username=" + row.username2 + "&resid=" + row.resid));
$("#modalwindow").window({ title: '新增', width: 700, height: 300, iconCls: 'icon-add' }).window('open');
}
}
else {
$.messageBox5s('提示', '该交易商已添加过申请');
}
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
//ShoLayoutWindow();
}
function Edit_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
//加上审核功能后要改为100
if (row.pkid) {
if (row.status === "100") {
$("#modalwindow").html(GetIframeHtml("/TZGW/RoomApplay/EditRoomApplay?pkid=" + row.pkid + "&tradecode=" + row.tradecode + "&username=" + row.username2 + "&roomcode=" + row.roomcode + "&starttime=" + row.startdate + "&endtime=" + row.enddate + "&memo=" + row.applaymemo));
$("#modalwindow").window({ title: '编辑', width: 700, height: 300, iconCls: 'icon-edit' }).window('open');
}
else if (row.status === "60") {
$.messageBox5s('提示', '该数据已撤销,无法修改');
}
else {
$.messageBox5s('提示', '该数据已审核,无法修改');
}
}
else {
$.messageBox5s('提示', '该交易商未申请房间,请点击"新增"申请');
}
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function Check_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
//加上审核功能后要改为100
if (row.pkid) {
if (row.status === "100") {
$("#modalwindow").html(GetIframeHtml("/TZGW/RoomApplay/CheckRoomApplay?pkid=" + row.pkid + "&tradecode=" + row.tradecode + "&username=" + row.username2 + "&roomname=" + row.roomname + "&starttime=" + row.startdate + "&endtime=" + row.enddate + "&memo=" + row.applaymemo));
$("#modalwindow").window({ title: '审核', width: 700, height: 300, iconCls: 'icon-edit' }).window('open');
} else if (row.status === "60") {
$.messageBox5s('提示', '该数据已撤销,无法审核');
}
else {
$.messageBox5s('提示', '该数据已审核,无法审核');
}
}
else {
$.messageBox5s('提示', '该交易商未申请房间,请点击"新增"申请');
}
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function ChangeApplay_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
if (row.pkid) {
if (row.status === "200") {
$("#modalwindow").html(GetIframeHtml("/TZGW/RoomApplay/ChangeRoomApplay?pkid=" + row.pkid + "&tradecode=" + row.tradecode + "&username=" + row.username2 + "&roomcode=" + row.roomcode + "&starttime=" + row.startdate + "&endtime=" + row.enddate));
$("#modalwindow").window({ title: '房间变更', width: 700, height: 300, iconCls: 'icon-edit' }).window('open');
}
else {
$.messageBox5s('提示', '该数据非已审核状态,无法变更');
}
}
else {
$.messageBox5s('提示', '该交易商未申请房间,请点击"新增"申请');
}
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
</script>