ソースを参照

招标页面数据显示的问题处理

hejq 7 年 前
コミット
005a0163e1

+ 13 - 5
src/main/java/com/uas/platform/b2b/controller/PurchaseTenderController.java

@@ -518,12 +518,20 @@ public class PurchaseTenderController {
         if (logger != null) {
             logger.log("招标单", "查看自己发出的招标单(待评标)");
         }
-        JSONObject jsonObject = JSONObject.parseObject(searchFilter);
-        String keyword = jsonObject.getString("keyword");
+        SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
+        if (StringUtils.isEmpty(filter.getKeyword())) {
+            PageInfo pageInfo = new PageInfo(params);
+            pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
+            pageInfo.filter("isPublish", Constant.YES);
+            pageInfo.filter("status", "待评标");
+            pageInfo.filter("overdue", Constant.YES);
+            pageInfo.filter("result", Constant.NO);
+            return purchaseTenderService.findAllByPageInfo(pageInfo, filter);
+        }
         com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
         // 当前登录企业作为客户
-        SearchFilter filter = userService.distribute();
-        if (filter != null && filter.getDistribute() == null) {
+        SearchFilter distribute = userService.distribute();
+        if (distribute != null && distribute.getDistribute() == null) {
             return null;
         }
         buildFilter(filter, pageParams);
@@ -535,7 +543,7 @@ public class PurchaseTenderController {
         pageParams.getFilters().put("pt_status", "待评标");
         pageParams.getFilters().put("pt_overdue", Constant.YES);
         pageParams.getFilters().put("pt_result", Constant.NO);
-        return searchService.searchPurcTenderIds(keyword, pageParams);
+        return searchService.searchPurcTenderIds(filter.getKeyword(), pageParams);
     }
 
     /**

+ 8 - 92
src/main/webapp/resources/tpl/index/purc/tenderlist.html

@@ -275,95 +275,17 @@
                     </div>
                 </div>
             </div>
-            <!--<div class="more" ng-class="{'open': condition.$open}">
-                <form class="form-inline">
-                    <div class="form-group ">
-                        <label>单据日期:</label>
-                        <div class="btn-group btn-menu" dropdown
-                             is-open="condition.$dateZoneOpen">
-                            <button type="button" dropdown-toggle style="width: 85px;"
-                                    class="btn btn-default btn-xs dropdown-toggle">
-                                {{dateZoneText}}<i class="fa fa-fw fa-angle-down icon-right"></i></span>
-                            </button>
-                            <ul class="dropdown-menu">
-                                <li><a ng-click="changeDateZone(-1)">不限</a></li>
-                                <li><a ng-click="changeDateZone(1)">一个月内</a></li>
-                                <li><a ng-click="changeDateZone(6)">半年内</a></li>
-                                <li><a ng-click="changeDateZone()">半年前</a></li>
-                            </ul>
-                        </div>
-                        <div class="input-group input-group-xs input-trigger">
-                            <input type="text" ng-model="condition.dateFrom"
-                                   class="form-control" placeholder="点击选择起始日期" readonly="readonly"
-                                   datepicker-popup="yyyy-MM-dd" is-open="condition.$fromOpened"
-                                   ng-required="true" max-date="condition.dateTo" current-text="今天"
-                                   clear-text="清除" close-text="关闭"
-                                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                                   ng-click="openDatePicker($event, condition, '$fromOpened')"
-                                   ng-change="onDateCondition()"> <span
-                                class="input-group-btn">
-                                <button type="button" class="btn btn-default"
-                                        ng-click="openDatePicker($event, condition, '$fromOpened')">
-                                    <i class="fa fa-calendar"></i>
-                                </button>
-                            </span>
-                        </div>
-                        <div class="input-group input-group-xs input-trigger">
-                            <input type="text" ng-model="condition.dateTo"
-                                   class="form-control" placeholder="点击选择截止日期" readonly="readonly"
-                                   datepicker-popup="yyyy-MM-dd" is-open="condition.$toOpened"
-                                   ng-required="true" min-date="condition.dateFrom"
-                                   current-text="今天" clear-text="清除" close-text="关闭"
-                                   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                                   ng-focus="openDatePicker($event, condition, '$toOpened')"
-                                   ng-change="onDateCondition()"> <span
-                                class="input-group-btn">
-                                <button type="button" class="btn btn-default"
-                                        ng-click="openDatePicker($event, condition, '$toOpened')">
-                                    <i class="fa fa-calendar"></i>
-                                </button>
-                            </span>
-                        </div>
-                    </div>
-                </form>
-            </div>-->
         </div>
         <table class="tender-table block" ng-table="tableParams">
             <thead>
-            <tr class="header">
-                <th width="300">招标标题</th>
-                <th width="80">联系人</th>
-                <th width="100">联系电话</th>
-                <th width="150">投标截止时间</th>
-                <th width="150">公布结果时间</th>
-                <th width="150">状态</th>
-            </tr>
-            <!-- <tr class="toolbar toolbar-top">
-                 <td colspan="5">
-                     <div>
-                         <label><input type="checkbox" class="selector select_all"
-                                       ng-model="checkboxes.checked" ng-click="checkAll()">全选</label> <a ng-if="active=='todo'" href="javascript:void(0)"
-                                                                                                         class="btn btn-default btn-xs" ng-click="replyByBatch()" title="选中的单据按照客户需求的数量和交期默认回复">&nbsp;批量回复&nbsp;</a>
-                         <div class="btn-group dropdown">
-                             <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
-                                 &nbsp;&nbsp;标记为&nbsp;&nbsp;<span class="caret"></span>&nbsp;
-                             </button>
-                             <ul class="dropdown-menu" role="menu">
-                                 <li><a href="javascript:void(0)" ng-click="setDisplay('setRead')">已查看</a></li>
-                                 <li><a href="javascript:void(0)" ng-click="setDisplay('setUnRead')">未查看</a></li>
-                                 <li><a href="javascript:void(0)" ng-click="setDisplay('setTop')">置顶</a></li>
-                             </ul>
-                         </div>
-                         <span class="text-muted">
-                                 &nbsp;&nbsp;<i class="fa fa-exclamation-triangle"></i> 批量回复是对选中的单据按照满足客户需求的数量和交期默认回复。
-                             </span>
-                     </div> &lt;!&ndash; 分页 &ndash;&gt;
-                 </td>
-                 <td class="text-center">
-                     <a href="sale/orders/xls?_state={{active}}&searchFilter={{searchFilterXls}}"
-                        target="_self" class="text-simple" title="导出Excel表格"><i class="fa fa-file-excel-o fa-fw"></i>导出</a>
-                 </td>
-             </tr>-->
+                <tr class="header">
+                    <th width="300">招标标题</th>
+                    <th width="80">联系人</th>
+                    <th width="100">联系电话</th>
+                    <th width="150">投标截止时间</th>
+                    <th width="150">公布结果时间</th>
+                    <th width="150">状态</th>
+                </tr>
             </thead>
             <tbody ng-if="tableParams.total() == 0">
             <tr>
@@ -391,12 +313,6 @@
                 </td>
             </tr>
             </tbody>
-            <!--<tbody ng-repeat="order in $data track by order.id">
-                <tr class="order-bd" ng-repeat="item in order.orderItems track by item.id"
-                    ng-if="!order.$collapsed ">
-
-                </tr>
-            </tbody>-->
             <tbody ng-repeat="tender in $data">
             <tr>
                 <td class="prod-notnum" width="300">