www.lightcourse.com/app/admin/view/groupbuy/index.html

158 lines
7.7 KiB
HTML
Raw Normal View History

2022-10-24 02:38:36 +00:00
{include file="public/header" /}
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<div class="subject">
<h3>抢购管理</h3>
<h5></h5>
</div>
{include file="public/admin_items" /}
</div>
</div>
<form method="get" name="formSearch">
<div class="ds-search-form">
<dl>
<dt>抢购名称</dt>
<dd><input type="text" value="{$Request.get.groupbuy_name}" name="groupbuy_name" id="groupbuy_name" class="txt" style="width:100px;"></dd>
</dl>
<dl>
<dt>状态</dt>
<dd><select name="groupbuy_state" class="w90">
{notempty name="groupbuy_state_array"}
{foreach name="groupbuy_state_array" item="val"}
<option value="{$key}" {eq name="key" value="$Request.get.groupbuy_state" }selected{
/eq}>
{$val}</option>
{/foreach}
{/notempty}
</select>
</dd>
</dl>
<div class="btn_group">
<a href="javascript:document.formSearch.submit();" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
{if $filtered}
<a href="{:url('Groupbuy/index')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
{/if}
</div>
</div>
</form>
<!-- 说明 -->
<div class="explanation" id="explanation">
<div class="title" id="checkZoom">
<h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
<span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
</div>
<ul>
<li>管理员可以审核新的抢购活动申请、取消进行中的抢购活动或者删除抢购活动</li>
</ul>
</div>
<form id="list_form" method="post">
<input type="hidden" id="group_id" name="group_id"/>
<table class="ds-default-table">
<thead>
<tr class="thead">
<th colspan="2">{$Think.lang.groupbuy_index_name}</th>
<th class="align-center" width="120">{$Think.lang.start_time}</th>
<th class="align-center" width="120">{$Think.lang.end_time}</th>
<th class="align-center" width="80">{$Think.lang.groupbuy_index_click}</th>
<th class="align-center" width="80">已购买</th>
<th class="align-center" width="80">{$Think.lang.ds_recommend}</th>
<th class="align-center" width="120">{$Think.lang.groupbuy_index_state}</th>
<th class="align-center" width="150">{$Think.lang.ds_handle}</th>
</tr>
</thead>
<tbody id="treet1">
{notempty name="groupbuy_list"}
{foreach name="groupbuy_list" item="val"}
<tr class="hover">
<td class="w60 picture">
<div class="size-56x56"><span class="thumb size-56x56"><i></i>
<a target="_blank" href="{:url('home/Showgroupbuy/groupbuy_detail',['group_id'=>$val.groupbuy_id])}"><img src="{:groupbuy_thumb($val.groupbuy_image)}" style=" max-width: 56px; max-height: 56px;"/></a></span></div>
</td>
<td class="group"><p>
<a target="_blank" href="{:url('home/Showgroupbuy/groupbuy_detail',['group_id'=>$val.groupbuy_id])}"> {$val.groupbuy_name}</a>
</p>
<p class="goods">{$Think.lang.ds_goods_name}:<a target="_blank" href="{:url('home/Goods/index',['goods_id'=>$val.goods_id])}" title="{$val.goods_name}" target="_blank">{$val.goods_name}</a></p>
</td>
<td class="align-center nowarp">{$val.start_time_text}</td>
<td class="align-center nowarp">{$val.end_time_text}</td>
<td class="align-center">{$val.groupbuy_views}</td>
<td class="align-center">{$val.groupbuy_buy_quantity}</td>
<td class="yes-onoff align-center">
{eq name="val.groupbuy_recommended" value="0"}
<a href="JavaScript:void(0);" class=" disabled" ajax_branch='recommended' ds_type="inline_edit" fieldname="recommended" fieldid="{$val.groupbuy_id}" fieldvalue="0" title="{$Think.lang.ds_editable}">
<img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif">
</a>
{else /}
<a href="JavaScript:void(0);" class=" enabled" ajax_branch='recommended' ds_type="inline_edit" fieldname="recommended" fieldid="{$val.groupbuy_id}" fieldvalue="1" title="{$Think.lang.ds_editable}">
<img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif">
</a>
{/eq}
<td class="align-center">{$val.groupbuy_state_text}</td>
<td class="align-center">
{if $val.reviewable}
<a dstype="btn_review_pass" data-groupbuy-id="{$val.groupbuy_id}" href="javascript:;" class="dsui-btn-add"><i class="iconfont"></i>通过</a>
<a dstype="btn_review_fail" data-groupbuy-id="{$val.groupbuy_id}" href="javascript:;" class="dsui-btn-del"><i class="iconfont"></i>拒绝</a>
{/if}
{if $val.cancelable}
<a href="javascript:dsLayerConfirm('{:url('Groupbuy/groupbuy_cancel',['groupbuy_id'=>$val.groupbuy_id])}',' 确认取消该抢购活动?')" class="dsui-btn-del"><i class="iconfont"></i>取消</a>
{/if}
<a href="javascript:dsLayerConfirm('{:url('Groupbuy/groupbuy_del',['groupbuy_id'=>$val.groupbuy_id])}',' 确认删除该抢购活动?',{$val.groupbuy_id})" class="dsui-btn-del"><i class="iconfont"></i>删除</a>
</td>
</tr>
{/foreach}
{else /}
<tr class="no_data">
<td colspan="16">{$Think.lang.ds_no_record}</td>
</tr>
{/notempty}
</tbody>
</table>
{notempty name="groupbuy_list"}
{$show_page|raw}
{/notempty}
</form>
</div>
<form id="op_form" action="" method="POST">
<input type="hidden" id="groupbuy_id" name="groupbuy_id">
</form>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function () {
$('[dstype="btn_cancel"]').on('click', function () {
layer.confirm('确认取消该抢购活动?', {
btn: ['确定', '取消'],
title: false,
}, function () {
var action = "{:url('Groupbuy/groupbuy_cancel')}";
var groupbuy_id = $(this).attr('data-groupbuy-id');
$('#op_form').attr('action', action);
$('#groupbuy_id').val(groupbuy_id);
$('#op_form').submit();
});
});
$('[dstype="btn_del"]').on('click', function () {
layer.confirm('确认删除该抢购活动?', {
btn: ['确定', '取消'],
title: false,
}, function () {
var action = "{:url('Groupbuy/groupbuy_del')}";
var groupbuy_id = $(this).attr('data-groupbuy-id');
$('#op_form').attr('action', action);
$('#groupbuy_id').val(groupbuy_id);
$('#op_form').submit();
});
});
});
</script>