You've already forked qlg.tsgz.moe
							
							
		
			
				
	
	
		
			86 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			86 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
| {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} |