ComplianceServer/oldcode/WEB/Views/WeiXin/OrderPay/List.cshtml

228 lines
8.5 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.Model.Entity;
@{
ViewBag.Title = "支付信息";
Layout = "~/Views/Shared/_content.cshtml";
}
<style type="text/css">
ul li {
float: left;
}
.box {
width: 300px;
text-align: center;
font-size: 18px;
}
.layui-btn-group span {
padding-left: 10px;
}
</style>
<div style="height:100%; overflow-y:scroll;">
<div style="height:20px; line-height:20px; padding:20px; font-size:18px;">
@*<div style="font-size:18px;">
银行信息:
<br />
<span>开户行:招商银行股份有限公司北京东四环支行</span>
<br />
<span>户 名:东高(北京)科技有限公司</span>
<br />
<span>账 110905783010611</span>
</div>*@
@{
var lastPrice = "0";
var usePrice = "0";
CRM.Core.DTO.retMsg<CRM.Core.DTO.Ord.LastPriceRspDto> ret = ViewBag.Ret;
//var list = ViewBag.OrderDepositList as IEnumerable<WX_SZZYORDERDEPOSIT>;
if (ret.result)
{
lastPrice = ret.retmsg.lastprice.ToString();
usePrice = ret.retmsg.useprice.ToString();
}
else
{
lastPrice = "获取错误";
}
<span>剩余金额: <font style="color:red">¥@lastPrice</font></span><span style="padding-left:20px;">已使用金额:<font style="color:#808080">¥@usePrice</font></span>
}
</div>
<hr class="layui-bg-orange">
<div class="layui-btn-group">
@{
string orderstatus = ViewBag.OrderStatus;
string[] canPayStatus = { "180", "190", "195" };
}
@if (canPayStatus.Contains(orderstatus))//新订单才能进行提交
{
<a href="javascript:void(0)" data-method="add" class='layui-btn layui-btn-sm'>添加支付二维码</a>
<span></span>
<a href="javascript:void(0)" data-method="bank" class='layui-btn layui-btn-sm'>添加银行转账</a>
<span></span>
<a href="javascript:void(0)" data-method="useDj" class='layui-btn layui-btn-sm'>使用金额</a>
<span></span>
}
<a href="javascript:void(0)" data-method="refresh" class='layui-btn layui-btn-sm layui-btn-primary' style="border:1px solid">刷新</a>
</div>
@*<div style="display: inline-block;float: right;padding-right: 20px;color: red;font-weight: bold;">
@{
var list = ViewBag.OrderDepositList as IEnumerable<WX_SZZYORDERDEPOSIT>;
if (list.Any())
{
var count = list.Count().ToString();
var sumPrice = list.Sum(p => p.PAYPRICE).ToString();
<span>有 @count 笔订金可用,共 @sumPrice 元</span>
}
}
</div>*@
<div>
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
</div>
</div>
<div id="qrcodeDiv" style="text-align:center;display:none;">
<img id="QrCodeImg" width="300" />
</div>
<script>
layui.use(['table','layer'], function () {
var layer = layui.layer;
var table = layui.table;
table.render({
id: 'PayList',//列表别名ID
elem: '#tabl1',//表ID
url: '/OrderPay/List?orderid=@Request.QueryString["orderid"]',
method: 'POST',
//cellMinWidth: 120,
cols: [[
{ field: 'id', title: 'ID', hide: true }
, { field: 'orderid', title: '订单ID', width:120 }
, { field: 'depositid', title: '到账ID', width: 120}
, { field: 'NEEDPAY', title: '应付金额', hide: true }
, { field: 'PAYTYPE', title: '支付类型', hide: true }
, { field: 'paytypename', title: '支付类型', width: 120}
, { field: 'paydate', title: '支付时间', width: 120 }
, {
field: 'payprice', title: '使用金额', width: 120, templet: function (d) {
if (d.auditstatus == 1) {
return ""+d.payprice;
} else {
return "";
}
}
}
, { field: 'depositPrice', title: '流水金额', width: 120}
, { field: 'payno', title: '流水号', width: 120 }
, { field: 'payname', title: '姓名', width: 120 }
, { field: 'auditstatus', title: '确认支付', templet: "#statusTpl", fixed: 'right', width: 100 }
, { field: 'ACT', title: '二维码', templet: '#actTpl', fixed: 'right', width: 100 }
]]
, page: false
});
var active = {
add: function () {
layer.open({
title: '添加支付信息',
type: 2,
content: 'Add?orderid=' + @Request.QueryString["orderId"],
area: ['80%', '80%']
});
},
useDj: function () {
layer.open({
title: '使用金额',
type: 2,
content: '/weixin/OrderDeposit/Use2?orderid=' + @Request.QueryString["orderId"],
area: ['55%', '55%']
});
},
bank: function () {
layer.open({
title: '添加银行转账',
type: 2,
content: 'Bank?orderid=' + @Request.QueryString["orderId"],
area: ['80%', '80%']
});
},
refresh: function () {
window.location.reload();
}
};
//监听行工具事件
table.on('tool(tabl1)', function (obj) {
$("#QrCodeImg").attr("src", "/weixin/OrderDeposit/GetQRCode?id=" + obj.data.depositid + "&r=" + Math.random());
$("#qrcodeDiv").show();
layer.open({
title: '查看支付二维码',
type: 1,
content: $('#qrcodeDiv'),
area: ['80%', '80%'],
btn: ['重新生成', '关闭'],
btnAlign: 'c',
maxmin: true,
yes: function () {
$("#QrCodeImg").removeAttr("src").hide();
$.r_ajax({
url: "/WeiXin/OrderDeposit/Gen",
type: "Post",
data: { id: obj.data.ID },
dataType: "json",
loading: true,
success: function (data) {
if (data.result) {
layer.msg("生成成功!");
$("#QrCodeImg").attr("src", "/weixin/OrderDeposit/GetQRCode?id=" + obj.data.depositid + "&r=" + Math.random()).show();
}
else {
layer.msg("生成失败,请稍后重试!");
}
}
});
}
});
});
$('.layui-btn-group .layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
active[method] ? active[method].call(this, othis) : '';
});
});
function showRejectRemark(id) {
//alert(id);
layui.use('layer', function () {
var layer = layui.layer;
var content = $("#reject" + id).html();
layer.msg(content);
});
}
</script>
<script type="text/html" id="statusTpl">
{{# if(d.auditstatus == 1){ }}
<img src="/Content/Images/checked.png" style="height:20px;width:20px;">
{{# } else if(d.auditstatus == -1) { }}
<img src="/Content/Images/unchecked.png" style="height:20px;width:20px;">
<a style="padding-left:10px; color:#808080" href="javascript:void(0)" onclick="showRejectRemark({{ d.id }})">查看原因</a>
<span style="display:none" id="reject{{d.id}}">{{d.rejectremark}}</span>
{{# } else { }}
<img src="/Content/Images/checking.png" style="height:20px;width:20px;">
{{# } }}
</script>
<script type="text/html" id="actTpl">
{{# if(d.auditstatus == 0 && d.paytype != 3){ }}
<a href="javascript:void(0)" lay-event="view" class="layui-table-link">二维码</a>
{{# } }}
</script>