Browse Source

处理BUG

wangcz 7 years ago
parent
commit
308c4b738f

+ 5 - 0
src/main/webapp/resources/js/common/query/purchase.js

@@ -10,6 +10,11 @@ define([ 'ngResource' ], function() {
 				url : 'trade/purchase/purchaseId/:purchaseId',
 				method : 'GET'
 			},
+            // 获取当个发货单的信息
+            getSendOrderInfo: {
+                url: 'trade/order/invoiceid',
+                method : 'GET'
+            },
 
 			/**
 			 * 管理员查看

+ 1 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js

@@ -974,7 +974,7 @@ define([ 'app/app' ], function(app) {
 		};
 
 		var validateRepeat = function (number) {
-			bankInfoService.getCountByNumber({type:1061, number:number}, {}, function (data) {
+			bankInfoService.getCountByNumber({type:1061, number:number, accountType: 'PAY_TYPE'}, {}, function (data) {
 				if (data.success){
 					if (data.data != 0){
 						$scope.repeatError = true;

+ 66 - 20
src/main/webapp/resources/js/vendor/controllers/forstore/query_logistics_ctrl.js

@@ -15,6 +15,47 @@ define(['app/app', 'calendar'], function(app) {
             1303 : '上门自提'
         };
 
+        // 设置当前选择的发货单
+        $scope.ChooseSendGoodsItem = function(item, ind, e) {
+            e.stopPropagation()
+            e.preventDefault()
+            $scope.CheckId = 'autoMonth' + ind;
+            $scope.ChooseItem = item;
+            getReceiveInfo();
+        }
+        // 获取当前收货单所对应的物品信息
+        function getReceiveInfo() {
+            Purchase.getSendOrderInfo(
+                {id: $scope.purchase.id, invoiceid: $scope.ChooseItem}, {},
+                function (data) {
+                    var params = {};
+                    $scope.purchase.logistics = data.data.logistics
+                    $scope.logistics = data.data.logistics
+                    params.companyName = $scope.logistics.companyName;
+                    KdnLogistics.kdnQueryCompany({companyName:$scope.logistics.companyName}, function(response){
+                        console.log(response);
+                        if (response.code){
+                            $scope.canShowInfo = true;
+                        }else{
+                            $scope.canShowInfo = false;
+                        }
+                    },function (ex) {
+                        $scope.canShowInfo = false;
+                    });
+                    params.logisticsCode = $scope.logistics.number;
+                    KdnLogistics.kdnQuery(params, {}, function(response){
+                        if(!response.errorInfo) {
+                            $scope.logisticsInfo = eval ("(" + response.traces + ")");
+                            if($scope.logisticsInfo.length != 0) {
+                                $scope.hasInfo = true;
+                            }
+                        }
+                    }, function(err){
+                        toaster.pop('info', err.data);
+                    });
+                })
+        }
+
         /**
          *  查询物流信息(由于接口需要真实运单号)
          *
@@ -33,31 +74,36 @@ define(['app/app', 'calendar'], function(app) {
                 }else {
                     $scope.purchase = data.data;
                     $scope.address = JSON.parse($scope.purchase.jsonAddress);
+                    console.log($scope.purchase)
+                    $scope.sendGoodsList = $scope.purchase.inids.split(',')
+                    $scope.CheckId = 'autoMonth0';
+                    $scope.ChooseItem = $scope.sendGoodsList[0];
+                    getReceiveInfo()
                     if (!data.data.lgtId) {
                         getPurchaseStatus($scope.purchase.status);
                         $scope.logisticsInfo = [];
                         return;
                     }
-                    Logistics.findLogisticsById({lgtid: data.data.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;
-                            } else {
-                                $scope.logisticsInfo = [];
-                            }
-                        }, function(err){
-                            $scope.logisticsInfo = [];
-                            toaster.pop('info', err.data || '查询物流信息失败,请核对物流公司和运单号');
-                        });
-                    }, function(err){
-                        toaster.pop('info', err.data || '根据快递ID查询跟订单相关联的物流信息失败');
-                    });
+                    // Logistics.findLogisticsById({lgtid: data.data.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;
+                    //         } else {
+                    //             $scope.logisticsInfo = [];
+                    //         }
+                    //     }, function(err){
+                    //         $scope.logisticsInfo = [];
+                    //         toaster.pop('info', err.data || '查询物流信息失败,请核对物流公司和运单号');
+                    //     });
+                    // }, function(err){
+                    //     toaster.pop('info', err.data || '根据快递ID查询跟订单相关联的物流信息失败');
+                    // });
                 }
 
             }, function(err) {

+ 9 - 3
src/main/webapp/resources/view/admin/help/helpNav_modal.html

@@ -1,4 +1,8 @@
 <style>
+    .help-list{
+        max-height:450px;
+        overflow-y: auto;
+    }
     .help-list h2{
         background: #5078cb;
         line-height: 34px;
@@ -14,7 +18,7 @@
     }
     .help-list li {
         position: relative;
-        line-height: 33px;
+        line-height: 28px;
         font-size: 14px;
         color: #333;
         float: left;
@@ -22,14 +26,16 @@
         padding-left: 10px;
         cursor: pointer;
     }
+    .help-list li > div > span {
+        padding-top:10px;
+    }
     .help-list ul.list-body {
         color: #666;
     }
     .help-list ul.list-body li {
         float: none;
         background-image: none;
-        min-height: 26px;
-        line-height: 26px;
+        line-height: 15px;
         font-size: 12px;
     }
     .help-list li>ul>li>ul>li {

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

@@ -657,8 +657,8 @@
 					</dd>
 					<dd ng-if="acceptGoods">
 						<span class="user-address" style="padding-left: 40px;">
-							<i class="fl">物流公司:{{logistics.companyName.companyName || logistics.companyName || order.logistics.companyName || ''}}</i><br>
-							<i class="fl" style="margin-top: 5px">物流单号:{{logistics.number || order.logistics.number || ''}}</i>
+							<i class="fl">物流公司:{{logistics.companyName.companyName || logistics.companyName || order.logistics.companyName || '-'}}</i><br>
+							<i class="fl" style="margin-top: 5px">物流单号:{{logistics.number || order.logistics.number || '-'}}</i>
 						</span>
 					</dd>
 				</dl>

+ 2 - 3
src/main/webapp/resources/view/vendor/forstore/purchase_detail.html

@@ -463,7 +463,7 @@
 		<div class="logistics_list01 clearfix" style="margin-bottom: 10px;">
 			<div class="log_menu" style="border-bottom: #e8e8e8 1px solid;">
 				<span style="white-space: nowrap; width: 50%; text-align: left; line-height: 50px; position:relative;border:none;height:auto;">
-					订单信息 <a style="margin: 0 10px"></a>家:
+					订单信息 <a style="margin: 0 10px"></a>家:
 							<i style="min-width: 270px; display: inline-block">
 								<img src="static/img/user/images/shop_home.png"/>
 								<i ng-bind="purchase.buyername" style="color: #333;"></i>
@@ -724,7 +724,6 @@
 					float: left;
 					margin-bottom: 20px;
 					position: relative;
-					margin-top: -57px;
 				}
 				.direct-collection .head{
 					width: 734px;
@@ -998,7 +997,7 @@
 		<div class="logistics_list01" ng-if="purchase.status != 602 && purchase.status != 603 && purchase.status != 604 && purchase.status != 605 && purchase.status != 606 && purchase.status != 315">
 			<div class="log_menu">
 				<span>物流信息
-					<b ng-if="logistics.companyName">物流公司:{{logistics.companyName || '空'}}&nbsp;&nbsp;&nbsp;物流单号:{{logistics.number || '空'}}</b>
+					<b ng-if="logistics.companyName">物流公司:{{logistics.companyName || '-'}}&nbsp;&nbsp;&nbsp;物流单号:{{logistics.number || '-'}}</b>
 				</span>
 			</div>
 			<div class="logistics_list_xq" ng-show="hasInfo">

+ 48 - 0
src/main/webapp/resources/view/vendor/forstore/query_logistics.html

@@ -188,6 +188,41 @@
     #empty .empty-info i{
         margin-right:5px;
     }
+    .sendGoodsList {
+        padding: 0 25px;
+    }
+    .sendGoodsList:after {
+        clear: both;
+        content: ' ';
+        zoom: 1;
+        display: block;
+        visibility: hidden;
+    }
+    .sendGoodsList li {
+        float: left;
+        width: 50%;
+    }
+    .sendGoodsList li .clearfix {
+        display: inline-block;
+        line-height: 40px;
+    }
+    .sendGoodsList li .clearfix:after {
+        clear: both;
+        content: ' ';
+        zoom: 1;
+        display: block;
+        visibility: hidden;
+    }
+    .sendGoodsList li .clearfix div {
+        float: left;
+        font-size: 14px;
+    }
+    label {
+        margin-bottom: 0px;
+    }
+    .com-check-radio input[type='radio'] + label {
+        top: 14px !important;
+    }
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr">
@@ -197,6 +232,19 @@
             <div class="logistics_cter_01">
                 <!--包裹跟踪-->
                 <div class="tab" style="display: inline-block;">
+                    <div class="log_menu">
+                        <div class="sendGoodsList" >
+                            <li ng-repeat="item in sendGoodsList">
+                                <label class="com-check-radio"   ng-click="ChooseSendGoodsItem(item, $index, $event)">
+                                    <input type="radio" name="autoMonth" name="date" ng-checked="CheckId === 'autoMonth'+$index">
+                                    <label style="vertical-align: top"  name="autoMonth" ></label>
+                                    <div class="clearfix">
+                                        <div style="color: #666">发货单:</div><div style="color: #333">{{item}}</div>
+                                    </div>
+                                </label>
+                            </li>
+                        </div>
+                    </div>
                     <div class="log_cter_h">
                         <span style="margin-right: 0;">订单号:</span>
                         <span style="margin-left: 0;" ng-bind="purchase.orderid"></span>