Init Repo
							
								
								
									
										156
									
								
								hyhproject/admin/view/accreds/accreds.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,156 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
  var h = WST.pageHeight();
 | 
			
		||||
  var cols = [
 | 
			
		||||
            {title:'图标', name:'accredImg' ,width:50, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
               return '<img src="'+WST.conf.IMGURL+'/'+item['accredImg']+'" height="28px" />';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'认证名称', name:'accredName' ,width:125},
 | 
			
		||||
            {title:'创建时间', name:'createTime' ,width:75,},
 | 
			
		||||
            {title:'操作', name:'' ,width:60, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h="";
 | 
			
		||||
	            if(WST.GRANT.RZGL_02)h += "<a  class='btn btn-blue' href='javascript:getForEdit(" + item['accredId'] + ")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
	            if(WST.GRANT.RZGL_03)h += "<a  class='btn btn-red' href='javascript:toDel(" + item['accredId'] + ")'><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/Accreds/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function getForEdit(id){
 | 
			
		||||
	 var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
     $.post(WST.U('admin/accreds/get'),{id:id},function(data,textStatus){
 | 
			
		||||
           layer.close(loading);
 | 
			
		||||
           var json = WST.toAdminJson(data);
 | 
			
		||||
           if(json.accredId){
 | 
			
		||||
           		WST.setValues(json);
 | 
			
		||||
           		//显示原来的图片
 | 
			
		||||
           		$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.accredImg+'" height="70px" />');
 | 
			
		||||
           		$('#isImg').val('ok');
 | 
			
		||||
           		toEdit(json.accredId);
 | 
			
		||||
           }else{
 | 
			
		||||
           		WST.msg(json.msg,{icon:2});
 | 
			
		||||
           }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
	if(!isInitUpload){
 | 
			
		||||
		initUpload();
 | 
			
		||||
	}
 | 
			
		||||
	var title =(id==0)?"新增":"编辑";
 | 
			
		||||
	var box = WST.open({title:title,type:1,content:$('#accredBox'),area: ['450px', '280px'],btn: ['确定','取消'],yes:function(){
 | 
			
		||||
			$('#accredForm').submit();
 | 
			
		||||
	},cancel:function(){
 | 
			
		||||
		//重置表单
 | 
			
		||||
		$('#accredForm')[0].reset();
 | 
			
		||||
		//清空预览图
 | 
			
		||||
		$('#preview').html('');
 | 
			
		||||
		$('#accredImg').val('');
 | 
			
		||||
 | 
			
		||||
	},end:function(){
 | 
			
		||||
		$('#accredBox').hide();
 | 
			
		||||
		//重置表单
 | 
			
		||||
		$('#accredForm')[0].reset();
 | 
			
		||||
		//清空预览图
 | 
			
		||||
		$('#preview').html('');
 | 
			
		||||
		$('#accredImg').val('');
 | 
			
		||||
 | 
			
		||||
	}});
 | 
			
		||||
	$('#accredForm').validator({
 | 
			
		||||
        fields: {
 | 
			
		||||
            accredName: {
 | 
			
		||||
            	rule:"required;",
 | 
			
		||||
            	msg:{required:"请输入认证名称"},
 | 
			
		||||
            	tip:"请输入认证名称",
 | 
			
		||||
            	ok:"",
 | 
			
		||||
            },
 | 
			
		||||
            accredImg:  {
 | 
			
		||||
            	rule:"required;",
 | 
			
		||||
            	msg:{required:"请上传图标"},
 | 
			
		||||
            	tip:"请上传图标",
 | 
			
		||||
            	ok:"",
 | 
			
		||||
            },
 | 
			
		||||
            
 | 
			
		||||
        },
 | 
			
		||||
       valid: function(form){
 | 
			
		||||
		        var params = WST.getParams('.ipt');
 | 
			
		||||
		        	params.accredId = id;
 | 
			
		||||
		        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
		   		$.post(WST.U('admin/accreds/'+((id==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
		   			  layer.close(loading);
 | 
			
		||||
		   			  var json = WST.toAdminJson(data);
 | 
			
		||||
		   			  if(json.status=='1'){
 | 
			
		||||
		   			    	WST.msg("操作成功",{icon:1});
 | 
			
		||||
		   			    	$('#accredForm')[0].reset();
 | 
			
		||||
		   			    	//清空预览图
 | 
			
		||||
		   			    	$('#preview').html('');
 | 
			
		||||
		   			    	//清空图片隐藏域
 | 
			
		||||
		   			    	$('#accredImg').val('');
 | 
			
		||||
		   			    	layer.close(box);
 | 
			
		||||
		   		            mmg.load();
 | 
			
		||||
		   			  }else{
 | 
			
		||||
		   			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
		   			  }
 | 
			
		||||
		   		});
 | 
			
		||||
 | 
			
		||||
    	}
 | 
			
		||||
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
var isInitUpload = false;
 | 
			
		||||
function initUpload(){
 | 
			
		||||
	isInitUpload = true;
 | 
			
		||||
	//文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
	    pick:'#adFilePicker',
 | 
			
		||||
	    formData: {dir:'accreds'},
 | 
			
		||||
	    accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
	    callback:function(f){
 | 
			
		||||
	      var json = WST.toAdminJson(f);
 | 
			
		||||
	      if(json.status==1){
 | 
			
		||||
	        $('#uploadMsg').empty().hide();
 | 
			
		||||
	        //将上传的图片路径赋给全局变量
 | 
			
		||||
		    $('#accredImg').val(json.savePath+json.name);
 | 
			
		||||
		    $('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" height="75" />');
 | 
			
		||||
	      }else{
 | 
			
		||||
	      	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	      }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/Accreds/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);
 | 
			
		||||
	           		            mmg.load();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
							
								
								
									
										50
									
								
								hyhproject/admin/view/accreds/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,50 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/accreds/accreds.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
{if WSTGrant('RZGL_01')}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
   <button class="btn btn-success f-right" onclick="javascript:toEdit(0)"><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>
 | 
			
		||||
 | 
			
		||||
<div id='accredBox' style='display:none'>
 | 
			
		||||
    <form id='accredForm' method="post" autocomplete="off">
 | 
			
		||||
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='150'>认证名称<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><input type='text' id='accredName' name="accredName"  class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>图标:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <div id='adFilePicker'>上传图标</div><span id='uploadMsg'></span>
 | 
			
		||||
            <input type='hidden' id='accredImg' name="accredImg" class="ipt" />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>预览图:</th>
 | 
			
		||||
          <td><div style="min-height:70px;" id="preview"></div></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
 | 
			
		||||
    </form>
 | 
			
		||||
 | 
			
		||||
  </div>
 | 
			
		||||
<script>
 | 
			
		||||
  $(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										110
									
								
								hyhproject/admin/view/addons/addons.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,110 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'名称', name:'title', width: 50,sortable:true},
 | 
			
		||||
            {title:'标识', name:'name', width: 10,sortable:true},
 | 
			
		||||
            {title:'描述', name:'description', width: 220,sortable:true},
 | 
			
		||||
            {title:'状态', name:'status', width: 10,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
              	if(item['status']==0){
 | 
			
		||||
                    return "<span class='statu-wait'><i class='fa fa-ban'></i> "+item.statusName+"</span>";
 | 
			
		||||
            	}else if(item['status']==2){
 | 
			
		||||
            		return "<span class='statu-no'><i class='fa fa-ban'></i> "+item.statusName+"</span>";
 | 
			
		||||
            	}else{
 | 
			
		||||
                    return "<span class='statu-yes'><i class='fa fa-check-circle'></i> "+item.statusName+"</span>";
 | 
			
		||||
            	}
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'作者', name:'author', width: 10,sortable:true},
 | 
			
		||||
            {title:'版本', name:'version', width: 5,sortable:true},
 | 
			
		||||
            {title:'操作', name:'' ,width:100, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
	            if(WST.GRANT.CJGL_01 && item['status']>0 && item['isConfig']==1)h += "<a class='btn btn-blue' href='"+WST.U('admin/Addons/toEdit','id='+item['addonId'])+"'><i class='fa fa-gear'></i>设置</a> ";
 | 
			
		||||
	            if(WST.GRANT.CJGL_02 && item['status']==0)h += "<a class='btn btn-blue' href='javascript:install(" + item['addonId'] + ")'><i class='fa fa-gear'></i>安装</a> "; 
 | 
			
		||||
	            if(WST.GRANT.CJGL_03 && item['status']>0)h += "<a class='btn btn-red' href='javascript:uninstall(" + item['addonId'] + ")'><i class='fa fa-trash-o'></i>卸载</a> "; 
 | 
			
		||||
	            if(WST.GRANT.CJGL_04 && item['status']==2)h += "<a class='btn btn-blue' href='javascript:enable(" + item['addonId'] + ")'><i class='fa fa-check'></i>启用</a> "; 
 | 
			
		||||
	            if(WST.GRANT.CJGL_05 && item['status']==1)h += "<a class='btn btn-red' href='javascript:disable(" + item['addonId'] + ")'><i class='fa fa-ban'></i>禁用</a> ";
 | 
			
		||||
	            return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/addons/pageQuery'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'status',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//安装
 | 
			
		||||
function install(id){
 | 
			
		||||
	var loading = WST.msg('正在安装,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/addons/install'),{id:id},function(data,textStatus){
 | 
			
		||||
		layer.close(loading);
 | 
			
		||||
		var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status=='1'){
 | 
			
		||||
	       	WST.msg("安装成功,请刷页面",{icon:1});
 | 
			
		||||
	        layer.close(loading);
 | 
			
		||||
	         addonsQuery();
 | 
			
		||||
		}else{
 | 
			
		||||
			WST.msg(json.msg,{icon:2});
 | 
			
		||||
	     }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//卸载
 | 
			
		||||
function uninstall(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要卸载吗?",yes:function(){
 | 
			
		||||
		var loading = WST.msg('正在卸载,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
		$.post(WST.U('admin/addons/uninstall'),{id:id},function(data,textStatus){
 | 
			
		||||
			layer.close(loading);
 | 
			
		||||
			var json = WST.toAdminJson(data);
 | 
			
		||||
			if(json.status=='1'){
 | 
			
		||||
	        	WST.msg("卸载成功,请刷页面",{icon:1});
 | 
			
		||||
	         	layer.close(box);
 | 
			
		||||
	         	addonsQuery();
 | 
			
		||||
			}else{
 | 
			
		||||
				WST.msg(json.msg,{icon:2});
 | 
			
		||||
	     	}
 | 
			
		||||
		});
 | 
			
		||||
	}});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//禁用
 | 
			
		||||
function enable(id){
 | 
			
		||||
	var loading = WST.msg('正在启用,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/addons/enable'),{id:id},function(data,textStatus){
 | 
			
		||||
		layer.close(loading);
 | 
			
		||||
		var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status=='1'){
 | 
			
		||||
	       	WST.msg("启用成功",{icon:1});
 | 
			
		||||
	        layer.close(loading);
 | 
			
		||||
	        addonsQuery();
 | 
			
		||||
		}else{
 | 
			
		||||
			WST.msg(json.msg,{icon:2});
 | 
			
		||||
	     }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//启用
 | 
			
		||||
function disable(id){
 | 
			
		||||
	var loading = WST.msg('正在禁用,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/addons/disable'),{id:id},function(data,textStatus){
 | 
			
		||||
		layer.close(loading);
 | 
			
		||||
		var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status=='1'){
 | 
			
		||||
	       	WST.msg("禁用成功",{icon:1});
 | 
			
		||||
	        layer.close(loading);
 | 
			
		||||
	        addonsQuery();
 | 
			
		||||
		}else{
 | 
			
		||||
			WST.msg(json.msg,{icon:2});
 | 
			
		||||
	     }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//查询
 | 
			
		||||
function addonsQuery(){
 | 
			
		||||
	var query = WST.getParams('.query');
 | 
			
		||||
	query.page = 1;
 | 
			
		||||
	mmg.load(query);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										168
									
								
								hyhproject/admin/view/addons/config.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,168 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
	<div >
 | 
			
		||||
	<form action="{:url('saveConfig')}" method="post" style="line-height: 30px;margin:10px;" autocomplete="off">
 | 
			
		||||
			<div class="main-title cf">
 | 
			
		||||
				<div class="addoncfg-title">插件配置 [ {$data.title} ]</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			{foreach name="data['config']" item="form" key="o_key"}
 | 
			
		||||
				<div class="form-item cf">
 | 
			
		||||
				{present name="form.title"}
 | 
			
		||||
					<label class="item-label">
 | 
			
		||||
						<span style="font-weight: bold;">{$form.title|default=''}</span>
 | 
			
		||||
						
 | 
			
		||||
					</label>
 | 
			
		||||
					{/present}
 | 
			
		||||
						{switch name="form.type"}
 | 
			
		||||
							{case value="tips"}
 | 
			
		||||
							<div>
 | 
			
		||||
								{$form.value}
 | 
			
		||||
							</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
							{case value="text"}
 | 
			
		||||
							<div>
 | 
			
		||||
								<input type="text" name="config[{$o_key}]" class="text input-large" value="{$form.value}"  style="width:400px;"><?php if(isset($form['tips'])){ ?><span>{$form.tips}</span><?php } ?>
 | 
			
		||||
							</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
							{case value="password"}
 | 
			
		||||
							<div>
 | 
			
		||||
								<input type="password" name="config[{$o_key}]" class="text input-large" value="{$form.value}">
 | 
			
		||||
							</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
							{case value="hidden"}
 | 
			
		||||
								<input type="hidden" name="config[{$o_key}]" value="{$form.value}">
 | 
			
		||||
							{/case}
 | 
			
		||||
							{case value="radio"}
 | 
			
		||||
							<div class="layui-form">
 | 
			
		||||
								{foreach name="form.options" item="opt" key="opt_k"}
 | 
			
		||||
									<label class="radio">
 | 
			
		||||
										<input type="radio" name="config[{$o_key}]" value="{$opt_k}" {eq name="form.value" value="$opt_k"} checked{/eq} title="{$opt}">
 | 
			
		||||
									</label>
 | 
			
		||||
								{/foreach}
 | 
			
		||||
							</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
							{case value="checkbox"}
 | 
			
		||||
							<div>
 | 
			
		||||
								{foreach name="form.options" item="opt" key="opt_k"}
 | 
			
		||||
									<label class="checkbox">
 | 
			
		||||
										{php}
 | 
			
		||||
											is_null($form["value"]) && $form["value"] = array();
 | 
			
		||||
										{/php}
 | 
			
		||||
										<input type="checkbox" name="config[{$o_key}][]" value="{$opt_k}" {in name="opt_k" value="$form.value"}checked{/in}>{$opt}
 | 
			
		||||
									</label>
 | 
			
		||||
								{/foreach}
 | 
			
		||||
							</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
							{case value="select"}
 | 
			
		||||
							<div>
 | 
			
		||||
								<select name="config[{$o_key}]">
 | 
			
		||||
									{foreach name="form.options" item="opt" key="opt_k"}
 | 
			
		||||
										<option value="{$opt_k}" {eq name="form.value" value="$opt_k"} selected{/eq}>{$opt}</option>
 | 
			
		||||
									{/foreach}
 | 
			
		||||
								</select>
 | 
			
		||||
							</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
							{case value="textarea"}
 | 
			
		||||
							<div>
 | 
			
		||||
								<label class="textarea input-large">
 | 
			
		||||
									<textarea name="config[{$o_key}]" style="width:500px;height:200px;">{$form.value}</textarea>
 | 
			
		||||
								</label>
 | 
			
		||||
							</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
							
 | 
			
		||||
							{case value="group"}
 | 
			
		||||
								<ul class="tab-nav nav">
 | 
			
		||||
									{volist name="form.options" id="li"}
 | 
			
		||||
										<li data-tab="tab{$i}" {eq name="i" value="1"}class="current" {/eq} ><a href="javascript:void(0);">{$li.title}</a></li>
 | 
			
		||||
									{/volist}
 | 
			
		||||
									<div style="clear: both;"></div>
 | 
			
		||||
								</ul>
 | 
			
		||||
								<div class="tab-content">
 | 
			
		||||
								{volist name="form.options" id="tab"}
 | 
			
		||||
									<div id="tab{$i}" class="tab-pane {eq name="i" value="1"}in{/eq} tab{$i}">
 | 
			
		||||
										{foreach name="tab['options']" item="tab_form" key="o_tab_key"}
 | 
			
		||||
										<label class="item-label">
 | 
			
		||||
											<span style="font-weight: bold;">{$tab_form.title|default=''}</span>
 | 
			
		||||
											{present name="tab_form.tip"}
 | 
			
		||||
												<span class="check-tips">{$tab_form.tip}</span>
 | 
			
		||||
											{/present}
 | 
			
		||||
										</label>
 | 
			
		||||
										<div>
 | 
			
		||||
											{switch name="tab_form.type"}
 | 
			
		||||
												{case value="tips"}
 | 
			
		||||
												<div>
 | 
			
		||||
													{$form.value}
 | 
			
		||||
												</div>
 | 
			
		||||
												{/case}
 | 
			
		||||
												{case value="text"}
 | 
			
		||||
													<input type="text" name="config[{$o_tab_key}]" class="text input-large" value="{$tab_form.value}" style="width:400px;">
 | 
			
		||||
												{/case}
 | 
			
		||||
												{case value="password"}
 | 
			
		||||
													<input type="password" name="config[{$o_tab_key}]" class="text input-large" value="{$tab_form.value}">
 | 
			
		||||
												{/case}
 | 
			
		||||
												{case value="hidden"}
 | 
			
		||||
													<input type="hidden" name="config[{$o_tab_key}]" value="{$tab_form.value}">
 | 
			
		||||
												{/case}
 | 
			
		||||
												{case value="radio"}
 | 
			
		||||
													{foreach name="tab_form.options" item="opt" key="opt_k"}
 | 
			
		||||
														<label class="layui-form radio">
 | 
			
		||||
															<input type="radio" name="config[{$o_tab_key}]" value="{$opt_k}" {eq name="tab_form.value" value="$opt_k"} checked{/eq} title="{$opt}">
 | 
			
		||||
														</label>
 | 
			
		||||
													{/foreach}
 | 
			
		||||
												{/case}
 | 
			
		||||
												{case value="checkbox"}
 | 
			
		||||
													{foreach name="tab_form.options" item="opt" key="opt_k"}
 | 
			
		||||
														<label class="checkbox">
 | 
			
		||||
															{php} 
 | 
			
		||||
															is_null($tab_form["value"]) && $tab_form["value"] = array();
 | 
			
		||||
															{/php}
 | 
			
		||||
															<input type="checkbox" name="config[{$o_tab_key}][]" value="{$opt_k}" {in name="opt_k" value="$tab_form.value"} checked{/in}>{$opt}
 | 
			
		||||
														</label>
 | 
			
		||||
													{/foreach}
 | 
			
		||||
												{/case}
 | 
			
		||||
												{case value="select"}
 | 
			
		||||
													<select name="config[{$o_tab_key}]">
 | 
			
		||||
														{foreach name="tab_form.options" item="opt" key="opt_k"}
 | 
			
		||||
															<option value="{$opt_k}" {eq name="tab_form.value" value="$opt_k"} selected{/eq}>{$opt}</option>
 | 
			
		||||
														{/foreach}
 | 
			
		||||
													</select>
 | 
			
		||||
												{/case}
 | 
			
		||||
												{case value="textarea"}
 | 
			
		||||
													<label>
 | 
			
		||||
														<textarea name="config[{$o_tab_key}]">{$tab_form.value}</textarea>
 | 
			
		||||
													</label>
 | 
			
		||||
												{/case}
 | 
			
		||||
												
 | 
			
		||||
												{/switch}
 | 
			
		||||
											</div>
 | 
			
		||||
										{/foreach}
 | 
			
		||||
									</div>
 | 
			
		||||
								{/volist}
 | 
			
		||||
								</div>
 | 
			
		||||
							{/case}
 | 
			
		||||
						{/switch}
 | 
			
		||||
					</div>
 | 
			
		||||
			{/foreach}
 | 
			
		||||
		<div class="form-item cf wst-bottombar" style='padding-left:130px;padding-top:10px'>
 | 
			
		||||
		<input type="hidden" name="id" value="{$addonId}" readonly/>
 | 
			
		||||
		<button type="submit" class="btn submit-btn ajax-post btn-primary btn-mright" ><i class="fa fa-check"></i>确 定</button>    
 | 
			
		||||
		<button type="button"  class='btn' onclick="location.href='{:url("admin/addons/index")}'"><i class="fa fa-angle-double-left"></i>返回</button>
 | 
			
		||||
		</div>
 | 
			
		||||
	</form>
 | 
			
		||||
	</div>
 | 
			
		||||
{/block}
 | 
			
		||||
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script type="text/javascript" charset="utf-8">
 | 
			
		||||
 | 
			
		||||
$(function(){
 | 
			
		||||
	 $(".tab-nav li").click(function(){
 | 
			
		||||
	        var self = $(this), target = self.data("tab");
 | 
			
		||||
	        self.addClass("current").siblings(".current").removeClass("current");
 | 
			
		||||
	        //window.location.hash = "#" + target.substr(3);
 | 
			
		||||
	        $(".tab-pane.in").removeClass("in");
 | 
			
		||||
	        $("." + target).addClass("in");
 | 
			
		||||
	}).filter("[data-tab=tab" + window.location.hash.substr(1) + "]").click();
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										27
									
								
								hyhproject/admin/view/addons/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,27 @@
 | 
			
		||||
{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__/addons/addons.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
	<div id="query" style="float:left;">
 | 
			
		||||
		<input type="text" name="keyWords" placeholder="插件名称、标识" id="keyWords" class="j-ipt query">
 | 
			
		||||
		<button type="button"  class='btn btn-primary btn-mright'  onclick="javascript:addonsQuery()"><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
		<span style="color:red;font-weight:bold;">  安装插件后,进入“设置”,填写配置信息,然后点击保存!</span>
 | 
			
		||||
	</div>
 | 
			
		||||
  
 | 
			
		||||
   <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>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										184
									
								
								hyhproject/admin/view/adgoods/admgrs.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,184 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
  var h = WST.pageHeight();
 | 
			
		||||
  var cols = [
 | 
			
		||||
            {title:'图标', name:'' ,width:50, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
               var adGoodsImg = item['adGoodsImg'].split(',');
 | 
			
		||||
               return'<img src="'+WST.conf.IMGURL+'/'+adGoodsImg[0]+'" height="28px" width="100"/>';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'广告名称', name:'adName' ,width:80},
 | 
			
		||||
            {title:'商品名称', name:'goodsName' ,width:130},
 | 
			
		||||
            {title:'商品种类', name:'adGoodsStatus' ,width:30,renderer: function(val,item,rowIndex){
 | 
			
		||||
                if(item['adGoodsStatus']==1){return "精选"}
 | 
			
		||||
                if(item['adGoodsStatus']==2){return "推荐"}
 | 
			
		||||
                if(item['adGoodsStatus']==3){return "热卖"}
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'广告开始日期', name:'startDate' ,width:50},
 | 
			
		||||
            {title:'广告结束日期', name:'endDate' ,width:50},
 | 
			
		||||
            {title:'操作', name:'' ,width:80, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                if(WST.GRANT.GGGL_02)h += "<a  class='btn btn-blue' href='javascript:toEdit("+item['adGoodsId']+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
                if(WST.GRANT.GGGL_03)h += "<a  class='btn btn-red' href='javascript:toDel(" + item['adGoodsId'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-155,indexCol: true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/adgoods/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         if(v){
 | 
			
		||||
             mmg.resize({height:h-155});
 | 
			
		||||
         }else{
 | 
			
		||||
             mmg.resize({height:h-128});
 | 
			
		||||
         }
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
   location.href = WST.U('admin/adgoods/toEdit','id='+id);
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/Adgoods/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 loadQuery(){
 | 
			
		||||
    var query = WST.getParams('.query');
 | 
			
		||||
    query.page = 1;
 | 
			
		||||
    mmg.load(query);
 | 
			
		||||
}
 | 
			
		||||
var oldSort;
 | 
			
		||||
function changeSort(t,id){
 | 
			
		||||
   $(t).attr('ondblclick'," ");
 | 
			
		||||
var html = "<input type='text' id='sort-"+id+"' style='width:30px;padding:2px;' onblur='doneChange(this,"+id+")' value='"+$(t).html()+"' />";
 | 
			
		||||
 $(t).html(html);
 | 
			
		||||
 $('#sort-'+id).focus();
 | 
			
		||||
 $('#sort-'+id).select();
 | 
			
		||||
 oldSort = $(t).html();
 | 
			
		||||
}
 | 
			
		||||
function doneChange(t,id){
 | 
			
		||||
  var sort = ($(t).val()=='')?0:$(t).val();
 | 
			
		||||
  if(sort==oldSort){
 | 
			
		||||
    $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
    $(t).parent().html(parseInt(sort));
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  $.post(WST.U('admin/adgoods/changeSort'),{id:id,adSort:sort},function(data){
 | 
			
		||||
    var json = WST.toAdminJson(data);
 | 
			
		||||
    if(json.status==1){
 | 
			
		||||
        $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
        $(t).parent().html(parseInt(sort));
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
//查询
 | 
			
		||||
function adsQuery(){
 | 
			
		||||
		var query = WST.getParams('.query');
 | 
			
		||||
	    grid.set('url',WST.U('admin/adgoods/pageQuery',query));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editInit(){
 | 
			
		||||
  var laydate = layui.laydate;
 | 
			
		||||
    form = layui.form; 
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
  //文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
  	  pick:'#adFilePicker',
 | 
			
		||||
  	  formData: {dir:'adspic'},
 | 
			
		||||
      compress:false,//默认不对图片进行压缩
 | 
			
		||||
  	  accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
  	  callback:function(f){
 | 
			
		||||
  		  var json = WST.toAdminJson(f);
 | 
			
		||||
  		  if(json.status==1){
 | 
			
		||||
  			$('#uploadMsg').empty().hide();
 | 
			
		||||
        var html = '<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" />';
 | 
			
		||||
        $('#preview').html(html);
 | 
			
		||||
        // 图片路径
 | 
			
		||||
        $('#adGoodsImg').val(json.savePath+json.name);
 | 
			
		||||
  		  }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
    });
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
 /* 表单验证 */
 | 
			
		||||
    $('#adsForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                adGoodsStatus: {
 | 
			
		||||
                  rule:"required",
 | 
			
		||||
                  msg:{required:"请选择广告商品类型"},
 | 
			
		||||
                  tip:"请选择广告商品类型",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adId: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"广告名称不能为空"},
 | 
			
		||||
                  tip:"请输入广告名称",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adGoodsImg: {
 | 
			
		||||
                    rule:"required;",
 | 
			
		||||
                    msg:{required:"请上传广告图片"},
 | 
			
		||||
                    tip:"请上传广告图片",
 | 
			
		||||
                    ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                goodsId: {
 | 
			
		||||
                    rule:"required;",
 | 
			
		||||
                    msg:{required:"请上传广告商品"},
 | 
			
		||||
                    tip:"请上传广告商品",
 | 
			
		||||
                    ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                startDate: {
 | 
			
		||||
                  rule:"required;match(lt, endDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告开始时间",match:"必须小于广告结束时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                endDate: {
 | 
			
		||||
                  rule:"required;match(gt, startDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告结束时间",match:"必须大于广告开始时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
          valid: function(form){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
            var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
            $.post(WST.U('admin/Adgoods/'+((params.adGoodsId==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/Adgoods/index');
 | 
			
		||||
              }else{
 | 
			
		||||
                    WST.msg(json.msg,{icon:2});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
							
								
								
									
										189
									
								
								hyhproject/admin/view/adgoods/ads.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,189 @@
 | 
			
		||||
var grid;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
	grid = $("#maingrid").ligerGrid({
 | 
			
		||||
		url:WST.U('admin/Ads/pageQuery'),
 | 
			
		||||
		pageSize:WST.pageSize,
 | 
			
		||||
		pageSizeOptions:WST.pageSizeOptions,
 | 
			
		||||
		height:'99%',
 | 
			
		||||
        width:'100%',
 | 
			
		||||
        minColToggle:6,
 | 
			
		||||
        rownumbers:true,
 | 
			
		||||
        columns: [
 | 
			
		||||
	        { display: '标题', name: 'adName', isSort: false},
 | 
			
		||||
	        { display: '广告位置', name: 'adPositionId', isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
	        	return rowdata['positionName'];
 | 
			
		||||
	        }},
 | 
			
		||||
	        { display: '广告网址', name: 'adURL', isSort: false},
 | 
			
		||||
	        { display: '广告开始日期', name: 'adStartDate', isSort: false},
 | 
			
		||||
	        { display: '广告结束日期', name: 'adEndDate', isSort: false},
 | 
			
		||||
	        { display: '图标', name: 'adFile', height: '300', isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
            var adFile = rowdata['adFile'].split(',');
 | 
			
		||||
              return'<img src="'+WST.conf.IMGURL+'/'+adFile[0]+'" height="28px" />';
 | 
			
		||||
	        }},
 | 
			
		||||
          { display: '点击数', name: 'adClickNum', isSort: false},
 | 
			
		||||
	        { display: '排序号', name: 'adSort', isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
              return '<span style="cursor:pointer;" ondblclick="changeSort(this,'+rowdata["adId"]+');">'+value+'</span>';
 | 
			
		||||
          }},
 | 
			
		||||
	        { display: '操作', name: 'op',isSort: false,render: function (rowdata, rowindex, value){
 | 
			
		||||
	        	var h = "";
 | 
			
		||||
	            if(WST.GRANT.GGGL_02)h += "<a href='"+WST.U('admin/Ads/toEdit','id='+rowdata['adId'])+"'>修改</a> ";
 | 
			
		||||
	            if(WST.GRANT.GGGL_03)h += "<a href='javascript:toDel(" + rowdata['adId'] + ")'>删除</a> "; 
 | 
			
		||||
	            return h;
 | 
			
		||||
	        }}
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/Ads/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);
 | 
			
		||||
	           		            grid.reload();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var oldSort;
 | 
			
		||||
function changeSort(t,id){
 | 
			
		||||
 $(t).attr('ondblclick'," ");
 | 
			
		||||
var html = "<input type='text' id='sort-"+id+"' style='width:30px;' onblur='doneChange(this,"+id+")' value='"+$(t).html()+"' />";
 | 
			
		||||
 $(t).html(html);
 | 
			
		||||
 $('#sort-'+id).focus();
 | 
			
		||||
 $('#sort-'+id).select();
 | 
			
		||||
 oldSort = $(t).html();
 | 
			
		||||
}
 | 
			
		||||
function doneChange(t,id){
 | 
			
		||||
  var sort = ($(t).val()=='')?0:$(t).val();
 | 
			
		||||
  if(sort==oldSort){
 | 
			
		||||
    $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
    $(t).parent().html(parseInt(sort));
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  $.post(WST.U('admin/ads/changeSort'),{id:id,adSort:sort},function(data){
 | 
			
		||||
    var json = WST.toAdminJson(data);
 | 
			
		||||
    if(json.status==1){
 | 
			
		||||
        $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
        $(t).parent().html(parseInt(sort));
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
//查询
 | 
			
		||||
function adsQuery(){
 | 
			
		||||
		var query = WST.getParams('.query');
 | 
			
		||||
	    grid.set('url',WST.U('admin/ads/pageQuery',query));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editInit(){
 | 
			
		||||
  //文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
  	  pick:'#adFilePicker',
 | 
			
		||||
  	  formData: {dir:'adspic'},
 | 
			
		||||
      compress:false,//默认不对图片进行压缩
 | 
			
		||||
  	  accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
  	  callback:function(f){
 | 
			
		||||
  		  var json = WST.toAdminJson(f);
 | 
			
		||||
  		  if(json.status==1){
 | 
			
		||||
  			$('#uploadMsg').empty().hide();
 | 
			
		||||
        var html = '<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" />';
 | 
			
		||||
        $('#preview').html(html);
 | 
			
		||||
        // 图片路径
 | 
			
		||||
        $('#adFile').val(json.savePath+json.name);
 | 
			
		||||
  		  }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
    });
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
 /* 表单验证 */
 | 
			
		||||
    $('#adsForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                adPositionId: {
 | 
			
		||||
                  rule:"required",
 | 
			
		||||
                  msg:{required:"请选择广告位置"},
 | 
			
		||||
                  tip:"请选择广告位置",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adName: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"广告标题不能为空"},
 | 
			
		||||
                  tip:"请输入广告标题",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adFile: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"请上传广告图片"},
 | 
			
		||||
                  tip:"请上传广告图片",
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                adStartDate: {
 | 
			
		||||
                  rule:"required;match(lt, adEndDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告开始时间",match:"必须小于广告结束时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adEndDate: {
 | 
			
		||||
                  rule:"required;match(gt, adStartDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告结束时间",match:"必须大于广告开始时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
          valid: function(form){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
            var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
            $.post(WST.U('admin/Ads/'+((params.adId==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/Ads/index');
 | 
			
		||||
              }else{
 | 
			
		||||
                    WST.msg(json.msg,{icon:2});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
var positionInfo;
 | 
			
		||||
/*获取地址*/
 | 
			
		||||
function addPosition(pType, val, getSize)
 | 
			
		||||
{
 | 
			
		||||
    $.post(WST.U('admin/Adpositions/getPositon'),{'positionType':pType},function(data,textStatus){
 | 
			
		||||
        positionInfo = data;
 | 
			
		||||
        var html='<option value="">请选择</option>';
 | 
			
		||||
        $(data).each(function(k,v){
 | 
			
		||||
			var selected;
 | 
			
		||||
            if(v.positionId==val){
 | 
			
		||||
              selected = 'selected="selected"';
 | 
			
		||||
              getPhotoSize(v.positionId);
 | 
			
		||||
            }
 | 
			
		||||
            html +='<option '+selected+' value="'+v.positionId+'">'+v.positionName+'</option>';
 | 
			
		||||
        });
 | 
			
		||||
        $('#adPositionId').html(html);
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
/*获取图片尺寸 以及设置图片显示方式*/
 | 
			
		||||
function getPhotoSize(pType)
 | 
			
		||||
{
 | 
			
		||||
  $(positionInfo).each(function(k,v){
 | 
			
		||||
      if(v.positionId==pType){
 | 
			
		||||
        $('#img_size').html(v.positionWidth+'x'+v.positionHeight);
 | 
			
		||||
        if(v.positionWidth>v.positionHeight){
 | 
			
		||||
             $('.ads-h-list').removeClass('ads-h-list').addClass('ads-w-list');
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										92
									
								
								hyhproject/admin/view/adgoods/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,92 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<style>
 | 
			
		||||
#preview img{max-width: 600px;max-height:150px;}
 | 
			
		||||
</style>
 | 
			
		||||
<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__/adgoods/admgrs.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<form id="adsForm">
 | 
			
		||||
<table class='wst-form wst-box-top'>
 | 
			
		||||
  <tr>
 | 
			
		||||
      <th width='150'>广告名称<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <select id="adId" name="adId" class='ipt' maxLength='20'>
 | 
			
		||||
              <option value=''>请选择</option>
 | 
			
		||||
                {volist name="result" id='vo'}
 | 
			
		||||
                <option {if $data['adName'] == $vo['adName']}selected{/if} value="{$vo['adId']}">{$vo['adName']}</option>
 | 
			
		||||
                {/volist}
 | 
			
		||||
            </select>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告商品类型<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <select id="adGoodsStatus" name="adGoodsStatus" class='ipt' maxLength='20'>
 | 
			
		||||
                <option value="">-请选择-</option>
 | 
			
		||||
 | 
			
		||||
                <option {if $data['adGoodsStatus'] == 1}selected{/if} value="1">-精选-</option>
 | 
			
		||||
                <option {if $data['adGoodsStatus'] == 2}selected{/if} value="2">-推荐-</option>
 | 
			
		||||
                <option {if $data['adGoodsStatus'] == 3}selected{/if} value="3">-热卖-</option>
 | 
			
		||||
            </select>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告商品ID<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><input type='text' id='goodsId' name="goodsId" value="{$data['goodsId']}" class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告图片<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><div id='adFilePicker'>上传广告图</div><span id='uploadMsg'></span>
 | 
			
		||||
              <div>
 | 
			
		||||
                图片大小:<span id="img_size">300x300</span>(px),格式为 gif, jpg, jpeg, png
 | 
			
		||||
              </div>
 | 
			
		||||
          </td>
 | 
			
		||||
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>预览图<font color='red'>  </font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <div id="preview" style="min-height:30px;">
 | 
			
		||||
              {if ($data['adGoodsImg']!='')}
 | 
			
		||||
              <img src="__IMGURL__/{$data['adGoodsImg']}">
 | 
			
		||||
              {/if}
 | 
			
		||||
            </div>
 | 
			
		||||
            <input type="hidden" name="adGoodsImg" id="adGoodsImg" class="ipt" value="{$data['adGoodsImg']}" />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
          <th >广告开始时间<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" style="margin:0px;vertical-align:baseline;" id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value="{$data['startDate']}"  />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告结束时间<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" style="margin:0px;vertical-align:baseline;" id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value="{$data['endDate']}" />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <td colspan='2' align='center' class='wst-bottombar'>
 | 
			
		||||
         <input type="hidden" name="id" id="adGoodsId" class="ipt" value="{$data['adGoodsId']+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}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										40
									
								
								hyhproject/admin/view/adgoods/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,40 @@
 | 
			
		||||
{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__/adgoods/admgrs.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>广告位置类型主要用于确定广告在商城里的位置,调用时把广告代码放入相应位置即可显示广告</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<form autocomplete="off" >
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
		<select name="adId" id="adId" class="query">
 | 
			
		||||
			<option value="">请选择广告名称</option>
 | 
			
		||||
            <option value=''>请选择</option>
 | 
			
		||||
            {volist name="result" id='vo'}
 | 
			
		||||
            <option  value="{$vo['adId']}">{$vo['adName']}</option>
 | 
			
		||||
            {/volist}
 | 
			
		||||
	    </select>
 | 
			
		||||
		<button class="btn btn-primary" type='button' onclick="javascript:loadQuery()"><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
   {if WSTGrant('GGGL_01')} 
 | 
			
		||||
   <button class="btn btn-success f-right btn-fixtop" type='button' onclick="javascript:location.href='<?=url("admin/adgoods/toEdit")?>'"><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
</div>
 | 
			
		||||
</form>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										124
									
								
								hyhproject/admin/view/adpositions/adpositions.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,124 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'位置名称', name:'positionName', width: 230},
 | 
			
		||||
            {title:'宽度', name:'positionWidth' ,width:30},
 | 
			
		||||
            {title:'高度', name:'positionHeight' ,width:30},
 | 
			
		||||
            {title:'位置类型', name:'' ,width:30, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
               var pName;
 | 
			
		||||
               switch(item['positionType']){
 | 
			
		||||
                  case 2:
 | 
			
		||||
                    pName='微信版';
 | 
			
		||||
                    break;
 | 
			
		||||
                  case 3:
 | 
			
		||||
                    pName='手机版';
 | 
			
		||||
                    break;
 | 
			
		||||
                  case 4:
 | 
			
		||||
                    pName='APP版';
 | 
			
		||||
                    break;
 | 
			
		||||
                  default:
 | 
			
		||||
                    pName='PC版';
 | 
			
		||||
                    break;
 | 
			
		||||
               }
 | 
			
		||||
               return pName;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'位置代码', name:'positionCode' ,width:40},
 | 
			
		||||
            {title:'操作', name:'' ,width:60, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                if(WST.GRANT.GGWZ_02)h += "<a  class='btn btn-blue' href='javascript:toEdit("+item['positionId']+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
                if(WST.GRANT.GGWZ_03)h += "<a  class='btn btn-red' href='javascript:toDel(" + item['positionId'] + ")'><i class='fa fa-trash-o'></i>删除</a> "; 
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-175,indexCol: true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/Adpositions/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    }); 
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         if(v){
 | 
			
		||||
             mmg.resize({height:h-175});
 | 
			
		||||
         }else{
 | 
			
		||||
             mmg.resize({height:h-130});
 | 
			
		||||
         }
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
  location.href = WST.U('admin/Adpositions/toedit','id='+id);
 | 
			
		||||
}
 | 
			
		||||
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/AdPositions/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: {
 | 
			
		||||
                positionType: {
 | 
			
		||||
                  rule:"required",
 | 
			
		||||
                  msg:{required:"请选择位置类型"},
 | 
			
		||||
                  tip:"请选择位置类型",
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                positionName: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"请输入位置名称"},
 | 
			
		||||
                  tip:"请输入位置名称",
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                positionCode: {
 | 
			
		||||
                    rule:"required;",
 | 
			
		||||
                    msg:{required:"请输入位置代码"},
 | 
			
		||||
                    tip:"请输入位置代码",
 | 
			
		||||
                    ok:"",
 | 
			
		||||
                  },
 | 
			
		||||
                positionWidth: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"请输入建议宽度"},
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                positionHeight: {
 | 
			
		||||
                  rule:"required",
 | 
			
		||||
                  msg:{required:"请输入建议高度"},
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
          valid: function(form){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
            var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
            $.post(WST.U('admin/Adpositions/'+((params.positionId==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/Adpositions/index');
 | 
			
		||||
              }else{
 | 
			
		||||
                    WST.msg(json.msg,{icon:2});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										67
									
								
								hyhproject/admin/view/adpositions/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,67 @@
 | 
			
		||||
{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__/adpositions/adpositions.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<form id="adPositionsForm" autocomplete="off">
 | 
			
		||||
<table class='wst-form wst-box-top'>
 | 
			
		||||
  <tr>
 | 
			
		||||
      <th width='150'>位置类型<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <select id="positionType" name="positionType" class='ipt' maxLength='20'>
 | 
			
		||||
              <option value="">-请选择-</option>
 | 
			
		||||
              {volist name=":WSTDatas('ADS_TYPE')" id='vo'}
 | 
			
		||||
              <option <?=($data['positionType']==$vo['dataVal'])?'selected':'';?> value="{$vo['dataVal']}">{$vo['dataName']}</option>
 | 
			
		||||
              {/volist}
 | 
			
		||||
            </select>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>位置名称<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" id="positionName" name="positionName" value='{$data['positionName']}' class="ipt" />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>位置代码<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" id="positionCode" name="positionCode" value='{$data['positionCode']}' class="ipt" />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>建议宽度<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" id="positionWidth" name="positionWidth" value='{$data['positionWidth']}' class="ipt" maxLength='4' />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>建议高度<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type='text' id='positionHeight' name="positionHeight" value='{$data['positionHeight']}' class='ipt' maxLength='4'/>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>排序号<font color='red'> </font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type='text' id='apSort' name="apSort" value='{$data['apSort']}' class='ipt' maxLength='10'/>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
  
 | 
			
		||||
  <tr>
 | 
			
		||||
     <td colspan='2' align='center' class='wst-bottombar'>
 | 
			
		||||
       <input type="hidden" name="id" id="positionId" class="ipt" value="{$data['positionId']+0}" />
 | 
			
		||||
       <button type="submit" class='btn btn-primary btn-mright'><i class="fa fa-check"></i>提交</button>
 | 
			
		||||
       <button type="button" onclick="javascript:history.go(-1)" class='btn'><i class="fa fa-angle-double-left"></i>返回</button>
 | 
			
		||||
     </td>
 | 
			
		||||
  </tr>
 | 
			
		||||
</table>
 | 
			
		||||
</form>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){editInit()});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										40
									
								
								hyhproject/admin/view/adpositions/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,40 @@
 | 
			
		||||
{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__/adpositions/adpositions.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>广告位置类型主要用于确定广告在商城里的位置,调用时把广告代码放入相应位置即可显示广告。</li>
 | 
			
		||||
    <li>该功能为开发者功能,普通使用者请勿随意修改,以免影响系统使用。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<form autocomplete="off" >
 | 
			
		||||
{if WSTGrant('GGWZ_01')}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
      <select name="positionType" id="positionType" class="query">
 | 
			
		||||
        <option value="">请选择广告位置类型</option>
 | 
			
		||||
            {volist name=":WSTDatas('ADS_TYPE')" id='vo'}
 | 
			
		||||
            <option value="{$vo['dataVal']}">{$vo['dataName']}</option>
 | 
			
		||||
            {/volist}
 | 
			
		||||
      </select>
 | 
			
		||||
   <input type='text' id='key' class="query" placeholder='位置代码'/>
 | 
			
		||||
   <button type="button" class="btn btn-primary" onclick="javascript:loadQuery()"><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
   <button class="btn btn-success f-right" type='button' onclick="javascript:location.href='<?=url("admin/Adpositions/toEdit")?>'"><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
</div>
 | 
			
		||||
{/if}
 | 
			
		||||
</form>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
  $(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										210
									
								
								hyhproject/admin/view/ads/admgrs.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,210 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
  var h = WST.pageHeight();
 | 
			
		||||
  var cols = [
 | 
			
		||||
            {title:'图标', name:'' ,width:50, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
               var adFile = item['adFile'].split(',');
 | 
			
		||||
               return'<img src="'+WST.conf.IMGURL+'/'+adFile[0]+'" height="28px" width="100"/>';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'标题', name:'adName', width: 100},
 | 
			
		||||
            {title:'广告位置', name:'positionName' ,width:80},
 | 
			
		||||
            {title:'广告网址', name:'adURL' ,width:130},
 | 
			
		||||
            {title:'广告开始日期', name:'adStartDate' ,width:30},
 | 
			
		||||
            {title:'广告结束日期', name:'adEndDate' ,width:30},
 | 
			
		||||
            
 | 
			
		||||
            {title:'点击数', name:'adClickNum' ,width:15},
 | 
			
		||||
            {title:'排序号', name:'adSort' ,width:15, renderer: function(val,item,rowIndex){
 | 
			
		||||
               return '<span style="color:blue;cursor:pointer;" ondblclick="changeSort(this,'+item["adId"]+');">'+val+'</span>';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:80, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                if(WST.GRANT.GGGL_02)h += "<a  class='btn btn-blue' href='javascript:toEdit("+item['adId']+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
                if(WST.GRANT.GGGL_03)h += "<a  class='btn btn-red' href='javascript:toDel(" + item['adId'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-155,indexCol: true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/ads/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         if(v){
 | 
			
		||||
             mmg.resize({height:h-155});
 | 
			
		||||
         }else{
 | 
			
		||||
             mmg.resize({height:h-128});
 | 
			
		||||
         }
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
   location.href = WST.U('admin/ads/toedit','id='+id);
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/Ads/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 loadQuery(){
 | 
			
		||||
    var query = WST.getParams('.query');
 | 
			
		||||
    query.page = 1;
 | 
			
		||||
    mmg.load(query);
 | 
			
		||||
}
 | 
			
		||||
var oldSort;
 | 
			
		||||
function changeSort(t,id){
 | 
			
		||||
   $(t).attr('ondblclick'," ");
 | 
			
		||||
var html = "<input type='text' id='sort-"+id+"' style='width:30px;padding:2px;' onblur='doneChange(this,"+id+")' value='"+$(t).html()+"' />";
 | 
			
		||||
 $(t).html(html);
 | 
			
		||||
 $('#sort-'+id).focus();
 | 
			
		||||
 $('#sort-'+id).select();
 | 
			
		||||
 oldSort = $(t).html();
 | 
			
		||||
}
 | 
			
		||||
function doneChange(t,id){
 | 
			
		||||
  var sort = ($(t).val()=='')?0:$(t).val();
 | 
			
		||||
  if(sort==oldSort){
 | 
			
		||||
    $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
    $(t).parent().html(parseInt(sort));
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  $.post(WST.U('admin/ads/changeSort'),{id:id,adSort:sort},function(data){
 | 
			
		||||
    var json = WST.toAdminJson(data);
 | 
			
		||||
    if(json.status==1){
 | 
			
		||||
        $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
        $(t).parent().html(parseInt(sort));
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
//查询
 | 
			
		||||
function adsQuery(){
 | 
			
		||||
		var query = WST.getParams('.query');
 | 
			
		||||
	    grid.set('url',WST.U('admin/ads/pageQuery',query));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editInit(){
 | 
			
		||||
  var laydate = layui.laydate;
 | 
			
		||||
    form = layui.form;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#adStartDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#adEndDate'
 | 
			
		||||
    });
 | 
			
		||||
  //文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
  	  pick:'#adFilePicker',
 | 
			
		||||
  	  formData: {dir:'adspic'},
 | 
			
		||||
      compress:false,//默认不对图片进行压缩
 | 
			
		||||
  	  accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
  	  callback:function(f){
 | 
			
		||||
  		  var json = WST.toAdminJson(f);
 | 
			
		||||
  		  if(json.status==1){
 | 
			
		||||
  			$('#uploadMsg').empty().hide();
 | 
			
		||||
        var html = '<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" />';
 | 
			
		||||
        $('#preview').html(html);
 | 
			
		||||
        // 图片路径
 | 
			
		||||
        $('#adFile').val(json.savePath+json.name);
 | 
			
		||||
  		  }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 /* 表单验证 */
 | 
			
		||||
    $('#adsForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                adPositionId: {
 | 
			
		||||
                  rule:"required",
 | 
			
		||||
                  msg:{required:"请选择广告位置"},
 | 
			
		||||
                  tip:"请选择广告位置",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adName: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"广告标题不能为空"},
 | 
			
		||||
                  tip:"请输入广告标题",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adFile: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"请上传广告图片"},
 | 
			
		||||
                  tip:"请上传广告图片",
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                adStartDate: {
 | 
			
		||||
                  rule:"required;match(lt, adEndDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告开始时间",match:"必须小于广告结束时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adEndDate: {
 | 
			
		||||
                  rule:"required;match(gt, adStartDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告结束时间",match:"必须大于广告开始时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
          valid: function(form){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
            var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
            $.post(WST.U('admin/Ads/'+((params.adId==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/Ads/index');
 | 
			
		||||
              }else{
 | 
			
		||||
                    WST.msg(json.msg,{icon:2});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
var positionInfo;
 | 
			
		||||
/*获取地址*/
 | 
			
		||||
function addPosition(pType, val, getSize)
 | 
			
		||||
{
 | 
			
		||||
    $.post(WST.U('admin/Adpositions/getPositon'),{'positionType':pType},function(data,textStatus){
 | 
			
		||||
        positionInfo = data;
 | 
			
		||||
        var html='<option value="">请选择</option>';
 | 
			
		||||
        $(data).each(function(k,v){
 | 
			
		||||
			var selected;
 | 
			
		||||
            if(v.positionId==val){
 | 
			
		||||
              selected = 'selected="selected"';
 | 
			
		||||
              getPhotoSize(v.positionId);
 | 
			
		||||
            }
 | 
			
		||||
            html +='<option '+selected+' value="'+v.positionId+'">'+v.positionName+'</option>';
 | 
			
		||||
        });
 | 
			
		||||
        $('#adPositionId').html(html);
 | 
			
		||||
        layui.form.render('select');
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
/*获取图片尺寸 以及设置图片显示方式*/
 | 
			
		||||
function getPhotoSize(pType)
 | 
			
		||||
{
 | 
			
		||||
  $(positionInfo).each(function(k,v){
 | 
			
		||||
      if(v.positionId==pType){
 | 
			
		||||
        $('#img_size').html(v.positionWidth+'x'+v.positionHeight);
 | 
			
		||||
        if(v.positionWidth>v.positionHeight){
 | 
			
		||||
             $('.ads-h-list').removeClass('ads-h-list').addClass('ads-w-list');
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										189
									
								
								hyhproject/admin/view/ads/ads.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,189 @@
 | 
			
		||||
var grid;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
	grid = $("#maingrid").ligerGrid({
 | 
			
		||||
		url:WST.U('admin/Ads/pageQuery'),
 | 
			
		||||
		pageSize:WST.pageSize,
 | 
			
		||||
		pageSizeOptions:WST.pageSizeOptions,
 | 
			
		||||
		height:'99%',
 | 
			
		||||
        width:'100%',
 | 
			
		||||
        minColToggle:6,
 | 
			
		||||
        rownumbers:true,
 | 
			
		||||
        columns: [
 | 
			
		||||
	        { display: '标题', name: 'adName', isSort: false},
 | 
			
		||||
	        { display: '广告位置', name: 'adPositionId', isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
	        	return rowdata['positionName'];
 | 
			
		||||
	        }},
 | 
			
		||||
	        { display: '广告网址', name: 'adURL', isSort: false},
 | 
			
		||||
	        { display: '广告开始日期', name: 'adStartDate', isSort: false},
 | 
			
		||||
	        { display: '广告结束日期', name: 'adEndDate', isSort: false},
 | 
			
		||||
	        { display: '图标', name: 'adFile', height: '300', isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
            var adFile = rowdata['adFile'].split(',');
 | 
			
		||||
              return'<img src="'+WST.conf.IMGURL+'/'+adFile[0]+'" height="28px" />';
 | 
			
		||||
	        }},
 | 
			
		||||
          { display: '点击数', name: 'adClickNum', isSort: false},
 | 
			
		||||
	        { display: '排序号', name: 'adSort', isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
              return '<span style="cursor:pointer;" ondblclick="changeSort(this,'+rowdata["adId"]+');">'+value+'</span>';
 | 
			
		||||
          }},
 | 
			
		||||
	        { display: '操作', name: 'op',isSort: false,render: function (rowdata, rowindex, value){
 | 
			
		||||
	        	var h = "";
 | 
			
		||||
	            if(WST.GRANT.GGGL_02)h += "<a href='"+WST.U('admin/Ads/toEdit','id='+rowdata['adId'])+"'>修改</a> ";
 | 
			
		||||
	            if(WST.GRANT.GGGL_03)h += "<a href='javascript:toDel(" + rowdata['adId'] + ")'>删除</a> "; 
 | 
			
		||||
	            return h;
 | 
			
		||||
	        }}
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/Ads/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);
 | 
			
		||||
	           		            grid.reload();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var oldSort;
 | 
			
		||||
function changeSort(t,id){
 | 
			
		||||
 $(t).attr('ondblclick'," ");
 | 
			
		||||
var html = "<input type='text' id='sort-"+id+"' style='width:30px;' onblur='doneChange(this,"+id+")' value='"+$(t).html()+"' />";
 | 
			
		||||
 $(t).html(html);
 | 
			
		||||
 $('#sort-'+id).focus();
 | 
			
		||||
 $('#sort-'+id).select();
 | 
			
		||||
 oldSort = $(t).html();
 | 
			
		||||
}
 | 
			
		||||
function doneChange(t,id){
 | 
			
		||||
  var sort = ($(t).val()=='')?0:$(t).val();
 | 
			
		||||
  if(sort==oldSort){
 | 
			
		||||
    $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
    $(t).parent().html(parseInt(sort));
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  $.post(WST.U('admin/ads/changeSort'),{id:id,adSort:sort},function(data){
 | 
			
		||||
    var json = WST.toAdminJson(data);
 | 
			
		||||
    if(json.status==1){
 | 
			
		||||
        $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
        $(t).parent().html(parseInt(sort));
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
//查询
 | 
			
		||||
function adsQuery(){
 | 
			
		||||
		var query = WST.getParams('.query');
 | 
			
		||||
	    grid.set('url',WST.U('admin/ads/pageQuery',query));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editInit(){
 | 
			
		||||
  //文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
  	  pick:'#adFilePicker',
 | 
			
		||||
  	  formData: {dir:'adspic'},
 | 
			
		||||
      compress:false,//默认不对图片进行压缩
 | 
			
		||||
  	  accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
  	  callback:function(f){
 | 
			
		||||
  		  var json = WST.toAdminJson(f);
 | 
			
		||||
  		  if(json.status==1){
 | 
			
		||||
  			$('#uploadMsg').empty().hide();
 | 
			
		||||
        var html = '<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" />';
 | 
			
		||||
        $('#preview').html(html);
 | 
			
		||||
        // 图片路径
 | 
			
		||||
        $('#adFile').val(json.savePath+json.name);
 | 
			
		||||
  		  }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
    });
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
 /* 表单验证 */
 | 
			
		||||
    $('#adsForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                adPositionId: {
 | 
			
		||||
                  rule:"required",
 | 
			
		||||
                  msg:{required:"请选择广告位置"},
 | 
			
		||||
                  tip:"请选择广告位置",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adName: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"广告标题不能为空"},
 | 
			
		||||
                  tip:"请输入广告标题",
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adFile: {
 | 
			
		||||
                  rule:"required;",
 | 
			
		||||
                  msg:{required:"请上传广告图片"},
 | 
			
		||||
                  tip:"请上传广告图片",
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                adStartDate: {
 | 
			
		||||
                  rule:"required;match(lt, adEndDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告开始时间",match:"必须小于广告结束时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                },
 | 
			
		||||
                adEndDate: {
 | 
			
		||||
                  rule:"required;match(gt, adStartDate, date)",
 | 
			
		||||
                  msg:{required:"请选择广告结束时间",match:"必须大于广告开始时间"},
 | 
			
		||||
                  ok:"验证通过",
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
          valid: function(form){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
            var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
            $.post(WST.U('admin/Ads/'+((params.adId==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/Ads/index');
 | 
			
		||||
              }else{
 | 
			
		||||
                    WST.msg(json.msg,{icon:2});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
var positionInfo;
 | 
			
		||||
/*获取地址*/
 | 
			
		||||
function addPosition(pType, val, getSize)
 | 
			
		||||
{
 | 
			
		||||
    $.post(WST.U('admin/Adpositions/getPositon'),{'positionType':pType},function(data,textStatus){
 | 
			
		||||
        positionInfo = data;
 | 
			
		||||
        var html='<option value="">请选择</option>';
 | 
			
		||||
        $(data).each(function(k,v){
 | 
			
		||||
			var selected;
 | 
			
		||||
            if(v.positionId==val){
 | 
			
		||||
              selected = 'selected="selected"';
 | 
			
		||||
              getPhotoSize(v.positionId);
 | 
			
		||||
            }
 | 
			
		||||
            html +='<option '+selected+' value="'+v.positionId+'">'+v.positionName+'</option>';
 | 
			
		||||
        });
 | 
			
		||||
        $('#adPositionId').html(html);
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
/*获取图片尺寸 以及设置图片显示方式*/
 | 
			
		||||
function getPhotoSize(pType)
 | 
			
		||||
{
 | 
			
		||||
  $(positionInfo).each(function(k,v){
 | 
			
		||||
      if(v.positionId==pType){
 | 
			
		||||
        $('#img_size').html(v.positionWidth+'x'+v.positionHeight);
 | 
			
		||||
        if(v.positionWidth>v.positionHeight){
 | 
			
		||||
             $('.ads-h-list').removeClass('ads-h-list').addClass('ads-w-list');
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										117
									
								
								hyhproject/admin/view/ads/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,117 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<style>
 | 
			
		||||
#preview img{max-width: 600px;max-height:150px;}
 | 
			
		||||
</style>
 | 
			
		||||
<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__/ads/admgrs.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<form id="adsForm">
 | 
			
		||||
<table class='wst-form wst-box-top'>
 | 
			
		||||
  <tr>
 | 
			
		||||
      <th width='150'>位置类型<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <select id="positionType" name="positionType" class='ipt' maxLength='20' onchange='javascript:addPosition(this.value);'>
 | 
			
		||||
              <option value=''>请选择</option>
 | 
			
		||||
              {volist name=":WSTDatas('ADS_TYPE')" id='vo'}
 | 
			
		||||
              <option {if $data['positionType'] == $vo['dataVal']}selected{/if} value="{$vo['dataVal']}">{$vo['dataName']}</option>
 | 
			
		||||
              {/volist}
 | 
			
		||||
            </select>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告位置<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <select id="adPositionId" name="adPositionId" class='ipt' maxLength='20' onchange='javascript:getPhotoSize(this.value);'>
 | 
			
		||||
              <option value="">-请选择-</option>
 | 
			
		||||
            </select>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
        <!--添加链接类型-->
 | 
			
		||||
      <th width='150'>链接类型<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <select id="targetType" name="targetType" class='ipt' maxLength='20'>
 | 
			
		||||
              <option {if $data['targetType'] == 1}selected{/if} value="1">商品</option>
 | 
			
		||||
              <option {if $data['targetType'] == 2}selected{/if} value="2">店铺</option>
 | 
			
		||||
              <option {if $data['targetType'] == 3}selected{/if} value="3">活动</option>
 | 
			
		||||
            </select>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
      <!--添加链接类型结束-->
 | 
			
		||||
       <tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告标题<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><input type='text' id='adName' name="adName" value='{$data['adName']}' class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告图片<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><div id='adFilePicker'>上传广告图</div><span id='uploadMsg'></span>
 | 
			
		||||
              <div>
 | 
			
		||||
                图片大小:<span id="img_size">300x300</span>(px),格式为 gif, jpg, jpeg, png
 | 
			
		||||
              </div>
 | 
			
		||||
          </td>
 | 
			
		||||
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>预览图<font color='red'>  </font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <div id="preview" style="min-height:30px;">
 | 
			
		||||
              {if ($data['adFile']!='')}
 | 
			
		||||
              <img src="__IMGURL__/{$data['adFile']}">
 | 
			
		||||
              {/if}
 | 
			
		||||
            </div>
 | 
			
		||||
            <input type="hidden" name="adFile" id="adFile" class="ipt" value="{$data['adFile']}" />
 | 
			
		||||
          </td>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告网址<font color='red'>  </font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" id="adURL" class="ipt" maxLength="200" value='{$data['adURL']}' />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th >广告开始时间<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" style="margin:0px;vertical-align:baseline;" id="adStartDate" name="adStartDate" class="laydate-icon ipt" maxLength="20" value='{$data['adStartDate']}'  />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告结束时间<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" style="margin:0px;vertical-align:baseline;" id="adEndDate" name="adEndDate" class="laydate-icon ipt" maxLength="20" value='{$data['adEndDate']}' />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>广告排序号:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <input type="text" id="adSort" class="ipt" maxLength="20"  value='{$data['adSort']}' />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
  
 | 
			
		||||
  <tr>
 | 
			
		||||
     <td colspan='2' align='center' class='wst-bottombar'>
 | 
			
		||||
       <input type="hidden" name="id" id="adId" class="ipt" value="{$data['adId']+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();
 | 
			
		||||
//初始化位置类型
 | 
			
		||||
addPosition("{$data['positionType']}","{$data['adPositionId']}");
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										42
									
								
								hyhproject/admin/view/ads/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,42 @@
 | 
			
		||||
{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__/ads/admgrs.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>广告位置类型主要用于确定广告在商城里的位置,调用时把广告代码放入相应位置即可显示广告</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<form autocomplete="off" >
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
		<select name="positionType" id="positionType" class="query" onchange='javascript:addPosition(this.value);'>
 | 
			
		||||
			<option value="">请选择广告位置类型</option>
 | 
			
		||||
            {volist name=":WSTDatas('ADS_TYPE')" id='vo'}
 | 
			
		||||
            <option value="{$vo['dataVal']}">{$vo['dataName']}</option>
 | 
			
		||||
            {/volist}
 | 
			
		||||
	    </select>
 | 
			
		||||
		<select name="adPositionId" id="adPositionId" class="query" >
 | 
			
		||||
			<option value="">请选择</option>
 | 
			
		||||
		</select>
 | 
			
		||||
		<button class="btn btn-primary" type='button' onclick="javascript:loadQuery()"><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
   {if WSTGrant('GGGL_01')} 
 | 
			
		||||
   <button class="btn btn-success f-right btn-fixtop" type='button' onclick="javascript:location.href='<?=url("admin/ads/toEdit")?>'"><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
</div>
 | 
			
		||||
</form>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										149
									
								
								hyhproject/admin/view/areas/areas.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,149 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var parentId=$('#h_areaId').val();
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'地区名称', name:'areaName', width: 300},
 | 
			
		||||
            {title:'是否显示', name:'isShow', width: 30,renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return '<input type="checkbox" '+((item['isShow']==1)?"checked":"")+' name="isShow2" lay-skin="switch" lay-filter="isShow2" data="'+item['areaId']+'" lay-text="显示|隐藏">';
 | 
			
		||||
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'排序字母', name:'areaKey', width: 30},
 | 
			
		||||
            {title:'排序号', name:'areaSort', width: 30},
 | 
			
		||||
            {title:'操作', name:'' ,width:140, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                h += "<a  class='btn btn-blue' onclick='javascript:toView("+item['areaId']+")'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
                if(WST.GRANT.DQGL_02)h += "<a  class='btn btn-blue' onclick='javascript:toEdit("+item['areaId']+","+item["parentId"]+")'><i class='fa fa-pencil'></i>修改</a>";
 | 
			
		||||
                if(WST.GRANT.DQGL_03)h += "<a  class='btn btn-red' onclick='javascript:toDel(" + item['areaId'] + ")'><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/areas/pageQuery','parentId='+parentId), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    }); 
 | 
			
		||||
    mmg.on('loadSuccess',function(){
 | 
			
		||||
    	layui.form.render('','gridForm');
 | 
			
		||||
        layui.form.on('switch(isShow2)', function(data){
 | 
			
		||||
            var id = $(this).attr("data");
 | 
			
		||||
            if(this.checked){
 | 
			
		||||
  				toggleIsShow(0,id);
 | 
			
		||||
  			}else{
 | 
			
		||||
  				toggleIsShow(1,id);
 | 
			
		||||
  			}
 | 
			
		||||
        });
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toggleIsShow(t,v){
 | 
			
		||||
	if(!WST.GRANT.DQGL_02)return;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    	$.post(WST.U('admin/areas/editiIsShow'),{id:v,isShow:t},function(data,textStatus){
 | 
			
		||||
			  layer.close(loading);
 | 
			
		||||
			  var json = WST.toAdminJson(data);
 | 
			
		||||
			  if(json.status=='1'){
 | 
			
		||||
			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
		            mmg.load();
 | 
			
		||||
			  }else{
 | 
			
		||||
			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
			  }
 | 
			
		||||
		});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toReturn(){
 | 
			
		||||
	location.href=WST.U('admin/areas/index','parentId='+$('#h_parentId').val());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function letterOnblur(obj){
 | 
			
		||||
	if($.trim(obj.value)=='')return;
 | 
			
		||||
	if($('#areaKey').val()!=='')return;
 | 
			
		||||
	var loading = WST.msg('正在生成排序字母,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/areas/letterObtain'),{code:obj.value},function(data,textStatus){
 | 
			
		||||
		layer.close(loading);
 | 
			
		||||
		var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status == 1){
 | 
			
		||||
			$('#areaKey').val(json.msg);
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id,pid){
 | 
			
		||||
	$('#areaForm')[0].reset();
 | 
			
		||||
	if(id>0){
 | 
			
		||||
		var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
		$.post(WST.U('admin/areas/get'),{id:id},function(data,textStatus){
 | 
			
		||||
			layer.close(loading);
 | 
			
		||||
			var json = WST.toAdminJson(data);
 | 
			
		||||
			if(json){
 | 
			
		||||
				WST.setValues(json);
 | 
			
		||||
				layui.form.render();
 | 
			
		||||
				editsBox(id);
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}else{
 | 
			
		||||
		WST.setValues({parentId:pid,areaId:0});
 | 
			
		||||
		layui.form.render();
 | 
			
		||||
		editsBox(id);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function toView(id){
 | 
			
		||||
	location.href = WST.U('admin/areas/index','parentId='+id);
 | 
			
		||||
}
 | 
			
		||||
function editsBox(id){
 | 
			
		||||
	var box = WST.open({title:(id>0)?'修改地区':"新增地区",type:1,content:$('#areasBox'),area: ['460px', '260px'],btn:['确定','取消'],
 | 
			
		||||
		end:function(){$('#areasBox').hide();},yes:function(){
 | 
			
		||||
		$('#areaForm').submit();
 | 
			
		||||
	          }});
 | 
			
		||||
	$('#areaForm').validator({
 | 
			
		||||
	    fields: {
 | 
			
		||||
	    	areaName: {
 | 
			
		||||
	    		tip: "请输入地区名称",
 | 
			
		||||
	    		rule: '地区名称:required;length[~10];'
 | 
			
		||||
	    	},
 | 
			
		||||
		    areaKey: {
 | 
			
		||||
	    		tip: "请输入排序字母",
 | 
			
		||||
	    		rule: '排序字母:required;length[~1];'
 | 
			
		||||
	    	},
 | 
			
		||||
	    	areaSort: {
 | 
			
		||||
            	tip: "请输入排序号",
 | 
			
		||||
            	rule: '排序号:required;length[~8];'
 | 
			
		||||
            }
 | 
			
		||||
	    },
 | 
			
		||||
	    valid: function(form){
 | 
			
		||||
	        var params = WST.getParams('.ipt');
 | 
			
		||||
	        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	    		$.post(WST.U('admin/areas/'+((id>0)?"edit":"add")),params,function(data,textStatus){
 | 
			
		||||
	    			  layer.close(loading);
 | 
			
		||||
	    			  var json = WST.toAdminJson(data);
 | 
			
		||||
	    			  if(json.status=='1'){
 | 
			
		||||
	    			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
	    			    	$('#areasBox').hide();
 | 
			
		||||
	    			    	layer.close(box);
 | 
			
		||||
	    		            mmg.load();
 | 
			
		||||
	    			  }else{
 | 
			
		||||
	    			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
	    			  }
 | 
			
		||||
	    		});
 | 
			
		||||
	    }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该地区吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/areas/del'),{id:id},function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           		            mmg.load();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										55
									
								
								hyhproject/admin/view/areas/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,55 @@
 | 
			
		||||
{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__/areas/areas.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<input type='hidden' id='h_areaId' value='{$pArea["areaId"]}'/>
 | 
			
		||||
<input type='hidden' id='h_parentId' value='{$pArea["parentId"]}'/>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
  {if condition="($pArea['areaId'] != 0)"}
 | 
			
		||||
      上级地区:{$pArea['areaName']}
 | 
			
		||||
  <button class="btn f-right" onclick='javascript:toReturn(0)'><i class="fa fa-angle-double-left"></i>返回</button>
 | 
			
		||||
  {/if}
 | 
			
		||||
  {if WSTGrant('DQGL_01')}
 | 
			
		||||
  <button class="btn btn-success f-right btn-mright" onclick='javascript:toEdit(0,{$pArea["areaId"]})'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
  {/if}
 | 
			
		||||
  <div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<form lay-filter='gridForm' class='layui-form wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
</form>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
<div id='areasBox' style='display:none'>
 | 
			
		||||
  <form id='areaForm' autocomplete="off" class='layui-form'>
 | 
			
		||||
  <input type='hidden' class='ipt' id='areaId' />
 | 
			
		||||
  <input type='hidden' class='ipt' id='parentId' />
 | 
			
		||||
  <table class='wst-form wst-box-top'>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>地区名称<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='areaName' name="areaName" class='ipt' maxLength='20' style='width:200px;' onblur='javascript:letterOnblur(this)'/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>是否显示<font color='red'>*</font>:</th>
 | 
			
		||||
        <td height='24'>
 | 
			
		||||
           <input type="checkbox" id='isShow' name='isShow' value="1" lay-skin="switch" lay-filter="switchTest" class="ipt" lay-text="显示|隐藏">
 | 
			
		||||
        </td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>排序字母<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='areaKey' name='areaKey' class='ipt' style='width:60px;'  maxLength='1'/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>排序号<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='areaSort' name='areaSort' class='ipt' style='width:60px;' onkeypress='return WST.isNumberKey(event);' onkeyup="javascript:WST.isChinese(this,1)" maxLength='10' value='0'/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
  </table>
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										149
									
								
								hyhproject/admin/view/articlecats/articlecats.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,149 @@
 | 
			
		||||
var grid,oldData = {};
 | 
			
		||||
function initGrid(){
 | 
			
		||||
	grid = $('#maingrid').WSTGridTree({
 | 
			
		||||
		url:WST.U('admin/articlecats/pageQuery'),
 | 
			
		||||
		rownumbers:true,
 | 
			
		||||
        columns: [
 | 
			
		||||
	        { display: '分类名称', name: 'catName', id:'catId', align: 'left',isSort: false,render: function (item)
 | 
			
		||||
                {
 | 
			
		||||
                	oldData[item.catId] = item.catName;
 | 
			
		||||
                    return '<input type="text" size="40" value="'+item.catName+'" onblur="javascript:editName('+item.catId+',this)"/>';
 | 
			
		||||
            }},
 | 
			
		||||
            { display: '分类类型', width: 100, name: 'catType',isSort: false,
 | 
			
		||||
                render: function (item)
 | 
			
		||||
                {
 | 
			
		||||
                    if (parseInt(item.catType) == 1) return '<span>系统菜单</span>';
 | 
			
		||||
                    return '<span>普通类型</span>';
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            { display: '是否显示', width: 80, name: 'isShow',isSort: false,
 | 
			
		||||
                render: function (item)
 | 
			
		||||
                {
 | 
			
		||||
                    return '<input type="checkbox" '+((item.isShow==1)?"checked":"")+' class="ipt" lay-skin="switch" lay-filter="isShow" data="'+item.catId+'" lay-text="显示|隐藏">';
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
	        { display: '排序号', name: 'catSort',width: 60,isSort: false},
 | 
			
		||||
	        { display: '操作', name: 'op',width: 250,isSort: false,
 | 
			
		||||
	        	render: function (rowdata,e){
 | 
			
		||||
		            var h = "";
 | 
			
		||||
			        if(WST.GRANT.WZFL_01)h += "<a class='btn btn-blue' href='javascript:toEdit("+rowdata["catId"]+",0)'><i class='fa fa-plus'></i>新增子分类</a> ";
 | 
			
		||||
		            if(WST.GRANT.WZFL_02)h += "<a class='btn btn-blue' href='javascript:toEdit("+rowdata["parentId"]+","+rowdata["catId"]+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
		            if(WST.GRANT.WZFL_03 && rowdata["catType"]==0)h += "<a class='btn btn-red' href='javascript:toDel("+rowdata["parentId"]+","+rowdata["catId"]+","+rowdata["catType"]+")'><i class='fa fa-trash-o'></i>删除</a> "; 
 | 
			
		||||
		            return h;
 | 
			
		||||
	        	}}
 | 
			
		||||
        ],
 | 
			
		||||
        callback:function(){
 | 
			
		||||
		    layui.form.render();
 | 
			
		||||
	    }
 | 
			
		||||
	});
 | 
			
		||||
	layui.form.on('switch(isShow)', function(data){
 | 
			
		||||
        var id = $(this).attr("data");
 | 
			
		||||
        if(this.checked){
 | 
			
		||||
            toggleIsShow(id, 1);
 | 
			
		||||
        }else{
 | 
			
		||||
            toggleIsShow(id, 0);
 | 
			
		||||
        }
 | 
			
		||||
   });
 | 
			
		||||
   $('#headTip').WSTTips({width:90,height:35,callback:function(v){}});
 | 
			
		||||
}
 | 
			
		||||
function toggleIsShow(id,isShow){
 | 
			
		||||
	if(!WST.GRANT.WZFL_02)return;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    $.post(WST.U('admin/articlecats/editiIsShow'),{id:id,isShow:isShow},function(data,textStatus){
 | 
			
		||||
		layer.close(loading);
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status=='1'){
 | 
			
		||||
			WST.msg(json.msg,{icon:1});
 | 
			
		||||
			grid.reload(id);
 | 
			
		||||
		}else{
 | 
			
		||||
			WST.msg(json.msg,{icon:2});
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(pid,id){
 | 
			
		||||
	$('#articlecatForm')[0].reset();
 | 
			
		||||
	if(id>0){
 | 
			
		||||
		$.post(WST.U('admin/articlecats/get'),{id:id},function(data,textStatus){
 | 
			
		||||
			var json = WST.toAdminJson(data);
 | 
			
		||||
			if(json){
 | 
			
		||||
				WST.setValues(json);
 | 
			
		||||
				layui.form.render();
 | 
			
		||||
				editsBox(id);
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}else{
 | 
			
		||||
		WST.setValues({parentId:pid,catName:'',isShow:1,catSort:0});
 | 
			
		||||
		layui.form.render();
 | 
			
		||||
		editsBox(id);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editsBox(id){
 | 
			
		||||
	var title =(id>0)?"修改文章分类":"新增文章分类";
 | 
			
		||||
	var box = WST.open({title:title,type:1,content:$('#articlecatBox'),area: ['465px', '250px'],btn:['确定','取消'],
 | 
			
		||||
		end:function(){$('#articlecatBox').hide();},yes:function(){
 | 
			
		||||
		          $('#articlecatForm').submit();
 | 
			
		||||
	          }});
 | 
			
		||||
	$('#articlecatForm').validator({
 | 
			
		||||
	    fields: {
 | 
			
		||||
	    	catName: {
 | 
			
		||||
	    		tip: "请输入分类名称",
 | 
			
		||||
	    		rule: '分类名称:required;length[~10];'
 | 
			
		||||
	    	},
 | 
			
		||||
	    	catSort: {
 | 
			
		||||
            	tip: "请输入排序号",
 | 
			
		||||
            	rule: '排序号:required;length[~8];'
 | 
			
		||||
            }
 | 
			
		||||
	    },
 | 
			
		||||
	    valid: function(form){
 | 
			
		||||
	        var params = WST.getParams('.ipt');
 | 
			
		||||
	        params.id = id;
 | 
			
		||||
	        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    		$.post(WST.U('admin/articlecats/'+((id>0)?"edit":"add")),params,function(data,textStatus){
 | 
			
		||||
    			  layer.close(loading);
 | 
			
		||||
    			  var json = WST.toAdminJson(data);
 | 
			
		||||
    			  if(json.status=='1'){
 | 
			
		||||
    			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
    			    	$('#articlecatBox').hide();
 | 
			
		||||
    			    	layer.close(box);
 | 
			
		||||
    		            grid.reload(params.parentId);
 | 
			
		||||
    			  }else{
 | 
			
		||||
    			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
    			  }
 | 
			
		||||
    		});
 | 
			
		||||
	    }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toDel(pid,id,type){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该分类以及其下的文章吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/articlecats/del'),{id:id,type:type},function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           			    	grid.reload(pid);
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
function editName(id,obj){
 | 
			
		||||
	if($.trim(obj.value)=='' || $.trim(obj.value)==oldData[id]){
 | 
			
		||||
		obj.value = oldData[id];
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	$.post(WST.U('admin/articlecats/editName'),{id:id,catName:obj.value},function(data,textStatus){
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
	    if(json.status=='1'){
 | 
			
		||||
	    	oldData[id] = $.trim(obj.value);
 | 
			
		||||
	        WST.msg(json.msg,{icon:1});
 | 
			
		||||
	    }else{
 | 
			
		||||
	        WST.msg(json.msg,{icon:2});
 | 
			
		||||
	    }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										51
									
								
								hyhproject/admin/view/articlecats/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,51 @@
 | 
			
		||||
{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/wstgridtree.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/articlecats/articlecats.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
      <li>本功能主要用于文章分类的管理。分类可分为“普通菜单”和“系统系统”。</li>
 | 
			
		||||
      <li>“系统菜单”一般在商城前台有进行调用,非开发者请勿直接删除“系统菜单”,以免造成数据丢失。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<style>.mmGrid{border-bottom:0px;}</style>
 | 
			
		||||
{if WSTGrant('WZFL_01')}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
  <button class="btn btn-success f-right" onclick='javascript:toEdit(0)'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
  <div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
{/if}
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div class='mmGrid layui-form' id="maingrid"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='articlecatBox' style='display:none' class="layui-form">
 | 
			
		||||
  <form id='articlecatForm' autocomplete="off">
 | 
			
		||||
  <input type='hidden' id='parentId' name="parentId" class='ipt' />
 | 
			
		||||
  <table class='wst-form wst-box-top'>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>分类名称<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='catName' name="catName" class='ipt' maxLength='20' style='width:200px;'/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>是否显示<font color='red'>*</font>:</th>
 | 
			
		||||
        <td height='24'>
 | 
			
		||||
           <input type="checkbox" id="isShow" name="isShow" value="1" class="ipt" lay-skin="switch" lay-filter="isShow1" lay-text="显示|隐藏">
 | 
			
		||||
        </td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>排序号<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='catSort' name='catSort' class='ipt' style='width:60px;' onkeypress='return WST.isNumberKey(event);' onkeyup="javascript:WST.isChinese(this,1)" maxLength='10' value='0'/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
  </table>
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										193
									
								
								hyhproject/admin/view/articles/articles.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,193 @@
 | 
			
		||||
var mmg,combo;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'文章ID', name:'articleId' ,width:30,sortable:true},
 | 
			
		||||
            {title:'标题', name:'articleTitle' ,width:200,sortable:true},
 | 
			
		||||
            {title:'分类', name:'catName' ,width:100,sortable:true},
 | 
			
		||||
            {title:'是否显示', name:'isShow' ,width:50,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
                return '<form autocomplete="off" class="layui-form" lay-filter="gridForm"><input type="checkbox" id="isShow" name="isShow" '+((item['isShow']==1)?"checked":"")+' lay-skin="switch" value="1" lay-filter="isShow" lay-text="显示|隐藏" data="'+item['articleId']+'"></form>';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'最后编辑者', name:'staffName' ,width:50,sortable:true},
 | 
			
		||||
            {title:'创建时间', name:'createTime' ,width:120,sortable:true},
 | 
			
		||||
            {title:'操作', name:'' ,width:100, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                if(WST.GRANT.WZGL_02)h += "<a  class='btn btn-blue' onclick='javascript:toEdit("+item['articleId']+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
                if(WST.GRANT.WZGL_03)h += "<a  class='btn btn-red' onclick='javascript:toDel(" + item['articleId'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true, cols: cols,method:'POST',checkCol:true,multiSelect:true,
 | 
			
		||||
        url: WST.U('admin/articles/pageQuery'), fullWidthRows: true, autoLoad: true,remoteSort: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });   
 | 
			
		||||
    mmg.on('loadSuccess',function(){
 | 
			
		||||
    	layui.form.render('','gridForm');
 | 
			
		||||
        layui.form.on('switch(isShow)', function(data){
 | 
			
		||||
            var id = $(this).attr("data");
 | 
			
		||||
            if(this.checked){
 | 
			
		||||
                toggleIsShow(1,id);
 | 
			
		||||
            }else{
 | 
			
		||||
                toggleIsShow(0,id);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function initCombo(v){
 | 
			
		||||
    var setting = {
 | 
			
		||||
			check: {
 | 
			
		||||
				enable: true,
 | 
			
		||||
				chkStyle: "radio",
 | 
			
		||||
				radioType: "all"
 | 
			
		||||
			},
 | 
			
		||||
			view: {
 | 
			
		||||
				dblClickExpand: false
 | 
			
		||||
			},
 | 
			
		||||
			async: {
 | 
			
		||||
	           enable: true,
 | 
			
		||||
	           url:WST.U('admin/articlecats/listQuery2','hasRoot='+v),
 | 
			
		||||
	           autoParam:["id", "name=n", "level=lv"]
 | 
			
		||||
	        },
 | 
			
		||||
			callback: {
 | 
			
		||||
				onClick: onClick,
 | 
			
		||||
				onCheck: onCheck
 | 
			
		||||
			}
 | 
			
		||||
	};
 | 
			
		||||
	$.fn.zTree.init($("#dropDownTree"), setting);
 | 
			
		||||
}
 | 
			
		||||
function onClick(e, treeId, treeNode) {
 | 
			
		||||
	var zTree = $.fn.zTree.getZTreeObj("dropDownTree");
 | 
			
		||||
	zTree.checkNode(treeNode, !treeNode.checked, null, true);
 | 
			
		||||
	return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function onCheck(e, treeId, treeNode) {
 | 
			
		||||
	var zTree = $.fn.zTree.getZTreeObj("dropDownTree");
 | 
			
		||||
	var nodes = zTree.getCheckedNodes(true);
 | 
			
		||||
	var v = [],ids = [];
 | 
			
		||||
	for (var i=0, l=nodes.length; i<l; i++) {
 | 
			
		||||
		v .push(nodes[i].name);
 | 
			
		||||
		ids.push(nodes[i].id);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	$("#catSel").attr("value", v.join(','));
 | 
			
		||||
	$('#catId').val(ids.join(','));
 | 
			
		||||
	hideMenu();
 | 
			
		||||
}
 | 
			
		||||
function showMenu(){
 | 
			
		||||
	var cityObj = $("#catSel");
 | 
			
		||||
	var cityOffset = $("#catSel").offset();
 | 
			
		||||
	$("#ztreeMenuContent").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");
 | 
			
		||||
	$("body").bind("mousedown", onBodyDown);
 | 
			
		||||
}
 | 
			
		||||
function hideMenu(){
 | 
			
		||||
	$("#ztreeMenuContent").fadeOut("fast");
 | 
			
		||||
	$("body").unbind("mousedown", onBodyDown);
 | 
			
		||||
}
 | 
			
		||||
function onBodyDown(event) {
 | 
			
		||||
	if (!(event.target.id == "menuBtn" || event.target.id == "citySel" || event.target.id == "ztreeMenuContent" || $(event.target).parents("#ztreeMenuContent").length>0)) {
 | 
			
		||||
		hideMenu();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	mmg.load({key:$('#key').val(),catId:$('#catId').val(),page:1});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toggleIsShow(t,v){
 | 
			
		||||
	if(!WST.GRANT.WZGL_02)return;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    	$.post(WST.U('admin/articles/editiIsShow'),{id:v,isShow:t},function(data,textStatus){
 | 
			
		||||
			  layer.close(loading);
 | 
			
		||||
			  var json = WST.toAdminJson(data);
 | 
			
		||||
			  if(json.status=='1'){
 | 
			
		||||
			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
		            mmg.load();
 | 
			
		||||
			  }else{
 | 
			
		||||
			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
			  }
 | 
			
		||||
		});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toggleIsShow(t,v){
 | 
			
		||||
	if(!WST.GRANT.WZGL_02)return;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    	$.post(WST.U('admin/articles/editiIsShow'),{id:v,isShow:t},function(data,textStatus){
 | 
			
		||||
			  layer.close(loading);
 | 
			
		||||
			  var json = WST.toAdminJson(data);
 | 
			
		||||
			  if(json.status=='1'){
 | 
			
		||||
			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
		            loadGrid();
 | 
			
		||||
			  }else{
 | 
			
		||||
			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
			  }
 | 
			
		||||
		});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
	location.href=WST.U('admin/articles/toEdit','id='+id);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdits(id){
 | 
			
		||||
    var params = WST.getParams('.ipt');
 | 
			
		||||
    params.id = id;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/articles/'+((id>0)?"edit":"add")),params,function(data,textStatus){
 | 
			
		||||
		  layer.close(loading);
 | 
			
		||||
		  var json = WST.toAdminJson(data);
 | 
			
		||||
		  if(json.status=='1'){
 | 
			
		||||
		    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
		        setTimeout(function(){ 
 | 
			
		||||
			    	location.href=WST.U('admin/articles/index');
 | 
			
		||||
		        },1000);
 | 
			
		||||
		  }else{
 | 
			
		||||
		        WST.msg(json.msg,{icon:2});
 | 
			
		||||
		  }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该文章吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/articles/del'),{id:id},function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           		            loadGrid();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toBatchDel(){
 | 
			
		||||
	var rows = mmg.selectedRows();
 | 
			
		||||
	if(rows.length==0){
 | 
			
		||||
		WST.msg('请选择要删除的文章',{icon:2});
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	var ids = [];
 | 
			
		||||
	for(var i=0;i<rows.length;i++){
 | 
			
		||||
       ids.push(rows[i]['articleId']); 
 | 
			
		||||
	}
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除这些文章吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/articles/delByBatch'),{ids:ids.join(',')},function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           		            loadGrid();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										166
									
								
								hyhproject/admin/view/articles/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,166 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link href="__ADMIN__/js/ztree/css/zTreeStyle/zTreeStyle.css?v={$v}" rel="stylesheet" type="text/css" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/ztree/jquery.ztree.all-3.5.js?v={$v}"></script>
 | 
			
		||||
<script src="__STATIC__/plugins/webuploader/webuploader.js?v={$v}" type="text/javascript" ></script>
 | 
			
		||||
<script src="__STATIC__/plugins//kindeditor/kindeditor.js?v={$v}" type="text/javascript" ></script>
 | 
			
		||||
<script src="__ADMIN__/articles/articles.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function () {
 | 
			
		||||
	initCombo(0);
 | 
			
		||||
	{if condition="$object['articleId'] !=0 "}
 | 
			
		||||
	   WST.setValues({$object});
 | 
			
		||||
	{/if}
 | 
			
		||||
	$('#articleForm').validator({
 | 
			
		||||
	    fields: {
 | 
			
		||||
	    	articleTitle: {
 | 
			
		||||
	    		tip: "请输入文章名称",
 | 
			
		||||
	    		rule: '文章名称:required;length[~50];'
 | 
			
		||||
	    	},
 | 
			
		||||
	    	catIds: {
 | 
			
		||||
		        tip: "请选择文章分类",
 | 
			
		||||
		    	rule: "文章分类:required;",
 | 
			
		||||
		    	target:"#catIdt"
 | 
			
		||||
		    },
 | 
			
		||||
	    	articleKey: {
 | 
			
		||||
	    		tip: "请输入关键字",
 | 
			
		||||
	    		rule: '关键字:required;length[~100];'
 | 
			
		||||
	    	},
 | 
			
		||||
        layoutType: {
 | 
			
		||||
          tip: "请选择移动端布局样式",
 | 
			
		||||
          rule: '关键字:required;length[~100];'
 | 
			
		||||
        },
 | 
			
		||||
		    articleContent: {
 | 
			
		||||
	    		tip: "请输入文章内容",
 | 
			
		||||
	    		rule: '文章内容:required;'
 | 
			
		||||
	    	}
 | 
			
		||||
	    },
 | 
			
		||||
	    valid: function(form){
 | 
			
		||||
	    	var articleId = $('#articleId').val();
 | 
			
		||||
	    	toEdits(articleId);
 | 
			
		||||
	    }
 | 
			
		||||
	})
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<input type='hidden' id='articleId' value='{$object["articleId"]}'/>
 | 
			
		||||
<form id='articleForm' autocomplete="off">
 | 
			
		||||
<table class='wst-form wst-box-top '>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <th width='150'>文章标题<font color='red'>*</font>:</th>
 | 
			
		||||
     <td><input type="text" id='articleTitle' name='articleTitle' maxLength='50' style='width:300px;' class='ipt'/></td>
 | 
			
		||||
  </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
     <th width='150' align='right'>分类类型<font color='red'>*</font>:</th>
 | 
			
		||||
     <td>
 | 
			
		||||
       <input id="catSel" type="text" readonly onclick="showMenu();" style='width:250px;' value="{$object.catName}"/>
 | 
			
		||||
     <div id="ztreeMenuContent" class="ztreeMenuContent">
 | 
			
		||||
        <ul id="dropDownTree" class="ztree" style="margin-top:0; width:250px; height: 300px;"></ul>
 | 
			
		||||
     </div>
 | 
			
		||||
     <input id="catId"  class="text ipt" autocomplete="off" type="hidden" value=""/>
 | 
			
		||||
     </td>
 | 
			
		||||
   </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
      <th width='150'>是否显示<font color='red'>*</font>:</th>
 | 
			
		||||
      <td height='24' class="layui-form">
 | 
			
		||||
         <input type="checkbox" id="isShow" {if $object['isShow']==1}checked{/if} name="isShow" value="1" class="ipt" lay-skin="switch" lay-filter="isShow" lay-text="显示|隐藏">
 | 
			
		||||
      </td>
 | 
			
		||||
   </tr>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <th width='150'>关键字<font color='red'>*</font>:</th>
 | 
			
		||||
     <td><input type="text" id='articleKey' name='articleKey' maxLength='120' style='width:600px;' class='ipt'/></td>
 | 
			
		||||
  </tr>
 | 
			
		||||
   <tr >
 | 
			
		||||
      <th>移动端布局样式预览图:</th>
 | 
			
		||||
      <td  class="typeState" style="padding-top: 10px;">
 | 
			
		||||
          <li>
 | 
			
		||||
             <input type='radio' name='TypeStatus' class='ipt' value='1'/>
 | 
			
		||||
             <label>
 | 
			
		||||
               <img src="__ADMIN__/img/news_1.png" style="width:150px;height:80px;">
 | 
			
		||||
             </label>
 | 
			
		||||
          </li>
 | 
			
		||||
          <li>
 | 
			
		||||
            <input type='radio' name='TypeStatus' class='ipt' value='2' />
 | 
			
		||||
             <label>
 | 
			
		||||
                <img src="__ADMIN__/img/news_2.png" style="width:150px;height:80px;">
 | 
			
		||||
             </label>
 | 
			
		||||
          </li>
 | 
			
		||||
          <li>
 | 
			
		||||
             <input type='radio' name='TypeStatus' class='ipt' value='3' />
 | 
			
		||||
             <label>
 | 
			
		||||
                <img src="__ADMIN__/img/news_3.png" style="width:150px;height:80px;">
 | 
			
		||||
             </label>
 | 
			
		||||
          </li>
 | 
			
		||||
      </td>
 | 
			
		||||
   </tr>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <th>封面图片:</th>
 | 
			
		||||
     <td>
 | 
			
		||||
     <div id='coverImgPicker'>请上传封面图片</div><span id='coverImgMsg'></span>图片大小:230x195(px),格式为 gif, jpg, jpeg, png
 | 
			
		||||
     <input type="hidden" id='coverImg' name="coverImg" class="ipt"/>
 | 
			
		||||
     </td>
 | 
			
		||||
  </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
    	<th>预览图:</th>
 | 
			
		||||
     	<td><div style="min-height:70px;" id="preview">{if ($object['articleId']!=0 && $object['coverImg'])}<img src="__IMGURL__/{$object['coverImg']}" height="152" />{/if}</div></td>
 | 
			
		||||
   </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
       <th width='150'>文章内容<font color='red'>*</font>:</th>
 | 
			
		||||
       <td>
 | 
			
		||||
       	<textarea id='articleContent' name='articleContent' class="form-control ipt" style='width:80%;height:400px'></textarea>
 | 
			
		||||
       </td>
 | 
			
		||||
    </tr>  
 | 
			
		||||
     <tr>
 | 
			
		||||
       <td colspan='2' align='center'>
 | 
			
		||||
       	<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(){
 | 
			
		||||
	//文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
  	  pick:'#coverImgPicker',
 | 
			
		||||
  	  formData: {dir:'articles',isThumb:1},
 | 
			
		||||
  	  accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
  	  callback:function(f){
 | 
			
		||||
  		  var json = WST.toAdminJson(f);
 | 
			
		||||
  		  if(json.status==1){
 | 
			
		||||
  			$('#coverImgMsg').empty().hide();
 | 
			
		||||
        	$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" height="152" />');
 | 
			
		||||
        	$('#coverImg').val(json.savePath+json.name);
 | 
			
		||||
  		  }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#coverImgMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
    });
 | 
			
		||||
  //编辑器
 | 
			
		||||
    KindEditor.ready(function(K) {
 | 
			
		||||
		editor1 = K.create('textarea[name="articleContent"]', {
 | 
			
		||||
			height:'350px',
 | 
			
		||||
      uploadJson : WST.conf.ROOT+'/admin/articles/editorUpload',
 | 
			
		||||
			allowFileManager : false,
 | 
			
		||||
			allowImageUpload : true,
 | 
			
		||||
      allowMediaUpload : false,
 | 
			
		||||
			items:[
 | 
			
		||||
			        'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
 | 
			
		||||
			        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
 | 
			
		||||
			        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
 | 
			
		||||
			        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
 | 
			
		||||
			        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
 | 
			
		||||
			        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|','image','media','table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
 | 
			
		||||
			        'anchor', 'link', 'unlink', '|', 'about'
 | 
			
		||||
			],
 | 
			
		||||
			afterBlur: function(){ this.sync(); }
 | 
			
		||||
		});
 | 
			
		||||
	});
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										35
									
								
								hyhproject/admin/view/articles/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,35 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link href="__ADMIN__/js/ztree/css/zTreeStyle/zTreeStyle.css?v={$v}" rel="stylesheet" type="text/css" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/ztree/jquery.ztree.all-3.5.js?v={$v}"></script>
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/articles/articles.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initCombo(1);initGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
   <input id="catSel" type="text" readonly onclick="showMenu();" style='width:250px;' />
 | 
			
		||||
   <div id="ztreeMenuContent" class="ztreeMenuContent">
 | 
			
		||||
      <ul id="dropDownTree" class="ztree" style="margin-top:0; width:250px; height: 300px;"></ul>
 | 
			
		||||
   </div>
 | 
			
		||||
   <input id="catId"  class="text ipt" autocomplete="off" type="hidden" value=""/>
 | 
			
		||||
   <input type='text' id='key' placeholder='文章标题'/> 
 | 
			
		||||
   <button class="btn btn-primary" onclick='javascript:loadGrid()'><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
   {if WSTGrant('WZGL_03')}
 | 
			
		||||
   <button class="btn btn-danger f-right btn-fixtop" onclick='javascript:toBatchDel()' style='margin-left:10px;'><i class='fa fa-trash'></i>批量删除</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
   {if WSTGrant('WZGL_01')}
 | 
			
		||||
   <button class="btn btn-success f-right btn-fixtop" onclick='javascript:toEdit(0)'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
   <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>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										134
									
								
								hyhproject/admin/view/attributes/attributes.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,134 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
$(function(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'属性名称', name:'attrName', width: 10},
 | 
			
		||||
            {title:'所属商品分类', name:'goodsCatNames', width: 160},
 | 
			
		||||
            {title:'属性类型', name:'attrType', width: 5,renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return (val==1)?'多选项':(val==2?'下拉框':'输入框');
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'属性选项', name:'attrVal', width: 260},
 | 
			
		||||
            {title:'是否显示', name:'attrVal', width: 20,renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return '<input type="checkbox" '+((item['isShow']==1)?"checked":"")+' id="isShow1" name="isShow1" value="1" class="ipt" lay-skin="switch" lay-filter="isShow1" data="'+item['attrId']+'" lay-text="显示|隐藏">'
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'排序号', name:'attrSort', width: 5},
 | 
			
		||||
            {title:'操作', name:'' ,width:80, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
	        	if(WST.GRANT.SPSX_02)h += "<a class='btn btn-blue' href='javascript:toEdit("+ item['attrId']+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
	        	if(WST.GRANT.SPSX_03)h += "<a class='btn btn-red' href='javascript:toDel(" + item['attrId'] + ")'><i class='fa fa-trash-o'></i>删除</a> "; 
 | 
			
		||||
	            return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/attributes/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
    mmg.on('loadSuccess',function(data){
 | 
			
		||||
    	layui.form.render();
 | 
			
		||||
    	layui.form.on('switch(isShow1)', function(data){
 | 
			
		||||
           var id = $(this).attr("data");
 | 
			
		||||
		   if(this.checked){
 | 
			
		||||
			   toggleIsShow(id, 1);
 | 
			
		||||
		   }else{
 | 
			
		||||
			   toggleIsShow(id, 0);
 | 
			
		||||
		   }
 | 
			
		||||
		});
 | 
			
		||||
    })
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
//------------------属性类型---------------//
 | 
			
		||||
function toEdit(attrId){
 | 
			
		||||
	$("select[id^='bcat_0_']").remove();
 | 
			
		||||
	$('#attrForm').get(0).reset();
 | 
			
		||||
	$.post(WST.U('admin/attributes/get'),{attrId:attrId},function(data,textStatus){
 | 
			
		||||
        var json = WST.toAdminJson(data);
 | 
			
		||||
        WST.setValues(json);
 | 
			
		||||
        layui.form.render();
 | 
			
		||||
        if(json.goodsCatId>0){
 | 
			
		||||
        	var goodsCatPath = json.goodsCatPath.split("_");
 | 
			
		||||
        	$('#bcat_0').val(goodsCatPath[0]);
 | 
			
		||||
        	var opts = {id:'bcat_0',val:goodsCatPath[0],childIds:goodsCatPath,className:'goodsCats'}
 | 
			
		||||
        	WST.ITSetGoodsCats(opts);
 | 
			
		||||
        }
 | 
			
		||||
		var title =(attrId==0)?"新增":"编辑";
 | 
			
		||||
		var box = WST.open({title:title,type:1,content:$('#attrBox'),area: ['750px', '320px'],btn:['确定','取消'],
 | 
			
		||||
			end:function(){$('#attrBox').hide();},yes:function(){
 | 
			
		||||
			$('#attrForm').submit();
 | 
			
		||||
		}});
 | 
			
		||||
		$('#attrForm').validator({
 | 
			
		||||
			rules: {
 | 
			
		||||
				attrType: function() {
 | 
			
		||||
		            return ($('#attrType').val()!='0');
 | 
			
		||||
		        }
 | 
			
		||||
		    },
 | 
			
		||||
			fields: {
 | 
			
		||||
			 	'attrName': {rule:"required",msg:{required:'请输入属性名称'}},
 | 
			
		||||
			 	'attrVal': 'required(attrType)'
 | 
			
		||||
			},
 | 
			
		||||
			valid: function(form){
 | 
			
		||||
			    var params = WST.getParams('.ipt');
 | 
			
		||||
			    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
			    params.goodsCatId = WST.ITGetGoodsCatVal('goodsCats');
 | 
			
		||||
			 	$.post(WST.U('admin/attributes/'+((params.attrId==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
			 		layer.close(loading);
 | 
			
		||||
			    	var json = WST.toAdminJson(data);
 | 
			
		||||
					if(json.status=='1'){
 | 
			
		||||
						WST.msg("操作成功",{icon:1});
 | 
			
		||||
						layer.close(box);
 | 
			
		||||
						$('#attrBox').hide();
 | 
			
		||||
						loadGrid();
 | 
			
		||||
						layer.close(box);
 | 
			
		||||
				  	}else{
 | 
			
		||||
				    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
					}
 | 
			
		||||
			 	});
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	var keyName = $("#keyName").val();
 | 
			
		||||
	var goodsCatPath = WST.ITGetAllGoodsCatVals('cat_0','pgoodsCats');
 | 
			
		||||
	mmg.load({"page":1,"keyName":keyName,"goodsCatPath":goodsCatPath.join('_')});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toDel(attrId){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该属性吗?",yes:function(){
 | 
			
		||||
		var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
		$.post(WST.U('admin/attributes/del'),{attrId:attrId},function(data,textStatus){
 | 
			
		||||
			layer.close(loading);
 | 
			
		||||
			var json = WST.toAdminJson(data);
 | 
			
		||||
			if(json.status=='1'){
 | 
			
		||||
				WST.msg("操作成功",{icon:1});
 | 
			
		||||
				layer.close(box);
 | 
			
		||||
				loadGrid();
 | 
			
		||||
			}else{
 | 
			
		||||
				WST.msg(json.msg,{icon:2});
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toggleIsShow( attrId, isShow){
 | 
			
		||||
	$.post(WST.U('admin/attributes/setToggle'), {'attrId':attrId, 'isShow':isShow}, function(data, textStatus){
 | 
			
		||||
		var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status=='1'){
 | 
			
		||||
			WST.msg("操作成功",{icon:1});
 | 
			
		||||
			loadGrid();
 | 
			
		||||
		}else{
 | 
			
		||||
			WST.msg(json.msg,{icon:2});
 | 
			
		||||
		}
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function changeArrType(v){
 | 
			
		||||
	if(v>0){
 | 
			
		||||
		$('#attrValTr').show();
 | 
			
		||||
	}else{
 | 
			
		||||
		$('#attrValTr').hide();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										87
									
								
								hyhproject/admin/view/attributes/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,87 @@
 | 
			
		||||
{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__/attributes/attributes.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
	<div class="f-left">
 | 
			
		||||
		<div id="pcat_0_box" class="f-left">
 | 
			
		||||
		 <select id="cat_0" class='ipt pgoodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:false,className:'pgoodsCats'});">
 | 
			
		||||
	      	<option value="">-所属分类-</option>
 | 
			
		||||
	      	{volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
	        <option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
	        {/volist}
 | 
			
		||||
	     </select>
 | 
			
		||||
	     </div>
 | 
			
		||||
	     <input type="text" id="keyName" placeholder="请输入属性名称"/>
 | 
			
		||||
	     <button class="btn btn-primary" onclick="loadGrid(0)"><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
     </div>
 | 
			
		||||
    
 | 
			
		||||
   {if WSTGrant('SPSX_01')}
 | 
			
		||||
   <button class="btn btn-success f-right" onclick="javascript:toEdit(0);"><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='attrBox' style='display:none'>
 | 
			
		||||
	<form id="attrForm">
 | 
			
		||||
		<table class='wst-form wst-box-top'>
 | 
			
		||||
		  <tr>
 | 
			
		||||
		      <th width='150'>
 | 
			
		||||
		      	<input type="hidden" id="attrId" value="" class="ipt" />
 | 
			
		||||
		    	 所属商品分类<font color='red'>*</font>:</th>
 | 
			
		||||
		     	<td id="bcat_0_box">
 | 
			
		||||
		            <select id="bcat_0" class='ipt goodsCats' level="0" onchange="WST.ITGoodsCats({id:'bcat_0',val:this.value,isRequire:false,className:'goodsCats'});" data-rule='所属商品分类:required;' data-target="#msg_bcat_0">
 | 
			
		||||
		                <option value="">-请选择-</option>
 | 
			
		||||
		                {volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
				        <option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
				        {/volist}
 | 
			
		||||
		           	</select>
 | 
			
		||||
		           	<span class='msg-box' id='msg_bcat_0' style='color:red;'>(至少选择一个商品分类)</span>
 | 
			
		||||
		          </td>
 | 
			
		||||
		       </tr>
 | 
			
		||||
		       <tr>
 | 
			
		||||
		          <th>属性名称<font color='red'>*</font>:</th>
 | 
			
		||||
		          <td>
 | 
			
		||||
		              <input type="text" id="attrName" name="attrName" class="ipt" maxLength='20'/>
 | 
			
		||||
		          </td>
 | 
			
		||||
		       </tr>
 | 
			
		||||
		       <tr>
 | 
			
		||||
		          <th>属性类型<font color='red'>*</font>:</th>
 | 
			
		||||
		          <td>
 | 
			
		||||
		              <select id='attrType' class='ipt' onchange='changeArrType(this.value)'>
 | 
			
		||||
		                 <option value='0'>输入框</option>
 | 
			
		||||
		                 <option value='1'>多选项</option>
 | 
			
		||||
		                 <option value='2'>下拉项</option>
 | 
			
		||||
		              </select>
 | 
			
		||||
		          </td>
 | 
			
		||||
		       </tr>
 | 
			
		||||
		       <tr id='attrValTr' style='display:none'>
 | 
			
		||||
		          <th>属性选项<font color='red'>*</font>:</th>
 | 
			
		||||
		          <td>
 | 
			
		||||
		              <input type="text" id="attrVal" name="attrVal" class="ipt" style='width:70%' placeholder="每个属性选项以,号分隔" data-msg='请输入属性选项'/>
 | 
			
		||||
		          </td>
 | 
			
		||||
		       </tr>
 | 
			
		||||
		       <tr>
 | 
			
		||||
		          <th>是否显示<font color='red'>  </font>:</th>
 | 
			
		||||
		          <td class='layui-form'>
 | 
			
		||||
		            <input type="checkbox" id="isShow" name="isShow" value="1" class="ipt" lay-skin="switch" lay-filter="isShow" lay-text="显示|隐藏">
 | 
			
		||||
		          </td>
 | 
			
		||||
		       </tr>
 | 
			
		||||
		       <tr>
 | 
			
		||||
		          <th>排序号<font color='red'>*</font>:</th>
 | 
			
		||||
		          <td>
 | 
			
		||||
		              <input type="text" id="attrSort" name="attrSort" class="ipt" maxLength='20'/>
 | 
			
		||||
		          </td>
 | 
			
		||||
		       </tr>
 | 
			
		||||
		</table>
 | 
			
		||||
	</form>
 | 
			
		||||
</div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										90
									
								
								hyhproject/admin/view/banks/banks.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,90 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'银行名称', name:'bankName', width: 100},
 | 
			
		||||
            {title:'操作', name:'' ,width:70, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                if(WST.GRANT.YHGL_02)h += "<a  class='btn btn-blue' onclick='javascript:getForEdit("+item['bankId']+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
                if(WST.GRANT.YHGL_03)h += "<a  class='btn btn-red' onclick='javascript:toDel(" + item['bankId'] + ")'><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/banks/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/banks/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);
 | 
			
		||||
	           		            mmg.load();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getForEdit(id){
 | 
			
		||||
	 var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
     $.post(WST.U('admin/banks/get'),{id:id},function(data,textStatus){
 | 
			
		||||
           layer.close(loading);
 | 
			
		||||
           var json = WST.toAdminJson(data);
 | 
			
		||||
           if(json.bankId){
 | 
			
		||||
           		WST.setValues(json);
 | 
			
		||||
           		toEdit(json.bankId);
 | 
			
		||||
           }else{
 | 
			
		||||
           		WST.msg(json.msg,{icon:2});
 | 
			
		||||
           }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
	var title =(id==0)?"新增":"编辑";
 | 
			
		||||
	var box = WST.open({title:title,type:1,content:$('#bankBox'),area: ['450px', '160px'],
 | 
			
		||||
		btn:['确定','取消'],end:function(){$('#bankBox').hide();},yes:function(){
 | 
			
		||||
		$('#bankForm').submit();
 | 
			
		||||
	}});
 | 
			
		||||
	$('#bankForm').validator({
 | 
			
		||||
        fields: {
 | 
			
		||||
            bankName: {
 | 
			
		||||
            	rule:"required;",
 | 
			
		||||
            	msg:{required:"银行名称不能为空"},
 | 
			
		||||
            	tip:"请输入银行名称",
 | 
			
		||||
            	ok:"",
 | 
			
		||||
            },
 | 
			
		||||
           
 | 
			
		||||
        },
 | 
			
		||||
       valid: function(form){
 | 
			
		||||
		        var params = WST.getParams('.ipt');
 | 
			
		||||
	                params.bankId = id;
 | 
			
		||||
	                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           		$.post(WST.U('admin/banks/'+((id==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg("操作成功",{icon:1});
 | 
			
		||||
	           			    	$('#bankBox').hide();
 | 
			
		||||
	           			    	$('#bankForm')[0].reset();
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           		            mmg.load();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
 | 
			
		||||
    	}
 | 
			
		||||
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										33
									
								
								hyhproject/admin/view/banks/list.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__/banks/banks.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
{if WSTGrant('YHGL_01')}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
   <button class="btn btn-success f-right" onclick='javascript:toEdit(0)'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
{/if}
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='bankBox' style='display:none'>
 | 
			
		||||
    <form id='bankForm' autocomplete="off">
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>银行名称<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><input type='text' id='bankName' name="bankName"  class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    </form>
 | 
			
		||||
 </div>
 | 
			
		||||
<script>
 | 
			
		||||
  $(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										28
									
								
								hyhproject/admin/view/base.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,28 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
<head>
 | 
			
		||||
<meta charset="utf-8">
 | 
			
		||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
 | 
			
		||||
<title>后台管理中心 - {:WSTConf('CONF.mallName')}</title>
 | 
			
		||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
 | 
			
		||||
<link rel="stylesheet" href="__ADMIN__/js/bootstrap/css/bootstrap.min.css" type="text/css" />
 | 
			
		||||
<link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" type="text/css" />
 | 
			
		||||
<link rel="stylesheet" href="__STATIC__/plugins/font-awesome/css/font-awesome.min.css" type="text/css" />
 | 
			
		||||
<script src="__ADMIN__/js/jquery.min.js"></script>
 | 
			
		||||
{block name="css"}{/block}
 | 
			
		||||
<link href="__ADMIN__/css/common.css?v={$v}" rel="stylesheet" type="text/css" />
 | 
			
		||||
<script>
 | 
			
		||||
window.conf = {"DOMAIN":"{:str_replace('index.php','',$Request.root.true)}","ROOT":"__ROOT__","IMGURL":"__IMGURL__","APP":"__APP__","STATIC":"__STATIC__","SUFFIX":"{:config('url_html_suffix')}","GOODS_LOGO":"{:WSTConf('CONF.goodsLogo')}","SHOP_LOGO":"{:WSTConf('CONF.shopLogo')}","MALL_LOGO":"{:WSTConf('CONF.mallLogo')}","USER_LOGO":"{:WSTConf('CONF.userLogo')}",'GRANT':'{:implode(",",session("WST_STAFF.privileges"))}',"IS_CRYPT":"{:WSTConf('CONF.isCryptPwd')}","ROUTES":'{:WSTRoute()}'}
 | 
			
		||||
</script>
 | 
			
		||||
<script language="javascript" type="text/javascript" src="__STATIC__/js/common.js"></script>
 | 
			
		||||
</head>
 | 
			
		||||
<body class="hold-transition skin-blue sidebar-mini">
 | 
			
		||||
<div id="j-loader"><img src="__ADMIN__/img/ajax-loader.gif"/></div>
 | 
			
		||||
{block name="main"}{/block}
 | 
			
		||||
<script src="__ADMIN__/js/bootstrap/js/bootstrap.min.js"></script>
 | 
			
		||||
<script language="javascript" type="text/javascript" src="__STATIC__/plugins/layui/layui.all.js"></script>
 | 
			
		||||
<script language="javascript" type="text/javascript" src="__ADMIN__/js/common.js"></script>
 | 
			
		||||
{block name="js"}{/block}
 | 
			
		||||
{:hook('initCronHook')}
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										88
									
								
								hyhproject/admin/view/brands/brands.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,88 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
		{title:'品牌名称', name:'brandName', width: 100},
 | 
			
		||||
		{title:'品牌介绍', name:'brandDesc', width: 100,renderer: function(val,item,rowIndex){
 | 
			
		||||
			return "<span  ><p class='wst-nowrap'>"+item['brandDesc']+"</p></span>";
 | 
			
		||||
		}},
 | 
			
		||||
		{title:'商铺', name:'shopName', width: 100,renderer: function(val,item,rowIndex){
 | 
			
		||||
			return "<span  ><p class='wst-nowrap'>"+item['shopName']+"</p></span>";
 | 
			
		||||
		}},
 | 
			
		||||
		{title:'主营分类', name:'catName', width: 100,renderer: function(val,item,rowIndex){
 | 
			
		||||
			return "<span  ><p class='wst-nowrap'>"+item['catName']+"</p></span>";
 | 
			
		||||
		}},
 | 
			
		||||
		{title:'品牌图标', name:'img', width: 100, renderer: function(val,item,rowIndex){
 | 
			
		||||
			return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:40px;width:40px;' src='"+WST.conf.IMGURL+"/"+item['brandImg']
 | 
			
		||||
			+"'><span class='imged' style='left:45px;' ><img  style='height:150px;width:150px;' src='"+WST.conf.IMGURL+"/"+item['brandImg']+"'></span></span>";
 | 
			
		||||
		}},
 | 
			
		||||
		{title:'操作', name:'' ,width:70, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
			var h = "";
 | 
			
		||||
			if(WST.GRANT.PPGL_02)h += "<a class='btn btn-blue' href='javascript:toEdit("+item["brandId"]+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
			if(WST.GRANT.PPGL_03)h += "<a class='btn btn-red' href='javascript:toDel("+item["brandId"]+")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
			return h;
 | 
			
		||||
		}}
 | 
			
		||||
		];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true,indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/brands/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    }); 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	mmg.load({page:1,key:$('#key').val(),id:$('#catId').val()});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
	location.href=WST.U('admin/brands/toEdit','id='+id);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdits(id){
 | 
			
		||||
    var params = WST.getParams('.ipt');
 | 
			
		||||
    params.id = id;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/brands/'+((id>0)?"edit":"add")),params,function(data,textStatus){
 | 
			
		||||
		  layer.close(loading);
 | 
			
		||||
		  var json = WST.toAdminJson(data);
 | 
			
		||||
		  if(json.status=='1'){
 | 
			
		||||
		    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
		        setTimeout(function(){ 
 | 
			
		||||
			    	location.href=WST.U('admin/brands/index');
 | 
			
		||||
		        },1000);
 | 
			
		||||
		  }else{
 | 
			
		||||
		        WST.msg(json.msg,{icon:2});
 | 
			
		||||
		  }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该品牌吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/brands/del'),{id:id},function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           		            loadGrid();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
function toolTip(){
 | 
			
		||||
    $('body').mousemove(function(e){
 | 
			
		||||
    	var windowH = $(window).height();  
 | 
			
		||||
        if(e.pageY >= windowH*0.8){
 | 
			
		||||
        	var top = windowH*0.233;
 | 
			
		||||
        	$('.imged').css('margin-top',-top);
 | 
			
		||||
        }else{
 | 
			
		||||
        	var top = windowH*0.06;
 | 
			
		||||
        	$('.imged').css('margin-top',-top);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										142
									
								
								hyhproject/admin/view/brands/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,142 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
 | 
			
		||||
<style>
 | 
			
		||||
.goodsCat{display:inline-block;width:150px}
 | 
			
		||||
</style>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__STATIC__/plugins/webuploader/webuploader.js?v={$v}" type="text/javascript" ></script>
 | 
			
		||||
<script src="__STATIC__/plugins//kindeditor/kindeditor.js?v={$v}" type="text/javascript" ></script>
 | 
			
		||||
<script src="__ADMIN__/brands/brands.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function () {
 | 
			
		||||
	   {if condition="$object['brandId'] !=0"}
 | 
			
		||||
		WST.setValues({$object});
 | 
			
		||||
	   {/if}
 | 
			
		||||
		$('#brandForm').validator({
 | 
			
		||||
		    fields: {
 | 
			
		||||
				brandName: {
 | 
			
		||||
					tip: "请输入品牌名称",
 | 
			
		||||
					rule: '品牌名称:required;length[~50];'
 | 
			
		||||
				},
 | 
			
		||||
				shopId: {
 | 
			
		||||
					tip: "请输入店铺ID",
 | 
			
		||||
					rule: '品牌名称:required;'
 | 
			
		||||
				},
 | 
			
		||||
		    	catId: {
 | 
			
		||||
		    		tip: "请选择分类",
 | 
			
		||||
		    		rule: 'checked(1~);length[~16];'
 | 
			
		||||
		    	},
 | 
			
		||||
		    	brandDesc: {
 | 
			
		||||
		    		tip: "请输入品牌介绍",
 | 
			
		||||
		    		rule: '品牌介绍:required;'
 | 
			
		||||
		    	}
 | 
			
		||||
		    },
 | 
			
		||||
		    valid: function(form){
 | 
			
		||||
		    	var brandId = $('#brandId').val();
 | 
			
		||||
		    	toEdits(brandId);
 | 
			
		||||
		    }
 | 
			
		||||
		})
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<input type='hidden' id='brandId' value='{$object["brandId"]}'/>
 | 
			
		||||
<div class="l-loading" style="display: block" id="wst-loading"></div>
 | 
			
		||||
<form id="brandForm" autocomplete="off">
 | 
			
		||||
<table class='wst-form wst-box-top'>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <th width='150'>品牌名称<font color='red'>*</font>:</th>
 | 
			
		||||
     <td><input type="text" id='brandName' name='brandName' maxLength='20' style='width:300px;' class='ipt'/></td>
 | 
			
		||||
  </tr>
 | 
			
		||||
	<tr>
 | 
			
		||||
		<th width='150' align='right'>店铺ID<font color='red'>*</font>:</th>
 | 
			
		||||
		<td><input type="text" id='shopId' name='shopId' maxLength='20' style='width:300px;' class='ipt'/></td>
 | 
			
		||||
	</tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
     <th width='150' align='right'>所属分类<font color='red'>*</font>:</th>
 | 
			
		||||
     <td>
 | 
			
		||||
     {volist name="gcatList" id="vo"}
 | 
			
		||||
	     <label class='goodsCat'>
 | 
			
		||||
	     <input type='checkbox' id='catId' name='catId' class="ipt" value='{$vo["catId"]}'
 | 
			
		||||
       {if condition="$object['brandId'] !=0 "}
 | 
			
		||||
       {if in_array($vo["catId"],$object['catIds'])==1}checked{/if}
 | 
			
		||||
       {/if}
 | 
			
		||||
       > {$vo["catName"]} 
 | 
			
		||||
	     </label>
 | 
			
		||||
	 {/volist}
 | 
			
		||||
     </td>
 | 
			
		||||
   </tr>
 | 
			
		||||
   <tr width='150'>
 | 
			
		||||
     <th align='right'>品牌图标<font color='red'>*</font>:</th>
 | 
			
		||||
     <td>
 | 
			
		||||
     	<div>
 | 
			
		||||
    	<div id="filePicker" style='margin-left:0px;float:left; width: 100px'>上传图片</div>
 | 
			
		||||
     	    <div style='margin-left:5px;float:left'>图片大小:400 x 200 (px),格式为 gif, jpg, jpeg,bmp, png</div>
 | 
			
		||||
     	    <input id="brandImg" name="brandImg" class="text ipt" autocomplete="off" type="hidden" value="{$object.brandImg}"/>
 | 
			
		||||
     	    <div style="clear:both;"></div>
 | 
			
		||||
     	</div>
 | 
			
		||||
     </td>
 | 
			
		||||
   </tr>
 | 
			
		||||
   <tr >
 | 
			
		||||
     <th align='right' height='152'>预览图:</th>
 | 
			
		||||
     <td >
 | 
			
		||||
     	<div id="preview" >
 | 
			
		||||
     	{if $object['brandId']!=0}
 | 
			
		||||
       	<img src="__IMGURL__/{$object['brandImg']}" class="ipt" height='152'/>
 | 
			
		||||
       	{/if}
 | 
			
		||||
       	</div>
 | 
			
		||||
     </td>
 | 
			
		||||
   </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
       <th width='150'>品牌介绍<font color='red'>*</font>:</th>
 | 
			
		||||
       <td>
 | 
			
		||||
       	<textarea id='brandDesc' name='brandDesc' class="form-control ipt" style='width:80%;height:400px'></textarea>
 | 
			
		||||
       </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
       <td colspan='2' align='center'>
 | 
			
		||||
           <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(){
 | 
			
		||||
  //文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
  	  pick:'#filePicker',
 | 
			
		||||
  	  formData: {dir:'brands',mWidth:500,mHeight:250},
 | 
			
		||||
  	  accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
  	  callback:function(f){
 | 
			
		||||
  		  var json = WST.toAdminJson(f);
 | 
			
		||||
  		  if(json.status==1){
 | 
			
		||||
        	$('#preview').html('<img src="'+WST.conf.IMGURL+"/"+json.savePath+json.thumb+'" height="200" />');
 | 
			
		||||
        	$('#brandImg').val(json.savePath+json.name);
 | 
			
		||||
  		  }
 | 
			
		||||
	  }
 | 
			
		||||
    });
 | 
			
		||||
  //编辑器
 | 
			
		||||
    KindEditor.ready(function(K) {
 | 
			
		||||
		editor1 = K.create('textarea[name="brandDesc"]', {
 | 
			
		||||
			height:'350px',
 | 
			
		||||
			uploadJson : WST.conf.ROOT+'/admin/brands/editorUpload',
 | 
			
		||||
			allowFileManager : false,
 | 
			
		||||
			allowImageUpload : true,
 | 
			
		||||
			items:[
 | 
			
		||||
			        'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
 | 
			
		||||
			        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
 | 
			
		||||
			        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
 | 
			
		||||
			        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
 | 
			
		||||
			        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
 | 
			
		||||
			        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|','image','table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
 | 
			
		||||
			        'anchor', 'link', 'unlink', '|', 'about'
 | 
			
		||||
			],
 | 
			
		||||
			afterBlur: function(){ this.sync(); }
 | 
			
		||||
		});
 | 
			
		||||
	});
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										32
									
								
								hyhproject/admin/view/brands/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,32 @@
 | 
			
		||||
{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__/brands/brands.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
     <select id='catId'>
 | 
			
		||||
       <option value='0'>所属商品分类</option>
 | 
			
		||||
       {volist name="gcatList" id="vo"}
 | 
			
		||||
       <option value='{$vo['catId']}'>{$vo['catName']}</option>
 | 
			
		||||
       {/volist}
 | 
			
		||||
     </select> 
 | 
			
		||||
   <input type='text' id='key' placeholder='品牌名称'/>  
 | 
			
		||||
   <button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
   {if WSTGrant('PPGL_01')}
 | 
			
		||||
   <button class="btn btn-success f-right" onclick='javascript:toEdit(0)'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
 | 
			
		||||
   <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>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										28
									
								
								hyhproject/admin/view/carts/carts.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,28 @@
 | 
			
		||||
{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__/carts/carts.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
 | 
			
		||||
<input type="text" name="goodsName"  placeholder='商品名称' id="goodsName" class='j-ipt'/>
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称' id="shopName" class='j-ipt'/>
 | 
			
		||||
<input type="text" name="loginName"  placeholder='用户名称' id="loginName" class='j-ipt'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
   <button class="btn btn-primary btn-fixtop f-right"  style="margin-left: 10px;" onclick='javascript:toExport()'><i class="fa fa-sign-in"></i>导出</button>
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										62
									
								
								hyhproject/admin/view/carts/carts.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,62 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
$(function(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:' ', name:'goodsImg', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
                var thumb = item['goodsImg'];
 | 
			
		||||
                //thumb = thumb.replace('.','_thumb.');
 | 
			
		||||
                return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+thumb+"/thumb80"
 | 
			
		||||
                +"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'用户名称', name:'loginName' ,width:60,sortable:true},
 | 
			
		||||
            {title:'商品名称', name:'goodsName', width: 120,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span><p>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }}, 
 | 
			
		||||
            {title:'购物车数量', name:'cartNum' ,width:20,sortable:true,align:'center', },
 | 
			
		||||
            {title:'单品价格', name:'shopPrice' ,width:20,sortable:true,align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+item['shopPrice'];
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'总价', name:'totalPrice' ,width:20,sortable:true,align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+item['totalPrice'];
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'所属店铺', name:'shopName' ,width:60,sortable:true},
 | 
			
		||||
           
 | 
			
		||||
            {title:'所属分类', name:'goodsCatName' ,width:60,renderer:function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsCatName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/carts/cartsByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });   
 | 
			
		||||
}
 | 
			
		||||
function toExport(){
 | 
			
		||||
    var params = {};
 | 
			
		||||
    params = WST.getParams('.j-ipt');
 | 
			
		||||
    var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        location.href=WST.U('admin/carts/toExport',params);
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	var params = WST.getParams('.j-ipt');
 | 
			
		||||
    params.page = 1;
 | 
			
		||||
	mmg.load(params);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										90
									
								
								hyhproject/admin/view/cashdraws/cashdraws.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,90 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'提现单号', name:'cashNo', width: 100,sortable: true},
 | 
			
		||||
            {title:'会员类型', name:'targetType' ,width:60,sortable: true, renderer:function(val,item,rowIndex){
 | 
			
		||||
                return (item['targetType']==1)?"【商家】":"【会员】";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'会员名称', name:'loginName' ,width:100, renderer:function(val,item,rowIndex){
 | 
			
		||||
                if(item['targetType']==1){
 | 
			
		||||
                    return WST.blank(item['userName'])+"("+item['loginName']+")";
 | 
			
		||||
	            }else{
 | 
			
		||||
                    return WST.blank(item['userName'])+"("+item['loginName']+")";
 | 
			
		||||
	            }
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'提现银行', name:'accTargetName' ,width:60,sortable: true},
 | 
			
		||||
            {title:'银行卡号', name:'accNo' ,width:40,sortable: true},
 | 
			
		||||
            {title:'持卡人', name:'accUser' ,width:40,sortable: true},
 | 
			
		||||
            {title:'提现金额', name:'money' ,width:40,sortable: true, renderer:function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+val;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'提现时间', name:'createTime',sortable: true ,width:60},
 | 
			
		||||
            {title:'状态', name:'cashSatus' ,width:60,sortable: true, renderer:function(val,item,rowIndex){
 | 
			
		||||
                return (val==1)?"<span class='statu-yes'><i class='fa fa-check-circle'></i> 提现成功</span>":((val==-1)?"<span class='statu-no'><i class='fa fa-ban'></i> 提现失败 </span>":"<span class='statu-wait'><i class='fa fa-clock-o'></i> 待处理 </span>");
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:120, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
	            h += "<a class='btn btn-blue' href='javascript:toView(" + item['cashId'] + ")'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
	            if(item['cashSatus']==0 && WST.GRANT.TXSQ_04)h += "<a class='btn btn-green' href='javascript:toEdit(" + item['cashId'] + ")'><i class='fa fa-pencil'></i>处理</a> ";
 | 
			
		||||
	            return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-173,indexCol: true,indexColWidth:50, cols: cols,method:'POST',nowrap:true,
 | 
			
		||||
        url: WST.U('admin/cashdraws/pageQuery'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'createTime',sortStatus:'desc',
 | 
			
		||||
        remoteSort:true ,
 | 
			
		||||
        sortName: 'cashNo',
 | 
			
		||||
        sortStatus: 'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         var diff = v?173:128;
 | 
			
		||||
         mmg.resize({height:h-diff})
 | 
			
		||||
    }}); 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
	location.href=WST.U('admin/cashdraws/toHandle','id='+id);
 | 
			
		||||
}
 | 
			
		||||
function toView(id){
 | 
			
		||||
	location.href=WST.U('admin/cashdraws/toView','id='+id);
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	mmg.load({page:1,cashNo:$('#cashNo').val(),cashSatus:$('#cashSatus').val(),targetType:$('#targetType').val()});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function save(){
 | 
			
		||||
	var params = WST.getParams('.ipt');
 | 
			
		||||
	if(typeof(params.cashSatus)=='undefined'){
 | 
			
		||||
		WST.msg('请选择提现结果',{icon:2});
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	if(params.cashSatus==-1 && $.trim(params.cashRemarks)==''){
 | 
			
		||||
		WST.msg('输入提现失败原因',{icon:2});
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	if(WST.confirm({content:'您确定该提现申请'+((params.cashSatus==1)?'成功':'失败')+'吗?',yes:function(){
 | 
			
		||||
		var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	    $.post(WST.U('admin/cashdraws/handle'),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/cashdraws/index');
 | 
			
		||||
	    	}else{
 | 
			
		||||
	    		WST.msg(json.msg,{icon:2});
 | 
			
		||||
	    	}
 | 
			
		||||
	    });
 | 
			
		||||
	}}));
 | 
			
		||||
}
 | 
			
		||||
function toExport(){
 | 
			
		||||
    var params = {};
 | 
			
		||||
    params = WST.getParams('.j-ipt');
 | 
			
		||||
    var box = WST.confirm({content:"您确定要导出提现申请记录吗?",yes:function(){
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        location.href=WST.U('admin/cashdraws/toExport',params);
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										85
									
								
								hyhproject/admin/view/cashdraws/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,85 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/cashdraws/cashdraws.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<style>
 | 
			
		||||
  th{height:25px;}
 | 
			
		||||
</style>
 | 
			
		||||
<form autocomplete='off' id='editFrom'>
 | 
			
		||||
    <input type='hidden' id='cashId' class='ipt' value="{$object['cashId']}"/>
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th width='150'>会员类型:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
           {if $object['targetType']==1}商家{else}普通会员{/if}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th width='150'>会员名称:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
           {$object['userName']}({$object['loginName']})
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th width='150'>提现单号:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
           {$object['cashNo']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>提现金额:</th>
 | 
			
		||||
           <td>¥{$object['money']}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>提现银行:</th>
 | 
			
		||||
           <td>{$object['accTargetName']}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>开卡地区:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
             {$object['accAreaName']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>卡号:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
             {$object['accNo']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>持卡人:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
             {$object['accUser']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>申请时间:</th>
 | 
			
		||||
           <td>{$object['createTime']}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>提现结果:</th>
 | 
			
		||||
           <td class='layui-form'>
 | 
			
		||||
             <label>
 | 
			
		||||
               <input type='radio' name='cashSatus' class='ipt' value='1' title='提现成功'/>
 | 
			
		||||
             </label>
 | 
			
		||||
             <label>
 | 
			
		||||
               <input type='radio' name='cashSatus' class='ipt' value='-1' title='提现失败'/>
 | 
			
		||||
             </label>
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr >
 | 
			
		||||
           <th valign='top'>提现备注:<br/>(用户可见)  </th>
 | 
			
		||||
           <td>
 | 
			
		||||
             <textarea id='cashRemarks' class='ipt' style='width:70%;height:80px;'></textarea>
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <td colspan='2' align='center'>
 | 
			
		||||
           		<button type="button" class="btn btn-primary btn-mright" onclick='javascript:save()'><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>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										42
									
								
								hyhproject/admin/view/cashdraws/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,42 @@
 | 
			
		||||
{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__/cashdraws/cashdraws.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>本功能主要用于处理来自于会员(商家)的提现请求。提现通过后系统会扣除会员(商家)的钱包金额。</li>
 | 
			
		||||
    <li>本功能只扣除本系统的会员(商家)钱包金额,实际上的资金转账需平台线下操作。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
    <select id='targetType' class='j-ipt'>
 | 
			
		||||
	    <option value='-1'>会员类型</option>
 | 
			
		||||
        <option value='0'>会员</option>
 | 
			
		||||
        <option value='1'>商家</option>
 | 
			
		||||
    </select>
 | 
			
		||||
    <select id='cashSatus' class='j-ipt'>
 | 
			
		||||
        <option value='-1'>提现状态</option>
 | 
			
		||||
        <option value='0'>待处理</option>
 | 
			
		||||
        <option value='1'>已通过</option>
 | 
			
		||||
    </select>
 | 
			
		||||
    <input type="text" name="cashNo"  placeholder='提现单号' id="cashNo" class='j-ipt'/>
 | 
			
		||||
    <button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
    <button class="btn btn-primary f-right btn-fixtop" onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></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>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
	initGrid();
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										70
									
								
								hyhproject/admin/view/cashdraws/view.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,70 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/cashdraws/cashdraws.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<form autocomplete='off'>
 | 
			
		||||
    <input type='hidden' id='cashId' class='ipt' value="{$object['cashId']}"/>
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th width='150'>会员类型:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
           {if $object['targetType']==1}商家{else}普通会员{/if}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th width='150'>会员名称:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
           {$object['userName']}({$object['loginName']})
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th width='150'>提现单号:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
           {$object['cashNo']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>提现金额:</th>
 | 
			
		||||
           <td>¥{$object['money']}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>提现银行:</th>
 | 
			
		||||
           <td>{$object['accTargetName']}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>开卡地区:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
             {$object['accAreaName']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>卡号:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
             {$object['accNo']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>持卡人:</th>
 | 
			
		||||
           <td>
 | 
			
		||||
             {$object['accUser']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <th>申请时间:</th>
 | 
			
		||||
           <td>{$object['createTime']}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr >
 | 
			
		||||
           <th valign='top'>提现备注:<br/>(用户可见)  </th>
 | 
			
		||||
           <td>
 | 
			
		||||
             {$object['cashRemarks']}
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
           <td colspan='2' align='center'>
 | 
			
		||||
           	<button type="button" class="btn" onclick='javascript:history.go(-1)'><i class="fa fa-angle-double-left"></i>返回</button>
 | 
			
		||||
           </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
</form>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										267
									
								
								hyhproject/admin/view/cashdraws/view_report.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,267 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<style type="text/css">
 | 
			
		||||
    @page 
 | 
			
		||||
    {
 | 
			
		||||
        size:  auto;   /* auto is the initial value */
 | 
			
		||||
        margin: 0mm;  /* this affects the margin in the printer settings */
 | 
			
		||||
    }
 | 
			
		||||
    .table_title{        
 | 
			
		||||
        font-size:18px;font-weight: bold;text-align: center;margin:10px;
 | 
			
		||||
    }
 | 
			
		||||
    .right{
 | 
			
		||||
        float: right;
 | 
			
		||||
    }
 | 
			
		||||
    .center{
 | 
			
		||||
        text-align: center;
 | 
			
		||||
    }
 | 
			
		||||
    .layui-form{
 | 
			
		||||
        width:95%;
 | 
			
		||||
        margin:50px auto;
 | 
			
		||||
    }
 | 
			
		||||
    .red{
 | 
			
		||||
        color:red;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
</style>
 | 
			
		||||
{/block}
 | 
			
		||||
 | 
			
		||||
{block name="js"}
 | 
			
		||||
 | 
			
		||||
<script src="__ADMIN__/cashdraws/cashdraws.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="layui-form">
 | 
			
		||||
        <div class="layui-form-item">
 | 
			
		||||
            <div class="layui-input-block" style="float: right;">              
 | 
			
		||||
                <button class="layui-btn layui-btn-warm print">打印</button>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="layui-collapse" lay-filter="test">
 | 
			
		||||
          <div class="layui-colla-item">
 | 
			
		||||
            <h2 class="layui-colla-title">点击查询/充值/扣除操作</h2>      
 | 
			
		||||
            <div class="layui-colla-content">
 | 
			
		||||
                <fieldset class="layui-elem-field">
 | 
			
		||||
                  <legend>查询</legend>
 | 
			
		||||
                  <div class="layui-field-box">
 | 
			
		||||
                     <form  action="" method="get">
 | 
			
		||||
                     <div class="wst-toolbar">
 | 
			
		||||
                        <label class="layui-form-label">查询日期</label>
 | 
			
		||||
                        <input type="text" id="searchDate" name="searchDate" class="layui-input" maxlength="20" value="{$searchDate}" placeholder="查询日期">
 | 
			
		||||
                        <button class="btn btn-primary search" ><i class="fa fa-search"></i>查询</button>  
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                </form>
 | 
			
		||||
                  </div>
 | 
			
		||||
                </fieldset>                
 | 
			
		||||
                <fieldset class="layui-elem-field">
 | 
			
		||||
                  <legend>充值/扣除操作</legend>
 | 
			
		||||
                    <div class="layui-field-box">
 | 
			
		||||
                       <div class="layui-form-item">
 | 
			
		||||
                            <label class="layui-form-label" style="width: auto;">日期选择:</label>
 | 
			
		||||
                            <div class="layui-input-inline">
 | 
			
		||||
                                <input type="text" id="reDate" name="reDate" class="layui-input ipt" maxlength="20" value="{$searchDate}" placeholder="日期">
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="layui-form-item">
 | 
			
		||||
                            <label class="layui-form-label" style="width: auto;">充值/扣除:</label>
 | 
			
		||||
                            <div class="layui-input-block">
 | 
			
		||||
                              <input type="radio" class="ipt" name="reType" value="1" title="充值" checked="">
 | 
			
		||||
                              <input type="radio" class="ipt" name="reType" value="2" title="扣除">
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>                
 | 
			
		||||
                        <div class="layui-form-item">
 | 
			
		||||
                            <label class="layui-form-label" style="width: auto;">变动数额:</label>
 | 
			
		||||
                            <div class="layui-input-inline">                        
 | 
			
		||||
                                <input type="text" id="money" name="money" class="layui-input ipt" maxlength="20" value="" placeholder="请输入变动数额">
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="layui-form-item">
 | 
			
		||||
                            <label class="layui-form-label" style="width: auto;">   验证码:</label>
 | 
			
		||||
                            <div class="layui-input-inline">                        
 | 
			
		||||
                                <input type="text" id="mobileCode" name="mobileCode" class="layui-input" maxlength="20" value="" placeholder="请输入验证码">
 | 
			
		||||
                                
 | 
			
		||||
                            </div>   
 | 
			
		||||
                            <div class="layui-word-aux""><button class="layui-btn layui-btn-normal layui-btn-sm  getCode">获取验证码</button> </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                  
 | 
			
		||||
                        <div class="layui-form-item">
 | 
			
		||||
                            <button class="layui-btn setReport" >确定提交</button> 
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>          
 | 
			
		||||
                </fieldset>  
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
          
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
<!--start--> 
 | 
			
		||||
    <table class="layui-table"> 
 | 
			
		||||
        <tbody> 
 | 
			
		||||
        <tr> 
 | 
			
		||||
            <th  colspan="12"> <p class="table_title">交易明细备查表-{$searchDate}</p></th> 
 | 
			
		||||
        </tr> 
 | 
			
		||||
        <tr> 
 | 
			
		||||
            <th  colspan="12"> <p class="right">单位:元</p></th> 
 | 
			
		||||
        </tr> 
 | 
			
		||||
        <tr> 
 | 
			
		||||
         <td>上日余额¥ {$orders['yesterdayMoney']}</td> 
 | 
			
		||||
         <td>今日余额¥ {$orders['todayMoney']}</td> 
 | 
			
		||||
         <td>今日交易¥{$orders['allPaySum']}</td> 
 | 
			
		||||
         <td>今日代收¥ {$orders['collectionGatheringSum']}</td> 
 | 
			
		||||
         <td>今日代付¥ {$orders['coupousEarningsSum']+$orders['hasVouchersEearningsSum']+$orders['taxFeeSum']+$orders['collectionPaySum']}</td> 
 | 
			
		||||
         <td class="red">今日收益¥ {$orders['coupousEarningsSum']+$orders['hasVouchersEearningsSum']}</td> 
 | 
			
		||||
        </tr> 
 | 
			
		||||
        <tr> 
 | 
			
		||||
         <td colspan="1" >今日明细</td>         
 | 
			
		||||
         <td colspan="1" >代付款</td>
 | 
			
		||||
         <td colspan="3" class="center">公司手续费收益</td> 
 | 
			
		||||
         <td>商品交易</td> 
 | 
			
		||||
        </tr> 
 | 
			
		||||
        <tr> 
 | 
			
		||||
         <td>合计</td> 
 | 
			
		||||
         <td>¥{$orders['taxFeeSum']}</td> 
 | 
			
		||||
         <td>¥{$orders['hasVouchersEearningsSum']}</td> 
 | 
			
		||||
         <td>合计</td> 
 | 
			
		||||
         <td>¥{$orders['coupousEarningsSum']}</td> 
 | 
			
		||||
         <td>¥{$orders['allPaySum']}</td> 
 | 
			
		||||
        </tr> 
 | 
			
		||||
        <tr> 
 | 
			
		||||
         <td>购户ID</td> 
 | 
			
		||||
         <td>今日缴税</td> 
 | 
			
		||||
         <td>已获券收益</td> 
 | 
			
		||||
         <td>商户ID</td> 
 | 
			
		||||
         <td>优惠款收益</td> 
 | 
			
		||||
         <td>销售额</td> 
 | 
			
		||||
        </tr> 
 | 
			
		||||
        {foreach name="orders['list']" item="vo"}
 | 
			
		||||
            <tr> 
 | 
			
		||||
             <td>{$vo['loginName']} </td> 
 | 
			
		||||
             <td>{$vo['taxFee']}</td> 
 | 
			
		||||
             <td>{$vo['hasVouchersEearnings']}</td> 
 | 
			
		||||
             <td>{$vo['shopLoginName']}</td> 
 | 
			
		||||
             <td>{$vo['coupousEarnings']} </td> 
 | 
			
		||||
             <td>{$vo['realTotalMoney']}</td> 
 | 
			
		||||
            </tr>
 | 
			
		||||
        {/foreach}
 | 
			
		||||
       </tbody> 
 | 
			
		||||
    </table>   
 | 
			
		||||
    <table class="layui-table"> 
 | 
			
		||||
        <tbody> 
 | 
			
		||||
            <tr> 
 | 
			
		||||
                <th  colspan="3"> <p class="table_title">交易明细备查表-{$searchDate}</p></th> 
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr> 
 | 
			
		||||
                <th class="red">今日汇总:¥{$orders['collectionGatheringSum']-$orders['collectionPaySum']}</th>
 | 
			
		||||
                <th>代收款</th>
 | 
			
		||||
                <th>代付款</th>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr> 
 | 
			
		||||
                <th>合计</th>
 | 
			
		||||
                <th>¥{$orders['collectionGatheringSum']}</th>
 | 
			
		||||
                <th>¥{$orders['collectionPaySum']}</th>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr> 
 | 
			
		||||
                <th>商户ID</th>
 | 
			
		||||
                <th>优惠款</th>
 | 
			
		||||
                <th>提现金额</th>
 | 
			
		||||
            </tr>
 | 
			
		||||
 | 
			
		||||
            {foreach name="orders['collection']" item="vo"}
 | 
			
		||||
                <tr> 
 | 
			
		||||
                    <td>{$vo['shopLoginName']}</td> 
 | 
			
		||||
                    <td>{$vo['gathering']}</td> 
 | 
			
		||||
                    <td>{$vo['pay']}</td>                  
 | 
			
		||||
                </tr> 
 | 
			
		||||
            {/foreach}
 | 
			
		||||
        </tbody>
 | 
			
		||||
    </table>    
 | 
			
		||||
<!--end--> 
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
 | 
			
		||||
    $(function(){
 | 
			
		||||
        var laydate = layui.laydate;
 | 
			
		||||
        laydate.render({
 | 
			
		||||
            elem: '#searchDate'
 | 
			
		||||
        });
 | 
			
		||||
        laydate.render({
 | 
			
		||||
            elem: '#reDate'
 | 
			
		||||
        });
 | 
			
		||||
        isSend = false;
 | 
			
		||||
        $('body').on('click','.getCode',function(){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
            if(params.money<=0){                
 | 
			
		||||
                WST.msg('请输入变动金额','warn');
 | 
			
		||||
                $('#money').focus();
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            var that = $(this);            
 | 
			
		||||
            if(isSend) return;
 | 
			
		||||
            isSend = true;
 | 
			
		||||
            $('.ipt').removeAttr('disabled');
 | 
			
		||||
            $.post(WST.U('admin/Cashdraws/getMobileCode'), params, function(data) {
 | 
			
		||||
                var json = WST.toAdminJson(data);
 | 
			
		||||
                if(json.status == 1) {
 | 
			
		||||
                    $('.ipt').attr('disabled','disabled');
 | 
			
		||||
                    WST.msg(json.msg, 'success');
 | 
			
		||||
                    time = 120;
 | 
			
		||||
                    that.attr('disabled', 'disabled').html('120秒获取');
 | 
			
		||||
                    $('#mobileCode').focus();
 | 
			
		||||
                    var task = setInterval(function() {
 | 
			
		||||
                        time--;
 | 
			
		||||
                        that.html('' + time + "秒获取");
 | 
			
		||||
                        if(time == 0) {
 | 
			
		||||
                            isSend = false;
 | 
			
		||||
                            clearInterval(task);
 | 
			
		||||
                            that.removeAttr('disabled').html("重新发送");
 | 
			
		||||
                        }
 | 
			
		||||
                    }, 1000);
 | 
			
		||||
                } else {
 | 
			
		||||
                    WST.msg(json.msg, 'warn');
 | 
			
		||||
                    isSend = false;
 | 
			
		||||
                }
 | 
			
		||||
                data = json = null;
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
        //修改凭证
 | 
			
		||||
        $('body').on('click','.setReport',function(){
 | 
			
		||||
           var params = {};
 | 
			
		||||
           params.mobileCode = $('#mobileCode').val();
 | 
			
		||||
           if(params.mobileCode.length<4){            
 | 
			
		||||
                WST.msg('请输入验证码','warn');
 | 
			
		||||
                return;
 | 
			
		||||
           }
 | 
			
		||||
           var that = $(this);
 | 
			
		||||
           that.attr('disabled','disabled');  
 | 
			
		||||
           $.post(WST.U('admin/Cashdraws/setReport'), params, function(data) {
 | 
			
		||||
                var json = WST.toAdminJson(data);
 | 
			
		||||
                if(json.status == 1) {
 | 
			
		||||
                    WST.msg(json.msg, 'success');     
 | 
			
		||||
                    $('.ipt').removeAttr('disabled');
 | 
			
		||||
                } else {
 | 
			
		||||
                    WST.msg(json.msg, 'warn');
 | 
			
		||||
                }
 | 
			
		||||
                that.removeAttr('disabled');
 | 
			
		||||
                data = json = null;
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
        //打印
 | 
			
		||||
        $('body').on('click','.print',function(){
 | 
			
		||||
            bdhtml = window.document.body.innerHTML;
 | 
			
		||||
            sprnstr = "<!--start-->";
 | 
			
		||||
            eprnstr = "<!--end-->";
 | 
			
		||||
            prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
 | 
			
		||||
            prnhtml = prnhtml.substring(0,prnhtml.indexOf(eprnstr));
 | 
			
		||||
            window.document.body.innerHTML = prnhtml;
 | 
			
		||||
            window.print();
 | 
			
		||||
            location.reload();
 | 
			
		||||
        });
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										81
									
								
								hyhproject/admin/view/chargeitems/chargeitems.js
									
									
									
									
									
										Executable 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});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										46
									
								
								hyhproject/admin/view/chargeitems/edit.html
									
									
									
									
									
										Executable 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}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										23
									
								
								hyhproject/admin/view/chargeitems/list.html
									
									
									
									
									
										Executable 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}
 | 
			
		||||
							
								
								
									
										333
									
								
								hyhproject/admin/view/css/common.css
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,333 @@
 | 
			
		||||
/***验证框架样式***/
 | 
			
		||||
.msg-wrap,.n-icon,.n-inline-block,.n-msg,.nice-validator [contenteditable],.nice-validator input,.nice-validator select,.nice-validator textarea{display:inline-block}
 | 
			
		||||
.nice-validator .msg-container .msg-box{display:block}
 | 
			
		||||
.nice-validator .msg-container .msg-wrap{position:static}
 | 
			
		||||
.msg-box{position:relative}
 | 
			
		||||
.msg-wrap{position:relative;white-space:nowrap;line-height:16px;font-size:12px}
 | 
			
		||||
.msg-wrap,.n-icon,.n-msg{vertical-align:top}
 | 
			
		||||
.msg-box .msg-wrap .n-error,.msg-box .msg-wrap .n-ok,.msg-box .msg-wrap .n-tip{display:block;background:0 0;box-shadow:none;padding:3px 2px}
 | 
			
		||||
.n-arrow{position:absolute;overflow:hidden}
 | 
			
		||||
.n-arrow b,.n-arrow i{position:absolute;left:0;top:0;border:0;margin:0;padding:0;overflow:hidden;font-weight:400;font-style:normal;font-size:12px;font-family:serif;line-height:14px}
 | 
			
		||||
.n-arrow i{text-shadow:none}
 | 
			
		||||
.n-icon{width:16px;height:16px;overflow:hidden;background-repeat:no-repeat}
 | 
			
		||||
.n-msg{display:inline-block;margin-left:1px}
 | 
			
		||||
.n-error{color:#c33}
 | 
			
		||||
.n-ok{color:#390}
 | 
			
		||||
.n-loading,.n-tip .n-msg{color:grey}
 | 
			
		||||
.n-error .n-icon{background-position:0 0}
 | 
			
		||||
.n-ok .n-icon{background-position:-16px 0}
 | 
			
		||||
.n-tip .n-icon{background-position:-32px 0}
 | 
			
		||||
.n-loading .n-icon{background:url(../images/loading.gif) 0 center no-repeat!important}
 | 
			
		||||
.n-bottom,.n-left,.n-right,.n-top{display:inline-block;line-height:0;vertical-align:top;outline:0}
 | 
			
		||||
.n-bottom .n-arrow,.n-top .n-arrow{height:6px;width:12px;left:8px}
 | 
			
		||||
.n-left .n-arrow,.n-right .n-arrow{width:6px;height:12px;top:6px}
 | 
			
		||||
.n-top{vertical-align:top}
 | 
			
		||||
.n-top .msg-wrap{margin-bottom:6px}
 | 
			
		||||
.n-top .n-arrow{bottom:-6px}
 | 
			
		||||
.n-top .n-arrow b{top:-6px}
 | 
			
		||||
.n-top .n-arrow i{top:-7px}
 | 
			
		||||
.n-bottom{vertical-align:bottom}
 | 
			
		||||
.n-bottom .msg-wrap{margin-top:6px}
 | 
			
		||||
.n-bottom .n-arrow{top:-6px}
 | 
			
		||||
.n-bottom .n-arrow b{top:-1px}
 | 
			
		||||
.n-bottom .n-arrow i{top:0}
 | 
			
		||||
.n-left .msg-wrap{right:100%;margin-right:6px}
 | 
			
		||||
.n-left .n-arrow{right:-6px}
 | 
			
		||||
.n-left .n-arrow b{left:-6px}
 | 
			
		||||
.n-left .n-arrow i{left:-7px}
 | 
			
		||||
.n-right .msg-wrap{margin-left:6px}
 | 
			
		||||
.n-right .n-arrow{left:-6px}
 | 
			
		||||
.n-right .n-arrow b{left:1px}
 | 
			
		||||
.n-right .n-arrow i{left:2px}
 | 
			
		||||
.n-default .n-left,.n-default .n-right{margin-top:5px}
 | 
			
		||||
.n-default .n-top .msg-wrap{bottom:100%}
 | 
			
		||||
.n-default .n-bottom .msg-wrap{top:100%}
 | 
			
		||||
.n-default .msg-wrap{position:absolute;z-index:1}
 | 
			
		||||
.n-default .msg-wrap .n-icon{background-image:url(../images/validator_default.png)}
 | 
			
		||||
.n-default .n-tip .n-icon{display:none}
 | 
			
		||||
.n-simple .msg-wrap{position:absolute;z-index:1}
 | 
			
		||||
.n-simple .msg-wrap .n-icon{background-image:url(../images/validator_simple.png)}
 | 
			
		||||
.n-simple .n-top .msg-wrap{bottom:100%}
 | 
			
		||||
.n-simple .n-bottom .msg-wrap{top:100%}
 | 
			
		||||
.n-simple .n-left,.n-simple .n-right{margin-top:5px}
 | 
			
		||||
.n-simple .n-bottom .msg-wrap{margin-top:3px}
 | 
			
		||||
.n-simple .n-tip .n-icon{display:none}
 | 
			
		||||
.n-yellow .msg-wrap{position:absolute;z-index:1;padding:4px 6px;font-size:12px;border:1px solid transparent;background-color:#fffcef;border-color:#ffbb76;color:#db7c22;box-shadow:0 1px 3px #ccc;border-radius:2px}
 | 
			
		||||
.n-yellow .msg-wrap .n-arrow b{color:#ffbb76;text-shadow:0 0 2px #ccc}
 | 
			
		||||
.n-yellow .msg-wrap .n-arrow i{color:#fffcef}
 | 
			
		||||
.n-yellow .msg-wrap .n-icon{background-image:url(../images/validator_simple.png)}
 | 
			
		||||
.n-yellow .n-top .msg-wrap{bottom:100%}
 | 
			
		||||
.n-yellow .n-bottom .msg-wrap{top:100%}
 | 
			
		||||
.n-yellow .n-loading,.n-yellow .n-ok,.n-yellow .n-tip{background-color:#f8fdff;border-color:#ddd;color:#333;box-shadow:0 1px 3px #ccc}
 | 
			
		||||
.n-yellow .n-loading .n-arrow b,.n-yellow .n-ok .n-arrow b,.n-yellow .n-tip .n-arrow b{color:#ddd;text-shadow:0 0 2px #ccc}
 | 
			
		||||
.n-yellow .n-loading .n-arrow i,.n-yellow .n-ok .n-arrow i,.n-yellow .n-tip .n-arrow i{color:#f8fdff}
 | 
			
		||||
/***系统风格样式***/
 | 
			
		||||
body{background:#ffffff;font-size: 12px;overflow-x:hidden;overflow-y:auto;}
 | 
			
		||||
.j-layout{margin:5px;}
 | 
			
		||||
.j-layout .j-layout-left{border:1px solid #ccc;float:left;}
 | 
			
		||||
.j-layout .j-layout-center{border:1px solid #ccc;float:left;margin-left:5px;}
 | 
			
		||||
.j-layout .j-layout-panel{border-bottom:1px solid #ccc;height:30px;width:100%;line-height:30px;padding-left:5px;}
 | 
			
		||||
.wst-panel{border:1px solid #666;float:left;}
 | 
			
		||||
.wst-panel .panel-header{border-bottom:1px solid #666;height:30px;background:#ffffff;}
 | 
			
		||||
.wst-toolbar{border-bottom: 0px;line-height: 30px;padding:5px;}
 | 
			
		||||
.f-right{float:right;}
 | 
			
		||||
.f-left{float:left;}
 | 
			
		||||
.f-clear{clear:both}
 | 
			
		||||
.wst-form{width:100%;margin-bottom:20px}
 | 
			
		||||
.wst-form input.cfg,.wst-form input.textarea{width:340px}
 | 
			
		||||
.wst-form th{text-align:right;font-weight:normal}
 | 
			
		||||
.wst-form td{padding:2px 5px;}
 | 
			
		||||
.wst-box-top{margin-top:5px}label{margin-right:10px}
 | 
			
		||||
.webuploader-pick{background:#428bca;height:24px;border-radius:3px;line-height:24px;overflow:hidden}
 | 
			
		||||
.webuploader-container{height:24px;overflow:hidden;width:300px}
 | 
			
		||||
#j-loader{cursor: progress; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%; background: #fff; z-index: 10000; overflow: hidden;}
 | 
			
		||||
#j-loader img{position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto;}
 | 
			
		||||
td.wst-bottombar{text-align:left;padding-left:155px;padding-top:10px;}
 | 
			
		||||
.btn-fixtop{margin-top:3px;}
 | 
			
		||||
.btn-mright{margin-right:10px;}
 | 
			
		||||
.wst-footer{padding-bottom:20px;text-align:center}
 | 
			
		||||
.line-break{word-break:break-all;word-wrap:break-word;}
 | 
			
		||||
.wst-green{color:#5FB878;}
 | 
			
		||||
.wst-wiki{background: #F5F5F5;color:#777;height:20px;padding:5px 8px;border:1px solid;border-color:#DCDCDC #DCDCDC #B3B3B3 #DCDCDC;border-radius:3px;}
 | 
			
		||||
/***订单**/
 | 
			
		||||
.order-box{margin-bottom:5px;border-bottom:1px solid #ddd}
 | 
			
		||||
.order-box .box-head{font-weight:bold;height:30px;line-height:30px}
 | 
			
		||||
.order-box .delivery-box{height:100px;border-bottom:1px solid #ddd}
 | 
			
		||||
.order-box th{font-weight:normal}
 | 
			
		||||
.order-box .goods-head{border-top:2px solid #fc7a64;background:#f3f3f3;display:block;height:25px;line-height:25px;margin:0 0 10px;padding:5px 0}
 | 
			
		||||
.order-box .goods-head .goods{float:left;width:650px;padding-left:15px}
 | 
			
		||||
.order-box .goods-head .price{float:left;width:100px}
 | 
			
		||||
.order-box .goods-head .num{float:left;width:100px}
 | 
			
		||||
.order-box .goods-head .t-price{float:left;width:105px}
 | 
			
		||||
.order-box .shop{padding-left:15px;height:25px;line-height:25px;border-bottom:2px solid #fdd8d2;color:#e55356;font-weight:bold;font-size:15px}
 | 
			
		||||
.order-box .item{padding-top:5px;padding-bottom:5px;border:1px solid #eee}
 | 
			
		||||
.order-box .item .goods{float:left;width:650px;padding-left:15px}
 | 
			
		||||
.order-box .item .goods .img{float:left;width:80px;height:80px}
 | 
			
		||||
.order-box .item .goods .name{float:left;width:390px;height:80px;margin-left:5px}
 | 
			
		||||
.order-box .item .goods .spec{float:left;width:165px;margin-left:5px}
 | 
			
		||||
.order-box .item .price{float:left;width:100px}
 | 
			
		||||
.order-box .item .num{float:left;width:100px}
 | 
			
		||||
.order-box .item .t-price{float:left;width:100px}
 | 
			
		||||
.order-box .goods-footer{padding-right:10px;margin-bottom:10px}
 | 
			
		||||
.order-box .line{border-top:1px solid #ddd}
 | 
			
		||||
.order-box .goods-summary{margin-top:10px}
 | 
			
		||||
.order-box .summary{height:30px;line-height:30px}
 | 
			
		||||
.order-box .orderScore{margin-right:5px}
 | 
			
		||||
.order-box .log td{height:25px;line-height:25px;padding-left:15px}
 | 
			
		||||
.order-box .log-box{height:132px}
 | 
			
		||||
.order-box .log-box .icon{float:left;width:60px;height:60px}
 | 
			
		||||
.order-box .log-box .icons{float:left;width:60px;height:60px}
 | 
			
		||||
.order-box .log-box .icon11{background:url(../img/user_icon_rzxx.png) -15px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon21{background:url(../img/user_icon_rzxx.png) -105px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon31{background:url(../img/user_icon_rzxx.png) -194px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon41{background:url(../img/user_icon_rzxx.png) -282px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon51{background:url(../img/user_icon_rzxx.png) -373px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon12{background:url(../img/user_icon_rzxx.png) -15px -62px no-repeat}
 | 
			
		||||
.order-box .log-box .icon22{background:url(../img/user_icon_rzxx.png) -105px -62px no-repeat}
 | 
			
		||||
.order-box .log-box .icon32{background:url(../img/user_icon_rzxx.png) -194px -61px no-repeat}
 | 
			
		||||
.order-box .log-box .icon42{background:url(../img/user_icon_rzxx.png) -282px -63px no-repeat}
 | 
			
		||||
.order-box .log-box .icon52{background:url(../img/user_icon_rzxx.png) -373px -62px no-repeat}
 | 
			
		||||
.order-box .log-box .icon13{background:url(../img/user_icon_rzxx.png) -19px -123px no-repeat}
 | 
			
		||||
.order-box .log-box .icon23{background:url(../img/user_icon_rzxx.png) -105px -122px no-repeat}
 | 
			
		||||
.order-box .log-box .icon33{background:url(../img/user_icon_rzxx.png) -194px -121px no-repeat}
 | 
			
		||||
.order-box .log-box .icon43{background:url(../img/user_icon_rzxx.png) -282px -122px no-repeat}
 | 
			
		||||
.order-box .log-box .icon53{background:url(../img/user_icon_rzxx.png) -373px -121px no-repeat}
 | 
			
		||||
.order-box .log-box .arrow{float:left;color:#979797;font-size:15px;font-weight:bold;margin-top:18px}
 | 
			
		||||
.order-box .log-box .arrow2{color:#7ebb53}
 | 
			
		||||
.order-box .log-box .state{float:left;width:100%;margin-left:18px}
 | 
			
		||||
.order-box .log-box .state2{float:left;width:100%;position:relative}
 | 
			
		||||
.order-box .log-box .state2 p{float:left;width:178px;height:50px;text-align:left;margin-left:15px;color:#f05858;font-size:15px}
 | 
			
		||||
.order-box .log-box .state2 .path{position:absolute;z-index:10}
 | 
			
		||||
.order-box .log-box .state2 .path span{float:left;width:178px;height:50px;text-align:left;margin-left:15px;background:#fff}
 | 
			
		||||
.order-source{margin:0 5px 0 0;width:18px;height:18px;position:relative;}
 | 
			
		||||
.order-source2{margin:0 5px 0 0;width:16px;height:16px;position:relative;}
 | 
			
		||||
 | 
			
		||||
/***风格管理模块**/
 | 
			
		||||
.style-box{width:215px;height:315px;border:1px solid #ddd;padding:5px;margin:5px;float:left}
 | 
			
		||||
.style-box .style-img{width:200px;height:200px;text-align:center;vertical-align:middle;display:block;position:relative}
 | 
			
		||||
.style-box .style-img a{display:table-cell;vertical-align:middle;width:200px;height:200px;border:1px solid #ddd}
 | 
			
		||||
.style-box .style-img a img{max-width:200px;max-height:200px}
 | 
			
		||||
.style-box .style-txt,.style-box .style-author,.style-box .style-web{width:200px;height:25px;overflow:hidden;text-align:left;line-height:25px}
 | 
			
		||||
.style-box .style-op{height:30px;text-align:center;overflow:hidden}
 | 
			
		||||
/***推荐管理模块***/
 | 
			
		||||
.recom-lbox{width:350px;height:350px;border:1px solid #ddd;padding:5px;text-align:left;overflow-x:hidden;overflow-y:auto}
 | 
			
		||||
.recom-lbox .head,.recom-rbox .head{border-bottom:1px solid #eee}
 | 
			
		||||
.recom-lbox .tck,.recom-rbox .tck{float:left;height:30px;overflow:hidden;width:25px}
 | 
			
		||||
.recom-lbox .ttxt{float:left;height:30px;overflow:hidden;width:290px}
 | 
			
		||||
.recom-lbox .trow{height:30px;overflow:hidden;line-height:30px}
 | 
			
		||||
.recom-rbox{width:420px;height:350px;border:1px solid #ddd;padding:5px;text-align:left;overflow-x:hidden;overflow-y:auto}
 | 
			
		||||
.recom-rbox .tck{float:left;height:30px;overflow:hidden;width:25px}
 | 
			
		||||
.recom-rbox .ttxt{float:left;height:30px;overflow:hidden;width:325px}
 | 
			
		||||
.recom-rbox .top{float:left;width:70px}
 | 
			
		||||
.recom-rbox .trow{height:30px;overflow:hidden;width:420px;line-height:30px}
 | 
			
		||||
.recom-rbox .s-sort{width:30px;height: 26px;}
 | 
			
		||||
/**微信菜单**/
 | 
			
		||||
.wst-views{float:left;width:335px;padding-bottom: 10px;}
 | 
			
		||||
.wst-views .reveal{margin:0px 5px 0px;width:325px;height:100%;border:1px solid #e7e7eb;position:relative;}
 | 
			
		||||
.wst-views .revealt{position:absolute;left:0;top:0;width:100%;height:65px;background:url(../img/img_topinfo.png) 0 0 no-repeat;background-size:100%}
 | 
			
		||||
.wst-views .revealb{position:absolute;left:0;bottom:0;width:100%;height:46px;border-top:1px solid #e7e7eb}
 | 
			
		||||
.wst-views .revealb i{float:left;width:15%;height:45px;background:url(../img/img_dibu.png) -5px -10px no-repeat}
 | 
			
		||||
.wst-views .ui{float:right;width:85%;height:45px;display:-webkit-box}
 | 
			
		||||
.wst-views .li{-webkit-box-flex:1;display:block;line-height:45px;text-align:center;border-left:1px solid #e7e7eb;cursor:pointer;position:relative}
 | 
			
		||||
.wst-views .li:hover,.wst-views .li .list:hover{background:#eee}
 | 
			
		||||
.wst-views .selected{background:#eee}
 | 
			
		||||
.wst-views .li .lis{position:absolute;left:0;bottom:45px;width:100%;border:1px solid #e7e7eb}
 | 
			
		||||
.wst-views .li .list{float:left;width:100%;border-bottom:1px solid #e7e7eb}
 | 
			
		||||
.wst-maingr{float:right;width:72%;}
 | 
			
		||||
.wst-view{float:left;width:200px;height:200px;background:#eee}
 | 
			
		||||
.wst-view a{display:block;height:200px;line-height:200px;text-decoration:none;text-align:center;color:#3295d3}
 | 
			
		||||
.wst-view a:hover{color:#56b7f5}
 | 
			
		||||
 | 
			
		||||
/***树形菜单**/
 | 
			
		||||
.wst-grid{margin-left:5px;margin-right:5px;}
 | 
			
		||||
.wst-grid-tree-hd-cell{height:2em;padding:7px 5px;font-weight:bold;line-height:2;}
 | 
			
		||||
.wst-grid-tree-hd .first{width:26px;text-align: center;}
 | 
			
		||||
.wst-grid-tree-row .first{width:26px;text-align: center;}
 | 
			
		||||
.wst-grid-tree-row-cell{height:2em;border-bottom: 1px solid #f5f5f5;padding:5px 5px;}
 | 
			
		||||
.wst-grid-tree-space{margin-left:15px;display: inline-block;}
 | 
			
		||||
.wst-tree-img{font-size: 18px;margin-right: 5px;cursor: pointer;}
 | 
			
		||||
/**ztree右键菜单**/
 | 
			
		||||
div#rMenu {background:#fff;position:absolute; visibility:hidden; top:0; text-align: left;padding: 2px;border:1px solid #eeeeee;}
 | 
			
		||||
div#rMenu ul li{margin: 0px;padding: 5px 10px;cursor: pointer;list-style: none outside none;border-bottom: 1px solid #eeeeee;font-size: 12px;}
 | 
			
		||||
.ztree li a.curSelectedNode{height:20px;}
 | 
			
		||||
.ztreeMenuContent{border:1px solid #eee;z-index:1000;background:#ffffff;overflow:auto;display:none; position: absolute;}
 | 
			
		||||
 | 
			
		||||
/**修复layui**/
 | 
			
		||||
.layui-form-switch{width:60px;}
 | 
			
		||||
.layui-tab {margin: 0px 0px;}
 | 
			
		||||
.layui-tab-title{height:35px;}
 | 
			
		||||
.layui-tab-title li{font-size:12px;line-height: 35px;}
 | 
			
		||||
.layui-tab-title .layui-this:after{height:36px;}
 | 
			
		||||
.layui-field-title{margin-top:0px;}
 | 
			
		||||
.layui-input:focus,.layui-textarea:focus{border-color: #66afe9;outline: 0;-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);}
 | 
			
		||||
.layui-form-switch{margin-top:0px;height:26px;line-height:26px;}
 | 
			
		||||
.layui-form-switch i{height:18px;width:18px;}
 | 
			
		||||
.layui-form-checkbox{height:20px;line-height:18px;width:20px;padding-right:20px;}
 | 
			
		||||
.layui-form-checkbox i{width:20px;left:-5px;top:1px;}
 | 
			
		||||
.layui-form-radio i{font-size:17px;}
 | 
			
		||||
.layui-form-radio{line-height:21px;font-weight:normal;}
 | 
			
		||||
.layui-form-select dl{top:27px;}
 | 
			
		||||
.layui-tab-content{padding:0px;}
 | 
			
		||||
 | 
			
		||||
/**覆盖bootstrap样式**/
 | 
			
		||||
.form-control{width:200px;display:inline-block;}
 | 
			
		||||
textarea{width:70%;height:120px;background-color:#fff;background-image:none;border:1px solid #ccc;color:#222;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset;display:inline-block;font-size:14px;padding:2px 5px;position:relative;transition:border-color .15s ease-in-out 0s,box-shadow .15s ease-in-out 0s;vertical-align:middle;}
 | 
			
		||||
input[type=text],input[type=password]{display:inline-block;width:auto;height:30px;padding:6px 12px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}
 | 
			
		||||
input[type=text]:focus,input[type=password]:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}
 | 
			
		||||
input[type=text]::-moz-placeholder,input[type=password]::-moz-placeholder{color:#999;opacity:1}
 | 
			
		||||
input[type=text]:-ms-input-placeholder,input[type=password]:-ms-input-placeholder{color:#999}
 | 
			
		||||
input[type=text]::-webkit-input-placeholder,input[type=password]::-webkit-input-placeholder{color:#999}
 | 
			
		||||
input[type=text][disabled],input[type=text][readonly]{background-color:#eee;opacity:1}
 | 
			
		||||
input[type=text][disabled]{cursor:not-allowed}
 | 
			
		||||
 | 
			
		||||
.btn{padding:3px 12px;}
 | 
			
		||||
.btn-green,.btn-blue,.btn-red{padding:5px 8px;font-size:12px;background:#ffffff;color:#777;border:1px solid #eee;}
 | 
			
		||||
.btn-blue:hover{color:#fff;background-color: #3598DC; border-color: #2A80B9;box-shadow: 2px 2px #ccc;}
 | 
			
		||||
.btn-red:hover{color:#fff;background-color: #c9302c;border-color: #ac2925;box-shadow: 2px 2px #ccc;}
 | 
			
		||||
.btn-green:hover{color:#fff;background-color: #5CB85C;border-color: #4E9D4E;box-shadow: 2px 2px #ccc;}
 | 
			
		||||
.statu-yes{color: #1BBC9D;}
 | 
			
		||||
.statu-no{color: #c9302c;}
 | 
			
		||||
.statu-wait{color: #BEC3C7;}
 | 
			
		||||
legend {display: inline-block;margin-bottom: 10px;width:auto;border-bottom: 0px;}
 | 
			
		||||
.alert{padding:8px;}
 | 
			
		||||
.alert-tips{margin:6px;overflow: hidden;}
 | 
			
		||||
.alert .head{font-size:14px;font-weight: bold;cursor: pointer;}
 | 
			
		||||
.alert .head .fa{margin-right: 2px;}
 | 
			
		||||
.alert .body{padding-left:15px;margin-top:10px;}
 | 
			
		||||
.alert .body li{list-style:disc;}
 | 
			
		||||
select{border-radius:4px;border-color:#ccc;height:30px;margin-right:5px;}
 | 
			
		||||
.navbar-nav .fa{margin-right: 2px;}
 | 
			
		||||
.btn .fa{margin-right: 2px;}
 | 
			
		||||
/**覆盖mmgrid**/
 | 
			
		||||
.mmGrid .mmg-headWrapper{border-top:none;background: #f9f9f9}
 | 
			
		||||
.mmGrid .mmg-bodyWrapper .mmg-body td{color:#777;padding:4px 5px;border-left:0px;border-right:0px;border-bottom:1px solid #f5f5f5;word-wrap: break-word;word-break:break-all;}
 | 
			
		||||
.mmGrid .mmg-bodyWrapper .mmg-body td .mmg-index{color:#777;}
 | 
			
		||||
.mmGrid .mmg-headWrapper .mmg-head th {padding:6px 5px;border:0px;}
 | 
			
		||||
.mmPaginator .totalCountLabel{padding: 5px 0 0 0;}
 | 
			
		||||
.mmPaginator .pageList li{margin: 0;padding: 4px 12px;background-color: #ffffff;border: 1px solid #dddddd;border-left-width: 0;}
 | 
			
		||||
.mmPaginator .pageList li.active{padding: 4px 12px;border: 1px solid #dddddd;border-left-width: 0;background-color: #f5f5f5;}
 | 
			
		||||
.mmPaginator .pageList li.active a{color: #999999;cursor: default;}
 | 
			
		||||
.mmPaginator .pageList li.disable a{color: #999999;}
 | 
			
		||||
.mmPaginator .pageList li.disable{background: #f5f5f5;}
 | 
			
		||||
.mmPaginator .pageList li.disable a{color: #999999;}
 | 
			
		||||
.mmPaginator .pageList li a{color: #005580;text-decoration: none;}
 | 
			
		||||
.mmPaginator .pageList li.prev{border-left-width: 1px;-webkit-border-bottom-left-radius: 4px;border-bottom-left-radius: 4px;-webkit-border-top-left-radius: 4px;border-top-left-radius: 4px;-moz-border-radius-bottomleft: 4px;-moz-border-radius-topleft: 4px;}
 | 
			
		||||
.mmPaginator .limit select{height:28px;line-height:28px;margin-right:20px;}
 | 
			
		||||
.mmGrid .mmg-bodyWrapper .mmg-body td.colSelectedEven,.mmGrid .mmg-bodyWrapper .mmg-body td.colSelected{background:none;}
 | 
			
		||||
/*新增*/
 | 
			
		||||
.img-remind{width: 25px;height: 25px;margin-right: 10px;margin-bottom: 5px;}
 | 
			
		||||
.remind-angle-left{width: 25px;height: 25px;position: absolute;bottom: -0px;left: -0px;}
 | 
			
		||||
.remind-angle-right{width: 25px;height: 25px;position: absolute;top: 0px;right: 0px;}
 | 
			
		||||
.wst-tb-bor{margin:0px;}
 | 
			
		||||
.wst-repair{padding:2px;padding-left:20px;border: 0px solid transparent;}
 | 
			
		||||
.wst-total{margin:10px 10px 20px;height:auto;overflow:hidden;border: 1px solid #eee;}
 | 
			
		||||
.wst-num{font-size: 15px;line-height: ;}
 | 
			
		||||
.wst-tb-bor{width: 60%;height: auto;overflow:hidden;float: left;}
 | 
			
		||||
.wst-box-top{margin-top:5px}
 | 
			
		||||
.wst-bor-left{margin-left:30px}
 | 
			
		||||
.wst-bor-right{margin-right:20px}
 | 
			
		||||
.wst-bor-top{margin-top: 20px;}
 | 
			
		||||
.wst-line-top{margin-top: 5px;}
 | 
			
		||||
.wst-cont-total{ width:98%;height: auto;float: right;border: 1px solid #f5f5f5;border-top: 5px solid #1d2225;border-top-left-radius:5px;border-top-right-radius:5px;box-shadow: 5px 5px 6px 3px #f5f5f5;}
 | 
			
		||||
.wst-summary{padding: 10px;box-shadow: 5px 5px 6px 3px #f5f5f5;}
 | 
			
		||||
.wst-summary .wst-summary-head{padding: 10px 10px 10px 30px; height: 40px;width: 100%;background:url('../img/title_head.png') bottom left no-repeat;}
 | 
			
		||||
.wst-summary .wst-summary-content{ height: 90px;overflow: hidden;}
 | 
			
		||||
.wst-summary .img img{ height: 4.5rem;width: 4.5rem;float: left;margin:20px 0px 20px 20px;}
 | 
			
		||||
.wst-summary .data{ height: 60%;width: auto;overflow:hidden;float:left;margin:10px 0px 0px 10px;}
 | 
			
		||||
.wst-summary .data-top{text-align:center;padding-top: 5%; width: 100%;height: 60%;font-size: 30px;font-weight: bold;}
 | 
			
		||||
.wst-summary .data-bottom{text-align:center; width: 100%;padding-top: 2%;height: 25%;}
 | 
			
		||||
.wst-summary-head  .content{color: #333333;}
 | 
			
		||||
.wst-summary .wst-summary-content2{ height: 240px;margin-top: 5px;}
 | 
			
		||||
.wst-summary .wst-strip{width: 100%;height: 30%;overflow: hidden;}
 | 
			
		||||
.wst-summary .wst-title{width: auto;overflow:hidden;height: 22px;margin: 10px;padding-top: 1%;}
 | 
			
		||||
.wst-summary img{width: 65%;height: 15px;margin: 0px 5px 10px 20px;}
 | 
			
		||||
.wst-summary .wst-system-chunk{height: auto;overflow: hidden;border-right: 1px dotted #CCCCCC;}
 | 
			
		||||
.wst-summary .wst-system-strip{height: 30px;width: 100%;}
 | 
			
		||||
.wst-summary .wst-system-strip .title{width: 35%;text-align: right;float: left;height: 100%;padding-top: 1.5%;}
 | 
			
		||||
.wst-summary .wst-system-strip .text{width: 65%;text-align: left;float: left;height: 100%;padding-top: 1.5%;}
 | 
			
		||||
.wst-cont-total .wst-cont-bor{width: 90%;height: auto; margin: 20px;}
 | 
			
		||||
.wst-cont-total .wst-cont-head{width: 100%;height: 30px;line-height: 30px;font-size: 15px;}
 | 
			
		||||
.wst-cont-total .wst-cont-body{width: 100%;height: auto;padding: 10px;border-bottom: 1px solid #CCCCCC;}
 | 
			
		||||
.wst-nowrap{width: 150px;white-space:nowrap;overflow: hidden;text-overflow:ellipsis;}
 | 
			
		||||
.weixin{ display:block;position: relative;}
 | 
			
		||||
.weixin .imged{ display:none;}
 | 
			
		||||
.weixin:hover .imged{ position:absolute; left:60px; margin-top: -40px;  display:block;border: 5px solid #bfbfbf;border-radius: 6px;}
 | 
			
		||||
.style-main{padding:10px}
 | 
			
		||||
.style-box{width:203px;height:307px;border:1px solid #ddd;padding:5px;margin:5px;float:left;box-sizing: content-box;}
 | 
			
		||||
.style-box .style-img{width:200px;height:200px;text-align:center;vertical-align:middle;display:block;position:relative}
 | 
			
		||||
.style-box .style-img a{display:table-cell;vertical-align:middle;width:200px;height:200px;border:1px solid #ddd}
 | 
			
		||||
.style-box .style-img a img{max-width:200px;max-height:200px}
 | 
			
		||||
.style-box .style-txt,.style-box .style-author,.style-box .style-web{width:200px;height:25px;overflow:hidden;text-align:left;line-height:25px}
 | 
			
		||||
.style-box .style-op{height:30px;text-align:center;overflow:hidden}
 | 
			
		||||
.nav li a,.nav li a:hover,.nav-list li a,.nav-list li a:hover{display:block;text-decoration:none;outline:0;border-bottom:0 none}
 | 
			
		||||
.nav li{float:left}
 | 
			
		||||
.tab-wrap{margin-top:10px}
 | 
			
		||||
.tab-nav{margin-bottom:15px;padding-left:1px;border-bottom:1px solid #e0e0e0}
 | 
			
		||||
.tab-nav li{margin-bottom:-1px;margin-left:-1px}
 | 
			
		||||
.tab-nav li a,.tab-nav li a:hover{padding:0 20px;height:35px;line-height:35px;font-weight:bold;font-size:16px;border:1px solid transparent;border-top-width:2px}
 | 
			
		||||
.tab-nav .current a,.tab-nav .current a:hover{border-color:#34b4e0 #e0e0e0 #f6f6f6}
 | 
			
		||||
.tab-content .tab-pane{display:none}
 | 
			
		||||
.tab-content .in{display:block}
 | 
			
		||||
.label{border-radius:.25em;color:#fff;display:inline;font-weight:700;line-height:1;padding:.2em .6em .3em;text-align:center;vertical-align:baseline;white-space:nowrap}
 | 
			
		||||
a.label:hover,a.label:focus{color:#fff;cursor:pointer;text-decoration:none}a{text-decoration:none}
 | 
			
		||||
.form-item input[type=checkbox] {margin-left:0;position: relative;}
 | 
			
		||||
.form-item label {display: inline-block;}
 | 
			
		||||
.addoncfg-title{font-size:18px;font-weight:bold;}
 | 
			
		||||
.weixin:hover .imged{ position:absolute; left:60px; margin-top: -40px;  display:block;border: 5px solid #bfbfbf;border-radius: 6px;}
 | 
			
		||||
 | 
			
		||||
/**tip提示***/
 | 
			
		||||
.tip-yellow{z-index:10000;text-align:left;border:1px solid #000;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;padding:6px 8px;min-width:50px;max-width:300px;color:#fff;background-color:#000}
 | 
			
		||||
.tip-yellow .tip-inner{font:12px/16px arial,helvetica,sans-serif}
 | 
			
		||||
.tip-yellow .tip-arrow-top{margin-top:-6px;margin-left:-5px;top:0;left:50%;width:9px;height:6px;}
 | 
			
		||||
.tip-yellow .tip-arrow-right{margin-top:-4px;margin-left:0;top:50%;left:100%;width:6px;height:9px;}
 | 
			
		||||
.tip-yellow .tip-arrow-bottom{margin-top:0;margin-left:-5px;top:100%;left:50%;width:9px;height:6px;}
 | 
			
		||||
.tip-yellow .tip-arrow-left{margin-top:-4px;margin-left:-6px;top:50%;left:0;width:6px;height:9px;}
 | 
			
		||||
 | 
			
		||||
/* 图标替换 */
 | 
			
		||||
.layui-layer-icowst1,.layui-layer-icowst2,.layui-layer-icowst3{background-image:url(../../../../static/images/wst_icon.png)!important;background-repeat:no-repeat!important;background-size:cover!important}
 | 
			
		||||
.layui-layer-icowst2{background-position:-40px 0!important}
 | 
			
		||||
.layui-layer-icowst3{background-position:-80px -1px!important}
 | 
			
		||||
.layui-layer-icowstloading{background-image:url(../../../../static/images/loading.gif)!important;background-repeat:no-repeat!important;background-size:206% auto!important;background-position:-16px -16px!important}
 | 
			
		||||
.wst-table-1 th{width: 150px;text-align: right;}
 | 
			
		||||
 | 
			
		||||
.typeState li{display: inline-block;}
 | 
			
		||||
							
								
								
									
										176
									
								
								hyhproject/admin/view/css/index.css
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,176 @@
 | 
			
		||||
body,html{height:100%;overflow:hidden;}
 | 
			
		||||
.layout-boxed body,.layout-boxed html{height:100%}
 | 
			
		||||
body{font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-size:12px;}
 | 
			
		||||
.wrapper{height:100%;position:relative;overflow-x:hidden;overflow-y:auto}
 | 
			
		||||
.wrapper:after,.wrapper:before{content:" ";display:table}
 | 
			
		||||
.wrapper:after{clear:both}
 | 
			
		||||
.wrapper:after,.wrapper:before{content:" ";display:table}
 | 
			
		||||
.wrapper:after{clear:both}
 | 
			
		||||
.layout-boxed .wrapper{max-width:1250px;margin:0 auto;min-height:100%;box-shadow:0 0 8px rgba(0,0,0,.5);position:relative}
 | 
			
		||||
.layout-boxed{background:url(../img/boxed-bg.jpg) repeat fixed}
 | 
			
		||||
.content-wrapper,.main-footer{-webkit-transition:-webkit-transform .3s ease-in-out,margin .3s ease-in-out;-moz-transition:-moz-transform .3s ease-in-out,margin .3s ease-in-out;-o-transition:-o-transform .3s ease-in-out,margin .3s ease-in-out;transition:transform .3s ease-in-out,margin .3s ease-in-out;margin-left:170px;z-index:820}
 | 
			
		||||
.layout-top-nav .content-wrapper,.layout-top-nav .main-footer{margin-left:0}
 | 
			
		||||
@media (max-width:767px){.content-wrapper,.main-footer{margin-left:0}
 | 
			
		||||
}
 | 
			
		||||
@media (min-width:768px){.sidebar-collapse .content-wrapper,.sidebar-collapse .main-footer{margin-left:0}
 | 
			
		||||
}
 | 
			
		||||
@media (max-width:767px){.sidebar-open .content-wrapper,.sidebar-open .main-footer{-webkit-transform:translate(160px,0);-ms-transform:translate(160px,0);-o-transform:translate(160px,0);transform:translate(160px,0)}
 | 
			
		||||
}
 | 
			
		||||
.content-wrapper{min-height:100%;background-color:#ecf0f5;z-index:800}
 | 
			
		||||
.main-footer{background:#fff;padding:15px;color:#444;border-top:1px solid #d2d6de}
 | 
			
		||||
.fixed .left-side,.fixed .main-header,.fixed .main-sidebar{position:fixed}
 | 
			
		||||
.fixed .main-header{top:0;right:0;left:0}
 | 
			
		||||
.fixed .content-wrapper,.fixed .right-side{padding-top:50px}
 | 
			
		||||
@media (max-width:767px){.fixed .content-wrapper,.fixed .right-side{padding-top:100px}
 | 
			
		||||
}
 | 
			
		||||
.fixed.layout-boxed .wrapper{max-width:100%}
 | 
			
		||||
.fixed .wrapper{overflow:hidden}
 | 
			
		||||
.hold-transition .content-wrapper,.hold-transition .left-side,.hold-transition .main-footer,.hold-transition .main-header .logo,.hold-transition .main-header .navbar,.hold-transition .main-sidebar,.hold-transition .menu-open .fa-angle-left,.hold-transition .right-side{-webkit-transition:none;-o-transition:none;transition:none}
 | 
			
		||||
.content{height:100%;margin:0 auto;}
 | 
			
		||||
.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:'Source Sans Pro',sans-serif}
 | 
			
		||||
a{color:#337ab7}
 | 
			
		||||
a:active,a:focus,a:hover{outline:0;text-decoration:none;color:#23527c}
 | 
			
		||||
.page-header{margin:10px 0 20px 0;font-size:22px}
 | 
			
		||||
.page-header>small{color:#666;display:block;margin-top:5px}
 | 
			
		||||
.main-header{position:relative;max-height:50px;z-index:1030}
 | 
			
		||||
.main-header .navbar{-webkit-transition:margin-left .3s ease-in-out;-o-transition:margin-left .3s ease-in-out;transition:margin-left .3s ease-in-out;margin-bottom:0;margin-left:170px;border:none;min-height:40px;border-radius:0}
 | 
			
		||||
.layout-top-nav .main-header .navbar{margin-left:0}
 | 
			
		||||
.main-header #navbar-search-input.form-control{background:rgba(255,255,255,.2);border-color:transparent}
 | 
			
		||||
.main-header #navbar-search-input.form-control:active,.main-header #navbar-search-input.form-control:focus{border-color:rgba(0,0,0,.1);background:rgba(255,255,255,.9)}
 | 
			
		||||
.main-header #navbar-search-input.form-control::-moz-placeholder{color:#ccc;opacity:1}
 | 
			
		||||
.main-header #navbar-search-input.form-control:-ms-input-placeholder{color:#ccc}
 | 
			
		||||
.main-header #navbar-search-input.form-control::-webkit-input-placeholder{color:#ccc}
 | 
			
		||||
.main-header .navbar-custom-menu,.main-header .navbar-right{float:right}
 | 
			
		||||
@media (max-width:991px){.main-header .navbar-custom-menu a,.main-header .navbar-right a{color:inherit;background:0 0}
 | 
			
		||||
}
 | 
			
		||||
@media (max-width:767px){.main-header .navbar-right{float:none}
 | 
			
		||||
.navbar-collapse .main-header .navbar-right{margin:7.5px -15px}
 | 
			
		||||
.main-header .navbar-right>li{color:inherit;border:0}
 | 
			
		||||
}
 | 
			
		||||
.main-header .sidebar-toggle{float:left;background-color:transparent;background-image:none;font-family:fontAwesome}
 | 
			
		||||
.main-header .sidebar-toggle:before{content:"\f0c9"}
 | 
			
		||||
.main-header .sidebar-toggle:hover{color:#fff}
 | 
			
		||||
.main-header .sidebar-toggle:active,.main-header .sidebar-toggle:focus{background:0 0}
 | 
			
		||||
.main-header .sidebar-toggle .icon-bar{display:none}
 | 
			
		||||
.main-header .navbar .nav>li.user>a>.fa,.main-header .navbar .nav>li.user>a>.glyphicon,.main-header .navbar .nav>li.user>a>.ion{margin-right:5px}
 | 
			
		||||
.main-header .navbar .nav>li>a>.label{position:absolute;top:9px;right:7px;text-align:center;font-size:9px;padding:2px 3px;line-height:.9}
 | 
			
		||||
.main-header .logo{-webkit-transition:width .3s ease-in-out;-o-transition:width .3s ease-in-out;transition:width .3s ease-in-out;display:block;float:left;height:50px;font-size:20px;line-height:50px;text-align:center;width:170px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:0 15px;font-weight:300;overflow:hidden}
 | 
			
		||||
.main-header .logo .logo-lg{display:block;font-weight: bold;font-size: 25px;text-shadow: 3px 3px 7px #000;}
 | 
			
		||||
.main-header .logo .logo-lg .logo-txt{font-size:20px;margin-left:2px;height:50px;line-height:50px}
 | 
			
		||||
.main-header .logo .logo-mini{display:none;text-shadow: 3px 3px 7px #000;}
 | 
			
		||||
.main-header .navbar-brand{color:#fff}
 | 
			
		||||
.content-header{position:relative;}
 | 
			
		||||
.content-header>h1{margin:0;font-size:24px}
 | 
			
		||||
.content-header>h1>small{font-size:15px;display:inline-block;padding-left:4px;font-weight:300}
 | 
			
		||||
.content-header>.breadcrumb{border-bottom:solid 2px #222d32;height:40px;line-height:31px;background:0 0;margin-top:0;margin-bottom:0;font-size:12px;padding:5px 5px;border-radius:2px}
 | 
			
		||||
.content-header>.breadcrumb>li>a{color:#444;text-decoration:none;display:inline-block}
 | 
			
		||||
.content-header>.breadcrumb>li>a>.fa,.content-header>.breadcrumb>li>a>.glyphicon,.content-header>.breadcrumb>li>a>.ion{margin-right:5px}
 | 
			
		||||
.content-header>.breadcrumb>li+li:before{content:'>\00a0'}
 | 
			
		||||
@media (max-width:991px){.content-header>.breadcrumb{position:relative;top:0;right:0;float:none;background:#d2d6de;padding-left:10px}
 | 
			
		||||
.content-header>.breadcrumb li:before{color:#97a0b3}
 | 
			
		||||
}
 | 
			
		||||
.navbar-toggle{color:#fff;border:0;margin:0;padding:15px 15px}
 | 
			
		||||
@media (max-width:991px){.navbar-custom-menu .navbar-nav>li{float:left}
 | 
			
		||||
.navbar-custom-menu .navbar-nav{margin:0;float:left}
 | 
			
		||||
.navbar-custom-menu .navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}
 | 
			
		||||
}
 | 
			
		||||
@media (max-width:767px){.main-header{position:relative}
 | 
			
		||||
.main-header .logo,.main-header .navbar{width:100%;float:none}
 | 
			
		||||
.main-header .navbar{margin:0}
 | 
			
		||||
.main-header .navbar-custom-menu{float:right}
 | 
			
		||||
.navbar .nav-top .top-menu span{display:none;}
 | 
			
		||||
}
 | 
			
		||||
@media (max-width:991px){.navbar-collapse.pull-left{float:none!important}
 | 
			
		||||
.navbar-collapse.pull-left+.navbar-custom-menu{display:block;position:absolute;top:0;right:40px}
 | 
			
		||||
}
 | 
			
		||||
.main-sidebar{position:absolute;top:0;left:0;padding-top:50px;min-height:100%;width:170px;z-index:810;-webkit-transition:-webkit-transform .3s ease-in-out,width .3s ease-in-out;-moz-transition:-moz-transform .3s ease-in-out,width .3s ease-in-out;-o-transition:-o-transform .3s ease-in-out,width .3s ease-in-out;transition:transform .3s ease-in-out,width .3s ease-in-out}
 | 
			
		||||
@media (max-width:767px){.main-sidebar{padding-top:100px}
 | 
			
		||||
}
 | 
			
		||||
@media (max-width:767px){.main-sidebar{-webkit-transform:translate(-160px,0);-ms-transform:translate(-160px,0);-o-transform:translate(-160px,0);transform:translate(-160px,0)}
 | 
			
		||||
}
 | 
			
		||||
@media (min-width:768px){.sidebar-collapse .main-sidebar{-webkit-transform:translate(-160px,0);-ms-transform:translate(-160px,0);-o-transform:translate(-160px,0);transform:translate(-160px,0)}
 | 
			
		||||
}
 | 
			
		||||
@media (max-width:767px){.navbar .nav-top .top-menu span{display:none;}.sidebar-open .main-sidebar{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}
 | 
			
		||||
}
 | 
			
		||||
.navbar-nav > .user-menu .user-image {float: left;width: 25px;height: 25px;border-radius: 50%;margin-right: 10px;margin-top: -2px;}
 | 
			
		||||
@media (max-width: 767px) {.navbar-nav > .user-menu .user-image {float: none;margin-right: 0;margin-top: -8px;line-height: 10px;}}
 | 
			
		||||
.sidebar{padding-bottom:10px}
 | 
			
		||||
.sidebar-form input:focus{border-color:transparent}
 | 
			
		||||
.user-panel{position:relative;width:100%;padding:20px 10px 20px 10px;overflow:hidden}
 | 
			
		||||
.user-panel:after,.user-panel:before{content:" ";display:table}
 | 
			
		||||
.user-panel:after{clear:both}
 | 
			
		||||
.user-panel:after,.user-panel:before{content:" ";display:table}
 | 
			
		||||
.user-panel:after{clear:both}
 | 
			
		||||
.user-panel>.image>img{width:100%;max-width:45px;height:auto}
 | 
			
		||||
.user-panel>.info{padding:5px 5px 5px 15px;line-height:1;position:absolute;left:55px}
 | 
			
		||||
.user-panel>.info>p{font-weight:600;margin-bottom:9px}
 | 
			
		||||
.user-panel>.info>a{text-decoration:none;padding-right:5px;margin-top:3px;font-size:11px}
 | 
			
		||||
.user-panel>.info>a>.fa,.user-panel>.info>a>.glyphicon,.user-panel>.info>a>.ion{margin-right:3px}
 | 
			
		||||
.user-panel>.button{margin-top:10px;}
 | 
			
		||||
.sidebar-menu{list-style:none;margin:0;padding:0}
 | 
			
		||||
.sidebar-menu>li{position:relative;margin:0;padding:0}
 | 
			
		||||
.sidebar-menu>li>a{padding:12px 5px 12px 15px;display:block;}
 | 
			
		||||
.sidebar-menu>li>a>.fa,.sidebar-menu>li>a>.glyphicon,.sidebar-menu>li>a>.ion{width:20px}
 | 
			
		||||
.sidebar-menu>li .badge,.sidebar-menu>li .label{margin-right:5px}
 | 
			
		||||
.sidebar-menu>li .badge{margin-top:3px}
 | 
			
		||||
.sidebar-menu li.header{padding:10px 25px 10px 15px;}
 | 
			
		||||
.sidebar-menu li>a>.fa-angle-left,.sidebar-menu li>a>.pull-right-container>.fa-angle-left{width:auto;height:auto;padding:0;margin-right:10px;-webkit-transition:transform .5s ease;-o-transition:transform .5s ease;transition:transform .5s ease}
 | 
			
		||||
.sidebar-menu li>a>.fa-angle-left{position:absolute;top:50%;right:10px;margin-top:-8px}
 | 
			
		||||
.sidebar-menu .menu-open>a>.fa-angle-left,.sidebar-menu .menu-open>a>.pull-right-container>.fa-angle-left{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}
 | 
			
		||||
.sidebar-menu .active>.treeview-menu{display:block;}
 | 
			
		||||
@media (min-width:768px){.sidebar-mini.sidebar-collapse .content-wrapper,.sidebar-mini.sidebar-collapse .main-footer,.sidebar-mini.sidebar-collapse .right-side{margin-left:50px!important;z-index:840}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .main-sidebar{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0);width:50px!important;z-index:850}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .sidebar-menu>li{position:relative}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .sidebar-menu>li>a{margin-right:0}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>span{border-top-right-radius:4px}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .sidebar-menu>li:not(.treeview)>a>span{border-bottom-right-radius:4px}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{padding-top:5px;padding-bottom:5px;border-bottom-right-radius:4px}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .main-sidebar .user-panel>.info,.sidebar-mini.sidebar-collapse .main-sidebar .user-panel>.button,.sidebar-mini.sidebar-collapse .main-sidebar .user-panel>.button,.sidebar-mini.sidebar-collapse .sidebar-form,.sidebar-mini.sidebar-collapse .sidebar-menu li.header,.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu,.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>.pull-right,.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>span{display:none!important;-webkit-transform:translateZ(0)}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .main-header .logo{width:50px}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .main-header .logo>.logo-mini{display:block;margin-left:-15px;margin-right:-15px;font-size:18px}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .main-header .logo>.logo-lg{display:none}
 | 
			
		||||
.sidebar-mini.sidebar-collapse .main-header .navbar{margin-left:50px}
 | 
			
		||||
}
 | 
			
		||||
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>.treeview-menu,.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>span:not(.pull-right){display:block!important;position:absolute;width:160px;left:50px}
 | 
			
		||||
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>span{top:0;margin-left:-3px;padding:12px 5px 12px 20px;background-color:inherit}
 | 
			
		||||
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>.pull-right-container{position:relative!important;float:right;width:auto!important;left:160px!important;top:-22px!important;z-index:900}
 | 
			
		||||
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>.pull-right-container>.label:not(:first-of-type){display:none}
 | 
			
		||||
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>.treeview-menu{top:40px;margin-left:0}
 | 
			
		||||
.sidebar-expanded-on-hover .content-wrapper,.sidebar-expanded-on-hover .main-footer{margin-left:50px}
 | 
			
		||||
.sidebar-expanded-on-hover .main-sidebar{box-shadow:3px 0 8px rgba(0,0,0,.125)}
 | 
			
		||||
.main-sidebar .user-panel,.sidebar-menu,.sidebar-menu>li.header{white-space:nowrap;overflow:hidden}
 | 
			
		||||
.sidebar-menu:hover{overflow:visible}
 | 
			
		||||
.sidebar-form,.sidebar-menu>li.header{overflow:hidden;text-overflow:clip}
 | 
			
		||||
.sidebar-menu li>a{position:relative}
 | 
			
		||||
.sidebar-menu li>a>.pull-right-container{position:absolute;right:10px;top:50%;margin-top:0px}
 | 
			
		||||
.treeview-menu{display:none;list-style:none;padding:0;margin:0;padding-left:5px}
 | 
			
		||||
.treeview-menu .treeview-menu{padding-left:20px}
 | 
			
		||||
.treeview-menu>li{margin:0}
 | 
			
		||||
.treeview-menu>li>a{padding:5px 5px 5px 25px;display:block;color:#b8c7ce;}
 | 
			
		||||
.treeview-menu>li>a>.fa,.treeview-menu>li>a>.glyphicon,.treeview-menu>li>a>.ion{width:20px}
 | 
			
		||||
.treeview-menu>li>a>.fa-angle-down,.treeview-menu>li>a>.fa-angle-left,.treeview-menu>li>a>.pull-right-container>.fa-angle-down,.treeview-menu>li>a>.pull-right-container>.fa-angle-left{width:auto}
 | 
			
		||||
 | 
			
		||||
.main-header>.navbar .nav-top{display:inline;margin-bottom:0px;margin-top:0px;}
 | 
			
		||||
.main-header>.navbar .nav-top li{line-height:50px;height:37px;overflow:hidden;list-style:none;display:inline-block;color:#fff;margin-right:20px;}
 | 
			
		||||
.main-header>.navbar .nav-top li a{color:#fff;}
 | 
			
		||||
.main-header>.navbar .nav-top>li>a>.fa{width:15px;}
 | 
			
		||||
.navbar-nav>li>a{padding-top:15px;padding-bottom:15px;font-size: 14px;}
 | 
			
		||||
.content-wrapper .content-header button{padding:0px;position: absolute;right: 0px;top:0px;background:#fff;border:0;height:38px;line-height:40px;width:40px;outline:0}
 | 
			
		||||
.content-wrapper .content-header button:hover{background:#fafafa}
 | 
			
		||||
.content-wrapper .content-header button i{color: #999;}
 | 
			
		||||
.dropdown-menu{min-width:120px;box-shadow:#eee;border-color:#eee;}
 | 
			
		||||
.dropdown-menu>li>a{font-size:12px;}
 | 
			
		||||
.dropdown-menu>li>a>.fa{margin-right:10px;}
 | 
			
		||||
/***风格覆盖***/
 | 
			
		||||
.skin-blue .main-header .navbar{background:#2cabe3;}
 | 
			
		||||
.skin-blue .main-header .logo{background:#2cabe3;}
 | 
			
		||||
.wst-focus{background: rgba(0,0,0,0.1);color: #f6f6f6}
 | 
			
		||||
 | 
			
		||||
.edit-pass{display: inline-block;background:#F7FCFF;padding:3px 5px;margin-right:5px;color:#000000;border-radius:4px;}
 | 
			
		||||
.logout{display: inline-block;background:#F7FCFF;padding:3px 5px;color:#000000;border-radius:4px;}
 | 
			
		||||
.edit-pass:hover{background:#f5f5f5;}
 | 
			
		||||
.logout:hover{background:#f5f5f5;}
 | 
			
		||||
.edit-pass i,.logout i{color:#000000;margin-right:2px;}
 | 
			
		||||
.edit-pass span,.logout span{color:#000000;font-size:12px;}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										53
									
								
								hyhproject/admin/view/css/login.css
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,53 @@
 | 
			
		||||
body{margin:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;font-size:14px;font-family:"微软雅黑",Arial,Helvetica,sans-serif}
 | 
			
		||||
#logo{position:absolute;top:5px;left:5px;text-align:center}
 | 
			
		||||
.login_logo{margin-left: 23px;width:70px;height:70px;float:left;}
 | 
			
		||||
.login_logo img{width:100%;height: 100%;}
 | 
			
		||||
#loginFrame{background:url(../img/login_bg.png) #4771a0 no-repeat center center fixed;background-size:cover;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 图标替换 */
 | 
			
		||||
.layui-layer-icowst1,.layui-layer-icowst2,.layui-layer-icowst3{background-image:url(../../../../static/images/wst_icon.png)!important;background-repeat:no-repeat!important;background-size:cover!important}
 | 
			
		||||
.layui-layer-icowst2{background-position:-40px 0!important}
 | 
			
		||||
.layui-layer-icowst3{background-position:-80px -1px!important}
 | 
			
		||||
.layui-layer-icowstloading{background-image:url(../../../../static/images/loading.gif)!important;background-repeat:no-repeat!important;background-size:206% auto!important;background-position:-16px -16px!important}
 | 
			
		||||
 | 
			
		||||
.wst-clear{clear: both;}
 | 
			
		||||
.wst-lo{  position: absolute;left: 50%;margin-left: -350px;top: 35%;margin-top: -140px;width: 700px;}
 | 
			
		||||
.wst-lo .head{position:absolute;top:-80px;left:27%;width:252px;height:110px;line-height:55px;font-size:20px;color:#fff;font-family:"microsoft yahei";text-shadow:#717070 1px 1px 1px;text-align:center;background:url(../img/logo.png) 0 0 no-repeat;background-size:100%}
 | 
			
		||||
.wst-lo-left{float:left;width:235px;height:256px;background-size:cover}
 | 
			
		||||
.wst-lo-left img{margin-left:45px}
 | 
			
		||||
#verifyImg{  cursor: pointer;width: 108px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;height: 32px;position: absolute;z-index: 100;top:-7px;right: 18px;}
 | 
			
		||||
 | 
			
		||||
.login_title{float:right;width:340px;text-align:left;margin-top:4px;color:#fff;}
 | 
			
		||||
.login_title .title_cn{font-size:30px;position: relative;}
 | 
			
		||||
.login_title .title_en{position: relative;}
 | 
			
		||||
.login-wrapper {text-align: center;position:relative; }
 | 
			
		||||
.login-wrapper .frame{padding-right:0px;position:relative;}
 | 
			
		||||
.login-wrapper .text2{margin-bottom:0;width:222px;}
 | 
			
		||||
.login-wrapper .logo {margin-bottom: 45px;position: relative;left: -2px; }
 | 
			
		||||
.login-wrapper .boxbg{opacity:0.3;margin: 0 auto;padding: 35px 0 30px;float: none;width: 500px;box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);border-radius: 5px;background: #fff; height:300px;}
 | 
			
		||||
.login-wrapper .boxbg2{position:relative;opacity:0.16;margin: 0 auto;padding: 35px 0 30px;float: none;width: 400px;box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);border-radius: 5px;background: #fff; height:240px;margin-left:150px;filter:alpha(opacity=16)}
 | 
			
		||||
.login-wrapper .box {position:absolute;top:17px;left:162px; margin: 0 auto;padding: 35px 0 30px;float: none;width: 380px; }
 | 
			
		||||
.login-wrapper .box .content-wrap {width: 82%;margin: 0 auto; }
 | 
			
		||||
.login-wrapper .box h6 {text-transform: uppercase;margin: 0 0 12px 0;font-size: 18px;font-weight: 600; }
 | 
			
		||||
.login-wrapper .box input[type="text"],
 | 
			
		||||
.login-wrapper .box input[type="password"] {  border-radius: 0;font-size: 15px;height:30px;margin-bottom: 10px;border:0;padding-left: 12px;border-bottom:1px solid #244eac;}
 | 
			
		||||
.login-wrapper .box input[type="password"] {margin-bottom: 10px; }
 | 
			
		||||
.login-wrapper .box input:-moz-placeholder {color: #9ba8b6;font-size: 15px;letter-spacing: 0px;font-style: italic; }
 | 
			
		||||
.login-wrapper .box input:-ms-input-placeholder {color: #9ba8b6;font-style: italic;letter-spacing: 0px;font-size: 15px; }
 | 
			
		||||
.login-wrapper .box input::-webkit-input-placeholder {color: #9ba8b6;font-style: italic;letter-spacing: 0px;font-size: 15px; }
 | 
			
		||||
.login-wrapper .box .login {text-transform: uppercase;font-size: 13px;padding: 8px 30px; }
 | 
			
		||||
.login-wrapper .no-account {margin: 0 auto;float: none;text-align: center;font-size: 14px;margin-top: 25px; }
 | 
			
		||||
.login-wrapper .no-account p {display: inline-block;color: #eee; }
 | 
			
		||||
.login-wrapper .login-box{background-color: #fff;padding: 17px;border-radius: 3px;  margin-bottom: 15px;  padding-left: 55px;}
 | 
			
		||||
.login-head{width:90px;height:90px;background-size:contain;position: absolute;top: 56px; right: 0; }
 | 
			
		||||
.login-head img{width:100%;height: 100%;}
 | 
			
		||||
.login-icon1,.login-icon2,.login-icon3{width:25px;height:25px;background:url(../img/login_icon.png) no-repeat;position:absolute;}
 | 
			
		||||
.login-icon1{top:55px;left:50px;background-position: 0 0;}
 | 
			
		||||
.login-icon2{top:95px;left:50px;background-position: 0 -30px;}
 | 
			
		||||
.login-icon3{top:136px;left:50px;background-position: 0 -61px;}
 | 
			
		||||
.login-header{width:445px;margin:0 auto;margin-bottom:20px;}
 | 
			
		||||
.login-footer{color:#fff;width:360px;margin:0 auto;margin-top:30px;position:relative;text-align:center;}
 | 
			
		||||
.login-footer .line1{position:absolute;width:95px;font-size:0;line-height:1px;border-bottom:1px solid #fff;top: 10px;left:0; }
 | 
			
		||||
.login-footer .line2{position:absolute;width:95px;font-size:0;line-height:1px;border-bottom:1px solid #fff;top: 10px;right:0; }
 | 
			
		||||
#loginbtn{background: url(../img/login-btn.png) no-repeat;background-position: -1px -2px;}
 | 
			
		||||
							
								
								
									
										1
									
								
								hyhproject/admin/view/css/skins/skin-blue.min.css
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1 @@
 | 
			
		||||
.skin-blue .main-header .navbar{background-color:#3c8dbc}.skin-blue .main-header .navbar .nav>li>a{color:#fff}.skin-blue .main-header .navbar .nav>li>a:hover,.skin-blue .main-header .navbar .nav>li>a:active,.skin-blue .main-header .navbar .nav>li>a:focus,.skin-blue .main-header .navbar .nav .open>a,.skin-blue .main-header .navbar .nav .open>a:hover,.skin-blue .main-header .navbar .nav .open>a:focus,.skin-blue .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue .main-header .logo{background-color:#367fa9;color:#fff;border-bottom:0 solid transparent}.skin-blue .main-header .logo:hover{background-color:#357ca5}.skin-blue .main-header li.user-header{background-color:#3c8dbc}.skin-blue .content-header{background:transparent}.skin-blue .wrapper,.skin-blue .main-sidebar,.skin-blue .left-side{background-color:#222d32}.skin-blue .user-panel>.info,.skin-blue .user-panel>.info>a{color:#fff}.skin-blue .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-blue .sidebar-menu>li>a{border-left:3px solid transparent}.skin-blue .sidebar-menu>li:hover>a,.skin-blue .sidebar-menu>li.active>a,.skin-blue .sidebar-menu>li.menu-open>a{color:#fff;background:#1e282c}.skin-blue .sidebar-menu>li.active>a{border-left-color:#3c8dbc}.skin-blue .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-blue .sidebar a{color:#b8c7ce}.skin-blue .sidebar a:hover{text-decoration:none}.skin-blue .sidebar-menu .treeview-menu>li>a{color:#8aa4af}.skin-blue .sidebar-menu .treeview-menu>li.active>a,.skin-blue .sidebar-menu .treeview-menu>li>a:hover{color:#fff}.skin-blue .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-blue .sidebar-form input[type="text"],.skin-blue .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-blue .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue .sidebar-form input[type="text"]:focus,.skin-blue .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}
 | 
			
		||||
							
								
								
									
										207
									
								
								hyhproject/admin/view/css/style.css
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,207 @@
 | 
			
		||||
@CHARSET "UTF-8";
 | 
			
		||||
body,html{height:100%}
 | 
			
		||||
body{padding:0;margin:0;overflow-x:hidden}
 | 
			
		||||
.layui-layer-icowst1,.layui-layer-icowst2,.layui-layer-icowst3{background-image:url(../../../../static/images/wst_icon.png)!important;background-repeat:no-repeat!important;background-size:cover!important}
 | 
			
		||||
.layui-layer-icowst2{background-position:-40px 0!important}
 | 
			
		||||
.layui-layer-icowst3{background-position:-80px -1px!important}
 | 
			
		||||
.layui-layer-icowstloading{background-image:url(../../../../static/images/loading.gif)!important;background-repeat:no-repeat!important;background-size:206% auto!important;background-position:-16px -16px!important}
 | 
			
		||||
.wst-top-link{display:inline-block;height:26px;line-height:26px;padding-left:10px;text-decoration:none;color:#333}
 | 
			
		||||
.wst-link{display:block;height:26px;line-height:26px;padding-left:10px;text-decoration:none;color:#333}
 | 
			
		||||
.wst-link:hover{background:#ffeeac}
 | 
			
		||||
.wst-space{color:#e7e7e7}
 | 
			
		||||
.wst-topmenu{margin:0;padding:0;height:88px;line-height:31px;background:url(../img/img_top_bg.png);position:relative;border-top:1px solid #1d438b}
 | 
			
		||||
.wst-topmenu-logo{color:#e7e7e7;padding-left:5px;line-height:26px}
 | 
			
		||||
.wst-topmenu-welcome{position:absolute;height:24px;line-height:24px;right:30px;top:2px;color:#070a0c}
 | 
			
		||||
.wst-topmenu-welcome a{color:#fff;text-decoration:none}
 | 
			
		||||
.wst-topmenu-welcome .website{background:url('../img/icon_topmenu.png') -5px -5px no-repeat;width:15px;height:15px;background-size:700%;display:inline-block}
 | 
			
		||||
.wst-topmenu-welcome .selfshop{background:url('../img/icon_topmenu.png') -22px -5px no-repeat;width:15px;height:15px;background-size:700%;display:inline-block}
 | 
			
		||||
.wst-topmenu-welcome .support{background:url('../img/icon_topmenu.png') -58px -5px no-repeat;width:16px;height:15px;background-size:700%;display:inline-block}
 | 
			
		||||
.wst-topmenu-welcome .clear{background:url('../img/icon_topmenu.png') -38px -5px no-repeat;width:15px;height:15px;background-size:700%;display:inline-block}
 | 
			
		||||
.wst-topmenu-welcome .password{background:url('../img/icon_topmenu.png') -69px -5px no-repeat;width:15px;height:15px;background-size:700%;display:inline-block}
 | 
			
		||||
.wst-topmenu-welcome .logout{background:url('../img/icon_topmenu.png') -84px -5px no-repeat;width:15px;height:15px;background-size:700%;display:inline-block}
 | 
			
		||||
#wst-tabs .l-tab-links{border-bottom:3px solid #157abf}
 | 
			
		||||
.l-tab-links{border-bottom:2px solid #157abf}
 | 
			
		||||
.l-tab-links{background:0}
 | 
			
		||||
.l-tab-links li{background:url("../img/tabs-item-over-bg.gif") repeat scroll 0 0}
 | 
			
		||||
.l-tab-links .l-tab-links-item-right{background:url("../img/tabs2-item-right-bg.gif") repeat scroll 0 0}
 | 
			
		||||
.l-tab-links .l-tab-links-item-left{background:url("../img/tabs2-item-left-bg.gif") repeat scroll 0 0}
 | 
			
		||||
.l-tab-links .l-selected .l-tab-links-item-left{background:url("../img/tabs-item-left-bg.gif") repeat scroll 0 0}
 | 
			
		||||
.l-tab-links .l-selected .l-tab-links-item-right{background:url("../img/tabs-item-right-bg.gif") repeat scroll 0 0}
 | 
			
		||||
.l-tab-links li.l-selected{background:url("../img/tabs-item-bg.gif") repeat scroll 0 0}
 | 
			
		||||
.l-tab-links li a{margin-left:33px}
 | 
			
		||||
.l-tab-links li.l-selected a{color:#fff}
 | 
			
		||||
#wst-tabs .l-tab-links li a{margin-left:33px;font-weight:bold}#wst-tabs .l-tab-links li.l-selected a{color:#fff;font-weight:bold}
 | 
			
		||||
.l-layout-left .l-layout-header-toggle{background:url("../img/togglebar.gif") repeat scroll -20px 0}
 | 
			
		||||
.l-layout-header,.l-accordion-header{background:url("../img/layout-header.gif") repeat scroll -20px 0}
 | 
			
		||||
.l-layout-header .l-layout-header-inner,.l-accordion-header .l-accordion-header-inner,.l-layout-header{color:#fff}
 | 
			
		||||
.l-layout-collapse-left,.l-layout-collapse-right{background:#43aedf}
 | 
			
		||||
.l-accordion-toggle{background:url("../img/togglebar.gif") repeat scroll 0 0}
 | 
			
		||||
.l-accordion-toggle-open{background-position:0 -40px}
 | 
			
		||||
.l-accordion-toggle-close{background-position:0 0}
 | 
			
		||||
.body-gray2014 #wst-framecenter{margin-top:3px}
 | 
			
		||||
#wst-pageinit{position:absolute;left:0;top:0;width:100%;background:white url('../img/loading.gif') no-repeat centerheight:100%;z-index:99999}
 | 
			
		||||
.btn{-moz-user-select:none;background-image:none;border:1px solid #ccc;cursor:pointer;display:inline-block;font-size:14px;font-weight:normal;line-height:1.42857;margin-bottom:0;text-align:center;vertical-align:middle;white-space:nowrap;border-radius:3px;height:24px;line-height:1.2;padding:2px 8px;background:#fafafa none repeat scroll 0 0}
 | 
			
		||||
.btn-green{background:#43b97e none repeat scroll 0 0;border-color:green;color:#fff}
 | 
			
		||||
.btn-red{background:red none repeat scroll 0 0;border-color:red;color:#fff}
 | 
			
		||||
.btn-blue{background:#1d9ed9 none repeat scroll 0 0;border-color:#157abf;color:#fff}
 | 
			
		||||
.btn:hover,.btn:focus,.btn:active,.btn.active{background-color:#ddd}
 | 
			
		||||
.btn-green:hover,.btn-green:focus,.btn-green:active,.btn-green.active{background-color:green;border-color:green;color:#fff}
 | 
			
		||||
.btn-red:hover,.btn-red:focus,.btn-red:active,.btn-red.active{background-color:red;border-color:red;color:#fff}
 | 
			
		||||
.btn-blue:hover,.btn-blue:focus,.btn-blue:active,.btn-blue.active{background-color:#428bca;border-color:#428bca;color:#fff}
 | 
			
		||||
.btn-disabled{color:#ccc}
 | 
			
		||||
.wst-toolbar{padding:5px}
 | 
			
		||||
.wst-body{padding:5px}
 | 
			
		||||
.wst-footer{padding-bottom:20px;text-align:center}
 | 
			
		||||
.f-right{float:right}
 | 
			
		||||
.f-left{float:left}
 | 
			
		||||
.f-clear{clear:both}
 | 
			
		||||
.wst-form{width:100%;margin-bottom:20px}
 | 
			
		||||
.wst-form input.cfg,.wst-form input.textarea{width:340px}
 | 
			
		||||
.wst-form th{text-align:right}
 | 
			
		||||
.wst-form td{padding:2px 5px}
 | 
			
		||||
.wst-box-top{margin-top:5px}label{margin-right:10px}
 | 
			
		||||
input[type=text],input[type=password]{background-color:#fff;border:1px solid #ccc;color:#222;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset;display:inline-block;font-size:14px;height:20px;padding:2px 5px;position:relative;transition:border-color .15s ease-in-out 0s,box-shadow .15s ease-in-out 0s;vertical-align:middle;width:auto;margin:2px}
 | 
			
		||||
textarea{background-color:#fff;background-image:none;border:1px solid #ccc;color:#222;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset;display:inline-block;font-size:14px;padding:2px 5px;position:relative;transition:border-color .15s ease-in-out 0s,box-shadow .15s ease-in-out 0s;vertical-align:middle;margin:2px}
 | 
			
		||||
select{background-color:#fff;border:1px solid #ccc;border-radius:2px;height:24px;margin:2px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 1px rgba(0,0,0,0.075) inset}
 | 
			
		||||
input[type="radio"],input[type="checkbox"]{margin:2px}td.head-ititle{background:url('../img/img_seller_ggjt.png') no-repeat 5px 4px;padding-left:28px;padding-bottom:5px;font-weight:bold}
 | 
			
		||||
.webuploader-pick{background:#428bca;height:24px;border-radius:3px;line-height:24px;overflow:hidden}
 | 
			
		||||
.webuploader-container{height:24px;overflow:hidden;width:300px}
 | 
			
		||||
.l-text{background:white none repeat scroll 0 0;border:1px solid #fff;height:25px;line-height:25px;position:relative;width:160px;margin:2px}
 | 
			
		||||
.l-trigger,.l-trigger-hover,.l-trigger-pressed{top:6px}
 | 
			
		||||
.l-grid-header{background:#fff url("../img/header-bg.gif") repeat-x scroll left bottom;border-bottom:1px solid #ddd;overflow:hidden;width:100%}
 | 
			
		||||
.l-grid-hd-cell{border-right:1px solid #ddd;margin:0;overflow:hidden;padding:0;text-align:center}
 | 
			
		||||
.l-grid-row-alt .l-grid-row-cell-rownumbers,.l-selected .l-grid-row-cell-rownumbers,.l-grid-row-over .l-grid-row-cell-rownumbers,.l-grid-row-cell-rownumbers{background:#eee none repeat scroll 0 0}
 | 
			
		||||
.l-grid-row-cell{border-bottom:1px dotted #a3bae9;border-right:1px solid #ddd;overflow:hidden;text-align:center}#maingrid{border:1px solid #ddd}
 | 
			
		||||
.wst-grid-tree .row-hover{background:#e0ecff}
 | 
			
		||||
.wst-grid-tree .row-selected{background:#dcf8a8}
 | 
			
		||||
.wst-grid-tree .bg-color{background:#f5f5f5}
 | 
			
		||||
.order-box{margin-bottom:5px;border-bottom:1px solid #ddd}
 | 
			
		||||
.order-box .box-head{font-weight:bold;height:30px;line-height:30px}
 | 
			
		||||
.order-box .delivery-box{height:100px;border-bottom:1px solid #ddd}
 | 
			
		||||
.order-box th{font-weight:normal}
 | 
			
		||||
.order-box .goods-head{border-top:2px solid #fc7a64;background:#f3f3f3;display:block;height:25px;line-height:25px;margin:0 0 10px;padding:5px 0}
 | 
			
		||||
.order-box .goods-head .goods{float:left;width:650px;padding-left:15px}
 | 
			
		||||
.order-box .goods-head .price{float:left;width:100px}
 | 
			
		||||
.order-box .goods-head .num{float:left;width:100px}
 | 
			
		||||
.order-box .goods-head .t-price{float:left;width:105px}
 | 
			
		||||
.order-box .shop{padding-left:15px;height:25px;line-height:25px;border-bottom:2px solid #fdd8d2;color:#e55356;font-weight:bold;font-size:15px}
 | 
			
		||||
.order-box .item{padding-top:5px;padding-bottom:5px;border:1px solid #eee}
 | 
			
		||||
.order-box .item .goods{float:left;width:650px;padding-left:15px}
 | 
			
		||||
.order-box .item .goods .img{float:left;width:80px;height:80px}
 | 
			
		||||
.order-box .item .goods .name{float:left;width:390px;height:80px;margin-left:5px}
 | 
			
		||||
.order-box .item .goods .spec{float:left;width:165px;margin-left:5px}
 | 
			
		||||
.order-box .item .price{float:left;width:100px}
 | 
			
		||||
.order-box .item .num{float:left;width:100px}
 | 
			
		||||
.order-box .item .t-price{float:left;width:100px}
 | 
			
		||||
.order-box .goods-footer{padding-right:10px;margin-bottom:10px}
 | 
			
		||||
.order-box .line{border-top:1px solid #ddd}
 | 
			
		||||
.order-box .goods-summary{margin-top:10px}
 | 
			
		||||
.order-box .summary{height:30px;line-height:30px}
 | 
			
		||||
.order-box .orderScore{margin-right:5px}
 | 
			
		||||
.order-box .log td{height:25px;line-height:25px;padding-left:15px}
 | 
			
		||||
.order-box .log-box{height:132px}
 | 
			
		||||
.order-box .log-box .icon{float:left;width:60px;height:60px}
 | 
			
		||||
.order-box .log-box .icons{float:left;width:60px;height:60px}
 | 
			
		||||
.order-box .log-box .icon11{background:url(../img/user_icon_rzxx.png) -15px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon21{background:url(../img/user_icon_rzxx.png) -105px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon31{background:url(../img/user_icon_rzxx.png) -194px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon41{background:url(../img/user_icon_rzxx.png) -282px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon51{background:url(../img/user_icon_rzxx.png) -373px -12px no-repeat}
 | 
			
		||||
.order-box .log-box .icon12{background:url(../img/user_icon_rzxx.png) -15px -62px no-repeat}
 | 
			
		||||
.order-box .log-box .icon22{background:url(../img/user_icon_rzxx.png) -105px -62px no-repeat}
 | 
			
		||||
.order-box .log-box .icon32{background:url(../img/user_icon_rzxx.png) -194px -61px no-repeat}
 | 
			
		||||
.order-box .log-box .icon42{background:url(../img/user_icon_rzxx.png) -282px -63px no-repeat}
 | 
			
		||||
.order-box .log-box .icon52{background:url(../img/user_icon_rzxx.png) -373px -62px no-repeat}
 | 
			
		||||
.order-box .log-box .icon13{background:url(../img/user_icon_rzxx.png) -19px -123px no-repeat}
 | 
			
		||||
.order-box .log-box .icon23{background:url(../img/user_icon_rzxx.png) -105px -122px no-repeat}
 | 
			
		||||
.order-box .log-box .icon33{background:url(../img/user_icon_rzxx.png) -194px -121px no-repeat}
 | 
			
		||||
.order-box .log-box .icon43{background:url(../img/user_icon_rzxx.png) -282px -122px no-repeat}
 | 
			
		||||
.order-box .log-box .icon53{background:url(../img/user_icon_rzxx.png) -373px -121px no-repeat}
 | 
			
		||||
.order-box .log-box .arrow{float:left;color:#979797;font-size:15px;font-weight:bold;margin-top:18px}
 | 
			
		||||
.order-box .log-box .arrow2{color:#7ebb53}
 | 
			
		||||
.order-box .log-box .state{float:left;width:100%;margin-left:18px}
 | 
			
		||||
.order-box .log-box .state2{float:left;width:100%;position:relative}
 | 
			
		||||
.order-box .log-box .state2 p{float:left;width:178px;height:50px;text-align:left;margin-left:15px;color:#f05858;font-size:15px}
 | 
			
		||||
.order-box .log-box .state2 .path{position:absolute;z-index:10}
 | 
			
		||||
.order-box .log-box .state2 .path span{float:left;width:178px;height:50px;text-align:left;margin-left:15px;background:#fff}
 | 
			
		||||
.recom-lbox{width:350px;height:350px;border:1px solid #ddd;padding:5px;text-align:left;overflow-x:hidden;overflow-y:auto}
 | 
			
		||||
.recom-lbox .head,.recom-rbox .head{border-bottom:1px solid #eee}
 | 
			
		||||
.recom-lbox .tck,.recom-rbox .tck{float:left;height:30px;overflow:hidden;width:25px}
 | 
			
		||||
.recom-lbox .ttxt{float:left;height:30px;overflow:hidden;width:305px}
 | 
			
		||||
.recom-lbox .trow{backbgound:#eee;height:30px;overflow:hidden;line-height:30px}
 | 
			
		||||
.recom-rbox{width:420px;height:350px;border:1px solid #ddd;padding:5px;text-align:left;overflow-x:hidden;overflow-y:auto}
 | 
			
		||||
.recom-rbox .tck{float:left;height:30px;overflow:hidden;width:25px}
 | 
			
		||||
.recom-rbox .ttxt{float:left;height:30px;overflow:hidden;width:325px}
 | 
			
		||||
.recom-rbox .top{float:left;width:70px}
 | 
			
		||||
.recom-rbox .trow{height:30px;overflow:hidden;width:420px;line-height:30px}
 | 
			
		||||
.recom-rbox .s-sort{width:20px}
 | 
			
		||||
.wst-grid-tree-hd{background:#fff url("../img/header-bg.gif") repeat-x scroll left bottom;border-bottom:1px solid #ddd}
 | 
			
		||||
.wstmart-login-tips{border-bottom:1px solid #ddd;box-shadow:0 1px 3px #ddd;line-height:30px;padding-left:10px}
 | 
			
		||||
.wstmart-version-tips,.wstmart-accredit-tips{border-bottom:1px solid #ddd;box-shadow:0 1px 3px #ddd;display:none;background:url('../img/ico_5.png') no-repeat;font-weight:bold;height:25px;line-height:23px;padding-left:30px}
 | 
			
		||||
.wstmart-version-tips a,.wstmart-accredit-tips a{color:#e9754f}
 | 
			
		||||
.wstmart-version-tips a:hover,.wstmart-accredit-tips a:hover{color:#fe9c3d}
 | 
			
		||||
.wst-summary{margin:5px;border:1px solid #ddd;margin-bottom:20px;max-width:99%;width:99%;border-collapse:collapse;border-spacing:0}
 | 
			
		||||
.wst-summary .wst-summary-head{background:url("../img/img_seller_ggjt.png") no-repeat scroll 5px 7px;font-weight:bold;margin:5px;padding-left:28px}
 | 
			
		||||
.wst-summary tr:nth-child(2n){background:#f9f9f9}
 | 
			
		||||
.wst-summary td{padding:5px;vertical-align:middle;border:1px solid #ddd}
 | 
			
		||||
.wst-summary tr:hover{background:#f9f9f9}
 | 
			
		||||
.wst-desc-head{height:25px;line-height:25px;font-weight:bold;margin:5px 5px 2px 5px}
 | 
			
		||||
.wst-desc-body{height:20px;line-height:20px;margin-left:5px}
 | 
			
		||||
.wst-desc-body a{color:#000;text-decoration:none}
 | 
			
		||||
.tbr-m{padding:0 5px 0 5px;height:30px;line-height:30px}
 | 
			
		||||
.wst-views{float:left;width:26%;height:60%}
 | 
			
		||||
.wst-views .reveal{margin:0 auto;width:68%;height:100%;border:1px solid #e7e7eb;position:relative}
 | 
			
		||||
.wst-views .revealt{position:absolute;left:0;top:0;width:100%;height:65px;background:url(../img/img_topinfo.png) 0 0 no-repeat;background-size:100%}
 | 
			
		||||
.wst-views .revealb{position:absolute;left:0;bottom:0;width:100%;height:46px;border-top:1px solid #e7e7eb}
 | 
			
		||||
.wst-views .revealb i{float:left;width:15%;height:46px;background:url(../img/img_dibu.png) -5px -10px no-repeat}
 | 
			
		||||
.wst-views .ui{float:right;width:85%;height:46px;display:-webkit-box}
 | 
			
		||||
.wst-views .li{-webkit-box-flex:1;display:block;line-height:46px;text-align:center;border-left:1px solid #e7e7eb;cursor:pointer;position:relative}
 | 
			
		||||
.wst-views .li:hover,.wst-views .li .list:hover{background:#eee}
 | 
			
		||||
.wst-views .selected{background:#eee}
 | 
			
		||||
.wst-views .li .lis{position:absolute;left:0;bottom:46px;width:100%;border:1px solid #e7e7eb}
 | 
			
		||||
.wst-views .li .list{float:left;width:100%;border-bottom:1px solid #e7e7eb}
 | 
			
		||||
.wst-maingr{float:right;width:72%}
 | 
			
		||||
.wst-view{float:left;width:200px;height:200px;background:#eee}
 | 
			
		||||
.wst-view a{display:block;height:200px;line-height:200px;text-decoration:none;text-align:center;color:#3295d3}
 | 
			
		||||
.wst-view a:hover{color:#56b7f5}
 | 
			
		||||
.style-main{padding:10px}
 | 
			
		||||
.style-box{width:200px;height:300px;border:1px solid #ddd;padding:5px;margin:5px;float:left}
 | 
			
		||||
.style-box .style-img{width:200px;height:200px;text-align:center;vertical-align:middle;display:block;position:relative}
 | 
			
		||||
.style-box .style-img a{display:table-cell;vertical-align:middle;width:200px;height:200px;border:1px solid #ddd}
 | 
			
		||||
.style-box .style-img a img{max-width:200px;max-height:200px}
 | 
			
		||||
.style-box .style-txt,.style-box .style-author,.style-box .style-web{width:200px;height:25px;overflow:hidden;text-align:left;line-height:25px}
 | 
			
		||||
.style-box .style-op{height:30px;text-align:center;overflow:hidden}
 | 
			
		||||
.nav li a,.nav li a:hover,.nav-list li a,.nav-list li a:hover{display:block;text-decoration:none;outline:0;border-bottom:0 none}
 | 
			
		||||
.nav li{float:left}
 | 
			
		||||
.tab-wrap{margin-top:10px}
 | 
			
		||||
.tab-nav{margin-bottom:15px;padding-left:1px;border-bottom:1px solid #e0e0e0}
 | 
			
		||||
.tab-nav li{margin-bottom:-1px;margin-left:-1px}
 | 
			
		||||
.tab-nav li a,.tab-nav li a:hover{padding:0 20px;height:35px;line-height:35px;font-weight:bold;font-size:16px;border:1px solid transparent;border-top-width:2px}
 | 
			
		||||
.tab-nav .current a,.tab-nav .current a:hover{border-color:#34b4e0 #e0e0e0 #f6f6f6}
 | 
			
		||||
.tab-content .tab-pane{display:none}
 | 
			
		||||
.tab-content .in{display:block}
 | 
			
		||||
.label{border-radius:.25em;color:#fff;display:inline;font-weight:700;line-height:1;padding:.2em .6em .3em;text-align:center;vertical-align:baseline;white-space:nowrap}
 | 
			
		||||
a.label:hover,a.label:focus{color:#fff;cursor:pointer;text-decoration:none}a{text-decoration:none}
 | 
			
		||||
.label:empty{display:none}
 | 
			
		||||
.label-default{background-color:#777}
 | 
			
		||||
.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}
 | 
			
		||||
.label-primary{background-color:#428bca}
 | 
			
		||||
.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}
 | 
			
		||||
.label-success{background-color:#5cb85c}
 | 
			
		||||
.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}
 | 
			
		||||
.label-info{background-color:#5bc0de}
 | 
			
		||||
.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}
 | 
			
		||||
.label-warning{background-color:#f0ad4e}
 | 
			
		||||
.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}
 | 
			
		||||
.label-danger{background-color:#d9534f}
 | 
			
		||||
.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}
 | 
			
		||||
.label-gray{background-color:#e6e6e6}
 | 
			
		||||
.label-gray[href]:hover,.label-danger[href]:focus{background-color:#eee}
 | 
			
		||||
.line-break{word-break:break-all;word-wrap:break-word}
 | 
			
		||||
.order-source{margin:0 5px 0 0;width:18px;height:18px;position:relative;top:5px}
 | 
			
		||||
.order-source2{margin:0 5px 0 0;width:16px;height:16px;position:relative;top:5px}
 | 
			
		||||
 | 
			
		||||
.wst-tips-box{height: auto;line-height:25px;-moz-border-radius: 5px; -webkit-border-radius: 5px; color:red;border:1px dotted #F0A869;background:#FFFFCC;padding:5px 5px 5px 15px;margin-left:10px;margin-bottom: 5px;margin-top:10px;}
 | 
			
		||||
.wst-tips-box .icon{width:20px;height: 20px;float:left;background: url('../img/icon_tstb.png') no-repeat;background-size: 100%}
 | 
			
		||||
.wst-tips-box .tips{float: left;padding-left: 5px;}
 | 
			
		||||
.line-break{word-break:break-all;word-wrap:break-word;}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/css/tip-yellowsimple_arrows.gif
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 87 B  | 
							
								
								
									
										241
									
								
								hyhproject/admin/view/datas/datas.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,241 @@
 | 
			
		||||
var zTree,mmg,rMenu,diff = 0;
 | 
			
		||||
function layout(){
 | 
			
		||||
	var h = WST.pageHeight();
 | 
			
		||||
	var w = WST.pageWidth();
 | 
			
		||||
	$('.j-layout').width(w-10);
 | 
			
		||||
	$('.j-layout-left').width(200).height(h-98);
 | 
			
		||||
	$('.j-layout-center').width(w-220).height(h-98);
 | 
			
		||||
	$('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
		 diff = v?98:53;
 | 
			
		||||
		 $('.j-layout-left').height(h-diff);
 | 
			
		||||
		 $('#menuTree').height(h-diff-40);
 | 
			
		||||
		 $('.j-layout-center').height(h-diff);
 | 
			
		||||
		 if(mmg)mmg.resize({height:h-diff-110});
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function initGrid(id){
 | 
			
		||||
	var h = WST.pageHeight();
 | 
			
		||||
	var cols = [
 | 
			
		||||
            {title:'数据名称', name:'dataName', width: 100},
 | 
			
		||||
            {title:'数据值', name:'dataVal'  ,width:100},
 | 
			
		||||
            {title:'排序号', name:'dataSort' ,width:10},
 | 
			
		||||
            {title:'操作', name:'' ,width:60, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
			    if(WST.GRANT.SJGL_02)h += "<a  class='btn btn-blue' onclick='javascript:getForEdit(" + item['id'] + ")'><i class='fa fa-pencil'></i>编辑</a> ";
 | 
			
		||||
			    if(WST.GRANT.SJGL_03)h += "<a  class='btn btn-red' onclick='javascript:toDel(" + item['id'] + ","+item['catId']+")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (diff==0)?(h-205):(h-diff-110),cols: cols,method:'POST',indexCol: true,
 | 
			
		||||
        url: WST.U("admin/datas/childQuery"), fullWidthRows: true, autoLoad: false,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
    mmg.load({id:id});  
 | 
			
		||||
    $('#m_add').click(function(){
 | 
			
		||||
		treeNode = zTree.getSelectedNodes()[0];
 | 
			
		||||
        editMenu({menuId:0,menuName:'',parentId:treeNode.id,pnode:treeNode,menuSort:0});
 | 
			
		||||
	});
 | 
			
		||||
	$('#m_edit').click(function(){
 | 
			
		||||
		treeNode = zTree.getSelectedNodes()[0];
 | 
			
		||||
        getForEditMenu(treeNode.id);
 | 
			
		||||
        return false;
 | 
			
		||||
	});
 | 
			
		||||
	$('#m_del').click(function(){
 | 
			
		||||
		treeNode = zTree.getSelectedNodes()[0];
 | 
			
		||||
                  	layer.confirm('您确定要删除该菜单['+treeNode.name+']吗?', {btn: ['确定','取消']}, function(){
 | 
			
		||||
                  	    var loading = WST.msg('正在提交请求,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
                  	    $.post(WST.U('admin/datacats/del'),{id:treeNode.id},function(data,textStatus){
 | 
			
		||||
                  		     layer.close(loading);
 | 
			
		||||
                  		     var json = WST.toAdminJson(data);
 | 
			
		||||
                  		     if(json.status=='1'){
 | 
			
		||||
                  		          WST.msg("操作成功",{icon:1});
 | 
			
		||||
                  		          zTree.reAsyncChildNodes(treeNode.getParentNode(), "refresh",true);
 | 
			
		||||
                  		     }else{
 | 
			
		||||
                  		          WST.msg(json.msg,{icon:2});
 | 
			
		||||
                  		     }
 | 
			
		||||
                  		 });
 | 
			
		||||
                      });
 | 
			
		||||
        return false;
 | 
			
		||||
	});
 | 
			
		||||
	isInit = true;
 | 
			
		||||
}
 | 
			
		||||
var isInit = false;
 | 
			
		||||
$(window).resize(function(){layout();});
 | 
			
		||||
$(function(){
 | 
			
		||||
	layout();
 | 
			
		||||
	$('#menuTree').height(WST.pageHeight()-95);
 | 
			
		||||
	var setting = {
 | 
			
		||||
	      view: {
 | 
			
		||||
	           selectedMulti: false,
 | 
			
		||||
	           dblClickExpand:false
 | 
			
		||||
	      },
 | 
			
		||||
	      async: {
 | 
			
		||||
	           enable: true,
 | 
			
		||||
	           url:WST.U('admin/datacats/listQuery'),
 | 
			
		||||
	           autoParam:["id", "name=n", "level=lv"]
 | 
			
		||||
	      },
 | 
			
		||||
	      callback:{
 | 
			
		||||
	           onRightClick: onRightClick,
 | 
			
		||||
	           onClick: onClick,
 | 
			
		||||
	           onAsyncSuccess: onAsyncSuccess
 | 
			
		||||
	      }
 | 
			
		||||
	};
 | 
			
		||||
	$.fn.zTree.init($("#menuTree"), setting);
 | 
			
		||||
	zTree = $.fn.zTree.getZTreeObj("menuTree");
 | 
			
		||||
	rMenu = $("#rMenu");
 | 
			
		||||
});
 | 
			
		||||
function loadGrid(id){
 | 
			
		||||
    mmg.load({id:id,page:1});       
 | 
			
		||||
}
 | 
			
		||||
function onAsyncSuccess(event, treeId, treeNode, msg){
 | 
			
		||||
	var json = WST.toAdminJson(msg);
 | 
			
		||||
	if(json && json.id==0){
 | 
			
		||||
		var treeNode = zTree.getNodeByTId('menuTree_1');
 | 
			
		||||
		zTree.reAsyncChildNodes(treeNode, "refresh",true);
 | 
			
		||||
		zTree.expandAll(treeNode,true);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function onClick(e,treeId, treeNode){
 | 
			
		||||
	if(treeNode.id>0){
 | 
			
		||||
	      $('.wst-toolbar').show();
 | 
			
		||||
	      $('#maingrid').show();
 | 
			
		||||
	}else{
 | 
			
		||||
	    $('.wst-toolbar').hide();
 | 
			
		||||
	    $('#maingrid').hide();
 | 
			
		||||
	}
 | 
			
		||||
	if(!isInit){
 | 
			
		||||
		initGrid(treeNode.id);
 | 
			
		||||
	}else{
 | 
			
		||||
        loadGrid(treeNode.id);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function onRightClick(event, treeId, treeNode) {
 | 
			
		||||
	if(!treeNode)return;
 | 
			
		||||
	if(!WST.GRANT.CDGL_01 && !WST.GRANT.CDGL_02 && !WST.GRANT.CDGL_03)return;
 | 
			
		||||
	if(!treeNode && event.target.tagName.toLowerCase() != "button" && $(event.target).parents("a").length == 0) {
 | 
			
		||||
		zTree.cancelSelectedNode();
 | 
			
		||||
		showRMenu("root", event.clientX, event.clientY);
 | 
			
		||||
	}else if(treeNode && !treeNode.noR) {
 | 
			
		||||
		zTree.selectNode(treeNode);
 | 
			
		||||
		showRMenu("node", event.clientX, event.clientY);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function showRMenu(type, x, y) {
 | 
			
		||||
	$("#rMenu ul").show();
 | 
			
		||||
    y += document.body.scrollTop;
 | 
			
		||||
    x += document.body.scrollLeft;
 | 
			
		||||
    rMenu.css({"top":y+"px", "left":x+"px", "visibility":"visible"});
 | 
			
		||||
	$("body").bind("mousedown", onBodyMouseDown);
 | 
			
		||||
}
 | 
			
		||||
function hideRMenu() {
 | 
			
		||||
	if (rMenu) rMenu.css({"visibility": "hidden"});
 | 
			
		||||
	$("body").unbind("mousedown", onBodyMouseDown);
 | 
			
		||||
}
 | 
			
		||||
function onBodyMouseDown(event){
 | 
			
		||||
	if (!(event.target.id == "rMenu" || $(event.target).parents("#rMenu").length>0)) {
 | 
			
		||||
		rMenu.css({"visibility" : "hidden"});
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function getForEditMenu(id){
 | 
			
		||||
	 var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    $.post(WST.U('admin/datacats/get'),{id:id},function(data,textStatus){
 | 
			
		||||
          layer.close(loading);
 | 
			
		||||
          var json = WST.toAdminJson(data);
 | 
			
		||||
          if(json.catId){
 | 
			
		||||
          	  editMenu(json);
 | 
			
		||||
          }else{
 | 
			
		||||
          	  WST.msg(json.msg,{icon:2});
 | 
			
		||||
          }
 | 
			
		||||
   });
 | 
			
		||||
}	                    		
 | 
			
		||||
function editMenu(obj){
 | 
			
		||||
	WST.setValues(obj);
 | 
			
		||||
	var box = WST.open({ title:(obj.catId==0)?'新增数据分类':"编辑数据分类",type: 1,area: ['430px', '190px'],
 | 
			
		||||
	                content:$('#menuBox'),
 | 
			
		||||
	                btn:['确定','取消'],
 | 
			
		||||
	                end:function(){$('#menuBox').hide();},
 | 
			
		||||
	                yes: function(index, layero){
 | 
			
		||||
	                	if(!$('#catName').isValid())return;
 | 
			
		||||
	                	if(!$('#catCode').isValid())return;
 | 
			
		||||
		                var params = WST.getParams('.ipt2');
 | 
			
		||||
		                params.catId = obj.catId;
 | 
			
		||||
		                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
		                $.post(WST.U('admin/datacats/'+((params.catId)?"edit":"add")),params,function(data,textStatus){
 | 
			
		||||
		                	layer.close(loading);
 | 
			
		||||
		                	var json = WST.toAdminJson(data);
 | 
			
		||||
		                	if(json.status=='1'){
 | 
			
		||||
		                	    WST.msg("操作成功",{icon:1});
 | 
			
		||||
		                		layer.close(box);
 | 
			
		||||
		                	    $('#menuForm')[0].reset();
 | 
			
		||||
		                		treeNode = zTree.getNodeByTId('menuTree_1');
 | 
			
		||||
		                		zTree.reAsyncChildNodes(treeNode, "refresh",true);
 | 
			
		||||
		                	}else{
 | 
			
		||||
		                		WST.msg(json.msg,{icon:2});
 | 
			
		||||
		                	}
 | 
			
		||||
		                });
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getForEdit(id){
 | 
			
		||||
	 var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
     $.post(WST.U('admin/datas/get'),{id:id},function(data,textStatus){
 | 
			
		||||
           layer.close(loading);
 | 
			
		||||
           var json = WST.toAdminJson(data);
 | 
			
		||||
           if(json.id){
 | 
			
		||||
           		WST.setValues(json);
 | 
			
		||||
           		toEdit(json.id);
 | 
			
		||||
           }else{
 | 
			
		||||
           		WST.msg(json.msg,{icon:2});
 | 
			
		||||
           }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
	var title = "新增数据";
 | 
			
		||||
	if(id>0){
 | 
			
		||||
		title = "编辑数据";
 | 
			
		||||
	}else{
 | 
			
		||||
		$('#dataForm')[0].reset();
 | 
			
		||||
	}
 | 
			
		||||
	var box = WST.open({title:title,type:1,content:$('#dataBox'),area: ['450px', '240px'],btn:['确定','取消'],
 | 
			
		||||
               end:function(){$('#dataBox').hide();},
 | 
			
		||||
		       yes:function(){
 | 
			
		||||
		            if(!$('#dataName').isValid())return;
 | 
			
		||||
		            if(!$('#dataVal').isValid())return;
 | 
			
		||||
	                var params = WST.getParams('.ipt');
 | 
			
		||||
	                params.catId = zTree.getSelectedNodes()[0].id;
 | 
			
		||||
	                params.id = id;
 | 
			
		||||
	                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           		$.post(WST.U('admin/datas/'+((id==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg("操作成功",{icon:1});
 | 
			
		||||
	           			    	$('#dataForm')[0].reset();
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           		            loadGrid(params.catId);
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	          }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toDel(id,pid){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该数据吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/datas/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);
 | 
			
		||||
	           		            loadGrid(pid);
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										77
									
								
								hyhproject/admin/view/datas/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,77 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link href="__ADMIN__/js/ztree/css/zTreeStyle/zTreeStyle.css?v={$v}" rel="stylesheet" type="text/css" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/ztree/jquery.ztree.all-3.5.js?v={$v}"></script>
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/datas/datas.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>本功能主要提供系统基础数据元的管理功能,开发者可以在此配置系统的基础选项值。</li>
 | 
			
		||||
    <li>该功能为开发者功能,普通使用者请勿随意修改,以免影响系统使用。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="j-layout">
 | 
			
		||||
    <div class='j-layout-left'>
 | 
			
		||||
        <div class='j-layout-panel layui-colla-title'>数据分类管理</div>
 | 
			
		||||
        <ul id="menuTree" class="ztree" style='overflow:auto'></ul>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class='j-layout-center' style='border:1px solid #ccc;float:left;margin-left:5px;'>
 | 
			
		||||
      <div class='j-layout-panel layui-colla-title'>数据管理</div>
 | 
			
		||||
      {if WSTGrant('SJGL_01')}
 | 
			
		||||
      <div class="wst-toolbar" style='display:none'>
 | 
			
		||||
          <button class="btn btn-success f-right" onclick='javascript:toEdit(0)'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
          <div style='clear:both'></div>
 | 
			
		||||
      </div>
 | 
			
		||||
      {/if}
 | 
			
		||||
      <div id="maingrid"  style='display:none'>
 | 
			
		||||
        <div id="mmg" class="mmg"></div>
 | 
			
		||||
        <div id="pg" style="text-align: right;"></div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='menuBox' style='display:none'>
 | 
			
		||||
<form id='menuForm'>
 | 
			
		||||
  <table class='wst-form wst-box-top'>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>数据分类名称<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='catName' class='ipt2' data-rule="数据分类名称: required;"/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>数据分类代码<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='catCode' class='ipt2' data-rule="数据分类代码: required;"  /></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
  </table>
 | 
			
		||||
</form>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='dataBox' style='display:none'>
 | 
			
		||||
  <form id='dataForm' autocomplete='off'>
 | 
			
		||||
  <table class='wst-form wst-box-top'>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>数据名称<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='dataName' class='ipt' data-rule="数据名称: required;"/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th>数据值<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='dataVal' class='ipt' data-rule="数据值: required;"/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th>排序号<font color='red'> </font>:</th>
 | 
			
		||||
        <td><input onkeypress='return WST.isNumberKey(event);' onkeyup="javascript:WST.isChinese(this,1)" type='text' id='dataSort' class='ipt' /></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
  </table>
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
<div id="rMenu">
 | 
			
		||||
  <ul>
 | 
			
		||||
    {if WSTGrant('SJFL_01')}<li id="m_add" >新增分类</li>{/if}
 | 
			
		||||
    {if WSTGrant('SJFL_02')}<li id="m_edit">编辑分类</li>{/if}
 | 
			
		||||
    {if WSTGrant('SJFL_03')}<li id="m_del" style='border-bottom:0px;'>删除分类</li>{/if}
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										54
									
								
								hyhproject/admin/view/ectday/ectday.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,54 @@
 | 
			
		||||
{if !empty($object)}
 | 
			
		||||
<form id='editFrom'>
 | 
			
		||||
<table class='wst-form'>
 | 
			
		||||
 <tr>
 | 
			
		||||
    <td colspan='2' class='head-ititle'>订单信息</td>
 | 
			
		||||
  </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
      <th width='100'>订单编号:</th>
 | 
			
		||||
      <td>{$object['transactionId']}</td>
 | 
			
		||||
   </tr>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <th>用户名称:</th>
 | 
			
		||||
     <td>¥{$object['loginName']}</td>
 | 
			
		||||
  </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>ECT发送方:</th>
 | 
			
		||||
        <td>{$object['fromAccount']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>ECT接收方:</th>
 | 
			
		||||
        <td>{$object['toAccount']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>备注:</th>
 | 
			
		||||
        <td>{$object['dataRemarks']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>ECT数量:</th>
 | 
			
		||||
        <td>{$object['ectNum']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>创建时间:</th>
 | 
			
		||||
        <td>{$object['createTime']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th width='120'>管理员意见:</th>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label><input type='radio' {if $object['status']==1} checked{/if} onclick='WST.showHide(0,"#tr")' name='status' id='refundStatus1' value='1'/>同意</label>
 | 
			
		||||
            <label style='margin-left:15px;'><input type='radio' {if $object['status']==2} checked{/if} onclick='WST.showHide(1,"#tr")' name='status' id='refundStatus0' value='2'/>不同意</label>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <td colspan='2' style='text-align:center;padding-top:30px;'>
 | 
			
		||||
     	<button type="button" class="btn btn-primary btn-mright" onclick="javascript:toEcttarget({$object['id']})"><i class="fa fa-check"></i>确  定</button>
 | 
			
		||||
     	<button type="button" class="btn" onclick='javascript:layer.close(w)'><i class="fa fa-angle-double-left"></i>取  消</button>
 | 
			
		||||
     </td>
 | 
			
		||||
  </tr>
 | 
			
		||||
</table>
 | 
			
		||||
</form>
 | 
			
		||||
{else}
 | 
			
		||||
<div style='color:red;margin:20px;'>
 | 
			
		||||
该订单不存在或已退款。
 | 
			
		||||
</div>
 | 
			
		||||
{/if}
 | 
			
		||||
							
								
								
									
										87
									
								
								hyhproject/admin/view/ectday/ectday.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,87 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
$(function(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'会员名称', name:'loginName' ,width:100,sortable: true},
 | 
			
		||||
            {title:'ECT返还数量', name:'ectNum' ,width:40,sortable: true, renderer:function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+val;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'交易时间', name:'giveTime' ,width:60,sortable: true,renderer:function(val,item,rowIndex){
 | 
			
		||||
                var today=new Date(parseInt(item['giveTime'])*1000);
 | 
			
		||||
                var y=today.getFullYear();
 | 
			
		||||
                var m=today.getMonth()+1;
 | 
			
		||||
                var d=today.getDate();
 | 
			
		||||
                var h=today.getHours();
 | 
			
		||||
                var i=today.getMinutes();
 | 
			
		||||
                var s=today.getSeconds();
 | 
			
		||||
                return (y+"-"+m+"-"+d+" "+h+":"+i+":"+s);
 | 
			
		||||
            }},
 | 
			
		||||
            ];
 | 
			
		||||
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-173,indexCol: true,indexColWidth:50, cols: cols,method:'POST',nowrap:true,
 | 
			
		||||
        url: WST.U('admin/ectday/pageQuery'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'createTime',sortStatus:'desc',
 | 
			
		||||
        remoteSort:true ,
 | 
			
		||||
        sortName: 'ectNo',
 | 
			
		||||
        sortStatus: 'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         var diff = v?173:128;
 | 
			
		||||
         mmg.resize({height:h-diff})
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
    var p = WST.getParams('.j-ipt');
 | 
			
		||||
    p.page = 1;
 | 
			
		||||
    mmg.load(p);
 | 
			
		||||
}
 | 
			
		||||
function toView(loginName){
 | 
			
		||||
    location.href=WST.U('admin/ectdeal/index','loginName='+loginName);
 | 
			
		||||
}
 | 
			
		||||
function toExport(){
 | 
			
		||||
    var params = {};
 | 
			
		||||
    params = WST.getParams('.j-ipt');
 | 
			
		||||
    var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        location.href=WST.U('admin/ectday/toExport',params);
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function toHandle(id){
 | 
			
		||||
    var ll = WST.msg('正在加载信息,请稍候...');
 | 
			
		||||
    $.post(WST.U('admin/ectday/toHandle',{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', '380px']});
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
function toEcttarget(id){
 | 
			
		||||
    $('#editFrom').isValid(function(v){
 | 
			
		||||
        if(v){
 | 
			
		||||
            var params = {};
 | 
			
		||||
            params.status = $('#refundStatus1')[0].checked?1:2;
 | 
			
		||||
            params.id = id;
 | 
			
		||||
            ll = WST.msg('正在加载信息,请稍候...');
 | 
			
		||||
            $.post(WST.U('admin/ectday/ectTarget'),params,function(data){
 | 
			
		||||
                layer.close(ll);
 | 
			
		||||
                var json = WST.toAdminJson(data);
 | 
			
		||||
                if(json.status==1){
 | 
			
		||||
                    WST.msg(json.msg, {icon: 1});
 | 
			
		||||
                    loadGrid();
 | 
			
		||||
                    layer.close(w);
 | 
			
		||||
                }else{
 | 
			
		||||
                    WST.msg(json.msg, {icon: 2});
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										39
									
								
								hyhproject/admin/view/ectday/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,39 @@
 | 
			
		||||
{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__/ectday/ectday.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>本功能主要用于处理来自于会员(商家)的提现请求。提现通过后系统会扣除会员(商家)的钱包金额。</li>
 | 
			
		||||
    <li>本功能只扣除本系统的会员(商家)钱包金额,实际上的资金转账需平台线下操作。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
    <input type="text" id="startDate" name="startDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='开始日期'/>
 | 
			
		||||
    至
 | 
			
		||||
    <input type="text" id="endDate" name="endDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='结束日期'/>
 | 
			
		||||
    <input type="text" name="loginName"  placeholder='用户名称' id="loginName" class='j-ipt' value="{$Request.param.loginName}"/>
 | 
			
		||||
    <button class="btn btn-primary" id="search" onclick='javascript:loadGrid(0)'><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
    <button class="btn btn-primary f-right btn-fixtop" onclick='javascript:history.back()'><i class="fa fa-sign-in"></i>返回</button>
 | 
			
		||||
    <!--<button class="btn btn-primary f-right btn-fixtop" onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></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>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
	initGrid();
 | 
			
		||||
    if($("#loginName").val()!=""){
 | 
			
		||||
        $("#search").click();
 | 
			
		||||
    }
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										94
									
								
								hyhproject/admin/view/ectdeal/ectdeal.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,94 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
$(function(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'ECT交易ID', name:'ectId', width: 100,sortable: true},
 | 
			
		||||
            {title:'会员名称', name:'loginName' ,width:100,sortable: true},
 | 
			
		||||
            {title:'ECT获取方式', name:'dataSrc' ,width:60,sortable: true,renderer:function(val,item,rowIndex){
 | 
			
		||||
              if(item['dataSrc']=="1"){
 | 
			
		||||
                return '注册';
 | 
			
		||||
              }else if(item['dataSrc']=="2"){
 | 
			
		||||
                return "推荐";
 | 
			
		||||
              }else if(item['dataSrc']=="3"){
 | 
			
		||||
                return "交易";
 | 
			
		||||
              }else if(item['dataSrc']=="4"){
 | 
			
		||||
                return "提现";
 | 
			
		||||
              }else if(item['dataSrc']=="5"){
 | 
			
		||||
                return "联盟积分转换";
 | 
			
		||||
              }else if(item['dataSrc']=="6"){
 | 
			
		||||
                return "成为商家";
 | 
			
		||||
              }else if(item['dataSrc']=="7"){
 | 
			
		||||
                return "推荐成为商家";
 | 
			
		||||
              }else if(item['dataSrc']=="8"){
 | 
			
		||||
                return "成为线上商城商家";
 | 
			
		||||
              }else if(item['dataSrc']=="9"){
 | 
			
		||||
                  return "推荐成为线上商城商家";
 | 
			
		||||
              }else if(item['dataSrc']=="10"){
 | 
			
		||||
                  return "";
 | 
			
		||||
              }else if(item['dataSrc']=="11"){
 | 
			
		||||
                  return "购物";
 | 
			
		||||
              }else if(item['dataSrc']=="12"){
 | 
			
		||||
                  return "结算";
 | 
			
		||||
              }else if(item['dataSrc']=="13"){
 | 
			
		||||
                  return "退款";
 | 
			
		||||
              }else if(item['dataSrc']=="14"){
 | 
			
		||||
                  return "充值";
 | 
			
		||||
              }else {
 | 
			
		||||
                return "";
 | 
			
		||||
              }
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'备注', name:'dataRemarks' ,width:40,sortable: true},
 | 
			
		||||
            {title:'ECT变动数量', name:'ectNum' ,width:40,sortable: true, renderer:function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+val;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'创建时间', name:'createTime' ,width:40,sortable: true,renderer:function(val,item,rowIndex){
 | 
			
		||||
                var today=new Date(parseInt(item['createTime'])*1000);
 | 
			
		||||
                var y=today.getFullYear(); 
 | 
			
		||||
                var m=today.getMonth()+1; 
 | 
			
		||||
                var d=today.getDate(); 
 | 
			
		||||
                var h=today.getHours(); 
 | 
			
		||||
                var i=today.getMinutes(); 
 | 
			
		||||
                var s=today.getSeconds();
 | 
			
		||||
                return (y+"-"+m+"-"+d+" "+h+":"+i+":"+s);
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-173,indexCol: true,indexColWidth:50, cols: cols,method:'POST',nowrap:true,
 | 
			
		||||
        url: WST.U('admin/ectdeal/pageQuery'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'createTime',sortStatus:'desc',
 | 
			
		||||
        remoteSort:true ,
 | 
			
		||||
        sortName: 'ectNo',
 | 
			
		||||
        sortStatus: 'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         var diff = v?173:128;
 | 
			
		||||
         mmg.resize({height:h-diff})
 | 
			
		||||
    }}); 
 | 
			
		||||
     mmg.on('loadSuccess',function(e,data){
 | 
			
		||||
      if(data.items[0].sumEct!=undefined){
 | 
			
		||||
        $('#sunNum').text(data.items[0].sumEct);
 | 
			
		||||
      }
 | 
			
		||||
      if(data.items[0].sumCashEct!=undefined){
 | 
			
		||||
        $('#sumCashEct').text(data.items[0].sumCashEct);
 | 
			
		||||
      }
 | 
			
		||||
      if(data.items[0].sumCashChong!=undefined){
 | 
			
		||||
        $('#sumCashChong').text(data.items[0].sumCashChong);
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
    var p = WST.getParams('.j-ipt');
 | 
			
		||||
    p.page = 1;
 | 
			
		||||
    mmg.load(p);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										43
									
								
								hyhproject/admin/view/ectdeal/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,43 @@
 | 
			
		||||
{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__/ectdeal/ectdeal.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>本功能主要用于查看会员以及商户获取ECT途径</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
    <input type="text" id="startDate" name="startDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='开始日期'/>
 | 
			
		||||
    至
 | 
			
		||||
    <input type="text" id="endDate" name="endDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='结束日期'/>
 | 
			
		||||
 | 
			
		||||
    <input type="text" name="loginName"  placeholder='会员名称' id="loginName" class='j-ipt' value="{$Request.param.loginName}"/>
 | 
			
		||||
    <button class="btn btn-primary" id="search" onclick='javascript:loadGrid(0)'><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
    <span  style="font-size: 14px;margin-left: 50px;">ect结算总金额: <span id="sunNum"></span></span>
 | 
			
		||||
    <span  style="font-size: 14px;margin-left: 50px;">ect提现总金额: <span id="sumCashEct"></span></span>
 | 
			
		||||
    <span  style="font-size: 14px;margin-left: 50px;">ect充值总金额: <span id="sumCashChong"></span></span>
 | 
			
		||||
     <button class="btn btn-primary f-right btn-fixtop" onclick='javascript:history.back()'><i class="fa fa-sign-in"></i>返回</button>
 | 
			
		||||
 | 
			
		||||
    <!-- <button class="btn btn-primary f-right btn-fixtop" onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></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>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
	initGrid();
 | 
			
		||||
    if($('#loginName').val()!=''){
 | 
			
		||||
        $('#search').click();
 | 
			
		||||
    }
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										54
									
								
								hyhproject/admin/view/ecttarget/ecttarget.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,54 @@
 | 
			
		||||
{if !empty($object)}
 | 
			
		||||
<form id='editFrom'>
 | 
			
		||||
<table class='wst-form'>
 | 
			
		||||
 <tr>
 | 
			
		||||
    <td colspan='2' class='head-ititle'>订单信息</td>
 | 
			
		||||
  </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
      <th width='100'>订单编号:</th>
 | 
			
		||||
      <td>{$object['transactionId']}</td>
 | 
			
		||||
   </tr>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <th>用户名称:</th>
 | 
			
		||||
     <td>¥{$object['loginName']}</td>
 | 
			
		||||
  </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>ECT发送方:</th>
 | 
			
		||||
        <td>{$object['fromAccount']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>ECT接收方:</th>
 | 
			
		||||
        <td>{$object['toAccount']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>备注:</th>
 | 
			
		||||
        <td>{$object['dataRemarks']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>ECT数量:</th>
 | 
			
		||||
        <td>{$object['ectNum']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th>创建时间:</th>
 | 
			
		||||
        <td>{$object['createTime']}</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <th width='120'>管理员意见:</th>
 | 
			
		||||
        <td>
 | 
			
		||||
            <label><input type='radio' {if $object['status']==1} checked{/if} onclick='WST.showHide(0,"#tr")' name='status' id='refundStatus1' value='1'/>同意</label>
 | 
			
		||||
            <label style='margin-left:15px;'><input type='radio' {if $object['status']==2} checked{/if} onclick='WST.showHide(1,"#tr")' name='status' id='refundStatus0' value='2'/>不同意</label>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
  <tr>
 | 
			
		||||
     <td colspan='2' style='text-align:center;padding-top:30px;'>
 | 
			
		||||
     	<button type="button" class="btn btn-primary btn-mright" onclick="javascript:toEcttarget({$object['id']})"><i class="fa fa-check"></i>确  定</button>
 | 
			
		||||
     	<button type="button" class="btn" onclick='javascript:layer.close(w)'><i class="fa fa-angle-double-left"></i>取  消</button>
 | 
			
		||||
     </td>
 | 
			
		||||
  </tr>
 | 
			
		||||
</table>
 | 
			
		||||
</form>
 | 
			
		||||
{else}
 | 
			
		||||
<div style='color:red;margin:20px;'>
 | 
			
		||||
该订单不存在或已退款。
 | 
			
		||||
</div>
 | 
			
		||||
{/if}
 | 
			
		||||
							
								
								
									
										150
									
								
								hyhproject/admin/view/ecttarget/ecttarget.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,150 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
$(function(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'ECT交易ID', name:'transactionId', width: 100,sortable: true},
 | 
			
		||||
            {title:'会员名称', name:'loginName' ,width:100,sortable: true},
 | 
			
		||||
            {title:'ECT发送方', name:'fromAccount' ,width:60,sortable: true},
 | 
			
		||||
            {title:'ECT接收方', name:'toAccount' ,width:40,sortable: true},
 | 
			
		||||
            {title:'备注', name:'dataRemarks' ,width:40,sortable: true},
 | 
			
		||||
            {title:'ECT提现数量', name:'ectNum' ,width:40,sortable: true, renderer:function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+val;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'创建时间', name:'createTime' ,width:60,sortable: true,renderer:function(val,item,rowIndex){
 | 
			
		||||
                var today=new Date(parseInt(item['createTime'])*1000);
 | 
			
		||||
                var y=today.getFullYear();
 | 
			
		||||
                var m=today.getMonth()+1;
 | 
			
		||||
                var d=today.getDate();
 | 
			
		||||
                var h=today.getHours();
 | 
			
		||||
                var i=today.getMinutes();
 | 
			
		||||
                var s=today.getSeconds();
 | 
			
		||||
                return (y+"-"+m+"-"+d+" "+h+"-"+i+"-"+s);
 | 
			
		||||
            }},
 | 
			
		||||
        {title:'状态', name:'status' ,width:50,renderer: function (val,item,rowIndex){
 | 
			
		||||
            if(item['status']==1){
 | 
			
		||||
                return "<span class='statu-yes'><i class='fa fa-check-circle'></i> 已同意</span>";
 | 
			
		||||
            }else if(item['status']==2){
 | 
			
		||||
                return "<span class='statu-no'><i class='fa fa-check-circle'></i> 未同意</span>";
 | 
			
		||||
            }else{
 | 
			
		||||
                return "<span class='statu-no'><i class='fa fa-ban'></i>未审核</span>";
 | 
			
		||||
            }
 | 
			
		||||
        }},
 | 
			
		||||
            {title:'操作', name:'op' ,width:180, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                h += '<a class="btn btn-blue" href="javascript:toView(\'' + item['loginName'] + '\');"><i class="fa fa-search"></i>查看记录</a> ';
 | 
			
		||||
                h += '<a class="btn btn-blue" href="javascript:toEctDay(\'' + item['loginName'] + '\');"><i class="fa fa-search"></i>查看返还</a> ';
 | 
			
		||||
                if(item['status']==0){
 | 
			
		||||
                    h += "<a class='btn btn-blue' href='javascript:toHandle(" + item['id'] + ")'><i class='fa fa-pencil'></i>处理</a> ";
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-173,indexCol: true,indexColWidth:50, cols: cols,method:'POST',nowrap:true,
 | 
			
		||||
        url: WST.U('admin/ecttarget/pageQuery'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'createTime',sortStatus:'desc',
 | 
			
		||||
        remoteSort:true ,
 | 
			
		||||
        sortName: 'ectNo',
 | 
			
		||||
        sortStatus: 'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         var diff = v?173:128;
 | 
			
		||||
         mmg.resize({height:h-diff})
 | 
			
		||||
    }});
 | 
			
		||||
    mmg.on('loadSuccess',function(e,data){
 | 
			
		||||
      if(data.items[0].sumEct!=undefined){
 | 
			
		||||
        $('#sunNum').text(data.items[0].sumEct);
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
    var p = WST.getParams('.j-ipt');
 | 
			
		||||
    p.page = 1;
 | 
			
		||||
    mmg.load(p);
 | 
			
		||||
}
 | 
			
		||||
function toView(loginName){
 | 
			
		||||
    location.href=WST.U('admin/ectdeal/index','loginName='+loginName);
 | 
			
		||||
}
 | 
			
		||||
function toEctDay(loginName){
 | 
			
		||||
    location.href=WST.U('admin/ectday/index','loginName='+loginName);
 | 
			
		||||
}
 | 
			
		||||
function toExport(){
 | 
			
		||||
    var params = {};
 | 
			
		||||
    params = WST.getParams('.j-ipt');
 | 
			
		||||
    var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        location.href=WST.U('admin/ecttarget/toExport',params);
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function toHandle(id){
 | 
			
		||||
    var ll = WST.msg('正在加载信息,请稍候...');
 | 
			
		||||
    $.post(WST.U('admin/ecttarget/toHandle',{id:id}),{},function(data){
 | 
			
		||||
        layer.close(ll);
 | 
			
		||||
        w =WST.open({type: 1,title:"ECT提现操作",shade: [0.6, '#000'],offset:'50px',border: [0],content:data,area: ['550px', '380px']});
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
var click =false;
 | 
			
		||||
function toEcttarget(id){
 | 
			
		||||
    if (click==true) return;
 | 
			
		||||
    $('#editFrom').isValid(function(v){
 | 
			
		||||
        if(v){
 | 
			
		||||
            var params = {};
 | 
			
		||||
            params.status = $('#refundStatus1')[0].checked?1:2;
 | 
			
		||||
            params.id = id;
 | 
			
		||||
            ll = WST.msg('正在加载信息,请稍候...');
 | 
			
		||||
            $.post(WST.U('admin/ecttarget/ectTarget'),params,function(data){
 | 
			
		||||
               
 | 
			
		||||
                var json = WST.toAdminJson(data);
 | 
			
		||||
                if(json.status==1){
 | 
			
		||||
                    if(params.status == 1){
 | 
			
		||||
                        $.ajax({
 | 
			
		||||
                            url: "http://moacapi.juzi199.com/api/ect/ect_transfer",
 | 
			
		||||
                            type: "POST",
 | 
			
		||||
                            data:{
 | 
			
		||||
                                'id':id
 | 
			
		||||
                            },
 | 
			
		||||
                            dataType: "jsonp", //指定服务器返回的数据类型
 | 
			
		||||
                            success: function (ect_data) {
 | 
			
		||||
                                var json = WST.toAdminJson(ect_data);
 | 
			
		||||
                                //console.log(json);
 | 
			
		||||
                                if(json.status==1){
 | 
			
		||||
                                    WST.msg(json.msg, {icon: 1});
 | 
			
		||||
                                }else{
 | 
			
		||||
                                    alert(json.msg);
 | 
			
		||||
                                }                                
 | 
			
		||||
                                click=true;
 | 
			
		||||
                                loadGrid();
 | 
			
		||||
                                layer.close(ll);
 | 
			
		||||
                                layer.close(w);
 | 
			
		||||
                            }
 | 
			
		||||
                         });
 | 
			
		||||
                    }else{                        
 | 
			
		||||
                        WST.msg('拒绝'+json.msg, {icon: 2});
 | 
			
		||||
                        loadGrid();
 | 
			
		||||
                        layer.close(w);
 | 
			
		||||
                        click=true;
 | 
			
		||||
                    }
 | 
			
		||||
                   
 | 
			
		||||
                    
 | 
			
		||||
                }else{
 | 
			
		||||
                   
 | 
			
		||||
                    WST.msg(json.msg, {icon: 2});
 | 
			
		||||
                    layer.close(w);
 | 
			
		||||
                    click=true;
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										37
									
								
								hyhproject/admin/view/ecttarget/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,37 @@
 | 
			
		||||
{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__/ecttarget/ecttarget.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>本功能主要用于处理来自于会员(商家)的提现请求。提现通过后系统会扣除会员(商家)的钱包金额。</li>
 | 
			
		||||
    <li>本功能只扣除本系统的会员(商家)钱包金额,实际上的资金转账需平台线下操作。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
    <input type="text" id="startDate" name="startDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='开始日期'/>
 | 
			
		||||
    至
 | 
			
		||||
    <input type="text" id="endDate" name="endDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='结束日期'/>
 | 
			
		||||
    <input type="text" name="ectNo"  placeholder='交易ID' id="ectNo" class='j-ipt'/>
 | 
			
		||||
    <input type="text" name="loginName"  placeholder='会员名称' id="loginName" class='j-ipt'/>
 | 
			
		||||
    <button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
    <!-- <span  style="font-size: 14px;margin-left: 50px;">ect提现总金额: <span id="sunNum"></span></span> -->
 | 
			
		||||
    <button class="btn btn-primary f-right btn-fixtop" onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></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>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
	initGrid();
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										35
									
								
								hyhproject/admin/view/enter_license.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,35 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/license.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
   </head>
 | 
			
		||||
   <body>
 | 
			
		||||
   <body>
 | 
			
		||||
       <form id='editFrom' name="editFrom" method="post" id="myform" autocomplete="off">
 | 
			
		||||
        <table class="wst-form" style='margin-top:30px;'>
 | 
			
		||||
           <tr>
 | 
			
		||||
             <th align='right'>授权域名 <font color='red'>*</font>:</th>
 | 
			
		||||
             <td>
 | 
			
		||||
             {:request()->root(true)}
 | 
			
		||||
             </td>
 | 
			
		||||
           </tr>
 | 
			
		||||
           <tr>
 | 
			
		||||
             <th align='right' width='150'>授权码 <font color='red'>*</font>:</th>
 | 
			
		||||
             <td>
 | 
			
		||||
             <input type='text' id='license' name='license' style='width:400px;' data-rule="授权码: required;"/>
 | 
			
		||||
             </td>
 | 
			
		||||
           </tr>
 | 
			
		||||
           <tr id='licenseTr' style='display:none'>
 | 
			
		||||
             <th align='right'>授权状态 :</th>
 | 
			
		||||
             <td id='licenseStatus' style='color:red;'></td>
 | 
			
		||||
           </tr>
 | 
			
		||||
           <tr>
 | 
			
		||||
             <td colspan='2' style='padding-left:250px;padding-top:15px;'>
 | 
			
		||||
                 <button type="button" class="btn btn-primary btn-mright" onclick='edit()'>提 交</button>
 | 
			
		||||
                 <button type="reset" class="btn">重 置</button>
 | 
			
		||||
             </td>
 | 
			
		||||
           </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
       </form>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										156
									
								
								hyhproject/admin/view/express/express.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,156 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(staffId){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
    		{title:'图标', name:'expressImg' ,width:50, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
               return '<img src="'+WST.conf.IMGURL+'/'+item['expressImg']+'" height="28px" />';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'快递名称', name:'expressName', width: 160},
 | 
			
		||||
            {title:'快递代码', name:'expressCode' ,width:60},
 | 
			
		||||
            {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
			    if(WST.GRANT.KDGL_02)h += "<a  class='btn btn-blue' onclick='javascript:getForEdit(" + item['expressId'] + ")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
			    if(WST.GRANT.KDGL_03)h += "<a  class='btn btn-red' onclick='javascript:toDel(" + item['expressId'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
			    return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-155),indexCol: true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/express/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
    $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
         if(v){
 | 
			
		||||
             mmg.resize({height:h-155});
 | 
			
		||||
         }else{
 | 
			
		||||
             mmg.resize({height:h-128});
 | 
			
		||||
         }
 | 
			
		||||
    }});      
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/express/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);
 | 
			
		||||
	           		            mmg.load();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getForEdit(id){
 | 
			
		||||
	 var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
     $.post(WST.U('admin/express/get'),{id:id},function(data,textStatus){
 | 
			
		||||
           layer.close(loading);
 | 
			
		||||
           var json = WST.toAdminJson(data);
 | 
			
		||||
           if(json.expressId){
 | 
			
		||||
           		WST.setValues(json);
 | 
			
		||||
           		//显示原来的图片
 | 
			
		||||
           		$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.expressImg+'" height="75px" />');
 | 
			
		||||
           		$('#isImg').val('ok');
 | 
			
		||||
           		toEdit(json.expressId);
 | 
			
		||||
           }else{
 | 
			
		||||
           		WST.msg(json.msg,{icon:2});
 | 
			
		||||
           }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
	if(!isInitUpload){
 | 
			
		||||
		initUpload();
 | 
			
		||||
	}
 | 
			
		||||
	var title = "新增";
 | 
			
		||||
	if(id>0){
 | 
			
		||||
		title = "编辑";
 | 
			
		||||
	}else{
 | 
			
		||||
		$('#expressForm')[0].reset();
 | 
			
		||||
	}
 | 
			
		||||
	var box = WST.open({title:title,type:1,content:$('#expressBox'),area: ['450px', '400px'],btn:['确定','取消'],
 | 
			
		||||
        end:function(){
 | 
			
		||||
        	$('#expressBox').hide();
 | 
			
		||||
			//重置表单
 | 
			
		||||
			$('#expressForm')[0].reset();
 | 
			
		||||
			//清空预览图
 | 
			
		||||
			$('#preview').html('');
 | 
			
		||||
			$('#expressImg').val('');
 | 
			
		||||
        },yes:function(){
 | 
			
		||||
			$('#expressForm').submit();
 | 
			
		||||
		},cancel:function(){
 | 
			
		||||
			//重置表单
 | 
			
		||||
			$('#expressForm')[0].reset();
 | 
			
		||||
			//清空预览图
 | 
			
		||||
			$('#preview').html('');
 | 
			
		||||
			$('#expressImg').val('');
 | 
			
		||||
	}});
 | 
			
		||||
	$('#expressForm').validator({
 | 
			
		||||
        fields: {
 | 
			
		||||
            expressName: {
 | 
			
		||||
            	rule:"required;",
 | 
			
		||||
            	msg:{required:"快递名称不能为空"},
 | 
			
		||||
            	tip:"请输入快递名称",
 | 
			
		||||
            	ok:"",
 | 
			
		||||
            },
 | 
			
		||||
            expressImg: {
 | 
			
		||||
            	rule:"required;",
 | 
			
		||||
            	msg:{required:"请上传图标"},
 | 
			
		||||
            	tip:"请上传图标",
 | 
			
		||||
            	ok:"",
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
       valid: function(form){
 | 
			
		||||
		        var params = WST.getParams('.ipt');
 | 
			
		||||
	                params.expressId = id;
 | 
			
		||||
	                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           		$.post(WST.U('admin/express/'+((id==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			    	WST.msg("操作成功",{icon:1});
 | 
			
		||||
	           			    	$('#expressForm')[0].reset();
 | 
			
		||||
	           			    	//清空预览图
 | 
			
		||||
			   			    	$('#preview').html('');
 | 
			
		||||
			   			    	//清空图片隐藏域
 | 
			
		||||
			   			    	$('#expressImg').val('');
 | 
			
		||||
	           			    	layer.close(box);
 | 
			
		||||
	           		            mmg.load();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
    	}
 | 
			
		||||
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
var isInitUpload = false;
 | 
			
		||||
function initUpload(){
 | 
			
		||||
	isInitUpload = true;
 | 
			
		||||
	//文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
	    pick:'#adFilePicker',
 | 
			
		||||
	    formData: {dir:'accreds'},
 | 
			
		||||
	    accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
	    callback:function(f){
 | 
			
		||||
	      var json = WST.toAdminJson(f);
 | 
			
		||||
	      if(json.status==1){
 | 
			
		||||
	        $('#uploadMsg').empty().hide();
 | 
			
		||||
	        //将上传的图片路径赋给全局变量
 | 
			
		||||
		    $('#expressImg').val(json.savePath+json.name);
 | 
			
		||||
		    $('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" height="75" />');
 | 
			
		||||
	      }else{
 | 
			
		||||
	      	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	      }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										59
									
								
								hyhproject/admin/view/express/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,59 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/express/express.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
{if WSTGrant('KDGL_01')}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>本功能主要用于管理快递公司的信息。快递代码主要用于物流插件的快递识别查询,填写时请参照各物流插件的快递代码填写。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
   <button class="btn btn-success f-right" onclick='javascript:toEdit(0)'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
{/if}
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='expressBox' style='display:none'>
 | 
			
		||||
    <form id='expressForm' autocomplete="off">
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>快递名称<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><input type='text' id='expressName' name="expressName"  class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>快递代码:</th>
 | 
			
		||||
          <td><input type='text' id='expressCode' name="expressCode"  class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <td colspan="2" style="padding-left: 35px;">快递代码是用于物流查询,请查询所启用插件的快递代码</td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>图标:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <div id='adFilePicker'>上传图标</div><span id='uploadMsg'></span>
 | 
			
		||||
            <input type='hidden' id='expressImg' name="expressImg" class="ipt" />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>预览图:</th>
 | 
			
		||||
          <td><div style="min-height:70px;" id="preview"></div></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    </form>
 | 
			
		||||
 </div>
 | 
			
		||||
<script>
 | 
			
		||||
  $(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										154
									
								
								hyhproject/admin/view/friendlinks/friendlinks.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,154 @@
 | 
			
		||||
var mmg,isInitUpload = false;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'网站名称', name:'friendlinkName', width: 80},
 | 
			
		||||
            {title:'网址', name:'friendlinkUrl' ,width:100},
 | 
			
		||||
            {title:'图标', name:'friendlinkIco' ,width:30,renderer:function(val,item,rowIndex){
 | 
			
		||||
              if(item['friendlinkIco']){
 | 
			
		||||
                return '<img src="'+WST.conf.IMGURL+'/'+item['friendlinkIco']+'" height="28px" />';
 | 
			
		||||
              }else{
 | 
			
		||||
                return "";
 | 
			
		||||
              }
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:80, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                if(WST.GRANT.YQGL_02)h += "<a  class='btn btn-blue' onclick='javascript:getForEdit("+item['friendlinkId']+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
                if(WST.GRANT.YQGL_03)h += "<a  class='btn btn-red' onclick='javascript:toDel(" + item['friendlinkId'] + ")'><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/Friendlinks/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
}
 | 
			
		||||
function initUpload(){
 | 
			
		||||
  //文件上传
 | 
			
		||||
  WST.upload({
 | 
			
		||||
      pick:'#adFilePicker',
 | 
			
		||||
      formData: {dir:'friendlinks'},
 | 
			
		||||
      accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
      callback:function(f){
 | 
			
		||||
        var json = WST.toAdminJson(f);
 | 
			
		||||
        if(json.status==1){
 | 
			
		||||
          $('#uploadMsg').empty().hide();
 | 
			
		||||
          $('#friendlinkIco').val(json.savePath+json.name);
 | 
			
		||||
          $('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" height="75" />');
 | 
			
		||||
        }else{
 | 
			
		||||
            WST.msg(json.msg,{icon:2});
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    progress:function(rate){
 | 
			
		||||
        $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/friendlinks/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);
 | 
			
		||||
	           		            mmg.load();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getForEdit(id){
 | 
			
		||||
	 var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
     $.post(WST.U('admin/friendlinks/get'),{id:id},function(data,textStatus){
 | 
			
		||||
           layer.close(loading);
 | 
			
		||||
           var json = WST.toAdminJson(data);
 | 
			
		||||
           if(json.friendlinkId){
 | 
			
		||||
           		WST.setValues(json);
 | 
			
		||||
           		//显示原来的图片
 | 
			
		||||
           		if(json.friendlinkIco!=''){
 | 
			
		||||
           			$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.friendlinkIco+'" height="70px" />');
 | 
			
		||||
           		}else{
 | 
			
		||||
           			$('#preview').empty();
 | 
			
		||||
           		}
 | 
			
		||||
           		toEdit(json.friendlinkId);
 | 
			
		||||
           }else{
 | 
			
		||||
           		WST.msg(json.msg,{icon:2});
 | 
			
		||||
           }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(id){
 | 
			
		||||
  if(!isInitUpload){
 | 
			
		||||
     isInitUpload = true;
 | 
			
		||||
     initUpload();
 | 
			
		||||
  }
 | 
			
		||||
	var title =(id==0)?"新增":"编辑";
 | 
			
		||||
	var box = WST.open({title:title,type:1,content:$('#friendlinkBox'),area: ['450px', '350px'],btn: ['确定','取消'],
 | 
			
		||||
		yes:function(){
 | 
			
		||||
			$('#friendlinkForm').submit();
 | 
			
		||||
	},cancel:function(){
 | 
			
		||||
    $('#friendlinkBox').hide();
 | 
			
		||||
		//重置表单
 | 
			
		||||
		$('#friendlinkForm')[0].reset();
 | 
			
		||||
		//清空预览图
 | 
			
		||||
		$('#preview').html('');
 | 
			
		||||
		//清空图片隐藏域
 | 
			
		||||
		$('#friendlinkIco').val('');
 | 
			
		||||
	},end:function(){
 | 
			
		||||
    $('#friendlinkBox').hide();
 | 
			
		||||
		//重置表单
 | 
			
		||||
		$('#friendlinkForm')[0].reset();
 | 
			
		||||
		//清空预览图
 | 
			
		||||
		$('#preview').html('');
 | 
			
		||||
		//清空图片隐藏域
 | 
			
		||||
		$('#friendlinkIco').val('');
 | 
			
		||||
 | 
			
		||||
	}});
 | 
			
		||||
	$('#friendlinkForm').validator({
 | 
			
		||||
        fields: {
 | 
			
		||||
            friendlinkName: {
 | 
			
		||||
            	rule:"required;",
 | 
			
		||||
            	msg:{required:"网站名称不能为空"},
 | 
			
		||||
            	tip:"请输入网站名称",
 | 
			
		||||
            	ok:"",
 | 
			
		||||
            },
 | 
			
		||||
            friendlinkUrl: {
 | 
			
		||||
	            rule: "required;",
 | 
			
		||||
	            msg: {required: "网址不能为空"},
 | 
			
		||||
	            tip: "请输入网址",
 | 
			
		||||
	            ok: "",
 | 
			
		||||
        	}
 | 
			
		||||
        },
 | 
			
		||||
       valid: function(form){
 | 
			
		||||
		        var params = WST.getParams('.ipt');
 | 
			
		||||
		        params.friendlinkId = id;
 | 
			
		||||
		        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
		   		$.post(WST.U('admin/friendlinks/'+((id==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
		   			  layer.close(loading);
 | 
			
		||||
		   			  var json = WST.toAdminJson(data);
 | 
			
		||||
		   			  if(json.status=='1'){
 | 
			
		||||
		   			    	WST.msg("操作成功",{icon:1});
 | 
			
		||||
                  $('#friendlinkBox').hide();
 | 
			
		||||
		   			    	$('#friendlinkForm')[0].reset();
 | 
			
		||||
		   			    	//清空预览图
 | 
			
		||||
		   			    	$('#preview').html('');
 | 
			
		||||
		   			    	//清空图片隐藏域
 | 
			
		||||
		   			    	$('#friendlinkIco').val('');
 | 
			
		||||
		   			    	layer.close(box);
 | 
			
		||||
		   		            mmg.load();
 | 
			
		||||
		   			  }else{
 | 
			
		||||
		   			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
		   			  }
 | 
			
		||||
		   		});
 | 
			
		||||
 | 
			
		||||
    	}
 | 
			
		||||
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										60
									
								
								hyhproject/admin/view/friendlinks/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,60 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/friendlinks/friendlinks.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
 | 
			
		||||
{/block}
 | 
			
		||||
 | 
			
		||||
{block name="main"}
 | 
			
		||||
{if WSTGrant('YQGL_01')}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
   <button class="btn btn-success f-right" onclick='javascript:toEdit(0)'><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>
 | 
			
		||||
<div id='friendlinkBox' style='display:none'>
 | 
			
		||||
    <form id='friendlinkForm' method="post" autocomplete="off">
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>网站名称<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><input type='text' id='friendlinkName' name="friendlinkName"  class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>图标:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
          <div id='adFilePicker'>上传图标</div><span id='uploadMsg'></span>
 | 
			
		||||
          <input type='hidden' id='friendlinkIco' class='ipt'/>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>预览图:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <div style="min-height:70px;" id="preview"></div>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>网址<font color='red'>*</font>:</th>
 | 
			
		||||
          <td><input type='text' id='friendlinkUrl' name="friendlinkUrl" class='ipt' maxLength='120'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th width='100'>网站排序号:</th>
 | 
			
		||||
          <td><input type='text' id='friendlinkSort'  class='ipt' maxLength='20'/></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       
 | 
			
		||||
    </table>
 | 
			
		||||
    </form>
 | 
			
		||||
 | 
			
		||||
  </div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										285
									
								
								hyhproject/admin/view/goods/goods.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,285 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
 | 
			
		||||
function initSaleGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:' ', name:'goodsImg', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
                var thumb = item['goodsImg'];
 | 
			
		||||
                //thumb = thumb.replace('.','_thumb.');
 | 
			
		||||
                return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+thumb+"/thumb80"
 | 
			
		||||
                +"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品ID', name:'goodsId' ,width:60,sortable:true},
 | 
			
		||||
            {title:'商品名称', name:'goodsName', width: 120,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品编号', name:'goodsSn' ,width:60,sortable:true},
 | 
			
		||||
            {title:'价格', name:'shopPrice' ,width:20,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+item['shopPrice'];
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'优惠率', name:'discountRate' ,width:20,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
                return item['discountRate']+'%';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'所属店铺', name:'shopName' ,width:60,sortable:true},            
 | 
			
		||||
            {title:'店铺电话', name:'phone' ,width:60,sortable:true},
 | 
			
		||||
            {title:'申请上架时间', name:'saleTime' ,width:60,sortable:true},
 | 
			
		||||
            {title:'审核通过时间', name:'createTime' ,width:60,sortable:true},
 | 
			
		||||
            {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsCatName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
 | 
			
		||||
            {title:'销量', name:'saleNum' ,width:20,sortable:true,align:'center'},
 | 
			
		||||
            {title:'状态', name:'isSale' ,width:30,renderer: function (val,item,rowIndex){
 | 
			
		||||
                if(item['isSale']==1){
 | 
			
		||||
                    return "<span class='statu-yes'><i class='fa fa-check-circle'></i> 已上架</span>";
 | 
			
		||||
                }else{
 | 
			
		||||
                    return "<span class='statu-no'><i class='fa fa-ban'></i>已下架</span>";
 | 
			
		||||
                }
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
            //    h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
//                h += "<a class='btn btn-red' href='javascript:toPay(" + item['goodsId'] + ",1)'><i class='fa fa-ban'></i>添加ECT支付</a> ";
 | 
			
		||||
                if(WST.GRANT.SJSP_04)h += "<a class='btn btn-red' href='javascript:illegal(" + item['goodsId'] + ",1)'><i class='fa fa-ban'></i>违规下架</a> ";
 | 
			
		||||
                if(WST.GRANT.SJSP_03)h += "<a class='btn btn-red' href='javascript:del(" + item['goodsId'] + ",1)'><i class='fa fa-trash-o'></i>删除</a> "; 
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goods/saleByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });   
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	var params = WST.getParams('.j-ipt');
 | 
			
		||||
	params.areaIdPath = WST.ITGetAllAreaVals('areaId1','j-areas').join('_');
 | 
			
		||||
	params.goodsCatIdPath = WST.ITGetAllGoodsCatVals('cat_0','pgoodsCats').join('_');
 | 
			
		||||
    params.page = 1;
 | 
			
		||||
	mmg.load(params);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toPay(id,type){
 | 
			
		||||
    var box = WST.confirm({content:"您确定要添加ECT支付吗?",yes:function(){
 | 
			
		||||
               var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
               $.post(WST.U('admin/goods/goodsEct'),{id:id},function(data,textStatus){
 | 
			
		||||
                        layer.close(loading);
 | 
			
		||||
                        var json = WST.toAdminJson(data);
 | 
			
		||||
                        if(json.status=='1'){
 | 
			
		||||
                            WST.msg(json.msg,{icon:1});
 | 
			
		||||
                            layer.close(box);
 | 
			
		||||
                            loadGrid();
 | 
			
		||||
                        }else{
 | 
			
		||||
                            WST.msg(json.msg,{icon:2});
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
                }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function toExportSale(){
 | 
			
		||||
    var params = {};
 | 
			
		||||
    params = WST.getParams('.j-ipt');
 | 
			
		||||
    var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        location.href=WST.U('admin/goods/toExportSale',params);
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
function del(id,type){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该商品吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           $.post(WST.U('admin/goods/del'),{id:id},function(data,textStatus){
 | 
			
		||||
	           			layer.close(loading);
 | 
			
		||||
	           			var json = WST.toAdminJson(data);
 | 
			
		||||
	           			if(json.status=='1'){
 | 
			
		||||
	           			    WST.msg(json.msg,{icon:1});
 | 
			
		||||
	           			    layer.close(box);
 | 
			
		||||
	           			    loadGrid();
 | 
			
		||||
	           			}else{
 | 
			
		||||
	           			    WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			}
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
function illegal(id,type){
 | 
			
		||||
	var w = WST.open({type: 1,title:((type==1)?"商品违规原因":"商品不通过原因"),shade: [0.6, '#000'],border: [0],
 | 
			
		||||
	    content: '<textarea id="illegalRemarks" rows="7" style="width:100%" maxLength="200"></textarea>',
 | 
			
		||||
	    area: ['500px', '260px'],btn: ['确定', '关闭窗口'],
 | 
			
		||||
        yes: function(index, layero){
 | 
			
		||||
        	var illegalRemarks = $.trim($('#illegalRemarks').val());
 | 
			
		||||
        	if(illegalRemarks==''){
 | 
			
		||||
        		WST.msg(((type==1)?'请输入违规原因 !':'请输入不通过原因!'), {icon: 5});
 | 
			
		||||
        		return;
 | 
			
		||||
        	}
 | 
			
		||||
        	var ll = WST.msg('数据处理中,请稍候...');
 | 
			
		||||
		    $.post(WST.U('admin/goods/illegal'),{id:id,illegalRemarks:illegalRemarks},function(data){
 | 
			
		||||
		    	layer.close(w);
 | 
			
		||||
		    	layer.close(ll);
 | 
			
		||||
		    	var json = WST.toAdminJson(data);
 | 
			
		||||
				if(json.status>0){
 | 
			
		||||
					WST.msg(json.msg, {icon: 1});
 | 
			
		||||
					loadGrid();
 | 
			
		||||
				}else{
 | 
			
		||||
					WST.msg(json.msg, {icon: 2});
 | 
			
		||||
				}
 | 
			
		||||
		   });
 | 
			
		||||
        }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function initAuditGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'商品ID', name:'goodsId' ,width:30,sortable:true},
 | 
			
		||||
            {title:' ', name:'goodsName', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return "<span class='weixin'><img class='img' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'><img class='imged' style='height:200px;width:200px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品名称', name:'goodsName', width: 160,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品编号', name:'goodsSn' ,width:60,sortable:true},
 | 
			
		||||
            {title:'价格', name:'shopPrice' ,width:20,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return '¥'+item['shopPrice'];
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'优惠率', name:'discountRate' ,width:20,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
                return item['discountRate']+'%';
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'所属店铺', name:'shopName' ,width:60,sortable:true},
 | 
			
		||||
            {title:'店铺电话', name:'phone' ,width:60,sortable:true},
 | 
			
		||||
            {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsCatName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'销量', name:'saleNum' ,width:20,sortable:true,align:'center'},
 | 
			
		||||
            {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
	            // h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId']+"&key="+item['verfiycode'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
	            if(WST.GRANT.DSHSP_04)h += "<a class='btn btn-blue' href='javascript:allow(" + item['goodsId'] + ",0)'><i class='fa fa-check'></i>审核通过</a> ";
 | 
			
		||||
	            if(WST.GRANT.DSHSP_04)h += "<a class='btn btn-red' href='javascript:illegal(" + item['goodsId'] + ",0)'><i class='fa fa-ban'></i>审核不通过</a> ";
 | 
			
		||||
	            if(WST.GRANT.DSHSP_03)h += "<a class='btn btn-red' href='javascript:del(" + item['goodsId'] + ",0)'><i class='fa fa-trash-o'></i>删除</a>"; 
 | 
			
		||||
	            return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:40, cols: cols,method:'POST',checkCol:true,multiSelect:true,
 | 
			
		||||
        url: WST.U('admin/goods/auditByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    }); 
 | 
			
		||||
}
 | 
			
		||||
// 批量审核通过
 | 
			
		||||
function toBatchAllow(){
 | 
			
		||||
	var rows = mmg.selectedRows();
 | 
			
		||||
	if(rows.length==0){
 | 
			
		||||
		 WST.msg('请选择商品',{icon:2});
 | 
			
		||||
		 return;
 | 
			
		||||
	}
 | 
			
		||||
	var ids = [];
 | 
			
		||||
	for(var i=0;i<rows.length;i++){
 | 
			
		||||
       ids.push(rows[i]['goodsId']); 
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
   	$.post(WST.U('admin/goods/batchAllow'),{ids:ids.join(',')},function(data,textStatus){
 | 
			
		||||
   			  layer.close(loading);
 | 
			
		||||
   			  var json = WST.toAdminJson(data);
 | 
			
		||||
   			  if(json.status=='1'){
 | 
			
		||||
   			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
   		            loadGrid();
 | 
			
		||||
   			  }else{
 | 
			
		||||
   			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
   			  }
 | 
			
		||||
   		});
 | 
			
		||||
}
 | 
			
		||||
// 批量审核不通过
 | 
			
		||||
function toBatchIllegal(){
 | 
			
		||||
	var rows = mmg.selectedRows();
 | 
			
		||||
	if(rows.length==0){
 | 
			
		||||
		 WST.msg('请选择商品',{icon:2});
 | 
			
		||||
		 return;
 | 
			
		||||
	}
 | 
			
		||||
	var ids = [];
 | 
			
		||||
	for(var i=0;i<rows.length;i++){
 | 
			
		||||
       ids.push(rows[i]['goodsId']); 
 | 
			
		||||
	}
 | 
			
		||||
	// 先显示弹出框,让用户输入审核不通原因
 | 
			
		||||
	var w = WST.open({type: 1,title:"商品不通过原因",shade: [0.6, '#000'],border: [0],
 | 
			
		||||
	    content: '<textarea id="illegalRemarks" rows="7" style="width:96%" maxLength="200"></textarea>',
 | 
			
		||||
	    area: ['500px', '260px'],btn: ['确定', '关闭窗口'],
 | 
			
		||||
        yes: function(index, layero){
 | 
			
		||||
        	var illegalRemarks = $.trim($('#illegalRemarks').val());
 | 
			
		||||
        	if(illegalRemarks==''){
 | 
			
		||||
        		WST.msg('请输入不通过原因!', {icon: 5});
 | 
			
		||||
        		return;
 | 
			
		||||
        	}
 | 
			
		||||
        	var ll = WST.msg('数据处理中,请稍候...');
 | 
			
		||||
		    $.post(WST.U('admin/goods/batchIllegal'),{ids:ids.join(','),illegalRemarks:illegalRemarks},function(data){
 | 
			
		||||
		    	layer.close(w);
 | 
			
		||||
		    	layer.close(ll);
 | 
			
		||||
		    	var json = WST.toAdminJson(data);
 | 
			
		||||
				if(json.status>0){
 | 
			
		||||
					WST.msg(json.msg, {icon: 1});
 | 
			
		||||
					loadGrid();
 | 
			
		||||
				}else{
 | 
			
		||||
					WST.msg(json.msg, {icon: 2});
 | 
			
		||||
				}
 | 
			
		||||
		   });
 | 
			
		||||
        }
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function allow(id,type){
 | 
			
		||||
	var box = WST.confirm({content:"您确定审核通过该商品吗?",yes:function(){
 | 
			
		||||
        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
        $.post(WST.U('admin/goods/allow'),{id:id},function(data,textStatus){
 | 
			
		||||
        			layer.close(loading);
 | 
			
		||||
        			var json = WST.toAdminJson(data);
 | 
			
		||||
        			if(json.status=='1'){
 | 
			
		||||
        			    WST.msg(json.msg,{icon:1});
 | 
			
		||||
        			    layer.close(box);
 | 
			
		||||
        			    loadGrid();
 | 
			
		||||
        			}else{
 | 
			
		||||
        			    WST.msg(json.msg,{icon:2});
 | 
			
		||||
        			}
 | 
			
		||||
        		});
 | 
			
		||||
         }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function initIllegalGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:' ', name:'goodsName', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return "<span class='weixin'><img class='img' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'><img class='imged' style='height:200px;width:200px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品名称', name:'goodsName', width: 100,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品编号', name:'goodsSn' ,width:60,sortable:true},
 | 
			
		||||
            {title:'所属店铺', name:'shopName' ,width:60,sortable:true},
 | 
			
		||||
            {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'违规原因', name:'illegalRemarks' ,width:160},
 | 
			
		||||
            {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
	            h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId']+"&key="+item['verfiycode'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
	            if(WST.GRANT.WGSP_04)h += "<a class='btn btn-blue' href='javascript:allow(" + item['goodsId'] + ",0)'><i class='fa fa-check'></i>审核通过</a> ";
 | 
			
		||||
	            if(WST.GRANT.WGSP_03)h += "<a class='btn btn-red' href='javascript:del(" + item['goodsId'] + ",0)'><i class='fa fa-trash-o'></i>删除</a></div> "; 
 | 
			
		||||
	            return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goods/illegalByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    }); 
 | 
			
		||||
}
 | 
			
		||||
function toolTip(){
 | 
			
		||||
    WST.toolTip();
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										41
									
								
								hyhproject/admin/view/goods/list_audit.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__/goods/goods.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<select id="areaId1" class='j-ipt j-areas hide' level="0" onchange="WST.ITAreas({id:'areaId1',val:this.value,className:'j-areas'});">
 | 
			
		||||
  <option value="">-商家所在地-</option>
 | 
			
		||||
  {volist name="areaList" id="vo"}
 | 
			
		||||
  <option value="{$vo['areaId']}">{$vo['areaName']}</option>
 | 
			
		||||
  {/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称/店铺编号' id="shopName" class='j-ipt hide'/>
 | 
			
		||||
<select id="cat_0" class='ipt pgoodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:false,className:'pgoodsCats'});">
 | 
			
		||||
   <option value="">-所属分类-</option>
 | 
			
		||||
   {volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
	<option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
	{/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="goodsName"  placeholder='商品名称/商品编号' id="goodsName" class='j-ipt'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
 | 
			
		||||
{if WSTGrant('DSHSP_04')}
 | 
			
		||||
<button class="btn btn-danger f-right" onclick='javascript:toBatchIllegal()' style='margin-left:10px;'><i class='fa fa-ban'></i>批量不通过</button>
 | 
			
		||||
<button class="btn btn-success f-right" onclick='javascript:toBatchAllow()' style='margin-left:10px;'><i class='fa fa-check'></i>批量通过</button>
 | 
			
		||||
{/if}
 | 
			
		||||
 | 
			
		||||
<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>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initAuditGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										35
									
								
								hyhproject/admin/view/goods/list_illegal.html
									
									
									
									
									
										Executable 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__/goods/goods.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<select id="areaId1" class='j-ipt j-areas hide' level="0" onchange="WST.ITAreas({id:'areaId1',val:this.value,className:'j-areas'});">
 | 
			
		||||
  <option value="">-商家所在地-</option>
 | 
			
		||||
  {volist name="areaList" id="vo"}
 | 
			
		||||
  <option value="{$vo['areaId']}">{$vo['areaName']}</option>
 | 
			
		||||
  {/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称/店铺编号' id="shopName" class='j-ipt hide'/>
 | 
			
		||||
<select id="cat_0" class='ipt pgoodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:false,className:'pgoodsCats'});">
 | 
			
		||||
   <option value="">-所属分类-</option>
 | 
			
		||||
   {volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
	<option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
	{/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="goodsName"  placeholder='商品名称/商品编号' id="goodsName" class='j-ipt'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
 <div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
 <div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initIllegalGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										51
									
								
								hyhproject/admin/view/goods/list_sale.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,51 @@
 | 
			
		||||
{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__/goods/goods.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<select id="areaId1" class='j-ipt j-areas hide' level="0" onchange="WST.ITAreas({id:'areaId1',val:this.value,className:'j-areas'});">
 | 
			
		||||
  <option value="">-商家所在地-</option>
 | 
			
		||||
  {volist name="areaList" id="vo"}
 | 
			
		||||
  <option value="{$vo['areaId']}">{$vo['areaName']}</option>
 | 
			
		||||
  {/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称/店铺编号' id="shopName" class='j-ipt hide'/>
 | 
			
		||||
<select id="cat_0" class='ipt pgoodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:false,className:'pgoodsCats'});">
 | 
			
		||||
   <option value="">-所属分类-</option>
 | 
			
		||||
   {volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
	<option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
	{/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="goodsName"  placeholder='商品名称/商品编号' id="goodsName" class='j-ipt'/>
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称' id="shopName" class='j-ipt'/>
 | 
			
		||||
<input type="text" id="startDate" name="startDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='开始日期'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" id="endDate" name="endDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='结束日期'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
<button class="btn btn-primary btn-fixtop f-right"  style="margin-left: 10px;" onclick='javascript:toExportSale()'><i class="fa fa-sign-in"></i>导出</button>
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
$(function(){initSaleGrid();})
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										95
									
								
								hyhproject/admin/view/goods/list_shelves.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,95 @@
 | 
			
		||||
{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__/goods/goods.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<select id="areaId1" class='j-ipt j-areas hide' level="0" onchange="WST.ITAreas({id:'areaId1',val:this.value,className:'j-areas'});">
 | 
			
		||||
  <option value="">-商家所在地-</option>
 | 
			
		||||
  {volist name="areaList" id="vo"}
 | 
			
		||||
  <option value="{$vo['areaId']}">{$vo['areaName']}</option>
 | 
			
		||||
  {/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称/店铺编号' id="shopName" class='j-ipt hide'/>
 | 
			
		||||
<select id="cat_0" class='ipt pgoodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:false,className:'pgoodsCats'});">
 | 
			
		||||
   <option value="">-所属分类-</option>
 | 
			
		||||
   {volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
	<option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
	{/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<input type="text" name="goodsName"  placeholder='商品名称/商品编号' id="goodsName" class='j-ipt'/>
 | 
			
		||||
<input type="text" name="shopName"  placeholder='店铺名称' id="shopName" class='j-ipt'/>
 | 
			
		||||
<input type="text" id="startDate" name="startDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='开始日期'/>
 | 
			
		||||
至
 | 
			
		||||
<input type="text" id="endDate" name="endDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='结束日期'/>
 | 
			
		||||
<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button>
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
  function initShelvesGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:' ', name:'goodsImg', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
                var thumb = item['goodsImg'];
 | 
			
		||||
                //thumb = thumb.replace('.','_thumb.');
 | 
			
		||||
                return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+thumb+"/thumb80"
 | 
			
		||||
                +"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品名称', name:'goodsName', width: 120,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品编号', name:'goodsSn' ,width:60,sortable:true},
 | 
			
		||||
            {title:'价格', name:'shopPrice' ,width:20,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
                return '¥'+item['shopPrice'];
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'所属店铺', name:'shopName' ,width:60,sortable:true},
 | 
			
		||||
            {title:'申请上架时间', name:'saleTime' ,width:60,sortable:true},
 | 
			
		||||
            {title:'审核通过时间', name:'createTime' ,width:60,sortable:true},
 | 
			
		||||
            {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsCatName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
 | 
			
		||||
            {title:'销量', name:'saleNum' ,width:20,sortable:true,align:'center'},
 | 
			
		||||
            {title:'状态', name:'isSale' ,width:30,renderer: function (val,item,rowIndex){
 | 
			
		||||
                if(item['isSale']==1){
 | 
			
		||||
                    return "<span class='statu-yes'><i class='fa fa-check-circle'></i> 已上架</span>";
 | 
			
		||||
                }else{
 | 
			
		||||
                    return "<span class='statu-no'><i class='fa fa-ban'></i>已下架</span>";
 | 
			
		||||
                }
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
                h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><i class='fa fa-search'></i>查看</a> "; 
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goods/shelvesByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });   
 | 
			
		||||
}
 | 
			
		||||
$(function(){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startDate'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endDate'
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
$(function(){initShelvesGrid();})
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										126
									
								
								hyhproject/admin/view/goodsappraises/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,126 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/goodsappraises/goodsappraises.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<script type="text/javascript" src="__STATIC__/plugins/raty/jquery.raty.min.js"></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
var options = {
 | 
			
		||||
      hints         : ['很不满意', '不满意', '一般', '满意', '非常满意'],
 | 
			
		||||
      width:200,
 | 
			
		||||
      targetKeep: true,
 | 
			
		||||
      starHalf:'__STATIC__/plugins/raty/img/star-half-big.png',
 | 
			
		||||
      starOff:'__STATIC__/plugins/raty/img/star-off-big.png',
 | 
			
		||||
      starOn:'__STATIC__/plugins/raty/img/star-on-big.png',
 | 
			
		||||
      cancelOff: '__STATIC__/plugins/raty/img/cancel-off-big.png',
 | 
			
		||||
        cancelOn: '__STATIC__/plugins/raty/img/cancel-on-big.png'
 | 
			
		||||
    }
 | 
			
		||||
  options.target='#goodsScore_hint';
 | 
			
		||||
  options.score='{$data['goodsScore']}';
 | 
			
		||||
  $('.goodsScore').raty(options);
 | 
			
		||||
 | 
			
		||||
  options.target='#timeScore_hint';
 | 
			
		||||
  options.score='{$data['timeScore']}';
 | 
			
		||||
  $('.timeScore').raty(options);
 | 
			
		||||
 | 
			
		||||
  options.target='#serviceScore_hint';
 | 
			
		||||
  options.score='{$data['serviceScore']}';
 | 
			
		||||
  $('.serviceScore').raty(options);
 | 
			
		||||
 | 
			
		||||
  editInit();
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
<form id="goodsAppraisesForm" autocomplete="off">
 | 
			
		||||
<table class='wst-form wst-box-top'>
 | 
			
		||||
  <tr>
 | 
			
		||||
      <th width='150'>商品:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <img src='__IMGURL__/{$data["goodsImg"]}' width='50' style="float:left;" /> 
 | 
			
		||||
            <p style="float:left;height:50px;line-height:25px;width:245px;overflow:hidden;margin-left:5px;">{$data['goodsName']}</p>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>所属订单:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              {$data['orderNo']}
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>用户:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              {$data['loginName']}
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>评价:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
                <div style='width:500px;'>
 | 
			
		||||
                  <div style='float:left;width:70px;'>商品评分:</div>
 | 
			
		||||
                  <div style='float:left;width:430px;'>
 | 
			
		||||
                    <div class="goodsScore" class="ipt" style='float:left'></div>
 | 
			
		||||
                    <div id="goodsScore_hint"  style='float:left'></div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div id="score_error"></div>
 | 
			
		||||
 | 
			
		||||
               <div style='width:500px;'>
 | 
			
		||||
                    <div style='float:left;width:70px;'> 时效评分:</div>
 | 
			
		||||
                    <div style='float:left;width:430px;'>
 | 
			
		||||
                      <div class="timeScore" class="ipt" style='float:left'></div>
 | 
			
		||||
                      <div id="timeScore_hint" style='float:left'></div>
 | 
			
		||||
                    </div>
 | 
			
		||||
               </div>
 | 
			
		||||
 | 
			
		||||
               <div style='width:500px;'>
 | 
			
		||||
                  <div style='float:left;width:70px;'>服务评分:</div>
 | 
			
		||||
                  <div style='float:left;width:430px;'>
 | 
			
		||||
                      <div class="serviceScore" class="ipt" style='float:left'></div>
 | 
			
		||||
                      <div id="serviceScore_hint"  style='float:left'></div>
 | 
			
		||||
                  </div>
 | 
			
		||||
               </div>
 | 
			
		||||
          </td>
 | 
			
		||||
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>状态:</th>
 | 
			
		||||
          <td class='layui-form'>
 | 
			
		||||
            <input type="checkbox" id="isShow" {if $data['isShow']==1}checked{/if} name="isShow" value="1" class="ipt" lay-skin="switch" lay-filter="isShow" lay-text="显示|隐藏">
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>评语:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <textarea style="width:300px;height:100px" id="content" name="content" class="ipt">{$data['content']}</textarea>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>附件:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <div id="appraise-img">
 | 
			
		||||
              {if !empty($data['images'])}
 | 
			
		||||
                {volist name="$data['images']" id="img"}
 | 
			
		||||
                <img src="__IMGURL__/{$img}/thumb80" layer-src="__IMGURL__/{$img}" width="50" />
 | 
			
		||||
                {/volist}
 | 
			
		||||
              {/if}
 | 
			
		||||
            </div>
 | 
			
		||||
          </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(){
 | 
			
		||||
  parent.showImg({photos: $('#appraise-img')});
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										139
									
								
								hyhproject/admin/view/goodsappraises/goodsappraises.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,139 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'商品主图', name:'goodsImg', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	var thumb = item['goodsImg'];
 | 
			
		||||
	        	//thumb = thumb.replace('.','_thumb.');
 | 
			
		||||
	        	return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:40px;width:40px;' src='"+WST.conf.IMGURL+"/"+thumb
 | 
			
		||||
            	+"'><span class='imged' style='left:45px;'><img  style='height:150px;width:150px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'订单号', name:'orderNo',sortable: true, width: 90},
 | 
			
		||||
            {title:'商品', name:'goodsName',sortable: true, width: 100,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            
 | 
			
		||||
            {title:'商品评分', name:'goodsScore',sortable: true, width: 80, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	var s="<div style='line-height:28px;'>";
 | 
			
		||||
	        	for(var i=0;i<val;++i){
 | 
			
		||||
	        		s +="<img src='"+WST.conf.ROOT+"/hyhproject/admin/view/goodsappraises/icon_score_yes.png'>";
 | 
			
		||||
	        	}
 | 
			
		||||
	        	s += "</div>";
 | 
			
		||||
	        	return s;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'时效评分', name:'timeScore',sortable: true, width: 80, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	var s="<div style='line-height:28px;'>";
 | 
			
		||||
	        	for(var i=0;i<val;++i){
 | 
			
		||||
	        		s +="<img src='"+WST.conf.ROOT+"/hyhproject/admin/view/goodsappraises/icon_score_yes.png'>";
 | 
			
		||||
	        	}
 | 
			
		||||
	        	s += "</div>";
 | 
			
		||||
	        	return s;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'服务评分', name:'serviceScore',sortable: true, width: 80, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	var s="<div style='line-height:28px;'>";
 | 
			
		||||
	        	for(var i=0;i<val;++i){
 | 
			
		||||
	        		s +="<img src='"+WST.conf.ROOT+"/hyhproject/admin/view/goodsappraises/icon_score_yes.png'>";
 | 
			
		||||
	        	}
 | 
			
		||||
	        	s += "</div>";
 | 
			
		||||
	        	return s;
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'评价内容', name:'content', width: 155},
 | 
			
		||||
            {title:'状态', name:'isShow', width: 20,sortable: true, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return (val==0)?"<span class='statu-no'><i class='fa fa-ban'></i> 隐藏</span>":"<span class='statu-yes'><i class='fa fa-check-circle'></i> 显示</span></h3>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:95, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
	            if(WST.GRANT.PJGL_02)h += "<a class='btn btn-blue' href='"+WST.U('admin/goodsappraises/toEdit','id='+item['id'])+"'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
	            if(WST.GRANT.PJGL_03)h += "<a class='btn btn-red' href='javascript:toDel(" + item['id'] + ")'><i class='fa fa-trash-o'></i>删除</a> "; 
 | 
			
		||||
	            return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true,indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsappraises/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        remoteSort:true ,
 | 
			
		||||
        sortName: 'orderNo',
 | 
			
		||||
        sortStatus: 'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/goodsappraises/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);
 | 
			
		||||
	           		            loadGrid();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	var query = WST.getParams('.query');
 | 
			
		||||
  query.page = 1;
 | 
			
		||||
	mmg.load(query);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editInit(){
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
/* 表单验证 */
 | 
			
		||||
    $('#goodsAppraisesForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                content: {
 | 
			
		||||
                  rule:"required;length(3~50)",
 | 
			
		||||
                  msg:{length:"评价内容为3-50个字",required:"评价内容为3-50个字"},
 | 
			
		||||
                  tip:"评价内容为3-50个字",
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                score:  {
 | 
			
		||||
                  rule:"required",
 | 
			
		||||
                  msg:{required:"评分必须大于0"},
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                  target:"#score_error",
 | 
			
		||||
                },
 | 
			
		||||
                
 | 
			
		||||
            },
 | 
			
		||||
 | 
			
		||||
          valid: function(form){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
                //获取修改的评分
 | 
			
		||||
                params.goodsScore = $('.goodsScore').find('[name=score]').val();
 | 
			
		||||
                params.timeScore = $('.timeScore').find('[name=score]').val();
 | 
			
		||||
                params.serviceScore = $('.serviceScore').find('[name=score]').val();
 | 
			
		||||
            var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
            $.post(WST.U('admin/goodsappraises/'+((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/goodsappraises/index');
 | 
			
		||||
              }else{
 | 
			
		||||
                    WST.msg(json.msg,{icon:2});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
function toolTip(){
 | 
			
		||||
    $('body').mousemove(function(e){
 | 
			
		||||
    	var windowH = $(window).height();  
 | 
			
		||||
        if(e.pageY >= windowH*0.8){
 | 
			
		||||
        	var top = windowH*0.233;
 | 
			
		||||
        	$('.imged').css('margin-top',-top);
 | 
			
		||||
        }else{
 | 
			
		||||
        	var top = windowH*0.06;
 | 
			
		||||
        	$('.imged').css('margin-top',-top);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/goodsappraises/icon_score_yes.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 631 B  | 
							
								
								
									
										34
									
								
								hyhproject/admin/view/goodsappraises/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,34 @@
 | 
			
		||||
{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__/goodsappraises/goodsappraises.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
	<div id="query" style="float:left;">
 | 
			
		||||
		<select id="areaId1" class='query' level="0" onchange="WST.ITAreas({id:'areaId1',val:this.value,className:'query'});" >
 | 
			
		||||
		  <option value="-1">-请选择地区-</option>
 | 
			
		||||
		  {foreach $area1 as $v}
 | 
			
		||||
        	<option value="<?=$v['areaId']?>"><?=$v['areaName']?></option>
 | 
			
		||||
          {/foreach}
 | 
			
		||||
		</select>
 | 
			
		||||
		<input type="text" name="shopName" placeholder='店铺名称' id="shopName" class="query" />
 | 
			
		||||
		<input type="text" name="goodsName" placeholder='商品名称' id="goodsName" class="query" />
 | 
			
		||||
		<button type="button"  class='btn btn-primary btn-mright' onclick="javascript:loadGrid()"><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
	</div>
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
 <div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
 <div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
	initGrid();
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										276
									
								
								hyhproject/admin/view/goodscats/goodscats.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,276 @@
 | 
			
		||||
var grid,oldData = {},oldorderData = {};
 | 
			
		||||
function initGrid(){	
 | 
			
		||||
	grid = $('#maingrid').WSTGridTree({
 | 
			
		||||
		url:WST.U('admin/goodscats/pageQuery'),
 | 
			
		||||
		pageSize:10000,
 | 
			
		||||
		pageSizeOptions:[10000],
 | 
			
		||||
		height:'99%',
 | 
			
		||||
        width:'100%',
 | 
			
		||||
        minColToggle:6,
 | 
			
		||||
        delayLoad :true,
 | 
			
		||||
        rownumbers:true,
 | 
			
		||||
        columns: [
 | 
			
		||||
	        { display: '分类名称', width: 350,name: 'catName', id:'catId', align: 'left',isSort: false,render: function (item)
 | 
			
		||||
                {
 | 
			
		||||
                	oldData[item.catId] = item.catName;
 | 
			
		||||
                    return '<input type="text" size="40" value="'+item.catName+'" onblur="javascript:editName('+item.catId+',this)"/>';
 | 
			
		||||
            }},
 | 
			
		||||
			{ display: '自营是否显示', width: 70, name: 'isSelfShow',isSort: false,
 | 
			
		||||
				render: function (item)
 | 
			
		||||
				{
 | 
			
		||||
					return '<input type="checkbox" '+((item.isSelfShow==1)?"checked":"")+' class="ipt" lay-skin="switch" lay-filter="isSelfShow" data="'+item.catId+'" lay-text="显示|隐藏">';
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
            { display: '推荐楼层', width: 70, name: 'isFloor',isSort: false,
 | 
			
		||||
                render: function (itemf)
 | 
			
		||||
                {
 | 
			
		||||
                    return '<input type="checkbox" '+((itemf.isFloor==1)?"checked":"" )+'  class="ipt" lay-skin="switch" lay-filter="isFloor" data="'+itemf.catId+'" lay-text="是|否">';
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
			{ display: '是否显示', width: 70, name: 'isShow',isSort: false,
 | 
			
		||||
				render: function (item)
 | 
			
		||||
				{
 | 
			
		||||
					return '<input type="checkbox" '+((item.isShow==1)?"checked":"")+' class="ipt" lay-skin="switch" lay-filter="isShow" data="'+item.catId+'" lay-text="显示|隐藏">';
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
            { display: '排序号', name: 'catSort',width: 50,isSort: false,render: function (item)
 | 
			
		||||
                {
 | 
			
		||||
                	oldorderData[item.catId] = item.catSort;
 | 
			
		||||
                    return '<input type="text" style="width:50px" value="'+item.catSort+'" onblur="javascript:editOrder('+item.catId+',this)"/>';
 | 
			
		||||
            }},
 | 
			
		||||
            { display: '佣金', width: 50, name: 'commissionRate',isSort: false,
 | 
			
		||||
                render: function (item)
 | 
			
		||||
                {
 | 
			
		||||
                    return item["commissionRate"]+'%';
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            { display: '质保金', width: 50, name: 'payDeposit',isSort: false,
 | 
			
		||||
                render: function (item)
 | 
			
		||||
                {
 | 
			
		||||
                    return item["payDeposit"];
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
	        { display: '操作', name: 'op',width: 170,isSort: false,
 | 
			
		||||
	        	render: function (rowdata){
 | 
			
		||||
		            var h = "";
 | 
			
		||||
			        if(WST.GRANT.SPFL_01)h += "<a class='btn btn-blue' href='javascript:toEdit("+rowdata["catId"]+",0)'><i class='fa fa-plus'></i>新增子分类</a> ";
 | 
			
		||||
		            if(WST.GRANT.SPFL_02)h += "<a class='btn btn-blue' href='javascript:toEdit("+rowdata["parentId"]+","+rowdata["catId"]+")'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
		            if(WST.GRANT.SPFL_03)h += "<a class='btn btn-red' href='javascript:toDel("+rowdata["parentId"]+","+rowdata["catId"]+")'><i class='fa fa-trash-o'></i>删除</a> "; 
 | 
			
		||||
		            return h;
 | 
			
		||||
	        	}}
 | 
			
		||||
        ],
 | 
			
		||||
        callback:function(){
 | 
			
		||||
		    layui.form.render();
 | 
			
		||||
	    }
 | 
			
		||||
    });
 | 
			
		||||
	layui.form.on('switch(isSelfShow)', function(data){
 | 
			
		||||
		var id = $(this).attr("data");
 | 
			
		||||
		if(this.checked){
 | 
			
		||||
			toggleIsSelfShow(id, 1);
 | 
			
		||||
		}else{
 | 
			
		||||
			toggleIsSelfShow(id, 0);
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
    layui.form.on('switch(isShow)', function(data){
 | 
			
		||||
        var id = $(this).attr("data");
 | 
			
		||||
        if(this.checked){
 | 
			
		||||
            toggleIsShow(id, 1);
 | 
			
		||||
        }else{
 | 
			
		||||
            toggleIsShow(id, 0);
 | 
			
		||||
        }
 | 
			
		||||
   });
 | 
			
		||||
   layui.form.on('switch(isFloor)', function(data){
 | 
			
		||||
        var id = $(this).attr("data");
 | 
			
		||||
        if(this.checked){
 | 
			
		||||
            toggleIsFloor(id, 1);
 | 
			
		||||
        }else{
 | 
			
		||||
            toggleIsFloor(id, 0);
 | 
			
		||||
        }
 | 
			
		||||
   });
 | 
			
		||||
}
 | 
			
		||||
function toggleIsSelfShow(id,isSelfShow){
 | 
			
		||||
	if(!WST.GRANT.SPFL_02)return;
 | 
			
		||||
	var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/goodscats/editiIsSelfShow'),{id:id,isSelfShow:isSelfShow},function(data,textStatus){
 | 
			
		||||
		layer.close(loading);
 | 
			
		||||
		var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status=='1'){
 | 
			
		||||
			WST.msg(json.msg,{icon:1});
 | 
			
		||||
			grid.reload(id);
 | 
			
		||||
		}else{
 | 
			
		||||
			WST.msg(json.msg,{icon:2});
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
function toggleIsFloor(id,isFloor){
 | 
			
		||||
	if(!WST.GRANT.SPFL_02)return;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	$.post(WST.U('admin/goodscats/editiIsFloor'),{id:id,isFloor:isFloor},function(data,textStatus){
 | 
			
		||||
		  layer.close(loading);
 | 
			
		||||
		  var json = WST.toAdminJson(data);
 | 
			
		||||
		  if(json.status=='1'){
 | 
			
		||||
		    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
				grid.reload(id);
 | 
			
		||||
		  }else{
 | 
			
		||||
		    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
		  }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toggleIsShow(id,isShow){
 | 
			
		||||
	if(!WST.GRANT.SPFL_02)return;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    $.post(WST.U('admin/goodscats/editiIsShow'),{id:id,isShow:isShow},function(data,textStatus){
 | 
			
		||||
		layer.close(loading);
 | 
			
		||||
		var json = WST.toAdminJson(data);
 | 
			
		||||
		if(json.status=='1'){
 | 
			
		||||
			 WST.msg(json.msg,{icon:1});
 | 
			
		||||
			 grid.reload(id);
 | 
			
		||||
		}else{
 | 
			
		||||
			 WST.msg(json.msg,{icon:2});
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(pid,id){
 | 
			
		||||
	$('#goodscatsForm')[0].reset();
 | 
			
		||||
	if(id>0){
 | 
			
		||||
		$.post(WST.U('admin/goodscats/get'),{id:id},function(data,textStatus){
 | 
			
		||||
			var json = WST.toAdminJson(data);
 | 
			
		||||
			if(json){
 | 
			
		||||
				WST.setValues(json);
 | 
			
		||||
				layui.form.render();
 | 
			
		||||
				if(json.catImg){
 | 
			
		||||
					$('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.catImg+'" height="70px" />');
 | 
			
		||||
				}else{
 | 
			
		||||
					$('#preview').html('');
 | 
			
		||||
				}
 | 
			
		||||
				editsBox(id);
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}else{
 | 
			
		||||
		WST.setValues({parentId:pid,catName:'',isShow:1,isFloor:0,catSort:0,catImg:''});
 | 
			
		||||
		$('#preview').html('');
 | 
			
		||||
		layui.form.render();
 | 
			
		||||
		editsBox(id);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
var isInitUpload = false;
 | 
			
		||||
function editsBox(id,v){
 | 
			
		||||
	if(!isInitUpload)initUpload();
 | 
			
		||||
	var title =(id>0)?"修改商品分类":"新增商品分类";
 | 
			
		||||
	var box = WST.open({title:title,type:1,content:$('#goodscatsBox'),area: ['465px', '400px'],btn:['确定','取消'],
 | 
			
		||||
		 end:function(){$('#goodscatsBox').hide();},yes:function(){
 | 
			
		||||
		$('#goodscatsForm').submit();
 | 
			
		||||
	          }});
 | 
			
		||||
	$('#goodscatsForm').validator({
 | 
			
		||||
	    fields: {
 | 
			
		||||
	    	catName: {
 | 
			
		||||
	    		tip: "请输入商品分类名称",
 | 
			
		||||
	    		rule: '商品分类名称:required;length[~20];'
 | 
			
		||||
	    	},
 | 
			
		||||
	    	commissionRate: {
 | 
			
		||||
	    		tip: "请输入分类的佣金",
 | 
			
		||||
	    		rule: '分类的佣金:required;'
 | 
			
		||||
	    	},
 | 
			
		||||
	    	catSort: {
 | 
			
		||||
            	tip: "请输入排序号",
 | 
			
		||||
            	rule: '排序号:required;length[~8];'
 | 
			
		||||
            },
 | 
			
		||||
            payDeposit: {
 | 
			
		||||
            	tip: "请输入质保金",
 | 
			
		||||
            	rule: '分类的质保金:required;length[~20];'
 | 
			
		||||
            },
 | 
			
		||||
	    },
 | 
			
		||||
	    valid: function(form){
 | 
			
		||||
	        var params = WST.getParams('.ipt');
 | 
			
		||||
	        params.id = id;
 | 
			
		||||
	        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    		$.post(WST.U('admin/goodscats/'+((id>0)?"edit":"add")),params,function(data,textStatus){
 | 
			
		||||
    			  layer.close(loading);
 | 
			
		||||
    			  var json = WST.toAdminJson(data);
 | 
			
		||||
    			  if(json.status=='1'){
 | 
			
		||||
    			    	WST.msg(json.msg,{icon:1});
 | 
			
		||||
    			    	$('#goodscatsBox').hide();
 | 
			
		||||
    			    	layer.close(box);
 | 
			
		||||
    			    	grid.reload(params.parentId);
 | 
			
		||||
    			  }else{
 | 
			
		||||
    			        WST.msg(json.msg,{icon:2});
 | 
			
		||||
    			  }
 | 
			
		||||
    		});
 | 
			
		||||
	    }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toDel(pid,id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该商品分类并下架该分类下的所有商品吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/goodscats/del'),{id:id},function(data,textStatus){
 | 
			
		||||
	           			  layer.close(loading);
 | 
			
		||||
	           			  var json = WST.toAdminJson(data);
 | 
			
		||||
	           			  if(json.status=='1'){
 | 
			
		||||
	           			       WST.msg(json.msg,{icon:1});
 | 
			
		||||
	           			       layer.close(box);
 | 
			
		||||
	           		           grid.reload(pid);
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			       WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function initUpload(){
 | 
			
		||||
	isInitUpload = true;
 | 
			
		||||
	//文件上传
 | 
			
		||||
	WST.upload({
 | 
			
		||||
	    pick:'#catFilePicker',
 | 
			
		||||
	    formData: {dir:'goodscats'},
 | 
			
		||||
	    accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
 | 
			
		||||
	    callback:function(f){
 | 
			
		||||
	      var json = WST.toAdminJson(f);
 | 
			
		||||
	      if(json.status==1){
 | 
			
		||||
	        $('#uploadMsg').empty().hide();
 | 
			
		||||
	        //将上传的图片路径赋给全局变量
 | 
			
		||||
		    $('#catImg').val(json.savePath+json.name);
 | 
			
		||||
		    $('#preview').html('<img src="'+WST.conf.IMGURL+'/'+json.savePath+json.thumb+'" height="75" />');
 | 
			
		||||
	      }else{
 | 
			
		||||
	      	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	      }
 | 
			
		||||
	  },
 | 
			
		||||
	  progress:function(rate){
 | 
			
		||||
	      $('#uploadMsg').show().html('已上传'+rate+"%");
 | 
			
		||||
	  }
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editName(id,obj){
 | 
			
		||||
	if($.trim(obj.value)=='' || $.trim(obj.value)==oldData[id]){
 | 
			
		||||
		obj.value = oldData[id];
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	$.post(WST.U('admin/goodscats/editName'),{id:id,catName:obj.value},function(data,textStatus){
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
	    if(json.status=='1'){
 | 
			
		||||
	    	oldData[id] = $.trim(obj.value);
 | 
			
		||||
	        WST.msg(json.msg,{icon:1});
 | 
			
		||||
	    }else{
 | 
			
		||||
	        WST.msg(json.msg,{icon:2});
 | 
			
		||||
	    }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
function editOrder(id,obj){
 | 
			
		||||
	if($.trim(obj.value)=='' || $.trim(obj.value)==editOrder[id]){
 | 
			
		||||
		obj.value = editOrder[id];
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	$.post(WST.U('admin/goodscats/editOrder'),{id:id,catSort:obj.value},function(data,textStatus){
 | 
			
		||||
	    var json = WST.toAdminJson(data);
 | 
			
		||||
	    if(json.status=='1'){
 | 
			
		||||
	    	editOrder[id] = $.trim(obj.value);
 | 
			
		||||
	        WST.msg(json.msg,{icon:1});
 | 
			
		||||
	    }else{
 | 
			
		||||
	        WST.msg(json.msg,{icon:2});
 | 
			
		||||
	    }
 | 
			
		||||
	});
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										80
									
								
								hyhproject/admin/view/goodscats/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,80 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="css"}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/js/wstgridtree.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/goodscats/goodscats.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<style>.mmGrid{border-bottom:0px;}</style>
 | 
			
		||||
{if WSTGrant('SPFL_01')}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
   <button class="btn btn-success f-right" onclick='javascript:toEdit(0)'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   <div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
{/if}
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
 <div class='mmGrid layui-form' id="maingrid"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='goodscatsBox' style='display:none' class='layui-form'>
 | 
			
		||||
  <form id='goodscatsForm' autocomplete="off">
 | 
			
		||||
  <input type='hidden' id='parentId' name="parentId" class='ipt'/>
 | 
			
		||||
  <table class='wst-form wst-box-top'>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>商品分类名称<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='catName' name="catName" class='ipt' maxLength='20' style='width:200px;'/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
          <th>图标:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <div id='catFilePicker'>上传图标</div><span id='uploadMsg'></span>
 | 
			
		||||
            <input type='hidden' id='catImg' name="catImg" class="ipt" />
 | 
			
		||||
            
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>预览图:</th>
 | 
			
		||||
          <td><div style="min-height:70px;" id="preview"></div></td>
 | 
			
		||||
       </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>佣金<font color='red'>*</font>:</th>
 | 
			
		||||
        <td height='24'>
 | 
			
		||||
            <input type="text" id="commissionRate" name="commissionRate" class="ipt" value="-1" data-target="#msg_commissionRate" size='7' class='ipt'>%<span id='msg_commissionRate'>(-1代表继承上级佣金)</span>
 | 
			
		||||
        </td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>应交质保金<font color='red'>*</font>:</th>
 | 
			
		||||
        <td height='50'>
 | 
			
		||||
            <input type="text" id="payDeposit" name="payDeposit" class="ipt" value="-1" data-target="#payDeposit" size='7' class='ipt'><span id='payDeposit'>(-1代表继承上级质保金)</span>
 | 
			
		||||
        </td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>是否显示<font color='red'>*</font>:</th>
 | 
			
		||||
        <td height='24'>
 | 
			
		||||
           <input type="checkbox" id="isShow" name="isShow" value="1" class="ipt" lay-skin="switch" lay-filter="isShow1" lay-text="显示|隐藏">
 | 
			
		||||
        </td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>是否首页楼层<font color='red'>*</font>:</th>
 | 
			
		||||
        <td height='24'>
 | 
			
		||||
           <input type="checkbox" id="isFloor" name="isFloor" value="1" class="ipt" lay-skin="switch" lay-filter="isFloor1" lay-text="是|否">
 | 
			
		||||
        </td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>楼层副标题<font color='red'> </font>:</th>
 | 
			
		||||
        <td><input type='text' id='subTitle' name='subTitle' class='ipt' style='width:200px;' /></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
     <tr>
 | 
			
		||||
        <th width='100'>排序号<font color='red'>*</font>:</th>
 | 
			
		||||
        <td><input type='text' id='catSort' name='catSort' class='ipt' style='width:60px;' onkeypress='return WST.isNumberKey(event);' onkeyup="javascript:WST.isChinese(this,1)" maxLength='10' value='0'/></td>
 | 
			
		||||
     </tr>
 | 
			
		||||
  </table>
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										46
									
								
								hyhproject/admin/view/goodsclassify/catdetail.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,46 @@
 | 
			
		||||
{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__/goodsclassify/goodsclassify.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<input type='hidden' id="classifyId" value='{$id}'/>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
 | 
			
		||||
{if WSTGrant('DQGL_01')}
 | 
			
		||||
  <button class="btn btn-primary f-right btn-mright" onclick='javascript:toEdits(0,{$id})'><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
  {/if}
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='attrBox' style='display:none'>
 | 
			
		||||
	<form id="attrForm">
 | 
			
		||||
		<table class='wst-form wst-box-top'>
 | 
			
		||||
		  <tr>
 | 
			
		||||
		      <th width='150'>
 | 
			
		||||
		      	<input type="hidden" id="classifyId" value='{$id}' class="ipt" />
 | 
			
		||||
		    	 所属商品分类<font color='red'>*</font>:</th>
 | 
			
		||||
		     	<td id="bcat_0_box">
 | 
			
		||||
		            <select  id="catId" class='ipt goodsCats' level="0" onchange="WST.ITGoodsCats({id:'bcat_0',val:this.value,isRequire:false,className:'goodsCats'});" data-rule='所属商品分类:required;' data-target="#msg_bcat_0">
 | 
			
		||||
		                <option value="">-请选择-</option>
 | 
			
		||||
		                {volist name=":WSTGoodsCats(0)" id="vo"}
 | 
			
		||||
				        <option value="{$vo['catId']}">{$vo['catName']}</option>
 | 
			
		||||
				        {/volist}
 | 
			
		||||
		           	</select>
 | 
			
		||||
		           	<span class='msg-box' id='msg_bcat_0' style='color:red;'>(至少选择一个商品分类)</span>
 | 
			
		||||
		          </td>
 | 
			
		||||
		       </tr>
 | 
			
		||||
		</table>
 | 
			
		||||
	</form>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initcatDetailGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										52
									
								
								hyhproject/admin/view/goodsclassify/cats.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,52 @@
 | 
			
		||||
{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__/goodsclassify/goodsclassify.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
    {$classify} : 查看活动分类页
 | 
			
		||||
    <input type="hidden" value="{$classifyId}" id="classifyId">
 | 
			
		||||
    <button class="btn btn-primary f-right btn-mright" onclick='javascript:toAddCats(0,{$classifyId})'><i class='fa'></i>新增活动</button>
 | 
			
		||||
    <button class="btn btn-info f-right btn-mright" onclick='javascript:history.back()'><i class='fa'></i>返回</button>
 | 
			
		||||
    <div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='attrBox' style='display:none'>
 | 
			
		||||
    <form id="attrForm">
 | 
			
		||||
        <table class='wst-form wst-box-top'>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <th width='150'>
 | 
			
		||||
                    活动名称<font color='red'>*</font>:</th>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <input type="text" name="recomName" id="recomName" placeholder="填写分类名称" class="jipt">
 | 
			
		||||
                </td></tr>
 | 
			
		||||
            <tr >
 | 
			
		||||
                <th width='150' >排序号码<font color='red'>*</font>:</th>
 | 
			
		||||
                <td >
 | 
			
		||||
                    <input type="text" name="recomOrder" class="jipt" id="recomOrder" placeholder="填写排序序号" style="margin-top: 20px;">
 | 
			
		||||
                    <p>排序号越大越靠前</p>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr class="wst-order-rate" >
 | 
			
		||||
                <th width='120'>有效时间<font color='red'>*</font>:</th>
 | 
			
		||||
                <td colspan='3'>
 | 
			
		||||
                    <input type='text' id='startTime' name='startTime' class='jipt laydate-icon'  onclick="laydate({format: 'YYYY-MM-DD hh:mm:ss',istime:true})"  data-rule="开始日期: required;datetime;"/>
 | 
			
		||||
                    至
 | 
			
		||||
                    <input type='text' id='endTime' name='endTime' class='jipt laydate-icon'  onclick="laydate({format: 'YYYY-MM-DD hh:mm:ss',istime:true})" data-rule="结束日期: required;datetime;match(gt, startTime, datetime)"/>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
    </form>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initCatsGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										25
									
								
								hyhproject/admin/view/goodsclassify/detail.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,25 @@
 | 
			
		||||
{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__/goodsclassify/goodsclassify.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<input type='hidden' id="catId" value='{$id}'/>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
 | 
			
		||||
$(function(){initDetailGrid();})
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										494
									
								
								hyhproject/admin/view/goodsclassify/goodsclassify.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,494 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
//获取商品总分类首页
 | 
			
		||||
function initGrid(){  
 | 
			
		||||
  var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
        {title:'商品名称', name:'goodsclassifyName', width: 160,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
            return "<span ><p class='wst-nowrap'>"+item['goodsclassifyName']+"</p></span>";
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'排序',name:'orderby',width:100,sortale:true},
 | 
			
		||||
        {title:'时间',name:'create_time',width:100,sortale:true},
 | 
			
		||||
        {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
            var h = "";
 | 
			
		||||
          h += "<a class='btn btn-blue' target='_blank' href='javascript:catdetail(" + item['goodsclassifyId'] + ")'><i class='fa fa-search'></i>绑定分类</a> ";
 | 
			
		||||
          if(WST.GRANT.DSHSP_04)h += "<a class='btn btn-blue' href='javascript:toEdit(" + item['goodsclassifyId'] + ",0)'><i class='fa fa-check'></i>修改</a> ";
 | 
			
		||||
          if(WST.GRANT.DSHSP_04)h += "<a class='btn btn-blue' target='_blank' href='javascript:muji(" + item['goodsclassifyId'] + ")'><i class='fa fa-search'></i>设置活动页</a> ";
 | 
			
		||||
          if(WST.GRANT.DSHSP_03)h += "<a class='btn btn-red' href='javascript:del(" + item['goodsclassifyId'] + ",0)'><i class='fa fa-trash-o'></i>删除</a>";
 | 
			
		||||
          return h;
 | 
			
		||||
        }}
 | 
			
		||||
        ];
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol:true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsclassify/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//-修改商品总分类---------------//
 | 
			
		||||
function toEdit(goodsclassifyId){
 | 
			
		||||
    $('#attrForm').get(0).reset();
 | 
			
		||||
    $.post(WST.U('admin/goodsclassify/get'),{goodsclassifyId:goodsclassifyId},function(data,textStatus){
 | 
			
		||||
        var json = WST.toAdminJson(data);
 | 
			
		||||
        WST.setValues(json);
 | 
			
		||||
        var title =(goodsclassifyId==0)?"新增":"编辑";
 | 
			
		||||
        var box = WST.open({title:title,type:1,content:$('#attrBox'),area: ['750px', '320px'],btn:['确定','取消'],
 | 
			
		||||
            end:function(){$('#attrBox').hide();},yes:function(){
 | 
			
		||||
                $('#attrForm').submit();
 | 
			
		||||
            }});
 | 
			
		||||
        $('#attrForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                'goodsclassifyName': {rule:"required",msg:{required:'请输入属性名称'}},
 | 
			
		||||
            },
 | 
			
		||||
            valid: function(form){
 | 
			
		||||
                var params = WST.getParams('.ipt');
 | 
			
		||||
                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
                $.post(WST.U('admin/goodsclassify/'+((params.goodsclassifyId==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
                    layer.close(loading);
 | 
			
		||||
                    var json = WST.toAdminJson(data);
 | 
			
		||||
                    if(json.status=='1'){
 | 
			
		||||
                        WST.msg("操作成功",{icon:1});
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                        $('#attrBox').hide();
 | 
			
		||||
                        loadGrid();
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                    }else{
 | 
			
		||||
                        WST.msg(json.msg,{icon:2});
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//删除商品总分类
 | 
			
		||||
function del(goodsclassifyId){
 | 
			
		||||
    var box = WST.confirm({content:"您确定要删除该属性吗?",yes:function(){
 | 
			
		||||
        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
        $.post(WST.U('admin/goodsclassify/del'),{goodsclassifyId:goodsclassifyId},function(data,textStatus){
 | 
			
		||||
            layer.close(loading);
 | 
			
		||||
            var json = WST.toAdminJson(data);
 | 
			
		||||
            if(json.status=='1'){
 | 
			
		||||
                WST.msg("操作成功",{icon:1});
 | 
			
		||||
                layer.close(box);
 | 
			
		||||
                loadGrid();
 | 
			
		||||
            }else{
 | 
			
		||||
                WST.msg(json.msg,{icon:2});
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
//查看总分类下的商品分类
 | 
			
		||||
function catdetail(goodsclassifyId){
 | 
			
		||||
    location.href=WST.U('admin/goodsclassify/catdetail','goodsclassifyId='+goodsclassifyId);
 | 
			
		||||
}
 | 
			
		||||
//获取商品分类的列表
 | 
			
		||||
function initcatDetailGrid(){
 | 
			
		||||
    var classifyId=$('#classifyId').val();
 | 
			
		||||
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
        {title:'商品名称', name:'catName', width: 160,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
            return "<span ><p class='wst-nowrap'>"+item['catName']+"</p></span>";
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'时间',name:'createTime',width:100,sortale:true},
 | 
			
		||||
        {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
            var h = "";
 | 
			
		||||
            h += "<a class='btn btn-blue' target='_blank' href='javascript:detail(" + item['catId'] + ")'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
            if(WST.GRANT.DSHSP_03)h += "<a class='btn btn-red' href='javascript:catDel(" + item['catId'] + ","+classifyId+")'><i class='fa fa-trash-o'></i>删除</a>";
 | 
			
		||||
            return h;
 | 
			
		||||
        }}
 | 
			
		||||
    ];
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol:true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsclassify/catdetailPage','classifyId='+classifyId), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//查看总分类下的商品
 | 
			
		||||
function detail(catId){
 | 
			
		||||
    location.href=WST.U('admin/goodsclassify/detail','catId='+catId);
 | 
			
		||||
}
 | 
			
		||||
//
 | 
			
		||||
function initDetailGrid(){
 | 
			
		||||
    var catId=$('#catId').val();
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
        {title:' ', name:'goodsImg', width: 30, renderer: function(val,item,rowIndex){
 | 
			
		||||
            var thumb = item['goodsImg'];
 | 
			
		||||
            //thumb = thumb.replace('.','_thumb.');
 | 
			
		||||
            return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+thumb+"/thumb80"
 | 
			
		||||
                +"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'商品名称', name:'goodsName', width: 160,sortable:true,renderer: function(val,item,rowIndex){
 | 
			
		||||
            return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'商品编号', name:'goodsSn' ,width:60,sortable:true},
 | 
			
		||||
        {title:'价格', name:'shopPrice' ,width:20,sortable:true, renderer: function(val,item,rowIndex){
 | 
			
		||||
            return '¥'+item['shopPrice'];
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'所属店铺', name:'shopName' ,width:60,sortable:true},
 | 
			
		||||
        {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){
 | 
			
		||||
            return "<span  ><p class='wst-nowrap'>"+item['goodsCatName']+"</p></span>";
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'销量', name:'saleNum' ,width:20,sortable:true,align:'center'},
 | 
			
		||||
        {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
            var h = "";
 | 
			
		||||
            h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
 | 
			
		||||
            return h;
 | 
			
		||||
        }}
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsclassify/detailByPage','catId='+catId), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//给商品总分类新增商品分类
 | 
			
		||||
function toEdits(catId,classifyId){
 | 
			
		||||
    $('#attrForm').get(0).reset();
 | 
			
		||||
    $.post(WST.U('admin/goodsclassify/gets'),{catId:catId,classifyId:classifyId},function(data,textStatus){
 | 
			
		||||
        var json = WST.toAdminJson(data);
 | 
			
		||||
        WST.setValues(json);
 | 
			
		||||
        var title =(catId==0)?"新增":"编辑";
 | 
			
		||||
        var box = WST.open({title:title,type:1,content:$('#attrBox'),area: ['750px', '320px'],btn:['确定','取消'],
 | 
			
		||||
            end:function(){$('#attrBox').hide();},yes:function(){
 | 
			
		||||
                $('#attrForm').submit();
 | 
			
		||||
            }});
 | 
			
		||||
        $('#attrForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                'goodsclassifyName': {rule:"required",msg:{required:'请输入属性名称'}},
 | 
			
		||||
            },
 | 
			
		||||
            valid: function(form){
 | 
			
		||||
                var params = WST.getParams('.ipt');
 | 
			
		||||
                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
                $.post(WST.U('admin/goodsclassify/add_cat'),params,function(data,textStatus){
 | 
			
		||||
                    layer.close(loading);
 | 
			
		||||
                    var json = WST.toAdminJson(data);
 | 
			
		||||
                    if(json.status=='1'){
 | 
			
		||||
                        WST.msg("操作成功",{icon:1});
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                        $('#attrBox').hide();
 | 
			
		||||
                        loadGrid();
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                    }else{
 | 
			
		||||
                        WST.msg(json.msg,{icon:2});
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//删除商品总分类下的商品分类
 | 
			
		||||
function catDel(catId,classifyId){
 | 
			
		||||
    var box = WST.confirm({content:"您确定要删除该属性吗?",yes:function(){
 | 
			
		||||
        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
        $.post(WST.U('admin/goodsclassify/catdel'),{catId:catId,classifyId:classifyId},function(data,textStatus){
 | 
			
		||||
            layer.close(loading);
 | 
			
		||||
            var json = WST.toAdminJson(data);
 | 
			
		||||
            if(json.status=='1'){
 | 
			
		||||
                WST.msg("操作成功",{icon:1});
 | 
			
		||||
                layer.close(box);
 | 
			
		||||
                loadGrid();
 | 
			
		||||
            }else{
 | 
			
		||||
                WST.msg(json.msg,{icon:2});
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
//去往设置活动页
 | 
			
		||||
function muji(goodsclassifyId){
 | 
			
		||||
    location.href=WST.U('admin/goodsclassify/setdetail','goodsclassifyId='+goodsclassifyId);
 | 
			
		||||
}
 | 
			
		||||
//获取活动页列表
 | 
			
		||||
function initsetDetailGrid(){
 | 
			
		||||
    var classifyId=$('#classifyId').val();
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
        {title:'商品ID',name:'goodsId',width:30,sortale:true},
 | 
			
		||||
        {title:'商品名称', name:'goodsName', width: 180,sortable:true},
 | 
			
		||||
        {title:'商品分类',name:'recomName',width:60,sortale:true},
 | 
			
		||||
        {title:'排序',name:'goodsOrder',width:40,sortale:true,align:'center',renderer:function(val, item, rowIndex){
 | 
			
		||||
            return '<span style="cursor:pointer;" ondblclick="changeSort(this,'+item["recomGoodsId"]+');">'+val+'</span>';
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'价格',name:'shopPrice',width:50,sortale:true,align:'center'},
 | 
			
		||||
        {title:'时间',name:'createTime',width:100,sortale:true,align:'center'},
 | 
			
		||||
        {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
            var h = "";
 | 
			
		||||
            h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
            if(WST.GRANT.DSHSP_03)h += "<a class='btn btn-red' href='javascript:goodsDel(" + item['recomGoodsId'] + ")'><i class='fa fa-trash-o'></i>删除</a>";
 | 
			
		||||
            return h;
 | 
			
		||||
        }}
 | 
			
		||||
    ];
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol:true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsclassify/setdetailPage','classifyId='+classifyId), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
    var params = WST.getParams('.j-ipt');
 | 
			
		||||
    params.page = 1;
 | 
			
		||||
    mmg.load(params);
 | 
			
		||||
}
 | 
			
		||||
//删除活动分类的商品
 | 
			
		||||
function goodsDel(recomGoodsId){
 | 
			
		||||
    var box = WST.confirm({content:"您确定要删除该属性吗?",yes:function(){
 | 
			
		||||
        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
        $.post(WST.U('admin/goodsclassify/goodsDel'),{recomGoodsId:recomGoodsId},function(data,textStatus){
 | 
			
		||||
            layer.close(loading);
 | 
			
		||||
            var json = WST.toAdminJson(data);
 | 
			
		||||
            if(json.status=='1'){
 | 
			
		||||
                WST.msg("操作成功",{icon:1});
 | 
			
		||||
                layer.close(box);
 | 
			
		||||
                loadGrid();
 | 
			
		||||
            }else{
 | 
			
		||||
                WST.msg(json.msg,{icon:2});
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
//查看活动页的活动分类
 | 
			
		||||
function cats(classifyId){
 | 
			
		||||
    location.href=WST.U('admin/goodsclassify/cats','classifyId='+classifyId);
 | 
			
		||||
}
 | 
			
		||||
//  查看、新增活动页的活动分类列表
 | 
			
		||||
function initCatsGrid(){
 | 
			
		||||
    var classifyId=$('#classifyId').val();
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
        {title:'所属分类', name:'goodsclassifyName' ,width:60,sortable:true},
 | 
			
		||||
        {title:'活动名称', name:'recomName', width: 60,sortable:true},
 | 
			
		||||
        {title:'活动排序', name:'recomOrder' ,width:60,sortable:true,align:'center'},
 | 
			
		||||
        {title:'开始时间', name:'startTime' ,width:80,sortable:true,align:'center'},
 | 
			
		||||
        {title:'结束时间', name:'endTime' ,width:80,sortable:true,align:'center'},
 | 
			
		||||
        {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
            var h = "";
 | 
			
		||||
            h += "<a class='btn btn-blue' target='_blank'href='javascript:toAddCats(" + item['recomId'] + ")'><i class='fa fa-check'></i>修改</a> ";
 | 
			
		||||
            h += "<a class='btn btn-blue' target='_blank'href='javascript:catsDel(" + item['recomId'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
            return h;
 | 
			
		||||
        }}
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsclassify/catsPage','classifyId='+classifyId), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc',
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//添加活动页的活动分类
 | 
			
		||||
function toAddCats(recomId,classifyId){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startTime',
 | 
			
		||||
        type: 'datetime'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endTime',
 | 
			
		||||
        type: 'datetime'
 | 
			
		||||
    });
 | 
			
		||||
    $('#attrForm').get(0).reset();
 | 
			
		||||
    $.post(WST.U('admin/goodsclassify/getCats'),{recomId:recomId},function(data,textStatus){
 | 
			
		||||
        var json = WST.toAdminJson(data);
 | 
			
		||||
        WST.setValues(json);
 | 
			
		||||
        layui.form.render();
 | 
			
		||||
        var title =(recomId==0)?"新增":"编辑";
 | 
			
		||||
        var box = WST.open({title:title,type:1,content:$('#attrBox'),area: ['750px', '320px'],btn:['确定','取消'],
 | 
			
		||||
            end:function(){$('#attrBox').hide();},yes:function(){
 | 
			
		||||
                $('#attrForm').submit();
 | 
			
		||||
            }});
 | 
			
		||||
        $('#attrForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                'goodsclassifyName': {rule:"required",msg:{required:'请输入属性名称'}},
 | 
			
		||||
            },
 | 
			
		||||
            valid: function(form){
 | 
			
		||||
                var params = WST.getParams('.jipt');
 | 
			
		||||
                params.classifyId=classifyId;
 | 
			
		||||
                params.recomId=recomId;
 | 
			
		||||
                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
                $.post(WST.U('admin/goodsclassify/'+((params.recomId==0)?"addCats":"editCats")),params,function(data,textStatus){
 | 
			
		||||
                    layer.close(loading);
 | 
			
		||||
                    var json = WST.toAdminJson(data);
 | 
			
		||||
                    if(json.status=='1'){
 | 
			
		||||
                        WST.msg("操作成功",{icon:1});
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                        $('#attrBox').hide();
 | 
			
		||||
                        loadGrid();
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                    }else{
 | 
			
		||||
                        WST.msg(json.msg,{icon:2});
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//删除活动设置页的活动分类
 | 
			
		||||
function catsDel(recomId){
 | 
			
		||||
    var box = WST.confirm({content:"您确定要删除该属性吗?",yes:function(){
 | 
			
		||||
        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
        $.post(WST.U('admin/goodsclassify/catsDel'),{recomId:recomId},function(data,textStatus){
 | 
			
		||||
            layer.close(loading);
 | 
			
		||||
            var json = WST.toAdminJson(data);
 | 
			
		||||
            if(json.status=='2'){
 | 
			
		||||
                var con = WST.confirm({content:"此活动下有活动商品,确定连活动商品一起删除吗",yes:function(){
 | 
			
		||||
                    $.post(WST.U('admin/goodsclassify/catsDel'),{recomId:recomId,m:2},function(data,textStatus){
 | 
			
		||||
                        var js= WST.toAdminJson(data);
 | 
			
		||||
                        if(js.status=='1'){
 | 
			
		||||
                            WST.msg("操作成功",{icon:1});
 | 
			
		||||
                            layer.close(con);
 | 
			
		||||
                            loadGrid();
 | 
			
		||||
                        }else{
 | 
			
		||||
                            WST.msg(js.msg,{icon:2});
 | 
			
		||||
                        }
 | 
			
		||||
                    })
 | 
			
		||||
                }})
 | 
			
		||||
            }else if(json.status=='1'){
 | 
			
		||||
                WST.msg("操作成功",{icon:1});
 | 
			
		||||
                layer.close(box);
 | 
			
		||||
                loadGrid();
 | 
			
		||||
            }else{
 | 
			
		||||
                WST.msg(json.msg,{icon:2});
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//查看设置活动页的推荐商品
 | 
			
		||||
function recom(goodsclassifyId){
 | 
			
		||||
    location.href=WST.U('admin/goodsclassify/recom','goodsclassifyId='+goodsclassifyId);
 | 
			
		||||
}
 | 
			
		||||
//设置活动页、推荐商品的商品列表
 | 
			
		||||
function initrecomDetailGrid(){
 | 
			
		||||
    var classifyId=$('#classifyId').val();
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
        {title:'商品ID',name:'goodsId',width:30,sortale:true},
 | 
			
		||||
        {title:'商品名称', name:'goodsName', width: 180,sortable:true},
 | 
			
		||||
        {title:'排序',name:'goodsOrder',width:100,sortale:true,align:'center',renderer:function(val, item, rowIndex){
 | 
			
		||||
            return '<span style="cursor:pointer;" ondblclick="changeSort(this,'+item["recomActiveId"]+');">'+val+'</span>';
 | 
			
		||||
        }},
 | 
			
		||||
        {title:'价格',name:'shopPrice',width:100,sortale:true,align:'center'},
 | 
			
		||||
        {title:'时间',name:'createTime',width:100,sortale:true,align:'center'},
 | 
			
		||||
        {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
            var h = "";
 | 
			
		||||
            h += "<a class='btn btn-blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><i class='fa fa-search'></i>查看</a> ";
 | 
			
		||||
            if(WST.GRANT.DSHSP_03)h += "<a class='btn btn-red' href='javascript:recomActiveDel(" + item['recomActiveId'] + ")'><i class='fa fa-trash-o'></i>删除</a>";
 | 
			
		||||
            return h;
 | 
			
		||||
        }}
 | 
			
		||||
    ];
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol:true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsclassify/recomPage','classifyId='+classifyId), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//删除活动分类的商品
 | 
			
		||||
function recomActiveDel(recomActiveId){
 | 
			
		||||
    var box = WST.confirm({content:"您确定要删除该属性吗?",yes:function(){
 | 
			
		||||
        var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
        $.post(WST.U('admin/goodsclassify/recomActiveDel'),{recomActiveId:recomActiveId},function(data,textStatus){
 | 
			
		||||
            layer.close(loading);
 | 
			
		||||
            var json = WST.toAdminJson(data);
 | 
			
		||||
            if(json.status=='1'){
 | 
			
		||||
                WST.msg("操作成功",{icon:1});
 | 
			
		||||
                layer.close(box);
 | 
			
		||||
                loadGrid();
 | 
			
		||||
            }else{
 | 
			
		||||
                WST.msg(json.msg,{icon:2});
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//添加设置活动页的推荐商品
 | 
			
		||||
function mujiGoods(recomActiveId,classifyId){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    $('#goodsForm').get(0).reset();
 | 
			
		||||
    $.post(WST.U('admin/goodsclassify/getrecomActive'),{recomActiveId:recomActiveId},function(data,textStatus){
 | 
			
		||||
        var json = WST.toAdminJson(data);
 | 
			
		||||
        WST.setValues(json);
 | 
			
		||||
        var title ="新增";
 | 
			
		||||
        var box = WST.open({title:title,type:1,content:$('#goodsBox'),area: ['750px', '320px'],btn:['确定','取消'],
 | 
			
		||||
            end:function(){$('#goodsBox').hide();},yes:function(){
 | 
			
		||||
                $('#goodsForm').submit();
 | 
			
		||||
            }});
 | 
			
		||||
        $('#goodsForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                'goodsclassifyName': {rule:"required",msg:{required:'请输入属性名称'}},
 | 
			
		||||
            },
 | 
			
		||||
            valid: function(form){
 | 
			
		||||
                var params = WST.getParams('.ipt');
 | 
			
		||||
                params.classifyId=classifyId;
 | 
			
		||||
                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
                $.post(WST.U('admin/goodsclassify/addrecomActive'),params,function(data,textStatus){
 | 
			
		||||
                    layer.close(loading);
 | 
			
		||||
                    var json = WST.toAdminJson(data);
 | 
			
		||||
                    if(json.status=='1'){
 | 
			
		||||
                        WST.msg("操作成功",{icon:1});
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                        $('#goodsBox').hide();
 | 
			
		||||
                        loadGrid();
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                    }else{
 | 
			
		||||
                        WST.msg(json.msg,{icon:2});
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
//姓曾活动设置页/活动商品
 | 
			
		||||
function toAddGoods(recomGoodsId){
 | 
			
		||||
    var laydate = layui.laydate;
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#startTime',
 | 
			
		||||
        type: 'datetime'
 | 
			
		||||
    });
 | 
			
		||||
    laydate.render({
 | 
			
		||||
        elem: '#endTime',
 | 
			
		||||
        type: 'datetime'
 | 
			
		||||
    });
 | 
			
		||||
    $('#goodsForm').get(0).reset();
 | 
			
		||||
    $.post(WST.U('admin/goodsclassify/getGoods'),{recomGoodsId:recomGoodsId},function(data,textStatus){
 | 
			
		||||
        var json = WST.toAdminJson(data);
 | 
			
		||||
        WST.setValues(json);
 | 
			
		||||
        var title ="新增";
 | 
			
		||||
        var box = WST.open({title:title,type:1,content:$('#goodsBox'),area: ['750px', '320px'],btn:['确定','取消'],
 | 
			
		||||
            end:function(){$('#goodsBox').hide();},yes:function(){
 | 
			
		||||
                $('#goodsForm').submit();
 | 
			
		||||
            }});
 | 
			
		||||
        $('#goodsForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                'recomId': {rule:"required",msg:{required:'请选择分类名称'}},
 | 
			
		||||
            },
 | 
			
		||||
            valid: function(form){
 | 
			
		||||
                var params = WST.getParams('.ipt');
 | 
			
		||||
                var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
                $.post(WST.U('admin/goodsclassify/addGoods'),params,function(data,textStatus){
 | 
			
		||||
                    layer.close(loading);
 | 
			
		||||
                    var json = WST.toAdminJson(data);
 | 
			
		||||
                    if(json.status=='1'){
 | 
			
		||||
                        WST.msg("操作成功",{icon:1});
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                        $('#attrBox').hide();
 | 
			
		||||
                        loadGrid();
 | 
			
		||||
                        layer.close(box);
 | 
			
		||||
                    }else{
 | 
			
		||||
                        WST.msg(json.msg,{icon:2});
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										48
									
								
								hyhproject/admin/view/goodsclassify/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,48 @@
 | 
			
		||||
{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__/goodsclassify/goodsclassify.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
{if WSTGrant('SPSX_01')}
 | 
			
		||||
   <button class="btn btn-primary f-right" onclick="javascript:toEdit(0);"><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
 | 
			
		||||
<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 id='attrBox' style='display:none'>
 | 
			
		||||
  <form id="attrForm">
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
          <tr>
 | 
			
		||||
            <th width='150'>
 | 
			
		||||
              <input type="hidden" id="goodsclassifyId" value="" class="ipt" />
 | 
			
		||||
             商品总分类ID<font color='red'>*</font>:</th>
 | 
			
		||||
          </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <th>商品总分类名称<font color='red'>*</font>:</th>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="text" id="goodsclassifyName" name="goodsclassifyName" class="ipt" maxLength='20'/>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <th>商品分类序号<font>*</font>:</th>
 | 
			
		||||
            <td>
 | 
			
		||||
                <input type="text" id="orderby" name="orderby" class="ipt" maxLength='20'/>
 | 
			
		||||
                数字越大越靠前
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										67
									
								
								hyhproject/admin/view/goodsclassify/recom.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,67 @@
 | 
			
		||||
{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__/goodsclassify/goodsclassify.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<input type='hidden' id="classifyId" value='{$id}'/>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
	{$result} : 推荐商品详情页
 | 
			
		||||
	<input type="text" name="goodsId"  placeholder='商品ID' id="goodsId" class='j-ipt' style="width: 100px;margin-left: 20px;"/>
 | 
			
		||||
	<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
{if WSTGrant('DQGL_01')}
 | 
			
		||||
	<button class="btn btn-primary f-right btn-mright" onclick='javascript:mujiGoods(0,{$id})'><i class='fa fa-plus'></i>新增商品</button>
 | 
			
		||||
	<button class="btn btn-info f-right btn-mright" onclick='javascript:history.back()'><i class='fa'></i>返回</button>
 | 
			
		||||
	{/if}
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='goodsBox' style='display:none'>
 | 
			
		||||
	<form id="goodsForm">
 | 
			
		||||
		<table class='wst-form wst-box-top'>
 | 
			
		||||
			<tr >
 | 
			
		||||
				<th width='150'>填写商品ID<font color='red'>*</font>:</th>
 | 
			
		||||
				<td >
 | 
			
		||||
					<textarea type="text" name="goodsId" class="ipt" id="goodsId" placeholder="填写商品ID:批量添加商品,请用英文逗号隔开" style="margin-top: 10px;height: 100px;">
 | 
			
		||||
					</textarea>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
		</table>
 | 
			
		||||
	</form>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
	var oldSort;
 | 
			
		||||
	function changeSort(t,id){
 | 
			
		||||
		//alert(id);
 | 
			
		||||
		$(t).attr('ondblclick'," ");
 | 
			
		||||
		var html = "<input type='text' id='sort-"+id+"' style='width:40px;' onblur='doneChange(this,"+id+")' value='"+$(t).html()+"' />";
 | 
			
		||||
		$(t).html(html);
 | 
			
		||||
		$('#sort-'+id).focus();
 | 
			
		||||
		$('#sort-'+id).select();
 | 
			
		||||
		oldSort = $(t).html();
 | 
			
		||||
	}
 | 
			
		||||
	function doneChange(t,id){
 | 
			
		||||
		var sort = ($(t).val()=='')?0:$(t).val();
 | 
			
		||||
		if(sort==oldSort){
 | 
			
		||||
			$(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
			$(t).parent().html(parseInt(sort));
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
		$.post(WST.U('admin/goodsclassify/changeRecom'),{id:id,goodsOrder:sort},function(data){
 | 
			
		||||
			var json = WST.toAdminJson(data);
 | 
			
		||||
			if(json.status==1){
 | 
			
		||||
				$(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
				$(t).parent().html(parseInt(sort));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
$(function(){initrecomDetailGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										86
									
								
								hyhproject/admin/view/goodsclassify/setdetail.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,86 @@
 | 
			
		||||
{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__/goodsclassify/goodsclassify.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<input type='hidden' id="classifyId" value='{$id}'/>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
	{$result}活动页
 | 
			
		||||
	<select name="recomId" id="recomId" style="margin-left: 20px;" class='j-ipt'>
 | 
			
		||||
		<option value="">请选择</option>
 | 
			
		||||
		{volist name="classify" id="vo"}
 | 
			
		||||
		<option value="{$vo['recomId']}">{$vo['recomName']}</option>
 | 
			
		||||
		{/volist}
 | 
			
		||||
	</select>
 | 
			
		||||
	<input type="text" name="goodsId"  placeholder='商品ID' id="goodsId" class='j-ipt' style="width: 100px;"/>
 | 
			
		||||
	<button class="btn btn-primary" onclick='javascript:loadGrid(0)'><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
{if WSTGrant('DQGL_01')}
 | 
			
		||||
	<button class="btn btn-info f-right btn-mright" onclick='javascript:cats({$id})'><i class='fa'></i>查看/新增活动</button>
 | 
			
		||||
	<button class="btn btn-default f-right btn-mright" onclick='javascript:recom({$id})'><i class='fa'></i>推荐商品</button>
 | 
			
		||||
	<button class="btn btn-primary f-right btn-mright" onclick='javascript:toAddGoods()'><i class='fa fa-plus'></i>新增商品</button>
 | 
			
		||||
  {/if}
 | 
			
		||||
<div style='clear:both'></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='goodsBox' style='display:none'>
 | 
			
		||||
	<form id="goodsForm">
 | 
			
		||||
		<table class='wst-form wst-box-top'>
 | 
			
		||||
			<tr>
 | 
			
		||||
				<th width='150'>
 | 
			
		||||
					选择活动<font color='red'>*</font>:</th>
 | 
			
		||||
				<td>
 | 
			
		||||
					<select name="recomId" id="recomId" class="ipt">
 | 
			
		||||
						<option value="">请选择活动</option>
 | 
			
		||||
						{volist name="classify" id="vo"}
 | 
			
		||||
						<option value="{$vo.recomId}">{$vo.recomName}</option>
 | 
			
		||||
						{/volist}
 | 
			
		||||
					</select>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
			<tr >
 | 
			
		||||
				<th width='150'>填写商品ID<font color='red'>*</font>:</th>
 | 
			
		||||
				<td >
 | 
			
		||||
					<textarea type="text" name="goodsId" class="ipt" id="goodsId" placeholder="填写商品ID:批量添加商品,请用英文逗号隔开" style="margin-top: 10px;height: 100px;">
 | 
			
		||||
					</textarea>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
		</table>
 | 
			
		||||
	</form>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
	var oldSort;
 | 
			
		||||
	function changeSort(t,id){
 | 
			
		||||
		//alert(id);
 | 
			
		||||
		$(t).attr('ondblclick'," ");
 | 
			
		||||
		var html = "<input type='text' id='sort-"+id+"' style='width:40px;' onblur='doneChange(this,"+id+")' value='"+$(t).html()+"' />";
 | 
			
		||||
		$(t).html(html);
 | 
			
		||||
		$('#sort-'+id).focus();
 | 
			
		||||
		$('#sort-'+id).select();
 | 
			
		||||
		oldSort = $(t).html();
 | 
			
		||||
	}
 | 
			
		||||
	function doneChange(t,id){
 | 
			
		||||
		var sort = ($(t).val()=='')?0:$(t).val();
 | 
			
		||||
		if(sort==oldSort){
 | 
			
		||||
			$(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
			$(t).parent().html(parseInt(sort));
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
		$.post(WST.U('admin/goodsclassify/changeSet'),{id:id,goodsOrder:sort},function(data){
 | 
			
		||||
			var json = WST.toAdminJson(data);
 | 
			
		||||
			if(json.status==1){
 | 
			
		||||
				$(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
				$(t).parent().html(parseInt(sort));
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
$(function(){initsetDetailGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										57
									
								
								hyhproject/admin/view/goodsconsult/edit.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,57 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/goodsconsult/goodsconsult.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<form id="goodsconsultForm" autocomplete="off">
 | 
			
		||||
<table class='wst-form wst-box-top'>
 | 
			
		||||
  <tr>
 | 
			
		||||
      <th width='150'>商品:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <img src='__IMGURL__/{$data["goodsImg"]}' width='50' style="float:left;" /> 
 | 
			
		||||
            <p style="float:left;height:50px;line-height:25px;width:245px;overflow:hidden;margin-left:5px;">{$data['goodsName']}</p>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>用户:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              {if($data['loginName']!='')}
 | 
			
		||||
                {$data['loginName']}
 | 
			
		||||
              {else /}
 | 
			
		||||
                游客
 | 
			
		||||
              {/if}
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>状态:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
            <label><input type="radio" class="ipt" id="isShow" name="isShow" value="1" <?=$data['isShow']==1?'checked':'';?>  />显示</label>
 | 
			
		||||
            <label><input type="radio" class="ipt" id="isShow" name="isShow" value="0" <?=$data['isShow']==0?'checked':'';?>  />隐藏</label>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>咨询内容:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <textarea style="width:300px;height:100px" id="consultContent" name="consultContent" class="ipt">{$data['consultContent']}</textarea>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>回复内容:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <textarea style="width:300px;height:100px" id="reply" name="reply" class="ipt">{$data['reply']}</textarea>
 | 
			
		||||
          </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" onclick="javascript:history.go(-1)" class='btn'><i class="fa fa-angle-double-left"></i>返回</button>
 | 
			
		||||
     </td>
 | 
			
		||||
  </tr>
 | 
			
		||||
</table>
 | 
			
		||||
</form>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){editInit();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										108
									
								
								hyhproject/admin/view/goodsconsult/goodsconsult.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,108 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'商品主图', name:'goodsImg', width: 100, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	var thumb = item['goodsImg'];
 | 
			
		||||
	        	//thumb = thumb.replace('.','_thumb.');
 | 
			
		||||
	        	return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:40px;width:40px;' src='"+WST.conf.IMGURL+"/"+thumb
 | 
			
		||||
            	+"'><span class='imged' style='left:45px;'><img  style='height:150px;width:150px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'商品', name:'goodsName', width: 100,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['goodsName']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            
 | 
			
		||||
            {title:'咨询内容', name:'consultContent', width: 100,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['consultContent']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'回复内容', name:'reply', width: 100,renderer: function(val,item,rowIndex){
 | 
			
		||||
                return "<span  ><p class='wst-nowrap'>"+item['reply']+"</p></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'状态', name:'isShow', width: 100, renderer: function(val,item,rowIndex){
 | 
			
		||||
            	return (val==0)?"<span class='statu-no'><i class='fa fa-ban'></i> 隐藏</span>":"<span class='statu-yes'><i class='fa fa-check-circle'></i> 显示</span></h3>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'操作', name:'' ,width:70, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = "";
 | 
			
		||||
	            if(WST.GRANT.SPZX_02)h += "<a class='btn btn-blue' href='"+WST.U('admin/goodsconsult/toEdit','id='+item['id'])+"'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
	            if(WST.GRANT.SPZX_03)h += "<a class='btn btn-red' href='javascript:toDel(" + item['id'] + ")'><i class='fa fa-trash-o'></i>删除</a> "; 
 | 
			
		||||
	            return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true,indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/goodsconsult/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    }); 
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该记录吗?",yes:function(){
 | 
			
		||||
	           var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	           	$.post(WST.U('admin/goodsconsult/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);
 | 
			
		||||
	           		            loadGrid();
 | 
			
		||||
	           			  }else{
 | 
			
		||||
	           			    	WST.msg(json.msg,{icon:2});
 | 
			
		||||
	           			  }
 | 
			
		||||
	           		});
 | 
			
		||||
	            }});
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
		var query = WST.getParams('.query');
 | 
			
		||||
    query.page = 1;
 | 
			
		||||
	  mmg.load(query);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editInit(){
 | 
			
		||||
/* 表单验证 */
 | 
			
		||||
    $('#goodsconsultForm').validator({
 | 
			
		||||
            fields: {
 | 
			
		||||
                consultContent: {
 | 
			
		||||
                  rule:"required;length(3~200)",
 | 
			
		||||
                  msg:{length:"评价内容为3-200个字",required:"评价内容为3-200个字"},
 | 
			
		||||
                  tip:"评价内容为3-200个字",
 | 
			
		||||
                  ok:"",
 | 
			
		||||
                },
 | 
			
		||||
                reply:  {
 | 
			
		||||
                  rule:"required;length(3~200)",
 | 
			
		||||
                  msg:{length:"回复内容为3-200个字",required:"回复内容为3-200个字"},
 | 
			
		||||
                  tip:"回复内容为3-200个字",
 | 
			
		||||
                  ok:""
 | 
			
		||||
                },
 | 
			
		||||
                
 | 
			
		||||
            },
 | 
			
		||||
          valid: function(form){
 | 
			
		||||
            var params = WST.getParams('.ipt');
 | 
			
		||||
            var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
            $.post(WST.U('admin/goodsconsult/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/goodsconsult/index');
 | 
			
		||||
              }else{
 | 
			
		||||
                    WST.msg(json.msg,{icon:2});
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
function toolTip(){
 | 
			
		||||
    $('body').mousemove(function(e){
 | 
			
		||||
    	var windowH = $(window).height();  
 | 
			
		||||
        if(e.pageY >= windowH*0.8){
 | 
			
		||||
        	var top = windowH*0.233;
 | 
			
		||||
        	$('.imged').css('margin-top',-top);
 | 
			
		||||
        }else{
 | 
			
		||||
        	var top = windowH*0.06;
 | 
			
		||||
        	$('.imged').css('margin-top',-top);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										33
									
								
								hyhproject/admin/view/goodsconsult/list.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__/goodsconsult/goodsconsult.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
	<div id="query" style="float:left;">
 | 
			
		||||
		<select id="type" name='type' class='query'>
 | 
			
		||||
		  <option value="0">-咨询类别-</option>
 | 
			
		||||
		  	{volist name=":WSTDatas('COUSULT_TYPE')" id="vo"}
 | 
			
		||||
        	<option value="{$vo['dataVal']}">{$vo['dataName']}</option>
 | 
			
		||||
        	{/volist}
 | 
			
		||||
		</select>
 | 
			
		||||
		<input type="text" name="consultKey" placeholder='咨询内容' id="consultKey" class="query" />
 | 
			
		||||
		<button type="button"  class='btn btn-primary btn-mright'onclick="javascript:loadGrid()" ><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
	</div>
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
 <div id="mmg" class="mmg layui-form"></div>
 | 
			
		||||
 <div id="pg" style="text-align: right;"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){
 | 
			
		||||
	initGrid();
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										234
									
								
								hyhproject/admin/view/homemenus/homemenus.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,234 @@
 | 
			
		||||
var grid;
 | 
			
		||||
$(function(){
 | 
			
		||||
  $('#headTip').WSTTips({width:90,height:35,callback:function(v){
 | 
			
		||||
     var diff = v?113:53;
 | 
			
		||||
  }});
 | 
			
		||||
  grid = $("#maingrid").WSTGridTree({
 | 
			
		||||
    url:WST.U('admin/homemenus/pageQuery'),
 | 
			
		||||
    pageSize:10000,
 | 
			
		||||
    pageSizeOptions:10000,
 | 
			
		||||
    height:'99%',
 | 
			
		||||
        width:'100%',
 | 
			
		||||
        minColToggle:6,
 | 
			
		||||
        delayLoad :true,
 | 
			
		||||
        rownumbers:true,
 | 
			
		||||
        columns: [
 | 
			
		||||
          { display: '菜单名称', name: 'menuName', id:"menuId", isSort: false},
 | 
			
		||||
          { display: '菜单Url', name: 'menuUrl', isSort: false},
 | 
			
		||||
          { display: '菜单类型', name: 'menuType',  width:80,isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
             return (rowdata['menuType']==0)?'用户菜单':'商家菜单';
 | 
			
		||||
          }},
 | 
			
		||||
          { display: '是否显示', name: 'isShow', width:80,isSort: false,render :function(item, rowindex, value){
 | 
			
		||||
            return '<input type="checkbox" '+((item.isShow==1)?"checked":"")+' class="ipt" lay-skin="switch" lay-filter="isShow" data="'+item.menuId+'" lay-text="显示|隐藏">';
 | 
			
		||||
          }},
 | 
			
		||||
          { display: '排序号', name: 'menuSort', width:60,isSort: false,render:function(rowdata,rowindex,value){
 | 
			
		||||
             return '<span class="classSort" style="cursor:pointer;color:blue;" ondblclick="changeSort(this,'+rowdata["menuId"]+');">'+rowdata['menuSort']+'</span>';
 | 
			
		||||
          }},
 | 
			
		||||
          { display: '操作', name: 'op',width:230,isSort: false,render: function (rowdata, rowindex, value){
 | 
			
		||||
              var h = "";
 | 
			
		||||
              if(WST.GRANT.QTCD_01)h += "<a  class='btn btn-blue' href='javascript:toEdit(0," + rowdata['menuId'] + ","+rowdata['menuType']+")'><i class='fa fa-plus'></i>添加子菜单</a> ";
 | 
			
		||||
              if(WST.GRANT.QTCD_02)h += "<a  class='btn btn-blue' href='javascript:getForEdit("+rowdata["parentId"]+"," + rowdata['menuId'] + ")' href='"+WST.U('admin/homemenus/toEdit','menuId='+rowdata['menuId'])+"'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
              if(WST.GRANT.QTCD_03)h += "<a  class='btn btn-red' href='javascript:toDel("+rowdata["parentId"]+"," + rowdata['menuId'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
              return h;
 | 
			
		||||
          }}
 | 
			
		||||
        ],
 | 
			
		||||
        callback:function(){
 | 
			
		||||
            $('.classSort').poshytip({content:'双击修改排序号',showTimeout:0,hideTimeout:1,alignX: 'center',
 | 
			
		||||
              offsetY: 10,timeOnScreen:1000,allowTipHover: false});
 | 
			
		||||
            layui.form.render();
 | 
			
		||||
         }
 | 
			
		||||
    });
 | 
			
		||||
    layui.form.on('switch(isShow)', function(data){
 | 
			
		||||
          var id = $(this).attr("data");
 | 
			
		||||
          if(this.checked){
 | 
			
		||||
              toggleIsShow(id, 1);
 | 
			
		||||
          }else{
 | 
			
		||||
              toggleIsShow(id, 0);
 | 
			
		||||
          }
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
var oldSort;
 | 
			
		||||
function changeSort(t,id){
 | 
			
		||||
  if(!WST.GRANT.QTCD_02)return;
 | 
			
		||||
  $(t).attr('ondblclick'," ");
 | 
			
		||||
var html = "<input type='text' id='sort-"+id+"' style='width:30px;padding:2px' onblur='doneChange(this,"+id+")' value='"+$(t).html()+"' />";
 | 
			
		||||
 $(t).html(html);
 | 
			
		||||
 $('#sort-'+id).focus();
 | 
			
		||||
 $('#sort-'+id).select();
 | 
			
		||||
}
 | 
			
		||||
function doneChange(t,id){
 | 
			
		||||
  var sort = ($(t).val()=='')?0:$(t).val();
 | 
			
		||||
  if(sort==oldSort){
 | 
			
		||||
    $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
    $(t).parent().html(parseInt(sort));
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  $.post(WST.U('admin/homemenus/changeSort'),{id:id,menuSort:sort},function(data){
 | 
			
		||||
    var json = WST.toAdminJson(data);
 | 
			
		||||
    if(json.status==1){
 | 
			
		||||
        $(t).parent().attr('ondblclick','changeSort(this,'+id+')');
 | 
			
		||||
        $(t).parent().html(parseInt(sort));
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function toDel(pid,menuId){
 | 
			
		||||
  var box = WST.confirm({content:"删除该菜单会将下边的子菜单也一并删除,您确定要删除吗?",yes:function(){
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    $.post(WST.U('admin/homemenus/del'),{menuId:menuId},function(data,textStatus){
 | 
			
		||||
      layer.close(loading);
 | 
			
		||||
      var json = WST.toAdminJson(data);
 | 
			
		||||
      if(json.status=='1'){
 | 
			
		||||
        WST.msg("操作成功",{icon:1});
 | 
			
		||||
        layer.close(box);
 | 
			
		||||
        grid.reload(pid);
 | 
			
		||||
      }else{
 | 
			
		||||
        WST.msg(json.msg,{icon:2});
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
  }});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function edit(pid,menuId){
 | 
			
		||||
  //获取所有参数
 | 
			
		||||
  var params = WST.getParams('.ipt');
 | 
			
		||||
    params.menuId = menuId;
 | 
			
		||||
    var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    $.post(WST.U('admin/homemenus/'+((menuId==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
      layer.close(loading);
 | 
			
		||||
      var json = WST.toAdminJson(data);
 | 
			
		||||
      if(json.status=='1'){
 | 
			
		||||
 | 
			
		||||
          WST.msg("操作成功",{icon:1});
 | 
			
		||||
          loadGrid();
 | 
			
		||||
      }else{
 | 
			
		||||
            WST.msg(json.msg,{icon:2});
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
function toggleIsShow(menuId, isShow){
 | 
			
		||||
  if(!WST.GRANT.QTCD_02)return;
 | 
			
		||||
  $.post(WST.U('admin/homemenus/setToggle'), {'menuId':menuId, 'isShow':isShow}, function(data, textStatus){
 | 
			
		||||
    var json = WST.toAdminJson(data);
 | 
			
		||||
    if(json.status=='1'){
 | 
			
		||||
      WST.msg("操作成功",{icon:1});
 | 
			
		||||
      grid.reload(menuId);
 | 
			
		||||
    }else{
 | 
			
		||||
      WST.msg(json.msg,{icon:2});
 | 
			
		||||
    }
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getForEdit(pid,menuId){
 | 
			
		||||
  $('#menuForm')[0].reset();
 | 
			
		||||
  var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
    $.post(WST.U('admin/homemenus/get'),{menuId:menuId},function(data,textStatus){
 | 
			
		||||
          layer.close(loading);
 | 
			
		||||
          var json = WST.toAdminJson(data);
 | 
			
		||||
          if(json.menuId){
 | 
			
		||||
              WST.setValues(json);
 | 
			
		||||
              toEdit(json.menuId,pid);
 | 
			
		||||
          }else{
 | 
			
		||||
              WST.msg(json.msg,{icon:2});
 | 
			
		||||
          }
 | 
			
		||||
   });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toEdit(menuId,parentId,tId){
 | 
			
		||||
  var title = "编辑";
 | 
			
		||||
  if(menuId==0){
 | 
			
		||||
    $('#menuForm')[0].reset();
 | 
			
		||||
    title = "新增";
 | 
			
		||||
    WST.setValue('isShow',1);
 | 
			
		||||
  }
 | 
			
		||||
  if(parentId>0){
 | 
			
		||||
	  $('#menuTypes').hide();
 | 
			
		||||
  }else{
 | 
			
		||||
	  $('#menuTypes').show();
 | 
			
		||||
  }
 | 
			
		||||
  if(tId==1){$('#menuType').val(1);}
 | 
			
		||||
  layui.form.render();
 | 
			
		||||
  var box = WST.open({title:title,type:1,content:$('#menuBox'),area: ['550px', '420px'],btn:['确定','取消'],
 | 
			
		||||
    end:function(){$('#menuBox').hide();},yes:function(){
 | 
			
		||||
    $('#menuForm').submit();
 | 
			
		||||
  }});
 | 
			
		||||
  $('#menuForm').validator({
 | 
			
		||||
        fields: {
 | 
			
		||||
          'menuName': {rule:"required;",msg:{required:'请输入菜单名称'}},
 | 
			
		||||
          'menuUrl': {rule:"required;",msg:{required:'请输入菜单Url'}},
 | 
			
		||||
          'menuSort': {rule:"required;integer",msg:{required:'请输入排序号',number:"请输入数字"}}
 | 
			
		||||
        },
 | 
			
		||||
        valid: function(form){
 | 
			
		||||
          var params = WST.getParams('.ipt');
 | 
			
		||||
            params.menuId = menuId;
 | 
			
		||||
            params.parentId = parentId;
 | 
			
		||||
            params.isShow = params.isShow?params.isShow:0;
 | 
			
		||||
          var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
         $.post(WST.U('admin/homemenus/'+((menuId==0)?"add":"edit")),params,function(data,textStatus){
 | 
			
		||||
           layer.close(loading);
 | 
			
		||||
           var json = WST.toAdminJson(data);
 | 
			
		||||
           if(json.status=='1'){
 | 
			
		||||
                WST.msg("操作成功",{icon:1});
 | 
			
		||||
                $('#menuBox').hide();
 | 
			
		||||
                $('#menuForm')[0].reset();
 | 
			
		||||
                layer.close(box);
 | 
			
		||||
                grid.reload(params.parentId);
 | 
			
		||||
           }else{
 | 
			
		||||
             WST.msg(json.msg,{icon:2});
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
    $("#maingrid").WSTGridTree({
 | 
			
		||||
    url:WST.U('admin/homemenus/pageQuery',{menuType:$('#s_menuType').val()}),
 | 
			
		||||
    pageSize:10000,
 | 
			
		||||
    pageSizeOptions:10000,
 | 
			
		||||
    height:'99%',
 | 
			
		||||
        width:'100%',
 | 
			
		||||
        minColToggle:6,
 | 
			
		||||
        delayLoad :true,
 | 
			
		||||
        rownumbers:true,
 | 
			
		||||
        columns: [
 | 
			
		||||
          { display: '菜单名称', name: 'menuName', id:"menuId", isSort: false},
 | 
			
		||||
          { display: '菜单Url', name: 'menuUrl', isSort: false},
 | 
			
		||||
          { display: '菜单类型', name: 'menuType',  width:80,isSort: false,render:function(rowdata, rowindex, value){
 | 
			
		||||
             return (rowdata['menuType']==0)?'用户菜单':'商家菜单';
 | 
			
		||||
          }},
 | 
			
		||||
          { display: '是否显示', name: 'isShow', width:80,isSort: false,render :function(item, rowindex, value){
 | 
			
		||||
            return '<input type="checkbox" '+((item.isShow==1)?"checked":"")+' class="ipt" lay-skin="switch" lay-filter="isShow" data="'+item.menuId+'" lay-text="显示|隐藏">';
 | 
			
		||||
          }},
 | 
			
		||||
          { display: '排序号', name: 'menuSort', width:60,isSort: false,render:function(rowdata,rowindex,value){
 | 
			
		||||
             return '<span style="cursor:pointer;color:blue;" ondblclick="changeSort(this,'+rowdata["menuId"]+');">'+rowdata['menuSort']+'</span>';
 | 
			
		||||
          }},
 | 
			
		||||
          { display: '操作', name: 'op',width:230,isSort: false,render: function (rowdata, rowindex, value){
 | 
			
		||||
              var h = "";
 | 
			
		||||
              if(WST.GRANT.QTCD_01)h += "<a  class='btn btn-blue' href='javascript:toEdit(0," + rowdata['menuId'] + ","+rowdata['menuType']+")'><i class='fa fa-plus'></i>添加子菜单</a> ";
 | 
			
		||||
              if(WST.GRANT.QTCD_02)h += "<a  class='btn btn-blue' href='javascript:getForEdit("+rowdata["parentId"]+"," + rowdata['menuId'] + ")' href='"+WST.U('admin/homemenus/toEdit','menuId='+rowdata['menuId'])+"'><i class='fa fa-pencil'></i>修改</a> ";
 | 
			
		||||
              if(WST.GRANT.QTCD_03)h += "<a  class='btn btn-red' href='javascript:toDel("+rowdata["parentId"]+"," + rowdata['menuId'] + ")'><i class='fa fa-trash-o'></i>删除</a> ";
 | 
			
		||||
              return h;
 | 
			
		||||
          }}
 | 
			
		||||
        ],
 | 
			
		||||
        callback:function(){
 | 
			
		||||
          layui.form.render();
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
    layui.form.on('switch(isShow)', function(data){
 | 
			
		||||
          var id = $(this).attr("data");
 | 
			
		||||
          if(this.checked){
 | 
			
		||||
              toggleIsShow(id, 1);
 | 
			
		||||
          }else{
 | 
			
		||||
              toggleIsShow(id, 0);
 | 
			
		||||
          }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										78
									
								
								hyhproject/admin/view/homemenus/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,78 @@
 | 
			
		||||
{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/wstgridtree.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
<script src="__ADMIN__/homemenus/homemenus.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<style>.mmGrid{border-bottom:0px;}</style>
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>本功能为开发者功能,主要用于设置电脑版买家和买家菜单,普通使用者请勿随意修改,以免影响系统使用。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
   <select id='s_menuType' onchange='loadGrid()'>
 | 
			
		||||
      <option value='-1'>菜单类型</option>
 | 
			
		||||
      <option value='0'>用户菜单</option>
 | 
			
		||||
      <option value='1'>商家菜单</option>
 | 
			
		||||
   </select>
 | 
			
		||||
   {if WSTGrant('QTCD_01')}
 | 
			
		||||
   <button class="btn btn-success f-right" onclick="javascript:toEdit(0)"><i class='fa fa-plus'></i>新增</button>
 | 
			
		||||
   {/if}
 | 
			
		||||
   <div style="clear:both"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class='wst-grid'>
 | 
			
		||||
<div class='mmGrid layui-form' id="maingrid"></div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id='menuBox' style='display:none'>
 | 
			
		||||
    <form id='menuForm'>
 | 
			
		||||
    <table class='wst-form wst-box-top'>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>菜单名称<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <input type="text" id="menuName" name="menuName" class="ipt" maxLength='20' />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>菜单Url<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <input type="text" id="menuUrl" name="menuUrl" class="ipt" maxLength='200' style='width:300px'/>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>附加资源:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <textarea id="menuOtherUrl" name="menuOtherUrl" class="ipt" style='width:80%'></textarea>
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       
 | 
			
		||||
       <tr id="menuTypes">
 | 
			
		||||
          <th>菜单类型<font color='red'>*</font>:</th>
 | 
			
		||||
            <td>
 | 
			
		||||
        <select id="menuType" class="ipt">
 | 
			
		||||
          <option value="0">用户菜单</option>
 | 
			
		||||
          <option value="1">商家菜单</option>
 | 
			
		||||
        </select>
 | 
			
		||||
            </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>菜单排序<font color='red'>*</font>:</th>
 | 
			
		||||
          <td>
 | 
			
		||||
              <input type="text" id="menuSort" name="menuSort" class="ipt" maxLength='20' />
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
       <tr>
 | 
			
		||||
          <th>是否显示<font color='red'>  </font>:</th>
 | 
			
		||||
          <td class="layui-form">
 | 
			
		||||
            <input type="checkbox" id="isShow" name="isShow" value="1" class="ipt" lay-skin="switch" lay-filter="isShow1" lay-text="显示|隐藏">
 | 
			
		||||
          </td>
 | 
			
		||||
       </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    </form>
 | 
			
		||||
</div>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										25
									
								
								hyhproject/admin/view/hooks/hooks.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,25 @@
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
    var h = WST.pageHeight();
 | 
			
		||||
    var cols = [
 | 
			
		||||
            {title:'名称', name:'name', width: 100},
 | 
			
		||||
            {title:'描述', name:'hookRemarks', width: 100},
 | 
			
		||||
            {title:'对应插件', name:'addons' ,width:70, align:'center'}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/hooks/pageQuery'), fullWidthRows: true, autoLoad: true,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator({})
 | 
			
		||||
        ]
 | 
			
		||||
    });  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//查询
 | 
			
		||||
function hooksQuery(){
 | 
			
		||||
	var query = WST.getParams('.query');
 | 
			
		||||
    query.page = 1;
 | 
			
		||||
	mmg.load(query);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										26
									
								
								hyhproject/admin/view/hooks/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,26 @@
 | 
			
		||||
{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__/hooks/hooks.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
	<div id="query" style="float:left;">
 | 
			
		||||
		<input type="text" name="keyWords" placeholder="钩子名称" id="keyWords" class="j-ipt query">
 | 
			
		||||
		<button type="button"  class='btn btn-primary btn-mright' onclick="javascript:hooksQuery()" ><i class="fa fa-search"></i>查询</button>
 | 
			
		||||
	</div>
 | 
			
		||||
  
 | 
			
		||||
   <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>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid()});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										103
									
								
								hyhproject/admin/view/images/images.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,103 @@
 | 
			
		||||
function initSummary(){
 | 
			
		||||
	 var loading = WST.msg('正在获取数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
	 $.post(WST.U('admin/images/summary'),{rnd:Math.random()},function(data,textStatus){
 | 
			
		||||
	       layer.close(loading);
 | 
			
		||||
	       var json = WST.toAdminJson(data);
 | 
			
		||||
	       if(json.status==1){
 | 
			
		||||
	    	   json = json.data;
 | 
			
		||||
	    	   var html = [],tmp,i=1,divLen = 0;
 | 
			
		||||
	    	   for(var key in json){
 | 
			
		||||
	    		   if(key=='_WSTSummary_')continue;
 | 
			
		||||
	    		   tmp = json[key];
 | 
			
		||||
	    		   html.push('<tr class="mmg-body wst-grid-tree-row" height="28" align="center">'
 | 
			
		||||
	    				     ,'<td class="wst-grid-tree-row-cell" style="width:26px;">'+(i++)+'</td>'
 | 
			
		||||
	    				     ,'<td class="wst-grid-tree-row-cell">'+WST.blank(tmp.directory,'未知目录')+'('+key+')'+'</td>'
 | 
			
		||||
	    				     ,'<td class="wst-grid-tree-row-cell" align="left">'+getCharts(json['_WSTSummary_'],tmp.data['1'],tmp.data['0'])+'</td>'
 | 
			
		||||
	    				     ,'<td class="wst-grid-tree-row-cell" nowrap>'+tmp.data['1']+'/'+tmp.data['0']+'</td>'
 | 
			
		||||
	    				     ,'<td class="wst-grid-tree-row-cell"><a class="btn btn-blue" href="'+WST.U('admin/images/lists','keyword='+key)+'"><i class="fa fa-search"></i>查看详情</a></td>');
 | 
			
		||||
	    	   }
 | 
			
		||||
	    	   $('#list').html(html.join(''));
 | 
			
		||||
	       }else{
 | 
			
		||||
	           WST.msg(json.msg,{icon:2});
 | 
			
		||||
	       }
 | 
			
		||||
	 });
 | 
			
		||||
	 $('#headTip').WSTTips({width:90,height:35,callback:function(v){}});  
 | 
			
		||||
}
 | 
			
		||||
function getCharts(maxSize,size1,size2){
 | 
			
		||||
	var w = WST.pageWidth()-400;
 | 
			
		||||
	var tlen = (parseFloat(size1,10)+parseFloat(size2,10))*w/maxSize+1;
 | 
			
		||||
	var s1len = parseFloat(size1,10)*w/maxSize;
 | 
			
		||||
	var s2len = parseFloat(size2,10)*w/maxSize;
 | 
			
		||||
	return ['<div style="width:'+tlen+'px"><div style="height:20px;float:left;width:'+s1len+'px;background:#5cb85c;"></div><div style="height:20px;float:left;width:'+s2len+'px;background:#ddd;"></div></div>'];
 | 
			
		||||
}
 | 
			
		||||
var mmg;
 | 
			
		||||
function initGrid(){
 | 
			
		||||
   var h = WST.pageHeight();
 | 
			
		||||
   var cols = [
 | 
			
		||||
            {title:'图片', name:'imgPath', width: 50, renderer: function(val,item,rowIndex){
 | 
			
		||||
              
 | 
			
		||||
            	// return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.ROOT+"/"+item['imgPath']
 | 
			
		||||
            	// +"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.ROOT+"/"+item['imgPath']+"'></span></span>";
 | 
			
		||||
            	// 修改为oss 地址 mark 20180609 
 | 
			
		||||
            	 return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+item['imgPath']+"'><span class='imged' ><img  style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['imgPath']+"'></span></span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'上传者', name:'userName' ,width:250, renderer: function(val,item,rowIndex){
 | 
			
		||||
               if(item['fromType']==1){
 | 
			
		||||
	        		return "【职员】"+item['loginName'];
 | 
			
		||||
	        	}else{
 | 
			
		||||
	        		if(WST.blank(item['userType'])==''){
 | 
			
		||||
	        			return '游客';
 | 
			
		||||
	        		}else{
 | 
			
		||||
	        			if(item['userType']==1){
 | 
			
		||||
	        				return "【商家:"+item['shopName']+"】"+item['loginName'];
 | 
			
		||||
	        			}else{
 | 
			
		||||
	        				return item['loginName'];
 | 
			
		||||
	        			}
 | 
			
		||||
	        		}
 | 
			
		||||
	        	}
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'文件大小(M)', name:'imgSize' ,width:30},
 | 
			
		||||
            {title:'状态', name:'isUse' ,width:30, renderer: function(val,item,rowIndex){
 | 
			
		||||
               return (val==1)?"<span class='statu-yes'><i class='fa fa-check-circle'></i> 有效</span>":"<span class='statu-no'><i class='fa fa-ban'></i> 无效</span>";
 | 
			
		||||
            }},
 | 
			
		||||
            {title:'上传时间', name:'createTime' ,width:120},
 | 
			
		||||
            {title:'操作', name:'' ,width:80, align:'center', renderer: function(val,item,rowIndex){
 | 
			
		||||
                var h = '<a class="btn btn-blue btn-mright" href="javascript:toView('+item['imgId']+',\''+item['imgPath']+'\')"><i class="fa fa-search"></i>查看</a>';
 | 
			
		||||
	        	if(WST.GRANT.TPKJ_04)h += "<button  class='btn btn-red' onclick='javascript:toDel(" + item['imgId'] + ")'><i class='fa fa-trash-o'></i>删除</button> ";
 | 
			
		||||
                return h;
 | 
			
		||||
            }}
 | 
			
		||||
            ];
 | 
			
		||||
 
 | 
			
		||||
    mmg = $('.mmg').mmGrid({height: h-85,indexCol: true,indexColWidth:50, cols: cols,method:'POST',
 | 
			
		||||
        url: WST.U('admin/images/pageQuery'), fullWidthRows: true, autoLoad: false,
 | 
			
		||||
        plugins: [
 | 
			
		||||
            $('#pg').mmPaginator()
 | 
			
		||||
        ]
 | 
			
		||||
    }); 
 | 
			
		||||
    loadGrid();
 | 
			
		||||
}
 | 
			
		||||
function loadGrid(){
 | 
			
		||||
	mmg.load({page:1,keyword:$('#key').val(),isUse:$('#isUse').val()});
 | 
			
		||||
}
 | 
			
		||||
function toView(id,img){
 | 
			
		||||
    parent.showBox({title:'图片详情',type:2,content:WST.U('admin/images/checkImages','imgPath='+img),area: ['700px', '510px'],btn:['关闭']});
 | 
			
		||||
}
 | 
			
		||||
function toDel(id){
 | 
			
		||||
	var box = WST.confirm({content:"您确定要删除该图片吗?<br/>注意:删除该图片后将不可找回!",yes:function(){
 | 
			
		||||
		var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
 | 
			
		||||
		$.post(WST.U('admin/images/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);
 | 
			
		||||
				loadGrid();
 | 
			
		||||
			}else{
 | 
			
		||||
				WST.msg(json.msg,{icon:2});
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}});
 | 
			
		||||
}
 | 
			
		||||
function toolTip(){
 | 
			
		||||
    WST.toolTip();
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								hyhproject/admin/view/images/index.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,32 @@
 | 
			
		||||
{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__/images/images.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<div id='alertTips' class='alert alert-success alert-tips fade in'>
 | 
			
		||||
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
 | 
			
		||||
  <ul class='body'>
 | 
			
		||||
    <li>该功能主要用于查看系统图片空间占用情况。绿色为有效图片,灰色为无效,可删除图片。</li>
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
<div id="main" class='mmGrid wst-grid'>
 | 
			
		||||
<table class='mmg-head wst-grid-tree' width='100%' cellspacing='0' cellpadding='0'>
 | 
			
		||||
   <thead class='mmg-headWrapper'>
 | 
			
		||||
   <tr class='l-grid-hd-row wst-grid-tree-hd'>
 | 
			
		||||
       <td width='30' class='wst-grid-tree-hd-cel' height='28' style="width:26px;text-align:center;font-weight:bold;">#</td>
 | 
			
		||||
       <td width='150' class='wst-grid-tree-hd-cell' height='28' style='text-align:center;font-weight:bold;'>目录</td>
 | 
			
		||||
       <td class='wst-grid-tree-hd-cell'height='28' style='text-align:left;font-weight:bold;'>有效图片/无效图片</td>
 | 
			
		||||
       <td width='80' class='wst-grid-tree-hd-cell' height='28' style='text-align:center;font-weight:bold;'>M</td>
 | 
			
		||||
       <td width='80' class='wst-grid-tree-hd-cell' height='28' style='text-align:center;font-weight:bold;'>操作</td>
 | 
			
		||||
   </tr>
 | 
			
		||||
   </thead>
 | 
			
		||||
   <tbody id='list'></tbody>
 | 
			
		||||
</table>
 | 
			
		||||
</div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initSummary();});
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										36
									
								
								hyhproject/admin/view/images/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,36 @@
 | 
			
		||||
{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__/images/images.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<form>
 | 
			
		||||
<div class="wst-toolbar">
 | 
			
		||||
<select id='key' class='ipt'>
 | 
			
		||||
    <option value=''>所有目录</option>
 | 
			
		||||
    {volist name="$datas" key="i" id='vo'}
 | 
			
		||||
    <option value="{$vo['dataVal']}" {if $keyword==$vo['dataVal']}selected{/if}>{$vo['dataName']}</option>
 | 
			
		||||
    {/volist}
 | 
			
		||||
</select>
 | 
			
		||||
<select id='isUse' class='ipt'>
 | 
			
		||||
    <option value='-1'>全部</option>
 | 
			
		||||
    <option value='1'>有效</option>
 | 
			
		||||
    <option value='0'>失效</option>
 | 
			
		||||
</select>
 | 
			
		||||
</form>
 | 
			
		||||
<button class="btn btn-primary" type='button' onclick='javascript:loadGrid(0)'><i class='fa fa-search'></i>查询</button> 
 | 
			
		||||
<button class="btn f-right" type='button' onclick="javascript:history.go(-1)"><i class="fa fa-angle-double-left"></i>返回</button> 
 | 
			
		||||
</div>
 | 
			
		||||
<table id="mmg" class="mmg">
 | 
			
		||||
   <tr>
 | 
			
		||||
      <th rowspan="" colspan=""></th>
 | 
			
		||||
   </tr>
 | 
			
		||||
</table>
 | 
			
		||||
<div id="pg" style="text-align: right;"></div>
 | 
			
		||||
<script>
 | 
			
		||||
$(function(){initGrid();})
 | 
			
		||||
</script>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/images/loading.gif
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 457 B  | 
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/images/validator_default.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 423 B  | 
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/images/validator_simple.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.4 KiB  | 
							
								
								
									
										76
									
								
								hyhproject/admin/view/images/view.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,76 @@
 | 
			
		||||
{extend name="base" /}
 | 
			
		||||
{block name="js"}
 | 
			
		||||
<script src="__ADMIN__/images/images.js?v={$v}" type="text/javascript"></script>
 | 
			
		||||
{/block}
 | 
			
		||||
{block name="main"}
 | 
			
		||||
<style type="text/css"> 
 | 
			
		||||
*{ margin:0; padding:0; list-style:none;} 
 | 
			
		||||
img{ border:none;} 
 | 
			
		||||
.imgbox{ width:400px; height:400px; margin:0px auto;text-align:center;vertical-align:middle;display:block;position:relative;padding:5px;} 
 | 
			
		||||
.imgbox a{display:table-cell;vertical-align:middle;width:400px; height:400px; } 
 | 
			
		||||
.imgbox a img{max-width:400px;max-height:400px; }
 | 
			
		||||
.imgthumbbox{ width:100px; height:100px;text-align:center;vertical-align:middle;display:block;position:relative;border:1px solid #ddd;margin-bottom:10px;} 
 | 
			
		||||
.imgthumbbox a{display:table-cell;vertical-align:middle;width:100px; height:100px; } 
 | 
			
		||||
.imgthumbbox a img{max-width:100px;max-height:100px; }
 | 
			
		||||
.mimgbox{ width:100px; height:100px; text-align:center;vertical-align:middle;display:block;position:relative;border:1px solid #ddd;margin-bottom:10px;} 
 | 
			
		||||
.mimgbox a{display:table-cell;vertical-align:middle;width:100px; height:100px; } 
 | 
			
		||||
.mimgbox a img{max-width:100px;max-height:100px; }
 | 
			
		||||
.mimgthumbbox{ width:100px; height:100px; text-align:center;vertical-align:middle;display:block;position:relative;border:1px solid #ddd} 
 | 
			
		||||
.mimgthumbbox a{display:table-cell;vertical-align:middle;width:100px; height:100px; } 
 | 
			
		||||
.mimgthumbbox a img{max-width:100px;max-height:100px; }
 | 
			
		||||
.head{line-height:25px;height:25px;}    
 | 
			
		||||
</style> 
 | 
			
		||||
</head> 
 | 
			
		||||
<body> 
 | 
			
		||||
<table width='100%'>
 | 
			
		||||
  <tr>
 | 
			
		||||
    <td>
 | 
			
		||||
	  <div class='imgbox'>
 | 
			
		||||
	    {if $img}
 | 
			
		||||
	    <a href='__ROOT__/{$imgpath}' target="_blank">
 | 
			
		||||
	    <img id='img' src='__ROOT__/{$imgpath}'/>
 | 
			
		||||
	    </a>
 | 
			
		||||
	    {elseif $img_oss}
 | 
			
		||||
	    <a href='__IMGURL__/{$imgpath}' target="_blank">
 | 
			
		||||
	    <img id='img' src='__IMGURL__/{$imgpath}'/>
 | 
			
		||||
	    </a>
 | 
			
		||||
	    {else}
 | 
			
		||||
	     图片不存在!
 | 
			
		||||
	    }
 | 
			
		||||
	    {/if}
 | 
			
		||||
	  </div>
 | 
			
		||||
	</td>
 | 
			
		||||
    <td width='150'>
 | 
			
		||||
    {if $thumb}
 | 
			
		||||
    <div><div class='head'>缩略图:</div>
 | 
			
		||||
	    <div class='imgthumbbox'>
 | 
			
		||||
	      <a href='__ROOT__/{$thumbpath}' target="_blank">
 | 
			
		||||
		    <img src='__ROOT__/{$thumbpath}'/>
 | 
			
		||||
		  </a>
 | 
			
		||||
	    </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {/if}
 | 
			
		||||
    <!-- {if $mimgpath !=''} -->
 | 
			
		||||
    {if $mimg }
 | 
			
		||||
    <div><div class='head'>移动端图片:</div>
 | 
			
		||||
	    <div class='mimgbox'>
 | 
			
		||||
	      <a href='__ROOT__/{$mimgpath}' target="_blank">
 | 
			
		||||
		    <img src='__ROOT__/{$mimgpath}'/>
 | 
			
		||||
		  </a>
 | 
			
		||||
	    </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {/if}
 | 
			
		||||
    <!-- {if $mthumbpath !=''} -->
 | 
			
		||||
    {if $mthumb }
 | 
			
		||||
    <div><div class='head'>移动端缩略图:</div>
 | 
			
		||||
	    <div class='mimgthumbbox'>
 | 
			
		||||
	      <a href='__ROOT__/{$mthumbpath}' target="_blank">
 | 
			
		||||
		    <img src='__ROOT__/{$mthumbpath}'/>
 | 
			
		||||
		  </a>
 | 
			
		||||
	    </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {/if}
 | 
			
		||||
  </td>
 | 
			
		||||
  </tr>
 | 
			
		||||
</table>
 | 
			
		||||
{/block}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/img/1.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 9.9 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/img/10.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 35 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/img/11.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 34 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/img/12.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 30 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/img/13.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 10 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								hyhproject/admin/view/img/14.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  |