328 lines
15 KiB
Plaintext
328 lines
15 KiB
Plaintext
@using WX.CRM.WebHelper;
|
||
@using WX.CRM.Model.Entity;
|
||
@{
|
||
ViewBag.Title = "订单列表";
|
||
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
||
}
|
||
<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>客户ID:<input type="text" name="txt_resID" style="width:150px" /> </li>
|
||
<li>订单ID:<input type="text" name="txt_szzyOrderId" style="width:100px" /></li>
|
||
<li>
|
||
|
||
产品大类:<select id="slt_productId" name="slt_productId" style="width:150px;height:22px" onChange="changeselect(this.value)">
|
||
<option value="0">--请选中产品大类--</option>
|
||
@foreach (var item in ViewBag.productList as List<SelectListItem>)
|
||
{
|
||
<option value="@item.Value">@item.Text</option>
|
||
}
|
||
</select>
|
||
|
||
</li>
|
||
<li>
|
||
产品小类:<select id="slt_subProductId" name="slt_subProductId" style="width:180px;height:22px">
|
||
<option value="0">--请选中产品小类--</option>
|
||
</select>
|
||
</li>
|
||
<li>
|
||
订单类型:<select id="slt_orderType" name="slt_orderType" style="height:22px;">
|
||
<option value="0">全部订单</option>
|
||
<option value="1">普通订单</option>
|
||
<option value="2">续费订单</option>
|
||
<option value="3">升级订单</option>
|
||
</select>
|
||
</li>
|
||
<li>
|
||
订单状态:<select id="slt_orderStatus" name="slt_orderStatus" style="height:22px;">
|
||
<option value="" selected>全部</option>
|
||
<option value="">请选择</option>
|
||
<option value="180">新订单</option>
|
||
<option value="200">已支付</option>
|
||
<option value="220">已开通</option>
|
||
<option value="205">已升级</option>
|
||
<option value="90">已退款</option>
|
||
<option value="80">已过期</option>
|
||
<option value="70">已取消</option>
|
||
<option value="60">已关闭</option>
|
||
<option value="220,205">已开通+已升级</option>
|
||
</select>
|
||
</li>
|
||
<li>订单分成:<input type="text" name="txt_fcText" style="width:80px" /></li>
|
||
<li style="display:none;">合同编号:<input type="text" name="txt_contractCode" style="width:150px" /></li>
|
||
<li style="display:none;">到账时间:@Html.WdatePickerText("txt_stime", "")-@Html.WdatePickerText("txt_etime", "")</li>
|
||
<li style="display:none;">开通时间:@Html.WdatePickerText("txt_ostime", "")-@Html.WdatePickerText("txt_oetime", "")</li>
|
||
<li>
|
||
@Html.ToolButtonPlain("btnMore", "", "更多↓", false, "nstatus='hidden'")
|
||
</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");
|
||
});
|
||
});
|
||
function frameReturnByClose() {
|
||
$("#modalwindow").window('close');
|
||
}
|
||
function frameReturnByReload(flag) {
|
||
$("#tablist").tablegrid("Load");
|
||
}
|
||
function frameReturnByMes(mes) {
|
||
$.messageBox5s('提示', mes);
|
||
}
|
||
|
||
function loadtablegrid() {
|
||
$('#tablist').tablegrid({
|
||
url: '/WeiXin/JZOrder/GetOrderListByChannel',
|
||
height: $(window).height() - 110,
|
||
loadNow: true,
|
||
data: GetControlValue,
|
||
onLoadError: function () {
|
||
$.messager.alert("警告", "信息加载失败!", "error");
|
||
}
|
||
});
|
||
}
|
||
|
||
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 onLoadSucced() {
|
||
$('#tablist').tablegrid("Search");
|
||
}
|
||
|
||
function changeselect(productId) {
|
||
var nb1defaultIndex = 0;
|
||
if (productId == 0) {
|
||
$("#slt_subProductId").unbind();
|
||
$("#slt_subProductId").html("<option value='0'>--请选中产品小类--</option>");
|
||
return;
|
||
}
|
||
$.r_post("/Soft/SoftRegAndOrderLink/GetSubProductList?productId=" + productId + '&isValid=0', function (data) {
|
||
$("#slt_subProductId").unbind();
|
||
|
||
$("#slt_subProductId").html("<option value='0'>--请选中产品小类--</option>");
|
||
|
||
$(data).each(function (n, m) {
|
||
/*if (nb1defaultIndex == 0) {
|
||
$("#slt_subProductId").append("<option value='" + m.Value + "' selected='selected'>" + m.Text + "</option>");
|
||
}
|
||
else {*/
|
||
$("#slt_subProductId").append("<option value='" + m.Value + "'>" + m.Text + "</option>");
|
||
|
||
//}
|
||
});
|
||
nb1defaultIndex++;
|
||
}, "json");
|
||
}
|
||
|
||
</script>
|
||
@*ToolBar事件处理*@
|
||
<script type="text/javascript">
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='yes' frameborder='0'' src='" + src + "'></iframe>";
|
||
}
|
||
function SupplementOrder_Click() {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/SupplementOrder"));
|
||
$("#modalwindow").window({ title: '补单', width: 700, height: 600, iconCls: 'icon-add' }).window('open');
|
||
}
|
||
|
||
function Details_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
if (row != null) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/Detail?orderId=" + row.ORDERID + "&Ieguid=" + GetGuid()));
|
||
$("#modalwindow").window({ title: '订单详情', width: 700, height: 600, iconCls: 'icon-edit' }).window('open');
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
|
||
function Edit_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
if (row != null) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/Edit?orderId=" + row.ORDERID + "&Ieguid=" + GetGuid()));
|
||
$("#modalwindow").window({ title: '编辑', width: 700, height: 600, iconCls: 'icon-edit' }).window('open');
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
//获取datagrid头部及字段
|
||
function getDataGridHeader() {
|
||
var columns = $('#tablist').tablegrid("getHead");
|
||
return columns;
|
||
}
|
||
|
||
|
||
@*function GetWxPayInfo(orderId) {
|
||
if (orderId != undefined && orderId.length != 0 && orderId !=0) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrder/PayInfo?orderId=" + orderId + "&Ieguid=" + GetGuid()));
|
||
$("#modalwindow").window({ title: '支付信息', width: 830, height: 550, iconCls: 'icon-edit' }).window('open');
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}*@
|
||
|
||
function UpdateCommission_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
if (row != null) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/CommissionRule/Edit?orderid=" + row.ORDERID + "&Ieguid=" + GetGuid()));
|
||
$("#modalwindow").window({ title: '编辑', width: 700, height: 600, iconCls: 'icon-edit' }).window('open');
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
function export_Click() {
|
||
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/WeiXin/JZOrder/Export?" + GetQueryStr())));
|
||
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
||
}
|
||
|
||
function upload_Click() {
|
||
$("#modalwindow").html("不需要此功能,后台已处理!");
|
||
$("#modalwindow").window({ title: '上传到账信息', width: 600, height: 500, iconCls: 'icon-export' }).window('open');
|
||
}
|
||
|
||
@*function audit_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
var errorMsg = '';
|
||
if (row != null) {
|
||
$.messager.confirm('提示', '您确定要开通所选择的订单?', function (r) {
|
||
if (r) {
|
||
|
||
$.r_post("/WeiXin/JZOrder/Audit?id=" + row.ORDERID + "&reson=坐席申请开通", function (data) {
|
||
if (data.type == 0) {
|
||
errorMsg += "订单号:" + row.ORDERID + "," + data.message + "</br>";
|
||
$.messageBox5s('错误', errorMsg);
|
||
}
|
||
|
||
else {
|
||
$.messageBox5s('提示', "开通成功");
|
||
$("#tablist").tablegrid('Search');
|
||
}
|
||
|
||
}, "json");
|
||
|
||
}
|
||
})
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}*@
|
||
|
||
function Delete_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
var errorMsg = '';
|
||
if (row != null) {
|
||
alert("请通知后台管理人员操作!");
|
||
//$.messager.confirm('提示', '您确定要删除所选择的订单?', function (r) {
|
||
// if (r) {
|
||
|
||
// $.r_post("/WeiXin/TDOrder/Delete?orderId=" + row.ORDERID, function (data) {
|
||
// if (data.type == 0) {
|
||
// $.messageBox5s('错误', data.message);
|
||
// }
|
||
|
||
// else {
|
||
// $.messageBox5s('提示', "删除成功");
|
||
// $("#tablist").tablegrid('Search');
|
||
// }
|
||
|
||
// }, "json");
|
||
|
||
// }
|
||
//})
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
|
||
function orderPay_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
var errorMsg = '';
|
||
if (row != null) {
|
||
$.get('/WeiXin/JZOrder/CheckOrderPay?orderId=' + row.ORDERID, function (res) {
|
||
var resObj = JSON.parse(res);
|
||
if (resObj.type == 1) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/AddOrderPay?orderId=" + row.ORDERID));
|
||
$("#modalwindow").window({ title: '添加支付记录', width: 600, height: 500, iconCls: 'icon-export' }).window('open');
|
||
}
|
||
else {
|
||
if (resObj.message == "70") {
|
||
$.messager.alert("警告", "该订单已经退款了,请确认!", "error");
|
||
}
|
||
else if (resObj.message == "220") {
|
||
$.messager.alert("警告", "该订单已经开通了,请确认!", "error");
|
||
}
|
||
else if (resObj.message == "60") {
|
||
$.messager.alert("警告", "该订单已经关闭了,请重新下单!", "error");
|
||
}
|
||
else if (resObj.message == "exists") {
|
||
$.messager.confirm("操作提示", "该订单已经提交过支付记录了,确定继续提交?", function (res) {
|
||
if (res) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/AddOrderPay?orderId=" + row.ORDERID));
|
||
$("#modalwindow").window({ title: '添加支付记录', width: 600, height: 500, iconCls: 'icon-export' }).window('open');
|
||
}
|
||
});
|
||
}
|
||
else {
|
||
$.messager.alert("警告", resObj.message, "error");
|
||
}
|
||
}
|
||
});
|
||
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
|
||
function ContractView(orderId) {
|
||
if (!orderId) {
|
||
alert("参数错误!");
|
||
return;
|
||
}
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/ViewContract?orderId=" + orderId + "&Ieguid=" + GetGuid()));
|
||
$("#modalwindow").window({ title: '合同信息', width: 830, height: 550, iconCls: 'icon-edit' }).window('open');
|
||
}
|
||
|
||
function orderRefund_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
var errorMsg = '';
|
||
if (row != null) {
|
||
$.get('/WeiXin/JZOrder/CheckOrderRefund?orderId=' + row.ORDERID, function (res) {
|
||
var resObj = JSON.parse(res);
|
||
//console.log(resObj.type);
|
||
if (resObj.type == 1) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/ApplyOrderRefund?orderId=" + row.ORDERID));
|
||
$("#modalwindow").window({ title: '退款申请', width: 600, height: 400, iconCls: 'icon-export' }).window('open');
|
||
}
|
||
else {
|
||
if (resObj.message == "70") {
|
||
$.messager.alert("警告", "该订单已经退款了,请确认!", "error");
|
||
}
|
||
else if (resObj.message == "exists") {
|
||
$.messager.confirm("操作提示", "该订单已经提交过退款申请了,确定继续提交?", function (res) {
|
||
if (res) {
|
||
$("#modalwindow").html(GetIframeHtml("/WeiXin/JZOrder/ApplyOrderRefund?orderId=" + row.ORDERID));
|
||
$("#modalwindow").window({ title: '退款申请', width: 600, height: 400, iconCls: 'icon-export' }).window('open');
|
||
}
|
||
});
|
||
}
|
||
else {
|
||
$.messager.alert("警告", resObj.message, "error");
|
||
}
|
||
}
|
||
});
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
|
||
function hg_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
if (row != null) {
|
||
$("#modalwindow").html(GetIframeHtml("HgRecord?orderid=" + row.ORDERID + "&resid=" + row.RESID + "&Ieguid=" + GetGuid()));
|
||
$("#modalwindow").window({ title: '订单合规回访', width: 700, height: 550, iconCls: 'icon-edit' }).window('open');
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
|
||
</script>
|