Browse Source

Merge remote-tracking branch 'origin/dev-mysql' into dev-mysql

wangdy 8 years ago
parent
commit
750fe7625c

+ 7 - 4
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -1405,11 +1405,11 @@ public class ProductServiceImpl implements ProductService {
         String sql = null;
         Map<String, Object> map = new HashMap<>();
         if ((prIdLong != null) && (prIdLong.size() != 0)) {
-            sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled, 0) = 1 and p.pr_id in (:ids) and p.pr_id not in (select DISTINCT go_productid from trade$goods where  go_productid is not null);";
+            sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled, 0) = 1 and p.pr_id in (:ids) and p.pr_id not in (select DISTINCT go_productid from trade$goods where  go_productid is not null and go_status != 612);";
             map.put("ids", prIdLong);
         } else {
             // 暂时不会进入当前循环,速度比较低
-            sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled,0) = 1 and if(p.pr_standard, 0) = (:standard) and p.pr_enuu = (:enuu) and p.pr_id not in (select DISTINCT go_productid from trade$goods where  go_productid is not null);";
+            sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled,0) = 1 and if(p.pr_standard, 0) = (:standard) and p.pr_enuu = (:enuu) and p.pr_id not in (select DISTINCT go_productid from trade$goods where  go_productid is not null and go_status != 612);";
             map.put("enuu", uu);
             map.put("standard", standard);
         }
