Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<form id="userForm" autocomplete="off" >
<table class='wst-form wst-box-top'>
<tr>
<th width='120'>账号<font color='red'>*</font></th>
<td height='25'>
{$object['loginName']}{if $object['userName']!=''}({$object['userName']}){/if}
</td>
</tr>
<tr>
<th>类型<font color='red'>*</font></th>
<td width='370' class='layui-form'>
<label><input type='radio' class='ipt' name='scoreType' value='1' checked title='增加'/> </label>
<label><input type='radio' class='ipt' name='scoreType' value='0' title='减少'/> </label>
</td>
</tr>
<tr>
<th>调节积分<font color='red'>*</font></th>
<td width='370'>
<input type='text' id='score' class='ipt' maxLength='8' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberKey(event)"/>
</td>
</tr>
<tr>
<th>调节备注<font color='red'>*</font></th>
<td width='370'>
<textarea style='width:80%;height:50px;' class='ipt' id='dataRemarks' maxLength='200'></textarea>
</td>
</tr>
<tr>
<td colspan='2' align='center' style='padding-top:8px;'>
<input type="hidden" name="id" id="userId" class="ipt" value="<?=(int)$object['userId']?>" />
<input type="button" value="提交" class='btn btn-primary btn-mright' onclick='javascript:editScore()'/>
<input type="button" onclick="javascript:closeFrom()" class='btn' value="返回" />
</td>
</tr>
</table>
</form>

View File

@ -0,0 +1,35 @@
{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__/userscores/userscores.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" placeholder='开始日期' class="laydate-icon ipt" maxLength="20" />
<input type="text" id="endDate" name="endDate" placeholder='结束日期' class="laydate-icon ipt" maxLength="20" />
<button class="btn btn-primary btn-mright" onclick='javascript:loadGrid({$object['userId']})'><i class='fa fa-search'></i>查询</button>
<button class="btn btn-gray f-right" onclick="javascript:history.go(-1)"><i class="fa fa-angle-double-left"></i>返回</button>
<button class="btn btn-success btn-mright f-right" onclick="javascript:toAdd({$object['userId']})"><i class='fa fa-plus'></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(){gridInit({$object['userId']});})
</script>
{/block}

View File

@ -0,0 +1,61 @@
var mmg;
function gridInit(id){
var laydate = layui.laydate;
laydate.render({
elem: '#startDate'
});
laydate.render({
elem: '#endDate'
});
var h = WST.pageHeight();
var cols = [
{title:'来源', name:'dataSrc', width: 60},
{title:'积分变化', name:'dataSrc',width: 60,renderer: function (val,item,rowIndex){
if(item['scoreType']==1){
return '<font color="red">+'+item['score']+'</font>';
}else{
return '<font color="green">-'+item['score']+'</font>';
}
}},
{title:'备注', name:'dataRemarks',width: 60},
{title:'日期', name:'createTime',width: 40}
];
mmg = $('.mmg').mmGrid({height: (h-120),indexCol: true, cols: cols,method:'POST',
url: WST.U('admin/userscores/pageQuery','id='+id), fullWidthRows: true, autoLoad: true,
plugins: [
$('#pg').mmPaginator({})
]
});
}
function loadGrid(id){
mmg.load({page:1,id:id,startDate:$('#startDate').val(),endDate:$('#endDate').val()});
}
var w;
function toAdd(id){
var ll = WST.msg('正在加载信息,请稍候...');
$.post(WST.U('admin/userscores/toAdd',{id:id}),{},function(data){
layer.close(ll);
w =WST.open({type: 1,title:"调节会员积分",shade: [0.6, '#000'],offset:'50px',border: [0],content:data,area: ['550px', '260px'],success:function(){
layui.form.render();
}});
});
}
function editScore(){
var params = WST.getParams('.ipt');
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
$.post(WST.U('admin/userscores/add'),params,function(data,textStatus){
layer.close(loading);
var json = WST.toAdminJson(data);
if(json.status=='1'){
WST.msg("操作成功",{icon:1});
closeFrom();
loadGrid(params.userId);
}else{
WST.msg(json.msg,{icon:2});
}
});
}
function closeFrom(){
layer.close(w);
}