You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
36
hyhproject/admin/view/logmoneys/box.html
Executable file
36
hyhproject/admin/view/logmoneys/box.html
Executable file
@ -0,0 +1,36 @@
|
||||
<form id="userForm" autocomplete="off" >
|
||||
<table class='wst-form wst-box-top'>
|
||||
<tr>
|
||||
<th width='150'>账号<font color='red'>*</font>:</th>
|
||||
<td width='370'>
|
||||
{$object['loginName']}{if $object['userName']!=''}({$object['userName']}){/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='150'>类型<font color='red'>*</font>:</th>
|
||||
<td width='370'>
|
||||
<lable><input type='radio' name='moneyType' value='1'/>充值 </lable>
|
||||
<lable><input type='radio' name='moneyType' value='0'/>提现 </lable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='150'>充值金额<font color='red'>*</font>:</th>
|
||||
<td width='370'>
|
||||
<input type='text' id='money' maxLength='5'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='150'>充值备注<font color='red'>*</font>:</th>
|
||||
<td width='370'>
|
||||
<textarea style='width:80%;height:50px;' id='remark'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' align='center'>
|
||||
<input type="hidden" name="id" id="userId" class="ipt" value="<?=(int)$object['userId']?>" />
|
||||
<button type="submit" class="btn btn-primary btn-mright" ><i class="fa fa-check"></i>提交</button>
|
||||
<button type="button" class="btn" onclick="javascript:history.go(-1)"><i class="fa fa-angle-double-left"></i>返回</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
41
hyhproject/admin/view/logmoneys/list.html
Executable file
41
hyhproject/admin/view/logmoneys/list.html
Executable file
@ -0,0 +1,41 @@
|
||||
{extend name="base" /}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
|
||||
<script src="__ADMIN__/logmoneys/logmoneys.js?v={$v}" type="text/javascript"></script>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="msgTab">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this" >会员</li>
|
||||
<li >商家</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="padding: 0px 0;">
|
||||
<div id="template_user" class="layui-tab-item layui-show">
|
||||
<div class="wst-toolbar">
|
||||
账号:<input type='text' id='key1' placeholder='账号'/>
|
||||
<button class="btn btn-primary" onclick="javascript:loadUserGrid(0)"><i class="fa fa-search"></i>查询</button>
|
||||
</div>
|
||||
<div class='wst-grid'>
|
||||
<div id="mmg1" class="mmg1"></div>
|
||||
<div id="pg1" style="text-align: right;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="template_shop" class="layui-tab-item ">
|
||||
<div class="wst-toolbar">
|
||||
账号:<input type='text' id='key2' placeholder='账号/店铺名称'/>
|
||||
<button class="btn btn-primary" onclick="javascript:loadShopGrid(0)"><i class="fa fa-search"></i>查询</button>
|
||||
</div>
|
||||
<div class='wst-grid'>
|
||||
<div id="mmg2" class="mmg2"></div>
|
||||
<div id="pg2" style="text-align: right;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){initTab();})
|
||||
</script>
|
||||
{/block}
|
33
hyhproject/admin/view/logmoneys/list_log.html
Executable file
33
hyhproject/admin/view/logmoneys/list_log.html
Executable file
@ -0,0 +1,33 @@
|
||||
{extend name="base" /}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
|
||||
<script src="__ADMIN__/logmoneys/logmoneys.js?v={$v}" type="text/javascript"></script>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="msgTab">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">{$object['userName']}({$object['loginName']})资金流水</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content" style='padding:0px;'>
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="wst-toolbar">
|
||||
<input type="text" id="startDate" name="startDate" class="ipt laydate-icon" maxLength="20" />
|
||||
至
|
||||
<input type="text" id="endDate" name="endDate" class="ipt laydate-icon" maxLength="20" />
|
||||
<button type="button" class="btn btn-primary btn-mright" onclick='javascript:loadMoneyGrid({$object['userType']},{$object['userId']})'><i class="fa fa-search"></i>查询</button>
|
||||
<button type="button" class="btn f-right" onclick="javascript:history.go(-1)"><i class="fa fa-angle-double-left"></i>返回</button>
|
||||
<div style='clear: both'></div>
|
||||
</div>
|
||||
<div class='wst-grid'>
|
||||
<div id="mmg" class="mmg"></div>
|
||||
<div id="pg" style="text-align: right;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){moneyGridInit({$object['userType']},{$object['userId']});})
|
||||
</script>
|
||||
{/block}
|
134
hyhproject/admin/view/logmoneys/logmoneys.js
Executable file
134
hyhproject/admin/view/logmoneys/logmoneys.js
Executable file
@ -0,0 +1,134 @@
|
||||
var mmg1,mmg2,mmg3,h;
|
||||
function initTab(){
|
||||
var element = layui.element;
|
||||
var isInit = false;
|
||||
element.on('tab(msgTab)', function(data){
|
||||
if(data.index==1){
|
||||
if(!isInit){
|
||||
isInit = true;
|
||||
shopGridInit();
|
||||
}else{
|
||||
loadShopGrid();
|
||||
}
|
||||
}
|
||||
});
|
||||
userGridInit();
|
||||
}
|
||||
function userGridInit(){
|
||||
h = WST.pageHeight();
|
||||
var cols = [
|
||||
{title:'账号', name:'loginName', width: 50,sortable: true},
|
||||
{title:'名称', name:'userName' ,width:80,sortable: true},
|
||||
{title:'可用金额', name:'userMoney' ,width:200,sortable: true,renderer: function (rowdata, rowindex, value){
|
||||
return '¥'+rowindex['userMoney'];
|
||||
}},
|
||||
{title:'冻结金额', name:'lockMoney' ,width:70,sortable: true,renderer: function (rowdata, rowindex, value){
|
||||
return '¥'+rowindex['lockMoney'];
|
||||
}},
|
||||
{title:'操作', name:'op' ,width:20,renderer: function (val,item,rowIndex){
|
||||
return '<a class="btn btn-blue" href="javascript:tologmoneys(0,'+item['userId']+')"><i class="fa fa-search"></i>查看</a>';
|
||||
}}
|
||||
];
|
||||
|
||||
mmg1 = $('.mmg1').mmGrid({
|
||||
height: h-120,
|
||||
indexCol: true,
|
||||
indexColWidth:50,
|
||||
cols: cols,
|
||||
method:'POST',
|
||||
url: WST.U('admin/logmoneys/pageQueryByUser'),
|
||||
fullWidthRows:true,
|
||||
autoLoad: true,
|
||||
remoteSort:true ,
|
||||
sortName: 'userMoney',
|
||||
sortStatus: 'desc',
|
||||
plugins: [
|
||||
$('#pg1').mmPaginator({})
|
||||
]
|
||||
});
|
||||
}
|
||||
function shopGridInit(){
|
||||
h = WST.pageHeight();
|
||||
var cols = [
|
||||
{title:'账号', name:'loginName', width: 50},
|
||||
{title:'商家', name:'shopName' ,width:80},
|
||||
{title:'可用金额', name:'shopMoney' ,width:200,renderer: function (rowdata, rowindex, value){
|
||||
return '¥'+rowindex['shopMoney'];
|
||||
}},
|
||||
{title:'冻结金额', name:'lockMoney' ,width:70,renderer: function (rowdata, rowindex, value){
|
||||
return '¥'+rowindex['lockMoney'];
|
||||
}},
|
||||
{title:'操作', name:'op' ,width:20,renderer: function (val,item,rowIndex){
|
||||
return '<a class="btn btn-blue" href="javascript:tologmoneys(1,'+item['shopId']+')"><i class="fa fa-search"></i>查看</a>';
|
||||
}}
|
||||
];
|
||||
|
||||
mmg2 = $('.mmg2').mmGrid({height: h-120,indexCol: true,indexColWidth:50, cols: cols,method:'POST',
|
||||
url: WST.U('admin/logmoneys/pageQueryByShop'), fullWidthRows: true, autoLoad: true,
|
||||
plugins: [
|
||||
$('#pg2').mmPaginator({})
|
||||
]
|
||||
});
|
||||
}
|
||||
function loadUserGrid(){
|
||||
mmg1.load({page:1,key:$('#key1').val()});
|
||||
}
|
||||
function loadShopGrid(){
|
||||
mmg2.load({page:1,key:$('#key2').val()});
|
||||
}
|
||||
function tologmoneys(t,id){
|
||||
location.href= WST.U('admin/logmoneys/tologmoneys','id='+id+"&type="+t+"&startDate="+$('#startDate').val()+"&endDate="+'&endDate='+$('#endDate').val());
|
||||
}
|
||||
|
||||
function moneyGridInit(type,id){
|
||||
var h = WST.pageHeight();
|
||||
var laydate = layui.laydate;
|
||||
laydate.render({
|
||||
elem: '#startDate'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endDate'
|
||||
});
|
||||
var cols = [
|
||||
// {title:'来源', name:'dataSrc', width: 30},
|
||||
{title:'金额', name:'money' ,width:200,renderer: function (rowdata, rowindex, value){
|
||||
if(rowindex['moneyType']==1){
|
||||
return '<font color="red">+¥'+rowindex['money']+'</font>';
|
||||
}else{
|
||||
return '<font color="green">-¥'+rowindex['money']+'</font>';
|
||||
}
|
||||
}},
|
||||
{title:'券种', name:'moneyName' ,width:200,renderer: function (rowdata, rowindex, value){
|
||||
var str = '';
|
||||
switch(rowdata){
|
||||
case 1:
|
||||
str = '产品券';
|
||||
break;
|
||||
case 2:
|
||||
str = '优惠券';
|
||||
break;
|
||||
case 3:
|
||||
str = '旺旺券';
|
||||
break;
|
||||
case 4:
|
||||
str = '现金';
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
}},
|
||||
{title:'备注', name:'remark',width:370},
|
||||
{title:'外部流水', name:'tradeNo',width:120},
|
||||
{title:'日期', name:'createTime' ,width:60}
|
||||
];
|
||||
|
||||
mmg3 = $('.mmg').mmGrid({height: h-120,indexCol: true,indexColWidth:50, cols: cols,method:'POST',
|
||||
url: WST.U('admin/logmoneys/pageQuery','type='+type+'&id='+id), fullWidthRows: true, autoLoad: true,
|
||||
plugins: [
|
||||
$('#pg').mmPaginator({})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function loadMoneyGrid(t,id){
|
||||
mmg3.load({page:1,id:id,type:t,startDate:$('#startDate').val(),endDate:$('#endDate').val()});
|
||||
}
|
Reference in New Issue
Block a user