@@ -1493,10 +1493,10 @@ public class ProductServiceImpl implements ProductService {
         g.setImg(product.getCmpImg());
         g.setUuid(product.getCmpUuId());
         g.setCode(product.getPcmpcode());
-        g.setBrandNameCn(product.getPbrand());
+        g.setBrandNameCn(product.getPbrand() == null ? product.getPbranden() :  product.getPbrand());
         g.setBrandid(product.getPbrandid());
         g.setBranduuid(product.getPbranduuid());
-        g.setBrandNameEn(product.getPbranden());
+        g.setBrandNameEn(product.getPbranden() ==  null ? product.getPbrand() : product.getPbranden());
         g.setKindNameCn(product.getKind());
         g.setKindUuid(product.getKindid());
         g.setCurrencyName(currency);
@@ -1515,6 +1515,9 @@ public class ProductServiceImpl implements ProductService {
         g.setBreakUp(Boolean.FALSE);
         g.setReserve(product.getErpReserve());
         String packaging = (detail == null || detail.getPackaging() == null) ? product.getPackaging(): detail.getPackaging();
+        if (packaging == null) {
+            packaging = StringConstant.DEFAULTPACKAGING;
+        }
         g.setPackaging(packaging);
 
         String produceDate = (detail == null || detail.getProduceDate() == null) ? product.getProduceDate() : detail.getProduceDate();

+ 14 - 8
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -849,7 +849,10 @@ define(['app/app'], function (app) {
           $scope.sendSuccess = true;
           //发送验证码
           $scope.sendCheckCode = function (newUserEmail) {
-            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail==null && !$scope.checkSuccess)) {
+            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail!=null && !$scope.checkSuccess)) {
+                if ($scope.userInfo.userEmail!=null && !$scope.checkSuccess) {
+                    $scope.checkFailed = true;
+                }
               return;
 						}
             $scope.sendSuccess = false;
@@ -881,8 +884,8 @@ define(['app/app'], function (app) {
           //校验验证码
           $scope.validCheckCode = function (checkCode) {
             if(!checkCode){
-              // $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = false;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
                 return false;
             }
             User.validCheckCode({checkCode: checkCode,newUserEmail:$scope.user.newUserEmail}, function (data) {
@@ -1019,9 +1022,12 @@ define(['app/app'], function (app) {
           $scope.sendSuccess = true;
           // 发送验证码
           $scope.sendTelCheckCode = function (newUserTel) {
-            if (!$scope.checkSuccess1) {
-              return;
-            }
+              if (!$scope.checkSuccess1 || ($scope.userInfo.userTel!=null && !$scope.checkSuccess)) {
+                  if ($scope.userInfo.userTel!=null && !$scope.checkSuccess) {
+                      $scope.checkFailed = true;
+                  }
+                  return;
+              }
             $scope.sendSuccess = false;
             User.sendTelCheckCode({newUserTel: newUserTel}, function () {
               $scope.codeSuccess = true;
@@ -1051,8 +1057,8 @@ define(['app/app'], function (app) {
           //校验验证码
           $scope.validTelCheckCode = function (telCheckCode) {
             if(!telCheckCode){
-              // $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = false;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
               return false;
             }
             User.validTelCheckCode({telCheckCode: telCheckCode,newUserTel:$scope.user.newUserTel},

+ 13 - 7
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -788,7 +788,10 @@ define(['app/app'], function(app) {
           $scope.sendSuccess = true;
           //发送验证码
           $scope.sendCheckCode = function (newUserEmail) {
-            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail==null && !$scope.checkSuccess)) {
+            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail!=null && !$scope.checkSuccess)) {
+                if ($scope.userInfo.userEmail!=null && !$scope.checkSuccess) {
+                    $scope.checkFailed = true;
+                }
               return;
             }
             $scope.sendSuccess = false;
@@ -820,8 +823,8 @@ define(['app/app'], function(app) {
           //校验验证码
           $scope.validCheckCode = function (checkCode) {
             if(!checkCode){
-              // $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = false;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
               return false;
             }
             User.validCheckCode({checkCode: checkCode,newUserEmail:$scope.user.newUserEmail}, function (data) {
@@ -958,8 +961,11 @@ define(['app/app'], function(app) {
           $scope.sendSuccess = true;
           //发送验证码
           $scope.sendTelCheckCode = function (newUserTel) {
-            if (!$scope.checkSuccess1) {
-              return;
+            if (!$scope.checkSuccess1 || ($scope.userInfo.userTel!=null && !$scope.checkSuccess)) {
+                if ($scope.userInfo.userTel!=null && !$scope.checkSuccess) {
+                    $scope.checkFailed = true;
+                }
+                return;
             }
             $scope.sendSuccess = false;
             User.sendTelCheckCode({newUserTel: newUserTel}, function () {
@@ -990,8 +996,8 @@ define(['app/app'], function(app) {
           //校验验证码
           $scope.validTelCheckCode = function (telCheckCode) {
             if(!telCheckCode){
-              // $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = false;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
               return false;
             }
             User.validTelCheckCode({telCheckCode: telCheckCode,newUserTel:$scope.user.newUserTel},

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

@@ -2095,6 +2095,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 			var idStr = ($scope.choosedIds != null) ? $scope.choosedIds.join(',') : null;
 			var std = $scope.standard_tab == 'standard' ? 1 : 0;
 			Material.batchPutOn({'standard' : std, ids : idStr}, null, function (data) {
+				loadData();
 				toaster.pop('success', '成功', data.message);
 			}, function (response) {
 				toaster.pop('error', '失败', response.data);

+ 4 - 4
src/main/webapp/resources/view/vendor/modal/updateUserEmail.html

@@ -32,12 +32,12 @@
         border-radius: 0;
     }
     .userEmail .modal-body .row.validate-code .col-md-8 .input-sm {
-        width: 162px;
+        width: 63%;
         display: inline-block;
     }
     .userEmail .modal-body .row.validate-code .col-md-8 .code-btn {
-        width: 94px;
-        height: 30px;
+        width: 37%;
+        height: 31px;
         text-align: center;
         line-height: 30px;
         vertical-align: middle;
@@ -129,7 +129,7 @@
             <div class="col-md-8 col-sm-8 col">
                 <input ng-model="checkCode"
                        class="form-control input-sm" placeholder="请输入验证码" type="checkCode" ng-blur="validCheckCode(checkCode)">
-                <input ng-click="sendCheckCode(user.newUserEmail)" ng-disabled="!sendSuccess" ng-init="paracont='获取验证码'" class="code-btn" ng-model="paracont"/>
+                <input ng-click="sendCheckCode(user.newUserEmail)" readonly ng-disabled="!sendSuccess" ng-init="paracont='获取验证码'" class="code-btn" ng-model="paracont"/>
             </div>
             <div class="col">
                 <img ng-show="checkSuccess2" src="static/img/user/images/input-check-yes.png" alt="">

+ 6 - 5
src/main/webapp/resources/view/vendor/modal/updateUserTel.html

@@ -32,12 +32,12 @@
         border-radius: 0;
     }
     .userTel .modal-body .row.validate-code .col-md-8 .input-sm {
-        width: 162px;
+        width: 63%;
         display: inline-block;
     }
     .userTel .modal-body .row.validate-code .col-md-8 .code-btn {
-        width: 94px;
-        height: 30px;
+        width: 37%;
+        height: 31px;
         text-align: center;
         line-height: 30px;
         vertical-align: middle;
@@ -101,6 +101,7 @@
             <label class="col-md-3 col-sm-3 col text-right">原手机号:</label>
             <div class="col-md-8 col-sm-8 col"><input ng-model="user.userTel" class="form-control input-sm"
                                                       type="userTel"  ng-blur="checkUserTel(user.userTel)"
+                                                      placeholder="请输入原手机号"
                                                       ></div>
             <div class="col">
                 <img ng-show="checkSuccess" src="static/img/user/images/input-check-yes.png" alt="">
@@ -112,7 +113,7 @@
             <label class="col-md-3 col-sm-3 col text-right">新手机号:</label>
             <div class="col-md-8 col-sm-8 col">
                 <input ng-model="user.newUserTel"
-                       class="form-control input-sm" type="newUserTel" ng-blur="telEnable(user.newUserTel)">
+                       class="form-control input-sm" placeholder="请输入新手机号" type="newUserTel" ng-blur="telEnable(user.newUserTel)">
                 <!-- <div>密码复杂度</div> -->
             </div>
             <div class="col">
@@ -128,7 +129,7 @@
             <span class="col-md-8 col-sm-8 col">
                 <input ng-model="telCheckCode"
                        class="form-control input-sm" placeholder="请输入验证码"  type="telCheckCode" ng-blur="validTelCheckCode(telCheckCode)">
-                <input class="code-btn" ng-click="sendTelCheckCode(user.newUserTel)" ng-init="paracont='获取验证码'" ng-disabled="!sendSuccess" ng-model="paracont" />
+                <input class="code-btn" readonly ng-click="sendTelCheckCode(user.newUserTel)" ng-init="paracont='获取验证码'" ng-disabled="!sendSuccess" ng-model="paracont" />
             </span>
             <div class="col">
                 <img ng-show="checkSuccess2" src="static/img/user/images/input-check-yes.png" alt="">