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

243 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.

@*@model WX.CRM.IBLL.Wx.OrderPayView*@
@using CRM.Core.DTO.Ord
@using CRM.Core.DTO
@{
/**/
ViewBag.Title = "List";
}
@{
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>
<div style="font-size:18px;width:50%;float:left">
银行信息:
<br />
<span>开户行:招商银行股份有限公司北京东四环支行</span>
<br />
<span>户 名:东高(北京)科技有限公司</span>
<br />
<span>账 110905783010611</span>
</div>
<div style="float: left; font-size:18px;vertical-align:bottom;padding-top:50px;">
@{ retMsg<LastPriceRspDto> ret = ViewBag.Ret;
string lastprice = "";
string useprice = "";
if (ret.result)
{
lastprice = ret.retmsg.lastprice.ToString();
useprice = ret.retmsg.useprice.ToString();
}
else
{
lastprice = "获取金额错误!";
}
}
剩余金额:<font color="red">@lastprice</font>
已使用金额:@useprice
</div>
</div>
<hr class="layui-bg-orange">
<div class="layui-btn-group">
<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>
@*<input class="layui-btn layui-btn-sm layui-btn-normal " value="添加订金" type="button" onclick="ShowWindowBoxZxOrder('添加订金', '/WeiXin/OrderDeposit/Add?CustomerId=@ViewBag.CustomerId')">*@
<a href="javascript:void(0)" data-method="dj" class='layui-btn layui-btn-sm layui-btn-normal'>添加预付金额</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>
<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: '/OrderDeposit/List?resid=@Request["CustomerId"]',
method: 'POST',
cols: [[
{ field: 'id', title: 'ID' }
, { field: 'resid', title: '客户ID', hide: true }
, { field: 'NEEDPAY', title: '应付金额', hide: true }
, { field: 'PAYTYPE', title: '支付类型', hide: true }
, { field: 'paytypename', title: '支付类型' }
, { field: 'paydate', title: '支付时间' }
, { field: 'payprice', title: '支付金额' }
, { field: 'lastprice', title: '剩余金额' }
, { field: 'payname', title: '支付人姓名' }
, { field: 'auditstatus', title: '是否确认支付', templet: "#statusTpl" }
//, { field: 'isuse', title: '是否使用', templet: '#useTpl' }
, { field: 'orderid', title: '关联订单号' }
, { field: 'ACT', title: '查看二维码', templet: '#actTpl' }
, { field: 'TK', title: '退款申请', templet: '#tkTpl', hide: true }
]]
, page: false
});
var active = {
add: function () {
layer.open({
title: '添加支付信息',
type: 2,
content: 'Add2?resid=@Request["CustomerId"]',
area: ['80%', '80%']
});
},
bank: function () {
layer.open({
title: '添加银行转账',
type: 2,
content: 'Bank?resid=@Request["CustomerId"]',
area: ['80%', '80%']
});
},
refresh: function () {
window.location.reload();
},
dj: function () {
layer.open({
title: '添加支付信息',
type: 2,
content: 'Add?CustomerId=@Request["CustomerId"]',
area: ['80%', '80%']
});
}
};
//监听行工具事件
table.on('tool(tabl1)', function (obj) {
$("#QrCodeImg").attr("src", "GetQRCode?id=" + obj.data.ID + "&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", "GetQRCode?id=" + obj.data.ID + "&r=" + Math.random()).show();
}
}
});
}
});
});
$('.layui-btn-group .layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
active[method] ? active[method].call(this, othis) : '';
});
});
function ApplyDepositRefund(id) {
//alert(id);
layui.use('layer', function () {
var layer = layui.layer;
layer.open({
title: '订金退款申请',
type: 2,
content: '/WeiXin/OrderDeposit/Refund?id=' + id,
area: ['80%', '80%']
});
});
//$("#modalwindow").html(GetIframeHtml("/WeiXin/OrderDeposit/Refund?id=" + id));
//$("#modalwindow").window({ title: "订金退款申请", width: 500, height: 400, iconCls: 'icon-add' }).window('open');
}
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;">&nbsp;已确认
{{# } 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;">&nbsp;未确认
{{# } }}
</script>
<script type="text/html" id="useTpl">
{{# if(d.isuse == 0){ }}
<span style="color:orange">未使用</span>
{{# } else if(d.isuse == 1) { }}
<span style="color:red">已使用</span>
{{# } else if(d.isuse == 2) { }}
<span style="color:blue">已退款</span>
{{# } else { }}
<span style="color:green">已开通</span>
{{# } }}
</script>
<script type="text/html" id="actTpl">
{{# if(d.tradeno && d.auditstatus == 0 && d.paytype != 3){ }}
<a href="javascript:void(0)" lay-event="view" class="layui-table-link">二维码</a>
{{# } }}
</script>
<script type="text/html" id="tkTpl">
{{# if(d.auditstatus == 1 && d.isuse == 0){ }}
<a href='javascript:void(0)' onclick='ApplyDepositRefund({{d.id}})' class="layui-table-link">退款申请</a>
{{# } }}
</script>