Browse Source

个人产品库 初步搭建

wangdy 8 years ago
parent
commit
ea60b8bde0

+ 92 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/model/ProductPerson.java

@@ -0,0 +1,92 @@
+package com.uas.platform.b2c.prod.commodity.model;
+
+import com.uas.platform.b2c.common.account.model.UserBaseInfo;
+
+import javax.persistence.*;
+import java.util.Date;
+
+/**
+ * 个人物料库
+ * @author wangdy
+ *
+ */
+@Entity
+@Table(name = "products_person")
+public class ProductPerson {
+
+    @Id
+    @GeneratedValue
+    @Column(name = "pp_id")
+    private Long id;
+
+    @Column(name = "user_uu")
+    private Long userUU;
+
+    @Column(name = "pr_id")
+    private Long productId;
+
+    @Column(name = "up_time")
+    private Date time;
+
+    /**
+     * 物料拥有者
+     */
+    @OneToOne(cascade = { CascadeType.REFRESH })
+    @JoinColumn(name = "user_uu", insertable = false, updatable = false)
+    private UserBaseInfo user;
+
+    /**
+     * 物料明细
+     */
+    @OneToOne(cascade = { CascadeType.REFRESH })
+    @JoinColumn(name = "pr_id", insertable = false, updatable = false)
+    private Product product;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public UserBaseInfo getUser() {
+        return user;
+    }
+
+    public void setUser(UserBaseInfo user) {
+        this.user = user;
+    }
+
+    public Product getProduct() {
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
+    public Date getTime() {
+        return time;
+    }
+
+    public void setTime(Date time) {
+        this.time = time;
+    }
+}

+ 6 - 0
src/main/webapp/resources/js/vendor/app.js

@@ -498,6 +498,12 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
             templateUrl : 'static/view/vendor/forstore/vendor_material.html',
             controllerUrl : "app/controllers/forstore/vendor_materialCtrl",
             controller : 'vendor_materialCtrl'
+        })).state('vendor_material_person', angularAMD.route({
+            title : '个人物料资料',
+            url : '/vendor_material_person',
+            templateUrl : 'static/view/vendor/forstore/vendor_material_person.html',
+            controllerUrl : "app/controllers/forstore/vendor_materialPersonCtrl",
+            controller : 'vendor_materialPersonCtrl'
         })).state('vendor_material_erp', angularAMD.route({
 			title : '可上架产品toErp',
 			url : '/vendor_material_erp?standardParam',

+ 2661 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialPersonCtrl.js

@@ -0,0 +1,2661 @@
+define([ 'app/app', 'jquery-uploadify' ], function(app) {
+	'use strict';
+	app.register.controller('vendor_materialPersonCtrl', ['$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_person';
+		document.title = '卖家产品库-优软商城';
+		$scope.tab = 'material_person';
+		$scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
+		$scope.choosedIds = [];
+		$scope.showTip = true;
+		$scope.resultTip = true;
+		$scope.$$nonProduct = {};
+        $scope.$$nonProduct.deleteDiv = false;
+		$scope.$$nonProduct.deleteGoods = false;
+		$scope.$$nonProduct.deleteMaterial = false;
+		$scope.$$nonProduct.selfTagNoticeShow = false;
+		$scope.$$nonProduct.count = 10;
+
+		$scope.$$nonProduct.enterSaveButton = false;
+		/**
+		 * 最大
+		 * @type {number}
+		 */
+		$scope.maxReserve = 999999999;
+		/**
+		 * 最小包装量的最大值
+		 */
+		$scope.maxPackQty = 999999;
+		$scope.minReserve = 1;
+
+		//只包含中文和英文的字符
+		var pattern = /^[\u4e00-\u9fa5a-zA-Z]+$/;
+		$scope.deleteDiv = false;
+
+		//数字的正则表达式
+		var intPattern = /^[1-9]+$/;
+
+		$scope.isInt = /^[0-9]*[1-9][0-9]*$/;
+
+		$scope.param = {
+			page : 1,
+			count : 10,
+			sorting : {
+				id : 'DESC'
+			},
+			isStandard : true,
+			type : "nStandard"
+		};
+
+		$scope.goods = { editBreakUp: false, editSelfSale: 2, editPrices: [{}] };
+
+        $scope.sortByERP = 'none';
+        $scope.sortByERPReserve = function () {
+			if ($scope.sortByERP == 'none') {
+				$scope.sortByERP = 'DESC'
+			} else if ($scope.sortByERP == 'DESC') {
+				$scope.sortByERP = 'ASC'
+			} else {
+				$scope.sortByERP = 'none'
+			}
+			$scope.param.sorting = $scope.sortByERP == 'none' ? {id : 'DESC'} : {'erpReserve': $scope.sortByERP};
+			// $scope.sortByERP = type == $scope.sortByERP ? 'none' : type;
+			loadData();
+		}
+
+		if ($location.$$path.endsWith('vendor_material_unstandard_erp')) {
+			$scope.tab = 'unstandard_material';
+			// $scope.standard_tab = 'unstandard';
+            $scope.param.type = "nStandard";
+            // $scope.param.sorting = {code : 'ASC'};
+            $scope.isBatch = false;
+		}
+
+		$scope.goods = { breakUp: 1, isSelfSupport: 1, prices: [{}] };
+		$scope.isSelfSupport = true;
+		$scope.showShelfArea = showShelfArea;
+		$scope.closeShelArea = closeShelArea;
+
+		$scope.setPriceMinAmount = setPriceMinAmount;
+		$scope.setPriceMaxAmount = setPriceMaxAmount;
+		$scope.setPriceMinPackAmount = setPriceMinPackAmount;
+
+		$scope.checkMinDelivery = checkMinDelivery;
+		$scope.checkMaxDelivery = checkMaxDelivery;
+
+		$scope.isRecommendGoods = isRecommendGoods;
+		$scope.editGoods = editGoods;
+
+		$scope.closeEditGoods = closeEditGoods;
+
+		//添加产品
+		$scope.addGoods = addGoods;
+		//上架
+		$scope.putOn = putOn;
+		//更新库存信息
+		$scope.updateGoods = updateGoods;
+
+		$scope.error = {};
+
+		//获取币别信息
+		var deferred = $q.defer();
+		Enterprise.getCurrencyByRegisterAddress(null, function (data) {
+			deferred.resolve(data);
+		}, function (response) {
+			deferred.reject(response);
+		});
+
+        //获取登录的信息
+        var getAuthentication = function () {
+            return AuthenticationService.getAuthentication().success(function(data) {
+                if(data && data.enterprises) {
+                    data.enterprise = data.enterprises[data.enterprises.length - 1];
+                    if(data.enterprises.length > 1) {
+                        var enSelect = [];
+                        angular.forEach(data.enterprises, function(e){
+                            if(e.current)
+                                data.enterprise = e;
+                            else
+                                enSelect.push(e);
+                        });
+                        data.enSelect = enSelect;
+                    }
+                }
+                $rootScope.userInfo = data;
+            }).error(function(response) {
+                toaster.pop('info', '获取定单的信息' + response);
+            });
+        };
+
+        //判断是否是商城管理公司,是否可以选择自营。
+        $q.all([getAuthentication()]).then(function() {
+            //获取店铺的信息
+            StoreInfo.getStoreInfoByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
+                $scope.storeInfo = data;
+				if(!$scope.storeInfo || $scope.storeInfo.status != 'OPEN' || $scope.storeInfo.storeName.indexOf('优软测试二') > 0 || $scope.storeInfo.storeName.indexOf('优软商城') > 0) {
+					$scope.$$nonProduct.canSelfSale = false;
+				}else {
+					$scope.$$nonProduct.canSelfSale = true;
+				}
+            }, function(response) {
+                toaster.pop('error', '获取店铺的信息失败, ' + response.data);
+            });
+        });
+
+		$scope.cancelTip = function () {
+			$scope.showTip = false;
+		};
+
+		$scope.deleteImg = function (obj) {
+			delete obj.editPic;
+		};
+
+		var currencyPromise = deferred.promise;
+
+		$q.all([currencyPromise, $rootScope.storePromise]).then(function (result) {
+			console.log(result);
+			var curData = result[0];
+			if(!$scope.store) {
+				$scope.store = {};
+			}
+			if((curData != null) && (curData.code == 1)) {
+				if(curData.data == 'USD') {
+					$scope.store.enType = 'HK'
+				}else {
+					$scope.store.enType = 'MAINLAND'
+				}
+			}else {
+				$scope.store.enType = 'MAINLAND';
+				toaster.pop('info', '提示', '您公司的注册地址为空,无法确定币别,系统默认为人民币');
+				// $scope.onsale.currency = 'RMB';
+			}
+		})['catch'](function (error) {
+			if(!$scope.store) {
+				$scope.store = {};
+			}
+			var curData = error[0];
+			if((curData != null) && (curData.code == 1)) {
+				if(curData.data == 'USD') {
+					$scope.store.enType = 'HK';
+				}else {
+					$scope.store.enType = 'MAINLAND';
+				}
+			}else {
+				$scope.store.enType = 'MAINLAND';
+			}
+		});
+
+		/**
+		 * 切换标准/非标准
+		 * @param isStandard
+		 */
+		$scope.toggleStandard = function (isStandard) {
+			$scope.standard_tab = isStandard;
+			$scope.param.keyword = '';
+			if (isStandard == 'standard')
+				$scope.param.type = "standard";
+			if (isStandard == 'unstandard')
+				$scope.param.type = "nStandard";
+			$scope.isBatch = false;
+			$scope.param.count = 10;
+			loadDataReload();
+		};
+
+		var updateTagCount = function () {
+			Material.getCountOfProduct({}, {}, function (data) {
+				if (data){
+					$scope.sCount = data.standard;
+					$scope.nCount = data.nStandard;
+				}
+			}, function (error) {
+				toaster.pop("error", error.data);
+			})
+		};
+
+		// 进入批量操作
+		$scope.enterBatch = function () {
+			closeAllEditStatus();
+			$scope.isBatch = true;
+			$scope.isChoosedAll = false;
+		};
+
+		// 取消批量操作
+		$scope.exitBatch =function () {
+			$scope.isBatch = false;
+			$scope.choosedIds = [];
+			$scope.isChoosedAll = false;
+			angular.forEach($scope.currenctMaterial, function (material) {
+				material.isChoosed = false;
+			});
+		};
+
+		// 全选
+		$scope.chooseAll = function () {
+			$scope.isChoosedAll = !$scope.isChoosedAll;
+			angular.forEach($scope.currenctMaterial, function (material) {
+				material.isChoosed = $scope.isChoosedAll;
+			});
+		};
+
+		// 检查是否全选
+		var checkChoosedAll = function () {
+			$scope.isChoosedAll = true;
+			angular.forEach($scope.currenctMaterial, function (material) {
+				if (!material.isChoosed) {
+					$scope.isChoosedAll = false;
+				}
+			});
+		};
+
+		// 单选
+		$scope.chooseOne = function (material) {
+			if (typeof material.isChoosed == 'undefined' || !material.isChoosed) {
+				material.isChoosed = true;
+			} else {
+				material.isChoosed = false;
+			}
+			checkChoosedAll();
+		};
+
+		var initRuleCount = function () {
+			return DistributionRule.findCountOfActiveRule({},{},function (data) {
+				if (data.success){
+					$scope.needShowTip = data.data;
+				}
+			}, function (error) {
+				toaster.pop("error", error.data);
+			})
+		};
+
+		//获取选中之后的信息
+		$scope.getChoosedInfo = function () {
+			angular.forEach($scope.currenctMaterial, function (material) {
+				if (material.isChoosed) {
+					$scope.choosedIds.push(material.id);
+				}
+			});
+		};
+
+		// 确认删除
+		$scope.confirmDelete = function (ids) {
+			if ($scope.isChoosedAll) {
+				if ($scope.standard_tab == 'standard') {
+					Material.deleteStandardAll(null, null, function (data) {
+						$scope.deleteDiv = false;
+						loadDataReload();
+						if (data.code != 1) {
+							toaster.pop('error', data.message);
+						} else {
+							toaster.pop('success', data.message);
+						}
+					}, function (response) {
+						toaster.pop('error', '批量删除信息失败');
+					});
+				} else {
+					Material.deleteUnstandardAll(null, null, function (data) {
+						$scope.deleteDiv = false;
+						loadDataReload();
+						if (data.code != 1) {
+							toaster.pop('error', data.message);
+						} else {
+							toaster.pop('success', data.message);
+						}
+					}, function (response) {
+						toaster.pop('error', '批量删除信息失败');
+					});
+				}
+			} else {
+				var ids = $scope.choosedIds.join(',');
+				Material.deleteBatch({ids: ids}, function (data) {
+					toaster.pop('success', '删除成功');
+					$scope.choosedIds = [];
+					$scope.deleteDiv = false;
+					loadDataReload();
+				}, function (response) {
+					toaster.pop('error', response.data);
+					$scope.choosedIds = [];
+					$scope.deleteDiv = false;
+				});
+			}
+		};
+
+		/**
+		 * 对自定义的标签说明做隐藏或显示
+		 */
+		$scope.selfTagTaggle = function (status) {
+			$scope.$$nonProduct.selfTagNoticeShow = status;
+		};
+
+		// 取消删除
+		$scope.cancleDelete = function () {
+            $scope.$$nonProduct.deleteDiv = false;
+		};
+
+		/**
+		 * 关闭所有的编辑和展开状态
+		 */
+		var closeAllEditStatus = function (goods) {
+			angular.forEach($scope.currenctMaterial, function (material) {
+				if(goods) {
+					if(goods.productid != material.id) {
+						delete material.selected;
+						material.addGoodsOper = false;
+						material.exPandOper = false;
+					}
+				}else {
+					delete material.selected;
+					material.addGoodsOper = false;
+					material.exPandOper = false;
+				}
+
+				angular.forEach(material.goodsArr, function (g) {
+					if(goods) {
+						if(goods.id != g.id) {
+							goods.edit = false;
+						}
+					}
+				});
+			});
+		};
+		// 批量删除
+		$scope.deleteBatch = function () {
+            $scope.getChoosedInfo();
+            if(!$scope.choosedIds || $scope.choosedIds.length == 0) {
+                toaster.pop('warning', '提示','请选择要删除的信息');
+                return ;
+            }
+            closeAllEditStatus();
+            $scope.$$nonProduct.deleteDiv = true;
+            $scope.$$nonProduct.deleteGoods = false;
+            $scope.$$nonProduct.deleteMaterial = true;
+            $scope.$$nonProduct.deleteMessage = '';
+            $scope.opendeleteModal();
+		};
+
+		// 单个删除
+		$scope.deleteMaterial = function(material) {
+			if(!material || !material.id) {
+				return ;
+			}
+			Goods.getDeleteProductMessage({productid: material.id}, function (data) {
+				console.log(data);
+				if(data.code == 1) {
+					$scope.$$nonProduct.deleteMessage = data.message;
+					$scope.choosedIds = [];
+					$scope.choosedIds.push(material.id);
+					$scope.$$nonProduct.deleteGoods = false;
+					$scope.$$nonProduct.deleteMaterial = true;
+					$scope.opendeleteModal();
+				}else {
+					toaster.pop('warning', '提示', data.message);
+				}
+			}, function (response) {
+				toaster.pop('error', '错误', response.data);
+			});
+		};
+
+		/**
+		 * 打开删除的模态框
+		 */
+		$scope.opendeleteModal = function () {
+			var modalInstance = $modal.open({
+				animation: true,
+				templateUrl: 'static/view/common/modal/delete_modal.html',
+				controller: 'vendor_delete_ctrl',
+				resolve: {
+					ids: function() {
+						return $scope.choosedIds;
+					},
+					deleteMaterial: function () {
+						return $scope.$$nonProduct.deleteMaterial;
+					},
+					deleteGoods: function () {
+						return $scope.$$nonProduct.deleteGoods;
+					},
+					selectAll : function () {
+						return $scope.isChoosedAll;
+					},
+					standard_tab : function () {
+						return $scope.standard_tab;
+					},
+					message : function () {
+						return $scope.$$nonProduct.deleteMessage;
+					}
+
+				}
+			});
+			modalInstance.result.then(function(response){
+				if($scope.$$nonProduct.deleteMaterial) {
+					$scope.choosedIds = [];
+					loadDataReload();
+				}else if($scope.$$nonProduct.deleteGoods) {
+					if(!response || !response.id) {
+						loadData();
+					}
+					for(var i = 0; i < $scope.currenctMaterial.length; i++) {
+						if($scope.currenctMaterial[i].id == response.id) {
+							$scope.currenctMaterial.splice(i, 1, response);
+							if(response.batchCount > 0) {
+								$scope.expandGoods($scope.currenctMaterial[i]);
+							}else {
+								$scope.currenctMaterial[i].exPandOper = false;
+							}
+						}
+					}
+				}
+			}, function(){
+			});
+		};
+
+		//获取该物料的产品信息
+		$scope.expandGoods = function (material, addGoods) {
+			if(!material || !material.id) {
+				return ;
+			}
+			Material.getGoodsByProductId({id: material.id}, function (data) {
+                material.goodsArr = data;
+				angular.forEach($scope.currenctMaterial, function (material) {
+					if(material.selected){
+						delete material.selected;
+					}
+					material.exPandOper = false;
+					material.addGoodsOper = false;
+				});
+				material.exPandOper = true;
+				material.selected = true;
+				if(addGoods) {
+					material.addGoodsOper = true;
+				}
+            }, function (response) {
+				toaster.pop('error', '错误', response.data);
+            });
+		};
+
+        /**
+         * 监听点击的事件,关闭删除的对话框
+         * @param event
+         */
+        // document.onclick = function (event) {
+        //     if(event) {
+        //         var tag = event.target;
+        //         while (tag && tag.nodeName != 'SECTION') {
+        //             var name = tag.getAttribute('name');
+        //             if(name && (name == 'delete-modal' || name == 'delete-material')) {
+        //                 return ;
+        //             }
+        //             console.log(name);
+        //             tag = tag.parentElement;
+        //         }
+        //         $scope.$apply(function () {
+			// 		$scope.cancleDelete();
+			// 	});
+        //     }
+        // };
+
+		/**
+		 * 在售产品信息收起
+		 */
+		$scope.disExpandGoods = function (material) {
+			if (!material) {
+				return ;
+			}
+			if (material.selected) {
+				delete material.selected;
+			}
+			material.exPandOper = false;
+			material.addGoodsOper = false;
+
+		};
+
+		/**
+		 * 是否被推荐
+		 * @param goods
+		 */
+		function isRecommendGoods(goods) {
+			if(!goods) {
+				return ;
+			}
+            $scope.$$nonProduct.deleteMessage = '';
+			closeAllEditStatus(goods);
+			$scope.choosedIds = [];
+			Goods.isRecommendGoods({id: goods.id}, null, function (data) {
+				$scope.$$nonProduct.deleteGoods = true;
+				$scope.$$nonProduct.deleteMaterial = false;
+                $scope.$$nonProduct.deleteDiv = true;
+				if(data.code == 1) {
+					if(goods.status == '601' || goods.status == '602') {
+						$scope.$$nonProduct.deleteMessage = '该产品已上架';
+					}
+				}else {
+					$scope.$$nonProduct.deleteMessage = data.message;
+				}
+				$scope.choosedIds.push(goods.id);
+				$scope.opendeleteModal();
+			}, function (response) {
+				toaster.pop('error', '错误', response.data);
+			});
+		};
+
+		/**
+		 * 编辑在售产品的信息
+		 * @param goods
+		 */
+		function editGoods(material, goods) {
+			angular.forEach(material.goodsArr, function (g) {
+				g.edit = false;
+			});
+            $scope.$$nonProduct.editGoods = angular.copy(goods);
+			goods.edit = true;
+
+            goods.editTag = goods.tag;
+            goods.editTagInvalid = false;
+            goods.editTagPre = goods.tag;
+
+            goods.editPackaging = goods.packaging;
+            goods.editPackagingInvalid = false;
+            goods.editPackaginPre = goods.packaging;
+
+            goods.editProduceDate = goods.produceDate;
+            goods.editProduceDateInvalid = false;
+            goods.editProduceDatePre = goods.produceDate;
+
+            goods.editReserve = goods.reserve;
+            goods.editReserveInvalid = false;
+            goods.editReservePre = goods.reserve;
+
+            goods.editMinPackQty = goods.minPackQty;
+            goods.editMinPackQtyPre = goods.minPackQty;
+            goods.editMinPackQtyInValid = false;
+
+            goods.editMinBuyQty = goods.minBuyQty;
+            goods.editMinBuyQtyPre = goods.minBuyQty;
+            goods.editMinBuyQtyInValid = false;
+
+            goods.editMinDelivery = goods.minDelivery;
+            goods.editMinDeliveryPre = goods.minDelivery;
+            goods.editMinDeliveryinValid = false;
+
+            goods.editMaxDelivery = goods.maxDelivery;
+            goods.editMaxDeliveryPre = goods.maxDelivery;
+            goods.editMaxDeliveryinValid = false;
+
+            goods.editSelfSale = $scope.storeInfo.uuid != 'undefind' && goods.storeid == $scope.storeInfo.uuid && $scope.storeInfo.storeName.indexOf('优软测试二') < 0 && $scope.storeInfo.storeName.indexOf('优软商城') < 0 ? 1 : 2;
+            goods.editBreakUp = goods.breakUp;
+            goods.editPrices = angular.copy(goods.prices);
+            angular.forEach(goods.editPrices, function (price) {
+                price.startPre = price.start;
+                price.startDirty = false;
+
+                price.endPre = price.end;
+                price.endDirty = false;
+
+                price.rMBPricePre = price.rMBPrice;
+                price.rMBPriceDirty = false;
+
+                price.uSDPricePre = price.uSDPrice;
+                price.uSDPriceDirty = false;
+            });
+			goods.editPic = goods.img;
+		};
+
+		/**
+		 * 取消编辑
+		 * @param goods
+		 */
+		function closeEditGoods(material, goods) {
+            //替换之前的信息
+            if(!material || !material.goodsArr || !goods || !$scope.$$nonProduct.editGoods) {
+                return ;
+            }
+            for(var i = 0; i < material.goodsArr.length; i++) {
+                if(material.goodsArr[i].id == goods.id) {
+                    material.goodsArr.splice(i, 1, $scope.$$nonProduct.editGoods);
+                    break;
+                }
+            };
+		}
+
+		/**
+		 * 更新非标的匹配信息
+		 */
+		$scope.updateNStandardOne = function (product) {
+			if (product.matchresults.length > 0) {
+				if (product.canMatch) {
+					var matchProducts = {
+						matchId: product.id,
+						detailId: product.cmpId
+					};
+				}
+			}
+			prodRepositoryService.saveMatchInfo(null, matchProducts, function (data) {
+				if (data.code == 1 && data.data) {
+					$scope.backData = data.data;
+					$scope.repeatList = data.data.repeatList;
+					$scope.haveRepeat = true;
+					// loadData();
+					$scope.standard_tab = 'matchResult';
+				} else {
+					$scope.haveRepeat = false;
+					$scope.matchSuccess = $scope.matchSuccess + 1;
+					$scope.matchFail = $scope.matchFail - 1;
+					loadData();
+				}
+			}, function () {
+				toaster.pop("error", "匹配失败")
+			});
+		};
+
+		$scope.cancelChoose = function () {
+			angular.forEach($scope.repeatList, function (item) {
+				if (item.selected){
+					delete item.selected;
+				}
+			});
+			$scope.haveRepeat = false;
+		};
+
+		$scope.deleteIdArray = [];
+		$scope.ensureDeleteRepeat = function () {
+			for (var i = 0; i < $scope.repeatList.length; i++) {
+				if (!$scope.repeatList[i].selected) {
+					toaster.pop("info", "请选择要保留的产品信息");
+					return ;
+				} else {
+					angular.forEach($scope.repeatList[i], function (goods) {
+						if (goods.id != $scope.repeatList[i].selected){
+							$scope.deleteIdArray.push(goods.id);
+						}
+					});
+				}
+			}
+			if ($scope.deleteIdArray.length != $scope.repeatList.length) {
+				toaster.pop("info", "请选择要保留的产品信息");
+				return ;
+			}
+
+			Material.updateInfoAfterChoose({beforeId:$scope.backData.beforeId, afterId:$scope.backData.afterId, resultId:$scope.backData.resultId}, $scope.deleteIdArray, function (data) {
+				if (data.success) {
+					$scope.haveRepeat = false;
+					$scope.matchSuccess = $scope.matchSuccess + 1;
+					$scope.matchFail = $scope.matchFail - 1;
+					$scope.deleteIdArray = [];
+					loadData();
+				}
+			}, function (error) {
+				toaster.pop("error", error.data);
+			})
+		};
+		/**
+		 * 修改图片信息
+		 */
+		$scope.editGoodsPicture = function(pic, material) {
+			var modalInstance = $modal.open({
+				templateUrl : 'static/view/vendor/modal/edit_goods_modal.html',
+				size : 'md',
+				controller : 'editPictureCtrl',
+				resolve : {
+					pic : function() {
+						return pic;
+					}
+				}
+			});
+			modalInstance.result.then(function (editPic) {
+				if(editPic) {
+					material.editPic = editPic;
+				}
+			}, function() {
+
+			});
+		}
+
+		// 单个匹配
+		$scope.match = function (material) {
+			if (!material.cmpCode) {
+				toaster.pop('info', '该产品尚无产品型号,无法匹配');
+				return;
+			}
+			if (!material.brand) {
+				toaster.pop('info', '该产品尚无品牌信息,无法匹配');
+				return;
+			}
+
+			Material.match({id : material.id}, function (data) {
+				toaster.pop('success', '匹配成功, 可前往“标准产品”中 , 编辑上架。');
+				loadDataReload();
+			}, function (response) {
+				toaster.pop('info', response.data);
+			});
+		};
+
+		$scope.fitCountToTable = function (count) {
+			console.log($scope.$$nonProduct.count);
+			$scope.$$nonProduct.count = count;
+			$scope.param.count = $scope.$$nonProduct.count;
+			loadData();
+		};
+
+		$scope.toggleTab = function (status) {
+			$scope.param.type = 'nStandard';
+			$scope.param.count = $scope.$$nonProduct.count;
+			loadData();
+			$scope.standard_tab = status;
+		};
+
+		$scope.closeResultFrame = function (status) {
+			$scope.standard_tab = status;
+			$scope.resultFrame = false;
+		};
+
+		$scope.closeTip = function () {
+			$scope.resultTip = false;
+		};
+
+		// 一键匹配
+		$scope.matchAll = function () {
+			Material.matchNonProduct({}, {}, function (data) {
+				if (data.success){
+					$scope.resultFrame = true;
+					$scope.matchTotal = data.data.total;
+					$scope.matchSuccess = data.data.success;
+					$scope.matchFail = data.data.fail;
+					$scope.standard_tab = 'matchResult';
+					$scope.param.type = "nStandard";
+					loadData();
+				}else {
+					toaster.pop("info", data.message);
+				}
+			}, function (error) {
+				toaster.pop("error", "匹配操作失败!")
+			});
+
+			// Material.matchAll({}, function (data) {
+			// 	if (data.updateCount > 0) {
+			// 		toaster.pop('success', '匹配完成, 本次匹配成功 ' + data.updateCount +' 个,可前往“标准产品”中 , 编辑上架。');
+			// 	}
+			// 	else {
+			// 		toaster.pop('success', '匹配完成, 暂无匹配成功产品,可前往“品牌申请/器件申请”中 , 提出申请。');
+			// 	}
+			// 	loadDataReload();
+			// }, function (response) {
+			// 	toaster.pop('info', response.data);
+			// });
+		};
+
+		function downloadByJs(url, keyword, type) {
+			var form = $("<form>");   //定义一个form表单
+			form.attr('style', 'display:none');   //在form表单中添加查询参数
+			form.attr('target', '');
+			form.attr('method', 'get');
+			form.attr('action', url);
+
+			var input1 = $('<input>');
+			input1.attr('type', 'hidden');
+			input1.attr('name', 'keyword');
+			input1.attr('value', keyword);
+
+			var input2 = $('<input>');
+			input1.attr('type', 'hidden');
+			input1.attr('name', 'type');
+			input1.attr('value', type);
+
+			$('body').append(form);  //将表单放置在web中
+			form.append(input1);   //将查询参数控件提交到表单上
+			form.append(input2);   //将类型参数控件提交到表单上
+			form.submit();
+		}
+
+		// 下载模板
+		$scope.download = function() {
+			if ($scope.currenctMaterial && $scope.currenctMaterial.length == 0) {
+				toaster.pop('info', '当前产品列表为空,无法下载');
+				return;
+			}
+			if ('standard' == $scope.standard_tab)
+				downloadByJs('trade/products/template/download/type', $scope.param.keyword, 'standard');
+			if ('unstandard' == $scope.standard_tab)
+				downloadByJs('trade/products/template/download/type', $scope.param.keyword, 'nStandard');
+		};
+
+		//初始化页数信息
+		$scope.initPages = function (totalElementPages) {
+			var pageNum = [];
+			if(totalElementPages == 1) {
+				return ;
+			}else if(totalElementPages < 10) {
+				for(var i = 0; i < totalElementPages + 2; i++) {
+					pageNum.push(i);
+				}
+			}else {
+				pageNum = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+			}
+			angular.forEach(pageNum, function (number) {
+				var page = {active : true, type : 'page', number : number};
+				if(number == 0) {
+					page.type = 'prev';
+				}else if(number == 1) {
+					page.type = 'first';
+				}else if(number == pageNum.length - 2) {
+					page.type = 'last';
+					page.number = totalElementPages;
+				}else if(number == pageNum.length - 1){
+					page.type = 'next';
+				}
+				$scope.pages.push(page);
+			});
+		};
+
+		//当前页在前段的计算方式
+		$scope.frontSegment = function (currentPage, totalElementPages) {
+			angular.forEach($scope.pages, function (page) {
+				switch (page.number) {
+					case 8:
+						page.type = 'more';
+						page.active = false;
+						break;
+					case 0:
+						if(currentPage == 1) {
+							page.active = false;
+						}
+					default : {
+						page.current = (currentPage == page.number);
+					}
+				}
+			});
+		};
+
+		//当前页在后端计算方式
+		$scope.endSegment = function (currentPage, totalElementPages) {
+			angular.forEach($scope.pages, function (page) {
+				switch (page.number) {
+					case 2:
+						page.active = false;
+						page.type = 'more';
+						break;
+					case 10:
+						if(currentPage == totalElementPages) {
+							page.active = false;
+						}
+						break;
+					case 0:
+					case 1:
+						break;
+					default:
+						if(page.number != totalElementPages) {
+							page.number = totalElementPages - 9 + page.number;
+						}
+						page.current = (currentPage == page.number);
+						break;
+				}
+			});
+		};
+
+		//当前页在中间计算方式
+		$scope.middleSegment = function (currentPage) {
+			angular.forEach($scope.pages, function (page) {
+				switch (page.number) {
+					case 2:
+					case 8:
+						page.type ='more';
+						page.active = false;
+						break;
+					case 3:
+						page.number = currentPage - 2;
+						break;
+					case 4:
+						page.number = currentPage - 1;
+						break;
+					case 5:
+						page.number = currentPage;
+						page.current = true;
+						break;
+					case 6:
+						page.number = currentPage + 1;
+						break;
+					case 7:
+						page.number = currentPage + 2;
+						break;
+				}
+			});
+		};
+
+		//计算页数的方式。
+		$scope.acculatePages = function(currentPage, totalElementPages) {
+			$scope.pages = [];
+			if(totalElementPages < 1)  {
+				return ;
+			}
+			//初始化页面数据
+			$scope.initPages(totalElementPages);
+
+			if(totalElementPages < 10) {
+				angular.forEach($scope.pages, function (page) {
+					if(page.number == currentPage) {
+						page.current = true;
+					}
+				});
+			}else if(currentPage < 6) {//当期页小于6
+				$scope.frontSegment(currentPage, totalElementPages);
+			}else if(currentPage > totalElementPages - 5) { //当期页在后面
+				$scope.endSegment(currentPage, totalElementPages);
+			}else { //当期页在中间
+				$scope.middleSegment(currentPage);
+			}
+		};
+
+		//输入框监听Enter事件
+		$scope.listenEnter = function () {
+			if($scope.param.currentPage) {
+				if(!intPattern.test($scope.param.currentPage)) {
+					$scope.param.currentPage = $scope.param.page;
+					return ;
+				}
+				if(parseInt($scope.param.currentPage) < 1) {
+					$scope.param.currentPage = $scope.param.page;
+					return ;
+				}
+			}
+			if(event.keyCode == 13) {
+				$scope.setPage("page", $scope.param.currentPage);
+			}
+		};
+
+		$scope.setPage = function(type, number) {
+			if(type != 'prev' &&  type != 'page' && type != 'next' && type != 'last' && type != 'first') {
+				return ;
+			};
+			var page = -1;
+			switch (type) {
+				case "page":
+					if(number < 1) {
+						page = 1;
+					}else if(number > $scope.materialAll.totalPages) {
+						page = $scope.materialAll.totalPages;
+					}else {
+						page = number;
+					};
+					break;
+				case "prev":
+					if($scope.param.page <= 1) {
+						page = 1;
+					}else {
+						page =$scope.param.page - 1;
+					};
+					break;
+				case "next":
+					if($scope.param.page >= $scope.materialAll.totalPages) {
+						page = $scope.materialAll.totalPages
+					}else {
+						page =$scope.param.page + 1;
+					}
+					break;
+				case "first":
+					page = 1;
+					break;
+				case "last":
+					page = $scope.materialAll.totalPages;
+					break;
+			}
+			if(page == $scope.param.page || page < 1 || page > $scope.materialAll.totalPages) {
+				$scope.param.currentPage = $scope.param.page;
+				return ;
+			}
+			$scope.param.page = page;
+			loadData();
+		};
+
+		var loadData = function () {
+			Material.getAll($scope.param, function (data) {
+				$scope.materialAll = data;
+				$scope.currenctMaterial = data.content;
+				updateTagCount();
+				angular.forEach($scope.currenctMaterial, function (material, index) {
+					material.isChoosed = false;
+					material.submitProduct = {
+						brand: {},
+						commponent: {},
+						kind: {}
+					}
+					//第一个自动展开
+					if (index == 0 && $stateParams.standardParam && ($stateParams.standardParam =='standard' || $stateParams.standardParam =='unstandard')) {
+						material.selected = true;
+						if ('ERP' == material.sourceApp)
+							getProductDetail(material);
+					}
+				});
+				$scope.param.currentPage = data.number;
+				$scope.acculatePages(data.number, data.totalPages);
+				$scope.isChoosedAll = false;
+				$scope.choosedIds = [];
+			}, function (response) {
+
+			})
+		};
+
+		$scope.onSearch = function () {
+			loadDataReload();
+		};
+
+		var loadDataReload = function () {
+			$scope.param.page = 1;
+			loadData();
+		};
+
+		var init = function () {
+			$scope.param.keyword = '';
+			if ($scope.standard_tab == 'standard') {
+				$scope.param.type = "standard";
+			} else if ($scope.standard_tab == 'unstandard') {
+				$scope.param.type = "nStandard";
+			}
+			$scope.isBatch = false;
+			$scope.param.count = 10;
+		};
+
+		init();
+
+		loadData();
+
+		var saveNoSaleInfo = function (product) {
+			// $scope.goods.breakUp = 1 === $scope.goods.breakUp;
+
+		};
+
+		var saveSoldInfo = function (product) {
+			Goods.updateGoods(null, $scope.goods, function(data){
+				if(data.code == 1) {
+					product.exPandOper = true;
+					toaster.pop('success', '修改成功');
+				}else {
+					toaster.pop('warning', '失败', data.message);
+				}
+			}, function(response){
+				toaster.pop('error', '修改失败', response.data);
+			});
+		};
+
+        /**
+         * 	验证库存信息的正确性,
+         * @param goods 需要验证的GOODS信息
+         * @returns {boolean}
+         * 返回false 代表验证不通过。
+         * 返回true  代表验证成功。
+         */
+        $scope.checkGoodsInfo = function (goods) {
+            var result = false;
+            if (!goods) {
+                toaster.pop('warning', '提示', '库存信息丢失,请重新操作');
+                return result;
+            }
+            if (!goods.editTag) {
+                goods.editTagInvalid = true;
+                toaster.pop('warning', '提示', '请填写标签信息');
+                return result;
+            }
+            if (goods.editTag.length > 20) {
+                goods.editTagInvalid = true;
+                toaster.pop('warning', '提示', '标签信息超过了20个字符');
+                return result;
+            }
+            if (!goods.editPackaging) {
+                goods.editPackagingInvalid = true;
+                toaster.pop('warning', '提示', '请填写包装方式');
+                return result;
+            }
+            if (!pattern.test(goods.editPackaging)) {
+                goods.editPackagingInvalid = true;
+                toaster.pop('warning', '提示', '包装方式仅能包含中文和英文字符');
+                return result;
+            }
+            if (goods.editPackaging.length > 10) {
+                goods.editPackagingInvalid = true;
+                toaster.pop('warning', '提示', '包装方式不能超过10个字符');
+                return result;
+            }
+            if (!goods.editProduceDate) {
+                goods.editProduceDateInvalid = true;
+                toaster.pop('warning', '提示', '请填写生产日期');
+                return result;
+            }
+            if (goods.editProduceDate.length > 11) {
+                goods.editProduceDateInvalid = true;
+                toaster.pop('warning', '提示', '生产日期不能超过12个字符');
+                return result;
+            }
+            if (!goods.editReserve) {
+                goods.editReserveInvalid  = true;
+                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                return result;
+            }
+            if (isNaN(goods.editReserve)) {
+                goods.editReserveInvalid  = true;
+                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                return result;
+            }
+            if (goods.editReserve < $scope.minReserve) {
+                goods.editReserveInvalid  = true;
+                toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                return result;
+            }
+            if (goods.editReserve > $scope.maxReserve) {
+                goods.editReserveInvalid  = true;
+                toaster.pop('warning', '库存须填写小于10亿的正整数');
+                return result;
+            }
+            if (typeof goods.editMinBuyQty == 'undefined') {
+				goods.editMinBuyQtyInValid  = true;
+				toaster.pop('warning', '提示', '起订量不能为空');
+				return result;
+			}
+            // if(!goods.editMinBuyQty) {
+            //     goods.editMinBuyQtyInValid  = true;
+            //     toaster.pop('warning', '提示', '起订量必须填写');
+            //     return result;
+            // }
+            if (!$scope.isInt.test(goods.editMinBuyQty)) {
+                goods.editMinBuyQtyInValid  = true;
+                toaster.pop('warning', '提示', '起订量必须是大于0的整数');
+                return result;
+            }
+            // if(goods.editReserve < goods.editMinBuyQty) {
+            //     goods.editReserveInvalid  = true;
+            //     goods.editMinBuyQtyInValid = true;
+            //     toaster.pop('warning', '提示', '库存必须是大于等于起订量的整数');
+            //     return result;
+            // }
+            if (!goods.editMinPackQty) {
+                goods.editMinPackQtyInValid = true;
+                toaster.pop('warning', '提示', '包装数量必须填写');
+                return result;
+            }
+            if (!$scope.isInt.test(goods.editMinPackQty)) {
+                goods.editMinPackQtyInValid  = true;
+                toaster.pop('warning', '提示', '包装数必须是正整数');
+                return result;
+            }
+            if (Number(goods.editMinPackQty) > $scope.maxPackQty) {
+                goods.editMinPackQtyInValid = true;
+                toaster.pop('warning', '提示', '包装量数量必须小于' + $scope.maxPackQty);
+                return result;
+            }
+            if (!goods.editBreakUp) {
+                $scope.isNotBreakUp(goods);
+            }
+            var lastEnd = -1;
+            for (var i = 0; i < goods.editPrices.length; i++) {
+                if (isNaN(goods.editPrices[i].start)) {
+                    goods.editPrices[i].startInValid = true;
+                    toaster.pop('warning', '提示', '分段数量必须是数字');
+                    return result;
+                }
+                if (goods.editPrices[i].start <= lastEnd) {
+                    goods.editPrices[i].startInValid = true;
+                    toaster.pop('warning', '提示', "存在分段的起始值小于等于上一个分段的结束值");
+                    return result;
+                }
+                if (!goods.editPrices[i].end) {
+					goods.editPrices[i].endInValid = true;
+					toaster.pop('warning', '提示', '分段数量必须填写');
+					return result;
+				}
+                if (isNaN(goods.editPrices[i].end)) {
+                    goods.editPrices[i].endInValid = true;
+                    toaster.pop('warning', '提示', '分段数量必须是数字');
+                    return result;
+                }
+                if (goods.editPrices[i].start > goods.editPrices[i].end) {
+                    goods.editPrices[i].startInValid = true;
+                    goods.editPrices[i].endInValid = true;
+                    toaster.pop('warning', '提示', "存在分段的起始值大于分段的结束值");
+                    return result;
+                }
+                if (goods.currencyName.indexOf('USD') > -1) {
+                    if (!goods.editPrices[i].uSDPrice) {
+                        goods.editPrices[i].priceInvalid = true;
+                        toaster.pop('warning', '提示', "单价必须是大于0的数字");
+                        return result;
+                    } else if (isNaN(goods.editPrices[i].uSDPrice)) {
+                        goods.editPrices[i].priceInvalid = true;
+                        toaster.pop('warning', '提示', "单价必须是大于0的数字");
+                        return result;
+                    } else if (Number(goods.editPrices[i].uSDPrice) <= 0) {
+                        goods.editPrices[i].priceInvalid = true;
+                        toaster.pop('warning', '提示', "单价必须是大于0的数字");
+                        return result;
+                    }
+                }
+                if (goods.currencyName.indexOf('RMB') > -1) {
+                    if (!goods.editPrices[i].rMBPrice) {
+                        goods.editPrices[i].priceInvalid = true;
+                        toaster.pop('warning', '提示', "单价必须是大于0的数字");
+                        return result;
+                    } else if (isNaN(goods.editPrices[i].rMBPrice)) {
+                        goods.editPrices[i].priceInvalid = true;
+                        toaster.pop('warning', '提示', "单价必须是大于0的数字");
+                        return result;
+                    } else if (Number(goods.editPrices[i].rMBPrice) <= 0) {
+                        goods.editPrices[i].priceInvalid = true;
+                        toaster.pop('warning', '提示', "单价必须是大于0的数字");
+                        return result;
+                    }
+                }
+            }
+            if (goods.currencyName.indexOf('USD') > -1 && !$scope.compareNum(goods.editMinDelivery, goods.editMaxDelivery, 2, goods)) {
+                return result;
+            }
+
+            if (goods.currencyName.indexOf('RMB') > -1 && !$scope.compareNum(goods.editMinDelivery, goods.editMaxDelivery, 1, goods)) {
+                return result;
+            }
+
+            result = true;
+            return result;
+        }
+
+        /**
+         * 比较交货周期的大小
+         * @param min 本来是最小值
+         * @param max 本来是最大值
+         * @param type 2 表示当前验证的香港交期, 1表示当前验证的是大陆交期
+         * @param commodity 批次信息
+         * @returns {boolean} true 表示验证通过,false 表示验证失败。
+         */
+        $scope.compareNum = function(min, max, type, goods) {
+            if(!min) {
+                goods.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                return false;
+            }else if(!max) {
+                goods.editMaxDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                return false;
+            }
+            if(!$scope.isInt.test(min)) {
+                goods.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                return false;
+            }
+            if(!$scope.isInt.test(max)) {
+                goods.editMaxDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+                return false;
+            }
+            if(min < 1 || min > 31) {
+                goods.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
+                return false;
+            }
+            if(max < 1 || max > 31) {
+                goods.editMaxDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期的时间必须是1-31之内');
+                return false;
+            }
+            if(Number(min) > Number(max)) {
+                goods.editMaxDeliveryinValid = true;
+                goods.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
+                return false;
+            }
+            return true;
+        }
+
+        /**
+         * 编辑状态下的产品字段转成与后台对应的字段
+         */
+		function inverseGoods(goods) {
+            goods.packaging = goods.editPackaging;
+            goods.produceDate = goods.editProduceDate;
+            goods.oldReserve =  goods.reserve;
+            goods.reserve =  goods.editReserve;
+            goods.minBuyQty = goods.editMinBuyQty;
+            goods.prices = goods.editPrices;
+            goods.minDelivery = goods.editMinDelivery;
+            goods.maxDelivery = goods.editMaxDelivery;
+            goods.selfSale = goods.editSelfSale;
+            goods.minPackQty = goods.editMinPackQty;
+            goods.img = goods.editPic;
+            goods.breakUp = typeof goods.editBreakUp == 'undefined' ? false : goods.editBreakUp;
+            goods.tag = goods.editTag;
+        }
+
+		/**
+		 * 鼠标移入到保存按钮
+		 */
+		$scope.impedeBlur = function () {
+			$scope.$$nonProduct.enterSaveButton = true;
+		}
+
+		/**
+		 * 鼠标移出保存按钮
+		 */
+		$scope.recoveryBlur = function () {
+			$scope.$$nonProduct.enterSaveButton = false;
+		}
+
+		/**
+		 * 添加产品失败
+		 * @param currenctMaterial
+		 * @param goods
+		 */
+		function addGoods(currenctMaterial) {
+			if (!$scope.checkGoodsInfo($scope.goods)) {
+				return ;
+			}
+            inverseGoods($scope.goods);
+			$scope.goods.productid = currenctMaterial.id;
+			Goods.addGoods(null, $scope.goods, function (result) {
+				if (result.success) {
+                    ProductServiceQuery.getProductById({id: currenctMaterial.id}, function (response) {
+                        if(!response || !response.id) {
+                            loadData();
+                        }
+                        for(var i = 0; i < $scope.currenctMaterial.length; i++) {
+                            if($scope.currenctMaterial[i].id == response.id) {
+                                $scope.currenctMaterial.splice(i, 1, response);
+                                if(response.batchCount > 0) {
+                                    $scope.expandGoods($scope.currenctMaterial[i]);
+                                }else {
+                                    $scope.currenctMaterial[i].exPandOper = false;
+                                }
+                            }
+                        }
+                    }, function (response) {
+                        $scope.expandGoods(currenctMaterial);
+                        closeShelArea(currenctMaterial);
+                    });
+				} else {
+					toaster.pop('error', '错误', "添加产品失败" + result.message);
+				}
+			}, function (error) {
+				toaster.pop('error', '错误', error.data);
+			});
+		}
+
+		/**
+		 * 更新产品信息
+		 */
+		function updateGoods(material, goods) {
+			if(!goods || !material) {
+				return ;
+			}
+            if (!$scope.checkGoodsInfo(goods)) {
+                return ;
+            }
+            inverseGoods(goods);
+			//不需要更新状态
+			Goods.updateGoods(null, goods, function(data){
+				if(data.code == 1) {
+					toaster.pop('success', '修改成功');
+					for(var i = 0; i < material.goodsArr.length; i++) {
+						if(material.goodsArr[i].id == data.data.id) {
+							material.goodsArr.splice(i, 1, data.data);
+							break;
+						}
+					}
+				}else {
+					toaster.pop('error', '失败', data.message);
+				}
+			}, function(response){
+				toaster.pop('error', '失败', response.data);
+			});
+		}
+
+		/**
+		 * 上架在售产品信息
+		 */
+		function putOn(material, goods) {
+			if(!goods || !material) {
+				return ;
+			}
+			Goods.putOn({id : goods.id}, null ,function (data) {
+				toaster.pop('success', '提示', '上架成功');
+				for(var i = 0; i < material.goodsArr.length; i++) {
+					if(material.goodsArr[i].id == goods.id) {
+						material.goodsArr.splice(i, 1, data.data);
+						break;
+					}
+				}
+			}, function (response) {
+				toaster.pop('error', '提示', '上架失败:' + response.data);
+			});
+		}
+
+		/**
+		 * 上架只是修改Goods的状态
+		 */
+		$scope.publishGoods = function (product) {
+			if (!validateGoods($scope.goods)) return ;
+
+			$q.all([initRuleCount().$promise]).then(function (data) {
+				if (data){
+					if ($scope.needShowTip){
+						$modal.open({
+							templateUrl: 'static/view/common/modal/delivery_rule_modal.html',
+							controller: 'rule_tip_ctrl',
+							resolve : {
+								type : function() {
+									return 'product';
+								},
+								tipModal : function() {
+									return true;
+								}
+							}
+						});
+						return ;
+					}
+					$scope.goods.breakUp = 1 === $scope.goods.breakUp;
+					$scope.isSelfSupport = 1 === $scope.goods.isSelfSupport;
+					if (product.sourceApp == 'ERP') {
+						if ($scope.goods.erpReserve < $scope.goods.b2cReserve + $scope.goods.reserve) {
+							toaster.pop('error', '本次上架数量和已上架数量之和不可超过ERP空闲库存数量');
+							return;
+						}
+					}
+					Material.newStockByStandardProduct({ id: product.id, isSelfSupport: $scope.isSelfSupport}, $scope.goods, function (result) {
+						if (result.success) {
+							toaster.pop('success', '商品上架成功');
+							closeShelArea(product);
+						} else {
+							toaster.pop('error', result.message);
+						}
+					}, function (error) {
+						toaster.pop('error', error.data);
+					});
+				}
+			});
+		};
+
+		// 保存物料详细信息
+		$scope.saveDetail = function(material) {
+			console.log('product',$scope.goods);
+			console.log(material);
+			Material.saveDetail({productId: material.id}, $scope.goods, function (data) {
+				toaster.pop('success', '保存成功');
+			}, function (response) {
+				toaster.pop('error', response.data);
+			})
+		};
+
+		$scope.fitBrandToProduct = function (product) {
+			if (product.selectBrandId){
+				if (product.pbranden != product.selectBrandId){
+					product.cmpId = product.selectBrandId;
+					product.canMatch = true;
+				}else {
+					product.cmpId = null;
+					product.canMatch = false;
+				}
+			}
+		};
+
+		// $scope.onFocus = function (product) {
+		// 	angular.forEach($scope.currenctMaterial, function (item) {
+		// 		item.isFocus = false;
+		// 	});
+		// 	product.isFocus = true;
+		// 	$scope.showBrand = true;
+		// };
+        //
+		// $scope.onItemBlur = function () {
+		// 	if ($scope.time){
+		// 		clearTimeout($scope.time);
+		// 	}
+		// 	$scope.time = setTimeout(function () {
+		// 		$scope.$apply(function () {
+		// 			$scope.showBrand = false;
+		// 		});
+		// 	}, 200);
+		// };
+
+		// 保存物料详细信息
+		$scope.saveDetail = function(material) {
+			console.log('product',$scope.goods);
+			console.log(material);
+			Material.saveDetail({productId: material.id}, $scope.goods, function (data) {
+				toaster.pop('success', '保存成功');
+			}, function (response) {
+				toaster.pop('error', response.data);
+			})
+		};
+
+		/**
+		 * 验证商品信息
+		 *
+		 * @param goods		商品信息
+		 */
+		function validateGoods(goods) {
+			if(!goods.tag) {
+				toaster.pop('warning', '提示', '产品的自定义标签为空');
+				return false;
+			}
+			if(goods.tag.length > 20) {
+				toaster.pop('warning', '提示', '产品的自定义标签超过了20个字符');
+				return false;
+			}
+			// if(!pattern.test(goods.tag)) {
+			// 	toaster.pop('warning', '提示', '产品的自定义标签只能包含中英文字符');
+			// 	return false;
+			// }
+			if(!goods.packaging || goods.packaging === '') {
+				toaster.pop('warning', '提示', '产品包装方式不能为空');
+				return false;
+			}
+			if(!pattern.test(goods.packaging)) {
+				toaster.pop('warning', '提示', '产品包装方式只能包含中文和英文字符');
+				return false;
+			}
+			if(goods.packaging.length > 10) {
+				toaster.pop('warning', '提示', '产品包装方式不能超过10个字符');
+				return false;
+			}
+			if (!goods.produceDate || goods.produceDate === '') {
+				toaster.pop('warning', '提示',  '产品生产日期不能为空');
+				return false;
+			}
+			if(goods.produceDate.length > 11) {
+				toaster.pop('warning', '提示', '产品生产日期不能超过11个字符');
+				return false;
+			}
+			if (!goods.reserve || goods.reserve === '') {
+				toaster.pop('warning', '提示', '产品库存信息不能为空');
+				return false;
+			}
+			if (!goods.minBuyQty || goods.minBuyQty === '') {
+				toaster.pop('warning', '提示', '产品的起拍数量不能为空');
+				return false;
+			}
+			if(!goods.minPackQty || goods.minPackQty === '') {
+				goods.minPackQty = 1;
+			}
+			if(!goods.breakUp) {
+				$scope.isNotBreakUp(goods);
+			}
+
+			//console.log($scope.store.enType);
+			// 根据价格生成币别
+			if (!$scope.store || !$scope.store.enType || $scope.store.enType === '') {
+				var rmbFlag = false;
+				var usdFlag = false;
+				var price = {};
+				for (var i = 0; i < goods.prices.length; i++) {
+					price = goods.prices[i];
+					if (price.rMBPrice && price.rMBPrice !== '') {
+						rmbFlag = true;
+					}
+					if (price.uSDPrice && price.uSDPrice !== '') {
+						usdFlag = true;
+					}
+				}
+				if (rmbFlag && usdFlag) {
+					goods.currencyName = 'RMB-USD';
+				} else if (rmbFlag && !usdFlag) {
+					goods.currencyName = 'RMB';
+				} else if (!rmbFlag && usdFlag) {
+					goods.currencyName = 'USD';
+				} else {
+					delete goods.currencyName;
+				}
+			} else {
+				if ($scope.store.enType === 'MAINLAND') {
+					goods.currencyName = 'RMB';
+				}
+				if ($scope.store.enType === 'HK') {
+					goods.currencyName = 'USD';
+				}
+			}
+
+
+			for (i = 0; i < goods.prices.length; i++) {
+				price = goods.prices[i];
+				if (!price.start || price.start === '') {
+					toaster.pop('warning', '提示', '产品价格梯度的起始数量不能为空');
+					return false;
+				}
+				if (!price.end || price.end === '') {
+					toaster.pop('warning', '提示', '产品价格梯度的终止数量不能为空');
+					return false;
+				}
+				if (!goods.currencyName || goods.currencyName === '') {
+					if ((!price.rMBPrice || price.rMBPrice === '') && (!price.uSDPrice || price.uSDPrice === '')) {
+						toaster.pop('warning', '提示', '产品的人民币和美元价格不能同时为空');
+						return false;
+					}
+				} else {
+					if (goods.currencyName.indexOf('RMB') > -1) {
+						if (!price.rMBPrice || price.rMBPrice === '') {
+							toaster.pop('warning', '提示', '产品的人民币价格不能为空');
+							return false;
+						}
+						if (price.rMBPrice <= 0) {
+							toaster.pop('warning', '提示', '产品的人民币价格不能小于0');
+							return false;
+						}
+					}
+					if (goods.currencyName.indexOf('USD') > -1) {
+						if (!price.uSDPrice || price.uSDPrice === '') {
+							toaster.pop('warning', '提示', '产品的美元价格不能为空');
+							return false;
+						}
+						if (price.uSDPrice <= 0) {
+							toaster.pop('warning', '提示', '产品的美元价格不能小于0');
+							return false;
+						}
+					}
+				}
+			}
+			if((!goods.minDelivery || goods.minDelivery === '') || (!goods.maxDelivery || goods.maxDelivery === '')) {
+				toaster.pop('warning', '提示', '交期不能为空');
+				return false;
+			}
+			if ((goods.minDelivery < 1 || goods.minDelivery > 31) || (goods.maxDelivery < 0 || goods.maxDelivery > 31)) {
+				toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
+				return false;
+			}
+			return true;
+		}
+
+		/**
+		 * 获取物料交易信息
+		 * @param product
+		 */
+		var getProductDetail = function (product) {
+			Material.getProductDetail({id : product.id}, function (data) {
+				// $scope.goods.erpReserve = typeof data.reserve == 'undefined' ? 0 : data.reserve;
+				// $scope.goods.b2cReserve = typeof data.b2cReserve == 'undefined' ? 0 : data.b2cReserve;
+				// $scope.goods.packaging = data.packaging;
+				// $scope.goods.produceDate = data.produceDate;
+				// $scope.goods.minPackQty = data.minPackQty;
+				// $scope.goods.breakUp = data.breakUp;
+				// $scope.goods.minBuyQty = data.minBuyQty;
+				// $scope.goods.minDelivery = data.minDelivery;
+				// $scope.goods.maxDelivery = data.maxDelivery;
+				// $scope.goods.prices = [];
+				// product.selected = true;
+				// if ('MAINLAND' == $scope.store.enType)
+				// 	$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, rMBPrice: data.price});
+				// if ('HK' == $scope.store.enType)
+				// 	$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve, uSDPrice: data.price});
+
+			});
+		}
+
+		/**
+		 * 获取物料交易信息
+		 * @param product
+		 */
+		function showShelfArea(material) {
+			// ComponentActive.getComponentListByUuid({ uuids: material.cmpUuId}, function (components) {
+			// 	if (components.length > 0) {
+			// 		var component = components[0];
+			// 		angular.forEach($scope.currenctMaterial, function (product) {
+			// 			delete product.selected;
+			// 		});
+			// 		$scope.goods = { isBreakUp: 1, isSelfSupport: 1, prices: [{}] };
+			// 		$scope.goods.prices = [];
+			// 		$scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve});
+			// 		$scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
+			// 		material.img = component.img || null;
+			// 		if ('ERP' == product.sourceApp) {// 如果是erp上传物料获取物料交易信息
+			// 			getProductDetail(product);
+			// 		} else {
+			// 			product.selected = true;
+			// 		}
+			// 	} else {
+			// 		$scope.goods = { editBreakUp: false, editSelfSale: 2};
+			// 		if($scope.store.enType === 'HK') {
+			// 			$scope.goods.currencyName = 'USD';
+			// 		}else {
+			// 			$scope.goods.currencyName = 'RMB';
+			// 		}
+			// 		// 先保存产品id,方便去获取tag是否重复
+			// 		$scope.goods.productid = material.id;
+			// 		$scope.goods.prodNum = material.prodNum;
+			// 		$scope.goods.editPrices = [];
+			// 		$scope.goods.editPrices.push({start : $scope.minReserve, end : $scope.maxReserve});
+			// 		// $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
+			// 		material.selected = true;
+			// 	}
+			// }, function (error) {
+			// 	toaster.pop('error', '当前产品对应的器件[' + material.cmpUuId + ']已失效');
+			// 	console.log(error);
+			// });
+
+			angular.forEach($scope.currenctMaterial, function (material) {
+				delete material.selected;
+				material.exPandOper = false;
+				material.addGoodsOper = false;
+			});
+			material.addGoodsOper = true;
+			material.exPandOper = true;
+			$scope.expandGoods(material, material.addGoodsOper);
+			// if ('ERP' == material.sourceApp) {// 如果是erp上传物料获取物料交易信息
+			// 	getProductDetail(material);
+			// } else {
+				$scope.goods = { editBreakUp: false, editSelfSale: 2};
+				if($scope.store.enType === 'HK') {
+					$scope.goods.currencyName = 'USD';
+				}else {
+					$scope.goods.currencyName = 'RMB';
+				}
+				// 先保存产品id,方便去获取tag是否重复
+				$scope.goods.productid = material.id;
+				$scope.goods.prodNum = material.prodNum;
+				$scope.goods.editPrices = [];
+				$scope.goods.editPrices.push({start : $scope.minReserve, end : $scope.maxReserve});
+				// $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
+				material.selected = true;
+			// }
+		}
+
+		/**
+		 * 关闭上架商品填写区域
+		 *
+		 * @param product		产品信息
+		 */
+		function closeShelArea(product) {
+			// 初始化商品信息
+			angular.forEach($scope.currenctMaterial, function (material) {
+				material.addGoodsOper = false;
+				material.exPandOper = false;
+			});
+			$scope.goods = { editBreakUp: false, editSelfSale: 2};
+			if (product.selected){
+				delete product.selected;
+			}
+		}
+
+		/**
+		 * 设置最小起订量
+		 *
+		 * @param goods		商品信息
+		 */
+		function setPriceMinAmount(goods, edit) {
+            // goods.editMinBuyQtyInValid = false;
+			// if (typeof goods.editMinBuyQty == 'undefined') {
+			// 	goods.editMinBuyQtyInValid = true;
+			// 	return false;
+			// }
+            if (!$scope.isInt.test(goods.editMinBuyQty) || parseInt(goods.editMinBuyQty) < 1) {
+                // goods.editMinBuyQtyInValid = true;
+				if (goods.editBreakUp) {
+					goods.editMinBuyQty = 1;
+					goods.editPrices[0].start = goods.editMinBuyQty;
+				} else {
+					if (goods.editMinPackQty) {
+						goods.editMinBuyQty = goods.editMinPackQty;
+						goods.editPrices[0].start = goods.editMinBuyQty;
+					}
+				}
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					toaster.pop('warning', '提示', '起订量必须是大于0的整数');
+				}
+                return false;
+            }
+            goods.editMinBuyQtyPre = goods.editMinBuyQty;
+            if (!goods.editBreakUp) {
+                $scope.isNotBreakUp(goods, edit);
+            }
+		}
+
+		$scope.updateStartNumber = function (goods) {
+			goods.editPrices[0].start = goods.editMinBuyQty;
+		};
+
+		/**
+		 * 设置最小包数量
+		 *
+		 * @param goods		商品信息
+		 */
+		function setPriceMinPackAmount(goods) {
+            goods.editMinPackQtyInValid = false;
+			if (typeof goods.editMinPackQty == 'undefined') {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				}
+				return false;
+			}
+            if (!$scope.isInt.test(goods.editMinPackQty)) {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editMinPackQtyInValid = true;
+					toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				}
+                return false;
+            }
+            if (parseInt(goods.editMinPackQty) < 1) {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editMinPackQtyInValid = true;
+					toaster.pop('warning', '提示', '包装数量必须是大于0的整数');
+				}
+                return false;
+            }
+            if (parseInt(goods.editMinPackQty) > $scope.maxPackQty) {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					toaster.pop('warning', '提示', '包装数量必须小于' + $scope.maxPackQty);
+					goods.editMinPackQtyInValid = true;
+				}
+                return false;
+            }
+            if (goods.editMinBuyQty) {
+                if(!goods.editBreakUp) {
+                    $scope.isNotBreakUp(goods);
+                }
+            }
+            goods.editMinPackQtyPre = goods.editMinPackQty;
+            goods.editMinPackQtyInValid = false;
+		}
+
+		/**
+		 * 设置价格梯度的最大数量
+		 *
+		 * @param goods		商品信息
+		 */
+		function setPriceMaxAmount(goods, edit) {
+			if (!goods.editReserve) {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editReserveInvalid = true;
+					toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				}
+				return false;
+			}
+			if (!$scope.isInt.test(goods.editReserve)) {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editReserveInvalid = true;
+					toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				}
+                return false;
+			}
+            // if(goods.editMinBuyQty) {
+            //     if(parseInt(goods.editReserve) < parseInt(goods.editMinBuyQty)) {
+            //         goods.editReserveInvalid = true;
+            //         toaster.pop('warning', '提示', '库存必须是大于等于起订量的整数');
+            //         return false;
+            //     }
+            // }
+            if (parseInt(goods.editReserve) > $scope.maxReserve || goods.editReserve < $scope.minReserve) {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					goods.editReserveInvalid = true;
+					toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+				}
+                return false;
+            }
+            goods.editReservePre = goods.editReserve;
+            goods.editReserveInvalid = false;
+			if (!goods.breakUp) {
+				$scope.isNotBreakUp(goods, edit);
+			}
+		}
+
+		var countLength = function (string) {
+			return string.replace(/[^\x00-\xff]/g,'**').length;
+		};
+
+		var cutOutString = function (str, length) {
+			for (var i = 1; i <= str.length; i++) {
+				if (countLength(str.substr(0, i)) > length){
+					str = str.substr(0, i-1);
+					break;
+				}
+			}
+			return str;
+		};
+
+        /**
+         * 编辑包装方式的信息
+         * @param goods
+         * @param edit
+         */
+        $scope.editPackaging = function(goods) {
+            goods.editPackagingInvalid = false;
+            if (goods.editPackaging) {
+                if (!pattern.test(goods.editPackaging)) {
+                    toaster.pop('warning', '提示', '包装方式只能填写中英文');
+                    goods.editPackagingInvalid = true;
+                }
+            }
+        };
+
+        $scope.changePackaging = function (goods) {
+			if (goods.editPackaging) {
+				goods.editPackaging = cutOutString(goods.editPackaging, 10);
+			}
+		};
+
+        /**
+         * 编辑生产日期
+         * @param commodity
+         */
+        $scope.editProduceDateFa = function(goods) {
+			if($scope.$$nonProduct.enterSaveButton) {
+				return ;
+			}
+            goods.editProduceDateInvalid = false;
+            if(goods.editProduceDate) {
+				goods.editProduceDate = cutOutString(goods.editProduceDate, 12);
+                // if(goods.editProduceDate.length > 11) {
+                //     goods.editProduceDateInvalid = true;
+                //     toaster.pop('warning', '提示', '生产日期不能超过十一个字符');
+                // }
+            }
+        };
+
+		/**
+		 * 判断价格是否合理,只设置验证的结果
+		 * @param prices 分段价格
+		 * @param price 对应的价格
+		 * @param index 索引
+		 */
+		$scope.changePrices = function (prices, price, index) {
+			prices[index].priceInvalid = false;
+			if(!prices || !prices[index] || !price) {
+				return ;
+			}
+			if(isNaN(price)) {
+				prices[index].priceInvalid = true;
+				toaster.pop('warning', '提示', '单价必须是大于0的数字');
+				return;
+			}
+			if(new Number(price) <= 0) {
+				prices[index].priceInvalid = true;
+				toaster.pop('warning', '提示', '单价必须是大于0的数字');
+				return;
+			}
+			if(price.indexOf('.') > -1) {
+				var arr = price.split(".");
+				if(arr[0].length > 4 || arr[1].length > 6) {
+					prices[index].priceInvalid = true;
+					return ;
+				}
+			}else {
+				if(price.toString().length > 4) {
+					prices[index].priceInvalid = true;
+					return ;
+				}
+			}
+		};
+
+        /**
+         * 修改分段的数量
+         * @param commodity 批次信息
+         * @param index 索引值
+         * @param isEnd 是否是结束值
+         */
+        $scope.editQty = function (goods, index, isEnd, num) {
+            goods.editPrices[index].endInValid = false;
+            goods.editPrices[index].startInValid = false;
+            if (goods.editPrices.length < index || index < 0) {
+                return ;
+            }
+            if (typeof num == 'undefined') {
+				return ;
+			}
+            if (!$scope.isInt.test(num)) {
+				if (!$scope.$$nonProduct.enterSaveButton) {
+					if (isEnd) {
+						//goods.editPrices[index].endInValid = true;
+						delete goods.editPrices[index].end;
+					} else {
+						//goods.editPrices[index].startInValid = true;
+						delete goods.editPrices[index].start;
+					}
+					toaster.pop('warning', '提示', '输入值必须为正整数');
+				}
+                return ;
+            }
+            if (isEnd) {
+                if (index < goods.editPrices.length - 1) {
+                    if (parseInt(goods.editPrices[index].end) < parseInt(goods.editPrices[index].start)) {
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值必须大于' + goods.editPrices[index].start);
+							//goods.editPrices[index].endInValid = true;
+							delete goods.editPrices[index].end;
+						}
+                    } else if ((goods.editPrices[index + 1].end) && (parseInt(goods.editPrices[index].end) + 1) >= parseInt(goods.editPrices[index + 1].end)) {
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值必须小于'+(parseInt(goods.editPrices[index + 1].end) - 1));
+							//goods.editPrices[index].endInValid = true;
+							delete goods.editPrices[index].end;
+						}
+                    } else {
+                        goods.editPrices[index + 1].start = parseInt(goods.editPrices[index].end) + 1;
+						goods.editPrices[index + 1].startInValid = false;
+						goods.editPrices[index].endPre = goods.editPrices[index].end;
+						goods.editPrices[index + 1].startPre = goods.editPrices[index + 1].start;
+                    }
+                }
+                // else {
+                //     if(commodity.editPrices[index].end > commodity.editMinBuyQty) {
+                //         if(commodity.editPrices[index].end > commodity.reserve) {
+                //             toaster.pop('warning', '提示', '修改最后一个分段的结束值之后,新的库存量大于原有的库存量');
+                //             commodity.editPrices[index].end = commodity.editPrices[index].endPre;
+                //         }else {
+                //             commodity.editReserve = commodity.editPrices[index].end;
+                //             commodity.editPrices[index].endPre = commodity.editPrices[index].end;
+                //             commodity.editReservePre = commodity.editReserve;
+                //         }
+                //     }else {
+                //         toaster.pop('warning', '提示', '修改最后一个分段的结束值之后导致库存量小于起拍量');
+                //         commodity.editPrices[index].end = commodity.editPrices[index].endPre;
+                //     }
+                // }
+            } else {
+                if (index != 0) {
+                    if (parseInt(goods.editPrices[index].start) > parseInt(goods.editPrices[index].end)) {
+                        // toaster.pop('warning', '提示', '修改本分段之后,会导致分段的起始值' + goods.editPrices[index ].start + '大于结束值' + parseInt(goods.editPrices[index].end));
+						//goods.editPrices[index].startInValid = true;
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值必须小于'+ + goods.editPrices[index].end);
+							delete goods.editPrices[index].start;
+						}
+                    } else if ((parseInt(goods.editPrices[index].start) - 1) < goods.editPrices[index - 1].start) {
+                        // toaster.pop('warning', '提示', '修改本分段之后,会导致前一个分段的起始值' + goods.editPrices[index - 1].start + '大于结束值' + (parseInt(goods.editPrices[index].start) - 1));
+						//goods.editPrices[index].startInValid = true;
+						if (!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '输入值会导致梯度重叠,请重新修改');
+							delete goods.editPrices[index].start;
+						}
+                    } else {
+                        goods.editPrices[index - 1].end = parseInt(goods.editPrices[index].start) - 1;
+						goods.editPrices[index - 1].endInValid = false;
+                        goods.editPrices[index].startPre = goods.editPrices[index].start;
+                        goods.editPrices[index - 1].endPre = goods.editPrices[index - 1].end;
+                    }
+                }//else {
+                //     if(commodity.editMinPackQty) {
+                //         if(commodity.editPrices[index].start % commodity.editMinPackQty != 0) {
+                //             commodity.editPrices[index].startInValid = false;
+                //             commodity.editPrices[index].start = commodity.editMinBuyQty;
+                //             commodity.editPrices[index].startPre = commodity.editMinBuyQty;
+                //             toaster.pop('warning', '提示', '第一个分段的起始量必须是倍数(' + commodity.editMinPackQty + ")的整数倍");
+                //         }else {
+                //             commodity.editMinBuyQty = commodity.editPrices[index].start;
+                //             commodity.editMinBuyQtyPre = commodity.editPrices[index].start;
+                //             commodity.editMinBuyQtyInValid = false;
+                //         }
+                //     }else {
+                //         commodity.editMinBuyQty = commodity.editPrices[index].start;
+                //         commodity.editMinBuyQtyPre = commodity.editMinBuyQty;
+                //         commodity.editPrices[index].startPre = commodity.editPrices[index].start;
+                //         commodity.editMinBuyQtyInValid = false;
+                //     }
+                // }
+            }
+        };
+
+        /**
+         * 删除对应的分段.
+         * @param commodity
+         */
+        $scope.deleteFragment = function(goods, index) {
+            if (index > -1 && index < goods.editPrices.length) {
+                if (goods.editPrices.length < 2) {
+                    toaster.pop('warning', "提示", "商品至少需要一个分段");
+                    return ;
+                }
+                if (index < goods.editPrices.length - 1) { //不是最后一个分段
+                    var price = goods.editPrices.splice(index, 1);
+                    goods.editPrices[index].start = price[0].start;
+                } else if (index == goods.editPrices.length - 1) { //如果删除的是最后一个分段,
+                    var price = goods.editPrices.splice(index, 1);
+                    goods.editPrices[index -1].end = price[0].end;
+                }
+				if (goods.editMinBuyQty && $scope.isInt.test(goods.editMinBuyQty) &&
+					parseInt(goods.editPrices[0].end) >= parseInt(goods.editMinBuyQty)) {
+					if (goods.editMinBuyQtyInValid) {
+						goods.editMinBuyQtyInValid = false;
+						goods.editPrices[0].start = goods.editMinBuyQty;
+					}
+				}
+            }
+        };
+
+        /**
+         * 增加对应的分段。
+         * @param commodity
+         */
+        $scope.addFragment = function (goods) {
+            if(goods.editPrices.length > 2) {
+                toaster.pop('warning', "提示", "商品最多只能有三个分段");
+                return ;
+            }
+            var price = {};
+            price.start = null;
+            price.startPre = null;
+            price.end = goods.editPrices[goods.editPrices.length - 1].end;
+            price.endPre = price.end;
+            price.uSDPrice = null;
+            price.uSDPricePre = null;
+            price.rMBPrice = null;
+            price.rMBPricePre = null;
+            goods.editPrices[goods.editPrices.length - 1].end = null;
+            goods.editPrices[goods.editPrices.length - 1].endPre = null;
+            goods.editPrices.push(price);
+        }
+
+		/**
+		 * 修改字符串信息
+		 */
+		$scope.blurTag = function (goods) {
+			if (!goods.editTag) {
+				toaster.pop("warning", "自定义标签不能为空");
+			}
+			if (goods.editTag) {
+				Goods.getRepeatByTagAndProductId({goodId:goods.id, productId:goods.productid, tag:goods.editTag}, function (data) {
+					if (data.success) {
+						if (data.data) {
+							toaster.pop("warning", "该产品下已存在相同的自定义标签");
+						}
+					} else {
+						toaster.pop("error", data.message);
+					}
+				}, function (error) {
+					toaster.pop("error","判断标签重复请求错误" + error.date);
+				})
+			}
+		};
+
+		/**
+		 * 修改字符串信息,失去焦点
+		 */
+		$scope.changeTag = function (goods) {
+			var length = ByteCountService.strByteLength(goods.editTag);
+			if (length > 20) {
+				goods.editTag = goods.editTagPre;
+			} else {
+				goods.editTagPre = goods.editTag;
+			}
+		};
+
+
+        /**
+         * @param min 最小值
+         * @param max 最大值
+         * @param isMin 传入的是否是最小值
+         * @param commodity 批次信息
+         */
+        $scope.changeDelivery = function(min, max, isMin, goods) {
+			if(isMin) {
+				goods.editMinDeliveryinValid = false;
+			}else {
+				goods.editMaxDeliveryinValid = false;
+			}
+            var day = -1;
+            if(isMin) {
+                if(min && $scope.isInt.test(min)) {
+                    day = min;
+                }else {
+					if(typeof min == 'undefined') {
+						return ;
+					}
+                    if(!$scope.isInt.test(min)) {
+						if(!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '交期请输入1-31的整数');
+							goods.editMinDeliveryinValid = true;
+						}
+                    }
+                    return ;
+                }
+
+            }else {
+                if(max && $scope.isInt.test(max)) {
+                    day = max;
+                }else {
+					if(typeof max == 'undefined') {
+						return ;
+					}
+                    if(!$scope.isInt.test(max)) {
+						if(!$scope.$$nonProduct.enterSaveButton) {
+							toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
+							goods.editMaxDeliveryinValid = true;
+						}
+                    }
+                    return ;
+                }
+
+            }
+            if(day > 31 || day < 1) {
+				if(!$scope.$$nonProduct.enterSaveButton) {
+					if(isMin) {
+						goods.editMinDeliveryinValid = true;
+					}else {
+						goods.editMaxDeliveryinValid = true;
+					}
+					toaster.pop('warning', '提示', '交期的值必须在1-31天');
+				}
+                return ;
+            }
+            if(Number(min) > Number(max)) {
+				if(!$scope.$$nonProduct.enterSaveButton) {
+					goods.editMinDeliveryinValid = true;
+					goods.editMaxDeliveryinValid = true;
+					toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
+				}
+                return ;
+            }
+			goods.editMinDeliveryinValid = false;
+			goods.editMaxDeliveryinValid = false;
+        };
+
+        /**
+         * 切换销售模式
+         */
+        $scope.changeSaleMode = function (goods) {
+            if(!goods || !goods.batchCode) {
+                return ;
+            }
+            StoreCms.validCommdityisAdvantageCommodity({batchcode : goods.batchCode}, function (data) {
+                if(data.code != 1) {
+                    toaster.pop('warning', '提示', data.message);
+                }
+            }, function (response) {
+            });
+
+        };
+
+		/**
+		 * 验证最短交期数据
+		 *
+		 * @param goods			商品信息
+		 * @param type			交期类型
+		 */
+		function checkMinDelivery(goods, type) {
+			if (goods.minDelivery == null) {
+				return ;
+			}
+			if (goods.minDelivery < 0 || goods.minDelivery > 31) {
+				toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
+				return ;
+			}
+			if (goods.minDelivery && goods.minDelivery > goods.maxDelivery) {
+				toaster.pop('warning', '提示', '最短交期必须小于最长交期');
+				return ;
+			}
+			return true;
+		}
+
+		/**
+		 * 验证最长交期数据
+		 *
+		 * @param goods			商品信息
+		 * @param type			交期类型
+		 */
+		function checkMaxDelivery(goods, type) {
+			if (goods.maxDelivery == null) {
+				return ;
+			}
+			if (goods.maxDelivery < 0 || goods.maxDelivery > 31) {
+				toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
+				return ;
+			}
+			if (goods.maxDelivery && goods.minDelivery > goods.maxDelivery) {
+				toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
+				return ;
+			}
+			return true;
+		}
+		/**
+		 * 是否可拆卖
+		 * @param commodity
+		 */
+		$scope.toggleIsBreadUp = function(goods, edit) {
+            goods.editBreakUp = !goods.editBreakUp;
+            if(!goods.editBreakUp) {
+                $scope.isNotBreakUp(goods);
+            }
+		};
+
+		/**
+		 * 如果不拆分需要重新计算最小起订量的信息
+		 * @param goods
+		 */
+		$scope.isNotBreakUp = function (goods, edit) {
+            if (goods.editMinPackQty && goods.editMinBuyQty) {
+                var remainder = goods.editMinBuyQty % goods.editMinPackQty;
+                if (remainder != 0) {
+					toaster.pop('warning', '提示', '不可拆卖时,起订量必须是包装数量的倍数');
+					if (parseInt(goods.editMinBuyQty) > parseInt(goods.editMinPackQty)) {
+						goods.editMinBuyQty = Number(NumberService.sub(goods.editMinBuyQty, remainder));
+					} else {
+						goods.editMinBuyQty = goods.editMinPackQty;
+					}
+					goods.editPrices[0].start = goods.editMinBuyQty;
+                }
+            }
+		}
+
+		// 获取品牌联想词
+		$scope.getSimilarBrands = function(keyword) {
+			if (keyword) {
+				return Search.getSimilarBrands({keyword : keyword}).$promise.then(function(data) {
+					return data.map(function(item) {
+						return item;
+					});
+				});
+			}
+		};
+
+		// 选择品牌
+		$scope.onAssociateClickBrand = function (material, brand) {
+			BrandActiveAPI.getBrand({uuid: brand.uuid}, {} , function (data) {
+				material.submitProduct.brand = data;
+			}, function (response) {
+				toaster.pop('error', response.data);
+			});
+		};
+
+		// 获取器件联想词
+		$scope.getSimilarCmps = function(code) {
+			if (code) {
+				return Search.getSimilarComponents({keyword : code}).$promise.then(function(data) {
+					return data.map(function(item) {
+						return item;
+					})
+				});
+			}
+		};
+		// 选择器件
+		$scope.onAssociateClickCmp = function (material, cmp) {
+			$scope.submitProduct.component = cmp;
+			ComponentActiveAPI.get({uuid : cmp.uuid}, {}, function(data) {
+				var component = data;
+				$scope.submitProduct.brand = component.brand;
+				$scope.submitProduct.kind = component.kind;
+			});
+		};
+
+		// 获取末级类目联想词
+		$scope.getSimilarKinds = function(name) {
+			if (name) {
+				return Search.getSimilarLeafKinds({keyword: name}).$promise.then(function(data) {
+					return data.map(function(item) {
+						return item;
+					})
+				})
+			}
+		};
+
+		$scope.onAssociateClickKind = function (material, kind) {
+			$scope.submitProduct.kind = kind;
+		};
+
+		// 选择类目
+		$scope.selectKind = function() {
+			$modal.open({
+				animation: true,
+				size: 'lg',
+				templateUrl: 'static/view/prod/product_kindChoose_modal.html',
+				controller: 'KindChooseCtrl',
+				resolve: {
+					actives: function() {
+						return $scope.actives;
+					}
+				}
+			}).result.then(function(data){
+				$scope.submitProduct.kind = data.actives[data.actives.length - 1];
+			}, function(){
+
+			});
+		};
+
+		// 提交申请
+		$scope.submit = function (material) {
+			if (typeof material.submitProduct.brand == 'undefined' || material.submitProduct.brand.nameEn == null) {
+				toaster.pop('warning', '请填写品牌英文名');
+				return;
+			}
+			if (typeof material.submitProduct.brand.url == 'undefined' || material.submitProduct.brand.url == null) {
+				toaster.pop('warning', '请填写品牌官网');
+				return;
+			}
+			if (!material.pbranduuid) { // 品牌申请
+				if (typeof material.submitProduct.brand.brief == 'undefined' || material.submitProduct.brand.brief == null) {
+					toaster.pop('warning', '请填写品牌简介');
+					return;
+				}
+				if (typeof material.submitProduct.brand.series == 'undefined' || material.submitProduct.brand.series == null) {
+					toaster.pop('warning', '请填写主要产品');
+					return;
+				}
+				BrandSubmit.unstandardSubmit({}, material.submitProduct, function (data) {
+
+				}, function (response) {
+
+				})
+			} else {
+				toaster.pop('enter component submit');
+				if (typeof material.submitProduct.component == 'undefined' || material.submitProduct.component.code == null) {
+					toaster.pop('warning', '请填写原厂型号');
+					return;
+				}
+
+				if (typeof material.submitProduct.kind == 'undefined' || material.submitProduct.kind.id == null) {
+					toaster.pop('warning', '请填写或选择商城已有类目');
+					return;
+				}
+				if ($scope.attachName == '') {
+					toaster.pop('warning', '请填上传规格书');
+					return;
+				} else {
+					material.submitProduct.attach = $scope.attachName;
+				}
+
+				Material.submitProduct({}, material.submitProduct, function (data) {
+					if (data.data == '已存在此器件') {
+						toaster.pop('info',  '已存在此器件');
+					} else {
+						toaster.pop('info', data.data);
+					}
+				}, function (response) {
+					toaster.pop('error', response.data);
+				})
+			}
+		};
+
+		$scope.attachNameInfo = '';
+		//上传规格书
+		$scope.onAttachInput = function (event) {
+			$scope.attachNameInfo = event.target.files[0].name;
+		};
+		$scope.deleteAttach = function () {
+			$scope.attachNameInfo = '';
+		};
+
+	}]);
+
+	//类目选择模态框
+	app.register.controller('KindChooseCtrl', ['$scope', 'KindAPI', 'actives', 'toaster', '$modalInstance', function($scope, KindAPI, actives, toaster, $modalInstance) {
+		$scope.actives = actives;
+		$scope.kinds = [[], [], [], []];
+		// 获取子类目
+		var getChildren = function(pid, deep) {
+			KindAPI.getChildren({parentId: pid}, function(data) {
+				$scope.kinds[deep] = data;
+			}, function(response) {
+				toaster.pop('error', '获取子类目失败', response.data);
+			});
+		};
+
+		// 改变节点选中状态
+		var changeStatus = function(item, deep) {
+			var actives = [], level = 0;
+			angular.forEach($scope.kinds, function(ks, i) {
+				if(i > deep) {
+					$scope.kinds[i] = [];
+				} else {
+					angular.forEach(ks, function(k, j) {
+						if(i == deep) {
+							if(k.id == item.id) {
+								$scope.kinds[i][j].$active = true;
+								actives.push(k);
+							} else {
+								k.$active = null;
+							}
+						} else {
+							if(k.$active) {
+								actives.push(k);
+							}
+						}
+					});
+				}
+			});
+			// 选择的节点
+			$scope.actives = actives;
+			$scope.active = item;
+			// 当前可操作的层级
+			if(deep < 3) {
+				$scope.activeDeep = deep + 1;
+			}
+		};
+
+		// 节点点击后获取子类目,节点被选中
+		$scope.onItemClick = function(item, deep) {
+			changeStatus(item, deep);
+			if (!item.isLeaf) {
+				getChildren(item.id, deep + 1);
+			}
+		};
+
+		// 重新加载数据
+		function reload(deep) {
+			var pid;
+			if(deep) {
+				pid = $scope.actives[deep - 1].id;
+			} else {
+				pid = 0;
+				deep = 0;
+			}
+			getChildren(pid, deep);
+		}
+
+		// 初始加载数据,获取第一层的类目
+		if($scope.actives) {
+			angular.forEach($scope.actives, function(v, k) {
+				KindAPI.getChildren({parentId: v.parentid}, function(data) {
+					$scope.kinds[k] = data;
+					angular.forEach($scope.kinds[k], function(kind, i){
+						if(kind.id == v.id) {
+							$scope.kinds[k][i].$active = true;
+							$scope.actives[k] = $scope.kinds[k][i];
+						}
+					})
+				}, function(response) {
+					toaster.pop('error', '获取子类目失败', response.data);
+				});
+			});
+		} else {
+			reload();
+		}
+
+		// 取消
+		$scope.cancel = function() {
+			$modalInstance.dismiss();
+		};
+
+		// 确认选择
+		$scope.check = function() {
+			var a = {
+				active: $scope.active,
+				actives: $scope.actives
+			};
+			$modalInstance.close(a);
+		};
+	}]);
+
+
+
+	//批量删除信息
+	app.register.controller('vendor_delete_ctrl', ['$scope', 'ids', 'Goods', 'Material', 'toaster', 'deleteMaterial', 'deleteGoods', 'selectAll', 'ProductServiceQuery', 'standard_tab', '$modalInstance', 'message', function ($scope, ids, Goods, Material, toaster, deleteMaterial, deleteGoods, selectAll, ProductServiceQuery, standard_tab, $modalInstance, message) {
+		$scope.deleteModal = true;
+        $scope.message = message;
+
+        $scope.ids = ids;
+
+        // 确认删除
+        $scope.confirmDelete = function () {
+            if(deleteMaterial) {
+                if(selectAll) {
+                    if(standard_tab == 'standard') {
+                        Material.deleteStandardAll(null, null, function (data) {
+                            if(data.code != 1) {
+                                toaster.pop('error','错误' ,data.message);
+                            }else {
+                                toaster.pop('success', '删除成功');
+								$scope.deleteModal = false;
+                                $modalInstance.close(data);
+                            }
+                        }, function (response) {
+                            toaster.pop('error', '错误', response.data);
+                        });
+                    }else {
+                        Material.deleteUnstandardAll(null, null, function (data) {
+                            if(data.code != 1) {
+                                toaster.pop('error', '错误', data.message);
+                            }else {
+                                toaster.pop('success', '删除成功');
+								$scope.deleteModal = false;
+                                $modalInstance.close(data);
+                            }
+                        }, function (response) {
+                            toaster.pop('error', '错误', response.data);
+                        });
+                    }
+                }else {
+                    if(!$scope.ids || $scope.ids.length == 0) {
+                        toaster.pop('warning', '提示','请选择要删除的信息');
+                        return ;
+                    }
+                    var idStr = $scope.ids.join(',');
+                    Material.deleteBatch({ids : idStr}, function (data) {
+                        toaster.pop('success', '删除成功');
+						$scope.deleteModal = false;
+                        $modalInstance.close(data);
+                    }, function (response) {
+                        toaster.pop('error', response.data);
+                    });
+                }
+            }else if(deleteGoods){
+                if(!$scope.ids || $scope.ids.length < 1) {
+                    return ;
+                }
+                Goods.deleteGoodsById({id: $scope.ids[0]}, function (data) {
+                    ProductServiceQuery.getProductById({id: data.productid}, function (response) {
+						$scope.deleteModal = false;
+                        $modalInstance.close(response);
+                        toaster.pop('success', '提示', '删除成功');
+                    }, function (response) {
+                        toaster.pop('error', '错误', response.data);
+                    });
+                }, function (response) {
+                    toaster.pop('error',  '错误', response.data);
+                });
+            }
+        };
+
+
+        $scope.cancleDelete = function () {
+			$scope.deleteModal = false;
+            $modalInstance.dismiss();
+        };
+
+        /**
+         * 监听点击的事件
+         */
+        document.onclick = function (event) {
+			if($scope.deleteModal) {
+				if(event) {
+					var tag = event.target;
+					if(tag) {
+						var attribute = tag.getAttribute("name");
+						while(tag.nodeName != 'BODY') {
+							if((attribute == 'comfirm-delete-modal') ||
+								attribute == 'delete-material' || attribute == 'delete-goods') {
+								return ;
+							}
+							tag = tag.parentElement;
+							attribute = tag.getAttribute("name");
+						}
+						$scope.deleteModal = false;
+						$modalInstance.dismiss();
+					}
+				}
+			}
+        };
+	}]);
+});

