209 lines
9.1 KiB
Plaintext
209 lines
9.1 KiB
Plaintext
@model CRM.Core.Model.Entity.WX_SzzyOrderDeposit
|
||
@using CRM.Core.Model.Entity
|
||
@{
|
||
ViewBag.Title = "金额使用流水";
|
||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||
|
||
List<WX_SzzyOrderDeposit> DepositList = ViewBag.DepositList;
|
||
List<WX_SzzyOrderDeposit> AllDepositList = ViewBag.AllDepositList;
|
||
List<Wx_SzzyOrderPayUseLog> PayUseList = ViewBag.PayUseList;
|
||
List<WX_SzzyOrderRefund> reflist = ViewBag.refList;
|
||
|
||
decimal sumprice = 0;
|
||
if (reflist != null)
|
||
{
|
||
sumprice = reflist.Where(m => m.isacturalrefund == 1).Sum(m => m.refundprice);
|
||
}
|
||
|
||
DepositList = DepositList.OrderByDescending(m => m.id).ToList();
|
||
AllDepositList = AllDepositList.OrderByDescending(m => m.id).ToList();
|
||
PayUseList = PayUseList.OrderByDescending(m => m.usetime).ThenByDescending(m=>m.id).ToList();
|
||
}
|
||
<style>
|
||
.layui-form-checkbox[lay-skin="primary"] {
|
||
padding-left: 20px;
|
||
}
|
||
|
||
.layui-form-checkbox[lay-skin=primary] span {
|
||
padding-right: 0px;
|
||
}
|
||
</style>
|
||
<div style="padding: 10px 10px;">
|
||
<div id="mytoolbar">
|
||
<form class="layui-form">
|
||
客户ID:
|
||
<div class="layui-inline">
|
||
<input type="text" name="resid" id="resid" placeholder="请输入" autocomplete="off" value="@ViewBag.Resid" class="layui-input" style="width:200px;display:inline; height:35px;">
|
||
</div>
|
||
事件:
|
||
<div class="layui-inline" id="mlxs">
|
||
@{ string usetype = ViewBag.usetype;}
|
||
<input type="checkbox" lay-skin="primary" name="usetype[1]" nvalue="1" title="进账+" @(usetype.Contains("[1]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[2]" nvalue="2" title="使用-" @(usetype.Contains("[2]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[3]" nvalue="3" title="取消使用+" @(usetype.Contains("[3]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[4]" nvalue="4" title="取消到账-" @(usetype.Contains("[4]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[5]" nvalue="5" title="订单取消使用+" @(usetype.Contains("[5]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[10]" nvalue="10" title="退单取消使用+" @(usetype.Contains("[10]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[8]" nvalue="8" title="订单冻结金额-" @(usetype.Contains("[8]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[9]" nvalue="9" title="退款解冻+" @(usetype.Contains("[9]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[6]" nvalue="6" title="退款-" @(usetype.Contains("[6]") ? "checked" : "")>
|
||
<input type="checkbox" lay-skin="primary" name="usetype[7]" nvalue="7" title="余额退款-" @(usetype.Contains("[7]") ? "checked" : "")>
|
||
</div>
|
||
<input type="button" class="layui-btn" value="查询" style="height:35px;" id="search" />
|
||
</form>
|
||
</div>
|
||
|
||
<table class="layui-table">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
客户ID:@ViewBag.Resid
|
||
@*<input type="text" name="resid" id="resid" placeholder="请输入" autocomplete="off" value="" class="layui-input" style="width:200px;display:inline; height:35px;">*@
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="font-weight:bold;">余额:@DepositList.Sum(m => m.lastprice)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
到款:@DepositList.Sum(m => m.payprice)
|
||
已使用:@DepositList.Sum(m => m.useprice)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
@*@{ int[] ax = { 6, 7 }; }
|
||
退款:@Math.Abs(PayUseList.Where(m => ax.Contains(m.usetype)).Sum(m => m.useprice))*@
|
||
退款:@Html.Raw(sumprice)
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<table class="layui-table" lay-filter="demo">
|
||
<thead>
|
||
<tr>
|
||
<th lay-data="{field:'id', sort:true,width:80}">ID</th>
|
||
<th lay-data="{field:'depositid', sort:true,width:120}">到帐ID</th>
|
||
<th lay-data="{field:'orderid', sort:true,width:120}">订单ID</th>
|
||
<th lay-data="{field:'payno', sort:true ,width:300}">流水号</th>
|
||
<th lay-data="{field:'payprice', sort:true}">到款金额</th>
|
||
<th lay-data="{field:'usetype', sort:true}">事件</th>
|
||
<th lay-data="{field:'useprice', sort:true}">发生金额</th>
|
||
<th lay-data="{field:'memo'}">事件说明</th>
|
||
<th lay-data="{field:'lastprice', sort:true}">总余额</th>
|
||
<th lay-data="{field:'ctime', sort:true,width:150}">时间</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach (var item in PayUseList)
|
||
{
|
||
<tr>
|
||
<td>@item.id</td>
|
||
<td>@item.depositid</td>
|
||
<td>@item.orderid</td>
|
||
<td>@item.payno</td>
|
||
<td>
|
||
@{
|
||
var dp = AllDepositList.FirstOrDefault(m => m.id == item.depositid);
|
||
}
|
||
@(dp==null?"":""+dp.payprice)
|
||
</td>
|
||
<td>
|
||
@if (item.usetype == 1)
|
||
{
|
||
<font color="green">进账+</font>
|
||
}
|
||
else if (item.usetype == 2)
|
||
{
|
||
<font color="red">使用-</font>
|
||
}
|
||
else if (item.usetype == 3)
|
||
{
|
||
<font color="green">取消使用+</font>
|
||
}
|
||
else if (item.usetype == 4)
|
||
{
|
||
<font color="red">取消到账-</font>
|
||
}
|
||
else if (item.usetype == 5)
|
||
{
|
||
<font color="green">订单取消使用+</font>
|
||
}
|
||
else if (item.usetype == 6)
|
||
{
|
||
<font color="red">退款-</font>
|
||
}
|
||
else if (item.usetype == 7)
|
||
{
|
||
<font color="red">余额退款-</font>
|
||
}
|
||
else if (item.usetype == 8)
|
||
{
|
||
<font color="red">订单冻结金额-</font>
|
||
}
|
||
else if (item.usetype == 9)
|
||
{
|
||
<font color="green">退款解冻+</font>
|
||
}
|
||
else if (item.usetype == 10)
|
||
{
|
||
<font color="green">退单取消使用+</font>
|
||
}
|
||
</td>
|
||
<td>
|
||
@if (item.useprice > 0)
|
||
{
|
||
<font>@("+" + item.useprice)</font>
|
||
}
|
||
else
|
||
{
|
||
<font>@(item.useprice)</font>
|
||
}
|
||
</td>
|
||
<td>@item.memo</td>
|
||
|
||
<td>
|
||
@if ((item.lastprice ?? 0) == 0 && item.memo.EndsWith("-初始化"))
|
||
{
|
||
|
||
}
|
||
else
|
||
{
|
||
@item.lastprice
|
||
}
|
||
|
||
|
||
</td>
|
||
<td>@item.usetime</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<script>
|
||
//alert(isNaN("4200001372202204284332737558(5800确认2800)"));
|
||
$(function () {
|
||
layui.use(['layer', 'laydate', 'form', 'table'], function () {
|
||
var layer = layui.layer
|
||
, laydate = layui.laydate
|
||
, form = layui.form;
|
||
$("#search").click(function () {
|
||
var chonese = "";
|
||
$("#mlxs :checked").each(function (x, d) {
|
||
chonese += "[" + $(this).attr("nvalue") + "]";
|
||
});
|
||
if (!chonese) {
|
||
chonese += "[-1]";
|
||
}
|
||
window.location = "?resid=" + $("#resid").val() + "&usetype=" + chonese;
|
||
});
|
||
|
||
var table = layui.table;
|
||
//转换静态表格
|
||
table.render('demo', {
|
||
limit: 10000 //注意:请务必确保 limit 参数(默认:10)是与你服务端限定的数据条数一致
|
||
//支持所有基础参数
|
||
});
|
||
});
|
||
});
|
||
</script> |