	<table class="from_table">
		<tr>
			<th width="25" class="td1">　
		  <tpl> $langComplaintObject </tpl>：</th><td width="290">
		  <tpl> if $complaint_report == 'complaint' </tpl>
			<tpl> $langComplaintAll </tpl>
			<a href="javascript:;" onclick="ajax_url('sell');"><tpl> $langComplaintSale </tpl></a>
			<a href="javascript:;" onclick="ajax_url('buy');"><tpl> $langComplaintBuy </tpl></a>
		<tpl> /if </tpl>
		<tpl> if $complaint_report == 'sell' </tpl>
			<a href="javascript:;" onclick="ajax_url('complaint');"><tpl> $langComplaintAll </tpl></a>
			<tpl> $langComplaintSale </tpl>
			<a href="javascript:;" onclick="ajax_url('buy');"><tpl> $langComplaintBuy </tpl></a>
		<tpl> /if </tpl>
		<tpl> if $complaint_report == 'buy' </tpl>
			<a href="javascript:;" onclick="ajax_url('complaint');"><tpl> $langComplaintAll </tpl></a>
			<a href="javascript:;" onclick="ajax_url('sell');"><tpl> $langComplaintSale </tpl></a>
			<tpl> $langComplaintBuy </tpl>
		<tpl> /if </tpl>
		</td>
        <th width="25" class="td1">
		　
	    <tpl> $langComplaintType </tpl>：</th><td width="290">
		  <select name="complaint_report_type" onchange="ajax_type(this.value);" style="border:1px solid #CCCCCC">
		<option <tpl> if $type eq '' || $type eq 0 </tpl> selected="selected" <tpl> /if </tpl> value="0"><tpl> $langComplaintAllType </tpl></option>
		<tpl> foreach from=$complaint_report_type key=key item=line </tpl>
			<tpl> if $complaint_report == 'complaint' </tpl>
				<tpl> if $key > 0 && $key <= 4 </tpl>
					<option <tpl> if $type eq $key </tpl> selected="selected" <tpl> /if </tpl> value="<tpl> $key </tpl>"><tpl> $line </tpl></option>
				<tpl> /if </tpl>
			<tpl> /if </tpl>
			<tpl> if $complaint_report == 'sell' </tpl>
				<tpl> if $key > 1 && $key <= 4 </tpl>
					<option <tpl> if $type eq $key </tpl> selected="selected" <tpl> /if </tpl> value="<tpl> $key </tpl>"><tpl> $line </tpl></option>
				<tpl> /if </tpl>
			<tpl> /if </tpl>
			<tpl> if $complaint_report == 'buy' </tpl>
				<tpl> if $key == 1 </tpl>
					<option <tpl> if $type eq $key </tpl> selected="selected" <tpl> /if </tpl> value="<tpl> $key </tpl>"><tpl> $line </tpl></option>
				<tpl> /if </tpl>
			<tpl> /if </tpl>
		<tpl> /foreach </tpl>
		</select>
		</td>
      </tr>
  </table>
 
 <form id="form1" name="form1" action="complaint.manage.php?action=del&complaint_report=<tpl> $complaint_report </tpl>" method="post"> 
  <table class="from_table2_one" style="margin-top:10px;">
      <thead>
	  <tr class="area_ajax_list_title">
	    <th class="pd-left" width="50"><tpl> $langComplaintDelect </tpl></th>
        <th width="200"><tpl> $langComplaintReason </tpl></th>
	  <!-- <td>相关商品</td> -->
   	    <th width="150"><tpl> $langComplaintBy </tpl></th>
          <th width="100"><tpl> $langComplaintTime </tpl></th>
          <th width="130"><tpl> $langComplaintOperatorEstate </tpl></th>
          <th width="70"><tpl> $langCOperation </tpl></th>
    </tr>
	</thead>
	<tpl> if $complaint_receive_list[0].complaint_report_id neq'' </tpl>
		<tpl> section name=loop loop=$complaint_receive_list </tpl>
		  <tr>
			<td class="pd-left-1" width="50"><input name="complaint_report_id[]" type="checkbox" value="<tpl> $complaint_receive_list[loop].complaint_report_id </tpl>" /></td>
			<td width="200">
				<tpl> assign var='c_r_type' value=$complaint_receive_list[loop].c_r_type </tpl>
			<tpl> $complaint_report_type[$c_r_type] </tpl>		</td>
			<!-- <td>
			<a href="<tpl> $site_url </tpl>/home/product.php?action=view&pid=<tpl> $complaint_receive_list[loop].p_code </tpl>" target="_blank"><tpl> $complaint_receive_list[loop].p_name </tpl></a>
			</td> -->
			<td width="150"><a href="<tpl> $site_url </tpl>/store/userinfo.php?userid=<tpl> $complaint_receive_list[loop].c_r_member_id </tpl>" target="_blank">
		    <tpl> $complaint_receive_list[loop].c_r_login_name </tpl></a></td>
			<td width="100"><tpl> $complaint_receive_list[loop].c_r_add_time </tpl></td>
			<td width="130">
			<tpl> assign var = 'c_r_handling' value = $complaint_receive_list[loop].c_r_handling_state </tpl>
			<tpl> assign var = 'hand_type' value = $baseconfig_handling[$c_r_handling] </tpl>
			<tpl> $hand_type </tpl>
			</td>
			<td width="70">
				<a href="javascript:;" onclick="ajax_view('<tpl> $complaint_receive_list[loop].complaint_report_id </tpl>');" title="<tpl> $langCview </tpl>" class="view_a_pic">
			  </a>
			</td>
		  </tr>
		<tpl> /section </tpl>
		
	<tpl> else  </tpl>
		<tr>
			<td colspan="6" align="center"><tpl> $langComplaintMomentNotContent </tpl></td>
		</tr>
	<tpl> /if  </tpl>  
  </table>
  <tpl> if $complaint_receive_list[0].complaint_report_id neq'' </tpl>
  <div class="table-5-bottom">
  <div class="p-left">
  	 <span class="btn_left">
		      <input class="btn_submit" name="selectall" type="button" id="selectall" value="<tpl> $langComplaintAllSelect </tpl>" />
		    </span>
			    <span class="btn_left">
		      <input class="btn_submit" name="negative" type="button" id="negative" value="<tpl> $langComplaintContrartSelect </tpl>" />
		    </span>

			    <span class="btn_left">
		      <input class="btn_submit" type="button" id="delbutton" name="delbutton"value="<tpl> $langComplaintDel </tpl>"/>　
			  
		    </span>

	        </p>
		<div style="float:right">
			<tpl> $page_list </tpl></div>
			</div>
  </div>
  <tpl> /if  </tpl>  
 </form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
	<b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langComplaintConfirmDelete </tpl></b> <br />
	<input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
	<input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
	<input type="hidden" id="del_value" />
