Ver Fonte

Merge remote-tracking branch 'origin/function_vendor_modify' into function_vendor_modify

hulh há 8 anos atrás
pai
commit
a5ac70888b

+ 0 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_delivery_ctrl.js

@@ -699,7 +699,6 @@ define(['app/app'], function(app) {
             angular.forEach(allKdnList, function (data) {
                 $scope.selectFlag[data.code] = {};
                 $scope.selectFlag[data.code].isChoosed = false;
-                console.log($scope.selectFlag[data.code].isChoosed)
             });
             angular.forEach(selectedList, function (data, index) {
                 $scope.chooseList[index] = {};

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

@@ -184,7 +184,27 @@ define(['app/app'], function (app) {
             1302: '卖家配送',
             1303: '上门自提'
         };
+      // 获取已有物流配送商列表
+        $scope.initData = function () {
+            Distributor.findAllSelected({},function (data) {
+                if (data){
+                    $scope.data_list = data;
+                    console.log($scope.data_list)
+                }
+            })
+        };
+        $scope.initData();
+        $scope.showNameUl = false;
 
+        $scope.showName = function () {
+            $scope.showNameUl = true;
+            console.log($scope.showNameUl)
+        };
+        // 选中物流
+        $scope.showText = function (name) {
+            $scope.logistics.companyName = name;
+            $scope.showNameUl = false;
+        };
         $scope.modifyLogistic = function (purchase) {
             purchase.showLogistics = !purchase.showLogistics;
             angular.forEach($scope.purchases, function (data) {
@@ -211,6 +231,7 @@ define(['app/app'], function (app) {
                 if (data){
                     if(data.success){
                         toaster.pop("info", "修改物流信息成功");
+                        purchase.showLogistics = false;
                     }
                 }
             })

+ 21 - 8
src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html

@@ -1,7 +1,7 @@
 <!--右侧主体部分-->
 <style type="text/css">
     em.title {
-        font-size: 16px;
+        font-size: 14px;
         font-weight: 600;
     }
 
@@ -115,19 +115,19 @@
         left: 3px;
         top: 5px;
     }
-    ::-webkit-scrollbar-track-piece {
+    .input-ul ::-webkit-scrollbar-track-piece {
         background: #d4d4d4;
     }
-    ::-webkit-scrollbar {
+    .input-ul ::-webkit-scrollbar {
         width: 20px;
         height: 5px;
     }
-    ::-webkit-scrollbar-thumb {
+    .input-ul ::-webkit-scrollbar-thumb {
         background: #b1abab;
         padding-left: 0;!important;
         -webkit-border-radius: 0;
     }
-    ::-webkit-scrollbar-thumb:hover{
+    .input-ul ::-webkit-scrollbar-thumb:hover{
         background: #9b9b9b;
         cursor: pointer;
     }
@@ -483,11 +483,24 @@
         max-height: 40px;
         overflow: hidden;
         margin-bottom: 10px;
+        margin-top: 25px;
+        line-height: 20px;
+    }
+    .com_log_list{
+        height: 160px;
     }
     .com_log_list ul li span.adderss-name{
         max-height: 40px;
         overflow: hidden;
     }
+    .com_log_list ul li{
+        width: 282px;
+        height: 124px;
+        background: url("static/img/user/images/adress_bg02.jpg") no-repeat;
+    }
+    .com_log_list ul li.active{
+        background-position: -283px 0;
+    }
 </style>
 <div class="user_right fr">
     <!--订单发货-->
@@ -507,13 +520,13 @@
                 <ul>
                     <li class="log_line">收货人信息:</li>
                     <li>
-                        <h4 ng-bind="checkinvoice.jsonSpAddress.company || '空'"></h4>
+                        <!--<h4 ng-bind="checkinvoice.jsonSpAddress.company || '空'"></h4>-->
                         <p class="" title=""><em ng-bind="::checkinvoice.jsonSpAddress.area"></em> <em ng-bind="::checkinvoice.jsonSpAddress.detailAddress"></em></p>
                         <span class="adderss-name"><em ng-bind="checkinvoice.jsonSpAddress.tel"></em>&nbsp;&nbsp;<em ng-bind="checkinvoice.buyerentername"></em></span>
                     </li>
                     <li class="log_line">发货人信息:</li>
                     <li ng-if="jsonSdAddress.area">
-                        <h4 ng-bind="jsonSdAddress.company"></h4>
+                        <!--<h4 ng-bind="jsonSdAddress.company"></h4>-->
                         <p class="">{{jsonSdAddress.area}},{{jsonSdAddress.detailAddress}}</p>
                         <span class="adderss-name"><em ng-bind="jsonSdAddress.tel"></em>&nbsp;&nbsp;<em ng-bind="jsonSdAddress.name"></em>
                             <div style="float: right; color: #ccc;">
@@ -544,7 +557,7 @@
                     <!--<span style="width: 100%; text-align: left; padding-left: 20px;" class="ng-binding"><img src="static/img/user/images/shop_home01.png">{{purchase.buyentername}}</span>-->
                     <!--</dd>-->
                     <dd class="order-company">
-						<span style="white-space: nowrap; width: 100%; text-align: left; line-height: 50px;">
+						<span style="white-space: nowrap; width: 100%; text-align: left;">
 							<i style="min-width: 315px; display: inline-block">
                                 <i ng-bind="checkinvoice.buyername" style="color: #333; margin-left: 20px;"></i>
                                 <i style="color: #999; margin: 0 5px;">|</i>

+ 108 - 79
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -608,6 +608,93 @@
 	.border-bt-16:nth-of-type(1){
 		border-top: none;
 	}
+
+
+	.edit-logistic-box{
+		position: absolute;
+		width: 295px;
+		height: 184px;
+		box-shadow: 1px 1px 2px #ccc;
+		background: #fff;
+		right: 200px;
+		top: 30px;
+		border: #E8E8E8 1px solid;
+	}
+	.edit-logistic-box .title{
+		width: 100%;
+		height: 10px;
+		line-height: 25px;
+		position: relative;
+	}
+	.edit-logistic-box .title a{
+		position: absolute;
+		top: -3px;
+		right: 3px;
+		float: right;
+		color: #999 !important;
+		font-size: 16px !important;
+		text-decoration: none !important;
+	}
+	.edit-logistic-box .content{
+		width: 100%;
+		margin: 0 auto;
+		margin: 0 18px;
+	}
+	.edit-logistic-box .content .row{
+		line-height: 30px;
+		font-size: 14px;
+		text-align: left;
+		margin: 0;
+		margin-bottom: 14px;
+	}
+	.edit-logistic-box .content .row em{
+		display: inline-block;
+		width: 178px;
+		height: 30px;
+		position: absolute;
+		margin-left: 15px;
+	}
+	.edit-logistic-box .content .row em.btn-position{
+		position: absolute;
+		top: 1px;
+		right: 0px;
+		height: 30px;
+		width: 20px;
+		text-align: center;
+		display: inline-block;
+		font-size: 24px;
+		color: #fff;
+		background: #5078cb;
+		cursor: pointer;
+		border-bottom-right-radius: 3px;
+		border-top-right-radius: 3px;
+	}
+	.edit-logistic-box .content .row em input{
+		display: inline-block;
+		height: 30px;
+	}
+	.edit-logistic-box .edit-deal a{
+		width: 70px;
+		height: 30px;
+		display: inline-block;
+		text-align: center;
+		line-height: 30px;
+		font-size: 14px;
+		text-decoration: none !important;
+	}
+	.edit-logistic-box .edit-deal a.off{
+		background: #cdcccc;
+		color: #666;
+		margin-right: 8px;
+	}
+	.edit-logistic-box .edit-deal a.ok{
+		background: #5078cb;
+		color: #fff;
+	}
+	.edit-logistic-box .edit-deal a:hover{
+		background: #337ab7;
+		color: #fff !important;
+	}
 </style>
 <div class="user_right fr">
 	<!--订单中心-->
@@ -827,10 +914,15 @@
 										<div class="row">物流公司:
 											<em>
 												<input type="text" class="form-control" ng-model="logistics.companyName"/>
-												<em name="companyName" class="btn-position"><i class="fa fa-caret-down"></i></em>
+												<em name="companyName" class="btn-position" ng-click="showName()"><i class="fa fa-caret-down"></i></em>
+												<ul class="dropdown-menu" ng-class="{'active': showNameUl}">
+                            						<li ng-click="showText(data.companyName)" ng-repeat="data in data_list" ng-bind="data.companyName"></li>
+                            					</ul>
 											</em>
 										</div>
-										<div class="row">物流单号: <em><input type="text" class="form-control" ng-model="logistics.number"/></em></div>
+										<div class="row">物流单号: <em>
+											<input type="text" class="form-control" ng-model="logistics.number"/>
+										</em></div>
 										<div class="edit-deal">
 											<a ng-click="cancelModify(purchase)" class="off">取消</a>
 											<a ng-click="ensureModifyLogistics(purchase)" class="ok">确认</a>
@@ -838,91 +930,28 @@
 									</div>
 								</div>
 								<style>
-									.edit-logistic-box{
-										position: absolute;
-										width: 295px;
-										height: 184px;
-										box-shadow: 1px 1px 2px #ccc;
-										background: #fff;
-										right: 200px;
-										top: 30px;
-										border: #E8E8E8 1px solid;
+									.edit-logistic-box .dropdown-menu{
+										top: 95%;
+										line-height: 23px;
+										max-height: 240px;
+										overflow-y: auto;
+										width: 190px;
+										overflow-x: hidden;
+										border-radius: 0;
+										width: 179px;
 									}
-									.edit-logistic-box .title{
-										width: 100%;
-										height: 10px;
-										line-height: 25px;
-										position: relative;
-									}
-									.edit-logistic-box .title a{
-										position: absolute;
-										top: -3px;
-										right: 3px;
-										float: right;
-										color: #999 !important;
-										font-size: 16px !important;
-										text-decoration: none !important;
-									}
-									.edit-logistic-box .content{
-										width: 100%;
-										margin: 0 auto;
-										margin: 0 18px;
-									}
-									.edit-logistic-box .content .row{
-										line-height: 30px;
-										font-size: 14px;
-										text-align: left;
-										margin: 0;
-										margin-bottom: 14px;
-									}
-									.edit-logistic-box .content .row em{
-										display: inline-block;
-										width: 178px;
-										height: 30px;
-										position: absolute;
-										margin-left: 15px;
-									}
-									.edit-logistic-box .content .row em.btn-position{
-										position: absolute;
-										top: 2px;
-										right: 0px;
-										height: 30px;
-										width: 20px;
-										text-align: center;
-										display: inline-block;
-										font-size: 24px;
-										color: #fff;
-										background: #5078cb;
-										cursor: pointer;
-										border-bottom-right-radius: 3px;
-										border-top-right-radius: 3px;
-									}
-									.edit-logistic-box .content .row em input{
+									.edit-logistic-box .dropdown-menu.active{
 										display: inline-block;
-										height: 30px;
 									}
-									.edit-logistic-box .edit-deal a{
-										width: 70px;
-										height: 30px;
-										display: inline-block;
-										text-align: center;
-										line-height: 30px;
+									.edit-logistic-box .dropdown-menu li{
 										font-size: 14px;
-										text-decoration: none !important;
-									}
-									.edit-logistic-box .edit-deal a.off{
-										background: #cdcccc;
-										color: #666;
-										margin-right: 8px;
+										cursor: pointer;
+										padding-left: 13px;
 									}
-									.edit-logistic-box .edit-deal a.ok{
+									.edit-logistic-box .dropdown-menu li:hover{
 										background: #5078cb;
 										color: #fff;
 									}
-									.edit-logistic-box .edit-deal a:hover{
-										background: #337ab7;
-										color: #fff !important;
-									}
 								</style>
                             </div>
                         </span>