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

172 lines
5.3 KiB
Plaintext

@*@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>
<table class="layui-hide" id="tabl1" lay-filter="tabl1">
<tr>
</tr>
</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>