Browse Source

处理B2B合并bug

wangcz 7 years ago
parent
commit
454574adce

+ 3 - 24
src/main/webapp/resources/js/common/b2bServices.js

@@ -650,8 +650,7 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     method: 'POST'
                     method: 'POST'
                 }
                 }
             });
             });
-        }])
-        .factory('B2bCurrentRole', ['$resource', 'BaseService', function($resource, BaseService) {
+        }]).factory('B2bCurrentRole', ['$resource', 'BaseService', function($resource, BaseService) {
             var b2bPath = BaseService.getB2bUrl();
             var b2bPath = BaseService.getB2bUrl();
             return $resource(b2bPath + '/account/role', {}, {
             return $resource(b2bPath + '/account/role', {}, {
                 //当前企业对应的角色是否是销售经理或管理员
                 //当前企业对应的角色是否是销售经理或管理员
@@ -668,12 +667,10 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     method: 'GET'
                     method: 'GET'
                 }
                 }
             })
             })
-        }])
-        .factory('B2bCustomer', ['$resource', 'BaseService', function($resource, BaseService){
+        }]).factory('B2bCustomer', ['$resource', 'BaseService', function($resource, BaseService){
             var b2bPath = BaseService.getB2bUrl();
             var b2bPath = BaseService.getB2bUrl();
             return $resource(b2bPath + '/vendor/customer/info/search', {}, {});
             return $resource(b2bPath + '/vendor/customer/info/search', {}, {});
-        }])
-        .factory('B2bAuthenticationService', ['$http', 'SessionService', 'BaseService', 'SerializerUtil', function($http, SessionService, BaseService, SerializerUtil) {
+        }]).factory('B2bAuthenticationService', ['$http', 'SessionService', 'BaseService', 'SerializerUtil', function($http, SessionService, BaseService, SerializerUtil) {
             var cacheSession = function() {
             var cacheSession = function() {
                 SessionService.set('authenticated', true);
                 SessionService.set('authenticated', true);
             };
             };
@@ -1083,24 +1080,6 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     }
                     }
                 }
                 }
             });
             });
