TG.WXCRM.V4/WEB/Views/WeiXin/SzzyOrderRefundThree/Index.cshtml

105 lines
4.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using WX.CRM.WebHelper;
@using WX.CRM.Model.Entity;
@{
ViewBag.Title = "退款订单";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script src="~/Scripts/op/tablegrid.sort.js"></script>
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.ToolButton("btnAdd", "icon-add", "添加", true)
@Html.ToolButton("btnEdit", "icon-edit", "修改", true)
@Html.ToolButton("btnUpload", "icon-upload", "上传", 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>订单ID<input type="text" name="txt_szzyOrderId" style="width:150px" /></li>
<li>退款时间:@Html.WdatePickerText("txt_stime", "")-@Html.WdatePickerText("txt_etime", "")</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
$(function () {
loadtablegrid();
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
$("#btnAdd").click(function() {
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrderRefund/Add"));
$("#modalwindow").window({ title: '新增', width: 500, height: 400, iconCls: 'icon-add' }).window('open');
});
$("#btnEdit").click(function() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrderRefund/Edit?pkid=" + row.PKID + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '编辑', width: 500, height: 400, iconCls: 'icon-edit' }).window('open');
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
});
$("#btnUpload").click(function() {
upload_Click();
});
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
function frameReturnByMes(mes) {
$.messageBox5s('提示', mes);
}
function loadtablegrid() {
$('#tablist').tablegrid({
url: '/WeiXin/SzzyOrderRefundThree/Index',
height: $(window).height() - 110,
loadNow: true,
data: GetControlValue,
onLoadError: function () {
$.messager.alert("警告", "信息加载失败!", "error");
}
});
}
function onLoadSucced() {
$('#tablist').tablegrid("Search");
}
function GetRefundInfo(orderId) {
if (orderId != undefined && orderId.length != 0 && orderId != 0) {
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrderRefund/Info?orderId=" + orderId + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '退款信息', width: 830, height: 550, iconCls: 'icon-edit' }).window('open');
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
</script>
@*ToolBar事件处理*@
<script type="text/javascript">
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
}
//获取datagrid头部及字段
function getDataGridHeader() {
var columns = $('#tablist').tablegrid("getAllHead");
return columns;
}
function GetControlValue() {
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val(), dayType: $("#txt_Daytype").val() };
}
function upload_Click() {
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrderRefund/Upload"));
$("#modalwindow").window({ title: '上传退款信息', width: 600, height: 500, iconCls: 'icon-export' }).window('open');
}
</script>