Browse Source

公共询价顶部返回按钮返回更新,顶部文字轮播增加详情点击操作

hejq 8 years ago
parent
commit
0ecd575f57

+ 31 - 10
src/main/webapp/resources/js/index/app.js

@@ -3343,6 +3343,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
      */
     app.controller('ReplyByBatchCtrl', ['$scope', '$modalInstance', '$filter', 'toaster', function($scope, $modalInstance, $filter, toaster) {
         $scope.activeTab = 'custom';
+        $scope.reply = {
+            method: 1
+        };
         $scope.getMinDate = function () {
             return $filter('date')(new Date, 'yyyy-MM-dd');
         };
@@ -5188,7 +5191,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
     }]);
 
     // 公共询价列表
-    app.controller('PublicInquiryListCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams) {
+    app.controller('PublicInquiryListCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'PurcInquiry', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, PurcInquiry) {
         BaseService.scrollBackToTop();
         /**
          * 改变单据日期范围
@@ -5223,6 +5226,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             }
         };
 
+        $scope.active = 'all';
         $scope.dateZoneText = '不限';
         $scope.deliveryZoneText = '不限';
         $scope.condition = {dateZone: -1};
@@ -5278,6 +5282,25 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             return fn;
         };
 
+        $scope.setActive = function (state) {
+            if ($scope.active != state) {
+                $scope.active = state;
+                if ($scope.tableParams.page() == 1) {
+                    $scope.tableParams.reload();
+                } else {
+                    $scope.tableParams.page(1);
+                }
+            }
+        };
+
+        var getService = function () {
+            if ($scope.active == 'teams') {
+                return PurchaseInquiry.hisquotation;
+            } else {
+                return PurchaseInquiry.publicInquiryItem;
+            }
+        }
+
         $scope.tableParams = new ngTableParams({
             page: 1,
             count: 20,
@@ -5301,7 +5324,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 //                AccountEnterprise.get({}, function(data){
 //                    $scope.currentEn = data;
 //                });
-                PurchaseInquiry.publicInquiryItem.call(null, BaseService.parseParams(pageParams), function (page) {
+                getService().call(null, BaseService.parseParams(pageParams), function (page) {
                     $scope.loading = false;
                     if (page) {
                         params.total(page.totalElement);
@@ -5324,15 +5347,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.tableParams.page(1);
             $scope.tableParams.reload();
         };
+        // 得到消息
+        PurcInquiry.getMessage({}, function (data) {
+            $scope.message = data;
+        }, function (response) {
+
+        });
 
-         $scope.datasetData = [
-             {option : "这个是第一条数据"},
-             {option : "这个是第二条数据"},
-             {option : "这个是第三条数据"},
-             {option : "这个是第四条数据"},
-             {option : "这个是第五条数据"},
-             {option : "这个是第六条数据"}
-         ]
         // 转客户询价
         $scope.transtoInquiry = function (id) {
             PurchaseInquiry.transtoInquiry({id: id}, {}, function (data) {

+ 7 - 0
src/main/webapp/resources/js/index/services/Purc.js

@@ -1703,6 +1703,13 @@ define([ 'ngResource'], function() {
 			exportXls: {
 				url: 'purc/inquiry/xls/permission',
 				method: 'GET'
+			},
+			hisquotation: {
+				url: 'sale/inquiry/info/search',
+                method: 'GET',
+                params: {
+                    _state: 'teams'
+                }
 			}
 		});
 	}]);

+ 21 - 20
src/main/webapp/resources/tpl/index/baseInfo/inquiry_list.html

@@ -324,28 +324,31 @@
                         <b>公共询价</b>
                         <!--(<em> 10 </em>)-->
                     </span>
-                    <a href="/platform-b2b/#/">返回</a>
+                    <a href="#/index">返回</a>
                 </div>
                 <div class="tender-list-content">
                     <div class="container">
                         <div class="slider" id="slider">
-                           <!--<marquee behavior="scroll" direction="left" scrollamount="5">-->
-                               <!--<span>-->
-                                  <!--<span><img src="static/img/all/circle.png" alt="" class="circle"/> 华商龙商务科技有限公司开展员工动员大会 <img src="static/img/home/new.png" class="new"/></span>-->
-                               <!--</span>-->
-                           <!--</marquee>-->
-                               <!-- 指令 -->
-                            <!--<div class="slideUl">-->
-                                <!--<slide-follow id="slide" dataset-data = "datasetData"></slide-follow>-->
+                           <marquee behavior="scroll" direction="left" scrollamount="5">
+                               <span ng-repeat="msg in message">
+                                  <a ng-click="toDetail(msg.inid)" title="点击查看详情"><img src="static/img/all/circle.png" alt="" class="circle"/> “{{msg.enName}}”发布关于“{{msg.pordName}}”的询价 <img src="static/img/home/new.png" class="new"/></a>
+                               </span>
+                           </marquee>
+                            <!--    指令
+                            <div class="slideUl">
+                                <slide-follow id="slide" dataset-data = "datasetData"></slide-follow>
+                            </div>-->
+                            <!--<div class="all">-->
+                                <!--<div id="slider01" class="slider01">-->
+                                    <!--<span ng-repeat="msg in message">-->
+                                        <!--{{msg.enName}}-->
+                                    <!--</span>-->
+                                    <!--&lt;!&ndash;<span><img src="static/img/all/circle.png" alt="" class="circle"/> 华商龙商务科技有限公司开展员工动员大会 <img src="static/img/home/new.png" class="new"/></span>-->
+                                    <!--<span><img src="static/img/all/circle.png" alt="" class="circle"/> 华商龙商务科技有限公司开展员工动员大会 <img src="static/img/home/new.png" class="new"/></span>-->
+                                    <!--<span><img src="static/img/all/circle.png" alt="" class="circle"/> 华商龙商务科技有限公司开展员工动员大会 <img src="static/img/home/new.png" class="new"/></span>-->
+                                <!--&ndash;&gt;</div>-->
+                                <!--<div id="slider02" class="slider02"></div>-->
                             <!--</div>-->
-                            <div class="all">
-                                <div id="slider01" class="slider01">
-                                    <span><img src="static/img/all/circle.png" alt="" class="circle"/> 华商龙商务科技有限公司开展员工动员大会 <img src="static/img/home/new.png" class="new"/></span>
-                                    <span><img src="static/img/all/circle.png" alt="" class="circle"/> 华商龙商务科技有限公司开展员工动员大会 <img src="static/img/home/new.png" class="new"/></span>
-                                    <span><img src="static/img/all/circle.png" alt="" class="circle"/> 华商龙商务科技有限公司开展员工动员大会 <img src="static/img/home/new.png" class="new"/></span>
-                                </div>
-                                <div id="slider02" class="slider02"></div>
-                            </div>
                         </div>
                         <div class="filter row">
                             <div class="form-group">
@@ -365,7 +368,7 @@
                                         <li ng-click="changeDateZone()" title="" ng-class="{'active': condition.dateZone == null}">一年内</li>
                                     </ul>
                                 </span>
-                                <span><img src="static/img/all/money.png" alt=""/>我的报价</span>
+                                <span><img src="static/img/all/money.png" ng-click="setActive('teams')">我的报价</span>
                             </div>
                         </div>
                         <div class="tender-list-tab">
@@ -431,10 +434,8 @@
         function Marquee() {
             if(slider.scrollLeft - slider02.offsetWidth >= 0) {
                 slider.scrollLeft -= slider01.offsetWidth;
-                console.log(slider.scrollLeft);
             } else {
                 slider.scrollLeft++;
-                console.log( slider.scrollLeft++);
             }
         }
         var myvar = setInterval(Marquee, 30);