Browse Source

完善求购-业务员分配

liusw 7 years ago
parent
commit
c9a384f853

+ 20 - 0
src/main/java/com/uas/platform/b2c/trade/seek/controller/SeekSalesmanInfoController.java

@@ -34,20 +34,40 @@ public class SeekSalesmanInfoController {
     @Autowired
     private SeekSalesmanInfoService seekSalesmanInfoService;
 
+    /**
+     * 获取求购-业务员分配列表
+     * @param params
+     * @param status
+     * @param salesman
+     * @param keyword
+     * @return
+     */
     @RequestMapping(value = "/getPageInfo", method = RequestMethod.GET)
     public Page<SeekSalesmanInfo> getPageInfo(PageParams params, Integer status, String salesman, String keyword) {
         PageInfo info = new PageInfo(params);
+        logger.log("求购", "获取求购-业务员分配列表");
         return seekSalesmanInfoService.getPageInfo(info, status, salesman, keyword);
     }
 
+    /**
+     * 业务员求购接单
+     * @param id
+     * @return
+     */
     @RequestMapping(value = "/orders", method = RequestMethod.POST)
     public ResultMap orders(Long id) {
         User user = SystemSession.getUser();
+        logger.log("求购", "业务员求购接单,uu为" + user.getUserUU());
         return seekSalesmanInfoService.orders(id, user);
     }
 
+    /**
+     * 获取业务员列表
+     * @return
+     */
     @RequestMapping(value = "/getMembers", method = RequestMethod.GET)
     public List<SeekSalesmanMember> getMembers(){
+        logger.log("求购", "获取业务员列表");
         return seekSalesmanInfoService.getMembers();
     }
 

+ 0 - 3
src/main/webapp/resources/js/admin/controllers/SeekSalesmanCtrl.js

@@ -28,9 +28,6 @@ define(['app/app'], function (app) {
 
 
     $scope.onSearchKeyWord = function() {
-        if (!$scope.keyword) {
-            return;
-        }
       $scope.seekSalesmanTableParams.reload();
    }
 

+ 13 - 11
src/main/webapp/resources/js/admin/controllers/SeekSalesmanDetailCtrl.js

@@ -23,19 +23,21 @@ define(['app/app'], function (app) {
                 // $scope.bankInfoTableParams.reload();
             }
         };
+        seekSalesman.getSeekUrl({}, function(data1) {
+            var seekUrl = data1.url;
+            $http({
+                method: 'get',
+                dataType: 'json',
+                url: seekUrl + '/inquiry/buyer/quotation',
+                params: {id: $stateParams.uuid}
+            }).success(function (data) {
+                $scope.seek = data;
+                seekSalesman.getMallGoodsList({code: data.cmpCode, brand: data.inbrand}, function (data1) {
+                    $scope.goods = data1;
+                });
+            }).error(function (response) {
 
-        $http({
-            method: 'get',
-            dataType: 'json',
-            url: 'http://10.1.51.88:7070' + '/inquiry/buyer/quotation',
-            params: {id: $stateParams.uuid}
-        }).success(function (data) {
-            $scope.seek = data;
-            seekSalesman.getMallGoodsList({code: data.cmpCode, brand: data.inbrand},function(data1){
-                $scope.goods = data1;
             });
-        }).error(function (response) {
-
         });
 
         $scope.orders = function(){

+ 3 - 0
src/main/webapp/resources/js/common/query/seekSalesman.js

@@ -16,6 +16,9 @@ define([ 'ngResource' ], function() {
                 url: 'seek/salesman/getMembers',
                 method: 'GET',
                 isArray: true
+            }, getSeekUrl: {
+                url: 'seek/accessUrl',
+                method: 'GET'
             }
         });
     }])

+ 2 - 2
src/main/webapp/resources/view/admin/seek_salesman.html

@@ -70,10 +70,10 @@
 					</td>
 					<td><span ng-bind="seek.salesman"></span></td>
 					<td>
+						<button ng-if="!seek.salesman" class="btn btn-sm btn-warning" ng-click="orders(seek.id)">我来接单</button>
 						<a target="_blank" ng-href="#/seekSalesman/{{seek.id}}/{{seek.salesman}}">
-							<button class="btn btn-primary" >查看详情</button>
+							查看详情
 						</a>
-						<button ng-if="!seek.salesman" class="btn btn-primary" ng-click="orders(seek.id)">我来接单</button>
 					</td>
 				</tr>
 			</tbody>