list.vm 7.43 KB

<DIV id="navBar" title="presale">
	<li><a href="$!{contextPath}/">首页</a><span class="divider">></span>
        <a href="$!{contextPath}/titan/purchase">求购信息列表</a></li>
</DIV>
<form class="well form-search" name="presaleListForm" action="/titan/purchase" method="POST">
	<!-- 智能分页与排序 -->
##	<input type="hidden" name="currentPage" value="$!{page.currentPage}"/>
##	<input type="hidden" name="pageSize" value="$!{page.pageSize}"/>
##	<input type="hidden" name="orderField" value="$!{presale.orderField}"/>
##	<input type="hidden" name="orderFieldType" value="$!{presale.orderFieldType}"/>
	<!-- 查询条件 -->
    <input class="span align-middle input-medium numInput" type="text" name="id" value="$!{presale.id}" placeholder="求购编号"/>
    <input  class="span align-middle input-medium"  type="text" name="title" value="$!{presale.title}" placeholder="标题"/>
	<input class="span align-middle input-medium numInput" type="text" name="phone" maxlength="11" value="$!{presale.phone}" placeholder="用户手机号"/>
    <select  id="status" name="status" class="span2 align-middle" style="height:34px">
        <option value=""  #if(-1 == $!{presale.status}) selected="selected" #end>全部状态</option>
        <option value="1" #if(1 == $!{presale.status}) selected="selected" #end>待审核</option>
        <option value="2" #if(2 == $!{presale.status}) selected="selected" #end>审核通过</option>
        <option value="3" #if(3 == $!{presale.status}) selected="selected" #end>审核失败</option>
        <option value="4" #if(4 == $!{presale.status}) selected="selected" #end>过期</option>
    </select>
    &nbsp;&nbsp;
    <input type="hidden" id="categoryIds" value="$!{categoryIds}"/>
    <span>商品分类:</span><span id="productCategory"> </span>
    &nbsp;&nbsp;
    <button id="searchList" class="btn btn-sm btn-primary" type="submit"><i class="icon-search icon-white"></i>搜索</button>
    &nbsp;&nbsp;<button type="button" class="btn btn-sm btn-primary btn-clear">清空</button>
</form>

<!-- 表格数据 -->
<table class="table table-striped table-bordered table-condensed grid">
	<thead>
		<tr>
            <th #sorting($!{presale} "id")>编号</th>
			<th #sorting($!{presale} "title")>标题</th>
            <th #sorting($!{presale} "cate")>分类</th>
			<th #sorting($!{presale} "phone")>注册手机</th>
			<th #sorting($!{presale} "count")>采购量</th>
            <th #sorting($!{presale} "count")>采购地址</th>
			<th #sorting($!{presale} "ctime")>发布时间</th>
			<th #sorting($!{presale} "status")>状态</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
#foreach(${item} in ${page.result})
		<tr>
            <td>$!{item.id}</td>
			<td>$!{item.title}</td>
            <td>$!{item.cateName}</td>
			<td>$!{item.phone}</td>
            <td>$!{item.count}$!{item.unitName}</td>
			<td>$!{item.localityArea}</td>
            <td>$!dateTool.format('yyyy-MM-dd HH:mm:ss',${item.ctime})</td>
			<td>
                #if($!{item.status}==1) 待审核
                 #elseif($!{item.status}==2)审核通过
                #elseif($!{item.status}==3)审核失败
                #elseif($!{item.status}==4)过期
                #end
            </td>

			<td class="textC">
				<div class="btn-group">
                    #if($!{item.status}==1)
                        #if($!{audit})
                            <a  class="green"onclick="XUI.PPS.showAuditDlg($!{item.id},'/titan/purchase/audit',1)"><i class="icon-pencil"></i>审批</a>
                        #end
                    #end
                    #if($!{viewDetail})
					<a class="blue"   href="javascript:void(0);" onclick="window.open('/titan/purchase/${item.id}')"><i class="icon-eye-open"></i> 查看</a>
                    #end
				</div>
			</td>
		</tr>
#end
	</tbody>
</table>

<!-- modal -->
<div class="modal fade" id="auditModal" tabindex="-1" role="dialog" aria-labelledby="auditModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" id="modaltitle">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">求购审核</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
##                    <div class="alert alert-danger" id="auditAlert" style="width:521px;display: none;">
##                        <strong>注意!</strong>强制下架后商品状态将变更为审核不通过!<br>
##                    </div>
                    <filedset>
                        <div class="form-group" id="auditResult">
                            <label class="col-sm-3 control-label" for="radioDiv">审核结果 :</label>
                            <label class="col-sm-2 radio inline"><input type="radio" name="audit" id="audit_ok" value="2" checked>通过</input></label>
                            <label class="col-sm-2 radio inline"><input type="radio" name="audit" id="audit_no" value="3">不通过</input></label>
                        </div>
                        <div class="form-group" id="feedback" style="display:none">
                            <label class="col-sm-3 control-label" id="feedbackLabel"for="selectFeedback"></label>
                            <select  id="selectFeedback" class="span2 align-middle" style="height:28px">
                                #foreach(${msg} in ${auditMsg})
                                    <option value="${velocityCount}">${msg.name}</option>
                                #end
                                <option value="-1">其他原因</option>
                            </select>
                        </div>
                        <div class="form-group " id="feedbackArea" class="col-sm-3  no-padding-right" style="display:none">
                            <label class="col-sm-3 control-label" for="selectDiv"></label>
                            <textarea name="feedback" id="feedback" maxlength="30"   style="width:350px;height:110px;"></textarea>
                        </div>
                    </filedset>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" name="confirmAudit">确认</button>
            </div>
        </div>
    </div>
</div>
<!-- 分页栏 -->
#showPage($!{page})
<script src="/assets/js/jquery.js"></script>
<script src="/assets/js/riotjs/riotjs.js"></script>
<script type="text/javascript"
        src="http://static.1n4j.com/static/newStatic/common/js/base/sea.js"></script>
<script src="/assets/products/product.search.categroy.js"></script>
<script>
    $(document).ready(function(){
        XUI.PPS.init();
        var conf = {
            url: "/titan/category/nextSearchThrSubCategroy?parentId={pid}",
        };
        $("#productCategory").productCategory(conf);
        $(".btn-clear").click(function() {
            $("input[name='id']").val("");
            $("input[name='title']").val("");
            $("input[name='phone']").val("");
            $("#status select:first option:first").prop("selected", 'selected');
            $("#status select:first option:first").change();
            $("#productCategory select:first option:first").prop("selected", 'selected');
            $("#productCategory select:first option:first").change();
        });
    });
</script>