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

联系买卖家,修改发布截止时间逻辑

liusw 8 лет назад
Родитель
Сommit
4dbfb83bb7

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

@@ -303,6 +303,8 @@ define(['app/app'], function (app) {
               inquiry.code = "MALL" + $filter('date')(new Date, 'yyyyMMddsss');
               inquiry.date = new Date();
               inquiry.recorder = $scope.userInfo.userName;
+              // 截止时间处理  添加23:59:59秒
+              $scope.applyObj.deadline = new Date(formatDateTime($scope.applyObj.deadline));
               inquiry.endDate = $scope.applyObj.deadline;
               inquiry.sourceapp = "MALL";
               inquiry.amount = 1;
@@ -406,26 +408,6 @@ define(['app/app'], function (app) {
             }, function(response){
               toaster.pop('error', response.data);
             });
-            // if (!$scope.purchaseQuantity) {
-            //   toaster.pop('error', "请输入正确的采购数量");
-            //   return;
-            // }
-            // seekPurchase.updateSeekPurchaseStatus({
-            //   spId: $scope.currentOffer.spId,
-            //   ofId: $scope.currentOffer.id,
-            //   purchaseQuantity: $scope.purchaseQuantity
-            // }, {}, function (data) {
-            //   if (data.success) {
-            //     $scope.currentOffer = null;
-            //     $scope.seekPurchaseTableParams.reload();
-            //     $scope.showUseFlag = false;
-            //     toaster.pop('success', '采纳报价成功');
-            //   } else {
-            //     toaster.pop('error', data.message);
-            //   }
-            // }, function (response) {
-            //   toaster.pop('error', response.data);
-            // });
           }
 
           $scope.offerCount = 0;
@@ -519,10 +501,10 @@ define(['app/app'], function (app) {
             m = m < 10 ? ('0' + m) : m;
             var d = date.getDate();
             d = d < 10 ? ('0' + d) : d;
-            var h = date.getHours();
-            var minute = date.getMinutes();
-            var sec = date.getSeconds();
-            minute = minute < 10 ? ('0' + minute) : minute;
+            var h = 23;
+            var minute = 59;
+            var sec = 59;
+            //minute = minute < 10 ? ('0' + minute) : minute;
             return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + sec;
           };
           // 选择查找日期

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

@@ -862,7 +862,7 @@
                                             </div>
                                         </td>
                                         <td width="186" class="operate">
-                                            <a>联系卖家 <img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
+                                            <a href="javascript:void(0)" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther('12345', go.enUU, chat.UserType.ENTERPRISE)">联系卖家<img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
                                             <span ng-click = "purchase(go, $index)">立即购买</span>
                                         </td>
                                     </tr>