Преглед изворни кода

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

liusw пре 8 година
родитељ
комит
95ff80e8ef

+ 11 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -279,8 +279,9 @@ define(['app/app'], function (app) {
 
 
           $scope.onLeadtimeInput = function () {
-            if ($scope.inquiryItem.leadtime.length > 2) {
-              $scope.inquiryItem.leadtime = $scope.inquiryItem.leadtime.substring(0, 2);
+            var time = $scope.inquiryItem.leadtime.toString();
+            if (time.length > 2) {
+              $scope.inquiryItem.leadtime = Number(time.substring(0, 2));
             }
           }
           $scope.onLeadtimeBlur = function () {
@@ -310,6 +311,12 @@ define(['app/app'], function (app) {
               $scope.validSayPrice.repliesLapQty = true;
             }
           }
+          $scope.onReplyLapQtyInput = function (index) {
+            var lapQty =  $scope.inquiryItem.replies[index].lapQty.toString();
+            if (lapQty.length >= 9) {
+              $scope.inquiryItem.replies[index].lapQty = Number(lapQty.substring(0, 8));
+            }
+          }
 
           $scope.getLimitDownQty = function () {
             for (var i = 0; i < $scope.inquiryItem.replies.length; i++) {
@@ -324,9 +331,9 @@ define(['app/app'], function (app) {
           }
 
           $scope.onReplyPriceInput = function (index) {
-            var price = $scope.inquiryItem.replies[index].price;
+            var price = $scope.inquiryItem.replies[index].price.toString();
             if (price >= 10000) {
-              $scope.inquiryItem.replies[index].price = price.substring(0, 4);
+              $scope.inquiryItem.replies[index].price = Number(price.substring(0, 4));
             } else if (price.indexOf('.') > -1) {
               var arr = price.split('.');
               if (arr[0].length > 4) {

+ 113 - 3
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -256,7 +256,7 @@
         z-index: 1;
         position: relative;
     }
-    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate div {
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate > div {
         width: 64px;
         height: 24px;
         line-height: 24px;
@@ -267,10 +267,90 @@
         cursor: pointer;
         border-radius: 2px;
     }
-    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate span {
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price {
         margin: 17px 0 0 0;
         color: #39ae05;
+        background: transparent;
+        width: 100%;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history {
+        position: absolute;
+        top: 64px;
+        right: 11px;
+        line-height: normal;
+        width: 198px;
+        height: 0;
+        background: #fff;
+        border: 1px solid #fab89a;
+        z-index: 2;
+        overflow: hidden;
+        transition: height 1s;
+        -moz-transition: height 1s; /* Firefox 4 */
+        -webkit-transition: height 1s; /* Safari 和 Chrome */
+        -o-transition: height 1s; /* Opera */
+        opacity: 0;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history p {
+        color: #020202;
+        font-weight: bold;
+        margin: 0;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history p.price-title {
+        background: #fee6db;
+        height: 28px;
+        line-height: 28px;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history p.price-level {
+        margin: 6px 0;
+        text-align: left;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div {
+        padding: 9px 12px;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div > div {
+        display: inline-block;
+        text-align: left;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div > div:nth-child(1) {
+        float: left;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div > div:nth-child(2) {
+        margin-left: 32px;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div > div span {
+        color: #020202;
+        margin: 0;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div > div span.red-text {
+        color: #f62d37;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div > div.pre-line {
         display: block;
+        padding: 13px 0;
+        border-bottom: 1px dashed #fee6db;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div ul li {
+        color: #333;
+        height: 22px;
+        line-height: 22px;
+        padding: 0 6px;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div ul li:nth-child(odd) {
+        background: #f6f5f4;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div ul li span {
+        color: #333;
+        display: inline-block;
+        text-align: left;
+        width: 50%;
+        margin: 0;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price .say-price-history > div ul li:last-child span {
+        color: #4290f7;
+    }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate .is-say-price:hover .say-price-history {
+        opacity: 1;
+        height: 210px;
     }
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate >img {
         position: absolute;
@@ -577,7 +657,37 @@
                 <td class="left-time" ng-if="seek.remainingTime == null"><span style="color: red;">-</span></td>
                 <td class="operate" ng-switch="seek.agreed">
                     <a ng-click="setLinkBoxIndex($index)">联系买家 <img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
-                    <span ng-if="seek.agreed != 1">已报价 <img src="static/img/seekPurchase/check.png" alt=""></span>
+                    <div class="is-say-price" ng-if="seek.agreed != 1">已报价 <img src="static/img/seekPurchase/check.png" alt="">
+                        <div class="say-price-history">
+                            <p class="price-title">历史报价</p>
+                            <div>
+                                <div>
+                                    <span>交期:</span><span class="red-text">6 天</span>
+                                </div>
+                                <div>
+                                    <span>附件:</span><a href="">下载</a>
+                                </div>
+                                <div class="pre-line">
+                                    <span>规格:</span>2016-05-21
+                                </div>
+                                <p class="price-level">价格梯度</p>
+                                <ul>
+                                    <li>
+                                        <span>1333+</span>
+                                        <span>$123123</span>
+                                    </li>
+                                    <li>
+                                        <span>1333+</span>
+                                        <span>$123123</span>
+                                    </li>
+                                    <li>
+                                        <span>1333+</span>
+                                        <span>$123123</span>
+                                    </li>
+                                </ul>
+                            </div>
+                        </div>
+                    </div>
                     <img ng-if="seek.agreed == 1" src="static/img/seekPurchase/recieved.png" alt="">
                 </td>
             </tr>

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

@@ -415,6 +415,7 @@
         border-radius: 2px;
         height: 28px;
         display: inline-block;
+        padding: 0 8px;
     }
     .seek-purchase .say-price-box .content .content-line .form-left span {
         display: inline-block;
@@ -739,7 +740,7 @@
                         <input type="text" class="form-control" placeholder="数量">
                         -
                         -->
-                        <input type="number" class="form-control" ng-blur="onReplyLapQtyBlur($index)" ng-model="reply.lapQty" placeholder="数量">
+                        <input type="number" class="form-control" ng-blur="onReplyLapQtyBlur($index)" ng-change="onReplyLapQtyInput($index)" ng-model="reply.lapQty" placeholder="数量">
                     </div>
                     <div class="form-item form-right">
                         <span><i>*</i>单价<span ng-if="inquiryItem.currency" ng-bind="inquiryItem.currency == 'USD' ? '$' : '¥'"></span>:</span>