yangc 8 лет назад
Родитель
Сommit
68f881df17

+ 6 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/add_rate_ctrl.js

@@ -72,6 +72,12 @@ define(['app/app'], function(app) {
 
         };
 
+        $scope.listenRateContent = function (detail) {
+            var str = detail.buyerAfterRate;
+            if (str.length > 200) {
+                detail.buyerAfterRate = str.substring(0, 200);
+            }
+        }
 
     }]);
 });

+ 5 - 85
src/main/webapp/resources/js/usercenter/controllers/forstore/first_rate_ctrl.js

@@ -84,92 +84,12 @@ define(['app/app'], function(app) {
             $scope.descObj[type] = level;
         }
 
-    }]);
-});
-
-
-/*
-
-define(['app/app', 'calendar'], function(app) {
-    'use strict';
-    app.register.controller('buyerQueryLogisticsCtrl', ['$scope', '$rootScope', 'BaseService', 'KdnLogistics', '$stateParams', '$filter', 'Logistics', "Order", 'toaster', function($scope, $rootScope, BaseService, KdnLogistics, $stateParams, $filter, Logistics, Order, toaster) {
-
-        $rootScope.active = 'buyer_order';
-
-        // 加密过滤器
-        var enIdFilter = $filter('EncryptionFilter');
-
-        /!**
-         *  查询物流信息(接口需要真实运单号)
-         *
-         *  @param  kdnCompanyName	快递公司名称
-         *  @param	logisticsCode	运单号
-         *
-         *!/
-        if ($stateParams.orderid && $stateParams.orderid != '') {
-            $scope.orderid = $stateParams.orderid;
-            if(!$scope.orderid) {
-                toaster.pop('warning', '没有传入有效的订单信息');
+        $scope.listenRateContent = function ($index) {
+            var str = $scope.goodsRate[$index].buyerRate;
+            if (str.length > 200) {
+                $scope.goodsRate[$index].buyerRate = str.substring(0, 200);
             }
-            Order.get({orderid : $scope.orderid}, function (data) {
-                if(data.length != 1) {
-                    toaster.pop('warning', '获取订单信息失败');
-                    return ;
-                }
-                $scope.order = data[0];
-                $scope.address = JSON.parse($scope.order.jsonAddress);
-                console.log("$scope.order", $scope.order);
-                Logistics.findLogisticsById({lgtid: data[0].lgtId}, function(data){
-                    $scope.logistics = data;
-                    var params = {};
-                    params.companyName = $scope.logistics.companyName;
-                    params.logisticsCode = $scope.logistics.number;
-                    KdnLogistics.kdnQuery(params, {}, function(response){
-                        if(!response.errorInfo) {
-                            $scope.logisticsInfo = eval ("(" + response.traces + ")");
-                            statusOfLogistics($scope.logisticsInfo[$scope.logisticsInfo.length - 1].AcceptStation);
-                            $scope.hasInfo = true;
-                        }
-                    }, function(){
-                        $scope.logisticsInfo = [];
-                        toaster.pop('info', '查询物流信息失败,请核对物流公司和运单号');
-                    });
-                }, function(){
-                    toaster.pop('info', '根据快递ID查询跟订单相关联的物流信息失败');
-                });
-            }, function() {
-                toaster.pop('warning', '获取订单信心失败。');
-            });
         }
 
-        $scope.status = "tobereceiving";
-        // 判断物流信息状态
-        var statusOfLogistics = function(str) {
-            if(str.indexOf("揽件")!=-1 || str.indexOf("收件")!=-1 || str.indexOf("转运")!=-1||str.indexOf("运输")!=-1||str.indexOf("发往")!=-1||
-                str.indexOf("发出")!=-1||str.indexOf("收入")!=-1||str.indexOf("扫描")!=-1||str.indexOf("到达")!=-1){
-                $scope.status = "transit";
-            }
-            if(str.indexOf("派送")!=-1){
-                $scope.status = "send";
-            }
-            if(str.indexOf("签收")!=-1){
-                $scope.status = "signin";
-            }
-        }
-
-        /!**
-         *  日历组件
-         *
-         *!/
-        $('#date').calendar({
-            width: 270,
-            height: 220
-        });
-
     }]);
-
-
-
-
-});
-*/
+});

+ 7 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/show_rate_ctrl.js