+ 11 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js

@@ -4,7 +4,14 @@ define([ 'app/app' ], function(app) {
 		$rootScope.$$productOn = {};
 		$rootScope.active = 'vendor_productOn';
 		$rootScope.$$productOn.leadIn = 'bathOn';
+        $rootScope.$$productOn.tab = 'bathOn';
 		document.title = '产品导入-优软商城';
+        //切换展示的信息
+        $scope.toggleActive = function(active) {
+            if($scope.tab != active) {
+                $rootScope.$$productOn.tab = active;
+            }
+        };
 	}]);
 
 	//批量上架的Ctrl
@@ -260,6 +267,10 @@ define([ 'app/app' ], function(app) {
 
 		//批量发布
 		$scope.publish = function(event) {
+			if ( $rootScope.$$productOn.tab === 'bathOnPerson'){
+				alert('ffff');
+				return;
+			}
 			if ($scope.pageParams.totalElements > 0) {
 				ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
 					if ($scope.needShowTip){

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

@@ -1493,7 +1493,8 @@
 	<div class="pro_management device">
 		<div class="com_tab">
 			<ul class="fl" style="width: 100%">
-				<li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">产品库</a></li>
+				<li ng-class="{'active': tab == 'material_person'}"><a ui-sref="vendor_material_person">个人产品库</a></li>
+				<li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">企业产品库</a></li>
 				<li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
 				<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
 			</ul>

+ 2199 - 0
src/main/webapp/resources/view/vendor/forstore/vendor_material_person.html

@@ -0,0 +1,2199 @@
+<!--右侧主体部分-->
+<style>
+	.tab.active {
+		display: inline-block !important;
+	}
+	*{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+	div.wanted_list01 dt.paging-bar>span {
+		float: right;
+		width: 322px;
+		height: 40px;
+		font-weight: normal;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button {
+		padding: 0;
+		height: 40px;
+		line-height: 40px;
+		border: none;
+		background: #FFFFFF;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button:hover {
+		color: #0C3894;
+	}
+	div.wanted_list01 dt.paging-bar>span input.page-num {
+		width: 25px;
+		height: 25px;
+		line-height: 40px;
+		border: 1px #C7BEBE solid;
+		text-align: center;
+	}
+	label[disabled] {
+		cursor: not-allowed;
+	}
+	.com_tab ul li.down-goods span:hover {
+		cursor: pointer;
+		text-decoration: underline;
+	}
+	.materrial-list span.length01{
+		width: 10% !important;
+	}
+	.materrial-list span{
+		width: 20% !important;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+	ul.pagination.ng-table-pagination > li > a > span {
+		height: 17px;
+		line-height: 17px;
+	}
+
+	div.ng-table-pager  input.page-number {
+		vertical-align: inherit;
+		display: inline-block;
+		width: 40px;
+		height: 31px;
+		padding: 6px 6px;
+		font-size: 14px;
+		line-height: 1.42857143;
+		color: #9B9792;
+		text-align: center;
+		background-color: #F6F5F4;
+		background-image: none;
+		border: 1px solid #ccc;
+		border-top-left-radius: 4px;
+		border-bottom-left-radius: 4px;
+		box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+		transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+	}
+
+	div.ng-table-pager a.page-a {
+		color: #fff;
+		cursor: pointer;
+		background-color: #4574E8;
+		border-color: #4574E8;
+		padding: 6px 6px;
+		font-size: 14px;
+		border-top-right-radius: 4px;
+		border-bottom-right-radius: 4px;
+		text-decoration: none;
+		height: 31px;
+	}
+
+	div.ng-table-pager div.page-go-block {
+		float: right;
+		margin-left: 20px;
+		margin-top: 15px;
+		font-size: 0px;
+		height: 31px;
+		line-height: 31px;
+	}
+	/*公用table*/
+	.public-tab{
+		margin-bottom: 0;
+	}
+	.public-tab.table tr td, .public-tab.table tr th {
+		font-size: 14px;
+		vertical-align: middle !important;
+	}
+	.public-tab.table>tbody+tbody{
+		border-top: none;
+	}
+	.public-tab.table>thead>tr{
+		height: 40px !important;
+	}
+	.public-tab.table>thead>tr>th,.public-tab.table>tbody>tr>td{
+		border-bottom: #e8e8e8 1px solid;
+		text-align: center;
+	}
+	.public-tab.table>tbody>tr>td{
+		border-top: none;
+		border-bottom: #e8e8e8 1px solid;
+	}
+	.public-tab.table>tbody>tr>td a{
+		margin: 0;
+	}
+	.public-tab.table>tbody>tr>td a.brand-type{
+		display: inline-block;
+		margin: 0;
+		width: 80%;
+		color: #333;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+	.public-tab.table>tbody>tr>td span{
+		margin: 0;
+	}
+	.public-tab.table>tbody>tr>td span.brand-type{
+		display: inline-block;
+		margin: 0;
+		width: 80%;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+	.public-tab.table>tbody>tr>td span:hover span {
+		color: #fff;
+		background: #5078cb;
+		border-radius: 2px;
+	}
+	.public-tab.table>tbody>tr>td.edit span span{
+		padding: 0 8px;
+		display: inline-block;
+		/*width: 50px;*/
+		height: 24px;
+		line-height: 24px;
+		text-align: center;
+		font-size: 12px;
+		color: #5078cb;
+		cursor: pointer;
+	}
+	.public-tab.table>tbody>tr>td.edit span span:hover{
+		color: #fff;
+	}
+	/*展开收起按钮同一位置显示*/
+	.public-tab.table>tbody>tr>td.edit span.packUp{
+		margin-left: 112px;
+	}
+		/*已上架*/
+	.public-tab.table>tbody>tr>td span.has-on{
+		font-size: 14px;
+		color: #33b401;
+	}
+	/*未上架*/
+	.public-tab.table>tbody>tr>td span.not-on{
+		font-size: 14px;
+		color: #666;
+	}
+	.grey{
+		color: #999;
+	}
+	.search-check{
+		width: 100%;
+		height: 54px;
+		background: #fff;
+		padding-top: 10px;
+		margin-bottom: 16px;
+	}
+	.search-check .search{
+		width: 550px;
+		margin-left: 150px;
+	}
+	.search-check .search .form-control{
+		width: 340px;
+		float: left;
+		height: 34px;
+		border-radius: 0;
+		box-shadow: none;
+		border-right: none;
+	}
+	.search-check .search button,.search-check .search a{
+		display: inline-block;
+		width: 94px;
+		height: 34px;
+		line-height: 34px;
+		text-align: center;
+		font-size: 14px;
+	}
+	.search-check .search button{
+		background: #d3e1fc;
+		border-radius: 0;
+		border: #e2dbdb 1px solid;
+		border-left: none;
+	}
+	.search-check .search a{
+		background: #5078cb;
+		color: #fff;
+		float: right;
+	}
+	.search-check .search button:hover,.search-check .search a:hover{
+		color: #fff;
+		background: #3f7ae3;
+	}
+	.search-check .check{
+		font-size: 14px;
+		line-height: 35px;
+	}
+	.search-check .check a{
+		font-size: 14px;
+		margin-right: 20px;
+		color: #333;
+	}
+	.search-check .check a:hover{
+		color: #5078cb;
+	}
+	.search-check .check .check-active{
+		margin-right: 15px;
+	}
+	.search-check .check .check-active span{
+		font-weight: normal;
+		color: #333;
+	}
+	.search-check .check .check-active span:hover{
+		color: #5078cb;
+		cursor: pointer;
+	}
+	.search-check .check .check-active label{
+		margin-right: 0 !important;
+	}
+	.check-input input{
+		display: none;
+	}
+	.check-input label {
+		width: 15px;
+		height: 15px;
+		display: inline-block;
+		background: url(static/img/user/images/check.png) no-repeat;
+		position: relative;
+		padding-left: 0 !important;
+		overflow: hidden;
+		margin-bottom: 0 !important;
+		vertical-align: sub;
+		min-height: 15px !important;
+		left: 0 !important;
+	}
+	.check-input input[type="checkbox"]:checked + label{
+		background-position: -15px 0;
+	}
+	.record-line{
+		min-height: 30px;
+		font-size: 12px;
+		line-height: 35px;
+		/* margin-top: 5px; */
+		padding-right: 22px
+	}
+	.device .tab{
+		padding-bottom: 20px;
+	}
+	.wanted_list01 .pagination{
+		margin: 0;
+	}
+	.ng-table-pager{
+		padding-bottom: 20px;
+	}
+
+	.record-line .prompt{
+		text-align: left;
+		width: 495px;
+		float: left;
+		line-height: 16px;
+		padding-left: 25px;
+		padding-top: 10px;
+	}
+	.record-line .prompt a{
+		color: #5078cb;
+	}
+	/*   编辑*/
+	.edit-content td{
+		background: #daecfb;
+		padding-bottom: 20px !important;
+	}
+	.edit-content img{
+		width: 60px;
+		border: #dfdfdf 1px solid;
+		height: 60px;
+	}
+	.edit-content .form-control{
+		height: 24px;
+		padding: 0;
+		text-align: center;
+		margin-bottom: 5px;
+		line-height: 24px;
+		font-size: 12px;
+		border-radius: 3px;
+	}
+	.edit-content select.form-control{
+		margin-top: -3px;
+		padding-left: 10px;
+		line-height: 23px;
+	}
+	.edit-content p{
+		font-size: 14px;
+	}
+	.edit-content select{
+		-webkit-appearance: inherit;
+		appearance: inherit;
+	}
+	.edit-content select option{
+		text-align: center;
+	}
+	.edit-content div.content,.edit-content div.img{
+		float: left;
+		margin: 0 7px;
+	}
+	.edit-content div.content .clearfix span:first-child {
+		text-align: right;
+		width: 64px;
+		float: left;
+	}
+	.edit-content div.content .clearfix span.switch {
+		float: left;
+	}
+	.edit-content div.width140{
+		width: 150px;
+	}
+	.edit-content div.width130{
+		width: 185px;
+	}
+	.edit-content div.width150{
+		margin-right: 53px;
+		margin-top: 6px;
+		width: 157px;
+	}
+	.edit-content div.width80{
+		width: 80px;
+	}
+	.edit-content div.width80 p.upload{
+		color: #33b401;
+	}
+	.edit-content div.content5{
+		margin: 0 5px;
+	}
+	.edit-content div.floatLeft {
+		overflow: hidden;
+		padding-top: 22px;
+	}
+	.edit-content div.floatLeft .title.height29{
+		float: left;
+		height: 29px;
+		line-height: 26px;
+	}
+	.edit-content div.floatLeft .input-list{
+		float: left;
+	}
+	.edit-content div.margin10{
+		padding-top: 24px;
+	}
+	.edit-content .wid36{
+		width: 36px;
+	}
+	.edit-content .wid48{
+		width: 48px;
+	}
+	.edit-content .wid42{
+		width: 42px;
+	}
+	.edit-content .wid92{
+		width: 92px;
+	}
+	.edit-content .wid70{
+		width: 70px;
+	}
+	.edit-content .wid83{
+		width: 83px;
+	}
+	.edit-content .wid56{
+		width: 56px;
+	}
+	.edit-content div .input-list p span{
+		float: left;
+		line-height: 24px;
+		color: #999;
+	}
+	.edit-content div .input-list p span input:first-child{
+		margin-left: 5px;
+	}
+	.edit-content div .input-list span.tit{
+		float: left;
+		width: 70px;
+		text-align: right;
+	}
+	.edit-content div .input-list input{
+		float: left;
+	}
+	.edit-content .title{
+		height: 40px;
+		line-height: 40px;
+	}
+	.edit-content .height24{
+		height: 24px;
+		line-height: 24px;
+	}
+	.edit-content .reduce{
+		color: #faa002 !important;
+		margin: 0 !important;
+	}
+	.edit-content .add{
+		color: #2ea001 !important;
+		margin: 0 !important;
+	}
+	.edit-content button{
+		width: 56px;
+		height: 24px;
+		border: none;
+		color: #fff;
+		float: left;
+	}
+	.edit-content button.off{
+		background: #f15601;
+		margin-bottom: 5px;
+	}
+	.edit-content button.ok{
+		background: #33b401;
+		margin-bottom: 3px;
+	}
+	.edit-content button:hover{
+		background: #5078cb;
+	}
+	.wanted_list01 .tab table tr.active{
+		height: 35px;
+	}
+    .wanted_list01 .tab table tr.hei12{
+        height: 2px;
+        background: #fff
+    }
+	.wanted_list01 .tab table tr.active td{
+		background: #c2dff7;
+	}
+	.wanted_list01 .tab table tbody tr:hover{
+		background: #c7ebfd;
+	}
+    .user_content .user_right {
+        position: relative ;
+    }
+	div.user_right input::-webkit-outer-spin-button,
+	div.user_right input::-webkit-inner-spin-button{
+		-webkit-appearance: none !important;
+		margin: 0;
+	}
+	div.user_right input[type="number"]{
+		-moz-appearance:textfield;
+	}
+	.public-tab td>div.ellipsis-div {
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+	}
+	.restrict-color {
+		color: #faa002;
+	}
+	a:focus {
+		text-decoration: none;
+	}
+	.col-xs-4 .f16{
+		font-size: 14px;
+	}
+	.pro_management .table tr td div span.switch{
+		width:39px;
+		height: 14px;
+		display: inline-block;
+	}
+	.pro_management .table tr td div span.switch button{
+		border: none;
+		position: relative;
+		top: 2px;
+		left: 5px;
+		width: 39px;
+		height: 14px;
+		background: url(static/img/icon/check-off.png) no-repeat center;
+	}
+	.pro_management .table tr td div span.switch button.active{
+		background: url("static/img/icon/check-ok.png") no-repeat center;
+	}
+	/*分页鼠标悬停效果*/
+	.device .wanted_list01 a:hover {
+		 border-bottom: 1px solid #ddd!important;
+	}
+	.device .wanted_list01 a.page-a:hover{
+		color: #fff!important;
+	}
+	/*非标产品文案提示 */
+	.public-tab.table>tbody>tr>td.hei17{
+		padding:0;
+		width: 100%;
+		height: 30px;
+		line-height: 30px;
+		text-align: center;
+		font-size: 14px;
+		color: #f15601;
+		background: #fef6f2;
+		border: 1px solid #ec854d;
+		overflow: hidden;
+	}
+	.public-tab.table>tbody>tr>td.hei17 span{
+		font-size: 14px;
+		color: #f15601;
+	}
+	.public-tab.table>tbody>tr>td.hei17 a{
+		padding-right: 10px;
+		float: right;
+		font-size: 20px;
+		font-weight: bold;
+		color: #ef1d1d;
+	}
+	.public-tab.table>tbody>tr>td.hei17 a:hover{
+		color: #a10606!important;
+	}
+	.public-tab.table>tbody>tr>td.edit{
+		text-align: left;
+		padding: 8px 0;
+		overflow: visible;
+	}
+	/*如果没有展开就添加*/
+	.public-tab.table>tbody>tr>td.edit span.first{
+		margin-left: -39px;
+	}
+	.public-tab.table>tbody>tr>td a span{
+		padding: 0 5px;
+		display: inline-block ;
+		/*width: 50px;*/
+		height: 24px!important ;
+		line-height: 24px;
+		text-align: center;
+		font-size: 12px;
+		color: #5078cb;
+	}
+	.public-tab.table>tbody>tr>td a span.add{
+		width: 60px;
+	}
+	.public-tab.table>tbody>tr>td a:hover span{
+		color: #fff;
+		background: #5078cb;
+		border-radius: 2px;
+	}
+
+	/*匹配结果页*/
+	.com_tab{
+		position: relative;
+	}
+	.com_tab ul.line{
+		border-bottom: 1px solid #82d2fa;
+	}
+	.match-menu{
+		width: 100%;
+		height: 23px;
+		line-height: 23px;
+		position: absolute;
+		top: 40px;
+		border-top: 1px solid #82d2fa;
+	}
+	.match-menu span{
+		display: inline-block;
+		text-align: center;
+		width: 102px;
+		height: 23px;
+		background: #fff;
+		border-top-left-radius: 3px;
+		border-top-right-radius: 3px;
+		margin-left: 390px;
+		line-height: 23px;
+		border: 1px solid #82d2fa;
+		border-bottom: none;
+		position: relative;
+		bottom: 23px;
+	}
+	.match-menu span a{
+		font-size: 12px;
+		color: #999;
+		display: inline-block;
+		height: 20px;
+		width: 60px;
+	}
+	.match-menu span.active{
+		background: #fff;
+		border: #82d2fa 1px solid;
+		border-bottom: #fff 1px solid;
+	}
+	.match-menu span.active a{
+		color: #333;
+	}
+	.match-menu span i{
+		font-size: 14px;
+		color: #999;
+	}
+	.match-menu span i:hover,.match-menu span a:hover{
+		color: #5078cb;
+	}
+	.search-checks{
+		padding: 16px 25px 25px 50px;
+		background: #fff;
+		overflow: hidden;
+	}
+	.search-checks .tip .count{
+		font-size: 14px;
+		color: #333;
+	}
+	.search-checks .tip .count span{
+		font-size: 14px;
+		color: #5078cb;
+	}
+	.search-checks .tip .count em{
+		font-size: 14px;
+		font-style: normal ;
+		color: #f01a1a;
+	}
+	.search-checks .tip .apply{
+		margin-top: 5px;
+		font-size: 12px;
+		color: #333;
+	}
+	.search-checks .tip .apply a{
+		font-size: 12px;
+		color: #5078cb;
+	}
+	.search-checks .tip .apply em{
+		font-size: 12px;
+		font-style: normal ;
+		color: #e80b0b;
+	}
+	.search-checks .search{
+		position: relative;
+	}
+	.search-checks .search input{
+		width: 390px;
+		height: 36px;
+		border: 1px solid #82d2fa;
+		border-radius: 0;
+	}
+	.search-checks .search button{
+		position: absolute ;
+		right:0;
+		top: 0;
+		width: 72px;
+		height: 36px;
+		font-size: 16px;
+		text-align: center;
+		color: #fff;
+		background: #82d2fa;
+		border: none;
+	}
+	.result{
+		width: 100%;
+		height: 30px;
+		line-height: 30px;
+		text-align: center;
+		background: #fef6f2;
+		border: 1px solid #ec854d;
+		overflow: hidden ;
+	}
+	.result span{
+		margin-left: 330px;
+		height: 30px;
+		font-size: 14px;
+		color: #f15601;
+	}
+	.result span em{
+		font-size: 14px;
+		color: #f15601;
+	}
+	.result a{
+		padding-right: 10px;
+		float: right;
+		font-size: 20px;
+		font-weight: bold;
+		color: #ef1d1d;
+	}
+	.tab-head{
+		width: 100%;
+		height: 40px;
+		text-align: center;
+		line-height: 40px;
+		font-size: 14px;
+		background: #83d2fb;
+		color: #fff;
+		min-height: 40px;
+	}
+
+	.public-tab.table>tbody>tr>td.choose{
+		position: relative;
+		text-align: center;
+	}
+	.choose input{
+		margin: 0 auto;
+		width: 147px;
+		height: 26px;
+		background: url(static/img/vendor/images/angle-down.png) no-repeat 125px center;
+		border: 1px solid #5078cb;
+		border-radius: 0;
+		cursor: pointer;
+	}
+	.choose select.choose-brand {
+		margin: 0 auto;
+		width: 147px;
+		height: 26px;
+		border-color: #5078cb;
+		border-radius: 0;
+        background-color: #eee;
+        opacity: 1;
+		-webkit-appearance: menulist;
+		appearance: menulist;
+		-o-appearance: menulist;
+		-moz-appearance: menulist;
+		-ms-appearance: menulist;
+	}
+	/*.choose ul{*/
+		/*position: absolute;*/
+		/*top: 34px;*/
+		/*left: 52px;*/
+		/*width: 147px;*/
+		/*background: #fff;*/
+		/*box-shadow: 2px 2px 5px rgba(0,0,0,.5);*/
+		/*-moz-box-shadow: 2px 2px 5px rgba(0,0,0,.5);*/
+		/*-o-box-shadow: 2px 2px 5px rgba(0,0,0,.5);*/
+		/*-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,.5);*/
+		/*!*display: none;*!*/
+	/*}*/
+	/*.choose ul li{*/
+		/*padding-left:12px;*/
+		/*width: 100%;*/
+		/*height: 28px;*/
+		/*line-height: 28px;*/
+		/*text-align: left;*/
+		/*font-size: 14px;*/
+		/*color: #333;*/
+		/*cursor: pointer;*/
+	/*}*/
+	/*.choose ul li:hover,.choose ul li.active{*/
+		/*color: #fff;*/
+		/*background: #5078cb;*/
+	/*}*/
+	.public-tab.table>tbody>tr>td.confirm span{
+		display: inline-block;
+		width: 55px ;
+		height: 24px;
+		line-height: 24px;
+		text-align: center;
+		font-size: 12px;
+		color: #5078cb;
+		border: 1px solid #5078cb;
+        cursor: pointer;
+	}
+	.public-tab.table>tbody>tr>td.confirm span:hover,.public-tab.table>tbody>tr>td.confirm span.active{
+		background: #5078cb;
+		color: #fff!important;
+	}
+	.record-line .set-count{
+		position: relative;
+	}
+	.record-line .set-count input{
+		padding-left: 5px;
+		display: inline-block;
+		width: 45px;
+		height: 22px;
+		line-height: 22px;
+		border: 1px solid #dcdcdc;
+		background: url(static/img/vendor/images/angle-down.png) no-repeat 30px center;
+		cursor: pointer ;
+	}
+	.record-line .set-count ul{
+		position: absolute;
+		top: 22px;
+		left: 61px;
+		background: #fff;
+		width: 45px;
+		box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		-moz-box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		-o-box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		display: none;
+	}
+	.record-line .set-count ul li{
+		padding-left:6px;
+		width: 100%;
+		height: 22px;
+		line-height: 22px;
+		text-align: left;
+		font-size: 12px;
+		color: #333;
+		cursor: pointer;
+	}
+	.record-line .set-count select{
+		width: 45px;
+		height: 22px;
+		border-radius: 3px;
+		-webkit-appearance: menulist;
+		appearance: menulist;
+		-o-appearance: menulist;
+		-moz-appearance: menulist;
+		-ms-appearance: menulist;
+	}
+	.public-tabs.table>tbody.hover-table>tr{
+		height: 40px;
+		border-bottom: none!important;
+	}
+	.public-tabs.table>tbody.hover-table>tr:nth-child(even){
+		background: #f4f4f4;
+	}
+	.public-tabs.table>tbody.hover-table>tr>td{
+		border-bottom: none!important;
+	}
+	.public-tabs.table>tbody.hover-table>tr:nth-child(even){
+		background: #f4f4f4;
+	}
+	.public-tabs.table>tbody.hover-table>tr:hover{
+		/*background: #c7ebfd*/
+	}
+	/*限制非标和标准数量显示过多换行的问题*/
+	.com_tab ul.distance li {
+		width: 100px;
+		height: 40px;
+		line-height: 12px;
+		text-align: center;
+		color: #5078cb;
+		float: left;
+		margin-left: 25px;
+	}
+	.com_tab ul.distance li:first-child {
+		margin-right: 20px;
+	}
+	.com_tab ul.distance li a.standard{
+		padding-top: 15px;
+		width: 112px;
+		color: #666;
+	}
+	.com_tab ul.distance li a.standard em{
+		display: inline-block;
+		max-width: 45px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		color: #666;
+	}
+	.com_tab ul.distance li:hover a.standard em.count,.com_tab ul.distance li.active a.standard em.count{
+		color: #5078cb;
+	}
+	.com_tab ul.distance li.active a.standard,.com_tab ul.distance li:hover a.standard{
+		padding-top: 15px;
+		width: 112px;
+		color: #5078cb;
+	}
+	.wanted_list01 .tab table tr.gre-bg{
+		width: 100%;
+		height: 35px;
+		line-height: 35px;
+		background: #c8e6fe;
+		border: 1px solid #84c5fb;
+	}
+	.wanted_list01 .tab table tr.gre-bg td{
+		border-top: 1px solid #84c5fb;
+	}
+	.wanted_list01 .tab table tr.gre-bg:hover{
+		background: #c8e6fe;
+	}
+	.show-content{
+		width: 100%;
+		/*height: 520px;*/
+		border: 1px solid #84c5fb;
+		border-top: none;
+		overflow: hidden;
+	}
+	.show-content .content-top{
+		width: 100%;
+		height: 35px;
+		line-height: 35px;
+		background: #c8e6fe;
+	}
+	.show-content .content-top table tr:hover{
+		background: none;
+	}
+	.show-content .content-top table tr th{
+		font-size: 14px;
+		color: #333;
+		font-weight: normal;
+	}
+	.show-content .content-body{
+		max-height: 523px;
+		overflow-y: auto ;
+	}
+	.show-content .content-body .public-tab tr.defines{
+		overflow: hidden;
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+		background: #f0f7fd;
+	}
+	.show-content .content-body .public-tab tr.defines td{
+		border-bottom: none;
+	}
+	.show-content .content-body .public-tab tr.defines .code{
+		padding-left: 20px;
+		float: left;
+		font-size:14px;
+		color: #333;
+	}
+	.show-content .content-body .public-tab tr.defines .code span{
+		font-size:14px;
+		color: #333;
+	}
+	.show-content .content-body .public-tab tr.defines .labelling{
+		float: left;
+		margin-left: 40px;
+		font-size: 14px;
+		color: #333;
+	}
+	.show-content .content-body .public-tab tr.defines .labelling span{
+		padding: 0 10px;
+		/*width: 124px;*/
+		height: 19px;
+		font-size: 12px;
+		color: #5078cb;
+		border-radius: 9px;
+        background: #fff;
+		border: 1px solid #5078cb ;
+	}
+	.show-content .content-body .public-tab tr.defines .labelling em{
+		color: #f00;
+	}
+	.show-content .content-body .public-tab tr.edit-contents td{
+		border-bottom: none;
+		padding-bottom: 10px !important;
+	}
+	.edit-contents td{
+		background: #f0f7fd;
+	}
+	.edit-contents td .bg{
+		background: #fff;
+		width: 100%;
+		height: 100px;
+	}
+	.edit-contents .content{
+		text-align: left;
+	}
+	.edit-contents div.contents p{
+		margin-top: 33px;
+	}
+	.edit-contents .bg .img{
+		padding-left: 15px;
+	}
+	.edit-contents .bg .img img{
+		margin-top: 20px;
+		border-radius: 3px;
+	}
+	.edit-contents .content .title{
+		/*margin-right: 40px;*/
+		height: 33px;
+		line-height: 33px;
+	}
+	.edit-contents .content .title span:first-child {
+		float: left;
+		width: 70px;
+		text-align: right;
+	}
+	.edit-contents .content .title span:last-child {
+		float: left;
+		width: 65px;
+	}
+	.edit-contents .content p.noBreak{
+		color: #f15601;
+	}
+	.edit-contents .content .list{
+		width: 170px;
+		height: 20px;
+		line-height: 20px;
+	}
+	.edit-contents .content .list:nth-child(even){
+		background: #eeeeee;
+	}
+	.edit-contents .content .list:nth-child(odd){
+		background: #f5f5f5;
+	}
+	.edit-contents .content .list span{
+		display: inline-block;
+		width: 50%;
+		text-align: center;
+	}
+	.edit-contents .content .title-price{
+		width: 170px;
+		height: 20px;
+		line-height: 20px;
+		background: #fff;
+	}
+	.edit-contents .content .title-price span{
+		float: left;
+		display: inline-block;
+		width: 50%;
+		text-align: center;
+	}
+	.edit-contents .content button{
+		color: #5078cb;
+		background: none;
+	}
+	.edit-contents .content button:hover{
+		background: #5078cb;
+		color: #fff;
+	}
+	.show-content .content-body .public-tab tr td.hei2{
+		padding: 0;
+		height: 5px;
+		width: 100%;
+		background: #fff;
+		border-bottom: none;
+	}
+	/*键匹配弹出框*/
+	.matchPop{
+		position: fixed;
+		z-index: 2;
+		opacity: 1;
+		background-color: white;
+		margin: -268px 0 0 -340px;
+		top: 50%;
+		left: 50%;
+		width: 680px;
+		height: 536px;
+		box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		-o-box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		-moz-box-shadow: 2px 2px 5px rgba(0,0,0,.5);
+		border-radius: 5px;
+	}
+	.matchPop .title{
+		padding-left: 55px;
+		width: 100%;
+		height:  77px;
+		overflow: hidden;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.matchPop .title .title-product{
+		padding-top: 20px;
+		float: left;
+		overflow: hidden;
+		width: 570px;
+	}
+	.matchPop .title .title-product i.fa-exclamation-circle{
+		float: left;
+		margin-top: 2px;
+		font-size: 20px;
+		color: #5078cb;
+	}
+	.matchPop .title .title-product span{
+		display: inline-block;
+		margin-left: 15px;
+		width: 530px;
+		font-size: 14px;
+		color: #333;
+		line-height: 21px;
+	}
+	.matchPop .title .close{
+		padding: 10px;
+		float: right;
+		font-size: 30px;
+		color: #9c9c9c;
+	}
+	.matchPop .content {
+		padding: 0 10px;
+		width: 100%;
+	}
+	.matchPop .content .content-box{
+		padding: 8px;
+		width: 100%;
+		max-height: 378px;
+		overflow-y: auto;
+		background: #f8f7f7;
+	}
+	.matchPop .content .content-box .content-choose{
+		margin-bottom: 5px;
+		padding-top: 8px;
+		background: #fff;
+		border: 1px dashed #5078cb;
+	}
+	.matchPop .content .content-box .content-choose .list{
+		overflow: hidden;
+		margin-bottom: 5px;
+	}
+	.matchPop .content .content-box .content-choose .fl{
+		width: 46px;
+		height: 120px;
+		line-height: 120px;
+		background: #fff;
+		text-align: center;
+	}
+	.product-detail{
+		padding: 10px 12px;
+		float:  left;
+		width: 580px;
+		height: 120px;
+		background: #f4fafd;
+		border-radius: 5px;
+		/*overflow: hidden;*/
+	}
+	.product-detail .detail{
+		float: left;
+		margin-right: 30px;
+	}
+	.product-detail .width100{
+		width: 100px;
+	}
+    .product-detail .distance {
+        margin-right: 20px !important ;
+    }
+	.product-detail .detail:last-child {
+		margin-top: -3px;
+		margin-right: 0;
+	}
+	.product-detail .detail .detail-title{
+		margin-bottom: 15px;
+		font-size: 12px;
+		color: #333;
+	}
+	.product-detail .detail .detail-title span{
+		font-size: 12px;
+		color: #333;
+	}
+	.product-detail .detail .title-price{
+		width: 170px;
+		height: 20px;
+		line-height: 20px;
+	}
+	.product-detail .detail .title-price span{
+		display: inline-block;
+		width: 50%;
+		text-align: center;
+	}
+	.product-detail .detail .detail-price{
+		width: 170px;
+		height: 20px;
+		line-height: 20px;
+	}
+	.product-detail .detail .detail-price:nth-child(even){
+		background: #eeeeee;
+	}
+	.product-detail .detail .detail-price:nth-child(odd){
+		background: #f5f5f5;
+	}
+	.product-detail .detail .detail-price span{
+		float: left;
+		display: inline-block;
+		width: 50%;
+		text-align: center;
+	}
+	.product-number{
+		/*overflow: hidden;*/
+		margin-bottom: 13px;
+	}
+	.product-number .code:first-child {
+		margin-right:90px;
+		float: left;
+	}
+	.product-number div.code{
+		font-size: 14px;
+		color: #323232;
+	}
+	.product-number div.code span{
+		font-size: 14px;
+		color: #323232;
+	}
+	.product-number div.code em{
+		font-size: 14px;
+		color: #f00;
+		font-style: normal;
+	}
+	.product-number div.code span.define{
+		padding: 0 10px;
+		height: 19px;
+		font-size: 12px;
+		color: #5078cb;
+		border-radius: 9px;
+		border: 1px solid #5078cb;
+	}
+	.matchPop .footer{
+		margin: 0 auto;
+		width: 100%;
+		height: 79px;
+		line-height: 79px;
+		text-align: center;
+	}
+	.matchPop .footer a{
+		display: inline-block;
+		width: 65px;
+		height: 25px;
+		line-height: 25px;
+		font-size: 14px;
+		color: #fff;
+		text-align: center;
+		cursor: pointer;
+	}
+	.matchPop .footer a:first-child {
+		margin-right: 10px;
+		background: #5078cb;
+	}
+	.matchPop .footer a:last-child {
+		background: #bcbcbd;
+	}
+	.matchPop .footer a:hover{
+		background: #337ab7!important ;
+	}
+	.clearfix{
+		overflow: hidden;
+	}
+	#define-content {
+		width: 100%;
+		height: 30px;
+		line-height: 30px;
+		background: #ebf5fe;
+	}
+	#define-content td{
+		border-bottom: none;
+	}
+	#define-content .code{
+		padding-left: 20px;
+		float: left;
+		font-size:14px;
+		color: #333;
+	}
+	#define-content .code span{
+		font-size:14px;
+		color: #333;
+	}
+	#define-content .labelling{
+		float: left;
+		margin-left: 40px;
+		font-size: 14px;
+		color: #333;
+	}
+	#define-content .labelling span{
+		padding: 0 10px;
+		height: 19px;
+		font-size: 12px;
+		color: #5078cb;
+		border-radius: 9px;
+		border: 1px solid #5078cb ;
+	}
+	#define-content .labelling em{
+		color: #f00;
+	}
+	#define-content .labelling input{
+		padding-left: 10px;
+		width: 157px;
+		height: 24px;
+		border: 1px solid #c9c9c9;
+		background: #fff;
+		border-radius: 4px;
+	}
+	.wanted_list01 .tab table tr.edits td{
+		padding-bottom: 10px !important;
+		background: #fff;
+		border-bottom: none;
+	}
+	.wanted_list01 .tab table tr td .blue-bg{
+		overflow: hidden;
+		background: #fff!important;
+	}
+	/*图片可编辑*/
+	.wanted_list01 .tab table tr td .blue-bg .img{
+		position: relative;
+		margin: 29px 0 0 24px;
+		width: 60px;
+		height: 60px;
+	}
+	.wanted_list01 .tab table tr td .blue-bg .img img{
+		width: 60px;
+		height: 60px;
+	}
+	.wanted_list01 .tab table tr td .blue-bg .img .edit-img{
+		position: absolute;
+		left: 0;
+		top: 0;
+		margin-top: 0;
+		width: 60px;
+		height: 60px;
+		font-size: 12px;
+		background: rgba(0,0,0,.5);
+		border-radius: 3px;
+
+	}
+	.wanted_list01 .tab table tr td .blue-bg .img .edit-img a {
+		width: 100%;
+		height: 100%;
+		display: inline-block;
+		text-align: center;
+		line-height: 55px;
+		color: #fff !important;
+	}
+	.wanted_list01 .tab table tr td .blue-bg .img a.delete-img {
+		position: absolute;
+		top: 2px;
+		right: 0;
+		z-index: 20;
+		width: 20px;
+		height: 20px;
+		line-height: 16px;
+		border: none;
+	}
+	.wanted_list01 .tab table tr td .blue-bg .img .edit-img a img {
+		width: 38px;
+		height: 38px;
+	}
+	/*自定义标签*/
+	.wanted-list02{
+		padding-top: 19px;
+		margin-top: 10px;
+		width: 100%;
+		background: #fff;
+	}
+	.wanted-list02 .title{
+		overflow: hidden;
+		height: 40px;
+		line-height: 40px;
+	}
+	.wanted-list02 .title div.fl{
+        position: absolute;
+        left: -5px;
+	}
+	.wanted-list02 .title .fl img{
+		width: 105px;
+		height: 40px;
+	}
+	.wanted-list02 .title .fl span{
+		position: absolute;
+		top: 0px;
+		left: 13px;
+		font-size: 14px;
+		color: #fff;
+	}
+	.wanted-list02 .title .fr span{
+		padding-right: 73px;
+		font-size: 14px;
+		color: #5078cb;
+		cursor: pointer ;
+	}
+	.wanted-list02 .content{
+		position: relative;
+		padding-left: 15px;
+		min-height: 160px;
+	}
+	.wanted-list02 .content .hover-show {
+		position: absolute;
+		top: 21px;
+		width: 95%;
+		height: 90px;
+		background: rgba(255,255,255,.9);
+		box-shadow: 0 -15px 4px rgba(255, 255, 255, 0.8);
+		-o-box-shadow: 0 -15px 4px rgba(255, 255, 255, 0.8);
+		-moz-box-shadow: 0 -15px 4px rgba(255, 255, 255, 0.8);
+		-webkit-box-shadow: 0 -15px 4px rgba(255, 255, 255, 0.8);
+	}
+	.wanted-list02 .content h3{
+		margin: 17px 0;
+		font-size: 16px;
+		color: #333;
+	}
+	.wanted-list02 .content h3 span{
+		font-size: 16px;
+		font-weight: bold;
+		color: #fa2929;
+	}
+	.wanted-list02 .content h3 em{
+		font-size: 16px;
+		font-weight: bold;
+		color: #333;
+	}
+	.wanted-list02 .content p{
+		font-size: 14px;
+		color: #333;
+		line-height: 24px;
+	}
+	.wanted-list02 .content p span{
+		font-size:14px;
+		color: #fa2929;
+	}
+	.wanted-list02 .content .img{
+		margin: 34px auto 0;
+		padding-bottom: 40px;
+		width: 100%;
+		text-align: center ;
+		overflow: hidden;
+	}
+	.wanted-list02 .content .img div{
+		float: left;
+	}
+	.wanted-list02 .content .img div:first-child {
+		margin-right: 185px;
+		margin-left: 155px;
+	}
+	.wanted-list02 .content .img img{
+		width: 184px;
+		height: 218px;
+		margin-bottom: 19px;
+	}
+	.wanted-list02 .content .img p{
+		font-size: 14px;
+		color: #333;
+	}
+	.wanted-list02 .content .img p span{
+		font-size: 14px;
+		color: #f30a0b;
+	}
+	.public-tab.table>tbody>tr>td p em.up{
+		display: inline-block;
+		font-size: 12px;
+		margin-left: 3px;
+		margin-top: 4px;
+	}
+	/*批量导出按钮*/
+	.search-check .search a.down-goods-btn{
+		margin-top: 0!important;
+	}
+	.clearfix {
+		clear: both;
+	}
+	.public-tab.table>tbody.bg-show>tr>td.hei18{
+		height: 14px;
+		background: #f4f4f4;
+		border-bottom: none;
+	}
+
+	.edit-content .error {
+		border: 1px solid #f00!important;
+	}
+	/*一键匹配结果页头图背景色*/
+	.wanted_list01 table.fail-tab thead tr{
+		background: #dff3fd;
+	}
+	/*增加价格超过三个按钮变灰*/
+	.public-tab.table>tbody>tr>td div.plusBtn a.add[disabled] i, .public-tab.table>tbody>tr>td div.plusBtn a.reduce[disabled] i{
+		color: #c7c7c7 !important;
+	}
+	/*删除弹出框*/
+	.modal{
+		bottom: unset!important ;
+	}
+	.modal-content{
+		-webkit-box-shadow: none;
+		box-shadow: none;
+	}
+	.com-del-box{
+		box-shadow: none;
+	}
+	.com-del-box .title i.fa-close{
+		font-size: 16px;
+	}
+	/*输入错误提示*/
+	.user_right input.error{
+		border: 1px solid red!important;
+	}
+	input.ng-invalid.ng-dirty,textarea.ng-invalid.ng-dirty {
+		background-color: #fff!important ;
+		border-color: #CCC!important ;
+	}
+	.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
+		padding: 0;
+	}
+	/*隐藏自定义标签说明*/
+	#wanted-list02{
+		display: none;
+	}
+    .modal-backdrop {
+        background-color: transparent ;
+        bottom: unset!important;
+    }
+    .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">
+	<!--货品管理-->
+	<div class="pro_management device">
+		<div class="com_tab">
+			<ul class="fl" style="width: 100%">
+				<li ng-class="{'active': tab == 'material_person'}"><a ui-sref="vendor_material_person">个人产品库</a></li>
+				<li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">企业产品库</a></li>
+				<li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
+				<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
+			</ul>
+		</div>
+		<div class="com_tab">
+			<ul class="fl distance" style="width: 100%">
+				<li ng-class="{active : standard_tab == 'unstandard'}"  ng-click="toggleStandard('unstandard')" title="非标产品({{nCount}})"><a href="" class="standard">非标产品(<em class="count">{{nCount}}</em>)</a></li>
+				<li ng-class="{active : standard_tab =='standard'}" ng-click="toggleStandard('standard')" title="标准产品({{sCount}})"><a href="" class="standard">标准产品(<em class="count">{{sCount}}</em>)</a></li>
+			</ul>
+			<!--匹配结果导航-->
+			<div class="match-menu" ng-if="resultFrame">
+                <span>
+                    <a ng-click="toggleTab('matchResult')">匹配结果</a>
+                    <i class="fa fa-remove" ng-click="closeResultFrame('unstandard')"></i>
+                </span>
+			</div>
+		</div>
+		<!--非标和标准产品列表页-->
+		<div ng-if="standard_tab == 'unstandard' || standard_tab =='standard'">
+			<div class="search-check">
+				<div class="search fl">
+					<input type="text" class="form-control" ng-model="param.keyword" ng-search="onSearch()" placeholder="类目/型号/品牌"/>
+					<button ng-click="onSearch()">搜索</button>
+					<a ng-click="download()">批量导出</a>
+				</div>
+				<div class="check fr">
+					<a ng-show="!isBatch && standard_tab == 'unstandard'" ng-click="matchAll()"><span ng-show="!isBatch && standard_tab == 'unstandard'">一键匹配</span></a>
+					<a ng-show="!isBatch" ng-click="enterBatch()"><span ng-show="!isBatch">批量操作</span></a>
+					<span class="check-btn" ng-show="isBatch">
+						<label class="check-active">
+							<input type="checkbox"  ng-click="chooseAll()" ng-checked="isChoosedAll" id="AllChoose"/>
+							<label for="AllChoose"></label>
+							<span>全选</span>
+						</label>
+						<a
+								ng-click="deleteBatch()" name="delete-material">删除</a>
+						<a ng-click="exitBatch()">取消</a>
+					</span>
+				</div>
+			</div>
+			<div class="wanted_list01">
+			<!--在售产品-->
+			<div class="tab">
+				<table class="public-tab table">
+					<thead>
+					<tr>
+						<th width="80">序号</th>
+						<th width="180">产品名称(类目)</th>
+						<th width="200">产品型号</th>
+						<th width="150">品牌</th>
+						<th width="100">单位</th>
+						<th width="80">封装</th>
+						<th width="180">操作</th>
+					</tr>
+					</thead>
+					<tbody class="bg-show">
+					<!--<tr style="height: 14px;" ng-show="!isBatch && standard_tab == 'standard'">-->
+					<tr style="height: 14px;">
+						<td colspan="7" class="hei18"></td>
+					</tr>
+					</tbody>
+					<tbody>
+					<tr style="height: 14px;" ng-show="currenctMaterial.length > 0 && standard_tab == 'unstandard' && showTip">
+						<td colspan="7" class="hei17">
+							<span>*匹配成为标准产品方可通过器件选型、参数搜索展示</span><a ng-click="cancelTip()">&times;</a>
+						</td>
+					</tr>
+					</tbody>
+					<tbody ng-repeat="material in currenctMaterial">
+					<!--<tr ng-class="{ 'active': material.selected }" class="gre-bg">-->
+					<tr ng-class="{ 'active': material.selected, 'gre-bg' : material.exPandOper}">
+						<td class="check-input">
+							<span ng-show="isBatch"><input type="checkbox" ng-checked="material.isChoosed"  ng-click="chooseOne(material)"  id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>
+							<span
+									ng-show="!isBatch" ng-bind="(param.page - 1) * 10 + $index + 1"></span>
+						</td>
+						<td>
+							<span ng-if="material.kind" ng-bind="material.kind" title="{{material.kind}}"></span>
+							<span ng-if="!material.kind" ng-bind="material.kinden || '-'" title="{{material.kinden || '-'}}"></span>
+						</td>
+						<td>
+                            <a class="brand-type" ng-if="material.cmpUuId" ng-href="product/component/{{material.cmpUuId}}/" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}" target="_blank"></a>
+                            <span class="brand-type" ng-if="!material.cmpUuId" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}"></span>
+						</td>
+						<td>
+							<div class="ellipsis-div" ng-if="material.pbranden" ng-bind="material.pbranden" title="{{material.pbranden}}"></div>
+							<div class="ellipsis-div" ng-if="!material.pbranden" ng-bind="material.pbrand" title="{{material.pbrand}}"></div>
+						</td>
+						<td ng-bind="material.unit || 'PCS'" title="{{material.unit  || 'PCS'}}"></td>
+						<td>
+							<span ng-bind="material.encapsulation || '-'" title="{{material.encapsulation || '-'}}"></span>
+						</td>
+						<td class="edit">
+							<span name="delete-material" ng-show="!isBatch && !material.exPandOper && !material.addGoodsOper" ng-click="deleteMaterial(material)"><span>删除</span></span>
+							<span ng-show="!isBatch && !material.exPandOper && !material.addGoodsOper" ng-click="showShelfArea(material)"><span>添加产品</span></span>
+							<span ng-if="material.batchCount" ng-show="!isBatch && !material.exPandOper && !material.addGoodsOper" ng-click="expandGoods(material)"><span>展开<i class="fa fa-angle-down" style="margin-left:2px;"></i></span></span>
+							<!--收起-->
+							<span ng-show="!isBatch && material.exPandOper" ng-click="disExpandGoods(material)" class="packUp"><span>收起<i class="fa fa-angle-up" style="margin-left:2px;"></i></span></span>
+							<!--<a ng-show="!isBatch" ng-click="showShelfArea(material)"><span ng-if="!isBatch">编辑</span></a>-->
+							<!--<span ng-show="!isBatch && (material.sold == 0 && material.canSell == 1)" ng-click="publishGoods(material)"><span ng-if="!isBatch">上架</span></span>-->
+						</td>
+					</tr>
+					<!--展开内容-->
+					<tr ng-if="material.addGoodsOper  || (material.exPandOper && material.goodsArr.length > 0)">
+						<td colspan="7" style="padding: 0;">
+							<div class="show-content">
+								<div class="content-body">
+									<table class="public-tab table">
+                                        <tbody ng-if="material.addGoodsOper && material.selected">
+                                        <!--添加产品-->
+                                        <tr id="define-content">
+                                            <td colspan="10">
+                                                <div class="code">产品编码 : <span ng-bind="goods.prodNum">247823589235</span></div>
+                                                <div class="labelling">
+													<!--<em>*</em>-->
+													自定义标签 : <input maxlength="20" type="text" ng-model="goods.editTag" ng-blur="blurTag(goods)" ng-change="changeTag(goods)" placeholder="请设置产品标签"></div>
+                                            </td>
+                                        </tr>
+                                        <tr class="edit-content edits" >
+                                            <td colspan="10" style="background:#f0f7fd;">
+                                                <div class="blue-bg">
+													<div></div>
+                                                    <div class="img">
+                                                        <a><img ng-src="{{goods.editPic || 'static/img/store/common/default.png'}}" alt="img"/></a>
+                                                        <div class="edit-img">
+                                                            <a ng-click="deleteImg(goods)" class="delete-img" title="删除" ng-if="goods.editPic"><i class="fa fa-trash"></i></a>
+                                                            <a ng-click="editGoodsPicture(goods.editPic || 'static/img/store/common/default.png', goods)" title="修改图片"><img ng-src="static/img/icon/update-img.png" /></a>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content margin10">
+                                                        <!--<p class="title">包装/生产日期</p>-->
+                                                        <div class="input-list">
+                                                            <span class="tit">包装:</span><input type="text" class="form-control" name="packaging" ng-maxlength="10" title="包装" maxlength="10" placeholder="包装方式" style="width: 96px;" ng-model="goods.editPackaging"
+                                                                                               ng-class="{'error' : goods.editPackagingInvalid}" ng-blur="editPackaging(goods, true)" ng-change="changePackaging(goods)"/>
+                                                        </div>
+                                                        <div class="input-list">
+                                                            <span class="tit">生产日期:</span><input type="text" class="form-control" name="produceDate" ng-maxlength="11" title="生产日期" maxlength="11" placeholder="生产日期" style="width: 96px;" ng-model="goods.editProduceDate"
+                                                                                                 ng-class="{'error' : goods.editProduceDateInvalid}"
+                                                                                                 ng-change="editProduceDateFa(goods, false)"/>
+                                                        </div>
+                                                        <div class="clearfix">
+                                                            <span>可拆卖:</span>
+                                                            <span class="switch"><button ng-class="{'active' : goods.editBreakUp}"
+                                                                                           ng-click="toggleIsBreadUp(goods, false)"></button></span>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content margin10">
+                                                        <!--<p class="title">库存</p>-->
+                                                        <div class="input-list">
+                                                            <span class="tit">库存:</span><input type="number" class="wid70 form-control" name="reserve" title="库存" placeholder="数量"
+                                                                                               ng-model="goods.editReserve" maxlength="9" ng-blur="setPriceMaxAmount(goods, false)" ng-class="{'error' : goods.editReserveInvalid}" oninput="if(value.length>9)value=value.slice(0,9)"/>
+                                                        </div>
+                                                        <div class="input-list">
+                                                            <span class="tit">起订量:</span><input type="number" class="wid70 form-control" name="minBuyQty" title="起拍"  placeholder="数量"
+                                                                                                maxlength="6" oninput="if(value.length>6)value=value.slice(0,6)" ng-model="goods.editMinBuyQty" ng-blur="setPriceMinAmount(goods, false)" ng-change="updateStartNumber(goods)" ng-class="{'error' : goods.editMinBuyQtyInValid}"/>
+                                                        </div>
+                                                        <div class="input-list">
+										                    <span class="tit">包装数量:</span><input type="number" maxlength="6" oninput="if(value.length>6)value=value.slice(0,6)" class="wid70 form-control" name="minPackQty" title="包装数量" placeholder="数量" ng-model="goods.editMinPackQty" ng-blur="setPriceMinPackAmount(goods)" ng-class="{'error' : goods.editMinPackQtyInValid}" style="width: 70px;"/>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content">
+                                                        <p class="title height24">梯度/pcs</p>
+                                                        <div class="input-list" ng-repeat="price in goods.editPrices">
+                                                            <p>
+                                                                <span style="overflow: hidden;"><input ng-disabled="$index == 0" type="number" class="wid42 form-control fl" ng-class="{'error' : price.startInValid}"
+                                                                                   placeholder="数量" ng-model="price.start" ng-blur="editQty(goods, $index, false, price.start)" oninput="if(value.length>9)value=value.slice(0,9)"/></span><em
+																	class="up fl" ng-if="$last">以上</em>
+                                                                <span style="margin-left: 4px;" ng-if="!$last">–</span>
+                                                                <span ng-if="!$last"><input type="number" class="wid42 form-control" ng-class="{'error' : price.endInValid}"  placeholder="数量" ng-model="price.end" ng-blur="editQty(goods, $index, true, price.end)"
+                                                                                                                       oninput="if(value.length>9)value=value.slice(0,9)"/></span>
+                                                            </p>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content" ng-if="!store.enType || store.enType === 'HK'">
+                                                        <p class="title height24">单价($)</p>
+                                                        <div
+                                                                class="input-list" ng-repeat="price in goods.editPrices">
+                                                                <input type="number" name="usd" class="wid92 form-control"  placeholder="单价($)" ng-blur="changePrices(goods.editPrices, price.uSDPrice, $index)" ng-class="{'error' : price.priceInvalid}" ng-model="price.uSDPrice" oninput="if(value.length>11)value=value.slice(0,11)" autocomplete="off" validata-price/>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content" ng-if="!store.enType || store.enType === 'MAINLAND'">
+                                                        <p class="title height24">单价(¥)</p>
+                                                        <div
+                                                                class="input-list" ng-repeat="price in goods.editPrices">
+                                                                <input type="number" name="rmb" class="wid92 form-control"  placeholder="单价(¥)" ng-blur="changePrices(goods.editPrices, price.rMBPrice, $index)" ng-class="{'error' : price.priceInvalid}" ng-model="price.rMBPrice" oninput="if(value.length>11)value=value.slice(0,11)" autocomplete="off" validata-price/>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content plusBtn">
+                                                        <p class="title height24">&nbsp;</p>
+                                                        <div class="input-list" ng-repeat="price in goods.editPrices" style="height: 24px;line-height: 24px;margin-bottom: 5px;">
+                                                            <a class="reduce" ng-disabled="goods.editPrices.length < 2" ng-click="deleteFragment(goods, $index)"><i class="fa fa-minus-circle" ng-class="{ 'restrict-color': goods.editPrices.length === 1 }"></i></a>
+                                                            <a class="add" ng-click="addFragment(goods)"  ng-disabled="goods.editPrices.length >= 3"><i class="fa fa-plus-circle"
+                                                                                                          ng-class="{ 'restrict-color': $index === 2 }"></i></a>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content floatLeft">
+                                                        <p class="title height29">交期(天):</p>
+                                                        <div class="input-list">
+                                                            <p>
+											<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)"
+                                                         ng-model="goods.editMinDelivery"
+                                                         ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, true, goods)"
+                                                         ng-class="{'error' : goods.editMinDeliveryinValid}"/></span>
+                                                                <span style="margin-left: 4px;">–</span>
+                                                                <span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)" ng-model="goods.editMaxDelivery" ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, false, goods)"
+                                                                             ng-class="{'error' : goods.editMaxDeliveryinValid}"/></span>
+                                                            </p>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content margin10">
+                                                        <!--<p class="title">自营 / 寄售</p>-->
+                                                        <div class="input-list">
+                                                            <select ng-disabled="$$nonProduct.canSelfSale" name="selfSale" class="wid56 select-adder form-control" ng-model="goods.editSelfSale" ng-disabled="$$nonProduct.canSelfSale">
+                                                                <option value="1">自营</option>
+                                                                <option value="2">寄售</option>
+                                                            </select>
+                                                        </div>
+                                                    </div>
+                                                    <div class="content" style="width: 56px; float: right; margin-right: 10px;">
+                                                        <p class="title">&nbsp;</p>
+                                                        <div class="input-list">
+                                                            <button class="ok" ng-mouseenter="impedeBlur()" ng-mouseleave="recoveryBlur()"
+																	ng-click="addGoods(material)">保存</button>
+                                                            <button class="off" ng-click="closeShelArea(material)">取消</button>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </td>
+                                        </tr>
+										<tr class="hei12">
+											<td colspan="10" class="hei2"></td>
+										</tr>
+                                        </tbody>
+										<tbody ng-repeat="goods in material.goodsArr">
+										<tr class="define defines" ng-if="!goods.edit">
+											<td colspan="10">
+												<div class="code">产品编码 : <span ng-bind="goods.prodNum || '-'">247823589235</span></div>
+												<div class="labelling">
+													<!--<em>*</em>-->
+													自定义标签 : <span ng-bind="goods.tag">散装出售</span></div>
+											</td>
+										</tr>
+										<tr class="edit-content edit-contents" ng-if="!goods.edit">
+											<td colspan="10">
+												<div class="bg">
+													<div></div>
+													<div class="img">
+														<img ng-src="{{goods.img || 'static/img/store/common/default.png'}}" alt="img"/>
+													</div>
+													<div class="content width140">
+														<p class="title"><span>包装:</span><span ng-bind="goods.packaging">盘装</span></p>
+														<p class="title"><span>生产日期:</span><span ng-bind="goods.produceDate">20160123</span></p>
+														<p class="title" ng-class="{'noBreak' : !goods.breakUp}" ng-bind="goods.breakUp ? '可拆卖' : '不可拆卖'">不可拆卖</p>
+													</div>
+													<div class="content width130">
+														<p class="title"><span>库存:</span><span ng-bind="goods.reserve">9023492</span></p>
+														<p class="title"><span>起订量:</span><span ng-bind="goods.minBuyQty">90492</span></p>
+														<p class="title"><span>包装数量:</span><span ng-bind="goods.minPackQty">980</span></p>
+													</div>
+													<div class="content width150">
+														<div class="title-price">
+															<span>梯度/pcs</span>
+															<span ng-if="goods.currencyName.indexOf('USD') > -1">单价($)</span>
+															<span ng-if="goods.currencyName.indexOf('RMB') > -1">单价(¥)</span>
+														</div>
+														<div class="list" ng-repeat="price in goods.prices">
+															<span ng-bind="price.start + '+'">1+</span><span
+																ng-bind="goods.currencyName.indexOf('RMB') > -1 ? (price.rMBPrice  | formateNumber : 6): (price.uSDPrice | formateNumber : 6)">0.356</span>
+														</div>
+													</div>
+													<div class="content" style="width: 150px;">
+														<p class="title"><span>交期(天):</span><span  ng-bind="goods.b2cMinDelivery == goods.b2cMaxDelivery ? goods.b2cMinDelivery : goods.b2cMinDelivery  + '-' + goods.b2cMaxDelivery">5-8</span></p>
+														<p class="title"><span ng-bind="(storeInfo.uuid != 'undefind' && goods.storeid == storeInfo.uuid && storeInfo.storeName.indexOf('优软测试二') < 0 && storeInfo.storeName.indexOf('优软商城') < 0) ? '自营': '寄售'" class="text-center"></span></p>
+													</div>
+													<div class="content contents width80">
+														<p class="title" ng-if="goods.status == '612' || goods.status == '613'">未上架</p>
+														<p class="title upload" style="color: #33b401;" ng-if="goods.status == '601' || goods.status == '602'">已上架</p>
+													</div>
+													<div class="content" style="width: 56px; float: right; margin-right: 2px;margin-top: 12px;">
+														<div class="input-list">
+															<button class="off" ng-click="editGoods(material, goods)">编辑</button>
+															<button ng-if="goods.status != 601 && goods.status != 602" class="ok" ng-click="putOn(material, goods)">上架</button>
+															<button class="ok" ng-click="isRecommendGoods(goods)" name =
+																	"delete-goods">删除
+															</button>
+														</div>
+													</div>
+												</div>
+											</td>
+										</tr>
+										<tr class="hei12">
+											<td colspan="10" class="hei2"></td>
+										</tr>
+										<!--编辑内容-->
+										<tr id="define-content" ng-if="goods.edit">
+											<td colspan="10">
+												<div class="code">产品编码 : <span ng-bind="goods.prodNum">247823589235</span></div>
+												<div class="labelling">
+													<!--<em>*</em>-->
+													自定义标签 : <input maxlength="20" type="text" ng-model="goods.editTag" ng-blur="blurTag(goods)" ng-change="changeTag(goods)" placeholder="请设置产品标签"></div>
+											</td>
+										</tr>
+										<tr class="edit-content edits" ng-if="goods.edit">
+											<td colspan="10" style="background:#f0f7fd;">
+                                                <div class="blue-bg">
+													<div></div>
+													<div class="img">
+														<a><img ng-src="{{goods.editPic || 'static/img/store/common/default.png'}}" alt="img"/></a>
+														<div class="edit-img">
+															<a ng-if="goods.editPic" ng-click="deleteImg(goods)" class="delete-img" title="删除"><i class="fa fa-trash"></i></a>
+															<a
+																	ng-click="editGoodsPicture(goods.editPic || 'static/img/store/common/default.png', goods)" title="修改图片"><img ng-src="static/img/icon/update-img.png" /></a>
+														</div>
+													</div>
+													<div class="content margin10">
+														<!--<p class="title">包装/生产日期</p>-->
+														<div class="input-list">
+															<span class="tit">包装:</span><input type="text" class="form-control" name="packaging" ng-maxlength="10" title="包装" maxlength="10" placeholder="包装方式" style="width: 96px;" ng-model="goods.editPackaging"
+																							   ng-class="{'error' : goods.editPackagingInvalid}"
+																							   ng-blur="editPackaging(goods, true)" ng-change="changePackaging(goods)"/>
+														</div>
+														<div class="input-list">
+															<span class="tit">生产日期:</span><input type="text" class="form-control" name="produceDate" ng-maxlength="11" title="生产日期" maxlength="11" placeholder="生产日期" style="width: 96px;" ng-model="goods.editProduceDate"
+																								 ng-class="{'error' : goods.editProduceDateInvalid}"
+																								 ng-change="editProduceDateFa(goods, true)"/>
+															<!--<select name="breakUp" title="breakUp" class="select-adder form-control" style="width: 108px;" ng-model="goods.breakUp">-->
+															<!--<option value="1">可拆卖</option>-->
+															<!--<option value="0">不可拆卖</option>-->
+															<!--</select>-->
+														</div>
+														<div class="clearfix">
+															<span>可拆卖:</span>
+															<span class="switch"><button ng-class="{'active' : goods.editBreakUp}"
+																						 ng-click="toggleIsBreadUp(goods, true)"></button></span>
+														</div>
+													</div>
+													<div class="content margin10">
+														<!--<p class="title">库存</p>-->
+														<div class="input-list">
+															<span class="tit">库存:</span><input type="number" class="wid70 form-control" name="reserve" title="库存" placeholder="数量" ng-model="goods.editReserve" ng-blur="setPriceMaxAmount(goods, true)"
+																							   maxlength="9" oninput="if(value.length>9)value=value.slice(0,9)"
+																							   ng-class="{'error' : goods.editReserveInvalid}"/>
+														</div>
+														<div class="input-list">
+															<span class="tit">起订量:</span><input type="number" class="wid70 form-control" name="minBuyQty"
+																								maxlength="6"
+																								oninput="if(value.length>6)value=value.slice(0,6)"
+																								title="起订"  placeholder="数量" ng-model="goods.editMinBuyQty" ng-change="updateStartNumber(goods)"
+																								ng-blur="setPriceMinAmount(goods, true)" ng-class="{'error' : goods.editMinBuyQtyInValid}"/>
+														</div>
+														<div class="input-list">
+															<span class="tit">包装数量:</span><input type="number" class="width70 form-control" name="minPackQty" title="包装数量"  placeholder="数量" ng-model="goods.editMinPackQty" ng-blur="setPriceMinPackAmount(goods)"
+																								 maxlength="6" oninput="if(value.length>6)value=value.slice(0,6)"
+																								 ng-class="{'error' : goods.editMinPackQtyInValid}"
+																								 style="width: 70px;"/>
+														</div>
+													</div>
+													<div class="content">
+														<p class="title height24">梯度/pcs</p>
+														<div class="input-list" ng-repeat="price in goods.editPrices">
+															<p>
+																<span  style="overflow: hidden;"><input ng-disabled="$index == 0" type="number" class="wid42 form-control fl"  placeholder="数量" ng-model="price.start" ng-blur="editQty(goods, $index, false, price.start)"
+																										oninput="if(value.length>9)value=value.slice(0,9)"/></span><em class="up fl" ng-if="$last">以上</em>
+																<span style="margin-left: 4px;" ng-if="!$last">–</span>
+																<span ng-if="!$last"><input type="number" class="wid42 form-control"  placeholder="数量" ng-model="price.end" ng-blur="editQty(goods, $index, true, price.end)"
+																														   oninput="if(value.length>9)value=value.slice(0,9)"/></span>
+															</p>
+														</div>
+													</div>
+													<div class="content" ng-if="!store.enType || store.enType === 'HK'">
+														<p class="title height24">单价($)</p>
+														<div class="input-list" ng-repeat="price in goods.editPrices">
+															<input type="number" name="usd" class="wid83 form-control"  placeholder="单价($)" ng-blur="changePrices(goods.editPrices, price.uSDPrice, $index)" ng-class="{'error' : price.priceInvalid}" ng-model="price.uSDPrice" oninput="if(value.length>11)value=value.slice(0,11)"
+																   autocomplete="off" validata-price/>
+														</div>
+													</div>
+													<div class="content" ng-if="!store.enType || store.enType === 'MAINLAND'">
+														<p class="title height24">单价(¥)</p>
+														<div class="input-list" ng-repeat="price in goods.editPrices">
+															<input type="number" name="rmb" class="wid92 form-control"  placeholder="单价(¥)" ng-blur="changePrices(goods.editPrices, price.rMBPrice, $index)" ng-class="{'error' : price.priceInvalid}" ng-model="price.rMBPrice" oninput="if(value.length>11)value=value.slice(0,11)" autocomplete="off" validata-price/>
+														</div>
+													</div>
+													<div class="content content5 plusBtn">
+														<p class="title height24">&nbsp;</p>
+														<div class="input-list" ng-repeat="price in goods.editPrices" style="height: 24px;line-height: 24px;margin-bottom: 5px;">
+															<a class="reduce" ng-disabled="goods.editPrices.length < 2" ng-click="deleteFragment(goods, $index)"><i class="fa fa-minus-circle" ng-class="{ 'restrict-color': goods.editPrices.length === 1 }"></i></a>
+															<a class="add" ng-click="addFragment(goods)"  ng-disabled="goods.editPrices.length >= 3"><i class="fa fa-plus-circle"
+																														ng-class="{ 'restrict-color': $index === 2 }"></i></a>
+														</div>
+													</div>
+													<div class="content floatLeft">
+														<p class="title height29">交期(天):</p>
+														<div class="input-list">
+															<p>
+																<span><input type="number" class="wid36 form-control" name="minDelivery" title="最小交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)" ng-model="goods.editMinDelivery"
+																			 ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, true, goods)" ng-class="{'error' : goods.editMinDeliveryinValid}"/></span>
+																<span style="margin-left: 4px;">–</span>
+																<span><input type="number" class="wid36 form-control" name="maxDelivery" title="最大交期" placeholder="天数" oninput="if(value.length>2)value=value.slice(0,2)" ng-model="goods.editMaxDelivery"
+																			 ng-blur="changeDelivery(goods.editMinDelivery, goods.editMaxDelivery, false, goods)" ng-class="{'error' : goods.editMaxDeliveryinValid}"/></span>
+															</p>
+														</div>
+													</div>
+													<div class="content margin10">
+														<!--<p class="title">自营 / 寄售</p>-->
+														<div class="input-list">
+															<select name="editSelfSale" ng-change="changeSaleMode(goods)" class="wid56 select-adder form-control" ng-model="goods.editSelfSale" ng-disabled="$$nonProduct.canSelfSale">
+																<option value="1">自营</option>
+																<option value="2">寄售</option>
+															</select>
+														</div>
+														<div class="content contents">
+															<p class="title" ng-if="goods.status == '612'">未上架</p>
+															<p class="title" style='color: #33b401;' ng-if="goods.status == '601' || goods.status == '602'">已上架</p>
+														</div>
+													</div>
+													<div class="content" style="width: 56px; float: right; margin-right: 10px;">
+													<p class="title">&nbsp;</p>
+													<div class="input-list">
+														<button class="ok" ng-mouseenter="impedeBlur()" ng-mouseleave="recoveryBlur()" ng-click="updateGoods(material, goods)">保存</button>
+														<button class="off" ng-click="closeEditGoods(material, goods)">取消</button>
+													</div>
+												</div>
+												</div>
+											</td>
+										</tr>
+										</tbody>
+										<!--空状态-->
+										<tbody ng-if="currenctMaterial.length == 0">
+										<tr style="height: 190px;">
+											<td colspan="7" style="border-bottom: none;">
+												<div class="col-xs-2"  style="margin-left: 34%; margin-top: 65px;">
+													<img src="static/img/all/empty-cart.png">
+												</div>
+												<div class="col-xs-4">
+													<p class="grey f16" style="line-height: 80px; text-align: left; margin-top: 70px;">暂无物料资料记录</p>
+												</div>
+											</td>
+										</tr>
+										</tbody>
+									</table>
+								</div>
+							</div>
+						</td>
+					</tr>
+					</tbody>
+				</table>
+				<div class="empty" ng-if="currenctMaterial.length == 0">
+					<p class="empty-img">
+						<img src="static/img/all/empty-cart.png">
+					</p>
+					<div class="empty-info">
+						<p class="grey"> 暂无产品信息,赶快上传让更多人看到你的产品吧 </p>
+						<a href="/vendor#/vendor_upload"><i></i>马上去上传</a>
+					</div>
+				</div>
+				<div class="record-line text-right" ng-if="currenctMaterial.length != 0">
+					<!--<div class="prompt" ng-show="standard_tab == 'unstandard'">-->
+						<!--<strong class="text-inverse">*</strong>商城暂未收录的 品牌/器件,”原厂型号“将会显示为空且不可上架售卖,<br/>-->
+						<!--如需上架可先点击 【匹配】按钮,若匹配不成功,可前往<a ui-sref="vendor_brand_apply" target="_blank"> 品牌申请/</a><a ui-sref="vendor_component_apply" target="_blank">器件申请</a>,提出申请-->
+					<!--</div>-->
+					<div ng-if="currenctMaterial.length != 0">显示 {{(param.page - 1) * 10 + 1}}-
+						<span ng-if="param.currentPage == materialAll.totalPages" ng-bind="materialAll.totalElements"></span>
+						<span ng-if="param.currentPage != materialAll.totalPages" ng-bind="param.page * param.count"></span>, 共: <span ng-bind="materialAll.totalElements" style="color: #5078cb;"></span> 个</div>
+				</div>
+				<div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px; padding-bottom: 80px;" ng-if="materialAll.totalPages>1">
+					<ul class="pagination ng-table-pagination">
+						<li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+							<a ng-switch-when="prev" ng-click="setPage(page.type, -1)" href="">&laquo;</a>
+							<a ng-switch-when="first" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="page" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="more" ng-click="setPage(page.type, -1)" href="">&#8230;</a>
+							<a ng-switch-when="last" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="next" ng-click="setPage(page.type, -1)" href="">&raquo;</a>
+						</li>
+					</ul>
+					<div class="page-go-block">
+						<input
+								class="page-number" type="text" ng-model="param.currentPage" ng-keyup="listenEnter()"/>
+						<a class="page-a"
+						   ng-click="setPage('page', param.currentPage)" href="">GO</a> {{param.currentPage}}
+					</div>
+				</div>
+			</div>
+			</div>
+			<!--自定义标签-->
+			<div class="wanted-list02" id="wanted-list02">
+				<div class="title">
+					<div class="fl">
+						<img src="static/img/vendor/images/label.png" alt=""/>
+						<span>自定义标签</span>
+					</div>
+					<div class="fr">
+						<span ng-click="selfTagTaggle(false)" ng-if="$$nonProduct.selfTagNoticeShow">收起 <i class="fa fa-angle-up"></i></span>
+						<span ng-click="selfTagTaggle(true)" ng-if="!$$nonProduct.selfTagNoticeShow">展开 <i class="fa fa-angle-down"></i></span>
+					</div>
+				</div>
+				<div class="content">
+					<h3>什么是自 <span>定义标签</span> <em>?</em></h3>
+					<p>自定义标签是可以让买家快速判断同一个型号品牌产品主要属性区别的标识。
+					</p>
+					<p>未填写的情况下会自动显示为 <span>“类型A”</span>、<span>“类型B"</span>,以此类推。填写后在产品详情页的展示效果如下:</p>
+					<div class="hover-show" ng-if="!$$nonProduct.selfTagNoticeShow"></div>
+					<div class="show-up" ng-if="$$nonProduct.selfTagNoticeShow">
+						<div class="img">
+							<div>
+								<img src="static/img/vendor/images/detail.png" alt=""/>
+								<p>只有一种类型的情况,<span>不显示</span>小标签</p>
+							</div>
+							<div>
+								<img src="static/img/vendor/images/detail.png" alt=""/>
+								<p>存在2种及以上类型的情况,<span>显示</span>小标签</p>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<!--匹配结果列表页-->
+		<div ng-if="standard_tab == 'matchResult'" style="margin-top: -15px;">
+			<div class="search-checks">
+				<div class="tip fl">
+					<div class="count">共 <span ng-bind="matchTotal">1000</span> 个产品进行匹配,成功 <span ng-bind="matchSuccess">500</span> 个,失败 <em ng-bind="matchFail">500</em> 个</div>
+					<div class="apply"><em>*</em> 以下部分产品商城暂未收录,可前往<a href="vendor#/brand/apply/">品牌中心/</a><a href="vendor#/component/apply"> 器件申请</a>中提出申请</div>
+				</div>
+				<div class="search fr">
+					<input type="text" class="form-control ng-pristine ng-valid ng-touched" ng-model="param.keyword" ng-search="onSearch()" placeholder="类目/品牌/型号">
+					<button ng-click="onSearch()">搜索</button>
+				</div>
+			</div>
+			<div class="wanted_list01">
+				<div style="width: 96%; margin: 0 auto">
+					<div class="result" ng-if="resultTip"><span class="fl"><em>*</em>匹配成为标准产品方可通过器件选型、参数搜索展示</span><a ng-click="closeTip()" class="fr">&times;</a></div>
+					<div class="tab-head">匹配失败的产品</div>
+					<table class="fail-tab public-tab table public-tabs">
+						<thead>
+						<tr>
+							<th width="60">序号</th>
+							<th width="120">产品名称(类目)</th>
+							<th width="120">品牌</th>
+							<th width="100">型号</th>
+							<th width="100">封装</th>
+							<th width="80"></th>
+						</tr>
+						</thead>
+						<tbody class="hover-table">
+						<tr  ng-repeat="product in currenctMaterial">
+							<td>{{$index+1}}</td>
+							<td title="{{product.kind}}" ng-bind="product.kind || '-'">继电器</td>
+							<td ng-show="product.matchresults.length == 0" title="{{product.pbranden}}" ng-bind="product.pbranden">Pionhhkhnkkkkkguf</td>
+							<td class="choose" ng-show="product.matchresults.length != 0">
+								<!--<input type="text" class="form-control" ng-model="product.editBrandEn" ng-focus="onFocus(product)" ng-blur="onItemBlur()" readonly="readonly">-->
+								<!--<p>{{product.isFocus}}</p>-->
+								<!--<ul ng-if="showBrand && product.isFocus">-->
+									<!--<li ng-click="fitBrandToProduct(product, product.pbranden, null)" class="active" ng-bind="product.pbranden">主控管道</li>-->
+									<!--<li ng-click="fitBrandToProduct(product, item.branden, item.id)" ng-repeat="item in product.matchresults">{{item.branden}}</li>-->
+								<!--</ul>-->
+                                <select ng-model="product.selectBrandId" class="choose-brand" ng-init="product.selectBrandId=product.pbranden" ng-change="fitBrandToProduct(product)">
+                                    <option ng-value="product.pbranden" selected="selected">{{product.pbranden}}</option>
+                                    <option ng-value="item.id" ng-repeat="item in product.matchresults">{{item.branden}}</option>
+                                </select>
+							</td>
+							<td title="{{product.pcmpcode}}" ng-bind="product.pcmpcode || '-'">Lhhjhj-3</td>
+							<td title="{{product.encapsulation}}" ng-bind="product.encapsulation  || '-'">BGA</td>
+							<td class="confirm"><span ng-if="product.matchresults.length != 0 && product.canMatch" ng-click="updateNStandardOne(product)">确认</span></td>
+						</tr>
+						</tbody>
+						<tr style="height: 40px;" class="no-hover">
+							<td colspan="7" style="border-bottom: none; padding: 0;">
+								<div class="record-line text-right">
+								<span class="set-count">
+									每页显示:
+									<!--<input type="text" value="10" class="form-control">-->
+									<!--<ul>-->
+									<!--<li>15</li>-->
+									<!--</ul>-->
+									<select ng-model="$$nonProduct.count" ng-change="fitCountToTable($$nonProduct.count)">
+										<option value="10">10</option>
+										<option value="15">15</option>
+										<option value="20">20</option>
+									</select>
+								</span>
+									显示<span>{{(param.currentPage - 1) * param.count + 1}}</span>-
+									<span ng-if="param.currentPage != materialAll.totalPages">{{param.currentPage * param.count}}</span>
+									<span ng-if="param.currentPage == materialAll.totalPages">{{materialAll.totalElements}}</span>
+									,共:<span style="color: #5078cb;">{{materialAll.totalElements}}</span>个
+								</div>
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</div>
+				<div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px;" ng-if="materialAll.totalPages>1">
+					<ul class="pagination ng-table-pagination">
+						<li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+							<a ng-switch-when="prev" ng-click="setPage(page.type, -1)" href="">&laquo;</a>
+							<a ng-switch-when="first" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="page" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="more" ng-click="setPage(page.type, -1)" href="">&#8230;</a>
+							<a ng-switch-when="last" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="next" ng-click="setPage(page.type, -1)" href="">&raquo;</a>
+						</li>
+					</ul>
+					<div class="page-go-block">
+						<input class="page-number" type="number" ng-model="param.currentPage" ng-keydown="listenEnter()"/>
+						<a class="page-a" ng-click="setPage('page', param.currentPage)" href="">GO</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+<!--一键匹配弹出框-->
+<div class="matchPop" ng-if="haveRepeat">
+	<div class="title">
+		<div class="title-product">
+			<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
+			<span>标准产品(型号:{{backData.brandAndCode.code}},品牌:{{backData.brandAndCode.brandEn}})已存在属性相同的子产品,请选择您需要保留的其中一条产品信息</span>
+		</div>
+		<div class="close" ng-click="cancelChoose()">&times;</div>
+	</div>
+	<div class="content">
+		<div class="content-box">
+			<div class="content-choose" ng-repeat="(key, goodsList) in repeatList">
+				<div class="list" ng-repeat="goods in goodsList">
+					<div class="fl"><input type="radio" ng-model="goodsList.selected" value="{{goods.id}}" name="{{key}}"></div>
+					<div class="product-detail">
+						<div class="product-number">
+							<div class="code">产品编号 :<span ng-bind="goods.prodNum">234353646546</span></div>
+							<div class="code"><em>*</em>自定义标签 :<span class="define" ng-bind="goods.tag">散装出售</span></div>
+						</div>
+						<div class="clearfix">
+							<div class="detail">
+								<div class="detail-title">包装:<span ng-bind="goods.packaging">盘装</span></div>
+								<div class="detail-title">库存:<span ng-bind="goods.reserve">9023492</span></div>
+								<div class="detail-title">起订量:<span ng-bind="goods.minBuyQty">90492</span></div>
+							</div>
+							<div class="detail distance">
+								<div class="detail-title">交期(天):
+									<span ng-if="goods.maxDelivery == goods.minDelivery">{{goods.minDelivery}}</span>
+									<span ng-if="goods.maxDelivery != goods.minDelivery">{{goods.minDelivery}}-{{goods.maxDelivery}}</span>
+								</div>
+								<div class="detail-title">包装数量:<span ng-bind="goods.minPackQty">980</span></div>
+								<div class="detail-title">生产日期:<span ng-bind="goods.produceDate">20160123</span></div>
+							</div>
+							<div class="detail">
+								<div class="detail-title">销售方式:<span ng-bind="goods.selfSale">寄售</span></div>
+								<div class="detail-title" ng-bind="goods.breakUp ? '可拆卖':'不可拆卖'">不可拆卖</div>
+							</div>
+							<div class="detail width100">
+								<div class="title-price"><span>梯度/pcs</span><span>单价(<i ng-bind="goods.currencyName == 'RMB' ? '¥':'$'"></i>)</span></div>
+								<div class="detail-price" ng-repeat="price in goods.prices">
+									<span>{{price.start}}+</span>
+									<span ng-bind="goods.currencyName == 'RMB' ? price.rMBPrice : price.uSDPrice">0.356</span>
+								</div>
+								<!--<div class="detail-price"><span>200+</span><span>0.256</span></div>-->
+								<!--<div class="detail-price"><span>800+</span><span>0.156</span></div>-->
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div class="footer">
+		<a ng-click="cancelChoose()">取消</a><a ng-click="ensureDeleteRepeat()">确认</a>
+	</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>

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

