Browse Source

修改合并之后的bug问题。

yujia 8 years ago
parent
commit
cc86dedefb

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -2813,7 +2813,7 @@ public class GoodsServiceImpl implements GoodsService {
         goodsHistoryService.save(histories);
 
         Map<String, Object> params = new HashMap<>();
-        params.put("gid", goods.getId());
+        params.put("gids", goods.getId());
         namedParameterJdbcTemplate.update("delete from trade$seek_mall_goods where go_id in (:gids)", params);
         goodsDao.deleteByBatchCode(goods.getBatchCode());
         if(goods.getProductid() != null) {

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

@@ -4,7 +4,7 @@
  */
 define(['app/app'], function (app) {
 	'use strict';
-	app.register.controller('orderCtrl', ['$scope', '$rootScope', 'Order', 'toaster', '$filter', 'OrderSimpleInfo', 'Recommendation', '$modal', 'tradeMessageNoticeService', 'tradeBasicProperties', 'NumberService', 'ChatBusinessLayer','Rate', function($scope, $rootScope, Order, toaster, $filter, OrderSimpleInfo, Recommendation, $modal, tradeMessageNoticeService, tradeBasicProperties, NumberService, ChatBusinessLayer,Rate) {
+	app.register.controller('orderCtrl', ['$scope', '$rootScope', 'Order', 'toaster', '$filter', 'OrderSimpleInfo', 'Recommendation', '$modal', 'tradeMessageNoticeService', 'tradeBasicProperties', 'NumberService', 'ChatBusinessLayer','Rate', function($scope, $rootScope, Order, toaster, $filter, OrderSimpleInfo, Recommendation, $modal, tradeMessageNoticeService, tradeBasicProperties, NumberService, ChatBusinessLayer, Rate) {
 
 		document.title = '已买到的产品-优软商城';
 		//初始化数据

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

@@ -3,7 +3,7 @@
  */
 define(['app/app'], function(app) {
     'use strict';
-    app.register.controller('payCenterCtrl', ['$scope', '$rootScope', 'bankInfoService', 'toaster', '$upload', 'bankTransferService', 'Purchase', '$filter', 'Loading', 'ngTableParams', 'BaseService', 'SessionService', function($scope, $rootScope, bankInfoService, toaster, $upload, bankTransferService, Purchase, $filter, Loading, ngTableParams, BaseService, SessionService) {
+    app.register.controller('payCenterCtrl', ['$scope', '$rootScope', 'bankInfoService', 'toaster', '$upload', 'bankTransferService', 'Purchase', '$filter', 'Loading', 'ngTableParams', 'BaseService', 'SessionService', '$stateParams', function($scope, $rootScope, bankInfoService, toaster, $upload, bankTransferService, Purchase, $filter, Loading, ngTableParams, BaseService, SessionService, $stateParams) {
         $rootScope.active = 'pay_center';
 
         document.title = '结算中心-优软商城';

+ 13 - 39
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app', 'jquery-uploadify' ], function(app) {
 	'use strict';
-	app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', 'Search', '$modal', 'ComponentActiveAPI', 'BrandSubmit', 'BrandActiveAPI', 'DistributionRule', 'prodRepositoryService', 'AuthenticationService', 'StoreInfo', 'ProductServiceQuery', 'StoreCms', 'ByteCountService', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams, Search, $modal, ComponentActiveAPI, BrandSubmit, BrandActiveAPI, DistributionRule, prodRepositoryService, AuthenticationService, StoreInfo, ProductServiceQuery, StoreCms, ByteCountService) {
+	app.register.controller('vendor_materialCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', 'Search', '$modal', 'ComponentActiveAPI', 'BrandSubmit', 'BrandActiveAPI', 'DistributionRule', 'prodRepositoryService', 'AuthenticationService', 'StoreInfo', 'ProductServiceQuery', 'StoreCms', 'ByteCountService', 'Goods', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams, Search, $modal, ComponentActiveAPI, BrandSubmit, BrandActiveAPI, DistributionRule, prodRepositoryService, AuthenticationService, StoreInfo, ProductServiceQuery, StoreCms, ByteCountService, Goods) {
 		$rootScope.active = 'vendor_material';
 		document.title = '卖家产品库-优软商城';
 		$scope.tab = 'material';
@@ -54,19 +54,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
             // $scope.param.sorting = {code : 'ASC'};
             $scope.isBatch = false;
 		}
-		/**
-		 * 最大
-		 * @type {number}
-		 */
-		$scope.maxReserve = 999999999;
-		/**
-		 * 最小包装量的最大值
-		 */
-		$scope.maxPackQty = 999999;
-		$scope.minReserve = 1;
-
-		//只包含中文和英文的字符
-		var pattern = /^[\u4e00-\u9fa5a-zA-Z]+$/;
 
         $scope.sortByERP = 'none';
         $scope.sortByERPReserve = function () {
@@ -89,19 +76,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
             // $scope.param.sorting = {code : 'ASC'};
             $scope.isBatch = false;
 		}
-		/**
-		 * 最大
-		 * @type {number}
-		 */
-		$scope.maxReserve = 999999999;
-		/**
-		 * 最小包装量的最大值
-		 */
-		$scope.maxPackQty = 999999;
-		$scope.minReserve = 1;
-
-		//只包含中文和英文的字符
-		var pattern = /^[\u4e00-\u9fa5a-zA-Z]+$/;
 
 		$scope.goods = { breakUp: 1, isSelfSupport: 1, prices: [{}] };
 		$scope.isSelfSupport = true;
@@ -157,7 +131,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
             }).error(function(response) {
                 toaster.pop('info', '获取定单的信息' + response);
             });
-        }
+        };
 
         //判断是否是商城管理公司,是否可以选择自营。
         $q.all([getAuthentication()]).then(function() {
@@ -310,35 +284,35 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 
 		// 确认删除
 		$scope.confirmDelete = function (ids) {
-			if($scope.isChoosedAll) {
-				if($scope.standard_tab == 'standard') {
+			if ($scope.isChoosedAll) {
+				if ($scope.standard_tab == 'standard') {
 					Material.deleteStandardAll(null, null, function (data) {
 						$scope.deleteDiv = false;
 						loadDataReload();
-						if(data.code != 1) {
+						if (data.code != 1) {
 							toaster.pop('error', data.message);
-						}else {
+						} else {
 							toaster.pop('success', data.message);
 						}
 					}, function (response) {
 						toaster.pop('error', '批量删除信息失败');
 					});
-				}else {
+				} else {
 					Material.deleteUnstandardAll(null, null, function (data) {
 						$scope.deleteDiv = false;
 						loadDataReload();
-						if(data.code != 1) {
+						if (data.code != 1) {
 							toaster.pop('error', data.message);
-						}else {
+						} else {
 							toaster.pop('success', data.message);
 						}
 					}, function (response) {
 						toaster.pop('error', '批量删除信息失败');
 					});
 				}
-			}else {
+			} else {
 				var ids = $scope.choosedIds.join(',');
-				Material.deleteBatch({ids : ids}, function (data) {
+				Material.deleteBatch({ids: ids}, function (data) {
 					toaster.pop('success', '删除成功');
 					$scope.choosedIds = [];
 					$scope.deleteDiv = false;
@@ -349,6 +323,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 					$scope.deleteDiv = false;
 				});
 			}
+		};
 
 		/**
 		 * 对自定义的标签说明做隐藏或显示
@@ -1481,7 +1456,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 					});
 				}
 			});
-		}
+		};
 
 		// 保存物料详细信息
 		$scope.saveDetail = function(material) {
@@ -1493,7 +1468,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 				toaster.pop('error', response.data);
 			})
 		};
-		};
 
 		$scope.fitBrandToProduct = function (product) {
 			if (product.selectBrandId){

+ 34 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('vendor_onSaleCtrl', ['$scope', '$rootScope', 'Goods', '$modal', 'toaster', 'Loading', 'StoreInfo', 'AuthenticationService', '$q', 'StoreCms', 'NumberService', 'Enterprise', 'ByteCountService', function ($scope, $rootScope, Goods, $modal, toaster, Loading, StoreInfo, AuthenticationService, $q, StoreCms, NumberService, Enterprise, ByteCountService) {
+    app.register.controller('vendor_onSaleCtrl', ['$scope', '$rootScope', 'Goods', '$modal', 'toaster', 'Loading', 'StoreInfo', 'AuthenticationService', '$q', 'StoreCms', 'NumberService', 'Enterprise', 'ByteCountService', 'DistributionRule', function ($scope, $rootScope, Goods, $modal, toaster, Loading, StoreInfo, AuthenticationService, $q, StoreCms, NumberService, Enterprise, ByteCountService, DistributionRule) {
         $rootScope.active = 'vendor_material';
         $scope.keyword = '';
         $scope.tab = 'onSale';
@@ -299,6 +299,8 @@ define([ 'app/app' ], function(app) {
             });
         };
 
+
+
         /**
          * 修改商品信息
          *
@@ -833,6 +835,37 @@ define([ 'app/app' ], function(app) {
 
         }
 
+        var initRuleCount = function () {
+            return DistributionRule.findCountOfActiveRule({},{},function (data) {
+                if (data.success){
+                    $scope.needShowTip = data.data;
+                }
+            }, function (error) {
+                toaster.pop("error", error.data);
+            })
+        };
+        initRuleCount();
+
+        $q.all([initRuleCount().$promise]).then(function (data) {
+            if (data){
+                if ($scope.needShowTip){
+                    $modal.open({
+                        animation: true,
+                        templateUrl: 'static/view/common/modal/delivery_rule_modal.html',
+                        controller: 'rule_tip_ctrl',
+                        resolve : {
+                            type : function() {
+                                return 'product';
+                            },
+                            tipModal : function() {
+                                return true;
+                            }
+                        }
+                    });
+                }
+            }
+        });
+
         /**
          *
          * @param commodity

+ 6 - 5
src/main/webapp/resources/view/common/modal/product_upload_modal.html

@@ -26,14 +26,13 @@
         font-size: 16px;
     }
     .com-del-box .content{
-        padding: 15px 12px 14px 20px;
+        padding: 15px 20px 14px;
         width: 100%;
         text-align: center;
         margin: 0 auto;
     }
     .com-del-box .content p{
         font-size: 14px;
-        padding-top: 10px;
         padding-bottom: 10px;
         margin-bottom: 7px;
         overflow: hidden;
@@ -48,11 +47,11 @@
     }
     .com-del-box .content p span{
         float: left;
-        width: 230px;
+        width: 256px;
         line-height: 21px;
         text-align: left;
         font-size: 14px;
-        color: #333333
+        color: #333333;
     }
     .com-del-box .content div {
         margin: 0 auto;
@@ -69,7 +68,6 @@
         color: #fff;
     }
     .com-del-box .content div a:first-child {
-        margin-right: 15px ;
         background: #c8c6c6;
     }
     .com-del-box .content div a:last-child {
@@ -119,6 +117,9 @@
     .com-del-box .product p{
         margin-bottom: -5px;
     }
+    .com-del-box .content div a:first-child{
+        margin-right: 0 !important;
+    }
 </style>
 <div class="com-del-box" name="rule_model">
     <div class="title">

+ 8 - 154
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -255,54 +255,7 @@
 	.ng-table-pager{
 		padding-bottom: 20px;
 	}
-	.com-del-box .content p{
-		line-height: 50px;
-		font-size: 14px;
-		padding-top: 10px;
-		padding-bottom: 10px;
-	}
-	.com-del-box .content p i{
-		color: #5078cb;
-		font-size: 16px;
-		margin-right: 10px;
-	}
-	.com-del-box .content div{
-		position: absolute ;
-		bottom: 30px;
-		width: 100%;
-		text-align: center;
-		margin: 0 auto;
-	}
-	.com-del-box .content div a{
-		width: 55px;
-		height: 26px;
-		line-height: 26px;
-		display: inline-block;
-		text-align: center;
-		font-size: 14px;
-	}
-	.com-del-box .content div a:first-child{
-		margin-right: 10px!important;
-		background: #b4b5b9;
-		color: #333;
-	}
-	.com-del-box .content div a:last-child{
-		background: #5078cb;
-		color: #fff;
-	}
-	.com-del-box .content div a:hover{
-		background: #3f7ae3;
-		color: #fff;
-	}
-	.com-del-box .content .red{
-		position: absolute;
-		bottom: 60px;
-		color: red;
-	}
-	.com-del-box .content .red i{
-		color: red;
-		font-size: 12px;
-	}
+
 	.record-line .prompt{
 		text-align: left;
 		width: 495px;
@@ -1503,45 +1456,6 @@
 	#wanted-list02{
 		display: none;
 	}
-    /*上架提醒弹框*/
-    .com-del-box {
-        height: 155px;
-        width: 290px;
-        margin: -145px 0 0 -77px;
-        top: 55%;
-        left: 50%;
-    }
-    .com-del-box .content{
-        padding: 15px 12px 14px 20px;
-    }
-    .com-del-box .content p{
-        margin-bottom: 7px;
-        overflow: hidden;
-        line-height: 0;
-    }
-    .com-del-box .content p .fa-exclamation-circle{
-        /*float: left;*/
-        margin-top: 3px;
-        margin-right: 6px;
-        font-size: 18px;
-    }
-    .com-del-box .content p span{
-        float: left;
-        width: 230px;
-        line-height: 21px;
-        text-align: left;
-        font-size: 14px;
-        color: #333333
-    }
-    .com-del-box .content div a{
-        margin-right: 0!important ;
-        width: 74px;
-        height: 28px;
-        line-height: 28px;
-        font-size: 14px;
-        color: #fff;
-        background: #5078cb;
-    }
     .modal-backdrop {
         background-color: transparent ;
         bottom: unset!important;
@@ -1549,6 +1463,13 @@
     .modal{
         bottom: unset!important;
     }
+	.com-del-box .content{
+		position: relative;
+	}
+	.com-del-box .content .red{
+		position: absolute;
+		top: 45px;
+	}
 </style>
 <div class="user_right fr">
 	<!--货品管理-->
@@ -2243,71 +2164,4 @@
         position: relative;
         top: 7px;
     }
-</style>
-
-<!--<div class="com-del-box" ng-if="$$nonProduct.deleteDiv" name-->
-		<!--= "delete-modal">-->
-	<!--<div class="title">-->
-		<!--<a ng-click="cancleDelete()"><i class="fa fa-close fa-lg"></i></a>-->
-	<!--</div>-->
-	<!--<div class="content">-->
-		<!--<p>-->
-			<!--<i class="fa fa-exclamation-circle"></i>-->
-			<!--是否删除该产品-->
-			<!--<div class="red"-->
-				 <!--ng-if="$$nonProduct.deleteMessage">*<i ng-if="$$nonProduct.deleteMessage" ng-bind="$$nonProduct.deleteMessage"></i>-->
-			<!--</div>-->
-		<!--</p>-->
-		<!--<div><a ng-click="cancleDelete()">取消</a><a ng-click="confirmDelete()">确认</a></div>-->
-	<!--</div>-->
-<!--</div>-->
-		<p><i class="fa fa-exclamation-circle"></i>是否删除选中产品</p>
-		<div><a ng-click="cancleDelete()">取消</a><a ng-click="confirmDelete()">确认</a></div>
-	</div>
-</div>
-<!--上架设置提醒-->
-<div class="com-del-box" ng-if="showNoRuleTip">
-	<div class="title">
-		<a ng-click="cancelDelete()"><i class="fa fa-close fa-lg"></i></a>
-	</div>
-	<div class="content">
-		<p><i class="fa fa-exclamation-circle"></i><span>您当前尚未设置配送规则,买家将无法下单,建议尽快设置!</span></p>
-		<div><a href="vendor#/vendor_deliveryRule">立即设置</a></div>
-	</div>
-</div>
-
-
-<style>
-	/**/
-	.wanted_list01 .empty{
-		overflow: hidden;
-		width:100%;
-		display:inline-flex;
-		justify-content:center;
-		align-items: center;
-		height:305px;
-	}
-	.wanted_list01 .empty-info{
-		line-height: 28px;
-		padding-top:10px;
-		margin-left:10px;
-		text-align:left;
-	}
-	.wanted_list01 .empty-info .grey{
-		color: #999;
-		font-size: 14px;
-	}
-	.wanted_list01 .empty .empty-info>a{
-		font-size: 14px;
-		color: #5078cb;
-	}
-	.wanted_list01 .empty .empty-info i{
-		display: inline-block;
-		width: 18px;
-		height: 18px;
-		margin-right: 5px;
-		background: url('static/img/vendor/images/upload-icon.png')no-repeat 0px 0px;
-		position: relative;
-		top: 7px;
-	}
 </style>