-            // 数据库直接获取
-        }]).factory('B2bCurrentRole', ['$resource', 'BaseService', function($resource, BaseService) {
-            var b2bPath = BaseService.getB2bUrl();
-            return $resource(b2bPath + '/account/role', {}, {
-                //当前企业对应的角色是否是销售经理或管理员
-                roles: {
-                    url: b2bPath + '/account/role/currentRole',
-                    method: 'GET'
-                },
-                isManager: {
-                    url: b2bPath + '/account/role/isManager',
-                    method: 'GET'
-                },
-                isUser: {
-                    url: b2bPath + '/account/role/isUser',
-                    method: 'GET'
-                }
-            })
         }]).factory('B2bPurcInquiryMould', ['$resource', 'BaseService', function($resource, BaseService) {
         }]).factory('B2bPurcInquiryMould', ['$resource', 'BaseService', function($resource, BaseService) {
             var b2bPath = BaseService.getB2bUrl();
             var b2bPath = BaseService.getB2bUrl();
             return $resource(b2bPath + '/sale/mould/info/search', {}, {
             return $resource(b2bPath + '/sale/mould/info/search', {}, {

+ 7 - 7
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_materialCtrl.js

@@ -3,7 +3,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
   app.register.controller('buyer_materialCtrl', ['$scope', 'Loading', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', 'Search', '$modal', 'ComponentActiveAPI', 'BrandSubmit', 'BrandActiveAPI', 'DistributionRule', 'prodRepositoryService', 'AuthenticationService', 'StoreInfo', 'ProductServiceQuery', 'StoreCms', 'ByteCountService', 'Goods', 'UASBatchPutOnPropertyServices', '$filter', '$upload', '$http', 'Authority', 'seekPurchase',
   app.register.controller('buyer_materialCtrl', ['$scope', 'Loading', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', 'Search', '$modal', 'ComponentActiveAPI', 'BrandSubmit', 'BrandActiveAPI', 'DistributionRule', 'prodRepositoryService', 'AuthenticationService', 'StoreInfo', 'ProductServiceQuery', 'StoreCms', 'ByteCountService', 'Goods', 'UASBatchPutOnPropertyServices', '$filter', '$upload', '$http', 'Authority', 'seekPurchase',
       function($scope, Loading, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams, Search, $modal, ComponentActiveAPI, BrandSubmit, BrandActiveAPI, DistributionRule, prodRepositoryService, AuthenticationService, StoreInfo, ProductServiceQuery, StoreCms, ByteCountService, Goods, UASBatchPutOnPropertyServices, $filter, $upload, $http, Authority, seekPurchase) {
       function($scope, Loading, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams, Search, $modal, ComponentActiveAPI, BrandSubmit, BrandActiveAPI, DistributionRule, prodRepositoryService, AuthenticationService, StoreInfo, ProductServiceQuery, StoreCms, ByteCountService, Goods, UASBatchPutOnPropertyServices, $filter, $upload, $http, Authority, seekPurchase) {
     $rootScope.active = 'buyer_material';
     $rootScope.active = 'buyer_material';
-    document.title = '家产品库-优软商城';
+    document.title = '家产品库-优软商城';
     $scope.tab = 'material';
     $scope.tab = 'material';
     $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
     $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
     $scope.choosedIds = [];
     $scope.choosedIds = [];
@@ -4243,12 +4243,12 @@ define(['app/app', 'jquery-uploadify'], function(app) {
                   $scope.seekUrl = data.url;
                   $scope.seekUrl = data.url;
                   commodity.seekPurchaseShow = true;
                   commodity.seekPurchaseShow = true;
                   var ChooseItem = _deepCopy(commodity)
                   var ChooseItem = _deepCopy(commodity)
-                  $scope.applyObj.brand = ChooseItem.pbranden || ChooseItem.pbrand // 品牌
-                  $scope.applyObj.prodTitle = ChooseItem.kind || ChooseItem.kinden // 物料名称
-                  $scope.applyObj.spec = ChooseItem.spec || '-' // 规格
-                  $scope.applyObj.code = ChooseItem.pcmpcode // 型号
-                  $scope.applyObj.amount = null
-                  $scope.applyObj.deadline = null
+                  $scope.applyObj.brand = ChooseItem.pbranden || ChooseItem.pbrand; // 品牌
+                  $scope.applyObj.prodTitle = ChooseItem.kind || ChooseItem.kinden; // 物料名称
+                  $scope.applyObj.spec = ChooseItem.spec || '-'; // 规格
+                  $scope.applyObj.code = ChooseItem.pcmpcode; // 型号
+                  $scope.applyObj.amount = '';
+                  $scope.applyObj.deadline = null;
               })
               })
           }
           }
   }]);
   }]);

+ 2 - 1
src/main/webapp/resources/js/vendor/controllers/b2b/change/sale_inquiry_mould_detail.js

@@ -1,6 +1,7 @@
 // 客户模具询价单
 // 客户模具询价单
 define(['app/app'], function (app) {
 define(['app/app'], function (app) {
-  app.register.controller('saleInquiryMouldDetailCtrl', ['$rootScope','BaseService', '$scope', '$stateParams', 'B2bPurcInquiryMould', '$filter', 'toaster', '$upload', 'B2bCurrentRole', function (BaseService, $scope, $stateParams, PurcInquiryMould, $filter, toaster, $upload, CurrentRole) {
+  app.register.controller('saleInquiryMouldDetailCtrl', ['$rootScope','BaseService', '$scope', '$stateParams', 'B2bPurcInquiryMould', '$filter', 'toaster', '$upload', 'B2bCurrentRole',
+      function ($rootScope, BaseService, $scope, $stateParams, PurcInquiryMould, $filter, toaster, $upload, CurrentRole) {
       // 获取当前用户是否为普通用户
       // 获取当前用户是否为普通用户
       CurrentRole.isUser({}, {}, function (data) {
       CurrentRole.isUser({}, {}, function (data) {
           $scope.isUser = data.isUser;
           $scope.isUser = data.isUser;

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

@@ -1977,6 +1977,7 @@
 			height: 28px;
 			height: 28px;
 			border-radius: 2px;
 			border-radius: 2px;
 			color: #333;
 			color: #333;
+			padding:6px;
 		}
 		}
 		.wanted_list01 .dropdown-menu table tr{
 		.wanted_list01 .dropdown-menu table tr{
 			height:auto;
 			height:auto;

+ 1 - 1
src/main/webapp/resources/view/vendor/b2b/change/sale_inquiry_details.html

@@ -261,7 +261,7 @@
         </div>
         </div>
         <div class="title" ng-bind="::file.name"></div>
         <div class="title" ng-bind="::file.name"></div>
         <div class="download">
         <div class="download">
-          <a href="file/{{file.id}}">下载</a>
+          <a href="{{b2bUrl}}/file/{{file.id}}">下载</a>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>

+ 3 - 2
src/main/webapp/resources/view/vendor/b2b/change/sale_inquiry_mould_detail.html

@@ -19,7 +19,8 @@
 
 
   tbody td .text-waiting {
   tbody td .text-waiting {
     position: absolute;
     position: absolute;
-    top: 5px;
+    top: 15px;
+    left:25px;
     background-color: #fff;
     background-color: #fff;
     border: 1px solid;
     border: 1px solid;
     padding: 3px 14px;
     padding: 3px 14px;
@@ -459,7 +460,7 @@
             <div ng-if="!inquiryMould.$editing">
             <div ng-if="!inquiryMould.$editing">
               <div ng-repeat="file in inquiryMould.sellAttachs track by $index">
               <div ng-repeat="file in inquiryMould.sellAttachs track by $index">
                 <p class="text-left">
                 <p class="text-left">
-                  <a style="color: #0000cc" target="_blank" href="file/{{file.id}}">{{file.name}}</a>&nbsp;&nbsp;&nbsp;
+                  <a style="color: #0000cc" target="_blank" href="{{b2bUrl}}/file/{{file.id}}">{{file.name}}</a>&nbsp;&nbsp;&nbsp;
                 </p>
                 </p>
               </div>
               </div>
             </div>
             </div>

+ 1 - 1
src/main/webapp/resources/view/vendor/b2b/change/sale_order_details.html

@@ -336,7 +336,7 @@
             <div class="text-bold text-inverse text-flow f14" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
             <div class="text-bold text-inverse text-flow f14" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
             <div class="text-bold text-inverse text-flow f14" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
             <div class="text-bold text-inverse text-flow f14" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
             <div ng-repeat="att in item.attachs" class="text-bold text-bold text-overflow f14">
             <div ng-repeat="att in item.attachs" class="text-bold text-bold text-overflow f14">
-              <a href="file/{{att.id}}">{{att.name}}</a>
+              <a href="{{b2bUrl}}/file/{{att.id}}">{{att.name}}</a>
             </div>
             </div>
           </td>
           </td>
           <td width="95" class="text-center">
           <td width="95" class="text-center">

+ 1 - 1
src/main/webapp/resources/view/vendor/b2b/change/sale_send_detail.html

@@ -380,7 +380,7 @@
             </div>
             </div>
           </td>
           </td>
           <td style="width: 165px;padding: 0 5px;" class="text-muted">
           <td style="width: 165px;padding: 0 5px;" class="text-muted">
-            <div>单据编号:<a href="#/sale/order/{{::item.orderItem.order.id}}" ng-bind="::item.orderItem.order.code"></a></div>
+            <div>单据编号:<a href="vendor#/order/{{::item.orderItem.order.id}}" ng-bind="::item.orderItem.order.code"></a></div>
             <div>
             <div>
               第 <span ng-bind="::item.orderItem.number"></span> 行
               第 <span ng-bind="::item.orderItem.number"></span> 行
               &nbsp;&nbsp;&nbsp;&nbsp;数量:<span ng-bind="::item.orderItem.qty"></span>
               &nbsp;&nbsp;&nbsp;&nbsp;数量:<span ng-bind="::item.orderItem.qty"></span>