@@ -728,7 +728,8 @@
     <div class="pro_management device">
         <div class="com_tab">
             <ul class="fl" style="width: 100%">
-                <li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">产品库</a></li>
+                <li ng-class="{'active': tab == 'material_person'}"><a ui-sref="vendor_material_person">个人产品库</a></li>
+                <li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">企业产品库</a></li>
                 <li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
                 <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
                 <li class="down-goods">

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

@@ -553,7 +553,8 @@
     <div class="pro_management device">
         <div class="com_tab">
             <ul class="fl" style="width: 100%">
-                <li ng-class="{'active': tab == 'vendor_material'}"><a ui-sref="vendor_material">产品库</a></li>
+                <li ng-class="{'active': tab == 'material_person'}"><a ui-sref="vendor_material_person">个人产品库</a></li>
+                <li ng-class="{'active': tab == 'vendor_material'}"><a ui-sref="vendor_material">企业产品库</a></li>
                 <li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
                 <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
             </ul>

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

@@ -347,7 +347,8 @@
     <div class="pro_management device">
         <div class="com_tab">
             <ul class="fl" style="width: 100%">
-                <li ng-class="{'active': $$productOn.leadIn == 'bathOn'}" ng-click="toggleActive('bathOn')"><a href="javascript:void(0)">批量发布</a></li>
+                <li ng-class="{'active': $$productOn.tab == 'bathOnPerson'}" ng-click="toggleActive('bathOnPerson')"><a href="">导入我的产品</a></li>
+                <li ng-class="{'active': $$productOn.tab == 'bathOn'}" ng-click="toggleActive('bathOn')"><a href="">批量发布</a></li>
             </ul>
         </div>
         <div class="wanted_list01">
