217 lines
8.1 KiB
Plaintext
217 lines
8.1 KiB
Plaintext
@using WX.CRM.Common
|
|
@using WX.CRM.Model.Entity
|
|
@using WX.CRM.Model.QueryMap
|
|
@using WX.CRM.WebHelper
|
|
@{
|
|
Layout = null;
|
|
}
|
|
<style type="text/css">
|
|
.DisTable {
|
|
display: block;
|
|
}
|
|
|
|
.NoneTable {
|
|
display: none;
|
|
}
|
|
|
|
.td {
|
|
border: 1px solid #ff0000;
|
|
}
|
|
|
|
.curshow {
|
|
padding: 0 20px 5px;
|
|
background-color: #F7FAFE;
|
|
}
|
|
|
|
.curshow2 {
|
|
padding: 0 20px 5px;
|
|
background-color: #F7FAFE;
|
|
}
|
|
|
|
.curhide {
|
|
padding: 0 20px 5px;
|
|
}
|
|
</style>
|
|
|
|
<div class="group content_title_width">
|
|
<span>订单</span>
|
|
<div class="togglebtn">
|
|
</div>
|
|
</div>
|
|
<div class="content_div" style="margin-top:5px;">
|
|
<table class="layui-table content_width">
|
|
<thead>
|
|
<tr>
|
|
<td>
|
|
<input class="btn btn-primary" value="添加订单" type="button" onclick="ShowWindowBoxZxOrder('添加订单', '/WeiXin/CommonOrder/AddByRes?CustomerId=@ViewBag.CustomerId')">
|
|
<!--
|
|
<input class="btn btn-primary" value="编辑订单" onclick="Edit_Click()" type="button">-->
|
|
|
|
<!--<input class="btn btn-primary" value="订单详情" onclick="Details_Click()" type="button">-->
|
|
|
|
<!--<input class="btn btn-primary" value="修改订单分成" onclick="UpdateCommission_Click()" type="button">
|
|
-->
|
|
<!--<input class="btn btn-primary" value="刷新订单数据" onclick="javascript: GetOrderList();" type="button">-->
|
|
|
|
</td>
|
|
</tr>
|
|
</thead>
|
|
|
|
</table>
|
|
<div style="margin-top: 5px;">
|
|
<div>
|
|
@*@for (int i = 0; i < List.Count; i++)
|
|
{
|
|
<a href="javascript:void(0);" class='curhide @(i == 0 ? "curshow2" : "")' onclick="tabshow2(this, @i, '@List[i].RESID')">
|
|
@(string.IsNullOrEmpty(List[i].RESID) ? "无resID" : List[i].RESID)
|
|
</a>
|
|
}*@
|
|
</div>
|
|
|
|
@*<table class="layui-table content_width" style="@(i == 0 ? "" : " display:none;")" id="tab2@(i)">*@
|
|
<table class="layui-table content_width" id="orderList">
|
|
<thead>
|
|
<tr>
|
|
<td width="3%"></td>
|
|
<td width="10%">订单号</td>
|
|
<td width="8%">产品名称</td>
|
|
<td width="8%">订单类型</td>
|
|
<td width="8%">订单状态</td>
|
|
<td width="10%">下单时间</td>
|
|
<td width="10%">开通时间</td>
|
|
<td width="6%">应付金额</td>
|
|
<td width="6%">实付金额</td>
|
|
<td width="8%">到账金额</td>
|
|
<td width="8%">到账时间</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
function ShowWindowBoxZxOrder(comName, linkUrl) {
|
|
$("#modalwindow").html(GetIframeHtml(linkUrl));
|
|
$("#modalwindow").window({ title: comName, width: 690, height: 600, iconCls: 'icon-add', resizable: false }).window('open');
|
|
}
|
|
|
|
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'); }
|
|
}
|
|
|
|
var curRow; //全局行号
|
|
var curColor;
|
|
function selectRow(tr) {
|
|
//alert(tr.rowIndex);
|
|
if (curRow) {
|
|
curRow.bgColor = curColor;
|
|
curColor = tr.bgColor;
|
|
tr.bgColor = "#FFE9B3";
|
|
} else {
|
|
curColor = tr.bgColor;
|
|
tr.bgColor = "FFE9B3";
|
|
}
|
|
curRow = tr;
|
|
}
|
|
|
|
function getSelectRowOrderId() {
|
|
if (curRow) {
|
|
if (window.navigator.userAgent.toLowerCase().indexOf("firefox") != -1) {
|
|
return curRow.cells[1].innerContent;
|
|
}
|
|
else {
|
|
return curRow.cells[1].innerText;
|
|
}
|
|
} else {
|
|
$.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords');
|
|
}
|
|
}
|
|
|
|
function UpdateOrder_Click() {
|
|
//var row = $('#tablist').tablegrid('getSelected');
|
|
if (curRow) {
|
|
var orderId = getSelectRowOrderId();
|
|
$.messager.confirm('提示', '你确定要更新订单信息吗?', function (r) {
|
|
if (r) {
|
|
$.r_post("/WeiXin/SzzyOrder/UpdateSzzyOrder?orderId=" + orderId, function (data) {
|
|
if (data.type == 1) {
|
|
GetOrderList();
|
|
$.messageBox5s('提示', '更新订单信息成功');
|
|
} else {
|
|
$.messageBox5s('错误', data.message);
|
|
}
|
|
|
|
}, "json");
|
|
|
|
}
|
|
});
|
|
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
|
}
|
|
|
|
|
|
|
|
function UpdateCommission_Click() {
|
|
//var row = $('#tablist').tablegrid('getSelected');
|
|
if (curRow) {
|
|
var orderId = getSelectRowOrderId();
|
|
$("#modalwindow").html(GetIframeHtml("/WeiXin/CommissionRule/Edit?orderid=" + 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 (curRow) {
|
|
var orderId = getSelectRowOrderId();
|
|
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrder/Edit?orderId=" + orderId + "&Ieguid=" + GetGuid()));
|
|
$("#modalwindow").window({ title: '编辑', width: 700, height: 600, iconCls: 'icon-edit' }).window('open');
|
|
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
|
}
|
|
function Details_Click() {
|
|
//var row = $('#tablist').tablegrid('getSelected');
|
|
if (curRow) {
|
|
var orderId = getSelectRowOrderId();
|
|
$("#modalwindow").html(GetIframeHtml("/WeiXin/TDOrder/Detail?orderId=" + orderId + "&Ieguid=" + GetGuid()));
|
|
$("#modalwindow").window({ title: '订单详情', width: 700, height: 600, iconCls: 'icon-edit' }).window('open');
|
|
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
|
}
|
|
|
|
function GetOrderList() {
|
|
$.r_ajax({
|
|
url: "/Csvr/CustomerUC/GetCommonOrderListHtml",
|
|
type: "Post",
|
|
data: {resId: "@Model.CustomerId" },
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
$("#orderList").attr("AlreadyLoad", "true");
|
|
$("#orderList tbody").html(data.rowsList);
|
|
/*var rownum = 0;
|
|
$("#orderList tbody tr").each(function () {
|
|
rownum++;
|
|
$(this).find("td").eq(0).html(rownum);
|
|
});*/
|
|
/*$("#orderList tbody tr").each(function () {
|
|
//$(this).cells[0].innerText;
|
|
onclick = function () {
|
|
selectRow(this);
|
|
}
|
|
});*/
|
|
//alert($("#orderList tbody").html());
|
|
}, error: function () {
|
|
$.messager.alert('警告', '数据加载失败!', "error");
|
|
}
|
|
});
|
|
}
|
|
$(function () {
|
|
GetOrderList();
|
|
});
|
|
</script>
|