Mini.Crm/Mini.Web/Areas/Admin/Views/WorkWeChat/HongBao.cshtml

174 lines
6.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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 Mini.Web.WebHelper;
@{
ViewBag.Title = "Index";
Layout = "~/Areas/Admin/Views/Shared/_content.cshtml";
}
<style>
.redColor {
color: red;
}
.displayLi {
display: none;
}
</style>
<div class="layui-fluid" style="padding-left:0px;padding-top:10px;">
<div class="layui-card" id="topcard" style="width:100%;padding-top:10px;">
<div class="layui-card-header layui-self-header">
<div style="float:left;position:relative;">
微信红包
</div>
<div style="float:right;position:relative;">
</div>
<div class="hrclass" style="position:relative;float: left;"></div>
</div>
<div class="layui-card-body " id="contentBody">
<form class="layui-form selftopwhere" id="myform">
<div class="layui-form-item">
微信用户名:
<div class="layui-inline" style="width:160px;">
<input type="text" name="jobWxUserName" id="txt_jobWxUserName" value="@Html.Raw(ViewBag.jobWxUserName)" required lay-verify="required" placeholder="微信用户名" autocomplete="off" class="layui-input">
</div>
ID
<div class="layui-inline" style="width:160px;">
<input type="text" name="id" id="txt_jobWxUserName" value="" required lay-verify="required" placeholder="红包ID" autocomplete="off" class="layui-input">
</div>
时间:
<div class="layui-inline" style="width:150px;">
<input class="layui-input" placeholder="开始时间" name="stime" id="start" style="width:150px;">
</div>
~
<div class="layui-inline" style="width:150px;">
<input class="layui-input" placeholder="结束时间" name="etime" id="end" style="width:150px;">
</div>
<div class="layui-inline">
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search" type="button" value="查询" /><input class="layui-btn layui-btn-sm layui-btn-reset" type="reset" value="清空" />
</div>
</div>
</form>
<table class="layui-hide" id="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>
</div>
</div>
</div>
<!--确定宽度-->
<script>
var table;
</script>
<script>
layui.use('laydate', function () {
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#start' //指定元素
});
//执行一个laydate实例
laydate.render({
elem: '#end' //指定元素
});
});
var selectRow = {};
var winindex;
var layer;
var rowid;
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function () {
var element = layui.element;
element.on('tab(tonghuajiankong)', function (n) {
$(".bodytable").addClass("hidden");
$("#kefuzhuangtai" + (n.index + 1)).removeClass("hidden");
});
element.on('tab(maintab)', function (n) {
if (n.index == 0)
$("#bottomcard").removeClass("hidden");
else
$("#bottomcard").addClass("hidden");
});
});
layui.use(['laypage', 'layer', 'table', 'laydate'], function () {
var laydate = layui.laydate;
layer = layui.layer;
table = layui.table;
table.render({
id: 'listReload'//列表别名ID
, elem: '#tab_kefuzhuangtaiyi1'
, url: 'GetHongBao?weixincrmaccount=@Html.Raw(ViewBag.weixincrmaccount)'
, method: 'POST'
, cellMinWidth: 80 //全局定义常规单元格的最小宽度layui 2.2.1 新增
, page: true
, limit: 10
, height: "full-160"
, size:"sm"
, cols: [[
{ field: 'numbers', type: 'numbers' }
, { field: 'sendid', title: '红包ID' }
, { field: 'sendusername', title: '红包发送人' }
, { field: 'sendNickName', title: '昵称' }
, {
field: 'sendTime', title: '时间', templet: function (d) {
if (d.sendTime != null)
return layui.util.toDateString(d.sendTime, 'yyyy-MM-dd HH:mm:ss');
return "";
}}
//, { field: 'sendconremark', title: '备注' }
, { field: 'mntype', title: '红包类型' }
, { field: 'title', title: '红包标题' }
, { field: 'username', title: '领取人' }
, { field: 'getNickName', title: '领取人' }
//, { field: 'getconremark', title: '备注' }
, {
field: 'createtime', title: '领取时间', templet: function (d) {
if (d.createtime != null)
return layui.util.toDateString(d.createtime, 'yyyy-MM-dd HH:mm:ss');
else
return "";
}
}
]]
, where: $("#myform").serializeFormJSON()
});
//监听行单击事件单击事件为rowDouble
table.on('row(wochao)', function (obj) {
var data = obj.data;
//console.log(data);
//标注选中样式
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
selectRow = data;
});
var active = {
search: function () {
var param = $("#myform").serializeFormJSON();
table.reload('listReload', {
where: param
});
}
};
$('.layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
active[method] ? active[method].call(this, othis) : '';
});
});
function Closed() {
layer.close(winindex);
}
function TableReload() {
table.reload('listReload', {
});
}
</script>
<script type="text/html" id="agentTpl">
{{# if(d.ISOUTERAGENT == '1'){ }}
{{# } else if(d.ISOUTERAGENT == '0') { }}
{{# } }}
</script>