@@ -368,8 +369,8 @@
                         <em class="open-icon" ng-click="open02=!open02" ng-class="{'active': !open02}"></em>
                     </p>
                     <div class="add_category" ng-if="!open02">
-                        <div>1、请选择是店铺自营还是优软代售</div>
-                        <div class="sale-label" style="margin-top: -10px;">
+                        <div ng-if="$$productOn.tab == 'bathOn'">1、请选择是店铺自营还是优软代售</div>
+                        <div class="sale-label" style="margin-top: -10px;" ng-if="$$productOn.tab == 'bathOn'">
                             <label class="sellType">
                                 <input ng-click="sellType('UAS')" type="radio" name="487" id="sellbyUAS" ng-model="batch.sellType" ng-checked="batch.sellType == 'UAS'">
                                 <label for="sellbyUAS"></label>
@@ -381,7 +382,7 @@
                                 <span ng-disabled="!batch.selfSellEabled">店铺自营</span>
                             </label>
                         </div>
-                        <div>2、请上传已经编辑好的库存表格,选择好上传的文件之后,点击确认上传</div>
+                        <div><span ng-if="$$productOn.tab == 'bathOn'">2、</span>请上传已经编辑好的库存表格,选择好上传的文件之后,点击确认上传</div>
                         <div class="upload">
                             <div class="upload-content">
                                 <input type="text" name="txt" id="upload_text" />
