Forráskód Böngészése

Merge branch 'dev-mysql-1227' of ssh://10.10.100.21/source/platform-b2c into dev-mysql-1227

yujia 8 éve
szülő
commit
ac39b6aec1

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

@@ -2626,8 +2626,9 @@ public class GoodsServiceImpl implements GoodsService {
      */
     @Override
     public ResultMap validGoodsIsChange(String batchCode, String storeuuid) {
+        Goods goods = null;
         if (StringUtils.hasText(batchCode) && StringUtils.hasText(storeuuid)) {
-            Goods goods = goodsDao.findByBatchCode(batchCode);
+            goods = goodsDao.findByBatchCode(batchCode);
             if (goods == null || goods.getStatus().intValue() != Status.AVAILABLE.value()) {
                 return new ResultMap(ResultMapType.GOODS_UNAVAILABLE.getCode(), ResultMapType.GOODS_UNAVAILABLE.getPhrase());
             } else {
@@ -2638,7 +2639,7 @@ public class GoodsServiceImpl implements GoodsService {
         } else {
             return new ResultMap(ResultMapType.NO_INFO.getCode(), "传入的信息丢失");
         }
-        return ResultMap.success(null);
+        return ResultMap.success(goods);
     }
 
 	/**

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

@@ -505,7 +505,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		List<Product> productList = productDao.findMatchStandard(enuu, aProduct.getBrandNameEn(), aProduct.getCode(), IntegerConstant.YES_SHORT);
 		if (!CollectionUtils.isEmpty(productList)) {
 			count = goodsDao.findCountByTagInGoods(enuu, productList.get(0).getPbranden(),
-					productList.get(0).getCmpCode(), aProduct.getTag());
+					productList.get(0).getPcmpcode(), aProduct.getTag());
 		} else {
 			count = goodsDao.findCountByTagInGoods(SystemSession.getUser().getEnterprise().getUu(), aProduct.getBrandNameEn(),
 					aProduct.getCode(), aProduct.getTag());

+ 6 - 10
src/main/java/com/uas/platform/b2c/trade/presale/facade/impl/CartFacadeImpl.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.trade.presale.facade.impl;
 
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
 import com.uas.platform.b2c.prod.product.component.modal.Component;
 import com.uas.platform.b2c.prod.product.component.service.ComponentService;
@@ -44,6 +45,7 @@ public class CartFacadeImpl implements CartFacade {
 		if (resultMap.getCode() == ResultMapType.NO_INFO.getCode() || resultMap.getCode() == ResultMapType.GOODS_UNAVAILABLE.getCode()) {
 			return resultMap;
 		}
+		Goods goods = (Goods) resultMap.getData();
 		// 获取买家用户UU和企业UU
 		Long userUU = SystemSession.getUser().getUserUU();
 		Long enUU =  SystemSession.getUser().getEnterprise() != null ? SystemSession.getUser().getEnterprise().getUu() : null;
@@ -58,16 +60,10 @@ public class CartFacadeImpl implements CartFacade {
 		if (cartService.addedSameGoods(cart.getBatchCode(), enUU, userUU)) {
 			return new ResultMap(CodeType.SAVED.code(), "商品记录已经添加");
 		}
-		// 设置器件信息
-		if (!StringUtils.isEmpty(cart.getUuid())) {
-			Component component = componentService.findByUuid(cart.getUuid());
-			if (component == null) {
-				return new ResultMap(CodeType.NOT_COMPLETE_INFO.code(), "器件信息不存在");
-			}
-			cart.setCode(component.getCode());
-			cart.setBrName(component.getBrand().getNameCn());
-			cart.setKiName(component.getKind().getNameCn());
-		}
+
+		cart.setCode(goods.getCode());
+		cart.setKiName(goods.getKindNameCn());
+		cart.setBrName(goods.getBrandNameEn());
 		cart.setUu(userUU);
 		cart.setEnuu(enUU);
 		ResultMap resultMap1 = cartService.saveCartRecord(cart);

+ 12 - 5
src/main/webapp/resources/view/usercenter/forstore/buyer_cart.html

@@ -3,7 +3,12 @@
 	#buyer_cart a {
 		text-decoration: none;
 	}
-
+	#buyer_cart a.unstand{
+		cursor: default ;
+	}
+	#buyer_cart a.unstand:hover{
+		color: #666 !important ;
+	}
 	#buyer_cart a:hover {
 		text-decoration: none;
 	}
@@ -618,9 +623,11 @@
 									<a href="store/{{store.arr[0].storeUuid}}/{{::cart.batchCode}}" target="_blank">
                                         <img ng-src="{{cart.img || 'static/img/store/common/default.png'}}" width="60" height="60"/></a>
 									<div class="car_pro_xq">
-									    <i class="text-hidden">类目:<a href="product/kind/{{cart.goods.kindUuid}}" target="_blank" ng-bind="::cart.kiName" title="{{::cart.kiName}}"></a></i>
-									    <i class="text-hidden">型号:<a href="store/{{store.arr[0].storeUuid}}/{{::cart.batchCode}}" target="_blank" ng-bind="::cart.code" title="{{::cart.code}}"></a></i>
-									   <i class="text-hidden">品牌:<a href="product/brand/{{::cart.goods.branduuid}}/" target="_blank" ng-bind="::cart.goods.brandNameEn" title="{{::cart.goods.brandNameEn}}"></a></i>
+									    <i class="text-hidden" ng-if="!cart.uuid">类目:<a ng-bind="::cart.kiName || '-'" title="{{::cart.kiName}}" class="unstand"></a></i>
+									    <i class="text-hidden" ng-if="cart.uuid">类目:<a href="product/kind/{{cart.goods.kindUuid}}" target="_blank" ng-bind="::cart.kiName" title="{{::cart.kiName}}"></a></i>
+									    <i class="text-hidden">型号:<a href="store/{{store.arr[0].storeUuid}}/{{::cart.batchCode}}" target="_blank" ng-bind="::cart.code || '-'" title="{{::cart.code}}"></a></i>
+									   <i class="text-hidden" ng-if="!cart.uuid">品牌:<a ng-bind="::cart.goods.brandNameEn || '-'" title="{{::cart.goods.brandNameEn}}" class="unstand"></a></i>
+									   <i class="text-hidden" ng-if="cart.uuid">品牌:<a href="product/brand/{{::cart.goods.branduuid}}/" target="_blank" ng-bind="::cart.goods.brandNameEn" title="{{::cart.goods.brandNameEn}}"></a></i>
 									</div>
 								</div>
                         	</span>
@@ -682,7 +689,7 @@
 								<div class="deal_btn" ng-class="{'top': cart.similarCount!=0}">
 									<!--<a ng-click="">申请样品</a>-->
 									<!--<a ng-if="!cart.isActive" style="color: red;">该批次已下架</a>-->
-									<a ng-click="collect(cart.uuid, cart.id)" title="移入收藏">移入收藏</a>
+									<!--<a ng-click="collect(cart.uuid, cart.id)" title="移入收藏">移入收藏</a>-->
 									<a ng-click="deleteById(cart.id)" title="删除">删除</a>
 									<a ng-click="similarOpen(cart)" title="相似产品" style="color: #5078cb !important;" ng-class="{'active': cart.similarShow}" ng-if="cart.similarCount!=0">相似产品<i class="fa fa-angle-down"></i></a>
 								</div>

+ 14 - 3
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -688,6 +688,15 @@
     .com-sub-pager .pagination li:first-child a, .pagination li:last-child a{
         font-size: 12px;
     }
+	.oder_list dl .pro_xq a.unstand{
+		cursor: default ;
+	}
+	.oder_list dl .pro_xq a.unstand em{
+		color: #666 !important;
+	}
+	.oder_list dl .pro_xq a.unstand:hover em{
+		color: #666 !important;
+	}
 </style>
 <div class="user_right fr">
 	<!--订单中心-->
@@ -835,9 +844,11 @@
 							<div class="pro_xq">
 								<a href="store/{{::order.storeid}}/{{::detail.batchCode}}" target="_blank"><img ng-src="{{detail.img || 'static/img/store/common/default.png'}}" width="55" height="55"/></a>
 								<p>
-									类目:<a href="product/kind/{{::detail.kindUuid}}" target="_blank"><em ng-bind="::detail.kiName" title="{{::detail.kiName}}"></em></a><br/>
-									型号:<a href="store/{{::order.storeid}}/{{::detail.batchCode}}" target="_blank"><em ng-bind="::detail.cmpCode" title="{{::detail.cmpCode}}"></em></a><br/>
-									品牌:<a href="product/brand/{{::detail.branduuid}}/" target="_blank"><em ng-bind="::detail.brName" title="{{::detail.brName}}"></em></a>
+									类目:<a href="product/kind/{{::detail.kindUuid}}" target="_blank" ng-if="detail.uuid"><em ng-bind="::detail.kiName || '-'" title="{{::detail.kiName}}"></em></a><br ng-if="detail.uuid"/>
+									<a class="unstand" ng-if="!detail.uuid"><em ng-bind="detail.kiName || '-'" title="{{::detail.kiName}}"></em></a><br ng-if="!detail.uuid"/>
+									型号:<a href="store/{{::order.storeid}}/{{::detail.batchCode}}" target="_blank"><em ng-bind="::detail.cmpCode || '-'" title="{{::detail.cmpCode}}"></em></a><br/>
+									品牌:<a href="product/brand/{{::detail.branduuid}}/" target="_blank" ng-if="detail.uuid"><em ng-bind="::detail.brName || '-'" title="{{::detail.brName}}"></em></a>
+									<a  class="unstand" ng-if="!detail.uuid"><em ng-bind="detail.brName || '-'" title="{{::detail.brName}}"></em></a>
 								</p>
 							</div>
 						</span>

+ 16 - 4
src/main/webapp/resources/view/usercenter/forstore/order_detail.html

@@ -95,6 +95,12 @@
 	.oder_xq_list dl span a{
 		color: #333;
 	}
+	.oder_xq_list dl span a.unstand{
+		cursor: default ;
+	}
+	.oder .oder_list dl dd.line01 a.unstand:hover, .shopCar .oder_list dl .deal_btn a.unstand:hover, #buyer_cart .shopCar .oder_list dl .line02 .car_pro_xq a.unstand:hover em, .oder_list dl .pro_xq a.unstand:hover, #oder-detail .oder_xq_list dl .oder_l p.style01 a.unstand:hover{
+		color: #333 !important ;
+	}
 	.oder-remark,.oder_xq_list dl .line60{
 		background: #f1f6ff;
 	}
@@ -436,15 +442,21 @@
                             <a href="store/{{detail.storeid}}/{{::detail.batchCode}}" target="_blank">
 								<img ng-src="{{detail.img ? detail.img : 'static/img/store/common/default.png'}}"/>
 							</a>
-                            <p class="style01" style="margin-top: 10px;">类目:
-								<a ng-bind="detail.kiName" href="product/kind/{{::detail.kindUuid}}" title="{{detail.kiName}}" target="_blank"></a>
+                            <p class="style01" style="margin-top: 10px;" ng-if="detail.uuid">类目:
+								<a ng-bind="detail.kiName || '-'" href="product/kind/{{::detail.kindUuid}}" title="{{detail.kiName}}" target="_blank"></a>
+							</p>
+							 <p class="style01" style="margin-top: 10px;" ng-if="!detail.uuid">类目:
+								<a ng-bind="detail.kiName || '-'"  title="{{detail.kiName}}" class="unstand"></a>
 							</p>
 							<p class="style01">型号:
-								<a ng-bind="detail.cmpCode" href="store/{{::detail.storeid}}/{{::detail.batchCode}}" title="{{detail.cmpCode}}" target="_blank"></a>
+								<a ng-bind="detail.cmpCode || '-'" href="store/{{::detail.storeid}}/{{::detail.batchCode}}" title="{{detail.cmpCode}}" target="_blank"></a>
 							</p>
-							<p class="style01">品牌:
+							<p class="style01" ng-if="detail.uuid">品牌:
 								<a ng-bind="detail.brName" href="product/brand/{{::detail.branduuid}}/" title="{{detail.brName}}" target="_blank"></a>
 							</p>
+							<p class="style01" ng-if="!detail.uuid">品牌:
+								<a ng-bind="detail.brName || '-'" title="{{detail.brName}}" class="unstand"></a>
+							</p>
                         </span>
 							<span class="wd01">交期:
 							<i ng-if="detail.b2cMinDelivery != detail.b2cMaxDelivery" ng-bind="detail.b2cMinDelivery + '-' + detail.b2cMaxDelivery"></i>

+ 11 - 3
src/main/webapp/resources/view/usercenter/forstore/order_pay.html

@@ -605,6 +605,12 @@
 		/*width: 124px;*/
 		/*text-align: center;*/
 	/*}*/
+	.oder_xq_list dl span a.unstand{
+		cursor: default ;
+	}
+	.oder_xq_list dl span a.unstand:hover b{
+		color: #323232!important;
+	}
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr" id="pay-cart">
@@ -717,9 +723,11 @@
                         <span class="wd02">
                             <a  href="store/{{detail.storeid}}/{{::detail.batchCode}}" target="_blank" href="javascript:void(0)"> <img ng-src="{{detail.img || 'static/img/store/common/default.png'}}"/></a>
 							<div class="style-type">
-								<p title="{{detail.kiName}}"><a href="product/kind/{{detail.goodsHistory.kindUuid}}" target="_blank" style="color: #323232">类目:<b ng-bind="detail.kiName"></b></a></p>
-								<p><a href="store/{{detail.storeid}}/{{::detail.batchCode}}" target="_blank" style="color: #323232">型号:<b ng-bind="detail.cmpCode" title="{{detail.cmpCode}}"></b></a></p>
-								<p><a href="product/brand/{{detail.branduuid}}/" target="_blank" style="color: #323232">品牌:<b ng-bind="detail.brName" style="color: #323232" title="{{detail.brName}}"></b></a></p>
+								<p title="{{detail.kiName}}" ng-if="detail.uuid"><a href="product/kind/{{detail.goodsHistory.kindUuid}}" target="_blank" style="color: #323232">类目:<b ng-bind="detail.kiName || '-'"></b></a></p>
+								<p title="{{detail.kiName}}" ng-if="!detail.uuid"><a style="color: #323232" class="unstand">类目:<b ng-bind="detail.kiName || '-'"></b></a></p>
+								<p><a href="store/{{detail.storeid}}/{{::detail.batchCode}}" target="_blank" style="color: #323232">型号:<b ng-bind="detail.cmpCode || '-'" title="{{detail.cmpCode}}"></b></a></p>
+								<p  ng-if="detail.uuid"><a href="product/brand/{{detail.branduuid}}/" target="_blank" style="color: #323232">品牌:<b ng-bind="detail.brName || '-'" style="color: #323232" title="{{detail.brName}}"></b></a></p>
+								<p ng-if="!detail.uuid"><a style="color: #323232" class="unstand">品牌:<b ng-bind="detail.brName || '-'" style="color: #323232" title="{{detail.brName}}"></b></a></p>
 							</div>
                         </span>
 						<span class="wd01" ng-if="order.status == 501">

+ 17 - 5
src/main/webapp/resources/view/vendor/forstore/purchase_detail.html

@@ -133,6 +133,12 @@
 	.oder_xq_list dl span a{
 		color: #333;
 	}
+	.oder_xq_list dl span a.unstand{
+		cursor: default;
+	}
+	.oder_xq_list dl span a.unstand:hover{
+		color: #333 !important ;
+	}
 	.oder-remark,.oder_xq_list dl .line60{
 		background: #f1f6ff;
 	}
@@ -486,14 +492,20 @@
 						<dd class="oder_l" ng-repeat="detail in purchase.purchaseDetails">
 						<span class="wd02">
 							<a href="store/{{::detail.storeid}}/{{::detail.batchCode}}" target="_blank"><img ng-src="{{detail.img ? detail.img : 'static/img/store/common/default.png'}}"/></a>
-							<p class="style01" style="margin-top: 10px;">类目:
-								<a ng-bind="detail.kiName" href="product/kind/{{::detail.kindUuid}}" title="{{detail.kiName}}" target="_blank"></a>
+							<p class="style01" style="margin-top: 10px;" ng-if="detail.uuid">类目:
+								<a ng-bind="detail.kiName || '-'" href="product/kind/{{::detail.kindUuid}}" title="{{detail.kiName}}" target="_blank"></a>
+							</p>
+							<p class="style01" style="margin-top: 10px;" ng-if="!detail.uuid">类目:
+								<a ng-bind="detail.kiName || '-'" title="{{detail.kiName}}" class="unstand"></a>
 							</p>
 							<p class="style01">型号:
-								<a ng-bind="detail.cmpCode" href="store/{{detail.storeid}}/{{::detail.batchCode}}" title="{{detail.cmpCode}}" target="_blank"></a>
+								<a ng-bind="detail.cmpCode || '-'" href="store/{{detail.storeid}}/{{::detail.batchCode}}" title="{{detail.cmpCode}}" target="_blank"></a>
+							</p>
+							<p class="style01" ng-if="detail.uuid">品牌:
+								<a ng-bind="detail.brName || '-'" href="product/brand/{{::detail.branduuid}}/" title="{{detail.brName}}" target="_blank"></a>
 							</p>
-							<p class="style01">品牌:
-								<a ng-bind="detail.brName" href="product/brand/{{::detail.branduuid}}/" title="{{detail.brName}}" target="_blank"></a>
+							<p class="style01" ng-if="!detail.uuid">品牌:
+								<a ng-bind="detail.brName || '-'" title="{{detail.brName}}" class="unstand"></a>
 							</p>
 						</span>
 						<span class="wd01">交期:

+ 14 - 4
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -13,7 +13,15 @@
 	#vendor_detail a {
 		text-decoration: none;
 	}
-
+	.oder_list dl .pro_xq a.unstand {
+		cursor: default ;
+	}
+	.oder_list dl .pro_xq a.unstand em{
+		color: #666 !important;
+	}
+	.hover-col:hover em, .componet-info a.unstand:hover em, .print-icon a.unstand:hover, .oder_xq_list dl span a.unstand:hover, .sellOder .oder_list dl dd.line01 span a.unstand:hover, .ticket_record_list dl dd span a.unstand:hover {
+		color: #666 !important;
+	}
 	#vendor_detail a:hover {
 		text-decoration: none;
 	}
@@ -1286,9 +1294,11 @@
                             <div class="pro_xq">
                                <a href="store/{{::purchase.storeid}}/{{::detail.batchCode}}" target="_blank"><img ng-src="{{detail.img || 'static/img/store/common/default.png'}}" width="55" height="55"/></a>
                                 <p class="componet-info">
-                                    类目:<a href="product/kind/{{::detail.kindUuid}}" target="_blank"><em ng-bind="detail.kiName" title="{{::detail.kiName}}"></em></a><br/>
-                                    型号:<a href="store/{{::purchase.storeid}}/{{::detail.batchCode}}" target="_blank"><em ng-bind="detail.cmpCode" title="{{::detail.cmpCode}}"></em></a><br/>
-                                    品牌:<a href="product/brand/{{::detail.branduuid}}/" target="_blank"><em ng-bind="detail.brName", title="{{::detail.brName}}"></em></a>
+                                    类目:<a href="product/kind/{{::detail.kindUuid}}" target="_blank" ng-if="detail.uuid"><em ng-bind="detail.kiName || '-'" title="{{::detail.kiName}}"></em></a><br ng-if="detail.uuid"/>
+                                    <a ng-if="!detail.uuid" class="unstand"><em ng-bind="detail.kiName || '-'" title="{{::detail.kiName}}"></em></a><br ng-if="!detail.uuid"/>
+                                    型号:<a href="store/{{::purchase.storeid}}/{{::detail.batchCode}}" target="_blank"><em ng-bind="detail.cmpCode || '-'" title="{{::detail.cmpCode}}"></em></a><br/>
+                                    品牌:<a href="product/brand/{{::detail.branduuid}}/" target="_blank" ng-if="detail.uuid"><em ng-bind="detail.brName || '-'" title="{{::detail.brName}}"></em></a>
+                                    <a ng-if="!detail.uuid" class="unstand"><em ng-bind="detail.brName || '-'" title="{{::detail.brName}}"></em></a>
                                 </p>
                             </div>
                         </span>