Просмотр исходного кода

产品管理删除增加未选择判断

hulh 8 лет назад
Родитель
Сommit
5ace06bc4f

+ 55 - 10
src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java

@@ -17,7 +17,7 @@ import java.util.List;
 
 /**
  * 批量上传商品建立临时表存储相关信息
- * 
+ *
  * @author hejq
  * @time 创建时间:2016年9月24日
  */
@@ -54,16 +54,28 @@ public class ReleaseProductByBatch implements Serializable {
 	@Column(name = "rel_branden")
 	private String brandNameEn;
 
+	/**
+	 * 商城品牌中文
+	 */
+	@Column(name = "rel_b2cbrandcn")
+	private String b2cBrandcn;
+
+	/**
+	 * 品牌品牌uuid
+	 */
+	@Column(name = "rel_b2cbranden")
+	private String b2cBranden;
+
 	/**
 	 * 品牌id
 	 */
-	@Column(name = "rel_brandid")
+	@Column(name = "rel_b2cbrandid")
 	private Long brandId;
 
 	/**
 	 * 品牌品牌uuid
 	 */
-	@Column(name = "br_name_uuid")
+	@Column(name = "rel_b2cbranduuid")
 	private String branduuid;
 
 	/**
@@ -72,10 +84,16 @@ public class ReleaseProductByBatch implements Serializable {
 	@Column(name = "rel_code")
 	private String code;
 
+	/**
+	 * 产品型号
+	 */
+	@Column(name = "rel_b2ccode")
+	private String b2cCode;
+
 	/**
 	 * 产品UUId
 	 */
-	@Column(name = "rel_uuid")
+	@Column(name = "rel_b2cuuid")
 	private String componentUuId;
 
 	/**
@@ -298,7 +316,7 @@ public class ReleaseProductByBatch implements Serializable {
 
 	/**
 	 * 发布状态
-	 * 
+	 *
 	 * @return
 	 */
 	@Column(name = "rel_releasestatus")
@@ -337,13 +355,13 @@ public class ReleaseProductByBatch implements Serializable {
 	/**
 	 * 类目名称,便于发布
 	 */
-	@Column(name = "rel_kindname")
+	@Column(name = "rel_b2ckindname")
 	private String kindName;
 
 	/**
 	 * 类目ID
 	 */
-	@Column(name = "rel_kind_uuid")
+	@Column(name = "rel_b2ckindid")
 	private Long kindUuid;
 
 	/**
@@ -809,7 +827,7 @@ public class ReleaseProductByBatch implements Serializable {
 
 	/**
 	 * 价格分段数据
-	 * 
+	 *
 	 * @return
 	 */
 	@Transient
@@ -957,7 +975,7 @@ public class ReleaseProductByBatch implements Serializable {
 
 	/**
 	 * 获取人民币分段报价列表
-	 * 
+	 *
 	 * @return
 	 */
 	@Transient
@@ -980,7 +998,7 @@ public class ReleaseProductByBatch implements Serializable {
 
 	/**
 	 * 获取美元分段报价列表
-	 * 
+	 *
 	 * @return
 	 */
 	@Transient
@@ -1036,6 +1054,33 @@ public class ReleaseProductByBatch implements Serializable {
 		return goods;
 	}
 
+	public String getB2cBrandcn() {
+		return b2cBrandcn;
+	}
+
+	public ReleaseProductByBatch setB2cBrandcn(String b2cBrandcn) {
+		this.b2cBrandcn = b2cBrandcn;
+		return this;
+	}
+
+	public String getB2cBranden() {
+		return b2cBranden;
+	}
+
+	public ReleaseProductByBatch setB2cBranden(String b2cBranden) {
+		this.b2cBranden = b2cBranden;
+		return this;
+	}
+
+	public String getB2cCode() {
+		return b2cCode;
+	}
+
+	public ReleaseProductByBatch setB2cCode(String b2cCode) {
+		this.b2cCode = b2cCode;
+		return this;
+	}
+
 	public String getStoreid() {
 		return storeid;
 	}

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

@@ -192,7 +192,6 @@ define([ 'app/app' ], function(app) {
 					});
 				}
 			}else {
-				$scope.getChoosedInfo();
 				var ids = $scope.choosedIds.join(',');
 				Material.deleteBatch({ids : ids}, function (data) {
 					toaster.pop('success', '删除成功');
@@ -215,6 +214,11 @@ define([ 'app/app' ], function(app) {
 
 		// 批量删除
 		$scope.deleteBatch = function () {
+			$scope.getChoosedInfo();
+			if (!$scope.choosedIds || $scope.choosedIds.length == 0){
+				toaster.pop("info", "请选择要删除的产品");
+				return;
+			}
 			$scope.deleteDiv = true;
 		};
 

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

@@ -373,9 +373,9 @@
                                         <span ng-bind="$index+1"></span>
                                     </td>
                                     <td style="padding-left: 10px;">
-                                        <div class="text-more">品牌:&nbsp;<em title="{{batchCommodity.brandNameEn || '空'}}" ng-bind="batchCommodity.brandNameEn || '空'"></em></div>
+                                        <div class="text-more">品牌:&nbsp;<em title="{{batchCommodity.b2cBranden || '空'}}" ng-bind="batchCommodity.brandNameEn || '空'"></em></div>
                                         <div class="text-more">类目:&nbsp;<em title="{{batchCommodity.kindName || '空'}}" ng-bind="batchCommodity.kindName || '空'"></em></div>
-                                        <div class="text-more">型号:&nbsp;<em title="{{batchCommodity.code || '空'}}" ng-bind="batchCommodity.code || '空'"></em></div>
+                                        <div class="text-more">型号:&nbsp;<em title="{{batchCommodity.b2cCode || '空'}}" ng-bind="batchCommodity.code || '空'"></em></div>
                                     </td>
                                     <td>
                                         <!--<div>类型:&nbsp;<span ng-bind="batchCommodity.original == 1311 ? '现货' : '呆滞库存' "></span></div>-->