Browse Source

Merge branch 'dev-mysql' into feature_release-tomysql

yangc 8 years ago
parent
commit
e94a9dd628

+ 2 - 2
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java

@@ -266,7 +266,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
             try {
                 Double amount = Double.valueOf(StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(amountValue)));
                 int amountInt = amount.intValue();
-                if (amount <= 0 || amount >= 100000000 || amountInt != amount) {
+                if (amount <= 0 || amount >= 1000000000 || amountInt != amount) {
                     amount = null;
                 }
                 seekPurchaseByBatch.setAmount(amount);
@@ -283,7 +283,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                 String currency = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(currencyValue));
                 seekPurchaseByBatch.setCurrency(currency);
             } catch (Exception e) {
-                seekPurchaseByBatch.setCurrency("RMB");
+                seekPurchaseByBatch.setCurrency(null);
             }
         }
 

BIN
src/main/webapp/resources/img/seekPurchase/arrow-down.png


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

@@ -214,8 +214,8 @@ define(['app/app'], function (app) {
                 }
               }
               $scope.applyObj.amount = cutOutString($scope.applyObj.amount, chineseIndex);
-            } else if ($scope.applyObj.amount.length > 8) {
-              $scope.applyObj.amount = cutOutString($scope.applyObj.amount, 8);
+            } else if ($scope.applyObj.amount.length > 9) {
+              $scope.applyObj.amount = cutOutString($scope.applyObj.amount, 9);
             }
           }
           $scope.onEncapsulationChange = function () {

+ 7 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -154,7 +154,12 @@ define(['app/app'], function (app) {
             return $scope.validOffer.unitPrice && $scope.validOffer.minDay && $scope.validOffer.maxDay;
           }
 
-          $scope.seekCurrency = 'RMB';
+          $scope.seekCurrency = [];
+          $scope.currencyChange = function (cc) {
+            for (var i = 0; i < $scope.seekCurrency.length; i++) {
+              $scope.seekCurrency[i] = cc;
+            }
+          }
           // 保存报价
           $scope.saveOfferBtn = false;
           $scope.saveOffer = function () {
@@ -163,7 +168,7 @@ define(['app/app'], function (app) {
               $scope.inquiryItem.vendUserUU = $scope.userInfo.userUU;
               $scope.inquiryItem.qutoApp = "MALL";
               if (!$scope.inquiryItem.currency) {
-                $scope.inquiryItem.currency = $scope.seekCurrency;
+                $scope.inquiryItem.currency = $scope.seekCurrency[0];
               }
               seekPurchase.saveOffer($scope.inquiryItem, function (data) {
                 toaster.pop('success', '报价成功');

+ 5 - 2
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -644,12 +644,15 @@
                     </div>
                     -->
                 </td>
-                <td class="user-name"><div title="{{seek.userName || seek.inquiry.enterprise.enName}}" ng-bind="seek.userName || seek.inquiry.enterprise.enName"></div></td>
+                <td class="user-name">
+                    <div ng-if="seek.inquiry.enterprise.enName" title="{{seek.inquiry.enterprise.enName}}" ng-bind="seek.inquiry.enterprise.enName"></div>
+                    <div ng-if="!seek.inquiry.enterprise.enName" title="{{seek.userName}}" ng-bind="seek.userName"></div>
+                </td>
                 <td><div title="{{seek.cmpCode || seek.prodCode || seek.product.cmpCode}}" ng-bind="seek.cmpCode || seek.prodCode || seek.product.cmpCode"></div></td>
                 <td><div title="{{seek.inbrand}}" ng-bind="seek.inbrand || '-'"></div></td>
                 <td><div title="{{seek.encapsulation}}" ng-bind="seek.encapsulation || '--'"></div></td>
                 <td><div title="{{seek.produceDate}}" ng-bind="seek.produceDate || '--'"></div></td>
-                <td><div title="{{seek.needquantity}}" ng-bind="seek.amount || '--'"></div></td>
+                <td><div title="{{seek.needquantity}}" ng-bind="seek.needquantity || '--'"></div></td>
                 <td class="unit-price">
                     <span>{{seek.currency + seek.unitPrice | currencyStr}}</span>
                 </td>

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

@@ -480,7 +480,7 @@
         top: 0;
         width: 32px;
         height: 28px;
-        background: url(/images/applyPurchase/arrow-down.png) no-repeat right center;
+        background: url('static/img/seekPurchase/arrow-down.png') no-repeat right center;
         border: none;
         border-right: 1px solid #bfbfbf;
         border-bottom-left-radius: 4px;
@@ -652,7 +652,10 @@
                         </div>
                         -->
                     </td>
-                    <td class="user-name"><div title="{{seek.userName || seek.inquiry.enterprise.enName}}" ng-bind="seek.userName || seek.inquiry.enterprise.enName"></div></td>
+                    <td class="user-name">
+                        <div ng-if="seek.inquiry.enterprise.enName" title="{{seek.inquiry.enterprise.enName}}" ng-bind="seek.inquiry.enterprise.enName"></div>
+                        <div ng-if="!seek.inquiry.enterprise.enName" title="{{seek.userName}}" ng-bind="seek.userName"></div>
+                    </td>
                     <td><div title="{{seek.cmpCode}}" ng-bind="seek.cmpCode || '-'"></div></td>
                     <td><div title="{{seek.inbrand}}" ng-bind="seek.inbrand || '-'"></div></td>
                     <td><div title="{{seek.encapsulation}}" ng-bind="seek.encapsulation || '-'"></div></td>
@@ -744,7 +747,7 @@
                     </div>
                     <div class="form-item form-right">
                         <span><i>*</i>单价<span ng-if="inquiryItem.currency" ng-bind="inquiryItem.currency == 'USD' ? '$' : '¥'"></span>:</span>
-                        <select ng-if="!inquiryItem.currency" ng-model="seekCurrency">
+                        <select ng-if="!inquiryItem.currency" ng-model="seekCurrency[$index]" ng-init="seekCurrency[$index] = 'RMB'" ng-change="currencyChange(seekCurrency[$index])">
                             <option value="RMB">¥</option>
                             <option value="USD">$</option>
                         </select>