</div> 
<script>
$(document).ready(function() {

var question;

//焦点样式
    $('input[@type="text"],input[@type="password"],textarea').focus(function() { $(this).addClass('input_onFocus') }).blur(function() { $(this).removeClass('input_onFocus') });

	$('#negative').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							<tpl> if $type eq'' </tpl>
								getPageContent("complaint.manage.php?action=ajax_list&class=<tpl> $complaint_report </tpl>");
							<tpl> else </tpl>
								getPageContent("complaint.manage.php?action=ajax_list&class=<tpl> $complaint_report </tpl>&type="+<tpl> $type </tpl>);
							<tpl> /if </tpl>
						}
					},
		type:      'post',
		dataType:  'json'
	};
	/* 
	$("#form1").validate({
		errorClass: "wrong",
		rules: {
			complaint_report_id: {requireChecked:true}
		},
		messages: {
			complaint_report_id: {required:"请选择删除的信息"}
		},
		submitHandler: function() {
			$('#form1').ajaxSubmit(options_del);
		}
	});	
	 */question = $('#question')[0];
	$("#delbutton").click(function(){
		
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			//$.blockUI("<h1>Remote call in progress...</h1>" );
			$.unblockUI();
			$('#form1').ajaxSubmit(options_del);			
			return false;
		});
	$('#no').click($.unblockUI);
	
	
});

//跳转
function ajax_type(str){
	ShowDiv = 'result_content';
	getPageContent('complaint.manage.php?action=ajax_list&class=<tpl> $complaint_report </tpl>&type='+str);
}
//
function ajax_url(str){
	ShowDiv = 'result_content';
	getPageContent('complaint.manage.php?action=ajax_list&class='+str);
}
//查看
function ajax_view(str){
	ShowDiv = 'result_content';
	getPageContent('complaint.manage.php?action=view&complaint_report=<tpl> $complaint_report </tpl>&complaint_report_id='+str);
}
</script>