Explorar o código

Merge remote-tracking branch 'origin/liusw-seekpurchase-v3.0.1.23' into liusw-seekpurchase-v3.0.1.23

# Conflicts:
#	src/main/webapp/resources/view/vendor/forstore/seekPurchase.html
yangc %!s(int64=8) %!d(string=hai) anos
pai
achega
24b439c06f

+ 6 - 4
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -40,8 +40,9 @@ define(['app/app'], function (app) {
                     var filter = {};
                     if ($scope.userInfo.enterprise) {
                       param.enUU = $scope.userInfo.enterprise.uu;
+                    } else{
+                      param.userUU = $scope.userInfo.userUU;
                     }
-                    param.userUU = $scope.userInfo.userUU;
                     param.keyword = $scope.keyWord;
                     param.fromDate = $scope.startDate
                         ? $scope.startDate.getTime() : null;
@@ -58,8 +59,9 @@ define(['app/app'], function (app) {
                     param._state = "done";
                     if ($scope.userInfo.enterprise) {
                       param.enUU = $scope.userInfo.enterprise.uu;
+                    } else {
+                      param.userUU = $scope.userInfo.userUU;
                     }
-                    param.userUU = $scope.userInfo.userUU;
                     // param.isMallGoods = $scope.isMallGoods;
                     // param.deadline = $scope.deadline;
                     param.keyword = $scope.keyWord;
@@ -103,8 +105,8 @@ define(['app/app'], function (app) {
 
           $scope.bomSearch = {};
           $scope.bomTableParams = new ngTableParams({
-            page: 1,
-            count: 10
+            pageNumber: 1,
+            pageSize: 20
           }, {
             total: 0,
             getData: function ($defer, params) {

+ 1 - 36
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -170,46 +170,11 @@ define(['app/app'], function (app) {
                 $scope.isShowSayPriceBox = false;
                 $scope.seekPurchaseTableParams.reload();
               }, function (response) {
-                toaster.pop('error', '请检查报价信息是否填写正确');
+                toaster.pop('error', '请勿重复报价或报价自己的求购');
               });
             } else {
               toaster.pop('error', '请输入正确的报价信息');
             }
-            // if ($scope.checkAllOffer()) {
-            //   $scope.saveOfferBtn = true;
-            //   seekPurchase.saveOffer($scope.offer, function (data) {
-            //     if (data.success) {
-            //       $scope.setSeekActive(seek, false);
-            //       $scope.seekPurchaseTableParams.reload();
-            //       $scope.saveOfferBtn = true;
-            //       toaster.pop('success', '报价成功');
-            //     } else {
-            //       $scope.saveOfferBtn = true;
-            //       toaster.pop('error', data.message);
-            //     }
-            //   }, function (res) {
-            //     toaster.pop('error', res.data);
-            //   });
-            // } else {
-            //   if (!$scope.validOffer.unitPrice) {
-            //     if (!$scope.offer.unitPrice) {
-            //       toaster.pop('warning', '提示', '单价不能为空');
-            //     } else {
-            //       toaster.pop('warning', '提示', '单价必须是大于0的数字');
-            //     }
-            //   } else if (!$scope.validOffer.minDay || !$scope.validOffer.maxDay) {
-            //     if ((!$scope.offer.minDay && !angular.isNumber($scope.offer.minDay)) || (!$scope.offer.maxDay && !angular.isNumber($scope.offer.maxDay))) {
-            //       toaster.pop('warning', '提示', '交期不能为空');
-            //     } else {
-            //       if ($scope.offer.minDay > 31 || $scope.offer.minDay < 1 || $scope.offer.minDay.toString().indexOf('.') !== -1
-            //           || $scope.offer.maxDay > 31 || $scope.offer.maxDay < 1 || $scope.offer.maxDay.toString().indexOf('.') !== -1) {
-            //         toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
-            //       } else {
-            //         toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
-            //       }
-            //     }
-            //   }
-            // }
           }
 
           $scope.condition = {endDateOpen: false, startDateOpen: false};

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -706,7 +706,7 @@
             <div class="title">
                 <div>型号:<span ng-bind="inquiryItem.cmpCode" title="{{inquiryItem.cmpCode}}">PMDIDASJD</span></div>
                 <div>品牌:<span ng-bind="inquiryItem.inbrand" title="{{inquiryItem.inbrand}}">台积电</span></div>
-                <i class="fa fa-close"></i>
+                <i class="fa fa-close" ng-click="setSeekActive(seek, false, index)"></i>
             </div>
             <div class="content">
                 <div class="content-line">