Просмотр исходного кода

修改买家中心待报价与已报价问题

shenjj 7 лет назад
Родитель
Сommit
f32147c41c

+ 14 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -29,10 +29,20 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
             } else {
                 $scope.tab = 'waitOffer';
             }
+          // 更换待报价状态
+          $scope.vendorType = 'all'
+          $scope.onVendorTypeChange = function () {
+            $scope.keyword = '';
+            $scope.startDate = null;
+            $scope.endDate = null;
+            $scope.seekPurchaseTableParams.page(1);
+            $scope.seekPurchaseTableParams.reload();
+          }
           seekPurchase.getSeekUrl({}, function(data) {
             var seekUrl = data.url;
             /*$scope.tab = 'waitOffer';*/
             $scope.toogleTab = function (tab) {
+              $scope.vendorType = 'all'
                 $scope.tab = tab;
               $scope.seekPurchaseTableParams = new ngTableParams({
                 pageNumber: 1,
@@ -61,10 +71,11 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         ? $scope.startDate.getTime() : null;
                     param.endDate = $scope.endDate ? $scope.endDate.getTime()
                         : null;
+                    param.overdue = $scope.vendorType === 'all' ? '' : ($scope.vendorType === 'self' ? '0' : '1')
                     $http({
                       method: 'get',
                       dataType: 'json',
-                      url: seekUrl + '/inquiry/buyer/list',
+                      url: 'http://10.1.51.82:24002' + '/inquiry/buyer/list',
                       params: param
                     }).success(function (data) {
                       params.total(data.totalElements);
@@ -85,10 +96,11 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         ? $scope.startDate.getTime() : null;
                     param.endDate = $scope.endDate ? $scope.endDate.getTime()
                         : null;
+                    param.overdue = $scope.vendorType === 'all' ? '' : ($scope.vendorType === 'self' ? '0' : '1')
                     $http({
                       method: 'get',
                       dataType: 'json',
-                      url: seekUrl + '/inquiry/buyer/quotations',
+                      url: 'http://10.1.51.82:24002' + '/inquiry/buyer/quotations',
                       params: param
                     }).success(function (data) {
                       params.total(data.totalElements);

+ 16 - 0
src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html

@@ -900,6 +900,16 @@
         color: #f15601;
         border-bottom: 1px solid #fff;
     }
+    .vendor-type {
+        display: inline-block;
+        width: 111px;
+        float: left;
+        margin-right: 20px;
+        margin-left: 10px;
+        text-align: center;
+        border: 1px solid #4290f7;
+        color: #333;
+    }
 </style>
 <div class="user_right fr seek-purchase">
     <!--求购询价-->
@@ -1004,6 +1014,12 @@
                 -->
             </div>
             <div class="sreach fr">
+                <span>求购筛选</span>
+                <select class="form-control select-adder vendor-type" ng-model="vendorType" ng-change="onVendorTypeChange(vendorType)">
+                    <option value="all">全部</option>
+                    <option value="self">未截止</option>
+                    <option value="end">已截止</option>
+                </select>
                 <span>发布时间&nbsp;</span>
                 <div class="date fl">
                     <div class="data-input">