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,81 @@
var mmg;
function initGrid(staffId){
var h = WST.pageHeight();
var cols = [
{title:'充值金额', name:'chargeMoney', width: 60},
{title:'赠送金额', name:'giveMoney' ,width:60},
{title:'排序号', name:'itemSort' ,width:50},
{title:'创建时间', name:'createTime' ,width:30},
{title:'操作', name:'op' ,width:150, align:'center', renderer: function(val,item,rowIndex){
var h = "";
if(WST.GRANT.CZGL_02)h += "<a class='btn btn-blue' onclick='javascript:location.href=\""+WST.U('admin/Chargeitems/toEdit','id='+item['id'])+"\"'><i class='fa fa-pencil'></i>修改</a> ";
if(WST.GRANT.CZGL_03)h += "<a class='btn btn-red' onclick='javascript:toDel(" + item['id'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
return h;
}}
];
mmg = $('.mmg').mmGrid({height: (h-80),indexCol: true, cols: cols,method:'POST',
url: WST.U('admin/Chargeitems/pageQuery'), fullWidthRows: true, autoLoad: true,
plugins: [
$('#pg').mmPaginator({})
]
});
}
function loadQuery(){
var query = WST.getParams('.query');
query.page = 1;
mmg.load(query);
}
function toDel(id){
var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
$.post(WST.U('admin/Chargeitems/del'),{id:id},function(data,textStatus){
layer.close(loading);
var json = WST.toAdminJson(data);
if(json.status=='1'){
WST.msg("操作成功",{icon:1});
layer.close(box);
loadQuery();
}else{
WST.msg(json.msg,{icon:2});
}
});
}});
}
function editInit(){
/* 表单验证 */
$('#adPositionsForm').validator({
fields: {
chargeMoney: {
rule:"required",
msg:{required:"请输入充值金额"},
tip:"请输入充值金额",
ok:"",
},
giveMoney: {
rule:"required;",
msg:{required:"请输入赠送金额"},
tip:"请输入赠送金额",
ok:"",
}
},
valid: function(form){
var params = WST.getParams('.ipt');
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
$.post(WST.U('admin/Chargeitems/'+((params.id==0)?"add":"edit")),params,function(data,textStatus){
layer.close(loading);
var json = WST.toAdminJson(data);
if(json.status=='1'){
WST.msg("操作成功",{icon:1});
location.href=WST.U('Admin/Chargeitems/index');
}else{
WST.msg(json.msg,{icon:2});
}
});
}
});
}

View File

@ -0,0 +1,46 @@
{extend name="base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
{/block}
{block name="js"}
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
<script src="__ADMIN__/chargeitems/chargeitems.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
<form id="adPositionsForm">
<table class='wst-form wst-box-top'>
<tr>
<tr>
<th width='150'>充值金额<font color='red'>*</font></th>
<td>
<input type="text" id="chargeMoney" name="chargeMoney" value='{$data['chargeMoney']}' class="ipt" onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/>
</td>
</tr>
<tr>
<th>赠送金额<font color='red'>*</font></th>
<td>
<input type="text" id="giveMoney" name="giveMoney" value='{$data['giveMoney']}' class="ipt" onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/>
</td>
</tr>
<tr>
<th>排序号<font color='red'> </font></th>
<td>
<input type='text' id='itemSort' name="itemSort" value='{$data['itemSort']}' class='ipt' maxLength='10' onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/>
</td>
</tr>
<tr>
<td colspan='2' align='center' class='wst-bottombar'>
<input type="hidden" name="id" id="id" class="ipt" value="{$data['id']+0}" />
<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>
<script>
$(function(){editInit()});
</script>
{/block}

View File

@ -0,0 +1,23 @@
{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__/chargeitems/chargeitems.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
{if WSTGrant('GGWZ_01')}
<div class="wst-toolbar">
<button class="btn btn-success f-right" onclick="javascript:location.href='<?=url("Chargeitems/toEdit")?>'"><i class='fa fa-plus'></i>新增</button>
<div style="clear:both"></div>
</div>
{/if}
<div class='wst-grid'>
<div id="mmg" class="mmg"></div>
<div id="pg" style="text-align: right;"></div>
</div>
<script>
$(function(){initGrid()});
</script>
{/block}