@@ -483,8 +484,8 @@
                                 </tr>
                             </tbody>
                         </table>
-                        <div style="margin-top: -40px;">3、如核对信息无误之后,点击确认发布</div>
-                        <a class="blue-bg publish" href="javascript:void(0)" ng-click="publish($event)" ng-disabled="!pageParams.totalElements">确认上架</a>
+                        <div style="margin-top: -40px;" ng-if="$$productOn.tab == 'bathOn'">3、如核对信息无误之后,点击确认发布</div>
+                        <a class="blue-bg publish" href="javascript:void(0)" ng-click="publish($event)" ng-disabled="!pageParams.totalElements" ><span ng-if="$$productOn.tab == 'bathOn'">确认上架</span><span ng-if="$$productOn.tab == 'bathOnPerson'">提交</span></a>
                     </div>
                 </div>
                 <!--<div class="load_next">-->

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

@@ -47,7 +47,7 @@
 	<!--	<li ng-class="{'active' : active == 'vendor_productOn'}"><a  ui-sref="vendor_productOn">产品导入</a></li>-->
 		<li ng-class="{'active' : active == 'vendor_productOn'}"><a  ui-sref="vendor_upload">产品导入</a></li>
 		<!--<li ng-class="{'active' : active == 'vendor_repository'}"><a  ui-sref="vendor_repository">仓库管理</a></li>-->