@@ -38,7 +38,7 @@ define(['app/app'], function(app) {
                         return;
                     }
                     $scope.order = data[0];
-                    Rate.getRateGoodsByOrderId({orderId: $scope.order.orderid}, {}, function (data) {
+                    Rate.getRateGoodsByOrderId({orderId: $scope.order.orderid, page: param.page, count: param.count}, {}, function (data) {
                         $scope.$$kdnData.totalElements = data.data.totalElements;
                         if(Number(data.data.totalElements) > 0) {
                             $scope.$$kdnData.start = Number(data.data.size) * (Number(data.data.number) - 1) + 1;
@@ -71,6 +71,12 @@ define(['app/app'], function(app) {
         // $scope.range = function(n) {
         //     return new Array(n);
         // }
+        $scope.listenRateContent = function () {
+            var str = $scope.modalTempData.rateContent
+            if (str.length > 200) {
+                $scope.modalTempData.rateContent = str.substring(0, 200);
+            }
+        }
 
         $scope.modalData = [];
 

+ 8 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -1054,6 +1054,14 @@ define(['app/app'], function (app) {
             $scope.rateType = type;
         }
 
+
+        $scope.listenRateContent = function () {
+            var str = $scope.modalTempData.rateContent
+            if (str.length > 200) {
+                $scope.modalTempData.rateContent = str.substring(0, 200);
+            }
+        }
+
         /***
          * 评价模态框状态,默认为1
          * 1:使用模板

+ 15 - 3
src/main/webapp/resources/view/usercenter/forstore/add_rate.html

@@ -34,7 +34,7 @@
     .add-rate table tbody tr {
         border-bottom: 1px dashed rgb( 232, 235, 252 );
     }
-    .add-rate table tbody tr td >img{
+    .add-rate table tbody tr td >a >img{
         width: 73px;
         height: 74px;
         float: left;
@@ -166,11 +166,19 @@
         background: #f5f8ff;
         padding: 7px 12px;
         margin: 5px 0;
+        position: relative;
     }
     .add-rate table tbody tr td .first-rate-item-textBox textarea {
         width: 207px;
         height: 60px;
         overflow: scroll;
+        padding: 3px 8px;
+    }
+    .add-rate table tbody tr td .first-rate-item-textBox .add-rate-remind {
+        color: #999;
+        position: absolute;
+        right: 27px;
+        bottom: 11px;
     }
 
 </style>
@@ -258,7 +266,11 @@
                         <div class="buyer-first-rate02" style="background: #fff">
                             <div style="margin-top: 10px;">买家追评:</div>
                             <div class="first-rate-item-textBox">
-                                <textarea placeholder="请输入您对产品的评价" name="" id="" cols="30" rows="10" ng-model="detail.buyerAfterRate"></textarea>
+                                <textarea placeholder="请输入您对产品的评价" ng-change="listenRateContent(detail)" ng-model="detail.buyerAfterRate"></textarea>
+                                <div class="add-rate-remind">
+                                    <span>{{detail.buyerAfterRate.length || 0}}</span>
+                                    <span>/200</span>
+                                </div>
                             </div>
                         </div>
                     </div>
@@ -273,7 +285,7 @@
     </table>
     <div class="submitBox">
      <label class="check-active">
-         <input ng-model="isSetTop" type="checkbox" id="check-act" class="ng-pristine ng-untouched ng-valid" disabled ng-checked="isAnony" >
+         <input ng-model="isSetTop" type="checkbox" id="check-act" class="ng-pristine ng-untouched ng-valid" ng-checked="isAnony" >
          <label for="check-act"></label>
          <span style="font-size: 14px; color: black">匿名评价</span>
      </label>

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -743,10 +743,10 @@
 						</span>
 						<span class="oder_deal" ng-class="{'order-border-bottom-solid' : $index == order.orderDetails.length -1 || $index==2}">
                             <div ng-if="$index == 0">
-                                <a ng-if="order.status == 520" class="operate-height" target="_blank" href="user#/rate/firstRate/{{order.orderid | EncryptionFilter}}" style="display: block;">
+                                <a class="operate-height" target="_blank" href="user#/rate/firstRate/{{order.orderid | EncryptionFilter}}" style="display: block;">
                                   <em class="order-operation">评价</em>
                               	</a>
-								<a ng-if="order.status == 523" class="operate-height" target="_blank" href="user#/rate/addRate/{{order.orderid | EncryptionFilter}}" style="display: block;">
+								<a class="operate-height" target="_blank" href="user#/rate/addRate/{{order.orderid | EncryptionFilter}}" style="display: block;">
                                   <em class="order-operation">追加评价</em>
                               	</a>
                               <a class="operate-height" href="user#/order/pay/{{order.orderid | EncryptionFilter}}" ng-if="(order.status == 503 || order.status == 501) && order.auditPayFailReason == null" style="display: block;">

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

@@ -94,11 +94,19 @@
         background: #f5f8ff;
         padding: 7px 15px;
         margin: 5px 0;
+        position: relative;
+    }
+    .first-rate table tbody tr td .first-rate-item-textBox .add-rate-remind {
+        color: #999;
+        position: absolute;
+        right: 30px;
+        bottom: 13px;
     }
     .first-rate table tbody tr td .first-rate-item-textBox textarea {
         width: 507px;
         height: 87px;
         overflow: scroll;
+        padding: 5px 10px;
     }
     .first-rate table tbody .record-num {
         border: none;
@@ -205,7 +213,11 @@
                             </label>
                         </div>
                         <div class="first-rate-item-textBox">
-                            <textarea placeholder="请输入您对产品的评价" name="" id="" cols="30" rows="10" ng-model="goodsRate[$index].buyerRate"></textarea>
+                            <textarea placeholder="请输入您对产品的评价" ng-change="listenRateContent($index)" ng-model="goodsRate[$index].buyerRate"></textarea>
+                            <div class="add-rate-remind">
+                                <span>{{goodsRate[$index].buyerRate.length || 0}}</span>
+                                <span>/200</span>
+                            </div>
                         </div>
                     </div>
                 </td>

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

@@ -34,7 +34,7 @@
     .add-rate table tbody tr {
         border-bottom: 1px dashed rgb( 232, 235, 252 );
     }
-    .add-rate table tbody tr td >img{
+    .add-rate table tbody tr td >a >img{
         width: 73px;
         height: 74px;
         float: left;

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

@@ -217,6 +217,7 @@
     .add-rate .reply-box ul {
         position: absolute;
         right:32px;
+        z-index: 100;
     }
     .add-rate .reply-box ul li {
         width: 200px;
@@ -247,6 +248,7 @@
     }
     .add-rate .reply-box .reply-box-text {
         margin-top: 10px;
+        position: relative;
     }
     .add-rate .reply-box .reply-box-text >textarea {
         width: 324px;
@@ -284,6 +286,13 @@
         background: #fff;
         color: #333;
     }
+    .add-rate .reply-box .reply-box-text .add-rate-remind {
+        position: absolute;
+        bottom: 0px;
+        right: 50px;
+        font-size: 12px;
+        color: #999;
+    }
 </style>
 
 <div class="add-rate">
@@ -423,7 +432,11 @@
             <input type="text" ng-model="modalTempData.modalTitle" ng-if="boxStatus == 3 || boxStatus == 4" class="modal-head" placeholder="请填写模板名称">
         </div>
         <div class="reply-box-text">
-            <textarea ng-readonly="boxStatus == 1" ng-class="{'active': boxStatus != 1}" ng-model="modalTempData.rateContent"></textarea>
+            <textarea ng-readonly="boxStatus == 1" ng-change="listenRateContent()" ng-class="{'active': boxStatus != 1}" ng-model="modalTempData.rateContent"></textarea>
+            <div class="add-rate-remind">
+                <span>{{modalTempData.rateContent.length || 0}}</span>
+                <span>/200</span>
+            </div>
         </div>
         <div class="reply-box-btn">
             <span class="modal-btn modify-modal" ng-click="setBoxStatus(4)" ng-show="boxStatus == 1">修改模板</span>

+ 15 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -636,6 +636,7 @@
 	.sellOder .reply-box ul {
 		position: absolute;
 		right:43px;
+        z-index: 100;
 	}
 	.sellOder .reply-box ul li {
 		width: 200px;
@@ -666,6 +667,7 @@
 	}
 	.sellOder .reply-box .reply-box-text {
 		margin-top: 10px;
+        position: relative;
 	}
 	.sellOder .reply-box .reply-box-text >textarea {
 		width: 324px;
@@ -758,6 +760,13 @@
 	.sellOder .reply-box .vendor-modal-header .modal-add-rate .rate-content span {
 		word-break: break-all;
 	}
+    .sellOder .reply-box .reply-box-text .add-rate-remind {
+        position: absolute;
+        bottom: 0px;
+        right: 56px;
+        font-size: 12px;
+        color: #999;
+    }
 </style>
 <div class="user_right fr">
 	<!--订单中心-->
@@ -1071,8 +1080,12 @@
 					<input type="text" ng-model="modalTempData.modalTitle" ng-if="boxStatus == 3 || boxStatus == 4" class="modal-head" placeholder="请填写模板名称">
 				</div>
 				<div class="reply-box-text">
-					<textarea ng-readonly="boxStatus == 1" ng-class="{'active': boxStatus != 1}" ng-model="modalTempData.rateContent"></textarea>
-				</div>
+					<textarea ng-readonly="boxStatus == 1" ng-change="listenRateContent()" ng-class="{'active': boxStatus != 1}" ng-model="modalTempData.rateContent"></textarea>
+                    <div class="add-rate-remind">
+                        <span>{{modalTempData.rateContent.length || 0}}</span>
+                        <span>/200</span>
+                    </div>
+                </div>
 				<div class="reply-box-btn">
 					<span class="modal-btn modify-modal" ng-click="setBoxStatus(4)" ng-show="boxStatus == 1">修改模板</span>
 					<span class="modal-btn cancel-modal" ng-click="setShowRateBoxFlag(false)" ng-show="boxStatus == 1 || boxStatus == 2">取消</span>