-		<li ng-class="{'active' : active == 'vendor_material'}"><a  ui-sref="vendor_material">产品管理</a></li>
+		<li ng-class="{'active' : active == 'vendor_material_person'}"><a  ui-sref="vendor_material_person">产品管理</a></li>
 		<!--<li ng-class="{'active' : active == 'vendor_after_sale'}" class="undo">-->
 		<!--&lt;!&ndash;<a  ui-sref="vendor_after_sale">售后处理</a>&ndash;&gt;-->
 		<!--售后处理-->
@@ -77,7 +77,7 @@
 			<!--	<li ng-class="{'active' : active == 'vendor_productOn'}"><a  ui-sref="vendor_productOn">产品导入</a></li>-->
 			<li ng-class="{'active' : active == 'vendor_productOn'}"><a ng-click="promptUpdate()" class="disabled" >产品导入</a></li>
 			<!--<li ng-class="{'active' : active == 'vendor_repository'}"><a  ui-sref="vendor_repository">仓库管理</a></li>-->
-			<li ng-class="{'active' : active == 'vendor_material'}"><a ng-click="promptUpdate()" class="disabled" >产品管理</a></li>
+			<li ng-class="{'active' : active == 'vendor_material_person'}"><a ng-click="promptUpdate()" class="disabled" >产品管理</a></li>
 			<!--<li ng-class="{'active' : active == 'vendor_after_sale'}" class="undo">-->
 			<!--&lt;!&ndash;<a  ui-sref="vendor_after_sale">售后处理</a>&ndash;&gt;-->
 			<!--售后处理-->